@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
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The OpenFGA store-test kit — runs a `.fga.yaml` store test (the format
|
|
3
|
+
* `fga model test` reads: fixture tuples, then named tests with `check`
|
|
4
|
+
* and `list_objects` assertions) against the built-in evaluator, so the
|
|
5
|
+
* cloud's own model tests — written by the model's authors and run
|
|
6
|
+
* against real OpenFGA in the cloud's CI — are the proof that this
|
|
7
|
+
* evaluator answers the same model the same way. Open source runs the
|
|
8
|
+
* kit over pinned copies of those documents (authorization/__tests__/
|
|
9
|
+
* fixtures/fga/); the cloud runs it over the LIVE documents at the
|
|
10
|
+
* re-pin, which is what makes the copies safe to hold.
|
|
11
|
+
*
|
|
12
|
+
* Shape: the port-contract kits' (store/port-contract.ts) — vitest-free,
|
|
13
|
+
* node:assert, cases the consumer's framework iterates — because a
|
|
14
|
+
* composition consumes it through the published barrel and vitest is a
|
|
15
|
+
* devDependency that must not enter the barrel's runtime graph.
|
|
16
|
+
*
|
|
17
|
+
* What is run and what is reported. One case per named test; a case
|
|
18
|
+
* asserts every `check` in the test whose object's kind the model
|
|
19
|
+
* declares, relation by relation, and FAILS on the first disagreement
|
|
20
|
+
* (the message names the check in the document's own words). Assertions
|
|
21
|
+
* the kit does not run are returned as `skipped`, each with its reason,
|
|
22
|
+
* so a consumer pins the list and a document that gains a scenario, or a
|
|
23
|
+
* declaration that lands, is a visible diff and never a quietly smaller
|
|
24
|
+
* proof. Three reasons: a check whose TARGET kind the model does not
|
|
25
|
+
* declare (`undeclared-kind`) and every `list_objects` assertion
|
|
26
|
+
* (`list-objects`, the list scope's proof) are known when the kit is
|
|
27
|
+
* built; the third is known only from the walk. A document may grant
|
|
28
|
+
* through a type the model does not declare — the cloud's platform
|
|
29
|
+
* tenancy reaches people through `identity_provider:<idp>#platform_user`,
|
|
30
|
+
* a kind this edition does not serve — and OpenFGA answers `true` where
|
|
31
|
+
* a model without that type resolves the userset to nobody. The kit runs
|
|
32
|
+
* every assertion over a recording view of the document's tuples, and an
|
|
33
|
+
* assertion whose walk READ a tuple naming an undeclared type is
|
|
34
|
+
* reported as `undeclared-subject-type` (the types named) instead of
|
|
35
|
+
* being asserted, whatever it would have answered: decided from the
|
|
36
|
+
* model and the data, per assertion, so the sibling arms of the same
|
|
37
|
+
* check block still run and a union that is settled before it reaches
|
|
38
|
+
* such a tuple runs too. Over a model that declares every type in the
|
|
39
|
+
* file (the cloud's drift test, built from the live model) nothing is
|
|
40
|
+
* recorded and everything runs — the same kit, no edition branch.
|
|
41
|
+
* `skipped` is therefore complete once every case has run; a consumer
|
|
42
|
+
* pins it after the cases, which is the order a test file declares them.
|
|
43
|
+
*
|
|
44
|
+
* Context. A check's `context.allow` is the `allow_public` parameter
|
|
45
|
+
* (tuples.ts). A check without a context runs with `allow: false`, the
|
|
46
|
+
* listing posture: OpenFGA itself would fault on a conditional tuple it
|
|
47
|
+
* reached with the parameter missing, so the cloud's documents never do
|
|
48
|
+
* that — their CI would already fail — and the choice cannot change an
|
|
49
|
+
* answer the oracle gives. The parser is strict on purpose: an unknown
|
|
50
|
+
* key anywhere is a thrown fault, so a change to the format upstream is
|
|
51
|
+
* loud here rather than half-run.
|
|
52
|
+
*/
|
|
53
|
+
import assert from "node:assert/strict";
|
|
54
|
+
import { checkRelation } from "./evaluator.js";
|
|
55
|
+
import { ACCOUNT_TYPE, newInMemoryTupleSource, parseObjectRef, parseSubject, } from "./tuples.js";
|
|
56
|
+
/**
|
|
57
|
+
* Parses a loaded YAML value into a document, refusing anything the
|
|
58
|
+
* format the cloud's files use does not carry (`sourceName` names the
|
|
59
|
+
* file in every message).
|
|
60
|
+
*/
|
|
61
|
+
export function parseStoreTestDocument(value, sourceName) {
|
|
62
|
+
const root = record(value, sourceName, [
|
|
63
|
+
"name",
|
|
64
|
+
"model_file",
|
|
65
|
+
"tuples",
|
|
66
|
+
"tests",
|
|
67
|
+
]);
|
|
68
|
+
return {
|
|
69
|
+
name: text(root["name"], `${sourceName}: name`),
|
|
70
|
+
tuples: list(root["tuples"], `${sourceName}: tuples`).map((entry, index) => parseTuple(entry, `${sourceName}: tuples[${index}]`)),
|
|
71
|
+
tests: list(root["tests"], `${sourceName}: tests`).map((entry, index) => parseTest(entry, `${sourceName}: tests[${index}]`)),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function parseTuple(value, where) {
|
|
75
|
+
const entry = record(value, where, [
|
|
76
|
+
"user",
|
|
77
|
+
"relation",
|
|
78
|
+
"object",
|
|
79
|
+
"condition",
|
|
80
|
+
]);
|
|
81
|
+
const tuple = {
|
|
82
|
+
user: text(entry["user"], `${where}.user`),
|
|
83
|
+
relation: text(entry["relation"], `${where}.relation`),
|
|
84
|
+
object: text(entry["object"], `${where}.object`),
|
|
85
|
+
};
|
|
86
|
+
if (entry["condition"] === undefined) {
|
|
87
|
+
return tuple;
|
|
88
|
+
}
|
|
89
|
+
const condition = record(entry["condition"], `${where}.condition`, [
|
|
90
|
+
"name",
|
|
91
|
+
"context",
|
|
92
|
+
]);
|
|
93
|
+
return {
|
|
94
|
+
...tuple,
|
|
95
|
+
condition: { name: text(condition["name"], `${where}.condition.name`) },
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function parseTest(value, where) {
|
|
99
|
+
const entry = record(value, where, ["name", "check", "list_objects"]);
|
|
100
|
+
return {
|
|
101
|
+
name: text(entry["name"], `${where}.name`),
|
|
102
|
+
check: optionalList(entry["check"], `${where}.check`).map((item, index) => parseCheck(item, `${where}.check[${index}]`)),
|
|
103
|
+
list_objects: optionalList(entry["list_objects"], `${where}.list_objects`).map((item, index) => parseListObjects(item, `${where}.list_objects[${index}]`)),
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function parseCheck(value, where) {
|
|
107
|
+
const entry = record(value, where, [
|
|
108
|
+
"user",
|
|
109
|
+
"object",
|
|
110
|
+
"context",
|
|
111
|
+
"assertions",
|
|
112
|
+
]);
|
|
113
|
+
const assertions = record(entry["assertions"], `${where}.assertions`);
|
|
114
|
+
const parsed = {};
|
|
115
|
+
for (const [relation, expected] of Object.entries(assertions)) {
|
|
116
|
+
if (typeof expected !== "boolean") {
|
|
117
|
+
throw new Error(`${where}.assertions.${relation}: expected a boolean`);
|
|
118
|
+
}
|
|
119
|
+
parsed[relation] = expected;
|
|
120
|
+
}
|
|
121
|
+
const context = parseContext(entry["context"], `${where}.context`);
|
|
122
|
+
return {
|
|
123
|
+
user: text(entry["user"], `${where}.user`),
|
|
124
|
+
object: text(entry["object"], `${where}.object`),
|
|
125
|
+
...(context === undefined ? {} : { context }),
|
|
126
|
+
assertions: parsed,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function parseListObjects(value, where) {
|
|
130
|
+
const entry = record(value, where, ["user", "type", "context", "assertions"]);
|
|
131
|
+
const assertions = record(entry["assertions"], `${where}.assertions`);
|
|
132
|
+
const parsed = {};
|
|
133
|
+
for (const [relation, expected] of Object.entries(assertions)) {
|
|
134
|
+
parsed[relation] = list(expected, `${where}.assertions.${relation}`).map((item, index) => text(item, `${where}.assertions.${relation}[${index}]`));
|
|
135
|
+
}
|
|
136
|
+
const context = parseContext(entry["context"], `${where}.context`);
|
|
137
|
+
return {
|
|
138
|
+
user: text(entry["user"], `${where}.user`),
|
|
139
|
+
type: text(entry["type"], `${where}.type`),
|
|
140
|
+
...(context === undefined ? {} : { context }),
|
|
141
|
+
assertions: parsed,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function parseContext(value, where) {
|
|
145
|
+
if (value === undefined) {
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
const entry = record(value, where, ["allow"]);
|
|
149
|
+
if (typeof entry["allow"] !== "boolean") {
|
|
150
|
+
throw new Error(`${where}.allow: expected a boolean`);
|
|
151
|
+
}
|
|
152
|
+
return { allow: entry["allow"] };
|
|
153
|
+
}
|
|
154
|
+
function record(value, where, allowedKeys) {
|
|
155
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
156
|
+
throw new Error(`${where}: expected a mapping`);
|
|
157
|
+
}
|
|
158
|
+
const entry = value;
|
|
159
|
+
if (allowedKeys !== undefined) {
|
|
160
|
+
for (const key of Object.keys(entry)) {
|
|
161
|
+
if (!allowedKeys.includes(key)) {
|
|
162
|
+
throw new Error(`${where}: unknown key '${key}'`);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return entry;
|
|
167
|
+
}
|
|
168
|
+
function list(value, where) {
|
|
169
|
+
if (!Array.isArray(value)) {
|
|
170
|
+
throw new Error(`${where}: expected a list`);
|
|
171
|
+
}
|
|
172
|
+
return value;
|
|
173
|
+
}
|
|
174
|
+
function optionalList(value, where) {
|
|
175
|
+
return value === undefined ? [] : list(value, where);
|
|
176
|
+
}
|
|
177
|
+
function text(value, where) {
|
|
178
|
+
if (typeof value !== "string") {
|
|
179
|
+
throw new Error(`${where}: expected a string`);
|
|
180
|
+
}
|
|
181
|
+
return value;
|
|
182
|
+
}
|
|
183
|
+
/** The listing posture, for a check the document leaves without a context (the module header). */
|
|
184
|
+
const CONTEXT_WHEN_ABSENT = { allow: false };
|
|
185
|
+
/**
|
|
186
|
+
* The document's tests as runnable cases over `model`, plus every
|
|
187
|
+
* assertion group the kit does not run.
|
|
188
|
+
*/
|
|
189
|
+
export function storeTestCases(document, model) {
|
|
190
|
+
const source = newInMemoryTupleSource(document.tuples.map(tupleOf));
|
|
191
|
+
const skipped = [];
|
|
192
|
+
const cases = [];
|
|
193
|
+
for (const test of document.tests) {
|
|
194
|
+
const runnable = [];
|
|
195
|
+
for (const item of test.check) {
|
|
196
|
+
const object = parseObjectRef(item.object);
|
|
197
|
+
if (model.byType(object.type) === undefined) {
|
|
198
|
+
skipped.push({
|
|
199
|
+
document: document.name,
|
|
200
|
+
test: test.name,
|
|
201
|
+
subject: item.user,
|
|
202
|
+
object: item.object,
|
|
203
|
+
reason: "undeclared-kind",
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
runnable.push(item);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
for (const item of test.list_objects) {
|
|
211
|
+
skipped.push({
|
|
212
|
+
document: document.name,
|
|
213
|
+
test: test.name,
|
|
214
|
+
subject: item.user,
|
|
215
|
+
object: `<${item.type}>`,
|
|
216
|
+
reason: "list-objects",
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
if (runnable.length === 0) {
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
cases.push({
|
|
223
|
+
name: `${document.name} :: ${test.name}`,
|
|
224
|
+
async run() {
|
|
225
|
+
for (const item of runnable) {
|
|
226
|
+
const object = parseObjectRef(item.object);
|
|
227
|
+
const person = personOf(item.user);
|
|
228
|
+
const context = item.context ?? CONTEXT_WHEN_ABSENT;
|
|
229
|
+
for (const [relation, expected] of Object.entries(item.assertions)) {
|
|
230
|
+
const recording = recordUndeclaredTypes(source, model);
|
|
231
|
+
const actual = await checkRelation({ model, source: recording }, object, relation, person, context);
|
|
232
|
+
if (recording.reached.size > 0) {
|
|
233
|
+
skipped.push({
|
|
234
|
+
document: document.name,
|
|
235
|
+
test: test.name,
|
|
236
|
+
subject: item.user,
|
|
237
|
+
object: item.object,
|
|
238
|
+
relation,
|
|
239
|
+
reason: "undeclared-subject-type",
|
|
240
|
+
types: [...recording.reached].sort(),
|
|
241
|
+
});
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
assert.equal(actual, expected, `${document.name} :: ${test.name}: ${item.user} ${relation} ${item.object} (allow: ${String(context.allow)}) expected ${String(expected)}, got ${String(actual)}`);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
return { cases, skipped };
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* A view of `inner` that records, for one walk, every subject type the
|
|
254
|
+
* evaluator read that `model` does not declare. A person
|
|
255
|
+
* (`identity_account:<id>`, the wildcard) is a subject the evaluator
|
|
256
|
+
* compares, never a type it resolves, so it is not a "reach" whatever
|
|
257
|
+
* the model declares; a userset or a parent object of an undeclared
|
|
258
|
+
* type is.
|
|
259
|
+
*/
|
|
260
|
+
function recordUndeclaredTypes(inner, model) {
|
|
261
|
+
const reached = new Set();
|
|
262
|
+
return {
|
|
263
|
+
reached,
|
|
264
|
+
async tuplesOf(object, relation) {
|
|
265
|
+
const tuples = await inner.tuplesOf(object, relation);
|
|
266
|
+
for (const tuple of tuples) {
|
|
267
|
+
const type = resolvedTypeOf(tuple.subject);
|
|
268
|
+
if (type !== undefined && model.byType(type) === undefined) {
|
|
269
|
+
reached.add(type);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return tuples;
|
|
273
|
+
},
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
/** The type the evaluator would resolve a subject on, or undefined for a person. */
|
|
277
|
+
function resolvedTypeOf(subject) {
|
|
278
|
+
switch (subject.form) {
|
|
279
|
+
case "object":
|
|
280
|
+
return subject.object.type === ACCOUNT_TYPE
|
|
281
|
+
? undefined
|
|
282
|
+
: subject.object.type;
|
|
283
|
+
case "userset":
|
|
284
|
+
return subject.object.type;
|
|
285
|
+
case "wildcard":
|
|
286
|
+
return undefined;
|
|
287
|
+
default: {
|
|
288
|
+
const exhaustive = subject;
|
|
289
|
+
throw new Error(`unknown subject form: ${JSON.stringify(exhaustive)}`);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function tupleOf(entry) {
|
|
294
|
+
const subject = parseSubject(entry.user);
|
|
295
|
+
return {
|
|
296
|
+
object: parseObjectRef(entry.object),
|
|
297
|
+
relation: entry.relation,
|
|
298
|
+
subject: subject.form === "wildcard" && entry.condition !== undefined
|
|
299
|
+
? { ...subject, condition: entry.condition.name }
|
|
300
|
+
: subject,
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
/** The document's users are plain accounts; a user of another type is a format the kit does not run. */
|
|
304
|
+
function personOf(user) {
|
|
305
|
+
const object = parseObjectRef(user);
|
|
306
|
+
if (object.type !== ACCOUNT_TYPE || object.id === "*") {
|
|
307
|
+
throw new Error(`store test users are accounts; got '${user}'`);
|
|
308
|
+
}
|
|
309
|
+
return { accountId: object.id, aliases: new Set([object.id]) };
|
|
310
|
+
}
|
|
311
|
+
//# sourceMappingURL=store-test-kit.js.map
|
|
@@ -0,0 +1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,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tuple vocabulary of the built-in authorizer — the OpenFGA notions
|
|
3
|
+
* the cloud's model is written in (object, relation, subject; a subject
|
|
4
|
+
* being an object, a userset `type:id#relation`, or the public wildcard
|
|
5
|
+
* `type:*` under a condition), typed once so the evaluator, the
|
|
6
|
+
* derivation and the store-test kit speak one language. Nothing here is
|
|
7
|
+
* stored: open source derives every tuple from a row (derived-tuples.ts)
|
|
8
|
+
* or reads it from an IamPolicy row, and this module only names what a
|
|
9
|
+
* tuple IS.
|
|
10
|
+
*
|
|
11
|
+
* `Person` is the caller as the evaluator sees them: the account id the
|
|
12
|
+
* IamPolicy rows name, and every string a creator stamp may carry for the
|
|
13
|
+
* same human — the account id and the account's issuer subject (rows the
|
|
14
|
+
* 3.14.x verifiers stamped with the raw `sub`). A tuple naming
|
|
15
|
+
* `identity_account:<x>` matches the person when `x` is one of the
|
|
16
|
+
* aliases; rows are read by the account id alone, because every row open
|
|
17
|
+
* source writes names an account (domain/iampolicy/role-lifecycle.ts).
|
|
18
|
+
* The type is named here; the construction (`personFor`, `resolvePerson`)
|
|
19
|
+
* is person.ts's, so this module stays vocabulary with no I/O.
|
|
20
|
+
*
|
|
21
|
+
* `CheckContext` is the FGA condition context. The one condition the
|
|
22
|
+
* model declares is `allow_public(allow: bool)` on the public wildcard,
|
|
23
|
+
* and the cloud's own posture (stigmer-cloud authorizer/fga-authorizer.ts,
|
|
24
|
+
* the Java BuildCheckRequest) is `allow: true` on a point check — a public
|
|
25
|
+
* resource reads for any authenticated caller — and `allow: false` in a
|
|
26
|
+
* listing, which keeps a public wildcard from flooding an organization's
|
|
27
|
+
* catalog. The parameter is required so a caller states which posture it
|
|
28
|
+
* is in; there is no default because either one is wrong for the other.
|
|
29
|
+
*
|
|
30
|
+
* The string forms (`agent:x`, `organization:acme#viewer`,
|
|
31
|
+
* `identity_account:*`) are the notation the cloud's store tests and the
|
|
32
|
+
* IamPolicy proto both use; parse and format are here so the kit and the
|
|
33
|
+
* tests never spell them a second way.
|
|
34
|
+
*/
|
|
35
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
36
|
+
/** The FGA type name of the kind every person is: `identity_account:<id>`. */
|
|
37
|
+
export declare const ACCOUNT_TYPE = "identity_account";
|
|
38
|
+
/** The one condition the model declares; it guards the public wildcard. */
|
|
39
|
+
export declare const ALLOW_PUBLIC_CONDITION = "allow_public";
|
|
40
|
+
/** `type:id` — an object of the model. */
|
|
41
|
+
export interface ObjectRef {
|
|
42
|
+
readonly type: string;
|
|
43
|
+
readonly id: string;
|
|
44
|
+
}
|
|
45
|
+
/** The subject (the FGA "user") of a tuple. */
|
|
46
|
+
export type Subject =
|
|
47
|
+
/** `type:id` — an object, including a person as `identity_account:<id>`. */
|
|
48
|
+
{
|
|
49
|
+
readonly form: "object";
|
|
50
|
+
readonly object: ObjectRef;
|
|
51
|
+
}
|
|
52
|
+
/** `type:id#relation` — everyone who holds `relation` on the object. */
|
|
53
|
+
| {
|
|
54
|
+
readonly form: "userset";
|
|
55
|
+
readonly object: ObjectRef;
|
|
56
|
+
readonly relation: string;
|
|
57
|
+
}
|
|
58
|
+
/** `type:*` — every object of the type, honoured only when its condition holds. */
|
|
59
|
+
| {
|
|
60
|
+
readonly form: "wildcard";
|
|
61
|
+
readonly type: string;
|
|
62
|
+
readonly condition: string | undefined;
|
|
63
|
+
};
|
|
64
|
+
export interface Tuple {
|
|
65
|
+
readonly object: ObjectRef;
|
|
66
|
+
readonly relation: string;
|
|
67
|
+
readonly subject: Subject;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Where the evaluator reads tuples from: every tuple on `object` with
|
|
71
|
+
* `relation`. A source MAY return only the tuples that can concern the
|
|
72
|
+
* person it was built for (the product source reads the person's own
|
|
73
|
+
* rows; a fixture source knows no person and returns them all) — the
|
|
74
|
+
* evaluator is correct over either, because a tuple whose subject is
|
|
75
|
+
* another person is never a match. It MUST NOT omit a userset or an
|
|
76
|
+
* object subject on the pair, which is how the person may be reached
|
|
77
|
+
* indirectly. Faults propagate; "absent" is the empty array.
|
|
78
|
+
*/
|
|
79
|
+
export interface TupleSource {
|
|
80
|
+
tuplesOf(object: ObjectRef, relation: string): Promise<ReadonlyArray<Tuple>>;
|
|
81
|
+
}
|
|
82
|
+
/** A declaration's derived-relation rule reads related rows through this (default_of needs the blueprint). */
|
|
83
|
+
export interface RowLoader {
|
|
84
|
+
/** The decoded row, or undefined when there is none or the kind is not declared. */
|
|
85
|
+
load(object: ObjectRef): Promise<Message | undefined>;
|
|
86
|
+
}
|
|
87
|
+
/** The caller as the model sees them. */
|
|
88
|
+
export interface Person {
|
|
89
|
+
/** The id the IamPolicy rows name. */
|
|
90
|
+
readonly accountId: string;
|
|
91
|
+
/** Every string a creator stamp may carry for this person; always contains `accountId`. */
|
|
92
|
+
readonly aliases: ReadonlySet<string>;
|
|
93
|
+
}
|
|
94
|
+
/** The condition parameters of a check (the module header). */
|
|
95
|
+
export interface CheckContext {
|
|
96
|
+
readonly allow: boolean;
|
|
97
|
+
}
|
|
98
|
+
/** `type:id` → ObjectRef; the id may itself contain `:` (issuer subjects do). */
|
|
99
|
+
export declare function parseObjectRef(text: string): ObjectRef;
|
|
100
|
+
export declare function formatObjectRef(object: ObjectRef): string;
|
|
101
|
+
/**
|
|
102
|
+
* `type:id`, `type:id#relation` or `type:*` → Subject. A wildcard parsed
|
|
103
|
+
* from text carries no condition; the caller attaches one when its source
|
|
104
|
+
* says so (the store tests carry it on the tuple, the derivation attaches
|
|
105
|
+
* the model's).
|
|
106
|
+
*/
|
|
107
|
+
export declare function parseSubject(text: string): Subject;
|
|
108
|
+
export declare function formatSubject(subject: Subject): string;
|
|
109
|
+
/** `object#relation@subject` — the IamPolicy proto's own tuple notation. */
|
|
110
|
+
export declare function formatTuple(tuple: Tuple): string;
|
|
111
|
+
/** The memo and fixture key of an (object, relation) pair. */
|
|
112
|
+
export declare function pairKey(object: ObjectRef, relation: string): string;
|
|
113
|
+
/** A source over a fixed tuple list — the store-test kit's and the unit tests' fixture. */
|
|
114
|
+
export declare function newInMemoryTupleSource(tuples: ReadonlyArray<Tuple>): TupleSource;
|
|
115
|
+
//# sourceMappingURL=tuples.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tuples.d.ts","sourceRoot":"","sources":["../../src/authorization/tuples.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,8EAA8E;AAC9E,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAE/C,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,iBAAiB,CAAC;AAErD,0CAA0C;AAC1C,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,+CAA+C;AAC/C,MAAM,MAAM,OAAO;AACjB,4EAA4E;AAC1E;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAAE;AACzD,wEAAwE;GACtE;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AACH,mFAAmF;GACjF;IACE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC,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BAAgB,sBAAsB,CACpC,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,GAC3B,WAAW,CAgBb"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/** The FGA type name of the kind every person is: `identity_account:<id>`. */
|
|
2
|
+
export const ACCOUNT_TYPE = "identity_account";
|
|
3
|
+
/** The one condition the model declares; it guards the public wildcard. */
|
|
4
|
+
export const ALLOW_PUBLIC_CONDITION = "allow_public";
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// The string notation.
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
/** `type:id` → ObjectRef; the id may itself contain `:` (issuer subjects do). */
|
|
9
|
+
export function parseObjectRef(text) {
|
|
10
|
+
const colon = text.indexOf(":");
|
|
11
|
+
if (colon <= 0) {
|
|
12
|
+
throw new Error(`not an object reference: '${text}'`);
|
|
13
|
+
}
|
|
14
|
+
return { type: text.slice(0, colon), id: text.slice(colon + 1) };
|
|
15
|
+
}
|
|
16
|
+
export function formatObjectRef(object) {
|
|
17
|
+
return `${object.type}:${object.id}`;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* `type:id`, `type:id#relation` or `type:*` → Subject. A wildcard parsed
|
|
21
|
+
* from text carries no condition; the caller attaches one when its source
|
|
22
|
+
* says so (the store tests carry it on the tuple, the derivation attaches
|
|
23
|
+
* the model's).
|
|
24
|
+
*/
|
|
25
|
+
export function parseSubject(text) {
|
|
26
|
+
const hash = text.indexOf("#");
|
|
27
|
+
if (hash > 0) {
|
|
28
|
+
return {
|
|
29
|
+
form: "userset",
|
|
30
|
+
object: parseObjectRef(text.slice(0, hash)),
|
|
31
|
+
relation: text.slice(hash + 1),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const object = parseObjectRef(text);
|
|
35
|
+
if (object.id === "*") {
|
|
36
|
+
return { form: "wildcard", type: object.type, condition: undefined };
|
|
37
|
+
}
|
|
38
|
+
return { form: "object", object };
|
|
39
|
+
}
|
|
40
|
+
export function formatSubject(subject) {
|
|
41
|
+
switch (subject.form) {
|
|
42
|
+
case "object":
|
|
43
|
+
return formatObjectRef(subject.object);
|
|
44
|
+
case "userset":
|
|
45
|
+
return `${formatObjectRef(subject.object)}#${subject.relation}`;
|
|
46
|
+
case "wildcard":
|
|
47
|
+
return subject.condition === undefined
|
|
48
|
+
? `${subject.type}:*`
|
|
49
|
+
: `${subject.type}:* with ${subject.condition}`;
|
|
50
|
+
default: {
|
|
51
|
+
const exhaustive = subject;
|
|
52
|
+
throw new Error(`unknown subject form: ${JSON.stringify(exhaustive)}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** `object#relation@subject` — the IamPolicy proto's own tuple notation. */
|
|
57
|
+
export function formatTuple(tuple) {
|
|
58
|
+
return `${formatObjectRef(tuple.object)}#${tuple.relation}@${formatSubject(tuple.subject)}`;
|
|
59
|
+
}
|
|
60
|
+
/** The memo and fixture key of an (object, relation) pair. */
|
|
61
|
+
export function pairKey(object, relation) {
|
|
62
|
+
return `${formatObjectRef(object)}#${relation}`;
|
|
63
|
+
}
|
|
64
|
+
/** A source over a fixed tuple list — the store-test kit's and the unit tests' fixture. */
|
|
65
|
+
export function newInMemoryTupleSource(tuples) {
|
|
66
|
+
const byPair = new Map();
|
|
67
|
+
for (const tuple of tuples) {
|
|
68
|
+
const key = pairKey(tuple.object, tuple.relation);
|
|
69
|
+
const held = byPair.get(key);
|
|
70
|
+
if (held === undefined) {
|
|
71
|
+
byPair.set(key, [tuple]);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
held.push(tuple);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
tuplesOf(object, relation) {
|
|
79
|
+
return Promise.resolve(byPair.get(pairKey(object, relation)) ?? []);
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=tuples.js.map
|
|
@@ -0,0 +1 @@
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UAAU,sBAAsB,CACpC,MAA4B;IAE5B,MAAM,MAAM,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC1C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;QAClD,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC7B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO;QACL,QAAQ,CAAC,MAAM,EAAE,QAAQ;YACvB,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QACtE,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/boot/compose.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/boot/compose.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AA0BpE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAIzE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAmCzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAgClE,OAAO,EAKL,aAAa,EAEd,MAA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