@exellix/graph-engine 8.0.0 → 8.1.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.
- package/CHANGELOG.md +27 -1
- package/README.md +11 -12
- package/dist/src/compile/authoringDocumentHelpers.d.ts +9 -0
- package/dist/src/compile/authoringDocumentHelpers.js +18 -0
- package/dist/src/compile/compileExellixExecutablePlan.d.ts +8 -0
- package/dist/src/compile/compileExellixExecutablePlan.js +75 -0
- package/dist/src/index.d.ts +4 -6
- package/dist/src/index.js +2 -4
- package/dist/src/runtime/ExellixGraphRuntime.d.ts +11 -37
- package/dist/src/runtime/ExellixGraphRuntime.js +78 -173
- package/dist/src/runtime/aiTasksStrategyPhases.js +7 -3
- package/dist/src/runtime/buildAiTasksRunTaskRequest.d.ts +6 -8
- package/dist/src/runtime/buildAiTasksRunTaskRequest.js +2 -7
- package/dist/src/runtime/executionMatrixHost.d.ts +6 -3
- package/dist/src/runtime/executionMatrixHost.js +6 -4
- package/dist/src/runtime/runTaskNodePlan.d.ts +15 -0
- package/dist/src/runtime/runTaskNodePlan.js +46 -0
- package/dist/src/runtime/studioGraphExecuteRequest.d.ts +5 -30
- package/dist/src/runtime/studioGraphExecuteRequest.js +14 -50
- package/dist/src/runtime/taskNodeRunTaskPreflight.d.ts +7 -5
- package/dist/src/runtime/taskNodeRunTaskPreflight.js +31 -26
- package/dist/src/types/refs.d.ts +1 -1
- package/dist/testkit/authoringGraphFixtures.d.ts +8 -0
- package/dist/testkit/authoringGraphFixtures.js +249 -0
- package/dist/testkit/buildExecuteGraphInput.d.ts +3 -3
- package/dist/testkit/buildExecuteGraphInput.js +8 -4
- package/dist/testkit/flatGraphToAuthoring.d.ts +29 -0
- package/dist/testkit/flatGraphToAuthoring.js +281 -0
- package/dist/testkit/index.d.ts +3 -0
- package/dist/testkit/index.js +3 -0
- package/dist/testkit/runTaskNodePlanAssertions.d.ts +34 -0
- package/dist/testkit/runTaskNodePlanAssertions.js +32 -0
- package/package.json +8 -7
- package/dist/src/adapters/compileExellixExecutablePlan.d.ts +0 -8
- package/dist/src/adapters/compileExellixExecutablePlan.js +0 -18
- package/dist/src/adapters/migrateExellixGraphModelToAuthoring.d.ts +0 -6
- package/dist/src/adapters/migrateExellixGraphModelToAuthoring.js +0 -273
- package/dist/src/adapters/patchFinalizerPlans.d.ts +0 -7
- package/dist/src/adapters/patchFinalizerPlans.js +0 -63
- package/dist/src/runtime/graphResponseMigration.d.ts +0 -7
- package/dist/src/runtime/graphResponseMigration.js +0 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
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
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Dependency floor: `@x12i/graphenix-*` ^1.1.0 for authoring-format, plan-compiler, executable-contracts, execute-envelope, plan-format.
|
|
14
|
+
|
|
15
|
+
## 8.0.2
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **No legacy compile fixups:** removed `preprocessLegacy` / `migrateLegacyGraphResponse`. `compileExellixExecutablePlan` runs `assertCanonicalGraphDocument` first; graphs must declare root `response` (fix in studio/CI, not at compile).
|
|
20
|
+
|
|
21
|
+
## 8.0.1
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- **Zero local compile workarounds:** removed local migration/finalizer patches; `compileExellixExecutablePlan` uses `@x12i/graphenix-authoring-format` ≥1.0.2 and `@x12i/graphenix-plan-compiler` ≥1.0.1 only.
|
|
26
|
+
- Re-export `migrateLegacyGraphModelObjectToGraphenixExecutable` from authoring-format (upstream name; no exellix alias).
|
|
27
|
+
- **Docs / layout:** compile helper lives under `src/compile/`; execute path no longer runs response migration (compile-only).
|
|
28
|
+
|
|
3
29
|
## 8.0.0
|
|
4
30
|
|
|
5
31
|
### Breaking
|
|
@@ -11,7 +37,7 @@
|
|
|
11
37
|
### Added
|
|
12
38
|
|
|
13
39
|
- **`@x12i/graphenix-*` integration:** plan validation, deferred gates, trace events (`ExecuteGraphResult.trace`), and exports for `ExecutableGraphPlanV2`.
|
|
14
|
-
- **`compileExellixExecutablePlan`**, **`
|
|
40
|
+
- **`compileExellixExecutablePlan`**, **`migrateLegacyGraphModelObjectToGraphenixExecutable`** (re-export from `@x12i/graphenix-authoring-format`) — host compile helpers for legacy exellix `GraphModelObject`.
|
|
15
41
|
- **`buildAuthoringStudioGraphExecutionRequest`** re-export from `@x12i/graphenix-execute-envelope`.
|
|
16
42
|
|
|
17
43
|
See [`BREAKING-CHANGES.md`](BREAKING-CHANGES.md) §8.0.0.
|
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ The **`runTask`** wire contract (identity, canonical **`input`**, optional extra
|
|
|
43
43
|
|
|
44
44
|
An executable graph model object may have **only** these **top-level** keys: `id`, `version`, `modelConfig`, `jobKnowledge`, `nodes`, `edges`, `variables`, `response`, `metadata`. The required root **`response`** is the single executable final response contract used to build `ExecuteGraphResult.finalOutput`. Document-model and authoring fields (`name`, `description`, `exellixContractTarget`, `graphExecution`, `graphEntry`, `catalogRequests`, and similar) belong **under `metadata`** only. Node-scoped `taskKnowledge` belongs under each task node, not at the model root. Runtime state (`input`, `jobMemory`, `taskMemory`, `executionMemory`, `outputsMemory`, per-run options) belongs under the execution request’s **`runtime`** object and is rejected on the model. **`runtime.modelConfig`**, **`runtime.aliasConfig`**, and **`runtime.nodes[id].modelConfig`** were removed in **7.7** — model profiles belong on the graph document only.
|
|
45
45
|
|
|
46
|
-
`metadata.graphExecution` can document graph execution defaults and labels, including `mode: 'forward' | 'backward' | 'hybrid'`, optional `goalNodeId`, optional `dimension`, `outputMode: 'mappedAggregation' | 'lastExitNode'`, `coreObjective`, optional `nodesResponses`, and metadata-only `flowOutline: 'linearSequence' | 'convergingParallelFlow'`. Planner mode
|
|
46
|
+
`metadata.graphExecution` can document graph execution defaults and labels, including `mode: 'forward' | 'backward' | 'hybrid'`, optional `goalNodeId`, optional `dimension`, `outputMode: 'mappedAggregation' | 'lastExitNode'`, `coreObjective`, optional `nodesResponses`, and metadata-only `flowOutline: 'linearSequence' | 'convergingParallelFlow'`. Planner mode comes from `plan.schedulingPolicy.mode` or `runtime.mode`; `outputMode` does not decide the returned `finalOutput`.
|
|
47
47
|
|
|
48
48
|
Enforcement: `executeGraph`, `createExellixGraphRuntime().executeGraph`, `executeNode` when a graph is passed in context, `inspectGraph`, `inspectGraphContracts`, `validateCatalogPlanning`, and Catalox graph validators call this check. Failures throw `ExellixGraphError` with code `NON_CANONICAL_GRAPH_DOCUMENT`. For CI or custom loaders, call **`assertCanonicalGraphDocument`** (exported from the package root) on parsed JSON before execution. **`loadGraph`** returns whatever the loader parsed; validation runs when you execute or inspect, not necessarily on load.
|
|
49
49
|
|
|
@@ -57,7 +57,7 @@ npm install @exellix/graph-engine
|
|
|
57
57
|
|
|
58
58
|
### Execution matrix hosts (`@exellix/exellix-runtime`) — documentation only for the engine
|
|
59
59
|
|
|
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`, resolve **`metadata.graphEntry` per model**, seed **`runtime.executionMemory`**, and pass **`runtime.jobId
|
|
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
|
|
|
62
62
|
### Configuration (`.env`)
|
|
63
63
|
|
|
@@ -213,10 +213,11 @@ interface ExecuteGraphResult {
|
|
|
213
213
|
runLogOmittedCount?: number;
|
|
214
214
|
logxerCorrelationId?: string;
|
|
215
215
|
debug?: { nodes: NodeTraceEntry[] }; // populated only when debugMode: true
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
planAudit?: {
|
|
217
|
+
planHash: string;
|
|
218
|
+
source: string;
|
|
219
219
|
};
|
|
220
|
+
trace?: unknown;
|
|
220
221
|
}
|
|
221
222
|
```
|
|
222
223
|
|
|
@@ -237,13 +238,11 @@ const runtime = createExellixGraphRuntime({
|
|
|
237
238
|
playgroundReporter,
|
|
238
239
|
});
|
|
239
240
|
|
|
241
|
+
const plan = compileExellixExecutablePlan(graphModel, graphRuntime);
|
|
242
|
+
|
|
240
243
|
await runtime.executeGraph({
|
|
241
|
-
|
|
242
|
-
runtime:
|
|
243
|
-
jobId: 'job-123',
|
|
244
|
-
job,
|
|
245
|
-
input,
|
|
246
|
-
},
|
|
244
|
+
plan,
|
|
245
|
+
runtime: graphRuntime,
|
|
247
246
|
});
|
|
248
247
|
|
|
249
248
|
// Inspect full node request/response payloads in memory.
|
|
@@ -367,7 +366,7 @@ Example:
|
|
|
367
366
|
}
|
|
368
367
|
```
|
|
369
368
|
|
|
370
|
-
`metadata.graphExecution.outputMode`, finalizer output, and
|
|
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.
|
|
371
370
|
|
|
372
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.*`.
|
|
373
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
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AuthoringGraphDocument, CompileExecutablePlanV2Options, ExecutableGraphPlanV2 } from '@x12i/graphenix-executable-contracts';
|
|
2
|
+
import type { GraphRuntimeObject } from '../runtime/ExellixGraphRuntime.js';
|
|
3
|
+
export type CompileExellixExecutablePlanOptions = CompileExecutablePlanV2Options;
|
|
4
|
+
/**
|
|
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.
|
|
7
|
+
*/
|
|
8
|
+
export declare function compileExellixExecutablePlan(doc: AuthoringGraphDocument, runtime: GraphRuntimeObject, options?: CompileExellixExecutablePlanOptions): ExecutableGraphPlanV2;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { validateAuthoringGraph } from '@x12i/graphenix-authoring-format';
|
|
2
|
+
import { compileExecutablePlanV2 } from '@x12i/graphenix-plan-compiler';
|
|
3
|
+
import { validateExecutablePlanV2 } from '@x12i/graphenix-plan-format';
|
|
4
|
+
import { resolveGraphEntryFromAuthoringDocument } from './authoringDocumentHelpers.js';
|
|
5
|
+
import { EXELLIX_STRUCTURED_DATA_FILTERS_V1 } from '../types/refs.js';
|
|
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
|
+
}
|
|
58
|
+
/**
|
|
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.
|
|
61
|
+
*/
|
|
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('; ');
|
|
72
|
+
throw new Error(`compileExellixExecutablePlan: invalid plan: ${summary}`);
|
|
73
|
+
}
|
|
74
|
+
return plan;
|
|
75
|
+
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -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,14 +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';
|
|
94
|
-
export {
|
|
95
|
-
export
|
|
96
|
-
export {
|
|
92
|
+
export type { AuthoringGraphDocument } from '@x12i/graphenix-executable-contracts';
|
|
93
|
+
export { compileExellixExecutablePlan } from './compile/compileExellixExecutablePlan.js';
|
|
94
|
+
export type { CompileExellixExecutablePlanOptions } from './compile/compileExellixExecutablePlan.js';
|
|
97
95
|
export { buildGraphExecutionRequestFromStudioExecute as buildAuthoringStudioGraphExecutionRequest } from '@x12i/graphenix-execute-envelope';
|
|
98
96
|
export type { RunTaskRequest, RunTaskResponse, TasksClientLike, GraphLoader as RuntimeGraphLoader, ExecuteGraphInput, GraphExecutionRequest, GraphRuntimeObject, GraphKnowledgeResolver, GraphKnowledgeResolverContext, ExecuteGraphResult, ExellixGraphRuntimeOptions, } from './runtime/ExellixGraphRuntime.js';
|
|
99
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
|
-
export { compileExellixExecutablePlan } from './
|
|
71
|
-
export { migrateExellixGraphModelToAuthoring } from './adapters/migrateExellixGraphModelToAuthoring.js';
|
|
69
|
+
export { compileExellixExecutablePlan } from './compile/compileExellixExecutablePlan.js';
|
|
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 {
|
|
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
|
|
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
|
-
/**
|
|
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
|
};
|