@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 @@
|
|
|
1
|
+
{"version":3,"file":"resource-creators.js","sourceRoot":"","sources":["../../src/authorization/resource-creators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAGtH,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,UAAU,wBAAwB,CAAC,KAAY;IACnD,OAAO;QACL,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE;YAC1B,MAAM,IAAI,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;YACtC,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YACjD,IACE,IAAI,KAAK,eAAe,CAAC,yBAAyB;gBAClD,IAAI,KAAK,eAAe,CAAC,gBAAgB;gBACzC,MAAM,KAAK,SAAS;gBACpB,EAAE,KAAK,EAAE,EACT,CAAC;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,IAAI,CAAC;gBACH,OAAO,WAAW,CAAC,MAAM,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;YAChE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,KAAK,YAAY,qBAAqB,EAAE,CAAC;oBAC3C,OAAO,SAAS,CAAC;gBACnB,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Authorizer } from "../extensions/authorizer.js";
|
|
2
|
+
import type { Store } from "../store/interface.js";
|
|
3
|
+
/** The one read the driver makes: the Organization's row by id. */
|
|
4
|
+
export type TrustedLocalAuthorizerStore = Pick<Store, "getResource">;
|
|
5
|
+
export interface TrustedLocalAuthorizerDeps {
|
|
6
|
+
readonly store: TrustedLocalAuthorizerStore;
|
|
7
|
+
}
|
|
8
|
+
export declare function newTrustedLocalAuthorizer(deps: TrustedLocalAuthorizerDeps): Authorizer;
|
|
9
|
+
//# sourceMappingURL=trusted-local-authorizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trusted-local-authorizer.d.ts","sourceRoot":"","sources":["../../src/authorization/trusted-local-authorizer.ts"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EACV,UAAU,EAGX,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,mEAAmE;AACnE,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AAErE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,KAAK,EAAE,2BAA2B,CAAC;CAC7C;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,0BAA0B,GAC/B,UAAU,CA2BZ"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The trusted-local Authorizer — open source's driver for the one
|
|
3
|
+
* authorization decision seam (extensions/authorizer.ts) under the
|
|
4
|
+
* trusted-local posture (posture.ts): the laptop, a server with no sign-in.
|
|
5
|
+
* It separates no callers (there is one, the operator), so every check is
|
|
6
|
+
* `allow`, with one exception that is not a permission question at all.
|
|
7
|
+
*
|
|
8
|
+
* A check whose target is an Organization the store does not hold is
|
|
9
|
+
* `not-found`. "Does this Organization exist" is a load question, and
|
|
10
|
+
* every posture's Authorizer answers it the same way: the built-in
|
|
11
|
+
* driver's arm 4 (authorizer.ts) before any permission is evaluated, and
|
|
12
|
+
* the cloud's on its deny path (stigmer-cloud
|
|
13
|
+
* src/authorizer/fga-authorizer.ts, the existence probe). The Authorize
|
|
14
|
+
* step turns the arm into the load-first chain's NOT_FOUND,
|
|
15
|
+
* `Organization not found: <slug>`, so a server without sign-in refuses a
|
|
16
|
+
* write into a phantom Organization with the sentence a server with
|
|
17
|
+
* sign-in answers, instead of storing it under a slug nothing lists
|
|
18
|
+
* (stigmer#1163). Reads that name the Organization (a list by org, a
|
|
19
|
+
* usage report) are answered the same way, as they are under sign-in.
|
|
20
|
+
*
|
|
21
|
+
* Why the Organization alone. Every org-scoped lane authorizes on it (a
|
|
22
|
+
* create by `metadata.org`, a list or report by `org`/`org_id`), and its
|
|
23
|
+
* absence is the one no later step catches. The other kinds' update, get
|
|
24
|
+
* and delete chains load their target first and answer NOT_FOUND
|
|
25
|
+
* themselves, and a general existence read would refuse the rowless
|
|
26
|
+
* `platform` (model/bindings.ts), whose checks the laptop must keep
|
|
27
|
+
* allowing. An Organization's id is its slug (domain/organization/
|
|
28
|
+
* steps.ts), so the read is one primary key; the posture is open source's
|
|
29
|
+
* edition only (compose.ts refuses a wider edition without sign-in), so
|
|
30
|
+
* every Organization is a row in this store.
|
|
31
|
+
*
|
|
32
|
+
* Arms, in order: an empty target id is `allow` (a platform-scoped write
|
|
33
|
+
* names no Organization, and the Authorize step maps a not-found on an
|
|
34
|
+
* empty id to INTERNAL); a kind other than the Organization is `allow`
|
|
35
|
+
* with no read; a missing Organization is `not-found`; a present one is
|
|
36
|
+
* `allow`. A store fault is `unavailable` with its cause, the built-in
|
|
37
|
+
* driver's guard: an outage is never softened into a refusal of a
|
|
38
|
+
* different kind, and the driver never throws.
|
|
39
|
+
*
|
|
40
|
+
* Proven by __tests__/trusted-local-authorizer.test.ts (the arms, on both
|
|
41
|
+
* store drivers) and extensions/__tests__/built-in-authorization-
|
|
42
|
+
* composed.test.ts (the wire, beside the same sentence under sign-in).
|
|
43
|
+
*/
|
|
44
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
45
|
+
import { OrganizationSchema } from "@stigmer/protos/ai/stigmer/tenancy/organization/v1/api_pb";
|
|
46
|
+
import { ResourceNotFoundError } from "../store/interface.js";
|
|
47
|
+
export function newTrustedLocalAuthorizer(deps) {
|
|
48
|
+
return {
|
|
49
|
+
async authorize(_caller, check) {
|
|
50
|
+
if (check.resourceKind !== ApiResourceKind.organization ||
|
|
51
|
+
check.resourceId === "") {
|
|
52
|
+
return { kind: "allow" };
|
|
53
|
+
}
|
|
54
|
+
try {
|
|
55
|
+
await deps.store.getResource(ApiResourceKind.organization, check.resourceId, OrganizationSchema);
|
|
56
|
+
return { kind: "allow" };
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
if (error instanceof ResourceNotFoundError) {
|
|
60
|
+
return { kind: "not-found" };
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
kind: "unavailable",
|
|
64
|
+
cause: error instanceof Error ? error : new Error(String(error)),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=trusted-local-authorizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trusted-local-authorizer.js","sourceRoot":"","sources":["../../src/authorization/trusted-local-authorizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AACtH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAO/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAU9D,MAAM,UAAU,yBAAyB,CACvC,IAAgC;IAEhC,OAAO;QACL,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,KAAiB;YACxC,IACE,KAAK,CAAC,YAAY,KAAK,eAAe,CAAC,YAAY;gBACnD,KAAK,CAAC,UAAU,KAAK,EAAE,EACvB,CAAC;gBACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;YAC3B,CAAC;YACD,IAAI,CAAC;gBACH,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAC1B,eAAe,CAAC,YAAY,EAC5B,KAAK,CAAC,UAAU,EAChB,kBAAkB,CACnB,CAAC;gBACF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;YAC3B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,KAAK,YAAY,qBAAqB,EAAE,CAAC;oBAC3C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;gBAC/B,CAAC;gBACD,OAAO;oBACL,IAAI,EAAE,aAAa;oBACnB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;iBACjE,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -78,6 +78,18 @@ export interface Person {
|
|
|
78
78
|
/** Every string a creator stamp may carry for this person; always contains `accountId`. */
|
|
79
79
|
readonly aliases: ReadonlySet<string>;
|
|
80
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* An object other than a person that a check asks about: "does
|
|
83
|
+
* `organization:o` hold `organization` on this agent", the question a
|
|
84
|
+
* grant to a team asks before it names the team on a resource. It matches
|
|
85
|
+
* a tuple's subject by its own reference, with no aliases.
|
|
86
|
+
*/
|
|
87
|
+
export interface ObjectPrincipal {
|
|
88
|
+
readonly object: ObjectRef;
|
|
89
|
+
}
|
|
90
|
+
/** Whom a check asks about: a person through their aliases, or any other object by its reference. */
|
|
91
|
+
export type Principal = Person | ObjectPrincipal;
|
|
92
|
+
export declare function isPerson(principal: Principal): principal is Person;
|
|
81
93
|
/** `type:id` → ObjectRef; the id may itself contain `:` (issuer subjects do). */
|
|
82
94
|
export declare function parseObjectRef(text: string): ObjectRef;
|
|
83
95
|
export declare function formatObjectRef(object: ObjectRef): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tuples.d.ts","sourceRoot":"","sources":["../../src/authorization/tuples.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,8EAA8E;AAC9E,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAE/C,0CAA0C;AAC1C,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,+CAA+C;AAC/C,MAAM,MAAM,OAAO;AACjB,4EAA4E;AAC1E;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAAE;AACzD,wEAAwE;GACtE;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEN,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,OAA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CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,IAAI,MAAM,CAElE;AAMD,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAMtD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAgBlD;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAWtD;AAED,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAEhD;AAED,8DAA8D;AAC9D,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,2FAA2F;AAC3F,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,GAC3B,WAAW,CAgBb"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/** The FGA type name of the kind every person is: `identity_account:<id>`. */
|
|
2
2
|
export const ACCOUNT_TYPE = "identity_account";
|
|
3
|
+
export function isPerson(principal) {
|
|
4
|
+
return "accountId" in principal;
|
|
5
|
+
}
|
|
3
6
|
// ---------------------------------------------------------------------------
|
|
4
7
|
// The string notation.
|
|
5
8
|
// ---------------------------------------------------------------------------
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tuples.js","sourceRoot":"","sources":["../../src/authorization/tuples.ts"],"names":[],"mappings":"AA+BA,8EAA8E;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"tuples.js","sourceRoot":"","sources":["../../src/authorization/tuples.ts"],"names":[],"mappings":"AA+BA,8EAA8E;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAkE/C,MAAM,UAAU,QAAQ,CAAC,SA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C;QAC3B,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO;QACL,QAAQ,CAAC,MAAM,EAAE,QAAQ;YACvB,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QACtE,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/boot/compose.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/boot/compose.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAoCpE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAIzE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAsCzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AA2ClE,OAAO,EAKL,aAAa,EAEd,MAAM,6BAA6B,CAAC;AAyBrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAYnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAWjE,OAAO,EAAE,YAAY,IAAI,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAW7G,OAAO,EAAE,WAAW,EAAyB,MAAM,wBAAwB,CAAC;AAS5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,OAAO,KAAK,EAAE,MAAM,EAAE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resource/
|
|
|
29
29
|
import { ServerEdition } from "@stigmer/protos/ai/stigmer/platform/v1/server_info_pb";
|
|
30
30
|
import { HealthCheckResponse_ServingStatus as ServingStatus } from "@stigmer/protos/grpc/health/v1/health_pb";
|
|
31
31
|
import { newBuiltInAuthorizer } from "../authorization/authorizer.js";
|
|
32
|
-
import { newLaneAdmittedAuthorizer } from "../authorization/lane-admission.js";
|
|
33
32
|
import { newBuiltInListReadScope } from "../authorization/list-read-scope.js";
|
|
34
33
|
import { newBuiltInOrganizationDirectory } from "../authorization/organization-directory.js";
|
|
35
|
-
import {
|
|
34
|
+
import { newBuiltInPolicyCheck } from "../authorization/policy-check.js";
|
|
35
|
+
import { builtInModel } from "../authorization/model/index.js";
|
|
36
|
+
import { authorizationPostureOf, kindsWithoutRows, } from "../authorization/posture.js";
|
|
37
|
+
import { newStoreResourceCreators } from "../authorization/resource-creators.js";
|
|
36
38
|
import { newBuiltInScheduleFireCaller } from "../authorization/schedule-fire-caller.js";
|
|
39
|
+
import { newTrustedLocalAuthorizer } from "../authorization/trusted-local-authorizer.js";
|
|
37
40
|
import { ABSENT_LICENSE_STATUS } from "../extensions/license-status.js";
|
|
38
41
|
import { relaxedEgressPolicy } from "../extensions/outbound-egress.js";
|
|
39
42
|
import { registerAgentServices } from "../domain/agent/controller.js";
|
|
@@ -115,13 +118,14 @@ import { SearchHandler } from "../query/search/handler.js";
|
|
|
115
118
|
import { SqliteSearchQueryStore } from "../query/search/query-store.js";
|
|
116
119
|
import { newSearchableResourceRegistry } from "../query/search/registry.js";
|
|
117
120
|
import { initRpcMetrics, metricsExportPosture, } from "../observability/rpc-metrics.js";
|
|
121
|
+
import { kindEnumName } from "../pipeline/apiresource-meta.js";
|
|
122
|
+
import { quoteJoin } from "../domain/mcpserver/enabledtools/enabledtools.js";
|
|
118
123
|
import { buildInterceptorChain } from "../pipeline/chain.js";
|
|
119
124
|
import { createVerifierChainInterceptor } from "../pipeline/interceptors/auth.js";
|
|
120
125
|
import { operatorIdentitySnapshot } from "../pipeline/steps/defaults.js";
|
|
121
126
|
import { createErrorBoundaryInterceptor } from "../pipeline/interceptors/error-boundary.js";
|
|
122
127
|
import { createRequestMetricsInterceptor } from "../pipeline/interceptors/request-metrics.js";
|
|
123
|
-
import {
|
|
124
|
-
import { isWorkflowBoundRunner, newBuiltInRunnerCredentialProvider, } from "../runnerauth/built-in-runner-credential-provider.js";
|
|
128
|
+
import { newBuiltInRunnerCredentialProvider } from "../runnerauth/built-in-runner-credential-provider.js";
|
|
125
129
|
import { newExecutionScopedRunnerCredentialProvider } from "../runnerauth/runner-credential-provider.js";
|
|
126
130
|
import { newRunnerSubjectIdentityVerifier } from "../runnerauth/runner-subject-verifier.js";
|
|
127
131
|
import { RunnerAuthService } from "../runnerauth/runnerauth.js";
|
|
@@ -130,7 +134,7 @@ import { SqliteStore } from "../store/sqlite/store.js";
|
|
|
130
134
|
import { resolveExtensions } from "../extensions/registry.js";
|
|
131
135
|
import { artifactLaneBindError, resolveArtifactLanePort, resolveArtifactServeUrl, } from "./artifact-lane.js";
|
|
132
136
|
import { resolveOAuthRedirectUri } from "./oauth-redirect-uri.js";
|
|
133
|
-
import { assessSkillTransferOrigin } from "./skill-transfer-origin.js";
|
|
137
|
+
import { assessSkillTransferOrigin, resolveSkillTransferBaseUrl, } from "./skill-transfer-origin.js";
|
|
134
138
|
import { registerWorkflowServices } from "../domain/workflow/controller.js";
|
|
135
139
|
import { bundledModelRegistryDocument, bundledTaskKindRegistryDocument, } from "../domain/workflow/registry/bundled.js";
|
|
136
140
|
import { ModelRegistryStore } from "../domain/workflow/registry/model-registry-store.js";
|
|
@@ -208,23 +212,36 @@ export async function composeServer(options) {
|
|
|
208
212
|
// authorizer, so the identity stage installs the built-in role
|
|
209
213
|
// lifecycle and the membership rules under both; a composition with its
|
|
210
214
|
// own Authorizer has its own onboarding and gets neither.
|
|
215
|
+
// An edition above open source serves many organizations; without the
|
|
216
|
+
// require-authentication posture a request carrying no credential would
|
|
217
|
+
// act as the laptop's one operator on every one of them. Refused at boot,
|
|
218
|
+
// before any side effect, whichever authorizer the composition runs.
|
|
219
|
+
if (!requireAuthentication && extensions.edition !== ServerEdition.oss) {
|
|
220
|
+
throw new Error(`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`);
|
|
221
|
+
}
|
|
211
222
|
const authorizationPosture = authorizationPostureOf({
|
|
212
223
|
unitAuthorizer: extensions.authorizer !== undefined,
|
|
213
224
|
requireAuthentication,
|
|
214
225
|
});
|
|
215
226
|
const builtInAuthorization = authorizationPosture !== "unit-authorizer";
|
|
216
227
|
// The built-in authorizer evaluates the one model every edition reads,
|
|
217
|
-
//
|
|
218
|
-
//
|
|
219
|
-
//
|
|
220
|
-
//
|
|
221
|
-
//
|
|
222
|
-
//
|
|
223
|
-
//
|
|
224
|
-
// effect.
|
|
225
|
-
if (authorizationPosture === "built-in"
|
|
226
|
-
|
|
227
|
-
|
|
228
|
+
// and derives each resource's tuples from its row. A wider edition's
|
|
229
|
+
// kinds are served by units that keep their rows in stores of their own,
|
|
230
|
+
// so each such unit registers a reader for its kinds
|
|
231
|
+
// (drivers.resourceRowReaders), and the built-in posture serves a wider
|
|
232
|
+
// edition only when every kind it serves has rows the derivation can
|
|
233
|
+
// read — never answers derived from rows that are not there. Refused at
|
|
234
|
+
// boot, the same class as a misconfigured registry and the verifierless
|
|
235
|
+
// posture below: caught before any side effect.
|
|
236
|
+
if (authorizationPosture === "built-in") {
|
|
237
|
+
const unreadable = kindsWithoutRows({
|
|
238
|
+
edition: extensions.edition,
|
|
239
|
+
model: builtInModel,
|
|
240
|
+
readers: extensions.drivers.resourceRowReaders,
|
|
241
|
+
});
|
|
242
|
+
if (unreadable.length > 0) {
|
|
243
|
+
throw new Error(`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`);
|
|
244
|
+
}
|
|
228
245
|
}
|
|
229
246
|
// Stage: identity accounts (20260911.11) — the first domain whose
|
|
230
247
|
// persistence is a PORT rather than the generic Store. The composed
|
|
@@ -255,6 +272,7 @@ export async function composeServer(options) {
|
|
|
255
272
|
newResourcePlatformClientStore(store);
|
|
256
273
|
const iamPolicyGrantPath = newIamPolicyGrantPath({
|
|
257
274
|
policies: iamPolicies,
|
|
275
|
+
creators: newStoreResourceCreators(store),
|
|
258
276
|
lifecycle: extensions.drivers.resourceAuthorizationLifecycle,
|
|
259
277
|
logger,
|
|
260
278
|
});
|
|
@@ -307,15 +325,13 @@ export async function composeServer(options) {
|
|
|
307
325
|
// source's built-in provider (runnerauth/built-in-runner-credential-
|
|
308
326
|
// provider.ts — the execution-scoped default plus the lineage-vouching,
|
|
309
327
|
// memory-capture and exchange-gating capabilities an enforcing
|
|
310
|
-
// self-host needs
|
|
311
|
-
// Authorizer below admits a workflow-bound runner on); otherwise the
|
|
328
|
+
// self-host needs); otherwise the
|
|
312
329
|
// execution-scoped default, byte-identical to the wiring this seam
|
|
313
330
|
// replaced. Both open-source providers also mint the RUN credential the
|
|
314
331
|
// two execution engines put on every dispatch (the engines below take
|
|
315
332
|
// this object; runnerauth/dispatch-credential.ts) — a composed driver
|
|
316
333
|
// that leaves that capability undefined dispatches without one, its
|
|
317
|
-
// runners being credentialed another way.
|
|
318
|
-
// Authorizer, because the lane admission reads the binding.
|
|
334
|
+
// runners being credentialed another way.
|
|
319
335
|
const runnerAuthService = RunnerAuthService.fromEnv();
|
|
320
336
|
const runnerCredentials = extensions.drivers.runnerCredentialProvider ??
|
|
321
337
|
(authorizationPosture === "built-in"
|
|
@@ -330,32 +346,37 @@ export async function composeServer(options) {
|
|
|
330
346
|
// controller as an explicit dependency; the Authorize step at position 1
|
|
331
347
|
// of every chain calls it (O2). By posture: an extension's registration;
|
|
332
348
|
// open source's built-in Authorizer (authorization/authorizer.ts — the
|
|
333
|
-
// cloud's model evaluated over the tuples the row would have had),
|
|
334
|
-
//
|
|
335
|
-
//
|
|
336
|
-
//
|
|
337
|
-
//
|
|
338
|
-
//
|
|
349
|
+
// cloud's model evaluated over the tuples the row would have had), which
|
|
350
|
+
// checks every caller on the run gate as the person it acts for: a
|
|
351
|
+
// runner acting for a workflow creates the workflow's child executions
|
|
352
|
+
// as the workflow's person, who must be able to view the agents the
|
|
353
|
+
// workflow calls (the runner's own read of each callee already asks
|
|
354
|
+
// that); or, trusted-local, open source's permissive driver
|
|
355
|
+
// (authorization/trusted-local-authorizer.ts), which separates no callers
|
|
356
|
+
// and answers only whether a named Organization exists, as the other two
|
|
357
|
+
// do (stigmer#1163). The organization directory and the
|
|
339
358
|
// schedule fire caller are bound beside it under the same posture, so
|
|
340
359
|
// `findMyOrganizations` lists what a person may view and a scheduled run
|
|
341
360
|
// belongs to the person who scheduled it — a fire the internal lane
|
|
342
361
|
// would otherwise hand to nobody an enforcing evaluator recognizes.
|
|
343
362
|
const authorizer = extensions.authorizer ??
|
|
344
363
|
(authorizationPosture === "built-in"
|
|
345
|
-
?
|
|
364
|
+
? newBuiltInAuthorizer({
|
|
346
365
|
store,
|
|
347
366
|
policies: iamPolicies,
|
|
348
367
|
accounts: identityAccounts,
|
|
368
|
+
rowReaders: extensions.drivers.resourceRowReaders,
|
|
349
369
|
edition: extensions.edition,
|
|
350
370
|
logger,
|
|
351
|
-
})
|
|
352
|
-
:
|
|
371
|
+
})
|
|
372
|
+
: newTrustedLocalAuthorizer({ store }));
|
|
353
373
|
const organizationDirectory = extensions.drivers.organizationDirectory ??
|
|
354
374
|
(authorizationPosture === "built-in"
|
|
355
375
|
? newBuiltInOrganizationDirectory({
|
|
356
376
|
store,
|
|
357
377
|
policies: iamPolicies,
|
|
358
378
|
accounts: identityAccounts,
|
|
379
|
+
rowReaders: extensions.drivers.resourceRowReaders,
|
|
359
380
|
})
|
|
360
381
|
: undefined);
|
|
361
382
|
const scheduleFireCaller = extensions.drivers.scheduleFireCaller ??
|
|
@@ -376,6 +397,7 @@ export async function composeServer(options) {
|
|
|
376
397
|
store,
|
|
377
398
|
policies: iamPolicies,
|
|
378
399
|
accounts: identityAccounts,
|
|
400
|
+
rowReaders: extensions.drivers.resourceRowReaders,
|
|
379
401
|
logger,
|
|
380
402
|
})
|
|
381
403
|
: undefined);
|
|
@@ -561,6 +583,7 @@ export async function composeServer(options) {
|
|
|
561
583
|
const sandboxProvisioner = newSandboxProvisioner(config.sandboxProvisionerType, {
|
|
562
584
|
config: {
|
|
563
585
|
backendEndpoint: config.sandboxBackendEndpoint,
|
|
586
|
+
mcpPublicEndpoint: config.sandboxMcpPublicEndpoint,
|
|
564
587
|
temporalAddress: config.sandboxTemporalAddress,
|
|
565
588
|
temporalNamespace: config.temporalNamespace,
|
|
566
589
|
temporalConnectionEnv: temporalConnectionEnv(config.temporalConnection),
|
|
@@ -773,6 +796,20 @@ export async function composeServer(options) {
|
|
|
773
796
|
// controllers cannot tell which. The slots are constructed on every
|
|
774
797
|
// arm so the HTTP lane always has a registry to consult; on a bucket
|
|
775
798
|
// arm nothing is ever reserved in it.
|
|
799
|
+
//
|
|
800
|
+
// Both URLs render from one base (boot/skill-transfer-origin.ts): the
|
|
801
|
+
// configured SKILL_TRANSFER_BASE_URL, or the unified port's loopback
|
|
802
|
+
// origin, read from the port the listener actually bound in start() when
|
|
803
|
+
// that port is ephemeral (stigmer#1386).
|
|
804
|
+
let unifiedBoundPort;
|
|
805
|
+
const skillTransferBase = resolveSkillTransferBaseUrl({
|
|
806
|
+
configured: config.skillTransferBaseUrl,
|
|
807
|
+
unifiedPort: options.portOverride ?? config.grpcPort,
|
|
808
|
+
boundPort: () => unifiedBoundPort,
|
|
809
|
+
});
|
|
810
|
+
const renderSkillTransferBase = () => typeof skillTransferBase === "function"
|
|
811
|
+
? skillTransferBase()
|
|
812
|
+
: skillTransferBase;
|
|
776
813
|
const skillUploadSlots = new UploadSlots(config.storagePath, STAGING_KEY_PREFIX, DEFAULT_SLOT_TTL_MS, MAX_ZIP_SIZE);
|
|
777
814
|
const skillType = config.skillArtifactStorageType === ""
|
|
778
815
|
? "local"
|
|
@@ -792,11 +829,13 @@ export async function composeServer(options) {
|
|
|
792
829
|
// key, so download(key) reads back what the lane received; the
|
|
793
830
|
// serve URL is the lane's download route, so getSignedUrl renders
|
|
794
831
|
// the very URL the lane dispatches.
|
|
795
|
-
return new LocalArtifactStorage(config.storagePath,
|
|
832
|
+
return new LocalArtifactStorage(config.storagePath, typeof skillTransferBase === "function"
|
|
833
|
+
? () => transferServeUrl(skillTransferBase())
|
|
834
|
+
: transferServeUrl(skillTransferBase), {
|
|
796
835
|
reserve: (key, declaredSizeBytes) => {
|
|
797
836
|
const { ttlMs } = skillUploadSlots.reserve(key, declaredSizeBytes);
|
|
798
837
|
return {
|
|
799
|
-
url: skillUploadUrl(
|
|
838
|
+
url: skillUploadUrl(renderSkillTransferBase(), uploadRefOf(key)),
|
|
800
839
|
ttlMs,
|
|
801
840
|
};
|
|
802
841
|
},
|
|
@@ -832,7 +871,7 @@ export async function composeServer(options) {
|
|
|
832
871
|
// inline push and every other RPC work, and a self-host behind a tunnel
|
|
833
872
|
// it forgot to name deserves a pointer, not an outage.
|
|
834
873
|
const transferOrigin = assessSkillTransferOrigin({
|
|
835
|
-
|
|
874
|
+
configured: config.skillTransferBaseUrl,
|
|
836
875
|
relaysThroughServer: skillType === "local",
|
|
837
876
|
requireAuthentication,
|
|
838
877
|
});
|
|
@@ -918,14 +957,17 @@ export async function composeServer(options) {
|
|
|
918
957
|
logger,
|
|
919
958
|
});
|
|
920
959
|
// The OAuth callback: configured, or derived from the served console's
|
|
921
|
-
// own origin when it serves one
|
|
922
|
-
//
|
|
960
|
+
// own origin when it serves one — the public origin the skill transfer
|
|
961
|
+
// lane already renders on, else the known port's loopback
|
|
962
|
+
// (boot/oauth-redirect-uri.ts carries the posture; stigmer#1200). Absent
|
|
963
|
+
// is WARN-degrade, not boot-fatal (Go
|
|
923
964
|
// server.go:722-729): every OAuth RPC except initiateOAuthConnect works
|
|
924
965
|
// without the redirect URI, and initiate refuses with the pinned
|
|
925
966
|
// FailedPrecondition copy.
|
|
926
967
|
const oauthRedirect = resolveOAuthRedirectUri({
|
|
927
968
|
configured: config.oauthRedirectUri,
|
|
928
969
|
servesConsole: consoleAssets !== undefined,
|
|
970
|
+
publicOrigin: config.skillTransferBaseUrl,
|
|
929
971
|
port: options.portOverride ?? config.grpcPort,
|
|
930
972
|
});
|
|
931
973
|
switch (oauthRedirect.kind) {
|
|
@@ -934,6 +976,7 @@ export async function composeServer(options) {
|
|
|
934
976
|
case "derived":
|
|
935
977
|
logger.info("STIGMER_OAUTH_REDIRECT_URI is not set — deriving the served console's callback for MCP server OAuth Connect", {
|
|
936
978
|
redirectUri: oauthRedirect.uri,
|
|
979
|
+
from: oauthRedirect.from,
|
|
937
980
|
});
|
|
938
981
|
break;
|
|
939
982
|
case "absent":
|
|
@@ -1183,6 +1226,7 @@ export async function composeServer(options) {
|
|
|
1183
1226
|
authorizationLifecycle,
|
|
1184
1227
|
listReadScope,
|
|
1185
1228
|
personAccounts,
|
|
1229
|
+
visitorClassifier: extensions.drivers.visitorClassifier,
|
|
1186
1230
|
runnerCredentialProvider: runnerCredentials,
|
|
1187
1231
|
broker: agentExecutionStreamBroker,
|
|
1188
1232
|
engineState: executionEngineState,
|
|
@@ -1284,6 +1328,7 @@ export async function composeServer(options) {
|
|
|
1284
1328
|
pendingOAuthStates: store.pendingOAuthStates,
|
|
1285
1329
|
secretService,
|
|
1286
1330
|
oauthRedirectUri,
|
|
1331
|
+
sandboxLane,
|
|
1287
1332
|
outboundFetch,
|
|
1288
1333
|
},
|
|
1289
1334
|
});
|
|
@@ -1367,10 +1412,12 @@ export async function composeServer(options) {
|
|
|
1367
1412
|
// the issuer left a posture-declaring composition minting keys
|
|
1368
1413
|
// nothing verified.
|
|
1369
1414
|
// - the OIDC verifier rides the ISSUER alone: it is open source's
|
|
1370
|
-
//
|
|
1371
|
-
//
|
|
1372
|
-
//
|
|
1373
|
-
//
|
|
1415
|
+
// operator lane, and it claims only tokens its issuer signed
|
|
1416
|
+
// (identity/oidc-verifier.ts), passing every other JWT on. So the
|
|
1417
|
+
// knob and a composition's own lanes for other issuers compose side
|
|
1418
|
+
// by side: the operator signs in through the knob, and a unit's lane
|
|
1419
|
+
// claims the tokens of the issuers it names. A unit lane must refuse
|
|
1420
|
+
// to route the operator's issuer (it is claimed here first).
|
|
1374
1421
|
// - both OSS verifiers resolve their subject through the identity-
|
|
1375
1422
|
// account domain (20260911.11 Q-IA-2, A6): a provisioned user is
|
|
1376
1423
|
// stamped with the account id whichever credential they present,
|
|
@@ -1383,11 +1430,13 @@ export async function composeServer(options) {
|
|
|
1383
1430
|
// admits the bearer of the server's own execution-scoped runner
|
|
1384
1431
|
// token as the human whose run it is, which only means something
|
|
1385
1432
|
// when the server enforces who may report on a run. Its place in
|
|
1386
|
-
// the chain is the contract: BETWEEN `apikey` and `oidc
|
|
1387
|
-
// the OIDC verifier
|
|
1388
|
-
// it
|
|
1389
|
-
// own token
|
|
1390
|
-
// fault (stigmer#1137)
|
|
1433
|
+
// the chain is the contract: BETWEEN `apikey` and `oidc`. Until
|
|
1434
|
+
// 2026-09-29 the OIDC verifier claimed any JWT-shaped token and threw
|
|
1435
|
+
// on one it could not verify, so composed after it, ours never saw
|
|
1436
|
+
// its own token and every runner call failed as the OIDC verifier's
|
|
1437
|
+
// fault (stigmer#1137); it now claims only its own issuer's tokens,
|
|
1438
|
+
// and the server's own token is still claimed first, by its own
|
|
1439
|
+
// lane, whatever issuer an operator configures. Until 2026-09-16 this comment read "the
|
|
1391
1440
|
// runner's credential in either posture is an operator-minted API
|
|
1392
1441
|
// token via STIGMER_TOKEN — no runner-specific verifier"; that
|
|
1393
1442
|
// described a server whose Authorizer was permissive. The operator's
|
|
@@ -1498,6 +1547,30 @@ export async function composeServer(options) {
|
|
|
1498
1547
|
skillTransferLane,
|
|
1499
1548
|
consoleLane,
|
|
1500
1549
|
});
|
|
1550
|
+
// The hand-over (extensions/composed-services.ts): every unit receives
|
|
1551
|
+
// the composition's own instances — the one Authorizer the Authorize
|
|
1552
|
+
// step calls, the list read scope, the policy check, the tuple lifecycle
|
|
1553
|
+
// and the in-process transport — before composeServer returns, because a
|
|
1554
|
+
// unit's lanes may be called by anyone from then on. The policy check is
|
|
1555
|
+
// the registered engine's, or under the built-in posture the evaluator's.
|
|
1556
|
+
const composedServices = {
|
|
1557
|
+
authorizer,
|
|
1558
|
+
listReadScope,
|
|
1559
|
+
authorizationQueries: extensions.drivers.authorizationQueries ??
|
|
1560
|
+
(authorizationPosture === "built-in"
|
|
1561
|
+
? newBuiltInPolicyCheck({
|
|
1562
|
+
store,
|
|
1563
|
+
policies: iamPolicies,
|
|
1564
|
+
accounts: identityAccounts,
|
|
1565
|
+
rowReaders: extensions.drivers.resourceRowReaders,
|
|
1566
|
+
})
|
|
1567
|
+
: undefined),
|
|
1568
|
+
resourceAuthorizationLifecycle: authorizationLifecycle,
|
|
1569
|
+
inProcessTransport: inProcessWiring.transport,
|
|
1570
|
+
};
|
|
1571
|
+
for (const { hook } of extensions.onComposed) {
|
|
1572
|
+
hook(composedServices);
|
|
1573
|
+
}
|
|
1501
1574
|
return {
|
|
1502
1575
|
healthState,
|
|
1503
1576
|
store,
|
|
@@ -1510,6 +1583,18 @@ export async function composeServer(options) {
|
|
|
1510
1583
|
identityVerifiers,
|
|
1511
1584
|
routes,
|
|
1512
1585
|
async start() {
|
|
1586
|
+
// The units' own boot work first, in unit order, before any worker,
|
|
1587
|
+
// reconciler or listener can reach their lanes: a repair of a unit's
|
|
1588
|
+
// rows must finish before anything serves, and a failed one fails
|
|
1589
|
+
// the start, naming its unit.
|
|
1590
|
+
for (const { unit, hook } of extensions.start) {
|
|
1591
|
+
try {
|
|
1592
|
+
await hook();
|
|
1593
|
+
}
|
|
1594
|
+
catch (error) {
|
|
1595
|
+
throw new Error(`extension '${unit}' failed to start: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1513
1598
|
// Temporal boot is NON-fatal end to end (Go server.go): a failed
|
|
1514
1599
|
// initial connect leaves the engine unavailable and the monitor
|
|
1515
1600
|
// retrying; a failed worker start is a warning. Health below flips
|
|
@@ -1577,6 +1662,10 @@ export async function composeServer(options) {
|
|
|
1577
1662
|
// that implementation owns its own freshness.
|
|
1578
1663
|
ossModelRegistryStore?.startRefresh();
|
|
1579
1664
|
const port = await server.listen(options.portOverride ?? config.grpcPort, options.host);
|
|
1665
|
+
// Recorded in the listen continuation, a microtask that runs before
|
|
1666
|
+
// the first accepted connection is dispatched, so no wire request
|
|
1667
|
+
// can mint a skill transfer URL before the port it names is known.
|
|
1668
|
+
unifiedBoundPort = port;
|
|
1580
1669
|
logger.info("stigmer-server listening", { port });
|
|
1581
1670
|
return port;
|
|
1582
1671
|
},
|