@stigmer/server 3.14.0-dev.20260910084630
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/LICENSE +190 -0
- package/README.md +93 -0
- package/dist/artifactstorage/artifact-storage.d.ts +185 -0
- package/dist/artifactstorage/artifact-storage.d.ts.map +1 -0
- package/dist/artifactstorage/artifact-storage.js +298 -0
- package/dist/artifactstorage/artifact-storage.js.map +1 -0
- package/dist/artifactstorage/r2-storage.d.ts +55 -0
- package/dist/artifactstorage/r2-storage.d.ts.map +1 -0
- package/dist/artifactstorage/r2-storage.js +225 -0
- package/dist/artifactstorage/r2-storage.js.map +1 -0
- package/dist/boot/compose.d.ts +97 -0
- package/dist/boot/compose.d.ts.map +1 -0
- package/dist/boot/compose.js +1037 -0
- package/dist/boot/compose.js.map +1 -0
- package/dist/boot/config.d.ts +205 -0
- package/dist/boot/config.d.ts.map +1 -0
- package/dist/boot/config.js +205 -0
- package/dist/boot/config.js.map +1 -0
- package/dist/boot/inprocess.d.ts +101 -0
- package/dist/boot/inprocess.d.ts.map +1 -0
- package/dist/boot/inprocess.js +226 -0
- package/dist/boot/inprocess.js.map +1 -0
- package/dist/boot/logger.d.ts +65 -0
- package/dist/boot/logger.d.ts.map +1 -0
- package/dist/boot/logger.js +61 -0
- package/dist/boot/logger.js.map +1 -0
- package/dist/domain/agent/controller.d.ts +40 -0
- package/dist/domain/agent/controller.d.ts.map +1 -0
- package/dist/domain/agent/controller.js +278 -0
- package/dist/domain/agent/controller.js.map +1 -0
- package/dist/domain/agent/defaultagent.d.ts +37 -0
- package/dist/domain/agent/defaultagent.d.ts.map +1 -0
- package/dist/domain/agent/defaultagent.js +104 -0
- package/dist/domain/agent/defaultagent.js.map +1 -0
- package/dist/domain/agent/search-extractor.d.ts +3 -0
- package/dist/domain/agent/search-extractor.d.ts.map +1 -0
- package/dist/domain/agent/search-extractor.js +50 -0
- package/dist/domain/agent/search-extractor.js.map +1 -0
- package/dist/domain/agent/steps.d.ts +81 -0
- package/dist/domain/agent/steps.d.ts.map +1 -0
- package/dist/domain/agent/steps.js +482 -0
- package/dist/domain/agent/steps.js.map +1 -0
- package/dist/domain/agentchannel/channel-runtime.d.ts +137 -0
- package/dist/domain/agentchannel/channel-runtime.d.ts.map +1 -0
- package/dist/domain/agentchannel/channel-runtime.js +2 -0
- package/dist/domain/agentchannel/channel-runtime.js.map +1 -0
- package/dist/domain/agentchannel/constants.d.ts +77 -0
- package/dist/domain/agentchannel/constants.d.ts.map +1 -0
- package/dist/domain/agentchannel/constants.js +90 -0
- package/dist/domain/agentchannel/constants.js.map +1 -0
- package/dist/domain/agentchannel/controller.d.ts +57 -0
- package/dist/domain/agentchannel/controller.d.ts.map +1 -0
- package/dist/domain/agentchannel/controller.js +377 -0
- package/dist/domain/agentchannel/controller.js.map +1 -0
- package/dist/domain/agentchannel/conversation.d.ts +45 -0
- package/dist/domain/agentchannel/conversation.d.ts.map +1 -0
- package/dist/domain/agentchannel/conversation.js +69 -0
- package/dist/domain/agentchannel/conversation.js.map +1 -0
- package/dist/domain/agentchannel/message.d.ts +48 -0
- package/dist/domain/agentchannel/message.d.ts.map +1 -0
- package/dist/domain/agentchannel/message.js +40 -0
- package/dist/domain/agentchannel/message.js.map +1 -0
- package/dist/domain/agentchannel/steps.d.ts +79 -0
- package/dist/domain/agentchannel/steps.d.ts.map +1 -0
- package/dist/domain/agentchannel/steps.js +264 -0
- package/dist/domain/agentchannel/steps.js.map +1 -0
- package/dist/domain/agentexecution/approval/author.d.ts +57 -0
- package/dist/domain/agentexecution/approval/author.d.ts.map +1 -0
- package/dist/domain/agentexecution/approval/author.js +194 -0
- package/dist/domain/agentexecution/approval/author.js.map +1 -0
- package/dist/domain/agentexecution/approval/compute-from-events.d.ts +10 -0
- package/dist/domain/agentexecution/approval/compute-from-events.d.ts.map +1 -0
- package/dist/domain/agentexecution/approval/compute-from-events.js +80 -0
- package/dist/domain/agentexecution/approval/compute-from-events.js.map +1 -0
- package/dist/domain/agentexecution/approval/compute.d.ts +26 -0
- package/dist/domain/agentexecution/approval/compute.d.ts.map +1 -0
- package/dist/domain/agentexecution/approval/compute.js +118 -0
- package/dist/domain/agentexecution/approval/compute.js.map +1 -0
- package/dist/domain/agentexecution/approval/emit.d.ts +70 -0
- package/dist/domain/agentexecution/approval/emit.d.ts.map +1 -0
- package/dist/domain/agentexecution/approval/emit.js +212 -0
- package/dist/domain/agentexecution/approval/emit.js.map +1 -0
- package/dist/domain/agentexecution/approval/lease-scope.d.ts +37 -0
- package/dist/domain/agentexecution/approval/lease-scope.d.ts.map +1 -0
- package/dist/domain/agentexecution/approval/lease-scope.js +26 -0
- package/dist/domain/agentexecution/approval/lease-scope.js.map +1 -0
- package/dist/domain/agentexecution/approval/preserve.d.ts +4 -0
- package/dist/domain/agentexecution/approval/preserve.d.ts.map +1 -0
- package/dist/domain/agentexecution/approval/preserve.js +62 -0
- package/dist/domain/agentexecution/approval/preserve.js.map +1 -0
- package/dist/domain/agentexecution/approval/project.d.ts +9 -0
- package/dist/domain/agentexecution/approval/project.d.ts.map +1 -0
- package/dist/domain/agentexecution/approval/project.js +105 -0
- package/dist/domain/agentexecution/approval/project.js.map +1 -0
- package/dist/domain/agentexecution/approval/tool-category.d.ts +22 -0
- package/dist/domain/agentexecution/approval/tool-category.d.ts.map +1 -0
- package/dist/domain/agentexecution/approval/tool-category.js +55 -0
- package/dist/domain/agentexecution/approval/tool-category.js.map +1 -0
- package/dist/domain/agentexecution/artifacts.d.ts +50 -0
- package/dist/domain/agentexecution/artifacts.d.ts.map +1 -0
- package/dist/domain/agentexecution/artifacts.js +376 -0
- package/dist/domain/agentexecution/artifacts.js.map +1 -0
- package/dist/domain/agentexecution/constants.d.ts +24 -0
- package/dist/domain/agentexecution/constants.d.ts.map +1 -0
- package/dist/domain/agentexecution/constants.js +26 -0
- package/dist/domain/agentexecution/constants.js.map +1 -0
- package/dist/domain/agentexecution/controller.d.ts +102 -0
- package/dist/domain/agentexecution/controller.d.ts.map +1 -0
- package/dist/domain/agentexecution/controller.js +256 -0
- package/dist/domain/agentexecution/controller.js.map +1 -0
- package/dist/domain/agentexecution/create-execution-context-step.d.ts +104 -0
- package/dist/domain/agentexecution/create-execution-context-step.d.ts.map +1 -0
- package/dist/domain/agentexecution/create-execution-context-step.js +756 -0
- package/dist/domain/agentexecution/create-execution-context-step.js.map +1 -0
- package/dist/domain/agentexecution/create-steps.d.ts +159 -0
- package/dist/domain/agentexecution/create-steps.d.ts.map +1 -0
- package/dist/domain/agentexecution/create-steps.js +660 -0
- package/dist/domain/agentexecution/create-steps.js.map +1 -0
- package/dist/domain/agentexecution/engine.d.ts +100 -0
- package/dist/domain/agentexecution/engine.d.ts.map +1 -0
- package/dist/domain/agentexecution/engine.js +49 -0
- package/dist/domain/agentexecution/engine.js.map +1 -0
- package/dist/domain/agentexecution/filereview/author.d.ts +119 -0
- package/dist/domain/agentexecution/filereview/author.d.ts.map +1 -0
- package/dist/domain/agentexecution/filereview/author.js +257 -0
- package/dist/domain/agentexecution/filereview/author.js.map +1 -0
- package/dist/domain/agentexecution/filereview/autokeep.d.ts +20 -0
- package/dist/domain/agentexecution/filereview/autokeep.d.ts.map +1 -0
- package/dist/domain/agentexecution/filereview/autokeep.js +189 -0
- package/dist/domain/agentexecution/filereview/autokeep.js.map +1 -0
- package/dist/domain/agentexecution/filereview/cas-blob.d.ts +23 -0
- package/dist/domain/agentexecution/filereview/cas-blob.d.ts.map +1 -0
- package/dist/domain/agentexecution/filereview/cas-blob.js +45 -0
- package/dist/domain/agentexecution/filereview/cas-blob.js.map +1 -0
- package/dist/domain/agentexecution/filereview/digest.d.ts +16 -0
- package/dist/domain/agentexecution/filereview/digest.d.ts.map +1 -0
- package/dist/domain/agentexecution/filereview/digest.js +52 -0
- package/dist/domain/agentexecution/filereview/digest.js.map +1 -0
- package/dist/domain/agentexecution/filereview/gate.d.ts +38 -0
- package/dist/domain/agentexecution/filereview/gate.d.ts.map +1 -0
- package/dist/domain/agentexecution/filereview/gate.js +45 -0
- package/dist/domain/agentexecution/filereview/gate.js.map +1 -0
- package/dist/domain/agentexecution/filereview/progress.d.ts +3 -0
- package/dist/domain/agentexecution/filereview/progress.d.ts.map +1 -0
- package/dist/domain/agentexecution/filereview/progress.js +37 -0
- package/dist/domain/agentexecution/filereview/progress.js.map +1 -0
- package/dist/domain/agentexecution/filereview/project.d.ts +9 -0
- package/dist/domain/agentexecution/filereview/project.d.ts.map +1 -0
- package/dist/domain/agentexecution/filereview/project.js +152 -0
- package/dist/domain/agentexecution/filereview/project.js.map +1 -0
- package/dist/domain/agentexecution/lifecycle.d.ts +74 -0
- package/dist/domain/agentexecution/lifecycle.d.ts.map +1 -0
- package/dist/domain/agentexecution/lifecycle.js +570 -0
- package/dist/domain/agentexecution/lifecycle.js.map +1 -0
- package/dist/domain/agentexecution/phases.d.ts +22 -0
- package/dist/domain/agentexecution/phases.d.ts.map +1 -0
- package/dist/domain/agentexecution/phases.js +36 -0
- package/dist/domain/agentexecution/phases.js.map +1 -0
- package/dist/domain/agentexecution/record-runner-lineage-labels.d.ts +42 -0
- package/dist/domain/agentexecution/record-runner-lineage-labels.d.ts.map +1 -0
- package/dist/domain/agentexecution/record-runner-lineage-labels.js +38 -0
- package/dist/domain/agentexecution/record-runner-lineage-labels.js.map +1 -0
- package/dist/domain/agentexecution/search-extractor.d.ts +3 -0
- package/dist/domain/agentexecution/search-extractor.d.ts.map +1 -0
- package/dist/domain/agentexecution/search-extractor.js +48 -0
- package/dist/domain/agentexecution/search-extractor.js.map +1 -0
- package/dist/domain/agentexecution/status-observers.d.ts +26 -0
- package/dist/domain/agentexecution/status-observers.d.ts.map +1 -0
- package/dist/domain/agentexecution/status-observers.js +83 -0
- package/dist/domain/agentexecution/status-observers.js.map +1 -0
- package/dist/domain/agentexecution/steps.d.ts +51 -0
- package/dist/domain/agentexecution/steps.d.ts.map +1 -0
- package/dist/domain/agentexecution/steps.js +160 -0
- package/dist/domain/agentexecution/steps.js.map +1 -0
- package/dist/domain/agentexecution/stream-broker.d.ts +63 -0
- package/dist/domain/agentexecution/stream-broker.d.ts.map +1 -0
- package/dist/domain/agentexecution/stream-broker.js +87 -0
- package/dist/domain/agentexecution/stream-broker.js.map +1 -0
- package/dist/domain/agentexecution/submit-approval.d.ts +41 -0
- package/dist/domain/agentexecution/submit-approval.d.ts.map +1 -0
- package/dist/domain/agentexecution/submit-approval.js +393 -0
- package/dist/domain/agentexecution/submit-approval.js.map +1 -0
- package/dist/domain/agentexecution/submit-file-decision.d.ts +21 -0
- package/dist/domain/agentexecution/submit-file-decision.d.ts.map +1 -0
- package/dist/domain/agentexecution/submit-file-decision.js +286 -0
- package/dist/domain/agentexecution/submit-file-decision.js.map +1 -0
- package/dist/domain/agentexecution/subscribe.d.ts +16 -0
- package/dist/domain/agentexecution/subscribe.d.ts.map +1 -0
- package/dist/domain/agentexecution/subscribe.js +120 -0
- package/dist/domain/agentexecution/subscribe.js.map +1 -0
- package/dist/domain/agentexecution/temporal/config.d.ts +99 -0
- package/dist/domain/agentexecution/temporal/config.d.ts.map +1 -0
- package/dist/domain/agentexecution/temporal/config.js +106 -0
- package/dist/domain/agentexecution/temporal/config.js.map +1 -0
- package/dist/domain/agentexecution/tool-call-settle.d.ts +31 -0
- package/dist/domain/agentexecution/tool-call-settle.d.ts.map +1 -0
- package/dist/domain/agentexecution/tool-call-settle.js +36 -0
- package/dist/domain/agentexecution/tool-call-settle.js.map +1 -0
- package/dist/domain/agentexecution/update-status.d.ts +45 -0
- package/dist/domain/agentexecution/update-status.d.ts.map +1 -0
- package/dist/domain/agentexecution/update-status.js +381 -0
- package/dist/domain/agentexecution/update-status.js.map +1 -0
- package/dist/domain/agentexecution/usage.d.ts +114 -0
- package/dist/domain/agentexecution/usage.d.ts.map +1 -0
- package/dist/domain/agentexecution/usage.js +675 -0
- package/dist/domain/agentexecution/usage.js.map +1 -0
- package/dist/domain/agentexecution/validate-service-tier.d.ts +29 -0
- package/dist/domain/agentexecution/validate-service-tier.d.ts.map +1 -0
- package/dist/domain/agentexecution/validate-service-tier.js +39 -0
- package/dist/domain/agentexecution/validate-service-tier.js.map +1 -0
- package/dist/domain/agentexecution/validate-thinking-mode.d.ts +32 -0
- package/dist/domain/agentexecution/validate-thinking-mode.d.ts.map +1 -0
- package/dist/domain/agentexecution/validate-thinking-mode.js +41 -0
- package/dist/domain/agentexecution/validate-thinking-mode.js.map +1 -0
- package/dist/domain/agentinstance/controller.d.ts +47 -0
- package/dist/domain/agentinstance/controller.d.ts.map +1 -0
- package/dist/domain/agentinstance/controller.js +278 -0
- package/dist/domain/agentinstance/controller.js.map +1 -0
- package/dist/domain/agentinstance/defaultinstance.d.ts +24 -0
- package/dist/domain/agentinstance/defaultinstance.d.ts.map +1 -0
- package/dist/domain/agentinstance/defaultinstance.js +74 -0
- package/dist/domain/agentinstance/defaultinstance.js.map +1 -0
- package/dist/domain/agentinstance/search-extractor.d.ts +3 -0
- package/dist/domain/agentinstance/search-extractor.d.ts.map +1 -0
- package/dist/domain/agentinstance/search-extractor.js +43 -0
- package/dist/domain/agentinstance/search-extractor.js.map +1 -0
- package/dist/domain/agentinstance/steps.d.ts +77 -0
- package/dist/domain/agentinstance/steps.d.ts.map +1 -0
- package/dist/domain/agentinstance/steps.js +261 -0
- package/dist/domain/agentinstance/steps.js.map +1 -0
- package/dist/domain/agentshare/constants.d.ts +47 -0
- package/dist/domain/agentshare/constants.d.ts.map +1 -0
- package/dist/domain/agentshare/constants.js +56 -0
- package/dist/domain/agentshare/constants.js.map +1 -0
- package/dist/domain/agentshare/controller.d.ts +42 -0
- package/dist/domain/agentshare/controller.d.ts.map +1 -0
- package/dist/domain/agentshare/controller.js +535 -0
- package/dist/domain/agentshare/controller.js.map +1 -0
- package/dist/domain/agentshare/steps.d.ts +84 -0
- package/dist/domain/agentshare/steps.d.ts.map +1 -0
- package/dist/domain/agentshare/steps.js +363 -0
- package/dist/domain/agentshare/steps.js.map +1 -0
- package/dist/domain/apikey/controller.d.ts +43 -0
- package/dist/domain/apikey/controller.d.ts.map +1 -0
- package/dist/domain/apikey/controller.js +154 -0
- package/dist/domain/apikey/controller.js.map +1 -0
- package/dist/domain/apikey/keymaterial.d.ts +23 -0
- package/dist/domain/apikey/keymaterial.d.ts.map +1 -0
- package/dist/domain/apikey/keymaterial.js +59 -0
- package/dist/domain/apikey/keymaterial.js.map +1 -0
- package/dist/domain/apikey/lookup.d.ts +10 -0
- package/dist/domain/apikey/lookup.d.ts.map +1 -0
- package/dist/domain/apikey/lookup.js +36 -0
- package/dist/domain/apikey/lookup.js.map +1 -0
- package/dist/domain/apikey/steps.d.ts +41 -0
- package/dist/domain/apikey/steps.d.ts.map +1 -0
- package/dist/domain/apikey/steps.js +123 -0
- package/dist/domain/apikey/steps.js.map +1 -0
- package/dist/domain/apikey/verifier.d.ts +8 -0
- package/dist/domain/apikey/verifier.d.ts.map +1 -0
- package/dist/domain/apikey/verifier.js +68 -0
- package/dist/domain/apikey/verifier.js.map +1 -0
- package/dist/domain/artifact/constants.d.ts +36 -0
- package/dist/domain/artifact/constants.d.ts.map +1 -0
- package/dist/domain/artifact/constants.js +40 -0
- package/dist/domain/artifact/constants.js.map +1 -0
- package/dist/domain/artifact/controller.d.ts +15 -0
- package/dist/domain/artifact/controller.d.ts.map +1 -0
- package/dist/domain/artifact/controller.js +468 -0
- package/dist/domain/artifact/controller.js.map +1 -0
- package/dist/domain/artifact/file-server.d.ts +29 -0
- package/dist/domain/artifact/file-server.d.ts.map +1 -0
- package/dist/domain/artifact/file-server.js +173 -0
- package/dist/domain/artifact/file-server.js.map +1 -0
- package/dist/domain/channelapp/constants.d.ts +45 -0
- package/dist/domain/channelapp/constants.d.ts.map +1 -0
- package/dist/domain/channelapp/constants.js +54 -0
- package/dist/domain/channelapp/constants.js.map +1 -0
- package/dist/domain/channelapp/controller.d.ts +41 -0
- package/dist/domain/channelapp/controller.d.ts.map +1 -0
- package/dist/domain/channelapp/controller.js +237 -0
- package/dist/domain/channelapp/controller.js.map +1 -0
- package/dist/domain/channelapp/steps.d.ts +72 -0
- package/dist/domain/channelapp/steps.d.ts.map +1 -0
- package/dist/domain/channelapp/steps.js +285 -0
- package/dist/domain/channelapp/steps.js.map +1 -0
- package/dist/domain/environment/constants.d.ts +48 -0
- package/dist/domain/environment/constants.d.ts.map +1 -0
- package/dist/domain/environment/constants.js +57 -0
- package/dist/domain/environment/constants.js.map +1 -0
- package/dist/domain/environment/controller.d.ts +40 -0
- package/dist/domain/environment/controller.d.ts.map +1 -0
- package/dist/domain/environment/controller.js +429 -0
- package/dist/domain/environment/controller.js.map +1 -0
- package/dist/domain/environment/redact.d.ts +43 -0
- package/dist/domain/environment/redact.d.ts.map +1 -0
- package/dist/domain/environment/redact.js +54 -0
- package/dist/domain/environment/redact.js.map +1 -0
- package/dist/domain/environment/resolution/resolution.d.ts +47 -0
- package/dist/domain/environment/resolution/resolution.d.ts.map +1 -0
- package/dist/domain/environment/resolution/resolution.js +120 -0
- package/dist/domain/environment/resolution/resolution.js.map +1 -0
- package/dist/domain/environment/search-extractor.d.ts +3 -0
- package/dist/domain/environment/search-extractor.d.ts.map +1 -0
- package/dist/domain/environment/search-extractor.js +43 -0
- package/dist/domain/environment/search-extractor.js.map +1 -0
- package/dist/domain/environment/steps.d.ts +141 -0
- package/dist/domain/environment/steps.d.ts.map +1 -0
- package/dist/domain/environment/steps.js +445 -0
- package/dist/domain/environment/steps.js.map +1 -0
- package/dist/domain/executioncontext/constants.d.ts +36 -0
- package/dist/domain/executioncontext/constants.d.ts.map +1 -0
- package/dist/domain/executioncontext/constants.js +42 -0
- package/dist/domain/executioncontext/constants.js.map +1 -0
- package/dist/domain/executioncontext/controller.d.ts +63 -0
- package/dist/domain/executioncontext/controller.d.ts.map +1 -0
- package/dist/domain/executioncontext/controller.js +189 -0
- package/dist/domain/executioncontext/controller.js.map +1 -0
- package/dist/domain/executioncontext/redact.d.ts +28 -0
- package/dist/domain/executioncontext/redact.d.ts.map +1 -0
- package/dist/domain/executioncontext/redact.js +32 -0
- package/dist/domain/executioncontext/redact.js.map +1 -0
- package/dist/domain/executioncontext/resolve-values-for-caller.d.ts +72 -0
- package/dist/domain/executioncontext/resolve-values-for-caller.d.ts.map +1 -0
- package/dist/domain/executioncontext/resolve-values-for-caller.js +130 -0
- package/dist/domain/executioncontext/resolve-values-for-caller.js.map +1 -0
- package/dist/domain/executioncontext/search-extractor.d.ts +3 -0
- package/dist/domain/executioncontext/search-extractor.d.ts.map +1 -0
- package/dist/domain/executioncontext/search-extractor.js +43 -0
- package/dist/domain/executioncontext/search-extractor.js.map +1 -0
- package/dist/domain/executioncontext/steps.d.ts +104 -0
- package/dist/domain/executioncontext/steps.d.ts.map +1 -0
- package/dist/domain/executioncontext/steps.js +216 -0
- package/dist/domain/executioncontext/steps.js.map +1 -0
- package/dist/domain/executioncontext/temporal/delete-execution-context.d.ts +11 -0
- package/dist/domain/executioncontext/temporal/delete-execution-context.d.ts.map +1 -0
- package/dist/domain/executioncontext/temporal/delete-execution-context.js +71 -0
- package/dist/domain/executioncontext/temporal/delete-execution-context.js.map +1 -0
- package/dist/domain/github/controller.d.ts +12 -0
- package/dist/domain/github/controller.d.ts.map +1 -0
- package/dist/domain/github/controller.js +141 -0
- package/dist/domain/github/controller.js.map +1 -0
- package/dist/domain/mcpserver/complete-oauth-connect.d.ts +23 -0
- package/dist/domain/mcpserver/complete-oauth-connect.d.ts.map +1 -0
- package/dist/domain/mcpserver/complete-oauth-connect.js +232 -0
- package/dist/domain/mcpserver/complete-oauth-connect.js.map +1 -0
- package/dist/domain/mcpserver/connect-status.d.ts +100 -0
- package/dist/domain/mcpserver/connect-status.d.ts.map +1 -0
- package/dist/domain/mcpserver/connect-status.js +219 -0
- package/dist/domain/mcpserver/connect-status.js.map +1 -0
- package/dist/domain/mcpserver/connect.d.ts +235 -0
- package/dist/domain/mcpserver/connect.d.ts.map +1 -0
- package/dist/domain/mcpserver/connect.js +805 -0
- package/dist/domain/mcpserver/connect.js.map +1 -0
- package/dist/domain/mcpserver/controller.d.ts +19 -0
- package/dist/domain/mcpserver/controller.d.ts.map +1 -0
- package/dist/domain/mcpserver/controller.js +344 -0
- package/dist/domain/mcpserver/controller.js.map +1 -0
- package/dist/domain/mcpserver/disconnect-oauth.d.ts +5 -0
- package/dist/domain/mcpserver/disconnect-oauth.d.ts.map +1 -0
- package/dist/domain/mcpserver/disconnect-oauth.js +82 -0
- package/dist/domain/mcpserver/disconnect-oauth.js.map +1 -0
- package/dist/domain/mcpserver/enabledtools/enabledtools.d.ts +63 -0
- package/dist/domain/mcpserver/enabledtools/enabledtools.d.ts.map +1 -0
- package/dist/domain/mcpserver/enabledtools/enabledtools.js +46 -0
- package/dist/domain/mcpserver/enabledtools/enabledtools.js.map +1 -0
- package/dist/domain/mcpserver/engine.d.ts +171 -0
- package/dist/domain/mcpserver/engine.d.ts.map +1 -0
- package/dist/domain/mcpserver/engine.js +27 -0
- package/dist/domain/mcpserver/engine.js.map +1 -0
- package/dist/domain/mcpserver/get-oauth-grant-status.d.ts +20 -0
- package/dist/domain/mcpserver/get-oauth-grant-status.d.ts.map +1 -0
- package/dist/domain/mcpserver/get-oauth-grant-status.js +77 -0
- package/dist/domain/mcpserver/get-oauth-grant-status.js.map +1 -0
- package/dist/domain/mcpserver/initiate-oauth-connect.d.ts +52 -0
- package/dist/domain/mcpserver/initiate-oauth-connect.d.ts.map +1 -0
- package/dist/domain/mcpserver/initiate-oauth-connect.js +331 -0
- package/dist/domain/mcpserver/initiate-oauth-connect.js.map +1 -0
- package/dist/domain/mcpserver/oauth/dcr.d.ts +17 -0
- package/dist/domain/mcpserver/oauth/dcr.d.ts.map +1 -0
- package/dist/domain/mcpserver/oauth/dcr.js +62 -0
- package/dist/domain/mcpserver/oauth/dcr.js.map +1 -0
- package/dist/domain/mcpserver/oauth/discovery.d.ts +37 -0
- package/dist/domain/mcpserver/oauth/discovery.d.ts.map +1 -0
- package/dist/domain/mcpserver/oauth/discovery.js +93 -0
- package/dist/domain/mcpserver/oauth/discovery.js.map +1 -0
- package/dist/domain/mcpserver/oauth/managed-env.d.ts +69 -0
- package/dist/domain/mcpserver/oauth/managed-env.d.ts.map +1 -0
- package/dist/domain/mcpserver/oauth/managed-env.js +111 -0
- package/dist/domain/mcpserver/oauth/managed-env.js.map +1 -0
- package/dist/domain/mcpserver/oauth/pkce.d.ts +14 -0
- package/dist/domain/mcpserver/oauth/pkce.d.ts.map +1 -0
- package/dist/domain/mcpserver/oauth/pkce.js +22 -0
- package/dist/domain/mcpserver/oauth/pkce.js.map +1 -0
- package/dist/domain/mcpserver/oauth/preflight.d.ts +31 -0
- package/dist/domain/mcpserver/oauth/preflight.d.ts.map +1 -0
- package/dist/domain/mcpserver/oauth/preflight.js +82 -0
- package/dist/domain/mcpserver/oauth/preflight.js.map +1 -0
- package/dist/domain/mcpserver/oauth/refresh.d.ts +34 -0
- package/dist/domain/mcpserver/oauth/refresh.d.ts.map +1 -0
- package/dist/domain/mcpserver/oauth/refresh.js +74 -0
- package/dist/domain/mcpserver/oauth/refresh.js.map +1 -0
- package/dist/domain/mcpserver/oauth/token.d.ts +32 -0
- package/dist/domain/mcpserver/oauth/token.d.ts.map +1 -0
- package/dist/domain/mcpserver/oauth/token.js +112 -0
- package/dist/domain/mcpserver/oauth/token.js.map +1 -0
- package/dist/domain/mcpserver/oauth/truncate-body.d.ts +8 -0
- package/dist/domain/mcpserver/oauth/truncate-body.d.ts.map +1 -0
- package/dist/domain/mcpserver/oauth/truncate-body.js +11 -0
- package/dist/domain/mcpserver/oauth/truncate-body.js.map +1 -0
- package/dist/domain/mcpserver/search-extractor.d.ts +3 -0
- package/dist/domain/mcpserver/search-extractor.d.ts.map +1 -0
- package/dist/domain/mcpserver/search-extractor.js +45 -0
- package/dist/domain/mcpserver/search-extractor.js.map +1 -0
- package/dist/domain/mcpserver/start-connect.d.ts +38 -0
- package/dist/domain/mcpserver/start-connect.d.ts.map +1 -0
- package/dist/domain/mcpserver/start-connect.js +175 -0
- package/dist/domain/mcpserver/start-connect.js.map +1 -0
- package/dist/domain/mcpserver/steps.d.ts +63 -0
- package/dist/domain/mcpserver/steps.d.ts.map +1 -0
- package/dist/domain/mcpserver/steps.js +144 -0
- package/dist/domain/mcpserver/steps.js.map +1 -0
- package/dist/domain/memory/constants.d.ts +47 -0
- package/dist/domain/memory/constants.d.ts.map +1 -0
- package/dist/domain/memory/constants.js +49 -0
- package/dist/domain/memory/constants.js.map +1 -0
- package/dist/domain/memory/controller.d.ts +79 -0
- package/dist/domain/memory/controller.d.ts.map +1 -0
- package/dist/domain/memory/controller.js +250 -0
- package/dist/domain/memory/controller.js.map +1 -0
- package/dist/domain/memory/steps.d.ts +161 -0
- package/dist/domain/memory/steps.d.ts.map +1 -0
- package/dist/domain/memory/steps.js +468 -0
- package/dist/domain/memory/steps.js.map +1 -0
- package/dist/domain/oauthapp/constants.d.ts +32 -0
- package/dist/domain/oauthapp/constants.d.ts.map +1 -0
- package/dist/domain/oauthapp/constants.js +35 -0
- package/dist/domain/oauthapp/constants.js.map +1 -0
- package/dist/domain/oauthapp/controller.d.ts +42 -0
- package/dist/domain/oauthapp/controller.d.ts.map +1 -0
- package/dist/domain/oauthapp/controller.js +232 -0
- package/dist/domain/oauthapp/controller.js.map +1 -0
- package/dist/domain/oauthapp/refresolution/refresolution.d.ts +12 -0
- package/dist/domain/oauthapp/refresolution/refresolution.d.ts.map +1 -0
- package/dist/domain/oauthapp/refresolution/refresolution.js +79 -0
- package/dist/domain/oauthapp/refresolution/refresolution.js.map +1 -0
- package/dist/domain/oauthapp/refresolution.d.ts +12 -0
- package/dist/domain/oauthapp/refresolution.d.ts.map +1 -0
- package/dist/domain/oauthapp/refresolution.js +83 -0
- package/dist/domain/oauthapp/refresolution.js.map +1 -0
- package/dist/domain/oauthapp/steps.d.ts +47 -0
- package/dist/domain/oauthapp/steps.d.ts.map +1 -0
- package/dist/domain/oauthapp/steps.js +169 -0
- package/dist/domain/oauthapp/steps.js.map +1 -0
- package/dist/domain/organization/controller.d.ts +46 -0
- package/dist/domain/organization/controller.d.ts.map +1 -0
- package/dist/domain/organization/controller.js +323 -0
- package/dist/domain/organization/controller.js.map +1 -0
- package/dist/domain/organization/search-extractor.d.ts +3 -0
- package/dist/domain/organization/search-extractor.d.ts.map +1 -0
- package/dist/domain/organization/search-extractor.js +43 -0
- package/dist/domain/organization/search-extractor.js.map +1 -0
- package/dist/domain/organization/steps.d.ts +30 -0
- package/dist/domain/organization/steps.d.ts.map +1 -0
- package/dist/domain/organization/steps.js +89 -0
- package/dist/domain/organization/steps.js.map +1 -0
- package/dist/domain/platform/controller.d.ts +60 -0
- package/dist/domain/platform/controller.d.ts.map +1 -0
- package/dist/domain/platform/controller.js +172 -0
- package/dist/domain/platform/controller.js.map +1 -0
- package/dist/domain/platform/version.d.ts +15 -0
- package/dist/domain/platform/version.d.ts.map +1 -0
- package/dist/domain/platform/version.js +18 -0
- package/dist/domain/platform/version.js.map +1 -0
- package/dist/domain/project/controller.d.ts +48 -0
- package/dist/domain/project/controller.d.ts.map +1 -0
- package/dist/domain/project/controller.js +192 -0
- package/dist/domain/project/controller.js.map +1 -0
- package/dist/domain/project/reconcile.d.ts +77 -0
- package/dist/domain/project/reconcile.d.ts.map +1 -0
- package/dist/domain/project/reconcile.js +175 -0
- package/dist/domain/project/reconcile.js.map +1 -0
- package/dist/domain/project/search-extractor.d.ts +3 -0
- package/dist/domain/project/search-extractor.d.ts.map +1 -0
- package/dist/domain/project/search-extractor.js +43 -0
- package/dist/domain/project/search-extractor.js.map +1 -0
- package/dist/domain/schedule/clock.d.ts +54 -0
- package/dist/domain/schedule/clock.d.ts.map +1 -0
- package/dist/domain/schedule/clock.js +143 -0
- package/dist/domain/schedule/clock.js.map +1 -0
- package/dist/domain/schedule/controller.d.ts +67 -0
- package/dist/domain/schedule/controller.d.ts.map +1 -0
- package/dist/domain/schedule/controller.js +383 -0
- package/dist/domain/schedule/controller.js.map +1 -0
- package/dist/domain/schedule/cron.d.ts +29 -0
- package/dist/domain/schedule/cron.d.ts.map +1 -0
- package/dist/domain/schedule/cron.js +130 -0
- package/dist/domain/schedule/cron.js.map +1 -0
- package/dist/domain/schedule/list-runs.d.ts +24 -0
- package/dist/domain/schedule/list-runs.d.ts.map +1 -0
- package/dist/domain/schedule/list-runs.js +203 -0
- package/dist/domain/schedule/list-runs.js.map +1 -0
- package/dist/domain/schedule/persist-update.d.ts +5 -0
- package/dist/domain/schedule/persist-update.d.ts.map +1 -0
- package/dist/domain/schedule/persist-update.js +62 -0
- package/dist/domain/schedule/persist-update.js.map +1 -0
- package/dist/domain/schedule/resume.d.ts +33 -0
- package/dist/domain/schedule/resume.d.ts.map +1 -0
- package/dist/domain/schedule/resume.js +82 -0
- package/dist/domain/schedule/resume.js.map +1 -0
- package/dist/domain/schedule/steps.d.ts +96 -0
- package/dist/domain/schedule/steps.d.ts.map +1 -0
- package/dist/domain/schedule/steps.js +208 -0
- package/dist/domain/schedule/steps.js.map +1 -0
- package/dist/domain/schedule/trigger.d.ts +59 -0
- package/dist/domain/schedule/trigger.d.ts.map +1 -0
- package/dist/domain/schedule/trigger.js +195 -0
- package/dist/domain/schedule/trigger.js.map +1 -0
- package/dist/domain/session/controller.d.ts +66 -0
- package/dist/domain/session/controller.d.ts.map +1 -0
- package/dist/domain/session/controller.js +282 -0
- package/dist/domain/session/controller.js.map +1 -0
- package/dist/domain/session/search-extractor.d.ts +3 -0
- package/dist/domain/session/search-extractor.d.ts.map +1 -0
- package/dist/domain/session/search-extractor.js +43 -0
- package/dist/domain/session/search-extractor.js.map +1 -0
- package/dist/domain/session/steps.d.ts +96 -0
- package/dist/domain/session/steps.d.ts.map +1 -0
- package/dist/domain/session/steps.js +592 -0
- package/dist/domain/session/steps.js.map +1 -0
- package/dist/domain/skill/constants.d.ts +64 -0
- package/dist/domain/skill/constants.d.ts.map +1 -0
- package/dist/domain/skill/constants.js +64 -0
- package/dist/domain/skill/constants.js.map +1 -0
- package/dist/domain/skill/controller.d.ts +38 -0
- package/dist/domain/skill/controller.d.ts.map +1 -0
- package/dist/domain/skill/controller.js +476 -0
- package/dist/domain/skill/controller.js.map +1 -0
- package/dist/domain/skill/push.d.ts +97 -0
- package/dist/domain/skill/push.d.ts.map +1 -0
- package/dist/domain/skill/push.js +485 -0
- package/dist/domain/skill/push.js.map +1 -0
- package/dist/domain/skill/search-extractor.d.ts +3 -0
- package/dist/domain/skill/search-extractor.d.ts.map +1 -0
- package/dist/domain/skill/search-extractor.js +44 -0
- package/dist/domain/skill/search-extractor.js.map +1 -0
- package/dist/domain/skill/storage/artifact-storage.d.ts +33 -0
- package/dist/domain/skill/storage/artifact-storage.d.ts.map +1 -0
- package/dist/domain/skill/storage/artifact-storage.js +106 -0
- package/dist/domain/skill/storage/artifact-storage.js.map +1 -0
- package/dist/domain/skill/storage/frontmatter.d.ts +16 -0
- package/dist/domain/skill/storage/frontmatter.d.ts.map +1 -0
- package/dist/domain/skill/storage/frontmatter.js +143 -0
- package/dist/domain/skill/storage/frontmatter.js.map +1 -0
- package/dist/domain/skill/storage/prefilter.d.ts +77 -0
- package/dist/domain/skill/storage/prefilter.d.ts.map +1 -0
- package/dist/domain/skill/storage/prefilter.js +127 -0
- package/dist/domain/skill/storage/prefilter.js.map +1 -0
- package/dist/domain/skill/storage/zip-gate.d.ts +20 -0
- package/dist/domain/skill/storage/zip-gate.d.ts.map +1 -0
- package/dist/domain/skill/storage/zip-gate.js +186 -0
- package/dist/domain/skill/storage/zip-gate.js.map +1 -0
- package/dist/domain/skill/transfer/handler.d.ts +36 -0
- package/dist/domain/skill/transfer/handler.d.ts.map +1 -0
- package/dist/domain/skill/transfer/handler.js +120 -0
- package/dist/domain/skill/transfer/handler.js.map +1 -0
- package/dist/domain/skill/transfer/slots.d.ts +79 -0
- package/dist/domain/skill/transfer/slots.d.ts.map +1 -0
- package/dist/domain/skill/transfer/slots.js +216 -0
- package/dist/domain/skill/transfer/slots.js.map +1 -0
- package/dist/domain/skill/version-resolution.d.ts +16 -0
- package/dist/domain/skill/version-resolution.d.ts.map +1 -0
- package/dist/domain/skill/version-resolution.js +254 -0
- package/dist/domain/skill/version-resolution.js.map +1 -0
- package/dist/domain/workflow/controller.d.ts +45 -0
- package/dist/domain/workflow/controller.d.ts.map +1 -0
- package/dist/domain/workflow/controller.js +751 -0
- package/dist/domain/workflow/controller.js.map +1 -0
- package/dist/domain/workflow/converter/converter.d.ts +8 -0
- package/dist/domain/workflow/converter/converter.d.ts.map +1 -0
- package/dist/domain/workflow/converter/converter.js +122 -0
- package/dist/domain/workflow/converter/converter.js.map +1 -0
- package/dist/domain/workflow/converter/task-converters.d.ts +30 -0
- package/dist/domain/workflow/converter/task-converters.d.ts.map +1 -0
- package/dist/domain/workflow/converter/task-converters.js +608 -0
- package/dist/domain/workflow/converter/task-converters.js.map +1 -0
- package/dist/domain/workflow/converter/types.d.ts +13 -0
- package/dist/domain/workflow/converter/types.d.ts.map +1 -0
- package/dist/domain/workflow/converter/types.js +2 -0
- package/dist/domain/workflow/converter/types.js.map +1 -0
- package/dist/domain/workflow/converter/unmarshal.d.ts +39 -0
- package/dist/domain/workflow/converter/unmarshal.d.ts.map +1 -0
- package/dist/domain/workflow/converter/unmarshal.js +165 -0
- package/dist/domain/workflow/converter/unmarshal.js.map +1 -0
- package/dist/domain/workflow/registry/bundled.d.ts +3 -0
- package/dist/domain/workflow/registry/bundled.d.ts.map +1 -0
- package/dist/domain/workflow/registry/bundled.js +21 -0
- package/dist/domain/workflow/registry/bundled.js.map +1 -0
- package/dist/domain/workflow/registry/data/model-registry.json +1236 -0
- package/dist/domain/workflow/registry/data/task-kind-registry.json +3177 -0
- package/dist/domain/workflow/registry/document-catalog.d.ts +68 -0
- package/dist/domain/workflow/registry/document-catalog.d.ts.map +1 -0
- package/dist/domain/workflow/registry/document-catalog.js +238 -0
- package/dist/domain/workflow/registry/document-catalog.js.map +1 -0
- package/dist/domain/workflow/registry/model-catalog-provider.d.ts +108 -0
- package/dist/domain/workflow/registry/model-catalog-provider.d.ts.map +1 -0
- package/dist/domain/workflow/registry/model-catalog-provider.js +34 -0
- package/dist/domain/workflow/registry/model-catalog-provider.js.map +1 -0
- package/dist/domain/workflow/registry/model-registry-store.d.ts +151 -0
- package/dist/domain/workflow/registry/model-registry-store.d.ts.map +1 -0
- package/dist/domain/workflow/registry/model-registry-store.js +196 -0
- package/dist/domain/workflow/registry/model-registry-store.js.map +1 -0
- package/dist/domain/workflow/registry/pin-validation.d.ts +67 -0
- package/dist/domain/workflow/registry/pin-validation.d.ts.map +1 -0
- package/dist/domain/workflow/registry/pin-validation.js +151 -0
- package/dist/domain/workflow/registry/pin-validation.js.map +1 -0
- package/dist/domain/workflow/search-extractor.d.ts +3 -0
- package/dist/domain/workflow/search-extractor.d.ts.map +1 -0
- package/dist/domain/workflow/search-extractor.js +44 -0
- package/dist/domain/workflow/search-extractor.js.map +1 -0
- package/dist/domain/workflow/steps.d.ts +72 -0
- package/dist/domain/workflow/steps.d.ts.map +1 -0
- package/dist/domain/workflow/steps.js +536 -0
- package/dist/domain/workflow/steps.js.map +1 -0
- package/dist/domain/workflow/validation/budget-warnings.d.ts +3 -0
- package/dist/domain/workflow/validation/budget-warnings.d.ts.map +1 -0
- package/dist/domain/workflow/validation/budget-warnings.js +109 -0
- package/dist/domain/workflow/validation/budget-warnings.js.map +1 -0
- package/dist/domain/workflow/validation/crossref.d.ts +31 -0
- package/dist/domain/workflow/validation/crossref.d.ts.map +1 -0
- package/dist/domain/workflow/validation/crossref.js +338 -0
- package/dist/domain/workflow/validation/crossref.js.map +1 -0
- package/dist/domain/workflow/validation/expression-warnings.d.ts +3 -0
- package/dist/domain/workflow/validation/expression-warnings.d.ts.map +1 -0
- package/dist/domain/workflow/validation/expression-warnings.js +78 -0
- package/dist/domain/workflow/validation/expression-warnings.js.map +1 -0
- package/dist/domain/workflow/validation/format-violation.d.ts +23 -0
- package/dist/domain/workflow/validation/format-violation.d.ts.map +1 -0
- package/dist/domain/workflow/validation/format-violation.js +37 -0
- package/dist/domain/workflow/validation/format-violation.js.map +1 -0
- package/dist/domain/workflow/validation/human-input-validation.d.ts +3 -0
- package/dist/domain/workflow/validation/human-input-validation.d.ts.map +1 -0
- package/dist/domain/workflow/validation/human-input-validation.js +78 -0
- package/dist/domain/workflow/validation/human-input-validation.js.map +1 -0
- package/dist/domain/workflow/validation/model-validation.d.ts +13 -0
- package/dist/domain/workflow/validation/model-validation.d.ts.map +1 -0
- package/dist/domain/workflow/validation/model-validation.js +175 -0
- package/dist/domain/workflow/validation/model-validation.js.map +1 -0
- package/dist/domain/workflow/validation/task-config-constraints.d.ts +7 -0
- package/dist/domain/workflow/validation/task-config-constraints.d.ts.map +1 -0
- package/dist/domain/workflow/validation/task-config-constraints.js +126 -0
- package/dist/domain/workflow/validation/task-config-constraints.js.map +1 -0
- package/dist/domain/workflow/validation/validator.d.ts +11 -0
- package/dist/domain/workflow/validation/validator.d.ts.map +1 -0
- package/dist/domain/workflow/validation/validator.js +116 -0
- package/dist/domain/workflow/validation/validator.js.map +1 -0
- package/dist/domain/workflowexecution/constants.d.ts +83 -0
- package/dist/domain/workflowexecution/constants.d.ts.map +1 -0
- package/dist/domain/workflowexecution/constants.js +87 -0
- package/dist/domain/workflowexecution/constants.js.map +1 -0
- package/dist/domain/workflowexecution/controller.d.ts +95 -0
- package/dist/domain/workflowexecution/controller.d.ts.map +1 -0
- package/dist/domain/workflowexecution/controller.js +270 -0
- package/dist/domain/workflowexecution/controller.js.map +1 -0
- package/dist/domain/workflowexecution/create-execution-context-step.d.ts +30 -0
- package/dist/domain/workflowexecution/create-execution-context-step.d.ts.map +1 -0
- package/dist/domain/workflowexecution/create-execution-context-step.js +141 -0
- package/dist/domain/workflowexecution/create-execution-context-step.js.map +1 -0
- package/dist/domain/workflowexecution/create-steps.d.ts +70 -0
- package/dist/domain/workflowexecution/create-steps.d.ts.map +1 -0
- package/dist/domain/workflowexecution/create-steps.js +254 -0
- package/dist/domain/workflowexecution/create-steps.js.map +1 -0
- package/dist/domain/workflowexecution/engine.d.ts +131 -0
- package/dist/domain/workflowexecution/engine.d.ts.map +1 -0
- package/dist/domain/workflowexecution/engine.js +38 -0
- package/dist/domain/workflowexecution/engine.js.map +1 -0
- package/dist/domain/workflowexecution/execution-filter.d.ts +38 -0
- package/dist/domain/workflowexecution/execution-filter.d.ts.map +1 -0
- package/dist/domain/workflowexecution/execution-filter.js +177 -0
- package/dist/domain/workflowexecution/execution-filter.js.map +1 -0
- package/dist/domain/workflowexecution/get-event-log.d.ts +16 -0
- package/dist/domain/workflowexecution/get-event-log.d.ts.map +1 -0
- package/dist/domain/workflowexecution/get-event-log.js +95 -0
- package/dist/domain/workflowexecution/get-event-log.js.map +1 -0
- package/dist/domain/workflowexecution/get-execution-summary.d.ts +20 -0
- package/dist/domain/workflowexecution/get-execution-summary.d.ts.map +1 -0
- package/dist/domain/workflowexecution/get-execution-summary.js +212 -0
- package/dist/domain/workflowexecution/get-execution-summary.js.map +1 -0
- package/dist/domain/workflowexecution/lifecycle.d.ts +80 -0
- package/dist/domain/workflowexecution/lifecycle.d.ts.map +1 -0
- package/dist/domain/workflowexecution/lifecycle.js +560 -0
- package/dist/domain/workflowexecution/lifecycle.js.map +1 -0
- package/dist/domain/workflowexecution/list-pending-approvals.d.ts +13 -0
- package/dist/domain/workflowexecution/list-pending-approvals.d.ts.map +1 -0
- package/dist/domain/workflowexecution/list-pending-approvals.js +69 -0
- package/dist/domain/workflowexecution/list-pending-approvals.js.map +1 -0
- package/dist/domain/workflowexecution/normalize-workflow-ref-step.d.ts +6 -0
- package/dist/domain/workflowexecution/normalize-workflow-ref-step.d.ts.map +1 -0
- package/dist/domain/workflowexecution/normalize-workflow-ref-step.js +54 -0
- package/dist/domain/workflowexecution/normalize-workflow-ref-step.js.map +1 -0
- package/dist/domain/workflowexecution/pin-workflow-version-step.d.ts +8 -0
- package/dist/domain/workflowexecution/pin-workflow-version-step.d.ts.map +1 -0
- package/dist/domain/workflowexecution/pin-workflow-version-step.js +81 -0
- package/dist/domain/workflowexecution/pin-workflow-version-step.js.map +1 -0
- package/dist/domain/workflowexecution/queries.d.ts +10 -0
- package/dist/domain/workflowexecution/queries.d.ts.map +1 -0
- package/dist/domain/workflowexecution/queries.js +40 -0
- package/dist/domain/workflowexecution/queries.js.map +1 -0
- package/dist/domain/workflowexecution/search-extractor.d.ts +3 -0
- package/dist/domain/workflowexecution/search-extractor.d.ts.map +1 -0
- package/dist/domain/workflowexecution/search-extractor.js +44 -0
- package/dist/domain/workflowexecution/search-extractor.js.map +1 -0
- package/dist/domain/workflowexecution/send-signal.d.ts +16 -0
- package/dist/domain/workflowexecution/send-signal.d.ts.map +1 -0
- package/dist/domain/workflowexecution/send-signal.js +189 -0
- package/dist/domain/workflowexecution/send-signal.js.map +1 -0
- package/dist/domain/workflowexecution/stream-broker.d.ts +70 -0
- package/dist/domain/workflowexecution/stream-broker.d.ts.map +1 -0
- package/dist/domain/workflowexecution/stream-broker.js +87 -0
- package/dist/domain/workflowexecution/stream-broker.js.map +1 -0
- package/dist/domain/workflowexecution/submit-approval.d.ts +40 -0
- package/dist/domain/workflowexecution/submit-approval.d.ts.map +1 -0
- package/dist/domain/workflowexecution/submit-approval.js +105 -0
- package/dist/domain/workflowexecution/submit-approval.js.map +1 -0
- package/dist/domain/workflowexecution/submit-file-decision.d.ts +26 -0
- package/dist/domain/workflowexecution/submit-file-decision.d.ts.map +1 -0
- package/dist/domain/workflowexecution/submit-file-decision.js +118 -0
- package/dist/domain/workflowexecution/submit-file-decision.js.map +1 -0
- package/dist/domain/workflowexecution/submit-workflow-task-approval.d.ts +16 -0
- package/dist/domain/workflowexecution/submit-workflow-task-approval.d.ts.map +1 -0
- package/dist/domain/workflowexecution/submit-workflow-task-approval.js +119 -0
- package/dist/domain/workflowexecution/submit-workflow-task-approval.js.map +1 -0
- package/dist/domain/workflowexecution/subscribe-events.d.ts +14 -0
- package/dist/domain/workflowexecution/subscribe-events.d.ts.map +1 -0
- package/dist/domain/workflowexecution/subscribe-events.js +155 -0
- package/dist/domain/workflowexecution/subscribe-events.js.map +1 -0
- package/dist/domain/workflowexecution/subscribe.d.ts +24 -0
- package/dist/domain/workflowexecution/subscribe.d.ts.map +1 -0
- package/dist/domain/workflowexecution/subscribe.js +124 -0
- package/dist/domain/workflowexecution/subscribe.js.map +1 -0
- package/dist/domain/workflowexecution/temporal/config.d.ts +108 -0
- package/dist/domain/workflowexecution/temporal/config.d.ts.map +1 -0
- package/dist/domain/workflowexecution/temporal/config.js +111 -0
- package/dist/domain/workflowexecution/temporal/config.js.map +1 -0
- package/dist/domain/workflowexecution/update-status.d.ts +41 -0
- package/dist/domain/workflowexecution/update-status.d.ts.map +1 -0
- package/dist/domain/workflowexecution/update-status.js +280 -0
- package/dist/domain/workflowexecution/update-status.js.map +1 -0
- package/dist/domain/workflowinstance/controller.d.ts +44 -0
- package/dist/domain/workflowinstance/controller.d.ts.map +1 -0
- package/dist/domain/workflowinstance/controller.js +387 -0
- package/dist/domain/workflowinstance/controller.js.map +1 -0
- package/dist/domain/workflowinstance/defaultinstance.d.ts +23 -0
- package/dist/domain/workflowinstance/defaultinstance.d.ts.map +1 -0
- package/dist/domain/workflowinstance/defaultinstance.js +58 -0
- package/dist/domain/workflowinstance/defaultinstance.js.map +1 -0
- package/dist/domain/workflowinstance/search-extractor.d.ts +3 -0
- package/dist/domain/workflowinstance/search-extractor.d.ts.map +1 -0
- package/dist/domain/workflowinstance/search-extractor.js +44 -0
- package/dist/domain/workflowinstance/search-extractor.js.map +1 -0
- package/dist/domain/workflowinstance/steps.d.ts +57 -0
- package/dist/domain/workflowinstance/steps.d.ts.map +1 -0
- package/dist/domain/workflowinstance/steps.js +143 -0
- package/dist/domain/workflowinstance/steps.js.map +1 -0
- package/dist/encryption/codec.d.ts +102 -0
- package/dist/encryption/codec.d.ts.map +1 -0
- package/dist/encryption/codec.js +2 -0
- package/dist/encryption/codec.js.map +1 -0
- package/dist/encryption/encryption.d.ts +210 -0
- package/dist/encryption/encryption.d.ts.map +1 -0
- package/dist/encryption/encryption.js +418 -0
- package/dist/encryption/encryption.js.map +1 -0
- package/dist/encryption/errors.d.ts +66 -0
- package/dist/encryption/errors.d.ts.map +1 -0
- package/dist/encryption/errors.js +83 -0
- package/dist/encryption/errors.js.map +1 -0
- package/dist/encryption/key-manager.d.ts +23 -0
- package/dist/encryption/key-manager.d.ts.map +1 -0
- package/dist/encryption/key-manager.js +130 -0
- package/dist/encryption/key-manager.js.map +1 -0
- package/dist/encryption/scope.d.ts +80 -0
- package/dist/encryption/scope.d.ts.map +1 -0
- package/dist/encryption/scope.js +133 -0
- package/dist/encryption/scope.js.map +1 -0
- package/dist/encryption/v1-codec.d.ts +36 -0
- package/dist/encryption/v1-codec.d.ts.map +1 -0
- package/dist/encryption/v1-codec.js +120 -0
- package/dist/encryption/v1-codec.js.map +1 -0
- package/dist/envmerge/envmerge.d.ts +45 -0
- package/dist/envmerge/envmerge.d.ts.map +1 -0
- package/dist/envmerge/envmerge.js +88 -0
- package/dist/envmerge/envmerge.js.map +1 -0
- package/dist/extensions/authorizer.d.ts +70 -0
- package/dist/extensions/authorizer.d.ts.map +1 -0
- package/dist/extensions/authorizer.js +2 -0
- package/dist/extensions/authorizer.js.map +1 -0
- package/dist/extensions/caller-guards.d.ts +56 -0
- package/dist/extensions/caller-guards.d.ts.map +1 -0
- package/dist/extensions/caller-guards.js +2 -0
- package/dist/extensions/caller-guards.js.map +1 -0
- package/dist/extensions/drivers.d.ts +140 -0
- package/dist/extensions/drivers.d.ts.map +1 -0
- package/dist/extensions/drivers.js +2 -0
- package/dist/extensions/drivers.js.map +1 -0
- package/dist/extensions/gate-slots.d.ts +68 -0
- package/dist/extensions/gate-slots.d.ts.map +1 -0
- package/dist/extensions/gate-slots.js +32 -0
- package/dist/extensions/gate-slots.js.map +1 -0
- package/dist/extensions/identity.d.ts +91 -0
- package/dist/extensions/identity.d.ts.map +1 -0
- package/dist/extensions/identity.js +16 -0
- package/dist/extensions/identity.js.map +1 -0
- package/dist/extensions/list-read-scope.d.ts +108 -0
- package/dist/extensions/list-read-scope.d.ts.map +1 -0
- package/dist/extensions/list-read-scope.js +31 -0
- package/dist/extensions/list-read-scope.js.map +1 -0
- package/dist/extensions/organization-directory.d.ts +49 -0
- package/dist/extensions/organization-directory.d.ts.map +1 -0
- package/dist/extensions/organization-directory.js +6 -0
- package/dist/extensions/organization-directory.js.map +1 -0
- package/dist/extensions/registry.d.ts +221 -0
- package/dist/extensions/registry.d.ts.map +1 -0
- package/dist/extensions/registry.js +230 -0
- package/dist/extensions/registry.js.map +1 -0
- package/dist/extensions/resource-authorization.d.ts +135 -0
- package/dist/extensions/resource-authorization.d.ts.map +1 -0
- package/dist/extensions/resource-authorization.js +2 -0
- package/dist/extensions/resource-authorization.js.map +1 -0
- package/dist/extensions/schedule-fire-caller.d.ts +33 -0
- package/dist/extensions/schedule-fire-caller.d.ts.map +1 -0
- package/dist/extensions/schedule-fire-caller.js +2 -0
- package/dist/extensions/schedule-fire-caller.js.map +1 -0
- package/dist/extensions/status-hooks.d.ts +47 -0
- package/dist/extensions/status-hooks.d.ts.map +1 -0
- package/dist/extensions/status-hooks.js +2 -0
- package/dist/extensions/status-hooks.js.map +1 -0
- package/dist/gocompat/query-escape.d.ts +22 -0
- package/dist/gocompat/query-escape.d.ts.map +1 -0
- package/dist/gocompat/query-escape.js +42 -0
- package/dist/gocompat/query-escape.js.map +1 -0
- package/dist/gocompat/trim.d.ts +10 -0
- package/dist/gocompat/trim.d.ts.map +1 -0
- package/dist/gocompat/trim.js +31 -0
- package/dist/gocompat/trim.js.map +1 -0
- package/dist/identity/oidc-verifier.d.ts +14 -0
- package/dist/identity/oidc-verifier.d.ts.map +1 -0
- package/dist/identity/oidc-verifier.js +136 -0
- package/dist/identity/oidc-verifier.js.map +1 -0
- package/dist/index.d.ts +98 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +143 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +62 -0
- package/dist/main.js.map +1 -0
- package/dist/observability/rpc-metrics.d.ts +89 -0
- package/dist/observability/rpc-metrics.d.ts.map +1 -0
- package/dist/observability/rpc-metrics.js +151 -0
- package/dist/observability/rpc-metrics.js.map +1 -0
- package/dist/pipeline/apiresource-labels.d.ts +52 -0
- package/dist/pipeline/apiresource-labels.d.ts.map +1 -0
- package/dist/pipeline/apiresource-labels.js +39 -0
- package/dist/pipeline/apiresource-labels.js.map +1 -0
- package/dist/pipeline/apiresource-meta.d.ts +35 -0
- package/dist/pipeline/apiresource-meta.d.ts.map +1 -0
- package/dist/pipeline/apiresource-meta.js +114 -0
- package/dist/pipeline/apiresource-meta.js.map +1 -0
- package/dist/pipeline/chain.d.ts +45 -0
- package/dist/pipeline/chain.d.ts.map +1 -0
- package/dist/pipeline/chain.js +14 -0
- package/dist/pipeline/chain.js.map +1 -0
- package/dist/pipeline/errors.d.ts +83 -0
- package/dist/pipeline/errors.d.ts.map +1 -0
- package/dist/pipeline/errors.js +129 -0
- package/dist/pipeline/errors.js.map +1 -0
- package/dist/pipeline/interceptors/apiresource.d.ts +10 -0
- package/dist/pipeline/interceptors/apiresource.d.ts.map +1 -0
- package/dist/pipeline/interceptors/apiresource.js +38 -0
- package/dist/pipeline/interceptors/apiresource.js.map +1 -0
- package/dist/pipeline/interceptors/auth.d.ts +138 -0
- package/dist/pipeline/interceptors/auth.d.ts.map +1 -0
- package/dist/pipeline/interceptors/auth.js +371 -0
- package/dist/pipeline/interceptors/auth.js.map +1 -0
- package/dist/pipeline/interceptors/error-boundary.d.ts +48 -0
- package/dist/pipeline/interceptors/error-boundary.d.ts.map +1 -0
- package/dist/pipeline/interceptors/error-boundary.js +185 -0
- package/dist/pipeline/interceptors/error-boundary.js.map +1 -0
- package/dist/pipeline/interceptors/logging.d.ts +4 -0
- package/dist/pipeline/interceptors/logging.d.ts.map +1 -0
- package/dist/pipeline/interceptors/logging.js +68 -0
- package/dist/pipeline/interceptors/logging.js.map +1 -0
- package/dist/pipeline/interceptors/protovalidate.d.ts +3 -0
- package/dist/pipeline/interceptors/protovalidate.d.ts.map +1 -0
- package/dist/pipeline/interceptors/protovalidate.js +50 -0
- package/dist/pipeline/interceptors/protovalidate.js.map +1 -0
- package/dist/pipeline/interceptors/request-metrics.d.ts +5 -0
- package/dist/pipeline/interceptors/request-metrics.d.ts.map +1 -0
- package/dist/pipeline/interceptors/request-metrics.js +99 -0
- package/dist/pipeline/interceptors/request-metrics.js.map +1 -0
- package/dist/pipeline/pipeline.d.ts +36 -0
- package/dist/pipeline/pipeline.d.ts.map +1 -0
- package/dist/pipeline/pipeline.js +93 -0
- package/dist/pipeline/pipeline.js.map +1 -0
- package/dist/pipeline/request-context.d.ts +39 -0
- package/dist/pipeline/request-context.d.ts.map +1 -0
- package/dist/pipeline/request-context.js +76 -0
- package/dist/pipeline/request-context.js.map +1 -0
- package/dist/pipeline/steps/authorization-tuples.d.ts +105 -0
- package/dist/pipeline/steps/authorization-tuples.d.ts.map +1 -0
- package/dist/pipeline/steps/authorization-tuples.js +315 -0
- package/dist/pipeline/steps/authorization-tuples.js.map +1 -0
- package/dist/pipeline/steps/authorize.d.ts +61 -0
- package/dist/pipeline/steps/authorize.d.ts.map +1 -0
- package/dist/pipeline/steps/authorize.js +221 -0
- package/dist/pipeline/steps/authorize.js.map +1 -0
- package/dist/pipeline/steps/build-update-state.d.ts +4 -0
- package/dist/pipeline/steps/build-update-state.d.ts.map +1 -0
- package/dist/pipeline/steps/build-update-state.js +93 -0
- package/dist/pipeline/steps/build-update-state.js.map +1 -0
- package/dist/pipeline/steps/defaults.d.ts +97 -0
- package/dist/pipeline/steps/defaults.d.ts.map +1 -0
- package/dist/pipeline/steps/defaults.js +251 -0
- package/dist/pipeline/steps/defaults.js.map +1 -0
- package/dist/pipeline/steps/delete.d.ts +21 -0
- package/dist/pipeline/steps/delete.d.ts.map +1 -0
- package/dist/pipeline/steps/delete.js +60 -0
- package/dist/pipeline/steps/delete.js.map +1 -0
- package/dist/pipeline/steps/duplicate.d.ts +12 -0
- package/dist/pipeline/steps/duplicate.d.ts.map +1 -0
- package/dist/pipeline/steps/duplicate.js +31 -0
- package/dist/pipeline/steps/duplicate.js.map +1 -0
- package/dist/pipeline/steps/guard-memory-capture.d.ts +61 -0
- package/dist/pipeline/steps/guard-memory-capture.d.ts.map +1 -0
- package/dist/pipeline/steps/guard-memory-capture.js +83 -0
- package/dist/pipeline/steps/guard-memory-capture.js.map +1 -0
- package/dist/pipeline/steps/guard-reserved-labels.d.ts +13 -0
- package/dist/pipeline/steps/guard-reserved-labels.d.ts.map +1 -0
- package/dist/pipeline/steps/guard-reserved-labels.js +138 -0
- package/dist/pipeline/steps/guard-reserved-labels.js.map +1 -0
- package/dist/pipeline/steps/helpers.d.ts +38 -0
- package/dist/pipeline/steps/helpers.d.ts.map +1 -0
- package/dist/pipeline/steps/helpers.js +122 -0
- package/dist/pipeline/steps/helpers.js.map +1 -0
- package/dist/pipeline/steps/index-search.d.ts +23 -0
- package/dist/pipeline/steps/index-search.d.ts.map +1 -0
- package/dist/pipeline/steps/index-search.js +56 -0
- package/dist/pipeline/steps/index-search.js.map +1 -0
- package/dist/pipeline/steps/load-by-reference.d.ts +12 -0
- package/dist/pipeline/steps/load-by-reference.d.ts.map +1 -0
- package/dist/pipeline/steps/load-by-reference.js +29 -0
- package/dist/pipeline/steps/load-by-reference.js.map +1 -0
- package/dist/pipeline/steps/load-existing.d.ts +19 -0
- package/dist/pipeline/steps/load-existing.d.ts.map +1 -0
- package/dist/pipeline/steps/load-existing.js +44 -0
- package/dist/pipeline/steps/load-existing.js.map +1 -0
- package/dist/pipeline/steps/load-for-apply.d.ts +21 -0
- package/dist/pipeline/steps/load-for-apply.d.ts.map +1 -0
- package/dist/pipeline/steps/load-for-apply.js +60 -0
- package/dist/pipeline/steps/load-for-apply.js.map +1 -0
- package/dist/pipeline/steps/load-target.d.ts +20 -0
- package/dist/pipeline/steps/load-target.d.ts.map +1 -0
- package/dist/pipeline/steps/load-target.js +29 -0
- package/dist/pipeline/steps/load-target.js.map +1 -0
- package/dist/pipeline/steps/persist.d.ts +9 -0
- package/dist/pipeline/steps/persist.d.ts.map +1 -0
- package/dist/pipeline/steps/persist.js +23 -0
- package/dist/pipeline/steps/persist.js.map +1 -0
- package/dist/pipeline/steps/references.d.ts +22 -0
- package/dist/pipeline/steps/references.d.ts.map +1 -0
- package/dist/pipeline/steps/references.js +128 -0
- package/dist/pipeline/steps/references.js.map +1 -0
- package/dist/pipeline/steps/secret-cleanup.d.ts +47 -0
- package/dist/pipeline/steps/secret-cleanup.d.ts.map +1 -0
- package/dist/pipeline/steps/secret-cleanup.js +56 -0
- package/dist/pipeline/steps/secret-cleanup.js.map +1 -0
- package/dist/pipeline/steps/server-stamped-reserved-labels.d.ts +36 -0
- package/dist/pipeline/steps/server-stamped-reserved-labels.d.ts.map +1 -0
- package/dist/pipeline/steps/server-stamped-reserved-labels.js +25 -0
- package/dist/pipeline/steps/server-stamped-reserved-labels.js.map +1 -0
- package/dist/pipeline/steps/shapes.d.ts +43 -0
- package/dist/pipeline/steps/shapes.d.ts.map +1 -0
- package/dist/pipeline/steps/shapes.js +69 -0
- package/dist/pipeline/steps/shapes.js.map +1 -0
- package/dist/pipeline/steps/slug.d.ts +18 -0
- package/dist/pipeline/steps/slug.d.ts.map +1 -0
- package/dist/pipeline/steps/slug.js +34 -0
- package/dist/pipeline/steps/slug.js.map +1 -0
- package/dist/pipeline/steps/validate-visibility.d.ts +29 -0
- package/dist/pipeline/steps/validate-visibility.d.ts.map +1 -0
- package/dist/pipeline/steps/validate-visibility.js +52 -0
- package/dist/pipeline/steps/validate-visibility.js.map +1 -0
- package/dist/pipeline/steps/validation.d.ts +6 -0
- package/dist/pipeline/steps/validation.d.ts.map +1 -0
- package/dist/pipeline/steps/validation.js +35 -0
- package/dist/pipeline/steps/validation.js.map +1 -0
- package/dist/pipeline/steps/visibility-gates.d.ts +19 -0
- package/dist/pipeline/steps/visibility-gates.d.ts.map +1 -0
- package/dist/pipeline/steps/visibility-gates.js +134 -0
- package/dist/pipeline/steps/visibility-gates.js.map +1 -0
- package/dist/query/activity/controller.d.ts +28 -0
- package/dist/query/activity/controller.d.ts.map +1 -0
- package/dist/query/activity/controller.js +20 -0
- package/dist/query/activity/controller.js.map +1 -0
- package/dist/query/activity/handler.d.ts +84 -0
- package/dist/query/activity/handler.d.ts.map +1 -0
- package/dist/query/activity/handler.js +269 -0
- package/dist/query/activity/handler.js.map +1 -0
- package/dist/query/search/controller.d.ts +33 -0
- package/dist/query/search/controller.d.ts.map +1 -0
- package/dist/query/search/controller.js +43 -0
- package/dist/query/search/controller.js.map +1 -0
- package/dist/query/search/criteria.d.ts +95 -0
- package/dist/query/search/criteria.d.ts.map +1 -0
- package/dist/query/search/criteria.js +172 -0
- package/dist/query/search/criteria.js.map +1 -0
- package/dist/query/search/extractor.d.ts +45 -0
- package/dist/query/search/extractor.d.ts.map +1 -0
- package/dist/query/search/extractor.js +52 -0
- package/dist/query/search/extractor.js.map +1 -0
- package/dist/query/search/handler.d.ts +27 -0
- package/dist/query/search/handler.d.ts.map +1 -0
- package/dist/query/search/handler.js +86 -0
- package/dist/query/search/handler.js.map +1 -0
- package/dist/query/search/paged-result.d.ts +25 -0
- package/dist/query/search/paged-result.d.ts.map +1 -0
- package/dist/query/search/paged-result.js +26 -0
- package/dist/query/search/paged-result.js.map +1 -0
- package/dist/query/search/query-store.d.ts +38 -0
- package/dist/query/search/query-store.d.ts.map +1 -0
- package/dist/query/search/query-store.js +186 -0
- package/dist/query/search/query-store.js.map +1 -0
- package/dist/query/search/registry.d.ts +51 -0
- package/dist/query/search/registry.d.ts.map +1 -0
- package/dist/query/search/registry.js +108 -0
- package/dist/query/search/registry.js.map +1 -0
- package/dist/runnerauth/runner-credential-provider.d.ts +279 -0
- package/dist/runnerauth/runner-credential-provider.d.ts.map +1 -0
- package/dist/runnerauth/runner-credential-provider.js +28 -0
- package/dist/runnerauth/runner-credential-provider.js.map +1 -0
- package/dist/runnerauth/runnerauth.d.ts +87 -0
- package/dist/runnerauth/runnerauth.d.ts.map +1 -0
- package/dist/runnerauth/runnerauth.js +203 -0
- package/dist/runnerauth/runnerauth.js.map +1 -0
- package/dist/sandbox/builtins.d.ts +3 -0
- package/dist/sandbox/builtins.d.ts.map +1 -0
- package/dist/sandbox/builtins.js +18 -0
- package/dist/sandbox/builtins.js.map +1 -0
- package/dist/sandbox/docker.d.ts +3 -0
- package/dist/sandbox/docker.d.ts.map +1 -0
- package/dist/sandbox/docker.js +168 -0
- package/dist/sandbox/docker.js.map +1 -0
- package/dist/sandbox/kubernetes.d.ts +27 -0
- package/dist/sandbox/kubernetes.d.ts.map +1 -0
- package/dist/sandbox/kubernetes.js +378 -0
- package/dist/sandbox/kubernetes.js.map +1 -0
- package/dist/sandbox/lane.d.ts +53 -0
- package/dist/sandbox/lane.d.ts.map +1 -0
- package/dist/sandbox/lane.js +34 -0
- package/dist/sandbox/lane.js.map +1 -0
- package/dist/sandbox/local-process.d.ts +3 -0
- package/dist/sandbox/local-process.d.ts.map +1 -0
- package/dist/sandbox/local-process.js +155 -0
- package/dist/sandbox/local-process.js.map +1 -0
- package/dist/sandbox/naming.d.ts +11 -0
- package/dist/sandbox/naming.d.ts.map +1 -0
- package/dist/sandbox/naming.js +33 -0
- package/dist/sandbox/naming.js.map +1 -0
- package/dist/sandbox/provisioner.d.ts +138 -0
- package/dist/sandbox/provisioner.d.ts.map +1 -0
- package/dist/sandbox/provisioner.js +31 -0
- package/dist/sandbox/provisioner.js.map +1 -0
- package/dist/sandbox/steps.d.ts +92 -0
- package/dist/sandbox/steps.d.ts.map +1 -0
- package/dist/sandbox/steps.js +267 -0
- package/dist/sandbox/steps.js.map +1 -0
- package/dist/store/interface.d.ts +585 -0
- package/dist/store/interface.d.ts.map +1 -0
- package/dist/store/interface.js +51 -0
- package/dist/store/interface.js.map +1 -0
- package/dist/store/logger.d.ts +13 -0
- package/dist/store/logger.d.ts.map +1 -0
- package/dist/store/logger.js +3 -0
- package/dist/store/logger.js.map +1 -0
- package/dist/store/postgres/migrations.d.ts +60 -0
- package/dist/store/postgres/migrations.d.ts.map +1 -0
- package/dist/store/postgres/migrations.js +242 -0
- package/dist/store/postgres/migrations.js.map +1 -0
- package/dist/store/postgres/store.d.ts +69 -0
- package/dist/store/postgres/store.d.ts.map +1 -0
- package/dist/store/postgres/store.js +873 -0
- package/dist/store/postgres/store.js.map +1 -0
- package/dist/store/postgres/tsquery.d.ts +54 -0
- package/dist/store/postgres/tsquery.d.ts.map +1 -0
- package/dist/store/postgres/tsquery.js +78 -0
- package/dist/store/postgres/tsquery.js.map +1 -0
- package/dist/store/proto-fields.d.ts +42 -0
- package/dist/store/proto-fields.d.ts.map +1 -0
- package/dist/store/proto-fields.js +171 -0
- package/dist/store/proto-fields.js.map +1 -0
- package/dist/store/rfc3339.d.ts +11 -0
- package/dist/store/rfc3339.d.ts.map +1 -0
- package/dist/store/rfc3339.js +13 -0
- package/dist/store/rfc3339.js.map +1 -0
- package/dist/store/sqlite/fts5.d.ts +40 -0
- package/dist/store/sqlite/fts5.d.ts.map +1 -0
- package/dist/store/sqlite/fts5.js +68 -0
- package/dist/store/sqlite/fts5.js.map +1 -0
- package/dist/store/sqlite/migrations.d.ts +50 -0
- package/dist/store/sqlite/migrations.d.ts.map +1 -0
- package/dist/store/sqlite/migrations.js +291 -0
- package/dist/store/sqlite/migrations.js.map +1 -0
- package/dist/store/sqlite/store.d.ts +64 -0
- package/dist/store/sqlite/store.d.ts.map +1 -0
- package/dist/store/sqlite/store.js +874 -0
- package/dist/store/sqlite/store.js.map +1 -0
- package/dist/temporal/agentexecution/activities.d.ts +45 -0
- package/dist/temporal/agentexecution/activities.d.ts.map +1 -0
- package/dist/temporal/agentexecution/activities.js +158 -0
- package/dist/temporal/agentexecution/activities.js.map +1 -0
- package/dist/temporal/agentexecution/dispatch.d.ts +24 -0
- package/dist/temporal/agentexecution/dispatch.d.ts.map +1 -0
- package/dist/temporal/agentexecution/dispatch.js +106 -0
- package/dist/temporal/agentexecution/dispatch.js.map +1 -0
- package/dist/temporal/agentexecution/engine-client.d.ts +63 -0
- package/dist/temporal/agentexecution/engine-client.d.ts.map +1 -0
- package/dist/temporal/agentexecution/engine-client.js +144 -0
- package/dist/temporal/agentexecution/engine-client.js.map +1 -0
- package/dist/temporal/agentexecution/names.d.ts +82 -0
- package/dist/temporal/agentexecution/names.d.ts.map +1 -0
- package/dist/temporal/agentexecution/names.js +88 -0
- package/dist/temporal/agentexecution/names.js.map +1 -0
- package/dist/temporal/agentexecution/runner-result.d.ts +27 -0
- package/dist/temporal/agentexecution/runner-result.d.ts.map +1 -0
- package/dist/temporal/agentexecution/runner-result.js +50 -0
- package/dist/temporal/agentexecution/runner-result.js.map +1 -0
- package/dist/temporal/agentexecution/worker.d.ts +40 -0
- package/dist/temporal/agentexecution/worker.d.ts.map +1 -0
- package/dist/temporal/agentexecution/worker.js +37 -0
- package/dist/temporal/agentexecution/worker.js.map +1 -0
- package/dist/temporal/agentexecution/workflow-input.d.ts +41 -0
- package/dist/temporal/agentexecution/workflow-input.d.ts.map +1 -0
- package/dist/temporal/agentexecution/workflow-input.js +2 -0
- package/dist/temporal/agentexecution/workflow-input.js.map +1 -0
- package/dist/temporal/agentexecution/workflows/index.d.ts +16 -0
- package/dist/temporal/agentexecution/workflows/index.d.ts.map +1 -0
- package/dist/temporal/agentexecution/workflows/index.js +16 -0
- package/dist/temporal/agentexecution/workflows/index.js.map +1 -0
- package/dist/temporal/agentexecution/workflows/invoke-agent-execution.d.ts +3 -0
- package/dist/temporal/agentexecution/workflows/invoke-agent-execution.d.ts.map +1 -0
- package/dist/temporal/agentexecution/workflows/invoke-agent-execution.js +1091 -0
- package/dist/temporal/agentexecution/workflows/invoke-agent-execution.js.map +1 -0
- package/dist/temporal/manager.d.ts +175 -0
- package/dist/temporal/manager.d.ts.map +1 -0
- package/dist/temporal/manager.js +465 -0
- package/dist/temporal/manager.js.map +1 -0
- package/dist/temporal/mcpserver/engine-client.d.ts +48 -0
- package/dist/temporal/mcpserver/engine-client.d.ts.map +1 -0
- package/dist/temporal/mcpserver/engine-client.js +211 -0
- package/dist/temporal/mcpserver/engine-client.js.map +1 -0
- package/dist/temporal/mcpserver/names.d.ts +20 -0
- package/dist/temporal/mcpserver/names.d.ts.map +1 -0
- package/dist/temporal/mcpserver/names.js +22 -0
- package/dist/temporal/mcpserver/names.js.map +1 -0
- package/dist/temporal/payload-codec.d.ts +71 -0
- package/dist/temporal/payload-codec.d.ts.map +1 -0
- package/dist/temporal/payload-codec.js +57 -0
- package/dist/temporal/payload-codec.js.map +1 -0
- package/dist/temporal/runner-failure.d.ts +13 -0
- package/dist/temporal/runner-failure.d.ts.map +1 -0
- package/dist/temporal/runner-failure.js +65 -0
- package/dist/temporal/runner-failure.js.map +1 -0
- package/dist/temporal/schedule/activities.d.ts +22 -0
- package/dist/temporal/schedule/activities.d.ts.map +1 -0
- package/dist/temporal/schedule/activities.js +350 -0
- package/dist/temporal/schedule/activities.js.map +1 -0
- package/dist/temporal/schedule/artifact.d.ts +61 -0
- package/dist/temporal/schedule/artifact.d.ts.map +1 -0
- package/dist/temporal/schedule/artifact.js +119 -0
- package/dist/temporal/schedule/artifact.js.map +1 -0
- package/dist/temporal/schedule/config.d.ts +153 -0
- package/dist/temporal/schedule/config.d.ts.map +1 -0
- package/dist/temporal/schedule/config.js +186 -0
- package/dist/temporal/schedule/config.js.map +1 -0
- package/dist/temporal/schedule/model-pinning.d.ts +31 -0
- package/dist/temporal/schedule/model-pinning.d.ts.map +1 -0
- package/dist/temporal/schedule/model-pinning.js +18 -0
- package/dist/temporal/schedule/model-pinning.js.map +1 -0
- package/dist/temporal/schedule/names.d.ts +105 -0
- package/dist/temporal/schedule/names.d.ts.map +1 -0
- package/dist/temporal/schedule/names.js +72 -0
- package/dist/temporal/schedule/names.js.map +1 -0
- package/dist/temporal/schedule/reconciler.d.ts +94 -0
- package/dist/temporal/schedule/reconciler.d.ts.map +1 -0
- package/dist/temporal/schedule/reconciler.js +254 -0
- package/dist/temporal/schedule/reconciler.js.map +1 -0
- package/dist/temporal/schedule/run-ledger.d.ts +67 -0
- package/dist/temporal/schedule/run-ledger.d.ts.map +1 -0
- package/dist/temporal/schedule/run-ledger.js +154 -0
- package/dist/temporal/schedule/run-ledger.js.map +1 -0
- package/dist/temporal/schedule/run-starter.d.ts +122 -0
- package/dist/temporal/schedule/run-starter.d.ts.map +1 -0
- package/dist/temporal/schedule/run-starter.js +406 -0
- package/dist/temporal/schedule/run-starter.js.map +1 -0
- package/dist/temporal/schedule/status-writes.d.ts +14 -0
- package/dist/temporal/schedule/status-writes.d.ts.map +1 -0
- package/dist/temporal/schedule/status-writes.js +43 -0
- package/dist/temporal/schedule/status-writes.js.map +1 -0
- package/dist/temporal/schedule/syncer.d.ts +77 -0
- package/dist/temporal/schedule/syncer.d.ts.map +1 -0
- package/dist/temporal/schedule/syncer.js +161 -0
- package/dist/temporal/schedule/syncer.js.map +1 -0
- package/dist/temporal/schedule/worker.d.ts +36 -0
- package/dist/temporal/schedule/worker.d.ts.map +1 -0
- package/dist/temporal/schedule/worker.js +37 -0
- package/dist/temporal/schedule/worker.js.map +1 -0
- package/dist/temporal/schedule/workflows/index.d.ts +12 -0
- package/dist/temporal/schedule/workflows/index.d.ts.map +1 -0
- package/dist/temporal/schedule/workflows/index.js +12 -0
- package/dist/temporal/schedule/workflows/index.js.map +1 -0
- package/dist/temporal/schedule/workflows/tick.d.ts +24 -0
- package/dist/temporal/schedule/workflows/tick.d.ts.map +1 -0
- package/dist/temporal/schedule/workflows/tick.js +283 -0
- package/dist/temporal/schedule/workflows/tick.js.map +1 -0
- package/dist/temporal/workflow-source.d.ts +22 -0
- package/dist/temporal/workflow-source.d.ts.map +1 -0
- package/dist/temporal/workflow-source.js +44 -0
- package/dist/temporal/workflow-source.js.map +1 -0
- package/dist/temporal/workflowexecution/activities.d.ts +34 -0
- package/dist/temporal/workflowexecution/activities.d.ts.map +1 -0
- package/dist/temporal/workflowexecution/activities.js +145 -0
- package/dist/temporal/workflowexecution/activities.js.map +1 -0
- package/dist/temporal/workflowexecution/dispatch.d.ts +38 -0
- package/dist/temporal/workflowexecution/dispatch.d.ts.map +1 -0
- package/dist/temporal/workflowexecution/dispatch.js +28 -0
- package/dist/temporal/workflowexecution/dispatch.js.map +1 -0
- package/dist/temporal/workflowexecution/engine-client.d.ts +67 -0
- package/dist/temporal/workflowexecution/engine-client.d.ts.map +1 -0
- package/dist/temporal/workflowexecution/engine-client.js +145 -0
- package/dist/temporal/workflowexecution/engine-client.js.map +1 -0
- package/dist/temporal/workflowexecution/names.d.ts +69 -0
- package/dist/temporal/workflowexecution/names.d.ts.map +1 -0
- package/dist/temporal/workflowexecution/names.js +71 -0
- package/dist/temporal/workflowexecution/names.js.map +1 -0
- package/dist/temporal/workflowexecution/worker.d.ts +40 -0
- package/dist/temporal/workflowexecution/worker.d.ts.map +1 -0
- package/dist/temporal/workflowexecution/worker.js +37 -0
- package/dist/temporal/workflowexecution/worker.js.map +1 -0
- package/dist/temporal/workflowexecution/workflow-input.d.ts +42 -0
- package/dist/temporal/workflowexecution/workflow-input.d.ts.map +1 -0
- package/dist/temporal/workflowexecution/workflow-input.js +2 -0
- package/dist/temporal/workflowexecution/workflow-input.js.map +1 -0
- package/dist/temporal/workflowexecution/workflows/index.d.ts +16 -0
- package/dist/temporal/workflowexecution/workflows/index.d.ts.map +1 -0
- package/dist/temporal/workflowexecution/workflows/index.js +16 -0
- package/dist/temporal/workflowexecution/workflows/index.js.map +1 -0
- package/dist/temporal/workflowexecution/workflows/invoke-workflow-execution.d.ts +3 -0
- package/dist/temporal/workflowexecution/workflows/invoke-workflow-execution.d.ts.map +1 -0
- package/dist/temporal/workflowexecution/workflows/invoke-workflow-execution.js +430 -0
- package/dist/temporal/workflowexecution/workflows/invoke-workflow-execution.js.map +1 -0
- package/dist/transport/console/assets.d.ts +16 -0
- package/dist/transport/console/assets.d.ts.map +1 -0
- package/dist/transport/console/assets.js +66 -0
- package/dist/transport/console/assets.js.map +1 -0
- package/dist/transport/console/handler.d.ts +20 -0
- package/dist/transport/console/handler.d.ts.map +1 -0
- package/dist/transport/console/handler.js +252 -0
- package/dist/transport/console/handler.js.map +1 -0
- package/dist/transport/console/resolver.d.ts +66 -0
- package/dist/transport/console/resolver.d.ts.map +1 -0
- package/dist/transport/console/resolver.js +163 -0
- package/dist/transport/console/resolver.js.map +1 -0
- package/dist/transport/constants.d.ts +44 -0
- package/dist/transport/constants.d.ts.map +1 -0
- package/dist/transport/constants.js +44 -0
- package/dist/transport/constants.js.map +1 -0
- package/dist/transport/cors.d.ts +51 -0
- package/dist/transport/cors.d.ts.map +1 -0
- package/dist/transport/cors.js +67 -0
- package/dist/transport/cors.js.map +1 -0
- package/dist/transport/demux.d.ts +61 -0
- package/dist/transport/demux.d.ts.map +1 -0
- package/dist/transport/demux.js +107 -0
- package/dist/transport/demux.js.map +1 -0
- package/dist/transport/health.d.ts +15 -0
- package/dist/transport/health.d.ts.map +1 -0
- package/dist/transport/health.js +105 -0
- package/dist/transport/health.js.map +1 -0
- package/dist/transport/lanes.d.ts +13 -0
- package/dist/transport/lanes.d.ts.map +1 -0
- package/dist/transport/lanes.js +2 -0
- package/dist/transport/lanes.js.map +1 -0
- package/dist/transport/registry/lanes.d.ts +35 -0
- package/dist/transport/registry/lanes.d.ts.map +1 -0
- package/dist/transport/registry/lanes.js +26 -0
- package/dist/transport/registry/lanes.js.map +1 -0
- package/dist/transport/server.d.ts +63 -0
- package/dist/transport/server.d.ts.map +1 -0
- package/dist/transport/server.js +137 -0
- package/dist/transport/server.js.map +1 -0
- package/package.json +92 -0
- package/src/artifactstorage/__tests__/artifact-storage.test.ts +356 -0
- package/src/artifactstorage/__tests__/r2-storage.test.ts +144 -0
- package/src/artifactstorage/artifact-storage.ts +453 -0
- package/src/artifactstorage/r2-storage.ts +279 -0
- package/src/boot/__tests__/auth-enabled-composition.test.ts +245 -0
- package/src/boot/__tests__/compose.test.ts +97 -0
- package/src/boot/__tests__/config.test.ts +82 -0
- package/src/boot/__tests__/logger.test.ts +147 -0
- package/src/boot/compose.ts +1301 -0
- package/src/boot/config.ts +495 -0
- package/src/boot/inprocess.ts +415 -0
- package/src/boot/logger.ts +111 -0
- package/src/domain/agent/__tests__/agent.test.ts +522 -0
- package/src/domain/agent/controller.ts +557 -0
- package/src/domain/agent/defaultagent.ts +135 -0
- package/src/domain/agent/search-extractor.ts +72 -0
- package/src/domain/agent/steps.ts +691 -0
- package/src/domain/agentchannel/__tests__/agentchannel.test.ts +1025 -0
- package/src/domain/agentchannel/__tests__/channel-runtime.test.ts +548 -0
- package/src/domain/agentchannel/channel-runtime.ts +211 -0
- package/src/domain/agentchannel/constants.ts +112 -0
- package/src/domain/agentchannel/controller.ts +742 -0
- package/src/domain/agentchannel/conversation.ts +147 -0
- package/src/domain/agentchannel/message.ts +92 -0
- package/src/domain/agentchannel/steps.ts +371 -0
- package/src/domain/agentexecution/__tests__/agentexecution.test.ts +1502 -0
- package/src/domain/agentexecution/__tests__/artifacts.test.ts +600 -0
- package/src/domain/agentexecution/__tests__/create-execution-context-step.test.ts +286 -0
- package/src/domain/agentexecution/__tests__/create-steps.test.ts +984 -0
- package/src/domain/agentexecution/__tests__/engine-stub.ts +20 -0
- package/src/domain/agentexecution/__tests__/engine.test.ts +67 -0
- package/src/domain/agentexecution/__tests__/lifecycle.test.ts +1221 -0
- package/src/domain/agentexecution/__tests__/read-authorization.test.ts +128 -0
- package/src/domain/agentexecution/__tests__/record-runner-lineage-labels.test.ts +136 -0
- package/src/domain/agentexecution/__tests__/status-observers.test.ts +164 -0
- package/src/domain/agentexecution/__tests__/stream-broker.test.ts +119 -0
- package/src/domain/agentexecution/__tests__/update-status.test.ts +369 -0
- package/src/domain/agentexecution/__tests__/usage.test.ts +186 -0
- package/src/domain/agentexecution/__tests__/validate-service-tier.test.ts +117 -0
- package/src/domain/agentexecution/__tests__/validate-thinking-mode.test.ts +143 -0
- package/src/domain/agentexecution/approval/__tests__/corpus-support.ts +100 -0
- package/src/domain/agentexecution/approval/__tests__/lease-scope-corpus.test.ts +78 -0
- package/src/domain/agentexecution/approval/__tests__/policy-source-corpus.test.ts +49 -0
- package/src/domain/agentexecution/approval/__tests__/scenarios-corpus.test.ts +73 -0
- package/src/domain/agentexecution/approval/__tests__/sequence-corpus.test.ts +279 -0
- package/src/domain/agentexecution/approval/author.ts +280 -0
- package/src/domain/agentexecution/approval/compute-from-events.ts +92 -0
- package/src/domain/agentexecution/approval/compute.ts +143 -0
- package/src/domain/agentexecution/approval/emit.ts +274 -0
- package/src/domain/agentexecution/approval/lease-scope.ts +53 -0
- package/src/domain/agentexecution/approval/preserve.ts +88 -0
- package/src/domain/agentexecution/approval/project.ts +139 -0
- package/src/domain/agentexecution/approval/tool-category.ts +58 -0
- package/src/domain/agentexecution/artifacts.ts +512 -0
- package/src/domain/agentexecution/constants.ts +30 -0
- package/src/domain/agentexecution/controller.ts +594 -0
- package/src/domain/agentexecution/create-execution-context-step.ts +1094 -0
- package/src/domain/agentexecution/create-steps.ts +919 -0
- package/src/domain/agentexecution/engine.ts +156 -0
- package/src/domain/agentexecution/filereview/__tests__/file-review-corpus.test.ts +198 -0
- package/src/domain/agentexecution/filereview/author.ts +338 -0
- package/src/domain/agentexecution/filereview/autokeep.ts +249 -0
- package/src/domain/agentexecution/filereview/cas-blob.ts +52 -0
- package/src/domain/agentexecution/filereview/digest.ts +58 -0
- package/src/domain/agentexecution/filereview/gate.ts +68 -0
- package/src/domain/agentexecution/filereview/progress.ts +51 -0
- package/src/domain/agentexecution/filereview/project.ts +171 -0
- package/src/domain/agentexecution/lifecycle.ts +884 -0
- package/src/domain/agentexecution/phases.ts +39 -0
- package/src/domain/agentexecution/record-runner-lineage-labels.ts +76 -0
- package/src/domain/agentexecution/search-extractor.ts +70 -0
- package/src/domain/agentexecution/status-observers.ts +108 -0
- package/src/domain/agentexecution/steps.ts +218 -0
- package/src/domain/agentexecution/stream-broker.ts +126 -0
- package/src/domain/agentexecution/submit-approval.ts +584 -0
- package/src/domain/agentexecution/submit-file-decision.ts +477 -0
- package/src/domain/agentexecution/subscribe.ts +165 -0
- package/src/domain/agentexecution/temporal/config.ts +119 -0
- package/src/domain/agentexecution/tool-call-settle.ts +75 -0
- package/src/domain/agentexecution/update-status.ts +534 -0
- package/src/domain/agentexecution/usage.ts +987 -0
- package/src/domain/agentexecution/validate-service-tier.ts +76 -0
- package/src/domain/agentexecution/validate-thinking-mode.ts +90 -0
- package/src/domain/agentinstance/__tests__/agentinstance.test.ts +344 -0
- package/src/domain/agentinstance/controller.ts +629 -0
- package/src/domain/agentinstance/defaultinstance.ts +87 -0
- package/src/domain/agentinstance/search-extractor.ts +61 -0
- package/src/domain/agentinstance/steps.ts +377 -0
- package/src/domain/agentshare/__tests__/agentshare.test.ts +897 -0
- package/src/domain/agentshare/constants.ts +72 -0
- package/src/domain/agentshare/controller.ts +927 -0
- package/src/domain/agentshare/steps.ts +459 -0
- package/src/domain/apikey/__tests__/apikey.test.ts +253 -0
- package/src/domain/apikey/__tests__/verifier.test.ts +180 -0
- package/src/domain/apikey/controller.ts +330 -0
- package/src/domain/apikey/keymaterial.ts +65 -0
- package/src/domain/apikey/lookup.ts +46 -0
- package/src/domain/apikey/steps.ts +159 -0
- package/src/domain/apikey/verifier.ts +76 -0
- package/src/domain/artifact/__tests__/artifact.test.ts +410 -0
- package/src/domain/artifact/__tests__/file-server-host.test.ts +59 -0
- package/src/domain/artifact/constants.ts +47 -0
- package/src/domain/artifact/controller.ts +685 -0
- package/src/domain/artifact/file-server.ts +213 -0
- package/src/domain/channelapp/__tests__/channelapp.test.ts +684 -0
- package/src/domain/channelapp/constants.ts +66 -0
- package/src/domain/channelapp/controller.ts +474 -0
- package/src/domain/channelapp/steps.ts +409 -0
- package/src/domain/environment/__tests__/environment.test.ts +672 -0
- package/src/domain/environment/constants.ts +67 -0
- package/src/domain/environment/controller.ts +836 -0
- package/src/domain/environment/redact.ts +75 -0
- package/src/domain/environment/resolution/__tests__/resolution.test.ts +209 -0
- package/src/domain/environment/resolution/resolution.ts +155 -0
- package/src/domain/environment/search-extractor.ts +63 -0
- package/src/domain/environment/steps.ts +621 -0
- package/src/domain/executioncontext/__tests__/executioncontext.test.ts +790 -0
- package/src/domain/executioncontext/__tests__/resolve-values-capability.test.ts +130 -0
- package/src/domain/executioncontext/constants.ts +51 -0
- package/src/domain/executioncontext/controller.ts +414 -0
- package/src/domain/executioncontext/redact.ts +42 -0
- package/src/domain/executioncontext/resolve-values-for-caller.ts +236 -0
- package/src/domain/executioncontext/search-extractor.ts +61 -0
- package/src/domain/executioncontext/steps.ts +283 -0
- package/src/domain/executioncontext/temporal/delete-execution-context.ts +96 -0
- package/src/domain/github/__tests__/github.test.ts +196 -0
- package/src/domain/github/controller.ts +203 -0
- package/src/domain/mcpserver/__tests__/connect-authorization.test.ts +261 -0
- package/src/domain/mcpserver/__tests__/connect.test.ts +629 -0
- package/src/domain/mcpserver/__tests__/mcpserver.test.ts +446 -0
- package/src/domain/mcpserver/__tests__/oauth-handshake.test.ts +635 -0
- package/src/domain/mcpserver/__tests__/seal-unseal.test.ts +110 -0
- package/src/domain/mcpserver/complete-oauth-connect.ts +338 -0
- package/src/domain/mcpserver/connect-status.ts +302 -0
- package/src/domain/mcpserver/connect.ts +1208 -0
- package/src/domain/mcpserver/controller.ts +609 -0
- package/src/domain/mcpserver/disconnect-oauth.ts +106 -0
- package/src/domain/mcpserver/enabledtools/__tests__/enabledtools.test.ts +75 -0
- package/src/domain/mcpserver/enabledtools/enabledtools.ts +93 -0
- package/src/domain/mcpserver/engine.ts +176 -0
- package/src/domain/mcpserver/get-oauth-grant-status.ts +105 -0
- package/src/domain/mcpserver/initiate-oauth-connect.ts +487 -0
- package/src/domain/mcpserver/oauth/__tests__/dcr.test.ts +90 -0
- package/src/domain/mcpserver/oauth/__tests__/discovery.test.ts +150 -0
- package/src/domain/mcpserver/oauth/__tests__/pkce.test.ts +34 -0
- package/src/domain/mcpserver/oauth/__tests__/preflight.test.ts +75 -0
- package/src/domain/mcpserver/oauth/__tests__/token-exchange.test.ts +167 -0
- package/src/domain/mcpserver/oauth/__tests__/token-refresh.test.ts +345 -0
- package/src/domain/mcpserver/oauth/dcr.ts +92 -0
- package/src/domain/mcpserver/oauth/discovery.ts +142 -0
- package/src/domain/mcpserver/oauth/managed-env.ts +175 -0
- package/src/domain/mcpserver/oauth/pkce.ts +28 -0
- package/src/domain/mcpserver/oauth/preflight.ts +107 -0
- package/src/domain/mcpserver/oauth/refresh.ts +118 -0
- package/src/domain/mcpserver/oauth/token.ts +187 -0
- package/src/domain/mcpserver/oauth/truncate-body.ts +11 -0
- package/src/domain/mcpserver/search-extractor.ts +63 -0
- package/src/domain/mcpserver/start-connect.ts +309 -0
- package/src/domain/mcpserver/steps.ts +185 -0
- package/src/domain/memory/__tests__/capture-credential.test.ts +84 -0
- package/src/domain/memory/__tests__/memory.test.ts +483 -0
- package/src/domain/memory/constants.ts +60 -0
- package/src/domain/memory/controller.ts +495 -0
- package/src/domain/memory/steps.ts +588 -0
- package/src/domain/oauthapp/__tests__/oauthapp.test.ts +487 -0
- package/src/domain/oauthapp/__tests__/refresolution.test.ts +86 -0
- package/src/domain/oauthapp/constants.ts +46 -0
- package/src/domain/oauthapp/controller.ts +469 -0
- package/src/domain/oauthapp/refresolution/refresolution.ts +94 -0
- package/src/domain/oauthapp/refresolution.ts +98 -0
- package/src/domain/oauthapp/steps.ts +249 -0
- package/src/domain/organization/__tests__/organization.test.ts +194 -0
- package/src/domain/organization/controller.ts +588 -0
- package/src/domain/organization/search-extractor.ts +61 -0
- package/src/domain/organization/steps.ts +100 -0
- package/src/domain/platform/__tests__/platform.test.ts +377 -0
- package/src/domain/platform/controller.ts +283 -0
- package/src/domain/platform/version.ts +21 -0
- package/src/domain/project/__tests__/project.composed.test.ts +381 -0
- package/src/domain/project/__tests__/reconcile.test.ts +401 -0
- package/src/domain/project/controller.ts +387 -0
- package/src/domain/project/reconcile.ts +291 -0
- package/src/domain/project/search-extractor.ts +71 -0
- package/src/domain/schedule/__tests__/cron.test.ts +166 -0
- package/src/domain/schedule/__tests__/schedule.composed.test.ts +525 -0
- package/src/domain/schedule/clock.ts +192 -0
- package/src/domain/schedule/controller.ts +753 -0
- package/src/domain/schedule/cron.ts +150 -0
- package/src/domain/schedule/list-runs.ts +245 -0
- package/src/domain/schedule/persist-update.ts +76 -0
- package/src/domain/schedule/resume.ts +122 -0
- package/src/domain/schedule/steps.ts +281 -0
- package/src/domain/schedule/trigger.ts +283 -0
- package/src/domain/session/__tests__/session.test.ts +782 -0
- package/src/domain/session/controller.ts +586 -0
- package/src/domain/session/search-extractor.ts +61 -0
- package/src/domain/session/steps.ts +872 -0
- package/src/domain/skill/__tests__/artifact-storage.test.ts +82 -0
- package/src/domain/skill/__tests__/frontmatter.test.ts +124 -0
- package/src/domain/skill/__tests__/prefilter.test.ts +163 -0
- package/src/domain/skill/__tests__/push-degradation.test.ts +171 -0
- package/src/domain/skill/__tests__/skill.test.ts +600 -0
- package/src/domain/skill/__tests__/slots.test.ts +132 -0
- package/src/domain/skill/__tests__/zip-gate.test.ts +194 -0
- package/src/domain/skill/constants.ts +77 -0
- package/src/domain/skill/controller.ts +848 -0
- package/src/domain/skill/push.ts +617 -0
- package/src/domain/skill/search-extractor.ts +61 -0
- package/src/domain/skill/storage/artifact-storage.ts +139 -0
- package/src/domain/skill/storage/frontmatter.ts +181 -0
- package/src/domain/skill/storage/prefilter.ts +200 -0
- package/src/domain/skill/storage/zip-gate.ts +244 -0
- package/src/domain/skill/transfer/handler.ts +185 -0
- package/src/domain/skill/transfer/slots.ts +253 -0
- package/src/domain/skill/version-resolution.ts +336 -0
- package/src/domain/workflow/__tests__/workflow.test.ts +410 -0
- package/src/domain/workflow/controller.ts +1244 -0
- package/src/domain/workflow/converter/__tests__/converter.test.ts +924 -0
- package/src/domain/workflow/converter/converter.ts +149 -0
- package/src/domain/workflow/converter/task-converters.ts +750 -0
- package/src/domain/workflow/converter/types.ts +15 -0
- package/src/domain/workflow/converter/unmarshal.ts +200 -0
- package/src/domain/workflow/registry/__tests__/document-catalog.test.ts +116 -0
- package/src/domain/workflow/registry/__tests__/model-registry-store.test.ts +274 -0
- package/src/domain/workflow/registry/__tests__/pin-validation.test.ts +105 -0
- package/src/domain/workflow/registry/bundled.ts +22 -0
- package/src/domain/workflow/registry/data/model-registry.json +1236 -0
- package/src/domain/workflow/registry/data/task-kind-registry.json +3177 -0
- package/src/domain/workflow/registry/document-catalog.ts +355 -0
- package/src/domain/workflow/registry/model-catalog-provider.ts +134 -0
- package/src/domain/workflow/registry/model-registry-store.ts +298 -0
- package/src/domain/workflow/registry/pin-validation.ts +175 -0
- package/src/domain/workflow/search-extractor.ts +63 -0
- package/src/domain/workflow/steps.ts +711 -0
- package/src/domain/workflow/validation/__tests__/budget-warnings.test.ts +143 -0
- package/src/domain/workflow/validation/__tests__/crossref.test.ts +181 -0
- package/src/domain/workflow/validation/__tests__/expression-warnings.test.ts +81 -0
- package/src/domain/workflow/validation/__tests__/human-input-validation.test.ts +61 -0
- package/src/domain/workflow/validation/__tests__/model-validation.test.ts +232 -0
- package/src/domain/workflow/validation/__tests__/task-config-constraints.test.ts +149 -0
- package/src/domain/workflow/validation/__tests__/validator.test.ts +138 -0
- package/src/domain/workflow/validation/budget-warnings.ts +162 -0
- package/src/domain/workflow/validation/crossref.ts +410 -0
- package/src/domain/workflow/validation/expression-warnings.ts +103 -0
- package/src/domain/workflow/validation/format-violation.ts +61 -0
- package/src/domain/workflow/validation/human-input-validation.ts +93 -0
- package/src/domain/workflow/validation/model-validation.ts +262 -0
- package/src/domain/workflow/validation/task-config-constraints.ts +150 -0
- package/src/domain/workflow/validation/validator.ts +142 -0
- package/src/domain/workflowexecution/__tests__/create-steps.test.ts +385 -0
- package/src/domain/workflowexecution/__tests__/engine-stub.ts +64 -0
- package/src/domain/workflowexecution/__tests__/execution-filter.test.ts +390 -0
- package/src/domain/workflowexecution/__tests__/lifecycle.test.ts +617 -0
- package/src/domain/workflowexecution/__tests__/list-read-scope-summaries.test.ts +193 -0
- package/src/domain/workflowexecution/__tests__/read-authorization.test.ts +166 -0
- package/src/domain/workflowexecution/__tests__/send-signal.test.ts +327 -0
- package/src/domain/workflowexecution/__tests__/stream-broker.test.ts +100 -0
- package/src/domain/workflowexecution/__tests__/subscribe.test.ts +204 -0
- package/src/domain/workflowexecution/__tests__/update-status.test.ts +576 -0
- package/src/domain/workflowexecution/__tests__/workflowexecution.test.ts +1407 -0
- package/src/domain/workflowexecution/constants.ts +102 -0
- package/src/domain/workflowexecution/controller.ts +564 -0
- package/src/domain/workflowexecution/create-execution-context-step.ts +233 -0
- package/src/domain/workflowexecution/create-steps.ts +380 -0
- package/src/domain/workflowexecution/engine.ts +170 -0
- package/src/domain/workflowexecution/execution-filter.ts +255 -0
- package/src/domain/workflowexecution/get-event-log.ts +139 -0
- package/src/domain/workflowexecution/get-execution-summary.ts +318 -0
- package/src/domain/workflowexecution/lifecycle.ts +951 -0
- package/src/domain/workflowexecution/list-pending-approvals.ts +120 -0
- package/src/domain/workflowexecution/normalize-workflow-ref-step.ts +79 -0
- package/src/domain/workflowexecution/pin-workflow-version-step.ts +114 -0
- package/src/domain/workflowexecution/queries.ts +48 -0
- package/src/domain/workflowexecution/search-extractor.ts +63 -0
- package/src/domain/workflowexecution/send-signal.ts +306 -0
- package/src/domain/workflowexecution/stream-broker.ts +133 -0
- package/src/domain/workflowexecution/submit-approval.ts +201 -0
- package/src/domain/workflowexecution/submit-file-decision.ts +194 -0
- package/src/domain/workflowexecution/submit-workflow-task-approval.ts +219 -0
- package/src/domain/workflowexecution/subscribe-events.ts +218 -0
- package/src/domain/workflowexecution/subscribe.ts +172 -0
- package/src/domain/workflowexecution/temporal/config.ts +129 -0
- package/src/domain/workflowexecution/update-status.ts +396 -0
- package/src/domain/workflowinstance/controller.ts +829 -0
- package/src/domain/workflowinstance/defaultinstance.ts +71 -0
- package/src/domain/workflowinstance/search-extractor.ts +62 -0
- package/src/domain/workflowinstance/steps.ts +209 -0
- package/src/encryption/__tests__/codec-seam.test.ts +363 -0
- package/src/encryption/__tests__/encryption.test.ts +237 -0
- package/src/encryption/__tests__/fixtures/go-ciphertext.json +40 -0
- package/src/encryption/__tests__/key-manager.test.ts +127 -0
- package/src/encryption/codec.ts +113 -0
- package/src/encryption/encryption.ts +525 -0
- package/src/encryption/errors.ts +86 -0
- package/src/encryption/key-manager.ts +156 -0
- package/src/encryption/scope.ts +152 -0
- package/src/encryption/v1-codec.ts +143 -0
- package/src/envmerge/__tests__/envmerge.test.ts +350 -0
- package/src/envmerge/envmerge.ts +115 -0
- package/src/extensions/__tests__/direct-handler-authorization.test.ts +308 -0
- package/src/extensions/__tests__/extension-composition.test.ts +1124 -0
- package/src/extensions/__tests__/list-read-scope-composed.test.ts +276 -0
- package/src/extensions/__tests__/list-read-scope.test.ts +151 -0
- package/src/extensions/__tests__/registry.test.ts +669 -0
- package/src/extensions/__tests__/secret-cleanup-composed.test.ts +356 -0
- package/src/extensions/authorizer.ts +64 -0
- package/src/extensions/caller-guards.ts +61 -0
- package/src/extensions/drivers.ts +146 -0
- package/src/extensions/gate-slots.ts +95 -0
- package/src/extensions/identity.ts +99 -0
- package/src/extensions/list-read-scope.ts +143 -0
- package/src/extensions/organization-directory.ts +54 -0
- package/src/extensions/registry.ts +544 -0
- package/src/extensions/resource-authorization.ts +145 -0
- package/src/extensions/schedule-fire-caller.ts +33 -0
- package/src/extensions/status-hooks.ts +55 -0
- package/src/gocompat/__tests__/query-escape.test.ts +35 -0
- package/src/gocompat/__tests__/trim.test.ts +46 -0
- package/src/gocompat/query-escape.ts +41 -0
- package/src/gocompat/trim.ts +38 -0
- package/src/identity/__tests__/oidc-verifier.test.ts +205 -0
- package/src/identity/oidc-verifier.ts +172 -0
- package/src/index.ts +351 -0
- package/src/main.ts +67 -0
- package/src/observability/__tests__/in-memory-meter.ts +101 -0
- package/src/observability/rpc-metrics.ts +203 -0
- package/src/pipeline/__tests__/apiresource-labels.test.ts +67 -0
- package/src/pipeline/__tests__/chain.test.ts +199 -0
- package/src/pipeline/__tests__/pipeline.test.ts +141 -0
- package/src/pipeline/__tests__/router-transport.test.ts +172 -0
- package/src/pipeline/__tests__/steps.test.ts +621 -0
- package/src/pipeline/__tests__/support.ts +20 -0
- package/src/pipeline/apiresource-labels.ts +60 -0
- package/src/pipeline/apiresource-meta.ts +136 -0
- package/src/pipeline/chain.ts +63 -0
- package/src/pipeline/errors.ts +146 -0
- package/src/pipeline/interceptors/__tests__/auth.test.ts +649 -0
- package/src/pipeline/interceptors/__tests__/error-boundary.test.ts +358 -0
- package/src/pipeline/interceptors/__tests__/request-metrics.test.ts +573 -0
- package/src/pipeline/interceptors/apiresource.ts +43 -0
- package/src/pipeline/interceptors/auth.ts +431 -0
- package/src/pipeline/interceptors/error-boundary.ts +246 -0
- package/src/pipeline/interceptors/logging.ts +71 -0
- package/src/pipeline/interceptors/protovalidate.ts +68 -0
- package/src/pipeline/interceptors/request-metrics.ts +114 -0
- package/src/pipeline/pipeline.ts +111 -0
- package/src/pipeline/request-context.ts +92 -0
- package/src/pipeline/steps/__tests__/authorization-tuples.test.ts +318 -0
- package/src/pipeline/steps/__tests__/authorize.test.ts +500 -0
- package/src/pipeline/steps/__tests__/guard-memory-capture.test.ts +222 -0
- package/src/pipeline/steps/__tests__/guard-reserved-labels.test.ts +190 -0
- package/src/pipeline/steps/__tests__/secret-cleanup.test.ts +237 -0
- package/src/pipeline/steps/__tests__/server-stamped-reserved-labels.test.ts +56 -0
- package/src/pipeline/steps/__tests__/visibility-gates.test.ts +187 -0
- package/src/pipeline/steps/authorization-tuples.ts +467 -0
- package/src/pipeline/steps/authorize.ts +302 -0
- package/src/pipeline/steps/build-update-state.ts +148 -0
- package/src/pipeline/steps/defaults.ts +355 -0
- package/src/pipeline/steps/delete.ts +98 -0
- package/src/pipeline/steps/duplicate.ts +55 -0
- package/src/pipeline/steps/guard-memory-capture.ts +154 -0
- package/src/pipeline/steps/guard-reserved-labels.ts +171 -0
- package/src/pipeline/steps/helpers.ts +154 -0
- package/src/pipeline/steps/index-search.ts +90 -0
- package/src/pipeline/steps/load-by-reference.ts +56 -0
- package/src/pipeline/steps/load-existing.ts +73 -0
- package/src/pipeline/steps/load-for-apply.ts +82 -0
- package/src/pipeline/steps/load-target.ts +56 -0
- package/src/pipeline/steps/persist.ts +41 -0
- package/src/pipeline/steps/references.ts +172 -0
- package/src/pipeline/steps/secret-cleanup.ts +109 -0
- package/src/pipeline/steps/server-stamped-reserved-labels.ts +56 -0
- package/src/pipeline/steps/shapes.ts +102 -0
- package/src/pipeline/steps/slug.ts +48 -0
- package/src/pipeline/steps/validate-visibility.ts +93 -0
- package/src/pipeline/steps/validation.ts +45 -0
- package/src/pipeline/steps/visibility-gates.ts +171 -0
- package/src/query/README.md +16 -0
- package/src/query/__tests__/query-services.test.ts +211 -0
- package/src/query/activity/__tests__/handler.test.ts +333 -0
- package/src/query/activity/controller.ts +53 -0
- package/src/query/activity/handler.ts +341 -0
- package/src/query/search/__tests__/controller.test.ts +147 -0
- package/src/query/search/__tests__/criteria.test.ts +185 -0
- package/src/query/search/__tests__/paged-result.test.ts +60 -0
- package/src/query/search/__tests__/query-store.test.ts +478 -0
- package/src/query/search/__tests__/registry.test.ts +103 -0
- package/src/query/search/controller.ts +93 -0
- package/src/query/search/criteria.ts +204 -0
- package/src/query/search/extractor.ts +93 -0
- package/src/query/search/handler.ts +125 -0
- package/src/query/search/paged-result.ts +54 -0
- package/src/query/search/query-store.ts +254 -0
- package/src/query/search/registry.ts +121 -0
- package/src/runnerauth/__tests__/runner-credential-provider.test.ts +86 -0
- package/src/runnerauth/__tests__/runnerauth.test.ts +186 -0
- package/src/runnerauth/runner-credential-provider.ts +328 -0
- package/src/runnerauth/runnerauth.ts +251 -0
- package/src/sandbox/__tests__/docker.integration.test.ts +103 -0
- package/src/sandbox/__tests__/kubernetes.test.ts +228 -0
- package/src/sandbox/__tests__/local-process.integration.test.ts +124 -0
- package/src/sandbox/__tests__/provisioner.test.ts +145 -0
- package/src/sandbox/__tests__/steps.test.ts +648 -0
- package/src/sandbox/builtins.ts +22 -0
- package/src/sandbox/docker.ts +206 -0
- package/src/sandbox/kubernetes.ts +478 -0
- package/src/sandbox/lane.ts +89 -0
- package/src/sandbox/local-process.ts +188 -0
- package/src/sandbox/naming.ts +38 -0
- package/src/sandbox/provisioner.ts +175 -0
- package/src/sandbox/steps.ts +395 -0
- package/src/store/README.md +40 -0
- package/src/store/__tests__/proto-fields.test.ts +84 -0
- package/src/store/__tests__/store-contract.ts +1587 -0
- package/src/store/__tests__/support.ts +33 -0
- package/src/store/interface.ts +835 -0
- package/src/store/logger.ts +13 -0
- package/src/store/postgres/__tests__/migrations.test.ts +175 -0
- package/src/store/postgres/__tests__/store-contract.test.ts +129 -0
- package/src/store/postgres/__tests__/support.ts +67 -0
- package/src/store/postgres/__tests__/tsquery.test.ts +76 -0
- package/src/store/postgres/migrations.ts +298 -0
- package/src/store/postgres/store.ts +1396 -0
- package/src/store/postgres/tsquery.ts +80 -0
- package/src/store/proto-fields.ts +212 -0
- package/src/store/rfc3339.ts +12 -0
- package/src/store/sqlite/__tests__/fixtures/go-v6-database.sql +150 -0
- package/src/store/sqlite/__tests__/fts5.test.ts +83 -0
- package/src/store/sqlite/__tests__/migrations.test.ts +308 -0
- package/src/store/sqlite/__tests__/store-contract.test.ts +41 -0
- package/src/store/sqlite/__tests__/store.test.ts +105 -0
- package/src/store/sqlite/__tests__/support.ts +62 -0
- package/src/store/sqlite/fts5.ts +70 -0
- package/src/store/sqlite/migrations.ts +359 -0
- package/src/store/sqlite/store.ts +1401 -0
- package/src/temporal/README.md +17 -0
- package/src/temporal/__tests__/manager.test.ts +325 -0
- package/src/temporal/__tests__/payload-codec.test.ts +178 -0
- package/src/temporal/__tests__/runner-failure.test.ts +66 -0
- package/src/temporal/agentexecution/__tests__/activities.test.ts +352 -0
- package/src/temporal/agentexecution/__tests__/dispatch.test.ts +336 -0
- package/src/temporal/agentexecution/__tests__/engine-client.test.ts +320 -0
- package/src/temporal/agentexecution/__tests__/invoke-workflow.test.ts +845 -0
- package/src/temporal/agentexecution/__tests__/own-behalf-status-writes.test.ts +305 -0
- package/src/temporal/agentexecution/__tests__/replay-histories/happy-completed.json +568 -0
- package/src/temporal/agentexecution/__tests__/replay-histories/hitl-approval-parented.json +1070 -0
- package/src/temporal/agentexecution/__tests__/replay-histories/hitl-approval.json +864 -0
- package/src/temporal/agentexecution/__tests__/replay-histories/pause-resume.json +915 -0
- package/src/temporal/agentexecution/__tests__/replay.test.ts +64 -0
- package/src/temporal/agentexecution/activities.ts +252 -0
- package/src/temporal/agentexecution/dispatch.ts +148 -0
- package/src/temporal/agentexecution/engine-client.ts +230 -0
- package/src/temporal/agentexecution/names.ts +104 -0
- package/src/temporal/agentexecution/runner-result.ts +58 -0
- package/src/temporal/agentexecution/worker.ts +85 -0
- package/src/temporal/agentexecution/workflow-input.ts +40 -0
- package/src/temporal/agentexecution/workflows/index.ts +15 -0
- package/src/temporal/agentexecution/workflows/invoke-agent-execution.ts +1495 -0
- package/src/temporal/manager.ts +593 -0
- package/src/temporal/mcpserver/engine-client.ts +273 -0
- package/src/temporal/mcpserver/names.ts +23 -0
- package/src/temporal/payload-codec.ts +92 -0
- package/src/temporal/runner-failure.ts +71 -0
- package/src/temporal/schedule/__tests__/activities.test.ts +301 -0
- package/src/temporal/schedule/__tests__/artifact.test.ts +144 -0
- package/src/temporal/schedule/__tests__/config.test.ts +137 -0
- package/src/temporal/schedule/__tests__/reconciler.test.ts +345 -0
- package/src/temporal/schedule/__tests__/replay-histories/tick-completed-run.json +726 -0
- package/src/temporal/schedule/__tests__/replay-histories/tick-skipped-disabled.json +280 -0
- package/src/temporal/schedule/__tests__/replay-histories/tick-start-failed.json +592 -0
- package/src/temporal/schedule/__tests__/replay.test.ts +55 -0
- package/src/temporal/schedule/__tests__/run-starter.test.ts +482 -0
- package/src/temporal/schedule/__tests__/syncer.test.ts +195 -0
- package/src/temporal/schedule/__tests__/tick-workflow.test.ts +368 -0
- package/src/temporal/schedule/activities.ts +544 -0
- package/src/temporal/schedule/artifact.ts +137 -0
- package/src/temporal/schedule/config.ts +186 -0
- package/src/temporal/schedule/model-pinning.ts +47 -0
- package/src/temporal/schedule/names.ts +168 -0
- package/src/temporal/schedule/reconciler.ts +332 -0
- package/src/temporal/schedule/run-ledger.ts +233 -0
- package/src/temporal/schedule/run-starter.ts +560 -0
- package/src/temporal/schedule/status-writes.ts +50 -0
- package/src/temporal/schedule/syncer.ts +208 -0
- package/src/temporal/schedule/worker.ts +81 -0
- package/src/temporal/schedule/workflows/index.ts +11 -0
- package/src/temporal/schedule/workflows/tick.ts +394 -0
- package/src/temporal/workflow-source.ts +72 -0
- package/src/temporal/workflowexecution/__tests__/activities.test.ts +262 -0
- package/src/temporal/workflowexecution/__tests__/dispatch.test.ts +98 -0
- package/src/temporal/workflowexecution/__tests__/engine-client.test.ts +268 -0
- package/src/temporal/workflowexecution/__tests__/invoke-workflow.test.ts +354 -0
- package/src/temporal/workflowexecution/__tests__/replay-histories/child-failed.json +678 -0
- package/src/temporal/workflowexecution/__tests__/replay-histories/happy-completed.json +504 -0
- package/src/temporal/workflowexecution/__tests__/replay-histories/pause-resume.json +1116 -0
- package/src/temporal/workflowexecution/__tests__/replay.test.ts +57 -0
- package/src/temporal/workflowexecution/__tests__/test-workflows.ts +90 -0
- package/src/temporal/workflowexecution/activities.ts +209 -0
- package/src/temporal/workflowexecution/dispatch.ts +70 -0
- package/src/temporal/workflowexecution/engine-client.ts +242 -0
- package/src/temporal/workflowexecution/names.ts +84 -0
- package/src/temporal/workflowexecution/worker.ts +85 -0
- package/src/temporal/workflowexecution/workflow-input.ts +42 -0
- package/src/temporal/workflowexecution/workflows/index.ts +15 -0
- package/src/temporal/workflowexecution/workflows/invoke-workflow-execution.ts +574 -0
- package/src/transport/__tests__/demux.test.ts +213 -0
- package/src/transport/__tests__/server.test.ts +146 -0
- package/src/transport/console/__tests__/handler.test.ts +281 -0
- package/src/transport/console/__tests__/nginx-equivalence.test.ts +144 -0
- package/src/transport/console/__tests__/resolver.test.ts +181 -0
- package/src/transport/console/assets.ts +80 -0
- package/src/transport/console/handler.ts +309 -0
- package/src/transport/console/resolver.ts +199 -0
- package/src/transport/constants.ts +47 -0
- package/src/transport/cors.ts +119 -0
- package/src/transport/demux.ts +190 -0
- package/src/transport/health.ts +127 -0
- package/src/transport/lanes.ts +17 -0
- package/src/transport/registry/__tests__/lanes.test.ts +131 -0
- package/src/transport/registry/lanes.ts +65 -0
- package/src/transport/server.ts +238 -0
|
@@ -0,0 +1,1495 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent-execution orchestrator workflow — ports
|
|
3
|
+
* pkg/domain/agentexecution/temporal/workflows/invoke_workflow_impl.go
|
|
4
|
+
* (registered as "stigmer/agent-execution/invoke"; proven by the
|
|
5
|
+
* agentexecution execution suites on local-execution and the
|
|
6
|
+
* co-located TestWorkflowEnvironment tests).
|
|
7
|
+
*
|
|
8
|
+
* Orchestration only — the TS unified runner owns the agent activities
|
|
9
|
+
* (EnsureThread/ExecuteDeepAgent/ExecuteCursor) on the memo-pinned
|
|
10
|
+
* activity queue; this workflow's own activities run on the stigmer
|
|
11
|
+
* queue or in-process (local activities).
|
|
12
|
+
*
|
|
13
|
+
* Shape preserved exactly from Go:
|
|
14
|
+
* - Harness dispatch: NATIVE/UNSPECIFIED → deep-agent flow
|
|
15
|
+
* (EnsureThread once, thread stable across re-invocations), CURSOR →
|
|
16
|
+
* cursor flow (harness_state_id re-read before every re-invocation).
|
|
17
|
+
* - Pause/resume: each attempt runs in a cancellable scope with a
|
|
18
|
+
* monitor that consumes ONE pause signal and cancels the scope; a
|
|
19
|
+
* pause queued while no attempt is running pauses the next attempt
|
|
20
|
+
* immediately (Go's buffered signal channel semantics).
|
|
21
|
+
* - HITL loop: while the runner reports WAITING_FOR_APPROVAL, persist
|
|
22
|
+
* the phase, re-read the unified gate from the DB, and either wait
|
|
23
|
+
* for approvalGateResolved, re-invoke immediately (decided-awaiting-
|
|
24
|
+
* reconcile, DD-28 auto-keep race), or fail fast after
|
|
25
|
+
* MAX_ZERO_GATE_CYCLES empty-gate cycles.
|
|
26
|
+
* - Bounded auto-recovery: heartbeat-timeout / infra-cancellation /
|
|
27
|
+
* worker-shutdown (#776) interruptions re-invoke from persisted
|
|
28
|
+
* checkpoint state with linear backoff, IN_PROGRESS persisted so the
|
|
29
|
+
* UI never flashes FAILED.
|
|
30
|
+
* - Cancellation cleanup on a non-cancellable scope (Go's disconnected
|
|
31
|
+
* context): CANCELLED persist (quiet terminal, NO status.error —
|
|
32
|
+
* stigmer#282), callback completion with "execution cancelled", EC
|
|
33
|
+
* delete.
|
|
34
|
+
* - Recovery is terminate-and-start-fresh ONLY (stigmer#200); no
|
|
35
|
+
* version gates (OD-6 — no Go-era history can replay here).
|
|
36
|
+
*
|
|
37
|
+
* Payload-boundary rule (sub-project 20260824.03 design rule): proto
|
|
38
|
+
* Message instances never cross activity payloads — statuses travel as
|
|
39
|
+
* proto-JSON (toJson/fromJson), int64 fields are converted explicitly
|
|
40
|
+
* where the callback contract requires JSON numbers.
|
|
41
|
+
*
|
|
42
|
+
* WORKFLOW-BUNDLE IMPORT DISCIPLINE: this file runs in Temporal's
|
|
43
|
+
* deterministic sandbox. Only @temporalio/workflow, @temporalio/common,
|
|
44
|
+
* @bufbuild/protobuf, generated protos, and verified-pure domain modules
|
|
45
|
+
* (filereview/gate.js by DIRECT path — its sibling digest.ts pulls
|
|
46
|
+
* node:crypto) may be imported. The SDK bundler hard-fails otherwise.
|
|
47
|
+
*/
|
|
48
|
+
import { create, fromJson, toJson } from "@bufbuild/protobuf";
|
|
49
|
+
import type { JsonValue } from "@bufbuild/protobuf";
|
|
50
|
+
import {
|
|
51
|
+
ApplicationFailure,
|
|
52
|
+
CancelledFailure,
|
|
53
|
+
TimeoutFailure,
|
|
54
|
+
TimeoutType,
|
|
55
|
+
} from "@temporalio/common";
|
|
56
|
+
import {
|
|
57
|
+
CancellationScope,
|
|
58
|
+
condition,
|
|
59
|
+
defineSignal,
|
|
60
|
+
getExternalWorkflowHandle,
|
|
61
|
+
isCancellation,
|
|
62
|
+
log,
|
|
63
|
+
proxyActivities,
|
|
64
|
+
proxyLocalActivities,
|
|
65
|
+
setHandler,
|
|
66
|
+
sleep,
|
|
67
|
+
workflowInfo,
|
|
68
|
+
} from "@temporalio/workflow";
|
|
69
|
+
|
|
70
|
+
import type { AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
71
|
+
import {
|
|
72
|
+
AgentExecutionSchema,
|
|
73
|
+
AgentExecutionStatusSchema,
|
|
74
|
+
} from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
75
|
+
import type { AgentExecutionStatus } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
76
|
+
import {
|
|
77
|
+
ExecutionPhase,
|
|
78
|
+
MessageType,
|
|
79
|
+
} from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
80
|
+
import { Harness } from "@stigmer/protos/ai/stigmer/agentic/session/v1/enum_pb";
|
|
81
|
+
|
|
82
|
+
import {
|
|
83
|
+
hasDecidedAwaitingReconcile,
|
|
84
|
+
unresolvedGateCount,
|
|
85
|
+
} from "../../../domain/agentexecution/filereview/gate.js";
|
|
86
|
+
import {
|
|
87
|
+
isWorkerShutdown,
|
|
88
|
+
WORKER_SHUTDOWN_STATUS_ERROR,
|
|
89
|
+
} from "../../runner-failure.js";
|
|
90
|
+
import {
|
|
91
|
+
COMPLETE_EXTERNAL_ACTIVITY_NAME,
|
|
92
|
+
DEFAULT_ACTIVITY_TASK_QUEUE,
|
|
93
|
+
ENSURE_THREAD_ACTIVITY_NAME,
|
|
94
|
+
EXECUTE_CURSOR_ACTIVITY_NAME,
|
|
95
|
+
EXECUTE_DEEP_AGENT_ACTIVITY_NAME,
|
|
96
|
+
GENERATE_SESSION_SUBJECT_ACTIVITY_NAME,
|
|
97
|
+
LOAD_AGENT_EXECUTION_ACTIVITY_NAME,
|
|
98
|
+
MEMO_ACTIVITY_TASK_QUEUE,
|
|
99
|
+
READ_HARNESS_STATE_ID_ACTIVITY_NAME,
|
|
100
|
+
SIGNAL_APPROVAL_GATE_RESOLVED,
|
|
101
|
+
SIGNAL_CHILD_APPROVAL_REQUIRED,
|
|
102
|
+
SIGNAL_CHILD_EXECUTION_STARTED,
|
|
103
|
+
SIGNAL_PAUSE,
|
|
104
|
+
SIGNAL_RESUME,
|
|
105
|
+
UPDATE_EXECUTION_STATUS_ACTIVITY_NAME,
|
|
106
|
+
} from "../names.js";
|
|
107
|
+
import {
|
|
108
|
+
getErrorFromResult,
|
|
109
|
+
getPhaseFromResult,
|
|
110
|
+
type RunnerActivityResult,
|
|
111
|
+
} from "../runner-result.js";
|
|
112
|
+
import type { InvokeAgentExecutionWorkflowInput } from "../workflow-input.js";
|
|
113
|
+
import { DELETE_EXECUTION_CONTEXT_ACTIVITY_NAME } from "../../../domain/executioncontext/temporal/delete-execution-context.js";
|
|
114
|
+
|
|
115
|
+
// ─── Loop-safety bounds (invoke_workflow_impl.go, values are contract) ──
|
|
116
|
+
|
|
117
|
+
/** Maximum HITL approval iterations — prevents infinite loops. */
|
|
118
|
+
const MAX_APPROVAL_CYCLES = 100;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Bounds consecutive HITL cycles tolerated with phase=WAITING_FOR_APPROVAL
|
|
122
|
+
* but an EMPTY unified gate and nothing owed a reconcile. Once the
|
|
123
|
+
* runner↔backend finalize contract holds this state is unreachable; if it
|
|
124
|
+
* occurs the workflow fails fast rather than tight-looping the full agent
|
|
125
|
+
* activity to MAX_APPROVAL_CYCLES (the production "RUNNING↔WAITING"
|
|
126
|
+
* churn). The small tolerance absorbs a transient read race between the
|
|
127
|
+
* runner's WAITING persist and this workflow's DB read.
|
|
128
|
+
*/
|
|
129
|
+
const MAX_ZERO_GATE_CYCLES = 3;
|
|
130
|
+
|
|
131
|
+
/** Maximum pause/resume cycles — prevents infinite loops. */
|
|
132
|
+
const MAX_PAUSE_CYCLES = 100;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Bounds auto-resume attempts for interrupted activities (worker died /
|
|
136
|
+
* machine slept / worker shut down mid-run, #776) before surfacing the
|
|
137
|
+
* failure. Mirrors the other caps as a loop-safety bound.
|
|
138
|
+
*/
|
|
139
|
+
const MAX_RECOVERY_CYCLES = 10;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Delay before re-invoking an interrupted activity: a short, capped,
|
|
143
|
+
* LINEAR backoff (n×5s, max 60s) gives a worker time to reappear (e.g.
|
|
144
|
+
* the user reopening the session re-adds it) without hot-looping; the
|
|
145
|
+
* activity's own ScheduleToStart timeout (5m) bounds the wait for that
|
|
146
|
+
* worker.
|
|
147
|
+
*/
|
|
148
|
+
function recoveryBackoffMs(cycle: number): number {
|
|
149
|
+
return Math.min(cycle * 5_000, 60_000);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// ─── Signals (byte-pinned names; see names.ts) ──────────────────────────
|
|
153
|
+
|
|
154
|
+
const pauseSignal = defineSignal<[string?]>(SIGNAL_PAUSE);
|
|
155
|
+
const resumeSignal = defineSignal(SIGNAL_RESUME);
|
|
156
|
+
const approvalGateResolvedSignal = defineSignal(SIGNAL_APPROVAL_GATE_RESOLVED);
|
|
157
|
+
|
|
158
|
+
// ─── Activity proxies (options are contract; see the census table) ──────
|
|
159
|
+
|
|
160
|
+
interface RunnerActivities {
|
|
161
|
+
[ENSURE_THREAD_ACTIVITY_NAME]: (
|
|
162
|
+
sessionId: string,
|
|
163
|
+
agentId: string,
|
|
164
|
+
) => Promise<string>;
|
|
165
|
+
[EXECUTE_DEEP_AGENT_ACTIVITY_NAME]: (input: {
|
|
166
|
+
execution_id: string;
|
|
167
|
+
thread_id: string;
|
|
168
|
+
invoker_identity_account_id: string;
|
|
169
|
+
turn_seq: number;
|
|
170
|
+
}) => Promise<RunnerActivityResult | null>;
|
|
171
|
+
[EXECUTE_CURSOR_ACTIVITY_NAME]: (input: {
|
|
172
|
+
execution_id: string;
|
|
173
|
+
thread_id: string;
|
|
174
|
+
invoker_identity_account_id: string;
|
|
175
|
+
turn_seq: number;
|
|
176
|
+
}) => Promise<RunnerActivityResult | null>;
|
|
177
|
+
[GENERATE_SESSION_SUBJECT_ACTIVITY_NAME]: (
|
|
178
|
+
executionId: string,
|
|
179
|
+
) => Promise<void>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function newEnsureThreadProxy(taskQueue: string) {
|
|
183
|
+
return proxyActivities<Pick<RunnerActivities, typeof ENSURE_THREAD_ACTIVITY_NAME>>({
|
|
184
|
+
taskQueue,
|
|
185
|
+
startToCloseTimeout: "30s",
|
|
186
|
+
scheduleToStartTimeout: "5m",
|
|
187
|
+
retry: {
|
|
188
|
+
maximumAttempts: 3,
|
|
189
|
+
initialInterval: "5s",
|
|
190
|
+
backoffCoefficient: 2.0,
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* The long-running agent turn: 24h StartToClose (a turn can legitimately
|
|
197
|
+
* run for hours), 2m heartbeat (worker-death detection), and
|
|
198
|
+
* MaximumAttempts 1 — ALL retry semantics live in the workflow's own
|
|
199
|
+
* bounded recovery loop, never in Temporal's retry policy (a blind retry
|
|
200
|
+
* would re-run a turn whose side effects already streamed to the user).
|
|
201
|
+
*/
|
|
202
|
+
function newExecuteAgentProxy(taskQueue: string) {
|
|
203
|
+
return proxyActivities<
|
|
204
|
+
Pick<
|
|
205
|
+
RunnerActivities,
|
|
206
|
+
| typeof EXECUTE_DEEP_AGENT_ACTIVITY_NAME
|
|
207
|
+
| typeof EXECUTE_CURSOR_ACTIVITY_NAME
|
|
208
|
+
>
|
|
209
|
+
>({
|
|
210
|
+
taskQueue,
|
|
211
|
+
startToCloseTimeout: "24h",
|
|
212
|
+
scheduleToStartTimeout: "5m",
|
|
213
|
+
heartbeatTimeout: "2m",
|
|
214
|
+
retry: {
|
|
215
|
+
maximumAttempts: 1,
|
|
216
|
+
initialInterval: "10s",
|
|
217
|
+
backoffCoefficient: 2.0,
|
|
218
|
+
},
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** Best-effort, fire-and-forget (issue #665) — never retried. */
|
|
223
|
+
function newSubjectProxy(taskQueue: string) {
|
|
224
|
+
return proxyActivities<
|
|
225
|
+
Pick<RunnerActivities, typeof GENERATE_SESSION_SUBJECT_ACTIVITY_NAME>
|
|
226
|
+
>({
|
|
227
|
+
taskQueue,
|
|
228
|
+
startToCloseTimeout: "60s",
|
|
229
|
+
scheduleToStartTimeout: "30s",
|
|
230
|
+
retry: { maximumAttempts: 1 },
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
interface ServerActivities {
|
|
235
|
+
[UPDATE_EXECUTION_STATUS_ACTIVITY_NAME]: (
|
|
236
|
+
executionId: string,
|
|
237
|
+
statusJson: JsonValue,
|
|
238
|
+
) => Promise<void>;
|
|
239
|
+
[COMPLETE_EXTERNAL_ACTIVITY_NAME]: (input: {
|
|
240
|
+
callbackToken: string;
|
|
241
|
+
result?: unknown;
|
|
242
|
+
errorMessage?: string;
|
|
243
|
+
}) => Promise<void>;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Status persists on the FAILURE and CANCELLATION paths run as REGULAR
|
|
248
|
+
* activities on the workflow's own (stigmer) queue: local activities
|
|
249
|
+
* produce RECORD_MARKER events that trigger a Go-SDK state-machine bug
|
|
250
|
+
* when executed in the same workflow task as a remote-activity failure.
|
|
251
|
+
* The history SHAPE is preserved as contract in this port (ratified
|
|
252
|
+
* brief #2, sub-project 20260824.03) — recovery semantics were tuned
|
|
253
|
+
* against it.
|
|
254
|
+
*/
|
|
255
|
+
const failurePathActivities = proxyActivities<
|
|
256
|
+
Pick<ServerActivities, typeof UPDATE_EXECUTION_STATUS_ACTIVITY_NAME>
|
|
257
|
+
>({
|
|
258
|
+
startToCloseTimeout: "30s",
|
|
259
|
+
retry: { maximumAttempts: 3, initialInterval: "2s" },
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
/** The async activity completion lane (token handshake ADR). */
|
|
263
|
+
const completionActivities = proxyActivities<
|
|
264
|
+
Pick<ServerActivities, typeof COMPLETE_EXTERNAL_ACTIVITY_NAME>
|
|
265
|
+
>({
|
|
266
|
+
startToCloseTimeout: "1m",
|
|
267
|
+
retry: { maximumAttempts: 3, initialInterval: "1s" },
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
interface LocalActivities {
|
|
271
|
+
[UPDATE_EXECUTION_STATUS_ACTIVITY_NAME]: (
|
|
272
|
+
executionId: string,
|
|
273
|
+
statusJson: JsonValue,
|
|
274
|
+
) => Promise<void>;
|
|
275
|
+
[LOAD_AGENT_EXECUTION_ACTIVITY_NAME]: (
|
|
276
|
+
executionId: string,
|
|
277
|
+
) => Promise<JsonValue>;
|
|
278
|
+
[READ_HARNESS_STATE_ID_ACTIVITY_NAME]: (sessionId: string) => Promise<string>;
|
|
279
|
+
[DELETE_EXECUTION_CONTEXT_ACTIVITY_NAME]: (
|
|
280
|
+
executionId: string,
|
|
281
|
+
) => Promise<void>;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const localActivities = proxyLocalActivities<LocalActivities>({
|
|
285
|
+
scheduleToCloseTimeout: "30s",
|
|
286
|
+
retry: { maximumAttempts: 3, initialInterval: "2s" },
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
// ─── The workflow ───────────────────────────────────────────────────────
|
|
290
|
+
|
|
291
|
+
export async function invokeAgentExecution(
|
|
292
|
+
input: InvokeAgentExecutionWorkflowInput,
|
|
293
|
+
): Promise<void> {
|
|
294
|
+
const executionId = input.execution_id;
|
|
295
|
+
log.info("Starting workflow for execution", { executionId });
|
|
296
|
+
|
|
297
|
+
const callbackToken = input.callback_token ?? "";
|
|
298
|
+
if (callbackToken !== "") {
|
|
299
|
+
log.info("Callback token detected - will complete external activity on finish", {
|
|
300
|
+
executionId,
|
|
301
|
+
tokenLength: callbackToken.length,
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// Go reads ctx.Err() to distinguish external workflow cancellation from
|
|
306
|
+
// internal pause-scope cancels; the TS equivalent observes the root
|
|
307
|
+
// scope's cancellation request. The dangling rejection is the designed
|
|
308
|
+
// API shape (cancelRequested is a Promise<never>).
|
|
309
|
+
let workflowCancelled = false;
|
|
310
|
+
CancellationScope.current().cancelRequested.catch(() => {
|
|
311
|
+
workflowCancelled = true;
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
const signals = installSignalBuffers();
|
|
315
|
+
|
|
316
|
+
// Notify the parent workflow that the child execution started (enables
|
|
317
|
+
// live subscription). Fire-and-forget: a completed/missing parent must
|
|
318
|
+
// never affect this run.
|
|
319
|
+
if ((input.parent_workflow_id ?? "") !== "") {
|
|
320
|
+
const parentWorkflowId = input.parent_workflow_id!;
|
|
321
|
+
void (async () => {
|
|
322
|
+
try {
|
|
323
|
+
await getExternalWorkflowHandle(parentWorkflowId).signal(
|
|
324
|
+
SIGNAL_CHILD_EXECUTION_STARTED,
|
|
325
|
+
{ executionId },
|
|
326
|
+
);
|
|
327
|
+
} catch (error) {
|
|
328
|
+
log.warn("Failed to signal parent execution started (non-fatal)", {
|
|
329
|
+
parentWorkflowId,
|
|
330
|
+
error: errorMessage(error),
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
})();
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
const activityTaskQueue = getActivityTaskQueue();
|
|
337
|
+
|
|
338
|
+
let flowError: unknown;
|
|
339
|
+
let lastActivityResult: RunnerActivityResult | undefined;
|
|
340
|
+
try {
|
|
341
|
+
if ((input.harness ?? 0) === Harness.CURSOR) {
|
|
342
|
+
lastActivityResult = await executeCursorFlow(
|
|
343
|
+
input,
|
|
344
|
+
activityTaskQueue,
|
|
345
|
+
signals,
|
|
346
|
+
() => workflowCancelled,
|
|
347
|
+
);
|
|
348
|
+
} else {
|
|
349
|
+
lastActivityResult = await executeDeepAgentFlow(
|
|
350
|
+
input,
|
|
351
|
+
activityTaskQueue,
|
|
352
|
+
signals,
|
|
353
|
+
() => workflowCancelled,
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
} catch (error) {
|
|
357
|
+
flowError = error;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
if (flowError !== undefined) {
|
|
361
|
+
// Cancellation path — keyed on the WORKFLOW's cancel state alone
|
|
362
|
+
// (Go's temporal.IsCanceledError(ctx.Err())): the flow wraps activity
|
|
363
|
+
// errors, so the flowError itself may not read as a cancellation.
|
|
364
|
+
// Cleanup runs on a non-cancellable scope (Go's disconnected context)
|
|
365
|
+
// and the workflow must end CANCELLED, not FAILED — so the underlying
|
|
366
|
+
// CancelledFailure is what propagates (Go's `return err` reaches the
|
|
367
|
+
// same terminal state through its SDK's canceled-error detection).
|
|
368
|
+
if (workflowCancelled) {
|
|
369
|
+
log.info("Workflow cancelled, running cancellation cleanup", { executionId });
|
|
370
|
+
await handleCancellation(executionId, callbackToken);
|
|
371
|
+
throw (
|
|
372
|
+
findInCauseChain(flowError, CancelledFailure) ??
|
|
373
|
+
new CancelledFailure("Workflow cancelled")
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
log.error("Workflow execution failed", {
|
|
378
|
+
executionId,
|
|
379
|
+
error: errorMessage(flowError),
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
try {
|
|
383
|
+
await updateStatusOnFailure(executionId, flowError);
|
|
384
|
+
} catch (error) {
|
|
385
|
+
log.error("Failed to update execution status", {
|
|
386
|
+
error: errorMessage(error),
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
if (callbackToken !== "") {
|
|
391
|
+
try {
|
|
392
|
+
await completionActivities[COMPLETE_EXTERNAL_ACTIVITY_NAME]({
|
|
393
|
+
callbackToken,
|
|
394
|
+
errorMessage: errorMessage(flowError),
|
|
395
|
+
});
|
|
396
|
+
} catch (error) {
|
|
397
|
+
log.error("Failed to complete external activity with error", {
|
|
398
|
+
error: errorMessage(error),
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
await deleteExecutionContext(executionId);
|
|
404
|
+
throw ApplicationFailure.create({
|
|
405
|
+
message: "Workflow execution failed",
|
|
406
|
+
cause: flowError instanceof Error ? flowError : new Error(String(flowError)),
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
log.info(
|
|
411
|
+
"Workflow completed for execution (status updates were sent progressively via gRPC)",
|
|
412
|
+
{ executionId },
|
|
413
|
+
);
|
|
414
|
+
|
|
415
|
+
if (callbackToken !== "") {
|
|
416
|
+
// The whole callback sequence shares one error boundary: a throw here
|
|
417
|
+
// must FAIL the workflow (Go's `return err`), and in the TS SDK only
|
|
418
|
+
// a TemporalFailure does that — a plain Error would fail the workflow
|
|
419
|
+
// TASK, which the server retries forever (panel finding: the workflow
|
|
420
|
+
// would wedge instead of failing, and the parent's external activity
|
|
421
|
+
// would never complete). External cancellation mid-sequence takes the
|
|
422
|
+
// cancellation-cleanup path exactly like a mid-flow cancel.
|
|
423
|
+
try {
|
|
424
|
+
let execution: AgentExecution;
|
|
425
|
+
try {
|
|
426
|
+
execution = await loadExecution(executionId);
|
|
427
|
+
} catch (error) {
|
|
428
|
+
log.error("Failed to load execution for callback result", {
|
|
429
|
+
error: errorMessage(error),
|
|
430
|
+
});
|
|
431
|
+
throw error;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
const callbackResult = buildCallbackResult(lastActivityResult, execution);
|
|
435
|
+
try {
|
|
436
|
+
await completionActivities[COMPLETE_EXTERNAL_ACTIVITY_NAME]({
|
|
437
|
+
callbackToken,
|
|
438
|
+
result: callbackResult,
|
|
439
|
+
});
|
|
440
|
+
} catch (error) {
|
|
441
|
+
log.error("Failed to complete external activity with success", {
|
|
442
|
+
error: errorMessage(error),
|
|
443
|
+
});
|
|
444
|
+
throw error;
|
|
445
|
+
}
|
|
446
|
+
} catch (error) {
|
|
447
|
+
if (workflowCancelled) {
|
|
448
|
+
log.info("Workflow cancelled during callback completion, running cancellation cleanup", {
|
|
449
|
+
executionId,
|
|
450
|
+
});
|
|
451
|
+
await handleCancellation(executionId, callbackToken);
|
|
452
|
+
throw (
|
|
453
|
+
findInCauseChain(error, CancelledFailure) ??
|
|
454
|
+
new CancelledFailure("Workflow cancelled")
|
|
455
|
+
);
|
|
456
|
+
}
|
|
457
|
+
throw error instanceof ApplicationFailure
|
|
458
|
+
? error
|
|
459
|
+
: ApplicationFailure.create({
|
|
460
|
+
message: errorMessage(error),
|
|
461
|
+
cause: error instanceof Error ? error : new Error(String(error)),
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
await deleteExecutionContext(executionId);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// ─── Signal buffering (Go's buffered signal channels) ───────────────────
|
|
470
|
+
|
|
471
|
+
interface SignalBuffers {
|
|
472
|
+
/** Pending pause reasons; each monitor consumes exactly one. */
|
|
473
|
+
readonly pauseQueue: string[];
|
|
474
|
+
consumeResume(): Promise<void>;
|
|
475
|
+
consumeApprovalGateResolved(): Promise<void>;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
function installSignalBuffers(): SignalBuffers {
|
|
479
|
+
const pauseQueue: string[] = [];
|
|
480
|
+
let resumePending = 0;
|
|
481
|
+
let approvalPending = 0;
|
|
482
|
+
setHandler(pauseSignal, (reason?: string) => {
|
|
483
|
+
pauseQueue.push(reason ?? "");
|
|
484
|
+
});
|
|
485
|
+
setHandler(resumeSignal, () => {
|
|
486
|
+
resumePending++;
|
|
487
|
+
});
|
|
488
|
+
setHandler(approvalGateResolvedSignal, () => {
|
|
489
|
+
approvalPending++;
|
|
490
|
+
});
|
|
491
|
+
return {
|
|
492
|
+
pauseQueue,
|
|
493
|
+
async consumeResume() {
|
|
494
|
+
await condition(() => resumePending > 0);
|
|
495
|
+
resumePending--;
|
|
496
|
+
},
|
|
497
|
+
async consumeApprovalGateResolved() {
|
|
498
|
+
await condition(() => approvalPending > 0);
|
|
499
|
+
approvalPending--;
|
|
500
|
+
},
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
// ─── The two harness flows ──────────────────────────────────────────────
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Native deep-agent flow: EnsureThread ONCE (the LangGraph thread is the
|
|
508
|
+
* checkpoint identity — stable across pause/recovery re-invocations),
|
|
509
|
+
* then the shared pause/recovery loop around the HITL loop.
|
|
510
|
+
*/
|
|
511
|
+
async function executeDeepAgentFlow(
|
|
512
|
+
input: InvokeAgentExecutionWorkflowInput,
|
|
513
|
+
activityTaskQueue: string,
|
|
514
|
+
signals: SignalBuffers,
|
|
515
|
+
isWorkflowCancelled: () => boolean,
|
|
516
|
+
): Promise<RunnerActivityResult> {
|
|
517
|
+
const executionId = input.execution_id;
|
|
518
|
+
const sessionId = input.session_id;
|
|
519
|
+
const invoker = input.invoker_identity_account_id ?? "";
|
|
520
|
+
|
|
521
|
+
log.info("Step 1: Ensuring thread", { sessionId, agentId: input.agent_id });
|
|
522
|
+
const ensureThread = newEnsureThreadProxy(activityTaskQueue);
|
|
523
|
+
let threadId: string;
|
|
524
|
+
try {
|
|
525
|
+
threadId = await ensureThread[ENSURE_THREAD_ACTIVITY_NAME](
|
|
526
|
+
sessionId,
|
|
527
|
+
input.agent_id,
|
|
528
|
+
);
|
|
529
|
+
} catch (error) {
|
|
530
|
+
throw wrapActivityError("EnsureThread", error);
|
|
531
|
+
}
|
|
532
|
+
log.info("Thread ensured", { threadId });
|
|
533
|
+
|
|
534
|
+
fireGenerateSessionSubject(activityTaskQueue, executionId);
|
|
535
|
+
|
|
536
|
+
log.info("Step 2: Executing deep agent", { executionId, threadId });
|
|
537
|
+
const agentProxy = newExecuteAgentProxy(activityTaskQueue);
|
|
538
|
+
|
|
539
|
+
return runWithPauseAndRecovery({
|
|
540
|
+
executionId,
|
|
541
|
+
activityLabel: "ExecuteDeepAgent",
|
|
542
|
+
signals,
|
|
543
|
+
isWorkflowCancelled,
|
|
544
|
+
executeWithHitl: () =>
|
|
545
|
+
executeWithHitlLoop({
|
|
546
|
+
executionId,
|
|
547
|
+
signals,
|
|
548
|
+
parentWorkflowId: input.parent_workflow_id ?? "",
|
|
549
|
+
firstInvoke: () =>
|
|
550
|
+
agentProxy[EXECUTE_DEEP_AGENT_ACTIVITY_NAME]({
|
|
551
|
+
execution_id: executionId,
|
|
552
|
+
thread_id: threadId,
|
|
553
|
+
invoker_identity_account_id: invoker,
|
|
554
|
+
turn_seq: 0,
|
|
555
|
+
}),
|
|
556
|
+
// The LangGraph thread id is stable — re-invocations reuse it.
|
|
557
|
+
reinvoke: (turnSeq) =>
|
|
558
|
+
agentProxy[EXECUTE_DEEP_AGENT_ACTIVITY_NAME]({
|
|
559
|
+
execution_id: executionId,
|
|
560
|
+
thread_id: threadId,
|
|
561
|
+
invoker_identity_account_id: invoker,
|
|
562
|
+
turn_seq: turnSeq,
|
|
563
|
+
}),
|
|
564
|
+
nullResultMessage: "activity returned null status - this should never happen",
|
|
565
|
+
nullResultAfterApprovalMessage:
|
|
566
|
+
"activity returned null status after approval - this should never happen",
|
|
567
|
+
}),
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* Cursor flow: structurally the deep-agent flow with two variation points
|
|
573
|
+
* (invoke_workflow_impl.go executeCursorFlow) — harness_state_id comes
|
|
574
|
+
* from ReadHarnessStateId instead of EnsureThread (non-fatal on the first
|
|
575
|
+
* read, FATAL before each HITL re-invocation: by then the id must exist,
|
|
576
|
+
* Cursor's Agent.resume needs it), and ExecuteCursor instead of
|
|
577
|
+
* ExecuteDeepAgent.
|
|
578
|
+
*/
|
|
579
|
+
async function executeCursorFlow(
|
|
580
|
+
input: InvokeAgentExecutionWorkflowInput,
|
|
581
|
+
activityTaskQueue: string,
|
|
582
|
+
signals: SignalBuffers,
|
|
583
|
+
isWorkflowCancelled: () => boolean,
|
|
584
|
+
): Promise<RunnerActivityResult> {
|
|
585
|
+
const executionId = input.execution_id;
|
|
586
|
+
const sessionId = input.session_id;
|
|
587
|
+
const invoker = input.invoker_identity_account_id ?? "";
|
|
588
|
+
|
|
589
|
+
fireGenerateSessionSubject(activityTaskQueue, executionId);
|
|
590
|
+
|
|
591
|
+
log.info("Executing Cursor agent", { executionId, sessionId });
|
|
592
|
+
const agentProxy = newExecuteAgentProxy(activityTaskQueue);
|
|
593
|
+
|
|
594
|
+
return runWithPauseAndRecovery({
|
|
595
|
+
executionId,
|
|
596
|
+
activityLabel: "ExecuteCursor",
|
|
597
|
+
signals,
|
|
598
|
+
isWorkflowCancelled,
|
|
599
|
+
executeWithHitl: () =>
|
|
600
|
+
executeWithHitlLoop({
|
|
601
|
+
executionId,
|
|
602
|
+
signals,
|
|
603
|
+
parentWorkflowId: input.parent_workflow_id ?? "",
|
|
604
|
+
firstInvoke: async () => {
|
|
605
|
+
let harnessStateId: string;
|
|
606
|
+
try {
|
|
607
|
+
harnessStateId = await readHarnessStateId(sessionId);
|
|
608
|
+
} catch (error) {
|
|
609
|
+
log.warn(
|
|
610
|
+
"Failed to read session harness_state_id (non-fatal, using empty)",
|
|
611
|
+
{ sessionId, error: errorMessage(error) },
|
|
612
|
+
);
|
|
613
|
+
harnessStateId = "";
|
|
614
|
+
}
|
|
615
|
+
return agentProxy[EXECUTE_CURSOR_ACTIVITY_NAME]({
|
|
616
|
+
execution_id: executionId,
|
|
617
|
+
thread_id: harnessStateId,
|
|
618
|
+
invoker_identity_account_id: invoker,
|
|
619
|
+
turn_seq: 0,
|
|
620
|
+
});
|
|
621
|
+
},
|
|
622
|
+
reinvoke: async (turnSeq) => {
|
|
623
|
+
let harnessStateId: string;
|
|
624
|
+
try {
|
|
625
|
+
harnessStateId = await readHarnessStateId(sessionId);
|
|
626
|
+
} catch (error) {
|
|
627
|
+
throw new Error(
|
|
628
|
+
`failed to read session harness_state_id for reinvocation: ${errorMessage(error)}`,
|
|
629
|
+
{ cause: error },
|
|
630
|
+
);
|
|
631
|
+
}
|
|
632
|
+
log.info("Re-invoking Cursor after approval", {
|
|
633
|
+
executionId,
|
|
634
|
+
cycle: turnSeq,
|
|
635
|
+
harnessStateId,
|
|
636
|
+
});
|
|
637
|
+
return agentProxy[EXECUTE_CURSOR_ACTIVITY_NAME]({
|
|
638
|
+
execution_id: executionId,
|
|
639
|
+
thread_id: harnessStateId,
|
|
640
|
+
invoker_identity_account_id: invoker,
|
|
641
|
+
turn_seq: turnSeq,
|
|
642
|
+
});
|
|
643
|
+
},
|
|
644
|
+
nullResultMessage:
|
|
645
|
+
"cursor activity returned null status - this should never happen",
|
|
646
|
+
nullResultAfterApprovalMessage:
|
|
647
|
+
"cursor activity returned null status after approval - this should never happen",
|
|
648
|
+
}),
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/** GenerateSessionSubject: fire-and-forget, non-blocking (issue #665). */
|
|
653
|
+
function fireGenerateSessionSubject(
|
|
654
|
+
activityTaskQueue: string,
|
|
655
|
+
executionId: string,
|
|
656
|
+
): void {
|
|
657
|
+
const subjectProxy = newSubjectProxy(activityTaskQueue);
|
|
658
|
+
void (async () => {
|
|
659
|
+
try {
|
|
660
|
+
await subjectProxy[GENERATE_SESSION_SUBJECT_ACTIVITY_NAME](executionId);
|
|
661
|
+
} catch (error) {
|
|
662
|
+
log.warn("Session subject generation failed (non-critical)", {
|
|
663
|
+
executionId,
|
|
664
|
+
error: errorMessage(error),
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
})();
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
// ─── The shared pause/recovery loop ─────────────────────────────────────
|
|
671
|
+
|
|
672
|
+
interface PauseRecoveryOptions {
|
|
673
|
+
readonly executionId: string;
|
|
674
|
+
readonly activityLabel: "ExecuteDeepAgent" | "ExecuteCursor";
|
|
675
|
+
readonly signals: SignalBuffers;
|
|
676
|
+
readonly isWorkflowCancelled: () => boolean;
|
|
677
|
+
readonly executeWithHitl: () => Promise<RunnerActivityResult>;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* The outer loop both flows share (byte-identical in Go, parameterized
|
|
682
|
+
* here): each attempt runs the HITL loop in a cancellable scope with a
|
|
683
|
+
* pause monitor; pause → persist PAUSED, wait for resume, re-invoke;
|
|
684
|
+
* recoverable interruption → persist IN_PROGRESS, linear backoff,
|
|
685
|
+
* re-invoke; anything else → wrapped failure. On completion, an
|
|
686
|
+
* EXECUTION_FAILED result persists the fallback FAILED status and
|
|
687
|
+
* propagates as an error.
|
|
688
|
+
*/
|
|
689
|
+
async function runWithPauseAndRecovery(
|
|
690
|
+
options: PauseRecoveryOptions,
|
|
691
|
+
): Promise<RunnerActivityResult> {
|
|
692
|
+
const { executionId, activityLabel, signals, isWorkflowCancelled } = options;
|
|
693
|
+
|
|
694
|
+
let finalResult: RunnerActivityResult;
|
|
695
|
+
let pauseCycle = 0;
|
|
696
|
+
let recoveryCycle = 0;
|
|
697
|
+
|
|
698
|
+
for (;;) {
|
|
699
|
+
const attempt = await runPausableAttempt(
|
|
700
|
+
executionId,
|
|
701
|
+
signals,
|
|
702
|
+
options.executeWithHitl,
|
|
703
|
+
);
|
|
704
|
+
|
|
705
|
+
if (attempt.error !== undefined && attempt.pauseRequested) {
|
|
706
|
+
// Activity (or HITL wait) was cancelled FOR PAUSE — the checkpoint
|
|
707
|
+
// is saved; block on resume, then re-invoke from it.
|
|
708
|
+
pauseCycle++;
|
|
709
|
+
if (pauseCycle > MAX_PAUSE_CYCLES) {
|
|
710
|
+
log.error("Max pause cycles reached", { executionId, cycles: pauseCycle });
|
|
711
|
+
throw new Error(
|
|
712
|
+
`max pause cycles (${MAX_PAUSE_CYCLES}) reached - possible infinite loop`,
|
|
713
|
+
);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
log.info("Execution paused — checkpoint saved, waiting for resume signal", {
|
|
717
|
+
executionId,
|
|
718
|
+
pauseCycle,
|
|
719
|
+
});
|
|
720
|
+
|
|
721
|
+
// Defense-in-depth: the Pause RPC already set PAUSED in the DB, but
|
|
722
|
+
// this also folds the latest messages/tool_calls from the
|
|
723
|
+
// activity's final gRPC update.
|
|
724
|
+
await persistFinalStatus(
|
|
725
|
+
executionId,
|
|
726
|
+
create(AgentExecutionStatusSchema, {
|
|
727
|
+
phase: ExecutionPhase.EXECUTION_PAUSED,
|
|
728
|
+
}),
|
|
729
|
+
"Failed to persist PAUSED status (non-fatal)",
|
|
730
|
+
);
|
|
731
|
+
|
|
732
|
+
await signals.consumeResume();
|
|
733
|
+
log.info("Resume signal received — restarting activity from checkpoint", {
|
|
734
|
+
executionId,
|
|
735
|
+
pauseCycle,
|
|
736
|
+
});
|
|
737
|
+
// Re-assert IN_PROGRESS after resume (TS-side divergence in the
|
|
738
|
+
// correct direction, owner-ratified; oss#869 tracks the shared
|
|
739
|
+
// root cause). The PAUSED persist above carries no ordering
|
|
740
|
+
// information: on a fast pause→resume it can land AFTER the Resume
|
|
741
|
+
// RPC's IN_PROGRESS write and resurrect PAUSED — and no later
|
|
742
|
+
// writer exists until the turn's terminal persist, so the
|
|
743
|
+
// execution SHOWS paused while running. Because this workflow's
|
|
744
|
+
// writes are sequential (the PAUSED persist completed before the
|
|
745
|
+
// resume wait), this write always lands after the stale one and
|
|
746
|
+
// heals it — the same defense idiom as persistInterruptedStatus.
|
|
747
|
+
await persistResumedStatus(executionId);
|
|
748
|
+
continue;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
if (attempt.error !== undefined) {
|
|
752
|
+
// Transient interruption: auto-resume from the persisted checkpoint
|
|
753
|
+
// instead of dead-ending. Guarded on the workflow NOT being
|
|
754
|
+
// cancelled so external cancellation is never swallowed.
|
|
755
|
+
if (!isWorkflowCancelled() && isRecoverableActivityError(attempt.error)) {
|
|
756
|
+
recoveryCycle++;
|
|
757
|
+
if (recoveryCycle > MAX_RECOVERY_CYCLES) {
|
|
758
|
+
log.error("Max recovery cycles reached, surfacing failure", {
|
|
759
|
+
executionId,
|
|
760
|
+
cycles: recoveryCycle,
|
|
761
|
+
});
|
|
762
|
+
throw wrapActivityError(activityLabel, attempt.error);
|
|
763
|
+
}
|
|
764
|
+
log.warn("Execution interrupted (recoverable), resuming from checkpoint", {
|
|
765
|
+
executionId,
|
|
766
|
+
recoveryCycle,
|
|
767
|
+
error: errorMessage(attempt.error),
|
|
768
|
+
});
|
|
769
|
+
await persistInterruptedStatus(executionId);
|
|
770
|
+
try {
|
|
771
|
+
await sleep(recoveryBackoffMs(recoveryCycle));
|
|
772
|
+
} catch {
|
|
773
|
+
// Sleep only rejects on cancellation — surface the ORIGINAL
|
|
774
|
+
// interruption, exactly Go's sleepErr branch.
|
|
775
|
+
throw wrapActivityError(activityLabel, attempt.error);
|
|
776
|
+
}
|
|
777
|
+
continue;
|
|
778
|
+
}
|
|
779
|
+
throw wrapActivityError(activityLabel, attempt.error);
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
finalResult = attempt.result!;
|
|
783
|
+
break;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
const finalPhase = getPhaseFromResult(finalResult);
|
|
787
|
+
log.info("Agent execution completed - final slim status received", {
|
|
788
|
+
executionId,
|
|
789
|
+
phase: ExecutionPhase[finalPhase],
|
|
790
|
+
pauseCycles: pauseCycle,
|
|
791
|
+
});
|
|
792
|
+
|
|
793
|
+
if (finalPhase === ExecutionPhase.EXECUTION_FAILED) {
|
|
794
|
+
const finalError = getErrorFromResult(finalResult);
|
|
795
|
+
log.warn("Activity returned EXECUTION_FAILED -- propagating to parent workflow", {
|
|
796
|
+
executionId,
|
|
797
|
+
error: finalError,
|
|
798
|
+
});
|
|
799
|
+
await persistFinalStatus(
|
|
800
|
+
executionId,
|
|
801
|
+
create(AgentExecutionStatusSchema, {
|
|
802
|
+
phase: ExecutionPhase.EXECUTION_FAILED,
|
|
803
|
+
error: finalError,
|
|
804
|
+
}),
|
|
805
|
+
"Failed to persist fallback FAILED status",
|
|
806
|
+
);
|
|
807
|
+
throw new Error(`agent execution failed: ${finalError}`);
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
return finalResult;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
interface AttemptOutcome {
|
|
814
|
+
readonly result?: RunnerActivityResult;
|
|
815
|
+
readonly error?: unknown;
|
|
816
|
+
readonly pauseRequested: boolean;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* One cancellable attempt with a pause monitor (Go's per-iteration
|
|
821
|
+
* workflow.WithCancel + monitoring goroutine): the monitor consumes ONE
|
|
822
|
+
* queued pause signal and cancels the scope — cancelling both the
|
|
823
|
+
* running activity AND any HITL approval wait inside it. If the attempt
|
|
824
|
+
* finishes first, the monitor is released WITHOUT consuming, so a pause
|
|
825
|
+
* that raced completion stays queued for the next attempt (Go's buffered
|
|
826
|
+
* channel semantics).
|
|
827
|
+
*/
|
|
828
|
+
async function runPausableAttempt(
|
|
829
|
+
executionId: string,
|
|
830
|
+
signals: SignalBuffers,
|
|
831
|
+
execute: () => Promise<RunnerActivityResult>,
|
|
832
|
+
): Promise<AttemptOutcome> {
|
|
833
|
+
let pauseRequested = false;
|
|
834
|
+
let attemptDone = false;
|
|
835
|
+
const scope = new CancellationScope();
|
|
836
|
+
|
|
837
|
+
const monitor = (async () => {
|
|
838
|
+
try {
|
|
839
|
+
await condition(() => signals.pauseQueue.length > 0 || attemptDone);
|
|
840
|
+
} catch {
|
|
841
|
+
// EXTERNAL workflow cancellation rejects this condition in the
|
|
842
|
+
// cancel activation itself, while the attempt's activity await
|
|
843
|
+
// rejects only in a LATER activation (after the server processes
|
|
844
|
+
// the cancel request). An uncaught rejection here would fail the
|
|
845
|
+
// workflow task at the activation boundary and the server would
|
|
846
|
+
// retry it forever — the TS sandbox has no Go-goroutine leniency.
|
|
847
|
+
// The attempt's own rejection carries the cancellation signal.
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
850
|
+
if (!attemptDone && signals.pauseQueue.length > 0) {
|
|
851
|
+
const reason = signals.pauseQueue.shift() ?? "";
|
|
852
|
+
log.info("Pause signal received", { executionId, reason });
|
|
853
|
+
pauseRequested = true;
|
|
854
|
+
scope.cancel();
|
|
855
|
+
}
|
|
856
|
+
})();
|
|
857
|
+
|
|
858
|
+
let result: RunnerActivityResult | undefined;
|
|
859
|
+
let error: unknown;
|
|
860
|
+
try {
|
|
861
|
+
result = await scope.run(execute);
|
|
862
|
+
} catch (e) {
|
|
863
|
+
error = e;
|
|
864
|
+
}
|
|
865
|
+
attemptDone = true;
|
|
866
|
+
await monitor;
|
|
867
|
+
|
|
868
|
+
return error !== undefined
|
|
869
|
+
? { error, pauseRequested }
|
|
870
|
+
: { result, pauseRequested };
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
// ─── The HITL loop ──────────────────────────────────────────────────────
|
|
874
|
+
|
|
875
|
+
interface HitlLoopOptions {
|
|
876
|
+
readonly executionId: string;
|
|
877
|
+
readonly signals: SignalBuffers;
|
|
878
|
+
/**
|
|
879
|
+
* The workflow input's parent_workflow_id ("" when invoked directly) —
|
|
880
|
+
* the HITL loop notifies this parent whenever the gate engages (D4 #23,
|
|
881
|
+
* DD-012). The loop cannot read the workflow input itself, so the flows
|
|
882
|
+
* thread it through.
|
|
883
|
+
*/
|
|
884
|
+
readonly parentWorkflowId: string;
|
|
885
|
+
readonly firstInvoke: () => Promise<RunnerActivityResult | null>;
|
|
886
|
+
readonly reinvoke: (turnSeq: number) => Promise<RunnerActivityResult | null>;
|
|
887
|
+
readonly nullResultMessage: string;
|
|
888
|
+
readonly nullResultAfterApprovalMessage: string;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* Notify the parent workflow that this child is gated — the OSS sender half
|
|
893
|
+
* of the DD-012 child-approval forwarding contract (D4 #23, parity-plus:
|
|
894
|
+
* cloud's InvokeAgentExecutionWorkflowImpl.notifyParentWorkflowOfApproval;
|
|
895
|
+
* Go OSS never sends it). Identity-only BARE-STRING payload — the parent
|
|
896
|
+
* (the runner's call-agent orchestrator) derives the gate from this
|
|
897
|
+
* execution's persisted pending_approvals, so approval details never travel
|
|
898
|
+
* through the signal (see SIGNAL_CHILD_APPROVAL_REQUIRED in names.ts).
|
|
899
|
+
*
|
|
900
|
+
* Fire-and-forget with the same posture as child_execution_started: a
|
|
901
|
+
* completed/missing parent must never affect this run — the user can still
|
|
902
|
+
* approve directly through AgentExecution.submitApproval.
|
|
903
|
+
*/
|
|
904
|
+
function signalParentApprovalRequired(
|
|
905
|
+
parentWorkflowId: string,
|
|
906
|
+
executionId: string,
|
|
907
|
+
loadedStatus: AgentExecutionStatus | undefined,
|
|
908
|
+
): void {
|
|
909
|
+
if (parentWorkflowId === "") {
|
|
910
|
+
// Invoked directly (API/CLI/schedule) — no parent to notify.
|
|
911
|
+
return;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
const pendingApprovals = loadedStatus?.pendingApprovals ?? [];
|
|
915
|
+
log.info("Notifying parent workflow of approval requirement", {
|
|
916
|
+
parentWorkflowId,
|
|
917
|
+
executionId,
|
|
918
|
+
pendingCount: pendingApprovals.length,
|
|
919
|
+
firstToolName: pendingApprovals[0]?.toolName ?? "unknown",
|
|
920
|
+
});
|
|
921
|
+
|
|
922
|
+
void (async () => {
|
|
923
|
+
try {
|
|
924
|
+
await getExternalWorkflowHandle(parentWorkflowId).signal(
|
|
925
|
+
SIGNAL_CHILD_APPROVAL_REQUIRED,
|
|
926
|
+
executionId,
|
|
927
|
+
);
|
|
928
|
+
} catch (error) {
|
|
929
|
+
log.warn("Failed to notify parent workflow of approval (non-fatal)", {
|
|
930
|
+
parentWorkflowId,
|
|
931
|
+
error: errorMessage(error),
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
})();
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* Runs the agent activity and re-invokes it while the runner reports
|
|
939
|
+
* WAITING_FOR_APPROVAL. The gate is UNIFIED: pending approvals AND change
|
|
940
|
+
* sets awaiting review — a turn blocked purely on file review must wait
|
|
941
|
+
* for, and resume from, the same approvalGateResolved signal. TurnSeq is
|
|
942
|
+
* the approvalCycle: the runner mints the deterministic change-set id
|
|
943
|
+
* `executionId:turnSeq` from it, so ledger authoring stays idempotent
|
|
944
|
+
* across Temporal retries.
|
|
945
|
+
*/
|
|
946
|
+
async function executeWithHitlLoop(
|
|
947
|
+
options: HitlLoopOptions,
|
|
948
|
+
): Promise<RunnerActivityResult> {
|
|
949
|
+
const { executionId, signals } = options;
|
|
950
|
+
|
|
951
|
+
let result = await options.firstInvoke();
|
|
952
|
+
if (result === null || result === undefined) {
|
|
953
|
+
log.error("Agent activity returned NULL status", { executionId });
|
|
954
|
+
throw new Error(options.nullResultMessage);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
let phase = getPhaseFromResult(result);
|
|
958
|
+
log.info("Activity returned slim status", {
|
|
959
|
+
executionId,
|
|
960
|
+
phase: ExecutionPhase[phase],
|
|
961
|
+
});
|
|
962
|
+
|
|
963
|
+
let approvalCycle = 0;
|
|
964
|
+
let zeroGateCycles = 0;
|
|
965
|
+
while (phase === ExecutionPhase.EXECUTION_WAITING_FOR_APPROVAL) {
|
|
966
|
+
approvalCycle++;
|
|
967
|
+
if (approvalCycle > MAX_APPROVAL_CYCLES) {
|
|
968
|
+
log.error("Max approval cycles reached", { executionId, cycles: approvalCycle });
|
|
969
|
+
throw new Error(
|
|
970
|
+
`max approval cycles (${MAX_APPROVAL_CYCLES}) reached - possible infinite loop`,
|
|
971
|
+
);
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
await persistFinalStatus(
|
|
975
|
+
executionId,
|
|
976
|
+
create(AgentExecutionStatusSchema, {
|
|
977
|
+
phase: ExecutionPhase.EXECUTION_WAITING_FOR_APPROVAL,
|
|
978
|
+
}),
|
|
979
|
+
"Failed to persist WAITING_FOR_APPROVAL status before signal wait (non-fatal)",
|
|
980
|
+
);
|
|
981
|
+
|
|
982
|
+
// Re-read the unified gate from the system of record; a load failure
|
|
983
|
+
// defaults to 1 (wait for the signal — failing open would re-invoke
|
|
984
|
+
// against an undecided gate).
|
|
985
|
+
let gateCount: number;
|
|
986
|
+
let loadedStatus: AgentExecutionStatus | undefined;
|
|
987
|
+
try {
|
|
988
|
+
const execution = await loadExecution(executionId);
|
|
989
|
+
loadedStatus = execution.status;
|
|
990
|
+
gateCount = unresolvedGateCount(
|
|
991
|
+
execution.status ?? create(AgentExecutionStatusSchema),
|
|
992
|
+
);
|
|
993
|
+
} catch (error) {
|
|
994
|
+
log.warn(
|
|
995
|
+
"Failed to load execution from DB for gate count (non-fatal, will wait for signal)",
|
|
996
|
+
{ executionId, error: errorMessage(error) },
|
|
997
|
+
);
|
|
998
|
+
loadedStatus = undefined;
|
|
999
|
+
gateCount = 1;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
log.info("Execution waiting at HITL gate — waiting for approvalGateResolved signal", {
|
|
1003
|
+
executionId,
|
|
1004
|
+
cycle: approvalCycle,
|
|
1005
|
+
gateCount,
|
|
1006
|
+
});
|
|
1007
|
+
|
|
1008
|
+
// Cloud parity (both Java HITL loops call notifyParentWorkflowOfApproval
|
|
1009
|
+
// here): the parent is notified on EVERY cycle — after the phase persist
|
|
1010
|
+
// and gate re-read, BEFORE the gate-count branch — including zero-gate
|
|
1011
|
+
// and file-review-only cycles. The runner derives from the persisted
|
|
1012
|
+
// gate, so an empty derivation is a harmless "already resolved" no-op.
|
|
1013
|
+
signalParentApprovalRequired(options.parentWorkflowId, executionId, loadedStatus);
|
|
1014
|
+
|
|
1015
|
+
if (gateCount === 0) {
|
|
1016
|
+
if (loadedStatus !== undefined && hasDecidedAwaitingReconcile(loadedStatus)) {
|
|
1017
|
+
// LEGITIMATE empty gate: a change set was decided before this
|
|
1018
|
+
// check — the DD-28 approved-command auto-keep authors its
|
|
1019
|
+
// decision in the same write that folds the candidate (and a
|
|
1020
|
+
// fast human decision can race the check the same way). The
|
|
1021
|
+
// runner is owed a reconcile; re-invoke immediately without
|
|
1022
|
+
// waiting for a signal that already fired or will never come.
|
|
1023
|
+
zeroGateCycles = 0;
|
|
1024
|
+
log.info(
|
|
1025
|
+
"HITL gate resolved before wait (policy auto-keep or early decision) — re-invoking to reconcile",
|
|
1026
|
+
{ executionId, cycle: approvalCycle },
|
|
1027
|
+
);
|
|
1028
|
+
} else {
|
|
1029
|
+
// WAITING_FOR_APPROVAL with an empty unified gate and NOTHING
|
|
1030
|
+
// owed a reconcile is an inconsistency the finalize contract
|
|
1031
|
+
// should make impossible. Tolerate a few consecutive occurrences
|
|
1032
|
+
// (transient read race) then fail fast, rather than tight-looping
|
|
1033
|
+
// the full activity to MAX_APPROVAL_CYCLES.
|
|
1034
|
+
zeroGateCycles++;
|
|
1035
|
+
if (zeroGateCycles > MAX_ZERO_GATE_CYCLES) {
|
|
1036
|
+
log.error(
|
|
1037
|
+
"WAITING_FOR_APPROVAL with empty HITL gate across consecutive cycles — failing fast to avoid a tight re-invocation loop",
|
|
1038
|
+
{ executionId, cycle: approvalCycle, zeroGateCycles },
|
|
1039
|
+
);
|
|
1040
|
+
throw new Error(
|
|
1041
|
+
`execution stuck in WAITING_FOR_APPROVAL with an empty HITL gate after ${zeroGateCycles} consecutive cycles - gate propagation is broken`,
|
|
1042
|
+
);
|
|
1043
|
+
}
|
|
1044
|
+
log.warn(
|
|
1045
|
+
"HITL gate is empty but phase is WAITING_FOR_APPROVAL — re-invoking (bounded) to resolve inconsistency",
|
|
1046
|
+
{ executionId, cycle: approvalCycle, zeroGateCycles },
|
|
1047
|
+
);
|
|
1048
|
+
}
|
|
1049
|
+
} else {
|
|
1050
|
+
zeroGateCycles = 0;
|
|
1051
|
+
await signals.consumeApprovalGateResolved();
|
|
1052
|
+
log.info("Received approvalGateResolved signal", {
|
|
1053
|
+
executionId,
|
|
1054
|
+
cycle: approvalCycle,
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
log.info("Re-invoking agent after HITL gate resolved", {
|
|
1059
|
+
executionId,
|
|
1060
|
+
cycle: approvalCycle,
|
|
1061
|
+
});
|
|
1062
|
+
|
|
1063
|
+
result = await options.reinvoke(approvalCycle);
|
|
1064
|
+
if (result === null || result === undefined) {
|
|
1065
|
+
log.error("Agent activity returned NULL status after approval", { executionId });
|
|
1066
|
+
throw new Error(options.nullResultAfterApprovalMessage);
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
phase = getPhaseFromResult(result);
|
|
1070
|
+
log.info("Activity returned slim status after approval", {
|
|
1071
|
+
executionId,
|
|
1072
|
+
phase: ExecutionPhase[phase],
|
|
1073
|
+
cycle: approvalCycle,
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
return result;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
// ─── Failure/cancellation cleanup ───────────────────────────────────────
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* FAILED persist on the system-error path. The worker-shutdown shapes
|
|
1084
|
+
* persist the honest platform-failure copy instead of raw Temporal
|
|
1085
|
+
* internals ("Worker is shutting down and this activity did not complete
|
|
1086
|
+
* in time" reached users in the 2026-08-08 incident, #776) — the raw text
|
|
1087
|
+
* stays in the workflow log; status.error is a user surface.
|
|
1088
|
+
*/
|
|
1089
|
+
async function updateStatusOnFailure(
|
|
1090
|
+
executionId: string,
|
|
1091
|
+
originalError: unknown,
|
|
1092
|
+
): Promise<void> {
|
|
1093
|
+
log.info("Updating execution status to FAILED", { executionId });
|
|
1094
|
+
|
|
1095
|
+
const statusError = isWorkerShutdown(originalError)
|
|
1096
|
+
? WORKER_SHUTDOWN_STATUS_ERROR
|
|
1097
|
+
: errorMessage(originalError);
|
|
1098
|
+
|
|
1099
|
+
const failedStatus = create(AgentExecutionStatusSchema, {
|
|
1100
|
+
phase: ExecutionPhase.EXECUTION_FAILED,
|
|
1101
|
+
error: statusError,
|
|
1102
|
+
messages: [
|
|
1103
|
+
{
|
|
1104
|
+
type: MessageType.MESSAGE_SYSTEM,
|
|
1105
|
+
content:
|
|
1106
|
+
"Internal system error occurred during execution. Please contact support if this issue persists.",
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
type: MessageType.MESSAGE_SYSTEM,
|
|
1110
|
+
content: `Error details: ${statusError}`,
|
|
1111
|
+
},
|
|
1112
|
+
],
|
|
1113
|
+
});
|
|
1114
|
+
|
|
1115
|
+
await failurePathActivities[UPDATE_EXECUTION_STATUS_ACTIVITY_NAME](
|
|
1116
|
+
executionId,
|
|
1117
|
+
toJson(AgentExecutionStatusSchema, failedStatus),
|
|
1118
|
+
);
|
|
1119
|
+
log.info("Updated execution status to FAILED", { executionId });
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
/**
|
|
1123
|
+
* Cancellation cleanup on a non-cancellable scope (Go's disconnected
|
|
1124
|
+
* context): every operation is best-effort and independent — the
|
|
1125
|
+
* execution must reach CANCELLED and secrets (ExecutionContext) must be
|
|
1126
|
+
* cleaned up regardless.
|
|
1127
|
+
*/
|
|
1128
|
+
async function handleCancellation(
|
|
1129
|
+
executionId: string,
|
|
1130
|
+
callbackToken: string,
|
|
1131
|
+
): Promise<void> {
|
|
1132
|
+
await CancellationScope.nonCancellable(async () => {
|
|
1133
|
+
await updateStatusOnCancellation(executionId);
|
|
1134
|
+
|
|
1135
|
+
if (callbackToken !== "") {
|
|
1136
|
+
try {
|
|
1137
|
+
await completionActivities[COMPLETE_EXTERNAL_ACTIVITY_NAME]({
|
|
1138
|
+
callbackToken,
|
|
1139
|
+
errorMessage: "execution cancelled",
|
|
1140
|
+
});
|
|
1141
|
+
} catch (error) {
|
|
1142
|
+
log.warn("Failed to notify parent of cancellation (best-effort)", {
|
|
1143
|
+
executionId,
|
|
1144
|
+
error: errorMessage(error),
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
await deleteExecutionContext(executionId);
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
/**
|
|
1154
|
+
* CANCELLED persist. Deliberately sets NO status.error: a user-initiated
|
|
1155
|
+
* cancel is a quiet terminal state, not a failure (stigmer#282) — display
|
|
1156
|
+
* layers key error styling on phase, so a sentinel here would render the
|
|
1157
|
+
* stop as a red failure. The muted MESSAGE_SYSTEM line is the durable
|
|
1158
|
+
* in-transcript marker. Regular activity for the same replay-safety
|
|
1159
|
+
* reasons as updateStatusOnFailure.
|
|
1160
|
+
*/
|
|
1161
|
+
async function updateStatusOnCancellation(executionId: string): Promise<void> {
|
|
1162
|
+
const cancelledStatus = create(AgentExecutionStatusSchema, {
|
|
1163
|
+
phase: ExecutionPhase.EXECUTION_CANCELLED,
|
|
1164
|
+
messages: [
|
|
1165
|
+
{
|
|
1166
|
+
type: MessageType.MESSAGE_SYSTEM,
|
|
1167
|
+
content: "Execution was cancelled.",
|
|
1168
|
+
},
|
|
1169
|
+
],
|
|
1170
|
+
});
|
|
1171
|
+
|
|
1172
|
+
try {
|
|
1173
|
+
await failurePathActivities[UPDATE_EXECUTION_STATUS_ACTIVITY_NAME](
|
|
1174
|
+
executionId,
|
|
1175
|
+
toJson(AgentExecutionStatusSchema, cancelledStatus),
|
|
1176
|
+
);
|
|
1177
|
+
log.info("Updated execution status to CANCELLED", { executionId });
|
|
1178
|
+
} catch (error) {
|
|
1179
|
+
log.warn("Failed to update execution status to CANCELLED", {
|
|
1180
|
+
executionId,
|
|
1181
|
+
error: errorMessage(error),
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
// ─── Local-activity helpers ─────────────────────────────────────────────
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* Fallback status persist (LOCAL activity — the regular/local split is
|
|
1190
|
+
* brief #2's contract): safe to call when the runner already persisted
|
|
1191
|
+
* via gRPC — the merge is idempotent for identical data.
|
|
1192
|
+
*/
|
|
1193
|
+
async function persistFinalStatus(
|
|
1194
|
+
executionId: string,
|
|
1195
|
+
status: AgentExecutionStatus,
|
|
1196
|
+
warnMessage: string,
|
|
1197
|
+
): Promise<void> {
|
|
1198
|
+
try {
|
|
1199
|
+
await localActivities[UPDATE_EXECUTION_STATUS_ACTIVITY_NAME](
|
|
1200
|
+
executionId,
|
|
1201
|
+
toJson(AgentExecutionStatusSchema, status),
|
|
1202
|
+
);
|
|
1203
|
+
log.info("Persisted final status via fallback", {
|
|
1204
|
+
executionId,
|
|
1205
|
+
phase: ExecutionPhase[status.phase],
|
|
1206
|
+
});
|
|
1207
|
+
} catch (error) {
|
|
1208
|
+
log.warn(warnMessage, { executionId, error: errorMessage(error) });
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Overwrites any transient FAILED the interrupted activity may have
|
|
1214
|
+
* written with IN_PROGRESS, so the UI shows the execution as resuming
|
|
1215
|
+
* rather than flashing failed while the workflow re-invokes. Phase-only
|
|
1216
|
+
* (no appended message) to stay idempotent across recovery cycles.
|
|
1217
|
+
*/
|
|
1218
|
+
async function persistInterruptedStatus(executionId: string): Promise<void> {
|
|
1219
|
+
await persistFinalStatus(
|
|
1220
|
+
executionId,
|
|
1221
|
+
create(AgentExecutionStatusSchema, {
|
|
1222
|
+
phase: ExecutionPhase.EXECUTION_IN_PROGRESS,
|
|
1223
|
+
}),
|
|
1224
|
+
"Failed to persist interrupted/resuming status (non-fatal)",
|
|
1225
|
+
);
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* Re-asserts IN_PROGRESS after a resume, healing the stale-PAUSED write
|
|
1230
|
+
* the pause branch's defense persist can land over a fast resume's
|
|
1231
|
+
* IN_PROGRESS (oss#869 — the race is shared with Go; this correcting
|
|
1232
|
+
* write is a TS-side addition in the safe direction, owner-ratified,
|
|
1233
|
+
* mirroring persistInterruptedStatus's idiom). Phase-only and idempotent
|
|
1234
|
+
* across pause cycles; best-effort like every defense persist.
|
|
1235
|
+
*/
|
|
1236
|
+
async function persistResumedStatus(executionId: string): Promise<void> {
|
|
1237
|
+
await persistFinalStatus(
|
|
1238
|
+
executionId,
|
|
1239
|
+
create(AgentExecutionStatusSchema, {
|
|
1240
|
+
phase: ExecutionPhase.EXECUTION_IN_PROGRESS,
|
|
1241
|
+
}),
|
|
1242
|
+
"Failed to persist resumed status (non-fatal)",
|
|
1243
|
+
);
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
/**
|
|
1247
|
+
* Loads the CURRENT execution from the system of record (the workflow's
|
|
1248
|
+
* input snapshot is stale by completion time). Proto-JSON at the payload
|
|
1249
|
+
* boundary; parsed to the typed message here.
|
|
1250
|
+
*/
|
|
1251
|
+
async function loadExecution(executionId: string): Promise<AgentExecution> {
|
|
1252
|
+
let raw: JsonValue;
|
|
1253
|
+
try {
|
|
1254
|
+
raw = await localActivities[LOAD_AGENT_EXECUTION_ACTIVITY_NAME](executionId);
|
|
1255
|
+
} catch (error) {
|
|
1256
|
+
throw new Error(`load execution ${executionId}: ${errorMessage(error)}`, {
|
|
1257
|
+
cause: error,
|
|
1258
|
+
});
|
|
1259
|
+
}
|
|
1260
|
+
return fromJson(AgentExecutionSchema, raw);
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
async function readHarnessStateId(sessionId: string): Promise<string> {
|
|
1264
|
+
try {
|
|
1265
|
+
return await localActivities[READ_HARNESS_STATE_ID_ACTIVITY_NAME](sessionId);
|
|
1266
|
+
} catch (error) {
|
|
1267
|
+
throw new Error(
|
|
1268
|
+
`read session harness_state_id for ${sessionId}: ${errorMessage(error)}`,
|
|
1269
|
+
{ cause: error },
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* Deletes the ephemeral ExecutionContext (fully-merged environment incl.
|
|
1276
|
+
* secrets) on a non-cancellable scope so cleanup runs even after
|
|
1277
|
+
* cancellation. Best-effort; the delete activity itself never throws on
|
|
1278
|
+
* missing contexts (#15's seam). A failed cleanup is never retried — no
|
|
1279
|
+
* TTL sweep exists (oss#892; the retired Go server's log claimed one
|
|
1280
|
+
* that never did) — the row stays encrypted at rest (oss#535) and this
|
|
1281
|
+
* WARN is the operator's signal.
|
|
1282
|
+
*/
|
|
1283
|
+
async function deleteExecutionContext(executionId: string): Promise<void> {
|
|
1284
|
+
await CancellationScope.nonCancellable(async () => {
|
|
1285
|
+
try {
|
|
1286
|
+
await localActivities[DELETE_EXECUTION_CONTEXT_ACTIVITY_NAME](executionId);
|
|
1287
|
+
log.info("ExecutionContext cleaned up", { executionId });
|
|
1288
|
+
} catch (error) {
|
|
1289
|
+
log.warn(
|
|
1290
|
+
"ExecutionContext cleanup failed — nothing retries it; any remaining row stays encrypted at rest (operator cleanup)",
|
|
1291
|
+
{
|
|
1292
|
+
executionId,
|
|
1293
|
+
error: errorMessage(error),
|
|
1294
|
+
},
|
|
1295
|
+
);
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
// ─── Callback result and error classification ───────────────────────────
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* The result handed to the parent's external activity (the runner's
|
|
1304
|
+
* agent_call). Keys and value SHAPES are a cross-component contract:
|
|
1305
|
+
* total_tokens is a JSON NUMBER (Go writes int64 as a number; proto-ES
|
|
1306
|
+
* renders int64 as bigint, converted explicitly). Structured output
|
|
1307
|
+
* passes through from the runner's extraction with a persisted-status
|
|
1308
|
+
* fallback; the three key spellings are historical resilience.
|
|
1309
|
+
*/
|
|
1310
|
+
function buildCallbackResult(
|
|
1311
|
+
activityResult: RunnerActivityResult | undefined,
|
|
1312
|
+
execution: AgentExecution,
|
|
1313
|
+
): Record<string, unknown> {
|
|
1314
|
+
const result: Record<string, unknown> = {
|
|
1315
|
+
agent_execution_id: execution.metadata?.id ?? "",
|
|
1316
|
+
};
|
|
1317
|
+
|
|
1318
|
+
// The runner's result is untyped JSON; a primitive would crash the `in`
|
|
1319
|
+
// checks below (getPhaseFromResult's tolerant posture, extended here).
|
|
1320
|
+
if (
|
|
1321
|
+
activityResult !== undefined &&
|
|
1322
|
+
typeof activityResult === "object" &&
|
|
1323
|
+
activityResult !== null
|
|
1324
|
+
) {
|
|
1325
|
+
if ("structuredOutput" in activityResult) {
|
|
1326
|
+
result["structured"] = activityResult["structuredOutput"];
|
|
1327
|
+
} else if ("structured_output" in activityResult) {
|
|
1328
|
+
result["structured"] = activityResult["structured_output"];
|
|
1329
|
+
} else if ("structured" in activityResult) {
|
|
1330
|
+
result["structured"] = activityResult["structured"];
|
|
1331
|
+
}
|
|
1332
|
+
if ("final_text" in activityResult) {
|
|
1333
|
+
result["final_text"] = activityResult["final_text"];
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
if (!("structured" in result)) {
|
|
1338
|
+
// protobuf-es represents google.protobuf.Struct fields as plain
|
|
1339
|
+
// JsonObject — already the JSON shape Go's AsMap() produces.
|
|
1340
|
+
const structuredOutput = execution.status?.structuredOutput;
|
|
1341
|
+
if (structuredOutput !== undefined) {
|
|
1342
|
+
result["structured"] = structuredOutput;
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
const streamingUsage = execution.status?.streamingUsage;
|
|
1347
|
+
if (streamingUsage !== undefined) {
|
|
1348
|
+
result["usage_summary"] = {
|
|
1349
|
+
total_tokens: Number(streamingUsage.totalTokens),
|
|
1350
|
+
estimated_cost_usd: streamingUsage.estimatedCostUsd,
|
|
1351
|
+
};
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
return result;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* Whether an activity error is a transient interruption the execution can
|
|
1359
|
+
* resume from (re-invoking re-reads the harness_state_id / LangGraph
|
|
1360
|
+
* checkpoint), as opposed to a genuine failure.
|
|
1361
|
+
*
|
|
1362
|
+
* Recoverable: a HEARTBEAT timeout (the worker stopped heartbeating
|
|
1363
|
+
* because it crashed, slept, or was reaped mid-run), an infrastructure
|
|
1364
|
+
* cancellation that is NOT a user pause (the pause branch handles those)
|
|
1365
|
+
* and NOT an external workflow cancellation (the caller guards on the
|
|
1366
|
+
* workflow-cancelled flag), and a worker-shutdown drain (#776 owner
|
|
1367
|
+
* ruling). NOT recoverable: SCHEDULE_TO_START / START_TO_CLOSE timeouts
|
|
1368
|
+
* and application errors — re-invoking those would not change the
|
|
1369
|
+
* outcome.
|
|
1370
|
+
*/
|
|
1371
|
+
function isRecoverableActivityError(error: unknown): boolean {
|
|
1372
|
+
const timeout = findInCauseChain(error, TimeoutFailure);
|
|
1373
|
+
if (timeout !== undefined) {
|
|
1374
|
+
return timeout.timeoutType === TimeoutType.HEARTBEAT;
|
|
1375
|
+
}
|
|
1376
|
+
return isCancellation(error) || isWorkerShutdown(error);
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* Wraps activity errors with operator-actionable context (Go
|
|
1381
|
+
* wrapActivityError). The prefix copy is OURS and byte-pinned from Go;
|
|
1382
|
+
* the "Original error:" tail carries the SDK-authored failure text,
|
|
1383
|
+
* which necessarily differs between the Go and TS SDKs (disclosed in the
|
|
1384
|
+
* sub-project's parity register).
|
|
1385
|
+
*/
|
|
1386
|
+
function wrapActivityError(activityName: string, error: unknown): Error {
|
|
1387
|
+
const original = errorMessage(error);
|
|
1388
|
+
const timeout = findInCauseChain(error, TimeoutFailure);
|
|
1389
|
+
if (timeout !== undefined) {
|
|
1390
|
+
switch (timeout.timeoutType) {
|
|
1391
|
+
case TimeoutType.SCHEDULE_TO_START:
|
|
1392
|
+
return new Error(
|
|
1393
|
+
`activity '${activityName}' failed: No worker available to execute activity. ` +
|
|
1394
|
+
"This usually means:\n" +
|
|
1395
|
+
"1. the Stigmer runner is not running\n" +
|
|
1396
|
+
"2. the runner failed to start (check runner logs for startup errors)\n" +
|
|
1397
|
+
"3. the runner is not connected to Temporal\n" +
|
|
1398
|
+
`Original error: ${original}`,
|
|
1399
|
+
{ cause: error },
|
|
1400
|
+
);
|
|
1401
|
+
case TimeoutType.HEARTBEAT:
|
|
1402
|
+
return new Error(
|
|
1403
|
+
`activity '${activityName}' failed: Activity stopped sending heartbeat (worker may have crashed). ` +
|
|
1404
|
+
"Check runner logs for errors. " +
|
|
1405
|
+
`Original error: ${original}`,
|
|
1406
|
+
{ cause: error },
|
|
1407
|
+
);
|
|
1408
|
+
case TimeoutType.START_TO_CLOSE:
|
|
1409
|
+
return new Error(
|
|
1410
|
+
`activity '${activityName}' failed: Activity execution timed out. ` +
|
|
1411
|
+
"The activity started but did not complete within the timeout period. " +
|
|
1412
|
+
"Check runner logs for details. " +
|
|
1413
|
+
`Original error: ${original}`,
|
|
1414
|
+
{ cause: error },
|
|
1415
|
+
);
|
|
1416
|
+
default:
|
|
1417
|
+
return new Error(
|
|
1418
|
+
`activity '${activityName}' failed with timeout (type: ${goTimeoutTypeName(timeout.timeoutType)}). ` +
|
|
1419
|
+
"Check runner logs for details. " +
|
|
1420
|
+
`Original error: ${original}`,
|
|
1421
|
+
{ cause: error },
|
|
1422
|
+
);
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
if (findInCauseChain(error, ApplicationFailure) !== undefined) {
|
|
1427
|
+
return new Error(
|
|
1428
|
+
`activity '${activityName}' failed with application error: ${original}. ` +
|
|
1429
|
+
"Check runner logs for detailed error information.",
|
|
1430
|
+
{ cause: error },
|
|
1431
|
+
);
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
return new Error(
|
|
1435
|
+
`activity '${activityName}' failed: ${original}. ` +
|
|
1436
|
+
"Check runner logs for details. " +
|
|
1437
|
+
`Original error: ${original}`,
|
|
1438
|
+
{ cause: error },
|
|
1439
|
+
);
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* Renders a timeout type with Go's enum String() spelling
|
|
1444
|
+
* ("ScheduleToClose", not the TS SDK's "SCHEDULE_TO_CLOSE") so the
|
|
1445
|
+
* wrapped copy stays byte-comparable across editions. Only the default
|
|
1446
|
+
* branch of wrapActivityError reaches this (no proxy configures a
|
|
1447
|
+
* ScheduleToClose timeout today).
|
|
1448
|
+
*/
|
|
1449
|
+
function goTimeoutTypeName(timeoutType: TimeoutType | undefined): string {
|
|
1450
|
+
switch (timeoutType) {
|
|
1451
|
+
case TimeoutType.START_TO_CLOSE:
|
|
1452
|
+
return "StartToClose";
|
|
1453
|
+
case TimeoutType.SCHEDULE_TO_START:
|
|
1454
|
+
return "ScheduleToStart";
|
|
1455
|
+
case TimeoutType.SCHEDULE_TO_CLOSE:
|
|
1456
|
+
return "ScheduleToClose";
|
|
1457
|
+
case TimeoutType.HEARTBEAT:
|
|
1458
|
+
return "Heartbeat";
|
|
1459
|
+
default:
|
|
1460
|
+
return "Unspecified";
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
function findInCauseChain<T extends Error>(
|
|
1465
|
+
error: unknown,
|
|
1466
|
+
ctor: new (...args: never[]) => T,
|
|
1467
|
+
): T | undefined {
|
|
1468
|
+
for (
|
|
1469
|
+
let e: unknown = error;
|
|
1470
|
+
e instanceof Error;
|
|
1471
|
+
e = (e as { cause?: unknown }).cause
|
|
1472
|
+
) {
|
|
1473
|
+
if (e instanceof ctor) {
|
|
1474
|
+
return e;
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
return undefined;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
/**
|
|
1481
|
+
* The dispatch-resolved activity queue, pinned in the workflow memo at
|
|
1482
|
+
* creation (workflow_creator.go). The fallback "should never happen if
|
|
1483
|
+
* the workflow is created properly" (Go getActivityTaskQueue).
|
|
1484
|
+
*/
|
|
1485
|
+
function getActivityTaskQueue(): string {
|
|
1486
|
+
const memoValue = workflowInfo().memo?.[MEMO_ACTIVITY_TASK_QUEUE];
|
|
1487
|
+
if (typeof memoValue === "string" && memoValue !== "") {
|
|
1488
|
+
return memoValue;
|
|
1489
|
+
}
|
|
1490
|
+
return DEFAULT_ACTIVITY_TASK_QUEUE;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
function errorMessage(error: unknown): string {
|
|
1494
|
+
return error instanceof Error ? error.message : String(error);
|
|
1495
|
+
}
|