@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,1502 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pins the agentexecution Phase-1 surfaces against Go's controller —
|
|
3
|
+
* through the REAL stack: a composed server on an ephemeral port, a
|
|
4
|
+
* native gRPC client, the full interceptor chain. Executions cannot be
|
|
5
|
+
* created through the RPC surface here (the engine gate refuses without
|
|
6
|
+
* Temporal — exactly the production posture until #18), so records are
|
|
7
|
+
* seeded directly through the store, the same way Go's controller tests
|
|
8
|
+
* seed with SaveResource.
|
|
9
|
+
*
|
|
10
|
+
* Load-bearing pins the conformance suite cannot cover:
|
|
11
|
+
* - the MANGLED unknown-execution message on getExecutionUsageReport,
|
|
12
|
+
* byte-for-byte (sub-project DD-001: faithful-port + OSS issue);
|
|
13
|
+
* - getAgentUsageReport org scoping (oss#389) incl. the no-name-oracle
|
|
14
|
+
* rule (Go get_agent_usage_report_test.go case-for-case);
|
|
15
|
+
* - list/listBySession filter semantics over seeded rows and the
|
|
16
|
+
* total_pages placeholder;
|
|
17
|
+
* - update's status-clearing standard build and delete's audit-trail
|
|
18
|
+
* return, over the wire;
|
|
19
|
+
* - the populated getExecutionSummary arm (phase counts, active count,
|
|
20
|
+
* avg duration, failure ranks) that the zero-record conformance arm
|
|
21
|
+
* cannot reach.
|
|
22
|
+
*/
|
|
23
|
+
import { newPermissiveSingleTeamAuthorizer } from "../../../pipeline/steps/authorize.js";
|
|
24
|
+
import { testCallerIdentity } from "../../../pipeline/__tests__/support.js";
|
|
25
|
+
import { mkdtempSync, rmSync } from "node:fs";
|
|
26
|
+
import { tmpdir } from "node:os";
|
|
27
|
+
import path from "node:path";
|
|
28
|
+
|
|
29
|
+
import { create, fromBinary } from "@bufbuild/protobuf";
|
|
30
|
+
import type { MessageInitShape } from "@bufbuild/protobuf";
|
|
31
|
+
import { Code, ConnectError, createClient } from "@connectrpc/connect";
|
|
32
|
+
import type { Client, Transport } from "@connectrpc/connect";
|
|
33
|
+
import { createGrpcTransport } from "@connectrpc/connect-node";
|
|
34
|
+
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
|
|
35
|
+
|
|
36
|
+
import { AgentSchema } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
|
|
37
|
+
import { AgentExecutionSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
38
|
+
import { AgentExecutionCommandController } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/command_pb";
|
|
39
|
+
import {
|
|
40
|
+
ApprovalAction,
|
|
41
|
+
ApprovalEventType,
|
|
42
|
+
DiffCompleteness,
|
|
43
|
+
ExecutionPhase,
|
|
44
|
+
FileChangeKind,
|
|
45
|
+
FileChangeSetStatus,
|
|
46
|
+
FileDecisionAction,
|
|
47
|
+
FileDecisionOrigin,
|
|
48
|
+
FileDecisionScope,
|
|
49
|
+
FileReviewEventType,
|
|
50
|
+
MessageType,
|
|
51
|
+
ServiceTier,
|
|
52
|
+
ToolCallStatus,
|
|
53
|
+
} from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
54
|
+
import { CapturedFileChangeSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/filereview_pb";
|
|
55
|
+
import {
|
|
56
|
+
SubmitApprovalInputSchema,
|
|
57
|
+
SubmitFileDecisionInputSchema,
|
|
58
|
+
} from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/io_pb";
|
|
59
|
+
import { AgentExecutionQueryController } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/query_pb";
|
|
60
|
+
import { SessionSchema } from "@stigmer/protos/ai/stigmer/agentic/session/v1/api_pb";
|
|
61
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
62
|
+
|
|
63
|
+
import { loadConfig } from "../../../boot/config.js";
|
|
64
|
+
import { composeServer } from "../../../boot/compose.js";
|
|
65
|
+
import type { ComposedServer } from "../../../boot/compose.js";
|
|
66
|
+
import { createLogger } from "../../../boot/logger.js";
|
|
67
|
+
import { executionUsageReportNotFoundMessage } from "../constants.js";
|
|
68
|
+
import type { AgentExecutionStatusTransition } from "../../../extensions/status-hooks.js";
|
|
69
|
+
import type {
|
|
70
|
+
ConnectedExecutionEngine,
|
|
71
|
+
ExecutionEngineState,
|
|
72
|
+
} from "../engine.js";
|
|
73
|
+
import { EngineWorkflowNotFoundError } from "../engine.js";
|
|
74
|
+
import { aggregateDigest, fileDigest } from "../filereview/digest.js";
|
|
75
|
+
import { submitApproval } from "../submit-approval.js";
|
|
76
|
+
import { submitFileDecision } from "../submit-file-decision.js";
|
|
77
|
+
import { stubConnectedEngine } from "./engine-stub.js";
|
|
78
|
+
|
|
79
|
+
const silentLogger = createLogger({
|
|
80
|
+
level: "error",
|
|
81
|
+
pretty: false,
|
|
82
|
+
write: () => {},
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const API_VERSION = "agentic.stigmer.ai/v1";
|
|
86
|
+
const KIND = "AgentExecution";
|
|
87
|
+
const ORG = "acme";
|
|
88
|
+
|
|
89
|
+
type CommandClient = Client<typeof AgentExecutionCommandController>;
|
|
90
|
+
type QueryClient = Client<typeof AgentExecutionQueryController>;
|
|
91
|
+
|
|
92
|
+
let server: ComposedServer;
|
|
93
|
+
let dir: string;
|
|
94
|
+
let command: CommandClient;
|
|
95
|
+
let query: QueryClient;
|
|
96
|
+
|
|
97
|
+
beforeAll(async () => {
|
|
98
|
+
dir = mkdtempSync(path.join(tmpdir(), "aexec-domain-test-"));
|
|
99
|
+
vi.stubEnv("STIGMER_ENCRYPTION_KEY", Buffer.alloc(32, 7).toString("base64"));
|
|
100
|
+
vi.stubEnv(
|
|
101
|
+
"STIGMER_RUNNER_TOKEN_KEY",
|
|
102
|
+
Buffer.alloc(32, 8).toString("base64"),
|
|
103
|
+
);
|
|
104
|
+
server = await composeServer({
|
|
105
|
+
config: loadConfig({
|
|
106
|
+
STIGMER_MODEL_REGISTRY_REFRESH: "off",
|
|
107
|
+
// No engine behind composed tests: 127.0.0.1:1 is deterministically
|
|
108
|
+
// closed, so boots fail the non-fatal connect fast and can never touch
|
|
109
|
+
// a live local Temporal (the conformance CRUD harness does the same).
|
|
110
|
+
TEMPORAL_HOST_PORT: "127.0.0.1:1",
|
|
111
|
+
DB_PATH: path.join(dir, "stigmer.db"),
|
|
112
|
+
// The skill artifact store + staging wipe (#8) must stay inside the
|
|
113
|
+
// test dir — the default resolves to ~/.stigmer/storage.
|
|
114
|
+
STORAGE_PATH: path.join(dir, "storage"),
|
|
115
|
+
// Keep the artifact store inside the test dir — the default
|
|
116
|
+
// resolves to ~/.stigmer, which tests must never touch.
|
|
117
|
+
ARTIFACT_LOCAL_BASE_PATH: path.join(dir, "artifacts"),
|
|
118
|
+
}),
|
|
119
|
+
logger: silentLogger,
|
|
120
|
+
portOverride: 0,
|
|
121
|
+
host: "127.0.0.1",
|
|
122
|
+
});
|
|
123
|
+
const port = await server.start();
|
|
124
|
+
const transport: Transport = createGrpcTransport({
|
|
125
|
+
baseUrl: `http://127.0.0.1:${port}`,
|
|
126
|
+
});
|
|
127
|
+
command = createClient(AgentExecutionCommandController, transport);
|
|
128
|
+
query = createClient(AgentExecutionQueryController, transport);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
afterAll(async () => {
|
|
132
|
+
try {
|
|
133
|
+
await server?.shutdown();
|
|
134
|
+
rmSync(dir, { recursive: true, force: true });
|
|
135
|
+
} finally {
|
|
136
|
+
vi.unstubAllEnvs();
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
let counter = 0;
|
|
141
|
+
function seedInput(overrides?: {
|
|
142
|
+
id?: string;
|
|
143
|
+
org?: string;
|
|
144
|
+
sessionId?: string;
|
|
145
|
+
agentId?: string;
|
|
146
|
+
phase?: ExecutionPhase;
|
|
147
|
+
startedAt?: string;
|
|
148
|
+
completedAt?: string;
|
|
149
|
+
}): MessageInitShape<typeof AgentExecutionSchema> & {
|
|
150
|
+
metadata: { id: string };
|
|
151
|
+
} {
|
|
152
|
+
counter += 1;
|
|
153
|
+
const id = overrides?.id ?? `aexec_test_${counter}`;
|
|
154
|
+
const slug = `exec-${id.replaceAll("_", "-")}`;
|
|
155
|
+
return {
|
|
156
|
+
apiVersion: API_VERSION,
|
|
157
|
+
kind: KIND,
|
|
158
|
+
metadata: {
|
|
159
|
+
id,
|
|
160
|
+
name: slug,
|
|
161
|
+
slug,
|
|
162
|
+
org: overrides?.org ?? ORG,
|
|
163
|
+
},
|
|
164
|
+
spec: {
|
|
165
|
+
sessionId: overrides?.sessionId ?? `ses_test_${counter}`,
|
|
166
|
+
agentId: overrides?.agentId ?? `agt_test_${counter}`,
|
|
167
|
+
message: "Say hello.",
|
|
168
|
+
},
|
|
169
|
+
status: {
|
|
170
|
+
phase: overrides?.phase ?? ExecutionPhase.EXECUTION_COMPLETED,
|
|
171
|
+
startedAt: overrides?.startedAt ?? "",
|
|
172
|
+
completedAt: overrides?.completedAt ?? "",
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
async function seed(
|
|
178
|
+
init: MessageInitShape<typeof AgentExecutionSchema> & {
|
|
179
|
+
metadata: { id: string };
|
|
180
|
+
},
|
|
181
|
+
): Promise<string> {
|
|
182
|
+
await server.store.saveResource(
|
|
183
|
+
ApiResourceKind.agent_execution,
|
|
184
|
+
init.metadata.id,
|
|
185
|
+
AgentExecutionSchema,
|
|
186
|
+
create(AgentExecutionSchema, init),
|
|
187
|
+
);
|
|
188
|
+
return init.metadata.id;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
async function expectCode(
|
|
192
|
+
fn: () => Promise<unknown>,
|
|
193
|
+
code: Code,
|
|
194
|
+
): Promise<ConnectError> {
|
|
195
|
+
try {
|
|
196
|
+
await fn();
|
|
197
|
+
} catch (error) {
|
|
198
|
+
expect(error).toBeInstanceOf(ConnectError);
|
|
199
|
+
const connectError = error as ConnectError;
|
|
200
|
+
expect(connectError.code).toBe(code);
|
|
201
|
+
return connectError;
|
|
202
|
+
}
|
|
203
|
+
throw new Error(`expected code ${Code[code]}, call succeeded`);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
describe("create over the wire (engine gate)", () => {
|
|
207
|
+
it("valid create refuses Unavailable at the engine gate, BEFORE any side effect", async () => {
|
|
208
|
+
// Seed an agent the request references, so target resolution and
|
|
209
|
+
// validation pass and the refusal is provably the engine gate.
|
|
210
|
+
await server.store.saveResource(
|
|
211
|
+
ApiResourceKind.agent,
|
|
212
|
+
"agt_create_gate",
|
|
213
|
+
AgentSchema,
|
|
214
|
+
create(AgentSchema, {
|
|
215
|
+
apiVersion: "agentic.stigmer.ai/v1",
|
|
216
|
+
kind: "Agent",
|
|
217
|
+
metadata: { id: "agt_create_gate", name: "gate-agent", org: ORG },
|
|
218
|
+
}),
|
|
219
|
+
);
|
|
220
|
+
|
|
221
|
+
const err = await expectCode(
|
|
222
|
+
() =>
|
|
223
|
+
command.create({
|
|
224
|
+
apiVersion: API_VERSION,
|
|
225
|
+
kind: KIND,
|
|
226
|
+
metadata: { name: "gated-exec", org: ORG },
|
|
227
|
+
spec: { agentId: "agt_create_gate", message: "hello" },
|
|
228
|
+
}),
|
|
229
|
+
Code.Unavailable,
|
|
230
|
+
);
|
|
231
|
+
expect(err.rawMessage).toBe(
|
|
232
|
+
"The execution engine is temporarily unavailable. Please try again shortly.",
|
|
233
|
+
);
|
|
234
|
+
|
|
235
|
+
// The gate ran before the side-effecting steps: nothing persisted.
|
|
236
|
+
// Both checks filter to THIS request's artifacts rather than
|
|
237
|
+
// asserting global emptiness, so future seeding elsewhere in the
|
|
238
|
+
// file can never make them order-dependent.
|
|
239
|
+
const executions = await server.store.listResources(
|
|
240
|
+
ApiResourceKind.agent_execution,
|
|
241
|
+
);
|
|
242
|
+
for (const data of executions) {
|
|
243
|
+
const row = fromBinary(AgentExecutionSchema, data);
|
|
244
|
+
expect(row.metadata?.name).not.toBe("gated-exec");
|
|
245
|
+
}
|
|
246
|
+
const sessions = await server.store.listResources(ApiResourceKind.session);
|
|
247
|
+
for (const data of sessions) {
|
|
248
|
+
const row = fromBinary(SessionSchema, data);
|
|
249
|
+
expect(row.spec?.agentInstanceId ?? "").not.toContain("agt_create_gate");
|
|
250
|
+
expect(row.spec?.subject).not.toBe("Auto-created session");
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
it("validation runs before the gate: a tier without a model answers InvalidArgument", async () => {
|
|
255
|
+
const err = await expectCode(
|
|
256
|
+
() =>
|
|
257
|
+
command.create({
|
|
258
|
+
apiVersion: API_VERSION,
|
|
259
|
+
kind: KIND,
|
|
260
|
+
metadata: { name: "bad-tier-exec", org: ORG },
|
|
261
|
+
spec: {
|
|
262
|
+
agentId: "agt_create_gate",
|
|
263
|
+
message: "hello",
|
|
264
|
+
executionConfig: { serviceTier: ServiceTier.FAST },
|
|
265
|
+
},
|
|
266
|
+
}),
|
|
267
|
+
Code.InvalidArgument,
|
|
268
|
+
);
|
|
269
|
+
expect(err.rawMessage).toContain("requires execution_config.model_name");
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
it("session_id and session_spec together refuse at proto validation", async () => {
|
|
273
|
+
await expectCode(
|
|
274
|
+
() =>
|
|
275
|
+
command.create({
|
|
276
|
+
apiVersion: API_VERSION,
|
|
277
|
+
kind: KIND,
|
|
278
|
+
metadata: { name: "both-exec", org: ORG },
|
|
279
|
+
spec: {
|
|
280
|
+
message: "hello",
|
|
281
|
+
sessionId: "ses_1",
|
|
282
|
+
sessionSpec: { agentInstanceId: "inst_1" },
|
|
283
|
+
},
|
|
284
|
+
}),
|
|
285
|
+
Code.InvalidArgument,
|
|
286
|
+
);
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
it("a forged server-owned harness_state_id in session_spec refuses at proto validation", async () => {
|
|
290
|
+
// Go create_session_bootstrap_test.go: harness_state_id is
|
|
291
|
+
// server-owned — a caller seeding thread state must be rejected by
|
|
292
|
+
// the CEL rule, not silently honored.
|
|
293
|
+
await expectCode(
|
|
294
|
+
() =>
|
|
295
|
+
command.create({
|
|
296
|
+
apiVersion: API_VERSION,
|
|
297
|
+
kind: KIND,
|
|
298
|
+
metadata: { name: "forged-exec", org: ORG },
|
|
299
|
+
spec: {
|
|
300
|
+
message: "hello",
|
|
301
|
+
sessionSpec: {
|
|
302
|
+
agentInstanceId: "inst_1",
|
|
303
|
+
harnessStateId: "thread-forged",
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
}),
|
|
307
|
+
Code.InvalidArgument,
|
|
308
|
+
);
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
describe("get / list / listBySession over the wire", () => {
|
|
313
|
+
it("get answers NotFound for an unknown id and the record for a seeded one", async () => {
|
|
314
|
+
await expectCode(
|
|
315
|
+
() => query.get({ value: "aexec_missing" }),
|
|
316
|
+
Code.NotFound,
|
|
317
|
+
);
|
|
318
|
+
|
|
319
|
+
const id = await seed(seedInput());
|
|
320
|
+
const got = await query.get({ value: id });
|
|
321
|
+
expect(got.metadata?.id).toBe(id);
|
|
322
|
+
expect(got.spec?.message).toBe("Say hello.");
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
it("list returns every row with the total_pages placeholder, filtered by phase on request", async () => {
|
|
326
|
+
const completed = await seed(
|
|
327
|
+
seedInput({ phase: ExecutionPhase.EXECUTION_COMPLETED }),
|
|
328
|
+
);
|
|
329
|
+
const failed = await seed(
|
|
330
|
+
seedInput({ phase: ExecutionPhase.EXECUTION_FAILED }),
|
|
331
|
+
);
|
|
332
|
+
|
|
333
|
+
const all = await query.list({});
|
|
334
|
+
expect(all.totalPages).toBe(1);
|
|
335
|
+
const ids = all.entries.map((e) => e.metadata?.id);
|
|
336
|
+
expect(ids).toContain(completed);
|
|
337
|
+
expect(ids).toContain(failed);
|
|
338
|
+
|
|
339
|
+
const failedOnly = await query.list({
|
|
340
|
+
phase: ExecutionPhase.EXECUTION_FAILED,
|
|
341
|
+
});
|
|
342
|
+
const failedIds = failedOnly.entries.map((e) => e.metadata?.id);
|
|
343
|
+
expect(failedIds).toContain(failed);
|
|
344
|
+
expect(failedIds).not.toContain(completed);
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
it("listBySession requires session_id and filters by it", async () => {
|
|
348
|
+
await expectCode(
|
|
349
|
+
() => query.listBySession({ sessionId: "" }),
|
|
350
|
+
Code.InvalidArgument,
|
|
351
|
+
);
|
|
352
|
+
|
|
353
|
+
const inSession = await seed(seedInput({ sessionId: "ses_shared" }));
|
|
354
|
+
const outOfSession = await seed(seedInput({ sessionId: "ses_other" }));
|
|
355
|
+
|
|
356
|
+
const result = await query.listBySession({ sessionId: "ses_shared" });
|
|
357
|
+
expect(result.totalPages).toBe(1);
|
|
358
|
+
const ids = result.entries.map((e) => e.metadata?.id);
|
|
359
|
+
expect(ids).toContain(inSession);
|
|
360
|
+
expect(ids).not.toContain(outOfSession);
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
describe("update / delete over the wire", () => {
|
|
365
|
+
it("update rewrites the spec through the standard build (status cleared per the shared pattern)", async () => {
|
|
366
|
+
const init = seedInput({ phase: ExecutionPhase.EXECUTION_FAILED });
|
|
367
|
+
const id = await seed(init);
|
|
368
|
+
|
|
369
|
+
const updated = await command.update({
|
|
370
|
+
apiVersion: API_VERSION,
|
|
371
|
+
kind: KIND,
|
|
372
|
+
metadata: init.metadata,
|
|
373
|
+
spec: {
|
|
374
|
+
sessionId: init.spec?.sessionId,
|
|
375
|
+
agentId: init.spec?.agentId,
|
|
376
|
+
message: "Say goodbye.",
|
|
377
|
+
},
|
|
378
|
+
});
|
|
379
|
+
expect(updated.metadata?.id).toBe(id);
|
|
380
|
+
expect(updated.spec?.message).toBe("Say goodbye.");
|
|
381
|
+
|
|
382
|
+
// The standard BuildUpdateState clears caller-supplied status; the
|
|
383
|
+
// persisted record reflects the update response.
|
|
384
|
+
const got = await query.get({ value: id });
|
|
385
|
+
expect(got.spec?.message).toBe("Say goodbye.");
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
it("delete returns the deleted record (audit-trail convention) and removes it", async () => {
|
|
389
|
+
const id = await seed(seedInput());
|
|
390
|
+
|
|
391
|
+
const deleted = await command.delete({ value: id });
|
|
392
|
+
expect(deleted.metadata?.id).toBe(id);
|
|
393
|
+
|
|
394
|
+
await expectCode(() => query.get({ value: id }), Code.NotFound);
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
it("delete answers NotFound for an unknown id", async () => {
|
|
398
|
+
await expectCode(
|
|
399
|
+
() => command.delete({ value: "aexec_missing" }),
|
|
400
|
+
Code.NotFound,
|
|
401
|
+
);
|
|
402
|
+
});
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
describe("usage reports over the wire", () => {
|
|
406
|
+
it("getExecutionUsageReport pins the mangled NotFound copy byte-for-byte (DD-001)", async () => {
|
|
407
|
+
await expectCode(
|
|
408
|
+
() => query.getExecutionUsageReport({ executionId: "" }),
|
|
409
|
+
Code.InvalidArgument,
|
|
410
|
+
);
|
|
411
|
+
|
|
412
|
+
const err = await expectCode(
|
|
413
|
+
() => query.getExecutionUsageReport({ executionId: "aexec_missing" }),
|
|
414
|
+
Code.NotFound,
|
|
415
|
+
);
|
|
416
|
+
expect(err.rawMessage).toBe(
|
|
417
|
+
executionUsageReportNotFoundMessage("aexec_missing"),
|
|
418
|
+
);
|
|
419
|
+
expect(err.rawMessage).toBe(
|
|
420
|
+
"agent execution '%s' not found not found: aexec_missing",
|
|
421
|
+
);
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
it("getExecutionUsageReport answers the zero aggregate for a seeded execution", async () => {
|
|
425
|
+
const id = await seed(seedInput());
|
|
426
|
+
const report = await query.getExecutionUsageReport({ executionId: id });
|
|
427
|
+
expect(report.aggregate).toBeDefined();
|
|
428
|
+
expect(report.aggregate?.totalTokens).toBe(0n);
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
it("getAgentUsageReport scopes to the requested org (oss#389)", async () => {
|
|
432
|
+
await seed(
|
|
433
|
+
seedInput({
|
|
434
|
+
agentId: "agt_scoped",
|
|
435
|
+
org: "org-a",
|
|
436
|
+
sessionId: "ses_a1",
|
|
437
|
+
startedAt: "2026-03-10T10:00:00Z",
|
|
438
|
+
}),
|
|
439
|
+
);
|
|
440
|
+
await seed(
|
|
441
|
+
seedInput({
|
|
442
|
+
agentId: "agt_scoped",
|
|
443
|
+
org: "org-a",
|
|
444
|
+
sessionId: "ses_a2",
|
|
445
|
+
startedAt: "2026-03-11T10:00:00Z",
|
|
446
|
+
}),
|
|
447
|
+
);
|
|
448
|
+
await seed(
|
|
449
|
+
seedInput({
|
|
450
|
+
agentId: "agt_scoped",
|
|
451
|
+
org: "org-b",
|
|
452
|
+
sessionId: "ses_b1",
|
|
453
|
+
startedAt: "2026-03-10T10:00:00Z",
|
|
454
|
+
}),
|
|
455
|
+
);
|
|
456
|
+
|
|
457
|
+
const orgA = await query.getAgentUsageReport({
|
|
458
|
+
agentId: "agt_scoped",
|
|
459
|
+
orgId: "org-a",
|
|
460
|
+
});
|
|
461
|
+
expect(orgA.totalExecutions).toBe(2);
|
|
462
|
+
expect(orgA.totalSessions).toBe(2);
|
|
463
|
+
for (const session of orgA.sessions) {
|
|
464
|
+
expect(session.sessionId, "org-b session must not leak").not.toBe(
|
|
465
|
+
"ses_b1",
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
const orgB = await query.getAgentUsageReport({
|
|
470
|
+
agentId: "agt_scoped",
|
|
471
|
+
orgId: "org-b",
|
|
472
|
+
});
|
|
473
|
+
expect(orgB.totalExecutions).toBe(1);
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
it("getAgentUsageReport resolves the display name only when the org used the agent (no id-to-name oracle)", async () => {
|
|
477
|
+
await server.store.saveResource(
|
|
478
|
+
ApiResourceKind.agent,
|
|
479
|
+
"agt_named",
|
|
480
|
+
AgentSchema,
|
|
481
|
+
create(AgentSchema, {
|
|
482
|
+
metadata: { id: "agt_named", name: "PR Reviewer", org: "org-a" },
|
|
483
|
+
}),
|
|
484
|
+
);
|
|
485
|
+
await seed(
|
|
486
|
+
seedInput({
|
|
487
|
+
agentId: "agt_named",
|
|
488
|
+
org: "org-a",
|
|
489
|
+
startedAt: "2026-03-10T10:00:00Z",
|
|
490
|
+
}),
|
|
491
|
+
);
|
|
492
|
+
|
|
493
|
+
const used = await query.getAgentUsageReport({
|
|
494
|
+
agentId: "agt_named",
|
|
495
|
+
orgId: "org-a",
|
|
496
|
+
});
|
|
497
|
+
expect(used.agentName).toBe("PR Reviewer");
|
|
498
|
+
|
|
499
|
+
const unused = await query.getAgentUsageReport({
|
|
500
|
+
agentId: "agt_named",
|
|
501
|
+
orgId: "org-never-used",
|
|
502
|
+
});
|
|
503
|
+
expect(unused.agentName, "the raw id, not the name").toBe("agt_named");
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
it("the scope-field refusals: agent report without org_id, org report without dates", async () => {
|
|
507
|
+
await expectCode(
|
|
508
|
+
() => query.getAgentUsageReport({ agentId: "agt_x" }),
|
|
509
|
+
Code.InvalidArgument,
|
|
510
|
+
);
|
|
511
|
+
await expectCode(
|
|
512
|
+
() => query.getAgentUsageReport({ orgId: "org-a" }),
|
|
513
|
+
Code.InvalidArgument,
|
|
514
|
+
);
|
|
515
|
+
await expectCode(
|
|
516
|
+
() => query.getOrgUsageReport({ orgId: "org-a" }),
|
|
517
|
+
Code.InvalidArgument,
|
|
518
|
+
);
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
it("getOrgUsageReport aggregates the org's executions in range with zero costs", async () => {
|
|
522
|
+
await seed(
|
|
523
|
+
seedInput({
|
|
524
|
+
agentId: "agt_org_report",
|
|
525
|
+
org: "org-report",
|
|
526
|
+
sessionId: "ses_r1",
|
|
527
|
+
startedAt: "2026-04-10T10:00:00Z",
|
|
528
|
+
}),
|
|
529
|
+
);
|
|
530
|
+
await seed(
|
|
531
|
+
seedInput({
|
|
532
|
+
agentId: "agt_org_report",
|
|
533
|
+
org: "org-report",
|
|
534
|
+
sessionId: "ses_r2",
|
|
535
|
+
startedAt: "2026-04-11T10:00:00Z",
|
|
536
|
+
}),
|
|
537
|
+
);
|
|
538
|
+
|
|
539
|
+
const report = await query.getOrgUsageReport({
|
|
540
|
+
orgId: "org-report",
|
|
541
|
+
fromDate: "2026-04-01",
|
|
542
|
+
toDate: "2026-04-30",
|
|
543
|
+
});
|
|
544
|
+
expect(report.totalExecutions).toBe(2);
|
|
545
|
+
expect(report.totalAgents).toBe(1);
|
|
546
|
+
expect(report.totalSessions).toBe(2);
|
|
547
|
+
expect(report.dailyCosts).toHaveLength(2);
|
|
548
|
+
expect(report.dailyCosts[0]?.date).toBe("2026-04-10");
|
|
549
|
+
expect(report.topAgentsByCost).toHaveLength(1);
|
|
550
|
+
expect(report.topAgentsByCost[0]?.billableCostMicros).toBe(0n);
|
|
551
|
+
});
|
|
552
|
+
|
|
553
|
+
it("getSessionUsageReport orders per-execution summaries chronologically", async () => {
|
|
554
|
+
await seed(
|
|
555
|
+
seedInput({
|
|
556
|
+
sessionId: "ses_report_order",
|
|
557
|
+
startedAt: "2026-05-02T10:00:00Z",
|
|
558
|
+
}),
|
|
559
|
+
);
|
|
560
|
+
await seed(
|
|
561
|
+
seedInput({
|
|
562
|
+
sessionId: "ses_report_order",
|
|
563
|
+
startedAt: "2026-05-01T10:00:00Z",
|
|
564
|
+
}),
|
|
565
|
+
);
|
|
566
|
+
|
|
567
|
+
const report = await query.getSessionUsageReport({
|
|
568
|
+
sessionId: "ses_report_order",
|
|
569
|
+
});
|
|
570
|
+
expect(report.executionCount).toBe(2);
|
|
571
|
+
expect(report.executions[0]?.startedAt).toBe("2026-05-01T10:00:00Z");
|
|
572
|
+
expect(report.executions[1]?.startedAt).toBe("2026-05-02T10:00:00Z");
|
|
573
|
+
expect(report.firstExecutionAt).toBe("2026-05-01T10:00:00Z");
|
|
574
|
+
expect(report.lastExecutionAt).toBe("2026-05-02T10:00:00Z");
|
|
575
|
+
});
|
|
576
|
+
});
|
|
577
|
+
|
|
578
|
+
describe("subscribe — the first domain stream through the real transport", () => {
|
|
579
|
+
/**
|
|
580
|
+
* Collects frames from a live subscribe stream. `done` resolves when
|
|
581
|
+
* the server ends the stream; the caller aborts for the
|
|
582
|
+
* client-disconnect arms.
|
|
583
|
+
*/
|
|
584
|
+
function openStream(id: string) {
|
|
585
|
+
const controller = new AbortController();
|
|
586
|
+
const frames: string[] = [];
|
|
587
|
+
let sawFrame: (() => void) | undefined;
|
|
588
|
+
const done = (async () => {
|
|
589
|
+
try {
|
|
590
|
+
for await (const frame of query.subscribe(
|
|
591
|
+
{ value: id },
|
|
592
|
+
{ signal: controller.signal },
|
|
593
|
+
)) {
|
|
594
|
+
frames.push(frame.status?.error ?? "");
|
|
595
|
+
sawFrame?.();
|
|
596
|
+
}
|
|
597
|
+
return "server-ended" as const;
|
|
598
|
+
} catch (error) {
|
|
599
|
+
if (error instanceof ConnectError && error.code === Code.Canceled) {
|
|
600
|
+
return "client-cancelled" as const;
|
|
601
|
+
}
|
|
602
|
+
throw error;
|
|
603
|
+
}
|
|
604
|
+
})();
|
|
605
|
+
// Deterministic wait: resolves once frames.length >= n (no sleeps).
|
|
606
|
+
const untilFrames = (n: number) =>
|
|
607
|
+
new Promise<void>((resolve) => {
|
|
608
|
+
if (frames.length >= n) {
|
|
609
|
+
resolve();
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
sawFrame = () => {
|
|
613
|
+
if (frames.length >= n) {
|
|
614
|
+
sawFrame = undefined;
|
|
615
|
+
resolve();
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
});
|
|
619
|
+
return { controller, frames, done, untilFrames };
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
it("refuses an empty id (InvalidArgument) and an unknown id (NotFound, pinned copy)", async () => {
|
|
623
|
+
const emptyErr = await expectCode(async () => {
|
|
624
|
+
for await (const frame of query.subscribe({ value: "" })) {
|
|
625
|
+
void frame;
|
|
626
|
+
}
|
|
627
|
+
}, Code.InvalidArgument);
|
|
628
|
+
// The protovalidate STREAM interceptor fires before the handler in
|
|
629
|
+
// both editions (Go StreamServerInterceptor); the handler's inline
|
|
630
|
+
// guard is the direct-call defense. protovalidate-go and
|
|
631
|
+
// protovalidate-es render this violation byte-identically (the #7
|
|
632
|
+
// probe).
|
|
633
|
+
expect(emptyErr.rawMessage).toBe("value: value is required [required]");
|
|
634
|
+
|
|
635
|
+
const unknownErr = await expectCode(async () => {
|
|
636
|
+
for await (const frame of query.subscribe({ value: "aexec_missing" })) {
|
|
637
|
+
void frame;
|
|
638
|
+
}
|
|
639
|
+
}, Code.NotFound);
|
|
640
|
+
expect(unknownErr.rawMessage).toBe(
|
|
641
|
+
"AgentExecution not found: aexec_missing",
|
|
642
|
+
);
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
it("streams snapshot → live update → terminal close, suppressing duplicate frames", async () => {
|
|
646
|
+
const init = seedInput({
|
|
647
|
+
phase: ExecutionPhase.EXECUTION_IN_PROGRESS,
|
|
648
|
+
});
|
|
649
|
+
const id = await seed(init);
|
|
650
|
+
|
|
651
|
+
const stream = openStream(id);
|
|
652
|
+
await stream.untilFrames(1); // the snapshot
|
|
653
|
+
|
|
654
|
+
// The overlap frame: byte-equal to the snapshot — must be suppressed.
|
|
655
|
+
server.agentExecutionStreamBroker.broadcast(
|
|
656
|
+
create(AgentExecutionSchema, init),
|
|
657
|
+
);
|
|
658
|
+
// A genuinely new frame follows; its arrival proves the equal frame
|
|
659
|
+
// was dropped (ordered queue — had it been delivered, it would appear
|
|
660
|
+
// before this one).
|
|
661
|
+
const progressed = create(AgentExecutionSchema, {
|
|
662
|
+
apiVersion: API_VERSION,
|
|
663
|
+
kind: KIND,
|
|
664
|
+
metadata: init.metadata,
|
|
665
|
+
spec: init.spec,
|
|
666
|
+
status: {
|
|
667
|
+
phase: ExecutionPhase.EXECUTION_IN_PROGRESS,
|
|
668
|
+
error: "marker-live-update",
|
|
669
|
+
},
|
|
670
|
+
});
|
|
671
|
+
server.agentExecutionStreamBroker.broadcast(progressed);
|
|
672
|
+
await stream.untilFrames(2);
|
|
673
|
+
expect(stream.frames).toEqual(["", "marker-live-update"]);
|
|
674
|
+
|
|
675
|
+
// A terminal broadcast ends the stream server-side.
|
|
676
|
+
server.agentExecutionStreamBroker.broadcast(
|
|
677
|
+
create(AgentExecutionSchema, {
|
|
678
|
+
apiVersion: API_VERSION,
|
|
679
|
+
kind: KIND,
|
|
680
|
+
metadata: init.metadata,
|
|
681
|
+
spec: init.spec,
|
|
682
|
+
status: {
|
|
683
|
+
phase: ExecutionPhase.EXECUTION_COMPLETED,
|
|
684
|
+
error: "marker-terminal",
|
|
685
|
+
},
|
|
686
|
+
}),
|
|
687
|
+
);
|
|
688
|
+
await expect(stream.done).resolves.toBe("server-ended");
|
|
689
|
+
expect(stream.frames).toEqual([
|
|
690
|
+
"",
|
|
691
|
+
"marker-live-update",
|
|
692
|
+
"marker-terminal",
|
|
693
|
+
]);
|
|
694
|
+
expect(server.agentExecutionStreamBroker.getSubscriberCount(id)).toBe(0);
|
|
695
|
+
});
|
|
696
|
+
|
|
697
|
+
it("a terminal SNAPSHOT leaves the stream open until the client disconnects (faithful port)", async () => {
|
|
698
|
+
const id = await seed(
|
|
699
|
+
seedInput({ phase: ExecutionPhase.EXECUTION_COMPLETED }),
|
|
700
|
+
);
|
|
701
|
+
|
|
702
|
+
const stream = openStream(id);
|
|
703
|
+
await stream.untilFrames(1);
|
|
704
|
+
expect(server.agentExecutionStreamBroker.getSubscriberCount(id)).toBe(1);
|
|
705
|
+
|
|
706
|
+
stream.controller.abort();
|
|
707
|
+
await expect(stream.done).resolves.toBe("client-cancelled");
|
|
708
|
+
// The generator's finally runs server-side after the client observes
|
|
709
|
+
// the cancellation — poll (bounded, no sleeps) for the unsubscribe.
|
|
710
|
+
await expect
|
|
711
|
+
.poll(() => server.agentExecutionStreamBroker.getSubscriberCount(id), {
|
|
712
|
+
timeout: 2000,
|
|
713
|
+
})
|
|
714
|
+
.toBe(0);
|
|
715
|
+
});
|
|
716
|
+
});
|
|
717
|
+
|
|
718
|
+
function gatedSeed(overrides?: {
|
|
719
|
+
id?: string;
|
|
720
|
+
toolCalls?: Array<{
|
|
721
|
+
id: string;
|
|
722
|
+
name: string;
|
|
723
|
+
mcpServerSlug?: string;
|
|
724
|
+
}>;
|
|
725
|
+
}): MessageInitShape<typeof AgentExecutionSchema> & {
|
|
726
|
+
metadata: { id: string };
|
|
727
|
+
} {
|
|
728
|
+
counter += 1;
|
|
729
|
+
const id = overrides?.id ?? `aexec_gated_${counter}`;
|
|
730
|
+
const slug = `exec-${id.replaceAll("_", "-")}`;
|
|
731
|
+
const toolCalls = overrides?.toolCalls ?? [{ id: "tc-1", name: "Write" }];
|
|
732
|
+
return {
|
|
733
|
+
apiVersion: API_VERSION,
|
|
734
|
+
kind: KIND,
|
|
735
|
+
metadata: { id, name: slug, slug, org: ORG },
|
|
736
|
+
spec: {
|
|
737
|
+
sessionId: `ses_${id}`,
|
|
738
|
+
agentId: `agt_${id}`,
|
|
739
|
+
message: "Say hello.",
|
|
740
|
+
},
|
|
741
|
+
status: {
|
|
742
|
+
phase: ExecutionPhase.EXECUTION_WAITING_FOR_APPROVAL,
|
|
743
|
+
messages: [
|
|
744
|
+
{
|
|
745
|
+
toolCalls: toolCalls.map((tc) => ({
|
|
746
|
+
id: tc.id,
|
|
747
|
+
name: tc.name,
|
|
748
|
+
status: ToolCallStatus.TOOL_CALL_WAITING_APPROVAL,
|
|
749
|
+
requiresApproval: true,
|
|
750
|
+
...(tc.mcpServerSlug !== undefined
|
|
751
|
+
? { mcpServerSlug: tc.mcpServerSlug }
|
|
752
|
+
: {}),
|
|
753
|
+
})),
|
|
754
|
+
},
|
|
755
|
+
],
|
|
756
|
+
},
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
describe("updateStatus over the wire (ADR 011 write path)", () => {
|
|
761
|
+
it("answers NotFound for an unknown execution and InvalidArgument without a status", async () => {
|
|
762
|
+
await expectCode(
|
|
763
|
+
() =>
|
|
764
|
+
command.updateStatus({
|
|
765
|
+
executionId: "aexec_missing",
|
|
766
|
+
status: { phase: ExecutionPhase.EXECUTION_IN_PROGRESS },
|
|
767
|
+
}),
|
|
768
|
+
Code.NotFound,
|
|
769
|
+
);
|
|
770
|
+
await expectCode(
|
|
771
|
+
() => command.updateStatus({ executionId: "aexec_missing" }),
|
|
772
|
+
Code.InvalidArgument,
|
|
773
|
+
);
|
|
774
|
+
});
|
|
775
|
+
|
|
776
|
+
it("persists the merge and broadcasts to a live subscriber in one write path", async () => {
|
|
777
|
+
const init = seedInput({ phase: ExecutionPhase.EXECUTION_IN_PROGRESS });
|
|
778
|
+
const id = await seed(init);
|
|
779
|
+
|
|
780
|
+
// A live subscriber; the snapshot arrives first.
|
|
781
|
+
const controller = new AbortController();
|
|
782
|
+
const frames: ExecutionPhase[] = [];
|
|
783
|
+
let sawFrame: (() => void) | undefined;
|
|
784
|
+
const consuming = (async () => {
|
|
785
|
+
try {
|
|
786
|
+
for await (const frame of query.subscribe(
|
|
787
|
+
{ value: id },
|
|
788
|
+
{ signal: controller.signal },
|
|
789
|
+
)) {
|
|
790
|
+
frames.push(
|
|
791
|
+
frame.status?.phase ?? ExecutionPhase.EXECUTION_PHASE_UNSPECIFIED,
|
|
792
|
+
);
|
|
793
|
+
sawFrame?.();
|
|
794
|
+
}
|
|
795
|
+
} catch (error) {
|
|
796
|
+
if (!(error instanceof ConnectError && error.code === Code.Canceled)) {
|
|
797
|
+
throw error;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
})();
|
|
801
|
+
await new Promise<void>((resolve) => {
|
|
802
|
+
if (frames.length >= 1) {
|
|
803
|
+
resolve();
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
806
|
+
sawFrame = () => {
|
|
807
|
+
sawFrame = undefined;
|
|
808
|
+
resolve();
|
|
809
|
+
};
|
|
810
|
+
});
|
|
811
|
+
|
|
812
|
+
// The runner's terminal persist: merged, persisted, broadcast.
|
|
813
|
+
await command.updateStatus({
|
|
814
|
+
executionId: id,
|
|
815
|
+
status: {
|
|
816
|
+
phase: ExecutionPhase.EXECUTION_COMPLETED,
|
|
817
|
+
completedAt: "2026-08-24T10:00:00Z",
|
|
818
|
+
messages: [{ content: "done" }],
|
|
819
|
+
},
|
|
820
|
+
});
|
|
821
|
+
|
|
822
|
+
const reloaded = await query.get({ value: id });
|
|
823
|
+
expect(reloaded.status?.phase).toBe(ExecutionPhase.EXECUTION_COMPLETED);
|
|
824
|
+
expect(reloaded.status?.messages[0]?.content).toBe("done");
|
|
825
|
+
|
|
826
|
+
// The broadcast reached the subscriber and, being terminal, closed the
|
|
827
|
+
// stream server-side.
|
|
828
|
+
await consuming;
|
|
829
|
+
expect(frames).toEqual([
|
|
830
|
+
ExecutionPhase.EXECUTION_IN_PROGRESS,
|
|
831
|
+
ExecutionPhase.EXECUTION_COMPLETED,
|
|
832
|
+
]);
|
|
833
|
+
});
|
|
834
|
+
});
|
|
835
|
+
|
|
836
|
+
describe("submitApproval over the wire (submit_approval_contract_test.go arms)", () => {
|
|
837
|
+
it("records the decision, empties the gate, and authors the event pair", async () => {
|
|
838
|
+
const init = gatedSeed();
|
|
839
|
+
const id = await seed(init);
|
|
840
|
+
|
|
841
|
+
const result = await command.submitApproval({
|
|
842
|
+
agentExecutionId: id,
|
|
843
|
+
toolCallId: "tc-1",
|
|
844
|
+
action: ApprovalAction.APPROVE,
|
|
845
|
+
comment: "go ahead",
|
|
846
|
+
});
|
|
847
|
+
|
|
848
|
+
const tc = result.status?.messages[0]?.toolCalls[0];
|
|
849
|
+
expect(tc?.approvalAction).toBe(ApprovalAction.APPROVE);
|
|
850
|
+
expect(tc?.approvalDecidedAt).not.toBe("");
|
|
851
|
+
expect(result.status?.pendingApprovals).toHaveLength(0);
|
|
852
|
+
|
|
853
|
+
// The append-only stream carries exactly one REQUESTED + one APPROVED,
|
|
854
|
+
// the decision with the user's comment.
|
|
855
|
+
const events = result.status?.approvalEventStream?.events ?? [];
|
|
856
|
+
const mine = events.filter((ev) => ev.approvalRequestId === "tc-1");
|
|
857
|
+
expect(mine.map((ev) => ev.eventType).sort()).toEqual(
|
|
858
|
+
[ApprovalEventType.REQUESTED, ApprovalEventType.APPROVED].sort(),
|
|
859
|
+
);
|
|
860
|
+
const decided = mine.find(
|
|
861
|
+
(ev) => ev.eventType === ApprovalEventType.APPROVED,
|
|
862
|
+
);
|
|
863
|
+
expect(
|
|
864
|
+
decided?.payload.case === "decided" ? decided.payload.value.comment : "",
|
|
865
|
+
).toBe("go ahead");
|
|
866
|
+
});
|
|
867
|
+
|
|
868
|
+
it("is idempotent for a repeated identical submit and refuses a conflicting change", async () => {
|
|
869
|
+
const id = await seed(gatedSeed());
|
|
870
|
+
|
|
871
|
+
await command.submitApproval({
|
|
872
|
+
agentExecutionId: id,
|
|
873
|
+
toolCallId: "tc-1",
|
|
874
|
+
action: ApprovalAction.SKIP,
|
|
875
|
+
});
|
|
876
|
+
// Same action again: a no-op answering current state.
|
|
877
|
+
const repeat = await command.submitApproval({
|
|
878
|
+
agentExecutionId: id,
|
|
879
|
+
toolCallId: "tc-1",
|
|
880
|
+
action: ApprovalAction.SKIP,
|
|
881
|
+
});
|
|
882
|
+
expect(repeat.status?.messages[0]?.toolCalls[0]?.approvalAction).toBe(
|
|
883
|
+
ApprovalAction.SKIP,
|
|
884
|
+
);
|
|
885
|
+
// A different action on a decided call refuses.
|
|
886
|
+
await expectCode(
|
|
887
|
+
() =>
|
|
888
|
+
command.submitApproval({
|
|
889
|
+
agentExecutionId: id,
|
|
890
|
+
toolCallId: "tc-1",
|
|
891
|
+
action: ApprovalAction.REJECT,
|
|
892
|
+
}),
|
|
893
|
+
Code.FailedPrecondition,
|
|
894
|
+
);
|
|
895
|
+
});
|
|
896
|
+
|
|
897
|
+
it("refuses non-approvable phases, unknown tool calls, and unknown executions", async () => {
|
|
898
|
+
const terminal = await seed(
|
|
899
|
+
seedInput({ phase: ExecutionPhase.EXECUTION_COMPLETED }),
|
|
900
|
+
);
|
|
901
|
+
await expectCode(
|
|
902
|
+
() =>
|
|
903
|
+
command.submitApproval({
|
|
904
|
+
agentExecutionId: terminal,
|
|
905
|
+
toolCallId: "tc-1",
|
|
906
|
+
action: ApprovalAction.APPROVE,
|
|
907
|
+
}),
|
|
908
|
+
Code.FailedPrecondition,
|
|
909
|
+
);
|
|
910
|
+
|
|
911
|
+
const gated = await seed(gatedSeed());
|
|
912
|
+
await expectCode(
|
|
913
|
+
() =>
|
|
914
|
+
command.submitApproval({
|
|
915
|
+
agentExecutionId: gated,
|
|
916
|
+
toolCallId: "tc-unknown",
|
|
917
|
+
action: ApprovalAction.APPROVE,
|
|
918
|
+
}),
|
|
919
|
+
Code.InvalidArgument,
|
|
920
|
+
);
|
|
921
|
+
|
|
922
|
+
await expectCode(
|
|
923
|
+
() =>
|
|
924
|
+
command.submitApproval({
|
|
925
|
+
agentExecutionId: "aexec_missing",
|
|
926
|
+
toolCallId: "tc-1",
|
|
927
|
+
action: ApprovalAction.APPROVE,
|
|
928
|
+
}),
|
|
929
|
+
Code.NotFound,
|
|
930
|
+
);
|
|
931
|
+
});
|
|
932
|
+
|
|
933
|
+
it("APPROVE_ALL bulk-approves only the clicked tool's lease class", async () => {
|
|
934
|
+
const id = await seed(
|
|
935
|
+
gatedSeed({
|
|
936
|
+
toolCalls: [
|
|
937
|
+
{ id: "tc-shell-1", name: "shell" },
|
|
938
|
+
{ id: "tc-shell-2", name: "bash" },
|
|
939
|
+
{ id: "tc-write", name: "Write" },
|
|
940
|
+
],
|
|
941
|
+
}),
|
|
942
|
+
);
|
|
943
|
+
|
|
944
|
+
const result = await command.submitApproval({
|
|
945
|
+
agentExecutionId: id,
|
|
946
|
+
toolCallId: "tc-shell-1",
|
|
947
|
+
action: ApprovalAction.APPROVE_ALL,
|
|
948
|
+
});
|
|
949
|
+
|
|
950
|
+
const calls = result.status?.messages[0]?.toolCalls ?? [];
|
|
951
|
+
const byId = new Map(calls.map((tc) => [tc.id, tc]));
|
|
952
|
+
// The clicked tool carries APPROVE_ALL (the user's escalation point).
|
|
953
|
+
expect(byId.get("tc-shell-1")?.approvalAction).toBe(
|
|
954
|
+
ApprovalAction.APPROVE_ALL,
|
|
955
|
+
);
|
|
956
|
+
// The same-class co-pending call carries a plain APPROVE.
|
|
957
|
+
expect(byId.get("tc-shell-2")?.approvalAction).toBe(ApprovalAction.APPROVE);
|
|
958
|
+
// The different-class call stays gated — pending_approvals still
|
|
959
|
+
// lists it, so the gate stays open.
|
|
960
|
+
expect(byId.get("tc-write")?.approvalAction).toBe(
|
|
961
|
+
ApprovalAction.UNSPECIFIED,
|
|
962
|
+
);
|
|
963
|
+
expect(result.status?.pendingApprovals).toHaveLength(1);
|
|
964
|
+
expect(result.status?.pendingApprovals[0]?.toolCallId).toBe("tc-write");
|
|
965
|
+
});
|
|
966
|
+
|
|
967
|
+
it("the approve-all resume round-trip preserves earlier thinking and the first tool call (transcript test)", async () => {
|
|
968
|
+
counter += 1;
|
|
969
|
+
const id = `aexec_resume_${counter}`;
|
|
970
|
+
const slug = `exec-${id.replaceAll("_", "-")}`;
|
|
971
|
+
await seed({
|
|
972
|
+
apiVersion: API_VERSION,
|
|
973
|
+
kind: KIND,
|
|
974
|
+
metadata: { id, name: slug, slug, org: ORG },
|
|
975
|
+
spec: { message: "Say hello." },
|
|
976
|
+
status: {
|
|
977
|
+
phase: ExecutionPhase.EXECUTION_WAITING_FOR_APPROVAL,
|
|
978
|
+
messages: [
|
|
979
|
+
{
|
|
980
|
+
type: MessageType.MESSAGE_THINKING,
|
|
981
|
+
content: "planning the self-DM",
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
type: MessageType.MESSAGE_AI,
|
|
985
|
+
toolCalls: [
|
|
986
|
+
{
|
|
987
|
+
id: "tc-getappstate",
|
|
988
|
+
name: "getAppState",
|
|
989
|
+
status: ToolCallStatus.TOOL_CALL_WAITING_APPROVAL,
|
|
990
|
+
requiresApproval: true,
|
|
991
|
+
mcpServerSlug: "open-computer-use",
|
|
992
|
+
},
|
|
993
|
+
],
|
|
994
|
+
},
|
|
995
|
+
],
|
|
996
|
+
},
|
|
997
|
+
});
|
|
998
|
+
|
|
999
|
+
await command.submitApproval({
|
|
1000
|
+
agentExecutionId: id,
|
|
1001
|
+
toolCallId: "tc-getappstate",
|
|
1002
|
+
action: ApprovalAction.APPROVE_ALL,
|
|
1003
|
+
});
|
|
1004
|
+
|
|
1005
|
+
// The durable-checkpoint resume sends a regressed transcript: leading
|
|
1006
|
+
// thinking + getAppState gone, later leased tools appended.
|
|
1007
|
+
await command.updateStatus({
|
|
1008
|
+
executionId: id,
|
|
1009
|
+
status: {
|
|
1010
|
+
phase: ExecutionPhase.EXECUTION_IN_PROGRESS,
|
|
1011
|
+
messages: [
|
|
1012
|
+
{
|
|
1013
|
+
type: MessageType.MESSAGE_AI,
|
|
1014
|
+
toolCalls: [
|
|
1015
|
+
{
|
|
1016
|
+
id: "tc-click",
|
|
1017
|
+
name: "click",
|
|
1018
|
+
status: ToolCallStatus.TOOL_CALL_COMPLETED,
|
|
1019
|
+
},
|
|
1020
|
+
],
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
type: MessageType.MESSAGE_AI,
|
|
1024
|
+
toolCalls: [
|
|
1025
|
+
{
|
|
1026
|
+
id: "tc-scroll",
|
|
1027
|
+
name: "scroll",
|
|
1028
|
+
status: ToolCallStatus.TOOL_CALL_COMPLETED,
|
|
1029
|
+
},
|
|
1030
|
+
],
|
|
1031
|
+
},
|
|
1032
|
+
{ type: MessageType.MESSAGE_AI, content: "done" },
|
|
1033
|
+
],
|
|
1034
|
+
},
|
|
1035
|
+
});
|
|
1036
|
+
|
|
1037
|
+
const final = await query.get({ value: id });
|
|
1038
|
+
const hasThinking = final.status?.messages.some(
|
|
1039
|
+
(m) =>
|
|
1040
|
+
m.type === MessageType.MESSAGE_THINKING &&
|
|
1041
|
+
m.content === "planning the self-DM",
|
|
1042
|
+
);
|
|
1043
|
+
expect(
|
|
1044
|
+
hasThinking,
|
|
1045
|
+
"the leading thinking block survives the resume round-trip",
|
|
1046
|
+
).toBe(true);
|
|
1047
|
+
const gated = final.status?.messages
|
|
1048
|
+
.flatMap((m) => m.toolCalls)
|
|
1049
|
+
.find((tc) => tc.id === "tc-getappstate");
|
|
1050
|
+
expect(gated, "the first tool call survives").toBeDefined();
|
|
1051
|
+
expect(
|
|
1052
|
+
gated?.approvalAction,
|
|
1053
|
+
"the recorded APPROVE_ALL decision survives",
|
|
1054
|
+
).toBe(ApprovalAction.APPROVE_ALL);
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
it("a racing heartbeat never clobbers the decision, and REQUESTED never duplicates", async () => {
|
|
1058
|
+
// The designed overlap window (update_status_concurrency_test.go):
|
|
1059
|
+
// both paths persist via the lock-serialized atomic updateResource.
|
|
1060
|
+
for (let i = 0; i < 20; i++) {
|
|
1061
|
+
const id = await seed(gatedSeed());
|
|
1062
|
+
const heartbeat = command.updateStatus({
|
|
1063
|
+
executionId: id,
|
|
1064
|
+
status: {
|
|
1065
|
+
phase: ExecutionPhase.EXECUTION_WAITING_FOR_APPROVAL,
|
|
1066
|
+
messages: [
|
|
1067
|
+
{
|
|
1068
|
+
toolCalls: [
|
|
1069
|
+
{
|
|
1070
|
+
id: "tc-1",
|
|
1071
|
+
name: "Write",
|
|
1072
|
+
status: ToolCallStatus.TOOL_CALL_WAITING_APPROVAL,
|
|
1073
|
+
requiresApproval: true,
|
|
1074
|
+
},
|
|
1075
|
+
],
|
|
1076
|
+
},
|
|
1077
|
+
],
|
|
1078
|
+
},
|
|
1079
|
+
});
|
|
1080
|
+
const approval = command.submitApproval({
|
|
1081
|
+
agentExecutionId: id,
|
|
1082
|
+
toolCallId: "tc-1",
|
|
1083
|
+
action: ApprovalAction.APPROVE,
|
|
1084
|
+
});
|
|
1085
|
+
await Promise.all([heartbeat, approval]);
|
|
1086
|
+
|
|
1087
|
+
const final = await query.get({ value: id });
|
|
1088
|
+
const tc = final.status?.messages
|
|
1089
|
+
.flatMap((m) => m.toolCalls)
|
|
1090
|
+
.find((c) => c.id === "tc-1");
|
|
1091
|
+
expect(tc?.approvalAction, `iteration ${i}: decision lost`).toBe(
|
|
1092
|
+
ApprovalAction.APPROVE,
|
|
1093
|
+
);
|
|
1094
|
+
const events = (final.status?.approvalEventStream?.events ?? []).filter(
|
|
1095
|
+
(ev) => ev.approvalRequestId === "tc-1",
|
|
1096
|
+
);
|
|
1097
|
+
expect(
|
|
1098
|
+
events.filter((ev) => ev.eventType === ApprovalEventType.REQUESTED),
|
|
1099
|
+
`iteration ${i}: REQUESTED duplicated`,
|
|
1100
|
+
).toHaveLength(1);
|
|
1101
|
+
expect(
|
|
1102
|
+
events.filter((ev) => ev.eventType === ApprovalEventType.APPROVED),
|
|
1103
|
+
`iteration ${i}: decision event lost`,
|
|
1104
|
+
).toHaveLength(1);
|
|
1105
|
+
}
|
|
1106
|
+
});
|
|
1107
|
+
});
|
|
1108
|
+
|
|
1109
|
+
describe("the engine-connected signal arms (stubbed engine, direct calls)", () => {
|
|
1110
|
+
function stubDeps(engine: ConnectedExecutionEngine) {
|
|
1111
|
+
return {
|
|
1112
|
+
store: server.store,
|
|
1113
|
+
logger: silentLogger,
|
|
1114
|
+
authorizer: newPermissiveSingleTeamAuthorizer(),
|
|
1115
|
+
broker: server.agentExecutionStreamBroker,
|
|
1116
|
+
engineState: () => ({ connected: true, engine }) as ExecutionEngineState,
|
|
1117
|
+
gateSteps: new Map(),
|
|
1118
|
+
statusObservers: [],
|
|
1119
|
+
};
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
it("signals approvalGateResolved exactly once, only when the unified gate clears", async () => {
|
|
1123
|
+
const id = await seed(
|
|
1124
|
+
gatedSeed({
|
|
1125
|
+
toolCalls: [
|
|
1126
|
+
{ id: "tc-shell", name: "shell" },
|
|
1127
|
+
{ id: "tc-write", name: "Write" },
|
|
1128
|
+
],
|
|
1129
|
+
}),
|
|
1130
|
+
);
|
|
1131
|
+
const signalled: string[] = [];
|
|
1132
|
+
const deps = stubDeps(
|
|
1133
|
+
stubConnectedEngine({
|
|
1134
|
+
signalApprovalGateResolved: async (executionId) => {
|
|
1135
|
+
signalled.push(executionId);
|
|
1136
|
+
},
|
|
1137
|
+
}),
|
|
1138
|
+
);
|
|
1139
|
+
|
|
1140
|
+
// First decision: a different-class call stays gated → no signal.
|
|
1141
|
+
await submitApproval(
|
|
1142
|
+
deps,
|
|
1143
|
+
create(SubmitApprovalInputSchema, {
|
|
1144
|
+
agentExecutionId: id,
|
|
1145
|
+
toolCallId: "tc-shell",
|
|
1146
|
+
action: ApprovalAction.APPROVE,
|
|
1147
|
+
}),
|
|
1148
|
+
testCallerIdentity(),
|
|
1149
|
+
);
|
|
1150
|
+
expect(signalled).toHaveLength(0);
|
|
1151
|
+
|
|
1152
|
+
// Second decision clears the gate → exactly one signal.
|
|
1153
|
+
await submitApproval(
|
|
1154
|
+
deps,
|
|
1155
|
+
create(SubmitApprovalInputSchema, {
|
|
1156
|
+
agentExecutionId: id,
|
|
1157
|
+
toolCallId: "tc-write",
|
|
1158
|
+
action: ApprovalAction.REJECT,
|
|
1159
|
+
}),
|
|
1160
|
+
testCallerIdentity(),
|
|
1161
|
+
);
|
|
1162
|
+
expect(signalled).toEqual([id]);
|
|
1163
|
+
});
|
|
1164
|
+
|
|
1165
|
+
it("a vanished workflow reconciles the execution to FAILED with settled tool calls (pinned copy)", async () => {
|
|
1166
|
+
const id = await seed(
|
|
1167
|
+
gatedSeed({ toolCalls: [{ id: "tc-1", name: "Write" }] }),
|
|
1168
|
+
);
|
|
1169
|
+
const deps = stubDeps(
|
|
1170
|
+
stubConnectedEngine({
|
|
1171
|
+
signalApprovalGateResolved: async (executionId) => {
|
|
1172
|
+
throw new EngineWorkflowNotFoundError(executionId);
|
|
1173
|
+
},
|
|
1174
|
+
}),
|
|
1175
|
+
);
|
|
1176
|
+
|
|
1177
|
+
const err = await expectCode(
|
|
1178
|
+
() =>
|
|
1179
|
+
submitApproval(
|
|
1180
|
+
deps,
|
|
1181
|
+
create(SubmitApprovalInputSchema, {
|
|
1182
|
+
agentExecutionId: id,
|
|
1183
|
+
toolCallId: "tc-1",
|
|
1184
|
+
action: ApprovalAction.APPROVE,
|
|
1185
|
+
}),
|
|
1186
|
+
testCallerIdentity(),
|
|
1187
|
+
),
|
|
1188
|
+
Code.FailedPrecondition,
|
|
1189
|
+
);
|
|
1190
|
+
expect(err.rawMessage).toBe(
|
|
1191
|
+
`workflow not running for execution ${id} - the backing workflow has terminated unexpectedly and the execution has been marked as failed`,
|
|
1192
|
+
);
|
|
1193
|
+
|
|
1194
|
+
const final = await query.get({ value: id });
|
|
1195
|
+
expect(final.status?.phase).toBe(ExecutionPhase.EXECUTION_FAILED);
|
|
1196
|
+
expect(final.status?.error).toBe(
|
|
1197
|
+
"Workflow backing this execution is no longer running. Execution has been marked as failed.",
|
|
1198
|
+
);
|
|
1199
|
+
// The system message is appended and in-flight calls settle (#207).
|
|
1200
|
+
expect(final.status?.messages.at(-1)?.type).toBe(
|
|
1201
|
+
MessageType.MESSAGE_SYSTEM,
|
|
1202
|
+
);
|
|
1203
|
+
const tc = final.status?.messages
|
|
1204
|
+
.flatMap((m) => m.toolCalls)
|
|
1205
|
+
.find((c) => c.id === "tc-1");
|
|
1206
|
+
expect(tc?.status).toBe(ToolCallStatus.TOOL_CALL_INTERRUPTED);
|
|
1207
|
+
// The ledger is preserved for the audit trail; the projection is empty
|
|
1208
|
+
// (terminal).
|
|
1209
|
+
expect(
|
|
1210
|
+
(final.status?.approvalEventStream?.events ?? []).length,
|
|
1211
|
+
).toBeGreaterThan(0);
|
|
1212
|
+
expect(final.status?.pendingApprovals).toHaveLength(0);
|
|
1213
|
+
});
|
|
1214
|
+
|
|
1215
|
+
// O4 (20260827.07, ruling Q3): the reconcile's →FAILED stamp is notify
|
|
1216
|
+
// site 4 of 5 — a terminal transition the update-status chokepoint
|
|
1217
|
+
// never sees.
|
|
1218
|
+
it("the stale-workflow reconcile notifies the composed status observers", async () => {
|
|
1219
|
+
const id = await seed(
|
|
1220
|
+
gatedSeed({ toolCalls: [{ id: "tc-obs", name: "Write" }] }),
|
|
1221
|
+
);
|
|
1222
|
+
const observed: AgentExecutionStatusTransition[] = [];
|
|
1223
|
+
const deps = {
|
|
1224
|
+
...stubDeps(
|
|
1225
|
+
stubConnectedEngine({
|
|
1226
|
+
signalApprovalGateResolved: async (executionId) => {
|
|
1227
|
+
throw new EngineWorkflowNotFoundError(executionId);
|
|
1228
|
+
},
|
|
1229
|
+
}),
|
|
1230
|
+
),
|
|
1231
|
+
statusObservers: [
|
|
1232
|
+
(t: AgentExecutionStatusTransition): void => void observed.push(t),
|
|
1233
|
+
],
|
|
1234
|
+
};
|
|
1235
|
+
|
|
1236
|
+
await expectCode(
|
|
1237
|
+
() =>
|
|
1238
|
+
submitApproval(
|
|
1239
|
+
deps,
|
|
1240
|
+
create(SubmitApprovalInputSchema, {
|
|
1241
|
+
agentExecutionId: id,
|
|
1242
|
+
toolCallId: "tc-obs",
|
|
1243
|
+
action: ApprovalAction.APPROVE,
|
|
1244
|
+
}),
|
|
1245
|
+
testCallerIdentity(),
|
|
1246
|
+
),
|
|
1247
|
+
Code.FailedPrecondition,
|
|
1248
|
+
);
|
|
1249
|
+
expect(observed).toHaveLength(1);
|
|
1250
|
+
expect(observed[0]?.oldPhase).toBe(
|
|
1251
|
+
ExecutionPhase.EXECUTION_WAITING_FOR_APPROVAL,
|
|
1252
|
+
);
|
|
1253
|
+
expect(observed[0]?.newPhase).toBe(ExecutionPhase.EXECUTION_FAILED);
|
|
1254
|
+
expect(observed[0]?.execution.metadata?.id).toBe(id);
|
|
1255
|
+
});
|
|
1256
|
+
});
|
|
1257
|
+
|
|
1258
|
+
describe("submitFileDecision over the wire", () => {
|
|
1259
|
+
function ledgerSeed(): {
|
|
1260
|
+
init: MessageInitShape<typeof AgentExecutionSchema> & {
|
|
1261
|
+
metadata: { id: string };
|
|
1262
|
+
};
|
|
1263
|
+
changeSetId: string;
|
|
1264
|
+
change: ReturnType<typeof buildChange>;
|
|
1265
|
+
aggregate: string;
|
|
1266
|
+
} {
|
|
1267
|
+
counter += 1;
|
|
1268
|
+
const id = `aexec_review_${counter}`;
|
|
1269
|
+
const slug = `exec-${id.replaceAll("_", "-")}`;
|
|
1270
|
+
const changeSetId = `cs_${counter}`;
|
|
1271
|
+
const change = buildChange();
|
|
1272
|
+
const aggregate = aggregateDigest([change]);
|
|
1273
|
+
return {
|
|
1274
|
+
init: {
|
|
1275
|
+
apiVersion: API_VERSION,
|
|
1276
|
+
kind: KIND,
|
|
1277
|
+
metadata: { id, name: slug, slug, org: ORG },
|
|
1278
|
+
spec: { message: "Say hello." },
|
|
1279
|
+
status: {
|
|
1280
|
+
phase: ExecutionPhase.EXECUTION_WAITING_FOR_APPROVAL,
|
|
1281
|
+
fileReviewEventStream: {
|
|
1282
|
+
executionId: id,
|
|
1283
|
+
events: [
|
|
1284
|
+
{
|
|
1285
|
+
eventId: `${changeSetId}:${changeSetId}:BASELINE`,
|
|
1286
|
+
changeSetId,
|
|
1287
|
+
eventType: FileReviewEventType.BASELINE_CAPTURED,
|
|
1288
|
+
actor: "runner",
|
|
1289
|
+
payload: {
|
|
1290
|
+
case: "baselineCaptured",
|
|
1291
|
+
value: { turnId: "turn-1", harnessId: "harness-1" },
|
|
1292
|
+
},
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
eventId: `${changeSetId}:${changeSetId}:CANDIDATE`,
|
|
1296
|
+
changeSetId,
|
|
1297
|
+
eventType: FileReviewEventType.CANDIDATE_CAPTURED,
|
|
1298
|
+
actor: "runner",
|
|
1299
|
+
payload: {
|
|
1300
|
+
case: "candidateCaptured",
|
|
1301
|
+
value: {
|
|
1302
|
+
changes: [change],
|
|
1303
|
+
aggregateDigest: aggregate,
|
|
1304
|
+
diffCompleteness: DiffCompleteness.COMPLETE,
|
|
1305
|
+
},
|
|
1306
|
+
},
|
|
1307
|
+
},
|
|
1308
|
+
],
|
|
1309
|
+
},
|
|
1310
|
+
},
|
|
1311
|
+
},
|
|
1312
|
+
changeSetId,
|
|
1313
|
+
change,
|
|
1314
|
+
aggregate,
|
|
1315
|
+
};
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
function buildChange() {
|
|
1319
|
+
const change = create(CapturedFileChangeSchema, {
|
|
1320
|
+
id: "fc-1",
|
|
1321
|
+
pathBefore: "src/a.ts",
|
|
1322
|
+
pathAfter: "src/a.ts",
|
|
1323
|
+
kind: FileChangeKind.MODIFY,
|
|
1324
|
+
beforeSha256: "a".repeat(64),
|
|
1325
|
+
afterSha256: "b".repeat(64),
|
|
1326
|
+
diffComplete: true,
|
|
1327
|
+
});
|
|
1328
|
+
change.fileDigest = fileDigest(change);
|
|
1329
|
+
return change;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
it("records a CHANGE_SET keep, projects DECIDED, and is idempotent on resubmit", async () => {
|
|
1333
|
+
const { init, changeSetId, aggregate } = ledgerSeed();
|
|
1334
|
+
const id = await seed(init);
|
|
1335
|
+
|
|
1336
|
+
const result = await command.submitFileDecision({
|
|
1337
|
+
agentExecutionId: id,
|
|
1338
|
+
changeSetId,
|
|
1339
|
+
scope: FileDecisionScope.CHANGE_SET,
|
|
1340
|
+
action: FileDecisionAction.APPROVE,
|
|
1341
|
+
expectedDigest: aggregate,
|
|
1342
|
+
});
|
|
1343
|
+
const cs = result.status?.fileChangeSets.find((c) => c.id === changeSetId);
|
|
1344
|
+
expect(cs?.status).toBe(FileChangeSetStatus.DECIDED);
|
|
1345
|
+
expect(cs?.decisions).toHaveLength(1);
|
|
1346
|
+
expect(cs?.decisions[0]?.origin).toBe(FileDecisionOrigin.USER);
|
|
1347
|
+
|
|
1348
|
+
// Idempotent resubmit: the same deterministic event id — no error, no
|
|
1349
|
+
// duplicate decision.
|
|
1350
|
+
const repeat = await command.submitFileDecision({
|
|
1351
|
+
agentExecutionId: id,
|
|
1352
|
+
changeSetId,
|
|
1353
|
+
scope: FileDecisionScope.CHANGE_SET,
|
|
1354
|
+
action: FileDecisionAction.APPROVE,
|
|
1355
|
+
expectedDigest: aggregate,
|
|
1356
|
+
});
|
|
1357
|
+
const csRepeat = repeat.status?.fileChangeSets.find(
|
|
1358
|
+
(c) => c.id === changeSetId,
|
|
1359
|
+
);
|
|
1360
|
+
expect(csRepeat?.decisions).toHaveLength(1);
|
|
1361
|
+
});
|
|
1362
|
+
|
|
1363
|
+
// O4 (20260827.07, ruling Q3): the file-review reconcile twin is notify
|
|
1364
|
+
// site 5 of 5.
|
|
1365
|
+
it("the workflow-gone reconcile notifies the composed status observers", async () => {
|
|
1366
|
+
const { init, changeSetId, aggregate } = ledgerSeed();
|
|
1367
|
+
const id = await seed(init);
|
|
1368
|
+
const observed: AgentExecutionStatusTransition[] = [];
|
|
1369
|
+
const deps = {
|
|
1370
|
+
store: server.store,
|
|
1371
|
+
logger: silentLogger,
|
|
1372
|
+
authorizer: newPermissiveSingleTeamAuthorizer(),
|
|
1373
|
+
broker: server.agentExecutionStreamBroker,
|
|
1374
|
+
engineState: () =>
|
|
1375
|
+
({
|
|
1376
|
+
connected: true,
|
|
1377
|
+
engine: stubConnectedEngine({
|
|
1378
|
+
signalApprovalGateResolved: async (executionId: string) => {
|
|
1379
|
+
throw new EngineWorkflowNotFoundError(executionId);
|
|
1380
|
+
},
|
|
1381
|
+
}),
|
|
1382
|
+
}) as ExecutionEngineState,
|
|
1383
|
+
statusObservers: [
|
|
1384
|
+
(t: AgentExecutionStatusTransition): void => void observed.push(t),
|
|
1385
|
+
],
|
|
1386
|
+
};
|
|
1387
|
+
|
|
1388
|
+
// A CHANGE_SET decision resolves the whole gate, so the signal fires
|
|
1389
|
+
// and the vanished workflow triggers the reconcile.
|
|
1390
|
+
await expectCode(
|
|
1391
|
+
() =>
|
|
1392
|
+
submitFileDecision(
|
|
1393
|
+
deps,
|
|
1394
|
+
create(SubmitFileDecisionInputSchema, {
|
|
1395
|
+
agentExecutionId: id,
|
|
1396
|
+
changeSetId,
|
|
1397
|
+
scope: FileDecisionScope.CHANGE_SET,
|
|
1398
|
+
action: FileDecisionAction.APPROVE,
|
|
1399
|
+
expectedDigest: aggregate,
|
|
1400
|
+
}),
|
|
1401
|
+
testCallerIdentity(),
|
|
1402
|
+
),
|
|
1403
|
+
Code.FailedPrecondition,
|
|
1404
|
+
);
|
|
1405
|
+
expect(observed).toHaveLength(1);
|
|
1406
|
+
expect(observed[0]?.oldPhase).toBe(
|
|
1407
|
+
ExecutionPhase.EXECUTION_WAITING_FOR_APPROVAL,
|
|
1408
|
+
);
|
|
1409
|
+
expect(observed[0]?.newPhase).toBe(ExecutionPhase.EXECUTION_FAILED);
|
|
1410
|
+
});
|
|
1411
|
+
|
|
1412
|
+
it("refuses a stale digest, an unknown change set, and FILE scope without an id", async () => {
|
|
1413
|
+
const { init, changeSetId } = ledgerSeed();
|
|
1414
|
+
const id = await seed(init);
|
|
1415
|
+
|
|
1416
|
+
const staleErr = await expectCode(
|
|
1417
|
+
() =>
|
|
1418
|
+
command.submitFileDecision({
|
|
1419
|
+
agentExecutionId: id,
|
|
1420
|
+
changeSetId,
|
|
1421
|
+
scope: FileDecisionScope.CHANGE_SET,
|
|
1422
|
+
action: FileDecisionAction.APPROVE,
|
|
1423
|
+
expectedDigest: "0".repeat(64),
|
|
1424
|
+
}),
|
|
1425
|
+
Code.InvalidArgument,
|
|
1426
|
+
);
|
|
1427
|
+
expect(staleErr.rawMessage).toBe(
|
|
1428
|
+
`expected_digest mismatch for change set ${changeSetId}: the captured content changed since it was reviewed`,
|
|
1429
|
+
);
|
|
1430
|
+
|
|
1431
|
+
await expectCode(
|
|
1432
|
+
() =>
|
|
1433
|
+
command.submitFileDecision({
|
|
1434
|
+
agentExecutionId: id,
|
|
1435
|
+
changeSetId: "cs_unknown",
|
|
1436
|
+
scope: FileDecisionScope.CHANGE_SET,
|
|
1437
|
+
action: FileDecisionAction.APPROVE,
|
|
1438
|
+
expectedDigest: "0".repeat(64),
|
|
1439
|
+
}),
|
|
1440
|
+
Code.FailedPrecondition,
|
|
1441
|
+
);
|
|
1442
|
+
|
|
1443
|
+
await expectCode(
|
|
1444
|
+
() =>
|
|
1445
|
+
command.submitFileDecision({
|
|
1446
|
+
agentExecutionId: id,
|
|
1447
|
+
changeSetId,
|
|
1448
|
+
scope: FileDecisionScope.FILE,
|
|
1449
|
+
action: FileDecisionAction.APPROVE,
|
|
1450
|
+
expectedDigest: "0".repeat(64),
|
|
1451
|
+
}),
|
|
1452
|
+
Code.InvalidArgument,
|
|
1453
|
+
);
|
|
1454
|
+
});
|
|
1455
|
+
});
|
|
1456
|
+
|
|
1457
|
+
describe("getExecutionSummary — the populated arm", () => {
|
|
1458
|
+
it("counts phases, actives, completion durations, and failure ranks", async () => {
|
|
1459
|
+
// Seeded records carry no audit timestamps, so the window cutoff
|
|
1460
|
+
// never skips them (Go: a zero created_at disables the skip).
|
|
1461
|
+
await seed(
|
|
1462
|
+
seedInput({
|
|
1463
|
+
org: "org-summary",
|
|
1464
|
+
phase: ExecutionPhase.EXECUTION_COMPLETED,
|
|
1465
|
+
startedAt: "2026-06-01T10:00:00Z",
|
|
1466
|
+
completedAt: "2026-06-01T11:00:00Z",
|
|
1467
|
+
}),
|
|
1468
|
+
);
|
|
1469
|
+
await seed(
|
|
1470
|
+
seedInput({
|
|
1471
|
+
org: "org-summary",
|
|
1472
|
+
agentId: "agt_failing",
|
|
1473
|
+
phase: ExecutionPhase.EXECUTION_FAILED,
|
|
1474
|
+
}),
|
|
1475
|
+
);
|
|
1476
|
+
await seed(
|
|
1477
|
+
seedInput({
|
|
1478
|
+
org: "org-summary",
|
|
1479
|
+
phase: ExecutionPhase.EXECUTION_PENDING,
|
|
1480
|
+
}),
|
|
1481
|
+
);
|
|
1482
|
+
|
|
1483
|
+
const summary = await query.getExecutionSummary({ org: "org-summary" });
|
|
1484
|
+
|
|
1485
|
+
// The org field is a no-op on this single-tenant edition; earlier
|
|
1486
|
+
// suites' seeds are counted too — assert at-least semantics on the
|
|
1487
|
+
// shared counters and exact semantics on this suite's own markers.
|
|
1488
|
+
expect(
|
|
1489
|
+
summary.phaseCounts[ExecutionPhase.EXECUTION_PENDING] ?? 0,
|
|
1490
|
+
).toBeGreaterThanOrEqual(1);
|
|
1491
|
+
expect(summary.activeCount).toBeGreaterThanOrEqual(1);
|
|
1492
|
+
|
|
1493
|
+
expect(summary.avgDuration, "one completed pair exists").toBeDefined();
|
|
1494
|
+
expect(Number(summary.avgDuration?.seconds ?? 0n)).toBeGreaterThan(0);
|
|
1495
|
+
|
|
1496
|
+
const failing = summary.topFailingAgents.find(
|
|
1497
|
+
(rank) => rank.agentSlug === "agt_failing",
|
|
1498
|
+
);
|
|
1499
|
+
expect(failing, "the failed execution ranks its agent").toBeDefined();
|
|
1500
|
+
expect(failing?.failureCount).toBe(1);
|
|
1501
|
+
});
|
|
1502
|
+
});
|