@exellix/graph-engine 8.5.0 → 8.7.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +2 -2
  3. package/dist/src/contract/graphRunContract.d.ts +37 -0
  4. package/dist/src/contract/graphRunContract.js +130 -0
  5. package/dist/src/contract/persistencyDefaults.d.ts +2 -0
  6. package/dist/src/contract/persistencyDefaults.js +2 -0
  7. package/dist/src/index.d.ts +7 -4
  8. package/dist/src/index.js +6 -2
  9. package/dist/src/inspection/contractInspection.js +7 -16
  10. package/dist/src/inspection/controlInspection.js +2 -2
  11. package/dist/src/inspection/nodeInspection.js +9 -10
  12. package/dist/src/inspection/types.d.ts +4 -13
  13. package/dist/src/integrations/activixExellixShared.js +2 -2
  14. package/dist/src/runtime/ExellixGraphRuntime.js +6 -3
  15. package/dist/src/runtime/buildAiTasksRunTaskRequest.d.ts +3 -8
  16. package/dist/src/runtime/buildAiTasksRunTaskRequest.js +1 -16
  17. package/dist/src/runtime/buildRunTaskTaskConfigurationForward.d.ts +3 -3
  18. package/dist/src/runtime/buildRunTaskTaskConfigurationForward.js +3 -7
  19. package/dist/src/runtime/executionMatrixHost.d.ts +2 -2
  20. package/dist/src/runtime/executionMatrixHost.js +2 -2
  21. package/dist/src/runtime/graphEngineLogMeta.js +2 -2
  22. package/dist/src/runtime/graphEngineLogxer.js +2 -2
  23. package/dist/src/runtime/resolveNarrixForTaskNode.d.ts +3 -7
  24. package/dist/src/runtime/resolveNarrixForTaskNode.js +4 -7
  25. package/dist/src/runtime/runTaskNodePlan.d.ts +10 -0
  26. package/dist/src/runtime/runTaskNodePlan.js +132 -0
  27. package/dist/src/runtime/runtimeObjects.d.ts +5 -5
  28. package/dist/src/runtime/runtimeObjects.js +5 -5
  29. package/dist/src/runtime/taskNodeRunTaskPreflight.js +6 -3
  30. package/dist/src/runtime/validateCanonicalGraphDocument.js +6 -7
  31. package/dist/src/types/aiTaskProfile.d.ts +12 -17
  32. package/dist/src/types/aiTaskProfile.js +12 -4
  33. package/dist/src/types/narrix.d.ts +33 -24
  34. package/dist/src/types/taskNodeConfiguration.d.ts +3 -2
  35. package/docs/handoff/graphs-studio-graphenix-2.7.3.md +13 -0
  36. package/package.json +22 -20
  37. package/dist/src/runtime/applyAiTaskProfileWebScopingToNarrix.d.ts +0 -15
  38. package/dist/src/runtime/applyAiTaskProfileWebScopingToNarrix.js +0 -43
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.6.0 — Graphenix 2.7.3 (no-legacy web + narrix pipeline)
4
+
5
+ ### Breaking
6
+
7
+ - **Legacy web scope removed:** Hard-reject `taskConfiguration.aiTaskProfile.webScoping`, `narrix.enableWebScope`, `forceWebScope`, `webScopeQuestions`, and related narrix web keys. Author **`taskConfiguration.aiTaskProfile.webQueryTemplate`** (optional `webQueryTemplates[]`, `webScopeOptions`).
8
+ - **`RunTaskRequest` wire:** Root `narrix` / `narrixMode` / `narrixInput` / `narrixScope` removed (ai-tasks **10.0.12+**). Graph-engine merges graph `variables.narrix` into **`nodePlan.invokeContract.pipeline.narrix`** via `patchNodePlanRuntimePipeline`.
9
+ - **Deleted** `applyAiTaskProfileWebScopingToNarrix` — web scope is plan-compiler PRE `webScope` unit + ai-tasks dispatch, not host-side narrix merge.
10
+
11
+ ### Changed
12
+
13
+ - **`@exellix/ai-tasks` ^10.0.13**, **`@exellix/ai-skills` ^6.12.5**, **`@x12i/catalox` ^5.9.8**.
14
+ - **`@x12i/graphenix-*` ^2.7.3** — includes **`response.persistency`** (`newRecord`, `link.*`) on graph wire (GRX-NOTE-001 / MRX-FRS-002 intent).
15
+ - **`check:no-legacy`** — floors ai-tasks ≥10.0.12, ai-skills ≥6.12.4, graphenix-* ≥2.7.3.
16
+
17
+ ### Added
18
+
19
+ - **`patchNodePlanRuntimePipeline`**, **`resolveRunTaskNodePlan`** — runtime narrix pipeline merge + narrative unit injection on minimal/uncompiled plans.
20
+ - **Exports:** `NarrixModeKey`, `NarrixRunInput`, `NarrixScope` types (local, compatible with plan wire).
21
+
22
+ ### Downstream
23
+
24
+ - **graphs-studio:** see [`docs/handoff/graphs-studio-graphenix-2.7.3.md`](docs/handoff/graphs-studio-graphenix-2.7.3.md).
25
+
3
26
  ## 8.5.0 — Graphenix 2.7.0 + CR-006 (graphEntry.inputs removed)
4
27
 
5
28
  ### Breaking
package/README.md CHANGED
@@ -55,7 +55,7 @@ npm install @exellix/graph-engine
55
55
 
56
56
  **Upstream tasks SDK:** This package depends on **`@exellix/ai-tasks` ^8.6.8** and **`@x12i/funcx` 4.4.4** (see **`package.json`**). Graph-engine emits **`RunTaskRequest`** shapes that match the ai-tasks **8.x** closed schema (mandatory **`executionStrategies`**, three-slot **`modelConfig`**, **`xynthesized`**, optional **`smartInput`**, no legacy root mirrors). Pin compatible versions in your app lockfile. Optional CI improvement: fail or warn when the resolved ai-tasks major/minor drifts outside an allowlist (not enforced in-repo today).
57
57
 
58
- ### Execution matrix hosts (`@exellix/exellix-runtime`) — documentation only for the engine
58
+ ### Execution matrix hosts (`@x12i/exellix-runtime`) — documentation only for the engine
59
59
 
60
60
  Matrix **claim**, **rows**, and **retry policy** live outside this package. If your host wires **matrix → graph run**, see [.docs/execution-matrix-handoff.md](.docs/execution-matrix-handoff.md) for how **you** should inject `runtime.executeGraph`, compile **`GraphModelObject` → plan**, resolve **`metadata.graphEntry` per model**, seed **`runtime.executionMemory`**, and pass **`runtime.jobId`**. Helpers such as **`buildMatrixJobForGraphRun`** align **`id`** and **`job.jobId`** on the `job` object so you can call **`runtime.executeGraph({ plan, runtime: { jobId: job.jobId, job, … } })`**. Those exports are **optional helpers for callers**; they do **not** expand graph-engine’s role beyond **executing the single run** when invoked.
61
61
 
@@ -329,7 +329,7 @@ When **`taskConfiguration.aiTaskProfile.inputSynthesis`** is enabled, graph-engi
329
329
 
330
330
  1. **Engine PRE/POST strategy utilities (ai-tasks only):** `taskConfiguration.aiTaskProfile.preStrategyKey` / `postStrategyKey` → extra **`runTask`** calls via **`@exellix/ai-tasks`** before/after MAIN; outputs stored at **`execution.xynthesis.pre`** / **`execution.xynthesis.post`** (historical slot names).
331
331
  2. **`executionPipeline` inside ai-tasks:** e.g. PRE **`synthesized-context`** + MAIN direct — still **one** outbound MAIN `runTask` handled inside `@exellix/ai-tasks`.
332
- 3. **Narrix web scope inside ai-tasks:** when **`taskConfiguration.aiTaskProfile.webScoping.enabled`** is true, graph-engine forwards a `narrix` payload with `enableWebScope` / `webScopeQuestions`. The actual web fetch + skip rules run **inside `@exellix/ai-tasks`** (`@exellix/narrix-web-scoper`); graph-engine has **no local web phase** in 5.x.
332
+ 3. **Narrix web scope inside ai-tasks:** when **`taskConfiguration.aiTaskProfile.webScoping.enabled`** is true, graph-engine forwards a `narrix` payload with `enableWebScope` / `webScopeQuestions`. The actual web fetch + skip rules run **inside `@exellix/ai-tasks`** (`@x12i/narrix-web-scoper`); graph-engine has **no local web phase** in 5.x.
333
333
 
334
334
  `synthesize` finalizers are a fourth outbound task-call shape: the finalizer is still a graph model node, but its terminal utility `runTask` uses the same run identity, diagnostics, `llmCall`, and resolved model config as the rest of the graph run.
335
335
 
@@ -0,0 +1,37 @@
1
+ export type GraphRunPersistencyLink = {
2
+ /** Relation descriptor key (result entity → source entity). */
3
+ relationKey?: string;
4
+ /** Dot-path on the new record where the source recordId/entityId FK is written. */
5
+ fkPath?: string;
6
+ type?: 'oneToOne' | 'oneToMany' | 'manyToOne' | 'manyToMany';
7
+ /** Content type the relation targets on the source (default: source job contentType). */
8
+ targetContentType?: string;
9
+ };
10
+ export type GraphRunPersistency = {
11
+ /** Target object type; default `same-as-input`. */
12
+ entityId: string | 'same-as-input';
13
+ /** Result collection content type; default {@link DEFAULT_GRAPH_RUN_PERSISTENCY_CONTENT_TYPE}. */
14
+ contentType: string;
15
+ /** When true (default), always insert a new result record with a new recordId. */
16
+ newRecord?: boolean;
17
+ /** Cross-object link intent; auto-derived when {@link entityId} differs from the job source. */
18
+ link?: GraphRunPersistencyLink;
19
+ };
20
+ export type GraphRunContract = {
21
+ graphId: string;
22
+ persistency: GraphRunPersistency | null;
23
+ graphVersion?: string;
24
+ };
25
+ /** Parse a work/job/graph persistency object (partial fields allowed). */
26
+ export declare function parseGraphRunPersistency(raw: unknown): GraphRunPersistency | null;
27
+ /** Work/job overrides win over graph defaults; partial overrides merge field-by-field. */
28
+ export declare function mergeGraphRunPersistency(base: GraphRunPersistency | null, override: GraphRunPersistency | null): GraphRunPersistency | null;
29
+ /** Apply a run/work/job persistency override onto a resolved graph contract. */
30
+ export declare function applyGraphRunContractOverride(contract: GraphRunContract, persistencyOverride: unknown): GraphRunContract;
31
+ /** Read graph document version from published graph JSON (`version` or `metadata.version`). */
32
+ export declare function readGraphDocumentVersion(graphDoc: unknown): string | undefined;
33
+ /** Resolve graph-run contract from published graph JSON (GRX-NOTE-001). */
34
+ export declare function resolveGraphRunContract(graphId: string, graphDoc: unknown): GraphRunContract;
35
+ export declare function loadGraphRunContracts(graphIds: string[], graphLoader: {
36
+ loadGraph(graphId: string): Promise<unknown>;
37
+ }): Promise<GraphRunContract[]>;
@@ -0,0 +1,130 @@
1
+ import { DEFAULT_GRAPH_RUN_PERSISTENCY_CONTENT_TYPE } from './persistencyDefaults.js';
2
+ const RELATION_TYPES = new Set(['oneToOne', 'oneToMany', 'manyToOne', 'manyToMany']);
3
+ function asRecord(value) {
4
+ if (!value || typeof value !== 'object' || Array.isArray(value))
5
+ return null;
6
+ return value;
7
+ }
8
+ function readLink(raw) {
9
+ const link = asRecord(raw);
10
+ if (!link)
11
+ return undefined;
12
+ const out = {};
13
+ if (typeof link.relationKey === 'string' && link.relationKey.length > 0) {
14
+ out.relationKey = link.relationKey;
15
+ }
16
+ if (typeof link.fkPath === 'string' && link.fkPath.length > 0) {
17
+ out.fkPath = link.fkPath;
18
+ }
19
+ if (typeof link.type === 'string' && RELATION_TYPES.has(link.type)) {
20
+ out.type = link.type;
21
+ }
22
+ if (typeof link.targetContentType === 'string' && link.targetContentType.length > 0) {
23
+ out.targetContentType = link.targetContentType;
24
+ }
25
+ return Object.keys(out).length > 0 ? out : undefined;
26
+ }
27
+ function normalizePersistency(raw) {
28
+ const entityIdRaw = raw.entityId;
29
+ const entityId = entityIdRaw === 'same-as-input'
30
+ ? 'same-as-input'
31
+ : typeof entityIdRaw === 'string' && entityIdRaw.length > 0
32
+ ? entityIdRaw
33
+ : 'same-as-input';
34
+ const contentTypeRaw = raw.contentType;
35
+ const contentType = typeof contentTypeRaw === 'string' && contentTypeRaw.length > 0
36
+ ? contentTypeRaw
37
+ : DEFAULT_GRAPH_RUN_PERSISTENCY_CONTENT_TYPE;
38
+ const newRecord = raw.newRecord === false ? false : true;
39
+ const link = readLink(raw.link);
40
+ return {
41
+ entityId,
42
+ contentType,
43
+ newRecord,
44
+ ...(link ? { link } : {}),
45
+ };
46
+ }
47
+ /** Parse a work/job/graph persistency object (partial fields allowed). */
48
+ export function parseGraphRunPersistency(raw) {
49
+ const rec = asRecord(raw);
50
+ if (!rec)
51
+ return null;
52
+ return normalizePersistency(rec);
53
+ }
54
+ /** Work/job overrides win over graph defaults; partial overrides merge field-by-field. */
55
+ export function mergeGraphRunPersistency(base, override) {
56
+ if (!override)
57
+ return base;
58
+ if (!base)
59
+ return override;
60
+ return {
61
+ entityId: override.entityId,
62
+ contentType: override.contentType,
63
+ newRecord: override.newRecord !== undefined ? override.newRecord : base.newRecord,
64
+ link: override.link ? { ...base.link, ...override.link } : base.link,
65
+ };
66
+ }
67
+ function mergeRawPersistency(base, rawOverride) {
68
+ const overrideRec = asRecord(rawOverride);
69
+ if (!overrideRec)
70
+ return base;
71
+ const merged = {
72
+ ...(base
73
+ ? {
74
+ entityId: base.entityId,
75
+ contentType: base.contentType,
76
+ ...(base.newRecord === false ? { newRecord: false } : {}),
77
+ ...(base.link ? { link: { ...base.link } } : {}),
78
+ }
79
+ : {}),
80
+ ...overrideRec,
81
+ };
82
+ const overrideLink = asRecord(overrideRec.link);
83
+ if (base?.link && overrideLink) {
84
+ merged.link = { ...base.link, ...overrideLink };
85
+ }
86
+ return normalizePersistency(merged);
87
+ }
88
+ /** Apply a run/work/job persistency override onto a resolved graph contract. */
89
+ export function applyGraphRunContractOverride(contract, persistencyOverride) {
90
+ return {
91
+ ...contract,
92
+ persistency: mergeRawPersistency(contract.persistency, persistencyOverride),
93
+ };
94
+ }
95
+ function readPersistency(graph) {
96
+ const response = asRecord(graph.response);
97
+ const fromResponse = asRecord(response?.persistency);
98
+ if (fromResponse) {
99
+ return normalizePersistency(fromResponse);
100
+ }
101
+ const metadata = asRecord(graph.metadata);
102
+ const graphResponse = asRecord(metadata?.graphResponse);
103
+ const legacy = asRecord(graphResponse?.persistency);
104
+ if (legacy) {
105
+ return normalizePersistency(legacy);
106
+ }
107
+ return null;
108
+ }
109
+ /** Read graph document version from published graph JSON (`version` or `metadata.version`). */
110
+ export function readGraphDocumentVersion(graphDoc) {
111
+ const graph = asRecord(graphDoc) ?? {};
112
+ const metadata = asRecord(graph.metadata);
113
+ if (typeof graph.version === 'string')
114
+ return graph.version;
115
+ if (typeof metadata?.version === 'string')
116
+ return metadata.version;
117
+ return undefined;
118
+ }
119
+ /** Resolve graph-run contract from published graph JSON (GRX-NOTE-001). */
120
+ export function resolveGraphRunContract(graphId, graphDoc) {
121
+ const graph = asRecord(graphDoc) ?? {};
122
+ return {
123
+ graphId,
124
+ persistency: readPersistency(graph),
125
+ graphVersion: readGraphDocumentVersion(graph),
126
+ };
127
+ }
128
+ export async function loadGraphRunContracts(graphIds, graphLoader) {
129
+ return Promise.all(graphIds.map(async (graphId) => resolveGraphRunContract(graphId, await graphLoader.loadGraph(graphId))));
130
+ }
@@ -0,0 +1,2 @@
1
+ /** Default result content type for graph-run persistency. */
2
+ export declare const DEFAULT_GRAPH_RUN_PERSISTENCY_CONTENT_TYPE = "inferences";
@@ -0,0 +1,2 @@
1
+ /** Default result content type for graph-run persistency. */
2
+ export const DEFAULT_GRAPH_RUN_PERSISTENCY_CONTENT_TYPE = 'inferences';
@@ -13,7 +13,8 @@
13
13
  * {@link compileExellixExecutablePlan} or `@x12i/graphenix-plan-compiler`.
14
14
  */
15
15
  export type { HostExecuteGraphRunOptions, MainReadinessPolicy, ExecutionStepOption, StepRetryPolicy, ActivixNodeActivityExellixConfig, SkillKeyResolutionOptions, RunTaskRequest as ExellixGraphRunTaskRequest, RunTaskResponse as ExellixGraphRunTaskResponse, } from './types/options.js';
16
- export type { AiTaskProfileMetadata, AiTaskProfileWebScoping, AiTaskProfileInputSynthesis, } from './types/aiTaskProfile.js';
16
+ export type { AiTaskProfileMetadata, AiTaskProfileInputSynthesis, } from './types/aiTaskProfile.js';
17
+ export { hasWebScopeAuthoring } from './types/aiTaskProfile.js';
17
18
  export type { ExecutionStrategyInvocation, ExecutionStrategyPhase, ExecutionStrategyWrapperKey, SmartInputConfig, TaskStrategyItemData, XynthesizedDestinationScope, XynthesizedMemory, XynthesizedOutputConfig, } from './types/aiTasksDerivedTypes.js';
18
19
  export type { Graph, GraphModelObject, GraphAiModelConfig, PartialGraphAiModelConfig, GraphModelAliasConfig, GraphRuntimeNodeConfig, TaskNodeRuntimeObject, GraphDocumentMetadata, GraphEntryContract, GraphResponseDefinition, GraphResponseMissingBehavior, GraphResponseSelector, GraphResponseShape, GraphResponseContract, GraphResponseMapping, GraphResponseMappingMissingBehavior, GraphResponseMappingSelector, GraphResponseMappingTarget, GraphExecutionDefaults, GraphExecutionMode, GraphOutputMode, GraphFlowOutline, GraphCoreObjective, GraphNodesResponses, GraphNode, TaskNode, TaskNodeConditions, TaskNodeConditionWhen, TaskNodeJsonCondition, TaskNodeJsConditionFunction, TaskNodeAiCondition, TaskNodeConditionParameters, ModelConfigSelection, ModelConfigCase, TaskNodePureMetadata, TaskNodeExecutionPipelineStep, TaskOutputValidation, FinalizerNode, FinalizerInputBinding, OutputSchema, AggregateFinalizerConfig, BundleFinalizerConfig, SelectFinalizerConfig, SynthesizeFinalizerConfig, UtilityExecutionPolicy, Job, CatalogPlanningKind, CatalogRequestStatus, CatalogBinding, ScopedQuestionCatalogRequestEntry, DiscoveryDefinitionCatalogRequestEntry, DiscoveryDefinitionCatalogRequest, DiscoveryDefinitionPlanningFields, CatalogRequestEntry, StructuredDataFiltersV1, ConditionsDataFilters, } from './types/refs.js';
19
20
  export { mergeGraphDocumentModel, EXELLIX_GRAPH_MODEL_VARIABLE_KEY, EXELLIX_STRUCTURED_DATA_FILTERS_V1, } from './types/refs.js';
@@ -71,13 +72,14 @@ export { buildAiTasksRunTaskRequest, extractRunTaskMetadataPassthrough, extractR
71
72
  export type { BuildAiTasksRunTaskRequestArgs, RunTaskMetadataPassthrough, } from './runtime/buildAiTasksRunTaskRequest.js';
72
73
  export { buildTaskNodeJobContext } from './runtime/buildTaskNodeJobContext.js';
73
74
  export { resolveNarrixForTaskNode } from './runtime/resolveNarrixForTaskNode.js';
75
+ export { patchNodePlanMainModelFromWire, patchNodePlanRuntimePipeline, resolveRunTaskNodePlan, } from './runtime/runTaskNodePlan.js';
74
76
  export { runTaskResponseSucceeded } from './runtime/runTaskResponse.js';
75
77
  export { buildTaskNodeRunTaskRequest, validateTaskNodeRunTaskConfig, validateTaskNodeRunTaskInvoke, } from './runtime/taskNodeRunTaskPreflight.js';
76
78
  export type { BuildTaskNodeRunTaskRequestArgs, BuildTaskNodeRunTaskRequestResult, TaskNodeRunTaskPreflightSkipReason, ValidateTaskNodeRunTaskConfigArgs, ValidateTaskNodeRunTaskConfigResult, ValidateTaskNodeRunTaskInvokeArgs, ValidateTaskNodeRunTaskInvokeResult, } from './runtime/taskNodeRunTaskPreflight.js';
77
79
  /** Re-exported from `@exellix/ai-tasks` — preflight validation without `runTask`. */
78
80
  export { validateRunTaskConfig, validateRunTaskInvoke, analyzeExpectedRunTaskInput, checkExpectedInputAgainstRequest, collectSmartInputValidationIssues, buildRunTaskValidationContext, validateParsedOutput, listTokens, analyzeTemplateResolution, renderSmartInput, extractTokenNamesFromStrings, getSkillTokens, getSkillContent, } from '@exellix/ai-tasks';
79
81
  export type { RunTaskValidationIssue, RunTaskValidationResult, RunTaskInvokeValidationResult, ExpectedRunTaskInputPath, AnalyzeExpectedRunTaskInputResult, ValidateRunTaskInvokeParams, RunTaskTemplateResolver, OutputValidationResult, } from '@exellix/ai-tasks';
80
- export { buildExellixGraphRuntimeObjects, setRuntimeObjectsLastJobId, summarizeRuntimeObjectsForPlayground, EXELLIX_GRAPH_RUNTIME_PACKAGE_NAME, EXELLIX_AI_TASKS_PACKAGE_NAME, } from './runtime/runtimeObjects.js';
82
+ export { buildExellixGraphRuntimeObjects, setRuntimeObjectsLastJobId, summarizeRuntimeObjectsForPlayground, X12I_GRAPH_RUNTIME_PACKAGE_NAME, X12I_AI_TASKS_PACKAGE_NAME, } from './runtime/runtimeObjects.js';
81
83
  export type { ActivixQueryableClient, LogxerQueryableClient, LogxerLogLine, PackageRuntimeObjects, RuntimeObjects, BuildExellixGraphRuntimeObjectsInput, RuntimeObjectsObservabilitySummary, } from './runtime/runtimeObjects.js';
82
84
  export type { GetJobLogsInput, GetJobLogsResult, QueryableLogLine } from '@x12i/logxer';
83
85
  export { assertCanonicalGraphDocument, assertCanonicalTaskNode, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, } from './runtime/validateCanonicalGraphDocument.js';
@@ -88,7 +90,6 @@ export type { GraphStudioDocument } from './runtime/graphModelStudioSeparation.j
88
90
  export { STUDIO_GRAPH_EXECUTE_REMOVED_KEYS, getStudioGraphExecuteRemovedKeyViolations, assertCanonicalStudioGraphExecuteRequest, buildGraphExecutionRequestFromStudioExecute, } from './runtime/studioGraphExecuteRequest.js';
89
91
  export type { StudioGraphExecuteRemovedKey, StudioGraphExecuteRequest, BuildGraphExecutionRequestFromStudioExecuteOptions, } from './runtime/studioGraphExecuteRequest.js';
90
92
  export { computeGraphDocumentContentSha256, stableStringifyGraphDocument, } from './runtime/graphDocumentFingerprint.js';
91
- export { applyAiTaskProfileWebScopingToNarrix, mapAiTaskProfileQuestionsToWebScopeQuestions, } from './runtime/applyAiTaskProfileWebScopingToNarrix.js';
92
93
  export { createExellixGraphRuntime } from './runtime/ExellixGraphRuntime.js';
93
94
  export type { ExecutableGraphPlanV2, NodeExecutionPlan, ExecutionUnitPlanV2, } from '@x12i/graphenix-executable-contracts';
94
95
  export type { AuthoringGraphDocument } from '@x12i/graphenix-executable-contracts';
@@ -118,6 +119,8 @@ export { createPlaygroundReporter } from './playground/index.js';
118
119
  export type { CreatePlaygroundReporterOptions, PlaygroundDebugArtifact, PlaygroundDebugArtifactKind, PlaygroundDebugSnapshot, PlaygroundReporter, PlaygroundStep, } from './playground/PlaygroundReporter.js';
119
120
  export { getNodeScopingQuestion, getNodeMemoryShape, getNodeNarrixDiscovery, fetchNodeScopingData, inspectNode, resolveNodeSkillKey, getGraphNodes, getGraphCatalogs, inspectGraph, collectPredicatePaths, executionMemoryPathTail, executionMemoryTailsMatch, getNodeExecutionMemoryWriteTails, getNodeControlDependencies, getNodeSideEffects, inspectFinalizer, inspectNodeContract, inspectGraphContracts, EXELLIX_VIRTUAL_GRAPH_ENTRY_NODE_ID, EXELLIX_VIRTUAL_GRAPH_RESPONSE_NODE_ID, EXELLIX_VIRTUAL_BOUNDARY_NODE_METADATA_KEY, EXELLIX_VIRTUAL_BOUNDARY_EDGE_FLAG_KEY, getVirtualGraphEntryLayer, getVirtualGraphResponseLayer, materializeVirtualBoundaryDiagram, stripMaterializedVirtualBoundaryDiagram, validateCatalogPlanning, isCatalogBinding, isCatalogRequestEntry, inspectGraphModelSelection, } from './inspection/index.js';
120
121
  export type { GraphModelSelectionInspection, NodeModelSelection, ModelSelectionSource, NodeScopingQuestion, NodeScopeSource, NodeScopeTarget, NodeScopingData, NodeMemoryShape, MemoryPath, NodeNarrixDiscovery, NodeInspection, GraphInspection, NodeIOEdge, GraphCatalogs, CatalogBindingSummary, CatalogPlanningValidationIssue, GraphVirtualIO, GraphVirtualIONode, GraphVirtualIOEdge, GraphVirtualIONodeRole, VirtualGraphEntryLayer, VirtualGraphResponseLayer, MaterializeVirtualBoundaryDiagramOptions, MaterializedVirtualBoundaryDiagram, MaterializedVirtualBoundaryDiagramMeta, InspectNodeContractOptions, LocalSkillKey, NodeExecutionType, FactProvenance, ProvenancedSection, NodeInputBindingEntry, ScopedDataDependency, NodeInputContract, ExecutionMemoryWriteSpec, NodeOutputContract, NodeSideEffects, ControlBranchEntry, NodeControlContract, NodeValidationContract, FinalizerContractInspection, NodeContractInspection, GraphContractsInspection, } from './inspection/index.js';
121
- export type { NarrixPreProcessorConfig, WebScopeQuestion, LocalTaskHandler, LocalTaskContext } from './types/narrix.js';
122
+ export type { NarrixPreProcessorConfig, NarrixModeKey, NarrixRunInput, NarrixScope, ResolvedNarrixWirePayload, LocalTaskHandler, LocalTaskContext, } from './types/narrix.js';
123
+ export { resolveGraphRunContract, loadGraphRunContracts, readGraphDocumentVersion, parseGraphRunPersistency, mergeGraphRunPersistency, applyGraphRunContractOverride, type GraphRunContract, type GraphRunPersistency, type GraphRunPersistencyLink, } from './contract/graphRunContract.js';
124
+ export { DEFAULT_GRAPH_RUN_PERSISTENCY_CONTENT_TYPE } from './contract/persistencyDefaults.js';
122
125
  export { shutdownMemorixRuntime } from './runtime/localSkills/memorixRuntime.js';
123
126
  export type { ScopedDataReaderConfig, ScopedDataReaderOutput, ScopedDataReaderPackOutput, ScopedAnswerAssemblerConfig, ScopedAnswerAssemblerOutput, ScopedAnswerWriterConfig, ScopedAnswerWriterOutput, } from './runtime/localSkills/index.js';
package/dist/src/index.js CHANGED
@@ -12,6 +12,7 @@
12
12
  * `{ executeGraph({ plan, runtime }: GraphExecutionRequest) }`. Hosts compile upstream via
13
13
  * {@link compileExellixExecutablePlan} or `@x12i/graphenix-plan-compiler`.
14
14
  */
15
+ export { hasWebScopeAuthoring } from './types/aiTaskProfile.js';
15
16
  export { mergeGraphDocumentModel, EXELLIX_GRAPH_MODEL_VARIABLE_KEY, EXELLIX_STRUCTURED_DATA_FILTERS_V1, } from './types/refs.js';
16
17
  export { getTaskConfiguration } from './types/taskNodeConfiguration.js';
17
18
  export { AI_TASKS_RUN_LOG_METADATA_KEY, AI_TASKS_LOGXER_RUN_ID_METADATA_KEY, DEFAULT_MAX_RUN_LOG_ENTRIES, DEFAULT_MAX_RUN_LOG_DATA_JSON_CHARS, } from './types/runLog.js';
@@ -54,17 +55,17 @@ export { assertHostJobId, newGraphRunTaskId } from './runtime/graphRunIdentity.j
54
55
  export { buildAiTasksRunTaskRequest, extractRunTaskMetadataPassthrough, extractRunTaskStrategyOverrides, resolveJobTypeId, resolveTaskTypeId, } from './runtime/buildAiTasksRunTaskRequest.js';
55
56
  export { buildTaskNodeJobContext } from './runtime/buildTaskNodeJobContext.js';
56
57
  export { resolveNarrixForTaskNode } from './runtime/resolveNarrixForTaskNode.js';
58
+ export { patchNodePlanMainModelFromWire, patchNodePlanRuntimePipeline, resolveRunTaskNodePlan, } from './runtime/runTaskNodePlan.js';
57
59
  export { runTaskResponseSucceeded } from './runtime/runTaskResponse.js';
58
60
  export { buildTaskNodeRunTaskRequest, validateTaskNodeRunTaskConfig, validateTaskNodeRunTaskInvoke, } from './runtime/taskNodeRunTaskPreflight.js';
59
61
  /** Re-exported from `@exellix/ai-tasks` — preflight validation without `runTask`. */
60
62
  export { validateRunTaskConfig, validateRunTaskInvoke, analyzeExpectedRunTaskInput, checkExpectedInputAgainstRequest, collectSmartInputValidationIssues, buildRunTaskValidationContext, validateParsedOutput, listTokens, analyzeTemplateResolution, renderSmartInput, extractTokenNamesFromStrings, getSkillTokens, getSkillContent, } from '@exellix/ai-tasks';
61
- export { buildExellixGraphRuntimeObjects, setRuntimeObjectsLastJobId, summarizeRuntimeObjectsForPlayground, EXELLIX_GRAPH_RUNTIME_PACKAGE_NAME, EXELLIX_AI_TASKS_PACKAGE_NAME, } from './runtime/runtimeObjects.js';
63
+ export { buildExellixGraphRuntimeObjects, setRuntimeObjectsLastJobId, summarizeRuntimeObjectsForPlayground, X12I_GRAPH_RUNTIME_PACKAGE_NAME, X12I_AI_TASKS_PACKAGE_NAME, } from './runtime/runtimeObjects.js';
62
64
  export { assertCanonicalGraphDocument, assertCanonicalTaskNode, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, } from './runtime/validateCanonicalGraphDocument.js';
63
65
  export { assertCanonicalGraphRuntimeObject } from './runtime/validateCanonicalGraphRuntime.js';
64
66
  export { GRAPH_ENTRY_STUDIO_ONLY_KEYS, GRAPH_METADATA_STUDIO_ONLY_KEYS, stripGraphModelStudioFields, primaryRuntimeInputFromStudioDocument, getGraphEntryStudioOnlyKeyViolations, getGraphMetadataStudioOnlyKeyViolations, } from './runtime/graphModelStudioSeparation.js';
65
67
  export { STUDIO_GRAPH_EXECUTE_REMOVED_KEYS, getStudioGraphExecuteRemovedKeyViolations, assertCanonicalStudioGraphExecuteRequest, buildGraphExecutionRequestFromStudioExecute, } from './runtime/studioGraphExecuteRequest.js';
66
68
  export { computeGraphDocumentContentSha256, stableStringifyGraphDocument, } from './runtime/graphDocumentFingerprint.js';
67
- export { applyAiTaskProfileWebScopingToNarrix, mapAiTaskProfileQuestionsToWebScopeQuestions, } from './runtime/applyAiTaskProfileWebScopingToNarrix.js';
68
69
  // New runtime with injection seam
69
70
  export { createExellixGraphRuntime } from './runtime/ExellixGraphRuntime.js';
70
71
  export { compileExellixExecutablePlan } from './compile/compileExellixExecutablePlan.js';
@@ -87,5 +88,8 @@ export { composeEventEmitters } from './runtime/events.js';
87
88
  export { createPlaygroundReporter } from './playground/index.js';
88
89
  // Graph Inspection API
89
90
  export { getNodeScopingQuestion, getNodeMemoryShape, getNodeNarrixDiscovery, fetchNodeScopingData, inspectNode, resolveNodeSkillKey, getGraphNodes, getGraphCatalogs, inspectGraph, collectPredicatePaths, executionMemoryPathTail, executionMemoryTailsMatch, getNodeExecutionMemoryWriteTails, getNodeControlDependencies, getNodeSideEffects, inspectFinalizer, inspectNodeContract, inspectGraphContracts, EXELLIX_VIRTUAL_GRAPH_ENTRY_NODE_ID, EXELLIX_VIRTUAL_GRAPH_RESPONSE_NODE_ID, EXELLIX_VIRTUAL_BOUNDARY_NODE_METADATA_KEY, EXELLIX_VIRTUAL_BOUNDARY_EDGE_FLAG_KEY, getVirtualGraphEntryLayer, getVirtualGraphResponseLayer, materializeVirtualBoundaryDiagram, stripMaterializedVirtualBoundaryDiagram, validateCatalogPlanning, isCatalogBinding, isCatalogRequestEntry, inspectGraphModelSelection, } from './inspection/index.js';
91
+ // Graph-run contract (GRX-NOTE-001) — persistency intent from published graph JSON
92
+ export { resolveGraphRunContract, loadGraphRunContracts, readGraphDocumentVersion, parseGraphRunPersistency, mergeGraphRunPersistency, applyGraphRunContractOverride, } from './contract/graphRunContract.js';
93
+ export { DEFAULT_GRAPH_RUN_PERSISTENCY_CONTENT_TYPE } from './contract/persistencyDefaults.js';
90
94
  export { shutdownMemorixRuntime } from './runtime/localSkills/memorixRuntime.js';
91
95
  // Web context rendering — consume execution.webContext → markdown for prompts (Layer 04)
@@ -1,5 +1,6 @@
1
- import { isLocalSkillKey } from '../runtime/localSkills/index.js';
1
+ import { hasWebScopeAuthoring } from '../types/aiTaskProfile.js';
2
2
  import { readTaskNodeInputsConfig } from '../runtime/readTaskNodeInputsConfig.js';
3
+ import { isLocalSkillKey } from '../runtime/localSkills/index.js';
3
4
  import { getNodeMemoryShape, getNodeNarrixDiscovery, inspectNode, resolveNodeSkillKey, } from './nodeInspection.js';
4
5
  import { getGraphNodes } from './graphInspection.js';
5
6
  import { getNodeControlDependencies } from './controlInspection.js';
@@ -217,9 +218,8 @@ function buildInputContract(node, memoryShape) {
217
218
  ? [
218
219
  {
219
220
  enabled: true,
220
- entityIdPath: narrixDisc.webScope.entityIdPath,
221
- entityTypePath: narrixDisc.webScope.entityTypePath,
222
- questions: narrixDisc.webScope.questions,
221
+ webQueryTemplate: narrixDisc.webScope.webQueryTemplate,
222
+ webQueryTemplates: narrixDisc.webScope.webQueryTemplates,
223
223
  },
224
224
  ]
225
225
  : [];
@@ -292,19 +292,11 @@ function buildOutputContract(node) {
292
292
  }
293
293
  const tc = task.taskConfiguration;
294
294
  const webCfg = tc?.aiTaskProfile;
295
- const webScoping = webCfg?.webScoping;
296
- const narrixCfg = tc?.narrix;
297
295
  const webWrites = [];
298
- if (narrixCfg?.enableWebScope === true) {
299
- webWrites.push({
300
- path: 'webContext',
301
- source: 'taskConfiguration.narrix.enableWebScope → @exellix/ai-tasks (runtime-known)',
302
- });
303
- }
304
- else if (webScoping && webScoping.enabled === true) {
296
+ if (hasWebScopeAuthoring(webCfg)) {
305
297
  webWrites.push({
306
298
  path: 'webContext',
307
- source: 'taskConfiguration.aiTaskProfile.webScopingexecuteNode (runtime-known)',
299
+ source: 'taskConfiguration.aiTaskProfile.webQueryTemplatePRE webScope unit (runtime-known)',
308
300
  });
309
301
  }
310
302
  const synthWrites = [];
@@ -356,8 +348,7 @@ export function getNodeSideEffects(node) {
356
348
  const tc = node.taskConfiguration;
357
349
  runsNarrix = tc?.narrix != null && typeof tc.narrix === 'object';
358
350
  const web = tc?.aiTaskProfile;
359
- const ws = web?.webScoping;
360
- runsLocalWebScope = ws?.enabled === true;
351
+ runsLocalWebScope = hasWebScopeAuthoring(web);
361
352
  const inputSynth = web?.inputSynthesis;
362
353
  runsPreSynthesis = inputSynth?.enabled === true;
363
354
  }
@@ -1,5 +1,6 @@
1
1
  import { getGraphNodes } from './graphInspection.js';
2
2
  import { getNodeNarrixDiscovery } from './nodeInspection.js';
3
+ import { hasWebScopeAuthoring } from '../types/aiTaskProfile.js';
3
4
  /**
4
5
  * Recursively collects leaf `path` strings from a graph edge predicate.
5
6
  */
@@ -64,8 +65,7 @@ export function getNodeExecutionMemoryWriteTails(node) {
64
65
  }
65
66
  const tc = task.taskConfiguration;
66
67
  const profile = tc?.aiTaskProfile;
67
- const ws = profile?.webScoping;
68
- if (ws?.enabled === true) {
68
+ if (hasWebScopeAuthoring(profile)) {
69
69
  tails.add('webContext');
70
70
  }
71
71
  const inputSynth = profile?.inputSynthesis;
@@ -1,4 +1,4 @@
1
- import { mapAiTaskProfileQuestionsToWebScopeQuestions } from '../runtime/applyAiTaskProfileWebScopingToNarrix.js';
1
+ import { hasWebScopeAuthoring } from '../types/aiTaskProfile.js';
2
2
  import { readTaskNodeInputsConfig } from '../runtime/readTaskNodeInputsConfig.js';
3
3
  import { runScopedDataReader } from '../runtime/localSkills/scopedDataReader.js';
4
4
  // ---------------------------------------------------------------------------
@@ -364,8 +364,8 @@ export function getNodeNarrixDiscovery(node) {
364
364
  if (!narrix || typeof narrix !== 'object')
365
365
  return null;
366
366
  const n = narrix;
367
- const web = task.taskConfiguration?.aiTaskProfile?.webScoping;
368
- const enableWebScope = n.enableWebScope === true || web?.enabled === true;
367
+ const profile = task.taskConfiguration?.aiTaskProfile;
368
+ const enableWebScope = hasWebScopeAuthoring(profile);
369
369
  return {
370
370
  nodeId: node.id,
371
371
  enabled: true,
@@ -374,13 +374,12 @@ export function getNodeNarrixDiscovery(node) {
374
374
  narrativeTypeIds: Array.isArray(n.narrativeTypeIds) ? n.narrativeTypeIds : undefined,
375
375
  webScope: {
376
376
  enabled: enableWebScope,
377
- forced: undefined,
378
- questions: Array.isArray(web?.questions) && web.questions.length > 0
379
- ? mapAiTaskProfileQuestionsToWebScopeQuestions(web.questions)
380
- : undefined,
381
- entityIdPath: undefined,
382
- entityTypePath: undefined,
383
- enrichFromRaw: undefined,
377
+ ...(typeof profile?.webQueryTemplate === 'string'
378
+ ? { webQueryTemplate: profile.webQueryTemplate }
379
+ : {}),
380
+ ...(Array.isArray(profile?.webQueryTemplates) && profile.webQueryTemplates.length > 0
381
+ ? { webQueryTemplates: profile.webQueryTemplates }
382
+ : {}),
384
383
  },
385
384
  outputPaths: {
386
385
  signals: 'executionMemory._narrix.scoping.signals',
@@ -1,8 +1,7 @@
1
1
  import type { CatalogBinding, CatalogRequestEntry, GraphDocumentMetadata, GraphEdge, GraphNode, GraphPredicate, GraphReadabilityKind } from '../types/refs.js';
2
- import type { WebScopeQuestion } from '../types/narrix.js';
3
2
  import type { ScopedDataReaderOutput, ScopedDataReaderPackOutput } from '../runtime/localSkills/scopedDataReader.js';
4
3
  import type { LocalSkillKey } from '../runtime/localSkills/index.js';
5
- export type { GraphEdge, GraphPredicate, GraphReadabilityKind, WebScopeQuestion, LocalSkillKey };
4
+ export type { GraphEdge, GraphPredicate, GraphReadabilityKind, LocalSkillKey };
6
5
  export type { ScopedDataReaderOutput, ScopedDataReaderPackOutput };
7
6
  /**
8
7
  * The scoping question for a single node: what it asks, where it reads its data from,
@@ -98,18 +97,10 @@ export type NodeNarrixDiscovery = {
98
97
  /** Narrative type ids the engine focuses discovery on. */
99
98
  narrativeTypeIds?: string[];
100
99
  webScope: {
101
- /** Whether web scoping is enabled. */
100
+ /** Whether a webQueryTemplate (or pack) is authored on aiTaskProfile. */
102
101
  enabled: boolean;
103
- /** When true, skips DB short-circuit and always fetches from web. */
104
- forced?: boolean;
105
- /** Web scope questions with stable ids and purposes. */
106
- questions?: WebScopeQuestion[];
107
- /** Dot-path to entity id in execution memory for web scope. */
108
- entityIdPath?: string;
109
- /** Dot-path to entity type in execution memory for web scope. */
110
- entityTypePath?: string;
111
- /** Whether CVE/vendor/product tokens are appended to the web-scope question from raw input. */
112
- enrichFromRaw?: boolean;
102
+ webQueryTemplate?: string;
103
+ webQueryTemplates?: string[];
113
104
  };
114
105
  /** Fixed execution-memory paths where narrix writes its output. */
115
106
  outputPaths: {
@@ -1,4 +1,4 @@
1
- import { EXELLIX_GRAPH_RUNTIME_PACKAGE_NAME } from '../runtime/runtimeObjects.js';
1
+ import { X12I_GRAPH_RUNTIME_PACKAGE_NAME } from '../runtime/runtimeObjects.js';
2
2
  /** Recommended Mongo indexes for exellix-graph Activix streams (see `@x12i/activix` README). */
3
3
  export const ACTIVIX_EXELLIX_RUN_CONTEXT_INDEXES = [
4
4
  { keys: { 'runContext.jobId': 1 } },
@@ -55,5 +55,5 @@ export function buildNodeActivixRunContext(args) {
55
55
  };
56
56
  }
57
57
  export function activixExellixCollectionRegistryOwner() {
58
- return { package: EXELLIX_GRAPH_RUNTIME_PACKAGE_NAME };
58
+ return { package: X12I_GRAPH_RUNTIME_PACKAGE_NAME };
59
59
  }
@@ -26,7 +26,7 @@ import { buildRunLog, extractLogxerCorrelationFromMetadata, extractTaskRunLogFro
26
26
  import { setRuntimeObjectsLastJobId, summarizeRuntimeObjectsForPlayground } from "./runtimeObjects.js";
27
27
  import { DebugLogAbstract, bindGraphEngineRunLogxer, clearGraphEngineRunLogxer, createGraphEngineLogxer, ensureGraphEngineLogxerOnRuntimeObjects, logGraphEngineErrorCode, patchGraphNodeLogContext, runGraphWithLogContext, traceExecutionMemory, } from "./graphEngineLogxer.js";
28
28
  import { runWithAiTasksStackLogging } from "@exellix/ai-tasks";
29
- import { nodePlanFromFinalizerPlan, patchNodePlanMainModelFromWire, resolveRunTaskNodePlan, } from "./runTaskNodePlan.js";
29
+ import { nodePlanFromFinalizerPlan, patchNodePlanMainModelFromWire, patchNodePlanRuntimePipeline, resolveRunTaskNodePlan, } from "./runTaskNodePlan.js";
30
30
  import { assertHostJobId, newGraphRunTaskId } from "./graphRunIdentity.js";
31
31
  import { resolveTaskKey } from "./resolveTaskKey.js";
32
32
  import { buildPredicateEvalContextForNode, readExecutionVariableBuckets, seedGraphVariableBucketsFromRuntime, } from "./variables.js";
@@ -675,7 +675,6 @@ export function createExellixGraphRuntime(opts) {
675
675
  ? { ...input.node.taskConfiguration.narrix }
676
676
  : undefined,
677
677
  graphVariablesNarrix: jobVariables?.narrix,
678
- aiTaskProfile: input.node?.taskConfiguration?.aiTaskProfile,
679
678
  });
680
679
  const metaTk = input.node?.taskConfiguration?.taskKind;
681
680
  const taskKindForward = metaTk === "decision" || metaTk === "utility" || metaTk === "content" ? metaTk : undefined;
@@ -689,6 +688,11 @@ export function createExellixGraphRuntime(opts) {
689
688
  if (!input.nodePlan && input.requireCompiledNodePlan !== true) {
690
689
  runTaskNodePlan = patchNodePlanMainModelFromWire(runTaskNodePlan, wireModelConfig);
691
690
  }
691
+ runTaskNodePlan = patchNodePlanRuntimePipeline({
692
+ plan: runTaskNodePlan,
693
+ resolvedNarrix: narrix ?? undefined,
694
+ taskConfiguration: input.node?.taskConfiguration,
695
+ });
692
696
  const startedAt = Date.now();
693
697
  const hasSynthesizedContextPreStep = runTaskNodePlan.executionUnits.some((u) => u.unitKind === "externalPreUtility" || u.unitKind === "pipelinePhase");
694
698
  const hasExistingSynthesizedContext = execution != null &&
@@ -791,7 +795,6 @@ export function createExellixGraphRuntime(opts) {
791
795
  executionMemory: executionMemoryForWire,
792
796
  jobContext,
793
797
  prevNodeId: input.prevNodeId,
794
- narrix: narrix ?? undefined,
795
798
  ...extractRunTaskStrategyOverrides(input.node?.taskConfiguration),
796
799
  outputValidation: outputValidationFromPlan ??
797
800
  (input.node?.taskConfiguration?.aiTasksOutputValidation != null &&
@@ -11,13 +11,12 @@ import type { RunTaskRequest } from '@exellix/ai-tasks';
11
11
  import type { GraphExecutionTraceV2, NodeExecutionPlan } from '@x12i/graphenix-executable-contracts';
12
12
  import type { SmartInputConfig, XynthesizedMemory } from '../types/aiTasksDerivedTypes.js';
13
13
  import type { Job } from '../types/refs.js';
14
- import type { ResolvedNarrixWirePayload } from '../types/narrix.js';
15
14
  /** Request/metadata keys that must never carry provider API secrets (env-only). */
16
15
  export declare const FORBIDDEN_RUN_TASK_SECRET_KEYS: readonly ["openrouterApiKey", "OPENROUTER_API_KEY", "OPEN_ROUTER_KEY", "apiKey", "api_key", "openRouterApiKey"];
17
- /** Reads task-node `taskConfiguration` keys forwarded to `@exellix/ai-tasks` `RunTaskRequest` (runtime strategy / Narrix wiring). */
18
- export declare function extractRunTaskStrategyOverrides(taskConfiguration: Record<string, unknown> | undefined | null): Partial<Pick<BuildAiTasksRunTaskRequestArgs, 'narrixMode' | 'inputStrategyKey' | 'narrixInput'>>;
16
+ /** Reads task-node `taskConfiguration.inputStrategyKey` for `@exellix/ai-tasks` `RunTaskRequest`. */
17
+ export declare function extractRunTaskStrategyOverrides(taskConfiguration: Record<string, unknown> | undefined | null): Partial<Pick<BuildAiTasksRunTaskRequestArgs, 'inputStrategyKey'>>;
19
18
  /** Optional `RunTaskRequest` fields commonly authored on task-node `taskConfiguration` (whitelist — closed merge order). */
20
- export type RunTaskMetadataPassthrough = Partial<Pick<RunTaskRequest, 'narrixScope' | 'aiScoping' | 'aiScopingOptions' | 'timeoutMs' | 'templateRenderOptions' | 'smartInputRenderOptions' | 'templateTokens' | 'aiEngineId' | 'sessionId' | 'agentType' | 'gatewayDiagnostics' | 'context' | 'knowledge' | 'executionStrategyCatalogItems'>>;
19
+ export type RunTaskMetadataPassthrough = Partial<Pick<RunTaskRequest, 'aiScoping' | 'aiScopingOptions' | 'timeoutMs' | 'templateRenderOptions' | 'smartInputRenderOptions' | 'templateTokens' | 'aiEngineId' | 'sessionId' | 'agentType' | 'gatewayDiagnostics' | 'context' | 'knowledge' | 'executionStrategyCatalogItems'>>;
21
20
  /**
22
21
  * Whitelisted optional transport fields from task-node `taskConfiguration` for `@exellix/ai-tasks` ≥ 7.2.x
23
22
  * (`RunSkillRequest` / `RunTaskRequest` extras not covered by {@link extractRunTaskStrategyOverrides}).
@@ -42,7 +41,6 @@ export type BuildAiTasksRunTaskRequestArgs = {
42
41
  executionMemory?: Record<string, unknown>;
43
42
  jobContext?: Record<string, unknown>;
44
43
  prevNodeId?: string;
45
- narrix?: ResolvedNarrixWirePayload;
46
44
  outputValidation?: RunTaskRequest['outputValidation'];
47
45
  diagnostics?: RunTaskRequest['diagnostics'];
48
46
  identity?: Record<string, unknown>;
@@ -51,10 +49,7 @@ export type BuildAiTasksRunTaskRequestArgs = {
51
49
  autoValidateDecisionOutput?: boolean;
52
50
  /** Overrides default `resolveTaskTypeId(skillKey, nodeId, taskConfiguration)` e.g. engine strategy phases. */
53
51
  taskTypeIdOverride?: string;
54
- /** Usually from `taskConfiguration.narrixMode` via {@link extractRunTaskStrategyOverrides}. */
55
- narrixMode?: RunTaskRequest['narrixMode'];
56
52
  inputStrategyKey?: RunTaskRequest['inputStrategyKey'];
57
- narrixInput?: RunTaskRequest['narrixInput'];
58
53
  /** Required on every request for ai-tasks ≥ 7.1.x — use `[]` for plain MAIN. */
59
54
  executionStrategies?: RunTaskRequest['executionStrategies'];
60
55
  xynthesized?: XynthesizedMemory;
@@ -18,25 +18,17 @@ function assertNoSecretPassthrough(taskConfiguration, context) {
18
18
  }
19
19
  }
20
20
  }
21
- /** Reads task-node `taskConfiguration` keys forwarded to `@exellix/ai-tasks` `RunTaskRequest` (runtime strategy / Narrix wiring). */
21
+ /** Reads task-node `taskConfiguration.inputStrategyKey` for `@exellix/ai-tasks` `RunTaskRequest`. */
22
22
  export function extractRunTaskStrategyOverrides(taskConfiguration) {
23
23
  assertNoSecretPassthrough(taskConfiguration, 'extractRunTaskStrategyOverrides');
24
24
  if (taskConfiguration == null || typeof taskConfiguration !== 'object' || Array.isArray(taskConfiguration))
25
25
  return {};
26
26
  const m = taskConfiguration;
27
27
  const out = {};
28
- const narrixMode = m.narrixMode;
29
- if (typeof narrixMode === 'string' && narrixMode.trim() !== '') {
30
- out.narrixMode = narrixMode.trim();
31
- }
32
28
  const inputStrategyKey = m.inputStrategyKey;
33
29
  if (typeof inputStrategyKey === 'string' && inputStrategyKey.trim() !== '') {
34
30
  out.inputStrategyKey = inputStrategyKey.trim();
35
31
  }
36
- const narrixInput = m.narrixInput;
37
- if (narrixInput != null && typeof narrixInput === 'object' && !Array.isArray(narrixInput)) {
38
- out.narrixInput = narrixInput;
39
- }
40
32
  return out;
41
33
  }
42
34
  /**
@@ -49,10 +41,6 @@ export function extractRunTaskMetadataPassthrough(taskConfiguration) {
49
41
  return {};
50
42
  const m = taskConfiguration;
51
43
  const out = {};
52
- const narrixScope = m.narrixScope;
53
- if (narrixScope != null && typeof narrixScope === 'object' && !Array.isArray(narrixScope)) {
54
- out.narrixScope = narrixScope;
55
- }
56
44
  const aiScoping = m.aiScoping;
57
45
  if (Array.isArray(aiScoping)) {
58
46
  out.aiScoping = aiScoping;
@@ -162,16 +150,13 @@ export function buildAiTasksRunTaskRequest(args) {
162
150
  ...(args.executionMemory != null ? { executionMemory: args.executionMemory } : {}),
163
151
  ...(args.jobContext != null ? { jobContext: args.jobContext } : {}),
164
152
  ...(args.prevNodeId != null && args.prevNodeId !== '' ? { prevNodeId: args.prevNodeId } : {}),
165
- ...(args.narrix != null ? { narrix: args.narrix } : {}),
166
153
  ...(args.outputValidation != null ? { outputValidation: args.outputValidation } : {}),
167
154
  ...(args.diagnostics != null ? { diagnostics: args.diagnostics } : {}),
168
155
  ...(args.identity != null ? { identity: args.identity } : {}),
169
156
  ...(args.executionMode != null ? { executionMode: args.executionMode } : {}),
170
157
  ...(args.taskKind != null ? { taskKind: args.taskKind } : {}),
171
158
  ...(args.autoValidateDecisionOutput !== undefined ? { autoValidateDecisionOutput: args.autoValidateDecisionOutput } : {}),
172
- ...(args.narrixMode != null ? { narrixMode: args.narrixMode } : {}),
173
159
  ...(args.inputStrategyKey != null ? { inputStrategyKey: args.inputStrategyKey } : {}),
174
- ...(args.narrixInput != null ? { narrixInput: args.narrixInput } : {}),
175
160
  executionStrategies,
176
161
  ...(args.xynthesized != null ? { xynthesized: args.xynthesized } : {}),
177
162
  ...(smartInputForward != null ? { smartInput: smartInputForward } : {}),
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Builds the `RunTaskRequest.taskConfiguration` blob for `@exellix/ai-tasks` ≥ 7.7 compile-at-invoke.
3
- * Root-level fields already lifted by graph-engine are omitted; compile-only authoring (e.g.
4
- * `aiTaskStrategies`, `aiTaskProfile`) remains on the blob.
2
+ * Builds the `RunTaskRequest.taskConfiguration` blob for legacy compile-at-invoke (no `nodePlan`).
3
+ * With graphenix node plans, narrix / narrixMode / narrixInput / narrixScope live on
4
+ * `nodePlan.invokeContract.pipeline` instead see {@link patchNodePlanRuntimePipeline}.
5
5
  */
6
6
  /**
7
7
  * Subset of node `taskConfiguration` forwarded on `RunTaskRequest.taskConfiguration` for ai-tasks compile.