@stigmer/server 3.40.0 → 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 +133 -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 +9 -4
- package/dist/domain/channelapp/controller.d.ts.map +1 -1
- package/dist/domain/channelapp/controller.js +19 -9
- 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 +154 -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 +35 -12
- 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 +41 -1
- 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
package/src/boot/compose.ts
CHANGED
|
@@ -33,12 +33,19 @@ import { ServerEdition } from "@stigmer/protos/ai/stigmer/platform/v1/server_inf
|
|
|
33
33
|
import { HealthCheckResponse_ServingStatus as ServingStatus } from "@stigmer/protos/grpc/health/v1/health_pb";
|
|
34
34
|
|
|
35
35
|
import { newBuiltInAuthorizer } from "../authorization/authorizer.js";
|
|
36
|
-
import { newLaneAdmittedAuthorizer } from "../authorization/lane-admission.js";
|
|
37
36
|
import { newBuiltInListReadScope } from "../authorization/list-read-scope.js";
|
|
38
37
|
import { newBuiltInOrganizationDirectory } from "../authorization/organization-directory.js";
|
|
39
|
-
import {
|
|
38
|
+
import { newBuiltInPolicyCheck } from "../authorization/policy-check.js";
|
|
39
|
+
import { builtInModel } from "../authorization/model/index.js";
|
|
40
|
+
import {
|
|
41
|
+
authorizationPostureOf,
|
|
42
|
+
kindsWithoutRows,
|
|
43
|
+
} from "../authorization/posture.js";
|
|
44
|
+
import { newStoreResourceCreators } from "../authorization/resource-creators.js";
|
|
40
45
|
import { newBuiltInScheduleFireCaller } from "../authorization/schedule-fire-caller.js";
|
|
46
|
+
import { newTrustedLocalAuthorizer } from "../authorization/trusted-local-authorizer.js";
|
|
41
47
|
import type { Authorizer } from "../extensions/authorizer.js";
|
|
48
|
+
import type { ComposedServices } from "../extensions/composed-services.js";
|
|
42
49
|
import { ABSENT_LICENSE_STATUS } from "../extensions/license-status.js";
|
|
43
50
|
import { relaxedEgressPolicy } from "../extensions/outbound-egress.js";
|
|
44
51
|
import type { ListReadScope } from "../extensions/list-read-scope.js";
|
|
@@ -162,16 +169,14 @@ import {
|
|
|
162
169
|
initRpcMetrics,
|
|
163
170
|
metricsExportPosture,
|
|
164
171
|
} from "../observability/rpc-metrics.js";
|
|
172
|
+
import { kindEnumName } from "../pipeline/apiresource-meta.js";
|
|
173
|
+
import { quoteJoin } from "../domain/mcpserver/enabledtools/enabledtools.js";
|
|
165
174
|
import { buildInterceptorChain } from "../pipeline/chain.js";
|
|
166
175
|
import { createVerifierChainInterceptor } from "../pipeline/interceptors/auth.js";
|
|
167
176
|
import { operatorIdentitySnapshot } from "../pipeline/steps/defaults.js";
|
|
168
177
|
import { createErrorBoundaryInterceptor } from "../pipeline/interceptors/error-boundary.js";
|
|
169
178
|
import { createRequestMetricsInterceptor } from "../pipeline/interceptors/request-metrics.js";
|
|
170
|
-
import {
|
|
171
|
-
import {
|
|
172
|
-
isWorkflowBoundRunner,
|
|
173
|
-
newBuiltInRunnerCredentialProvider,
|
|
174
|
-
} from "../runnerauth/built-in-runner-credential-provider.js";
|
|
179
|
+
import { newBuiltInRunnerCredentialProvider } from "../runnerauth/built-in-runner-credential-provider.js";
|
|
175
180
|
import { newExecutionScopedRunnerCredentialProvider } from "../runnerauth/runner-credential-provider.js";
|
|
176
181
|
import { newRunnerSubjectIdentityVerifier } from "../runnerauth/runner-subject-verifier.js";
|
|
177
182
|
import { RunnerAuthService } from "../runnerauth/runnerauth.js";
|
|
@@ -185,7 +190,10 @@ import {
|
|
|
185
190
|
resolveArtifactServeUrl,
|
|
186
191
|
} from "./artifact-lane.js";
|
|
187
192
|
import { resolveOAuthRedirectUri } from "./oauth-redirect-uri.js";
|
|
188
|
-
import {
|
|
193
|
+
import {
|
|
194
|
+
assessSkillTransferOrigin,
|
|
195
|
+
resolveSkillTransferBaseUrl,
|
|
196
|
+
} from "./skill-transfer-origin.js";
|
|
189
197
|
import type { ServerExtension } from "../extensions/registry.js";
|
|
190
198
|
import { registerWorkflowServices } from "../domain/workflow/controller.js";
|
|
191
199
|
import {
|
|
@@ -387,27 +395,40 @@ export async function composeServer(
|
|
|
387
395
|
// authorizer, so the identity stage installs the built-in role
|
|
388
396
|
// lifecycle and the membership rules under both; a composition with its
|
|
389
397
|
// own Authorizer has its own onboarding and gets neither.
|
|
398
|
+
// An edition above open source serves many organizations; without the
|
|
399
|
+
// require-authentication posture a request carrying no credential would
|
|
400
|
+
// act as the laptop's one operator on every one of them. Refused at boot,
|
|
401
|
+
// before any side effect, whichever authorizer the composition runs.
|
|
402
|
+
if (!requireAuthentication && extensions.edition !== ServerEdition.oss) {
|
|
403
|
+
throw new Error(
|
|
404
|
+
`the composition serves edition '${ServerEdition[extensions.edition]}' without the require-authentication posture — an edition above open source must sign its callers in: declare requireAuthentication on a unit that registers a verifier, or configure STIGMER_OIDC_ISSUER`,
|
|
405
|
+
);
|
|
406
|
+
}
|
|
390
407
|
const authorizationPosture = authorizationPostureOf({
|
|
391
408
|
unitAuthorizer: extensions.authorizer !== undefined,
|
|
392
409
|
requireAuthentication,
|
|
393
410
|
});
|
|
394
411
|
const builtInAuthorization = authorizationPosture !== "unit-authorizer";
|
|
395
412
|
// The built-in authorizer evaluates the one model every edition reads,
|
|
396
|
-
//
|
|
397
|
-
//
|
|
398
|
-
//
|
|
399
|
-
//
|
|
400
|
-
//
|
|
401
|
-
//
|
|
402
|
-
//
|
|
403
|
-
// effect.
|
|
404
|
-
if (
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
)
|
|
413
|
+
// and derives each resource's tuples from its row. A wider edition's
|
|
414
|
+
// kinds are served by units that keep their rows in stores of their own,
|
|
415
|
+
// so each such unit registers a reader for its kinds
|
|
416
|
+
// (drivers.resourceRowReaders), and the built-in posture serves a wider
|
|
417
|
+
// edition only when every kind it serves has rows the derivation can
|
|
418
|
+
// read — never answers derived from rows that are not there. Refused at
|
|
419
|
+
// boot, the same class as a misconfigured registry and the verifierless
|
|
420
|
+
// posture below: caught before any side effect.
|
|
421
|
+
if (authorizationPosture === "built-in") {
|
|
422
|
+
const unreadable = kindsWithoutRows({
|
|
423
|
+
edition: extensions.edition,
|
|
424
|
+
model: builtInModel,
|
|
425
|
+
readers: extensions.drivers.resourceRowReaders,
|
|
426
|
+
});
|
|
427
|
+
if (unreadable.length > 0) {
|
|
428
|
+
throw new Error(
|
|
429
|
+
`the composition serves edition '${ServerEdition[extensions.edition]}' under the built-in authorizer but registers no row reader for ${quoteJoin(unreadable.map(kindEnumName))} — register a reader for each kind a unit serves (drivers.resourceRowReaders), or register an Authorizer`,
|
|
430
|
+
);
|
|
431
|
+
}
|
|
411
432
|
}
|
|
412
433
|
|
|
413
434
|
// Stage: identity accounts (20260911.11) — the first domain whose
|
|
@@ -442,6 +463,7 @@ export async function composeServer(
|
|
|
442
463
|
newResourcePlatformClientStore(store);
|
|
443
464
|
const iamPolicyGrantPath = newIamPolicyGrantPath({
|
|
444
465
|
policies: iamPolicies,
|
|
466
|
+
creators: newStoreResourceCreators(store),
|
|
445
467
|
lifecycle: extensions.drivers.resourceAuthorizationLifecycle,
|
|
446
468
|
logger,
|
|
447
469
|
});
|
|
@@ -496,15 +518,13 @@ export async function composeServer(
|
|
|
496
518
|
// source's built-in provider (runnerauth/built-in-runner-credential-
|
|
497
519
|
// provider.ts — the execution-scoped default plus the lineage-vouching,
|
|
498
520
|
// memory-capture and exchange-gating capabilities an enforcing
|
|
499
|
-
// self-host needs
|
|
500
|
-
// Authorizer below admits a workflow-bound runner on); otherwise the
|
|
521
|
+
// self-host needs); otherwise the
|
|
501
522
|
// execution-scoped default, byte-identical to the wiring this seam
|
|
502
523
|
// replaced. Both open-source providers also mint the RUN credential the
|
|
503
524
|
// two execution engines put on every dispatch (the engines below take
|
|
504
525
|
// this object; runnerauth/dispatch-credential.ts) — a composed driver
|
|
505
526
|
// that leaves that capability undefined dispatches without one, its
|
|
506
|
-
// runners being credentialed another way.
|
|
507
|
-
// Authorizer, because the lane admission reads the binding.
|
|
527
|
+
// runners being credentialed another way.
|
|
508
528
|
const runnerAuthService = RunnerAuthService.fromEnv();
|
|
509
529
|
const runnerCredentials =
|
|
510
530
|
extensions.drivers.runnerCredentialProvider ??
|
|
@@ -520,12 +540,15 @@ export async function composeServer(
|
|
|
520
540
|
// controller as an explicit dependency; the Authorize step at position 1
|
|
521
541
|
// of every chain calls it (O2). By posture: an extension's registration;
|
|
522
542
|
// open source's built-in Authorizer (authorization/authorizer.ts — the
|
|
523
|
-
// cloud's model evaluated over the tuples the row would have had),
|
|
524
|
-
//
|
|
525
|
-
//
|
|
526
|
-
//
|
|
527
|
-
//
|
|
528
|
-
//
|
|
543
|
+
// cloud's model evaluated over the tuples the row would have had), which
|
|
544
|
+
// checks every caller on the run gate as the person it acts for: a
|
|
545
|
+
// runner acting for a workflow creates the workflow's child executions
|
|
546
|
+
// as the workflow's person, who must be able to view the agents the
|
|
547
|
+
// workflow calls (the runner's own read of each callee already asks
|
|
548
|
+
// that); or, trusted-local, open source's permissive driver
|
|
549
|
+
// (authorization/trusted-local-authorizer.ts), which separates no callers
|
|
550
|
+
// and answers only whether a named Organization exists, as the other two
|
|
551
|
+
// do (stigmer#1163). The organization directory and the
|
|
529
552
|
// schedule fire caller are bound beside it under the same posture, so
|
|
530
553
|
// `findMyOrganizations` lists what a person may view and a scheduled run
|
|
531
554
|
// belongs to the person who scheduled it — a fire the internal lane
|
|
@@ -533,17 +556,15 @@ export async function composeServer(
|
|
|
533
556
|
const authorizer: Authorizer =
|
|
534
557
|
extensions.authorizer ??
|
|
535
558
|
(authorizationPosture === "built-in"
|
|
536
|
-
?
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
)
|
|
546
|
-
: newPermissiveSingleTeamAuthorizer());
|
|
559
|
+
? newBuiltInAuthorizer({
|
|
560
|
+
store,
|
|
561
|
+
policies: iamPolicies,
|
|
562
|
+
accounts: identityAccounts,
|
|
563
|
+
rowReaders: extensions.drivers.resourceRowReaders,
|
|
564
|
+
edition: extensions.edition,
|
|
565
|
+
logger,
|
|
566
|
+
})
|
|
567
|
+
: newTrustedLocalAuthorizer({ store }));
|
|
547
568
|
const organizationDirectory: OrganizationDirectory | undefined =
|
|
548
569
|
extensions.drivers.organizationDirectory ??
|
|
549
570
|
(authorizationPosture === "built-in"
|
|
@@ -551,6 +572,7 @@ export async function composeServer(
|
|
|
551
572
|
store,
|
|
552
573
|
policies: iamPolicies,
|
|
553
574
|
accounts: identityAccounts,
|
|
575
|
+
rowReaders: extensions.drivers.resourceRowReaders,
|
|
554
576
|
})
|
|
555
577
|
: undefined);
|
|
556
578
|
const scheduleFireCaller: ScheduleFireCallerMint | undefined =
|
|
@@ -573,6 +595,7 @@ export async function composeServer(
|
|
|
573
595
|
store,
|
|
574
596
|
policies: iamPolicies,
|
|
575
597
|
accounts: identityAccounts,
|
|
598
|
+
rowReaders: extensions.drivers.resourceRowReaders,
|
|
576
599
|
logger,
|
|
577
600
|
})
|
|
578
601
|
: undefined);
|
|
@@ -777,6 +800,7 @@ export async function composeServer(
|
|
|
777
800
|
{
|
|
778
801
|
config: {
|
|
779
802
|
backendEndpoint: config.sandboxBackendEndpoint,
|
|
803
|
+
mcpPublicEndpoint: config.sandboxMcpPublicEndpoint,
|
|
780
804
|
temporalAddress: config.sandboxTemporalAddress,
|
|
781
805
|
temporalNamespace: config.temporalNamespace,
|
|
782
806
|
temporalConnectionEnv: temporalConnectionEnv(config.temporalConnection),
|
|
@@ -1025,6 +1049,21 @@ export async function composeServer(
|
|
|
1025
1049
|
// controllers cannot tell which. The slots are constructed on every
|
|
1026
1050
|
// arm so the HTTP lane always has a registry to consult; on a bucket
|
|
1027
1051
|
// arm nothing is ever reserved in it.
|
|
1052
|
+
//
|
|
1053
|
+
// Both URLs render from one base (boot/skill-transfer-origin.ts): the
|
|
1054
|
+
// configured SKILL_TRANSFER_BASE_URL, or the unified port's loopback
|
|
1055
|
+
// origin, read from the port the listener actually bound in start() when
|
|
1056
|
+
// that port is ephemeral (stigmer#1386).
|
|
1057
|
+
let unifiedBoundPort: number | undefined;
|
|
1058
|
+
const skillTransferBase = resolveSkillTransferBaseUrl({
|
|
1059
|
+
configured: config.skillTransferBaseUrl,
|
|
1060
|
+
unifiedPort: options.portOverride ?? config.grpcPort,
|
|
1061
|
+
boundPort: () => unifiedBoundPort,
|
|
1062
|
+
});
|
|
1063
|
+
const renderSkillTransferBase = (): string =>
|
|
1064
|
+
typeof skillTransferBase === "function"
|
|
1065
|
+
? skillTransferBase()
|
|
1066
|
+
: skillTransferBase;
|
|
1028
1067
|
const skillUploadSlots = new UploadSlots(
|
|
1029
1068
|
config.storagePath,
|
|
1030
1069
|
STAGING_KEY_PREFIX,
|
|
@@ -1052,15 +1091,14 @@ export async function composeServer(
|
|
|
1052
1091
|
// the very URL the lane dispatches.
|
|
1053
1092
|
return new LocalArtifactStorage(
|
|
1054
1093
|
config.storagePath,
|
|
1055
|
-
|
|
1094
|
+
typeof skillTransferBase === "function"
|
|
1095
|
+
? () => transferServeUrl(skillTransferBase())
|
|
1096
|
+
: transferServeUrl(skillTransferBase),
|
|
1056
1097
|
{
|
|
1057
1098
|
reserve: (key, declaredSizeBytes) => {
|
|
1058
1099
|
const { ttlMs } = skillUploadSlots.reserve(key, declaredSizeBytes);
|
|
1059
1100
|
return {
|
|
1060
|
-
url: skillUploadUrl(
|
|
1061
|
-
config.skillTransferBaseUrl,
|
|
1062
|
-
uploadRefOf(key),
|
|
1063
|
-
),
|
|
1101
|
+
url: skillUploadUrl(renderSkillTransferBase(), uploadRefOf(key)),
|
|
1064
1102
|
ttlMs,
|
|
1065
1103
|
};
|
|
1066
1104
|
},
|
|
@@ -1107,7 +1145,7 @@ export async function composeServer(
|
|
|
1107
1145
|
// inline push and every other RPC work, and a self-host behind a tunnel
|
|
1108
1146
|
// it forgot to name deserves a pointer, not an outage.
|
|
1109
1147
|
const transferOrigin = assessSkillTransferOrigin({
|
|
1110
|
-
|
|
1148
|
+
configured: config.skillTransferBaseUrl,
|
|
1111
1149
|
relaysThroughServer: skillType === "local",
|
|
1112
1150
|
requireAuthentication,
|
|
1113
1151
|
});
|
|
@@ -1222,14 +1260,17 @@ export async function composeServer(
|
|
|
1222
1260
|
logger,
|
|
1223
1261
|
});
|
|
1224
1262
|
// The OAuth callback: configured, or derived from the served console's
|
|
1225
|
-
// own origin when it serves one
|
|
1226
|
-
//
|
|
1263
|
+
// own origin when it serves one — the public origin the skill transfer
|
|
1264
|
+
// lane already renders on, else the known port's loopback
|
|
1265
|
+
// (boot/oauth-redirect-uri.ts carries the posture; stigmer#1200). Absent
|
|
1266
|
+
// is WARN-degrade, not boot-fatal (Go
|
|
1227
1267
|
// server.go:722-729): every OAuth RPC except initiateOAuthConnect works
|
|
1228
1268
|
// without the redirect URI, and initiate refuses with the pinned
|
|
1229
1269
|
// FailedPrecondition copy.
|
|
1230
1270
|
const oauthRedirect = resolveOAuthRedirectUri({
|
|
1231
1271
|
configured: config.oauthRedirectUri,
|
|
1232
1272
|
servesConsole: consoleAssets !== undefined,
|
|
1273
|
+
publicOrigin: config.skillTransferBaseUrl,
|
|
1233
1274
|
port: options.portOverride ?? config.grpcPort,
|
|
1234
1275
|
});
|
|
1235
1276
|
switch (oauthRedirect.kind) {
|
|
@@ -1240,6 +1281,7 @@ export async function composeServer(
|
|
|
1240
1281
|
"STIGMER_OAUTH_REDIRECT_URI is not set — deriving the served console's callback for MCP server OAuth Connect",
|
|
1241
1282
|
{
|
|
1242
1283
|
redirectUri: oauthRedirect.uri,
|
|
1284
|
+
from: oauthRedirect.from,
|
|
1243
1285
|
},
|
|
1244
1286
|
);
|
|
1245
1287
|
break;
|
|
@@ -1467,6 +1509,7 @@ export async function composeServer(
|
|
|
1467
1509
|
authorizer,
|
|
1468
1510
|
secretService,
|
|
1469
1511
|
authorizationLifecycle,
|
|
1512
|
+
listReadScope,
|
|
1470
1513
|
});
|
|
1471
1514
|
// Schedule registers between channelapp and memory (Go server.go
|
|
1472
1515
|
// 417 → 426 → 436). The clock and runner ride constant providers —
|
|
@@ -1499,6 +1542,7 @@ export async function composeServer(
|
|
|
1499
1542
|
authorizationLifecycle,
|
|
1500
1543
|
listReadScope,
|
|
1501
1544
|
personAccounts,
|
|
1545
|
+
visitorClassifier: extensions.drivers.visitorClassifier,
|
|
1502
1546
|
runnerCredentialProvider: runnerCredentials,
|
|
1503
1547
|
broker: agentExecutionStreamBroker,
|
|
1504
1548
|
engineState: executionEngineState,
|
|
@@ -1612,6 +1656,7 @@ export async function composeServer(
|
|
|
1612
1656
|
pendingOAuthStates: store.pendingOAuthStates,
|
|
1613
1657
|
secretService,
|
|
1614
1658
|
oauthRedirectUri,
|
|
1659
|
+
sandboxLane,
|
|
1615
1660
|
outboundFetch,
|
|
1616
1661
|
},
|
|
1617
1662
|
});
|
|
@@ -1696,10 +1741,12 @@ export async function composeServer(
|
|
|
1696
1741
|
// the issuer left a posture-declaring composition minting keys
|
|
1697
1742
|
// nothing verified.
|
|
1698
1743
|
// - the OIDC verifier rides the ISSUER alone: it is open source's
|
|
1699
|
-
//
|
|
1700
|
-
//
|
|
1701
|
-
//
|
|
1702
|
-
//
|
|
1744
|
+
// operator lane, and it claims only tokens its issuer signed
|
|
1745
|
+
// (identity/oidc-verifier.ts), passing every other JWT on. So the
|
|
1746
|
+
// knob and a composition's own lanes for other issuers compose side
|
|
1747
|
+
// by side: the operator signs in through the knob, and a unit's lane
|
|
1748
|
+
// claims the tokens of the issuers it names. A unit lane must refuse
|
|
1749
|
+
// to route the operator's issuer (it is claimed here first).
|
|
1703
1750
|
// - both OSS verifiers resolve their subject through the identity-
|
|
1704
1751
|
// account domain (20260911.11 Q-IA-2, A6): a provisioned user is
|
|
1705
1752
|
// stamped with the account id whichever credential they present,
|
|
@@ -1712,11 +1759,13 @@ export async function composeServer(
|
|
|
1712
1759
|
// admits the bearer of the server's own execution-scoped runner
|
|
1713
1760
|
// token as the human whose run it is, which only means something
|
|
1714
1761
|
// when the server enforces who may report on a run. Its place in
|
|
1715
|
-
// the chain is the contract: BETWEEN `apikey` and `oidc
|
|
1716
|
-
// the OIDC verifier
|
|
1717
|
-
// it
|
|
1718
|
-
// own token
|
|
1719
|
-
// fault (stigmer#1137)
|
|
1762
|
+
// the chain is the contract: BETWEEN `apikey` and `oidc`. Until
|
|
1763
|
+
// 2026-09-29 the OIDC verifier claimed any JWT-shaped token and threw
|
|
1764
|
+
// on one it could not verify, so composed after it, ours never saw
|
|
1765
|
+
// its own token and every runner call failed as the OIDC verifier's
|
|
1766
|
+
// fault (stigmer#1137); it now claims only its own issuer's tokens,
|
|
1767
|
+
// and the server's own token is still claimed first, by its own
|
|
1768
|
+
// lane, whatever issuer an operator configures. Until 2026-09-16 this comment read "the
|
|
1720
1769
|
// runner's credential in either posture is an operator-minted API
|
|
1721
1770
|
// token via STIGMER_TOKEN — no runner-specific verifier"; that
|
|
1722
1771
|
// described a server whose Authorizer was permissive. The operator's
|
|
@@ -1845,6 +1894,32 @@ export async function composeServer(
|
|
|
1845
1894
|
consoleLane,
|
|
1846
1895
|
});
|
|
1847
1896
|
|
|
1897
|
+
// The hand-over (extensions/composed-services.ts): every unit receives
|
|
1898
|
+
// the composition's own instances — the one Authorizer the Authorize
|
|
1899
|
+
// step calls, the list read scope, the policy check, the tuple lifecycle
|
|
1900
|
+
// and the in-process transport — before composeServer returns, because a
|
|
1901
|
+
// unit's lanes may be called by anyone from then on. The policy check is
|
|
1902
|
+
// the registered engine's, or under the built-in posture the evaluator's.
|
|
1903
|
+
const composedServices: ComposedServices = {
|
|
1904
|
+
authorizer,
|
|
1905
|
+
listReadScope,
|
|
1906
|
+
authorizationQueries:
|
|
1907
|
+
extensions.drivers.authorizationQueries ??
|
|
1908
|
+
(authorizationPosture === "built-in"
|
|
1909
|
+
? newBuiltInPolicyCheck({
|
|
1910
|
+
store,
|
|
1911
|
+
policies: iamPolicies,
|
|
1912
|
+
accounts: identityAccounts,
|
|
1913
|
+
rowReaders: extensions.drivers.resourceRowReaders,
|
|
1914
|
+
})
|
|
1915
|
+
: undefined),
|
|
1916
|
+
resourceAuthorizationLifecycle: authorizationLifecycle,
|
|
1917
|
+
inProcessTransport: inProcessWiring.transport,
|
|
1918
|
+
};
|
|
1919
|
+
for (const { hook } of extensions.onComposed) {
|
|
1920
|
+
hook(composedServices);
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1848
1923
|
return {
|
|
1849
1924
|
healthState,
|
|
1850
1925
|
store,
|
|
@@ -1858,6 +1933,20 @@ export async function composeServer(
|
|
|
1858
1933
|
routes,
|
|
1859
1934
|
|
|
1860
1935
|
async start(): Promise<number> {
|
|
1936
|
+
// The units' own boot work first, in unit order, before any worker,
|
|
1937
|
+
// reconciler or listener can reach their lanes: a repair of a unit's
|
|
1938
|
+
// rows must finish before anything serves, and a failed one fails
|
|
1939
|
+
// the start, naming its unit.
|
|
1940
|
+
for (const { unit, hook } of extensions.start) {
|
|
1941
|
+
try {
|
|
1942
|
+
await hook();
|
|
1943
|
+
} catch (error) {
|
|
1944
|
+
throw new Error(
|
|
1945
|
+
`extension '${unit}' failed to start: ${error instanceof Error ? error.message : String(error)}`,
|
|
1946
|
+
{ cause: error },
|
|
1947
|
+
);
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1861
1950
|
// Temporal boot is NON-fatal end to end (Go server.go): a failed
|
|
1862
1951
|
// initial connect leaves the engine unavailable and the monitor
|
|
1863
1952
|
// retrying; a failed worker start is a warning. Health below flips
|
|
@@ -1935,6 +2024,10 @@ export async function composeServer(
|
|
|
1935
2024
|
options.portOverride ?? config.grpcPort,
|
|
1936
2025
|
options.host,
|
|
1937
2026
|
);
|
|
2027
|
+
// Recorded in the listen continuation, a microtask that runs before
|
|
2028
|
+
// the first accepted connection is dispatched, so no wire request
|
|
2029
|
+
// can mint a skill transfer URL before the port it names is known.
|
|
2030
|
+
unifiedBoundPort = port;
|
|
1938
2031
|
logger.info("stigmer-server listening", { port });
|
|
1939
2032
|
return port;
|
|
1940
2033
|
},
|
package/src/boot/config.ts
CHANGED
|
@@ -139,9 +139,11 @@ export interface ServerConfig {
|
|
|
139
139
|
* The OAuth callback URL for the McpServer OAuth Connect flows
|
|
140
140
|
* (STIGMER_OAUTH_REDIRECT_URI; Go config.go OAuthRedirectURI). Unset, a
|
|
141
141
|
* server that serves the web console on its unified port derives the
|
|
142
|
-
* console's own callback page
|
|
143
|
-
*
|
|
144
|
-
*
|
|
142
|
+
* console's own callback page on the origin browsers reach it on:
|
|
143
|
+
* SKILL_TRANSFER_BASE_URL when set (the address a team install was told
|
|
144
|
+
* its clients use, stigmer#1200), else `http://localhost:<port>`
|
|
145
|
+
* (boot/oauth-redirect-uri.ts), so neither a team install nor a local one
|
|
146
|
+
* has to be told. Unset on a server that serves no
|
|
145
147
|
* console is a WARN at wiring time, not a boot failure — every RPC except
|
|
146
148
|
* initiateOAuthConnect works without it, and initiate refuses with a
|
|
147
149
|
* FailedPrecondition naming the variable (the pinned copy).
|
|
@@ -168,10 +170,14 @@ export interface ServerConfig {
|
|
|
168
170
|
readonly skillArtifactStorageType: string;
|
|
169
171
|
/**
|
|
170
172
|
* Externally-reachable base of the skill artifact transfer lane's
|
|
171
|
-
* capability URLs (#675)
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
173
|
+
* capability URLs (#675; SKILL_TRANSFER_BASE_URL), set when the server
|
|
174
|
+
* is reached through a tunnel or reverse proxy (the
|
|
175
|
+
* ARTIFACT_LOCAL_SERVE_URL idiom, Go config.go:52-58). "" = unset: the
|
|
176
|
+
* base is the server's own port on localhost, read from the port the
|
|
177
|
+
* unified listener actually binds (boot/skill-transfer-origin.ts), so a
|
|
178
|
+
* server on an ephemeral port mints URLs that reach it (stigmer#1386).
|
|
179
|
+
* It is the unified port's public origin, so the served console's MCP
|
|
180
|
+
* OAuth callback derives on it too (boot/oauth-redirect-uri.ts).
|
|
175
181
|
*/
|
|
176
182
|
readonly skillTransferBaseUrl: string;
|
|
177
183
|
/**
|
|
@@ -236,6 +242,15 @@ export interface ServerConfig {
|
|
|
236
242
|
* container-based provisioner is selected; ignored on the default arm.
|
|
237
243
|
*/
|
|
238
244
|
readonly sandboxBackendEndpoint: string;
|
|
245
|
+
/**
|
|
246
|
+
* The server's public address as a remote MCP server reaches it
|
|
247
|
+
* (STIGMER_SANDBOX_MCP_PUBLIC_ENDPOINT), handed to every provisioned
|
|
248
|
+
* sandbox's runner as STIGMER_MCP_PUBLIC_ENDPOINT
|
|
249
|
+
* (sandbox/provisioner.ts, SandboxDriverConfig.mcpPublicEndpoint).
|
|
250
|
+
* Optional: empty hands nothing, and remote servers that template
|
|
251
|
+
* STIGMER_SERVER_ADDRESS get no address.
|
|
252
|
+
*/
|
|
253
|
+
readonly sandboxMcpPublicEndpoint: string;
|
|
239
254
|
/**
|
|
240
255
|
* Temporal address as reachable from inside a sandbox
|
|
241
256
|
* (STIGMER_SANDBOX_TEMPORAL_ADDRESS). Defaults to TEMPORAL_HOST_PORT —
|
|
@@ -359,11 +374,7 @@ export function loadConfig(env: NodeJS.ProcessEnv = process.env): ServerConfig {
|
|
|
359
374
|
databaseUrl: envString(env, "DATABASE_URL", ""),
|
|
360
375
|
storagePath: envString(env, "STORAGE_PATH", defaultStoragePath()),
|
|
361
376
|
skillArtifactStorageType,
|
|
362
|
-
skillTransferBaseUrl: envString(
|
|
363
|
-
env,
|
|
364
|
-
"SKILL_TRANSFER_BASE_URL",
|
|
365
|
-
`http://localhost:${grpcPort}`,
|
|
366
|
-
),
|
|
377
|
+
skillTransferBaseUrl: envString(env, "SKILL_TRANSFER_BASE_URL", ""),
|
|
367
378
|
operatorEmail,
|
|
368
379
|
operatorName,
|
|
369
380
|
gitHubOAuthClientId: envString(
|
|
@@ -386,6 +397,11 @@ export function loadConfig(env: NodeJS.ProcessEnv = process.env): ServerConfig {
|
|
|
386
397
|
"STIGMER_SANDBOX_BACKEND_ENDPOINT",
|
|
387
398
|
"",
|
|
388
399
|
),
|
|
400
|
+
sandboxMcpPublicEndpoint: envString(
|
|
401
|
+
env,
|
|
402
|
+
"STIGMER_SANDBOX_MCP_PUBLIC_ENDPOINT",
|
|
403
|
+
"",
|
|
404
|
+
),
|
|
389
405
|
sandboxTemporalAddress: envString(
|
|
390
406
|
env,
|
|
391
407
|
"STIGMER_SANDBOX_TEMPORAL_ADDRESS",
|
package/src/boot/inprocess.ts
CHANGED
|
@@ -80,6 +80,7 @@ import {
|
|
|
80
80
|
createInProcessCallerInterceptor,
|
|
81
81
|
encodeInProcessCaller,
|
|
82
82
|
IN_PROCESS_CALLER_HEADER,
|
|
83
|
+
serverActingFor,
|
|
83
84
|
} from "../pipeline/interceptors/auth.js";
|
|
84
85
|
import type { CallerIdentity } from "../extensions/identity.js";
|
|
85
86
|
import type { Logger } from "./logger.js";
|
|
@@ -340,13 +341,26 @@ export function createInProcessClients(
|
|
|
340
341
|
},
|
|
341
342
|
// The two HITL forwarding edges — Go's method-segregated
|
|
342
343
|
// AgentExecutionApprovalClient / AgentExecutionFileDecisionClient,
|
|
343
|
-
// both satisfied by the in-process agentexecution controller.
|
|
344
|
+
// both satisfied by the in-process agentexecution controller. The
|
|
345
|
+
// forward runs as the SERVER acting for the workflow's authorized
|
|
346
|
+
// caller (serverActingFor, never asCaller(caller)): the child's
|
|
347
|
+
// Authorize keeps the internal skip it always had — the workflow chain
|
|
348
|
+
// already authorized the decision, and the person need not own the
|
|
349
|
+
// child's session — while the child's writer records that person as
|
|
350
|
+
// the decider (stigmer/stigmer#1385).
|
|
344
351
|
workflowExecutionApprovalForwarder: {
|
|
345
|
-
submitApproval: (input) =>
|
|
352
|
+
submitApproval: (input, caller) =>
|
|
353
|
+
agentExecutionCommand.submitApproval(
|
|
354
|
+
input,
|
|
355
|
+
asCaller(serverActingFor(caller.identityId)),
|
|
356
|
+
),
|
|
346
357
|
},
|
|
347
358
|
workflowExecutionFileDecisionForwarder: {
|
|
348
|
-
submitFileDecision: (input) =>
|
|
349
|
-
agentExecutionCommand.submitFileDecision(
|
|
359
|
+
submitFileDecision: (input, caller) =>
|
|
360
|
+
agentExecutionCommand.submitFileDecision(
|
|
361
|
+
input,
|
|
362
|
+
asCaller(serverActingFor(caller.identityId)),
|
|
363
|
+
),
|
|
350
364
|
},
|
|
351
365
|
// The schedule clock's fire edge — the plain Create RPC (Go's
|
|
352
366
|
// ExecutionCreator). Since O2 every call through this transport
|
package/src/boot/list-indexes.ts
CHANGED
|
@@ -13,11 +13,15 @@
|
|
|
13
13
|
* A kind also joins when a port read on every authorization check would
|
|
14
14
|
* otherwise decode the whole kind: `iam_policy`, whose adapter reads a
|
|
15
15
|
* person's rows by principal (measured 2026-09-24: about 4.6 microseconds
|
|
16
|
-
* per row per read, 47 ms a check at ten thousand rows on sqlite).
|
|
16
|
+
* per row per read, 47 ms a check at ten thousand rows on sqlite). And a
|
|
17
|
+
* kind joins when the execution create path reads it: `memory`, whose
|
|
18
|
+
* recall reads one person's rows on every create in a memory-on
|
|
19
|
+
* organization (stigmer#1405).
|
|
17
20
|
*/
|
|
18
21
|
import { agentExecutionListIndex } from "../domain/agentexecution/list-index.js";
|
|
19
22
|
import { artifactListIndex } from "../domain/artifact/list-index.js";
|
|
20
23
|
import { iamPolicyListIndex } from "../domain/iampolicy/list-index.js";
|
|
24
|
+
import { memoryListIndex } from "../domain/memory/list-index.js";
|
|
21
25
|
import { sessionListIndex } from "../domain/session/list-index.js";
|
|
22
26
|
import { workflowExecutionListIndex } from "../domain/workflowexecution/list-index.js";
|
|
23
27
|
import type { ListIndexDeclaration } from "../store/list-index.js";
|
|
@@ -26,6 +30,7 @@ export const LIST_INDEXES: ReadonlyArray<ListIndexDeclaration> = [
|
|
|
26
30
|
agentExecutionListIndex,
|
|
27
31
|
artifactListIndex,
|
|
28
32
|
iamPolicyListIndex,
|
|
33
|
+
memoryListIndex,
|
|
29
34
|
sessionListIndex,
|
|
30
35
|
workflowExecutionListIndex,
|
|
31
36
|
];
|
package/src/boot/logger.ts
CHANGED
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
* or not; the sink is called after the write, so a stderr fault skips the
|
|
20
20
|
* export of that line rather than the reverse. This module stays free of
|
|
21
21
|
* runtime dependencies on purpose: the SDK that turns an entry into a
|
|
22
|
-
* record belongs to the deployable that chose a collector.
|
|
22
|
+
* record belongs to the deployable that chose a collector. The Temporal
|
|
23
|
+
* SDK's own lines ride the same seam: temporal/sdk-logger.ts installs this
|
|
24
|
+
* logger as the SDK's Runtime logger.
|
|
23
25
|
*
|
|
24
26
|
* The level tiering CONTRACT lives in the logging interceptor
|
|
25
27
|
* (pipeline/interceptors/logging.ts) — this module only provides the
|