@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
|
@@ -12,12 +12,15 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Deliberately NO search-extractor and NO index steps anywhere in this
|
|
14
14
|
* domain: memory is not_search_indexed by design (privacy — content is
|
|
15
|
-
* subject-only and must not surface in org-visible search).
|
|
15
|
+
* subject-only and must not surface in org-visible search). The list
|
|
16
|
+
* index the reads use (list-index.ts) is not search: the store keeps it
|
|
17
|
+
* beside the row, and it holds the org, the subject id and the creation
|
|
18
|
+
* instant, never content.
|
|
16
19
|
*
|
|
17
20
|
* Proven by memory.conformance.test.ts (CONFORMANCE_TARGET=local) and
|
|
18
21
|
* __tests__/memory.test.ts.
|
|
19
22
|
*/
|
|
20
|
-
import { create, equals,
|
|
23
|
+
import { create, equals, isMessage } from "@bufbuild/protobuf";
|
|
21
24
|
import { timestampNow } from "@bufbuild/protobuf/wkt";
|
|
22
25
|
import type { ConnectError } from "@connectrpc/connect";
|
|
23
26
|
|
|
@@ -48,11 +51,11 @@ import type { RequestContext } from "../../pipeline/request-context.js";
|
|
|
48
51
|
import { isServerComposedRequest } from "../../extensions/identity.js";
|
|
49
52
|
import type { AuthorizationTarget } from "../../pipeline/steps/authorize.js";
|
|
50
53
|
import {
|
|
54
|
+
assignServerId,
|
|
51
55
|
generateId,
|
|
52
56
|
setAuditFieldsForUpdate,
|
|
53
57
|
} from "../../pipeline/steps/defaults.js";
|
|
54
58
|
import { memoryCaptureCredentialOf } from "../../pipeline/steps/guard-memory-capture.js";
|
|
55
|
-
import { compareCreatedAtDesc } from "../../pipeline/steps/helpers.js";
|
|
56
59
|
import { EXISTING_RESOURCE_KEY } from "../../pipeline/steps/load-existing.js";
|
|
57
60
|
import type { AccountsByCaller } from "../identityaccount/resolve.js";
|
|
58
61
|
import {
|
|
@@ -61,6 +64,7 @@ import {
|
|
|
61
64
|
} from "../identityaccount/resolve.js";
|
|
62
65
|
import { ResourceNotFoundError } from "../../store/interface.js";
|
|
63
66
|
import type { Store } from "../../store/interface.js";
|
|
67
|
+
import { listOrganizationMemories, listSubjectMemories } from "./queries.js";
|
|
64
68
|
import {
|
|
65
69
|
MAX_MEMORIES_PER_SUBJECT,
|
|
66
70
|
MEMORY_ACCOUNT_DISABLED_MESSAGE,
|
|
@@ -80,11 +84,14 @@ export const LIST_RESULT_KEY = "listResult";
|
|
|
80
84
|
*
|
|
81
85
|
* 1. Requires metadata.org — memory records are org-scoped (DD-004), so
|
|
82
86
|
* the org can never be inferred.
|
|
83
|
-
* 2. Mints metadata.id here (not in BuildNewState)
|
|
87
|
+
* 2. Mints metadata.id here (not in BuildNewState), always, so an
|
|
84
88
|
* unnamed record can default its name/slug from its own identity:
|
|
85
89
|
* memories are id-addressed records (the remember tool sends content
|
|
86
90
|
* only), and the platform's slug machinery requires a name. A
|
|
87
91
|
* client-supplied name still wins — the default only fills absence.
|
|
92
|
+
* The id is claimed through `assignServerId`, so BuildNewState keeps
|
|
93
|
+
* it; an id the request carried is replaced, as every create's is
|
|
94
|
+
* (stigmer/stigmer#1266).
|
|
88
95
|
* 3. Overwrites spec.subject_identity_account_id, server-derived and
|
|
89
96
|
* never client-supplied (DD-005 D2), by posture. Under the
|
|
90
97
|
* single-operator posture (no `personAccounts` composed) it is the
|
|
@@ -141,9 +148,7 @@ export function newResolveMemoryDefaultsStep(
|
|
|
141
148
|
throw internalError(new Error("metadata is nil"), "metadata is nil");
|
|
142
149
|
}
|
|
143
150
|
|
|
144
|
-
|
|
145
|
-
metadata.id = generateId("mem");
|
|
146
|
-
}
|
|
151
|
+
assignServerId(ctx, generateId("mem"));
|
|
147
152
|
if (metadata.name === "" && metadata.slug === "") {
|
|
148
153
|
metadata.name = metadata.id;
|
|
149
154
|
}
|
|
@@ -349,10 +354,9 @@ export function newCheckMemoryEnablementStep(
|
|
|
349
354
|
/**
|
|
350
355
|
* CheckMemoryCap — Go checkMemoryCapStep: enforces the
|
|
351
356
|
* per-subject-per-org record ceiling at create (DD-006 D5). Counted
|
|
352
|
-
* across all lifecycle states
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
* repository query.
|
|
357
|
+
* across all lifecycle states, from the subject's own rows in the org
|
|
358
|
+
* through the memory list index (queries.ts), so a capture never reads
|
|
359
|
+
* another person's or another organization's memories.
|
|
356
360
|
*/
|
|
357
361
|
export function newCheckMemoryCapStep(
|
|
358
362
|
store: Store,
|
|
@@ -364,28 +368,13 @@ export function newCheckMemoryCapStep(
|
|
|
364
368
|
const org = newState.metadata?.org ?? "";
|
|
365
369
|
const subject = newState.spec?.subjectIdentityAccountId ?? "";
|
|
366
370
|
|
|
367
|
-
let
|
|
371
|
+
let count: number;
|
|
368
372
|
try {
|
|
369
|
-
|
|
373
|
+
count = (await listSubjectMemories(store, org, subject)).length;
|
|
370
374
|
} catch (error) {
|
|
371
375
|
throw internalError(error, "failed to count memories for cap check");
|
|
372
376
|
}
|
|
373
377
|
|
|
374
|
-
let count = 0;
|
|
375
|
-
for (const bytes of rows) {
|
|
376
|
-
const existing = unmarshalMemory(bytes);
|
|
377
|
-
if (existing === undefined) {
|
|
378
|
-
continue;
|
|
379
|
-
}
|
|
380
|
-
if ((existing.metadata?.org ?? "") !== org) {
|
|
381
|
-
continue;
|
|
382
|
-
}
|
|
383
|
-
if ((existing.spec?.subjectIdentityAccountId ?? "") !== subject) {
|
|
384
|
-
continue;
|
|
385
|
-
}
|
|
386
|
-
count++;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
378
|
if (count >= MAX_MEMORIES_PER_SUBJECT) {
|
|
390
379
|
throw failedPreconditionError(MEMORY_FULL_MESSAGE);
|
|
391
380
|
}
|
|
@@ -643,12 +632,12 @@ export function newTransitionMemoryLifecycleStep(
|
|
|
643
632
|
}
|
|
644
633
|
|
|
645
634
|
/**
|
|
646
|
-
* ListMemoriesByOrg — Go listMemoriesByOrgStep (list.go):
|
|
647
|
-
* memories
|
|
648
|
-
* first) — the
|
|
649
|
-
*
|
|
650
|
-
* (DD-005 D4), deliberately not an
|
|
651
|
-
* dozens-of-records scale.
|
|
635
|
+
* ListMemoriesByOrg — Go listMemoriesByOrgStep (list.go): reads the
|
|
636
|
+
* org's memories through the memory list index (queries.ts), created_at
|
|
637
|
+
* descending (newest first) — the index order, which the read scope
|
|
638
|
+
* keeps. Ordering is chronological only; grouping pending proposals first
|
|
639
|
+
* is the console's presentation concern (DD-005 D4), deliberately not an
|
|
640
|
+
* RPC parameter at the kind's dozens-of-records scale.
|
|
652
641
|
*/
|
|
653
642
|
export function newListMemoriesByOrgStep(
|
|
654
643
|
store: Store,
|
|
@@ -661,20 +650,13 @@ export function newListMemoriesByOrgStep(
|
|
|
661
650
|
): Promise<void> {
|
|
662
651
|
const org = ctx.input.org;
|
|
663
652
|
|
|
664
|
-
let
|
|
653
|
+
let orgMemories: Memory[];
|
|
665
654
|
try {
|
|
666
|
-
|
|
655
|
+
orgMemories = await listOrganizationMemories(store, org);
|
|
667
656
|
} catch (error) {
|
|
668
657
|
throw internalError(error, "failed to list memories");
|
|
669
658
|
}
|
|
670
659
|
|
|
671
|
-
const decoded: Memory[] = [];
|
|
672
|
-
for (const bytes of rows) {
|
|
673
|
-
const memory = unmarshalMemory(bytes);
|
|
674
|
-
if (memory !== undefined) {
|
|
675
|
-
decoded.push(memory);
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
660
|
// 20260830.01 census lane 11: the org equality serves the Java
|
|
679
661
|
// handler's org arm in both editions and runs FIRST; the scope
|
|
680
662
|
// narrows the org's rows last (the scope is the last per-row
|
|
@@ -683,17 +665,10 @@ export function newListMemoriesByOrgStep(
|
|
|
683
665
|
listReadScope,
|
|
684
666
|
ctx.callerIdentity,
|
|
685
667
|
ApiResourceKind.memory,
|
|
686
|
-
|
|
668
|
+
orgMemories,
|
|
687
669
|
"",
|
|
688
670
|
);
|
|
689
671
|
|
|
690
|
-
memories.sort((a, b) =>
|
|
691
|
-
compareCreatedAtDesc(
|
|
692
|
-
a.status?.audit?.specAudit?.createdAt,
|
|
693
|
-
b.status?.audit?.specAudit?.createdAt,
|
|
694
|
-
),
|
|
695
|
-
);
|
|
696
|
-
|
|
697
672
|
ctx.set(
|
|
698
673
|
LIST_RESULT_KEY,
|
|
699
674
|
create(MemoryListSchema, {
|
|
@@ -704,15 +679,3 @@ export function newListMemoriesByOrgStep(
|
|
|
704
679
|
},
|
|
705
680
|
};
|
|
706
681
|
}
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Decodes a stored memory, skipping invalid entries (should not happen in
|
|
710
|
-
* normal operation) — Go unmarshalMemory.
|
|
711
|
-
*/
|
|
712
|
-
function unmarshalMemory(data: Uint8Array): Memory | undefined {
|
|
713
|
-
try {
|
|
714
|
-
return fromBinary(MemorySchema, data);
|
|
715
|
-
} catch {
|
|
716
|
-
return undefined;
|
|
717
|
-
}
|
|
718
|
-
}
|
|
@@ -53,6 +53,7 @@ import {
|
|
|
53
53
|
deleteBlockedByMcpServerMessage,
|
|
54
54
|
} from "../constants.js";
|
|
55
55
|
import { resolveOAuthAppRef } from "../refresolution.js";
|
|
56
|
+
import { seedOrganizations } from "../../organization/__tests__/support.js";
|
|
56
57
|
|
|
57
58
|
const silentLogger = createLogger({ level: "error", pretty: false, write: () => {} });
|
|
58
59
|
|
|
@@ -94,6 +95,19 @@ async function startServer(env: Record<string, string>): Promise<TestServer> {
|
|
|
94
95
|
const transport: Transport = createGrpcTransport({
|
|
95
96
|
baseUrl: `http://127.0.0.1:${port}`,
|
|
96
97
|
});
|
|
98
|
+
// Not "stigmer" or "res-org-none": the ref-resolution cases need an org
|
|
99
|
+
// that does not exist here.
|
|
100
|
+
await seedOrganizations(transport, [
|
|
101
|
+
ORG,
|
|
102
|
+
"other-org",
|
|
103
|
+
"org-a",
|
|
104
|
+
"org-b",
|
|
105
|
+
"res-org-a",
|
|
106
|
+
"res-org-b",
|
|
107
|
+
"res-org-c",
|
|
108
|
+
"res-org-d",
|
|
109
|
+
"res-org-e",
|
|
110
|
+
]);
|
|
97
111
|
return {
|
|
98
112
|
server,
|
|
99
113
|
command: createClient(OAuthAppCommandController, transport),
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test fixtures for the Organization domain, shared by every composed
|
|
3
|
+
* suite that writes into an Organization: `organizationInput` is the
|
|
4
|
+
* smallest create the chain accepts, and `seedOrganizations` creates each
|
|
5
|
+
* named Organization through the server's own create RPC, so the rows are
|
|
6
|
+
* exactly what a person's first create writes (the slug is the id,
|
|
7
|
+
* domain/organization/steps.ts).
|
|
8
|
+
*
|
|
9
|
+
* Why every such suite needs it: every org-scoped lane authorizes on the
|
|
10
|
+
* Organization it names, and under every posture a missing one answers
|
|
11
|
+
* NOT_FOUND before any other step (the trusted-local driver since
|
|
12
|
+
* stigmer#1163, authorization/trusted-local-authorizer.ts). A suite that
|
|
13
|
+
* writes under a slug nobody created is testing the phantom write that
|
|
14
|
+
* fix removed, so it seeds the slugs it uses in its `beforeAll`, once the
|
|
15
|
+
* server listens. A slug a test means to be absent is simply not seeded.
|
|
16
|
+
*/
|
|
17
|
+
import { createClient } from "@connectrpc/connect";
|
|
18
|
+
import type { Transport } from "@connectrpc/connect";
|
|
19
|
+
|
|
20
|
+
import { OrganizationCommandController } from "@stigmer/protos/ai/stigmer/tenancy/organization/v1/command_pb";
|
|
21
|
+
|
|
22
|
+
/** The smallest Organization create: slug, name and description all `slug`. */
|
|
23
|
+
export function organizationInput(slug: string) {
|
|
24
|
+
return {
|
|
25
|
+
apiVersion: "tenancy.stigmer.ai/v1",
|
|
26
|
+
kind: "Organization",
|
|
27
|
+
metadata: { name: slug, slug, org: "" },
|
|
28
|
+
spec: { description: slug },
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Creates each Organization, in order, as the transport's caller. */
|
|
33
|
+
export async function seedOrganizations(
|
|
34
|
+
transport: Transport,
|
|
35
|
+
slugs: ReadonlyArray<string>,
|
|
36
|
+
): Promise<void> {
|
|
37
|
+
const organizations = createClient(OrganizationCommandController, transport);
|
|
38
|
+
for (const slug of slugs) {
|
|
39
|
+
await organizations.create(organizationInput(slug));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -294,7 +294,7 @@ async function resolveOrProvisionAccount(
|
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
/** The account under the subject
|
|
297
|
+
/** The account under the subject in any mode but federated; a store fault is INTERNAL, never "no account". */
|
|
298
298
|
async function findAccount(
|
|
299
299
|
deps: PlatformClientMintDeps,
|
|
300
300
|
idpId: string,
|
|
@@ -390,7 +390,11 @@ async function grantAutoRole(
|
|
|
390
390
|
? DEFAULT_AUTO_GRANT_ROLE
|
|
391
391
|
: configured;
|
|
392
392
|
try {
|
|
393
|
-
await deps.grantPath.grant(
|
|
393
|
+
await deps.grantPath.grant(
|
|
394
|
+
organizationRole(accountId, role, org),
|
|
395
|
+
actor,
|
|
396
|
+
"platform_client_grant",
|
|
397
|
+
);
|
|
394
398
|
} catch (error) {
|
|
395
399
|
deps.logger.error(
|
|
396
400
|
"platform client auto-grant failed; nothing was provisioned",
|
|
@@ -19,9 +19,12 @@
|
|
|
19
19
|
* infrastructure fault it is, never as a revocation.
|
|
20
20
|
*
|
|
21
21
|
* Composed between `apikey` and `oidc`, only under an authentication
|
|
22
|
-
* posture (compose.ts)
|
|
23
|
-
*
|
|
24
|
-
* before it
|
|
22
|
+
* posture (compose.ts). Until 2026-09-29 the OIDC verifier claimed every
|
|
23
|
+
* JWT-shaped token and threw on one it could not verify, so a platform
|
|
24
|
+
* token had to be claimed before it got there (stigmer#1137's lesson); it
|
|
25
|
+
* now claims only its configured issuer's tokens, and the order is kept
|
|
26
|
+
* so a platform token is claimed by its own lane whatever issuer an
|
|
27
|
+
* operator configures.
|
|
25
28
|
*
|
|
26
29
|
* The identity is the account the token was minted for: `sub` IS the
|
|
27
30
|
* account id (the mint signs it), so no account read is needed; class
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
* identical push refused before the slug is judged.
|
|
20
20
|
*/
|
|
21
21
|
import { mkdtempSync, rmSync } from "node:fs";
|
|
22
|
-
import net from "node:net";
|
|
23
22
|
import { tmpdir } from "node:os";
|
|
24
23
|
import path from "node:path";
|
|
25
24
|
|
|
@@ -66,6 +65,7 @@ import {
|
|
|
66
65
|
PLUGIN_VERSION_LABEL,
|
|
67
66
|
SYSTEM_LABEL,
|
|
68
67
|
} from "../../../pipeline/apiresource-labels.js";
|
|
68
|
+
import { seedOrganizations } from "../../organization/__tests__/support.js";
|
|
69
69
|
|
|
70
70
|
const silentLogger = createLogger({
|
|
71
71
|
level: "error",
|
|
@@ -85,40 +85,31 @@ let mcpServers: Client<typeof McpServerCommandController>;
|
|
|
85
85
|
let mcpServerQuery: Client<typeof McpServerQueryController>;
|
|
86
86
|
let dir: string;
|
|
87
87
|
|
|
88
|
-
async function reserveFreePort(): Promise<number> {
|
|
89
|
-
return new Promise((resolve, reject) => {
|
|
90
|
-
const probe = net.createServer();
|
|
91
|
-
probe.once("error", reject);
|
|
92
|
-
probe.listen(0, "127.0.0.1", () => {
|
|
93
|
-
const { port } = probe.address() as net.AddressInfo;
|
|
94
|
-
probe.close(() => resolve(port));
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
88
|
beforeAll(async () => {
|
|
100
89
|
dir = mkdtempSync(path.join(tmpdir(), "plugin-domain-test-"));
|
|
101
|
-
|
|
90
|
+
// An ephemeral port needs no reservation: the transfer lane mints its
|
|
91
|
+
// capability URLs for the port the listener actually binds
|
|
92
|
+
// (boot/skill-transfer-origin.ts, stigmer#1386), and the artifact lane
|
|
93
|
+
// binds ephemeral beside it (boot/artifact-lane.ts). A port probed and
|
|
94
|
+
// released first could be taken by another worker before the bind
|
|
95
|
+
// (stigmer#1353).
|
|
102
96
|
server = await composeServer({
|
|
103
97
|
config: loadConfig({
|
|
104
98
|
STIGMER_MODEL_REGISTRY_REFRESH: "off",
|
|
105
99
|
TEMPORAL_HOST_PORT: "127.0.0.1:1",
|
|
106
|
-
GRPC_PORT: String(grpcPort),
|
|
107
|
-
// The reserved port is the unified one only; its +1 neighbour is not
|
|
108
|
-
// reserved, and a lane that cannot bind fails the boot (#1089), so
|
|
109
|
-
// the artifact lane binds ephemeral.
|
|
110
|
-
ARTIFACT_HTTP_PORT: "0",
|
|
111
100
|
DB_PATH: path.join(dir, "stigmer.db"),
|
|
112
101
|
ARTIFACT_LOCAL_BASE_PATH: path.join(dir, "artifacts"),
|
|
113
102
|
STORAGE_PATH: path.join(dir, "storage"),
|
|
114
103
|
}),
|
|
115
104
|
logger: silentLogger,
|
|
105
|
+
portOverride: 0,
|
|
116
106
|
host: "127.0.0.1",
|
|
117
107
|
});
|
|
118
108
|
const port = await server.start();
|
|
119
109
|
const transport: Transport = createGrpcTransport({
|
|
120
110
|
baseUrl: `http://127.0.0.1:${port}`,
|
|
121
111
|
});
|
|
112
|
+
await seedOrganizations(transport, [ORG]);
|
|
122
113
|
plugins = createClient(PluginCommandController, transport);
|
|
123
114
|
pluginQuery = createClient(PluginQueryController, transport);
|
|
124
115
|
agents = createClient(AgentCommandController, transport);
|
|
@@ -786,7 +777,6 @@ describe("Plugin push under an authorizer that enforces reserved labels", () =>
|
|
|
786
777
|
|
|
787
778
|
beforeAll(async () => {
|
|
788
779
|
enforcingDir = mkdtempSync(path.join(tmpdir(), "plugin-domain-enforcing-"));
|
|
789
|
-
const grpcPort = await reserveFreePort();
|
|
790
780
|
const authorizer: Authorizer = {
|
|
791
781
|
authorize(_caller, check) {
|
|
792
782
|
if (check.permission === IamPermission.can_write_reserved_labels) {
|
|
@@ -804,16 +794,13 @@ describe("Plugin push under an authorizer that enforces reserved labels", () =>
|
|
|
804
794
|
config: loadConfig({
|
|
805
795
|
STIGMER_MODEL_REGISTRY_REFRESH: "off",
|
|
806
796
|
TEMPORAL_HOST_PORT: "127.0.0.1:1",
|
|
807
|
-
GRPC_PORT: String(grpcPort),
|
|
808
|
-
// The reserved port is the unified one only; its +1 neighbour is not
|
|
809
|
-
// reserved, and a lane that cannot bind fails the boot (#1089), so
|
|
810
|
-
// the artifact lane binds ephemeral.
|
|
811
|
-
ARTIFACT_HTTP_PORT: "0",
|
|
812
797
|
DB_PATH: path.join(enforcingDir, "stigmer.db"),
|
|
813
798
|
ARTIFACT_LOCAL_BASE_PATH: path.join(enforcingDir, "artifacts"),
|
|
814
799
|
STORAGE_PATH: path.join(enforcingDir, "storage"),
|
|
815
800
|
}),
|
|
816
801
|
logger: silentLogger,
|
|
802
|
+
// Ephemeral, as the composition above: no port is reserved ahead.
|
|
803
|
+
portOverride: 0,
|
|
817
804
|
host: "127.0.0.1",
|
|
818
805
|
extensions: [{ name: "reserved-labels-enforced", authorizer }],
|
|
819
806
|
});
|
|
@@ -44,6 +44,7 @@ import { composeServer } from "../../../boot/compose.js";
|
|
|
44
44
|
import type { ComposedServer } from "../../../boot/compose.js";
|
|
45
45
|
import { createLogger } from "../../../boot/logger.js";
|
|
46
46
|
import { TRIGGER_DISABLED_MESSAGE } from "../trigger.js";
|
|
47
|
+
import { seedOrganizations } from "../../organization/__tests__/support.js";
|
|
47
48
|
|
|
48
49
|
const silentLogger = createLogger({ level: "error", pretty: false, write: () => {} });
|
|
49
50
|
|
|
@@ -73,6 +74,7 @@ beforeAll(async () => {
|
|
|
73
74
|
});
|
|
74
75
|
const port = await server.start();
|
|
75
76
|
transport = createGrpcTransport({ baseUrl: `http://127.0.0.1:${port}` });
|
|
77
|
+
await seedOrganizations(transport, ["acme", "other-org"]);
|
|
76
78
|
command = createClient(ScheduleCommandController, transport);
|
|
77
79
|
query = createClient(ScheduleQueryController, transport);
|
|
78
80
|
agentCommand = createClient(AgentCommandController, transport);
|
|
@@ -153,7 +153,9 @@ export const SCHEDULE_CREATE_DENIED_MESSAGE =
|
|
|
153
153
|
* a slug, not a request field; and there is deliberately no organization
|
|
154
154
|
* bar — a schedule is unattended spend on an agent, an editor's act, and
|
|
155
155
|
* the same-org invariant the resolve step enforces already binds the
|
|
156
|
-
* schedule's organization to the agent's (command.proto).
|
|
156
|
+
* schedule's organization to the agent's (command.proto). An editor, who
|
|
157
|
+
* maintains the definition, may run it on a clock: a schedule widens no
|
|
158
|
+
* one's access, and each fire re-checks its creator's can_execute.
|
|
157
159
|
*/
|
|
158
160
|
export function resolveScheduleCreateTargets(
|
|
159
161
|
ctx: RequestContext<typeof ScheduleSchema>,
|
|
@@ -64,6 +64,7 @@ import {
|
|
|
64
64
|
newConfigFromEnv,
|
|
65
65
|
} from "../../agentexecution/temporal/config.js";
|
|
66
66
|
import { newValidateExecutionTargetImmutabilityStep } from "../steps.js";
|
|
67
|
+
import { seedOrganizations } from "../../organization/__tests__/support.js";
|
|
67
68
|
|
|
68
69
|
const silentLogger = createLogger({
|
|
69
70
|
level: "error",
|
|
@@ -107,6 +108,7 @@ beforeAll(async () => {
|
|
|
107
108
|
});
|
|
108
109
|
const port = await server.start();
|
|
109
110
|
transport = createGrpcTransport({ baseUrl: `http://127.0.0.1:${port}` });
|
|
111
|
+
await seedOrganizations(transport, [ORG]);
|
|
110
112
|
agentCommand = createClient(AgentCommandController, transport);
|
|
111
113
|
command = createClient(SessionCommandController, transport);
|
|
112
114
|
query = createClient(SessionQueryController, transport);
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { mkdtempSync, rmSync } from "node:fs";
|
|
14
14
|
import http2 from "node:http2";
|
|
15
|
-
import net from "node:net";
|
|
16
15
|
import { tmpdir } from "node:os";
|
|
17
16
|
import path from "node:path";
|
|
18
17
|
|
|
@@ -31,6 +30,7 @@ import { loadConfig } from "../../../boot/config.js";
|
|
|
31
30
|
import { composeServer } from "../../../boot/compose.js";
|
|
32
31
|
import type { ComposedServer } from "../../../boot/compose.js";
|
|
33
32
|
import { createLogger } from "../../../boot/logger.js";
|
|
33
|
+
import { seedOrganizations } from "../../organization/__tests__/support.js";
|
|
34
34
|
|
|
35
35
|
const silentLogger = createLogger({ level: "error", pretty: false, write: () => {} });
|
|
36
36
|
|
|
@@ -45,27 +45,12 @@ let query: QueryClient;
|
|
|
45
45
|
let baseUrl: string;
|
|
46
46
|
let dir: string;
|
|
47
47
|
|
|
48
|
-
/**
|
|
49
|
-
* Reserves a free port the way the CLI/conformance harness does: the
|
|
50
|
-
* transfer lane mints capability URLs from CONFIG (base defaults to
|
|
51
|
-
* http://localhost:{grpcPort}), so the server must boot with GRPC_PORT set
|
|
52
|
-
* to its real port — a portOverride would leave minted URLs pointing at
|
|
53
|
-
* the config default.
|
|
54
|
-
*/
|
|
55
|
-
async function reserveFreePort(): Promise<number> {
|
|
56
|
-
return new Promise((resolve, reject) => {
|
|
57
|
-
const probe = net.createServer();
|
|
58
|
-
probe.once("error", reject);
|
|
59
|
-
probe.listen(0, "127.0.0.1", () => {
|
|
60
|
-
const { port } = probe.address() as net.AddressInfo;
|
|
61
|
-
probe.close(() => resolve(port));
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
|
|
66
48
|
beforeAll(async () => {
|
|
67
49
|
dir = mkdtempSync(path.join(tmpdir(), "skill-domain-test-"));
|
|
68
|
-
|
|
50
|
+
// An ephemeral port needs no reservation: the transfer lane mints its
|
|
51
|
+
// capability URLs for the port the listener actually binds
|
|
52
|
+
// (boot/skill-transfer-origin.ts, stigmer#1386), and the artifact lane
|
|
53
|
+
// binds ephemeral beside it (boot/artifact-lane.ts).
|
|
69
54
|
server = await composeServer({
|
|
70
55
|
config: loadConfig({
|
|
71
56
|
STIGMER_MODEL_REGISTRY_REFRESH: "off",
|
|
@@ -73,21 +58,18 @@ beforeAll(async () => {
|
|
|
73
58
|
// closed, so boots fail the non-fatal connect fast and can never touch
|
|
74
59
|
// a live local Temporal (the conformance CRUD harness does the same).
|
|
75
60
|
TEMPORAL_HOST_PORT: "127.0.0.1:1",
|
|
76
|
-
GRPC_PORT: String(grpcPort),
|
|
77
|
-
// The reserved port is the unified one only; its +1 neighbour is not
|
|
78
|
-
// reserved, and a lane that cannot bind fails the boot (#1089), so
|
|
79
|
-
// the artifact lane binds ephemeral.
|
|
80
|
-
ARTIFACT_HTTP_PORT: "0",
|
|
81
61
|
DB_PATH: path.join(dir, "stigmer.db"),
|
|
82
62
|
ARTIFACT_LOCAL_BASE_PATH: path.join(dir, "artifacts"),
|
|
83
63
|
STORAGE_PATH: path.join(dir, "storage"),
|
|
84
64
|
}),
|
|
85
65
|
logger: silentLogger,
|
|
66
|
+
portOverride: 0,
|
|
86
67
|
host: "127.0.0.1",
|
|
87
68
|
});
|
|
88
69
|
const port = await server.start();
|
|
89
70
|
baseUrl = `http://127.0.0.1:${port}`;
|
|
90
71
|
const transport: Transport = createGrpcTransport({ baseUrl });
|
|
72
|
+
await seedOrganizations(transport, [ORG, "other-org"]);
|
|
91
73
|
command = createClient(SkillCommandController, transport);
|
|
92
74
|
query = createClient(SkillQueryController, transport);
|
|
93
75
|
});
|
package/src/domain/skill/push.ts
CHANGED
|
@@ -46,6 +46,7 @@ import {
|
|
|
46
46
|
SYSTEM_MANAGED_LABEL,
|
|
47
47
|
} from "../../../pipeline/apiresource-labels.js";
|
|
48
48
|
import { defaultWorkflowInstanceSlug } from "../../workflowinstance/defaultinstance.js";
|
|
49
|
+
import { seedOrganizations } from "../../organization/__tests__/support.js";
|
|
49
50
|
|
|
50
51
|
const silentLogger = createLogger({ level: "error", pretty: false, write: () => {} });
|
|
51
52
|
|
|
@@ -83,6 +84,7 @@ beforeAll(async () => {
|
|
|
83
84
|
});
|
|
84
85
|
const port = await server.start();
|
|
85
86
|
transport = createGrpcTransport({ baseUrl: `http://127.0.0.1:${port}` });
|
|
87
|
+
await seedOrganizations(transport, [ORG, "other-org"]);
|
|
86
88
|
command = createClient(WorkflowCommandController, transport);
|
|
87
89
|
query = createClient(WorkflowQueryController, transport);
|
|
88
90
|
instanceCommand = createClient(WorkflowInstanceCommandController, transport);
|
|
@@ -2325,6 +2325,10 @@
|
|
|
2325
2325
|
"outputJsonSchema": {
|
|
2326
2326
|
"description": "Reviewer response including selected outcome and form data.",
|
|
2327
2327
|
"properties": {
|
|
2328
|
+
"comment": {
|
|
2329
|
+
"description": "Free-text comment the reviewer attached; absent when none was written, and on a timeout.",
|
|
2330
|
+
"type": "string"
|
|
2331
|
+
},
|
|
2328
2332
|
"form_data": {
|
|
2329
2333
|
"description": "Validated form response (when form_schema is configured).",
|
|
2330
2334
|
"type": "object"
|
|
@@ -2338,8 +2342,30 @@
|
|
|
2338
2342
|
"type": "string"
|
|
2339
2343
|
},
|
|
2340
2344
|
"reviewer": {
|
|
2341
|
-
"description": "Identity of the
|
|
2345
|
+
"description": "Identity-account id of the person who responded.",
|
|
2342
2346
|
"type": "string"
|
|
2347
|
+
},
|
|
2348
|
+
"reviewer_actor": {
|
|
2349
|
+
"description": "Display snapshot of the reviewer, taken when they responded.",
|
|
2350
|
+
"properties": {
|
|
2351
|
+
"avatar": {
|
|
2352
|
+
"description": "Avatar URL; empty when unknown.",
|
|
2353
|
+
"type": "string"
|
|
2354
|
+
},
|
|
2355
|
+
"display_name": {
|
|
2356
|
+
"description": "Human-readable name; empty when unknown.",
|
|
2357
|
+
"type": "string"
|
|
2358
|
+
},
|
|
2359
|
+
"email": {
|
|
2360
|
+
"description": "Email address; empty when unknown.",
|
|
2361
|
+
"type": "string"
|
|
2362
|
+
},
|
|
2363
|
+
"id": {
|
|
2364
|
+
"description": "Identity-account id (the same value as reviewer).",
|
|
2365
|
+
"type": "string"
|
|
2366
|
+
}
|
|
2367
|
+
},
|
|
2368
|
+
"type": "object"
|
|
2343
2369
|
}
|
|
2344
2370
|
},
|
|
2345
2371
|
"type": "object"
|