@decaf-ts/as-graph 0.7.0 → 0.8.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 +92 -12
- package/assets/i18n/en.json +1519 -130
- 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/DagsterGraphExecutionBackend.cjs +13 -0
- package/lib/cjs/dagster/DagsterGraphExecutionBackend.cjs.map +1 -1
- package/lib/cjs/dagster/capabilities.cjs +5 -0
- package/lib/cjs/dagster/capabilities.cjs.map +1 -1
- package/lib/cjs/engine/execution/GraphCodeMode.cjs +42 -0
- package/lib/cjs/engine/execution/GraphCodeMode.cjs.map +1 -1
- package/lib/cjs/engine/execution/GraphExecutionEngine.cjs +35 -4
- package/lib/cjs/engine/execution/GraphExecutionEngine.cjs.map +1 -1
- package/lib/cjs/engine/validation/GraphNodeInstanceValidator.cjs +29 -1
- package/lib/cjs/engine/validation/GraphNodeInstanceValidator.cjs.map +1 -1
- package/lib/cjs/engine/validation/GraphWorkflowDocumentValidator.cjs +6 -2
- package/lib/cjs/engine/validation/GraphWorkflowDocumentValidator.cjs.map +1 -1
- package/lib/cjs/mastra/MastraWorkflowCompiler.cjs +41 -9
- package/lib/cjs/mastra/MastraWorkflowCompiler.cjs.map +1 -1
- package/lib/cjs/nest/graph/GraphEngineController.cjs +18 -0
- package/lib/cjs/nest/graph/GraphEngineController.cjs.map +1 -1
- package/lib/cjs/nest/graph/GraphNodeCatalogueController.cjs +14 -0
- package/lib/cjs/nest/graph/GraphNodeCatalogueController.cjs.map +1 -1
- package/lib/cjs/nest/graph/GraphRunController.cjs +17 -0
- package/lib/cjs/nest/graph/GraphRunController.cjs.map +1 -1
- package/lib/cjs/nest/graph/GraphWorkflowController.cjs +34 -5
- package/lib/cjs/nest/graph/GraphWorkflowController.cjs.map +1 -1
- package/lib/cjs/node/comms/discord/node.cjs +384 -0
- package/lib/cjs/node/comms/discord/node.cjs.map +1 -0
- package/lib/cjs/node/comms/outlook/node.cjs +395 -0
- package/lib/cjs/node/comms/outlook/node.cjs.map +1 -0
- package/lib/cjs/node/comms/whatsapp/node.cjs +341 -0
- package/lib/cjs/node/comms/whatsapp/node.cjs.map +1 -0
- package/lib/cjs/node/data/aggregate/node.cjs +196 -0
- package/lib/cjs/node/data/aggregate/node.cjs.map +1 -0
- package/lib/cjs/node/data/compare-datasets/node.cjs +331 -0
- package/lib/cjs/node/data/compare-datasets/node.cjs.map +1 -0
- package/lib/cjs/node/data/item-lists/node.cjs +416 -0
- package/lib/cjs/node/data/item-lists/node.cjs.map +1 -0
- package/lib/cjs/node/data/remove-duplicates/node.cjs +141 -0
- package/lib/cjs/node/data/remove-duplicates/node.cjs.map +1 -0
- package/lib/cjs/node/data/summarize/node.cjs +155 -0
- package/lib/cjs/node/data/summarize/node.cjs.map +1 -0
- package/lib/cjs/node/data/support.cjs +5 -0
- package/lib/cjs/node/data/support.cjs.map +1 -1
- package/lib/cjs/node/data/transform-utils.cjs +719 -0
- package/lib/cjs/node/data/transform-utils.cjs.map +1 -0
- package/lib/cjs/node/index.cjs +216 -110
- package/lib/cjs/node/index.cjs.map +1 -1
- package/lib/cjs/node/io/confluence/node.cjs +253 -0
- package/lib/cjs/node/io/confluence/node.cjs.map +1 -0
- package/lib/cjs/node/io/convert-to-file/node.cjs +349 -0
- package/lib/cjs/node/io/convert-to-file/node.cjs.map +1 -0
- package/lib/cjs/node/io/file-support.cjs +311 -0
- package/lib/cjs/node/io/file-support.cjs.map +1 -0
- package/lib/cjs/node/io/google-calendar/node.cjs +359 -0
- package/lib/cjs/node/io/google-calendar/node.cjs.map +1 -0
- package/lib/cjs/node/io/google-docs/node.cjs +272 -0
- package/lib/cjs/node/io/google-docs/node.cjs.map +1 -0
- package/lib/cjs/node/io/html/node.cjs +275 -0
- package/lib/cjs/node/io/html/node.cjs.map +1 -0
- package/lib/cjs/node/io/html-extract/node.cjs +162 -0
- package/lib/cjs/node/io/html-extract/node.cjs.map +1 -0
- package/lib/cjs/node/io/html-support.cjs +246 -0
- package/lib/cjs/node/io/html-support.cjs.map +1 -0
- package/lib/cjs/node/io/jira/node.cjs +351 -0
- package/lib/cjs/node/io/jira/node.cjs.map +1 -0
- package/lib/cjs/node/io/markdown/node.cjs +229 -0
- package/lib/cjs/node/io/markdown/node.cjs.map +1 -0
- package/lib/cjs/node/io/microsoft-excel/node.cjs +261 -0
- package/lib/cjs/node/io/microsoft-excel/node.cjs.map +1 -0
- package/lib/cjs/node/io/microsoft-sharepoint/node.cjs +274 -0
- package/lib/cjs/node/io/microsoft-sharepoint/node.cjs.map +1 -0
- package/lib/cjs/node/io/read-binary-file/node.cjs +114 -0
- package/lib/cjs/node/io/read-binary-file/node.cjs.map +1 -0
- package/lib/cjs/node/io/read-binary-files/node.cjs +113 -0
- package/lib/cjs/node/io/read-binary-files/node.cjs.map +1 -0
- package/lib/cjs/node/io/write-binary-file/node.cjs +164 -0
- package/lib/cjs/node/io/write-binary-file/node.cjs.map +1 -0
- package/lib/cjs/node/io/xml/node.cjs +322 -0
- package/lib/cjs/node/io/xml/node.cjs.map +1 -0
- package/lib/cjs/node/manifests.cjs +137 -79
- package/lib/cjs/node/manifests.cjs.map +1 -1
- package/lib/cjs/node/storage/rabbitmq/node.cjs +252 -0
- package/lib/cjs/node/storage/rabbitmq/node.cjs.map +1 -0
- package/lib/cjs/node/triggers/error/node.cjs +108 -0
- package/lib/cjs/node/triggers/error/node.cjs.map +1 -0
- package/lib/cjs/node/triggers/postgres/node.cjs +244 -0
- package/lib/cjs/node/triggers/postgres/node.cjs.map +1 -0
- package/lib/cjs/node/triggers/rabbitmq/node.cjs +284 -0
- package/lib/cjs/node/triggers/rabbitmq/node.cjs.map +1 -0
- package/lib/cjs/node/triggers/redis/node.cjs +233 -0
- package/lib/cjs/node/triggers/redis/node.cjs.map +1 -0
- package/lib/cjs/node/triggers/sse/node.cjs +196 -0
- package/lib/cjs/node/triggers/sse/node.cjs.map +1 -0
- package/lib/cjs/node/triggers/support.cjs +107 -0
- package/lib/cjs/node/triggers/support.cjs.map +1 -0
- package/lib/cjs/node/triggers/workflow/node.cjs +193 -0
- package/lib/cjs/node/triggers/workflow/node.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphValueSchemaDerivation.cjs +20 -3
- package/lib/cjs/shared/graph/catalog/GraphValueSchemaDerivation.cjs.map +1 -1
- package/lib/cjs/workflows/boundary-value.workflow.cjs +38 -0
- package/lib/cjs/workflows/boundary-value.workflow.cjs.map +1 -0
- package/lib/cjs/workflows/builders.cjs +47 -0
- package/lib/cjs/workflows/builders.cjs.map +1 -0
- package/lib/cjs/workflows/chat-agent.workflow.cjs +40 -0
- package/lib/cjs/workflows/chat-agent.workflow.cjs.map +1 -0
- package/lib/cjs/workflows/error-boundary.workflow.cjs +54 -0
- package/lib/cjs/workflows/error-boundary.workflow.cjs.map +1 -0
- package/lib/cjs/workflows/event-map.workflow.cjs +37 -0
- package/lib/cjs/workflows/event-map.workflow.cjs.map +1 -0
- package/lib/cjs/workflows/foreach-break.workflow.cjs +58 -0
- package/lib/cjs/workflows/foreach-break.workflow.cjs.map +1 -0
- package/lib/cjs/workflows/human-approval.workflow.cjs +44 -0
- package/lib/cjs/workflows/human-approval.workflow.cjs.map +1 -0
- package/lib/cjs/workflows/if-switch.workflow.cjs +66 -0
- package/lib/cjs/workflows/if-switch.workflow.cjs.map +1 -0
- package/lib/cjs/workflows/index.cjs +135 -0
- package/lib/cjs/workflows/index.cjs.map +1 -0
- package/lib/cjs/workflows/loops-while-until.workflow.cjs +76 -0
- package/lib/cjs/workflows/loops-while-until.workflow.cjs.map +1 -0
- package/lib/cjs/workflows/manual-log.workflow.cjs +52 -0
- package/lib/cjs/workflows/manual-log.workflow.cjs.map +1 -0
- package/lib/cjs/workflows/schedule-code.workflow.cjs +42 -0
- package/lib/cjs/workflows/schedule-code.workflow.cjs.map +1 -0
- package/lib/cjs/workflows/types.cjs +4 -0
- package/lib/cjs/workflows/types.cjs.map +1 -0
- package/lib/cjs/workflows/value-templates.workflow.cjs +43 -0
- package/lib/cjs/workflows/value-templates.workflow.cjs.map +1 -0
- package/lib/cjs/workflows/webhook-form.workflow.cjs +48 -0
- package/lib/cjs/workflows/webhook-form.workflow.cjs.map +1 -0
- package/lib/esm/dagster/DagsterGraphExecutionBackend.js +13 -0
- package/lib/esm/dagster/DagsterGraphExecutionBackend.js.map +1 -1
- package/lib/esm/dagster/capabilities.js +5 -0
- package/lib/esm/dagster/capabilities.js.map +1 -1
- package/lib/esm/engine/execution/GraphCodeMode.js +40 -0
- package/lib/esm/engine/execution/GraphCodeMode.js.map +1 -1
- package/lib/esm/engine/execution/GraphExecutionBackend.js.map +1 -1
- package/lib/esm/engine/execution/GraphExecutionEngine.js +36 -5
- package/lib/esm/engine/execution/GraphExecutionEngine.js.map +1 -1
- package/lib/esm/engine/validation/GraphNodeInstanceValidator.js +29 -1
- package/lib/esm/engine/validation/GraphNodeInstanceValidator.js.map +1 -1
- package/lib/esm/engine/validation/GraphWorkflowDocumentValidator.js +6 -2
- package/lib/esm/engine/validation/GraphWorkflowDocumentValidator.js.map +1 -1
- package/lib/esm/mastra/MastraMemory.js.map +1 -1
- package/lib/esm/mastra/MastraWorkflowCompiler.js +41 -9
- package/lib/esm/mastra/MastraWorkflowCompiler.js.map +1 -1
- package/lib/esm/nest/graph/GraphEngineController.js +19 -1
- package/lib/esm/nest/graph/GraphEngineController.js.map +1 -1
- package/lib/esm/nest/graph/GraphNodeCatalogueController.js +15 -1
- package/lib/esm/nest/graph/GraphNodeCatalogueController.js.map +1 -1
- package/lib/esm/nest/graph/GraphRunController.js +18 -1
- package/lib/esm/nest/graph/GraphRunController.js.map +1 -1
- package/lib/esm/nest/graph/GraphWorkflowController.js +35 -6
- package/lib/esm/nest/graph/GraphWorkflowController.js.map +1 -1
- package/lib/esm/node/comms/discord/node.js +375 -0
- package/lib/esm/node/comms/discord/node.js.map +1 -0
- package/lib/esm/node/comms/outlook/node.js +386 -0
- package/lib/esm/node/comms/outlook/node.js.map +1 -0
- package/lib/esm/node/comms/whatsapp/node.js +332 -0
- package/lib/esm/node/comms/whatsapp/node.js.map +1 -0
- package/lib/esm/node/data/aggregate/node.js +187 -0
- package/lib/esm/node/data/aggregate/node.js.map +1 -0
- package/lib/esm/node/data/compare-datasets/node.js +322 -0
- package/lib/esm/node/data/compare-datasets/node.js.map +1 -0
- package/lib/esm/node/data/item-lists/node.js +407 -0
- package/lib/esm/node/data/item-lists/node.js.map +1 -0
- package/lib/esm/node/data/remove-duplicates/node.js +132 -0
- package/lib/esm/node/data/remove-duplicates/node.js.map +1 -0
- package/lib/esm/node/data/summarize/node.js +146 -0
- package/lib/esm/node/data/summarize/node.js.map +1 -0
- package/lib/esm/node/data/support.js +5 -1
- package/lib/esm/node/data/support.js.map +1 -1
- package/lib/esm/node/data/transform-utils.js +702 -0
- package/lib/esm/node/data/transform-utils.js.map +1 -0
- package/lib/esm/node/index.js +110 -4
- package/lib/esm/node/index.js.map +1 -1
- package/lib/esm/node/io/confluence/node.js +244 -0
- package/lib/esm/node/io/confluence/node.js.map +1 -0
- package/lib/esm/node/io/convert-to-file/node.js +340 -0
- package/lib/esm/node/io/convert-to-file/node.js.map +1 -0
- package/lib/esm/node/io/file-support.js +299 -0
- package/lib/esm/node/io/file-support.js.map +1 -0
- package/lib/esm/node/io/google-calendar/node.js +350 -0
- package/lib/esm/node/io/google-calendar/node.js.map +1 -0
- package/lib/esm/node/io/google-docs/node.js +263 -0
- package/lib/esm/node/io/google-docs/node.js.map +1 -0
- package/lib/esm/node/io/html/node.js +266 -0
- package/lib/esm/node/io/html/node.js.map +1 -0
- package/lib/esm/node/io/html-extract/node.js +153 -0
- package/lib/esm/node/io/html-extract/node.js.map +1 -0
- package/lib/esm/node/io/html-support.js +206 -0
- package/lib/esm/node/io/html-support.js.map +1 -0
- package/lib/esm/node/io/jira/node.js +342 -0
- package/lib/esm/node/io/jira/node.js.map +1 -0
- package/lib/esm/node/io/markdown/node.js +217 -0
- package/lib/esm/node/io/markdown/node.js.map +1 -0
- package/lib/esm/node/io/microsoft-excel/node.js +252 -0
- package/lib/esm/node/io/microsoft-excel/node.js.map +1 -0
- package/lib/esm/node/io/microsoft-sharepoint/node.js +265 -0
- package/lib/esm/node/io/microsoft-sharepoint/node.js.map +1 -0
- package/lib/esm/node/io/read-binary-file/node.js +105 -0
- package/lib/esm/node/io/read-binary-file/node.js.map +1 -0
- package/lib/esm/node/io/read-binary-files/node.js +104 -0
- package/lib/esm/node/io/read-binary-files/node.js.map +1 -0
- package/lib/esm/node/io/write-binary-file/node.js +155 -0
- package/lib/esm/node/io/write-binary-file/node.js.map +1 -0
- package/lib/esm/node/io/xml/node.js +313 -0
- package/lib/esm/node/io/xml/node.js.map +1 -0
- package/lib/esm/node/manifests.js +58 -0
- package/lib/esm/node/manifests.js.map +1 -1
- package/lib/esm/node/storage/rabbitmq/node.js +243 -0
- package/lib/esm/node/storage/rabbitmq/node.js.map +1 -0
- package/lib/esm/node/triggers/error/node.js +99 -0
- package/lib/esm/node/triggers/error/node.js.map +1 -0
- package/lib/esm/node/triggers/postgres/node.js +235 -0
- package/lib/esm/node/triggers/postgres/node.js.map +1 -0
- package/lib/esm/node/triggers/rabbitmq/node.js +275 -0
- package/lib/esm/node/triggers/rabbitmq/node.js.map +1 -0
- package/lib/esm/node/triggers/redis/node.js +224 -0
- package/lib/esm/node/triggers/redis/node.js.map +1 -0
- package/lib/esm/node/triggers/sse/node.js +187 -0
- package/lib/esm/node/triggers/sse/node.js.map +1 -0
- package/lib/esm/node/triggers/support.js +99 -0
- package/lib/esm/node/triggers/support.js.map +1 -0
- package/lib/esm/node/triggers/workflow/node.js +184 -0
- package/lib/esm/node/triggers/workflow/node.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphValueSchemaDerivation.js +20 -3
- package/lib/esm/shared/graph/catalog/GraphValueSchemaDerivation.js.map +1 -1
- package/lib/esm/workflows/boundary-value.workflow.js +34 -0
- package/lib/esm/workflows/boundary-value.workflow.js.map +1 -0
- package/lib/esm/workflows/builders.js +40 -0
- package/lib/esm/workflows/builders.js.map +1 -0
- package/lib/esm/workflows/chat-agent.workflow.js +36 -0
- package/lib/esm/workflows/chat-agent.workflow.js.map +1 -0
- package/lib/esm/workflows/error-boundary.workflow.js +50 -0
- package/lib/esm/workflows/error-boundary.workflow.js.map +1 -0
- package/lib/esm/workflows/event-map.workflow.js +33 -0
- package/lib/esm/workflows/event-map.workflow.js.map +1 -0
- package/lib/esm/workflows/foreach-break.workflow.js +54 -0
- package/lib/esm/workflows/foreach-break.workflow.js.map +1 -0
- package/lib/esm/workflows/human-approval.workflow.js +40 -0
- package/lib/esm/workflows/human-approval.workflow.js.map +1 -0
- package/lib/esm/workflows/if-switch.workflow.js +62 -0
- package/lib/esm/workflows/if-switch.workflow.js.map +1 -0
- package/lib/esm/workflows/index.js +116 -0
- package/lib/esm/workflows/index.js.map +1 -0
- package/lib/esm/workflows/loops-while-until.workflow.js +72 -0
- package/lib/esm/workflows/loops-while-until.workflow.js.map +1 -0
- package/lib/esm/workflows/manual-log.workflow.js +48 -0
- package/lib/esm/workflows/manual-log.workflow.js.map +1 -0
- package/lib/esm/workflows/schedule-code.workflow.js +38 -0
- package/lib/esm/workflows/schedule-code.workflow.js.map +1 -0
- package/lib/esm/workflows/types.js +2 -0
- package/lib/esm/workflows/types.js.map +1 -0
- package/lib/esm/workflows/value-templates.workflow.js +39 -0
- package/lib/esm/workflows/value-templates.workflow.js.map +1 -0
- package/lib/esm/workflows/webhook-form.workflow.js +44 -0
- package/lib/esm/workflows/webhook-form.workflow.js.map +1 -0
- package/lib/types/dagster/DagsterGraphExecutionBackend.d.cts +7 -0
- package/lib/types/dagster/DagsterGraphExecutionBackend.d.mts +7 -0
- package/lib/types/engine/execution/GraphCodeMode.d.cts +46 -0
- package/lib/types/engine/execution/GraphCodeMode.d.mts +46 -0
- package/lib/types/engine/execution/GraphExecutionBackend.d.cts +21 -0
- package/lib/types/engine/execution/GraphExecutionBackend.d.mts +21 -0
- package/lib/types/engine/execution/GraphExecutionEngine.d.cts +28 -3
- package/lib/types/engine/execution/GraphExecutionEngine.d.mts +28 -3
- package/lib/types/engine/validation/GraphNodeInstanceValidator.d.cts +11 -1
- package/lib/types/engine/validation/GraphNodeInstanceValidator.d.mts +11 -1
- package/lib/types/engine/validation/GraphWorkflowDocumentValidator.d.cts +7 -0
- package/lib/types/engine/validation/GraphWorkflowDocumentValidator.d.mts +7 -0
- package/lib/types/mastra/MastraWorkflowCompiler.d.cts +23 -8
- package/lib/types/mastra/MastraWorkflowCompiler.d.mts +23 -8
- package/lib/types/nest/graph/GraphEngineController.d.cts +19 -0
- package/lib/types/nest/graph/GraphEngineController.d.mts +19 -0
- package/lib/types/nest/graph/GraphNodeCatalogueController.d.cts +13 -0
- package/lib/types/nest/graph/GraphNodeCatalogueController.d.mts +13 -0
- package/lib/types/nest/graph/GraphRunController.d.cts +16 -0
- package/lib/types/nest/graph/GraphRunController.d.mts +16 -0
- package/lib/types/nest/graph/GraphWorkflowController.d.cts +26 -3
- package/lib/types/nest/graph/GraphWorkflowController.d.mts +26 -3
- package/lib/types/node/comms/discord/node.d.cts +67 -0
- package/lib/types/node/comms/discord/node.d.mts +67 -0
- package/lib/types/node/comms/outlook/node.d.cts +77 -0
- package/lib/types/node/comms/outlook/node.d.mts +77 -0
- package/lib/types/node/comms/whatsapp/node.d.cts +71 -0
- package/lib/types/node/comms/whatsapp/node.d.mts +71 -0
- package/lib/types/node/data/aggregate/node.d.cts +58 -0
- package/lib/types/node/data/aggregate/node.d.mts +58 -0
- package/lib/types/node/data/compare-datasets/node.d.cts +72 -0
- package/lib/types/node/data/compare-datasets/node.d.mts +72 -0
- package/lib/types/node/data/item-lists/node.d.cts +92 -0
- package/lib/types/node/data/item-lists/node.d.mts +92 -0
- package/lib/types/node/data/remove-duplicates/node.d.cts +47 -0
- package/lib/types/node/data/remove-duplicates/node.d.mts +47 -0
- package/lib/types/node/data/summarize/node.d.cts +44 -0
- package/lib/types/node/data/summarize/node.d.mts +44 -0
- package/lib/types/node/data/support.d.cts +13 -0
- package/lib/types/node/data/support.d.mts +13 -0
- package/lib/types/node/data/transform-utils.d.cts +236 -0
- package/lib/types/node/data/transform-utils.d.mts +236 -0
- package/lib/types/node/index.d.cts +54 -6
- package/lib/types/node/index.d.mts +54 -6
- package/lib/types/node/io/confluence/node.d.cts +49 -0
- package/lib/types/node/io/confluence/node.d.mts +49 -0
- package/lib/types/node/io/convert-to-file/node.d.cts +75 -0
- package/lib/types/node/io/convert-to-file/node.d.mts +75 -0
- package/lib/types/node/io/file-support.d.cts +118 -0
- package/lib/types/node/io/file-support.d.mts +118 -0
- package/lib/types/node/io/google-calendar/node.d.cts +65 -0
- package/lib/types/node/io/google-calendar/node.d.mts +65 -0
- package/lib/types/node/io/google-docs/node.d.cts +51 -0
- package/lib/types/node/io/google-docs/node.d.mts +51 -0
- package/lib/types/node/io/html/node.d.cts +68 -0
- package/lib/types/node/io/html/node.d.mts +68 -0
- package/lib/types/node/io/html-extract/node.d.cts +42 -0
- package/lib/types/node/io/html-extract/node.d.mts +42 -0
- package/lib/types/node/io/html-support.d.cts +69 -0
- package/lib/types/node/io/html-support.d.mts +69 -0
- package/lib/types/node/io/jira/node.d.cts +57 -0
- package/lib/types/node/io/jira/node.d.mts +57 -0
- package/lib/types/node/io/markdown/node.d.cts +61 -0
- package/lib/types/node/io/markdown/node.d.mts +61 -0
- package/lib/types/node/io/microsoft-excel/node.d.cts +45 -0
- package/lib/types/node/io/microsoft-excel/node.d.mts +45 -0
- package/lib/types/node/io/microsoft-sharepoint/node.d.cts +47 -0
- package/lib/types/node/io/microsoft-sharepoint/node.d.mts +47 -0
- package/lib/types/node/io/read-binary-file/node.d.cts +45 -0
- package/lib/types/node/io/read-binary-file/node.d.mts +45 -0
- package/lib/types/node/io/read-binary-files/node.d.cts +41 -0
- package/lib/types/node/io/read-binary-files/node.d.mts +41 -0
- package/lib/types/node/io/write-binary-file/node.d.cts +55 -0
- package/lib/types/node/io/write-binary-file/node.d.mts +55 -0
- package/lib/types/node/io/xml/node.d.cts +67 -0
- package/lib/types/node/io/xml/node.d.mts +67 -0
- package/lib/types/node/storage/rabbitmq/node.d.cts +55 -0
- package/lib/types/node/storage/rabbitmq/node.d.mts +55 -0
- package/lib/types/node/triggers/error/node.d.cts +34 -0
- package/lib/types/node/triggers/error/node.d.mts +34 -0
- package/lib/types/node/triggers/postgres/node.d.cts +54 -0
- package/lib/types/node/triggers/postgres/node.d.mts +54 -0
- package/lib/types/node/triggers/rabbitmq/node.d.cts +59 -0
- package/lib/types/node/triggers/rabbitmq/node.d.mts +59 -0
- package/lib/types/node/triggers/redis/node.d.cts +53 -0
- package/lib/types/node/triggers/redis/node.d.mts +53 -0
- package/lib/types/node/triggers/sse/node.d.cts +43 -0
- package/lib/types/node/triggers/sse/node.d.mts +43 -0
- package/lib/types/node/triggers/support.d.cts +41 -0
- package/lib/types/node/triggers/support.d.mts +41 -0
- package/lib/types/node/triggers/workflow/node.d.cts +46 -0
- package/lib/types/node/triggers/workflow/node.d.mts +46 -0
- package/lib/types/workflows/boundary-value.workflow.d.cts +3 -0
- package/lib/types/workflows/boundary-value.workflow.d.mts +3 -0
- package/lib/types/workflows/builders.d.cts +31 -0
- package/lib/types/workflows/builders.d.mts +31 -0
- package/lib/types/workflows/chat-agent.workflow.d.cts +3 -0
- package/lib/types/workflows/chat-agent.workflow.d.mts +3 -0
- package/lib/types/workflows/error-boundary.workflow.d.cts +3 -0
- package/lib/types/workflows/error-boundary.workflow.d.mts +3 -0
- package/lib/types/workflows/event-map.workflow.d.cts +3 -0
- package/lib/types/workflows/event-map.workflow.d.mts +3 -0
- package/lib/types/workflows/foreach-break.workflow.d.cts +3 -0
- package/lib/types/workflows/foreach-break.workflow.d.mts +3 -0
- package/lib/types/workflows/human-approval.workflow.d.cts +3 -0
- package/lib/types/workflows/human-approval.workflow.d.mts +3 -0
- package/lib/types/workflows/if-switch.workflow.d.cts +3 -0
- package/lib/types/workflows/if-switch.workflow.d.mts +3 -0
- package/lib/types/workflows/index.d.cts +37 -0
- package/lib/types/workflows/index.d.mts +37 -0
- package/lib/types/workflows/loops-while-until.workflow.d.cts +3 -0
- package/lib/types/workflows/loops-while-until.workflow.d.mts +3 -0
- package/lib/types/workflows/manual-log.workflow.d.cts +3 -0
- package/lib/types/workflows/manual-log.workflow.d.mts +3 -0
- package/lib/types/workflows/schedule-code.workflow.d.cts +3 -0
- package/lib/types/workflows/schedule-code.workflow.d.mts +3 -0
- package/lib/types/workflows/types.d.cts +32 -0
- package/lib/types/workflows/types.d.mts +32 -0
- package/lib/types/workflows/value-templates.workflow.d.cts +16 -0
- package/lib/types/workflows/value-templates.workflow.d.mts +16 -0
- package/lib/types/workflows/webhook-form.workflow.d.cts +3 -0
- package/lib/types/workflows/webhook-form.workflow.d.mts +3 -0
- package/package.json +247 -25
|
@@ -39,6 +39,15 @@ import type { CodeSandboxEvaluator } from "./CodeSandboxEvaluator.d.cts";
|
|
|
39
39
|
export type GraphCodeMode = "hostSide" | "unsupported";
|
|
40
40
|
/** Whether an optional backend capability is supported. */
|
|
41
41
|
export type GraphBackendCapabilityStatus = "supported" | "not_supported";
|
|
42
|
+
/**
|
|
43
|
+
* How a backend's submitted workflow documents must be validated before the
|
|
44
|
+
* facade plans or delegates them. `canonical` is the default authoring contract
|
|
45
|
+
* (every node kind and edge resolved against the trusted catalogue).
|
|
46
|
+
* `deployment` is for backends that serve an opaque deployment projection: the
|
|
47
|
+
* backend re-reads and binds the authoritative deployment artifact itself, so
|
|
48
|
+
* catalogue kind resolution and authoring topology rules do not apply.
|
|
49
|
+
*/
|
|
50
|
+
export type GraphDocumentValidationMode = "canonical" | "deployment";
|
|
42
51
|
/**
|
|
43
52
|
* Engine-agnostic capability metadata a backend declares. Hosts and servers read
|
|
44
53
|
* this to surface what the active backend can do without probing it.
|
|
@@ -60,6 +69,13 @@ export interface GraphBackendWorkflowSummary {
|
|
|
60
69
|
name?: string;
|
|
61
70
|
/** Last update timestamp, when the backing store exposes one. */
|
|
62
71
|
updatedAt?: Date;
|
|
72
|
+
/**
|
|
73
|
+
* Whether a run of this listed workflow can be launched through the facade.
|
|
74
|
+
* Undeclared means "no per-workflow restriction beyond the engine capability";
|
|
75
|
+
* an explicit `false` blocks the UI Run action for this row only (e.g. a
|
|
76
|
+
* read-only canonical document that the deployment does not define as a job).
|
|
77
|
+
*/
|
|
78
|
+
runnable?: boolean;
|
|
63
79
|
}
|
|
64
80
|
/**
|
|
65
81
|
* Minimal workflow catalogue record a {@link GraphBackendWorkflowStore} lists.
|
|
@@ -197,6 +213,11 @@ export interface GraphExecutionBackend<CONFIG extends Record<string, unknown> =
|
|
|
197
213
|
readonly config?: CONFIG;
|
|
198
214
|
/** Whether this backend executes locally (in-process). */
|
|
199
215
|
readonly local: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* The document validation contract this backend requires. Omitted means
|
|
218
|
+
* `canonical`; a deployment-projection backend declares `deployment`.
|
|
219
|
+
*/
|
|
220
|
+
readonly documentValidation?: GraphDocumentValidationMode;
|
|
200
221
|
/**
|
|
201
222
|
* How this backend handles code-mode surfaces (SAA-193 C1). Required so the
|
|
202
223
|
* facade can fail closed before delegating a code-mode workflow to a non-local
|
|
@@ -39,6 +39,15 @@ import type { CodeSandboxEvaluator } from "./CodeSandboxEvaluator.d.mts";
|
|
|
39
39
|
export type GraphCodeMode = "hostSide" | "unsupported";
|
|
40
40
|
/** Whether an optional backend capability is supported. */
|
|
41
41
|
export type GraphBackendCapabilityStatus = "supported" | "not_supported";
|
|
42
|
+
/**
|
|
43
|
+
* How a backend's submitted workflow documents must be validated before the
|
|
44
|
+
* facade plans or delegates them. `canonical` is the default authoring contract
|
|
45
|
+
* (every node kind and edge resolved against the trusted catalogue).
|
|
46
|
+
* `deployment` is for backends that serve an opaque deployment projection: the
|
|
47
|
+
* backend re-reads and binds the authoritative deployment artifact itself, so
|
|
48
|
+
* catalogue kind resolution and authoring topology rules do not apply.
|
|
49
|
+
*/
|
|
50
|
+
export type GraphDocumentValidationMode = "canonical" | "deployment";
|
|
42
51
|
/**
|
|
43
52
|
* Engine-agnostic capability metadata a backend declares. Hosts and servers read
|
|
44
53
|
* this to surface what the active backend can do without probing it.
|
|
@@ -60,6 +69,13 @@ export interface GraphBackendWorkflowSummary {
|
|
|
60
69
|
name?: string;
|
|
61
70
|
/** Last update timestamp, when the backing store exposes one. */
|
|
62
71
|
updatedAt?: Date;
|
|
72
|
+
/**
|
|
73
|
+
* Whether a run of this listed workflow can be launched through the facade.
|
|
74
|
+
* Undeclared means "no per-workflow restriction beyond the engine capability";
|
|
75
|
+
* an explicit `false` blocks the UI Run action for this row only (e.g. a
|
|
76
|
+
* read-only canonical document that the deployment does not define as a job).
|
|
77
|
+
*/
|
|
78
|
+
runnable?: boolean;
|
|
63
79
|
}
|
|
64
80
|
/**
|
|
65
81
|
* Minimal workflow catalogue record a {@link GraphBackendWorkflowStore} lists.
|
|
@@ -197,6 +213,11 @@ export interface GraphExecutionBackend<CONFIG extends Record<string, unknown> =
|
|
|
197
213
|
readonly config?: CONFIG;
|
|
198
214
|
/** Whether this backend executes locally (in-process). */
|
|
199
215
|
readonly local: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* The document validation contract this backend requires. Omitted means
|
|
218
|
+
* `canonical`; a deployment-projection backend declares `deployment`.
|
|
219
|
+
*/
|
|
220
|
+
readonly documentValidation?: GraphDocumentValidationMode;
|
|
200
221
|
/**
|
|
201
222
|
* How this backend handles code-mode surfaces (SAA-193 C1). Required so the
|
|
202
223
|
* facade can fail closed before delegating a code-mode workflow to a non-local
|
|
@@ -27,6 +27,7 @@ import type { GraphNodeCatalogue } from "../catalog/GraphNodeCatalogue.d.cts";
|
|
|
27
27
|
import { GraphExecutionPlanner } from "../planning/GraphExecutionPlanner.d.cts";
|
|
28
28
|
import { GraphWorkflowDocumentValidator, type GraphWorkflowDocumentValidationLimits } from "../validation/GraphWorkflowDocumentValidator.d.cts";
|
|
29
29
|
import type { GraphCredentialAuthorizer } from "../validation/GraphCredentialReferenceValidator.d.cts";
|
|
30
|
+
import type { GraphWorkflowValidationResult } from "../validation/GraphValidationIssue.d.cts";
|
|
30
31
|
import { GraphWebhookResponseRegistry } from "./GraphWebhookResponseRegistry.d.cts";
|
|
31
32
|
import { type GraphDataTableRepository } from "../store/GraphDataTableRepository.d.cts";
|
|
32
33
|
import type { CodeSandboxEvaluator } from "./CodeSandboxEvaluator.d.cts";
|
|
@@ -245,6 +246,21 @@ export declare class GraphExecutionEngine extends ClientBasedService<GraphExecut
|
|
|
245
246
|
private get valueAdapter();
|
|
246
247
|
private get defaultOptions();
|
|
247
248
|
private get documentValidator();
|
|
249
|
+
/**
|
|
250
|
+
* Runs the engine's own document validation gate without planning or
|
|
251
|
+
* executing the workflow.
|
|
252
|
+
*
|
|
253
|
+
* This is the same nine-stage validator the run path applies, so a caller
|
|
254
|
+
* (for example the workflow controller's validate endpoint) accepts and
|
|
255
|
+
* rejects exactly what a launch of the same document would (SAA-1357 D2).
|
|
256
|
+
* The resolved workflow is not returned; only the structural validation
|
|
257
|
+
* result is.
|
|
258
|
+
*
|
|
259
|
+
* @param document - The canonical workflow document to validate.
|
|
260
|
+
* @param args - Optional contextual arguments supplying the operation context.
|
|
261
|
+
* @returns The validation result with `valid` and the accumulated `issues`.
|
|
262
|
+
*/
|
|
263
|
+
validateWorkflowDocument(document: GraphWorkflowDocument, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowValidationResult>;
|
|
248
264
|
/**
|
|
249
265
|
* Registers an observer on the engine's event pipeline.
|
|
250
266
|
*
|
|
@@ -366,9 +382,18 @@ export declare class GraphExecutionEngine extends ClientBasedService<GraphExecut
|
|
|
366
382
|
/** Human-readable name of the active backend, for diagnostics. */
|
|
367
383
|
private get backendName();
|
|
368
384
|
/**
|
|
369
|
-
* SAA-193 C1 fail-closed gate. A non-local backend must not
|
|
370
|
-
* workflow carrying
|
|
371
|
-
* `codeMode: "hostSide"` and the facade has a configured sandbox
|
|
385
|
+
* SAA-193 C1 / SAA-1360 D7 fail-closed gate. A non-local backend must not
|
|
386
|
+
* launch a workflow carrying an executable code-mode surface unless it
|
|
387
|
+
* declares `codeMode: "hostSide"` and the facade has a configured sandbox
|
|
388
|
+
* evaluator.
|
|
389
|
+
*
|
|
390
|
+
* The gate evaluates {@link detectGraphCodeModeBlockingSurfaces}, not the full
|
|
391
|
+
* {@link detectGraphCodeModeSurfaces} inventory: `value-template` surfaces are
|
|
392
|
+
* excluded because a value template is persisted declarative configuration
|
|
393
|
+
* that a translated backend receives as inert JSON and never evaluates, so it
|
|
394
|
+
* cannot execute code remotely. Code nodes, code conditions, and expression
|
|
395
|
+
* bindings still block the launch, so a mixed document fails closed.
|
|
396
|
+
*
|
|
372
397
|
* Local backends are not gated: their code-mode surfaces fail naturally
|
|
373
398
|
* through the existing per-surface `GRAPH_CODE_SANDBOX_NOT_CONFIGURED` path.
|
|
374
399
|
*/
|
|
@@ -27,6 +27,7 @@ import type { GraphNodeCatalogue } from "../catalog/GraphNodeCatalogue.d.mts";
|
|
|
27
27
|
import { GraphExecutionPlanner } from "../planning/GraphExecutionPlanner.d.mts";
|
|
28
28
|
import { GraphWorkflowDocumentValidator, type GraphWorkflowDocumentValidationLimits } from "../validation/GraphWorkflowDocumentValidator.d.mts";
|
|
29
29
|
import type { GraphCredentialAuthorizer } from "../validation/GraphCredentialReferenceValidator.d.mts";
|
|
30
|
+
import type { GraphWorkflowValidationResult } from "../validation/GraphValidationIssue.d.mts";
|
|
30
31
|
import { GraphWebhookResponseRegistry } from "./GraphWebhookResponseRegistry.d.mts";
|
|
31
32
|
import { type GraphDataTableRepository } from "../store/GraphDataTableRepository.d.mts";
|
|
32
33
|
import type { CodeSandboxEvaluator } from "./CodeSandboxEvaluator.d.mts";
|
|
@@ -245,6 +246,21 @@ export declare class GraphExecutionEngine extends ClientBasedService<GraphExecut
|
|
|
245
246
|
private get valueAdapter();
|
|
246
247
|
private get defaultOptions();
|
|
247
248
|
private get documentValidator();
|
|
249
|
+
/**
|
|
250
|
+
* Runs the engine's own document validation gate without planning or
|
|
251
|
+
* executing the workflow.
|
|
252
|
+
*
|
|
253
|
+
* This is the same nine-stage validator the run path applies, so a caller
|
|
254
|
+
* (for example the workflow controller's validate endpoint) accepts and
|
|
255
|
+
* rejects exactly what a launch of the same document would (SAA-1357 D2).
|
|
256
|
+
* The resolved workflow is not returned; only the structural validation
|
|
257
|
+
* result is.
|
|
258
|
+
*
|
|
259
|
+
* @param document - The canonical workflow document to validate.
|
|
260
|
+
* @param args - Optional contextual arguments supplying the operation context.
|
|
261
|
+
* @returns The validation result with `valid` and the accumulated `issues`.
|
|
262
|
+
*/
|
|
263
|
+
validateWorkflowDocument(document: GraphWorkflowDocument, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowValidationResult>;
|
|
248
264
|
/**
|
|
249
265
|
* Registers an observer on the engine's event pipeline.
|
|
250
266
|
*
|
|
@@ -366,9 +382,18 @@ export declare class GraphExecutionEngine extends ClientBasedService<GraphExecut
|
|
|
366
382
|
/** Human-readable name of the active backend, for diagnostics. */
|
|
367
383
|
private get backendName();
|
|
368
384
|
/**
|
|
369
|
-
* SAA-193 C1 fail-closed gate. A non-local backend must not
|
|
370
|
-
* workflow carrying
|
|
371
|
-
* `codeMode: "hostSide"` and the facade has a configured sandbox
|
|
385
|
+
* SAA-193 C1 / SAA-1360 D7 fail-closed gate. A non-local backend must not
|
|
386
|
+
* launch a workflow carrying an executable code-mode surface unless it
|
|
387
|
+
* declares `codeMode: "hostSide"` and the facade has a configured sandbox
|
|
388
|
+
* evaluator.
|
|
389
|
+
*
|
|
390
|
+
* The gate evaluates {@link detectGraphCodeModeBlockingSurfaces}, not the full
|
|
391
|
+
* {@link detectGraphCodeModeSurfaces} inventory: `value-template` surfaces are
|
|
392
|
+
* excluded because a value template is persisted declarative configuration
|
|
393
|
+
* that a translated backend receives as inert JSON and never evaluates, so it
|
|
394
|
+
* cannot execute code remotely. Code nodes, code conditions, and expression
|
|
395
|
+
* bindings still block the launch, so a mixed document fails closed.
|
|
396
|
+
*
|
|
372
397
|
* Local backends are not gated: their code-mode surfaces fail naturally
|
|
373
398
|
* through the existing per-surface `GRAPH_CODE_SANDBOX_NOT_CONFIGURED` path.
|
|
374
399
|
*/
|
|
@@ -13,13 +13,23 @@ import type { GraphNodeCatalogue } from "../catalog/GraphNodeCatalogue.d.cts";
|
|
|
13
13
|
import type { GraphNodeResolutionContext, GraphResolvedNodeManifest } from "../../shared/graph/index.d.cts";
|
|
14
14
|
import type { GraphValidationIssue } from "./GraphValidationIssue.d.cts";
|
|
15
15
|
import type { GraphResolvedNodeInstance } from "./GraphResolvedWorkflow.d.cts";
|
|
16
|
+
/** Options controlling kind resolution. */
|
|
17
|
+
export interface GraphNodeInstanceValidatorOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Resolve unknown kinds and their reference-only edges for a backend that
|
|
20
|
+
* serves an opaque deployment projection and binds the authoritative artifact
|
|
21
|
+
* itself. The synthetic manifest is lenient and its executor fails closed.
|
|
22
|
+
*/
|
|
23
|
+
deploymentProjection?: boolean;
|
|
24
|
+
}
|
|
16
25
|
/**
|
|
17
26
|
* Resolves node instances against the backend catalogue and validates the
|
|
18
27
|
* resolved dynamic-port surface.
|
|
19
28
|
*/
|
|
20
29
|
export declare class GraphNodeInstanceValidator {
|
|
21
30
|
private readonly catalogue;
|
|
22
|
-
|
|
31
|
+
private readonly options;
|
|
32
|
+
constructor(catalogue: GraphNodeCatalogue, options?: GraphNodeInstanceValidatorOptions);
|
|
23
33
|
/**
|
|
24
34
|
* Stage 2 — kind resolution. Every node kind must exist in the backend
|
|
25
35
|
* catalogue; the effective manifest (with dynamic ports expanded from the
|
|
@@ -13,13 +13,23 @@ import type { GraphNodeCatalogue } from "../catalog/GraphNodeCatalogue.d.mts";
|
|
|
13
13
|
import type { GraphNodeResolutionContext, GraphResolvedNodeManifest } from "../../shared/graph/index.d.mts";
|
|
14
14
|
import type { GraphValidationIssue } from "./GraphValidationIssue.d.mts";
|
|
15
15
|
import type { GraphResolvedNodeInstance } from "./GraphResolvedWorkflow.d.mts";
|
|
16
|
+
/** Options controlling kind resolution. */
|
|
17
|
+
export interface GraphNodeInstanceValidatorOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Resolve unknown kinds and their reference-only edges for a backend that
|
|
20
|
+
* serves an opaque deployment projection and binds the authoritative artifact
|
|
21
|
+
* itself. The synthetic manifest is lenient and its executor fails closed.
|
|
22
|
+
*/
|
|
23
|
+
deploymentProjection?: boolean;
|
|
24
|
+
}
|
|
16
25
|
/**
|
|
17
26
|
* Resolves node instances against the backend catalogue and validates the
|
|
18
27
|
* resolved dynamic-port surface.
|
|
19
28
|
*/
|
|
20
29
|
export declare class GraphNodeInstanceValidator {
|
|
21
30
|
private readonly catalogue;
|
|
22
|
-
|
|
31
|
+
private readonly options;
|
|
32
|
+
constructor(catalogue: GraphNodeCatalogue, options?: GraphNodeInstanceValidatorOptions);
|
|
23
33
|
/**
|
|
24
34
|
* Stage 2 — kind resolution. Every node kind must exist in the backend
|
|
25
35
|
* catalogue; the effective manifest (with dynamic ports expanded from the
|
|
@@ -78,6 +78,13 @@ export interface GraphWorkflowDocumentValidatorOptions {
|
|
|
78
78
|
* literal+edge bindings are rejected).
|
|
79
79
|
*/
|
|
80
80
|
allowLiteralAndEdgeBindings?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Validate a backend-served deployment projection instead of an authorable
|
|
83
|
+
* canonical document: unknown node kinds resolve leniently and the
|
|
84
|
+
* authoring-only loose-node rule does not apply. Structural, JSON-safety,
|
|
85
|
+
* limit, and forbidden-field checks still run.
|
|
86
|
+
*/
|
|
87
|
+
deploymentProjection?: boolean;
|
|
81
88
|
}
|
|
82
89
|
/**
|
|
83
90
|
* Returns `true` when the value structurally looks like a resolved workflow
|
|
@@ -78,6 +78,13 @@ export interface GraphWorkflowDocumentValidatorOptions {
|
|
|
78
78
|
* literal+edge bindings are rejected).
|
|
79
79
|
*/
|
|
80
80
|
allowLiteralAndEdgeBindings?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Validate a backend-served deployment projection instead of an authorable
|
|
83
|
+
* canonical document: unknown node kinds resolve leniently and the
|
|
84
|
+
* authoring-only loose-node rule does not apply. Structural, JSON-safety,
|
|
85
|
+
* limit, and forbidden-field checks still run.
|
|
86
|
+
*/
|
|
87
|
+
deploymentProjection?: boolean;
|
|
81
88
|
}
|
|
82
89
|
/**
|
|
83
90
|
* Returns `true` when the value structurally looks like a resolved workflow
|
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
* order into Mastra builder calls: leaf nodes become steps via host-provided
|
|
7
7
|
* handlers, `if`/`switch` nodes become branches over shared condition
|
|
8
8
|
* predicates, loops nest a recursive sub-compilation, and human-approval nodes
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* translate either to a suspending step with a validated, non-degraded resume
|
|
10
|
+
* schema (when the node declares one) or to a non-suspending inline approval
|
|
11
|
+
* that mirrors the reference engine (when it declares none). Compiled workflows
|
|
12
|
+
* are cached by document id and fingerprint; translation fails closed on
|
|
13
|
+
* unsupported kinds and cyclic documents.
|
|
12
14
|
*/
|
|
13
15
|
import { z } from "zod";
|
|
14
16
|
import type { GraphWorkflowDocument } from "../shared/graph/document/GraphWorkflowDocument.d.cts";
|
|
@@ -23,7 +25,10 @@ export declare const GRAPH_MASTRA_FOREACH_KIND = "core.loop.foreach";
|
|
|
23
25
|
export declare const GRAPH_MASTRA_WHILE_KIND = "core.loop.while";
|
|
24
26
|
/** Document kind translated into a Mastra `do-until` loop. */
|
|
25
27
|
export declare const GRAPH_MASTRA_UNTIL_KIND = "core.loop.until";
|
|
26
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Document kind translated into a Mastra approval step: suspending when the
|
|
30
|
+
* node declares a resume schema, inline otherwise.
|
|
31
|
+
*/
|
|
27
32
|
export declare const GRAPH_MASTRA_HUMAN_APPROVAL_KIND = "core.flow.humanApproval";
|
|
28
33
|
/**
|
|
29
34
|
* A compiled Mastra workflow plus everything resume and capability reporting
|
|
@@ -162,9 +167,18 @@ export declare class MastraWorkflowCompiler {
|
|
|
162
167
|
*/
|
|
163
168
|
private applyLoop;
|
|
164
169
|
/**
|
|
165
|
-
* Translates a human-approval node into a suspending
|
|
166
|
-
*
|
|
167
|
-
*
|
|
170
|
+
* Translates a human-approval node into a suspending or non-suspending Mastra
|
|
171
|
+
* step (C15; SAA-1360 D6).
|
|
172
|
+
*
|
|
173
|
+
* - When the node declares `parameters.resumeSchema`, the step suspends and
|
|
174
|
+
* the schema passes through {@link assertMastraResumeSchemaSafe}, so a
|
|
175
|
+
* missing, `any`, or otherwise degraded schema fails closed. The validated
|
|
176
|
+
* schema is recorded in `resumeSchemas`, and a non-approved resume is
|
|
177
|
+
* reported as a rejected outcome.
|
|
178
|
+
* - When the node declares no `resumeSchema`, the step is a non-suspending
|
|
179
|
+
* inline approval that mirrors the reference engine: `parameters.approved
|
|
180
|
+
* === false` yields `{ rejected: value }`, otherwise `{ approved: value }`,
|
|
181
|
+
* and no resume schema is recorded.
|
|
168
182
|
*
|
|
169
183
|
* @param cursor - The builder position to extend.
|
|
170
184
|
* @param node - The human-approval node to translate.
|
|
@@ -172,7 +186,8 @@ export declare class MastraWorkflowCompiler {
|
|
|
172
186
|
* @param resumeSchemas - Accumulated resume schemas by node id.
|
|
173
187
|
* @param degradedSchemas - Accumulated degraded-schema node ids.
|
|
174
188
|
* @returns The extended builder position.
|
|
175
|
-
* @throws {GraphExecutionError} When the
|
|
189
|
+
* @throws {GraphExecutionError} When the node declares a resume schema that
|
|
190
|
+
* is missing or degraded.
|
|
176
191
|
*/
|
|
177
192
|
private applyHumanApproval;
|
|
178
193
|
/**
|
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
* order into Mastra builder calls: leaf nodes become steps via host-provided
|
|
7
7
|
* handlers, `if`/`switch` nodes become branches over shared condition
|
|
8
8
|
* predicates, loops nest a recursive sub-compilation, and human-approval nodes
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* translate either to a suspending step with a validated, non-degraded resume
|
|
10
|
+
* schema (when the node declares one) or to a non-suspending inline approval
|
|
11
|
+
* that mirrors the reference engine (when it declares none). Compiled workflows
|
|
12
|
+
* are cached by document id and fingerprint; translation fails closed on
|
|
13
|
+
* unsupported kinds and cyclic documents.
|
|
12
14
|
*/
|
|
13
15
|
import { z } from "zod";
|
|
14
16
|
import type { GraphWorkflowDocument } from "../shared/graph/document/GraphWorkflowDocument.d.mts";
|
|
@@ -23,7 +25,10 @@ export declare const GRAPH_MASTRA_FOREACH_KIND = "core.loop.foreach";
|
|
|
23
25
|
export declare const GRAPH_MASTRA_WHILE_KIND = "core.loop.while";
|
|
24
26
|
/** Document kind translated into a Mastra `do-until` loop. */
|
|
25
27
|
export declare const GRAPH_MASTRA_UNTIL_KIND = "core.loop.until";
|
|
26
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Document kind translated into a Mastra approval step: suspending when the
|
|
30
|
+
* node declares a resume schema, inline otherwise.
|
|
31
|
+
*/
|
|
27
32
|
export declare const GRAPH_MASTRA_HUMAN_APPROVAL_KIND = "core.flow.humanApproval";
|
|
28
33
|
/**
|
|
29
34
|
* A compiled Mastra workflow plus everything resume and capability reporting
|
|
@@ -162,9 +167,18 @@ export declare class MastraWorkflowCompiler {
|
|
|
162
167
|
*/
|
|
163
168
|
private applyLoop;
|
|
164
169
|
/**
|
|
165
|
-
* Translates a human-approval node into a suspending
|
|
166
|
-
*
|
|
167
|
-
*
|
|
170
|
+
* Translates a human-approval node into a suspending or non-suspending Mastra
|
|
171
|
+
* step (C15; SAA-1360 D6).
|
|
172
|
+
*
|
|
173
|
+
* - When the node declares `parameters.resumeSchema`, the step suspends and
|
|
174
|
+
* the schema passes through {@link assertMastraResumeSchemaSafe}, so a
|
|
175
|
+
* missing, `any`, or otherwise degraded schema fails closed. The validated
|
|
176
|
+
* schema is recorded in `resumeSchemas`, and a non-approved resume is
|
|
177
|
+
* reported as a rejected outcome.
|
|
178
|
+
* - When the node declares no `resumeSchema`, the step is a non-suspending
|
|
179
|
+
* inline approval that mirrors the reference engine: `parameters.approved
|
|
180
|
+
* === false` yields `{ rejected: value }`, otherwise `{ approved: value }`,
|
|
181
|
+
* and no resume schema is recorded.
|
|
168
182
|
*
|
|
169
183
|
* @param cursor - The builder position to extend.
|
|
170
184
|
* @param node - The human-approval node to translate.
|
|
@@ -172,7 +186,8 @@ export declare class MastraWorkflowCompiler {
|
|
|
172
186
|
* @param resumeSchemas - Accumulated resume schemas by node id.
|
|
173
187
|
* @param degradedSchemas - Accumulated degraded-schema node ids.
|
|
174
188
|
* @returns The extended builder position.
|
|
175
|
-
* @throws {GraphExecutionError} When the
|
|
189
|
+
* @throws {GraphExecutionError} When the node declares a resume schema that
|
|
190
|
+
* is missing or degraded.
|
|
176
191
|
*/
|
|
177
192
|
private applyHumanApproval;
|
|
178
193
|
/**
|
|
@@ -10,6 +10,11 @@ export interface GraphEngineWorkflowSummary {
|
|
|
10
10
|
name?: string;
|
|
11
11
|
/** ISO timestamp of the last update, when the backend exposes one. */
|
|
12
12
|
updatedAt?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Whether a run of this listed workflow can be launched through the facade.
|
|
15
|
+
* Omitted when the backend declares no per-workflow restriction.
|
|
16
|
+
*/
|
|
17
|
+
runnable?: boolean;
|
|
13
18
|
}
|
|
14
19
|
/**
|
|
15
20
|
* Engine capability manifest and engine-scoped workflow catalogue endpoints:
|
|
@@ -24,6 +29,20 @@ export interface GraphEngineWorkflowSummary {
|
|
|
24
29
|
*
|
|
25
30
|
* All routes are read-only `GET`s, select engines by allowlisted id only, and
|
|
26
31
|
* never reflect arbitrary query input.
|
|
32
|
+
*
|
|
33
|
+
* ### Authentication
|
|
34
|
+
*
|
|
35
|
+
* The class is annotated `@Public()` so the for-nest global `AuthInterceptor`
|
|
36
|
+
* (installed by `DecafAuthModule` when `authGlobal` is true) does not pre-empt
|
|
37
|
+
* these routes with its own model/role/namespace gate. This is a "the
|
|
38
|
+
* controller owns its auth policy" marker, not anonymous access: the for-nest
|
|
39
|
+
* `AuthMiddleware` still primes the injected {@link DecafRequestContext}, and
|
|
40
|
+
* every route calls `requireAuthenticatedContext()`, which defaults to
|
|
41
|
+
* `auth: "required"` (`401` without a request context or a resolved owner user)
|
|
42
|
+
* and admits anonymous callers only under the explicit `auth: "optional"`
|
|
43
|
+
* mode. Workflow and node namespace/role authorization remains the execution
|
|
44
|
+
* engine's `GraphAuthValidator` concern; these read routes expose no
|
|
45
|
+
* `allowAnonymousAccess` tolerance of their own.
|
|
27
46
|
*/
|
|
28
47
|
export declare class GraphEngineController {
|
|
29
48
|
private readonly capabilityService;
|
|
@@ -10,6 +10,11 @@ export interface GraphEngineWorkflowSummary {
|
|
|
10
10
|
name?: string;
|
|
11
11
|
/** ISO timestamp of the last update, when the backend exposes one. */
|
|
12
12
|
updatedAt?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Whether a run of this listed workflow can be launched through the facade.
|
|
15
|
+
* Omitted when the backend declares no per-workflow restriction.
|
|
16
|
+
*/
|
|
17
|
+
runnable?: boolean;
|
|
13
18
|
}
|
|
14
19
|
/**
|
|
15
20
|
* Engine capability manifest and engine-scoped workflow catalogue endpoints:
|
|
@@ -24,6 +29,20 @@ export interface GraphEngineWorkflowSummary {
|
|
|
24
29
|
*
|
|
25
30
|
* All routes are read-only `GET`s, select engines by allowlisted id only, and
|
|
26
31
|
* never reflect arbitrary query input.
|
|
32
|
+
*
|
|
33
|
+
* ### Authentication
|
|
34
|
+
*
|
|
35
|
+
* The class is annotated `@Public()` so the for-nest global `AuthInterceptor`
|
|
36
|
+
* (installed by `DecafAuthModule` when `authGlobal` is true) does not pre-empt
|
|
37
|
+
* these routes with its own model/role/namespace gate. This is a "the
|
|
38
|
+
* controller owns its auth policy" marker, not anonymous access: the for-nest
|
|
39
|
+
* `AuthMiddleware` still primes the injected {@link DecafRequestContext}, and
|
|
40
|
+
* every route calls `requireAuthenticatedContext()`, which defaults to
|
|
41
|
+
* `auth: "required"` (`401` without a request context or a resolved owner user)
|
|
42
|
+
* and admits anonymous callers only under the explicit `auth: "optional"`
|
|
43
|
+
* mode. Workflow and node namespace/role authorization remains the execution
|
|
44
|
+
* engine's `GraphAuthValidator` concern; these read routes expose no
|
|
45
|
+
* `allowAnonymousAccess` tolerance of their own.
|
|
27
46
|
*/
|
|
28
47
|
export declare class GraphEngineController {
|
|
29
48
|
private readonly capabilityService;
|
|
@@ -56,6 +56,19 @@ export interface GraphNodeMethodRequestDto {
|
|
|
56
56
|
* instances, and invokes declared node methods. Enforces configured
|
|
57
57
|
* authentication and `@nestjs/throttler` request-rate limits on the expensive
|
|
58
58
|
* `resolve`/`methods` operations, and rejects non-JSON-safe request bodies.
|
|
59
|
+
*
|
|
60
|
+
* ### Authentication
|
|
61
|
+
*
|
|
62
|
+
* The class is annotated `@Public()` so the for-nest global `AuthInterceptor`
|
|
63
|
+
* (installed by `DecafAuthModule` when `authGlobal` is true) does not pre-empt
|
|
64
|
+
* these routes with its own model/role/namespace gate; it does not make the
|
|
65
|
+
* catalogue anonymous. The for-nest `AuthMiddleware` still primes the injected
|
|
66
|
+
* {@link DecafRequestContext}, and every route calls
|
|
67
|
+
* `requireAuthenticatedContext()`, whose `auth` option defaults to `"required"`
|
|
68
|
+
* (`401` without a request context) and admits anonymous callers only when
|
|
69
|
+
* `"optional"` is configured. Node namespace/role checks remain the execution
|
|
70
|
+
* engine's `GraphAuthValidator` responsibility at planning/execution time;
|
|
71
|
+
* this controller exposes no `allowAnonymousAccess` tolerance.
|
|
59
72
|
*/
|
|
60
73
|
export declare class GraphNodeCatalogueController {
|
|
61
74
|
private readonly catalogue;
|
|
@@ -56,6 +56,19 @@ export interface GraphNodeMethodRequestDto {
|
|
|
56
56
|
* instances, and invokes declared node methods. Enforces configured
|
|
57
57
|
* authentication and `@nestjs/throttler` request-rate limits on the expensive
|
|
58
58
|
* `resolve`/`methods` operations, and rejects non-JSON-safe request bodies.
|
|
59
|
+
*
|
|
60
|
+
* ### Authentication
|
|
61
|
+
*
|
|
62
|
+
* The class is annotated `@Public()` so the for-nest global `AuthInterceptor`
|
|
63
|
+
* (installed by `DecafAuthModule` when `authGlobal` is true) does not pre-empt
|
|
64
|
+
* these routes with its own model/role/namespace gate; it does not make the
|
|
65
|
+
* catalogue anonymous. The for-nest `AuthMiddleware` still primes the injected
|
|
66
|
+
* {@link DecafRequestContext}, and every route calls
|
|
67
|
+
* `requireAuthenticatedContext()`, whose `auth` option defaults to `"required"`
|
|
68
|
+
* (`401` without a request context) and admits anonymous callers only when
|
|
69
|
+
* `"optional"` is configured. Node namespace/role checks remain the execution
|
|
70
|
+
* engine's `GraphAuthValidator` responsibility at planning/execution time;
|
|
71
|
+
* this controller exposes no `allowAnonymousAccess` tolerance.
|
|
59
72
|
*/
|
|
60
73
|
export declare class GraphNodeCatalogueController {
|
|
61
74
|
private readonly catalogue;
|
|
@@ -66,6 +66,22 @@ export interface GraphRunRequestBody {
|
|
|
66
66
|
* `GET /graph/runs/:runId/events` streams the run's sequenced event
|
|
67
67
|
* envelopes over SSE until a terminal event closes the stream. Every
|
|
68
68
|
* operation is ownership-checked against the requesting user.
|
|
69
|
+
*
|
|
70
|
+
* ### Authentication
|
|
71
|
+
*
|
|
72
|
+
* The class is annotated `@Public()` so the for-nest global `AuthInterceptor`
|
|
73
|
+
* (installed by `DecafAuthModule` when `authGlobal` is true) does not pre-empt
|
|
74
|
+
* the run routes with its own model/role/namespace gate; runs are not
|
|
75
|
+
* anonymous. The for-nest `AuthMiddleware` still primes the injected
|
|
76
|
+
* {@link DecafRequestContext}, and every route calls
|
|
77
|
+
* `requireAuthenticatedContext()`, which defaults to `auth: "required"` (`401`
|
|
78
|
+
* without a request context or a resolved owner user) and admits anonymous
|
|
79
|
+
* callers only under `auth: "optional"`. Runs stay ownership-checked, and the
|
|
80
|
+
* execution engine's `GraphAuthValidator` still enforces the workflow and
|
|
81
|
+
* per-node namespace/role requirements before any node executes. The
|
|
82
|
+
* service-level `allowAnonymousAccess` tolerance widens read visibility for
|
|
83
|
+
* owner-less runs only; it never authorizes a mutation or replaces
|
|
84
|
+
* authentication.
|
|
69
85
|
*/
|
|
70
86
|
export declare class GraphRunController {
|
|
71
87
|
private readonly runService;
|
|
@@ -66,6 +66,22 @@ export interface GraphRunRequestBody {
|
|
|
66
66
|
* `GET /graph/runs/:runId/events` streams the run's sequenced event
|
|
67
67
|
* envelopes over SSE until a terminal event closes the stream. Every
|
|
68
68
|
* operation is ownership-checked against the requesting user.
|
|
69
|
+
*
|
|
70
|
+
* ### Authentication
|
|
71
|
+
*
|
|
72
|
+
* The class is annotated `@Public()` so the for-nest global `AuthInterceptor`
|
|
73
|
+
* (installed by `DecafAuthModule` when `authGlobal` is true) does not pre-empt
|
|
74
|
+
* the run routes with its own model/role/namespace gate; runs are not
|
|
75
|
+
* anonymous. The for-nest `AuthMiddleware` still primes the injected
|
|
76
|
+
* {@link DecafRequestContext}, and every route calls
|
|
77
|
+
* `requireAuthenticatedContext()`, which defaults to `auth: "required"` (`401`
|
|
78
|
+
* without a request context or a resolved owner user) and admits anonymous
|
|
79
|
+
* callers only under `auth: "optional"`. Runs stay ownership-checked, and the
|
|
80
|
+
* execution engine's `GraphAuthValidator` still enforces the workflow and
|
|
81
|
+
* per-node namespace/role requirements before any node executes. The
|
|
82
|
+
* service-level `allowAnonymousAccess` tolerance widens read visibility for
|
|
83
|
+
* owner-less runs only; it never authorizes a mutation or replaces
|
|
84
|
+
* authentication.
|
|
69
85
|
*/
|
|
70
86
|
export declare class GraphRunController {
|
|
71
87
|
private readonly runService;
|
|
@@ -2,6 +2,7 @@ import type { GraphWorkflowDocument } from "../../shared/graph/index.d.cts";
|
|
|
2
2
|
import { DecafRequestContext } from "@decaf-ts/for-nest";
|
|
3
3
|
import type { GraphWorkflowValidationResult } from "../..//index.d.cts";
|
|
4
4
|
import { GraphWorkflowService } from "../../engine/services/GraphWorkflowService.d.cts";
|
|
5
|
+
import { GraphExecutionEngine } from "../../engine/execution/GraphExecutionEngine.d.cts";
|
|
5
6
|
import type { GraphWorkflowDocumentLimits } from "../../engine/validation/GraphWorkflowDocumentLimits.d.cts";
|
|
6
7
|
/** DI token for {@link GraphWorkflowControllerOptions}. */
|
|
7
8
|
export declare const GRAPH_WORKFLOW_OPTIONS = "GRAPH_WORKFLOW_OPTIONS";
|
|
@@ -44,15 +45,32 @@ export interface GraphWorkflowSummary {
|
|
|
44
45
|
* editor state is preserved verbatim for lossless round trips).
|
|
45
46
|
* - `GET /graph/workflows/{workflowId}` — load the canonical document;
|
|
46
47
|
* legacy persisted snapshots are converted losslessly on the read path.
|
|
47
|
-
* - `POST /graph/workflows/validate` — run
|
|
48
|
+
* - `POST /graph/workflows/validate` — run the execution engine's nine-stage
|
|
49
|
+
* validation gate (the same gate `POST /graph/runs` applies) and return
|
|
48
50
|
* structured issues (`code`, `path`, `nodeId`, `edgeId`, `message`,
|
|
49
51
|
* safe `details`).
|
|
52
|
+
*
|
|
53
|
+
* ### Authentication
|
|
54
|
+
*
|
|
55
|
+
* The class is annotated `@Public()` so the for-nest global `AuthInterceptor`
|
|
56
|
+
* (installed by `DecafAuthModule` when `authGlobal` is true) does not pre-empt
|
|
57
|
+
* these routes with its own model/role/namespace gate; it is not a public or
|
|
58
|
+
* anonymous endpoint. The for-nest `AuthMiddleware` still primes the injected
|
|
59
|
+
* {@link DecafRequestContext}, and every route calls
|
|
60
|
+
* `requireAuthenticatedContext()`, which defaults to `auth: "required"` (`401`
|
|
61
|
+
* without a request context or a resolved owner user) and admits anonymous
|
|
62
|
+
* callers only under `auth: "optional"`. Per-user ownership is enforced by
|
|
63
|
+
* {@link GraphWorkflowService}: the service-level `allowAnonymousAccess`
|
|
64
|
+
* tolerance relaxes reads for owner-less resources only and never authorizes
|
|
65
|
+
* an overwrite. The execution engine's `GraphAuthValidator` still checks
|
|
66
|
+
* workflow and node namespaces when a document is run.
|
|
50
67
|
*/
|
|
51
68
|
export declare class GraphWorkflowController {
|
|
52
69
|
private readonly workflowService;
|
|
53
70
|
private readonly requestContext?;
|
|
54
71
|
private readonly options;
|
|
55
|
-
|
|
72
|
+
private readonly executionEngine?;
|
|
73
|
+
constructor(workflowService: GraphWorkflowService, requestContext?: DecafRequestContext | undefined, options?: GraphWorkflowControllerOptions, executionEngine?: GraphExecutionEngine | undefined);
|
|
56
74
|
/**
|
|
57
75
|
* Enforces the configured authentication mode: `auth` defaults to
|
|
58
76
|
* `"required"` (SAA-595 secure-defaults alignment) and rejects a request
|
|
@@ -95,7 +113,12 @@ export declare class GraphWorkflowController {
|
|
|
95
113
|
*/
|
|
96
114
|
getWorkflow(workflowId: string): Promise<GraphWorkflowDocument>;
|
|
97
115
|
/**
|
|
98
|
-
* Validates a workflow document
|
|
116
|
+
* Validates a workflow document without persisting it. When the execution
|
|
117
|
+
* engine is available the run path's own nine-stage validator is used, so
|
|
118
|
+
* this endpoint accepts and rejects exactly what `POST /graph/runs` will
|
|
119
|
+
* (SAA-1357 D2); the resolved workflow is never returned over the wire.
|
|
120
|
+
* Without a wired engine (standalone controller use) the persistence
|
|
121
|
+
* boundary gate remains the fallback.
|
|
99
122
|
*
|
|
100
123
|
* @param {unknown} body - Bare `GraphWorkflowDocument` or canonical snapshot wrapper.
|
|
101
124
|
* @return {Promise<GraphWorkflowValidationResult>} Structured validation result.
|