@exellix/graph-composer 2.5.9 → 2.6.1
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 +6 -0
- package/README.md +3 -1
- package/dist/canonicalGraphDocument.d.ts.map +1 -1
- package/dist/canonicalGraphDocument.js +24 -6
- package/dist/canonicalGraphWarnings.d.ts.map +1 -1
- package/dist/canonicalGraphWarnings.js +6 -1
- package/dist/graphAiModelConfigCanonicalize.d.ts +1 -1
- package/dist/graphAiModelConfigCanonicalize.js +1 -1
- package/dist/graphModelLayers.d.ts +3 -2
- package/dist/graphModelLayers.d.ts.map +1 -1
- package/dist/graphModelLayers.js +1 -1
- package/dist/llmCallConfig.js +2 -2
- package/functions/graph-composer/prompts/shared/graph-format.md +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -42,7 +42,9 @@ Requires **Node.js 20+** (Catalox embedder and this package align on `>=20`).
|
|
|
42
42
|
| `LOGXER_PACKAGE_LEVELS` | No | Bulk levels, e.g. `GRAPH_COMPOSER:debug,GRAPH_ENGINE:warn` (applied at module load). |
|
|
43
43
|
| `LOGXER_PACKAGE_LOGS_DEFAULT` | No | Registry default when a prefix has no override (default `warn`). |
|
|
44
44
|
|
|
45
|
-
Copy [`.env.example`](./.env.example) to `.env` for local development. **Do not commit secrets.**
|
|
45
|
+
Copy [`.env.example`](./.env.example) to `.env` for local development. **Do not commit secrets.** API keys are env-only — never embed `OPENROUTER_API_KEY` in graph JSON or composer input objects.
|
|
46
|
+
|
|
47
|
+
**Composer `maxTokens` vs graph JSON:** `RunGraphComposerOptions.maxTokens` caps the **composer LLM's own** completion when generating or editing graphs. Authored graph nodes must **not** carry token caps on `taskConfiguration.llmCall` or `modelConfig` — Optimixer owns completion budget at `@exellix/ai-tasks` invoke time.
|
|
46
48
|
|
|
47
49
|
## Quick start (direct worker)
|
|
48
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonicalGraphDocument.d.ts","sourceRoot":"","sources":["../src/canonicalGraphDocument.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"canonicalGraphDocument.d.ts","sourceRoot":"","sources":["../src/canonicalGraphDocument.ts"],"names":[],"mappings":"AAAA;;GAEG;AAwcH,qFAAqF;AACrF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAc7E;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAiCtF;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAWpF"}
|
|
@@ -207,14 +207,32 @@ function ensureGraphResponse(graph) {
|
|
|
207
207
|
return changed;
|
|
208
208
|
}
|
|
209
209
|
function canonicalizeTaskConfigurationExecutionStrategies(node) {
|
|
210
|
-
|
|
211
|
-
if (tc === undefined || tc.executionStrategies === undefined)
|
|
210
|
+
if (node.type !== 'task' && node.type !== undefined)
|
|
212
211
|
return false;
|
|
213
|
-
const
|
|
214
|
-
if (
|
|
212
|
+
const skillKey = node.skillKey;
|
|
213
|
+
if (typeof skillKey !== 'string' || skillKey.trim() === '')
|
|
215
214
|
return false;
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
let tc = readRecord(node.taskConfiguration);
|
|
216
|
+
let changed = false;
|
|
217
|
+
if (tc === undefined) {
|
|
218
|
+
tc = {};
|
|
219
|
+
changed = true;
|
|
220
|
+
}
|
|
221
|
+
if (tc.executionStrategies === undefined) {
|
|
222
|
+
tc = { ...tc, executionStrategies: [] };
|
|
223
|
+
changed = true;
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
const normalized = canonicalizeExecutionStrategies(tc.executionStrategies);
|
|
227
|
+
if (normalized !== tc.executionStrategies) {
|
|
228
|
+
tc = { ...tc, executionStrategies: normalized };
|
|
229
|
+
changed = true;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (changed) {
|
|
233
|
+
node.taskConfiguration = tc;
|
|
234
|
+
}
|
|
235
|
+
return changed;
|
|
218
236
|
}
|
|
219
237
|
function extractWebQuestionsFromNarrix(narrix) {
|
|
220
238
|
const raw = narrix.webScopeQuestions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonicalGraphWarnings.d.ts","sourceRoot":"","sources":["../src/canonicalGraphWarnings.ts"],"names":[],"mappings":"AAkIA;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"canonicalGraphWarnings.d.ts","sourceRoot":"","sources":["../src/canonicalGraphWarnings.ts"],"names":[],"mappings":"AAkIA;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAgIrE"}
|
|
@@ -87,7 +87,7 @@ function collectModelProfileWarnings(graph) {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
if ("xynthesisModel" in o) {
|
|
90
|
-
warnings.push(`${path}: xynthesisModel was removed in graph-engine 7.1 — use preActionModel, skillModel, and postActionModel with profile
|
|
90
|
+
warnings.push(`${path}: xynthesisModel was removed in graph-engine 7.1 — use preActionModel, skillModel, and postActionModel with profile/choice keys (e.g. cheap/default, pro/default).`);
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
const checkSelection = (selection, path) => {
|
|
@@ -183,6 +183,11 @@ export function collectCanonicalGraphWarnings(graph) {
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
+
if (node.type === "task" && typeof node.skillKey === "string" && node.skillKey.trim() !== "") {
|
|
187
|
+
if (tc?.executionStrategies === undefined) {
|
|
188
|
+
warnings.push(`${prefix}: taskConfiguration.executionStrategies is missing — use [] for plain MAIN.`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
186
191
|
const extIssues = collectAiTasksNodeExtensionIssues(node, `nodes[${i}]`);
|
|
187
192
|
for (const issue of extIssues) {
|
|
188
193
|
warnings.push(`${prefix}: ${issue.code} at ${issue.path}: ${issue.message}`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Canonicalize graph JSON modelConfig toward graph-engine 7.1+ shape:
|
|
3
3
|
* `{ cases: [{ modelConfig: { preActionModel, skillModel, postActionModel } }] }`
|
|
4
|
-
* with
|
|
4
|
+
* with profile/choice keys (e.g. cheap/default, pro/default).
|
|
5
5
|
*/
|
|
6
6
|
export type GraphAiModelConfigTriple = {
|
|
7
7
|
preActionModel: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Canonicalize graph JSON modelConfig toward graph-engine 7.1+ shape:
|
|
3
3
|
* `{ cases: [{ modelConfig: { preActionModel, skillModel, postActionModel } }] }`
|
|
4
|
-
* with
|
|
4
|
+
* with profile/choice keys (e.g. cheap/default, pro/default).
|
|
5
5
|
*/
|
|
6
6
|
function readRecord(v) {
|
|
7
7
|
if (v === null || v === undefined || typeof v !== "object" || Array.isArray(v)) {
|
|
@@ -47,8 +47,9 @@ export type GraphModelLayersRuntimeOverlay = {
|
|
|
47
47
|
};
|
|
48
48
|
export type AnalyzeGraphModelLayersOptions = {
|
|
49
49
|
/**
|
|
50
|
-
* Optional runtime overlay
|
|
51
|
-
*
|
|
50
|
+
* Optional runtime overlay for **studio planning analysis only**.
|
|
51
|
+
* graph-engine 7.7+ rejects runtime model overrides at execute time — do not inject
|
|
52
|
+
* `runtime.modelConfig` or `runtime.nodes[id].modelConfig` into executeGraph.
|
|
52
53
|
*/
|
|
53
54
|
runtime?: GraphModelLayersRuntimeOverlay;
|
|
54
55
|
utilitySkills?: Iterable<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphModelLayers.d.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AM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAKD;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAAC,CAAC,SAAS,MAAM,EACjE,KAAK,EAAE,CAAC,EACR,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,CAAC,CAAC,CA2CZ;AAED,4EAA4E;AAC5E,wBAAsB,4BAA4B,CAChD,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CASpF;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,uHAAuH;IACvH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,kBAAkB,CAAC;CAC/C,CAAC;AAsBF,kFAAkF;AAClF,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,OAAO,GACZ,oBAAoB,GAAG,SAAS,CAelC;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,OAAO,EACrB,OAAO,CAAC,EAAE,2BAA2B,GACpC,MAAM,GAAG,SAAS,CAkCpB;AAED,4EAA4E;AAC5E,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,2BAA2B,GACpC,MAAM,GAAG,SAAS,CAsBpB"}
|
package/dist/graphModelLayers.js
CHANGED
|
@@ -322,7 +322,7 @@ export async function stampGraphModelLayersOnGraph(graph, options) {
|
|
|
322
322
|
? { providerIds: analysis.graphDefaultProviderIds }
|
|
323
323
|
: {}),
|
|
324
324
|
},
|
|
325
|
-
note: "Planning overlay only. Profile
|
|
325
|
+
note: "Planning overlay only. Profile/choice keys come from graph JSON and graph-engine defaults; concrete provider ids are resolved at execute time by ai-tasks. Runtime model overlays are analysis-only — graph-engine 7.7+ rejects them at execute time.",
|
|
326
326
|
};
|
|
327
327
|
g.metadata = rootMeta;
|
|
328
328
|
return graph;
|
package/dist/llmCallConfig.js
CHANGED
|
@@ -53,11 +53,11 @@ export function collectGraphOrchestratorInvokeWarnings(graph) {
|
|
|
53
53
|
if (llmCall !== undefined) {
|
|
54
54
|
for (const key of LEGACY_LLM_CALL_TOKEN_KEYS) {
|
|
55
55
|
if (key in llmCall) {
|
|
56
|
-
warnings.push(`${prefix}: taskConfiguration.llmCall.${key} is
|
|
56
|
+
warnings.push(`${prefix}: taskConfiguration.llmCall.${key} is forbidden — token budget is Optimixer-owned at invoke; use outputExpectation / reasoningEffort instead.`);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
if ("maxTokensCap" in llmCall) {
|
|
60
|
-
warnings.push(`${prefix}: taskConfiguration.llmCall.maxTokensCap is
|
|
60
|
+
warnings.push(`${prefix}: taskConfiguration.llmCall.maxTokensCap is forbidden — use outputExpectation; completion budget is Optimixer-owned at invoke.`);
|
|
61
61
|
}
|
|
62
62
|
if (llmCall.reasoningEffort !== undefined &&
|
|
63
63
|
!isOptimixerReasoningEffort(llmCall.reasoningEffort)) {
|
|
@@ -11,7 +11,7 @@ A graph is a single JSON object. Top-level fields (canonical root keys only):
|
|
|
11
11
|
- `variables` (object, optional): graph-level defaults → run as `jobVariables.*` at execution.
|
|
12
12
|
- `response` (object, required for new graphs): executable final output contract (`missing`, `shape` with selectors such as `outputsMemoryPath`, `executionMemoryPath`, `literal`, `firstPresent`).
|
|
13
13
|
- `metadata` (object, optional): authoring only (`name`, `description`, `graphEntry`, `graphExecution`, `catalogRequests`, `graphConcept`, …). **No execution wiring under `metadata`.**
|
|
14
|
-
- `modelConfig`, `jobKnowledge` (optional): see format docs. **`modelConfig` cases use
|
|
14
|
+
- `modelConfig`, `jobKnowledge` (optional): see format docs. **`modelConfig` cases use profile/choice keys only** (e.g. `cheap/default`, `pro/default`) — three slots per case: `preActionModel`, `skillModel`, `postActionModel`. Never provider ids like `openrouter/...`. Do **not** author `runtime.modelConfig`, `runtime.aliasConfig`, or `runtime.nodes[id].modelConfig` — graph-engine 7.7+ rejects runtime model routing.
|
|
15
15
|
|
|
16
16
|
### Task node shape
|
|
17
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exellix/graph-composer",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
},
|
|
65
65
|
"homepage": "https://github.com/woroces/graph-composer#readme",
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@exellix/ai-tasks": "^8.
|
|
68
|
-
"@exellix/graph-engine": "
|
|
67
|
+
"@exellix/ai-tasks": "^8.8.0",
|
|
68
|
+
"@exellix/graph-engine": "7.8.2"
|
|
69
69
|
},
|
|
70
70
|
"peerDependenciesMeta": {
|
|
71
71
|
"@exellix/graph-engine": {
|
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
"@x12i/logxer": "^4.6.0"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@exellix/ai-skills": "^6.
|
|
89
|
-
"@exellix/ai-tasks": "^8.
|
|
90
|
-
"@exellix/graph-engine": "^7.8.
|
|
88
|
+
"@exellix/ai-skills": "^6.4.0",
|
|
89
|
+
"@exellix/ai-tasks": "^8.8.0",
|
|
90
|
+
"@exellix/graph-engine": "^7.8.2",
|
|
91
91
|
"@types/node": "^22.10.2",
|
|
92
92
|
"@x12i/rendrix": "^4.3.0",
|
|
93
93
|
"nx-config2": "^3.6.5",
|