@exellix/graph-engine 8.0.1 → 8.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +1 -1
  3. package/dist/src/compile/authoringDocumentHelpers.d.ts +9 -0
  4. package/dist/src/compile/authoringDocumentHelpers.js +18 -0
  5. package/dist/src/compile/compileExellixExecutablePlan.d.ts +4 -5
  6. package/dist/src/compile/compileExellixExecutablePlan.js +67 -16
  7. package/dist/src/index.d.ts +2 -5
  8. package/dist/src/index.js +1 -3
  9. package/dist/src/runtime/ExellixGraphRuntime.d.ts +11 -37
  10. package/dist/src/runtime/ExellixGraphRuntime.js +77 -171
  11. package/dist/src/runtime/aiTasksStrategyPhases.js +7 -3
  12. package/dist/src/runtime/buildAiTasksRunTaskRequest.d.ts +6 -8
  13. package/dist/src/runtime/buildAiTasksRunTaskRequest.js +2 -7
  14. package/dist/src/runtime/executionMatrixHost.d.ts +5 -2
  15. package/dist/src/runtime/executionMatrixHost.js +4 -2
  16. package/dist/src/runtime/runTaskNodePlan.d.ts +15 -0
  17. package/dist/src/runtime/runTaskNodePlan.js +46 -0
  18. package/dist/src/runtime/studioGraphExecuteRequest.d.ts +5 -30
  19. package/dist/src/runtime/studioGraphExecuteRequest.js +14 -50
  20. package/dist/src/runtime/taskNodeRunTaskPreflight.d.ts +7 -5
  21. package/dist/src/runtime/taskNodeRunTaskPreflight.js +31 -26
  22. package/dist/testkit/authoringGraphFixtures.d.ts +8 -0
  23. package/dist/testkit/authoringGraphFixtures.js +249 -0
  24. package/dist/testkit/buildExecuteGraphInput.d.ts +3 -3
  25. package/dist/testkit/buildExecuteGraphInput.js +7 -3
  26. package/dist/testkit/flatGraphToAuthoring.d.ts +29 -0
  27. package/dist/testkit/flatGraphToAuthoring.js +281 -0
  28. package/dist/testkit/index.d.ts +3 -0
  29. package/dist/testkit/index.js +3 -0
  30. package/dist/testkit/modelAliasContractFixtures.d.ts +45 -0
  31. package/dist/testkit/modelAliasContractFixtures.js +41 -0
  32. package/dist/testkit/runTaskNodePlanAssertions.d.ts +34 -0
  33. package/dist/testkit/runTaskNodePlanAssertions.js +32 -0
  34. package/package.json +11 -11
  35. package/dist/src/runtime/graphResponseMigration.d.ts +0 -7
  36. package/dist/src/runtime/graphResponseMigration.js +0 -44
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.1.0
4
+
5
+ ### Breaking
6
+
7
+ - **`compileExellixExecutablePlan` input is `AuthoringGraphDocument` only** — removed `migrateLegacyGraphModelObjectToGraphenixExecutable` re-export and all legacy migration hooks. Compile = `validateAuthoringGraph` → `compileExecutablePlanV2` → `validateExecutablePlanV2`.
8
+ - **`buildGraphExecutionRequest` (matrix host)** now takes `{ doc: AuthoringGraphDocument, runtime }` instead of `{ model: GraphModelObject, runtime }`.
9
+ - Studio execute adapter delegates to `@x12i/graphenix-execute-envelope` ^1.1.0 (authoring graph on the wire).
10
+ - **`@exellix/ai-tasks` ^9.0.0 — nodePlan-only wire:** every outbound `runTask` requires frozen `nodePlan` (from compiled `plan.nodePlans` or runtime synthesis). When `nodePlan` is set, graph-engine **does not** send root `modelConfig`, `executionPipeline`, `taskConfiguration`, `includeContextInPrompt`, or `llmCall`. Model slots live on `nodePlan.executionUnits[].modelSelection`; ai-tasks runs PRE/MAIN/POST units inside a **single** `runTask` per task node (graph-engine no longer loops strategy phases on the hot path).
11
+ - **`buildTaskNodeRunTaskRequest` / preflight** mirror the execute path: synthesize or resolve `nodePlan`, pass `executionTrace`, forbid legacy wire fields.
12
+
13
+ ### Changed
14
+
15
+ - Dependency floor: `@x12i/graphenix-authoring-format` ^1.2.0 (canonical model-config module: `readGraphJobModelDefaults`, `mergeEffectiveModelConfig`, `normalizeNodeOverrideForPersist`, validators), `@x12i/graphenix-executable-format` ^2.1.3 (transitive `@x12i/graphenix-authoring-analysis` ^1.2.0); `@x12i/graphenix-plan-compiler`, `executable-contracts`, `execute-envelope`, `plan-format` remain ^1.1.0.
16
+ - Dependency: `@exellix/ai-tasks` ^9.0.0.
17
+ - **Compile host post-patches** (upstream gaps until CRS items land): `patchEntryGatesFromGraphEntryDataFilters` lifts `metadata.graphEntry.dataFilters` into `plan.deferredGates.entryGates`; `patchInvokeContractReadPathsForExecutionMemory` prefixes bare `invokeContract.reads` paths with `executionMemory.` when the root is not allowlisted.
18
+ - **Testkit:** `flatTestGraphToAuthoringDocument` bridges legacy flat test graphs to `AuthoringGraphDocument`; model-alias tests split for stable `tsx --test` execution.
19
+
20
+ ### Added
21
+
22
+ - **`runTaskNodePlan` helpers:** `resolveRunTaskNodePlan`, `patchNodePlanMainModelFromWire`, `nodePlanFromFinalizerPlan`.
23
+ - **Tests:** `compile-host-patches.test.ts`, split `model-alias-*` suites, `runTaskNodePlanAssertions` testkit helpers.
24
+
25
+ See [`BREAKING-CHANGES.md`](BREAKING-CHANGES.md) §8.1.0 (ai-tasks 9).
26
+
27
+ ## 8.0.2
28
+
29
+ ### Changed
30
+
31
+ - **No legacy compile fixups:** removed `preprocessLegacy` / `migrateLegacyGraphResponse`. `compileExellixExecutablePlan` runs `assertCanonicalGraphDocument` first; graphs must declare root `response` (fix in studio/CI, not at compile).
32
+
3
33
  ## 8.0.1
4
34
 
5
35
  ### Changed
package/README.md CHANGED
@@ -366,7 +366,7 @@ Example:
366
366
  }
367
367
  ```
368
368
 
369
- `metadata.graphExecution.outputMode`, finalizer output, and legacy `metadata.graphResponse.responseMapping` are not final-output selectors for new graphs. Migrate legacy response mappings by copying `missing` and `shape` to root `response` and dropping `version`, `target`, `primaryResponsePaths`, `debugResponsePaths`, `notableExecutionPaths`, and `mappingPreset`.
369
+ `metadata.graphExecution.outputMode`, finalizer output, and `metadata.graphResponse.responseMapping` are not final-output selectors. Graphs must declare root `graph.response` at persist time; graph-engine does not hoist or migrate legacy response sidecars at compile.
370
370
 
371
371
  `coreObjective` is resolved once from graph/run context, not from each node response. Supported `sourcePath` roots are `input.*`, `execution.*`, `variables.*` / `jobVariables.*`, `taskVariables.*`, `jobMemory.*`, `taskMemory.*`, and `job.*`.
372
372
 
@@ -0,0 +1,9 @@
1
+ import type { AuthoringGraphDocument } from '@x12i/graphenix-executable-contracts';
2
+ import type { GraphEntryContract } from '../types/refs.js';
3
+ /**
4
+ * Reads Layer 01 contract from a Graphenix 2.x {@link AuthoringGraphDocument}
5
+ * (`graph.metadata.graphEntry`). Host catalog loaders return this shape from studio.
6
+ */
7
+ export declare function resolveGraphEntryFromAuthoringDocument(doc: AuthoringGraphDocument): GraphEntryContract | undefined;
8
+ /** Canonical id on an authoring document (matrix claim `graphId` must match this). */
9
+ export declare function authoringDocumentGraphId(doc: AuthoringGraphDocument): string;
@@ -0,0 +1,18 @@
1
+ function isPlainRecord(v) {
2
+ return v != null && typeof v === 'object' && !Array.isArray(v);
3
+ }
4
+ /**
5
+ * Reads Layer 01 contract from a Graphenix 2.x {@link AuthoringGraphDocument}
6
+ * (`graph.metadata.graphEntry`). Host catalog loaders return this shape from studio.
7
+ */
8
+ export function resolveGraphEntryFromAuthoringDocument(doc) {
9
+ const meta = doc.graph?.metadata;
10
+ if (!isPlainRecord(meta))
11
+ return undefined;
12
+ const graphEntry = meta.graphEntry;
13
+ return isPlainRecord(graphEntry) ? graphEntry : undefined;
14
+ }
15
+ /** Canonical id on an authoring document (matrix claim `graphId` must match this). */
16
+ export function authoringDocumentGraphId(doc) {
17
+ return doc.id;
18
+ }
@@ -1,9 +1,8 @@
1
- import type { CompileExecutablePlanV2Options, ExecutableGraphPlanV2 } from '@x12i/graphenix-executable-contracts';
2
- import type { Graph, GraphModelObject } from '../types/refs.js';
1
+ import type { AuthoringGraphDocument, CompileExecutablePlanV2Options, ExecutableGraphPlanV2 } from '@x12i/graphenix-executable-contracts';
3
2
  import type { GraphRuntimeObject } from '../runtime/ExellixGraphRuntime.js';
4
3
  export type CompileExellixExecutablePlanOptions = CompileExecutablePlanV2Options;
5
4
  /**
6
- * Host/test helper: exellix {@link GraphModelObject} + runtime → validated v2 executable plan.
7
- * Migration and plan compilation live in `@x12i/graphenix-*`; graph-engine does not duplicate format logic.
5
+ * Host/test helper: canonical {@link AuthoringGraphDocument} + runtime → validated v2 executable plan.
6
+ * No legacy migration graphs must already be Graphenix 2.x authoring shape.
8
7
  */
9
- export declare function compileExellixExecutablePlan(model: Graph | GraphModelObject, runtime: GraphRuntimeObject, options?: CompileExellixExecutablePlanOptions): ExecutableGraphPlanV2;
8
+ export declare function compileExellixExecutablePlan(doc: AuthoringGraphDocument, runtime: GraphRuntimeObject, options?: CompileExellixExecutablePlanOptions): ExecutableGraphPlanV2;
@@ -1,23 +1,74 @@
1
- import { migrateLegacyGraphModelObjectToGraphenixExecutable, } from '@x12i/graphenix-authoring-format';
1
+ import { validateAuthoringGraph } from '@x12i/graphenix-authoring-format';
2
2
  import { compileExecutablePlanV2 } from '@x12i/graphenix-plan-compiler';
3
- import { validateExecutablePlan } from '@x12i/graphenix-plan-format';
3
+ import { validateExecutablePlanV2 } from '@x12i/graphenix-plan-format';
4
+ import { resolveGraphEntryFromAuthoringDocument } from './authoringDocumentHelpers.js';
4
5
  import { EXELLIX_STRUCTURED_DATA_FILTERS_V1 } from '../types/refs.js';
5
- import { migrateLegacyGraphResponse } from '../runtime/graphResponseMigration.js';
6
- /** Exellix host hooks passed into upstream {@link migrateLegacyGraphModelObjectToGraphenixExecutable}. */
7
- const EXELLIX_LEGACY_MIGRATE_OPTIONS = {
8
- preprocessLegacy: (legacy) => migrateLegacyGraphResponse(legacy).graph,
9
- structuredDataFiltersVersion: EXELLIX_STRUCTURED_DATA_FILTERS_V1,
10
- };
6
+ function patchEntryGatesFromGraphEntryDataFilters(plan, doc) {
7
+ const graphEntry = resolveGraphEntryFromAuthoringDocument(doc);
8
+ const dataFilters = graphEntry?.dataFilters;
9
+ if (dataFilters == null ||
10
+ typeof dataFilters !== 'object' ||
11
+ Array.isArray(dataFilters) ||
12
+ dataFilters.version !== EXELLIX_STRUCTURED_DATA_FILTERS_V1) {
13
+ return plan;
14
+ }
15
+ const when = dataFilters.when;
16
+ if (when == null || typeof when !== 'object')
17
+ return plan;
18
+ const next = structuredClone(plan);
19
+ const entryGates = [...(next.deferredGates.entryGates ?? [])];
20
+ entryGates.push({
21
+ gateId: 'graph-entry:structured-data-filters',
22
+ condition: { condition: when, parameters: {} },
23
+ sourcePath: 'metadata.graphEntry.dataFilters',
24
+ });
25
+ next.deferredGates = { ...next.deferredGates, entryGates };
26
+ return next;
27
+ }
28
+ function patchInvokeContractReadPathsForExecutionMemory(plan) {
29
+ const allowedRoots = new Set([
30
+ 'executionMemory',
31
+ 'input',
32
+ 'inputs',
33
+ 'jobMemory',
34
+ 'taskMemory',
35
+ 'smartInput',
36
+ 'xynthesized',
37
+ 'runtime',
38
+ 'response',
39
+ ]);
40
+ const next = structuredClone(plan);
41
+ for (const nodePlan of Object.values(next.nodePlans ?? {})) {
42
+ if (!nodePlan?.executionUnits)
43
+ continue;
44
+ for (const unit of nodePlan.executionUnits) {
45
+ const contract = unit.invokeContract;
46
+ if (!contract || !Array.isArray(contract.reads))
47
+ continue;
48
+ contract.reads = contract.reads.map((readPath) => {
49
+ if (typeof readPath !== 'string')
50
+ return readPath;
51
+ const root = readPath.split('.')[0];
52
+ return allowedRoots.has(root) ? readPath : `executionMemory.${readPath}`;
53
+ });
54
+ }
55
+ }
56
+ return next;
57
+ }
11
58
  /**
12
- * Host/test helper: exellix {@link GraphModelObject} + runtime → validated v2 executable plan.
13
- * Migration and plan compilation live in `@x12i/graphenix-*`; graph-engine does not duplicate format logic.
59
+ * Host/test helper: canonical {@link AuthoringGraphDocument} + runtime → validated v2 executable plan.
60
+ * No legacy migration graphs must already be Graphenix 2.x authoring shape.
14
61
  */
15
- export function compileExellixExecutablePlan(model, runtime, options) {
16
- const authoring = migrateLegacyGraphModelObjectToGraphenixExecutable(model, EXELLIX_LEGACY_MIGRATE_OPTIONS);
17
- const plan = compileExecutablePlanV2(authoring, runtime, options);
18
- const validation = validateExecutablePlan(plan);
19
- if (!validation.valid) {
20
- const summary = validation.errors.map((e) => `${e.path}: ${e.message}`).join('; ');
62
+ export function compileExellixExecutablePlan(doc, runtime, options) {
63
+ const authoringValidation = validateAuthoringGraph(doc);
64
+ if (!authoringValidation.valid) {
65
+ const summary = authoringValidation.errors.map((e) => `${e.path}: ${e.message}`).join('; ');
66
+ throw new Error(`compileExellixExecutablePlan: invalid authoring graph: ${summary}`);
67
+ }
68
+ const plan = patchInvokeContractReadPathsForExecutionMemory(patchEntryGatesFromGraphEntryDataFilters(compileExecutablePlanV2(doc, runtime, options), doc));
69
+ const planValidation = validateExecutablePlanV2(plan);
70
+ if (!planValidation.valid) {
71
+ const summary = planValidation.errors.map((e) => `${e.path}: ${e.message}`).join('; ');
21
72
  throw new Error(`compileExellixExecutablePlan: invalid plan: ${summary}`);
22
73
  }
23
74
  return plan;
@@ -62,7 +62,7 @@ export { collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, }
62
62
  export type { AiTasksNodeExtensionIssue } from './inspection/validateAiTasksNodeExtensions.js';
63
63
  export type { EvaluateStructuredDataFiltersResult, EvaluateStructuredDataFiltersOptions, } from './runtime/dataFiltersEvaluation.js';
64
64
  /** Execution-matrix host: resolve graph entry, seed execution, stable job ids, runtime binder. */
65
- export { resolveGraphEntryFromGraph, createResolveGraphEntryFromLoader, buildExecutionSeedFromGraphEntry, validateExecutionSeedPaths, buildStableMatrixJobId, buildMatrixJobForGraphRun, buildGraphExecutionRequest, isExecuteGraphResultFailed, createMatrixHostGraphExecutor, } from './runtime/executionMatrixHost.js';
65
+ export { resolveGraphEntryFromGraph, resolveGraphEntryFromAuthoringDocument, authoringDocumentGraphId, createResolveGraphEntryFromLoader, buildExecutionSeedFromGraphEntry, validateExecutionSeedPaths, buildStableMatrixJobId, buildMatrixJobForGraphRun, buildGraphExecutionRequest, isExecuteGraphResultFailed, createMatrixHostGraphExecutor, } from './runtime/executionMatrixHost.js';
66
66
  export type { BuildExecutionSeedSources, BuildExecutionSeedResult } from './runtime/executionMatrixHost.js';
67
67
  export { assertHostJobId, newGraphRunTaskId } from './runtime/graphRunIdentity.js';
68
68
  export { buildAiTasksRunTaskRequest, extractRunTaskMetadataPassthrough, extractRunTaskStrategyOverrides, resolveJobTypeId, resolveTaskTypeId, } from './runtime/buildAiTasksRunTaskRequest.js';
@@ -86,15 +86,12 @@ export type { GraphStudioDocument } from './runtime/graphModelStudioSeparation.j
86
86
  export { STUDIO_GRAPH_EXECUTE_REMOVED_KEYS, getStudioGraphExecuteRemovedKeyViolations, assertCanonicalStudioGraphExecuteRequest, buildGraphExecutionRequestFromStudioExecute, } from './runtime/studioGraphExecuteRequest.js';
87
87
  export type { StudioGraphExecuteRemovedKey, StudioGraphExecuteRequest, BuildGraphExecutionRequestFromStudioExecuteOptions, } from './runtime/studioGraphExecuteRequest.js';
88
88
  export { computeGraphDocumentContentSha256, stableStringifyGraphDocument, } from './runtime/graphDocumentFingerprint.js';
89
- export { migrateLegacyGraphResponse, migrateLegacyGraphResponseDefinition, } from './runtime/graphResponseMigration.js';
90
- export type { MigrateGraphResponseResult } from './runtime/graphResponseMigration.js';
91
89
  export { applyAiTaskProfileWebScopingToNarrix, mapAiTaskProfileQuestionsToWebScopeQuestions, } from './runtime/applyAiTaskProfileWebScopingToNarrix.js';
92
90
  export { createExellixGraphRuntime } from './runtime/ExellixGraphRuntime.js';
93
91
  export type { ExecutableGraphPlanV2, NodeExecutionPlan, ExecutionUnitPlanV2, } from '@x12i/graphenix-executable-contracts';
92
+ export type { AuthoringGraphDocument } from '@x12i/graphenix-executable-contracts';
94
93
  export { compileExellixExecutablePlan } from './compile/compileExellixExecutablePlan.js';
95
94
  export type { CompileExellixExecutablePlanOptions } from './compile/compileExellixExecutablePlan.js';
96
- export { migrateLegacyGraphModelObjectToGraphenixExecutable, } from '@x12i/graphenix-authoring-format';
97
- export type { LegacyGraphModelObject, MigrateLegacyGraphModelOptions, } from '@x12i/graphenix-authoring-format';
98
95
  export { buildGraphExecutionRequestFromStudioExecute as buildAuthoringStudioGraphExecutionRequest } from '@x12i/graphenix-execute-envelope';
99
96
  export type { RunTaskRequest, RunTaskResponse, TasksClientLike, GraphLoader as RuntimeGraphLoader, ExecuteGraphInput, GraphExecutionRequest, GraphRuntimeObject, GraphKnowledgeResolver, GraphKnowledgeResolverContext, ExecuteGraphResult, ExellixGraphRuntimeOptions, } from './runtime/ExellixGraphRuntime.js';
100
97
  export type { PlanStatus, GraphPlan, GraphEngine, GraphEngineFactory, } from './runtime/GraphEngine.js';
package/dist/src/index.js CHANGED
@@ -48,7 +48,7 @@ export { resolveCanonicalModelUsed } from './runtime/canonicalModelUsed.js';
48
48
  export { buildAiTasksObservabilityRecord } from './runtime/aiTasksObservability.js';
49
49
  export { collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, } from './inspection/validateAiTasksNodeExtensions.js';
50
50
  /** Execution-matrix host: resolve graph entry, seed execution, stable job ids, runtime binder. */
51
- export { resolveGraphEntryFromGraph, createResolveGraphEntryFromLoader, buildExecutionSeedFromGraphEntry, validateExecutionSeedPaths, buildStableMatrixJobId, buildMatrixJobForGraphRun, buildGraphExecutionRequest, isExecuteGraphResultFailed, createMatrixHostGraphExecutor, } from './runtime/executionMatrixHost.js';
51
+ export { resolveGraphEntryFromGraph, resolveGraphEntryFromAuthoringDocument, authoringDocumentGraphId, createResolveGraphEntryFromLoader, buildExecutionSeedFromGraphEntry, validateExecutionSeedPaths, buildStableMatrixJobId, buildMatrixJobForGraphRun, buildGraphExecutionRequest, isExecuteGraphResultFailed, createMatrixHostGraphExecutor, } from './runtime/executionMatrixHost.js';
52
52
  export { assertHostJobId, newGraphRunTaskId } from './runtime/graphRunIdentity.js';
53
53
  export { buildAiTasksRunTaskRequest, extractRunTaskMetadataPassthrough, extractRunTaskStrategyOverrides, resolveJobTypeId, resolveTaskTypeId, } from './runtime/buildAiTasksRunTaskRequest.js';
54
54
  export { buildTaskNodeJobContext } from './runtime/buildTaskNodeJobContext.js';
@@ -63,12 +63,10 @@ export { assertCanonicalGraphRuntimeObject } from './runtime/validateCanonicalGr
63
63
  export { GRAPH_ENTRY_STUDIO_ONLY_KEYS, GRAPH_METADATA_STUDIO_ONLY_KEYS, stripGraphModelStudioFields, primaryRuntimeInputFromStudioDocument, getGraphEntryStudioOnlyKeyViolations, getGraphMetadataStudioOnlyKeyViolations, getGraphEntryEmptyInputPathViolations, } from './runtime/graphModelStudioSeparation.js';
64
64
  export { STUDIO_GRAPH_EXECUTE_REMOVED_KEYS, getStudioGraphExecuteRemovedKeyViolations, assertCanonicalStudioGraphExecuteRequest, buildGraphExecutionRequestFromStudioExecute, } from './runtime/studioGraphExecuteRequest.js';
65
65
  export { computeGraphDocumentContentSha256, stableStringifyGraphDocument, } from './runtime/graphDocumentFingerprint.js';
66
- export { migrateLegacyGraphResponse, migrateLegacyGraphResponseDefinition, } from './runtime/graphResponseMigration.js';
67
66
  export { applyAiTaskProfileWebScopingToNarrix, mapAiTaskProfileQuestionsToWebScopeQuestions, } from './runtime/applyAiTaskProfileWebScopingToNarrix.js';
68
67
  // New runtime with injection seam
69
68
  export { createExellixGraphRuntime } from './runtime/ExellixGraphRuntime.js';
70
69
  export { compileExellixExecutablePlan } from './compile/compileExellixExecutablePlan.js';
71
- export { migrateLegacyGraphModelObjectToGraphenixExecutable, } from '@x12i/graphenix-authoring-format';
72
70
  export { buildGraphExecutionRequestFromStudioExecute as buildAuthoringStudioGraphExecutionRequest } from '@x12i/graphenix-execute-envelope';
73
71
  // Testkit (in-memory loader, dep engine, recording client — sample NARRIX tasks: `@exellix/graph-engine/testkit`)
74
72
  export { InMemoryGraphLoader, DepGraphEngineFactory } from '../testkit/index.js';
@@ -1,6 +1,5 @@
1
1
  import type { GraphEngineFactory } from "./GraphEngine.js";
2
- import type { ExecutionStep } from "@exellix/ai-tasks";
3
- import type { ExecutableGraphPlanV2, GraphExecutionTrace } from "@x12i/graphenix-executable-contracts";
2
+ import type { ExecutableGraphPlanV2, FinalizerExecutionPlan, GraphExecutionTrace, NodeExecutionPlan } from "@x12i/graphenix-executable-contracts";
4
3
  import type { Graph, GraphModelObject, GraphNode, GraphAiModelConfig, TaskNodeRuntimeObject } from "../types/refs.js";
5
4
  import type { RunLogEntry } from "../types/runLog.js";
6
5
  import type { RunTaskDiagnostics } from "../types/options.js";
@@ -10,38 +9,7 @@ import type { CreateRunxOptions, RunxClient } from "@x12i/runx";
10
9
  import { type EventEmitter } from "./events.js";
11
10
  import type { NodeTraceEntry } from "../types/results.js";
12
11
  import type { ExecuteGraphStepResponse } from "../types/results.js";
13
- export type RunTaskRequest = {
14
- skillKey: string;
15
- /** Execution pipeline (pre → main → post). When omitted, defaults to [{ phase: "main", type: "direct" }]. */
16
- executionPipeline?: ExecutionStep[];
17
- /** When true, task receives synthesized/context in prompt (e.g. for synthesized-context PRE step). */
18
- includeContextInPrompt?: boolean;
19
- input?: any;
20
- variables?: Record<string, any>;
21
- jobMemory?: any;
22
- taskMemory?: any;
23
- executionMemory?: any;
24
- prevNodeId?: string;
25
- jobId?: string;
26
- taskId?: string;
27
- agentId?: string;
28
- skillId?: string;
29
- masterSkillId?: string;
30
- masterSkillActivityId?: string;
31
- jobContext?: any;
32
- modelConfig?: GraphAiModelConfig;
33
- outputValidation?: {
34
- schema: Record<string, unknown>;
35
- mode?: "fail" | "warn";
36
- validateWhenMissing?: boolean;
37
- };
38
- diagnostics?: RunTaskDiagnostics;
39
- llmCall?: Record<string, unknown>;
40
- identity?: Record<string, unknown>;
41
- executionMode?: "default" | "trace";
42
- taskKind?: "decision" | "utility" | "content";
43
- autoValidateDecisionOutput?: boolean;
44
- };
12
+ export type RunTaskRequest = import("@exellix/ai-tasks").RunTaskRequest;
45
13
  export type RunTaskResponse = {
46
14
  ok: boolean;
47
15
  rawContent?: string;
@@ -203,8 +171,14 @@ export declare function createExellixGraphRuntime(opts: ExellixGraphRuntimeOptio
203
171
  /** Per-node task-scope overrides → `executionMemory.taskVariables`. */
204
172
  taskVariables?: Record<string, unknown>;
205
173
  prevNodeId?: string;
206
- /** Resolved graph model profiles; omitted when {@link graph} is supplied (resolved from the model document). */
174
+ /** Resolved model profiles from frozen plan slots; required when {@link nodePlan} is omitted. */
207
175
  modelConfig?: GraphAiModelConfig;
176
+ /** Frozen per-node plan from {@link compileExecutablePlanV2}; drives executionUnits on the executeGraph path. */
177
+ nodePlan?: NodeExecutionPlan;
178
+ /** Frozen finalizer plan slice when executing a synthesize finalizer utility invoke. */
179
+ finalizerPlan?: FinalizerExecutionPlan;
180
+ /** Graphenix v2 trace handle forwarded to ai-tasks node executor. */
181
+ executionTrace?: GraphExecutionTrace;
208
182
  /** Same UUID for every `runTask` in this `executeGraph` invocation; omitted → new UUID per direct `executeNode` call. */
209
183
  graphRunTaskId?: string;
210
184
  runTaskIdentity?: Record<string, unknown>;
@@ -214,7 +188,7 @@ export declare function createExellixGraphRuntime(opts: ExellixGraphRuntimeOptio
214
188
  jobKnowledgePatch?: Record<string, unknown>;
215
189
  /** Resolved per-node taskKnowledge, applied only to outbound RunTaskRequest.taskMemory. */
216
190
  taskKnowledgePatch?: Record<string, unknown>;
217
- /** Graph-run default pipeline; node / `execution.executionPipeline` override per executeNode rules. */
191
+ /** @deprecated ai-tasks 9 executes {@link nodePlan.executionUnits}; graph-engine does not forward a pipeline. */
218
192
  graphExecutionPipeline?: ExecutionStepOption[];
219
193
  skillKeyResolution?: SkillKeyResolutionOptions;
220
194
  nodeTimeoutMs?: number;
@@ -256,6 +230,6 @@ export declare function createExellixGraphRuntime(opts: ExellixGraphRuntimeOptio
256
230
  };
257
231
  execution: any;
258
232
  outputsMemory: Record<string, unknown>;
259
- request: RunTaskRequest;
233
+ request: import("@exellix/ai-tasks").RunTaskRequest;
260
234
  }>;
261
235
  };