@exellix/graph-composer 2.0.2 → 2.0.7
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/dist/canonicalGraphDocument.d.ts.map +1 -1
- package/dist/canonicalGraphDocument.js +5 -0
- package/dist/canonicalGraphWarnings.d.ts.map +1 -1
- package/dist/canonicalGraphWarnings.js +28 -21
- package/dist/graphAiModelConfigCanonicalize.d.ts +26 -0
- package/dist/graphAiModelConfigCanonicalize.d.ts.map +1 -0
- package/dist/graphAiModelConfigCanonicalize.js +128 -0
- package/dist/graphEngineBridge.d.ts +1 -1
- package/dist/graphEngineBridge.d.ts.map +1 -1
- package/dist/graphEngineBridge.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/functions/graph-composer/prompts/shared/graph-format.md +1 -1
- package/package.json +7 -6
|
@@ -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;AAkbH,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"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Graph document shell canonicalization (nodes array, response, top-level keys).
|
|
3
3
|
*/
|
|
4
|
+
import { canonicalizeGraphRootModelConfig, canonicalizeTaskNodeModelConfig, } from "./graphAiModelConfigCanonicalize.js";
|
|
4
5
|
const CANONICAL_TOP_LEVEL_KEYS = new Set([
|
|
5
6
|
"id",
|
|
6
7
|
"version",
|
|
@@ -421,6 +422,8 @@ export function canonicalizeGraphDocumentShell(graph) {
|
|
|
421
422
|
changed = true;
|
|
422
423
|
if (ensureGraphResponse(graph))
|
|
423
424
|
changed = true;
|
|
425
|
+
if (canonicalizeGraphRootModelConfig(graph))
|
|
426
|
+
changed = true;
|
|
424
427
|
for (const key of Object.keys(graph)) {
|
|
425
428
|
if (!CANONICAL_TOP_LEVEL_KEYS.has(key)) {
|
|
426
429
|
if (FORBIDDEN_ROOT_RUNTIME_KEYS.has(key)) {
|
|
@@ -461,5 +464,7 @@ export function canonicalizeTaskNodePlacement(node) {
|
|
|
461
464
|
changed = true;
|
|
462
465
|
if (removeLegacySynthesisFlags(node))
|
|
463
466
|
changed = true;
|
|
467
|
+
if (canonicalizeTaskNodeModelConfig(node))
|
|
468
|
+
changed = true;
|
|
464
469
|
return changed;
|
|
465
470
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonicalGraphWarnings.d.ts","sourceRoot":"","sources":["../src/canonicalGraphWarnings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"canonicalGraphWarnings.d.ts","sourceRoot":"","sources":["../src/canonicalGraphWarnings.ts"],"names":[],"mappings":"AAuIA;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAuHrE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { getCanonicalGraphDocumentViolations, collectAiTasksNodeExtensionIssues, } from "./graphEngineBridge.js";
|
|
1
|
+
import { getCanonicalGraphDocumentViolations, collectAiTasksNodeExtensionIssues, looksLikeConcreteModelId, } from "./graphEngineBridge.js";
|
|
2
|
+
import { LEGACY_GRAPH_MODEL_ALIAS_TO_PROFILE } from "./graphAiModelConfigCanonicalize.js";
|
|
2
3
|
/** Local-skill execution keys that belong on taskConfiguration (graph-engine parity). */
|
|
3
4
|
const LOCAL_SKILL_METADATA_KEYS = [
|
|
4
5
|
"firstMatchWins",
|
|
@@ -68,28 +69,40 @@ const PURE_TASK_METADATA_KEYS = new Set([
|
|
|
68
69
|
"__exellixVirtualBoundary",
|
|
69
70
|
]);
|
|
70
71
|
function looksLikeProviderModelId(value) {
|
|
71
|
-
return typeof value === "string" && value
|
|
72
|
+
return typeof value === "string" && looksLikeConcreteModelId(value);
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
+
function collectModelProfileWarnings(graph) {
|
|
74
75
|
const warnings = [];
|
|
75
|
-
const
|
|
76
|
-
const o =
|
|
76
|
+
const checkTriple = (triple, path) => {
|
|
77
|
+
const o = triple;
|
|
77
78
|
if (o === undefined || typeof o !== "object" || Array.isArray(o))
|
|
78
79
|
return;
|
|
79
|
-
for (const field of ["
|
|
80
|
+
for (const field of ["preActionModel", "skillModel", "postActionModel"]) {
|
|
80
81
|
const v = o[field];
|
|
82
|
+
if (typeof v !== "string" || v.trim() === "")
|
|
83
|
+
continue;
|
|
81
84
|
if (looksLikeProviderModelId(v)) {
|
|
82
|
-
warnings.push(`${path}.${field} looks like a provider model id ("${v}") — graph JSON must use profile
|
|
85
|
+
warnings.push(`${path}.${field} looks like a provider model id ("${v}") — graph JSON must use @x12i/ai-profiles profile names (e.g. cheap, balanced, deep).`);
|
|
86
|
+
continue;
|
|
83
87
|
}
|
|
88
|
+
if (v in LEGACY_GRAPH_MODEL_ALIAS_TO_PROFILE) {
|
|
89
|
+
warnings.push(`${path}.${field} uses legacy alias "${v}" — prefer ai-profile name "${LEGACY_GRAPH_MODEL_ALIAS_TO_PROFILE[v]}".`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if ("xynthesisModel" in o) {
|
|
93
|
+
warnings.push(`${path}: xynthesisModel was removed in graph-engine 7.1 — use preActionModel, skillModel, and postActionModel.`);
|
|
84
94
|
}
|
|
85
95
|
};
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
96
|
+
const checkSelection = (selection, path) => {
|
|
97
|
+
const sel = selection;
|
|
98
|
+
if (sel === undefined || !Array.isArray(sel.cases))
|
|
99
|
+
return;
|
|
100
|
+
for (let i = 0; i < sel.cases.length; i++) {
|
|
101
|
+
const c = sel.cases[i];
|
|
102
|
+
checkTriple(c?.modelConfig, `${path}.cases[${i}].modelConfig`);
|
|
91
103
|
}
|
|
92
|
-
}
|
|
104
|
+
};
|
|
105
|
+
checkSelection(graph.modelConfig, "graph.modelConfig");
|
|
93
106
|
const nodes = graph.nodes;
|
|
94
107
|
if (!Array.isArray(nodes))
|
|
95
108
|
return warnings;
|
|
@@ -99,13 +112,7 @@ function collectModelAliasWarnings(graph) {
|
|
|
99
112
|
continue;
|
|
100
113
|
const nodeId = typeof node.id === "string" ? node.id : `nodes[${i}]`;
|
|
101
114
|
const tc = readRecord(node.taskConfiguration);
|
|
102
|
-
|
|
103
|
-
if (mc && Array.isArray(mc.cases)) {
|
|
104
|
-
for (let j = 0; j < mc.cases.length; j++) {
|
|
105
|
-
const c = mc.cases[j];
|
|
106
|
-
checkPair(c?.modelConfig, `node "${nodeId}": taskConfiguration.modelConfig.cases[${j}].modelConfig`);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
115
|
+
checkSelection(tc?.modelConfig, `node "${nodeId}": taskConfiguration.modelConfig`);
|
|
109
116
|
}
|
|
110
117
|
return warnings;
|
|
111
118
|
}
|
|
@@ -199,6 +206,6 @@ export function collectCanonicalGraphWarnings(graph) {
|
|
|
199
206
|
warnings.push(`graph.response: editor-only key(s) should be removed: ${bad.join(", ")}.`);
|
|
200
207
|
}
|
|
201
208
|
}
|
|
202
|
-
warnings.push(...
|
|
209
|
+
warnings.push(...collectModelProfileWarnings(g));
|
|
203
210
|
return warnings;
|
|
204
211
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migrate graph JSON modelConfig toward graph-engine 7.1+ ({ preActionModel, skillModel, postActionModel })
|
|
3
|
+
* and `@x12i/ai-profiles` profile names.
|
|
4
|
+
*/
|
|
5
|
+
export type GraphAiModelConfigTriple = {
|
|
6
|
+
preActionModel: string;
|
|
7
|
+
skillModel: string;
|
|
8
|
+
postActionModel: string;
|
|
9
|
+
};
|
|
10
|
+
/** Legacy graph-engine 7.0 alias names and old authoring ids → primary ai-profile keys. */
|
|
11
|
+
export declare const LEGACY_GRAPH_MODEL_ALIAS_TO_PROFILE: Readonly<Record<string, string>>;
|
|
12
|
+
export declare function mapLegacyGraphModelProfileName(name: string): string;
|
|
13
|
+
/** PRE ← xynthesisModel; POST ← skillModel (7.0 POST reused skill). */
|
|
14
|
+
export declare function migrateLegacyTwoSlotGraphAiModelConfig(value: {
|
|
15
|
+
xynthesisModel: string;
|
|
16
|
+
skillModel: string;
|
|
17
|
+
}): GraphAiModelConfigTriple;
|
|
18
|
+
export declare function canonicalizeGraphAiModelConfigTriple(value: Record<string, unknown>): {
|
|
19
|
+
config: GraphAiModelConfigTriple;
|
|
20
|
+
changed: boolean;
|
|
21
|
+
};
|
|
22
|
+
/** Canonicalize `{ cases: [...] }` or legacy flat two-slot pair. Returns whether value changed. */
|
|
23
|
+
export declare function canonicalizeModelConfigSelectionInPlace(holder: Record<string, unknown>, key: "modelConfig"): boolean;
|
|
24
|
+
export declare function canonicalizeGraphRootModelConfig(graph: Record<string, unknown>): boolean;
|
|
25
|
+
export declare function canonicalizeTaskNodeModelConfig(node: Record<string, unknown>): boolean;
|
|
26
|
+
//# sourceMappingURL=graphAiModelConfigCanonicalize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphAiModelConfigCanonicalize.d.ts","sourceRoot":"","sources":["../src/graphAiModelConfigCanonicalize.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,wBAAwB,GAAG;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,2FAA2F;AAC3F,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUhF,CAAC;AAaF,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGnE;AAyBD,uEAAuE;AACvE,wBAAgB,sCAAsC,CAAC,KAAK,EAAE;IAC5D,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,wBAAwB,CAM3B;AAED,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B;IAAE,MAAM,EAAE,wBAAwB,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CA+BxD;AAED,mGAAmG;AACnG,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,GAAG,EAAE,aAAa,GACjB,OAAO,CAoCT;AAED,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAExF;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAMtF"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migrate graph JSON modelConfig toward graph-engine 7.1+ ({ preActionModel, skillModel, postActionModel })
|
|
3
|
+
* and `@x12i/ai-profiles` profile names.
|
|
4
|
+
*/
|
|
5
|
+
/** Legacy graph-engine 7.0 alias names and old authoring ids → primary ai-profile keys. */
|
|
6
|
+
export const LEGACY_GRAPH_MODEL_ALIAS_TO_PROFILE = {
|
|
7
|
+
default: "balanced",
|
|
8
|
+
weak: "cheap",
|
|
9
|
+
strong: "deep",
|
|
10
|
+
normal: "balanced",
|
|
11
|
+
ultra: "deep",
|
|
12
|
+
"xynthesis-default": "cheap",
|
|
13
|
+
"skill-default": "balanced",
|
|
14
|
+
"xynthesis-deep-analysis": "deep",
|
|
15
|
+
"skill-reasoning": "deep",
|
|
16
|
+
};
|
|
17
|
+
function readRecord(v) {
|
|
18
|
+
if (v === null || v === undefined || typeof v !== "object" || Array.isArray(v)) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return v;
|
|
22
|
+
}
|
|
23
|
+
function nonEmptyString(v) {
|
|
24
|
+
return typeof v === "string" && v.trim().length > 0;
|
|
25
|
+
}
|
|
26
|
+
export function mapLegacyGraphModelProfileName(name) {
|
|
27
|
+
const trimmed = name.trim();
|
|
28
|
+
return LEGACY_GRAPH_MODEL_ALIAS_TO_PROFILE[trimmed] ?? trimmed;
|
|
29
|
+
}
|
|
30
|
+
function isLegacyTwoSlotGraphAiModelConfig(value) {
|
|
31
|
+
const o = readRecord(value);
|
|
32
|
+
if (o === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
return (nonEmptyString(o.xynthesisModel) &&
|
|
35
|
+
nonEmptyString(o.skillModel) &&
|
|
36
|
+
!nonEmptyString(o.preActionModel) &&
|
|
37
|
+
!nonEmptyString(o.postActionModel));
|
|
38
|
+
}
|
|
39
|
+
function isThreeSlotGraphAiModelConfig(value) {
|
|
40
|
+
const o = readRecord(value);
|
|
41
|
+
if (o === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
return (nonEmptyString(o.preActionModel) &&
|
|
44
|
+
nonEmptyString(o.skillModel) &&
|
|
45
|
+
nonEmptyString(o.postActionModel));
|
|
46
|
+
}
|
|
47
|
+
/** PRE ← xynthesisModel; POST ← skillModel (7.0 POST reused skill). */
|
|
48
|
+
export function migrateLegacyTwoSlotGraphAiModelConfig(value) {
|
|
49
|
+
return {
|
|
50
|
+
preActionModel: mapLegacyGraphModelProfileName(value.xynthesisModel),
|
|
51
|
+
skillModel: mapLegacyGraphModelProfileName(value.skillModel),
|
|
52
|
+
postActionModel: mapLegacyGraphModelProfileName(value.skillModel),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export function canonicalizeGraphAiModelConfigTriple(value) {
|
|
56
|
+
if (isLegacyTwoSlotGraphAiModelConfig(value)) {
|
|
57
|
+
return {
|
|
58
|
+
config: migrateLegacyTwoSlotGraphAiModelConfig(value),
|
|
59
|
+
changed: true,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
if (!isThreeSlotGraphAiModelConfig(value)) {
|
|
63
|
+
return {
|
|
64
|
+
config: value,
|
|
65
|
+
changed: false,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const preActionModel = mapLegacyGraphModelProfileName(value.preActionModel);
|
|
69
|
+
const skillModel = mapLegacyGraphModelProfileName(value.skillModel);
|
|
70
|
+
const postActionModel = mapLegacyGraphModelProfileName(value.postActionModel);
|
|
71
|
+
const changed = preActionModel !== value.preActionModel ||
|
|
72
|
+
skillModel !== value.skillModel ||
|
|
73
|
+
postActionModel !== value.postActionModel ||
|
|
74
|
+
"xynthesisModel" in value;
|
|
75
|
+
const config = {
|
|
76
|
+
preActionModel,
|
|
77
|
+
skillModel,
|
|
78
|
+
postActionModel,
|
|
79
|
+
};
|
|
80
|
+
return { config, changed };
|
|
81
|
+
}
|
|
82
|
+
/** Canonicalize `{ cases: [...] }` or legacy flat two-slot pair. Returns whether value changed. */
|
|
83
|
+
export function canonicalizeModelConfigSelectionInPlace(holder, key) {
|
|
84
|
+
const raw = holder[key];
|
|
85
|
+
if (raw === undefined)
|
|
86
|
+
return false;
|
|
87
|
+
if (isLegacyTwoSlotGraphAiModelConfig(raw)) {
|
|
88
|
+
holder[key] = {
|
|
89
|
+
cases: [{ modelConfig: migrateLegacyTwoSlotGraphAiModelConfig(raw) }],
|
|
90
|
+
};
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
const sel = readRecord(raw);
|
|
94
|
+
if (sel === undefined || !Array.isArray(sel.cases))
|
|
95
|
+
return false;
|
|
96
|
+
let changed = false;
|
|
97
|
+
const nextCases = sel.cases.map((item) => {
|
|
98
|
+
const row = readRecord(item);
|
|
99
|
+
if (row === undefined)
|
|
100
|
+
return item;
|
|
101
|
+
const mc = row.modelConfig;
|
|
102
|
+
if (!isLegacyTwoSlotGraphAiModelConfig(mc) &&
|
|
103
|
+
!isThreeSlotGraphAiModelConfig(mc)) {
|
|
104
|
+
return item;
|
|
105
|
+
}
|
|
106
|
+
const { config, changed: mcChanged } = canonicalizeGraphAiModelConfigTriple(readRecord(mc) ?? {});
|
|
107
|
+
if (!mcChanged)
|
|
108
|
+
return item;
|
|
109
|
+
changed = true;
|
|
110
|
+
return { ...row, modelConfig: config };
|
|
111
|
+
});
|
|
112
|
+
if (!changed)
|
|
113
|
+
return false;
|
|
114
|
+
holder[key] = { ...sel, cases: nextCases };
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
export function canonicalizeGraphRootModelConfig(graph) {
|
|
118
|
+
return canonicalizeModelConfigSelectionInPlace(graph, "modelConfig");
|
|
119
|
+
}
|
|
120
|
+
export function canonicalizeTaskNodeModelConfig(node) {
|
|
121
|
+
const tc = readRecord(node.taskConfiguration);
|
|
122
|
+
if (tc === undefined)
|
|
123
|
+
return false;
|
|
124
|
+
if (!canonicalizeModelConfigSelectionInPlace(tc, "modelConfig"))
|
|
125
|
+
return false;
|
|
126
|
+
node.taskConfiguration = tc;
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Re-exports from `@exellix/graph-engine` so hosts validate graphs with the same
|
|
3
3
|
* rules as runtime — do not fork gap codes or memory path allowlists here.
|
|
4
4
|
*/
|
|
5
|
-
export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, } from "@exellix/graph-engine";
|
|
5
|
+
export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, DEFAULT_GRAPH_AI_MODEL_PROFILE_CONFIG, looksLikeConcreteModelId, isGraphAiProfileName, } from "@exellix/graph-engine";
|
|
6
6
|
export type { GraphEngineMemoryResolutionRoot } from "@exellix/graph-engine";
|
|
7
7
|
//# sourceMappingURL=graphEngineBridge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphEngineBridge.d.ts","sourceRoot":"","sources":["../src/graphEngineBridge.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,4BAA4B,EAC5B,mCAAmC,EACnC,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,iCAAiC,EACjC,gCAAgC,EAChC,iCAAiC,EACjC,qDAAqD,
|
|
1
|
+
{"version":3,"file":"graphEngineBridge.d.ts","sourceRoot":"","sources":["../src/graphEngineBridge.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,4BAA4B,EAC5B,mCAAmC,EACnC,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,iCAAiC,EACjC,gCAAgC,EAChC,iCAAiC,EACjC,qDAAqD,EACrD,qCAAqC,EACrC,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Re-exports from `@exellix/graph-engine` so hosts validate graphs with the same
|
|
3
3
|
* rules as runtime — do not fork gap codes or memory path allowlists here.
|
|
4
4
|
*/
|
|
5
|
-
export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, } from "@exellix/graph-engine";
|
|
5
|
+
export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, DEFAULT_GRAPH_AI_MODEL_PROFILE_CONFIG, looksLikeConcreteModelId, isGraphAiProfileName, } from "@exellix/graph-engine";
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { buildGraphInputExampleGuidance, generateGraphJsonInputExample, generate
|
|
|
15
15
|
export { parseGraphConceptStory, parseGraphConceptStoryBody, isGraphConceptStoryDescription, GRAPH_CONCEPT_STORY_MARKER, } from "./parseGraphConceptStory.js";
|
|
16
16
|
export type { ParsedGraphConcept } from "./parseGraphConceptStory.js";
|
|
17
17
|
export { reportTaskNodeProtocolGaps, DEFAULT_LOCAL_SKILL_KEYS, type AiTaskProfileMetadata, type TaskNodeProtocolGap, type TaskNodeProtocolIssueCode, type WebScopingNodeConfig, type InputSynthesisNodeConfig, type InputSynthesisDestination, } from "./aiTaskProfile.js";
|
|
18
|
-
export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, type GraphEngineMemoryResolutionRoot, } from "./graphEngineBridge.js";
|
|
18
|
+
export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, DEFAULT_GRAPH_AI_MODEL_PROFILE_CONFIG, looksLikeConcreteModelId, isGraphAiProfileName, type GraphEngineMemoryResolutionRoot, } from "./graphEngineBridge.js";
|
|
19
19
|
export { collectCanonicalGraphWarnings } from "./canonicalGraphWarnings.js";
|
|
20
20
|
export { resolveTaskNodeInputs, resolveTaskNodeInputsConfig, resolveTaskNodeTaskVariable, canonicalizeGraphTaskNodeTaskVariable, canonicalizeGraphModel, reportTaskNodeInputsLayoutIssues, taskNodeInputsLayoutWarningMessage, isTaskVariablePathRef, isTaskNode, isFinalizerNode, type TaskNodeInputsLayoutIssue, type TaskNodeInputsLayoutIssueCode, } from "./taskNodeTaskVariable.js";
|
|
21
21
|
export { createCatalox, bindCataloxContext, Catalox, CataloxBound, } from "@x12i/catalox/embedder";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,8BAA8B,EAC9B,mBAAmB,EACnB,6BAA6B,EAC7B,+BAA+B,EAC/B,sBAAsB,EACtB,KAAK,mBAAmB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C,OAAO,EACL,gCAAgC,EAChC,mCAAmC,EACnC,uCAAuC,EACvC,2CAA2C,EAC3C,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,2BAA2B,GACjC,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,8BAA8B,EAC9B,mBAAmB,EACnB,6BAA6B,EAC7B,+BAA+B,EAC/B,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,GACnC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,0BAA0B,EAC1B,yBAAyB,EACzB,UAAU,EACV,mCAAmC,EACnC,oCAAoC,EACpC,mBAAmB,EACnB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,EACL,qBAAqB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,mCAAmC,EACxC,KAAK,4BAA4B,GAClC,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,EAC1B,iBAAiB,EACjB,oBAAoB,EACpB,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB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C,qDAAqD,EACrD,qCAAqC,EACrC,wBAAwB,EACxB,oBAAoB,EACpB,KAAK,+BAA+B,GACrC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,2BAA2B,EAC3B,qCAAqC,EACrC,sBAAsB,EACtB,gCAAgC,EAChC,kCAAkC,EAClC,qBAAqB,EACrB,UAAU,EACV,eAAe,EACf,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,GACnC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,OAAO,EACP,YAAY,GACb,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,cAAc,EACd,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,gCAAgC,EAChC,mCAAmC,EACnC,uCAAuC,EACvC,2CAA2C,EAC3C,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,2BAA2B,GACjC,MAAM,2BAA2B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ export { loadExampleGraph, inputExplainNetworkVulnSubnet, inputSuggestConceptObj
|
|
|
12
12
|
export { buildGraphInputExampleGuidance, generateGraphJsonInputExample, generateJsonExample, generateMdExample, generateContentExample, } from "./exampleGeneration.js";
|
|
13
13
|
export { parseGraphConceptStory, parseGraphConceptStoryBody, isGraphConceptStoryDescription, GRAPH_CONCEPT_STORY_MARKER, } from "./parseGraphConceptStory.js";
|
|
14
14
|
export { reportTaskNodeProtocolGaps, DEFAULT_LOCAL_SKILL_KEYS, } from "./aiTaskProfile.js";
|
|
15
|
-
export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, } from "./graphEngineBridge.js";
|
|
15
|
+
export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, DEFAULT_GRAPH_AI_MODEL_PROFILE_CONFIG, looksLikeConcreteModelId, isGraphAiProfileName, } from "./graphEngineBridge.js";
|
|
16
16
|
export { collectCanonicalGraphWarnings } from "./canonicalGraphWarnings.js";
|
|
17
17
|
export { resolveTaskNodeInputs, resolveTaskNodeInputsConfig, resolveTaskNodeTaskVariable, canonicalizeGraphTaskNodeTaskVariable, canonicalizeGraphModel, reportTaskNodeInputsLayoutIssues, taskNodeInputsLayoutWarningMessage, isTaskVariablePathRef, isTaskNode, isFinalizerNode, } from "./taskNodeTaskVariable.js";
|
|
18
18
|
export { createCatalox, bindCataloxContext, Catalox, CataloxBound, } from "@x12i/catalox/embedder";
|
|
@@ -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 profile
|
|
14
|
+
- `modelConfig`, `jobKnowledge` (optional): see format docs. **`modelConfig` cases use `@x12i/ai-profiles` profile names only** (`cheap`, `balanced`, `deep`, …) — three slots per case: `preActionModel`, `skillModel`, `postActionModel`. Never provider ids like `openrouter/...`. Resolution uses bundled `@x12i/ai-profiles`; `runtime.aliasConfig` is optional.
|
|
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.0.
|
|
3
|
+
"version": "2.0.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
".env.example"
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
|
-
"postinstall": "node -e \"const fs=require('fs'),p=require('path');const s=p.join('node_modules','nx-config2','bin','nx-config2.js'),d=p.join('node_modules','@x12i','env','bin','nx-config2.js');try{if(fs.existsSync(s)&&!fs.existsSync(d))fs.copyFileSync(s,d);}catch(_){}
|
|
30
|
+
"postinstall": "node -e \"const fs=require('fs'),p=require('path'),cp=require('child_process');const s=p.join('node_modules','nx-config2','bin','nx-config2.js'),d=p.join('node_modules','@x12i','env','bin','nx-config2.js');try{if(fs.existsSync(s)&&!fs.existsSync(d))fs.copyFileSync(s,d);}catch(_){}const patch=p.join('node_modules','@exellix','graph-engine','scripts','patch-ai-tasks-xynthesis-export.mjs');if(fs.existsSync(patch))cp.execFileSync(process.execPath,[patch],{stdio:'inherit'});\"",
|
|
31
31
|
"build": "tsc -p tsconfig.build.json",
|
|
32
32
|
"prepublishOnly": "npm run build",
|
|
33
33
|
"start": "x12i-env run --env-file .env -- node dist/cli.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"openrouter",
|
|
51
51
|
"funcx"
|
|
52
52
|
],
|
|
53
|
-
"license": "
|
|
53
|
+
"license": "exellix-license",
|
|
54
54
|
"engines": {
|
|
55
55
|
"node": ">=20"
|
|
56
56
|
},
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"homepage": "https://github.com/woroces/graph-composer#readme",
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@exellix/graph-engine": "^7.0
|
|
66
|
+
"@exellix/graph-engine": "^7.2.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependenciesMeta": {
|
|
69
69
|
"@exellix/graph-engine": {
|
|
@@ -71,13 +71,14 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
+
"@x12i/ai-profiles": "^1.2.7",
|
|
74
75
|
"@x12i/catalox": "^5.1.1",
|
|
75
76
|
"@x12i/env": "^4.0.1",
|
|
76
|
-
"@x12i/funcx": "^4.0
|
|
77
|
+
"@x12i/funcx": "^4.2.0",
|
|
77
78
|
"@x12i/logxer": "^4.3.5"
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|
|
80
|
-
"@exellix/graph-engine": "^7.0
|
|
81
|
+
"@exellix/graph-engine": "^7.2.0",
|
|
81
82
|
"@types/node": "^22.10.2",
|
|
82
83
|
"nx-config2": "^3.6.5",
|
|
83
84
|
"tsx": "^4.19.2",
|