@stigmer/server 3.15.3-dev.20260914121148 → 3.15.3-dev.20260916211208
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/README.md +3 -3
- package/dist/archive/content-store.d.ts +35 -0
- package/dist/archive/content-store.d.ts.map +1 -0
- package/dist/archive/content-store.js +98 -0
- package/dist/archive/content-store.js.map +1 -0
- package/dist/archive/inflate.d.ts +22 -0
- package/dist/archive/inflate.d.ts.map +1 -0
- package/dist/archive/inflate.js +75 -0
- package/dist/archive/inflate.js.map +1 -0
- package/dist/archive/limits.d.ts +33 -0
- package/dist/archive/limits.d.ts.map +1 -0
- package/dist/archive/limits.js +31 -0
- package/dist/archive/limits.js.map +1 -0
- package/dist/archive/open.d.ts +24 -0
- package/dist/archive/open.d.ts.map +1 -0
- package/dist/archive/open.js +93 -0
- package/dist/archive/open.js.map +1 -0
- package/dist/{domain/skill/storage → archive}/prefilter.d.ts +5 -0
- package/dist/archive/prefilter.d.ts.map +1 -0
- package/dist/archive/prefilter.js.map +1 -0
- package/dist/archive/write.d.ts +8 -0
- package/dist/archive/write.d.ts.map +1 -0
- package/dist/archive/write.js +44 -0
- package/dist/archive/write.js.map +1 -0
- package/dist/authorization/authorizer.d.ts +98 -0
- package/dist/authorization/authorizer.d.ts.map +1 -0
- package/dist/authorization/authorizer.js +156 -0
- package/dist/authorization/authorizer.js.map +1 -0
- package/dist/authorization/derived-tuples.d.ts +42 -0
- package/dist/authorization/derived-tuples.d.ts.map +1 -0
- package/dist/authorization/derived-tuples.js +240 -0
- package/dist/authorization/derived-tuples.js.map +1 -0
- package/dist/authorization/evaluator.d.ts +66 -0
- package/dist/authorization/evaluator.d.ts.map +1 -0
- package/dist/authorization/evaluator.js +153 -0
- package/dist/authorization/evaluator.js.map +1 -0
- package/dist/authorization/facts.d.ts +29 -0
- package/dist/authorization/facts.d.ts.map +1 -0
- package/dist/authorization/facts.js +17 -0
- package/dist/authorization/facts.js.map +1 -0
- package/dist/authorization/list-read-scope.d.ts +18 -0
- package/dist/authorization/list-read-scope.d.ts.map +1 -0
- package/dist/authorization/list-read-scope.js +155 -0
- package/dist/authorization/list-read-scope.js.map +1 -0
- package/dist/authorization/model/agent.d.ts +2 -0
- package/dist/authorization/model/agent.d.ts.map +1 -0
- package/dist/authorization/model/agent.js +42 -0
- package/dist/authorization/model/agent.js.map +1 -0
- package/dist/authorization/model/agent_channel.d.ts +2 -0
- package/dist/authorization/model/agent_channel.d.ts.map +1 -0
- package/dist/authorization/model/agent_channel.js +38 -0
- package/dist/authorization/model/agent_channel.js.map +1 -0
- package/dist/authorization/model/agent_execution.d.ts +2 -0
- package/dist/authorization/model/agent_execution.d.ts.map +1 -0
- package/dist/authorization/model/agent_execution.js +25 -0
- package/dist/authorization/model/agent_execution.js.map +1 -0
- package/dist/authorization/model/agent_instance.d.ts +2 -0
- package/dist/authorization/model/agent_instance.d.ts.map +1 -0
- package/dist/authorization/model/agent_instance.js +47 -0
- package/dist/authorization/model/agent_instance.js.map +1 -0
- package/dist/authorization/model/agent_share.d.ts +2 -0
- package/dist/authorization/model/agent_share.d.ts.map +1 -0
- package/dist/authorization/model/agent_share.js +29 -0
- package/dist/authorization/model/agent_share.js.map +1 -0
- package/dist/authorization/model/api_key.d.ts +2 -0
- package/dist/authorization/model/api_key.d.ts.map +1 -0
- package/dist/authorization/model/api_key.js +27 -0
- package/dist/authorization/model/api_key.js.map +1 -0
- package/dist/authorization/model/artifact.d.ts +2 -0
- package/dist/authorization/model/artifact.d.ts.map +1 -0
- package/dist/authorization/model/artifact.js +27 -0
- package/dist/authorization/model/artifact.js.map +1 -0
- package/dist/authorization/model/channel_app.d.ts +2 -0
- package/dist/authorization/model/channel_app.d.ts.map +1 -0
- package/dist/authorization/model/channel_app.js +28 -0
- package/dist/authorization/model/channel_app.js.map +1 -0
- package/dist/authorization/model/default-of.d.ts +38 -0
- package/dist/authorization/model/default-of.d.ts.map +1 -0
- package/dist/authorization/model/default-of.js +39 -0
- package/dist/authorization/model/default-of.js.map +1 -0
- package/dist/authorization/model/environment.d.ts +2 -0
- package/dist/authorization/model/environment.d.ts.map +1 -0
- package/dist/authorization/model/environment.js +33 -0
- package/dist/authorization/model/environment.js.map +1 -0
- package/dist/authorization/model/execution_context.d.ts +2 -0
- package/dist/authorization/model/execution_context.d.ts.map +1 -0
- package/dist/authorization/model/execution_context.js +19 -0
- package/dist/authorization/model/execution_context.js.map +1 -0
- package/dist/authorization/model/iam_policy.d.ts +2 -0
- package/dist/authorization/model/iam_policy.d.ts.map +1 -0
- package/dist/authorization/model/iam_policy.js +31 -0
- package/dist/authorization/model/iam_policy.js.map +1 -0
- package/dist/authorization/model/identity_account.d.ts +2 -0
- package/dist/authorization/model/identity_account.d.ts.map +1 -0
- package/dist/authorization/model/identity_account.js +25 -0
- package/dist/authorization/model/identity_account.js.map +1 -0
- package/dist/authorization/model/index.d.ts +36 -0
- package/dist/authorization/model/index.d.ts.map +1 -0
- package/dist/authorization/model/index.js +72 -0
- package/dist/authorization/model/index.js.map +1 -0
- package/dist/authorization/model/mcp_server.d.ts +2 -0
- package/dist/authorization/model/mcp_server.d.ts.map +1 -0
- package/dist/authorization/model/mcp_server.js +37 -0
- package/dist/authorization/model/mcp_server.js.map +1 -0
- package/dist/authorization/model/memory.d.ts +2 -0
- package/dist/authorization/model/memory.d.ts.map +1 -0
- package/dist/authorization/model/memory.js +26 -0
- package/dist/authorization/model/memory.js.map +1 -0
- package/dist/authorization/model/oauth_app.d.ts +2 -0
- package/dist/authorization/model/oauth_app.d.ts.map +1 -0
- package/dist/authorization/model/oauth_app.js +30 -0
- package/dist/authorization/model/oauth_app.js.map +1 -0
- package/dist/authorization/model/organization.d.ts +2 -0
- package/dist/authorization/model/organization.d.ts.map +1 -0
- package/dist/authorization/model/organization.js +54 -0
- package/dist/authorization/model/organization.js.map +1 -0
- package/dist/authorization/model/plugin.d.ts +2 -0
- package/dist/authorization/model/plugin.d.ts.map +1 -0
- package/dist/authorization/model/plugin.js +44 -0
- package/dist/authorization/model/plugin.js.map +1 -0
- package/dist/authorization/model/project.d.ts +2 -0
- package/dist/authorization/model/project.d.ts.map +1 -0
- package/dist/authorization/model/project.js +32 -0
- package/dist/authorization/model/project.js.map +1 -0
- package/dist/authorization/model/rewrite.d.ts +127 -0
- package/dist/authorization/model/rewrite.d.ts.map +1 -0
- package/dist/authorization/model/rewrite.js +82 -0
- package/dist/authorization/model/rewrite.js.map +1 -0
- package/dist/authorization/model/schedule.d.ts +2 -0
- package/dist/authorization/model/schedule.d.ts.map +1 -0
- package/dist/authorization/model/schedule.js +29 -0
- package/dist/authorization/model/schedule.js.map +1 -0
- package/dist/authorization/model/session.d.ts +2 -0
- package/dist/authorization/model/session.d.ts.map +1 -0
- package/dist/authorization/model/session.js +38 -0
- package/dist/authorization/model/session.js.map +1 -0
- package/dist/authorization/model/skill.d.ts +2 -0
- package/dist/authorization/model/skill.d.ts.map +1 -0
- package/dist/authorization/model/skill.js +38 -0
- package/dist/authorization/model/skill.js.map +1 -0
- package/dist/authorization/model/workflow.d.ts +2 -0
- package/dist/authorization/model/workflow.d.ts.map +1 -0
- package/dist/authorization/model/workflow.js +38 -0
- package/dist/authorization/model/workflow.js.map +1 -0
- package/dist/authorization/model/workflow_execution.d.ts +2 -0
- package/dist/authorization/model/workflow_execution.d.ts.map +1 -0
- package/dist/authorization/model/workflow_execution.js +32 -0
- package/dist/authorization/model/workflow_execution.js.map +1 -0
- package/dist/authorization/model/workflow_instance.d.ts +2 -0
- package/dist/authorization/model/workflow_instance.d.ts.map +1 -0
- package/dist/authorization/model/workflow_instance.js +92 -0
- package/dist/authorization/model/workflow_instance.js.map +1 -0
- package/dist/authorization/organization-directory.d.ts +13 -0
- package/dist/authorization/organization-directory.d.ts.map +1 -0
- package/dist/authorization/organization-directory.js +83 -0
- package/dist/authorization/organization-directory.js.map +1 -0
- package/dist/authorization/person.d.ts +42 -0
- package/dist/authorization/person.d.ts.map +1 -0
- package/dist/authorization/person.js +19 -0
- package/dist/authorization/person.js.map +1 -0
- package/dist/authorization/posture.d.ts +38 -0
- package/dist/authorization/posture.d.ts.map +1 -0
- package/dist/authorization/posture.js +7 -0
- package/dist/authorization/posture.js.map +1 -0
- package/dist/authorization/schedule-fire-caller.d.ts +12 -0
- package/dist/authorization/schedule-fire-caller.d.ts.map +1 -0
- package/dist/authorization/schedule-fire-caller.js +67 -0
- package/dist/authorization/schedule-fire-caller.js.map +1 -0
- package/dist/authorization/store-test-kit.d.ts +68 -0
- package/dist/authorization/store-test-kit.d.ts.map +1 -0
- package/dist/authorization/store-test-kit.js +311 -0
- package/dist/authorization/store-test-kit.js.map +1 -0
- package/dist/authorization/tuples.d.ts +115 -0
- package/dist/authorization/tuples.d.ts.map +1 -0
- package/dist/authorization/tuples.js +83 -0
- package/dist/authorization/tuples.js.map +1 -0
- package/dist/boot/compose.d.ts.map +1 -1
- package/dist/boot/compose.js +157 -32
- package/dist/boot/compose.js.map +1 -1
- package/dist/boot/inprocess.d.ts +12 -0
- package/dist/boot/inprocess.d.ts.map +1 -1
- package/dist/boot/inprocess.js +62 -20
- package/dist/boot/inprocess.js.map +1 -1
- package/dist/domain/agent/controller.d.ts.map +1 -1
- package/dist/domain/agent/controller.js +9 -0
- package/dist/domain/agent/controller.js.map +1 -1
- package/dist/domain/iampolicy/constants.d.ts +11 -0
- package/dist/domain/iampolicy/constants.d.ts.map +1 -1
- package/dist/domain/iampolicy/constants.js +11 -0
- package/dist/domain/iampolicy/constants.js.map +1 -1
- package/dist/domain/iampolicy/membership.d.ts +72 -1
- package/dist/domain/iampolicy/membership.d.ts.map +1 -1
- package/dist/domain/iampolicy/membership.js +141 -56
- package/dist/domain/iampolicy/membership.js.map +1 -1
- package/dist/domain/identityaccount/actor.d.ts +26 -0
- package/dist/domain/identityaccount/actor.d.ts.map +1 -0
- package/dist/domain/identityaccount/actor.js +17 -0
- package/dist/domain/identityaccount/actor.js.map +1 -0
- package/dist/domain/mcpserver/controller.d.ts.map +1 -1
- package/dist/domain/mcpserver/controller.js +9 -0
- package/dist/domain/mcpserver/controller.js.map +1 -1
- package/dist/domain/plugin/archive.d.ts +37 -0
- package/dist/domain/plugin/archive.d.ts.map +1 -0
- package/dist/domain/plugin/archive.js +50 -0
- package/dist/domain/plugin/archive.js.map +1 -0
- package/dist/domain/plugin/constants.d.ts +38 -0
- package/dist/domain/plugin/constants.d.ts.map +1 -0
- package/dist/domain/plugin/constants.js +46 -0
- package/dist/domain/plugin/constants.js.map +1 -0
- package/dist/domain/plugin/controller.d.ts +25 -0
- package/dist/domain/plugin/controller.d.ts.map +1 -0
- package/dist/domain/plugin/controller.js +493 -0
- package/dist/domain/plugin/controller.js.map +1 -0
- package/dist/domain/plugin/materialize/agent.d.ts +13 -0
- package/dist/domain/plugin/materialize/agent.d.ts.map +1 -0
- package/dist/domain/plugin/materialize/agent.js +128 -0
- package/dist/domain/plugin/materialize/agent.js.map +1 -0
- package/dist/domain/plugin/materialize/default-agent-instructions.d.ts +22 -0
- package/dist/domain/plugin/materialize/default-agent-instructions.d.ts.map +1 -0
- package/dist/domain/plugin/materialize/default-agent-instructions.js +31 -0
- package/dist/domain/plugin/materialize/default-agent-instructions.js.map +1 -0
- package/dist/domain/plugin/materialize/identity.d.ts +28 -0
- package/dist/domain/plugin/materialize/identity.d.ts.map +1 -0
- package/dist/domain/plugin/materialize/identity.js +40 -0
- package/dist/domain/plugin/materialize/identity.js.map +1 -0
- package/dist/domain/plugin/materialize/mcp-servers.d.ts +15 -0
- package/dist/domain/plugin/materialize/mcp-servers.d.ts.map +1 -0
- package/dist/domain/plugin/materialize/mcp-servers.js +131 -0
- package/dist/domain/plugin/materialize/mcp-servers.js.map +1 -0
- package/dist/domain/plugin/materialize/plan.d.ts +24 -0
- package/dist/domain/plugin/materialize/plan.d.ts.map +1 -0
- package/dist/domain/plugin/materialize/plan.js +77 -0
- package/dist/domain/plugin/materialize/plan.js.map +1 -0
- package/dist/domain/plugin/materialize/ports.d.ts +42 -0
- package/dist/domain/plugin/materialize/ports.d.ts.map +1 -0
- package/dist/domain/plugin/materialize/ports.js +2 -0
- package/dist/domain/plugin/materialize/ports.js.map +1 -0
- package/dist/domain/plugin/materialize/skills.d.ts +12 -0
- package/dist/domain/plugin/materialize/skills.d.ts.map +1 -0
- package/dist/domain/plugin/materialize/skills.js +44 -0
- package/dist/domain/plugin/materialize/skills.js.map +1 -0
- package/dist/domain/plugin/materialize/workflows.d.ts +15 -0
- package/dist/domain/plugin/materialize/workflows.d.ts.map +1 -0
- package/dist/domain/plugin/materialize/workflows.js +31 -0
- package/dist/domain/plugin/materialize/workflows.js.map +1 -0
- package/dist/domain/plugin/members.d.ts +42 -0
- package/dist/domain/plugin/members.d.ts.map +1 -0
- package/dist/domain/plugin/members.js +97 -0
- package/dist/domain/plugin/members.js.map +1 -0
- package/dist/domain/plugin/overlay/documents.d.ts +31 -0
- package/dist/domain/plugin/overlay/documents.d.ts.map +1 -0
- package/dist/domain/plugin/overlay/documents.js +38 -0
- package/dist/domain/plugin/overlay/documents.js.map +1 -0
- package/dist/domain/plugin/overlay/parse.d.ts +16 -0
- package/dist/domain/plugin/overlay/parse.d.ts.map +1 -0
- package/dist/domain/plugin/overlay/parse.js +79 -0
- package/dist/domain/plugin/overlay/parse.js.map +1 -0
- package/dist/domain/plugin/overlay/sanitize.d.ts +10 -0
- package/dist/domain/plugin/overlay/sanitize.d.ts.map +1 -0
- package/dist/domain/plugin/overlay/sanitize.js +101 -0
- package/dist/domain/plugin/overlay/sanitize.js.map +1 -0
- package/dist/domain/plugin/push.d.ts +133 -0
- package/dist/domain/plugin/push.d.ts.map +1 -0
- package/dist/domain/plugin/push.js +800 -0
- package/dist/domain/plugin/push.js.map +1 -0
- package/dist/domain/plugin/search-extractor.d.ts +3 -0
- package/dist/domain/plugin/search-extractor.d.ts.map +1 -0
- package/dist/domain/plugin/search-extractor.js +41 -0
- package/dist/domain/plugin/search-extractor.js.map +1 -0
- package/dist/domain/skill/constants.d.ts +6 -11
- package/dist/domain/skill/constants.d.ts.map +1 -1
- package/dist/domain/skill/constants.js +6 -11
- package/dist/domain/skill/constants.js.map +1 -1
- package/dist/domain/skill/controller.d.ts.map +1 -1
- package/dist/domain/skill/controller.js +33 -30
- package/dist/domain/skill/controller.js.map +1 -1
- package/dist/domain/skill/push.d.ts +9 -10
- package/dist/domain/skill/push.d.ts.map +1 -1
- package/dist/domain/skill/push.js +53 -122
- package/dist/domain/skill/push.js.map +1 -1
- package/dist/domain/skill/search-extractor.d.ts.map +1 -1
- package/dist/domain/skill/search-extractor.js.map +1 -1
- package/dist/domain/skill/storage/artifact-storage.d.ts +26 -29
- package/dist/domain/skill/storage/artifact-storage.d.ts.map +1 -1
- package/dist/domain/skill/storage/artifact-storage.js +6 -103
- package/dist/domain/skill/storage/artifact-storage.js.map +1 -1
- package/dist/domain/skill/storage/zip-gate.d.ts +1 -2
- package/dist/domain/skill/storage/zip-gate.d.ts.map +1 -1
- package/dist/domain/skill/storage/zip-gate.js +56 -126
- package/dist/domain/skill/storage/zip-gate.js.map +1 -1
- package/dist/domain/skill/version-resolution.d.ts +5 -5
- package/dist/domain/skill/version-resolution.d.ts.map +1 -1
- package/dist/domain/skill/version-resolution.js +34 -216
- package/dist/domain/skill/version-resolution.js.map +1 -1
- package/dist/domain/workflow/controller.d.ts.map +1 -1
- package/dist/domain/workflow/controller.js +30 -3
- package/dist/domain/workflow/controller.js.map +1 -1
- package/dist/domain/workflow/registry/data/task-kind-registry.json +1 -0
- package/dist/extensions/authorizer.d.ts +10 -5
- package/dist/extensions/authorizer.d.ts.map +1 -1
- package/dist/extensions/drivers.d.ts +4 -1
- package/dist/extensions/drivers.d.ts.map +1 -1
- package/dist/extensions/list-read-scope.d.ts +47 -20
- package/dist/extensions/list-read-scope.d.ts.map +1 -1
- package/dist/extensions/list-read-scope.js +20 -24
- package/dist/extensions/list-read-scope.js.map +1 -1
- package/dist/extensions/organization-directory.d.ts +13 -9
- package/dist/extensions/organization-directory.d.ts.map +1 -1
- package/dist/extensions/organization-directory.js.map +1 -1
- package/dist/extensions/resource-authorization.d.ts +33 -0
- package/dist/extensions/resource-authorization.d.ts.map +1 -1
- package/dist/extensions/schedule-fire-caller.d.ts +45 -18
- package/dist/extensions/schedule-fire-caller.d.ts.map +1 -1
- package/dist/extensions/schedule-fire-caller.js +12 -1
- package/dist/extensions/schedule-fire-caller.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/pipeline/apiresource-labels.d.ts +23 -3
- package/dist/pipeline/apiresource-labels.d.ts.map +1 -1
- package/dist/pipeline/apiresource-labels.js +20 -0
- package/dist/pipeline/apiresource-labels.js.map +1 -1
- package/dist/pipeline/errors.d.ts.map +1 -1
- package/dist/pipeline/errors.js.map +1 -1
- package/dist/pipeline/steps/authorization-facts.d.ts +12 -0
- package/dist/pipeline/steps/authorization-facts.d.ts.map +1 -0
- package/dist/pipeline/steps/authorization-facts.js +100 -0
- package/dist/pipeline/steps/authorization-facts.js.map +1 -0
- package/dist/pipeline/steps/delete.d.ts.map +1 -1
- package/dist/pipeline/steps/delete.js +1 -1
- package/dist/pipeline/steps/delete.js.map +1 -1
- package/dist/pipeline/steps/duplicate.d.ts.map +1 -1
- package/dist/pipeline/steps/duplicate.js.map +1 -1
- package/dist/pipeline/steps/guard-plugin-managed.d.ts +12 -0
- package/dist/pipeline/steps/guard-plugin-managed.d.ts.map +1 -0
- package/dist/pipeline/steps/guard-plugin-managed.js +96 -0
- package/dist/pipeline/steps/guard-plugin-managed.js.map +1 -0
- package/dist/pipeline/steps/guard-reserved-labels.d.ts +16 -2
- package/dist/pipeline/steps/guard-reserved-labels.d.ts.map +1 -1
- package/dist/pipeline/steps/guard-reserved-labels.js +11 -7
- package/dist/pipeline/steps/guard-reserved-labels.js.map +1 -1
- package/dist/pipeline/steps/helpers.d.ts.map +1 -1
- package/dist/pipeline/steps/helpers.js.map +1 -1
- package/dist/pipeline/steps/index-search.d.ts.map +1 -1
- package/dist/pipeline/steps/index-search.js.map +1 -1
- package/dist/pipeline/steps/load-existing.d.ts.map +1 -1
- package/dist/pipeline/steps/load-existing.js +1 -1
- package/dist/pipeline/steps/load-existing.js.map +1 -1
- package/dist/pipeline/steps/references.d.ts +16 -0
- package/dist/pipeline/steps/references.d.ts.map +1 -1
- package/dist/pipeline/steps/references.js +18 -0
- package/dist/pipeline/steps/references.js.map +1 -1
- package/dist/pipeline/steps/resolve-artifact-source.d.ts +35 -0
- package/dist/pipeline/steps/resolve-artifact-source.d.ts.map +1 -0
- package/dist/pipeline/steps/resolve-artifact-source.js +27 -0
- package/dist/pipeline/steps/resolve-artifact-source.js.map +1 -0
- package/dist/pipeline/steps/server-stamped-reserved-labels.d.ts.map +1 -1
- package/dist/pipeline/steps/server-stamped-reserved-labels.js.map +1 -1
- package/dist/pipeline/steps/slug.d.ts.map +1 -1
- package/dist/pipeline/steps/slug.js.map +1 -1
- package/dist/pipeline/steps/validate-visibility.d.ts +9 -0
- package/dist/pipeline/steps/validate-visibility.d.ts.map +1 -1
- package/dist/pipeline/steps/validate-visibility.js +6 -1
- package/dist/pipeline/steps/validate-visibility.js.map +1 -1
- package/dist/pipeline/steps/validation.d.ts.map +1 -1
- package/dist/pipeline/steps/validation.js.map +1 -1
- package/dist/pipeline/steps/version-archive.d.ts +63 -0
- package/dist/pipeline/steps/version-archive.d.ts.map +1 -0
- package/dist/pipeline/steps/version-archive.js +129 -0
- package/dist/pipeline/steps/version-archive.js.map +1 -0
- package/dist/pipeline/steps/version-history.d.ts +49 -0
- package/dist/pipeline/steps/version-history.d.ts.map +1 -0
- package/dist/pipeline/steps/version-history.js +229 -0
- package/dist/pipeline/steps/version-history.js.map +1 -0
- package/dist/pipeline/steps/visibility-gates.d.ts +8 -0
- package/dist/pipeline/steps/visibility-gates.d.ts.map +1 -1
- package/dist/pipeline/steps/visibility-gates.js +7 -2
- package/dist/pipeline/steps/visibility-gates.js.map +1 -1
- package/dist/query/search/registry.d.ts.map +1 -1
- package/dist/query/search/registry.js +2 -0
- package/dist/query/search/registry.js.map +1 -1
- package/dist/temporal/schedule/run-starter.d.ts +1 -1
- package/dist/temporal/schedule/run-starter.d.ts.map +1 -1
- package/dist/temporal/schedule/run-starter.js +14 -1
- package/dist/temporal/schedule/run-starter.js.map +1 -1
- package/package.json +5 -4
- package/src/archive/__tests__/archive.test.ts +233 -0
- package/src/{domain/skill → archive}/__tests__/prefilter.test.ts +1 -1
- package/src/archive/content-store.ts +132 -0
- package/src/archive/inflate.ts +107 -0
- package/src/archive/limits.ts +42 -0
- package/src/archive/open.ts +131 -0
- package/src/{domain/skill/storage → archive}/prefilter.ts +5 -0
- package/src/archive/write.ts +54 -0
- package/src/authorization/README.md +124 -0
- package/src/authorization/__tests__/authorizer.test.ts +719 -0
- package/src/authorization/__tests__/derived-tuples.test.ts +802 -0
- package/src/authorization/__tests__/drivers.ts +70 -0
- package/src/authorization/__tests__/evaluator.test.ts +359 -0
- package/src/authorization/__tests__/facts.test.ts +155 -0
- package/src/authorization/__tests__/fixtures/fga/agent-channel-owner.fga.yaml +112 -0
- package/src/authorization/__tests__/fixtures/fga/agent-share-owner.fga.yaml +109 -0
- package/src/authorization/__tests__/fixtures/fga/artifact-org-and-owner.fga.yaml +128 -0
- package/src/authorization/__tests__/fixtures/fga/blueprint-private-visibility.fga.yaml +410 -0
- package/src/authorization/__tests__/fixtures/fga/channel-app-owner.fga.yaml +125 -0
- package/src/authorization/__tests__/fixtures/fga/channel-participation.fga.yaml +201 -0
- package/src/authorization/__tests__/fixtures/fga/channel-session-visibility.fga.yaml +187 -0
- package/src/authorization/__tests__/fixtures/fga/cross-org-share-creation.fga.yaml +98 -0
- package/src/authorization/__tests__/fixtures/fga/default-instance-inheritance.fga.yaml +271 -0
- package/src/authorization/__tests__/fixtures/fga/memory-subject-only.fga.yaml +72 -0
- package/src/authorization/__tests__/fixtures/fga/org-admin-owner-inheritance.fga.yaml +328 -0
- package/src/authorization/__tests__/fixtures/fga/org-shared-environment.fga.yaml +144 -0
- package/src/authorization/__tests__/fixtures/fga/platform-visibility.fga.yaml +223 -0
- package/src/authorization/__tests__/fixtures/fga/provider-standing-viewer.fga.yaml +40 -0
- package/src/authorization/__tests__/fixtures/fga/public-visibility-setter.fga.yaml +52 -0
- package/src/authorization/__tests__/fixtures/fga/reserved-label-writer.fga.yaml +41 -0
- package/src/authorization/__tests__/fixtures/fga/schedule-owner.fga.yaml +113 -0
- package/src/authorization/__tests__/fixtures/fga/schedule-session-visibility.fga.yaml +214 -0
- package/src/authorization/__tests__/fixtures/fga/session-personal-resource.fga.yaml +117 -0
- package/src/authorization/__tests__/fixtures/fga/workflow-execution-sharing.fga.yaml +192 -0
- package/src/authorization/__tests__/list-read-scope.measure.test.ts +317 -0
- package/src/authorization/__tests__/list-read-scope.test.ts +796 -0
- package/src/authorization/__tests__/organization-directory.test.ts +236 -0
- package/src/authorization/__tests__/person.test.ts +114 -0
- package/src/authorization/__tests__/posture.test.ts +25 -0
- package/src/authorization/__tests__/schedule-fire-caller.test.ts +134 -0
- package/src/authorization/__tests__/store-tests.test.ts +306 -0
- package/src/authorization/__tests__/support.ts +101 -0
- package/src/authorization/__tests__/tuples.test.ts +62 -0
- package/src/authorization/__tests__/wire-permissions.test.ts +154 -0
- package/src/authorization/authorizer.ts +208 -0
- package/src/authorization/derived-tuples.ts +384 -0
- package/src/authorization/evaluator.ts +283 -0
- package/src/authorization/facts.ts +47 -0
- package/src/authorization/list-read-scope.ts +216 -0
- package/src/authorization/model/__tests__/registry.test.ts +317 -0
- package/src/authorization/model/agent.ts +64 -0
- package/src/authorization/model/agent_channel.ts +49 -0
- package/src/authorization/model/agent_execution.ts +33 -0
- package/src/authorization/model/agent_instance.ts +66 -0
- package/src/authorization/model/agent_share.ts +40 -0
- package/src/authorization/model/api_key.ts +28 -0
- package/src/authorization/model/artifact.ts +38 -0
- package/src/authorization/model/channel_app.ts +39 -0
- package/src/authorization/model/default-of.ts +99 -0
- package/src/authorization/model/environment.ts +48 -0
- package/src/authorization/model/execution_context.ts +20 -0
- package/src/authorization/model/iam_policy.ts +42 -0
- package/src/authorization/model/identity_account.ts +26 -0
- package/src/authorization/model/index.ts +108 -0
- package/src/authorization/model/mcp_server.ts +59 -0
- package/src/authorization/model/memory.ts +27 -0
- package/src/authorization/model/oauth_app.ts +42 -0
- package/src/authorization/model/organization.ts +55 -0
- package/src/authorization/model/plugin.ts +66 -0
- package/src/authorization/model/project.ts +47 -0
- package/src/authorization/model/rewrite.ts +213 -0
- package/src/authorization/model/schedule.ts +40 -0
- package/src/authorization/model/session.ts +50 -0
- package/src/authorization/model/skill.ts +60 -0
- package/src/authorization/model/workflow.ts +60 -0
- package/src/authorization/model/workflow_execution.ts +44 -0
- package/src/authorization/model/workflow_instance.ts +122 -0
- package/src/authorization/organization-directory.ts +114 -0
- package/src/authorization/person.ts +68 -0
- package/src/authorization/posture.ts +49 -0
- package/src/authorization/schedule-fire-caller.ts +91 -0
- package/src/authorization/store-test-kit.ts +454 -0
- package/src/authorization/tuples.ts +190 -0
- package/src/boot/compose.ts +175 -38
- package/src/boot/inprocess.ts +108 -30
- package/src/domain/agent/controller.ts +11 -0
- package/src/domain/iampolicy/__tests__/membership.test.ts +357 -3
- package/src/domain/iampolicy/constants.ts +12 -0
- package/src/domain/iampolicy/membership.ts +221 -66
- package/src/domain/identityaccount/actor.ts +44 -0
- package/src/domain/mcpserver/controller.ts +11 -0
- package/src/domain/plugin/__tests__/materialize.test.ts +303 -0
- package/src/domain/plugin/__tests__/overlay-parse.test.ts +85 -0
- package/src/domain/plugin/__tests__/plugin.test.ts +681 -0
- package/src/domain/plugin/__tests__/sanitize.test.ts +174 -0
- package/src/domain/plugin/archive.ts +89 -0
- package/src/domain/plugin/constants.ts +53 -0
- package/src/domain/plugin/controller.ts +913 -0
- package/src/domain/plugin/materialize/agent.ts +186 -0
- package/src/domain/plugin/materialize/default-agent-instructions.ts +59 -0
- package/src/domain/plugin/materialize/identity.ts +67 -0
- package/src/domain/plugin/materialize/mcp-servers.ts +175 -0
- package/src/domain/plugin/materialize/plan.ts +124 -0
- package/src/domain/plugin/materialize/ports.ts +53 -0
- package/src/domain/plugin/materialize/skills.ts +68 -0
- package/src/domain/plugin/materialize/workflows.ts +51 -0
- package/src/domain/plugin/members.ts +180 -0
- package/src/domain/plugin/overlay/documents.ts +78 -0
- package/src/domain/plugin/overlay/parse.ts +115 -0
- package/src/domain/plugin/overlay/sanitize.ts +149 -0
- package/src/domain/plugin/push.ts +1062 -0
- package/src/domain/plugin/search-extractor.ts +60 -0
- package/src/domain/skill/constants.ts +11 -14
- package/src/domain/skill/controller.ts +44 -36
- package/src/domain/skill/push.ts +61 -156
- package/src/domain/skill/search-extractor.ts +3 -1
- package/src/domain/skill/storage/artifact-storage.ts +23 -124
- package/src/domain/skill/storage/zip-gate.ts +58 -154
- package/src/domain/skill/version-resolution.ts +67 -269
- package/src/domain/workflow/controller.ts +38 -4
- package/src/domain/workflow/registry/data/task-kind-registry.json +1 -0
- package/src/extensions/__tests__/built-in-authorization-composed.test.ts +835 -0
- package/src/extensions/__tests__/composed-support.ts +32 -1
- package/src/extensions/__tests__/extension-composition.test.ts +35 -0
- package/src/extensions/__tests__/list-read-scope.test.ts +137 -33
- package/src/extensions/__tests__/role-reconciliation-composed.test.ts +209 -0
- package/src/extensions/__tests__/tier-truthfulness.test.ts +6 -14
- package/src/extensions/authorizer.ts +10 -5
- package/src/extensions/drivers.ts +4 -1
- package/src/extensions/list-read-scope.ts +67 -45
- package/src/extensions/organization-directory.ts +13 -9
- package/src/extensions/resource-authorization.ts +34 -0
- package/src/extensions/schedule-fire-caller.ts +49 -18
- package/src/index.ts +51 -1
- package/src/pipeline/__tests__/router-transport.test.ts +1 -3
- package/src/pipeline/apiresource-labels.ts +31 -3
- package/src/pipeline/errors.ts +5 -5
- package/src/pipeline/steps/__tests__/authorize-annotation-completeness.test.ts +1 -20
- package/src/pipeline/steps/__tests__/guard-memory-capture.test.ts +3 -9
- package/src/pipeline/steps/__tests__/guard-plugin-managed.test.ts +151 -0
- package/src/pipeline/steps/__tests__/guard-reserved-labels.test.ts +83 -8
- package/src/pipeline/steps/authorization-facts.ts +131 -0
- package/src/pipeline/steps/delete.ts +11 -3
- package/src/pipeline/steps/duplicate.ts +8 -2
- package/src/pipeline/steps/guard-plugin-managed.ts +133 -0
- package/src/pipeline/steps/guard-reserved-labels.ts +29 -8
- package/src/pipeline/steps/helpers.ts +4 -1
- package/src/pipeline/steps/index-search.ts +28 -15
- package/src/pipeline/steps/load-existing.ts +12 -3
- package/src/pipeline/steps/references.ts +36 -2
- package/src/pipeline/steps/resolve-artifact-source.ts +66 -0
- package/src/pipeline/steps/server-stamped-reserved-labels.ts +2 -1
- package/src/pipeline/steps/slug.ts +7 -2
- package/src/pipeline/steps/validate-visibility.ts +9 -2
- package/src/pipeline/steps/validation.ts +3 -1
- package/src/pipeline/steps/version-archive.ts +225 -0
- package/src/pipeline/steps/version-history.ts +362 -0
- package/src/pipeline/steps/visibility-gates.ts +12 -9
- package/src/query/README.md +1 -1
- package/src/query/search/__tests__/criteria.test.ts +6 -7
- package/src/query/search/__tests__/query-store.test.ts +9 -2
- package/src/query/search/__tests__/registry.test.ts +6 -4
- package/src/query/search/registry.ts +6 -1
- package/src/temporal/schedule/__tests__/run-starter.test.ts +86 -24
- package/src/temporal/schedule/run-starter.ts +31 -8
- package/dist/domain/skill/storage/prefilter.d.ts.map +0 -1
- package/dist/domain/skill/storage/prefilter.js.map +0 -1
- /package/dist/{domain/skill/storage → archive}/prefilter.js +0 -0
|
@@ -2,32 +2,59 @@
|
|
|
2
2
|
* The schedule-fire caller seam (stigmer-cloud#572) — WHO a schedule fire
|
|
3
3
|
* acts as when the RunStarter re-enters the execution create pipeline.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
5
|
+
* With no driver composed a fire enters as the in-process `internal`
|
|
6
|
+
* class — the trusted-local laptop's lane, where the one caller is the
|
|
7
|
+
* server's operator and attribution has nobody to separate. Under an
|
|
8
|
+
* authentication posture that lane is wrong: the internal class carries
|
|
9
|
+
* the operator's email or `"system"`, which no enforcing evaluator
|
|
10
|
+
* recognizes as a person, so the fired session would belong to nobody
|
|
11
|
+
* (the FGA model's own words — "without it a scheduled run is invisible
|
|
12
|
+
* to every human, including the schedule's owner"). Two drivers answer
|
|
13
|
+
* it: the cloud edition mints a schedule JWT per fire (sub = the org's
|
|
14
|
+
* system-schedule account, claim = the firing Schedule id) so the run
|
|
15
|
+
* reaches the schedule's viewer set through the session#schedule link;
|
|
16
|
+
* open source, under the built-in authorization posture, makes the fire
|
|
17
|
+
* act as the schedule's CREATOR (authorization/schedule-fire-caller.ts),
|
|
18
|
+
* so the run and its session are that person's. The fire then propagates
|
|
19
|
+
* the identity through the R5 caller-propagation header exactly like the
|
|
20
|
+
* other request-origin in-process creates.
|
|
17
21
|
*
|
|
18
22
|
* Single-instance point. The mint is per fire — the schedule id is a
|
|
19
|
-
* claim of the minted credential, never a cached field
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
+
* claim of the minted credential, never a cached field. Two failure
|
|
24
|
+
* shapes, and the RunStarter tells them apart by type, the store-fault
|
|
25
|
+
* precedent (`ResourceNotFoundError` is checked with `instanceof`; every
|
|
26
|
+
* other fault is infrastructure):
|
|
27
|
+
*
|
|
28
|
+
* - any other thrown error is an INFRASTRUCTURE fault: the RunStarter
|
|
29
|
+
* lets it propagate, so the tick activity retries (the deterministic
|
|
30
|
+
* execution name absorbs the retry) and a manual trigger surfaces
|
|
31
|
+
* the failure to its caller;
|
|
32
|
+
* - `ScheduleFireCallerRefusedError` is a DETERMINISTIC refusal — this
|
|
33
|
+
* fire can act as nobody, and no retry will change that (a schedule
|
|
34
|
+
* stamped by no person this server knows). The RunStarter answers
|
|
35
|
+
* the `refused` outcome the way it answers a launch gate's refusal:
|
|
36
|
+
* the failure streak counts it and pauses the schedule with the
|
|
37
|
+
* reason, so the person who scheduled it sees why in the console
|
|
38
|
+
* instead of a tick failing quietly forever.
|
|
23
39
|
*/
|
|
24
40
|
import type { CallerIdentity } from "./identity.js";
|
|
25
41
|
export interface ScheduleFireCallerMint {
|
|
26
42
|
/**
|
|
27
43
|
* Mints the caller identity one fire acts as. `rawToken` must carry the
|
|
28
|
-
* edition's verifiable credential for the identity
|
|
29
|
-
* fire-scoped claims
|
|
44
|
+
* edition's verifiable credential for the identity when the edition
|
|
45
|
+
* reads fire-scoped claims from it downstream (the cloud does — the
|
|
46
|
+
* schedule id); an edition that propagates the identity in-process and
|
|
47
|
+
* reads nothing off the token leaves it empty (open source does).
|
|
30
48
|
*/
|
|
31
49
|
mintFireCaller(org: string, scheduleId: string): Promise<CallerIdentity>;
|
|
32
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* The mint's deterministic refusal (the module header): thrown by a
|
|
53
|
+
* driver when the fire can act as nobody and retrying cannot help. The
|
|
54
|
+
* message is the reason the schedule's status carries, so it is written
|
|
55
|
+
* for the person who scheduled the run.
|
|
56
|
+
*/
|
|
57
|
+
export declare class ScheduleFireCallerRefusedError extends Error {
|
|
58
|
+
constructor(reason: string);
|
|
59
|
+
}
|
|
33
60
|
//# sourceMappingURL=schedule-fire-caller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule-fire-caller.d.ts","sourceRoot":"","sources":["../../src/extensions/schedule-fire-caller.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"schedule-fire-caller.d.ts","sourceRoot":"","sources":["../../src/extensions/schedule-fire-caller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,WAAW,sBAAsB;IACrC;;;;;;OAMG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAC1E;AAED;;;;;GAKG;AACH,qBAAa,8BAA+B,SAAQ,KAAK;gBAC3C,MAAM,EAAE,MAAM;CAI3B"}
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The mint's deterministic refusal (the module header): thrown by a
|
|
3
|
+
* driver when the fire can act as nobody and retrying cannot help. The
|
|
4
|
+
* message is the reason the schedule's status carries, so it is written
|
|
5
|
+
* for the person who scheduled the run.
|
|
6
|
+
*/
|
|
7
|
+
export class ScheduleFireCallerRefusedError extends Error {
|
|
8
|
+
constructor(reason) {
|
|
9
|
+
super(reason);
|
|
10
|
+
this.name = "ScheduleFireCallerRefusedError";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
2
13
|
//# sourceMappingURL=schedule-fire-caller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule-fire-caller.js","sourceRoot":"","sources":["../../src/extensions/schedule-fire-caller.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"schedule-fire-caller.js","sourceRoot":"","sources":["../../src/extensions/schedule-fire-caller.ts"],"names":[],"mappings":"AAoDA;;;;;GAKG;AACH,MAAM,OAAO,8BAA+B,SAAQ,KAAK;IACvD,YAAY,MAAc;QACxB,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC;IAC/C,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -69,8 +69,18 @@ export type { AuthorizationQueryEngine } from "./extensions/authorization-querie
|
|
|
69
69
|
export type { IdentityFederation } from "./extensions/identity-federation.js";
|
|
70
70
|
export type { AccountsBySubject } from "./domain/identityaccount/resolve.js";
|
|
71
71
|
export { identityIdForSubject } from "./domain/identityaccount/resolve.js";
|
|
72
|
+
export type { DerivedRelation, KindDeclaration, Rewrite, SubjectType, } from "./authorization/model/rewrite.js";
|
|
73
|
+
export type { Model } from "./authorization/model/index.js";
|
|
74
|
+
export { builtInModel, declarationFor, newModel, } from "./authorization/model/index.js";
|
|
75
|
+
export type { CheckContext, ObjectRef, Person, Subject, Tuple, TupleSource, } from "./authorization/tuples.js";
|
|
76
|
+
export type { EvaluationFault } from "./authorization/evaluator.js";
|
|
77
|
+
export { AuthorizationEvaluationError, MAX_RESOLUTION_DEPTH, checkRelation, } from "./authorization/evaluator.js";
|
|
78
|
+
export type { StoreTestCase, StoreTestDocument, StoreTestKit, StoreTestSkip, StoreTestSkipReason, } from "./authorization/store-test-kit.js";
|
|
79
|
+
export { parseStoreTestDocument, storeTestCases, } from "./authorization/store-test-kit.js";
|
|
80
|
+
export { NOT_FOUND_EXEMPT_KINDS } from "./authorization/authorizer.js";
|
|
72
81
|
export type { ListReadScope, ListEntryMeta, } from "./extensions/list-read-scope.js";
|
|
73
82
|
export type { ScheduleFireCallerMint } from "./extensions/schedule-fire-caller.js";
|
|
83
|
+
export { ScheduleFireCallerRefusedError } from "./extensions/schedule-fire-caller.js";
|
|
74
84
|
export type { VisitorErrorPolicy } from "./pipeline/interceptors/error-boundary.js";
|
|
75
85
|
export { createErrorBoundaryInterceptor } from "./pipeline/interceptors/error-boundary.js";
|
|
76
86
|
export { diffVisibilityShapes, visibilityShapesFor, } from "./pipeline/steps/authorization-tuples.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM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M,gDAAgD,CAAC;AACrG,YAAY,EACV,wBAAwB,EAKxB,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EAKxB,qBAAqB,GACtB,MAAM,4CAA4C,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,4BAA4B,CAAC;AAcpC,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EACf,0BAA0B,EAC1B,sBAAsB,EACtB,aAAa,GACd,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAMzD,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kCAAkC,EAAE,MAAM,0BAA0B,CAAC;AAS9E,OAAO,EACL,4BAA4B,EAC5B,eAAe,EACf,gBAAgB,IAAI,sCAAsC,GAC3D,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,iCAAiC,GAClC,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAQrE,YAAY,EACV,cAAc,EACd,2BAA2B,EAC3B,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,0CAA0C,CAAC;AAOlD,YAAY,EACV,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -49,6 +49,14 @@ export { identityAccountStoreContract } from "./domain/identityaccount/store-con
|
|
|
49
49
|
export { DuplicatePolicyError } from "./domain/iampolicy/store.js";
|
|
50
50
|
export { iamPolicyStoreContract } from "./domain/iampolicy/store-contract.js";
|
|
51
51
|
export { identityIdForSubject } from "./domain/identityaccount/resolve.js";
|
|
52
|
+
export { builtInModel, declarationFor, newModel, } from "./authorization/model/index.js";
|
|
53
|
+
export { AuthorizationEvaluationError, MAX_RESOLUTION_DEPTH, checkRelation, } from "./authorization/evaluator.js";
|
|
54
|
+
export { parseStoreTestDocument, storeTestCases, } from "./authorization/store-test-kit.js";
|
|
55
|
+
// The kinds whose missing row the built-in authorizer denies instead of
|
|
56
|
+
// answering not-found — the cloud's probe exemption over the open-source
|
|
57
|
+
// tier; exported so the cloud's drift test pins the two sets equal.
|
|
58
|
+
export { NOT_FOUND_EXEMPT_KINDS } from "./authorization/authorizer.js";
|
|
59
|
+
export { ScheduleFireCallerRefusedError } from "./extensions/schedule-fire-caller.js";
|
|
52
60
|
export { createErrorBoundaryInterceptor } from "./pipeline/interceptors/error-boundary.js";
|
|
53
61
|
export { diffVisibilityShapes, visibilityShapesFor, } from "./pipeline/steps/authorization-tuples.js";
|
|
54
62
|
export { RequestContext } from "./pipeline/request-context.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,wCAAwC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAiEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAQ3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAQ1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAW1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BA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A+B,EAC/B,iCAAiC,GAClC,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AA0BrE,oEAAoE;AACpE,yEAAyE;AACzE,iDAAiD;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -8,9 +8,12 @@
|
|
|
8
8
|
* instances) but never to GRANT anything. Where a grant-shaped decision is
|
|
9
9
|
* needed, key it on server-owned state instead (e.g. the parent blueprint's
|
|
10
10
|
* status.default_instance_id, written only by the create/self-heal flows).
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* Every write boundary runs GuardReservedLabels over the namespace
|
|
12
|
+
* (pipeline/steps/guard-reserved-labels.ts), but the open-source
|
|
13
|
+
* authorizer's permissive default ALLOWS reserved-label writes by design
|
|
14
|
+
* (the self-hosted operator owns the store), which is why a restrict-shaped
|
|
15
|
+
* predicate here still pairs the label with server-owned state: the
|
|
16
|
+
* plugin-managed guard refuses only beside an existing plugin row.
|
|
14
17
|
*/
|
|
15
18
|
import type { ApiResourceMetadata } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
|
|
16
19
|
/**
|
|
@@ -39,6 +42,23 @@ export declare const SYSTEM_MANAGED_LABEL = "stigmer.ai/system-managed";
|
|
|
39
42
|
* read by the predicates here.
|
|
40
43
|
*/
|
|
41
44
|
export declare const RESERVED_LABEL_TRUE = "true";
|
|
45
|
+
/**
|
|
46
|
+
* The plugin that materialised a resource: the label's value is the
|
|
47
|
+
* plugin's id (`plg_...`), never its slug, because `findAllByLabel` is
|
|
48
|
+
* org-agnostic and two organizations may both install `thermos`. Written
|
|
49
|
+
* only by the plugin controller (in-process, as the installing caller);
|
|
50
|
+
* membership is derived on read from it and stored nowhere else.
|
|
51
|
+
*/
|
|
52
|
+
export declare const PLUGIN_LABEL = "stigmer.ai/plugin";
|
|
53
|
+
/**
|
|
54
|
+
* The archive digest a member was last materialised from — the per-child
|
|
55
|
+
* convergence marker. A re-push compares every member's value with the
|
|
56
|
+
* head's digest before deciding it has nothing to do, so a member another
|
|
57
|
+
* lane deleted or an older install left behind is re-materialised.
|
|
58
|
+
*/
|
|
59
|
+
export declare const PLUGIN_VERSION_LABEL = "stigmer.ai/plugin-version";
|
|
60
|
+
/** The plugin id a resource's labels claim, or undefined when unlabelled. */
|
|
61
|
+
export declare function pluginIdOf(metadata: ApiResourceMetadata | undefined): string | undefined;
|
|
42
62
|
/**
|
|
43
63
|
* Whether the metadata carries the DEFAULT_INSTANCE_LABEL marker
|
|
44
64
|
* (undefined-safe) — Go IsDefaultInstance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiresource-labels.d.ts","sourceRoot":"","sources":["../../src/pipeline/apiresource-labels.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"apiresource-labels.d.ts","sourceRoot":"","sources":["../../src/pipeline/apiresource-labels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4DAA4D,CAAC;AAEtG;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,gCAA6C,CAAC;AAEjF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,8BAA2C,CAAC;AAE7E;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,sBAAmC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,8BAA2C,CAAC;AAE7E,6EAA6E;AAC7E,wBAAgB,UAAU,CACxB,QAAQ,EAAE,mBAAmB,GAAG,SAAS,GACxC,MAAM,GAAG,SAAS,CAGpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,mBAAmB,GAAG,SAAS,GACxC,OAAO,CAET"}
|
|
@@ -24,6 +24,26 @@ export const SYSTEM_MANAGED_LABEL = `${RESERVED_LABEL_PREFIX}system-managed`;
|
|
|
24
24
|
* read by the predicates here.
|
|
25
25
|
*/
|
|
26
26
|
export const RESERVED_LABEL_TRUE = "true";
|
|
27
|
+
/**
|
|
28
|
+
* The plugin that materialised a resource: the label's value is the
|
|
29
|
+
* plugin's id (`plg_...`), never its slug, because `findAllByLabel` is
|
|
30
|
+
* org-agnostic and two organizations may both install `thermos`. Written
|
|
31
|
+
* only by the plugin controller (in-process, as the installing caller);
|
|
32
|
+
* membership is derived on read from it and stored nowhere else.
|
|
33
|
+
*/
|
|
34
|
+
export const PLUGIN_LABEL = `${RESERVED_LABEL_PREFIX}plugin`;
|
|
35
|
+
/**
|
|
36
|
+
* The archive digest a member was last materialised from — the per-child
|
|
37
|
+
* convergence marker. A re-push compares every member's value with the
|
|
38
|
+
* head's digest before deciding it has nothing to do, so a member another
|
|
39
|
+
* lane deleted or an older install left behind is re-materialised.
|
|
40
|
+
*/
|
|
41
|
+
export const PLUGIN_VERSION_LABEL = `${RESERVED_LABEL_PREFIX}plugin-version`;
|
|
42
|
+
/** The plugin id a resource's labels claim, or undefined when unlabelled. */
|
|
43
|
+
export function pluginIdOf(metadata) {
|
|
44
|
+
const value = metadata?.labels[PLUGIN_LABEL];
|
|
45
|
+
return value === undefined || value === "" ? undefined : value;
|
|
46
|
+
}
|
|
27
47
|
/**
|
|
28
48
|
* Whether the metadata carries the DEFAULT_INSTANCE_LABEL marker
|
|
29
49
|
* (undefined-safe) — Go IsDefaultInstance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiresource-labels.js","sourceRoot":"","sources":["../../src/pipeline/apiresource-labels.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apiresource-labels.js","sourceRoot":"","sources":["../../src/pipeline/apiresource-labels.ts"],"names":[],"mappings":"AAmBA;;;;;GAKG;AACH,MAAM,C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 -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/pipeline/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEzD,4CAA4C;AAC5C,MAAM,UAAU,aAAa,CAAC,QAAgB,EAAE,EAAU;IACxD,OAAO,IAAI,YAAY,CAAC,GAAG,QAAQ,eAAe,EAAE,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzE,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;AACzD,CAAC;AAED,sDAAsD;AACtD,MAAM,UAAU,kBAAkB,CAAC,QAAgB,EAAE,EAAU;IAC7D,OAAO,IAAI,YAAY,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/pipeline/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEzD,4CAA4C;AAC5C,MAAM,UAAU,aAAa,CAAC,QAAgB,EAAE,EAAU;IACxD,OAAO,IAAI,YAAY,CAAC,GAAG,QAAQ,eAAe,EAAE,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzE,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;AACzD,CAAC;AAED,sDAAsD;AACtD,MAAM,UAAU,kBAAkB,CAAC,QAAgB,EAAE,EAAU;IAC7D,OAAO,IAAI,YAAY,CACrB,GAAG,QAAQ,oBAAoB,EAAE,EAAE,EACnC,IAAI,CAAC,aAAa,CACnB,CAAC;AACJ,C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a,CAAC,EAAE,eAAe;IACrC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,UAAU;IAC3B,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,aAAa;IACjC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,UAAU;IAC3B,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,iBAAiB;CAC1C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,IAAU;IACrC,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAc,EACd,KAAmB;IAEnB,OAAO,IAAI,YAAY,CAAC,GAAG,MAAM,KAAK,eAAe,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;AAC9E,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,KAAmB;IACjD,OAAO,qBAAqB,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,KAAK,CAAC,UAAU,EAAE,CAAC;AACvF,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAmB;IACrD,OAAO,IAAI,YAAY,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
2
|
+
import type { ResolvedParentLink, RowAuthorizationFacts } from "../../extensions/resource-authorization.js";
|
|
3
|
+
/** The row's facts, read structurally; every absence is the empty value, never a throw. */
|
|
4
|
+
export declare function rowAuthorizationFactsOf(kind: ApiResourceKind, resource: object): RowAuthorizationFacts;
|
|
5
|
+
/** `status.audit.spec_audit.created_by.id` as stamped — "" when any link is absent. */
|
|
6
|
+
export declare function createdByOf(resource: object): string;
|
|
7
|
+
/**
|
|
8
|
+
* The scope link and every configured additional parent the row names, in
|
|
9
|
+
* the tuple lifecycle's order. A parent the row does not name is left out.
|
|
10
|
+
*/
|
|
11
|
+
export declare function parentLinksOf(kind: ApiResourceKind, resource: object, org: string): ReadonlyArray<ResolvedParentLink>;
|
|
12
|
+
//# sourceMappingURL=authorization-facts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization-facts.d.ts","sourceRoot":"","sources":["../../../src/pipeline/steps/authorization-facts.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAI3H,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,4CAA4C,CAAC;AAUpD,2FAA2F;AAC3F,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,eAAe,EACrB,QAAQ,EAAE,MAAM,GACf,qBAAqB,CAYvB;AAED,uFAAuF;AACvF,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIpD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,eAAe,EACrB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,GACV,aAAa,CAAC,kBAAkB,CAAC,CAsCnC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The facts a stored row's authorization tuples derive from, read back
|
|
3
|
+
* from the row (`RowAuthorizationFacts`, extensions/resource-authorization.ts)
|
|
4
|
+
* — the read-time twin of the tuple lifecycle's create-time resolution in
|
|
5
|
+
* authorization-tuples.ts, and deliberately not that function: the
|
|
6
|
+
* create-time one throws when a row is missing its organization or its
|
|
7
|
+
* parent (a create must not half-succeed), while a row read back years
|
|
8
|
+
* later is a fact, missing pieces included — an empty organization
|
|
9
|
+
* resolves `admin from organization` to nobody, it does not fault a read.
|
|
10
|
+
* The two cannot drift unnoticed: src/authorization/__tests__/facts.test.ts
|
|
11
|
+
* pins that a well-formed row resolves to the same links through both.
|
|
12
|
+
*
|
|
13
|
+
* Two readers share this one resolver, which is the reason it is a leaf
|
|
14
|
+
* of its own: the list lanes' shared helper (extensions/list-read-scope.ts)
|
|
15
|
+
* builds every candidate's `ListEntryMeta` through it, and the built-in
|
|
16
|
+
* authorizer (src/authorization/facts.ts) derives a loaded row's tuples
|
|
17
|
+
* through it. It imports the two pure leaves it needs (apiresource-meta,
|
|
18
|
+
* shapes) and the protos, and nothing else, so the seam may import it by
|
|
19
|
+
* value without a cycle — the third such leaf, beside those two.
|
|
20
|
+
*
|
|
21
|
+
* Every read is structural (shapes.ts's own premise: protobuf-es messages
|
|
22
|
+
* are plain objects sharing the generated metadata and audit types), so
|
|
23
|
+
* the resolver needs no schema — a list lane holds decoded rows of a kind
|
|
24
|
+
* it names, not their descriptors.
|
|
25
|
+
*/
|
|
26
|
+
import { AuthorizationScopeType } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/authorization_config_pb";
|
|
27
|
+
import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
|
|
28
|
+
import { getKindEnum, getKindMeta } from "../apiresource-meta.js";
|
|
29
|
+
import { parentIdOf } from "./shapes.js";
|
|
30
|
+
/** The row's facts, read structurally; every absence is the empty value, never a throw. */
|
|
31
|
+
export function rowAuthorizationFactsOf(kind, resource) {
|
|
32
|
+
const metadata = resource.metadata;
|
|
33
|
+
const org = metadata?.org ?? "";
|
|
34
|
+
return {
|
|
35
|
+
id: metadata?.id ?? "",
|
|
36
|
+
org,
|
|
37
|
+
visibility: metadata?.visibility ??
|
|
38
|
+
ApiResourceVisibility.api_resource_visibility_unspecified,
|
|
39
|
+
createdBy: createdByOf(resource),
|
|
40
|
+
parentLinks: parentLinksOf(kind, resource, org),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** `status.audit.spec_audit.created_by.id` as stamped — "" when any link is absent. */
|
|
44
|
+
export function createdByOf(resource) {
|
|
45
|
+
return (resource.status?.audit?.specAudit?.createdBy?.id ?? "");
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The scope link and every configured additional parent the row names, in
|
|
49
|
+
* the tuple lifecycle's order. A parent the row does not name is left out.
|
|
50
|
+
*/
|
|
51
|
+
export function parentLinksOf(kind, resource, org) {
|
|
52
|
+
const config = getKindMeta(kind).authorization;
|
|
53
|
+
if (config === undefined) {
|
|
54
|
+
return [];
|
|
55
|
+
}
|
|
56
|
+
const links = [];
|
|
57
|
+
switch (config.scopeType) {
|
|
58
|
+
case AuthorizationScopeType.ORGANIZATION:
|
|
59
|
+
if (org !== "") {
|
|
60
|
+
links.push({
|
|
61
|
+
relation: "organization",
|
|
62
|
+
parentKind: getKindEnum("organization"),
|
|
63
|
+
parentId: org,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
break;
|
|
67
|
+
case AuthorizationScopeType.PARENT:
|
|
68
|
+
if (config.parent !== undefined) {
|
|
69
|
+
pushLink(links, resource, config.parent);
|
|
70
|
+
}
|
|
71
|
+
break;
|
|
72
|
+
case AuthorizationScopeType.OWNER_ONLY:
|
|
73
|
+
case AuthorizationScopeType.PLATFORM:
|
|
74
|
+
case AuthorizationScopeType.NONE:
|
|
75
|
+
case AuthorizationScopeType.UNSPECIFIED:
|
|
76
|
+
// No scope link: OWNER_ONLY by design; PLATFORM is dead config in
|
|
77
|
+
// both editions (the lifecycle warns and writes none); NONE and
|
|
78
|
+
// UNSPECIFIED are kinds outside the model.
|
|
79
|
+
break;
|
|
80
|
+
default: {
|
|
81
|
+
const exhaustive = config.scopeType;
|
|
82
|
+
throw new Error(`unknown scope type: ${String(exhaustive)}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
for (const parent of config.additionalParents) {
|
|
86
|
+
pushLink(links, resource, parent);
|
|
87
|
+
}
|
|
88
|
+
return links;
|
|
89
|
+
}
|
|
90
|
+
function pushLink(links, resource, parent) {
|
|
91
|
+
const parentId = parentIdOf(resource, parent.specField);
|
|
92
|
+
if (parentId !== "") {
|
|
93
|
+
links.push({
|
|
94
|
+
relation: parent.relation,
|
|
95
|
+
parentKind: getKindEnum(parent.kind),
|
|
96
|
+
parentId,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=authorization-facts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization-facts.js","sourceRoot":"","sources":["../../../src/pipeline/steps/authorization-facts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,wFAAwF,CAAC;AAGhI,OAAO,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAO/F,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAQzC,2FAA2F;AAC3F,MAAM,UAAU,uBAAuB,CACrC,IAAqB,EACrB,QAAgB;IAEhB,MAAM,QAAQ,GAAI,QAA6B,CAAC,QAAQ,CAAC;IACzD,MAAM,GAAG,GAAG,QAAQ,EAAE,GAAG,IAAI,EAAE,CAAC;IAChC,OAAO;QACL,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE;QACtB,GAAG;QACH,UAAU,EACR,QAAQ,EAAE,UAAU;YACpB,qBAAqB,CAAC,mCAAmC;QAC3D,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC;QAChC,WAAW,EAAE,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC;KAChD,CAAC;AACJ,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,WAAW,CAAC,QAAgB;IAC1C,OAAO,CACJ,QAA0B,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,CAC1E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EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,QAAQ,CACf,KAA2B,EAC3B,QAAgB,EAChB,MAA4B;IAE5B,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IACxD,IAAI,QAAQ,KAAK,EAAE,EAAE,CAAC;QACpB,KAAK,CAAC,IAAI,CAAC;YACT,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC;YACpC,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/pipeline/steps/delete.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,oBAAoB,CAAC;AAGpE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/pipeline/steps/delete.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,oBAAoB,CAAC;AAGpE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAOtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD,2DAA2D;AAC3D,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C,wBAAgB,wBAAwB,CACtC,IAAI,SAAS,WAAW,KACrB,YAAY,CAAC,IAAI,CAAC,CAWtB;AAED,wBAAgB,4BAA4B,CAC1C,SAAS,SAAS,WAAW,EAC7B,YAAY,SAAS,WAAW,EAChC,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,YAAY,GAAG,YAAY,CAAC,SAAS,CAAC,CAuBrE;AAED,wBAAgB,qBAAqB,CAAC,IAAI,SAAS,WAAW,EAC5D,KAAK,EAAE,KAAK,GACX,YAAY,CAAC,IAAI,CAAC,CAepB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResourceNotFoundError } from "../../store/interface.js";
|
|
2
2
|
import { getKindName } from "../apiresource-meta.js";
|
|
3
|
-
import { internalError, invalidArgumentError, notFoundError } from "../errors.js";
|
|
3
|
+
import { internalError, invalidArgumentError, notFoundError, } from "../errors.js";
|
|
4
4
|
import { EXISTING_RESOURCE_KEY } from "./load-existing.js";
|
|
5
5
|
import { idValueOf } from "./shapes.js";
|
|
6
6
|
/** Context key for the extracted id (Go ResourceIdKey). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/pipeline/steps/delete.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/pipeline/steps/delete.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,aAAa,GACd,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,2DAA2D;AAC3D,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC;AAE5C,MAAM,UAAU,wBAAwB;IAGtC,OAAO;QACL,IAAI,EAAE,mBAAmB;QACzB,OAAO,CAAC,GAAyB;YAC/B,MAAM,EAAE,GAAG,SAAS,C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B,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CACvD,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CACxB,GAAyB;IAEzB,MAAM,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACpC,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACxC,MAAM,aAAa,CACjB,IAAI,KAAK,CACP,qEAAqE,CACtE,EACD,0BAA0B,CAC3B,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duplicate.d.ts","sourceRoot":"","sources":["../../../src/pipeline/steps/duplicate.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAGtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD,wBAAgB,qBAAqB,CAAC,IAAI,SAAS,WAAW,EAC5D,KAAK,EAAE,KAAK,GACX,YAAY,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"duplicate.d.ts","sourceRoot":"","sources":["../../../src/pipeline/steps/duplicate.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAGtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD,wBAAgB,qBAAqB,CAAC,IAAI,SAAS,WAAW,EAC5D,KAAK,EAAE,KAAK,GACX,YAAY,CAAC,IAAI,CAAC,CAyCpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duplicate.js","sourceRoot":"","sources":["../../../src/pipeline/steps/duplicate.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,UAAU,qBAAqB,CACnC,KAAY;IAEZ,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,KAAK,CAAC,OAAO,CAAC,GAAyB;YACrC,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAC1C,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC3B,kEAAkE;gBAClE,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"duplicate.js","sourceRoot":"","sources":["../../../src/pipeline/steps/duplicate.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,UAAU,qBAAqB,CACnC,KAAY;IAEZ,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,KAAK,CAAC,OAAO,CAAC,GAAyB;YACrC,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAC1C,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC3B,kEAAkE;gBAClE,MAAM,aAAa,CACjB,IAAI,KAAK,CAAC,0BAA0B,CAAC,EACrC,iBAAiB,CAClB,CAAC;YACJ,CAAC;YACD,IAAI,QAAQ,CAAC,IAAI,KAAK,EAAE,EAAE,CAAC;gBACzB,MAAM,aAAa,CACjB,IAAI,KAAK,CAAC,wBAAwB,CAAC,EACnC,iBAAiB,CAClB,CAAC;YACJ,CAAC;YAED,IAAI,QAAQ,CAAC;YACb,IAAI,CAAC;gBACH,QAAQ,GAAG,MAAM,kBAAkB,CACjC,KAAK,EACL,GAAG,CAAC,eAAe,EACnB,GAAG,CAAC,MAAM,EACV,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,GAAG,CACb,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,aAAa,CAAC,KAAK,EAAE,gCAAgC,CAAC,CAAC;YAC/D,CAAC;YAED,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC3B,MAAM,gBAAgB,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;gBAC9C,MAAM,kBAAkB,CACtB,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC,EAChC,SAAS,QAAQ,CAAC,IAAI,aAAa,gBAAgB,EAAE,GAAG,IAAI,EAAE,UAAU,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,CACtG,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DescMessage } from "@bufbuild/protobuf";
|
|
2
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
3
|
+
import type { PipelineStep } from "../pipeline.js";
|
|
4
|
+
import type { Store } from "../../store/interface.js";
|
|
5
|
+
/** The one sentence a refused mutation carries; the CLI and console render it as is. */
|
|
6
|
+
export declare function pluginManagedRefusal(kind: ApiResourceKind, slug: string, pluginSlug: string): string;
|
|
7
|
+
export interface GuardPluginManagedPositions {
|
|
8
|
+
/** The context key the stored resource rides; defaults to EXISTING_RESOURCE_KEY. */
|
|
9
|
+
readonly existingKey?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function newGuardPluginManagedStep<Desc extends DescMessage>(store: Store, positions?: GuardPluginManagedPositions): PipelineStep<Desc>;
|
|
12
|
+
//# sourceMappingURL=guard-plugin-managed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guard-plugin-managed.d.ts","sourceRoot":"","sources":["../../../src/pipeline/steps/guard-plugin-managed.ts"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,WAAW,EAAW,MAAM,oBAAoB,CAAC;AAG/D,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAItH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAYtD,wFAAwF;AACxF,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,eAAe,EACrB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,GACjB,MAAM,CAOR;AAED,MAAM,WAAW,2BAA2B;IAC1C,oFAAoF;IACpF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,yBAAyB,CAAC,IAAI,SAAS,WAAW,EAChE,KAAK,EAAE,KAAK,EACZ,SAAS,GAAE,2BAAgC,GAC1C,YAAY,CAAC,IAAI,CAAC,CAkDpB"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GuardPluginManaged — the write boundary for resources a plugin
|
|
3
|
+
* materialised. A plugin's skills, MCP servers, agent and workflows are
|
|
4
|
+
* ordinary resources in the organization, labelled `stigmer.ai/plugin:
|
|
5
|
+
* <plugin id>` by the controller that installed them; the plugin owns
|
|
6
|
+
* their definition, so a client edit would be silently overwritten by the
|
|
7
|
+
* next upgrade and a client delete would leave the plugin claiming a
|
|
8
|
+
* member it no longer has. Customisation is composition: the user writes
|
|
9
|
+
* their own agent over the plugin's skills and servers, which stay readable
|
|
10
|
+
* and usable by everyone the visibility admits.
|
|
11
|
+
*
|
|
12
|
+
* Two facts decide, together (the apiresource-labels.ts doctrine: a label
|
|
13
|
+
* restricts only beside server-owned state):
|
|
14
|
+
* - the STORED resource carries the plugin label — the request's labels
|
|
15
|
+
* are never consulted, so a client cannot detach a child by omitting
|
|
16
|
+
* the label on an update;
|
|
17
|
+
* - AND the plugin row it names exists. A label whose plugin is gone (a
|
|
18
|
+
* cascade that failed part-way; a label a self-hosted operator stamped
|
|
19
|
+
* by hand under the permissive authorizer) leaves the resource editable
|
|
20
|
+
* and deletable, so nothing can be locked forever.
|
|
21
|
+
*
|
|
22
|
+
* Server-composed writes pass by structure: the plugin controller is the
|
|
23
|
+
* one writer of these resources and rides the in-process lane as the
|
|
24
|
+
* installing caller (`origin: "in-process"`), exactly the arm
|
|
25
|
+
* GuardReservedLabels passes. Operational RPCs (connect, OAuth flows,
|
|
26
|
+
* instances, sessions, executions) never splice this step: they read or
|
|
27
|
+
* enrich a server, they do not redefine it.
|
|
28
|
+
*
|
|
29
|
+
* Placement: after the chain's load of the stored resource (LoadExisting,
|
|
30
|
+
* LoadExistingForDelete, a kind's visibility loader, skill push's
|
|
31
|
+
* FindExistingBySlug), before any state is built or persisted. The
|
|
32
|
+
* refusal is FAILED_PRECONDITION with the plugin named, so the user knows
|
|
33
|
+
* which door to use instead.
|
|
34
|
+
*
|
|
35
|
+
* Proven by __tests__/guard-plugin-managed.test.ts and the plugin
|
|
36
|
+
* conformance suite's managed-child arms.
|
|
37
|
+
*/
|
|
38
|
+
import { Code, ConnectError } from "@connectrpc/connect";
|
|
39
|
+
import { PluginSchema } from "@stigmer/protos/ai/stigmer/agentic/plugin/v1/api_pb";
|
|
40
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
41
|
+
import { pluginIdOf } from "../apiresource-labels.js";
|
|
42
|
+
import { internalError } from "../errors.js";
|
|
43
|
+
import { ResourceNotFoundError } from "../../store/interface.js";
|
|
44
|
+
import { EXISTING_RESOURCE_KEY } from "./load-existing.js";
|
|
45
|
+
import { metadataOf } from "./shapes.js";
|
|
46
|
+
/** The kinds a plugin materialises; the noun opens the refusal sentence. */
|
|
47
|
+
const MANAGED_KIND_NOUNS = new Map([
|
|
48
|
+
[ApiResourceKind.skill, "skill"],
|
|
49
|
+
[ApiResourceKind.mcp_server, "MCP server"],
|
|
50
|
+
[ApiResourceKind.agent, "agent"],
|
|
51
|
+
[ApiResourceKind.workflow, "workflow"],
|
|
52
|
+
]);
|
|
53
|
+
/** The one sentence a refused mutation carries; the CLI and console render it as is. */
|
|
54
|
+
export function pluginManagedRefusal(kind, slug, pluginSlug) {
|
|
55
|
+
const noun = MANAGED_KIND_NOUNS.get(kind) ?? ApiResourceKind[kind] ?? String(kind);
|
|
56
|
+
return (`${noun} '${slug}' is managed by plugin '${pluginSlug}'; change the plugin and ` +
|
|
57
|
+
"push it again, or compose your own agent over it");
|
|
58
|
+
}
|
|
59
|
+
export function newGuardPluginManagedStep(store, positions = {}) {
|
|
60
|
+
const existingKey = positions.existingKey ?? EXISTING_RESOURCE_KEY;
|
|
61
|
+
return {
|
|
62
|
+
name: "GuardPluginManaged",
|
|
63
|
+
async execute(ctx) {
|
|
64
|
+
if (ctx.callerIdentity.callerClass === "internal" ||
|
|
65
|
+
ctx.callerIdentity.origin === "in-process") {
|
|
66
|
+
// The plugin controller's own materialisation, upgrade and cascade
|
|
67
|
+
// writes; the same structural pass GuardReservedLabels takes.
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const existing = ctx.get(existingKey);
|
|
71
|
+
if (existing === undefined) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const metadata = metadataOf(existing);
|
|
75
|
+
const pluginId = pluginIdOf(metadata);
|
|
76
|
+
if (pluginId === undefined) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
let pluginSlug;
|
|
80
|
+
try {
|
|
81
|
+
const plugin = await store.getResource(ApiResourceKind.plugin, pluginId, PluginSchema);
|
|
82
|
+
pluginSlug = plugin.metadata?.slug ?? pluginId;
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
if (error instanceof ResourceNotFoundError) {
|
|
86
|
+
// A dangling label locks nothing: the plugin that would own this
|
|
87
|
+
// resource is gone, so the resource is the user's again.
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
throw internalError(error, "plugin ownership could not be checked");
|
|
91
|
+
}
|
|
92
|
+
throw new ConnectError(pluginManagedRefusal(ctx.apiResourceKind, metadata?.slug ?? "", pluginSlug), Code.FailedPrecondition);
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=guard-plugin-managed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guard-plugin-managed.js","sourceRoot":"","sources":["../../../src/pipeline/steps/guard-plugin-managed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,4EAA4E;AAC5E,MAAM,kBAAkB,GAAyC,IAAI,GAAG,CAAC;IACvE,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC;IAChC,CAAC,eAAe,CAAC,UAAU,EAAE,YAAY,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