# @x12i/graphenix-executable-profile-format

> Executable model/profile extension contract: graph extension validation and node modelConfig slice (non-rejection of sibling task-node fields).

Latest version **2.17.0** (published 2026-07-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @x12i/graphenix-executable-profile-format
pnpm add @x12i/graphenix-executable-profile-format
yarn add @x12i/graphenix-executable-profile-format
bun add @x12i/graphenix-executable-profile-format
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.17.0 |
| Published | 2026-07-10 |
| First published | 2026-06-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 46.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | x12i |
| Keywords | graph, graphenix, executable, profile, model-config |

## Links

- npm: https://www.npmjs.com/package/@x12i/graphenix-executable-profile-format
- Repository: https://github.com/x12i/graphenix-format
- Homepage: https://github.com/x12i/graphenix-format#readme
- Issues: https://github.com/x12i/graphenix-format/issues
- npm.io page: https://npm.io/package/@x12i/graphenix-executable-profile-format

## Dependencies (4)

- [@x12i/ai-profiles](https://npm.io/package/@x12i/ai-profiles.md) ^4.2.1
- [@x12i/graphenix-core](https://npm.io/package/@x12i/graphenix-core.md) ^2.17.0
- [@x12i/graphenix-case-format](https://npm.io/package/@x12i/graphenix-case-format.md) ^2.17.0
- [@x12i/graphenix-executable-contracts](https://npm.io/package/@x12i/graphenix-executable-contracts.md) ^2.17.0

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 2.17.0 (latest) — 2026-07-10
- 2.16.0 — 2026-06-29
- 2.15.0 — 2026-06-29
- 2.14.0 — 2026-06-28
- 2.12.5 — 2026-06-28
- 2.12.4 — 2026-06-28
- 2.12.3 — 2026-06-27
- 2.12.2 — 2026-06-27
- 2.11.0 — 2026-06-24
- 2.10.0 — 2026-06-24
- 2.9.0 — 2026-06-23
- 2.8.1 — 2026-06-21
- 2.8.0 — 2026-06-21
- 2.7.3 — 2026-06-20
- 2.7.2 — 2026-06-20
- … 8 more at https://npm.io/package/@x12i/graphenix-executable-profile-format/versions

## README

# @x12i/graphenix-executable-profile-format

**Phase model profiles** for graph-level `metadata.modelConfig` and per-node `taskConfiguration.modelConfig` overrides.

Legacy import may still read `metadata.extensions["graphenix.executable/v1"]` — promote to `metadata.modelConfig` before persist (`authoringGraphToEngineDocument`).

**profileChoice encoding (persistable authoring):** `{ "kind": "profileChoice", "key": "pro/default" }` — bare strings are rejected on persist.

Validates `profileChoice` keys, model config cases, node override slices, and extension-only mode (does not reject sibling task-node fields).

**Canonical vocabulary:** [GLOSSARY.md](../../GLOSSARY.md) §4 — [Phase model profiles](../../GLOSSARY.md#4-phase-model-profiles-executable-extension--separate-layer).  
When phase **model profile** terms change, update this README and [GLOSSARY.md](../../GLOSSARY.md) together.

---

## Phase model profiles (separate from utility strategies)

| Slot | Run phase | Meaning |
| ---- | --------- | ------- |
| `preActionModel` | **prePhase** | AI profile for PRE-phase utility work |
| `skillModel` | **mainPhase** | AI profile for skill / MAIN execution |
| `postActionModel` | **postPhase** | AI profile for POST-phase utility work |

**Banned shorthand:** “PRE model” → use **PRE-phase model profile (`preActionModel`)**.

| Layer | Package | Question |
| ----- | ------- | -------- |
| Phase utility strategy | `@x12i/graphenix-task-node-format` | **What** utility runs (`aiTaskStrategies.pre`, …) |
| Phase model profile | **this package** | **Which AI profile** runs each phase |

Do not conflate `aiTaskStrategies.pre: "synthesis"` (PRE-phase utility strategy key) with `aiTaskProfile.inputSynthesis` (skill input synthesis profile — `@x12i/graphenix-task-node-format`).

### Graph extension and per-node override

Validators in this package cover:

- **Graph-level** `metadata.modelConfig` (cases + triplet) — canonical 2.1.0 persist path
- **Legacy import** `metadata.extensions["graphenix.executable/v1"].modelConfig` (extension validation only)
- **Node-level** `taskConfiguration.modelConfig` override slices (`preActionModel`, `skillModel`, `postActionModel` on the task node)

Node overrides are executable profile semantics even when stored on the task node — not task-node body validation. `validateNodeModelConfigSlice()` and `validateExecutableProfileExtension()` both enforce §4; neither validates utility strategies (§2) or skill input synthesis profile (§3).

---

## Examples (JSON)

### Graph-level phase model profiles (required triplet per case)

```json
{
  "formatVersion": "2.1.0",
  "id": "graph:example",
  "graph": {
    "nodes": [],
    "edges": [],
    "inputs": [],
    "outputs": [],
    "metadata": {
      "modelConfig": {
        "cases": [
          {
            "id": "default",
            "modelConfig": {
              "preActionModel": { "kind": "profileChoice", "key": "cheap/default" },
              "skillModel": { "kind": "profileChoice", "key": "vol/default" },
              "postActionModel": { "kind": "profileChoice", "key": "cheap/default" }
            }
          {
            "id": "simulate",
            "when": { "path": "runtime.mode", "op": "eq", "value": "simulate" },
            "modelConfig": {
              "preActionModel": { "kind": "profileChoice", "key": "cheap/default" },
              "skillModel": { "kind": "profileChoice", "key": "sum/default" },
              "postActionModel": { "kind": "profileChoice", "key": "cheap/default" }
            }
          }
        ],
        "fallbackPolicy": {
          "enabled": true,
          "allowedTriggers": ["nodeSlotMissing"],
          "maxAttemptsPerSlot": 1
        }
      }
    }
  }
}
```

### Node-level override (partial MAIN-phase model profile)

```json
"parameters": {
  "profile": "graphenix.task-node/v1",
  "nodeType": "task",
  "skillKey": "professional-answer",
  "taskConfiguration": {
    "executionStrategies": [],
    "aiTaskStrategies": { "pre": "synthesis" },
    "modelConfig": {
      "inherit": true,
      "cases": [{
        "id": "high-risk-input",
        "when": { "path": "runtime.input.riskLevel", "op": "eq", "value": "high" },
        "modelConfig": {
          "skillModel": { "kind": "profileChoice", "key": "deep/openai_deep" }
        }
      }]
    }
  }
}
```

Same node also carries **phase utility strategies** (`aiTaskStrategies`) — validated by task-node-format, not this package.

### Rejected legacy shape (do not author)

```json
"preActionModel": "cheap"
```

Use `{ "kind": "profileChoice", "key": "cheap/default" }` instead.

---

## Install

```bash
npm install @x12i/graphenix-executable-profile-format @x12i/graphenix-core
```

`@x12i/ai-profiles` is installed automatically for `profileChoice` key validation.

---

## Key exports

| API | Purpose |
| --- | ------- |
| `validateExecutableProfileExtension(doc, options?)` | Validate `graphenix.executable/v1` extension |
| `validateNodeModelConfigSlice(nodeId, params, options?)` | Node `taskConfiguration.modelConfig` only |
| `validateAuthoringGraphModelConfig(modelConfig)` | Graph-level cases + triplet |
| `preservesSiblingTaskNodeFields(parameters)` | Assert extension validation ignores task body |
| `validateAiModelSelection`, `isKnownProfileChoice` | Profile choice validation |

`extensionOnly` mode (default): validates model config semantics only — does not strip or reject `taskVariable`, `inputsConfig`, `aiTaskStrategies`, etc.

---

## Extension namespace

```txt
graph.metadata.extensions["graphenix.executable/v1"]
  └─ modelConfig
       └─ cases[]
            └─ modelConfig: { preActionModel, skillModel, postActionModel }
```

Missing slots on node override inherit from the **selected graph case** (same-slot fallback only). See **Examples (JSON)** above.

---

## Related

| Doc / package | Role |
| ------------- | ---- |
| [GLOSSARY.md](../../GLOSSARY.md) | Full phase + strategy + model vocabulary |
| [`@x12i/graphenix-task-node-format`](../task-node-format) | Phase utility strategies (design) |
| [`@x12i/graphenix-plan-format`](../plan-format) | Resolved slots on compiled plan |
| [`@x12i/graphenix-authoring-format`](../authoring-format) | Composes authoring + task-node + profile validation |

---
_Source: https://npm.io/package/@x12i/graphenix-executable-profile-format · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
