@stigmer/server 3.40.1 → 3.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authorization/authorizer.d.ts +16 -10
- package/dist/authorization/authorizer.d.ts.map +1 -1
- package/dist/authorization/authorizer.js +17 -9
- package/dist/authorization/authorizer.js.map +1 -1
- package/dist/authorization/derived-tuples.d.ts +7 -3
- package/dist/authorization/derived-tuples.d.ts.map +1 -1
- package/dist/authorization/derived-tuples.js +62 -6
- package/dist/authorization/derived-tuples.js.map +1 -1
- package/dist/authorization/evaluator.d.ts +11 -7
- package/dist/authorization/evaluator.d.ts.map +1 -1
- package/dist/authorization/evaluator.js +16 -10
- package/dist/authorization/evaluator.js.map +1 -1
- package/dist/authorization/list-read-scope.d.ts +4 -0
- package/dist/authorization/list-read-scope.d.ts.map +1 -1
- package/dist/authorization/list-read-scope.js +1 -0
- package/dist/authorization/list-read-scope.js.map +1 -1
- package/dist/authorization/model/data/authorization-model.json +830 -67
- package/dist/authorization/model/execution-viewer.d.ts.map +1 -1
- package/dist/authorization/model/execution-viewer.js +26 -24
- package/dist/authorization/model/execution-viewer.js.map +1 -1
- package/dist/authorization/model/index.d.ts +4 -1
- package/dist/authorization/model/index.d.ts.map +1 -1
- package/dist/authorization/model/index.js +4 -1
- package/dist/authorization/model/index.js.map +1 -1
- package/dist/authorization/model/rewrite.d.ts +5 -3
- package/dist/authorization/model/rewrite.d.ts.map +1 -1
- package/dist/authorization/organization-directory.d.ts +44 -0
- package/dist/authorization/organization-directory.d.ts.map +1 -1
- package/dist/authorization/organization-directory.js +1 -0
- package/dist/authorization/organization-directory.js.map +1 -1
- package/dist/authorization/person.d.ts +14 -1
- package/dist/authorization/person.d.ts.map +1 -1
- package/dist/authorization/person.js +16 -0
- package/dist/authorization/person.js.map +1 -1
- package/dist/authorization/policy-check.d.ts +52 -0
- package/dist/authorization/policy-check.d.ts.map +1 -0
- package/dist/authorization/policy-check.js +35 -0
- package/dist/authorization/policy-check.js.map +1 -0
- package/dist/authorization/posture.d.ts +30 -4
- package/dist/authorization/posture.d.ts.map +1 -1
- package/dist/authorization/posture.js +58 -0
- package/dist/authorization/posture.js.map +1 -1
- package/dist/authorization/resource-creators.d.ts +4 -0
- package/dist/authorization/resource-creators.d.ts.map +1 -0
- package/dist/authorization/resource-creators.js +44 -0
- package/dist/authorization/resource-creators.js.map +1 -0
- package/dist/authorization/trusted-local-authorizer.d.ts +9 -0
- package/dist/authorization/trusted-local-authorizer.d.ts.map +1 -0
- package/dist/authorization/trusted-local-authorizer.js +70 -0
- package/dist/authorization/trusted-local-authorizer.js.map +1 -0
- package/dist/authorization/tuples.d.ts +12 -0
- package/dist/authorization/tuples.d.ts.map +1 -1
- package/dist/authorization/tuples.js +3 -0
- package/dist/authorization/tuples.js.map +1 -1
- package/dist/boot/compose.d.ts.map +1 -1
- package/dist/boot/compose.js +132 -43
- package/dist/boot/compose.js.map +1 -1
- package/dist/boot/config.d.ts +22 -7
- package/dist/boot/config.d.ts.map +1 -1
- package/dist/boot/config.js +2 -1
- package/dist/boot/config.js.map +1 -1
- package/dist/boot/inprocess.d.ts.map +1 -1
- package/dist/boot/inprocess.js +10 -4
- package/dist/boot/inprocess.js.map +1 -1
- package/dist/boot/list-indexes.d.ts.map +1 -1
- package/dist/boot/list-indexes.js +6 -1
- package/dist/boot/list-indexes.js.map +1 -1
- package/dist/boot/logger.d.ts +3 -1
- package/dist/boot/logger.d.ts.map +1 -1
- package/dist/boot/logger.js +3 -1
- package/dist/boot/logger.js.map +1 -1
- package/dist/boot/oauth-redirect-uri.d.ts +33 -12
- package/dist/boot/oauth-redirect-uri.d.ts.map +1 -1
- package/dist/boot/oauth-redirect-uri.js +43 -14
- package/dist/boot/oauth-redirect-uri.js.map +1 -1
- package/dist/boot/skill-transfer-origin.d.ts +46 -14
- package/dist/boot/skill-transfer-origin.d.ts.map +1 -1
- package/dist/boot/skill-transfer-origin.js +53 -13
- package/dist/boot/skill-transfer-origin.js.map +1 -1
- package/dist/domain/agentchannel/steps.d.ts +8 -6
- package/dist/domain/agentchannel/steps.d.ts.map +1 -1
- package/dist/domain/agentchannel/steps.js +9 -7
- package/dist/domain/agentchannel/steps.js.map +1 -1
- package/dist/domain/agentexecution/controller.d.ts +7 -0
- package/dist/domain/agentexecution/controller.d.ts.map +1 -1
- package/dist/domain/agentexecution/controller.js +1 -1
- package/dist/domain/agentexecution/controller.js.map +1 -1
- package/dist/domain/agentexecution/create-steps.d.ts +26 -12
- package/dist/domain/agentexecution/create-steps.d.ts.map +1 -1
- package/dist/domain/agentexecution/create-steps.js +61 -43
- package/dist/domain/agentexecution/create-steps.js.map +1 -1
- package/dist/domain/agentexecution/submit-approval.d.ts.map +1 -1
- package/dist/domain/agentexecution/submit-approval.js +9 -6
- package/dist/domain/agentexecution/submit-approval.js.map +1 -1
- package/dist/domain/agentexecution/submit-file-decision.d.ts.map +1 -1
- package/dist/domain/agentexecution/submit-file-decision.js +5 -4
- package/dist/domain/agentexecution/submit-file-decision.js.map +1 -1
- package/dist/domain/agentshare/steps.d.ts +5 -3
- package/dist/domain/agentshare/steps.d.ts.map +1 -1
- package/dist/domain/agentshare/steps.js +6 -4
- package/dist/domain/agentshare/steps.js.map +1 -1
- package/dist/domain/apikey/verifier.d.ts +7 -0
- package/dist/domain/apikey/verifier.d.ts.map +1 -1
- package/dist/domain/apikey/verifier.js +34 -1
- package/dist/domain/apikey/verifier.js.map +1 -1
- package/dist/domain/channelapp/controller.d.ts +4 -3
- package/dist/domain/channelapp/controller.d.ts.map +1 -1
- package/dist/domain/channelapp/controller.js.map +1 -1
- package/dist/domain/executioncontext/steps.d.ts +2 -1
- package/dist/domain/executioncontext/steps.d.ts.map +1 -1
- package/dist/domain/executioncontext/steps.js +2 -1
- package/dist/domain/executioncontext/steps.js.map +1 -1
- package/dist/domain/iampolicy/access-lists.d.ts.map +1 -1
- package/dist/domain/iampolicy/access-lists.js +57 -2
- package/dist/domain/iampolicy/access-lists.js.map +1 -1
- package/dist/domain/iampolicy/change.d.ts +53 -0
- package/dist/domain/iampolicy/change.d.ts.map +1 -0
- package/dist/domain/iampolicy/change.js +44 -0
- package/dist/domain/iampolicy/change.js.map +1 -0
- package/dist/domain/iampolicy/constants.d.ts +6 -0
- package/dist/domain/iampolicy/constants.d.ts.map +1 -1
- package/dist/domain/iampolicy/constants.js +6 -0
- package/dist/domain/iampolicy/constants.js.map +1 -1
- package/dist/domain/iampolicy/controller.d.ts.map +1 -1
- package/dist/domain/iampolicy/controller.js +9 -5
- package/dist/domain/iampolicy/controller.js.map +1 -1
- package/dist/domain/iampolicy/grant-path.d.ts +31 -13
- package/dist/domain/iampolicy/grant-path.d.ts.map +1 -1
- package/dist/domain/iampolicy/grant-path.js +216 -19
- package/dist/domain/iampolicy/grant-path.js.map +1 -1
- package/dist/domain/iampolicy/membership.d.ts +11 -3
- package/dist/domain/iampolicy/membership.d.ts.map +1 -1
- package/dist/domain/iampolicy/membership.js +18 -13
- package/dist/domain/iampolicy/membership.js.map +1 -1
- package/dist/domain/iampolicy/resource-store.d.ts.map +1 -1
- package/dist/domain/iampolicy/resource-store.js +4 -0
- package/dist/domain/iampolicy/resource-store.js.map +1 -1
- package/dist/domain/iampolicy/role-lifecycle.d.ts.map +1 -1
- package/dist/domain/iampolicy/role-lifecycle.js +2 -2
- package/dist/domain/iampolicy/role-lifecycle.js.map +1 -1
- package/dist/domain/iampolicy/roles.d.ts.map +1 -1
- package/dist/domain/iampolicy/roles.js +7 -0
- package/dist/domain/iampolicy/roles.js.map +1 -1
- package/dist/domain/iampolicy/steps.d.ts +4 -3
- package/dist/domain/iampolicy/steps.d.ts.map +1 -1
- package/dist/domain/iampolicy/steps.js +7 -7
- package/dist/domain/iampolicy/steps.js.map +1 -1
- package/dist/domain/iampolicy/store-contract.d.ts.map +1 -1
- package/dist/domain/iampolicy/store-contract.js +22 -1
- package/dist/domain/iampolicy/store-contract.js.map +1 -1
- package/dist/domain/iampolicy/store.d.ts +18 -5
- package/dist/domain/iampolicy/store.d.ts.map +1 -1
- package/dist/domain/iampolicy/store.js.map +1 -1
- package/dist/domain/identityaccount/constants.d.ts +15 -0
- package/dist/domain/identityaccount/constants.d.ts.map +1 -1
- package/dist/domain/identityaccount/constants.js +17 -0
- package/dist/domain/identityaccount/constants.js.map +1 -1
- package/dist/domain/identityaccount/controller.d.ts.map +1 -1
- package/dist/domain/identityaccount/controller.js +17 -6
- package/dist/domain/identityaccount/controller.js.map +1 -1
- package/dist/domain/identityaccount/resolve.d.ts +47 -0
- package/dist/domain/identityaccount/resolve.d.ts.map +1 -1
- package/dist/domain/identityaccount/resolve.js +38 -1
- package/dist/domain/identityaccount/resolve.js.map +1 -1
- package/dist/domain/identityaccount/resource-store.d.ts.map +1 -1
- package/dist/domain/identityaccount/resource-store.js +11 -1
- package/dist/domain/identityaccount/resource-store.js.map +1 -1
- package/dist/domain/identityaccount/steps.d.ts +2 -1
- package/dist/domain/identityaccount/steps.d.ts.map +1 -1
- package/dist/domain/identityaccount/steps.js +4 -3
- package/dist/domain/identityaccount/steps.js.map +1 -1
- package/dist/domain/identityaccount/store-contract.js +2 -2
- package/dist/domain/identityaccount/store-contract.js.map +1 -1
- package/dist/domain/identityaccount/store.d.ts +6 -1
- package/dist/domain/identityaccount/store.d.ts.map +1 -1
- package/dist/domain/mcpserver/connect-sandbox.d.ts +67 -0
- package/dist/domain/mcpserver/connect-sandbox.d.ts.map +1 -0
- package/dist/domain/mcpserver/connect-sandbox.js +64 -0
- package/dist/domain/mcpserver/connect-sandbox.js.map +1 -0
- package/dist/domain/mcpserver/connect.d.ts +42 -10
- package/dist/domain/mcpserver/connect.d.ts.map +1 -1
- package/dist/domain/mcpserver/connect.js +147 -40
- package/dist/domain/mcpserver/connect.js.map +1 -1
- package/dist/domain/mcpserver/controller.js +4 -2
- package/dist/domain/mcpserver/controller.js.map +1 -1
- package/dist/domain/mcpserver/engine.d.ts +26 -7
- package/dist/domain/mcpserver/engine.d.ts.map +1 -1
- package/dist/domain/mcpserver/engine.js.map +1 -1
- package/dist/domain/mcpserver/start-connect.d.ts +5 -0
- package/dist/domain/mcpserver/start-connect.d.ts.map +1 -1
- package/dist/domain/mcpserver/start-connect.js +38 -15
- package/dist/domain/mcpserver/start-connect.js.map +1 -1
- package/dist/domain/memory/controller.js +2 -1
- package/dist/domain/memory/controller.js.map +1 -1
- package/dist/domain/memory/list-index.d.ts +2 -0
- package/dist/domain/memory/list-index.d.ts.map +1 -0
- package/dist/domain/memory/list-index.js +31 -0
- package/dist/domain/memory/list-index.js.map +1 -0
- package/dist/domain/memory/queries.d.ts +10 -0
- package/dist/domain/memory/queries.d.ts.map +1 -0
- package/dist/domain/memory/queries.js +54 -0
- package/dist/domain/memory/queries.js.map +1 -0
- package/dist/domain/memory/steps.d.ts +13 -11
- package/dist/domain/memory/steps.d.ts.map +1 -1
- package/dist/domain/memory/steps.js +26 -57
- package/dist/domain/memory/steps.js.map +1 -1
- package/dist/domain/organization/steps.d.ts.map +1 -1
- package/dist/domain/organization/steps.js +1 -1
- package/dist/domain/organization/steps.js.map +1 -1
- package/dist/domain/platformclient/mint.d.ts.map +1 -1
- package/dist/domain/platformclient/mint.js +2 -2
- package/dist/domain/platformclient/mint.js.map +1 -1
- package/dist/domain/platformclient/verifier.d.ts.map +1 -1
- package/dist/domain/platformclient/verifier.js +6 -3
- package/dist/domain/platformclient/verifier.js.map +1 -1
- package/dist/domain/plugin/push.d.ts.map +1 -1
- package/dist/domain/plugin/push.js +1 -0
- package/dist/domain/plugin/push.js.map +1 -1
- package/dist/domain/schedule/steps.d.ts +3 -1
- package/dist/domain/schedule/steps.d.ts.map +1 -1
- package/dist/domain/schedule/steps.js +3 -1
- package/dist/domain/schedule/steps.js.map +1 -1
- package/dist/domain/skill/push.d.ts.map +1 -1
- package/dist/domain/skill/push.js +1 -0
- package/dist/domain/skill/push.js.map +1 -1
- package/dist/domain/workflow/registry/data/task-kind-registry.json +27 -1
- package/dist/domain/workflowexecution/submit-approval.d.ts +5 -2
- package/dist/domain/workflowexecution/submit-approval.d.ts.map +1 -1
- package/dist/domain/workflowexecution/submit-approval.js +1 -1
- package/dist/domain/workflowexecution/submit-approval.js.map +1 -1
- package/dist/domain/workflowexecution/submit-file-decision.d.ts +5 -2
- package/dist/domain/workflowexecution/submit-file-decision.d.ts.map +1 -1
- package/dist/domain/workflowexecution/submit-file-decision.js +1 -1
- package/dist/domain/workflowexecution/submit-file-decision.js.map +1 -1
- package/dist/domain/workflowexecution/submit-workflow-task-approval.d.ts.map +1 -1
- package/dist/domain/workflowexecution/submit-workflow-task-approval.js +12 -1
- package/dist/domain/workflowexecution/submit-workflow-task-approval.js.map +1 -1
- package/dist/domain/workflowinstance/controller.d.ts +6 -3
- package/dist/domain/workflowinstance/controller.d.ts.map +1 -1
- package/dist/domain/workflowinstance/controller.js +12 -7
- package/dist/domain/workflowinstance/controller.js.map +1 -1
- package/dist/domain/workflowinstance/steps.d.ts +31 -0
- package/dist/domain/workflowinstance/steps.d.ts.map +1 -1
- package/dist/domain/workflowinstance/steps.js +88 -1
- package/dist/domain/workflowinstance/steps.js.map +1 -1
- package/dist/extensions/composed-services.d.ts +56 -0
- package/dist/extensions/composed-services.d.ts.map +1 -0
- package/dist/extensions/composed-services.js +2 -0
- package/dist/extensions/composed-services.js.map +1 -0
- package/dist/extensions/drivers.d.ts +32 -1
- package/dist/extensions/drivers.d.ts.map +1 -1
- package/dist/extensions/identity.d.ts +4 -1
- package/dist/extensions/identity.d.ts.map +1 -1
- package/dist/extensions/identity.js +4 -1
- package/dist/extensions/identity.js.map +1 -1
- package/dist/extensions/registry.d.ts +37 -0
- package/dist/extensions/registry.d.ts.map +1 -1
- package/dist/extensions/registry.js +50 -0
- package/dist/extensions/registry.js.map +1 -1
- package/dist/extensions/resource-authorization.d.ts +78 -0
- package/dist/extensions/resource-authorization.d.ts.map +1 -1
- package/dist/extensions/resource-row-reader.d.ts +43 -0
- package/dist/extensions/resource-row-reader.d.ts.map +1 -0
- package/dist/extensions/resource-row-reader.js +2 -0
- package/dist/extensions/resource-row-reader.js.map +1 -0
- package/dist/extensions/visitor-classifier.d.ts +41 -0
- package/dist/extensions/visitor-classifier.d.ts.map +1 -0
- package/dist/extensions/visitor-classifier.js +2 -0
- package/dist/extensions/visitor-classifier.js.map +1 -0
- package/dist/identity/oidc-userinfo.d.ts +6 -1
- package/dist/identity/oidc-userinfo.d.ts.map +1 -1
- package/dist/identity/oidc-userinfo.js.map +1 -1
- package/dist/identity/oidc-verifier.d.ts.map +1 -1
- package/dist/identity/oidc-verifier.js +37 -8
- package/dist/identity/oidc-verifier.js.map +1 -1
- package/dist/index.d.ts +14 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -9
- package/dist/index.js.map +1 -1
- package/dist/pipeline/errors.d.ts +8 -0
- package/dist/pipeline/errors.d.ts.map +1 -1
- package/dist/pipeline/errors.js +25 -16
- package/dist/pipeline/errors.js.map +1 -1
- package/dist/pipeline/interceptors/auth.d.ts +17 -9
- package/dist/pipeline/interceptors/auth.d.ts.map +1 -1
- package/dist/pipeline/interceptors/auth.js +17 -9
- package/dist/pipeline/interceptors/auth.js.map +1 -1
- package/dist/pipeline/steps/authorization-tuples.d.ts +23 -1
- package/dist/pipeline/steps/authorization-tuples.d.ts.map +1 -1
- package/dist/pipeline/steps/authorization-tuples.js +42 -0
- package/dist/pipeline/steps/authorization-tuples.js.map +1 -1
- package/dist/pipeline/steps/authorize.d.ts +6 -5
- package/dist/pipeline/steps/authorize.d.ts.map +1 -1
- package/dist/pipeline/steps/authorize.js +6 -5
- package/dist/pipeline/steps/authorize.js.map +1 -1
- package/dist/pipeline/steps/defaults.d.ts +12 -0
- package/dist/pipeline/steps/defaults.d.ts.map +1 -1
- package/dist/pipeline/steps/defaults.js +42 -7
- package/dist/pipeline/steps/defaults.js.map +1 -1
- package/dist/pipeline/steps/guard-memory-capture.d.ts +13 -15
- package/dist/pipeline/steps/guard-memory-capture.d.ts.map +1 -1
- package/dist/pipeline/steps/guard-memory-capture.js +2 -3
- package/dist/pipeline/steps/guard-memory-capture.js.map +1 -1
- package/dist/runnerauth/built-in-runner-credential-provider.d.ts +0 -2
- package/dist/runnerauth/built-in-runner-credential-provider.d.ts.map +1 -1
- package/dist/runnerauth/built-in-runner-credential-provider.js +8 -17
- package/dist/runnerauth/built-in-runner-credential-provider.js.map +1 -1
- package/dist/runnerauth/runner-credential-provider.d.ts +17 -7
- package/dist/runnerauth/runner-credential-provider.d.ts.map +1 -1
- package/dist/runnerauth/runner-credential-provider.js.map +1 -1
- package/dist/sandbox/docker.d.ts.map +1 -1
- package/dist/sandbox/docker.js +3 -0
- package/dist/sandbox/docker.js.map +1 -1
- package/dist/sandbox/kubernetes.d.ts.map +1 -1
- package/dist/sandbox/kubernetes.js +3 -0
- package/dist/sandbox/kubernetes.js.map +1 -1
- package/dist/sandbox/local-process.d.ts.map +1 -1
- package/dist/sandbox/local-process.js +4 -0
- package/dist/sandbox/local-process.js.map +1 -1
- package/dist/sandbox/provisioner.d.ts +18 -6
- package/dist/sandbox/provisioner.d.ts.map +1 -1
- package/dist/sandbox/provisioner.js.map +1 -1
- package/dist/temporal/manager.d.ts +5 -0
- package/dist/temporal/manager.d.ts.map +1 -1
- package/dist/temporal/manager.js +9 -0
- package/dist/temporal/manager.js.map +1 -1
- package/dist/temporal/mcpserver/engine-client.d.ts +2 -2
- package/dist/temporal/mcpserver/engine-client.d.ts.map +1 -1
- package/dist/temporal/mcpserver/engine-client.js +6 -4
- package/dist/temporal/mcpserver/engine-client.js.map +1 -1
- package/dist/temporal/mcpserver/names.d.ts +13 -2
- package/dist/temporal/mcpserver/names.d.ts.map +1 -1
- package/dist/temporal/mcpserver/names.js +15 -2
- package/dist/temporal/mcpserver/names.js.map +1 -1
- package/dist/temporal/sdk-logger.d.ts +74 -0
- package/dist/temporal/sdk-logger.d.ts.map +1 -0
- package/dist/temporal/sdk-logger.js +143 -0
- package/dist/temporal/sdk-logger.js.map +1 -0
- package/package.json +6 -6
- package/src/authorization/README.md +18 -6
- package/src/authorization/__tests__/authorizer.test.ts +5 -1
- package/src/authorization/__tests__/derived-tuples.test.ts +26 -0
- package/src/authorization/__tests__/evaluator.test.ts +4 -0
- package/src/authorization/__tests__/list-read-scope.test.ts +11 -5
- package/src/authorization/__tests__/store-tests.test.ts +3 -1
- package/src/authorization/__tests__/trusted-local-authorizer.test.ts +155 -0
- package/src/authorization/__tests__/unit-owned-kinds.test.ts +420 -0
- package/src/authorization/__tests__/wire-permissions.test.ts +31 -2
- package/src/authorization/authorizer.ts +21 -10
- package/src/authorization/derived-tuples.ts +92 -18
- package/src/authorization/evaluator.ts +30 -15
- package/src/authorization/list-read-scope.ts +4 -0
- package/src/authorization/model/__tests__/registry.test.ts +23 -0
- package/src/authorization/model/data/authorization-model.json +830 -67
- package/src/authorization/model/execution-viewer.ts +32 -27
- package/src/authorization/model/index.ts +4 -1
- package/src/authorization/model/rewrite.ts +5 -3
- package/src/authorization/organization-directory.ts +4 -0
- package/src/authorization/person.ts +32 -1
- package/src/authorization/policy-check.ts +105 -0
- package/src/authorization/posture.ts +45 -4
- package/src/authorization/resource-creators.ts +48 -0
- package/src/authorization/trusted-local-authorizer.ts +91 -0
- package/src/authorization/tuples.ts +17 -0
- package/src/boot/__tests__/compose.test.ts +120 -4
- package/src/boot/__tests__/list-indexes.test.ts +4 -0
- package/src/boot/__tests__/oauth-redirect-uri.test.ts +121 -10
- package/src/boot/__tests__/skill-transfer-origin.test.ts +96 -25
- package/src/boot/compose.ts +153 -61
- package/src/boot/config.ts +28 -12
- package/src/boot/inprocess.ts +18 -4
- package/src/boot/list-indexes.ts +6 -1
- package/src/boot/logger.ts +3 -1
- package/src/boot/oauth-redirect-uri.ts +62 -17
- package/src/boot/skill-transfer-origin.ts +71 -16
- package/src/domain/agent/__tests__/agent.test.ts +42 -1
- package/src/domain/agentchannel/__tests__/agentchannel.test.ts +9 -0
- package/src/domain/agentchannel/__tests__/channel-runtime.test.ts +2 -0
- package/src/domain/agentchannel/__tests__/create-authorization.test.ts +7 -6
- package/src/domain/agentchannel/steps.ts +9 -7
- package/src/domain/agentexecution/__tests__/agentexecution.test.ts +148 -56
- package/src/domain/agentexecution/__tests__/create-steps.test.ts +175 -12
- package/src/domain/agentexecution/__tests__/file-review-seed.ts +91 -0
- package/src/domain/agentexecution/controller.ts +8 -0
- package/src/domain/agentexecution/create-steps.ts +74 -44
- package/src/domain/agentexecution/submit-approval.ts +9 -6
- package/src/domain/agentexecution/submit-file-decision.ts +5 -4
- package/src/domain/agentinstance/__tests__/agentinstance.test.ts +2 -0
- package/src/domain/agentshare/__tests__/agentshare.test.ts +17 -0
- package/src/domain/agentshare/__tests__/create-authorization.test.ts +5 -4
- package/src/domain/agentshare/steps.ts +6 -4
- package/src/domain/apikey/__tests__/verifier.test.ts +73 -1
- package/src/domain/apikey/verifier.ts +45 -1
- package/src/domain/artifact/__tests__/artifact.test.ts +13 -24
- package/src/domain/channelapp/__tests__/channelapp.test.ts +7 -0
- package/src/domain/channelapp/controller.ts +4 -3
- package/src/domain/environment/__tests__/environment.test.ts +13 -0
- package/src/domain/executioncontext/__tests__/executioncontext.test.ts +2 -0
- package/src/domain/executioncontext/steps.ts +2 -1
- package/src/domain/iampolicy/__tests__/access-lists.test.ts +79 -0
- package/src/domain/iampolicy/__tests__/change.test.ts +63 -0
- package/src/domain/iampolicy/__tests__/controller.test.ts +39 -3
- package/src/domain/iampolicy/__tests__/grant-path.test.ts +595 -27
- package/src/domain/iampolicy/__tests__/iampolicy.test.ts +33 -2
- package/src/domain/iampolicy/__tests__/membership.test.ts +47 -5
- package/src/domain/iampolicy/__tests__/resource-store.test.ts +1 -0
- package/src/domain/iampolicy/__tests__/role-lifecycle.test.ts +41 -8
- package/src/domain/iampolicy/__tests__/roles.test.ts +3 -2
- package/src/domain/iampolicy/__tests__/steps.test.ts +75 -6
- package/src/domain/iampolicy/__tests__/support.ts +68 -4
- package/src/domain/iampolicy/access-lists.ts +70 -2
- package/src/domain/iampolicy/change.ts +109 -0
- package/src/domain/iampolicy/constants.ts +8 -0
- package/src/domain/iampolicy/controller.ts +17 -3
- package/src/domain/iampolicy/grant-path.ts +349 -31
- package/src/domain/iampolicy/membership.ts +32 -12
- package/src/domain/iampolicy/resource-store.ts +4 -0
- package/src/domain/iampolicy/role-lifecycle.ts +2 -0
- package/src/domain/iampolicy/roles.ts +8 -0
- package/src/domain/iampolicy/steps.ts +15 -5
- package/src/domain/iampolicy/store-contract.ts +37 -1
- package/src/domain/iampolicy/store.ts +19 -5
- package/src/domain/identityaccount/__tests__/resolve.test.ts +246 -2
- package/src/domain/identityaccount/__tests__/resource-store.test.ts +1 -1
- package/src/domain/identityaccount/constants.ts +20 -0
- package/src/domain/identityaccount/controller.ts +20 -5
- package/src/domain/identityaccount/resolve.ts +80 -1
- package/src/domain/identityaccount/resource-store.ts +14 -1
- package/src/domain/identityaccount/steps.ts +4 -3
- package/src/domain/identityaccount/store-contract.ts +4 -4
- package/src/domain/identityaccount/store.ts +6 -1
- package/src/domain/mcpserver/__tests__/connect-authorization.test.ts +1 -0
- package/src/domain/mcpserver/__tests__/connect.test.ts +358 -15
- package/src/domain/mcpserver/__tests__/mcpserver.test.ts +2 -0
- package/src/domain/mcpserver/__tests__/oauth-handshake.test.ts +2 -0
- package/src/domain/mcpserver/__tests__/store-faults.test.ts +2 -0
- package/src/domain/mcpserver/connect-sandbox.ts +135 -0
- package/src/domain/mcpserver/connect.ts +226 -56
- package/src/domain/mcpserver/controller.ts +8 -2
- package/src/domain/mcpserver/engine.ts +24 -6
- package/src/domain/mcpserver/start-connect.ts +49 -10
- package/src/domain/memory/__tests__/memory.test.ts +92 -22
- package/src/domain/memory/__tests__/queries.test.ts +173 -0
- package/src/domain/memory/controller.ts +2 -1
- package/src/domain/memory/list-index.ts +32 -0
- package/src/domain/memory/queries.ts +72 -0
- package/src/domain/memory/steps.ts +26 -63
- package/src/domain/oauthapp/__tests__/oauthapp.test.ts +14 -0
- package/src/domain/organization/__tests__/support.ts +41 -0
- package/src/domain/organization/steps.ts +1 -0
- package/src/domain/platformclient/mint.ts +6 -2
- package/src/domain/platformclient/verifier.ts +6 -3
- package/src/domain/plugin/__tests__/plugin.test.ts +11 -24
- package/src/domain/plugin/push.ts +1 -0
- package/src/domain/schedule/__tests__/schedule.composed.test.ts +2 -0
- package/src/domain/schedule/steps.ts +3 -1
- package/src/domain/session/__tests__/session.test.ts +2 -0
- package/src/domain/skill/__tests__/skill.test.ts +7 -25
- package/src/domain/skill/push.ts +1 -0
- package/src/domain/workflow/__tests__/workflow.test.ts +2 -0
- package/src/domain/workflow/registry/data/task-kind-registry.json +27 -1
- package/src/domain/workflowexecution/__tests__/forward-attribution-composed.test.ts +270 -0
- package/src/domain/workflowexecution/__tests__/submit-workflow-task-approval.test.ts +196 -0
- package/src/domain/workflowexecution/__tests__/workflowexecution.test.ts +3 -57
- package/src/domain/workflowexecution/submit-approval.ts +9 -2
- package/src/domain/workflowexecution/submit-file-decision.ts +6 -1
- package/src/domain/workflowexecution/submit-workflow-task-approval.ts +23 -5
- package/src/domain/workflowinstance/controller.ts +27 -9
- package/src/domain/workflowinstance/steps.ts +123 -1
- package/src/extensions/__tests__/apikey-before-sign-in-composed.test.ts +172 -0
- package/src/extensions/__tests__/built-in-authorization-composed.test.ts +80 -1
- package/src/extensions/__tests__/composed-services-composed.test.ts +236 -0
- package/src/extensions/__tests__/extension-composition.test.ts +229 -16
- package/src/extensions/__tests__/identity-account-composed.test.ts +84 -4
- package/src/extensions/__tests__/list-read-scope-composed.test.ts +2 -0
- package/src/extensions/__tests__/registry.test.ts +147 -1
- package/src/extensions/__tests__/secret-cleanup-composed.test.ts +2 -0
- package/src/extensions/__tests__/visitor-classifier-points.test.ts +42 -0
- package/src/extensions/composed-services.ts +61 -0
- package/src/extensions/drivers.ts +33 -1
- package/src/extensions/identity.ts +4 -1
- package/src/extensions/registry.ts +105 -0
- package/src/extensions/resource-authorization.ts +87 -0
- package/src/extensions/resource-row-reader.ts +43 -0
- package/src/extensions/visitor-classifier.ts +41 -0
- package/src/identity/__tests__/oidc-verifier.test.ts +38 -12
- package/src/identity/oidc-userinfo.ts +6 -1
- package/src/identity/oidc-verifier.ts +42 -8
- package/src/index.ts +61 -6
- package/src/pipeline/__tests__/steps.test.ts +31 -4
- package/src/pipeline/errors.ts +30 -16
- package/src/pipeline/interceptors/auth.ts +17 -9
- package/src/pipeline/steps/__tests__/authorization-tuples.test.ts +20 -0
- package/src/pipeline/steps/__tests__/guard-memory-capture.test.ts +72 -15
- package/src/pipeline/steps/authorization-tuples.ts +54 -0
- package/src/pipeline/steps/authorize.ts +6 -5
- package/src/pipeline/steps/defaults.ts +52 -7
- package/src/pipeline/steps/guard-memory-capture.ts +15 -20
- package/src/runnerauth/__tests__/built-in-runner-credential-provider.test.ts +1 -1
- package/src/runnerauth/__tests__/runner-subject-composed.test.ts +13 -0
- package/src/runnerauth/bound-execution.ts +2 -2
- package/src/runnerauth/built-in-runner-credential-provider.ts +8 -21
- package/src/runnerauth/runner-credential-provider.ts +17 -7
- package/src/sandbox/__tests__/docker.integration.test.ts +4 -0
- package/src/sandbox/__tests__/kubernetes.test.ts +18 -1
- package/src/sandbox/__tests__/local-process.integration.test.ts +4 -0
- package/src/sandbox/__tests__/provisioner.test.ts +1 -0
- package/src/sandbox/docker.ts +3 -0
- package/src/sandbox/kubernetes.ts +3 -0
- package/src/sandbox/local-process.ts +4 -0
- package/src/sandbox/provisioner.ts +18 -6
- package/src/store/postgres/__tests__/support.ts +11 -2
- package/src/temporal/README.md +1 -0
- package/src/temporal/__tests__/manager.test.ts +56 -4
- package/src/temporal/__tests__/sdk-log-workflows.ts +26 -0
- package/src/temporal/__tests__/sdk-logger.e2e.test.ts +150 -0
- package/src/temporal/__tests__/sdk-logger.test.ts +238 -0
- package/src/temporal/manager.ts +9 -0
- package/src/temporal/mcpserver/engine-client.ts +8 -3
- package/src/temporal/mcpserver/names.ts +16 -2
- package/src/temporal/sdk-logger.ts +173 -0
- package/dist/authorization/lane-admission.d.ts +0 -50
- package/dist/authorization/lane-admission.d.ts.map +0 -1
- package/dist/authorization/lane-admission.js +0 -13
- package/dist/authorization/lane-admission.js.map +0 -1
- package/src/authorization/__tests__/lane-admission.test.ts +0 -115
- package/src/authorization/lane-admission.ts +0 -73
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where one MCP connect runs: the one module that decides a connect's task
|
|
3
|
+
* queue and owns the connect sandbox's lifecycle (stigmer/stigmer#1474).
|
|
4
|
+
*
|
|
5
|
+
* Without a sandbox provisioner (the external-runner posture, the OSS
|
|
6
|
+
* default) a connect runs on the shared runner queue exactly as it always
|
|
7
|
+
* has: an operator-managed runner polls it, and nothing is provisioned.
|
|
8
|
+
*
|
|
9
|
+
* With a provisioner composed, that queue has no poller at all: boot
|
|
10
|
+
* requires a per-queue routing mode beside a provisioner
|
|
11
|
+
* (boot/compose.ts), so session sandboxes serve `session:<id>`, workflow
|
|
12
|
+
* sandboxes `wfexec:<id>`, and nobody serves `stigmer_runner`. A connect
|
|
13
|
+
* started there waited until its run timeout with a "no runner" advisory
|
|
14
|
+
* on its status. Here every connect instead gets a request-scoped connect
|
|
15
|
+
* sandbox (the provisioner contract's CONNECT scope, sandbox/provisioner.ts)
|
|
16
|
+
* whose runner polls the connect's own queue
|
|
17
|
+
* (temporal/mcpserver/names.ts `connectTaskQueueFor`), and the lane that
|
|
18
|
+
* started the run releases it when the run settles.
|
|
19
|
+
*
|
|
20
|
+
* The sandbox's credential acts as the person who asked for the connect.
|
|
21
|
+
* The runner reads the McpServer and classifies its tools through the
|
|
22
|
+
* proxy with the credential baked into its sandbox, so it is minted for
|
|
23
|
+
* that person, scoped to this one connect (`scope: "connect"`,
|
|
24
|
+
* runnerauth/runner-credential-provider.ts). On the OSS execution-scoped
|
|
25
|
+
* lane the binding resolves the person from the connect's ExecutionContext
|
|
26
|
+
* row (runnerauth/bound-execution.ts, the `mcp-connect` binding), which is
|
|
27
|
+
* why prepareConnect always creates that row when a lane is composed, even
|
|
28
|
+
* for a server that declares no env. A composed mintSandboxCredential
|
|
29
|
+
* capability mints its own edition's equivalent from the same request.
|
|
30
|
+
*
|
|
31
|
+
* Failure posture: provisioning is CRITICAL here. A connect whose sandbox
|
|
32
|
+
* cannot be created fails at once with an honest Unavailable instead of
|
|
33
|
+
* starving to its run timeout (the ask of the closed stigmer-cloud#302),
|
|
34
|
+
* the workflow sandbox's posture and copy shape (sandbox/steps.ts).
|
|
35
|
+
* Release is best-effort and never throws: a settle must never fail on
|
|
36
|
+
* teardown, and a sandbox a release could not delete is what the edition's
|
|
37
|
+
* orphan sweep exists for (the cloud reaps every connect object past its
|
|
38
|
+
* grace; OSS has no reaper, the workflow scope's known window).
|
|
39
|
+
*/
|
|
40
|
+
import type { Logger } from "../../boot/logger.js";
|
|
41
|
+
import { unavailableError } from "../../pipeline/errors.js";
|
|
42
|
+
import { mintSandboxToken, type SandboxLane } from "../../sandbox/lane.js";
|
|
43
|
+
import type { SandboxCaller } from "../../sandbox/steps.js";
|
|
44
|
+
import { connectTaskQueueFor } from "../../temporal/mcpserver/names.js";
|
|
45
|
+
import type { ConnectTaskQueue } from "./engine.js";
|
|
46
|
+
|
|
47
|
+
/** The refusal when a connect sandbox cannot be provisioned. */
|
|
48
|
+
export const CONNECT_SANDBOX_PROVISIONING_FAILED =
|
|
49
|
+
"failed to provision connect sandbox";
|
|
50
|
+
|
|
51
|
+
/** A connect's route: the queue its run starts on, and how to give back what serving it took. */
|
|
52
|
+
export interface ConnectRoute {
|
|
53
|
+
readonly taskQueue: ConnectTaskQueue;
|
|
54
|
+
/** Tears down the connect sandbox, if one was provisioned. Idempotent; never throws. */
|
|
55
|
+
release(): Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ConnectRouteRequest {
|
|
59
|
+
/** The connect's synthetic execution id — the sandbox's id, its queue's suffix, and its credential's binding. */
|
|
60
|
+
readonly connectExecutionId: string;
|
|
61
|
+
/** The organization the connect runs in (the caller's `input.org`). */
|
|
62
|
+
readonly org: string;
|
|
63
|
+
/** The person the sandbox's runner acts as. */
|
|
64
|
+
readonly caller: SandboxCaller;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const SHARED_RUNNER_ROUTE: ConnectRoute = Object.freeze({
|
|
68
|
+
taskQueue: Object.freeze({ kind: "runner" as const }),
|
|
69
|
+
release: async () => {},
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Resolves where a connect runs, provisioning its sandbox when a lane is
|
|
74
|
+
* composed. Throws Unavailable when provisioning fails; the caller has not
|
|
75
|
+
* started a run yet, so nothing else needs undoing but its own
|
|
76
|
+
* ExecutionContext.
|
|
77
|
+
*/
|
|
78
|
+
export async function acquireConnectRoute(
|
|
79
|
+
lane: SandboxLane,
|
|
80
|
+
logger: Logger,
|
|
81
|
+
request: ConnectRouteRequest,
|
|
82
|
+
): Promise<ConnectRoute> {
|
|
83
|
+
if (!lane.enabled) {
|
|
84
|
+
return SHARED_RUNNER_ROUTE;
|
|
85
|
+
}
|
|
86
|
+
const { connectExecutionId, org, caller } = request;
|
|
87
|
+
const taskQueue = connectTaskQueueFor(connectExecutionId);
|
|
88
|
+
let sandboxId: string;
|
|
89
|
+
try {
|
|
90
|
+
sandboxId = await lane.provisioner.createConnectSandbox(
|
|
91
|
+
connectExecutionId,
|
|
92
|
+
{
|
|
93
|
+
taskQueue,
|
|
94
|
+
stigmerToken: mintSandboxToken(
|
|
95
|
+
lane,
|
|
96
|
+
{
|
|
97
|
+
scope: "connect",
|
|
98
|
+
sessionId: "",
|
|
99
|
+
executionId: connectExecutionId,
|
|
100
|
+
org,
|
|
101
|
+
callerIdentityId: caller.identityId,
|
|
102
|
+
},
|
|
103
|
+
logger,
|
|
104
|
+
),
|
|
105
|
+
callerClass: caller.callerClass,
|
|
106
|
+
},
|
|
107
|
+
);
|
|
108
|
+
} catch (error) {
|
|
109
|
+
logger.error("Connect sandbox provisioning failed - refusing the connect", {
|
|
110
|
+
execution_id: connectExecutionId,
|
|
111
|
+
error: error instanceof Error ? error.message : String(error),
|
|
112
|
+
});
|
|
113
|
+
throw unavailableError(CONNECT_SANDBOX_PROVISIONING_FAILED);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
let released = false;
|
|
117
|
+
return {
|
|
118
|
+
taskQueue: { kind: "sandbox", name: taskQueue },
|
|
119
|
+
async release() {
|
|
120
|
+
if (released) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
released = true;
|
|
124
|
+
try {
|
|
125
|
+
await lane.provisioner.deprovisionConnectSandbox(sandboxId);
|
|
126
|
+
} catch (error) {
|
|
127
|
+
logger.warn("Failed to deprovision connect sandbox (non-fatal)", {
|
|
128
|
+
execution_id: connectExecutionId,
|
|
129
|
+
sandbox_id: sandboxId,
|
|
130
|
+
error: error instanceof Error ? error.message : String(error),
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
}
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Discovery runs on the RUNNER: this module starts the runner's
|
|
11
11
|
* stigmer/mcp-server/connect workflow through the engine seam
|
|
12
|
-
* (engine.ts) and never registers a worker.
|
|
12
|
+
* (engine.ts) and never registers a worker. Which runner serves it — the
|
|
13
|
+
* shared queue's, or a connect sandbox provisioned for this connect alone
|
|
14
|
+
* — is connect-sandbox.ts's decision (stigmer/stigmer#1474).
|
|
13
15
|
*
|
|
14
16
|
* Proven by mcpserver-connect.conformance.test.ts
|
|
15
17
|
* (CONFORMANCE_TARGET=local-execution), __tests__/connect.test.ts and
|
|
@@ -38,6 +40,7 @@ import type { McpServer } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/
|
|
|
38
40
|
import { McpServerSchema } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/api_pb";
|
|
39
41
|
import { McpServerCommandController } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/command_pb";
|
|
40
42
|
import type { ConnectInput } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/io_pb";
|
|
43
|
+
import { ConnectInputSchema } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/io_pb";
|
|
41
44
|
import type { ApiResourceDeleteInputSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
|
|
42
45
|
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
43
46
|
import { TokenEndpointAuthMethod } from "@stigmer/protos/ai/stigmer/iam/oauthapp/v1/spec_pb";
|
|
@@ -57,6 +60,7 @@ import {
|
|
|
57
60
|
} from "../../pipeline/errors.js";
|
|
58
61
|
import type { RunnerCredentialProvider } from "../../runnerauth/runner-credential-provider.js";
|
|
59
62
|
import { TOKEN_TYPE_EXECUTION_SCOPED } from "../../runnerauth/runnerauth.js";
|
|
63
|
+
import type { SandboxLane } from "../../sandbox/lane.js";
|
|
60
64
|
import type {
|
|
61
65
|
OAuthGrantStore,
|
|
62
66
|
PendingOAuthStateStore,
|
|
@@ -65,6 +69,8 @@ import type {
|
|
|
65
69
|
import { ResourceNotFoundError } from "../../store/interface.js";
|
|
66
70
|
import { resolveOAuthAppRef } from "../oauthapp/refresolution.js";
|
|
67
71
|
import { newConnectExecutionId } from "./connect-execution-id.js";
|
|
72
|
+
import { acquireConnectRoute } from "./connect-sandbox.js";
|
|
73
|
+
import type { ConnectRoute, ConnectRouteRequest } from "./connect-sandbox.js";
|
|
68
74
|
import {
|
|
69
75
|
persistConnectFailure,
|
|
70
76
|
persistConnectResult,
|
|
@@ -74,6 +80,7 @@ import type {
|
|
|
74
80
|
ConnectRun,
|
|
75
81
|
ConnectRunFailure,
|
|
76
82
|
ConnectWorkflowInput,
|
|
83
|
+
McpServerConnectEngine,
|
|
77
84
|
McpServerEngineStateProvider,
|
|
78
85
|
} from "./engine.js";
|
|
79
86
|
import { refreshTokenIfExpired } from "./oauth/refresh.js";
|
|
@@ -218,6 +225,13 @@ export interface McpServerConnectDeps {
|
|
|
218
225
|
readonly pendingOAuthStates: PendingOAuthStateStore;
|
|
219
226
|
readonly secretService: SecretService;
|
|
220
227
|
readonly oauthRedirectUri: string;
|
|
228
|
+
/**
|
|
229
|
+
* The composed sandbox lane (sandbox/lane.ts): disabled, a connect runs
|
|
230
|
+
* on the shared runner queue; enabled, every connect provisions its own
|
|
231
|
+
* connect sandbox and always creates its ExecutionContext row, the
|
|
232
|
+
* binding its sandbox's credential acts through (connect-sandbox.ts).
|
|
233
|
+
*/
|
|
234
|
+
readonly sandboxLane: SandboxLane;
|
|
221
235
|
/**
|
|
222
236
|
* The ONE fetch this slice dials user-supplied URLs with: the MCP
|
|
223
237
|
* endpoint probed at save time and the login server reached on Sign in
|
|
@@ -297,13 +311,21 @@ export async function connect(
|
|
|
297
311
|
|
|
298
312
|
const prepared = await prepareConnect(deps, mcpServer, input, identity);
|
|
299
313
|
|
|
314
|
+
let route: ConnectRoute | undefined;
|
|
300
315
|
try {
|
|
316
|
+
route = await acquireConnectRouteFor(deps, mcpServerId, {
|
|
317
|
+
connectExecutionId: prepared.executionId,
|
|
318
|
+
org: input.org,
|
|
319
|
+
caller: identity,
|
|
320
|
+
});
|
|
321
|
+
|
|
301
322
|
let run: ConnectRun;
|
|
302
323
|
try {
|
|
303
324
|
run = await engineState.engine.startOrAttachConnect(
|
|
304
325
|
mcpServerId,
|
|
305
326
|
prepared.workflowInput,
|
|
306
327
|
CONNECT_TIMEOUT.ms,
|
|
328
|
+
route.taskQueue,
|
|
307
329
|
);
|
|
308
330
|
} catch (error) {
|
|
309
331
|
deps.logger.error("Failed to start MCP connect workflow", {
|
|
@@ -313,6 +335,13 @@ export async function connect(
|
|
|
313
335
|
throw internalError(error, "failed to start connect workflow");
|
|
314
336
|
}
|
|
315
337
|
|
|
338
|
+
// An attached run is served by the sandbox of the lane that started
|
|
339
|
+
// it: this lane's own sandbox, if one was provisioned, is given back
|
|
340
|
+
// now rather than held idle for the other lane's whole run.
|
|
341
|
+
if (run.attached) {
|
|
342
|
+
await route.release();
|
|
343
|
+
}
|
|
344
|
+
|
|
316
345
|
// Record the operation on connect_status. Skipped when attached: the
|
|
317
346
|
// lane that started the run already recorded it, and overwriting
|
|
318
347
|
// would reset its started_at. Best-effort — the blocking caller
|
|
@@ -387,6 +416,8 @@ export async function connect(
|
|
|
387
416
|
|
|
388
417
|
return persisted;
|
|
389
418
|
} finally {
|
|
419
|
+
// Idempotent: a no-op when the attach arm already released it.
|
|
420
|
+
await route?.release();
|
|
390
421
|
if (prepared.ecResourceId !== "") {
|
|
391
422
|
await deleteConnectExecutionContext(
|
|
392
423
|
deps,
|
|
@@ -397,6 +428,27 @@ export async function connect(
|
|
|
397
428
|
}
|
|
398
429
|
}
|
|
399
430
|
|
|
431
|
+
/**
|
|
432
|
+
* Resolves a connect's route (connect-sandbox.ts) for every lane alike: a
|
|
433
|
+
* sandbox that cannot be provisioned is recorded on connect_status as the
|
|
434
|
+
* connect's failure before the refusal propagates, so the server's page
|
|
435
|
+
* says why instead of waiting on a run that was never started.
|
|
436
|
+
*/
|
|
437
|
+
export async function acquireConnectRouteFor(
|
|
438
|
+
deps: McpServerConnectDeps,
|
|
439
|
+
mcpServerId: string,
|
|
440
|
+
request: ConnectRouteRequest,
|
|
441
|
+
): Promise<ConnectRoute> {
|
|
442
|
+
try {
|
|
443
|
+
return await acquireConnectRoute(deps.sandboxLane, deps.logger, request);
|
|
444
|
+
} catch (error) {
|
|
445
|
+
if (error instanceof ConnectError) {
|
|
446
|
+
await persistConnectFailure(deps.store, deps.logger, mcpServerId, error);
|
|
447
|
+
}
|
|
448
|
+
throw error;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
400
452
|
/**
|
|
401
453
|
* The caller-context half of a connect: the OAuth refresh pre-flight,
|
|
402
454
|
* ephemeral ExecutionContext creation, and decrypt-lane token minting
|
|
@@ -420,10 +472,17 @@ export async function connect(
|
|
|
420
472
|
* bound to this connect's ExecutionContext, and under the built-in
|
|
421
473
|
* posture the runner-subject verifier resolves its bearer to the person
|
|
422
474
|
* that row was created by — which is why the row is created as `identity`
|
|
423
|
-
* and not as the server.
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
*
|
|
475
|
+
* and not as the server.
|
|
476
|
+
*
|
|
477
|
+
* With a sandbox lane composed there is no operator key: the connect
|
|
478
|
+
* sandbox's runner acts as the person on EVERY RPC of its discovery, with
|
|
479
|
+
* a credential bound to this connect (connect-sandbox.ts). That binding
|
|
480
|
+
* resolves through the ExecutionContext row, so on the lane the row is
|
|
481
|
+
* always created, as `identity`, even for a server that declares no env
|
|
482
|
+
* (an empty `data` map; stigmer/stigmer#1474). Such a binding-only row
|
|
483
|
+
* carries nothing to read, so the workflow input names no context for it
|
|
484
|
+
* and no payload token: the runner's discovery takes the same no-env path
|
|
485
|
+
* it takes today. Without a lane an env-less connect still creates no row.
|
|
427
486
|
*/
|
|
428
487
|
export async function prepareConnect(
|
|
429
488
|
deps: McpServerConnectDeps,
|
|
@@ -444,18 +503,26 @@ export async function prepareConnect(
|
|
|
444
503
|
|
|
445
504
|
const executionId = newConnectExecutionId(mcpServerId);
|
|
446
505
|
|
|
447
|
-
const
|
|
506
|
+
const ecRow = await createConnectExecutionContext(
|
|
448
507
|
deps,
|
|
449
508
|
mcpServer,
|
|
450
509
|
executionId,
|
|
451
510
|
callerOrg,
|
|
452
511
|
input.runtimeEnv,
|
|
453
512
|
identity,
|
|
513
|
+
deps.sandboxLane.enabled,
|
|
454
514
|
);
|
|
515
|
+
const ecResourceId = ecRow?.resourceId ?? "";
|
|
455
516
|
|
|
456
517
|
const workflowInput: ConnectWorkflowInput = {
|
|
457
518
|
mcp_server_id: mcpServerId,
|
|
458
|
-
|
|
519
|
+
};
|
|
520
|
+
if (ecRow === undefined || ecRow.bindingOnly) {
|
|
521
|
+
return { workflowInput, ecResourceId, executionId };
|
|
522
|
+
}
|
|
523
|
+
const withContext: ConnectWorkflowInput = {
|
|
524
|
+
...workflowInput,
|
|
525
|
+
execution_context_id: executionId,
|
|
459
526
|
};
|
|
460
527
|
|
|
461
528
|
// Mint the decrypt-lane token for the EC just created (oss#535) — see
|
|
@@ -464,10 +531,7 @@ export async function prepareConnect(
|
|
|
464
531
|
// with declared credentials will refuse the redacted read with an
|
|
465
532
|
// actionable error, and credential-less servers connect fine without
|
|
466
533
|
// the token.
|
|
467
|
-
if (
|
|
468
|
-
ecResourceId !== "" &&
|
|
469
|
-
deps.runnerAuth.isEnabled(TOKEN_TYPE_EXECUTION_SCOPED)
|
|
470
|
-
) {
|
|
534
|
+
if (deps.runnerAuth.isEnabled(TOKEN_TYPE_EXECUTION_SCOPED)) {
|
|
471
535
|
try {
|
|
472
536
|
const minted = deps.runnerAuth.mint(
|
|
473
537
|
TOKEN_TYPE_EXECUTION_SCOPED,
|
|
@@ -476,7 +540,7 @@ export async function prepareConnect(
|
|
|
476
540
|
);
|
|
477
541
|
return {
|
|
478
542
|
workflowInput: {
|
|
479
|
-
...
|
|
543
|
+
...withContext,
|
|
480
544
|
execution_context_token: minted.token,
|
|
481
545
|
},
|
|
482
546
|
ecResourceId,
|
|
@@ -493,7 +557,18 @@ export async function prepareConnect(
|
|
|
493
557
|
}
|
|
494
558
|
}
|
|
495
559
|
|
|
496
|
-
return { workflowInput, ecResourceId, executionId };
|
|
560
|
+
return { workflowInput: withContext, ecResourceId, executionId };
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* The connect's ExecutionContext row, when one was created: its resource
|
|
565
|
+
* id (for the settle's delete) and whether it is binding-only — created on
|
|
566
|
+
* the sandbox lane for a connect with nothing to carry (prepareConnect's
|
|
567
|
+
* header).
|
|
568
|
+
*/
|
|
569
|
+
interface ConnectExecutionContextRow {
|
|
570
|
+
readonly resourceId: string;
|
|
571
|
+
readonly bindingOnly: boolean;
|
|
497
572
|
}
|
|
498
573
|
|
|
499
574
|
/**
|
|
@@ -503,8 +578,11 @@ export async function prepareConnect(
|
|
|
503
578
|
* When runtime_env is provided, the values are used directly (one-time
|
|
504
579
|
* use). When runtime_env is empty, variables are resolved from two
|
|
505
580
|
* sources: OAuth-managed variables from the grant's managed environment,
|
|
506
|
-
* the remainder from the user's personal environment.
|
|
507
|
-
*
|
|
581
|
+
* the remainder from the user's personal environment. When nothing
|
|
582
|
+
* resolves (no env declarations and no runtime_env, or no values) it
|
|
583
|
+
* creates no row and returns undefined, unless `bindingRowRequired`: the
|
|
584
|
+
* sandbox lane's connect needs the row as its credential's binding, so it
|
|
585
|
+
* is created with empty `data` and reported binding-only.
|
|
508
586
|
*
|
|
509
587
|
* The row is created as `caller`, the person connecting (see the
|
|
510
588
|
* ConnectExecutionContextClient doc): its creator stamp is the connect
|
|
@@ -517,8 +595,9 @@ async function createConnectExecutionContext(
|
|
|
517
595
|
callerOrg: string,
|
|
518
596
|
runtimeEnv: { [key: string]: ExecutionValue },
|
|
519
597
|
caller: CallerIdentity,
|
|
520
|
-
|
|
521
|
-
|
|
598
|
+
bindingRowRequired: boolean,
|
|
599
|
+
): Promise<ConnectExecutionContextRow | undefined> {
|
|
600
|
+
let ecData: { [key: string]: ExecutionValue } = {};
|
|
522
601
|
|
|
523
602
|
if (Object.keys(runtimeEnv).length > 0) {
|
|
524
603
|
ecData = runtimeEnv;
|
|
@@ -531,44 +610,26 @@ async function createConnectExecutionContext(
|
|
|
531
610
|
);
|
|
532
611
|
} else {
|
|
533
612
|
const envDecls = mcpServer.spec?.env ?? {};
|
|
534
|
-
if (Object.keys(envDecls).length
|
|
613
|
+
if (Object.keys(envDecls).length > 0) {
|
|
614
|
+
ecData = await resolveConnectEnvironment(
|
|
615
|
+
deps,
|
|
616
|
+
mcpServer,
|
|
617
|
+
executionId,
|
|
618
|
+
callerOrg,
|
|
619
|
+
envDecls,
|
|
620
|
+
);
|
|
621
|
+
} else if (!bindingRowRequired) {
|
|
535
622
|
deps.logger.debug(
|
|
536
623
|
"MCP server has no env declarations — skipping ExecutionContext creation",
|
|
537
624
|
{ execution_id: executionId },
|
|
538
625
|
);
|
|
539
|
-
return
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
const mcpServerId = mcpServer.metadata?.id ?? "";
|
|
543
|
-
|
|
544
|
-
// Split resolution: OAuth vars from managed env, rest from personal.
|
|
545
|
-
const { oauthVars, remainingDecls } = await resolveOAuthVarsFromManagedEnv(
|
|
546
|
-
deps,
|
|
547
|
-
mcpServerId,
|
|
548
|
-
callerOrg,
|
|
549
|
-
envDecls,
|
|
550
|
-
);
|
|
551
|
-
|
|
552
|
-
let personalVars: { [key: string]: ExecutionValue } = {};
|
|
553
|
-
if (Object.keys(remainingDecls).length > 0) {
|
|
554
|
-
personalVars = await resolveFromPersonalEnvironment(
|
|
555
|
-
deps,
|
|
556
|
-
callerOrg,
|
|
557
|
-
remainingDecls,
|
|
558
|
-
);
|
|
626
|
+
return undefined;
|
|
559
627
|
}
|
|
560
|
-
|
|
561
|
-
ecData = { ...personalVars, ...oauthVars };
|
|
562
|
-
|
|
563
|
-
deps.logger.info("Resolved env vars for connect ExecutionContext", {
|
|
564
|
-
execution_id: executionId,
|
|
565
|
-
oauth_count: Object.keys(oauthVars).length,
|
|
566
|
-
personal_count: Object.keys(personalVars).length,
|
|
567
|
-
});
|
|
568
628
|
}
|
|
569
629
|
|
|
570
|
-
|
|
571
|
-
|
|
630
|
+
const bindingOnly = Object.keys(ecData).length === 0;
|
|
631
|
+
if (bindingOnly && !bindingRowRequired) {
|
|
632
|
+
return undefined;
|
|
572
633
|
}
|
|
573
634
|
|
|
574
635
|
let created: ExecutionContext;
|
|
@@ -599,7 +660,48 @@ async function createConnectExecutionContext(
|
|
|
599
660
|
data_entries: Object.keys(ecData).length,
|
|
600
661
|
});
|
|
601
662
|
|
|
602
|
-
return resourceId;
|
|
663
|
+
return { resourceId, bindingOnly };
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Resolves a server's declared env for its connect: OAuth-managed
|
|
668
|
+
* variables from the grant's managed environment, the remainder from the
|
|
669
|
+
* caller's personal environment (Go createConnectExecutionContext's
|
|
670
|
+
* resolution half).
|
|
671
|
+
*/
|
|
672
|
+
async function resolveConnectEnvironment(
|
|
673
|
+
deps: McpServerConnectDeps,
|
|
674
|
+
mcpServer: McpServer,
|
|
675
|
+
executionId: string,
|
|
676
|
+
callerOrg: string,
|
|
677
|
+
envDecls: { [key: string]: EnvVarDeclaration },
|
|
678
|
+
): Promise<{ [key: string]: ExecutionValue }> {
|
|
679
|
+
const mcpServerId = mcpServer.metadata?.id ?? "";
|
|
680
|
+
|
|
681
|
+
// Split resolution: OAuth vars from managed env, rest from personal.
|
|
682
|
+
const { oauthVars, remainingDecls } = await resolveOAuthVarsFromManagedEnv(
|
|
683
|
+
deps,
|
|
684
|
+
mcpServerId,
|
|
685
|
+
callerOrg,
|
|
686
|
+
envDecls,
|
|
687
|
+
);
|
|
688
|
+
|
|
689
|
+
let personalVars: { [key: string]: ExecutionValue } = {};
|
|
690
|
+
if (Object.keys(remainingDecls).length > 0) {
|
|
691
|
+
personalVars = await resolveFromPersonalEnvironment(
|
|
692
|
+
deps,
|
|
693
|
+
callerOrg,
|
|
694
|
+
remainingDecls,
|
|
695
|
+
);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
deps.logger.info("Resolved env vars for connect ExecutionContext", {
|
|
699
|
+
execution_id: executionId,
|
|
700
|
+
oauth_count: Object.keys(oauthVars).length,
|
|
701
|
+
personal_count: Object.keys(personalVars).length,
|
|
702
|
+
});
|
|
703
|
+
|
|
704
|
+
return { ...personalVars, ...oauthVars };
|
|
603
705
|
}
|
|
604
706
|
|
|
605
707
|
/**
|
|
@@ -1071,14 +1173,22 @@ export function tokenAuthMethodFromSpec(
|
|
|
1071
1173
|
*
|
|
1072
1174
|
* A disconnected engine returns SILENTLY — byte parity with Go's
|
|
1073
1175
|
* nil-temporalClient no-op (connect.go:1048). Servers that declare env
|
|
1074
|
-
* vars are skipped:
|
|
1075
|
-
*
|
|
1076
|
-
*
|
|
1077
|
-
*
|
|
1176
|
+
* vars are skipped: resolving their credentials needs the connecting
|
|
1177
|
+
* person's own environments, which an apply does not stand for. If the
|
|
1178
|
+
* server is deleted before the workflow completes, persistence is skipped
|
|
1179
|
+
* — expected for best-effort.
|
|
1180
|
+
*
|
|
1181
|
+
* `applier` is the caller whose apply fired this connect. Without a
|
|
1182
|
+
* sandbox lane it is unused: the shared runner's own credential reads the
|
|
1183
|
+
* server, exactly as before. With one, the connect runs in a connect
|
|
1184
|
+
* sandbox acting as the applier (connect-sandbox.ts), so the lane first
|
|
1185
|
+
* creates the binding-only ExecutionContext row as the applier
|
|
1186
|
+
* (prepareConnect) and deletes it when the run settles.
|
|
1078
1187
|
*/
|
|
1079
1188
|
export async function startBestEffortConnect(
|
|
1080
1189
|
deps: McpServerConnectDeps,
|
|
1081
1190
|
mcpServer: McpServer,
|
|
1191
|
+
applier: CallerIdentity,
|
|
1082
1192
|
): Promise<void> {
|
|
1083
1193
|
const engineState = deps.engineState();
|
|
1084
1194
|
if (!engineState.connected) {
|
|
@@ -1097,14 +1207,72 @@ export async function startBestEffortConnect(
|
|
|
1097
1207
|
return;
|
|
1098
1208
|
}
|
|
1099
1209
|
|
|
1210
|
+
const mcpServerId = mcpServer.metadata?.id ?? "";
|
|
1211
|
+
const org = mcpServer.metadata?.org ?? "";
|
|
1212
|
+
|
|
1213
|
+
let prepared: PreparedConnect | undefined;
|
|
1214
|
+
let route: ConnectRoute | undefined;
|
|
1215
|
+
try {
|
|
1216
|
+
if (deps.sandboxLane.enabled) {
|
|
1217
|
+
prepared = await prepareConnect(
|
|
1218
|
+
deps,
|
|
1219
|
+
mcpServer,
|
|
1220
|
+
create(ConnectInputSchema, { mcpServerId, org }),
|
|
1221
|
+
applier,
|
|
1222
|
+
);
|
|
1223
|
+
route = await acquireConnectRouteFor(deps, mcpServerId, {
|
|
1224
|
+
connectExecutionId: prepared.executionId,
|
|
1225
|
+
org,
|
|
1226
|
+
caller: applier,
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
await runBestEffortConnect(
|
|
1230
|
+
deps,
|
|
1231
|
+
engineState.engine,
|
|
1232
|
+
mcpServer,
|
|
1233
|
+
prepared?.workflowInput ?? { mcp_server_id: mcpServerId },
|
|
1234
|
+
route,
|
|
1235
|
+
);
|
|
1236
|
+
} catch (error) {
|
|
1237
|
+
deps.logger.warn("Best-effort connect could not start (non-fatal)", {
|
|
1238
|
+
mcp_server_id: mcpServerId,
|
|
1239
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1240
|
+
});
|
|
1241
|
+
} finally {
|
|
1242
|
+
await route?.release();
|
|
1243
|
+
if (prepared !== undefined && prepared.ecResourceId !== "") {
|
|
1244
|
+
await deleteConnectExecutionContext(
|
|
1245
|
+
deps,
|
|
1246
|
+
prepared.ecResourceId,
|
|
1247
|
+
prepared.executionId,
|
|
1248
|
+
);
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* The run half of the best-effort connect: start or attach, record
|
|
1255
|
+
* CONNECTING, await, and persist the outcome. Every arm is non-fatal and
|
|
1256
|
+
* returns. The caller owns the route (undefined: the shared runner queue)
|
|
1257
|
+
* and the ExecutionContext; an attach gives the route's sandbox back at
|
|
1258
|
+
* once, since the other lane's run is served by its own.
|
|
1259
|
+
*/
|
|
1260
|
+
async function runBestEffortConnect(
|
|
1261
|
+
deps: McpServerConnectDeps,
|
|
1262
|
+
engine: McpServerConnectEngine,
|
|
1263
|
+
mcpServer: McpServer,
|
|
1264
|
+
workflowInput: ConnectWorkflowInput,
|
|
1265
|
+
route: ConnectRoute | undefined,
|
|
1266
|
+
): Promise<void> {
|
|
1100
1267
|
const mcpServerId = mcpServer.metadata?.id ?? "";
|
|
1101
1268
|
|
|
1102
1269
|
let run: ConnectRun;
|
|
1103
1270
|
try {
|
|
1104
|
-
run = await
|
|
1271
|
+
run = await engine.startOrAttachConnect(
|
|
1105
1272
|
mcpServerId,
|
|
1106
|
-
|
|
1273
|
+
workflowInput,
|
|
1107
1274
|
CONNECT_TIMEOUT.ms,
|
|
1275
|
+
route?.taskQueue ?? { kind: "runner" },
|
|
1108
1276
|
);
|
|
1109
1277
|
} catch (error) {
|
|
1110
1278
|
deps.logger.warn(
|
|
@@ -1121,7 +1289,9 @@ export async function startBestEffortConnect(
|
|
|
1121
1289
|
// applied server sees the auto-connect in progress rather than
|
|
1122
1290
|
// nothing. Skipped when attached (the starting lane's record stands);
|
|
1123
1291
|
// failures stay non-fatal like everything else on this path.
|
|
1124
|
-
if (
|
|
1292
|
+
if (run.attached) {
|
|
1293
|
+
await route?.release();
|
|
1294
|
+
} else {
|
|
1125
1295
|
try {
|
|
1126
1296
|
await persistConnectStarting(deps.store, mcpServerId, run.workflowId, "");
|
|
1127
1297
|
} catch (error) {
|
|
@@ -323,7 +323,9 @@ async function update(
|
|
|
323
323
|
* `go StartBestEffortConnect(result)` (apply.go:76), auto discovery
|
|
324
324
|
* through the runner's connect workflow. Fire-and-forget on purpose: the
|
|
325
325
|
* gRPC response must not wait on a discovery run; a disconnected engine
|
|
326
|
-
* makes it a silent no-op (byte parity with Go's nil-client return).
|
|
326
|
+
* makes it a silent no-op (byte parity with Go's nil-client return). The
|
|
327
|
+
* applier rides along: with a sandbox lane composed the discovery's
|
|
328
|
+
* sandbox acts as the person who applied (connect-sandbox.ts).
|
|
327
329
|
*/
|
|
328
330
|
async function apply(
|
|
329
331
|
deps: McpServerControllerDeps,
|
|
@@ -366,7 +368,11 @@ async function apply(
|
|
|
366
368
|
|
|
367
369
|
// startBestEffortConnect's arms never throw by design; the catch is
|
|
368
370
|
// the process-safety net an unhandled rejection would pierce.
|
|
369
|
-
void startBestEffortConnect(
|
|
371
|
+
void startBestEffortConnect(
|
|
372
|
+
deps.connect,
|
|
373
|
+
result,
|
|
374
|
+
callerIdentityOf(ctx),
|
|
375
|
+
).catch((error: unknown) => {
|
|
370
376
|
deps.logger.warn("Best-effort connect task failed unexpectedly", {
|
|
371
377
|
mcp_server_id: result.metadata?.id ?? "",
|
|
372
378
|
error: error instanceof Error ? error.message : String(error),
|
|
@@ -108,6 +108,21 @@ export type ConnectRunOutcome =
|
|
|
108
108
|
| { readonly ok: true; readonly output: ConnectWorkflowOutput }
|
|
109
109
|
| { readonly ok: false; readonly failure: ConnectRunFailure };
|
|
110
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Where a connect run is served — decided by the domain, resolved to a
|
|
113
|
+
* queue name by the engine:
|
|
114
|
+
* - "runner": the server's shared runner queue, polled by an external
|
|
115
|
+
* runner (the posture with no sandbox provisioner composed, Go
|
|
116
|
+
* connect.go:642-645);
|
|
117
|
+
* - "sandbox": the queue one connect sandbox serves, provisioned for this
|
|
118
|
+
* connect alone (connect-sandbox.ts). With a provisioner composed the
|
|
119
|
+
* shared queue has no poller at all (boot/compose.ts requires a
|
|
120
|
+
* per-queue routing mode beside one, stigmer/stigmer#1474).
|
|
121
|
+
*/
|
|
122
|
+
export type ConnectTaskQueue =
|
|
123
|
+
| { readonly kind: "runner" }
|
|
124
|
+
| { readonly kind: "sandbox"; readonly name: string };
|
|
125
|
+
|
|
111
126
|
/** A started-or-attached connect run (Go client.WorkflowRun). */
|
|
112
127
|
export interface ConnectRun {
|
|
113
128
|
readonly workflowId: string;
|
|
@@ -131,16 +146,17 @@ export interface ConnectRun {
|
|
|
131
146
|
/** The Temporal client operations the connect lanes consume. */
|
|
132
147
|
export interface McpServerConnectEngine {
|
|
133
148
|
/**
|
|
134
|
-
* Starts the connect workflow on
|
|
149
|
+
* Starts the connect workflow on `taskQueue`, or attaches to the
|
|
135
150
|
* in-flight run when the deterministic workflow ID reports one already
|
|
136
|
-
* running (Go startOrAttachConnectWorkflow)
|
|
137
|
-
*
|
|
138
|
-
* workflow".
|
|
151
|
+
* running (Go startOrAttachConnectWorkflow) — an attached run keeps the
|
|
152
|
+
* queue it was started on. Throws on any other start failure — the
|
|
153
|
+
* lanes map that to Internal "failed to start connect workflow".
|
|
139
154
|
*/
|
|
140
155
|
startOrAttachConnect(
|
|
141
156
|
mcpServerId: string,
|
|
142
157
|
input: ConnectWorkflowInput,
|
|
143
158
|
runTimeoutMs: number,
|
|
159
|
+
taskQueue: ConnectTaskQueue,
|
|
144
160
|
): Promise<ConnectRun>;
|
|
145
161
|
|
|
146
162
|
/**
|
|
@@ -152,8 +168,10 @@ export interface McpServerConnectEngine {
|
|
|
152
168
|
isConnectRunRunning(workflowId: string): Promise<boolean>;
|
|
153
169
|
|
|
154
170
|
/**
|
|
155
|
-
* Whether any worker is polling the runner task queue (Go
|
|
156
|
-
* runnerQueueWarning's DescribeTaskQueue probe).
|
|
171
|
+
* Whether any worker is polling the shared runner task queue (Go
|
|
172
|
+
* runnerQueueWarning's DescribeTaskQueue probe). Asked only for a run
|
|
173
|
+
* routed there: a connect sandbox's queue has no poller at start by
|
|
174
|
+
* construction. `undefined` when the
|
|
157
175
|
* question cannot be answered — an unreachable Temporal should not cry
|
|
158
176
|
* wolf on an operation that is about to fail loudly anyway.
|
|
159
177
|
*/
|