@decaf-ts/as-graph 0.2.1 → 0.4.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/README.md +158 -2
- package/dist/as-graph.cjs +1 -1
- package/dist/as-graph.cjs.map +1 -1
- package/dist/as-graph.js +1 -1
- package/dist/as-graph.js.map +1 -1
- package/lib/cjs/dagster/DagsterGraphEventBridge.cjs +344 -0
- package/lib/cjs/dagster/DagsterGraphEventBridge.cjs.map +1 -0
- package/lib/cjs/dagster/DagsterGraphExecutionBackend.cjs +789 -0
- package/lib/cjs/dagster/DagsterGraphExecutionBackend.cjs.map +1 -0
- package/lib/cjs/dagster/DagsterResultMapper.cjs +56 -0
- package/lib/cjs/dagster/DagsterResultMapper.cjs.map +1 -0
- package/lib/cjs/dagster/DagsterTypes.cjs +4 -0
- package/lib/cjs/dagster/DagsterTypes.cjs.map +1 -0
- package/lib/cjs/dagster/capabilities.cjs +102 -0
- package/lib/cjs/dagster/capabilities.cjs.map +1 -0
- package/lib/cjs/dagster/constants.cjs +92 -0
- package/lib/cjs/dagster/constants.cjs.map +1 -0
- package/lib/cjs/dagster/index.cjs +32 -0
- package/lib/cjs/dagster/index.cjs.map +1 -0
- package/lib/cjs/engine/constants.cjs +6 -1
- package/lib/cjs/engine/constants.cjs.map +1 -1
- package/lib/cjs/engine/execution/GraphCodeMode.cjs +137 -0
- package/lib/cjs/engine/execution/GraphCodeMode.cjs.map +1 -0
- package/lib/cjs/engine/execution/GraphExecutionBackend.cjs +89 -0
- package/lib/cjs/engine/execution/GraphExecutionBackend.cjs.map +1 -0
- package/lib/cjs/engine/execution/GraphExecutionBackendRegistry.cjs +107 -0
- package/lib/cjs/engine/execution/GraphExecutionBackendRegistry.cjs.map +1 -0
- package/lib/cjs/engine/execution/GraphExecutionEngine.cjs +250 -733
- package/lib/cjs/engine/execution/GraphExecutionEngine.cjs.map +1 -1
- package/lib/cjs/engine/execution/LocalGraphExecutionBackend.cjs +804 -0
- package/lib/cjs/engine/execution/LocalGraphExecutionBackend.cjs.map +1 -0
- package/lib/cjs/engine/execution/index.cjs +4 -0
- package/lib/cjs/engine/execution/index.cjs.map +1 -1
- package/lib/cjs/engine/index.cjs +4 -0
- package/lib/cjs/engine/index.cjs.map +1 -1
- package/lib/cjs/engine/runs/GraphRunService.cjs +61 -0
- package/lib/cjs/engine/runs/GraphRunService.cjs.map +1 -1
- package/lib/cjs/engine/services/GraphWorkflowService.cjs +33 -14
- package/lib/cjs/engine/services/GraphWorkflowService.cjs.map +1 -1
- package/lib/cjs/mastra/MastraCapabilities.cjs +171 -0
- package/lib/cjs/mastra/MastraCapabilities.cjs.map +1 -0
- package/lib/cjs/mastra/MastraConditionBridge.cjs +39 -0
- package/lib/cjs/mastra/MastraConditionBridge.cjs.map +1 -0
- package/lib/cjs/mastra/MastraEventBridge.cjs +486 -0
- package/lib/cjs/mastra/MastraEventBridge.cjs.map +1 -0
- package/lib/cjs/mastra/MastraGraphExecutionBackend.cjs +351 -0
- package/lib/cjs/mastra/MastraGraphExecutionBackend.cjs.map +1 -0
- package/lib/cjs/mastra/MastraResumeGuard.cjs +127 -0
- package/lib/cjs/mastra/MastraResumeGuard.cjs.map +1 -0
- package/lib/cjs/mastra/MastraSchemaConverter.cjs +124 -0
- package/lib/cjs/mastra/MastraSchemaConverter.cjs.map +1 -0
- package/lib/cjs/mastra/MastraWorkflowCompiler.cjs +461 -0
- package/lib/cjs/mastra/MastraWorkflowCompiler.cjs.map +1 -0
- package/lib/cjs/mastra/MastraWorkflowManager.cjs +401 -0
- package/lib/cjs/mastra/MastraWorkflowManager.cjs.map +1 -0
- package/lib/cjs/mastra/index.cjs +35 -0
- package/lib/cjs/mastra/index.cjs.map +1 -0
- package/lib/cjs/mastra/types.cjs +34 -0
- package/lib/cjs/mastra/types.cjs.map +1 -0
- package/lib/cjs/nest/graph/GraphEngineCapabilityManifest.cjs +136 -0
- package/lib/cjs/nest/graph/GraphEngineCapabilityManifest.cjs.map +1 -0
- package/lib/cjs/nest/graph/GraphEngineCapabilityService.cjs +140 -0
- package/lib/cjs/nest/graph/GraphEngineCapabilityService.cjs.map +1 -0
- package/lib/cjs/nest/graph/GraphEngineController.cjs +227 -0
- package/lib/cjs/nest/graph/GraphEngineController.cjs.map +1 -0
- package/lib/cjs/nest/graph/GraphExecutionModule.cjs +30 -2
- package/lib/cjs/nest/graph/GraphExecutionModule.cjs.map +1 -1
- package/lib/cjs/nest/graph/index.cjs +3 -0
- package/lib/cjs/nest/graph/index.cjs.map +1 -1
- package/lib/cjs/nest/graph/main.cjs +54 -0
- package/lib/cjs/nest/graph/main.cjs.map +1 -0
- package/lib/cjs/nest/graph/servingErrors.cjs +3 -0
- package/lib/cjs/nest/graph/servingErrors.cjs.map +1 -1
- package/lib/cjs/node/utility/code/node.cjs +11 -3
- package/lib/cjs/node/utility/code/node.cjs.map +1 -1
- package/lib/cjs/shared/graph/catalog/GraphManifestCompiler.cjs +2 -3
- package/lib/cjs/shared/graph/catalog/GraphManifestCompiler.cjs.map +1 -1
- package/lib/cjs/shared/graph/constants.cjs +8 -0
- package/lib/cjs/shared/graph/constants.cjs.map +1 -1
- package/lib/cjs/shared/graph/index.cjs +2 -1
- package/lib/cjs/shared/graph/index.cjs.map +1 -1
- package/lib/cjs/shared/graph/layout/GraphWorkflowLayout.cjs +146 -0
- package/lib/cjs/shared/graph/layout/GraphWorkflowLayout.cjs.map +1 -0
- package/lib/cjs/shared/graph/layout/index.cjs +23 -0
- package/lib/cjs/shared/graph/layout/index.cjs.map +1 -0
- package/lib/cjs/shared/graph/layout/layout-options.cjs +93 -0
- package/lib/cjs/shared/graph/layout/layout-options.cjs.map +1 -0
- package/lib/cjs/shared/ui/index.cjs +8 -10
- package/lib/cjs/shared/ui/index.cjs.map +1 -1
- package/lib/esm/dagster/DagsterGraphEventBridge.js +339 -0
- package/lib/esm/dagster/DagsterGraphEventBridge.js.map +1 -0
- package/lib/esm/dagster/DagsterGraphExecutionBackend.js +781 -0
- package/lib/esm/dagster/DagsterGraphExecutionBackend.js.map +1 -0
- package/lib/esm/dagster/DagsterResultMapper.js +51 -0
- package/lib/esm/dagster/DagsterResultMapper.js.map +1 -0
- package/lib/esm/dagster/DagsterTypes.js +2 -0
- package/lib/esm/dagster/DagsterTypes.js.map +1 -0
- package/lib/esm/dagster/capabilities.js +97 -0
- package/lib/esm/dagster/capabilities.js.map +1 -0
- package/lib/esm/dagster/constants.js +88 -0
- package/lib/esm/dagster/constants.js.map +1 -0
- package/lib/esm/dagster/index.js +15 -0
- package/lib/esm/dagster/index.js.map +1 -0
- package/lib/esm/engine/constants.js +5 -0
- package/lib/esm/engine/constants.js.map +1 -1
- package/lib/esm/engine/execution/GraphCodeMode.js +132 -0
- package/lib/esm/engine/execution/GraphCodeMode.js.map +1 -0
- package/lib/esm/engine/execution/GraphExecutionBackend.js +83 -0
- package/lib/esm/engine/execution/GraphExecutionBackend.js.map +1 -0
- package/lib/esm/engine/execution/GraphExecutionBackendRegistry.js +102 -0
- package/lib/esm/engine/execution/GraphExecutionBackendRegistry.js.map +1 -0
- package/lib/esm/engine/execution/GraphExecutionEngine.js +232 -716
- package/lib/esm/engine/execution/GraphExecutionEngine.js.map +1 -1
- package/lib/esm/engine/execution/LocalGraphExecutionBackend.js +799 -0
- package/lib/esm/engine/execution/LocalGraphExecutionBackend.js.map +1 -0
- package/lib/esm/engine/execution/index.js +4 -0
- package/lib/esm/engine/execution/index.js.map +1 -1
- package/lib/esm/engine/index.js +4 -0
- package/lib/esm/engine/index.js.map +1 -1
- package/lib/esm/engine/runs/GraphRunService.js +62 -1
- package/lib/esm/engine/runs/GraphRunService.js.map +1 -1
- package/lib/esm/engine/services/GraphWorkflowService.js +33 -14
- package/lib/esm/engine/services/GraphWorkflowService.js.map +1 -1
- package/lib/esm/mastra/MastraCapabilities.js +164 -0
- package/lib/esm/mastra/MastraCapabilities.js.map +1 -0
- package/lib/esm/mastra/MastraConditionBridge.js +34 -0
- package/lib/esm/mastra/MastraConditionBridge.js.map +1 -0
- package/lib/esm/mastra/MastraEventBridge.js +481 -0
- package/lib/esm/mastra/MastraEventBridge.js.map +1 -0
- package/lib/esm/mastra/MastraGraphExecutionBackend.js +346 -0
- package/lib/esm/mastra/MastraGraphExecutionBackend.js.map +1 -0
- package/lib/esm/mastra/MastraResumeGuard.js +123 -0
- package/lib/esm/mastra/MastraResumeGuard.js.map +1 -0
- package/lib/esm/mastra/MastraSchemaConverter.js +119 -0
- package/lib/esm/mastra/MastraSchemaConverter.js.map +1 -0
- package/lib/esm/mastra/MastraWorkflowCompiler.js +456 -0
- package/lib/esm/mastra/MastraWorkflowCompiler.js.map +1 -0
- package/lib/esm/mastra/MastraWorkflowManager.js +396 -0
- package/lib/esm/mastra/MastraWorkflowManager.js.map +1 -0
- package/lib/esm/mastra/index.js +18 -0
- package/lib/esm/mastra/index.js.map +1 -0
- package/lib/esm/mastra/types.js +30 -0
- package/lib/esm/mastra/types.js.map +1 -0
- package/lib/esm/nest/graph/GraphEngineCapabilityManifest.js +129 -0
- package/lib/esm/nest/graph/GraphEngineCapabilityManifest.js.map +1 -0
- package/lib/esm/nest/graph/GraphEngineCapabilityService.js +131 -0
- package/lib/esm/nest/graph/GraphEngineCapabilityService.js.map +1 -0
- package/lib/esm/nest/graph/GraphEngineController.js +218 -0
- package/lib/esm/nest/graph/GraphEngineController.js.map +1 -0
- package/lib/esm/nest/graph/GraphExecutionModule.js +30 -2
- package/lib/esm/nest/graph/GraphExecutionModule.js.map +1 -1
- package/lib/esm/nest/graph/index.js +3 -0
- package/lib/esm/nest/graph/index.js.map +1 -1
- package/lib/esm/nest/graph/main.js +51 -0
- package/lib/esm/nest/graph/main.js.map +1 -0
- package/lib/esm/nest/graph/servingErrors.js +3 -0
- package/lib/esm/nest/graph/servingErrors.js.map +1 -1
- package/lib/esm/node/utility/code/node.js +11 -3
- package/lib/esm/node/utility/code/node.js.map +1 -1
- package/lib/esm/shared/graph/GraphExecutionStateMapper.js.map +1 -1
- package/lib/esm/shared/graph/catalog/GraphManifestCompiler.js +2 -3
- package/lib/esm/shared/graph/catalog/GraphManifestCompiler.js.map +1 -1
- package/lib/esm/shared/graph/constants.js +8 -0
- package/lib/esm/shared/graph/constants.js.map +1 -1
- package/lib/esm/shared/graph/index.js +2 -1
- package/lib/esm/shared/graph/index.js.map +1 -1
- package/lib/esm/shared/graph/layout/GraphWorkflowLayout.js +107 -0
- package/lib/esm/shared/graph/layout/GraphWorkflowLayout.js.map +1 -0
- package/lib/esm/shared/graph/layout/index.js +6 -0
- package/lib/esm/shared/graph/layout/index.js.map +1 -0
- package/lib/esm/shared/graph/layout/layout-options.js +96 -0
- package/lib/esm/shared/graph/layout/layout-options.js.map +1 -0
- package/lib/esm/shared/ui/index.js +8 -10
- package/lib/esm/shared/ui/index.js.map +1 -1
- package/lib/types/dagster/DagsterGraphEventBridge.d.cts +142 -0
- package/lib/types/dagster/DagsterGraphEventBridge.d.mts +142 -0
- package/lib/types/dagster/DagsterGraphExecutionBackend.d.cts +323 -0
- package/lib/types/dagster/DagsterGraphExecutionBackend.d.mts +323 -0
- package/lib/types/dagster/DagsterResultMapper.d.cts +50 -0
- package/lib/types/dagster/DagsterResultMapper.d.mts +50 -0
- package/lib/types/dagster/DagsterTypes.d.cts +355 -0
- package/lib/types/dagster/DagsterTypes.d.mts +355 -0
- package/lib/types/dagster/capabilities.d.cts +34 -0
- package/lib/types/dagster/capabilities.d.mts +34 -0
- package/lib/types/dagster/constants.d.cts +87 -0
- package/lib/types/dagster/constants.d.mts +87 -0
- package/lib/types/dagster/index.d.cts +14 -0
- package/lib/types/dagster/index.d.mts +14 -0
- package/lib/types/engine/constants.d.cts +5 -0
- package/lib/types/engine/constants.d.mts +5 -0
- package/lib/types/engine/execution/GraphCodeMode.d.cts +52 -0
- package/lib/types/engine/execution/GraphCodeMode.d.mts +52 -0
- package/lib/types/engine/execution/GraphExecutionBackend.d.cts +306 -0
- package/lib/types/engine/execution/GraphExecutionBackend.d.mts +306 -0
- package/lib/types/engine/execution/GraphExecutionBackendRegistry.d.cts +59 -0
- package/lib/types/engine/execution/GraphExecutionBackendRegistry.d.mts +59 -0
- package/lib/types/engine/execution/GraphExecutionEngine.d.cts +116 -135
- package/lib/types/engine/execution/GraphExecutionEngine.d.mts +116 -135
- package/lib/types/engine/execution/LocalGraphExecutionBackend.d.cts +232 -0
- package/lib/types/engine/execution/LocalGraphExecutionBackend.d.mts +232 -0
- package/lib/types/engine/execution/index.d.cts +4 -0
- package/lib/types/engine/execution/index.d.mts +4 -0
- package/lib/types/engine/index.d.cts +4 -0
- package/lib/types/engine/index.d.mts +4 -0
- package/lib/types/engine/runs/GraphRunService.d.cts +19 -0
- package/lib/types/engine/runs/GraphRunService.d.mts +19 -0
- package/lib/types/engine/services/GraphWorkflowService.d.cts +22 -0
- package/lib/types/engine/services/GraphWorkflowService.d.mts +22 -0
- package/lib/types/mastra/MastraCapabilities.d.cts +91 -0
- package/lib/types/mastra/MastraCapabilities.d.mts +91 -0
- package/lib/types/mastra/MastraConditionBridge.d.cts +38 -0
- package/lib/types/mastra/MastraConditionBridge.d.mts +38 -0
- package/lib/types/mastra/MastraEventBridge.d.cts +189 -0
- package/lib/types/mastra/MastraEventBridge.d.mts +189 -0
- package/lib/types/mastra/MastraGraphExecutionBackend.d.cts +119 -0
- package/lib/types/mastra/MastraGraphExecutionBackend.d.mts +119 -0
- package/lib/types/mastra/MastraResumeGuard.d.cts +58 -0
- package/lib/types/mastra/MastraResumeGuard.d.mts +58 -0
- package/lib/types/mastra/MastraSchemaConverter.d.cts +39 -0
- package/lib/types/mastra/MastraSchemaConverter.d.mts +39 -0
- package/lib/types/mastra/MastraWorkflowCompiler.d.cts +218 -0
- package/lib/types/mastra/MastraWorkflowCompiler.d.mts +218 -0
- package/lib/types/mastra/MastraWorkflowManager.d.cts +220 -0
- package/lib/types/mastra/MastraWorkflowManager.d.mts +220 -0
- package/lib/types/mastra/index.d.cts +17 -0
- package/lib/types/mastra/index.d.mts +17 -0
- package/lib/types/mastra/types.d.cts +222 -0
- package/lib/types/mastra/types.d.mts +222 -0
- package/lib/types/nest/graph/GraphEngineCapabilityManifest.d.cts +87 -0
- package/lib/types/nest/graph/GraphEngineCapabilityManifest.d.mts +87 -0
- package/lib/types/nest/graph/GraphEngineCapabilityService.d.cts +98 -0
- package/lib/types/nest/graph/GraphEngineCapabilityService.d.mts +98 -0
- package/lib/types/nest/graph/GraphEngineController.d.cts +74 -0
- package/lib/types/nest/graph/GraphEngineController.d.mts +74 -0
- package/lib/types/nest/graph/GraphExecutionModule.d.cts +8 -0
- package/lib/types/nest/graph/GraphExecutionModule.d.mts +8 -0
- package/lib/types/nest/graph/index.d.cts +3 -0
- package/lib/types/nest/graph/index.d.mts +3 -0
- package/lib/types/nest/graph/main.d.cts +1 -0
- package/lib/types/nest/graph/main.d.mts +1 -0
- package/lib/types/nest/graph/servingErrors.d.cts +3 -1
- package/lib/types/nest/graph/servingErrors.d.mts +3 -1
- package/lib/types/node/utility/code/node.d.cts +1 -1
- package/lib/types/node/utility/code/node.d.mts +1 -1
- package/lib/types/shared/graph/GraphExecutionStateMapper.d.cts +5 -5
- package/lib/types/shared/graph/GraphExecutionStateMapper.d.mts +5 -5
- package/lib/types/shared/graph/constants.d.cts +8 -0
- package/lib/types/shared/graph/constants.d.mts +8 -0
- package/lib/types/shared/graph/index.d.cts +2 -1
- package/lib/types/shared/graph/index.d.mts +2 -1
- package/lib/types/shared/graph/layout/GraphWorkflowLayout.d.cts +49 -0
- package/lib/types/shared/graph/layout/GraphWorkflowLayout.d.mts +49 -0
- package/lib/types/shared/graph/layout/index.d.cts +5 -0
- package/lib/types/shared/graph/layout/index.d.mts +5 -0
- package/lib/types/shared/graph/layout/layout-options.d.cts +46 -0
- package/lib/types/shared/graph/layout/layout-options.d.mts +46 -0
- package/lib/types/shared/graph/types.d.cts +4 -3
- package/lib/types/shared/graph/types.d.mts +4 -3
- package/lib/types/shared/ui/index.d.cts +8 -10
- package/lib/types/shared/ui/index.d.mts +8 -10
- package/package.json +49 -6
- package/lib/cjs/shared/ui/GraphNodeView.cjs +0 -114
- package/lib/cjs/shared/ui/GraphNodeView.cjs.map +0 -1
- package/lib/cjs/shared/ui/GraphRunView.cjs +0 -96
- package/lib/cjs/shared/ui/GraphRunView.cjs.map +0 -1
- package/lib/cjs/shared/ui/GraphWorkflowView.cjs +0 -78
- package/lib/cjs/shared/ui/GraphWorkflowView.cjs.map +0 -1
- package/lib/cjs/shared/ui/types.cjs +0 -4
- package/lib/cjs/shared/ui/types.cjs.map +0 -1
- package/lib/esm/shared/ui/GraphNodeView.js +0 -107
- package/lib/esm/shared/ui/GraphNodeView.js.map +0 -1
- package/lib/esm/shared/ui/GraphRunView.js +0 -90
- package/lib/esm/shared/ui/GraphRunView.js.map +0 -1
- package/lib/esm/shared/ui/GraphWorkflowView.js +0 -72
- package/lib/esm/shared/ui/GraphWorkflowView.js.map +0 -1
- package/lib/esm/shared/ui/types.js +0 -2
- package/lib/esm/shared/ui/types.js.map +0 -1
- package/lib/types/shared/ui/GraphNodeView.d.cts +0 -48
- package/lib/types/shared/ui/GraphNodeView.d.mts +0 -48
- package/lib/types/shared/ui/GraphRunView.d.cts +0 -88
- package/lib/types/shared/ui/GraphRunView.d.mts +0 -88
- package/lib/types/shared/ui/GraphWorkflowView.d.cts +0 -18
- package/lib/types/shared/ui/GraphWorkflowView.d.mts +0 -18
- package/lib/types/shared/ui/types.d.cts +0 -200
- package/lib/types/shared/ui/types.d.mts +0 -200
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module as-graph/dagster/DagsterTypes
|
|
3
|
+
* @summary Capability, inspection, run, execution, and client-port types for the
|
|
4
|
+
* Dagster backend.
|
|
5
|
+
* @description The Dagster driver never authors workflows and never generates,
|
|
6
|
+
* embeds, or emits Python source. It may list, look up, inspect, and surface
|
|
7
|
+
* ALREADY-EXISTING Dagster workflows through the host-injected
|
|
8
|
+
* {@link DagsterClient} port, and — only behind the explicit
|
|
9
|
+
* {@link DagsterGraphExecutionBackendConfig.executionEnabled} gate — launch a run
|
|
10
|
+
* of an already-deployed job and re-execute an existing run. The wrapper never
|
|
11
|
+
* bundles a phantom JavaScript Dagster runtime.
|
|
12
|
+
*/
|
|
13
|
+
import type { GraphExecutionEventSink } from "../engine/execution/GraphExecutionBackend.d.cts";
|
|
14
|
+
/**
|
|
15
|
+
* A capability verdict row in the exported Dagster capability table.
|
|
16
|
+
*/
|
|
17
|
+
export type DagsterCapabilityVerdict = "supported" | "not_supported" | "extension_point";
|
|
18
|
+
/**
|
|
19
|
+
* A single row of the exported Dagster capability table.
|
|
20
|
+
*/
|
|
21
|
+
export interface DagsterCapabilityRow {
|
|
22
|
+
/** The engine feature being described. */
|
|
23
|
+
feature: string;
|
|
24
|
+
/** Whether Dagster supports it natively, not at all, or via an extension point. */
|
|
25
|
+
verdict: DagsterCapabilityVerdict;
|
|
26
|
+
/** Human-readable detail for the verdict. */
|
|
27
|
+
detail: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A raw Dagster event record surfaced by the client port.
|
|
31
|
+
*/
|
|
32
|
+
export interface DagsterEventRecord {
|
|
33
|
+
/** Raw Dagster event type (e.g. `STEP_START`, `STEP_SUCCESS`). */
|
|
34
|
+
type: string;
|
|
35
|
+
/** Dagster step key; maps to a canonical node id via the inspected job map. */
|
|
36
|
+
stepKey?: string;
|
|
37
|
+
/** ISO-8601 event timestamp. */
|
|
38
|
+
timestamp?: string;
|
|
39
|
+
/** Raw event payload (outputs, errors, ...). */
|
|
40
|
+
payload?: Record<string, unknown>;
|
|
41
|
+
/** Raw human-readable message. */
|
|
42
|
+
message?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The raw Dagster run-status vocabulary the driver may receive. Only `success`,
|
|
46
|
+
* `failure`, and `canceled` are terminal; `started` and the real Dagster pending
|
|
47
|
+
* statuses (`QUEUED`/`STARTING`) are non-terminal and must be polled to a terminal
|
|
48
|
+
* state, a caller abort, or a timeout (C5 fail-closed).
|
|
49
|
+
*/
|
|
50
|
+
export type DagsterRunStatus = "started" | "success" | "failure" | "canceled" | "QUEUED" | "STARTING";
|
|
51
|
+
/**
|
|
52
|
+
* A Dagster run record. Carries the run's status and, when the port exposes it,
|
|
53
|
+
* the name of the deployed job that owns the run (`jobName`/`pipelineName`), so the
|
|
54
|
+
* driver can bind a run to the workflow it belongs to before replaying it (C1).
|
|
55
|
+
*/
|
|
56
|
+
export interface DagsterRunRecord {
|
|
57
|
+
/** Dagster run id. */
|
|
58
|
+
runId: string;
|
|
59
|
+
/** Run status. Only `success`/`failure`/`canceled` are terminal. */
|
|
60
|
+
status: DagsterRunStatus;
|
|
61
|
+
/** Workflow output values, when the client exposes them. */
|
|
62
|
+
outputs?: Record<string, unknown>;
|
|
63
|
+
/** Run failure, when the run failed. */
|
|
64
|
+
error?: {
|
|
65
|
+
message: string;
|
|
66
|
+
code?: string;
|
|
67
|
+
};
|
|
68
|
+
/** Run start timestamp. */
|
|
69
|
+
startedAt?: string;
|
|
70
|
+
/** Run finish timestamp. */
|
|
71
|
+
finishedAt?: string;
|
|
72
|
+
/** Name of the deployed job that owns the run, when the port exposes it. */
|
|
73
|
+
jobName?: string;
|
|
74
|
+
/** Legacy alias of {@link DagsterRunRecord.jobName}, when the port exposes it. */
|
|
75
|
+
pipelineName?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The handle a client port returns when it launches or re-executes a run. Carries
|
|
79
|
+
* the new Dagster run id and its (initial or terminal) status; the driver then
|
|
80
|
+
* observes the run through the existing event bridge.
|
|
81
|
+
*/
|
|
82
|
+
export interface DagsterLaunchedRun {
|
|
83
|
+
/** Dagster run id of the launched/re-executed run. */
|
|
84
|
+
runId: string;
|
|
85
|
+
/**
|
|
86
|
+
* Run status reported by the launch; `started` for a fresh launch, but a real
|
|
87
|
+
* transport may report a pending `QUEUED`/`STARTING` status the driver then
|
|
88
|
+
* polls to terminal.
|
|
89
|
+
*/
|
|
90
|
+
status: DagsterRunStatus;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* A request to launch a run of an ALREADY-DEPLOYED Dagster job. The driver only
|
|
94
|
+
* ever sends this behind the explicit execution gate; it never authors a job, op,
|
|
95
|
+
* or Python source — it asks the host transport to launch a job the deployment
|
|
96
|
+
* already defines.
|
|
97
|
+
*/
|
|
98
|
+
export interface DagsterLaunchRunRequest {
|
|
99
|
+
/** Name of the already-deployed job to launch. */
|
|
100
|
+
jobName: string;
|
|
101
|
+
/**
|
|
102
|
+
* Optional raw Dagster run configuration (the job's `runConfigData`). The host
|
|
103
|
+
* transport forwards it verbatim; the driver never synthesizes it.
|
|
104
|
+
*/
|
|
105
|
+
runConfig?: Record<string, unknown>;
|
|
106
|
+
/** Optional run tags (merged by the host with any transport-owned tags). */
|
|
107
|
+
tags?: Record<string, string>;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* A request to re-execute (replay) an EXISTING Dagster run, sent to the host
|
|
111
|
+
* {@link DagsterClient} port. The host transport owns the mechanism: where the
|
|
112
|
+
* GraphQL surface exposes a re-execution mutation it re-executes from the run id,
|
|
113
|
+
* otherwise it re-launches the run's job with the run's original configuration.
|
|
114
|
+
* The driver never authors a job or Python source.
|
|
115
|
+
*/
|
|
116
|
+
export interface DagsterReplayRunRequest {
|
|
117
|
+
/** Dagster run id of the existing run to replay. */
|
|
118
|
+
dagsterRunId: string;
|
|
119
|
+
/** Optional name of the run's job, when the transport needs it to re-launch. */
|
|
120
|
+
jobName?: string;
|
|
121
|
+
/** Optional run tags (merged by the host with any transport-owned tags). */
|
|
122
|
+
tags?: Record<string, string>;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* A request to replay an EXISTING Dagster run through
|
|
126
|
+
* {@link DagsterGraphExecutionBackend.replayRun}. Carries the run identity, the
|
|
127
|
+
* workflow it belongs to, the facade-owned event sink, and the same observation
|
|
128
|
+
* bounds as {@link DagsterObserveRunRequest}. The driver delegates the actual
|
|
129
|
+
* re-execution to the host transport's `replayRun` and then observes the new run.
|
|
130
|
+
*/
|
|
131
|
+
export interface DagsterReplayExistingRunRequest {
|
|
132
|
+
/** Dagster run id of the existing run to replay. */
|
|
133
|
+
dagsterRunId: string;
|
|
134
|
+
/** Canonical workflow id (Dagster job name) the run belongs to. */
|
|
135
|
+
workflowId: string;
|
|
136
|
+
/** Facade-owned event sink the driver reports transitions through. */
|
|
137
|
+
events: GraphExecutionEventSink;
|
|
138
|
+
/** Canonical as-graph run id carried on emitted events; defaults to the new run id. */
|
|
139
|
+
graphRunId?: string;
|
|
140
|
+
/** Workflow input values carried onto the canonical result. */
|
|
141
|
+
inputs?: Record<string, unknown>;
|
|
142
|
+
/** Execution options metadata carried onto the canonical result. */
|
|
143
|
+
metadata?: Record<string, unknown>;
|
|
144
|
+
/** Caller cancellation signal, forwarded to the observation bridge. */
|
|
145
|
+
signal?: AbortSignal;
|
|
146
|
+
/** Hard cap on the number of events the bridge processes. */
|
|
147
|
+
maxEvents?: number;
|
|
148
|
+
/** Hard cap on the transport pagination depth. */
|
|
149
|
+
maxPages?: number;
|
|
150
|
+
/** Maximum time to await the terminal record. */
|
|
151
|
+
terminalTimeoutMs?: number;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* A subscription to a Dagster run's event stream.
|
|
155
|
+
*/
|
|
156
|
+
export interface DagsterRunSubscription {
|
|
157
|
+
/** Stops the subscription. */
|
|
158
|
+
unsubscribe: () => void | Promise<void>;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Bounds applied to a run-event subscription. The read-only driver passes these
|
|
162
|
+
* through to the host-injected {@link DagsterClient} so a wedged or hostile
|
|
163
|
+
* gateway cannot make the transport page or buffer without limit: `signal` cancels
|
|
164
|
+
* in-flight transport work, `maxEvents` caps the number of events replayed, and
|
|
165
|
+
* `maxPages` caps the pagination depth. Every field is optional so a host port that
|
|
166
|
+
* predates them keeps working.
|
|
167
|
+
*/
|
|
168
|
+
export interface DagsterRunSubscriptionOptions {
|
|
169
|
+
/** Cancels the subscription and any in-flight transport work. */
|
|
170
|
+
signal?: AbortSignal;
|
|
171
|
+
/** Hard cap on the number of events the transport replays. */
|
|
172
|
+
maxEvents?: number;
|
|
173
|
+
/** Hard cap on the number of pagination pages the transport fetches. */
|
|
174
|
+
maxPages?: number;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* A Dagster job summary surfaced by workflow listing.
|
|
178
|
+
*/
|
|
179
|
+
export interface DagsterJobSummary {
|
|
180
|
+
/** Job name. */
|
|
181
|
+
name: string;
|
|
182
|
+
/** Optional description. */
|
|
183
|
+
description?: string;
|
|
184
|
+
/** Optional last-update timestamp. */
|
|
185
|
+
updatedAt?: Date;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* One op/step of a deployed Dagster job, as exposed by the client port.
|
|
189
|
+
* `nodeId` and `kind` are optional because a deployment may not classify its ops;
|
|
190
|
+
* the driver falls back to the op `name` and {@link DAGSTER_DEFAULT_NODE_KIND}.
|
|
191
|
+
*/
|
|
192
|
+
export interface DagsterJobOp {
|
|
193
|
+
/** Dagster op/step name. */
|
|
194
|
+
name: string;
|
|
195
|
+
/** Canonical node id, when the deployment exposes one. */
|
|
196
|
+
nodeId?: string;
|
|
197
|
+
/** Canonical node kind, when the deployment exposes one. */
|
|
198
|
+
kind?: string;
|
|
199
|
+
/** Op input names, when the deployment exposes them. */
|
|
200
|
+
inputs?: string[];
|
|
201
|
+
/** Op output names, when the deployment exposes them. */
|
|
202
|
+
outputs?: string[];
|
|
203
|
+
/** Asset keys the op materializes, when the deployment exposes them. */
|
|
204
|
+
assetKeys?: string[];
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* A directed op dependency of a deployed Dagster job: `from` feeds `to`.
|
|
208
|
+
*/
|
|
209
|
+
export interface DagsterJobDependency {
|
|
210
|
+
/** Upstream op name. */
|
|
211
|
+
from: string;
|
|
212
|
+
/** Downstream op name. */
|
|
213
|
+
to: string;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* A schedule declared by a deployed Dagster job, when the deployment exposes it.
|
|
217
|
+
*/
|
|
218
|
+
export interface DagsterJobSchedule {
|
|
219
|
+
/** Schedule name. */
|
|
220
|
+
name: string;
|
|
221
|
+
/** Cron expression, when exposed. */
|
|
222
|
+
cron?: string;
|
|
223
|
+
/** IANA timezone, when exposed. */
|
|
224
|
+
timezone?: string;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* A sensor declared by a deployed Dagster job, when the deployment exposes it.
|
|
228
|
+
*/
|
|
229
|
+
export interface DagsterJobSensor {
|
|
230
|
+
/** Sensor name. */
|
|
231
|
+
name: string;
|
|
232
|
+
/** Sensor kind, when exposed. */
|
|
233
|
+
kind?: string;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* A deployed Dagster job record surfaced by workflow lookup. Carries the actual
|
|
237
|
+
* deployment structure the driver maps into the canonical document shape: the job
|
|
238
|
+
* name, graph/op structure, asset keys, and schedules/sensors where the client
|
|
239
|
+
* port exposes them. Every field is read-only inspection data — no op body, no
|
|
240
|
+
* Python source.
|
|
241
|
+
*/
|
|
242
|
+
export interface DagsterJobRecord {
|
|
243
|
+
/** Job name. */
|
|
244
|
+
name: string;
|
|
245
|
+
/** Optional description. */
|
|
246
|
+
description?: string;
|
|
247
|
+
/** Optional last-update timestamp. */
|
|
248
|
+
updatedAt?: Date;
|
|
249
|
+
/** Ops/steps of the job's graph, when the deployment exposes them. */
|
|
250
|
+
ops?: DagsterJobOp[];
|
|
251
|
+
/** Directed op dependencies, when the deployment exposes them. */
|
|
252
|
+
dependencies?: DagsterJobDependency[];
|
|
253
|
+
/** Asset keys the job reads/materializes, when the deployment exposes them. */
|
|
254
|
+
assetKeys?: string[];
|
|
255
|
+
/** Schedules attached to the job, when the deployment exposes them. */
|
|
256
|
+
schedules?: DagsterJobSchedule[];
|
|
257
|
+
/** Sensors attached to the job, when the deployment exposes them. */
|
|
258
|
+
sensors?: DagsterJobSensor[];
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Host-injected, read-only Dagster client port. Abstracts the GraphQL/REST
|
|
262
|
+
* transport so the wrapper stays a pure inspection + event-mapping layer and the
|
|
263
|
+
* host owns the Dagster deployment. Listing/lookup are required: the owner mandate
|
|
264
|
+
* makes reading already-existing workflows the driver's core responsibility.
|
|
265
|
+
*/
|
|
266
|
+
export interface DagsterClient {
|
|
267
|
+
/** Lists already-deployed Dagster jobs. */
|
|
268
|
+
listJobs(): Promise<DagsterJobSummary[]>;
|
|
269
|
+
/** Reads a single already-deployed Dagster job, including its graph structure. */
|
|
270
|
+
getJob(jobName: string): Promise<DagsterJobRecord>;
|
|
271
|
+
/** Subscribes to an EXISTING run's raw event stream. */
|
|
272
|
+
subscribeRun(runId: string, handler: (event: DagsterEventRecord) => void, options?: DagsterRunSubscriptionOptions): Promise<DagsterRunSubscription>;
|
|
273
|
+
/** Terminates an EXISTING run. */
|
|
274
|
+
terminateRun(runId: string, reason?: string): Promise<void>;
|
|
275
|
+
/** Reads an EXISTING run's terminal record. */
|
|
276
|
+
getRun(runId: string): Promise<DagsterRunRecord>;
|
|
277
|
+
/**
|
|
278
|
+
* Launches a run of an ALREADY-DEPLOYED job. Optional: a read-only host port
|
|
279
|
+
* omits it, and the driver then fails closed with
|
|
280
|
+
* `GRAPH_DAGSTER_EXECUTION_NOT_SUPPORTED`. Called only when the explicit
|
|
281
|
+
* execution gate is enabled.
|
|
282
|
+
*/
|
|
283
|
+
launchRun?(request: DagsterLaunchRunRequest): Promise<DagsterLaunchedRun>;
|
|
284
|
+
/**
|
|
285
|
+
* Re-executes (replays) an EXISTING run. Optional: a host without a
|
|
286
|
+
* re-execution surface omits it, and the driver then fails closed with
|
|
287
|
+
* `GRAPH_DAGSTER_REPLAY_NOT_SUPPORTED`. Called only when the explicit execution
|
|
288
|
+
* gate is enabled.
|
|
289
|
+
*/
|
|
290
|
+
replayRun?(request: DagsterReplayRunRequest): Promise<DagsterLaunchedRun>;
|
|
291
|
+
/** Disposes the client and its transport. */
|
|
292
|
+
dispose?(): void | Promise<void>;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Configuration for {@link DagsterGraphExecutionBackend}. The driver accepts no
|
|
296
|
+
* op resolver: it never authors ops. Execution/replay of EXISTING workflows is
|
|
297
|
+
* opt-in and defaults off.
|
|
298
|
+
*/
|
|
299
|
+
export interface DagsterGraphExecutionBackendConfig extends Record<string, unknown> {
|
|
300
|
+
/** Host-injected Dagster client port (read surface always; launch/replay when enabled). */
|
|
301
|
+
client: DagsterClient;
|
|
302
|
+
/** Optional host-supplied default run tags. */
|
|
303
|
+
tags?: Record<string, string>;
|
|
304
|
+
/**
|
|
305
|
+
* Explicit opt-in for executing (launching a run of an already-deployed job)
|
|
306
|
+
* and replaying (re-executing an existing run) through the client port. Defaults
|
|
307
|
+
* to `false`: when off, `execute`/`replayRun` fail closed with
|
|
308
|
+
* `GRAPH_DAGSTER_EXECUTION_NOT_ENABLED` before any network call, and the driver
|
|
309
|
+
* remains purely read-only. The facade preserves this key across
|
|
310
|
+
* `GraphExecutionEngine.initialize` (it is not facade-owned).
|
|
311
|
+
*/
|
|
312
|
+
executionEnabled?: boolean;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* A request to observe an EXISTING Dagster run. The run is never launched by the
|
|
316
|
+
* driver; the caller supplies the id of a run that already exists in the
|
|
317
|
+
* deployment.
|
|
318
|
+
*/
|
|
319
|
+
export interface DagsterObserveRunRequest {
|
|
320
|
+
/** Dagster run id of the existing run. */
|
|
321
|
+
dagsterRunId: string;
|
|
322
|
+
/** Canonical as-graph run id carried on emitted events; defaults to the Dagster run id. */
|
|
323
|
+
graphRunId?: string;
|
|
324
|
+
/** Canonical workflow id the run belongs to. */
|
|
325
|
+
workflowId: string;
|
|
326
|
+
/** Facade-owned event sink the driver reports transitions through. */
|
|
327
|
+
events: GraphExecutionEventSink;
|
|
328
|
+
/** Workflow input values carried onto the canonical result. */
|
|
329
|
+
inputs?: Record<string, unknown>;
|
|
330
|
+
/** Execution options metadata carried onto the canonical result. */
|
|
331
|
+
metadata?: Record<string, unknown>;
|
|
332
|
+
/**
|
|
333
|
+
* Caller cancellation signal. Aborting it fails the observation closed with
|
|
334
|
+
* `GRAPH_DAGSTER_OBSERVE_ABORTED` and cancels in-flight transport work
|
|
335
|
+
* instead of leaving the caller waiting on a wedged or stalled run.
|
|
336
|
+
*/
|
|
337
|
+
signal?: AbortSignal;
|
|
338
|
+
/**
|
|
339
|
+
* Hard cap on the number of events the bridge will process. Exceeding it fails
|
|
340
|
+
* the observation closed with `GRAPH_DAGSTER_EVENT_LIMIT_EXCEEDED`, so a gateway
|
|
341
|
+
* that never terminates cannot accumulate events without bound.
|
|
342
|
+
*/
|
|
343
|
+
maxEvents?: number;
|
|
344
|
+
/**
|
|
345
|
+
* Hard cap on the transport pagination depth. Forwarded to the client port so a
|
|
346
|
+
* gateway whose `eventConnection` never reports `hasMore: false` cannot page
|
|
347
|
+
* without bound.
|
|
348
|
+
*/
|
|
349
|
+
maxPages?: number;
|
|
350
|
+
/**
|
|
351
|
+
* Maximum time to await the terminal record. Exceeding it fails the observation
|
|
352
|
+
* closed with `GRAPH_DAGSTER_OBSERVE_TIMEOUT`.
|
|
353
|
+
*/
|
|
354
|
+
terminalTimeoutMs?: number;
|
|
355
|
+
}
|