@decaf-ts/as-graph 0.4.0 → 0.6.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 (146) hide show
  1. package/README.md +167 -5
  2. package/dist/as-graph.cjs +1 -1
  3. package/dist/as-graph.cjs.map +1 -1
  4. package/dist/as-graph.js +1 -1
  5. package/dist/as-graph.js.map +1 -1
  6. package/lib/cjs/dagster/DagsterGraphExecutionBackend.cjs +102 -11
  7. package/lib/cjs/dagster/DagsterGraphExecutionBackend.cjs.map +1 -1
  8. package/lib/cjs/dagster/DagsterGraphQLClient.cjs +738 -0
  9. package/lib/cjs/dagster/DagsterGraphQLClient.cjs.map +1 -0
  10. package/lib/cjs/dagster/index.cjs +1 -0
  11. package/lib/cjs/dagster/index.cjs.map +1 -1
  12. package/lib/cjs/engine/execution/GraphExecutionEngine.cjs +7 -0
  13. package/lib/cjs/engine/execution/GraphExecutionEngine.cjs.map +1 -1
  14. package/lib/cjs/engine/execution/LocalGraphExecutionBackend.cjs +39 -0
  15. package/lib/cjs/engine/execution/LocalGraphExecutionBackend.cjs.map +1 -1
  16. package/lib/cjs/engine/index.cjs +1 -0
  17. package/lib/cjs/engine/index.cjs.map +1 -1
  18. package/lib/cjs/engine/services/GraphNodeModelService.cjs +129 -0
  19. package/lib/cjs/engine/services/GraphNodeModelService.cjs.map +1 -0
  20. package/lib/cjs/engine/services/GraphWorkflowService.cjs +33 -0
  21. package/lib/cjs/engine/services/GraphWorkflowService.cjs.map +1 -1
  22. package/lib/cjs/mastra/MastraDefaultStepHandlers.cjs +217 -0
  23. package/lib/cjs/mastra/MastraDefaultStepHandlers.cjs.map +1 -0
  24. package/lib/cjs/mastra/MastraEventBridge.cjs +10 -3
  25. package/lib/cjs/mastra/MastraEventBridge.cjs.map +1 -1
  26. package/lib/cjs/mastra/MastraGraphExecutionBackend.cjs +111 -13
  27. package/lib/cjs/mastra/MastraGraphExecutionBackend.cjs.map +1 -1
  28. package/lib/cjs/mastra/MastraWorkflowCompiler.cjs +3 -3
  29. package/lib/cjs/mastra/MastraWorkflowCompiler.cjs.map +1 -1
  30. package/lib/cjs/mastra/index.cjs +1 -0
  31. package/lib/cjs/mastra/index.cjs.map +1 -1
  32. package/lib/cjs/mastra/types.cjs +5 -1
  33. package/lib/cjs/mastra/types.cjs.map +1 -1
  34. package/lib/cjs/nest/graph/GraphBackendHost.cjs +232 -0
  35. package/lib/cjs/nest/graph/GraphBackendHost.cjs.map +1 -0
  36. package/lib/cjs/nest/graph/GraphExecutionModule.cjs +38 -1
  37. package/lib/cjs/nest/graph/GraphExecutionModule.cjs.map +1 -1
  38. package/lib/cjs/nest/graph/index.cjs +1 -0
  39. package/lib/cjs/nest/graph/index.cjs.map +1 -1
  40. package/lib/cjs/nest/graph/main.cjs +112 -12
  41. package/lib/cjs/nest/graph/main.cjs.map +1 -1
  42. package/lib/cjs/ram/GraphNodeRepository.cjs +40 -0
  43. package/lib/cjs/ram/GraphNodeRepository.cjs.map +1 -0
  44. package/lib/cjs/ram/index.cjs +1 -0
  45. package/lib/cjs/ram/index.cjs.map +1 -1
  46. package/lib/cjs/shared/graph/GraphNodeConverters.cjs +43 -0
  47. package/lib/cjs/shared/graph/GraphNodeConverters.cjs.map +1 -0
  48. package/lib/cjs/shared/graph/GraphNodeModel.cjs +74 -0
  49. package/lib/cjs/shared/graph/GraphNodeModel.cjs.map +1 -0
  50. package/lib/cjs/shared/graph/index.cjs +2 -0
  51. package/lib/cjs/shared/graph/index.cjs.map +1 -1
  52. package/lib/esm/dagster/DagsterGraphExecutionBackend.js +102 -11
  53. package/lib/esm/dagster/DagsterGraphExecutionBackend.js.map +1 -1
  54. package/lib/esm/dagster/DagsterGraphQLClient.js +733 -0
  55. package/lib/esm/dagster/DagsterGraphQLClient.js.map +1 -0
  56. package/lib/esm/dagster/index.js +1 -0
  57. package/lib/esm/dagster/index.js.map +1 -1
  58. package/lib/esm/engine/execution/GraphExecutionBackend.js.map +1 -1
  59. package/lib/esm/engine/execution/GraphExecutionEngine.js +7 -0
  60. package/lib/esm/engine/execution/GraphExecutionEngine.js.map +1 -1
  61. package/lib/esm/engine/execution/LocalGraphExecutionBackend.js +39 -0
  62. package/lib/esm/engine/execution/LocalGraphExecutionBackend.js.map +1 -1
  63. package/lib/esm/engine/index.js +1 -0
  64. package/lib/esm/engine/index.js.map +1 -1
  65. package/lib/esm/engine/services/GraphNodeModelService.js +120 -0
  66. package/lib/esm/engine/services/GraphNodeModelService.js.map +1 -0
  67. package/lib/esm/engine/services/GraphWorkflowService.js +34 -1
  68. package/lib/esm/engine/services/GraphWorkflowService.js.map +1 -1
  69. package/lib/esm/mastra/MastraCapabilities.js.map +1 -1
  70. package/lib/esm/mastra/MastraDefaultStepHandlers.js +212 -0
  71. package/lib/esm/mastra/MastraDefaultStepHandlers.js.map +1 -0
  72. package/lib/esm/mastra/MastraEventBridge.js +10 -3
  73. package/lib/esm/mastra/MastraEventBridge.js.map +1 -1
  74. package/lib/esm/mastra/MastraGraphExecutionBackend.js +112 -14
  75. package/lib/esm/mastra/MastraGraphExecutionBackend.js.map +1 -1
  76. package/lib/esm/mastra/MastraWorkflowCompiler.js +3 -3
  77. package/lib/esm/mastra/MastraWorkflowCompiler.js.map +1 -1
  78. package/lib/esm/mastra/index.js +1 -0
  79. package/lib/esm/mastra/index.js.map +1 -1
  80. package/lib/esm/mastra/types.js +4 -0
  81. package/lib/esm/mastra/types.js.map +1 -1
  82. package/lib/esm/nest/graph/GraphBackendHost.js +189 -0
  83. package/lib/esm/nest/graph/GraphBackendHost.js.map +1 -0
  84. package/lib/esm/nest/graph/GraphExecutionModule.js +39 -2
  85. package/lib/esm/nest/graph/GraphExecutionModule.js.map +1 -1
  86. package/lib/esm/nest/graph/index.js +1 -0
  87. package/lib/esm/nest/graph/index.js.map +1 -1
  88. package/lib/esm/nest/graph/main.js +79 -12
  89. package/lib/esm/nest/graph/main.js.map +1 -1
  90. package/lib/esm/ram/GraphNodeRepository.js +31 -0
  91. package/lib/esm/ram/GraphNodeRepository.js.map +1 -0
  92. package/lib/esm/ram/index.js +1 -0
  93. package/lib/esm/ram/index.js.map +1 -1
  94. package/lib/esm/shared/graph/GraphNodeConverters.js +38 -0
  95. package/lib/esm/shared/graph/GraphNodeConverters.js.map +1 -0
  96. package/lib/esm/shared/graph/GraphNodeModel.js +65 -0
  97. package/lib/esm/shared/graph/GraphNodeModel.js.map +1 -0
  98. package/lib/esm/shared/graph/index.js +2 -0
  99. package/lib/esm/shared/graph/index.js.map +1 -1
  100. package/lib/types/dagster/DagsterGraphExecutionBackend.d.cts +40 -4
  101. package/lib/types/dagster/DagsterGraphExecutionBackend.d.mts +40 -4
  102. package/lib/types/dagster/DagsterGraphQLClient.d.cts +231 -0
  103. package/lib/types/dagster/DagsterGraphQLClient.d.mts +231 -0
  104. package/lib/types/dagster/index.d.cts +1 -0
  105. package/lib/types/dagster/index.d.mts +1 -0
  106. package/lib/types/engine/execution/GraphExecutionBackend.d.cts +27 -0
  107. package/lib/types/engine/execution/GraphExecutionBackend.d.mts +27 -0
  108. package/lib/types/engine/execution/GraphExecutionEngine.d.cts +9 -0
  109. package/lib/types/engine/execution/GraphExecutionEngine.d.mts +9 -0
  110. package/lib/types/engine/execution/LocalGraphExecutionBackend.d.cts +14 -0
  111. package/lib/types/engine/execution/LocalGraphExecutionBackend.d.mts +14 -0
  112. package/lib/types/engine/index.d.cts +1 -0
  113. package/lib/types/engine/index.d.mts +1 -0
  114. package/lib/types/engine/services/GraphNodeModelService.d.cts +54 -0
  115. package/lib/types/engine/services/GraphNodeModelService.d.mts +54 -0
  116. package/lib/types/engine/services/GraphWorkflowService.d.cts +21 -0
  117. package/lib/types/engine/services/GraphWorkflowService.d.mts +21 -0
  118. package/lib/types/mastra/MastraCapabilities.d.cts +0 -5
  119. package/lib/types/mastra/MastraCapabilities.d.mts +0 -5
  120. package/lib/types/mastra/MastraDefaultStepHandlers.d.cts +74 -0
  121. package/lib/types/mastra/MastraDefaultStepHandlers.d.mts +74 -0
  122. package/lib/types/mastra/MastraGraphExecutionBackend.d.cts +29 -0
  123. package/lib/types/mastra/MastraGraphExecutionBackend.d.mts +29 -0
  124. package/lib/types/mastra/MastraWorkflowCompiler.d.cts +3 -3
  125. package/lib/types/mastra/MastraWorkflowCompiler.d.mts +3 -3
  126. package/lib/types/mastra/index.d.cts +1 -0
  127. package/lib/types/mastra/index.d.mts +1 -0
  128. package/lib/types/mastra/types.d.cts +12 -0
  129. package/lib/types/mastra/types.d.mts +12 -0
  130. package/lib/types/nest/graph/GraphBackendHost.d.cts +152 -0
  131. package/lib/types/nest/graph/GraphBackendHost.d.mts +152 -0
  132. package/lib/types/nest/graph/GraphExecutionModule.d.cts +23 -0
  133. package/lib/types/nest/graph/GraphExecutionModule.d.mts +23 -0
  134. package/lib/types/nest/graph/index.d.cts +1 -0
  135. package/lib/types/nest/graph/index.d.mts +1 -0
  136. package/lib/types/ram/GraphNodeRepository.d.cts +13 -0
  137. package/lib/types/ram/GraphNodeRepository.d.mts +13 -0
  138. package/lib/types/ram/index.d.cts +1 -0
  139. package/lib/types/ram/index.d.mts +1 -0
  140. package/lib/types/shared/graph/GraphNodeConverters.d.cts +15 -0
  141. package/lib/types/shared/graph/GraphNodeConverters.d.mts +15 -0
  142. package/lib/types/shared/graph/GraphNodeModel.d.cts +24 -0
  143. package/lib/types/shared/graph/GraphNodeModel.d.mts +24 -0
  144. package/lib/types/shared/graph/index.d.cts +2 -0
  145. package/lib/types/shared/graph/index.d.mts +2 -0
  146. package/package.json +15 -3
@@ -83,6 +83,22 @@ export interface GraphBackendWorkflowStore {
83
83
  listWorkflows(...args: MaybeContextualArg<Context>): Promise<GraphBackendWorkflowRecord[]>;
84
84
  /** Reads a single canonical workflow document. */
85
85
  getDocument(workflowId: string, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowDocument>;
86
+ /**
87
+ * Persists a canonical workflow document (the seed surface). Optional: a
88
+ * read-only store omits it, and the backend's `seedWorkflows` then fails
89
+ * closed instead of silently dropping the seeds. `GraphWorkflowService`
90
+ * structurally satisfies it.
91
+ */
92
+ saveDocument?(workflowId: string, document: GraphWorkflowDocument, ...args: MaybeContextualArg<Context>): Promise<unknown>;
93
+ /**
94
+ * Boot-seed surface: persists a canonical workflow document, treating an
95
+ * existing foreign-owned row as a skip rather than a hard failure (F2
96
+ * availability fix). Optional; when present the local backend prefers it over
97
+ * {@link saveDocument} for its host-boot seed so a fixture id a durable store
98
+ * already holds as a user-owned row cannot fail host bootstrap. Request-path
99
+ * writes never use it — they stay fail-closed through `saveDocument`.
100
+ */
101
+ seedDocument?(workflowId: string, document: GraphWorkflowDocument, ...args: MaybeContextualArg<Context>): Promise<unknown>;
86
102
  }
87
103
  /**
88
104
  * Facade-owned event sink handed to a backend. The facade owns event
@@ -204,6 +220,17 @@ export interface GraphExecutionBackend<CONFIG extends Record<string, unknown> =
204
220
  * without a catalogue omit this method (or declare `not_supported`).
205
221
  */
206
222
  getWorkflow?(workflowId: string, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowDocument>;
223
+ /**
224
+ * Seeds canonical workflow documents into this backend's own catalogue so
225
+ * they are served by {@link listWorkflows}/{@link getWorkflow}. The host
226
+ * supplies its fixture registry at boot and the backend registers the
227
+ * documents through its own engine-dependent store (persistence for the local
228
+ * backend, translated catalogue for Mastra, the read-only catalogue for
229
+ * Dagster). Returns the seeded summaries. A backend without a writable
230
+ * catalogue omits this method; the facade fails closed rather than silently
231
+ * dropping the seeds.
232
+ */
233
+ seedWorkflows?(documents: readonly GraphWorkflowDocument[], ...args: MaybeContextualArg<Context>): Promise<GraphBackendWorkflowSummary[]>;
207
234
  /**
208
235
  * Executes a validated/resolved workflow.
209
236
  *
@@ -83,6 +83,22 @@ export interface GraphBackendWorkflowStore {
83
83
  listWorkflows(...args: MaybeContextualArg<Context>): Promise<GraphBackendWorkflowRecord[]>;
84
84
  /** Reads a single canonical workflow document. */
85
85
  getDocument(workflowId: string, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowDocument>;
86
+ /**
87
+ * Persists a canonical workflow document (the seed surface). Optional: a
88
+ * read-only store omits it, and the backend's `seedWorkflows` then fails
89
+ * closed instead of silently dropping the seeds. `GraphWorkflowService`
90
+ * structurally satisfies it.
91
+ */
92
+ saveDocument?(workflowId: string, document: GraphWorkflowDocument, ...args: MaybeContextualArg<Context>): Promise<unknown>;
93
+ /**
94
+ * Boot-seed surface: persists a canonical workflow document, treating an
95
+ * existing foreign-owned row as a skip rather than a hard failure (F2
96
+ * availability fix). Optional; when present the local backend prefers it over
97
+ * {@link saveDocument} for its host-boot seed so a fixture id a durable store
98
+ * already holds as a user-owned row cannot fail host bootstrap. Request-path
99
+ * writes never use it — they stay fail-closed through `saveDocument`.
100
+ */
101
+ seedDocument?(workflowId: string, document: GraphWorkflowDocument, ...args: MaybeContextualArg<Context>): Promise<unknown>;
86
102
  }
87
103
  /**
88
104
  * Facade-owned event sink handed to a backend. The facade owns event
@@ -204,6 +220,17 @@ export interface GraphExecutionBackend<CONFIG extends Record<string, unknown> =
204
220
  * without a catalogue omit this method (or declare `not_supported`).
205
221
  */
206
222
  getWorkflow?(workflowId: string, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowDocument>;
223
+ /**
224
+ * Seeds canonical workflow documents into this backend's own catalogue so
225
+ * they are served by {@link listWorkflows}/{@link getWorkflow}. The host
226
+ * supplies its fixture registry at boot and the backend registers the
227
+ * documents through its own engine-dependent store (persistence for the local
228
+ * backend, translated catalogue for Mastra, the read-only catalogue for
229
+ * Dagster). Returns the seeded summaries. A backend without a writable
230
+ * catalogue omits this method; the facade fails closed rather than silently
231
+ * dropping the seeds.
232
+ */
233
+ seedWorkflows?(documents: readonly GraphWorkflowDocument[], ...args: MaybeContextualArg<Context>): Promise<GraphBackendWorkflowSummary[]>;
207
234
  /**
208
235
  * Executes a validated/resolved workflow.
209
236
  *
@@ -87,6 +87,15 @@ export interface GraphExecutionEngineConfig {
87
87
  * ignore this port.
88
88
  */
89
89
  workflowStore?: GraphBackendWorkflowStore;
90
+ /**
91
+ * Canonical workflow documents to seed into the active backend's own
92
+ * catalogue at boot (the host's fixture registry). Each backend registers
93
+ * them through its engine-dependent store so the per-engine catalogue
94
+ * (`graph/engines/{engineId}/workflows`) serves them. The engine fails closed
95
+ * with `GRAPH_BACKEND_SEED_NOT_SUPPORTED` when seeds are supplied but the
96
+ * backend exposes no seed surface, so a host never silently loses its seeds.
97
+ */
98
+ seedWorkflows?: readonly GraphWorkflowDocument[];
90
99
  /**
91
100
  * Decaf adapter backing cached/pinned value persistence. Defaults to the
92
101
  * globally configured adapter (`Adapter.current`); tests pass a `RamAdapter`
@@ -87,6 +87,15 @@ export interface GraphExecutionEngineConfig {
87
87
  * ignore this port.
88
88
  */
89
89
  workflowStore?: GraphBackendWorkflowStore;
90
+ /**
91
+ * Canonical workflow documents to seed into the active backend's own
92
+ * catalogue at boot (the host's fixture registry). Each backend registers
93
+ * them through its engine-dependent store so the per-engine catalogue
94
+ * (`graph/engines/{engineId}/workflows`) serves them. The engine fails closed
95
+ * with `GRAPH_BACKEND_SEED_NOT_SUPPORTED` when seeds are supplied but the
96
+ * backend exposes no seed surface, so a host never silently loses its seeds.
97
+ */
98
+ seedWorkflows?: readonly GraphWorkflowDocument[];
90
99
  /**
91
100
  * Decaf adapter backing cached/pinned value persistence. Defaults to the
92
101
  * globally configured adapter (`Adapter.current`); tests pass a `RamAdapter`
@@ -84,6 +84,20 @@ export declare class LocalGraphExecutionBackend implements GraphExecutionBackend
84
84
  * @throws {GraphExecutionError} when no workflow store is wired in.
85
85
  */
86
86
  getWorkflow(workflowId: string, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowDocument>;
87
+ /**
88
+ * Seeds canonical workflow documents into the wired `GraphWorkflowStore`
89
+ * port so the local reference backend's catalogue serves them. Each document
90
+ * is persisted through the store's own write path (`saveDocument`), so the
91
+ * seed honours the same boundary validation and ownership rules as any other
92
+ * write — never a bypass. The port must expose `saveDocument`; a read-only
93
+ * store fails closed.
94
+ *
95
+ * @param documents - The canonical documents to persist.
96
+ * @param args - Optional decaf contextual arguments forwarded to the store.
97
+ * @returns The seeded workflow summaries.
98
+ * @throws {GraphExecutionError} when no writable workflow store is wired in.
99
+ */
100
+ seedWorkflows(documents: readonly GraphWorkflowDocument[], ...args: MaybeContextualArg<Context>): Promise<GraphBackendWorkflowSummary[]>;
87
101
  /**
88
102
  * Executes a validated/resolved workflow's plan against the facade-owned
89
103
  * frame carried by the request's event sink.
@@ -84,6 +84,20 @@ export declare class LocalGraphExecutionBackend implements GraphExecutionBackend
84
84
  * @throws {GraphExecutionError} when no workflow store is wired in.
85
85
  */
86
86
  getWorkflow(workflowId: string, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowDocument>;
87
+ /**
88
+ * Seeds canonical workflow documents into the wired `GraphWorkflowStore`
89
+ * port so the local reference backend's catalogue serves them. Each document
90
+ * is persisted through the store's own write path (`saveDocument`), so the
91
+ * seed honours the same boundary validation and ownership rules as any other
92
+ * write — never a bypass. The port must expose `saveDocument`; a read-only
93
+ * store fails closed.
94
+ *
95
+ * @param documents - The canonical documents to persist.
96
+ * @param args - Optional decaf contextual arguments forwarded to the store.
97
+ * @returns The seeded workflow summaries.
98
+ * @throws {GraphExecutionError} when no writable workflow store is wired in.
99
+ */
100
+ seedWorkflows(documents: readonly GraphWorkflowDocument[], ...args: MaybeContextualArg<Context>): Promise<GraphBackendWorkflowSummary[]>;
87
101
  /**
88
102
  * Executes a validated/resolved workflow's plan against the facade-owned
89
103
  * frame carried by the request's event sink.
@@ -62,4 +62,5 @@ export * from "./runs/index.d.cts";
62
62
  export * from "./services/GraphEnvironment.d.cts";
63
63
  export * from "./services/GraphWorkflowService.d.cts";
64
64
  export * from "./services/GraphRunModelService.d.cts";
65
+ export * from "./services/GraphNodeModelService.d.cts";
65
66
  export * from "./snapshots/GraphExecutionSnapshotMapper.d.cts";
@@ -62,4 +62,5 @@ export * from "./runs/index.d.mts";
62
62
  export * from "./services/GraphEnvironment.d.mts";
63
63
  export * from "./services/GraphWorkflowService.d.mts";
64
64
  export * from "./services/GraphRunModelService.d.mts";
65
+ export * from "./services/GraphNodeModelService.d.mts";
65
66
  export * from "./snapshots/GraphExecutionSnapshotMapper.d.mts";
@@ -0,0 +1,54 @@
1
+ import { ModelService, type Context, type MaybeContextualArg } from "@decaf-ts/core";
2
+ import { GraphNodeModel } from "../../shared/graph/index.d.cts";
3
+ import type { GraphNodeManifest } from "../../shared/graph/index.d.cts";
4
+ import type { GraphNodeCatalogue } from "../catalog/GraphNodeCatalogue.d.cts";
5
+ /**
6
+ * Model-backed node catalogue: persists {@link GraphNodeManifest} rows as
7
+ * {@link GraphNodeModel} via the Decaf {@link ModelService}.
8
+ */
9
+ export declare class GraphNodeModelService extends ModelService<GraphNodeModel> {
10
+ constructor();
11
+ /**
12
+ * Upserts a single node-kind manifest as a {@link GraphNodeModel} row,
13
+ * updating the mirror columns and manifest when the row already exists.
14
+ *
15
+ * @param {GraphNodeManifest} manifest - Node-kind manifest to persist.
16
+ * @param args - An optional decaf `Context` forwarded to the model service.
17
+ * @return {Promise<GraphNodeModel>} The persisted row.
18
+ */
19
+ upsertManifest(manifest: GraphNodeManifest, ...args: MaybeContextualArg<Context>): Promise<GraphNodeModel>;
20
+ /**
21
+ * Synchronises the whole catalogue into persistence, upserting every listed
22
+ * manifest so listing/CRUD works out of the box for the engine driver.
23
+ *
24
+ * @param {GraphNodeCatalogue} catalogue - Catalogue to mirror into persistence.
25
+ * @param args - An optional decaf `Context` forwarded to the model service.
26
+ * @return {Promise<GraphNodeModel[]>} The persisted rows, in catalogue order.
27
+ */
28
+ syncFromCatalogue(catalogue: GraphNodeCatalogue, ...args: MaybeContextualArg<Context>): Promise<GraphNodeModel[]>;
29
+ /**
30
+ * Lists every persisted node-kind row, ordered by kind.
31
+ *
32
+ * A store failure propagates instead of being swallowed as `[]` (SAA-93 F4).
33
+ *
34
+ * @param args - An optional decaf `Context` forwarded to the model service.
35
+ * @return {Promise<GraphNodeModel[]>} The persisted rows.
36
+ */
37
+ listNodes(...args: MaybeContextualArg<Context>): Promise<GraphNodeModel[]>;
38
+ /**
39
+ * Lists every persisted node-kind manifest, ordered by kind.
40
+ *
41
+ * @param args - An optional decaf `Context` forwarded to the model service.
42
+ * @return {Promise<GraphNodeManifest[]>} The persisted manifests.
43
+ */
44
+ listManifests(...args: MaybeContextualArg<Context>): Promise<GraphNodeManifest[]>;
45
+ /**
46
+ * Reads the persisted row for a node kind.
47
+ *
48
+ * @param {string} kind - Registered node kind to read.
49
+ * @param args - An optional decaf `Context` forwarded to the model service.
50
+ * @return {Promise<GraphNodeModel>} The persisted row.
51
+ * @throws {NotFoundError} When no row exists for `kind`.
52
+ */
53
+ getNode(kind: string, ...args: MaybeContextualArg<Context>): Promise<GraphNodeModel>;
54
+ }
@@ -0,0 +1,54 @@
1
+ import { ModelService, type Context, type MaybeContextualArg } from "@decaf-ts/core";
2
+ import { GraphNodeModel } from "../../shared/graph/index.d.mts";
3
+ import type { GraphNodeManifest } from "../../shared/graph/index.d.mts";
4
+ import type { GraphNodeCatalogue } from "../catalog/GraphNodeCatalogue.d.mts";
5
+ /**
6
+ * Model-backed node catalogue: persists {@link GraphNodeManifest} rows as
7
+ * {@link GraphNodeModel} via the Decaf {@link ModelService}.
8
+ */
9
+ export declare class GraphNodeModelService extends ModelService<GraphNodeModel> {
10
+ constructor();
11
+ /**
12
+ * Upserts a single node-kind manifest as a {@link GraphNodeModel} row,
13
+ * updating the mirror columns and manifest when the row already exists.
14
+ *
15
+ * @param {GraphNodeManifest} manifest - Node-kind manifest to persist.
16
+ * @param args - An optional decaf `Context` forwarded to the model service.
17
+ * @return {Promise<GraphNodeModel>} The persisted row.
18
+ */
19
+ upsertManifest(manifest: GraphNodeManifest, ...args: MaybeContextualArg<Context>): Promise<GraphNodeModel>;
20
+ /**
21
+ * Synchronises the whole catalogue into persistence, upserting every listed
22
+ * manifest so listing/CRUD works out of the box for the engine driver.
23
+ *
24
+ * @param {GraphNodeCatalogue} catalogue - Catalogue to mirror into persistence.
25
+ * @param args - An optional decaf `Context` forwarded to the model service.
26
+ * @return {Promise<GraphNodeModel[]>} The persisted rows, in catalogue order.
27
+ */
28
+ syncFromCatalogue(catalogue: GraphNodeCatalogue, ...args: MaybeContextualArg<Context>): Promise<GraphNodeModel[]>;
29
+ /**
30
+ * Lists every persisted node-kind row, ordered by kind.
31
+ *
32
+ * A store failure propagates instead of being swallowed as `[]` (SAA-93 F4).
33
+ *
34
+ * @param args - An optional decaf `Context` forwarded to the model service.
35
+ * @return {Promise<GraphNodeModel[]>} The persisted rows.
36
+ */
37
+ listNodes(...args: MaybeContextualArg<Context>): Promise<GraphNodeModel[]>;
38
+ /**
39
+ * Lists every persisted node-kind manifest, ordered by kind.
40
+ *
41
+ * @param args - An optional decaf `Context` forwarded to the model service.
42
+ * @return {Promise<GraphNodeManifest[]>} The persisted manifests.
43
+ */
44
+ listManifests(...args: MaybeContextualArg<Context>): Promise<GraphNodeManifest[]>;
45
+ /**
46
+ * Reads the persisted row for a node kind.
47
+ *
48
+ * @param {string} kind - Registered node kind to read.
49
+ * @param args - An optional decaf `Context` forwarded to the model service.
50
+ * @return {Promise<GraphNodeModel>} The persisted row.
51
+ * @throws {NotFoundError} When no row exists for `kind`.
52
+ */
53
+ getNode(kind: string, ...args: MaybeContextualArg<Context>): Promise<GraphNodeModel>;
54
+ }
@@ -69,6 +69,27 @@ export declare class GraphWorkflowService extends ModelService<GraphWorkflowMode
69
69
  * @throws {GraphWorkflowDocumentRejectedError} When boundary validation fails.
70
70
  */
71
71
  saveDocument(workflowId: string, document: GraphWorkflowDocument, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowModel>;
72
+ /**
73
+ * Boot-seed write of a canonical workflow document (F2 availability fix):
74
+ * behaves exactly like {@link saveDocument} except that an ownership conflict
75
+ * on an existing foreign-owned row is treated as a skip-and-log instead of a
76
+ * hard failure. A durable store that already holds a user-owned row for a
77
+ * fixture id therefore cannot fail host bootstrap, while the security posture
78
+ * is unchanged: the foreign-owned row is never overwritten and the engine's own
79
+ * catalogue seed still serves the fixture.
80
+ *
81
+ * This is the boot seeding surface only. Request-path writes MUST keep using
82
+ * {@link saveDocument} / {@link saveSnapshot}, which stay fail-closed on a
83
+ * foreign-owned overwrite (SAA-105 R3).
84
+ *
85
+ * @param {string} workflowId - Workflow id from the fixture registry.
86
+ * @param {GraphWorkflowDocument} document - Canonical document to seed (its `id` must equal `workflowId`).
87
+ * @param args - An optional decaf `Context` carrying the owning principal.
88
+ * @return {Promise<GraphWorkflowModel | null>} The persisted row, or `null` when the seed was skipped because the existing row is owned by another user.
89
+ * @throws {ValidationError} When the payload shape or the document/path id match is invalid.
90
+ * @throws {GraphWorkflowDocumentRejectedError} When boundary validation fails.
91
+ */
92
+ seedDocument(workflowId: string, document: GraphWorkflowDocument, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowModel | null>;
72
93
  /**
73
94
  * Reads a workflow's canonical document, enforcing the DECAF-48 ownership
74
95
  * tuple. Legacy definition/state snapshots are no longer served.
@@ -69,6 +69,27 @@ export declare class GraphWorkflowService extends ModelService<GraphWorkflowMode
69
69
  * @throws {GraphWorkflowDocumentRejectedError} When boundary validation fails.
70
70
  */
71
71
  saveDocument(workflowId: string, document: GraphWorkflowDocument, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowModel>;
72
+ /**
73
+ * Boot-seed write of a canonical workflow document (F2 availability fix):
74
+ * behaves exactly like {@link saveDocument} except that an ownership conflict
75
+ * on an existing foreign-owned row is treated as a skip-and-log instead of a
76
+ * hard failure. A durable store that already holds a user-owned row for a
77
+ * fixture id therefore cannot fail host bootstrap, while the security posture
78
+ * is unchanged: the foreign-owned row is never overwritten and the engine's own
79
+ * catalogue seed still serves the fixture.
80
+ *
81
+ * This is the boot seeding surface only. Request-path writes MUST keep using
82
+ * {@link saveDocument} / {@link saveSnapshot}, which stay fail-closed on a
83
+ * foreign-owned overwrite (SAA-105 R3).
84
+ *
85
+ * @param {string} workflowId - Workflow id from the fixture registry.
86
+ * @param {GraphWorkflowDocument} document - Canonical document to seed (its `id` must equal `workflowId`).
87
+ * @param args - An optional decaf `Context` carrying the owning principal.
88
+ * @return {Promise<GraphWorkflowModel | null>} The persisted row, or `null` when the seed was skipped because the existing row is owned by another user.
89
+ * @throws {ValidationError} When the payload shape or the document/path id match is invalid.
90
+ * @throws {GraphWorkflowDocumentRejectedError} When boundary validation fails.
91
+ */
92
+ seedDocument(workflowId: string, document: GraphWorkflowDocument, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowModel | null>;
72
93
  /**
73
94
  * Reads a workflow's canonical document, enforcing the DECAF-48 ownership
74
95
  * tuple. Legacy definition/state snapshots are no longer served.
@@ -56,11 +56,6 @@ export interface MastraWorkflowManagementCapabilities {
56
56
  /** Native workflow versioning support. */
57
57
  version: MastraWorkflowCapabilityStatus;
58
58
  }
59
- /**
60
- * The full Mastra backend capability projection: the engine-agnostic
61
- * {@link GraphBackendCapabilities} plus the Mastra-specific workflow-management
62
- * statuses.
63
- */
64
59
  export interface MastraBackendCapabilities extends GraphBackendCapabilities {
65
60
  /** Workflow list/lookup plus the management statuses. */
66
61
  workflows: GraphBackendCapabilities["workflows"] & MastraWorkflowManagementCapabilities;
@@ -56,11 +56,6 @@ export interface MastraWorkflowManagementCapabilities {
56
56
  /** Native workflow versioning support. */
57
57
  version: MastraWorkflowCapabilityStatus;
58
58
  }
59
- /**
60
- * The full Mastra backend capability projection: the engine-agnostic
61
- * {@link GraphBackendCapabilities} plus the Mastra-specific workflow-management
62
- * statuses.
63
- */
64
59
  export interface MastraBackendCapabilities extends GraphBackendCapabilities {
65
60
  /** Workflow list/lookup plus the management statuses. */
66
61
  workflows: GraphBackendCapabilities["workflows"] & MastraWorkflowManagementCapabilities;
@@ -0,0 +1,74 @@
1
+ import { type MastraNodeStepHandler } from "./types.d.cts";
2
+ /**
3
+ * The built-in leaf node kinds covered by the default handler set: the
4
+ * plain-data, flow-utility, trigger, and utility kinds that compile as opaque
5
+ * steps. Structural kinds (`core.flow.if`/`core.flow.switch`, the
6
+ * `core.loop.*` loops, and `core.flow.humanApproval`) are translated by the
7
+ * compiler itself and are deliberately absent.
8
+ */
9
+ export declare const MASTRA_DEFAULT_STEP_HANDLER_KINDS: readonly ["value", "result", "core.agent", "core.flow.break", "core.flow.delay", "core.flow.errorBoundary", "core.flow.log", "core.trigger.chat", "core.trigger.event", "core.trigger.form", "core.trigger.manual", "core.trigger.schedule", "core.trigger.webhook", "core.utility.code", "core.utility.log", "core.utility.map"];
10
+ /** Any built-in leaf node kind covered by {@link MASTRA_DEFAULT_STEP_HANDLER_KINDS}. */
11
+ export type MastraDefaultStepHandlerKind = (typeof MASTRA_DEFAULT_STEP_HANDLER_KINDS)[number];
12
+ /**
13
+ * Largest delay `setTimeout` accepts before Node overflows and collapses the
14
+ * wait to ~1ms (`2^31 - 1`). {@link createMastraDefaultStepHandlers} clamps a
15
+ * delay node's `timeoutMs` to this value *before* scheduling, so a hostile or
16
+ * oversized declared delay can never hit the overflow degenerate path.
17
+ */
18
+ export declare const MASTRA_MAX_SET_TIMEOUT_MS = 2147483647;
19
+ /**
20
+ * Default host-configurable ceiling, in milliseconds, for a `core.flow.delay`
21
+ * node's `timeoutMs` (60s). The declared value is clamped to this ceiling, never
22
+ * rejected, so an oversized document cannot pin a run slot for up to
23
+ * `MASTRA_MAX_SET_TIMEOUT_MS` (~24.8 days) per node.
24
+ */
25
+ export declare const DEFAULT_MASTRA_DELAY_MAX_MS = 60000;
26
+ /**
27
+ * Reserved key under which a default-handler result records that the node was
28
+ * not fully executed. `core.agent` returns its forwarded input plus this key so
29
+ * a caller can tell a declared-but-inert agent step apart from a real one; the
30
+ * key never collides with a canonical data port.
31
+ */
32
+ export declare const MASTRA_DEGRADED_OUTPUT_KEY = "__mastraDegraded";
33
+ /** Details recorded under {@link MASTRA_DEGRADED_OUTPUT_KEY}. */
34
+ export interface MastraDegradedOutput {
35
+ /** The node kind whose declared capability was not executed. */
36
+ kind: string;
37
+ /** The node id the degraded result belongs to. */
38
+ nodeId: string;
39
+ /** Human-readable reason the node degraded to a pass-through. */
40
+ reason: string;
41
+ }
42
+ /** Options {@link createMastraDefaultStepHandlers} is created with. */
43
+ export interface MastraDefaultStepHandlerOptions {
44
+ /**
45
+ * Optional sink for the log kinds' messages (the default is silent).
46
+ *
47
+ * The sink receives **untrusted** data: `message` is the document's
48
+ * `node.parameters.message` verbatim and `meta` carries in-flight node data. A
49
+ * logger implementation must treat both arguments as untrusted, JSON-serialize
50
+ * `meta`, and never interpolate either into a line-oriented log (the pattern
51
+ * `nest/graph/servingErrors.ts` already mandates) — otherwise a crafted
52
+ * document enables log forging or CRLF injection.
53
+ */
54
+ logger?: (message: string, meta?: Record<string, unknown>) => void;
55
+ /**
56
+ * Host-configurable ceiling, in milliseconds, for a `core.flow.delay` node's
57
+ * `timeoutMs`. The declared value is clamped to this ceiling (never rejected)
58
+ * and additionally bounded by {@link MASTRA_MAX_SET_TIMEOUT_MS}; defaults to
59
+ * {@link DEFAULT_MASTRA_DELAY_MAX_MS}.
60
+ */
61
+ maxDelayMs?: number;
62
+ }
63
+ /**
64
+ * Builds the default {@link MastraNodeStepHandler} set: one handler per
65
+ * {@link MastraDefaultStepHandlerKind}. Each handler creates a
66
+ * schema-agnostic Mastra step (`z.any()` input and output schemas) whose
67
+ * execution coerces the runtime's input data to a record and delegates to the
68
+ * kind's executor, so untyped document parameters never break the runtime.
69
+ *
70
+ * @param options - Optional handler-set options (logger and delay ceiling).
71
+ * @returns One {@link MastraNodeStepHandler} per entry of
72
+ * {@link MASTRA_DEFAULT_STEP_HANDLER_KINDS}.
73
+ */
74
+ export declare function createMastraDefaultStepHandlers(options?: MastraDefaultStepHandlerOptions): MastraNodeStepHandler[];
@@ -0,0 +1,74 @@
1
+ import { type MastraNodeStepHandler } from "./types.d.mts";
2
+ /**
3
+ * The built-in leaf node kinds covered by the default handler set: the
4
+ * plain-data, flow-utility, trigger, and utility kinds that compile as opaque
5
+ * steps. Structural kinds (`core.flow.if`/`core.flow.switch`, the
6
+ * `core.loop.*` loops, and `core.flow.humanApproval`) are translated by the
7
+ * compiler itself and are deliberately absent.
8
+ */
9
+ export declare const MASTRA_DEFAULT_STEP_HANDLER_KINDS: readonly ["value", "result", "core.agent", "core.flow.break", "core.flow.delay", "core.flow.errorBoundary", "core.flow.log", "core.trigger.chat", "core.trigger.event", "core.trigger.form", "core.trigger.manual", "core.trigger.schedule", "core.trigger.webhook", "core.utility.code", "core.utility.log", "core.utility.map"];
10
+ /** Any built-in leaf node kind covered by {@link MASTRA_DEFAULT_STEP_HANDLER_KINDS}. */
11
+ export type MastraDefaultStepHandlerKind = (typeof MASTRA_DEFAULT_STEP_HANDLER_KINDS)[number];
12
+ /**
13
+ * Largest delay `setTimeout` accepts before Node overflows and collapses the
14
+ * wait to ~1ms (`2^31 - 1`). {@link createMastraDefaultStepHandlers} clamps a
15
+ * delay node's `timeoutMs` to this value *before* scheduling, so a hostile or
16
+ * oversized declared delay can never hit the overflow degenerate path.
17
+ */
18
+ export declare const MASTRA_MAX_SET_TIMEOUT_MS = 2147483647;
19
+ /**
20
+ * Default host-configurable ceiling, in milliseconds, for a `core.flow.delay`
21
+ * node's `timeoutMs` (60s). The declared value is clamped to this ceiling, never
22
+ * rejected, so an oversized document cannot pin a run slot for up to
23
+ * `MASTRA_MAX_SET_TIMEOUT_MS` (~24.8 days) per node.
24
+ */
25
+ export declare const DEFAULT_MASTRA_DELAY_MAX_MS = 60000;
26
+ /**
27
+ * Reserved key under which a default-handler result records that the node was
28
+ * not fully executed. `core.agent` returns its forwarded input plus this key so
29
+ * a caller can tell a declared-but-inert agent step apart from a real one; the
30
+ * key never collides with a canonical data port.
31
+ */
32
+ export declare const MASTRA_DEGRADED_OUTPUT_KEY = "__mastraDegraded";
33
+ /** Details recorded under {@link MASTRA_DEGRADED_OUTPUT_KEY}. */
34
+ export interface MastraDegradedOutput {
35
+ /** The node kind whose declared capability was not executed. */
36
+ kind: string;
37
+ /** The node id the degraded result belongs to. */
38
+ nodeId: string;
39
+ /** Human-readable reason the node degraded to a pass-through. */
40
+ reason: string;
41
+ }
42
+ /** Options {@link createMastraDefaultStepHandlers} is created with. */
43
+ export interface MastraDefaultStepHandlerOptions {
44
+ /**
45
+ * Optional sink for the log kinds' messages (the default is silent).
46
+ *
47
+ * The sink receives **untrusted** data: `message` is the document's
48
+ * `node.parameters.message` verbatim and `meta` carries in-flight node data. A
49
+ * logger implementation must treat both arguments as untrusted, JSON-serialize
50
+ * `meta`, and never interpolate either into a line-oriented log (the pattern
51
+ * `nest/graph/servingErrors.ts` already mandates) — otherwise a crafted
52
+ * document enables log forging or CRLF injection.
53
+ */
54
+ logger?: (message: string, meta?: Record<string, unknown>) => void;
55
+ /**
56
+ * Host-configurable ceiling, in milliseconds, for a `core.flow.delay` node's
57
+ * `timeoutMs`. The declared value is clamped to this ceiling (never rejected)
58
+ * and additionally bounded by {@link MASTRA_MAX_SET_TIMEOUT_MS}; defaults to
59
+ * {@link DEFAULT_MASTRA_DELAY_MAX_MS}.
60
+ */
61
+ maxDelayMs?: number;
62
+ }
63
+ /**
64
+ * Builds the default {@link MastraNodeStepHandler} set: one handler per
65
+ * {@link MastraDefaultStepHandlerKind}. Each handler creates a
66
+ * schema-agnostic Mastra step (`z.any()` input and output schemas) whose
67
+ * execution coerces the runtime's input data to a record and delegates to the
68
+ * kind's executor, so untyped document parameters never break the runtime.
69
+ *
70
+ * @param options - Optional handler-set options (logger and delay ceiling).
71
+ * @returns One {@link MastraNodeStepHandler} per entry of
72
+ * {@link MASTRA_DEFAULT_STEP_HANDLER_KINDS}.
73
+ */
74
+ export declare function createMastraDefaultStepHandlers(options?: MastraDefaultStepHandlerOptions): MastraNodeStepHandler[];
@@ -34,6 +34,7 @@ export declare class MastraGraphExecutionBackend implements GraphExecutionBacken
34
34
  private managementManager?;
35
35
  private suspendStateReader?;
36
36
  private maxResumeBytes;
37
+ private terminalTimeoutMs;
37
38
  private initialized;
38
39
  private _config?;
39
40
  constructor();
@@ -75,7 +76,35 @@ export declare class MastraGraphExecutionBackend implements GraphExecutionBacken
75
76
  * @throws {NotFoundError} when the workflow is owned by another user.
76
77
  */
77
78
  getWorkflow(workflowId: string, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowDocument>;
79
+ /**
80
+ * Seeds canonical workflow documents into the translated-workflow catalogue so
81
+ * they are served by {@link listWorkflows}/{@link getWorkflow} exactly like a
82
+ * document recorded by {@link execute}. Seeded entries are owner-less, so the
83
+ * C23 filter keeps them visible to every caller (the owner-less visibility
84
+ * rule). Fails closed when the backend has not been initialized.
85
+ *
86
+ * @param documents - The canonical documents to register.
87
+ * @returns The seeded workflow summaries.
88
+ * @throws {GraphExecutionError} when the backend is not initialized.
89
+ */
90
+ seedWorkflows(documents: readonly GraphWorkflowDocument[]): Promise<GraphBackendWorkflowSummary[]>;
78
91
  execute(request: GraphBackendExecutionRequest, ...args: MaybeContextualArg<Context>): Promise<GraphExecutionResult>;
92
+ /**
93
+ * Bounds the translated run's terminal wait by the backend's run-level
94
+ * `terminalTimeoutMs` and the caller's cancellation signal, mirroring the
95
+ * Dagster observation bound. Exceeding the timeout fails closed with
96
+ * {@link GRAPH_MASTRA_EXECUTE_TIMEOUT}; an abort fails closed with
97
+ * {@link GRAPH_MASTRA_EXECUTE_ABORTED}. The underlying run is not force-killed
98
+ * (Mastra owns run lifecycle), but the backend stops awaiting it so the run
99
+ * slot and event bridge are released and the run cannot pin the process.
100
+ *
101
+ * @param execution - The in-flight run/stream/result promise.
102
+ * @param signal - The caller's cancellation signal, when supplied.
103
+ * @param workflowId - The workflow id the run belongs to (for error details).
104
+ * @returns Resolves once the run terminates normally.
105
+ * @throws {GraphExecutionError} on timeout or abort.
106
+ */
107
+ private awaitTerminal;
79
108
  /**
80
109
  * Resumes a suspended Mastra run after enforcing the SAA-193 resume guard
81
110
  * (C13/C15/C16/C17/C18). The Mastra run snapshot is authoritative for the
@@ -34,6 +34,7 @@ export declare class MastraGraphExecutionBackend implements GraphExecutionBacken
34
34
  private managementManager?;
35
35
  private suspendStateReader?;
36
36
  private maxResumeBytes;
37
+ private terminalTimeoutMs;
37
38
  private initialized;
38
39
  private _config?;
39
40
  constructor();
@@ -75,7 +76,35 @@ export declare class MastraGraphExecutionBackend implements GraphExecutionBacken
75
76
  * @throws {NotFoundError} when the workflow is owned by another user.
76
77
  */
77
78
  getWorkflow(workflowId: string, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowDocument>;
79
+ /**
80
+ * Seeds canonical workflow documents into the translated-workflow catalogue so
81
+ * they are served by {@link listWorkflows}/{@link getWorkflow} exactly like a
82
+ * document recorded by {@link execute}. Seeded entries are owner-less, so the
83
+ * C23 filter keeps them visible to every caller (the owner-less visibility
84
+ * rule). Fails closed when the backend has not been initialized.
85
+ *
86
+ * @param documents - The canonical documents to register.
87
+ * @returns The seeded workflow summaries.
88
+ * @throws {GraphExecutionError} when the backend is not initialized.
89
+ */
90
+ seedWorkflows(documents: readonly GraphWorkflowDocument[]): Promise<GraphBackendWorkflowSummary[]>;
78
91
  execute(request: GraphBackendExecutionRequest, ...args: MaybeContextualArg<Context>): Promise<GraphExecutionResult>;
92
+ /**
93
+ * Bounds the translated run's terminal wait by the backend's run-level
94
+ * `terminalTimeoutMs` and the caller's cancellation signal, mirroring the
95
+ * Dagster observation bound. Exceeding the timeout fails closed with
96
+ * {@link GRAPH_MASTRA_EXECUTE_TIMEOUT}; an abort fails closed with
97
+ * {@link GRAPH_MASTRA_EXECUTE_ABORTED}. The underlying run is not force-killed
98
+ * (Mastra owns run lifecycle), but the backend stops awaiting it so the run
99
+ * slot and event bridge are released and the run cannot pin the process.
100
+ *
101
+ * @param execution - The in-flight run/stream/result promise.
102
+ * @param signal - The caller's cancellation signal, when supplied.
103
+ * @param workflowId - The workflow id the run belongs to (for error details).
104
+ * @returns Resolves once the run terminates normally.
105
+ * @throws {GraphExecutionError} on timeout or abort.
106
+ */
107
+ private awaitTerminal;
79
108
  /**
80
109
  * Resumes a suspended Mastra run after enforcing the SAA-193 resume guard
81
110
  * (C13/C15/C16/C17/C18). The Mastra run snapshot is authoritative for the
@@ -18,11 +18,11 @@ export declare const GRAPH_MASTRA_IF_KIND = "core.flow.if";
18
18
  /** Document kind translated into a Mastra `switch` branch set. */
19
19
  export declare const GRAPH_MASTRA_SWITCH_KIND = "core.flow.switch";
20
20
  /** Document kind translated into a Mastra `foreach` loop. */
21
- export declare const GRAPH_MASTRA_FOREACH_KIND = "graph-foreach-loop-node";
21
+ export declare const GRAPH_MASTRA_FOREACH_KIND = "core.loop.foreach";
22
22
  /** Document kind translated into a Mastra `do-while` loop. */
23
- export declare const GRAPH_MASTRA_WHILE_KIND = "graph-while-loop-node";
23
+ export declare const GRAPH_MASTRA_WHILE_KIND = "core.loop.while";
24
24
  /** Document kind translated into a Mastra `do-until` loop. */
25
- export declare const GRAPH_MASTRA_UNTIL_KIND = "graph-until-loop-node";
25
+ export declare const GRAPH_MASTRA_UNTIL_KIND = "core.loop.until";
26
26
  /** Document kind translated into a Mastra suspending approval step. */
27
27
  export declare const GRAPH_MASTRA_HUMAN_APPROVAL_KIND = "core.flow.humanApproval";
28
28
  /**
@@ -18,11 +18,11 @@ export declare const GRAPH_MASTRA_IF_KIND = "core.flow.if";
18
18
  /** Document kind translated into a Mastra `switch` branch set. */
19
19
  export declare const GRAPH_MASTRA_SWITCH_KIND = "core.flow.switch";
20
20
  /** Document kind translated into a Mastra `foreach` loop. */
21
- export declare const GRAPH_MASTRA_FOREACH_KIND = "graph-foreach-loop-node";
21
+ export declare const GRAPH_MASTRA_FOREACH_KIND = "core.loop.foreach";
22
22
  /** Document kind translated into a Mastra `do-while` loop. */
23
- export declare const GRAPH_MASTRA_WHILE_KIND = "graph-while-loop-node";
23
+ export declare const GRAPH_MASTRA_WHILE_KIND = "core.loop.while";
24
24
  /** Document kind translated into a Mastra `do-until` loop. */
25
- export declare const GRAPH_MASTRA_UNTIL_KIND = "graph-until-loop-node";
25
+ export declare const GRAPH_MASTRA_UNTIL_KIND = "core.loop.until";
26
26
  /** Document kind translated into a Mastra suspending approval step. */
27
27
  export declare const GRAPH_MASTRA_HUMAN_APPROVAL_KIND = "core.flow.humanApproval";
28
28
  /**