@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.
- package/.env.example +3 -0
- package/CHANGELOG.md +208 -0
- package/README.md +827 -0
- package/dist/src/errors/ExellixGraphError.d.ts +38 -0
- package/dist/src/errors/ExellixGraphError.js +21 -0
- package/dist/src/errors/exellixGraphErrorCodes.d.ts +31 -0
- package/dist/src/errors/exellixGraphErrorCodes.js +32 -0
- package/dist/src/index.d.ts +100 -0
- package/dist/src/index.js +75 -0
- package/dist/src/inspection/contractInspection.d.ts +21 -0
- package/dist/src/inspection/contractInspection.js +526 -0
- package/dist/src/inspection/contractTypes.d.ts +137 -0
- package/dist/src/inspection/contractTypes.js +1 -0
- package/dist/src/inspection/controlInspection.d.ts +22 -0
- package/dist/src/inspection/controlInspection.js +130 -0
- package/dist/src/inspection/graphInspection.d.ts +51 -0
- package/dist/src/inspection/graphInspection.js +467 -0
- package/dist/src/inspection/index.d.ts +21 -0
- package/dist/src/inspection/index.js +17 -0
- package/dist/src/inspection/nodeInspection.d.ts +42 -0
- package/dist/src/inspection/nodeInspection.js +474 -0
- package/dist/src/inspection/types.d.ts +321 -0
- package/dist/src/inspection/types.js +14 -0
- package/dist/src/inspection/validateAiTasksNodeExtensions.d.ts +12 -0
- package/dist/src/inspection/validateAiTasksNodeExtensions.js +119 -0
- package/dist/src/inspection/validateCatalogPlanning.d.ts +21 -0
- package/dist/src/inspection/validateCatalogPlanning.js +187 -0
- package/dist/src/integrations/ActivityTrackerIntegration.d.ts +86 -0
- package/dist/src/integrations/ActivityTrackerIntegration.js +134 -0
- package/dist/src/integrations/ActivixGraphRunIntegration.d.ts +34 -0
- package/dist/src/integrations/ActivixGraphRunIntegration.js +338 -0
- package/dist/src/integrations/ActivixNodeActivityIntegration.d.ts +33 -0
- package/dist/src/integrations/ActivixNodeActivityIntegration.js +220 -0
- package/dist/src/integrations/cataloxGraphCatalog.d.ts +21 -0
- package/dist/src/integrations/cataloxGraphCatalog.js +30 -0
- package/dist/src/integrations/createActivixExellixIntegration.d.ts +14 -0
- package/dist/src/integrations/createActivixExellixIntegration.js +16 -0
- package/dist/src/integrations/createActivixFromEnv.d.ts +31 -0
- package/dist/src/integrations/createActivixFromEnv.js +53 -0
- package/dist/src/loaders/FileGraphLoader.d.ts +23 -0
- package/dist/src/loaders/FileGraphLoader.js +31 -0
- package/dist/src/playground/PlaygroundReporter.d.ts +40 -0
- package/dist/src/playground/PlaygroundReporter.js +480 -0
- package/dist/src/playground/index.d.ts +1 -0
- package/dist/src/playground/index.js +1 -0
- package/dist/src/runtime/ExellixGraphRuntime.d.ts +263 -0
- package/dist/src/runtime/ExellixGraphRuntime.js +1716 -0
- package/dist/src/runtime/GraphEngine.d.ts +33 -0
- package/dist/src/runtime/GraphEngine.js +4 -0
- package/dist/src/runtime/aiTasksObservability.d.ts +6 -0
- package/dist/src/runtime/aiTasksObservability.js +37 -0
- package/dist/src/runtime/aiTasksStrategyPhases.d.ts +46 -0
- package/dist/src/runtime/aiTasksStrategyPhases.js +93 -0
- package/dist/src/runtime/applyAiTaskProfileWebScopingToNarrix.d.ts +17 -0
- package/dist/src/runtime/applyAiTaskProfileWebScopingToNarrix.js +46 -0
- package/dist/src/runtime/buildAiTasksRunTaskRequest.d.ts +67 -0
- package/dist/src/runtime/buildAiTasksRunTaskRequest.js +164 -0
- package/dist/src/runtime/buildRunLog.d.ts +27 -0
- package/dist/src/runtime/buildRunLog.js +234 -0
- package/dist/src/runtime/buildRunTaskTaskConfigurationForward.d.ts +9 -0
- package/dist/src/runtime/buildRunTaskTaskConfigurationForward.js +80 -0
- package/dist/src/runtime/buildTaskNodeJobContext.d.ts +11 -0
- package/dist/src/runtime/buildTaskNodeJobContext.js +30 -0
- package/dist/src/runtime/canonicalModelUsed.d.ts +6 -0
- package/dist/src/runtime/canonicalModelUsed.js +36 -0
- package/dist/src/runtime/contextualScope.d.ts +7 -0
- package/dist/src/runtime/contextualScope.js +121 -0
- package/dist/src/runtime/dataFiltersEvaluation.d.ts +60 -0
- package/dist/src/runtime/dataFiltersEvaluation.js +169 -0
- package/dist/src/runtime/deepMerge.d.ts +5 -0
- package/dist/src/runtime/deepMerge.js +22 -0
- package/dist/src/runtime/events.d.ts +92 -0
- package/dist/src/runtime/events.js +122 -0
- package/dist/src/runtime/executionMatrixHost.d.ts +98 -0
- package/dist/src/runtime/executionMatrixHost.js +134 -0
- package/dist/src/runtime/executionVariableBuckets.d.ts +67 -0
- package/dist/src/runtime/executionVariableBuckets.js +96 -0
- package/dist/src/runtime/finalizers/errors.d.ts +9 -0
- package/dist/src/runtime/finalizers/errors.js +10 -0
- package/dist/src/runtime/finalizers/executeFinalizer.d.ts +40 -0
- package/dist/src/runtime/finalizers/executeFinalizer.js +471 -0
- package/dist/src/runtime/finalizers/schema.d.ts +18 -0
- package/dist/src/runtime/finalizers/schema.js +63 -0
- package/dist/src/runtime/finalizers/validateFinalizer.d.ts +16 -0
- package/dist/src/runtime/finalizers/validateFinalizer.js +534 -0
- package/dist/src/runtime/graphDocumentFingerprint.d.ts +8 -0
- package/dist/src/runtime/graphDocumentFingerprint.js +21 -0
- package/dist/src/runtime/graphEngineMemoryPaths.d.ts +12 -0
- package/dist/src/runtime/graphEngineMemoryPaths.js +55 -0
- package/dist/src/runtime/graphResponseMapping.d.ts +23 -0
- package/dist/src/runtime/graphResponseMapping.js +156 -0
- package/dist/src/runtime/graphResponseMigration.d.ts +7 -0
- package/dist/src/runtime/graphResponseMigration.js +44 -0
- package/dist/src/runtime/graphRunExecutionSeed.d.ts +29 -0
- package/dist/src/runtime/graphRunExecutionSeed.js +61 -0
- package/dist/src/runtime/graphRunIdentity.d.ts +7 -0
- package/dist/src/runtime/graphRunIdentity.js +18 -0
- package/dist/src/runtime/localSkills/deterministicRule.d.ts +137 -0
- package/dist/src/runtime/localSkills/deterministicRule.js +196 -0
- package/dist/src/runtime/localSkills/index.d.ts +12 -0
- package/dist/src/runtime/localSkills/index.js +14 -0
- package/dist/src/runtime/localSkills/memorixItemToScopedOutput.d.ts +7 -0
- package/dist/src/runtime/localSkills/memorixItemToScopedOutput.js +104 -0
- package/dist/src/runtime/localSkills/memorixRuntime.d.ts +9 -0
- package/dist/src/runtime/localSkills/memorixRuntime.js +70 -0
- package/dist/src/runtime/localSkills/memorixScopedConfig.d.ts +16 -0
- package/dist/src/runtime/localSkills/memorixScopedConfig.js +18 -0
- package/dist/src/runtime/localSkills/scopedAnswerAssembler.d.ts +23 -0
- package/dist/src/runtime/localSkills/scopedAnswerAssembler.js +35 -0
- package/dist/src/runtime/localSkills/scopedAnswerFields.d.ts +12 -0
- package/dist/src/runtime/localSkills/scopedAnswerFields.js +66 -0
- package/dist/src/runtime/localSkills/scopedAnswerWriter.d.ts +32 -0
- package/dist/src/runtime/localSkills/scopedAnswerWriter.js +156 -0
- package/dist/src/runtime/localSkills/scopedDataReader.d.ts +47 -0
- package/dist/src/runtime/localSkills/scopedDataReader.js +89 -0
- package/dist/src/runtime/localSkills/utils.d.ts +12 -0
- package/dist/src/runtime/localSkills/utils.js +39 -0
- package/dist/src/runtime/materializeStructuredRunTaskInput.d.ts +9 -0
- package/dist/src/runtime/materializeStructuredRunTaskInput.js +34 -0
- package/dist/src/runtime/memory.d.ts +51 -0
- package/dist/src/runtime/memory.js +250 -0
- package/dist/src/runtime/mergeExellixGraphRuntimeInvocation.d.ts +18 -0
- package/dist/src/runtime/mergeExellixGraphRuntimeInvocation.js +32 -0
- package/dist/src/runtime/modelConfigSelection.d.ts +7 -0
- package/dist/src/runtime/modelConfigSelection.js +37 -0
- package/dist/src/runtime/narrixIngestEnv.d.ts +9 -0
- package/dist/src/runtime/narrixIngestEnv.js +18 -0
- package/dist/src/runtime/pathExpr.d.ts +36 -0
- package/dist/src/runtime/pathExpr.js +131 -0
- package/dist/src/runtime/predicates.d.ts +14 -0
- package/dist/src/runtime/predicates.js +86 -0
- package/dist/src/runtime/readTaskNodeInputsConfig.d.ts +23 -0
- package/dist/src/runtime/readTaskNodeInputsConfig.js +27 -0
- package/dist/src/runtime/resolveExecutionPipelineForTaskNode.d.ts +11 -0
- package/dist/src/runtime/resolveExecutionPipelineForTaskNode.js +93 -0
- package/dist/src/runtime/resolveGraphEngineMemoryPaths.d.ts +63 -0
- package/dist/src/runtime/resolveGraphEngineMemoryPaths.js +213 -0
- package/dist/src/runtime/resolveModelConfigForNode.d.ts +20 -0
- package/dist/src/runtime/resolveModelConfigForNode.js +69 -0
- package/dist/src/runtime/resolveNarrixForTaskNode.d.ts +14 -0
- package/dist/src/runtime/resolveNarrixForTaskNode.js +19 -0
- package/dist/src/runtime/resolveTaskKey.d.ts +11 -0
- package/dist/src/runtime/resolveTaskKey.js +28 -0
- package/dist/src/runtime/resolveTaskNodeInputs.d.ts +25 -0
- package/dist/src/runtime/resolveTaskNodeInputs.js +140 -0
- package/dist/src/runtime/runTaskAugments.d.ts +17 -0
- package/dist/src/runtime/runTaskAugments.js +37 -0
- package/dist/src/runtime/runTaskResponse.d.ts +4 -0
- package/dist/src/runtime/runTaskResponse.js +13 -0
- package/dist/src/runtime/runtimeObjects.d.ts +85 -0
- package/dist/src/runtime/runtimeObjects.js +50 -0
- package/dist/src/runtime/smartInputPaths.d.ts +13 -0
- package/dist/src/runtime/smartInputPaths.js +38 -0
- package/dist/src/runtime/stepRetry.d.ts +21 -0
- package/dist/src/runtime/stepRetry.js +238 -0
- package/dist/src/runtime/synthesizedContextPipeline.d.ts +12 -0
- package/dist/src/runtime/synthesizedContextPipeline.js +28 -0
- package/dist/src/runtime/taskNodeConditionsEvaluation.d.ts +27 -0
- package/dist/src/runtime/taskNodeConditionsEvaluation.js +140 -0
- package/dist/src/runtime/taskNodeMainReadiness.d.ts +45 -0
- package/dist/src/runtime/taskNodeMainReadiness.js +164 -0
- package/dist/src/runtime/taskNodeRunTaskPreflight.d.ts +89 -0
- package/dist/src/runtime/taskNodeRunTaskPreflight.js +204 -0
- package/dist/src/runtime/validateCanonicalGraphDocument.d.ts +25 -0
- package/dist/src/runtime/validateCanonicalGraphDocument.js +567 -0
- package/dist/src/runtime/variables.d.ts +2 -0
- package/dist/src/runtime/variables.js +1 -0
- package/dist/src/runtime/withTimeout.d.ts +5 -0
- package/dist/src/runtime/withTimeout.js +20 -0
- package/dist/src/types/aiTaskProfile.d.ts +41 -0
- package/dist/src/types/aiTaskProfile.js +6 -0
- package/dist/src/types/aiTasksDerivedTypes.d.ts +5 -0
- package/dist/src/types/aiTasksDerivedTypes.js +1 -0
- package/dist/src/types/events.d.ts +23 -0
- package/dist/src/types/events.js +1 -0
- package/dist/src/types/job.d.ts +9 -0
- package/dist/src/types/job.js +1 -0
- package/dist/src/types/narrix.d.ts +60 -0
- package/dist/src/types/narrix.js +1 -0
- package/dist/src/types/options.d.ts +122 -0
- package/dist/src/types/options.js +1 -0
- package/dist/src/types/refs.d.ts +747 -0
- package/dist/src/types/refs.js +12 -0
- package/dist/src/types/results.d.ts +103 -0
- package/dist/src/types/results.js +1 -0
- package/dist/src/types/runLog.d.ts +72 -0
- package/dist/src/types/runLog.js +18 -0
- package/dist/src/types/taskNodeConfiguration.d.ts +95 -0
- package/dist/src/types/taskNodeConfiguration.js +3 -0
- package/dist/src/util/packageVersion.d.ts +2 -0
- package/dist/src/util/packageVersion.js +12 -0
- package/dist/testkit/RealTasksClient.d.ts +16 -0
- package/dist/testkit/RealTasksClient.js +143 -0
- package/dist/testkit/depGraphEngineFactory.d.ts +6 -0
- package/dist/testkit/depGraphEngineFactory.js +54 -0
- package/dist/testkit/exellixRuntimeObjects.d.ts +7 -0
- package/dist/testkit/exellixRuntimeObjects.js +25 -0
- package/dist/testkit/inMemoryGraphLoader.d.ts +6 -0
- package/dist/testkit/inMemoryGraphLoader.js +12 -0
- package/dist/testkit/index.d.ts +4 -0
- package/dist/testkit/index.js +4 -0
- package/package.json +70 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Schema version for structured record gates on `conditions.dataFilters` (and optional `graphEntry.dataFilters`). */
|
|
2
|
+
export const EXELLIX_STRUCTURED_DATA_FILTERS_V1 = 'exellix.dataFilters.v1';
|
|
3
|
+
/** Merged graph document model is exposed under this key in merged execution `variables`. */
|
|
4
|
+
export const EXELLIX_GRAPH_MODEL_VARIABLE_KEY = '__graphModel';
|
|
5
|
+
/** Returns `graph.metadata` when present (plain object); otherwise `{}`. */
|
|
6
|
+
export function mergeGraphDocumentModel(graph) {
|
|
7
|
+
const meta = graph.metadata;
|
|
8
|
+
if (meta != null && typeof meta === 'object' && !Array.isArray(meta)) {
|
|
9
|
+
return { ...meta };
|
|
10
|
+
}
|
|
11
|
+
return {};
|
|
12
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { RunLogEntry } from './runLog.js';
|
|
2
|
+
/** Classification for engine-managed `runTask` retries. */
|
|
3
|
+
export type StepFailureClassification = 'timeout' | 'token-limit' | 'other';
|
|
4
|
+
/** One row per `runTask` attempt (including the first) when step retry is active. */
|
|
5
|
+
export interface StepAttemptRecord {
|
|
6
|
+
index: number;
|
|
7
|
+
ok: boolean;
|
|
8
|
+
startedAt: number;
|
|
9
|
+
endedAt: number;
|
|
10
|
+
durationMs: number;
|
|
11
|
+
classification?: StepFailureClassification;
|
|
12
|
+
errorCode?: string;
|
|
13
|
+
errorMessage?: string;
|
|
14
|
+
maxTokensRequested?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Per-node execution trace stored in execution._trace.nodes[nodeId]
|
|
18
|
+
*/
|
|
19
|
+
export interface NodeTraceEntry {
|
|
20
|
+
startedAt: number;
|
|
21
|
+
endedAt: number;
|
|
22
|
+
skillKey: string;
|
|
23
|
+
ok: boolean;
|
|
24
|
+
durationMs: number;
|
|
25
|
+
activityId?: string;
|
|
26
|
+
summary?: Record<string, any>;
|
|
27
|
+
error?: {
|
|
28
|
+
message: string;
|
|
29
|
+
code?: string;
|
|
30
|
+
stack?: string;
|
|
31
|
+
};
|
|
32
|
+
/** Present when the MAIN `runTask` used engine step retries (success or terminal failure). */
|
|
33
|
+
attempts?: StepAttemptRecord[];
|
|
34
|
+
}
|
|
35
|
+
export type DebugTaskRecord = {
|
|
36
|
+
taskType: 'ai-task' | 'pre-execution' | 'post-execution';
|
|
37
|
+
details: string;
|
|
38
|
+
metadata: Record<string, unknown>;
|
|
39
|
+
modelUsed?: string | null;
|
|
40
|
+
};
|
|
41
|
+
export type DebugNodeTraceEntry = {
|
|
42
|
+
nodeId: string;
|
|
43
|
+
/** Node timing + status + any executor summary fields. */
|
|
44
|
+
metadata: Record<string, unknown>;
|
|
45
|
+
snapshots: {
|
|
46
|
+
inputs?: Record<string, unknown>;
|
|
47
|
+
memory?: {
|
|
48
|
+
jobMemory?: unknown;
|
|
49
|
+
taskMemory?: unknown;
|
|
50
|
+
execution?: unknown;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
/** Best-effort node response snapshot (task output / error). */
|
|
54
|
+
response?: unknown;
|
|
55
|
+
tasks: DebugTaskRecord[];
|
|
56
|
+
};
|
|
57
|
+
/** One aggregated item in `ExecuteGraphResult.stepsResponses`. */
|
|
58
|
+
export type ExecuteGraphStepResponse = Record<string, unknown>;
|
|
59
|
+
/**
|
|
60
|
+
* Execution results
|
|
61
|
+
*/
|
|
62
|
+
export interface NodeExecutionResult {
|
|
63
|
+
nodeId: string;
|
|
64
|
+
skillKey: string;
|
|
65
|
+
success: boolean;
|
|
66
|
+
output?: any;
|
|
67
|
+
error?: {
|
|
68
|
+
code: string;
|
|
69
|
+
message: string;
|
|
70
|
+
diagnostics?: any;
|
|
71
|
+
};
|
|
72
|
+
metadata?: Record<string, any>;
|
|
73
|
+
execution?: any;
|
|
74
|
+
/**
|
|
75
|
+
* True when the PRE synthesized-context step ran against an empty synthesizedContext slot
|
|
76
|
+
* (i.e. synthesizedContext was absent from executionMemory before the task, either naturally
|
|
77
|
+
* or because `clearSynthesizedContextPerNode` stripped it). False when PRE was present but
|
|
78
|
+
* synthesizedContext was already in memory and not cleared. Undefined when there is no PRE step.
|
|
79
|
+
*/
|
|
80
|
+
preRanFresh?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Synthesis observability fields extracted from the ai-tasks runTask response metadata.
|
|
83
|
+
* Includes synthesisEnabled, mainContextSource, synthesizedContextPresent, detectedTemplateCores, etc.
|
|
84
|
+
*/
|
|
85
|
+
aiTasksObservability?: Record<string, unknown>;
|
|
86
|
+
/** Lines from `runTask` metadata (`runLog`); merged into graph `runLog` by the runtime. */
|
|
87
|
+
taskRunLog?: RunLogEntry[];
|
|
88
|
+
logxerCorrelationId?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Optional debug payload captured by the executor when `debugMode` is enabled.
|
|
91
|
+
* This is intended for `executeGraph` to assemble a stable trace DTO.
|
|
92
|
+
*/
|
|
93
|
+
debug?: {
|
|
94
|
+
inputs?: Record<string, unknown>;
|
|
95
|
+
memoryStart?: {
|
|
96
|
+
jobMemory?: unknown;
|
|
97
|
+
taskMemory?: unknown;
|
|
98
|
+
execution?: unknown;
|
|
99
|
+
};
|
|
100
|
+
response?: unknown;
|
|
101
|
+
tasks?: DebugTaskRecord[];
|
|
102
|
+
};
|
|
103
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured run log for execution consoles (playground, Activix, HTTP APIs).
|
|
3
|
+
* @see `.docs/exellix-graph-format.md` — Layer 08 / run log contract.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* NOTE: `@exellix/ai-tasks` 5.5+ no longer exports `RunLogCorrelationIds`.
|
|
7
|
+
* We preserve the field for downstream consumers but keep it structurally typed.
|
|
8
|
+
*/
|
|
9
|
+
export type RunLogCorrelationIds = Record<string, unknown>;
|
|
10
|
+
/** Severity for filtering and display. */
|
|
11
|
+
export type RunLogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
12
|
+
/** Origin of the log line within a graph run (`pipeline` matches @exellix/ai-tasks RunLogScope). */
|
|
13
|
+
export type RunLogScope = 'graph' | 'node' | 'task' | 'narrix' | 'logxer' | 'pipeline';
|
|
14
|
+
/**
|
|
15
|
+
* One append-only row for UIs. Prefer `message` + small `data`; large blobs should be truncated by policy.
|
|
16
|
+
*/
|
|
17
|
+
export interface RunLogEntry {
|
|
18
|
+
/** Epoch ms (monotonic within a process; compare per-run only). */
|
|
19
|
+
ts: number;
|
|
20
|
+
level: RunLogLevel;
|
|
21
|
+
scope: RunLogScope;
|
|
22
|
+
/** Set when scope is node/task/narrix/logxer tied to a DAG node. */
|
|
23
|
+
nodeId?: string;
|
|
24
|
+
/** Carried when lines originate from @exellix/ai-tasks `RunLogEntry`. */
|
|
25
|
+
skillKey?: string;
|
|
26
|
+
taskId?: string;
|
|
27
|
+
correlationIds?: RunLogCorrelationIds;
|
|
28
|
+
message: string;
|
|
29
|
+
/** Optional structured payload; may be truncated (see buildRunLog / runtime options). */
|
|
30
|
+
data?: unknown;
|
|
31
|
+
}
|
|
32
|
+
/** How aggressively to populate `runLog` on {@link ExecuteGraphResult}. */
|
|
33
|
+
export type RunLogMode = 'off' | 'summary' | 'full';
|
|
34
|
+
/**
|
|
35
|
+
* Canonical key on `runTask` response metadata for buffered run-log lines.
|
|
36
|
+
* 5.x: only this key is read; the legacy `exellixRunLog` alias is no longer accepted.
|
|
37
|
+
*/
|
|
38
|
+
export declare const AI_TASKS_RUN_LOG_METADATA_KEY: "runLog";
|
|
39
|
+
/**
|
|
40
|
+
* Canonical Logxer / viewer correlation id on `runTask` response metadata
|
|
41
|
+
* (`RunTaskDiagnostics.logxerRunId`). 5.x: only this key is read; the legacy
|
|
42
|
+
* `logxerCorrelationId` alias is no longer accepted.
|
|
43
|
+
*/
|
|
44
|
+
export declare const AI_TASKS_LOGXER_RUN_ID_METADATA_KEY: "logxerRunId";
|
|
45
|
+
/** Defaults when caller omits run-log limits (signal-heavy responses). */
|
|
46
|
+
export declare const DEFAULT_MAX_RUN_LOG_ENTRIES = 500;
|
|
47
|
+
export declare const DEFAULT_MAX_RUN_LOG_DATA_JSON_CHARS = 4096;
|
|
48
|
+
export interface RunLogBuildOptions {
|
|
49
|
+
mode: RunLogMode;
|
|
50
|
+
maxEntries: number;
|
|
51
|
+
maxDataJsonChars: number;
|
|
52
|
+
jobId: string;
|
|
53
|
+
/** Same UUID as graph-engine `runTask.taskId` for this run. */
|
|
54
|
+
taskId: string;
|
|
55
|
+
graphId: string;
|
|
56
|
+
/** Wall time when `executeGraph` began (first graph-level log line). Defaults to min node `startedAt` or `Date.now()`. */
|
|
57
|
+
graphRunStartedAt?: number;
|
|
58
|
+
/** Graph outcome for terminal graph-level lines. */
|
|
59
|
+
graphStatus: 'completed' | 'failed';
|
|
60
|
+
/** Final execution object (must include `_trace` when built by runtime). */
|
|
61
|
+
execution: Record<string, unknown>;
|
|
62
|
+
/** Lines from per-node `runTask` metadata (e.g. Logxer buffer); merged after synthetic trace lines. */
|
|
63
|
+
taskAppendedEntries?: RunLogEntry[];
|
|
64
|
+
/** Last wins if multiple nodes report one. */
|
|
65
|
+
logxerCorrelationId?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface RunLogBuildResult {
|
|
68
|
+
runLog?: RunLogEntry[];
|
|
69
|
+
runLogTruncated?: boolean;
|
|
70
|
+
runLogOmittedCount?: number;
|
|
71
|
+
logxerCorrelationId?: string;
|
|
72
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured run log for execution consoles (playground, Activix, HTTP APIs).
|
|
3
|
+
* @see `.docs/exellix-graph-format.md` — Layer 08 / run log contract.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Canonical key on `runTask` response metadata for buffered run-log lines.
|
|
7
|
+
* 5.x: only this key is read; the legacy `exellixRunLog` alias is no longer accepted.
|
|
8
|
+
*/
|
|
9
|
+
export const AI_TASKS_RUN_LOG_METADATA_KEY = 'runLog';
|
|
10
|
+
/**
|
|
11
|
+
* Canonical Logxer / viewer correlation id on `runTask` response metadata
|
|
12
|
+
* (`RunTaskDiagnostics.logxerRunId`). 5.x: only this key is read; the legacy
|
|
13
|
+
* `logxerCorrelationId` alias is no longer accepted.
|
|
14
|
+
*/
|
|
15
|
+
export const AI_TASKS_LOGXER_RUN_ID_METADATA_KEY = 'logxerRunId';
|
|
16
|
+
/** Defaults when caller omits run-log limits (signal-heavy responses). */
|
|
17
|
+
export const DEFAULT_MAX_RUN_LOG_ENTRIES = 500;
|
|
18
|
+
export const DEFAULT_MAX_RUN_LOG_DATA_JSON_CHARS = 4096;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { InputStrategyKey, LlmCallConfig, NarrixModeKey, NarrixRunInput, RunTaskRequest } from '@exellix/ai-tasks';
|
|
2
|
+
import type { ExecutionStrategyInvocation, TaskStrategyItemData } from './aiTasksDerivedTypes.js';
|
|
3
|
+
import type { AiTaskProfileMetadata } from './aiTaskProfile.js';
|
|
4
|
+
import type { ModelConfigSelection } from './refs.js';
|
|
5
|
+
import type { NarrixPreProcessorConfig } from './narrix.js';
|
|
6
|
+
/** Same shape as scoped-data-reader pack slots (declared here to avoid importing runtime from types). */
|
|
7
|
+
export type TaskNodeScopedDataReaderPackSlot = {
|
|
8
|
+
slot: string;
|
|
9
|
+
entityIdPath: string;
|
|
10
|
+
memorixItemDescriptorId?: string;
|
|
11
|
+
itemDescriptorId?: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Execution-facing configuration for a task node. Must not be mixed into {@link TaskNodePureMetadata};
|
|
15
|
+
* the canonical graph validator allowlists `metadata` separately.
|
|
16
|
+
*
|
|
17
|
+
* Consolidates every key the engine reads for `runTask`, pipelines, Narrix resolution, retries, identity,
|
|
18
|
+
* and in-process local skills.
|
|
19
|
+
*/
|
|
20
|
+
export type TaskNodeTaskConfiguration = {
|
|
21
|
+
/**
|
|
22
|
+
* ai-tasks compile-at-invoke strategies (e.g. `pre: "synthesis"`). Forwarded on
|
|
23
|
+
* `RunTaskRequest.taskConfiguration` when not lifted to the request root.
|
|
24
|
+
*/
|
|
25
|
+
aiTaskStrategies?: Record<string, unknown>;
|
|
26
|
+
aiTaskProfile?: AiTaskProfileMetadata;
|
|
27
|
+
narrix?: NarrixPreProcessorConfig;
|
|
28
|
+
/** Materialized question / template input when orchestration persists PRE artifacts (execution-adjacent). */
|
|
29
|
+
synthesizedInput?: Record<string, unknown> | string;
|
|
30
|
+
narrixMode?: NarrixModeKey | (string & {});
|
|
31
|
+
inputStrategyKey?: InputStrategyKey | (string & {});
|
|
32
|
+
executionStrategies?: ExecutionStrategyInvocation[];
|
|
33
|
+
executionStrategyCatalogItems?: TaskStrategyItemData[];
|
|
34
|
+
narrixInput?: NarrixRunInput | {
|
|
35
|
+
$path: string;
|
|
36
|
+
};
|
|
37
|
+
aiTasksOutputValidation?: {
|
|
38
|
+
schema: Record<string, unknown>;
|
|
39
|
+
mode?: 'fail' | 'warn';
|
|
40
|
+
validateWhenMissing?: boolean;
|
|
41
|
+
};
|
|
42
|
+
taskTypeId?: string;
|
|
43
|
+
modelConfig?: ModelConfigSelection;
|
|
44
|
+
llmCall?: LlmCallConfig;
|
|
45
|
+
stepRetryPolicy?: unknown;
|
|
46
|
+
concurrency?: number;
|
|
47
|
+
taskKind?: RunTaskRequest['taskKind'];
|
|
48
|
+
autoValidateDecisionOutput?: boolean;
|
|
49
|
+
identity?: Record<string, unknown>;
|
|
50
|
+
runTaskIdentity?: Record<string, unknown>;
|
|
51
|
+
memoryKey?: string;
|
|
52
|
+
narrixScope?: RunTaskRequest['narrixScope'];
|
|
53
|
+
aiScoping?: RunTaskRequest['aiScoping'];
|
|
54
|
+
aiScopingOptions?: RunTaskRequest['aiScopingOptions'];
|
|
55
|
+
timeoutMs?: number;
|
|
56
|
+
templateRenderOptions?: RunTaskRequest['templateRenderOptions'];
|
|
57
|
+
smartInputRenderOptions?: RunTaskRequest['smartInputRenderOptions'];
|
|
58
|
+
templateTokens?: RunTaskRequest['templateTokens'];
|
|
59
|
+
aiEngineId?: RunTaskRequest['aiEngineId'];
|
|
60
|
+
sessionId?: string;
|
|
61
|
+
agentType?: RunTaskRequest['agentType'];
|
|
62
|
+
gatewayDiagnostics?: RunTaskRequest['gatewayDiagnostics'];
|
|
63
|
+
context?: RunTaskRequest['context'];
|
|
64
|
+
knowledge?: RunTaskRequest['knowledge'];
|
|
65
|
+
/** deterministic-rule — rule table evaluated by `deterministic-rule` local skill */
|
|
66
|
+
rules?: Array<Record<string, unknown>>;
|
|
67
|
+
firstMatchWins?: boolean;
|
|
68
|
+
defaultOutput?: Record<string, unknown>;
|
|
69
|
+
sensitivityAnalysis?: Record<string, unknown>;
|
|
70
|
+
/** scoped-data-reader */
|
|
71
|
+
entityIdPath?: string;
|
|
72
|
+
pack?: TaskNodeScopedDataReaderPackSlot[];
|
|
73
|
+
memorixItemDescriptorId?: string;
|
|
74
|
+
itemDescriptorId?: string;
|
|
75
|
+
/** scoped-answer-writer */
|
|
76
|
+
memorixWriteDescriptors?: Partial<Record<string, string>>;
|
|
77
|
+
memorixContentTypes?: string[];
|
|
78
|
+
/** @deprecated Use {@link memorixWriteDescriptors}. */
|
|
79
|
+
memorixWriteDescriptorId?: string;
|
|
80
|
+
writeDescriptorId?: string;
|
|
81
|
+
entityTypePath?: string;
|
|
82
|
+
staticEntityType?: string;
|
|
83
|
+
payloadPath?: string;
|
|
84
|
+
questionTitle?: string;
|
|
85
|
+
phase?: 'A' | 'B';
|
|
86
|
+
seedThingIdPath?: string;
|
|
87
|
+
artifactThingType?: string;
|
|
88
|
+
xmemoryNamespace?: string;
|
|
89
|
+
/** scoped-answer-assembler */
|
|
90
|
+
mergeInferencePaths?: string[];
|
|
91
|
+
mergeDecisionPaths?: string[];
|
|
92
|
+
};
|
|
93
|
+
export declare function getTaskConfiguration(node: {
|
|
94
|
+
taskConfiguration?: TaskNodeTaskConfiguration;
|
|
95
|
+
}): TaskNodeTaskConfiguration | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
/** Read `version` from a package.json path; returns undefined if missing or unreadable. */
|
|
3
|
+
export async function readPackageVersion(packageJsonPath) {
|
|
4
|
+
try {
|
|
5
|
+
const raw = await readFile(packageJsonPath, 'utf-8');
|
|
6
|
+
const j = JSON.parse(raw);
|
|
7
|
+
return typeof j.version === 'string' ? j.version : undefined;
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TasksClientLike, RunTaskRequest, RunTaskResponse as ExellixGraphRunTaskResponse } from '../src/runtime/ExellixGraphRuntime.js';
|
|
2
|
+
/**
|
|
3
|
+
* Real tasks client that wraps @exellix/ai-tasks.
|
|
4
|
+
* Converts between exellix-graph's RunTaskRequest format and ai-tasks' expected format.
|
|
5
|
+
* Implements `TasksClientLike` (the canonical 5.x runtime client surface).
|
|
6
|
+
*/
|
|
7
|
+
export declare class RealTasksClient implements TasksClientLike {
|
|
8
|
+
close(): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Awaits `@exellix/ai-tasks` packaged client content-registry readiness (`testContentRegistryConnection`).
|
|
11
|
+
* On timeout, errors are swallowed so callers match prior non-fatal behavior; the first `runTask`
|
|
12
|
+
* may still fail with a concrete resolution error if the registry was not ready.
|
|
13
|
+
*/
|
|
14
|
+
warmup(timeoutMs?: number): Promise<void>;
|
|
15
|
+
runTask(req: RunTaskRequest): Promise<ExellixGraphRunTaskResponse>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { createCataloxFromEnv, createDefaultWorexClientTasks, initFirebaseAdminFromEnv, } from '@exellix/ai-tasks';
|
|
2
|
+
let packagedClientPromise = null;
|
|
3
|
+
function getPackagedClientPromise() {
|
|
4
|
+
packagedClientPromise ??= createDefaultWorexClientTasks({
|
|
5
|
+
packageName: 'XEONOX_SKILLS',
|
|
6
|
+
enableActivityTracking: true,
|
|
7
|
+
catalox: (() => {
|
|
8
|
+
initFirebaseAdminFromEnv();
|
|
9
|
+
return createCataloxFromEnv();
|
|
10
|
+
})(),
|
|
11
|
+
});
|
|
12
|
+
return packagedClientPromise;
|
|
13
|
+
}
|
|
14
|
+
async function closePackagedClient() {
|
|
15
|
+
const p = packagedClientPromise;
|
|
16
|
+
packagedClientPromise = null;
|
|
17
|
+
if (!p)
|
|
18
|
+
return;
|
|
19
|
+
try {
|
|
20
|
+
const sdk = await p;
|
|
21
|
+
await sdk.close();
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
/* creation or close failed */
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Real tasks client that wraps @exellix/ai-tasks.
|
|
29
|
+
* Converts between exellix-graph's RunTaskRequest format and ai-tasks' expected format.
|
|
30
|
+
* Implements `TasksClientLike` (the canonical 5.x runtime client surface).
|
|
31
|
+
*/
|
|
32
|
+
export class RealTasksClient {
|
|
33
|
+
async close() {
|
|
34
|
+
await closePackagedClient();
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Awaits `@exellix/ai-tasks` packaged client content-registry readiness (`testContentRegistryConnection`).
|
|
38
|
+
* On timeout, errors are swallowed so callers match prior non-fatal behavior; the first `runTask`
|
|
39
|
+
* may still fail with a concrete resolution error if the registry was not ready.
|
|
40
|
+
*/
|
|
41
|
+
async warmup(timeoutMs = 5_000) {
|
|
42
|
+
const sdk = await getPackagedClientPromise();
|
|
43
|
+
try {
|
|
44
|
+
await sdk.warmup({ timeoutMs });
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
/* non-fatal */
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
async runTask(req) {
|
|
51
|
+
try {
|
|
52
|
+
// Convert exellix-graph format to ai-tasks format
|
|
53
|
+
// Contract: skillKey is the content-registry instruction key; we do not send
|
|
54
|
+
// pre-parsed instructions — downstream must fetch template by key and parse it.
|
|
55
|
+
const skillKey = req.skillKey;
|
|
56
|
+
// Forward canonical graph-engine / ai-tasks v7 requests as-is (ai-tasks merges jobContext, variables, input).
|
|
57
|
+
const aiTasksRequest = {
|
|
58
|
+
...req,
|
|
59
|
+
skillKey,
|
|
60
|
+
jobId: req.jobId,
|
|
61
|
+
taskId: req.taskId,
|
|
62
|
+
agentId: req.agentId,
|
|
63
|
+
input: req.input != null ? req.input : {},
|
|
64
|
+
};
|
|
65
|
+
// Forward explicit graph/runtime modelConfig only; graph-engine does not inject model defaults.
|
|
66
|
+
const reqModelConfig = req.modelConfig;
|
|
67
|
+
if (reqModelConfig) {
|
|
68
|
+
aiTasksRequest.modelConfig = reqModelConfig;
|
|
69
|
+
}
|
|
70
|
+
if (req.executionPipeline != null) {
|
|
71
|
+
aiTasksRequest.executionPipeline = req.executionPipeline;
|
|
72
|
+
}
|
|
73
|
+
if (req.includeContextInPrompt !== undefined) {
|
|
74
|
+
aiTasksRequest.includeContextInPrompt = req.includeContextInPrompt;
|
|
75
|
+
}
|
|
76
|
+
if (req.outputValidation != null) {
|
|
77
|
+
aiTasksRequest.outputValidation = req.outputValidation;
|
|
78
|
+
}
|
|
79
|
+
if (req.diagnostics != null) {
|
|
80
|
+
aiTasksRequest.diagnostics = req.diagnostics;
|
|
81
|
+
}
|
|
82
|
+
if (process.env.DEBUG_AI_PROVIDER === 'true') {
|
|
83
|
+
const mc = aiTasksRequest.modelConfig;
|
|
84
|
+
const effective = mc
|
|
85
|
+
? { xynthesisModel: mc.xynthesisModel, skillModel: mc.skillModel }
|
|
86
|
+
: aiTasksRequest.config
|
|
87
|
+
? {
|
|
88
|
+
provider: aiTasksRequest.config.provider,
|
|
89
|
+
model: aiTasksRequest.config.model,
|
|
90
|
+
}
|
|
91
|
+
: { provider: '(none)', model: '(none)' };
|
|
92
|
+
console.log('[AI_PROVIDER] RealTasksClient → ai-tasks:', effective);
|
|
93
|
+
}
|
|
94
|
+
const sdk = await getPackagedClientPromise();
|
|
95
|
+
const response = await sdk.runTask(aiTasksRequest);
|
|
96
|
+
// Convert ai-tasks response to the unified format consumed by the canonical 5.x runtime.
|
|
97
|
+
// RunSkillResponse has: skillKey, rawText, flexMd, parsed, metadata
|
|
98
|
+
const result = {
|
|
99
|
+
...response,
|
|
100
|
+
success: true,
|
|
101
|
+
ok: true,
|
|
102
|
+
output: response.parsed,
|
|
103
|
+
parsed: response.parsed,
|
|
104
|
+
rawContent: response.rawText,
|
|
105
|
+
};
|
|
106
|
+
if (response.executionMemory !== undefined) {
|
|
107
|
+
result.executionMemory = response.executionMemory;
|
|
108
|
+
}
|
|
109
|
+
if (response.jobMemory !== undefined) {
|
|
110
|
+
result.jobMemory = response.jobMemory;
|
|
111
|
+
}
|
|
112
|
+
if (response.taskMemory !== undefined) {
|
|
113
|
+
result.taskMemory = response.taskMemory;
|
|
114
|
+
}
|
|
115
|
+
if (response.execution !== undefined) {
|
|
116
|
+
result.execution = response.execution;
|
|
117
|
+
}
|
|
118
|
+
// Prefer canonical executionMemory when execution is omitted.
|
|
119
|
+
if (result.execution === undefined && result.executionMemory !== undefined) {
|
|
120
|
+
result.execution = result.executionMemory;
|
|
121
|
+
}
|
|
122
|
+
// ai-tasks attaches synthesis observability on top-level metadata (see task-sdk attachExecutionStateAndObservability).
|
|
123
|
+
const sdkMeta = response.metadata ?? response.meta;
|
|
124
|
+
if (sdkMeta != null && typeof sdkMeta === 'object' && !Array.isArray(sdkMeta)) {
|
|
125
|
+
result.metadata = { ...result.metadata, ...sdkMeta };
|
|
126
|
+
result.meta = result.metadata;
|
|
127
|
+
}
|
|
128
|
+
return result;
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
const errorResponse = {
|
|
132
|
+
success: false,
|
|
133
|
+
ok: false,
|
|
134
|
+
error: {
|
|
135
|
+
code: error.code || 'TASK_RUN_FAILED',
|
|
136
|
+
message: error.message || 'Task execution failed',
|
|
137
|
+
diagnostics: { error, stack: error.stack, name: error.name, ...error },
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
return errorResponse;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
class DepEngine {
|
|
2
|
+
done = new Set();
|
|
3
|
+
outputs = {};
|
|
4
|
+
errors = {};
|
|
5
|
+
graph;
|
|
6
|
+
constructor(graph) {
|
|
7
|
+
this.graph = graph;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Update the active graph definition while keeping execution state (done/outputs/errors).
|
|
11
|
+
* This allows callers to pass derived graphs (e.g. conditional edges filtered per round).
|
|
12
|
+
*/
|
|
13
|
+
setGraph(graph) {
|
|
14
|
+
this.graph = graph;
|
|
15
|
+
}
|
|
16
|
+
depsOf(nodeId) {
|
|
17
|
+
// edge: { from, to } means "to depends on from"
|
|
18
|
+
return (this.graph.edges ?? [])
|
|
19
|
+
.filter((e) => e.to === nodeId)
|
|
20
|
+
.map((e) => e.from);
|
|
21
|
+
}
|
|
22
|
+
plan() {
|
|
23
|
+
const nodes = this.graph.nodes ?? [];
|
|
24
|
+
const runnable = nodes.filter((n) => {
|
|
25
|
+
if (this.done.has(n.id))
|
|
26
|
+
return false;
|
|
27
|
+
const deps = this.depsOf(n.id);
|
|
28
|
+
return deps.every((d) => this.done.has(d));
|
|
29
|
+
});
|
|
30
|
+
if (runnable.length)
|
|
31
|
+
return { status: 'continue', nextNodes: runnable };
|
|
32
|
+
const allDone = nodes.every((n) => this.done.has(n.id));
|
|
33
|
+
return allDone ? { status: 'completed', nextNodes: [] } : { status: 'blocked', nextNodes: [] };
|
|
34
|
+
}
|
|
35
|
+
commit(input) {
|
|
36
|
+
this.done.add(input.nodeId);
|
|
37
|
+
if (input.error)
|
|
38
|
+
this.errors[input.nodeId] = input.error;
|
|
39
|
+
if (input.output)
|
|
40
|
+
this.outputs[input.nodeId] = input.output;
|
|
41
|
+
}
|
|
42
|
+
snapshot() {
|
|
43
|
+
return {
|
|
44
|
+
done: Array.from(this.done),
|
|
45
|
+
outputs: this.outputs,
|
|
46
|
+
errors: this.errors,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export class DepGraphEngineFactory {
|
|
51
|
+
create(input) {
|
|
52
|
+
return new DepEngine(input.graph);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type BuildExellixGraphRuntimeObjectsInput, type RuntimeObjects } from '../src/runtime/runtimeObjects.js';
|
|
2
|
+
/**
|
|
3
|
+
* Best-effort read of `@exellix/ai-tasks` `runtimeObjects` export (when the SDK exposes it).
|
|
4
|
+
*/
|
|
5
|
+
export declare function tryLoadExellixAiTasksRuntimeSubtree(): Promise<BuildExellixGraphRuntimeObjectsInput['aiTasksRuntimeObjects'] | undefined>;
|
|
6
|
+
/** Composed exellix-graph + optional ai-tasks subtree (no graph-level Activix/Logxer unless you extend `input`). */
|
|
7
|
+
export declare function loadExellixGraphRuntimeObjects(input?: Omit<BuildExellixGraphRuntimeObjectsInput, 'aiTasksRuntimeObjects'>): Promise<RuntimeObjects>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { buildExellixGraphRuntimeObjects, } from '../src/runtime/runtimeObjects.js';
|
|
2
|
+
/**
|
|
3
|
+
* Best-effort read of `@exellix/ai-tasks` `runtimeObjects` export (when the SDK exposes it).
|
|
4
|
+
*/
|
|
5
|
+
export async function tryLoadExellixAiTasksRuntimeSubtree() {
|
|
6
|
+
try {
|
|
7
|
+
const mod = (await import('@exellix/ai-tasks'));
|
|
8
|
+
const ro = mod.runtimeObjects;
|
|
9
|
+
if (ro == null || typeof ro !== 'object')
|
|
10
|
+
return undefined;
|
|
11
|
+
return {
|
|
12
|
+
activixClient: ro.activixClient,
|
|
13
|
+
logxerClient: ro.logxerClient,
|
|
14
|
+
packagesRuntimeObjects: ro.packagesRuntimeObjects,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/** Composed exellix-graph + optional ai-tasks subtree (no graph-level Activix/Logxer unless you extend `input`). */
|
|
22
|
+
export async function loadExellixGraphRuntimeObjects(input = {}) {
|
|
23
|
+
const aiTasksRuntimeObjects = await tryLoadExellixAiTasksRuntimeSubtree();
|
|
24
|
+
return buildExellixGraphRuntimeObjects({ ...input, aiTasksRuntimeObjects });
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class InMemoryGraphLoader {
|
|
2
|
+
graphsById;
|
|
3
|
+
constructor(graphsById) {
|
|
4
|
+
this.graphsById = graphsById;
|
|
5
|
+
}
|
|
6
|
+
async loadGraph(graphId) {
|
|
7
|
+
const g = this.graphsById[graphId];
|
|
8
|
+
if (!g)
|
|
9
|
+
throw new Error(`GRAPH_NOT_FOUND: ${graphId}`);
|
|
10
|
+
return g;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { InMemoryGraphLoader } from './inMemoryGraphLoader.js';
|
|
2
|
+
export { DepGraphEngineFactory } from './depGraphEngineFactory.js';
|
|
3
|
+
export { RealTasksClient } from './RealTasksClient.js';
|
|
4
|
+
export { tryLoadExellixAiTasksRuntimeSubtree, loadExellixGraphRuntimeObjects, } from './exellixRuntimeObjects.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { InMemoryGraphLoader } from './inMemoryGraphLoader.js';
|
|
2
|
+
export { DepGraphEngineFactory } from './depGraphEngineFactory.js';
|
|
3
|
+
export { RealTasksClient } from './RealTasksClient.js';
|
|
4
|
+
export { tryLoadExellixAiTasksRuntimeSubtree, loadExellixGraphRuntimeObjects, } from './exellixRuntimeObjects.js';
|