@exellix/graph-engine 6.0.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 (202) hide show
  1. package/.env.example +3 -0
  2. package/CHANGELOG.md +208 -0
  3. package/README.md +827 -0
  4. package/dist/src/errors/ExellixGraphError.d.ts +38 -0
  5. package/dist/src/errors/ExellixGraphError.js +21 -0
  6. package/dist/src/errors/exellixGraphErrorCodes.d.ts +31 -0
  7. package/dist/src/errors/exellixGraphErrorCodes.js +32 -0
  8. package/dist/src/index.d.ts +100 -0
  9. package/dist/src/index.js +75 -0
  10. package/dist/src/inspection/contractInspection.d.ts +21 -0
  11. package/dist/src/inspection/contractInspection.js +526 -0
  12. package/dist/src/inspection/contractTypes.d.ts +137 -0
  13. package/dist/src/inspection/contractTypes.js +1 -0
  14. package/dist/src/inspection/controlInspection.d.ts +22 -0
  15. package/dist/src/inspection/controlInspection.js +130 -0
  16. package/dist/src/inspection/graphInspection.d.ts +51 -0
  17. package/dist/src/inspection/graphInspection.js +467 -0
  18. package/dist/src/inspection/index.d.ts +21 -0
  19. package/dist/src/inspection/index.js +17 -0
  20. package/dist/src/inspection/nodeInspection.d.ts +42 -0
  21. package/dist/src/inspection/nodeInspection.js +474 -0
  22. package/dist/src/inspection/types.d.ts +321 -0
  23. package/dist/src/inspection/types.js +14 -0
  24. package/dist/src/inspection/validateAiTasksNodeExtensions.d.ts +12 -0
  25. package/dist/src/inspection/validateAiTasksNodeExtensions.js +119 -0
  26. package/dist/src/inspection/validateCatalogPlanning.d.ts +21 -0
  27. package/dist/src/inspection/validateCatalogPlanning.js +187 -0
  28. package/dist/src/integrations/ActivityTrackerIntegration.d.ts +86 -0
  29. package/dist/src/integrations/ActivityTrackerIntegration.js +134 -0
  30. package/dist/src/integrations/ActivixGraphRunIntegration.d.ts +34 -0
  31. package/dist/src/integrations/ActivixGraphRunIntegration.js +338 -0
  32. package/dist/src/integrations/ActivixNodeActivityIntegration.d.ts +33 -0
  33. package/dist/src/integrations/ActivixNodeActivityIntegration.js +220 -0
  34. package/dist/src/integrations/cataloxGraphCatalog.d.ts +21 -0
  35. package/dist/src/integrations/cataloxGraphCatalog.js +30 -0
  36. package/dist/src/integrations/createActivixExellixIntegration.d.ts +14 -0
  37. package/dist/src/integrations/createActivixExellixIntegration.js +16 -0
  38. package/dist/src/integrations/createActivixFromEnv.d.ts +31 -0
  39. package/dist/src/integrations/createActivixFromEnv.js +53 -0
  40. package/dist/src/loaders/FileGraphLoader.d.ts +23 -0
  41. package/dist/src/loaders/FileGraphLoader.js +31 -0
  42. package/dist/src/playground/PlaygroundReporter.d.ts +40 -0
  43. package/dist/src/playground/PlaygroundReporter.js +480 -0
  44. package/dist/src/playground/index.d.ts +1 -0
  45. package/dist/src/playground/index.js +1 -0
  46. package/dist/src/runtime/ExellixGraphRuntime.d.ts +263 -0
  47. package/dist/src/runtime/ExellixGraphRuntime.js +1716 -0
  48. package/dist/src/runtime/GraphEngine.d.ts +33 -0
  49. package/dist/src/runtime/GraphEngine.js +4 -0
  50. package/dist/src/runtime/aiTasksObservability.d.ts +6 -0
  51. package/dist/src/runtime/aiTasksObservability.js +37 -0
  52. package/dist/src/runtime/aiTasksStrategyPhases.d.ts +46 -0
  53. package/dist/src/runtime/aiTasksStrategyPhases.js +93 -0
  54. package/dist/src/runtime/applyAiTaskProfileWebScopingToNarrix.d.ts +17 -0
  55. package/dist/src/runtime/applyAiTaskProfileWebScopingToNarrix.js +46 -0
  56. package/dist/src/runtime/buildAiTasksRunTaskRequest.d.ts +67 -0
  57. package/dist/src/runtime/buildAiTasksRunTaskRequest.js +164 -0
  58. package/dist/src/runtime/buildRunLog.d.ts +27 -0
  59. package/dist/src/runtime/buildRunLog.js +234 -0
  60. package/dist/src/runtime/buildRunTaskTaskConfigurationForward.d.ts +9 -0
  61. package/dist/src/runtime/buildRunTaskTaskConfigurationForward.js +80 -0
  62. package/dist/src/runtime/buildTaskNodeJobContext.d.ts +11 -0
  63. package/dist/src/runtime/buildTaskNodeJobContext.js +30 -0
  64. package/dist/src/runtime/canonicalModelUsed.d.ts +6 -0
  65. package/dist/src/runtime/canonicalModelUsed.js +36 -0
  66. package/dist/src/runtime/contextualScope.d.ts +7 -0
  67. package/dist/src/runtime/contextualScope.js +121 -0
  68. package/dist/src/runtime/dataFiltersEvaluation.d.ts +60 -0
  69. package/dist/src/runtime/dataFiltersEvaluation.js +169 -0
  70. package/dist/src/runtime/deepMerge.d.ts +5 -0
  71. package/dist/src/runtime/deepMerge.js +22 -0
  72. package/dist/src/runtime/events.d.ts +92 -0
  73. package/dist/src/runtime/events.js +122 -0
  74. package/dist/src/runtime/executionMatrixHost.d.ts +98 -0
  75. package/dist/src/runtime/executionMatrixHost.js +134 -0
  76. package/dist/src/runtime/executionVariableBuckets.d.ts +67 -0
  77. package/dist/src/runtime/executionVariableBuckets.js +96 -0
  78. package/dist/src/runtime/finalizers/errors.d.ts +9 -0
  79. package/dist/src/runtime/finalizers/errors.js +10 -0
  80. package/dist/src/runtime/finalizers/executeFinalizer.d.ts +40 -0
  81. package/dist/src/runtime/finalizers/executeFinalizer.js +471 -0
  82. package/dist/src/runtime/finalizers/schema.d.ts +18 -0
  83. package/dist/src/runtime/finalizers/schema.js +63 -0
  84. package/dist/src/runtime/finalizers/validateFinalizer.d.ts +16 -0
  85. package/dist/src/runtime/finalizers/validateFinalizer.js +534 -0
  86. package/dist/src/runtime/graphDocumentFingerprint.d.ts +8 -0
  87. package/dist/src/runtime/graphDocumentFingerprint.js +21 -0
  88. package/dist/src/runtime/graphEngineMemoryPaths.d.ts +12 -0
  89. package/dist/src/runtime/graphEngineMemoryPaths.js +55 -0
  90. package/dist/src/runtime/graphResponseMapping.d.ts +23 -0
  91. package/dist/src/runtime/graphResponseMapping.js +156 -0
  92. package/dist/src/runtime/graphResponseMigration.d.ts +7 -0
  93. package/dist/src/runtime/graphResponseMigration.js +44 -0
  94. package/dist/src/runtime/graphRunExecutionSeed.d.ts +29 -0
  95. package/dist/src/runtime/graphRunExecutionSeed.js +61 -0
  96. package/dist/src/runtime/graphRunIdentity.d.ts +7 -0
  97. package/dist/src/runtime/graphRunIdentity.js +18 -0
  98. package/dist/src/runtime/localSkills/deterministicRule.d.ts +137 -0
  99. package/dist/src/runtime/localSkills/deterministicRule.js +196 -0
  100. package/dist/src/runtime/localSkills/index.d.ts +12 -0
  101. package/dist/src/runtime/localSkills/index.js +14 -0
  102. package/dist/src/runtime/localSkills/memorixItemToScopedOutput.d.ts +7 -0
  103. package/dist/src/runtime/localSkills/memorixItemToScopedOutput.js +104 -0
  104. package/dist/src/runtime/localSkills/memorixRuntime.d.ts +9 -0
  105. package/dist/src/runtime/localSkills/memorixRuntime.js +70 -0
  106. package/dist/src/runtime/localSkills/memorixScopedConfig.d.ts +16 -0
  107. package/dist/src/runtime/localSkills/memorixScopedConfig.js +18 -0
  108. package/dist/src/runtime/localSkills/scopedAnswerAssembler.d.ts +23 -0
  109. package/dist/src/runtime/localSkills/scopedAnswerAssembler.js +35 -0
  110. package/dist/src/runtime/localSkills/scopedAnswerFields.d.ts +12 -0
  111. package/dist/src/runtime/localSkills/scopedAnswerFields.js +66 -0
  112. package/dist/src/runtime/localSkills/scopedAnswerWriter.d.ts +32 -0
  113. package/dist/src/runtime/localSkills/scopedAnswerWriter.js +156 -0
  114. package/dist/src/runtime/localSkills/scopedDataReader.d.ts +47 -0
  115. package/dist/src/runtime/localSkills/scopedDataReader.js +89 -0
  116. package/dist/src/runtime/localSkills/utils.d.ts +12 -0
  117. package/dist/src/runtime/localSkills/utils.js +39 -0
  118. package/dist/src/runtime/materializeStructuredRunTaskInput.d.ts +9 -0
  119. package/dist/src/runtime/materializeStructuredRunTaskInput.js +34 -0
  120. package/dist/src/runtime/memory.d.ts +51 -0
  121. package/dist/src/runtime/memory.js +250 -0
  122. package/dist/src/runtime/mergeExellixGraphRuntimeInvocation.d.ts +18 -0
  123. package/dist/src/runtime/mergeExellixGraphRuntimeInvocation.js +32 -0
  124. package/dist/src/runtime/modelConfigSelection.d.ts +7 -0
  125. package/dist/src/runtime/modelConfigSelection.js +37 -0
  126. package/dist/src/runtime/narrixIngestEnv.d.ts +9 -0
  127. package/dist/src/runtime/narrixIngestEnv.js +18 -0
  128. package/dist/src/runtime/pathExpr.d.ts +36 -0
  129. package/dist/src/runtime/pathExpr.js +131 -0
  130. package/dist/src/runtime/predicates.d.ts +14 -0
  131. package/dist/src/runtime/predicates.js +86 -0
  132. package/dist/src/runtime/readTaskNodeInputsConfig.d.ts +23 -0
  133. package/dist/src/runtime/readTaskNodeInputsConfig.js +27 -0
  134. package/dist/src/runtime/resolveExecutionPipelineForTaskNode.d.ts +11 -0
  135. package/dist/src/runtime/resolveExecutionPipelineForTaskNode.js +93 -0
  136. package/dist/src/runtime/resolveGraphEngineMemoryPaths.d.ts +63 -0
  137. package/dist/src/runtime/resolveGraphEngineMemoryPaths.js +213 -0
  138. package/dist/src/runtime/resolveModelConfigForNode.d.ts +20 -0
  139. package/dist/src/runtime/resolveModelConfigForNode.js +69 -0
  140. package/dist/src/runtime/resolveNarrixForTaskNode.d.ts +14 -0
  141. package/dist/src/runtime/resolveNarrixForTaskNode.js +19 -0
  142. package/dist/src/runtime/resolveTaskKey.d.ts +11 -0
  143. package/dist/src/runtime/resolveTaskKey.js +28 -0
  144. package/dist/src/runtime/resolveTaskNodeInputs.d.ts +25 -0
  145. package/dist/src/runtime/resolveTaskNodeInputs.js +140 -0
  146. package/dist/src/runtime/runTaskAugments.d.ts +17 -0
  147. package/dist/src/runtime/runTaskAugments.js +37 -0
  148. package/dist/src/runtime/runTaskResponse.d.ts +4 -0
  149. package/dist/src/runtime/runTaskResponse.js +13 -0
  150. package/dist/src/runtime/runtimeObjects.d.ts +85 -0
  151. package/dist/src/runtime/runtimeObjects.js +50 -0
  152. package/dist/src/runtime/smartInputPaths.d.ts +13 -0
  153. package/dist/src/runtime/smartInputPaths.js +38 -0
  154. package/dist/src/runtime/stepRetry.d.ts +21 -0
  155. package/dist/src/runtime/stepRetry.js +238 -0
  156. package/dist/src/runtime/synthesizedContextPipeline.d.ts +12 -0
  157. package/dist/src/runtime/synthesizedContextPipeline.js +28 -0
  158. package/dist/src/runtime/taskNodeConditionsEvaluation.d.ts +27 -0
  159. package/dist/src/runtime/taskNodeConditionsEvaluation.js +140 -0
  160. package/dist/src/runtime/taskNodeMainReadiness.d.ts +45 -0
  161. package/dist/src/runtime/taskNodeMainReadiness.js +164 -0
  162. package/dist/src/runtime/taskNodeRunTaskPreflight.d.ts +89 -0
  163. package/dist/src/runtime/taskNodeRunTaskPreflight.js +204 -0
  164. package/dist/src/runtime/validateCanonicalGraphDocument.d.ts +25 -0
  165. package/dist/src/runtime/validateCanonicalGraphDocument.js +567 -0
  166. package/dist/src/runtime/variables.d.ts +2 -0
  167. package/dist/src/runtime/variables.js +1 -0
  168. package/dist/src/runtime/withTimeout.d.ts +5 -0
  169. package/dist/src/runtime/withTimeout.js +20 -0
  170. package/dist/src/types/aiTaskProfile.d.ts +41 -0
  171. package/dist/src/types/aiTaskProfile.js +6 -0
  172. package/dist/src/types/aiTasksDerivedTypes.d.ts +5 -0
  173. package/dist/src/types/aiTasksDerivedTypes.js +1 -0
  174. package/dist/src/types/events.d.ts +23 -0
  175. package/dist/src/types/events.js +1 -0
  176. package/dist/src/types/job.d.ts +9 -0
  177. package/dist/src/types/job.js +1 -0
  178. package/dist/src/types/narrix.d.ts +60 -0
  179. package/dist/src/types/narrix.js +1 -0
  180. package/dist/src/types/options.d.ts +122 -0
  181. package/dist/src/types/options.js +1 -0
  182. package/dist/src/types/refs.d.ts +747 -0
  183. package/dist/src/types/refs.js +12 -0
  184. package/dist/src/types/results.d.ts +103 -0
  185. package/dist/src/types/results.js +1 -0
  186. package/dist/src/types/runLog.d.ts +72 -0
  187. package/dist/src/types/runLog.js +18 -0
  188. package/dist/src/types/taskNodeConfiguration.d.ts +95 -0
  189. package/dist/src/types/taskNodeConfiguration.js +3 -0
  190. package/dist/src/util/packageVersion.d.ts +2 -0
  191. package/dist/src/util/packageVersion.js +12 -0
  192. package/dist/testkit/RealTasksClient.d.ts +16 -0
  193. package/dist/testkit/RealTasksClient.js +143 -0
  194. package/dist/testkit/depGraphEngineFactory.d.ts +6 -0
  195. package/dist/testkit/depGraphEngineFactory.js +54 -0
  196. package/dist/testkit/exellixRuntimeObjects.d.ts +7 -0
  197. package/dist/testkit/exellixRuntimeObjects.js +25 -0
  198. package/dist/testkit/inMemoryGraphLoader.d.ts +6 -0
  199. package/dist/testkit/inMemoryGraphLoader.js +12 -0
  200. package/dist/testkit/index.d.ts +4 -0
  201. package/dist/testkit/index.js +4 -0
  202. package/package.json +70 -0
@@ -0,0 +1,263 @@
1
+ import type { GraphEngineFactory } from "./GraphEngine.js";
2
+ import type { ExecutionStep } from "@exellix/ai-tasks";
3
+ import type { Graph, GraphModelObject, GraphNode, GraphAiModelConfig, GraphModelAliasConfig, TaskNodeRuntimeObject } from "../types/refs.js";
4
+ import type { RunLogEntry } from "../types/runLog.js";
5
+ import type { RunTaskDiagnostics } from "../types/options.js";
6
+ import type { ExecutionStepOption, HostExecuteGraphRunOptions, SkillKeyResolutionOptions } from "../types/options.js";
7
+ import type { PlaygroundReporter } from "../playground/PlaygroundReporter.js";
8
+ import type { CreateRunxOptions, RunxClient } from "@x12i/runx";
9
+ import type { ModelConfigSelection } from "../types/refs.js";
10
+ import { type EventEmitter } from "./events.js";
11
+ import type { NodeTraceEntry } from "../types/results.js";
12
+ 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
+ };
45
+ export type RunTaskResponse = {
46
+ ok: boolean;
47
+ rawContent?: string;
48
+ parsed?: any;
49
+ error?: any;
50
+ diagnostics?: any;
51
+ jobMemory?: any;
52
+ taskMemory?: any;
53
+ execution?: any;
54
+ /** Synthesis / observability / run-log passthrough from @exellix/ai-tasks. */
55
+ metadata?: Record<string, unknown>;
56
+ meta?: Record<string, unknown>;
57
+ };
58
+ export interface TasksClientLike {
59
+ runTask(req: RunTaskRequest): Promise<RunTaskResponse>;
60
+ }
61
+ export interface GraphLoader {
62
+ loadGraph(graphId: string): Promise<any>;
63
+ }
64
+ /**
65
+ * Dynamic state and run-scoped options for one graph execution.
66
+ * Static graph shape belongs on {@link GraphExecutionRequest.model}; this object
67
+ * is the per-run state that may be populated and mutated during execution.
68
+ */
69
+ export interface GraphRuntimeObject extends HostExecuteGraphRunOptions {
70
+ /** Host correlation id (mandatory). Merged onto `job.id` / `job.jobId` before node execution. */
71
+ jobId: string;
72
+ /** Host job envelope (`agentId`, `jobType`, `input`, etc.). */
73
+ job: any;
74
+ /** Active input for this execution. Mirrored to `runtime.executionMemory.input`. */
75
+ input?: Record<string, unknown>;
76
+ /** Caller / graph-entry bag. Mirrored to `runtime.executionMemory.inputs` (dual root with `input`). */
77
+ inputs?: Record<string, unknown>;
78
+ /** Temporary task/node-scoped runtime memory. */
79
+ taskMemory?: any;
80
+ /** Graph-run-level runtime memory initialized at execution start. */
81
+ jobMemory?: any;
82
+ /** Task-visible execution state. This is forwarded to task execution as `executionMemory`. */
83
+ executionMemory?: any;
84
+ /** Graph-engine-owned output state. `outputMapping` writes here; it is never sent to task execution. */
85
+ outputsMemory?: any;
86
+ /** Graph-scoped variable overrides → `executionMemory.variables`. */
87
+ variables?: Record<string, any>;
88
+ /** Job-scoped overrides → `executionMemory.jobVariables`. */
89
+ jobVariables?: Record<string, unknown>;
90
+ /** Task-scoped overrides for the active node → `executionMemory.taskVariables`. */
91
+ taskVariables?: Record<string, unknown>;
92
+ /** Runtime default model selection (`cases`); overrides GraphModelObject.modelConfig. */
93
+ modelConfig?: ModelConfigSelection;
94
+ /** Runtime alias map used to resolve modelConfig values before runTask. */
95
+ aliasConfig?: GraphModelAliasConfig;
96
+ /** Task-node runtime overrides keyed by node id. */
97
+ nodes?: Record<string, TaskNodeRuntimeObject>;
98
+ mode?: "forward" | "backward" | "hybrid";
99
+ goalNodeId?: string;
100
+ dimension?: string;
101
+ initialState?: any;
102
+ initialVariables?: Record<string, any>;
103
+ /** Include per-node trace on `ExecuteGraphResult.debug`. */
104
+ debugMode?: boolean;
105
+ /** Per-invocation playground reporter; overrides constructor default. */
106
+ playgroundReporter?: PlaygroundReporter;
107
+ /** Per-invocation event emitter; overrides constructor default. */
108
+ eventEmitter?: EventEmitter;
109
+ }
110
+ /** Required public graph execution request shape. */
111
+ export interface GraphExecutionRequest {
112
+ model: GraphModelObject;
113
+ runtime: GraphRuntimeObject;
114
+ }
115
+ /** Canonical public execution request shape for `runtime.executeGraph(...)`. */
116
+ export type ExecuteGraphInput = GraphExecutionRequest;
117
+ /** Per-node trace entry surfaced on `ExecuteGraphResult.debug.nodes` when `debugMode: true`. */
118
+ export interface ExecuteGraphDebugNodeEntry extends NodeTraceEntry {
119
+ nodeId: string;
120
+ }
121
+ export interface ExecuteGraphResult {
122
+ jobId: string;
123
+ /** Per-invocation UUID — same as every `runTask.taskId` for this graph run. */
124
+ taskId: string;
125
+ graphId: string;
126
+ status: "completed" | "failed";
127
+ outputsByNodeId: Record<string, any>;
128
+ /** Aggregated responses for executed non-finalizer steps, shaped by `metadata.graphExecution`. */
129
+ stepsResponses: ExecuteGraphStepResponse[];
130
+ engineSnapshot: any;
131
+ /** Canonical business output resolved from root `graph.response`. */
132
+ finalOutput?: any;
133
+ finalizerNodeId?: string;
134
+ finalizerType?: string;
135
+ errors?: Array<{
136
+ nodeId?: string;
137
+ error: any;
138
+ }>;
139
+ /** Final execution object (includes `_trace.nodes` for per-node timing). */
140
+ execution?: unknown;
141
+ /** Final graph-engine-owned output memory accumulated from finalizer `outputMapping` writes. */
142
+ outputsMemory?: unknown;
143
+ runLog?: RunLogEntry[];
144
+ runLogTruncated?: boolean;
145
+ runLogOmittedCount?: number;
146
+ logxerCorrelationId?: string;
147
+ /** Populated only when `executeGraph(input)` was called with `debugMode: true`. */
148
+ debug?: {
149
+ nodes: ExecuteGraphDebugNodeEntry[];
150
+ };
151
+ /**
152
+ * Audit fingerprint of the supplied graph model.
153
+ * Hosts (e.g. execution matrix) may persist this with catalog `graphVersion` for replay forensics.
154
+ */
155
+ graphAudit?: {
156
+ source: 'model';
157
+ contentSha256: string;
158
+ };
159
+ }
160
+ export type GraphKnowledgeResolverContext = {
161
+ model: GraphModelObject;
162
+ runtime: GraphRuntimeObject;
163
+ graphId: string;
164
+ jobId: string;
165
+ taskId: string;
166
+ node?: GraphNode;
167
+ };
168
+ export type GraphKnowledgeResolver = (refs: string[], context: GraphKnowledgeResolverContext) => Record<string, unknown> | void | Promise<Record<string, unknown> | void>;
169
+ export interface ExellixGraphRuntimeOptions extends HostExecuteGraphRunOptions {
170
+ graphLoader: GraphLoader;
171
+ tasksClient: TasksClientLike;
172
+ engineFactory: GraphEngineFactory;
173
+ /** Resolves model.jobKnowledge refs for outbound RunTaskRequest.jobMemory.knowledge. */
174
+ resolveJobKnowledge?: GraphKnowledgeResolver;
175
+ /** Resolves per-node taskKnowledge refs for outbound RunTaskRequest.taskMemory.knowledge. */
176
+ resolveTaskKnowledge?: GraphKnowledgeResolver;
177
+ /** Runx client for `jsConditionFunction`, `aiCondition`, and conditional modelConfig cases that need it. */
178
+ runx?: RunxClient;
179
+ /** Lazy `createRunx` when nodes require runx and `runx` is omitted. */
180
+ runxCreateOptions?: CreateRunxOptions;
181
+ concurrency?: number;
182
+ /** Default playground reporter for each `executeGraph` call; per-call {@link GraphRuntimeObject.playgroundReporter} wins. */
183
+ playgroundReporter?: PlaygroundReporter;
184
+ /**
185
+ * Default event emitter for graph + node lifecycle events. Per-invocation
186
+ * {@link GraphRuntimeObject.eventEmitter} overrides this when set.
187
+ * Subscribers receive `graph:start`, `graph:complete`, `graph:fail`,
188
+ * `node:start`, `node:complete`, `node:fail`.
189
+ */
190
+ eventEmitter?: EventEmitter;
191
+ }
192
+ export declare function createExellixGraphRuntime(opts: ExellixGraphRuntimeOptions): {
193
+ executeGraph: (input: ExecuteGraphInput) => Promise<ExecuteGraphResult>;
194
+ executeNode: (input: {
195
+ graphId: string;
196
+ graph?: Graph;
197
+ /** Same UUID for every `runTask` in this `executeGraph` invocation; omitted → new UUID per direct `executeNode` call. */
198
+ graphRunTaskId?: string;
199
+ node: any;
200
+ job: any;
201
+ jobMemory?: any;
202
+ taskMemory?: any;
203
+ execution?: any;
204
+ outputsMemory?: any;
205
+ variables?: Record<string, any>;
206
+ /** Per-node task-scope overrides → `executionMemory.taskVariables`. */
207
+ taskVariables?: Record<string, unknown>;
208
+ prevNodeId?: string;
209
+ /** Overrides graph-level / runtime default for this node only. */
210
+ modelConfig?: GraphAiModelConfig;
211
+ llmCall?: Record<string, unknown>;
212
+ runTaskIdentity?: Record<string, unknown>;
213
+ runTaskExecutionMode?: "default" | "trace";
214
+ runTaskDiagnostics?: RunTaskDiagnostics;
215
+ /** Resolved model jobKnowledge, applied only to outbound RunTaskRequest.jobMemory. */
216
+ jobKnowledgePatch?: Record<string, unknown>;
217
+ /** Resolved per-node taskKnowledge, applied only to outbound RunTaskRequest.taskMemory. */
218
+ taskKnowledgePatch?: Record<string, unknown>;
219
+ /** Graph-run default pipeline; node / `execution.executionPipeline` override per executeNode rules. */
220
+ graphExecutionPipeline?: ExecutionStepOption[];
221
+ skillKeyResolution?: SkillKeyResolutionOptions;
222
+ nodeTimeoutMs?: number;
223
+ clearSynthesizedContextPerNode?: boolean;
224
+ stepRetryPolicy?: import("../types/options.js").StepRetryPolicy;
225
+ /** Caller (`executeGraph`) supplies an emitter so node-level events fire with the parent's run identity. */
226
+ eventEmitter?: EventEmitter;
227
+ /** Caller jobCorrelation (currently `{ jobType }`) forwarded into node lifecycle events. */
228
+ jobCorrelation?: {
229
+ jobType?: string;
230
+ };
231
+ mainReadinessPolicy?: import("../types/options.js").MainReadinessPolicy;
232
+ }) => Promise<{
233
+ nodeId: string;
234
+ skillKey: string;
235
+ output: {
236
+ rawContent?: any;
237
+ parsed: any;
238
+ };
239
+ execution: any;
240
+ outputsMemory: any;
241
+ } | {
242
+ nodeId: any;
243
+ skillKey: "scoped-answer-writer" | "scoped-data-reader" | "deterministic-rule" | "scoped-answer-assembler";
244
+ output: {
245
+ parsed: Record<string, unknown>;
246
+ };
247
+ execution: any;
248
+ outputsMemory: Record<string, unknown>;
249
+ } | {
250
+ aiTasksObservability: Record<string, unknown>;
251
+ logxerCorrelationId?: string | undefined;
252
+ taskRunLog?: RunLogEntry[] | undefined;
253
+ nodeId: any;
254
+ skillKey: string;
255
+ output: {
256
+ rawContent: any;
257
+ parsed: any;
258
+ };
259
+ execution: any;
260
+ outputsMemory: Record<string, unknown>;
261
+ request: RunTaskRequest;
262
+ }>;
263
+ };