@exellix/graph-composer 2.14.0 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.15.0 — graph-engine 9.x response contract alignment
4
+
5
+ ### Changed
6
+
7
+ - **Peer / dev:** `@exellix/graph-engine` **^9.0.0** — canonical `graph.response` only at execute; `validateGraphResponseWiring` on compile; optional `coerce: 'stringArray'` on response selectors.
8
+
9
+ ### Downstream
10
+
11
+ - **graphs-playground:** remove execute-time response normalize/coerce; stamp `coerce: 'stringArray'` in studio presets at save time.
12
+
3
13
  ## 2.12.0 — Graphenix 2.7.3 + webQueryTemplate authoring
4
14
 
5
15
  ### Breaking
@@ -1,6 +1,3 @@
1
- /**
2
- * funcx 4.4+ uses `model` on call sites; legacy graph-composer options used `mode` (weak/normal/strong/ultra).
3
- */
4
1
  export declare function resolveFuncxModel(opts: {
5
2
  model?: string;
6
3
  mode?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"funcxModel.d.ts","sourceRoot":"","sources":["../src/funcxModel.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,GAAG,SAAS,CAK7F"}
1
+ {"version":3,"file":"funcxModel.d.ts","sourceRoot":"","sources":["../src/funcxModel.ts"],"names":[],"mappings":"AAmBA,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,GAAG,SAAS,CAcrB"}
@@ -1,10 +1,32 @@
1
1
  /**
2
- * funcx 4.4+ uses `model` on call sites; legacy graph-composer options used `mode` (weak/normal/strong/ultra).
2
+ * funcx 4.9+ call sites require `model` as a profile/choice key or catalog slug.
3
+ * Legacy graph-composer options still accept `mode` (weak/normal/strong/ultra):
4
+ * resolve via LLM_MODEL_* env, then fall back to ai-profiles keys.
3
5
  */
6
+ const MODE_ENV = {
7
+ weak: "LLM_MODEL_WEAK",
8
+ normal: "LLM_MODEL_NORMAL",
9
+ strong: "LLM_MODEL_STRONG",
10
+ ultra: "LLM_MODEL_ULTRA",
11
+ };
12
+ const MODE_DEFAULT_PROFILE = {
13
+ weak: "cheap/default",
14
+ normal: "balanced/default",
15
+ strong: "balanced/default",
16
+ ultra: "deep/default",
17
+ };
4
18
  export function resolveFuncxModel(opts) {
5
19
  const model = opts.model?.trim();
6
20
  if (model)
7
21
  return model;
8
- const mode = opts.mode?.trim();
9
- return mode || undefined;
22
+ const mode = opts.mode?.trim().toLowerCase();
23
+ if (!mode)
24
+ return undefined;
25
+ const envKey = MODE_ENV[mode];
26
+ if (envKey) {
27
+ const fromEnv = process.env[envKey]?.trim();
28
+ if (fromEnv)
29
+ return fromEnv;
30
+ }
31
+ return MODE_DEFAULT_PROFILE[mode];
10
32
  }
@@ -12,13 +12,14 @@ You are a graph architect for the **worox-graph** flat authoring format (`@exell
12
12
  7. **Task node config:** For every **non-local** AI task node, set **`taskConfiguration.aiTaskProfile`** with non-empty **`preStrategyKey`** and **`postStrategyKey`**. Add **`taskConfiguration.narrix`** when discovery applies (discovery only). Add **`webQueryTemplate`** / **`inputSynthesis`** under **`aiTaskProfile`** when needed. Use **`inputsConfig`** + **`taskVariable`** + **`executionMapping`** (not deprecated `inputs` / `outputMapping`). Add **`metadata.graphReadability`** / **`catalogBinding`** for planning only.
13
13
 
14
14
  **Web scope (Graphenix 2.7.2+ — Rendrix template on `aiTaskProfile`, not `narrix`):**
15
+ In emitted graph JSON, wrap input field paths in Rendrix double-brace delimiters (example field path: `input.assetId`).
15
16
  ```json
16
17
  "taskConfiguration": {
17
18
  "narrix": { "datasetId": "network.assets", "layer": "asset" },
18
19
  "aiTaskProfile": {
19
20
  "preStrategyKey": "pre-v1",
20
21
  "postStrategyKey": "post-v1",
21
- "webQueryTemplate": "Is {{input.assetId}} reachable from the internet?"
22
+ "webQueryTemplate": "Is input.assetId reachable from the internet?"
22
23
  }
23
24
  }
24
25
  ```
@@ -29,7 +29,7 @@ Cover what matters for the graph at hand; skip axes that clearly do not apply. *
29
29
  - **Narrix discovery**: For **`professional-answer`** (or other LLM) nodes that imply discovery, check **`taskConfiguration.narrix`** (`datasetId`, `layer`, `narrativeTypeIds`) for coherence with **`inputsConfig`** / **`taskVariable`** and **`catalogCandidates.narrixTemplates`** when present.
30
30
  - **Catalog planning vs runtime**: When **`metadata.catalogBinding`** / **`metadata.catalogRequests`** (graph) exist, note mismatches vs actual **`taskConfiguration.narrix`** / **`taskConfiguration.scopingMapId`** on nodes, or vs gaps declared in **`catalogRequests`**.
31
31
  - **Graph I/O contracts**: When **`metadata.graphEntry`** or **`metadata.graphResponse`** exist, comment on whether **`inputs`**, **`taskVariable`**, execution paths, and finalizer outputs align with declared **`requiredExecutionPaths`** / **`notableExecutionPaths`** / schemas (authoring-level review).
32
- - **Web scoping + input synthesis (node-level)**: Under **`taskConfiguration.aiTaskProfile`**, web scope requires non-empty **`webQueryTemplate`** (Rendrix string with `{{input.*}}` refs) — do **not** author **`webScoping`** or web keys on **`narrix`**. When **`inputSynthesis.enabled`** is true, require non-empty **`catalogId`**, **`strategyKey`**, **`outputKey`**, **`sources`**, and **`destination`** (`job`, `task`, or `execution`).
32
+ - **Web scoping + input synthesis (node-level)**: Under **`taskConfiguration.aiTaskProfile`**, web scope requires non-empty **`webQueryTemplate`** (Rendrix string with `input.<fieldName>` refs in double-brace syntax) — do **not** author **`webScoping`** or web keys on **`narrix`**. When **`inputSynthesis.enabled`** is true, require non-empty **`catalogId`**, **`strategyKey`**, **`outputKey`**, **`sources`**, and **`destination`** (`job`, `task`, or `execution`).
33
33
  - **Task decomposition**: One clear responsibility per node; avoid redundant or oversized steps.
34
34
  - **Skill selection**: Right tool for deterministic vs inferential work; catalog alignment in locked mode.
35
35
  - **Data flow**: Execution-memory paths and `jobContextMapping` / `inputs` trace from `input.*` or upstream writers; `taskVariable.question` and other task variables stay out of runtime payload bindings; `taskVariable` refs trace to top-level `variables`; no obvious dangling reads.
@@ -43,7 +43,7 @@ A graph is a single JSON object. Top-level fields (canonical root keys only):
43
43
  "aiTaskProfile": {
44
44
  "preStrategyKey": "<pre-strategy-row-id>",
45
45
  "postStrategyKey": "<post-strategy-row-id>",
46
- "webQueryTemplate": "Optional Rendrix template, e.g. Patch status for {{input.cveId}}?",
46
+ "webQueryTemplate": "Optional Rendrix template, e.g. Patch status for input.cveId (wrap field paths in Rendrix double-brace syntax in real graph JSON)",
47
47
  "inputSynthesis": { "enabled": false }
48
48
  },
49
49
  "narrix": { "datasetId": "<optional>", "layer": "<optional>" },
@@ -10,7 +10,7 @@ Before returning any graph (create/modify only), verify:
10
10
  8. If `maxNodes` is set, the total node count does not exceed it.
11
11
  9. All `skillKey` values exist in the provided catalog (unless extensible mode is active).
12
12
  10. For every **AI task** node, include **`taskConfiguration.aiTaskProfile.preStrategyKey`** and **`postStrategyKey`** (non-empty strings matching deployment PRE/POST strategy catalog row ids). Omit only on local/utility skills.
13
- 11. When web scope is needed, set non-empty **`taskConfiguration.aiTaskProfile.webQueryTemplate`** (Rendrix string with `{{input.*}}` refs). Optional **`webQueryTemplates[]`** for pack mode. Do **not** author **`webScoping`** or web keys on **`narrix`**.
13
+ 11. When web scope is needed, set non-empty **`taskConfiguration.aiTaskProfile.webQueryTemplate`** (Rendrix string with `input.<fieldName>` refs in double-brace syntax). Optional **`webQueryTemplates[]`** for pack mode. Do **not** author **`webScoping`** or web keys on **`narrix`**.
14
14
  12. When **`inputSynthesis.enabled`** is `true`, set non-empty **`inputSynthesis.catalogId`**, **`strategyKey`**, **`outputKey`**, **`sources`** (memory paths), and **`destination`** (`job`, `task`, or `execution`). Do not add manual PRE `synthesized-context` steps when profile synthesis is enabled.
15
15
  13. Do not author deprecated task-node **`inputs`** or **`outputMapping`** — use **`inputsConfig`** and **`executionMapping`**.
16
16
  14. **Narrix** belongs under **`taskConfiguration.narrix`** (`datasetId`, `layer`, `narrativeTypeIds` when needed). Discovery only — no web fields on `narrix`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exellix/graph-composer",
3
- "version": "2.14.0",
3
+ "version": "2.15.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,7 +36,7 @@
36
36
  "verify:local": "tsx src/verify-local.ts",
37
37
  "verify:catalog-live": "x12i-env run --env-file .env -- tsx scripts/verify-catalog-live.ts",
38
38
  "test": "npm run test:unit && npm run test:live",
39
- "test:unit": "node --import tsx/esm --test --test-force-exit --test-concurrency=1 test/unit/explain-shape.test.ts test/unit/graph-concept-patch.test.ts test/unit/graph-concept-story-parse.test.ts test/unit/review-concept-output-validation.test.ts test/unit/review-concept-catalog-alias.test.ts test/unit/redact-for-log.test.ts test/unit/graph-composer-logging.test.ts test/unit/worker-instructions.test.ts test/unit/catalog-output-validation.test.ts test/unit/catalox-catalog-bridge.test.ts test/unit/ai-task-profile.test.ts test/unit/create-modify-output-validation.test.ts test/unit/task-node-task-variable.test.ts test/unit/canonical-graph-document.test.ts test/unit/graph-engine-bridge.test.ts test/unit/authoring-graph-validation.test.ts test/unit/graph-model-layers.test.ts test/unit/example-generation.test.ts test/unit/graph-entry-schema.test.ts test/unit/graph-entry-patch-validation.test.ts test/unit/graph-entry-entity-alignment.test.ts test/unit/model-config-patch-merge.test.ts test/unit/graph-entry-registry.test.ts test/unit/graph-model-label-format.test.ts test/unit/llm-call-config.test.ts",
39
+ "test:unit": "node --import tsx/esm --test --test-force-exit --test-concurrency=1 test/unit/explain-shape.test.ts test/unit/graph-concept-patch.test.ts test/unit/graph-concept-story-parse.test.ts test/unit/review-concept-output-validation.test.ts test/unit/review-concept-catalog-alias.test.ts test/unit/redact-for-log.test.ts test/unit/graph-composer-logging.test.ts test/unit/worker-instructions.test.ts test/unit/catalog-output-validation.test.ts test/unit/catalox-catalog-bridge.test.ts test/unit/ai-task-profile.test.ts test/unit/create-modify-output-validation.test.ts test/unit/task-node-task-variable.test.ts test/unit/canonical-graph-document.test.ts test/unit/graph-engine-bridge.test.ts test/unit/authoring-graph-validation.test.ts test/unit/graph-model-layers.test.ts test/unit/example-generation.test.ts test/unit/graph-entry-schema.test.ts test/unit/graph-entry-patch-validation.test.ts test/unit/graph-entry-entity-alignment.test.ts test/unit/model-config-patch-merge.test.ts test/unit/graph-entry-registry.test.ts test/unit/graph-model-label-format.test.ts test/unit/llm-call-config.test.ts test/unit/funcx-model.test.ts test/unit/instruction-template.test.ts",
40
40
  "test:live": "x12i-env run --env-file .env -- node --import tsx/esm --test test/live/all.ts",
41
41
  "pack:check": "npm pack --dry-run",
42
42
  "suggest-smoke": "x12i-env run --env-file .env -- tsx scripts/run-suggest-concept-smoke.ts"
@@ -76,7 +76,7 @@
76
76
  }
77
77
  },
78
78
  "dependencies": {
79
- "@exellix/graph-engine": "^8.6.0",
79
+ "@exellix/graph-engine": "^9.0.0",
80
80
  "@x12i/catalox": "^5.9.8",
81
81
  "@x12i/env": "^4.0.3",
82
82
  "@x12i/funcx": "^4.9.13",