@exellix/graph-composer 2.0.0 → 2.0.6
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/README.md +2 -2
- package/dist/canonicalGraphDocument.d.ts.map +1 -1
- package/dist/canonicalGraphDocument.js +127 -1
- package/dist/canonicalGraphWarnings.d.ts +2 -2
- package/dist/canonicalGraphWarnings.d.ts.map +1 -1
- package/dist/canonicalGraphWarnings.js +74 -3
- package/dist/graphAiModelConfigCanonicalize.d.ts +26 -0
- package/dist/graphAiModelConfigCanonicalize.d.ts.map +1 -0
- package/dist/graphAiModelConfigCanonicalize.js +128 -0
- package/dist/graphComposerOutputValidation.d.ts.map +1 -1
- package/dist/graphComposerOutputValidation.js +8 -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/dist/taskNodeTaskVariable.d.ts.map +1 -1
- package/dist/taskNodeTaskVariable.js +11 -0
- package/examples/network-vuln-subnet-triage.v2.json +525 -389
- package/functions/graph-composer/prompts/action-suggest-catalog-resolution.md +2 -2
- package/functions/graph-composer/prompts/shared/graph-format.md +2 -2
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -257,8 +257,8 @@ graph-composer explain-basic
|
|
|
257
257
|
| Types: `GraphComposerInput`, `GraphComposerAgentInput`, `GraphComposerIntent`, `CatalogCandidates`, `ScopingMapCandidate`, `NarrixTemplateCandidate`, … | See `dist/index.d.ts`. |
|
|
258
258
|
| `loadCatalogCandidatesFromCatalox`, `createCatalox`, `unifiedCatalogItemToSkillDescriptor`, … | Build `catalogCandidates` from **Catalox** catalogs; see [`docs/catalog-metadb-end-state-contract.md`](./docs/catalog-metadb-end-state-contract.md). |
|
|
259
259
|
| `reportTaskNodeProtocolGaps` | Offline list of **AI task** nodes violating **`taskConfiguration.aiTaskProfile`** (pre/post, **`webScoping.questions`** when enabled, **`inputSynthesis`** fields when synthesis is on). See `docs/task-node-execution-protocol.md`. |
|
|
260
|
-
| `collectCanonicalGraphWarnings` | Warn-first **`@exellix/graph-engine`** canonical checks (top-level keys, metadata placement, memory paths
|
|
261
|
-
| `assertCanonicalGraphDocument` | Re-exported from graph-engine —
|
|
260
|
+
| `collectCanonicalGraphWarnings` | Warn-first **`@exellix/graph-engine`** canonical checks (top-level keys, metadata placement, memory paths, model profile aliases). |
|
|
261
|
+
| `assertCanonicalGraphDocument` | Re-exported from graph-engine — **`validateCreateModifyOutput` hard-fails** when the canonicalized graph does not pass. |
|
|
262
262
|
| `GRAPH_ENGINE_MEMORY_PATH_ROOTS` | Re-exported memory path allowlist from graph-engine — use for validation parity, not a forked copy. |
|
|
263
263
|
| `WoroxScopingMapCatalogCreatePayload`, `WoroxScopedDataDocumentShape` | Host-side CRUD handoff (align field names with your persisted catalog / scoping schema). |
|
|
264
264
|
| `parseGraphConceptStory`, `isGraphConceptStoryDescription`, `GRAPH_CONCEPT_STORY_MARKER`, … | Parse **graph concept story** text for `create` / `modify` / reviews. |
|
|
@@ -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",
|
|
@@ -38,6 +39,42 @@ const FORBIDDEN_NARRIX_WEB_KEYS = [
|
|
|
38
39
|
"forceWebScope",
|
|
39
40
|
"webScopeEntityIdPath",
|
|
40
41
|
];
|
|
42
|
+
/** Authoring-only keys that must live under graph `metadata`, not the document root. */
|
|
43
|
+
const GRAPH_SHELL_TO_METADATA = [
|
|
44
|
+
"name",
|
|
45
|
+
"description",
|
|
46
|
+
"woroxContractTarget",
|
|
47
|
+
"exellixContractTarget",
|
|
48
|
+
"graphEntry",
|
|
49
|
+
"graphExecution",
|
|
50
|
+
"catalogRequests",
|
|
51
|
+
"graphConcept",
|
|
52
|
+
"graphReadability",
|
|
53
|
+
"catalogBinding",
|
|
54
|
+
"catalogRequest",
|
|
55
|
+
];
|
|
56
|
+
/**
|
|
57
|
+
* Local-skill and graph-engine-only execution keys (must not remain on task `metadata`).
|
|
58
|
+
* Mirrors `@exellix/graph-engine` `TASK_CONFIGURATION_GRAPH_ENGINE_ONLY_KEYS`.
|
|
59
|
+
*/
|
|
60
|
+
const LOCAL_SKILL_METADATA_KEYS = [
|
|
61
|
+
"firstMatchWins",
|
|
62
|
+
"defaultOutput",
|
|
63
|
+
"sensitivityAnalysis",
|
|
64
|
+
"questionId",
|
|
65
|
+
"pack",
|
|
66
|
+
"opDb",
|
|
67
|
+
"entityTypePath",
|
|
68
|
+
"staticEntityType",
|
|
69
|
+
"payloadPath",
|
|
70
|
+
"questionTitle",
|
|
71
|
+
"phase",
|
|
72
|
+
"seedThingIdPath",
|
|
73
|
+
"artifactThingType",
|
|
74
|
+
"xmemoryNamespace",
|
|
75
|
+
"mergeInferencePaths",
|
|
76
|
+
"mergeDecisionPaths",
|
|
77
|
+
];
|
|
41
78
|
/** Metadata execution keys → taskConfiguration target (value transform optional). */
|
|
42
79
|
const METADATA_EXECUTION_LIFT = {
|
|
43
80
|
aiTaskProfile: { target: "aiTaskProfile" },
|
|
@@ -57,7 +94,7 @@ const METADATA_EXECUTION_LIFT = {
|
|
|
57
94
|
},
|
|
58
95
|
executionStrategyKey: {
|
|
59
96
|
target: "executionStrategies",
|
|
60
|
-
transform: (v) =>
|
|
97
|
+
transform: (v) => typeof v === "string" && v.trim() !== "" ? [{ key: v.trim() }] : v,
|
|
61
98
|
},
|
|
62
99
|
executionStrategies: { target: "executionStrategies" },
|
|
63
100
|
outputConstraints: {
|
|
@@ -85,6 +122,7 @@ const METADATA_EXECUTION_LIFT = {
|
|
|
85
122
|
scopingMapId: { target: "scopingMapId" },
|
|
86
123
|
entityIdPath: { target: "entityIdPath" },
|
|
87
124
|
rules: { target: "rules" },
|
|
125
|
+
...Object.fromEntries(LOCAL_SKILL_METADATA_KEYS.map((k) => [k, { target: k }])),
|
|
88
126
|
};
|
|
89
127
|
const NODE_ROOT_TO_TASK_CONFIGURATION = [
|
|
90
128
|
"smartInput",
|
|
@@ -101,6 +139,82 @@ function readRecord(v) {
|
|
|
101
139
|
function nonEmptyString(v) {
|
|
102
140
|
return typeof v === "string" && v.trim().length > 0;
|
|
103
141
|
}
|
|
142
|
+
function canonicalizeExecutionStrategies(value) {
|
|
143
|
+
if (!Array.isArray(value))
|
|
144
|
+
return value;
|
|
145
|
+
let changed = false;
|
|
146
|
+
const next = value.map((item) => {
|
|
147
|
+
const row = readRecord(item);
|
|
148
|
+
if (row === undefined)
|
|
149
|
+
return item;
|
|
150
|
+
if ("strategyKey" in row && !("key" in row)) {
|
|
151
|
+
changed = true;
|
|
152
|
+
const { strategyKey, ...rest } = row;
|
|
153
|
+
return { ...rest, key: strategyKey };
|
|
154
|
+
}
|
|
155
|
+
return item;
|
|
156
|
+
});
|
|
157
|
+
return changed ? next : value;
|
|
158
|
+
}
|
|
159
|
+
function renameWoroxContractTargetOnNodeMetadata(node) {
|
|
160
|
+
const meta = readRecord(node.metadata);
|
|
161
|
+
if (meta === undefined || meta.woroxContractTarget === undefined)
|
|
162
|
+
return false;
|
|
163
|
+
if (meta.exellixContractTarget === undefined) {
|
|
164
|
+
meta.exellixContractTarget = meta.woroxContractTarget;
|
|
165
|
+
}
|
|
166
|
+
delete meta.woroxContractTarget;
|
|
167
|
+
node.metadata = meta;
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
170
|
+
function liftGraphShellToMetadata(graph) {
|
|
171
|
+
let changed = false;
|
|
172
|
+
const metadata = {
|
|
173
|
+
...readRecord(graph.metadata),
|
|
174
|
+
};
|
|
175
|
+
for (const key of GRAPH_SHELL_TO_METADATA) {
|
|
176
|
+
if (graph[key] === undefined)
|
|
177
|
+
continue;
|
|
178
|
+
if (metadata[key] === undefined) {
|
|
179
|
+
metadata[key] = graph[key];
|
|
180
|
+
}
|
|
181
|
+
delete graph[key];
|
|
182
|
+
changed = true;
|
|
183
|
+
}
|
|
184
|
+
if (!changed)
|
|
185
|
+
return false;
|
|
186
|
+
graph.metadata = metadata;
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
function ensureGraphResponse(graph) {
|
|
190
|
+
let changed = false;
|
|
191
|
+
const response = readRecord(graph.response);
|
|
192
|
+
if (response === undefined) {
|
|
193
|
+
graph.response = { missing: "null", shape: [] };
|
|
194
|
+
return true;
|
|
195
|
+
}
|
|
196
|
+
if (response.missing === "error") {
|
|
197
|
+
response.missing = "null";
|
|
198
|
+
changed = true;
|
|
199
|
+
}
|
|
200
|
+
if (!("shape" in response)) {
|
|
201
|
+
response.shape = [];
|
|
202
|
+
changed = true;
|
|
203
|
+
}
|
|
204
|
+
if (changed)
|
|
205
|
+
graph.response = response;
|
|
206
|
+
return changed;
|
|
207
|
+
}
|
|
208
|
+
function canonicalizeTaskConfigurationExecutionStrategies(node) {
|
|
209
|
+
const tc = readRecord(node.taskConfiguration);
|
|
210
|
+
if (tc === undefined || tc.executionStrategies === undefined)
|
|
211
|
+
return false;
|
|
212
|
+
const normalized = canonicalizeExecutionStrategies(tc.executionStrategies);
|
|
213
|
+
if (normalized === tc.executionStrategies)
|
|
214
|
+
return false;
|
|
215
|
+
node.taskConfiguration = { ...tc, executionStrategies: normalized };
|
|
216
|
+
return true;
|
|
217
|
+
}
|
|
104
218
|
function extractWebQuestionsFromNarrix(narrix) {
|
|
105
219
|
const raw = narrix.webScopeQuestions;
|
|
106
220
|
if (!Array.isArray(raw))
|
|
@@ -304,6 +418,12 @@ export function canonicalizeGraphDocumentShell(graph) {
|
|
|
304
418
|
let changed = false;
|
|
305
419
|
if (normalizeNodesToArray(graph))
|
|
306
420
|
changed = true;
|
|
421
|
+
if (liftGraphShellToMetadata(graph))
|
|
422
|
+
changed = true;
|
|
423
|
+
if (ensureGraphResponse(graph))
|
|
424
|
+
changed = true;
|
|
425
|
+
if (canonicalizeGraphRootModelConfig(graph))
|
|
426
|
+
changed = true;
|
|
307
427
|
for (const key of Object.keys(graph)) {
|
|
308
428
|
if (!CANONICAL_TOP_LEVEL_KEYS.has(key)) {
|
|
309
429
|
if (FORBIDDEN_ROOT_RUNTIME_KEYS.has(key)) {
|
|
@@ -334,11 +454,17 @@ export function canonicalizeTaskNodePlacement(node) {
|
|
|
334
454
|
changed = true;
|
|
335
455
|
if (liftMetadataExecutionToTaskConfiguration(node))
|
|
336
456
|
changed = true;
|
|
457
|
+
if (renameWoroxContractTargetOnNodeMetadata(node))
|
|
458
|
+
changed = true;
|
|
337
459
|
if (liftNodeRootToTaskConfiguration(node))
|
|
338
460
|
changed = true;
|
|
461
|
+
if (canonicalizeTaskConfigurationExecutionStrategies(node))
|
|
462
|
+
changed = true;
|
|
339
463
|
if (canonicalizeNarrixWebOnNode(node))
|
|
340
464
|
changed = true;
|
|
341
465
|
if (removeLegacySynthesisFlags(node))
|
|
342
466
|
changed = true;
|
|
467
|
+
if (canonicalizeTaskNodeModelConfig(node))
|
|
468
|
+
changed = true;
|
|
343
469
|
return changed;
|
|
344
470
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Warn-first canonical inspection (does not throw).
|
|
3
|
-
* `assertCanonicalGraphDocument` hard-fail in
|
|
2
|
+
* Warn-first canonical inspection (does not throw). Complements
|
|
3
|
+
* `assertCanonicalGraphDocument` hard-fail in create/modify output validation.
|
|
4
4
|
*/
|
|
5
5
|
export declare function collectCanonicalGraphWarnings(graph: object): string[];
|
|
6
6
|
//# sourceMappingURL=canonicalGraphWarnings.d.ts.map
|
|
@@ -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,24 @@
|
|
|
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";
|
|
3
|
+
/** Local-skill execution keys that belong on taskConfiguration (graph-engine parity). */
|
|
4
|
+
const LOCAL_SKILL_METADATA_KEYS = [
|
|
5
|
+
"firstMatchWins",
|
|
6
|
+
"defaultOutput",
|
|
7
|
+
"sensitivityAnalysis",
|
|
8
|
+
"questionId",
|
|
9
|
+
"pack",
|
|
10
|
+
"opDb",
|
|
11
|
+
"entityTypePath",
|
|
12
|
+
"staticEntityType",
|
|
13
|
+
"payloadPath",
|
|
14
|
+
"questionTitle",
|
|
15
|
+
"phase",
|
|
16
|
+
"seedThingIdPath",
|
|
17
|
+
"artifactThingType",
|
|
18
|
+
"xmemoryNamespace",
|
|
19
|
+
"mergeInferencePaths",
|
|
20
|
+
"mergeDecisionPaths",
|
|
21
|
+
];
|
|
2
22
|
function readRecord(v) {
|
|
3
23
|
if (v === null || v === undefined || typeof v !== "object" || Array.isArray(v)) {
|
|
4
24
|
return undefined;
|
|
@@ -29,6 +49,8 @@ const FORBIDDEN_TASK_METADATA_EXECUTION_KEYS = new Set([
|
|
|
29
49
|
"executionMemory",
|
|
30
50
|
"outputsMemory",
|
|
31
51
|
"aliasConfig",
|
|
52
|
+
...LOCAL_SKILL_METADATA_KEYS,
|
|
53
|
+
"woroxContractTarget",
|
|
32
54
|
]);
|
|
33
55
|
const FORBIDDEN_NARRIX_WEB_KEYS = [
|
|
34
56
|
"webScopeQuestions",
|
|
@@ -46,9 +68,57 @@ const PURE_TASK_METADATA_KEYS = new Set([
|
|
|
46
68
|
"exellixContractTarget",
|
|
47
69
|
"__exellixVirtualBoundary",
|
|
48
70
|
]);
|
|
71
|
+
function looksLikeProviderModelId(value) {
|
|
72
|
+
return typeof value === "string" && looksLikeConcreteModelId(value);
|
|
73
|
+
}
|
|
74
|
+
function collectModelProfileWarnings(graph) {
|
|
75
|
+
const warnings = [];
|
|
76
|
+
const checkTriple = (triple, path) => {
|
|
77
|
+
const o = triple;
|
|
78
|
+
if (o === undefined || typeof o !== "object" || Array.isArray(o))
|
|
79
|
+
return;
|
|
80
|
+
for (const field of ["preActionModel", "skillModel", "postActionModel"]) {
|
|
81
|
+
const v = o[field];
|
|
82
|
+
if (typeof v !== "string" || v.trim() === "")
|
|
83
|
+
continue;
|
|
84
|
+
if (looksLikeProviderModelId(v)) {
|
|
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;
|
|
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.`);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
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`);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
checkSelection(graph.modelConfig, "graph.modelConfig");
|
|
106
|
+
const nodes = graph.nodes;
|
|
107
|
+
if (!Array.isArray(nodes))
|
|
108
|
+
return warnings;
|
|
109
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
110
|
+
const node = readRecord(nodes[i]);
|
|
111
|
+
if (node === undefined)
|
|
112
|
+
continue;
|
|
113
|
+
const nodeId = typeof node.id === "string" ? node.id : `nodes[${i}]`;
|
|
114
|
+
const tc = readRecord(node.taskConfiguration);
|
|
115
|
+
checkSelection(tc?.modelConfig, `node "${nodeId}": taskConfiguration.modelConfig`);
|
|
116
|
+
}
|
|
117
|
+
return warnings;
|
|
118
|
+
}
|
|
49
119
|
/**
|
|
50
|
-
* Warn-first canonical inspection (does not throw).
|
|
51
|
-
* `assertCanonicalGraphDocument` hard-fail in
|
|
120
|
+
* Warn-first canonical inspection (does not throw). Complements
|
|
121
|
+
* `assertCanonicalGraphDocument` hard-fail in create/modify output validation.
|
|
52
122
|
*/
|
|
53
123
|
export function collectCanonicalGraphWarnings(graph) {
|
|
54
124
|
const warnings = [];
|
|
@@ -136,5 +206,6 @@ export function collectCanonicalGraphWarnings(graph) {
|
|
|
136
206
|
warnings.push(`graph.response: editor-only key(s) should be removed: ${bad.join(", ")}.`);
|
|
137
207
|
}
|
|
138
208
|
}
|
|
209
|
+
warnings.push(...collectModelProfileWarnings(g));
|
|
139
210
|
return warnings;
|
|
140
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
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphComposerOutputValidation.d.ts","sourceRoot":"","sources":["../src/graphComposerOutputValidation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphComposerOutputValidation.d.ts","sourceRoot":"","sources":["../src/graphComposerOutputValidation.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAwB,MAAM,YAAY,CAAC;AAE3E,mHAAmH;AACnH,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAC5B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,GAAG,CAAC,EAAE,uBAAuB,KAC1B,IAAI,CAAC;AAuBV,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,CAAC,EAAE,uBAAuB,GAC7B,IAAI,CAIN;AAmYD,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,CAAC,EAAE,uBAAuB,GAC7B,IAAI,CAwGN;AAED;;;;GAIG;AACH,wBAAgB,uCAAuC,CACrD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,KAAK,EAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,GACjC,IAAI,CAqCN;AAuBD,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,CAAC,EAAE,uBAAuB,GAC7B,IAAI,CAmBN;AAsBD,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,GAAG,CAAC,EAAE,uBAAuB,GAC5B,IAAI,CA8BN;AAmBD,wBAAgB,sCAAsC,CACpD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,CAAC,EAAE,uBAAuB,GAC7B,IAAI,CAkDN;AAED,wBAAgB,qCAAqC,CACnD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,CAAC,EAAE,uBAAuB,GAC7B,IAAI,CAiCN;AAUD,wBAAgB,qCAAqC,CACnD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,CAAC,EAAE,uBAAuB,GAC7B,IAAI,CAwDN;AAED,wBAAgB,uCAAuC,CACrD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,CAAC,EAAE,uBAAuB,GAC7B,IAAI,CAwDN"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { reportTaskNodeProtocolGaps } from "./aiTaskProfile.js";
|
|
2
2
|
import { collectCanonicalGraphWarnings } from "./canonicalGraphWarnings.js";
|
|
3
|
+
import { assertCanonicalGraphDocument } from "./graphEngineBridge.js";
|
|
3
4
|
import { canonicalizeGraphModel, reportTaskNodeInputsLayoutIssues, taskNodeInputsLayoutWarningMessage, } from "./taskNodeTaskVariable.js";
|
|
4
5
|
const PRIMARY_INTENT_TYPES = new Set([
|
|
5
6
|
"question",
|
|
@@ -515,6 +516,13 @@ export function validateCreateModifyOutput(out, ctx) {
|
|
|
515
516
|
if (gaps.length > 0) {
|
|
516
517
|
throw new Error(`create/modify graph violates task node protocol (taskConfiguration.aiTaskProfile / webScoping / inputSynthesis): ${JSON.stringify(gaps)}`);
|
|
517
518
|
}
|
|
519
|
+
try {
|
|
520
|
+
assertCanonicalGraphDocument(canonicalized);
|
|
521
|
+
}
|
|
522
|
+
catch (err) {
|
|
523
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
524
|
+
throw new Error(`create/modify graph is not a canonical graph document: ${msg}`);
|
|
525
|
+
}
|
|
518
526
|
appendWarnings(out, collectCanonicalGraphWarnings(canonicalized));
|
|
519
527
|
out.graph = canonicalized;
|
|
520
528
|
}
|
|
@@ -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,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,uBAAuB,GACxB,MAAM,YAAY,CAAC;AAC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,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"}
|
|
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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kVulnSubnet, 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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskNodeTaskVariable.d.ts","sourceRoot":"","sources":["../src/taskNodeTaskVariable.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAcH,MAAM,MAAM,6BAA6B,GAErC,qBAAqB,GAErB,oBAAoB,GAEpB,yBAAyB,GAEzB,oCAAoC,GAEpC,2BAA2B,GAE3B,0BAA0B,GAE1B,iBAAiB,GAEjB,wBAAwB,CAAC;AAI7B,MAAM,MAAM,yBAAyB,GAAG;IAEtC,MAAM,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,6BAA6B,CAAC;IAEpC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB,WAAW,CAAC,EAAE,MAAM,CAAC;CAEtB,CAAC;
|
|
1
|
+
{"version":3,"file":"taskNodeTaskVariable.d.ts","sourceRoot":"","sources":["../src/taskNodeTaskVariable.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAcH,MAAM,MAAM,6BAA6B,GAErC,qBAAqB,GAErB,oBAAoB,GAEpB,yBAAyB,GAEzB,oCAAoC,GAEpC,2BAA2B,GAE3B,0BAA0B,GAE1B,iBAAiB,GAEjB,wBAAwB,CAAC;AAI7B,MAAM,MAAM,yBAAyB,GAAG;IAEtC,MAAM,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,6BAA6B,CAAC;IAEpC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB,WAAW,CAAC,EAAE,MAAM,CAAC;CAEtB,CAAC;AA4EF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAItE;AAID,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAQjE;AAkBD,0EAA0E;AAE1E,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAgBzD;AAID,iEAAiE;AAEjE,wBAAgB,2BAA2B,CAEzC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAE5B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAMrC;AAID,qDAAqD;AAErD,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAErC;AAID,wBAAgB,2BAA2B,CAEzC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAE5B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAMrC;AAgCD,wBAAgB,gCAAgC,CAE9C,KAAK,EAAE,MAAM,GAEZ,yBAAyB,EAAE,CAwH7B;AAoOD;;;;;;;;;;;;GAYG;AAEH,wBAAgB,qCAAqC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAI3E;AAID,kEAAkE;AAElE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAoD5D;AAID,wBAAgB,kCAAkC,CAEhD,MAAM,EAAE,yBAAyB,EAAE,GAElC,MAAM,CA8HR"}
|
|
@@ -24,6 +24,17 @@ const METADATA_EXECUTION_KEYS = new Set([
|
|
|
24
24
|
"synthesizedInput",
|
|
25
25
|
"skillKey",
|
|
26
26
|
"variables",
|
|
27
|
+
"scopingMapId",
|
|
28
|
+
"entityIdPath",
|
|
29
|
+
"rules",
|
|
30
|
+
"firstMatchWins",
|
|
31
|
+
"defaultOutput",
|
|
32
|
+
"mergeInferencePaths",
|
|
33
|
+
"mergeDecisionPaths",
|
|
34
|
+
"staticEntityType",
|
|
35
|
+
"payloadPath",
|
|
36
|
+
"questionTitle",
|
|
37
|
+
"woroxContractTarget",
|
|
27
38
|
]);
|
|
28
39
|
function readRecord(v) {
|
|
29
40
|
if (v === null || v === undefined || typeof v !== "object" || Array.isArray(v)) {
|