@stigmer/server 3.15.3-dev.20260914100347 → 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 +75 -11
- package/dist/extensions/list-read-scope.d.ts.map +1 -1
- package/dist/extensions/list-read-scope.js +40 -7
- 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/apiresource-meta.d.ts +21 -0
- package/dist/pipeline/apiresource-meta.d.ts.map +1 -1
- package/dist/pipeline/apiresource-meta.js +28 -0
- package/dist/pipeline/apiresource-meta.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/authorization-tuples.d.ts.map +1 -1
- package/dist/pipeline/steps/authorization-tuples.js +7 -26
- package/dist/pipeline/steps/authorization-tuples.js.map +1 -1
- 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/shapes.d.ts +18 -0
- package/dist/pipeline/steps/shapes.d.ts.map +1 -1
- package/dist/pipeline/steps/shapes.js +29 -0
- package/dist/pipeline/steps/shapes.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 +245 -3
- 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 +116 -16
- 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__/inherited-authorization-parent.test.ts +51 -0
- package/src/pipeline/__tests__/router-transport.test.ts +1 -3
- package/src/pipeline/apiresource-labels.ts +31 -3
- package/src/pipeline/apiresource-meta.ts +37 -0
- 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/authorization-tuples.ts +7 -28
- 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/shapes.ts +31 -0
- 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,317 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pins the built-in model's registry: which kinds are declared — every
|
|
3
|
+
* kind of the open-source tier, in `fga.mod` order, and nothing else —
|
|
4
|
+
* that each declaration names its `.fga` source by its own type, that a
|
|
5
|
+
* kind is reached by enum and by FGA type name alike, and that every
|
|
6
|
+
* permission the wire can ask about (the IamPermission vocabulary) is
|
|
7
|
+
* either a declared relation of the kind or absent from its `.fga` file —
|
|
8
|
+
* never a relation the transcript forgot.
|
|
9
|
+
*
|
|
10
|
+
* The kind list is pinned twice on purpose: as the literal in registry
|
|
11
|
+
* order (a reordering or a dropped file is a visible diff) and as
|
|
12
|
+
* set-equal to the `kind_meta.tier` open-source members (a kind the
|
|
13
|
+
* contract moves into or out of the tier is a visible diff here before
|
|
14
|
+
* it is a silent gap in enforcement).
|
|
15
|
+
*/
|
|
16
|
+
import { describe, expect, it } from "vitest";
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
ApiResourceKind,
|
|
20
|
+
ApiResourceKindSchema,
|
|
21
|
+
ResourceTier,
|
|
22
|
+
} from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
23
|
+
import { IamPermissionSchema } from "@stigmer/protos/ai/stigmer/iam/v1/enum_pb";
|
|
24
|
+
|
|
25
|
+
import {
|
|
26
|
+
getKindMeta,
|
|
27
|
+
kindEnumName,
|
|
28
|
+
} from "../../../pipeline/apiresource-meta.js";
|
|
29
|
+
import { builtInModel, declarationFor } from "../index.js";
|
|
30
|
+
|
|
31
|
+
/** The open-source tier, in registry order (the `fga.mod` order of their files). */
|
|
32
|
+
const DECLARED_KINDS = [
|
|
33
|
+
ApiResourceKind.identity_account,
|
|
34
|
+
ApiResourceKind.iam_policy,
|
|
35
|
+
ApiResourceKind.api_key,
|
|
36
|
+
ApiResourceKind.oauth_app,
|
|
37
|
+
ApiResourceKind.organization,
|
|
38
|
+
ApiResourceKind.project,
|
|
39
|
+
ApiResourceKind.agent,
|
|
40
|
+
ApiResourceKind.agent_channel,
|
|
41
|
+
ApiResourceKind.agent_share,
|
|
42
|
+
ApiResourceKind.channel_app,
|
|
43
|
+
ApiResourceKind.agent_instance,
|
|
44
|
+
ApiResourceKind.agent_execution,
|
|
45
|
+
ApiResourceKind.artifact,
|
|
46
|
+
ApiResourceKind.environment,
|
|
47
|
+
ApiResourceKind.execution_context,
|
|
48
|
+
ApiResourceKind.mcp_server,
|
|
49
|
+
ApiResourceKind.memory,
|
|
50
|
+
ApiResourceKind.schedule,
|
|
51
|
+
ApiResourceKind.session,
|
|
52
|
+
ApiResourceKind.skill,
|
|
53
|
+
ApiResourceKind.workflow,
|
|
54
|
+
ApiResourceKind.workflow_instance,
|
|
55
|
+
ApiResourceKind.workflow_execution,
|
|
56
|
+
ApiResourceKind.plugin,
|
|
57
|
+
] as const;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The permissions each `.fga` file defines that the wire vocabulary also
|
|
61
|
+
* names, in the file's order — derived by hand from the files at the
|
|
62
|
+
* pinned commit. A relation in the file and not here, or here and not in
|
|
63
|
+
* the transcript, fails. Verbs the files define outside the vocabulary
|
|
64
|
+
* (`can_use`, `can_clone`, `can_rotate`, `can_revoke`) are the model's
|
|
65
|
+
* own and are not listed.
|
|
66
|
+
*/
|
|
67
|
+
const WIRE_PERMISSIONS_BY_TYPE: Readonly<
|
|
68
|
+
Record<string, ReadonlyArray<string>>
|
|
69
|
+
> = {
|
|
70
|
+
identity_account: [
|
|
71
|
+
"can_view",
|
|
72
|
+
"can_edit",
|
|
73
|
+
"can_delete",
|
|
74
|
+
"can_grant_access",
|
|
75
|
+
"can_view_access",
|
|
76
|
+
],
|
|
77
|
+
iam_policy: [
|
|
78
|
+
"can_view",
|
|
79
|
+
"can_edit",
|
|
80
|
+
"can_delete",
|
|
81
|
+
"can_grant_access",
|
|
82
|
+
"can_view_access",
|
|
83
|
+
],
|
|
84
|
+
api_key: [
|
|
85
|
+
"can_view",
|
|
86
|
+
"can_edit",
|
|
87
|
+
"can_delete",
|
|
88
|
+
"can_grant_access",
|
|
89
|
+
"can_view_access",
|
|
90
|
+
],
|
|
91
|
+
oauth_app: [
|
|
92
|
+
"can_view",
|
|
93
|
+
"can_edit",
|
|
94
|
+
"can_delete",
|
|
95
|
+
"can_grant_access",
|
|
96
|
+
"can_view_access",
|
|
97
|
+
],
|
|
98
|
+
organization: [
|
|
99
|
+
"can_view",
|
|
100
|
+
"can_edit",
|
|
101
|
+
"can_delete",
|
|
102
|
+
"can_create_project",
|
|
103
|
+
"can_create_agent",
|
|
104
|
+
"can_create_workflow",
|
|
105
|
+
"can_create_session",
|
|
106
|
+
"can_create_environment",
|
|
107
|
+
"can_create_skill",
|
|
108
|
+
"can_create_plugin",
|
|
109
|
+
"can_create_idp",
|
|
110
|
+
"can_create_identity_account",
|
|
111
|
+
"can_create_oauth_app",
|
|
112
|
+
"can_create_platform_client",
|
|
113
|
+
"can_create_channel_app",
|
|
114
|
+
"can_create_execution_in",
|
|
115
|
+
"can_create_agent_share",
|
|
116
|
+
"can_grant_access",
|
|
117
|
+
"can_view_access",
|
|
118
|
+
"can_view_billing",
|
|
119
|
+
"can_manage_billing",
|
|
120
|
+
],
|
|
121
|
+
project: [
|
|
122
|
+
"can_view",
|
|
123
|
+
"can_edit",
|
|
124
|
+
"can_delete",
|
|
125
|
+
"can_grant_access",
|
|
126
|
+
"can_view_access",
|
|
127
|
+
],
|
|
128
|
+
agent: [
|
|
129
|
+
"can_view",
|
|
130
|
+
"can_edit",
|
|
131
|
+
"can_delete",
|
|
132
|
+
"can_execute",
|
|
133
|
+
"can_create_instance",
|
|
134
|
+
"can_grant_access",
|
|
135
|
+
"can_view_access",
|
|
136
|
+
],
|
|
137
|
+
agent_channel: [
|
|
138
|
+
"can_view",
|
|
139
|
+
"can_edit",
|
|
140
|
+
"can_delete",
|
|
141
|
+
"can_participate",
|
|
142
|
+
"can_grant_access",
|
|
143
|
+
"can_view_access",
|
|
144
|
+
],
|
|
145
|
+
agent_share: [
|
|
146
|
+
"can_view",
|
|
147
|
+
"can_edit",
|
|
148
|
+
"can_delete",
|
|
149
|
+
"can_grant_access",
|
|
150
|
+
"can_view_access",
|
|
151
|
+
],
|
|
152
|
+
channel_app: [
|
|
153
|
+
"can_view",
|
|
154
|
+
"can_edit",
|
|
155
|
+
"can_delete",
|
|
156
|
+
"can_grant_access",
|
|
157
|
+
"can_view_access",
|
|
158
|
+
],
|
|
159
|
+
agent_instance: [
|
|
160
|
+
"can_view",
|
|
161
|
+
"can_execute",
|
|
162
|
+
"can_edit",
|
|
163
|
+
"can_delete",
|
|
164
|
+
"can_grant_access",
|
|
165
|
+
"can_view_access",
|
|
166
|
+
],
|
|
167
|
+
agent_execution: ["can_view", "can_edit"],
|
|
168
|
+
artifact: ["can_view", "can_edit"],
|
|
169
|
+
environment: [
|
|
170
|
+
"can_view",
|
|
171
|
+
"can_edit",
|
|
172
|
+
"can_delete",
|
|
173
|
+
"can_read_secrets",
|
|
174
|
+
"can_grant_access",
|
|
175
|
+
"can_view_access",
|
|
176
|
+
],
|
|
177
|
+
execution_context: ["can_view", "can_edit"],
|
|
178
|
+
mcp_server: [
|
|
179
|
+
"can_view",
|
|
180
|
+
"can_edit",
|
|
181
|
+
"can_delete",
|
|
182
|
+
"can_connect",
|
|
183
|
+
"can_grant_access",
|
|
184
|
+
"can_view_access",
|
|
185
|
+
],
|
|
186
|
+
memory: ["can_view", "can_edit", "can_delete"],
|
|
187
|
+
schedule: [
|
|
188
|
+
"can_view",
|
|
189
|
+
"can_edit",
|
|
190
|
+
"can_delete",
|
|
191
|
+
"can_grant_access",
|
|
192
|
+
"can_view_access",
|
|
193
|
+
],
|
|
194
|
+
session: [
|
|
195
|
+
"can_view",
|
|
196
|
+
"can_edit",
|
|
197
|
+
"can_delete",
|
|
198
|
+
"can_create_execution_in",
|
|
199
|
+
"can_grant_access",
|
|
200
|
+
"can_view_access",
|
|
201
|
+
],
|
|
202
|
+
skill: [
|
|
203
|
+
"can_view",
|
|
204
|
+
"can_edit",
|
|
205
|
+
"can_delete",
|
|
206
|
+
"can_grant_access",
|
|
207
|
+
"can_view_access",
|
|
208
|
+
],
|
|
209
|
+
workflow: [
|
|
210
|
+
"can_view",
|
|
211
|
+
"can_edit",
|
|
212
|
+
"can_delete",
|
|
213
|
+
"can_execute",
|
|
214
|
+
"can_grant_access",
|
|
215
|
+
"can_view_access",
|
|
216
|
+
],
|
|
217
|
+
plugin: [
|
|
218
|
+
"can_view",
|
|
219
|
+
"can_edit",
|
|
220
|
+
"can_delete",
|
|
221
|
+
"can_grant_access",
|
|
222
|
+
"can_view_access",
|
|
223
|
+
],
|
|
224
|
+
workflow_instance: [
|
|
225
|
+
"can_view",
|
|
226
|
+
"can_execute",
|
|
227
|
+
"can_edit",
|
|
228
|
+
"can_delete",
|
|
229
|
+
"can_grant_access",
|
|
230
|
+
"can_view_access",
|
|
231
|
+
],
|
|
232
|
+
workflow_execution: [
|
|
233
|
+
"can_view",
|
|
234
|
+
"can_edit",
|
|
235
|
+
"can_grant_access",
|
|
236
|
+
"can_view_access",
|
|
237
|
+
],
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
/** Every kind whose `kind_meta.tier` is the open-source tier, by enum number. */
|
|
241
|
+
function openSourceTierKinds(): ReadonlySet<ApiResourceKind> {
|
|
242
|
+
const kinds = new Set<ApiResourceKind>();
|
|
243
|
+
for (const value of ApiResourceKindSchema.values) {
|
|
244
|
+
const kind = value.number as ApiResourceKind;
|
|
245
|
+
if (
|
|
246
|
+
kind !== ApiResourceKind.api_resource_kind_unknown &&
|
|
247
|
+
getKindMeta(kind).tier === ResourceTier.open_source
|
|
248
|
+
) {
|
|
249
|
+
kinds.add(kind);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
return kinds;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
describe("the built-in model's registry", () => {
|
|
256
|
+
it("declares exactly the open-source tier's kinds, in fga.mod order", () => {
|
|
257
|
+
expect(builtInModel.declarations.map((d) => d.kind)).toEqual([
|
|
258
|
+
...DECLARED_KINDS,
|
|
259
|
+
]);
|
|
260
|
+
expect(new Set(DECLARED_KINDS)).toEqual(openSourceTierKinds());
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
it("reaches a declaration by kind and by FGA type name, and answers undefined for the kinds this edition does not serve", () => {
|
|
264
|
+
for (const kind of DECLARED_KINDS) {
|
|
265
|
+
const byKind = declarationFor(kind);
|
|
266
|
+
expect(byKind?.kind).toBe(kind);
|
|
267
|
+
expect(builtInModel.byType(kindEnumName(kind))).toBe(byKind);
|
|
268
|
+
}
|
|
269
|
+
for (const unserved of [
|
|
270
|
+
ApiResourceKind.platform,
|
|
271
|
+
ApiResourceKind.identity_provider,
|
|
272
|
+
ApiResourceKind.platform_client,
|
|
273
|
+
ApiResourceKind.invitation,
|
|
274
|
+
]) {
|
|
275
|
+
expect(declarationFor(unserved), kindEnumName(unserved)).toBeUndefined();
|
|
276
|
+
}
|
|
277
|
+
expect(builtInModel.byType("")).toBeUndefined();
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
it("names its `.fga` source by the kind's own type, under the module the fga.mod files it in", () => {
|
|
281
|
+
for (const declaration of builtInModel.declarations) {
|
|
282
|
+
expect(declaration.source).toMatch(
|
|
283
|
+
new RegExp(
|
|
284
|
+
`^fga/model/(tenancy|agentic|iam)/${declaration.type}\\.fga$`,
|
|
285
|
+
),
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
it("declares, for every kind, exactly the wire permissions its `.fga` file defines", () => {
|
|
291
|
+
const wireVocabulary = new Set(
|
|
292
|
+
IamPermissionSchema.values.map((value) => value.name),
|
|
293
|
+
);
|
|
294
|
+
expect(Object.keys(WIRE_PERMISSIONS_BY_TYPE).sort()).toEqual(
|
|
295
|
+
builtInModel.declarations.map((d) => d.type).sort(),
|
|
296
|
+
);
|
|
297
|
+
for (const declaration of builtInModel.declarations) {
|
|
298
|
+
const declaredWirePermissions = [...declaration.relations.keys()].filter(
|
|
299
|
+
(relation) => wireVocabulary.has(relation),
|
|
300
|
+
);
|
|
301
|
+
expect(declaredWirePermissions, declaration.type).toEqual(
|
|
302
|
+
WIRE_PERMISSIONS_BY_TYPE[declaration.type],
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
it("carries a derived rule only where kind_meta cannot derive the relation: default_of on the two instance kinds, execution_viewer on the workflow instance", () => {
|
|
308
|
+
const derived = builtInModel.declarations
|
|
309
|
+
.flatMap((d) => [...d.derived.keys()].map((r) => `${d.type}#${r}`))
|
|
310
|
+
.sort();
|
|
311
|
+
expect(derived).toEqual([
|
|
312
|
+
"agent_instance#default_of",
|
|
313
|
+
"workflow_instance#default_of",
|
|
314
|
+
"workflow_instance#execution_viewer",
|
|
315
|
+
]);
|
|
316
|
+
});
|
|
317
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transcript of fga/model/agentic/agent.fga — a blueprint: owned by its
|
|
3
|
+
* creator and by the organization's admins (`admin from organization`),
|
|
4
|
+
* read by whoever the visibility axis lets in. The `organization#member`
|
|
5
|
+
* and `organization#viewer` usersets on `viewer` are the org-visibility
|
|
6
|
+
* tuple's two shapes (the cloud writes `#viewer` since cloud#257; `#member`
|
|
7
|
+
* is the legacy shape it still honours), the conditional wildcard is the
|
|
8
|
+
* public level, and `platform_viewer` is an identity-provider userset no
|
|
9
|
+
* open-source tuple ever names.
|
|
10
|
+
*/
|
|
11
|
+
import { AgentSchema } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
|
|
12
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
computed,
|
|
16
|
+
declareKind,
|
|
17
|
+
direct,
|
|
18
|
+
from,
|
|
19
|
+
objectOf,
|
|
20
|
+
publicWith,
|
|
21
|
+
union,
|
|
22
|
+
usersetOf,
|
|
23
|
+
} from "./rewrite.js";
|
|
24
|
+
|
|
25
|
+
export const agentDeclaration = declareKind({
|
|
26
|
+
kind: ApiResourceKind.agent,
|
|
27
|
+
schema: AgentSchema,
|
|
28
|
+
source: "fga/model/agentic/agent.fga",
|
|
29
|
+
relations: [
|
|
30
|
+
["organization", direct(objectOf("organization"))],
|
|
31
|
+
[
|
|
32
|
+
"owner",
|
|
33
|
+
union(
|
|
34
|
+
direct(objectOf("identity_account")),
|
|
35
|
+
from("admin", "organization"),
|
|
36
|
+
),
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"platform_viewer",
|
|
40
|
+
direct(usersetOf("identity_provider", "platform_user")),
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
"viewer",
|
|
44
|
+
union(
|
|
45
|
+
direct(
|
|
46
|
+
objectOf("identity_account"),
|
|
47
|
+
publicWith("identity_account", "allow_public"),
|
|
48
|
+
usersetOf("organization", "member"),
|
|
49
|
+
usersetOf("organization", "viewer"),
|
|
50
|
+
),
|
|
51
|
+
computed("owner"),
|
|
52
|
+
computed("platform_viewer"),
|
|
53
|
+
),
|
|
54
|
+
],
|
|
55
|
+
["can_view", computed("viewer")],
|
|
56
|
+
["can_edit", computed("owner")],
|
|
57
|
+
["can_delete", computed("owner")],
|
|
58
|
+
["can_execute", computed("viewer")],
|
|
59
|
+
["can_create_instance", computed("can_execute")],
|
|
60
|
+
["can_clone", computed("viewer")],
|
|
61
|
+
["can_grant_access", computed("owner")],
|
|
62
|
+
["can_view_access", computed("viewer")],
|
|
63
|
+
],
|
|
64
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transcript of fga/model/agentic/agent_channel.fga — a channel binding,
|
|
3
|
+
* admin-owned like a blueprint, with `participant` as the one relation
|
|
4
|
+
* between owner and viewer: the conversation-participation role
|
|
5
|
+
* (reply and takeover without configuration authority), grantable as a
|
|
6
|
+
* role on this kind alone. Every owner participates; every participant
|
|
7
|
+
* views.
|
|
8
|
+
*/
|
|
9
|
+
import { AgentChannelSchema } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/api_pb";
|
|
10
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
computed,
|
|
14
|
+
declareKind,
|
|
15
|
+
direct,
|
|
16
|
+
from,
|
|
17
|
+
objectOf,
|
|
18
|
+
union,
|
|
19
|
+
} from "./rewrite.js";
|
|
20
|
+
|
|
21
|
+
export const agentChannelDeclaration = declareKind({
|
|
22
|
+
kind: ApiResourceKind.agent_channel,
|
|
23
|
+
schema: AgentChannelSchema,
|
|
24
|
+
source: "fga/model/agentic/agent_channel.fga",
|
|
25
|
+
relations: [
|
|
26
|
+
["organization", direct(objectOf("organization"))],
|
|
27
|
+
[
|
|
28
|
+
"owner",
|
|
29
|
+
union(
|
|
30
|
+
direct(objectOf("identity_account")),
|
|
31
|
+
from("admin", "organization"),
|
|
32
|
+
),
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"participant",
|
|
36
|
+
union(direct(objectOf("identity_account")), computed("owner")),
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"viewer",
|
|
40
|
+
union(direct(objectOf("identity_account")), computed("participant")),
|
|
41
|
+
],
|
|
42
|
+
["can_view", computed("viewer")],
|
|
43
|
+
["can_edit", computed("owner")],
|
|
44
|
+
["can_delete", computed("owner")],
|
|
45
|
+
["can_participate", computed("participant")],
|
|
46
|
+
["can_grant_access", computed("owner")],
|
|
47
|
+
["can_view_access", computed("viewer")],
|
|
48
|
+
],
|
|
49
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transcript of fga/model/agentic/agent_execution.fga — a run is its
|
|
3
|
+
* session's: no owner tuple of its own (`kind_meta` attribution
|
|
4
|
+
* INHERITED), every relation a hop through `session`, which the
|
|
5
|
+
* derivation writes from `spec.session_id`. `can_view: viewer or
|
|
6
|
+
* can_view from session` walks a parent PERMISSION whose own arms include
|
|
7
|
+
* the session's channel and schedule hops; the evaluator resolves those
|
|
8
|
+
* on the session's declaration, so this file needs no knowledge of them.
|
|
9
|
+
*/
|
|
10
|
+
import { AgentExecutionSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
11
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
computed,
|
|
15
|
+
declareKind,
|
|
16
|
+
direct,
|
|
17
|
+
from,
|
|
18
|
+
objectOf,
|
|
19
|
+
union,
|
|
20
|
+
} from "./rewrite.js";
|
|
21
|
+
|
|
22
|
+
export const agentExecutionDeclaration = declareKind({
|
|
23
|
+
kind: ApiResourceKind.agent_execution,
|
|
24
|
+
schema: AgentExecutionSchema,
|
|
25
|
+
source: "fga/model/agentic/agent_execution.fga",
|
|
26
|
+
relations: [
|
|
27
|
+
["session", direct(objectOf("session"))],
|
|
28
|
+
["owner", from("owner", "session")],
|
|
29
|
+
["viewer", union(from("viewer", "session"), computed("owner"))],
|
|
30
|
+
["can_view", union(computed("viewer"), from("can_view", "session"))],
|
|
31
|
+
["can_edit", computed("owner")],
|
|
32
|
+
],
|
|
33
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transcript of fga/model/agentic/agent_instance.fga — a person's
|
|
3
|
+
* configuration of an agent: owner-only in every write (no admin arm,
|
|
4
|
+
* unlike the blueprint), readable through its own visibility axis or, for
|
|
5
|
+
* the system-managed default instance, through the blueprint's whole
|
|
6
|
+
* viewer set (`viewer from default_of`; default-of.ts). `agent` is the
|
|
7
|
+
* parent link written on every instance for tracking and walked by
|
|
8
|
+
* nothing; `default_of` is the derived link written on the default
|
|
9
|
+
* instance alone.
|
|
10
|
+
*/
|
|
11
|
+
import { AgentSchema } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
|
|
12
|
+
import { AgentInstanceSchema } from "@stigmer/protos/ai/stigmer/agentic/agentinstance/v1/api_pb";
|
|
13
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
14
|
+
|
|
15
|
+
import { defaultOfBlueprint } from "./default-of.js";
|
|
16
|
+
import {
|
|
17
|
+
computed,
|
|
18
|
+
declareKind,
|
|
19
|
+
direct,
|
|
20
|
+
from,
|
|
21
|
+
objectOf,
|
|
22
|
+
publicWith,
|
|
23
|
+
union,
|
|
24
|
+
usersetOf,
|
|
25
|
+
} from "./rewrite.js";
|
|
26
|
+
|
|
27
|
+
export const agentInstanceDeclaration = declareKind({
|
|
28
|
+
kind: ApiResourceKind.agent_instance,
|
|
29
|
+
schema: AgentInstanceSchema,
|
|
30
|
+
source: "fga/model/agentic/agent_instance.fga",
|
|
31
|
+
relations: [
|
|
32
|
+
["organization", direct(objectOf("organization"))],
|
|
33
|
+
["agent", direct(objectOf("agent"))],
|
|
34
|
+
["default_of", direct(objectOf("agent"))],
|
|
35
|
+
["owner", direct(objectOf("identity_account"))],
|
|
36
|
+
[
|
|
37
|
+
"viewer",
|
|
38
|
+
union(
|
|
39
|
+
direct(
|
|
40
|
+
objectOf("identity_account"),
|
|
41
|
+
publicWith("identity_account", "allow_public"),
|
|
42
|
+
usersetOf("organization", "member"),
|
|
43
|
+
usersetOf("organization", "viewer"),
|
|
44
|
+
),
|
|
45
|
+
computed("owner"),
|
|
46
|
+
from("viewer", "default_of"),
|
|
47
|
+
),
|
|
48
|
+
],
|
|
49
|
+
["can_view", computed("viewer")],
|
|
50
|
+
["can_execute", computed("can_view")],
|
|
51
|
+
["can_edit", computed("owner")],
|
|
52
|
+
["can_delete", computed("owner")],
|
|
53
|
+
["can_grant_access", computed("owner")],
|
|
54
|
+
["can_view_access", computed("viewer")],
|
|
55
|
+
],
|
|
56
|
+
derived: [
|
|
57
|
+
[
|
|
58
|
+
"default_of",
|
|
59
|
+
defaultOfBlueprint({
|
|
60
|
+
kind: ApiResourceKind.agent,
|
|
61
|
+
schema: AgentSchema,
|
|
62
|
+
defaultInstanceIdOf: (agent) => agent.status?.defaultInstanceId ?? "",
|
|
63
|
+
}),
|
|
64
|
+
],
|
|
65
|
+
],
|
|
66
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transcript of fga/model/agentic/agent_share.fga — a share link's
|
|
3
|
+
* configuration row, admin-owned; its anonymous visitors are the cloud's
|
|
4
|
+
* `guest` credential on the organization, a class no open-source lane
|
|
5
|
+
* mints, so on this edition a share is visible to its owners and explicit
|
|
6
|
+
* grantees only.
|
|
7
|
+
*/
|
|
8
|
+
import { AgentShareSchema } from "@stigmer/protos/ai/stigmer/agentic/agentshare/v1/api_pb";
|
|
9
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
computed,
|
|
13
|
+
declareKind,
|
|
14
|
+
direct,
|
|
15
|
+
from,
|
|
16
|
+
objectOf,
|
|
17
|
+
union,
|
|
18
|
+
} from "./rewrite.js";
|
|
19
|
+
|
|
20
|
+
export const agentShareDeclaration = declareKind({
|
|
21
|
+
kind: ApiResourceKind.agent_share,
|
|
22
|
+
schema: AgentShareSchema,
|
|
23
|
+
source: "fga/model/agentic/agent_share.fga",
|
|
24
|
+
relations: [
|
|
25
|
+
["organization", direct(objectOf("organization"))],
|
|
26
|
+
[
|
|
27
|
+
"owner",
|
|
28
|
+
union(
|
|
29
|
+
direct(objectOf("identity_account")),
|
|
30
|
+
from("admin", "organization"),
|
|
31
|
+
),
|
|
32
|
+
],
|
|
33
|
+
["viewer", union(direct(objectOf("identity_account")), computed("owner"))],
|
|
34
|
+
["can_view", computed("viewer")],
|
|
35
|
+
["can_edit", computed("owner")],
|
|
36
|
+
["can_delete", computed("owner")],
|
|
37
|
+
["can_grant_access", computed("owner")],
|
|
38
|
+
["can_view_access", computed("viewer")],
|
|
39
|
+
],
|
|
40
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transcript of fga/model/iam/api_key.fga — a credential, owner-only in
|
|
3
|
+
* every verb: no organization link (`kind_meta` scope OWNER_ONLY) and no
|
|
4
|
+
* admin arm, so the key a person minted is theirs to view, rotate, revoke
|
|
5
|
+
* and use, and nobody else's. `can_rotate`, `can_revoke` and `can_use` are
|
|
6
|
+
* the file's own verbs; the wire vocabulary names only the first three.
|
|
7
|
+
*/
|
|
8
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
9
|
+
import { ApiKeySchema } from "@stigmer/protos/ai/stigmer/iam/apikey/v1/api_pb";
|
|
10
|
+
|
|
11
|
+
import { computed, declareKind, direct, objectOf } from "./rewrite.js";
|
|
12
|
+
|
|
13
|
+
export const apiKeyDeclaration = declareKind({
|
|
14
|
+
kind: ApiResourceKind.api_key,
|
|
15
|
+
schema: ApiKeySchema,
|
|
16
|
+
source: "fga/model/iam/api_key.fga",
|
|
17
|
+
relations: [
|
|
18
|
+
["owner", direct(objectOf("identity_account"))],
|
|
19
|
+
["can_view", computed("owner")],
|
|
20
|
+
["can_edit", computed("owner")],
|
|
21
|
+
["can_delete", computed("owner")],
|
|
22
|
+
["can_rotate", computed("owner")],
|
|
23
|
+
["can_revoke", computed("owner")],
|
|
24
|
+
["can_use", computed("owner")],
|
|
25
|
+
["can_grant_access", computed("owner")],
|
|
26
|
+
["can_view_access", computed("owner")],
|
|
27
|
+
],
|
|
28
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transcript of fga/model/agentic/artifact.fga — an organization's shared
|
|
3
|
+
* output: read by its creator and by every organization viewer (`viewer
|
|
4
|
+
* from organization`, no visibility tuple involved — the kind has no
|
|
5
|
+
* visibility axis), edited by the organization's admins alone (the
|
|
6
|
+
* creator does NOT edit through `owner`), and with no `can_delete` line
|
|
7
|
+
* at all. The wire annotates only `can_view` and `can_edit` on it.
|
|
8
|
+
*/
|
|
9
|
+
import { ArtifactSchema } from "@stigmer/protos/ai/stigmer/agentic/artifact/v1/api_pb";
|
|
10
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
computed,
|
|
14
|
+
declareKind,
|
|
15
|
+
direct,
|
|
16
|
+
from,
|
|
17
|
+
objectOf,
|
|
18
|
+
union,
|
|
19
|
+
} from "./rewrite.js";
|
|
20
|
+
|
|
21
|
+
export const artifactDeclaration = declareKind({
|
|
22
|
+
kind: ApiResourceKind.artifact,
|
|
23
|
+
schema: ArtifactSchema,
|
|
24
|
+
source: "fga/model/agentic/artifact.fga",
|
|
25
|
+
relations: [
|
|
26
|
+
["organization", direct(objectOf("organization"))],
|
|
27
|
+
["owner", direct(objectOf("identity_account"))],
|
|
28
|
+
[
|
|
29
|
+
"viewer",
|
|
30
|
+
union(
|
|
31
|
+
direct(objectOf("identity_account")),
|
|
32
|
+
from("viewer", "organization"),
|
|
33
|
+
),
|
|
34
|
+
],
|
|
35
|
+
["can_view", union(computed("owner"), computed("viewer"))],
|
|
36
|
+
["can_edit", from("admin", "organization")],
|
|
37
|
+
],
|
|
38
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transcript of fga/model/agentic/channel_app.fga — a messaging-platform
|
|
3
|
+
* app registration, admin-owned, viewable by its owners and explicit
|
|
4
|
+
* grantees: the same shape as agent_share, kept as its own file so the
|
|
5
|
+
* drift compare reads this file's lines.
|
|
6
|
+
*/
|
|
7
|
+
import { ChannelAppSchema } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/api_pb";
|
|
8
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
computed,
|
|
12
|
+
declareKind,
|
|
13
|
+
direct,
|
|
14
|
+
from,
|
|
15
|
+
objectOf,
|
|
16
|
+
union,
|
|
17
|
+
} from "./rewrite.js";
|
|
18
|
+
|
|
19
|
+
export const channelAppDeclaration = declareKind({
|
|
20
|
+
kind: ApiResourceKind.channel_app,
|
|
21
|
+
schema: ChannelAppSchema,
|
|
22
|
+
source: "fga/model/agentic/channel_app.fga",
|
|
23
|
+
relations: [
|
|
24
|
+
["organization", direct(objectOf("organization"))],
|
|
25
|
+
[
|
|
26
|
+
"owner",
|
|
27
|
+
union(
|
|
28
|
+
direct(objectOf("identity_account")),
|
|
29
|
+
from("admin", "organization"),
|
|
30
|
+
),
|
|
31
|
+
],
|
|
32
|
+
["viewer", union(direct(objectOf("identity_account")), computed("owner"))],
|
|
33
|
+
["can_view", computed("viewer")],
|
|
34
|
+
["can_edit", computed("owner")],
|
|
35
|
+
["can_delete", computed("owner")],
|
|
36
|
+
["can_grant_access", computed("owner")],
|
|
37
|
+
["can_view_access", computed("viewer")],
|
|
38
|
+
],
|
|
39
|
+
});
|