@treeseed/sdk 0.13.0-rc.13 → 0.13.0-rc.130
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 +69 -9
- package/dist/accounts/account-contracts.d.ts +6 -0
- package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.d.ts +5485 -0
- package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.js +242 -0
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +304 -0
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.js +44 -0
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-path.d.ts +2 -0
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-path.js +13 -0
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-records.d.ts +23 -60
- package/dist/agent-capacity/contracts/capacity/assignments/context-pack-compiler.d.ts +25 -0
- package/dist/agent-capacity/contracts/capacity/assignments/context-pack-compiler.js +67 -0
- package/dist/agent-capacity/contracts/capacity/communication/communication-records.d.ts +1 -1
- package/dist/agent-capacity/contracts/capacity/providers/supply-policy.d.ts +126 -3
- package/dist/agent-capacity/contracts/capacity/providers/supply-policy.js +35 -1
- package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.d.ts +80 -0
- package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.js +121 -0
- package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.d.ts +103 -0
- package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.js +51 -0
- package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.d.ts +490 -0
- package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.js +170 -0
- package/dist/agent-capacity/contracts/capacity/workdays/workday-records.d.ts +210 -91
- package/dist/agent-capacity/contracts/capacity/workdays/workday-records.js +19 -0
- package/dist/agent-capacity/contracts/configuration/configuration.d.ts +1 -1
- package/dist/agent-capacity/contracts/configuration/configuration.js +1 -3
- package/dist/agent-capacity/contracts/operations/agent-team-clone.d.ts +218 -0
- package/dist/agent-capacity/contracts/operations/agent-team-clone.js +57 -0
- package/dist/agent-capacity/contracts/projects/agents/project-agent-class.d.ts +119 -24
- package/dist/agent-capacity/contracts/projects/agents/project-agent-class.js +16 -0
- package/dist/agent-capacity/contracts/runtime/runtime-observability.d.ts +2 -154
- package/dist/agent-capacity/contracts/support/agent-atlas.d.ts +0 -13
- package/dist/agent-capacity/contracts/support/execution-graph.d.ts +1291 -0
- package/dist/agent-capacity/contracts/support/execution-graph.js +122 -0
- package/dist/agent-capacity/contracts/support/financial-records.d.ts +3 -6
- package/dist/agent-capacity/contracts/support/planning-records.d.ts +1 -87
- package/dist/agent-capacity/contracts/support/time-capacity.d.ts +0 -14
- package/dist/agent-capacity/contracts/support/time-capacity.js +1 -8
- package/dist/agent-capacity/grant.d.ts +34 -0
- package/dist/agent-capacity/grant.js +4 -0
- package/dist/agent-capacity/validation/activity-profile.d.ts +1 -1
- package/dist/agent-capacity/validation/activity-profile.js +3 -259
- package/dist/agent-capacity/validation/agent-definition-schema.d.ts +2538 -9020
- package/dist/agent-capacity/validation/agent-definition-schema.js +59 -181
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +25 -25
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.js +0 -1
- package/dist/agent-capacity/validation/assignment-records.d.ts +1 -6
- package/dist/agent-capacity/validation/assignment-records.js +49 -35
- package/dist/agent-capacity/validation/configuration.d.ts +1 -1
- package/dist/agent-capacity/validation/configuration.js +2 -7
- package/dist/agent-capacity/validation/execution/execution-graph.d.ts +1 -0
- package/dist/agent-capacity/validation/execution/execution-graph.js +16 -0
- package/dist/agent-capacity/validation/grant.d.ts +11 -0
- package/dist/agent-capacity/validation/grant.js +31 -0
- package/dist/agent-capacity/validation/index.d.ts +2 -1
- package/dist/agent-capacity/validation/index.js +2 -1
- package/dist/agent-capacity/workday.d.ts +13 -4
- package/dist/agent-capacity/workday.js +10 -26
- package/dist/capacity/agents/agent-capacity.d.ts +11 -4
- package/dist/capacity/agents/agent-capacity.js +9 -3
- package/dist/capacity-provider/capability-ontology.d.ts +1495 -0
- package/dist/capacity-provider/capability-ontology.js +221 -0
- package/dist/capacity-provider/client.d.ts +78 -3
- package/dist/capacity-provider/client.js +22 -10
- package/dist/capacity-provider/contracts/capacity-facts.d.ts +13 -0
- package/dist/capacity-provider/contracts/environment-profiles.d.ts +255 -0
- package/dist/capacity-provider/contracts/environment-profiles.js +71 -0
- package/dist/capacity-provider/contracts/governance.d.ts +110 -51
- package/dist/capacity-provider/contracts/index.d.ts +3 -0
- package/dist/capacity-provider/contracts/index.js +3 -0
- package/dist/capacity-provider/core-capability-catalog.d.ts +47 -0
- package/dist/capacity-provider/core-capability-catalog.js +49 -0
- package/dist/capacity-provider/environment-catalog.d.ts +877 -0
- package/dist/capacity-provider/environment-catalog.js +116 -0
- package/dist/capacity-provider/index.d.ts +5 -0
- package/dist/capacity-provider/index.js +5 -0
- package/dist/capacity-provider/install-configuration.d.ts +39 -0
- package/dist/capacity-provider/install-configuration.js +18 -0
- package/dist/capacity-provider/sandbox-contracts.d.ts +602 -0
- package/dist/capacity-provider/sandbox-contracts.js +90 -0
- package/dist/capacity-provider/sandbox.d.ts +2 -0
- package/dist/capacity-provider/sandbox.js +2 -0
- package/dist/capacity-provider/source-workspace.d.ts +740 -0
- package/dist/capacity-provider/source-workspace.js +130 -0
- package/dist/capacity-provider/validation.d.ts +11 -3
- package/dist/capacity-provider/validation.js +136 -70
- package/dist/configuration/secrets-capability.d.ts +5 -1
- package/dist/configuration/secrets-capability.js +5 -1
- package/dist/content/contracts.d.ts +1 -1
- package/dist/content/validation/agent-operational-content-schemas.d.ts +430 -777
- package/dist/content/validation/agent-operational-content-schemas.js +31 -57
- package/dist/content/validation/auxiliary-content-schemas.d.ts +144 -144
- package/dist/content/validation/content-model-schemas.d.ts +16063 -19764
- package/dist/content/validation/content-model-schemas.js +350 -98
- package/dist/content/validation/portable-content-data.d.ts +751 -1782
- package/dist/content/validation/portable-content-data.js +10 -4
- package/dist/content/validation/schema-constraints.d.ts +80 -0
- package/dist/content/validation/schema-constraints.js +173 -0
- package/dist/deployment/ai/storage.d.ts +158 -0
- package/dist/deployment/ai/storage.js +32 -0
- package/dist/deployment/ai-hosting.d.ts +297 -0
- package/dist/deployment/ai-hosting.js +63 -0
- package/dist/deployment/ai-instance.d.ts +65 -0
- package/dist/deployment/ai-instance.js +30 -0
- package/dist/deployment/ai-mode.d.ts +454 -0
- package/dist/deployment/ai-mode.js +67 -0
- package/dist/deployment/canonical.d.ts +2 -0
- package/dist/deployment/canonical.js +17 -0
- package/dist/deployment/catalog.d.ts +16 -0
- package/dist/deployment/catalog.js +48 -0
- package/dist/deployment/hosted-topology-template.d.ts +449 -0
- package/dist/deployment/hosted-topology-template.js +56 -0
- package/dist/deployment/hosted-topology.d.ts +2698 -0
- package/dist/deployment/hosted-topology.js +468 -0
- package/dist/deployment/index.d.ts +13 -0
- package/dist/deployment/index.js +13 -0
- package/dist/deployment/postgres/contracts.d.ts +418 -0
- package/dist/deployment/postgres/contracts.js +83 -0
- package/dist/deployment/postgres/requirements.d.ts +15 -0
- package/dist/deployment/postgres/requirements.js +32 -0
- package/dist/deployment/postgres/transfer.d.ts +97 -0
- package/dist/deployment/postgres/transfer.js +29 -0
- package/dist/deployment/schemas.d.ts +8625 -0
- package/dist/deployment/schemas.js +455 -0
- package/dist/deployment/topology.d.ts +9 -0
- package/dist/deployment/topology.js +35 -0
- package/dist/development/index.d.ts +1 -0
- package/dist/development/index.js +1 -0
- package/dist/development/schemas.d.ts +3594 -0
- package/dist/development/schemas.js +204 -0
- package/dist/development/session-migration.d.ts +3 -0
- package/dist/development/session-migration.js +25 -0
- package/dist/entrypoints/clients/control-plane-client.d.ts +9 -1
- package/dist/entrypoints/clients/control-plane-client.js +17 -5
- package/dist/graph/context-query-contracts.d.ts +16 -1
- package/dist/graph/context-query-contracts.js +6 -1
- package/dist/guarantees/evidence-trust.d.ts +32 -0
- package/dist/guarantees/evidence-trust.js +47 -0
- package/dist/guarantees/index.d.ts +154 -0
- package/dist/guarantees/index.js +44 -0
- package/dist/identity/browser-session.d.ts +233 -0
- package/dist/identity/browser-session.js +51 -0
- package/dist/identity/contracts.d.ts +191 -0
- package/dist/identity/contracts.js +77 -0
- package/dist/identity/index.d.ts +3 -0
- package/dist/identity/index.js +3 -0
- package/dist/identity/runtime.d.ts +186 -0
- package/dist/identity/runtime.js +49 -0
- package/dist/knowledge/contracts.d.ts +9 -2
- package/dist/knowledge/contracts.js +2 -2
- package/dist/model-registry/agent-operational-models.d.ts +1 -1
- package/dist/model-registry/agent-operational-models.js +1 -4
- package/dist/model-registry/build-builtin-model-registry.js +44 -72
- package/dist/model-registry/discussion-models.js +0 -1
- package/dist/operator-contracts/canonical-command-tree.js +415 -44
- package/dist/operator-contracts/catalog/admin-account-team-operations.d.ts +36 -0
- package/dist/operator-contracts/catalog/admin-account-team-operations.js +52 -0
- package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.d.ts +75 -0
- package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.js +42 -0
- package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +163 -0
- package/dist/operator-contracts/catalog/capability-ontology-operations.js +24 -0
- package/dist/operator-contracts/catalog/commands/command-tree-builders.d.ts +62 -0
- package/dist/operator-contracts/catalog/commands/command-tree-builders.js +191 -0
- package/dist/operator-contracts/catalog/communication-operations.d.ts +457 -0
- package/dist/operator-contracts/catalog/communication-operations.js +92 -0
- package/dist/operator-contracts/catalog/control-plane-catalog.d.ts +6 -0
- package/dist/operator-contracts/catalog/control-plane-catalog.js +18 -0
- package/dist/operator-contracts/catalog/execution/execution-operations.d.ts +36 -0
- package/dist/operator-contracts/catalog/execution/execution-operations.js +39 -0
- package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +399 -0
- package/dist/operator-contracts/catalog/hosted-topology-operations.js +79 -0
- package/dist/operator-contracts/catalog/inbox-operations.d.ts +265 -0
- package/dist/operator-contracts/catalog/inbox-operations.js +36 -0
- package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +53 -0
- package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.js +24 -0
- package/dist/operator-contracts/catalog/infrastructure/command-tree-paths.d.ts +3 -0
- package/dist/operator-contracts/catalog/infrastructure/command-tree-paths.js +15 -0
- package/dist/operator-contracts/catalog/knowledge-share-operations.d.ts +127 -0
- package/dist/operator-contracts/catalog/knowledge-share-operations.js +25 -0
- package/dist/operator-contracts/catalog/provider-environment-commands.d.ts +4 -0
- package/dist/operator-contracts/catalog/provider-environment-commands.js +69 -0
- package/dist/operator-contracts/catalog/provider-environment-operations.d.ts +41 -0
- package/dist/operator-contracts/catalog/provider-environment-operations.js +61 -0
- package/dist/operator-contracts/catalog/services/identity-commands.d.ts +2 -0
- package/dist/operator-contracts/catalog/services/identity-commands.js +13 -0
- package/dist/operator-contracts/catalog/services/secret-commands.d.ts +2 -0
- package/dist/operator-contracts/catalog/services/secret-commands.js +31 -0
- package/dist/operator-contracts/catalog/services/secret-operations.d.ts +70 -0
- package/dist/operator-contracts/catalog/services/secret-operations.js +52 -0
- package/dist/operator-contracts/catalog/treeai-operations.d.ts +13 -0
- package/dist/operator-contracts/catalog/treeai-operations.js +61 -0
- package/dist/operator-contracts/catalog/workdays/profile-commands.d.ts +4 -0
- package/dist/operator-contracts/catalog/workdays/profile-commands.js +20 -0
- package/dist/operator-contracts/catalog/workdays/profile-operations.d.ts +41 -0
- package/dist/operator-contracts/catalog/workdays/profile-operations.js +50 -0
- package/dist/operator-contracts/catalog/workdays/selection-commands.d.ts +3 -0
- package/dist/operator-contracts/catalog/workdays/selection-commands.js +28 -0
- package/dist/operator-contracts/command-tree.d.ts +29 -0
- package/dist/operator-contracts/command-tree.js +50 -0
- package/dist/operator-contracts/communication/addressing.d.ts +8 -0
- package/dist/operator-contracts/communication/addressing.js +57 -0
- package/dist/operator-contracts/communication/contracts.d.ts +1966 -0
- package/dist/operator-contracts/communication/contracts.js +195 -0
- package/dist/operator-contracts/control-plane-operation.d.ts +15 -1
- package/dist/operator-contracts/control-plane-operation.js +14 -6
- package/dist/operator-contracts/control-plane-operations.d.ts +2496 -328
- package/dist/operator-contracts/control-plane-operations.js +280 -127
- package/dist/operator-contracts/inbox/contracts.d.ts +1111 -0
- package/dist/operator-contracts/inbox/contracts.js +138 -0
- package/dist/operator-contracts/index.d.ts +6 -1
- package/dist/operator-contracts/index.js +6 -1
- package/dist/operator-contracts/knowledge/contracts.d.ts +130 -0
- package/dist/operator-contracts/knowledge/contracts.js +39 -0
- package/dist/operator-contracts/mcp.d.ts +5 -0
- package/dist/operator-contracts/mcp.js +62 -0
- package/dist/operator-contracts/oauth.d.ts +45 -0
- package/dist/operator-contracts/oauth.js +7 -0
- package/dist/operator-contracts/operation-builder.d.ts +18 -0
- package/dist/operator-contracts/operation-builder.js +78 -0
- package/dist/operator-contracts/seed/seed-bundle.d.ts +138 -0
- package/dist/operator-contracts/seed/seed-bundle.js +68 -0
- package/dist/operator-contracts/workday-lifecycle.d.ts +383 -28
- package/dist/operator-contracts/workday-lifecycle.js +124 -17
- package/dist/platform/agent-schema-verification.d.ts +3 -0
- package/dist/platform/agent-schema-verification.js +377 -0
- package/dist/platform/contracts.d.ts +429 -0
- package/dist/platform/contracts.js +93 -0
- package/dist/platform/index.d.ts +6 -0
- package/dist/platform/index.js +6 -0
- package/dist/platform/inventory.d.ts +11 -0
- package/dist/platform/inventory.js +53 -0
- package/dist/platform/project-create.d.ts +49 -0
- package/dist/platform/project-create.js +75 -0
- package/dist/platform/schemas.d.ts +1094 -0
- package/dist/platform/schemas.js +99 -0
- package/dist/platform/verification.d.ts +9 -0
- package/dist/platform/verification.js +114 -0
- package/dist/platform/workset.d.ts +21 -0
- package/dist/platform/workset.js +106 -0
- package/dist/sdk-types/support/planning-policy.d.ts +1 -1
- package/dist/sdk-types/support/sdk-model-names.d.ts +1 -1
- package/dist/sdk-types/support/sdk-model-names.js +0 -3
- package/dist/sdk-types/support/sdk-search-request.d.ts +2 -2
- package/dist/secrets-capability/github-actions-encryption.d.ts +2 -0
- package/dist/secrets-capability/github-actions-encryption.js +11 -0
- package/dist/secrets-capability/provider-operation-contracts.d.ts +15 -1
- package/dist/secrets-capability/secret-contracts.d.ts +33 -0
- package/dist/secrets-capability/secret-contracts.js +49 -0
- package/dist/secrets-capability/service-provider-contracts.d.ts +5 -3
- package/dist/secrets-capability/service-provider-contracts.js +66 -50
- package/dist/secrets-capability/shared-access.d.ts +51 -0
- package/dist/secrets-capability/shared-access.js +36 -0
- package/dist/secrets-capability/shared-resources.d.ts +376 -0
- package/dist/secrets-capability/shared-resources.js +91 -0
- package/dist/secrets-capability/vault-contracts.d.ts +132 -0
- package/dist/secrets-capability/vault-contracts.js +56 -0
- package/dist/security/encrypted-envelope.d.ts +177 -0
- package/dist/security/encrypted-envelope.js +34 -0
- package/dist/security/envelope-codec.d.ts +38 -0
- package/dist/security/envelope-codec.js +96 -0
- package/dist/security/index.d.ts +2 -0
- package/dist/security/index.js +2 -0
- package/dist/site-contracts/catalog.d.ts +16 -0
- package/dist/site-contracts/catalog.js +19 -0
- package/dist/site-contracts/cloudflare.d.ts +48 -0
- package/dist/site-contracts/platform.d.ts +94 -0
- package/dist/site-contracts/plugin.d.ts +63 -0
- package/dist/site-contracts/plugin.js +26 -0
- package/dist/treeai/catalog.d.ts +1 -0
- package/dist/treeai/catalog.js +1 -0
- package/dist/treeai/client.d.ts +793 -0
- package/dist/treeai/client.js +44 -0
- package/dist/treeai/contract.d.ts +41 -0
- package/dist/treeai/contract.js +51 -0
- package/dist/treeai/generated/upstream.d.ts +770 -0
- package/dist/treeai/generated/upstream.js +4 -0
- package/dist/treeai/index.d.ts +4 -0
- package/dist/treeai/index.js +4 -0
- package/dist/treedx/client.d.ts +605 -0
- package/dist/treedx/client.js +39 -0
- package/dist/treedx/contract.d.ts +32 -0
- package/dist/treedx/contract.js +63 -0
- package/dist/treedx/index.d.ts +3 -0
- package/dist/treedx/index.js +3 -0
- package/dist/treedx/types.d.ts +294 -7
- package/dist/treedx/types.js +44 -7
- package/dist/types/agents/agent-activity-profile.d.ts +43 -98
- package/dist/types/agents/agent-activity-profile.js +23 -0
- package/dist/types/agents/agent-trigger-kinds.d.ts +3 -5
- package/dist/types/agents/agent-trigger-kinds.js +1 -13
- package/dist/types/agents/execution-run-ref.d.ts +1 -8
- package/guarantees/agent/golden/component-boundaries.guarantee.yaml +12 -0
- package/guarantees/agent/golden/product-custody.guarantee.yaml +12 -0
- package/guarantees/agent/golden/product.guarantee.yaml +12 -0
- package/guarantees/agent/golden/scenes/component-boundaries.scene.yaml +858 -0
- package/guarantees/agent/golden/scenes/product-custody.scene.yaml +53 -0
- package/guarantees/agent/golden/scenes/product.scene.yaml +8 -0
- package/guarantees/verifiers/golden.verifiers.yaml +1464 -0
- package/package.json +72 -13
- package/tests/acceptance/golden-product.test.ts +205 -0
- package/tests/acceptance/golden-product.ts +404 -0
- package/tests/acceptance/product/base-red.ts +73 -0
- package/tests/acceptance/product/documentation-examples.ts +68 -0
- package/tests/acceptance/product/intent-runtime.ts +145 -0
- package/tests/acceptance/product/release-output.ts +160 -0
- package/tests/acceptance/product/research-artifact.ts +87 -0
- package/tests/acceptance/product/research-revision.ts +82 -0
- package/tests/acceptance/product/research-source.ts +91 -0
- package/tests/acceptance/product/test-chain.ts +192 -0
- package/treeseed.package.yaml +147 -0
- package/dist/agent-capacity/allocation.d.ts +0 -186
- package/dist/agent-capacity/allocation.js +0 -226
- package/dist/agent-capacity/artifact-mutation-receipt.d.ts +0 -49
- package/dist/agent-capacity/artifact-mutation-receipt.js +0 -36
- package/dist/agent-capacity/artifacts.d.ts +0 -107
- package/dist/agent-capacity/artifacts.js +0 -39
- package/dist/agent-capacity/authority/agent-authority-presets.d.ts +0 -13
- package/dist/agent-capacity/authority/agent-authority-presets.js +0 -106
- package/dist/agent-capacity/contracts/operations/workflow-promotion.d.ts +0 -24
- package/dist/agent-capacity/contracts/support/decision-work.d.ts +0 -251
- package/dist/agent-capacity/policy/capacity/allocations/allocation-hierarchy.d.ts +0 -29
- package/dist/agent-capacity/policy/capacity/allocations/allocation-hierarchy.js +0 -110
- package/dist/agent-capacity/validation/allocation.d.ts +0 -12
- package/dist/agent-capacity/validation/allocation.js +0 -115
- package/dist/agent-capacity/validation/workflow-promotion.d.ts +0 -2
- package/dist/agent-capacity/validation/workflow-promotion.js +0 -34
- package/dist/operator-contracts/workday-profile.d.ts +0 -72
- package/dist/operator-contracts/workday-profile.js +0 -106
- package/dist/secrets-capability/service-vault-contracts.d.ts +0 -61
- package/dist/secrets-capability/service-vault-contracts.js +0 -39
- package/dist/treedx/accounts/auth.d.ts +0 -17
- package/dist/treedx/accounts/auth.js +0 -48
- package/dist/treedx/client/accounts/contracts/auth-mode.d.ts +0 -3
- package/dist/treedx/client/accounts/contracts/auth-mode.js +0 -6
- package/dist/treedx/client/build/creation/build-context.d.ts +0 -3
- package/dist/treedx/client/build/creation/build-context.js +0 -7
- package/dist/treedx/client/build/creation/build-snapshot.d.ts +0 -3
- package/dist/treedx/client/build/creation/build-snapshot.js +0 -8
- package/dist/treedx/client/capacity/allocations/contracts/put-capability-grant.d.ts +0 -3
- package/dist/treedx/client/capacity/allocations/contracts/put-capability-grant.js +0 -7
- package/dist/treedx/client/capacity/allocations/queries/list-capability-grants.d.ts +0 -6
- package/dist/treedx/client/capacity/allocations/queries/list-capability-grants.js +0 -10
- package/dist/treedx/client/methods.d.ts +0 -102
- package/dist/treedx/client/methods.js +0 -209
- package/dist/treedx/client/persistence/contracts/restore-storage.d.ts +0 -3
- package/dist/treedx/client/persistence/contracts/restore-storage.js +0 -6
- package/dist/treedx/client/persistence/lifecycle/verify-storage-restore.d.ts +0 -3
- package/dist/treedx/client/persistence/lifecycle/verify-storage-restore.js +0 -6
- package/dist/treedx/client/repositories/creation/register-repository.d.ts +0 -3
- package/dist/treedx/client/repositories/creation/register-repository.js +0 -7
- package/dist/treedx/client/repositories/queries/get-repository.d.ts +0 -3
- package/dist/treedx/client/repositories/queries/get-repository.js +0 -7
- package/dist/treedx/client/repositories/queries/list-repository-paths.d.ts +0 -3
- package/dist/treedx/client/repositories/queries/list-repository-paths.js +0 -7
- package/dist/treedx/client/repositories/queries/list-repository-refs.d.ts +0 -3
- package/dist/treedx/client/repositories/queries/list-repository-refs.js +0 -12
- package/dist/treedx/client/repositories/queries/query-repository.d.ts +0 -3
- package/dist/treedx/client/repositories/queries/query-repository.js +0 -7
- package/dist/treedx/client/repositories/queries/read-repository-file.d.ts +0 -3
- package/dist/treedx/client/repositories/queries/read-repository-file.js +0 -6
- package/dist/treedx/client/repositories/queries/read-repository-files.d.ts +0 -3
- package/dist/treedx/client/repositories/queries/read-repository-files.js +0 -7
- package/dist/treedx/client/repositories/queries/search-repository-files.d.ts +0 -3
- package/dist/treedx/client/repositories/queries/search-repository-files.js +0 -7
- package/dist/treedx/client/support/contracts/treedx/artifacts/contracts/download-artifact.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/artifacts/contracts/download-artifact.js +0 -9
- package/dist/treedx/client/support/contracts/treedx/authorization/contracts/whoami.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/authorization/contracts/whoami.js +0 -6
- package/dist/treedx/client/support/contracts/treedx/graph/contracts/parse-context-dsl.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/graph/contracts/parse-context-dsl.js +0 -7
- package/dist/treedx/client/support/contracts/treedx/health/contracts/deep-health.d.ts +0 -5
- package/dist/treedx/client/support/contracts/treedx/health/contracts/deep-health.js +0 -7
- package/dist/treedx/client/support/contracts/treedx/health/contracts/health.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/health/contracts/health.js +0 -6
- package/dist/treedx/client/support/contracts/treedx/health/contracts/metrics.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/health/contracts/metrics.js +0 -7
- package/dist/treedx/client/support/contracts/treedx/health/contracts/prometheus-metrics.d.ts +0 -2
- package/dist/treedx/client/support/contracts/treedx/health/contracts/prometheus-metrics.js +0 -19
- package/dist/treedx/client/support/contracts/treedx/health/contracts/ready.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/health/contracts/ready.js +0 -7
- package/dist/treedx/client/support/contracts/treedx/health/contracts/status.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/health/contracts/status.js +0 -6
- package/dist/treedx/client/support/contracts/treedx/repositories/contracts/commit.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/repositories/contracts/commit.js +0 -7
- package/dist/treedx/client/support/contracts/treedx/repositories/contracts/diff.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/repositories/contracts/diff.js +0 -6
- package/dist/treedx/client/support/contracts/treedx/repositories/contracts/fetch-remote.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/repositories/contracts/fetch-remote.js +0 -7
- package/dist/treedx/client/support/contracts/treedx/repositories/contracts/push.d.ts +0 -6
- package/dist/treedx/client/support/contracts/treedx/repositories/contracts/push.js +0 -23
- package/dist/treedx/client/support/contracts/treedx/search/contracts/compact-search-index.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/search/contracts/compact-search-index.js +0 -8
- package/dist/treedx/client/support/contracts/treedx/search/contracts/search.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/search/contracts/search.js +0 -7
- package/dist/treedx/client/support/contracts/treedx/storage/contracts/backup-storage.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/storage/contracts/backup-storage.js +0 -8
- package/dist/treedx/client/support/contracts/treedx/storage/contracts/compact-storage.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/storage/contracts/compact-storage.js +0 -8
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/assert-binary-ok.d.ts +0 -2
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/assert-binary-ok.js +0 -15
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/fetch-with-timeout.d.ts +0 -2
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/fetch-with-timeout.js +0 -38
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/headers.d.ts +0 -2
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/headers.js +0 -15
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/parse-json-response.d.ts +0 -2
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/parse-json-response.js +0 -15
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/query.d.ts +0 -2
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/query.js +0 -14
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/repo-id.d.ts +0 -2
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/repo-id.js +0 -14
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/request.d.ts +0 -6
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/request.js +0 -41
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/throw-api-error.d.ts +0 -2
- package/dist/treedx/client/support/contracts/treedx/transport/contracts/throw-api-error.js +0 -14
- package/dist/treedx/client/support/contracts/treedx/workspaces/contracts/exec.d.ts +0 -3
- package/dist/treedx/client/support/contracts/treedx/workspaces/contracts/exec.js +0 -7
- package/dist/treedx/client/support/creation/apply-changeset.d.ts +0 -3
- package/dist/treedx/client/support/creation/apply-changeset.js +0 -10
- package/dist/treedx/client/support/creation/apply-storage-migration.d.ts +0 -3
- package/dist/treedx/client/support/creation/apply-storage-migration.js +0 -7
- package/dist/treedx/client/support/creation/create-migration.d.ts +0 -6
- package/dist/treedx/client/support/creation/create-migration.js +0 -7
- package/dist/treedx/client/support/creation/export-artifact.d.ts +0 -3
- package/dist/treedx/client/support/creation/export-artifact.js +0 -8
- package/dist/treedx/client/support/creation/plan-storage-migration.d.ts +0 -3
- package/dist/treedx/client/support/creation/plan-storage-migration.js +0 -7
- package/dist/treedx/client/support/creation/request-binary.d.ts +0 -6
- package/dist/treedx/client/support/creation/request-binary.js +0 -42
- package/dist/treedx/client/support/creation/write-file.d.ts +0 -3
- package/dist/treedx/client/support/creation/write-file.js +0 -10
- package/dist/treedx/client/support/creation/write-files.d.ts +0 -3
- package/dist/treedx/client/support/creation/write-files.js +0 -12
- package/dist/treedx/client/support/queries/treedx/artifacts/queries/get-artifact.d.ts +0 -3
- package/dist/treedx/client/support/queries/treedx/artifacts/queries/get-artifact.js +0 -7
- package/dist/treedx/client/support/queries/treedx/artifacts/queries/list-artifacts.d.ts +0 -3
- package/dist/treedx/client/support/queries/treedx/artifacts/queries/list-artifacts.js +0 -7
- package/dist/treedx/client/support/queries/treedx/authorization/queries/effective-scope.d.ts +0 -3
- package/dist/treedx/client/support/queries/treedx/authorization/queries/effective-scope.js +0 -9
- package/dist/treedx/client/support/queries/treedx/authorization/queries/list-capabilities.d.ts +0 -4
- package/dist/treedx/client/support/queries/treedx/authorization/queries/list-capabilities.js +0 -6
- package/dist/treedx/client/support/queries/treedx/federation/queries/get-placement.d.ts +0 -3
- package/dist/treedx/client/support/queries/treedx/federation/queries/get-placement.js +0 -7
- package/dist/treedx/client/support/queries/treedx/graph/queries/get-node.d.ts +0 -3
- package/dist/treedx/client/support/queries/treedx/graph/queries/get-node.js +0 -7
- package/dist/treedx/client/support/queries/treedx/graph/queries/get-related.d.ts +0 -3
- package/dist/treedx/client/support/queries/treedx/graph/queries/get-related.js +0 -7
- package/dist/treedx/client/support/queries/treedx/graph/queries/list-nodes.d.ts +0 -3
- package/dist/treedx/client/support/queries/treedx/graph/queries/list-nodes.js +0 -7
- package/dist/treedx/client/support/queries/treedx/repositories/queries/list-tree.d.ts +0 -3
- package/dist/treedx/client/support/queries/treedx/repositories/queries/list-tree.js +0 -10
- package/dist/treedx/client/support/queries/treedx/repositories/queries/read-file.d.ts +0 -3
- package/dist/treedx/client/support/queries/treedx/repositories/queries/read-file.js +0 -9
- package/dist/treedx/client/support/queries/treedx/search/queries/get-search-index-status.d.ts +0 -3
- package/dist/treedx/client/support/queries/treedx/search/queries/get-search-index-status.js +0 -7
- package/dist/treedx/client/support/queries/treedx/storage/queries/get-migration.d.ts +0 -6
- package/dist/treedx/client/support/queries/treedx/storage/queries/get-migration.js +0 -7
- package/dist/treedx/client/support/queries/treedx/storage/queries/get-snapshot.d.ts +0 -6
- package/dist/treedx/client/support/queries/treedx/storage/queries/get-snapshot.js +0 -7
- package/dist/treedx/client/support/queries/treedx/storage/queries/list-storage-migrations.d.ts +0 -6
- package/dist/treedx/client/support/queries/treedx/storage/queries/list-storage-migrations.js +0 -6
- package/dist/treedx/client/support/queries/treedx/transport/queries/list-audit-events.d.ts +0 -15
- package/dist/treedx/client/support/queries/treedx/transport/queries/list-audit-events.js +0 -6
- package/dist/treedx/client/support/queries/treedx/transport/queries/list-repositories.d.ts +0 -3
- package/dist/treedx/client/support/queries/treedx/transport/queries/list-repositories.js +0 -7
- package/dist/treedx/client/support/retirement/cleanup-artifacts.d.ts +0 -3
- package/dist/treedx/client/support/retirement/cleanup-artifacts.js +0 -7
- package/dist/treedx/client/support/retirement/delete-artifact.d.ts +0 -3
- package/dist/treedx/client/support/retirement/delete-artifact.js +0 -7
- package/dist/treedx/client/support/retirement/delete-file.d.ts +0 -3
- package/dist/treedx/client/support/retirement/delete-file.js +0 -10
- package/dist/treedx/client/support/retirement/rollback-storage-migration.d.ts +0 -3
- package/dist/treedx/client/support/retirement/rollback-storage-migration.js +0 -7
- package/dist/treedx/client/support/updates/patch-file.d.ts +0 -3
- package/dist/treedx/client/support/updates/patch-file.js +0 -10
- package/dist/treedx/client/support/updates/refresh-search-index.d.ts +0 -3
- package/dist/treedx/client/support/updates/refresh-search-index.js +0 -8
- package/dist/treedx/client/treedx/blobs/contracts/download-blob.d.ts +0 -3
- package/dist/treedx/client/treedx/blobs/contracts/download-blob.js +0 -6
- package/dist/treedx/client/treedx/blobs/creation/create-blob-upload.d.ts +0 -3
- package/dist/treedx/client/treedx/blobs/creation/create-blob-upload.js +0 -8
- package/dist/treedx/client/treedx/blobs/creation/request-blob-download.d.ts +0 -3
- package/dist/treedx/client/treedx/blobs/creation/request-blob-download.js +0 -27
- package/dist/treedx/client/treedx/blobs/creation/request-blob-upload.d.ts +0 -3
- package/dist/treedx/client/treedx/blobs/creation/request-blob-upload.js +0 -41
- package/dist/treedx/client/treedx/blobs/creation/upload-blob-part.d.ts +0 -3
- package/dist/treedx/client/treedx/blobs/creation/upload-blob-part.js +0 -27
- package/dist/treedx/client/treedx/blobs/creation/upload-blob.d.ts +0 -3
- package/dist/treedx/client/treedx/blobs/creation/upload-blob.js +0 -6
- package/dist/treedx/client/treedx/blobs/creation/write-blob.d.ts +0 -3
- package/dist/treedx/client/treedx/blobs/creation/write-blob.js +0 -8
- package/dist/treedx/client/treedx/blobs/lifecycle/complete-blob-upload.d.ts +0 -3
- package/dist/treedx/client/treedx/blobs/lifecycle/complete-blob-upload.js +0 -8
- package/dist/treedx/client/treedx/blobs/queries/read-blob.d.ts +0 -3
- package/dist/treedx/client/treedx/blobs/queries/read-blob.js +0 -10
- package/dist/treedx/client/treedx/blobs/retirement/abort-blob-upload.d.ts +0 -3
- package/dist/treedx/client/treedx/blobs/retirement/abort-blob-upload.js +0 -7
- package/dist/treedx/client/treedx/blobs/retirement/delete-blob.d.ts +0 -3
- package/dist/treedx/client/treedx/blobs/retirement/delete-blob.js +0 -8
- package/dist/treedx/client/treedx/federation/contracts/federated-query.d.ts +0 -3
- package/dist/treedx/client/treedx/federation/contracts/federated-query.js +0 -7
- package/dist/treedx/client/treedx/federation/creation/plan-federated-query.d.ts +0 -3
- package/dist/treedx/client/treedx/federation/creation/plan-federated-query.js +0 -6
- package/dist/treedx/client/treedx/federation/queries/check-mirror-health.d.ts +0 -3
- package/dist/treedx/client/treedx/federation/queries/check-mirror-health.js +0 -7
- package/dist/treedx/client/treedx/federation/updates/promote-mirror.d.ts +0 -3
- package/dist/treedx/client/treedx/federation/updates/promote-mirror.js +0 -7
- package/dist/treedx/client/treedx/federation/updates/sync-mirror.d.ts +0 -3
- package/dist/treedx/client/treedx/federation/updates/sync-mirror.js +0 -7
- package/dist/treedx/client/treedx/graph/contracts/federated-context.d.ts +0 -3
- package/dist/treedx/client/treedx/graph/contracts/federated-context.js +0 -7
- package/dist/treedx/client/treedx/graph/contracts/federated-graph.d.ts +0 -3
- package/dist/treedx/client/treedx/graph/contracts/federated-graph.js +0 -7
- package/dist/treedx/client/treedx/graph/contracts/graph-search.d.ts +0 -3
- package/dist/treedx/client/treedx/graph/contracts/graph-search.js +0 -8
- package/dist/treedx/client/treedx/graph/queries/get-graph-node.d.ts +0 -3
- package/dist/treedx/client/treedx/graph/queries/get-graph-node.js +0 -10
- package/dist/treedx/client/treedx/graph/queries/get-graph-refresh-job.d.ts +0 -3
- package/dist/treedx/client/treedx/graph/queries/get-graph-refresh-job.js +0 -7
- package/dist/treedx/client/treedx/graph/queries/get-subgraph.d.ts +0 -3
- package/dist/treedx/client/treedx/graph/queries/get-subgraph.js +0 -7
- package/dist/treedx/client/treedx/graph/queries/query-graph.d.ts +0 -3
- package/dist/treedx/client/treedx/graph/queries/query-graph.js +0 -7
- package/dist/treedx/client/treedx/graph/queries/search-graph-entities.d.ts +0 -3
- package/dist/treedx/client/treedx/graph/queries/search-graph-entities.js +0 -6
- package/dist/treedx/client/treedx/graph/queries/search-graph-files.d.ts +0 -3
- package/dist/treedx/client/treedx/graph/queries/search-graph-files.js +0 -6
- package/dist/treedx/client/treedx/graph/queries/search-graph-sections.d.ts +0 -3
- package/dist/treedx/client/treedx/graph/queries/search-graph-sections.js +0 -6
- package/dist/treedx/client/treedx/graph/updates/refresh-graph.d.ts +0 -3
- package/dist/treedx/client/treedx/graph/updates/refresh-graph.js +0 -7
- package/dist/treedx/client/treedx/search/contracts/federated-search.d.ts +0 -3
- package/dist/treedx/client/treedx/search/contracts/federated-search.js +0 -7
- package/dist/treedx/client/treedx/workspaces/creation/create-workspace.d.ts +0 -3
- package/dist/treedx/client/treedx/workspaces/creation/create-workspace.js +0 -7
- package/dist/treedx/client/treedx/workspaces/retirement/abandon-workspace.d.ts +0 -3
- package/dist/treedx/client/treedx/workspaces/retirement/abandon-workspace.js +0 -12
- package/dist/treedx/client/treedx/workspaces/retirement/close-workspace.d.ts +0 -2
- package/dist/treedx/client/treedx/workspaces/retirement/close-workspace.js +0 -6
- package/dist/treedx/generated/openapi-types.d.ts +0 -3662
- package/dist/treedx/generated/openapi-types.js +0 -0
- package/dist/treedx/support/client.d.ts +0 -251
- package/dist/treedx/support/client.js +0 -252
- package/dist/treedx/support/errors.d.ts +0 -13
- package/dist/treedx/support/errors.js +0 -17
- package/dist/treedx/types/tree-dx-actor.d.ts +0 -209
- package/dist/treedx/types/tree-dx-actor.js +0 -8
- package/dist/treedx/types/tree-dx-artifact-list-response.d.ts +0 -13
- package/dist/treedx/types/tree-dx-artifact-list-response.js +0 -0
- package/dist/treedx/types/tree-dx-changeset.d.ts +0 -51
- package/dist/treedx/types/tree-dx-changeset.js +0 -6
- package/dist/treedx/types/tree-dx-context-request.d.ts +0 -245
- package/dist/treedx/types/tree-dx-context-request.js +0 -0
- package/dist/treedx/types/tree-dx-exec-result.d.ts +0 -249
- package/dist/treedx/types/tree-dx-exec-result.js +0 -0
- package/dist/treedx/types/tree-dx-list-tree-request.d.ts +0 -222
- package/dist/treedx/types/tree-dx-list-tree-request.js +0 -0
- package/dist/treedx/types/tree-dx-push-request.d.ts +0 -229
- package/dist/treedx/types/tree-dx-push-request.js +0 -0
- /package/dist/{agent-capacity/contracts/operations/workflow-promotion.js → site-contracts/cloudflare.js} +0 -0
- /package/dist/{agent-capacity/contracts/support/decision-work.js → site-contracts/platform.js} +0 -0
|
@@ -1,50 +1,43 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
} from "./
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
riskClass: "ordinary",
|
|
42
|
-
confirmation: "never",
|
|
43
|
-
surfaces,
|
|
44
|
-
cacheScope: "principal",
|
|
45
|
-
pagination: "none"
|
|
46
|
-
}, { path: empty, query: empty, body: none, output: payload });
|
|
47
|
-
}
|
|
2
|
+
import { defineOperation as define, defineTreeDxProxyOperation as treedxProxy, defineReadOperation as read } from "./operation-builder.js";
|
|
3
|
+
import { communicationOperations, providerCommunicationLifecycleOperations, providerDiscussionResponseOperation } from "./catalog/communication-operations.js";
|
|
4
|
+
import { inboxOperations } from "./catalog/inbox-operations.js";
|
|
5
|
+
import { WORKDAY_PROFILE_OPERATIONS } from "./catalog/workdays/profile-operations.js";
|
|
6
|
+
import { adminAccountOperations, adminTeamOperations } from "./catalog/admin-account-team-operations.js";
|
|
7
|
+
import { TREEAI_CONTROL_PLANE_OPERATIONS } from "./catalog/treeai-operations.js";
|
|
8
|
+
import { capabilityOntologyOperations } from "./catalog/capability-ontology-operations.js";
|
|
9
|
+
import { knowledgeShareOperations } from "./catalog/knowledge-share-operations.js";
|
|
10
|
+
import { PROVIDER_ENVIRONMENT_OPERATIONS } from "./catalog/provider-environment-operations.js";
|
|
11
|
+
import { HOSTED_TOPOLOGY_OPERATIONS } from "./catalog/hosted-topology-operations.js";
|
|
12
|
+
import { AI_INSTANCE_OPERATIONS } from "./catalog/infrastructure/ai-instance-operations.js";
|
|
13
|
+
import { SECRET_OPERATIONS } from "./catalog/services/secret-operations.js";
|
|
14
|
+
import { buildControlPlaneCatalog, flattenControlPlaneOperations } from "./catalog/control-plane-catalog.js";
|
|
15
|
+
import { EXECUTION_OPERATIONS } from "./catalog/execution/execution-operations.js";
|
|
16
|
+
import { AGENT_TEAM_CLONE_OPERATIONS } from "./catalog/agents/agent-team-clone-operations.js";
|
|
17
|
+
import { workdayIntentRequestSchema } from "./workday-lifecycle.js";
|
|
18
|
+
const empty = z.object({}).strict(), none = z.undefined(), record = z.record(z.unknown()), payload = record;
|
|
19
|
+
const workdayIntent = workdayIntentRequestSchema;
|
|
20
|
+
const scheduledWorkdayIntent = record.transform((value, context) => {
|
|
21
|
+
const intent = workdayIntent.safeParse(value.intent);
|
|
22
|
+
if (!intent.success) {
|
|
23
|
+
for (const issue of intent.error.issues) context.addIssue({ ...issue, path: ["intent", ...issue.path] });
|
|
24
|
+
return z.NEVER;
|
|
25
|
+
}
|
|
26
|
+
return { ...value, intent: intent.data };
|
|
27
|
+
});
|
|
28
|
+
const providerRequest = record.superRefine((value, context) => {
|
|
29
|
+
if (Object.hasOwn(value, "modeRunId")) context.addIssue({ code: z.ZodIssueCode.custom, path: ["modeRunId"], message: "Mode-run identity is retired; use assignment and attempt identity." });
|
|
30
|
+
});
|
|
31
|
+
const providerEventRequest = providerRequest.superRefine((value, context) => {
|
|
32
|
+
if (!Object.hasOwn(value, "protectedPayload")) return;
|
|
33
|
+
const protectedPayload = value.protectedPayload;
|
|
34
|
+
if (!protectedPayload || typeof protectedPayload !== "object" || Array.isArray(protectedPayload) || Object.keys(protectedPayload).length === 0)
|
|
35
|
+
context.addIssue({ code: z.ZodIssueCode.custom, path: ["protectedPayload"], message: "Protected evidence must be a nonempty object." });
|
|
36
|
+
for (const field of ["leaseToken", "runnerId"]) if (typeof value[field] !== "string" || !value[field].trim())
|
|
37
|
+
context.addIssue({ code: z.ZodIssueCode.custom, path: [field], message: "Protected evidence requires exact lease and runner authority." });
|
|
38
|
+
if (!Number.isSafeInteger(value.sequence) || Number(value.sequence) < 0)
|
|
39
|
+
context.addIssue({ code: z.ZodIssueCode.custom, path: ["sequence"], message: "Protected evidence requires a nonnegative integer sequence." });
|
|
40
|
+
});
|
|
48
41
|
function providerPath(operationId, method, path, pathShape, options = {}) {
|
|
49
42
|
const kind = options.read ? "read" : "mutation";
|
|
50
43
|
return define({
|
|
@@ -53,7 +46,7 @@ function providerPath(operationId, method, path, pathShape, options = {}) {
|
|
|
53
46
|
rest: { method, path },
|
|
54
47
|
parameters: `treeseed.${operationId}.parameters/v1`,
|
|
55
48
|
capability: "providers.execute",
|
|
56
|
-
authentication: "provider",
|
|
49
|
+
authentication: options.authentication ?? "provider",
|
|
57
50
|
oauthScopes: [],
|
|
58
51
|
kind,
|
|
59
52
|
riskClass: "ordinary",
|
|
@@ -62,14 +55,14 @@ function providerPath(operationId, method, path, pathShape, options = {}) {
|
|
|
62
55
|
cacheScope: "none",
|
|
63
56
|
pagination: "none",
|
|
64
57
|
redactedPaths: options.redactedPaths
|
|
65
|
-
}, { path: z.object(pathShape).strict(), query: empty, body: method === "GET" ? none :
|
|
58
|
+
}, { path: z.object(pathShape).strict(), query: empty, body: method === "GET" ? none : options.body ?? providerRequest, output: payload });
|
|
66
59
|
}
|
|
67
60
|
const noPathProvider = (operationId, method, path, options = {}) => define({
|
|
68
61
|
operationId,
|
|
69
62
|
description: `${options.read ? "Read" : "Apply"} ${operationId}.`,
|
|
70
63
|
rest: { method, path },
|
|
71
64
|
capability: "providers.execute",
|
|
72
|
-
authentication: "provider",
|
|
65
|
+
authentication: options.authentication ?? "provider",
|
|
73
66
|
oauthScopes: [],
|
|
74
67
|
kind: options.read ? "read" : "mutation",
|
|
75
68
|
riskClass: "ordinary",
|
|
@@ -79,6 +72,24 @@ const noPathProvider = (operationId, method, path, options = {}) => define({
|
|
|
79
72
|
pagination: "none",
|
|
80
73
|
redactedPaths: options.redactedPaths
|
|
81
74
|
}, { path: empty, query: empty, body: method === "GET" ? none : record, output: payload });
|
|
75
|
+
function postRead(operationId, path, pathShape, capability, scopes, surfaces) {
|
|
76
|
+
return define({
|
|
77
|
+
operationId,
|
|
78
|
+
description: `Read ${operationId}.`,
|
|
79
|
+
rest: { method: "POST", path },
|
|
80
|
+
...Object.keys(pathShape).length ? { parameters: `treeseed.${operationId}.parameters/v1` } : {},
|
|
81
|
+
capability,
|
|
82
|
+
authentication: "oauth",
|
|
83
|
+
oauthScopes: scopes,
|
|
84
|
+
kind: "read",
|
|
85
|
+
riskClass: "ordinary",
|
|
86
|
+
confirmation: "never",
|
|
87
|
+
surfaces,
|
|
88
|
+
cacheScope: "none",
|
|
89
|
+
pagination: "none",
|
|
90
|
+
idempotencyRequired: false
|
|
91
|
+
}, { path: z.object(pathShape).strict(), query: empty, body: record, output: payload });
|
|
92
|
+
}
|
|
82
93
|
function resource(operationId, method, path, pathShape, options = { capability: "control-plane.use" }) {
|
|
83
94
|
const kind = method === "GET" ? "read" : "mutation";
|
|
84
95
|
const riskClass = options.risk ?? "ordinary";
|
|
@@ -94,13 +105,18 @@ function resource(operationId, method, path, pathShape, options = { capability:
|
|
|
94
105
|
riskClass,
|
|
95
106
|
confirmation: riskClass === "ordinary" ? "never" : "input_required",
|
|
96
107
|
surfaces: options.surfaces ?? ["rest"],
|
|
97
|
-
cacheScope: kind === "read" ? "principal" : "none",
|
|
108
|
+
cacheScope: options.cacheScope ?? (kind === "read" ? "principal" : "none"),
|
|
98
109
|
pagination: options.pagination ?? "none",
|
|
99
110
|
concurrencyRequired: options.concurrency,
|
|
100
111
|
redactedPaths: options.redactedPaths
|
|
101
|
-
}, { path: z.object(pathShape).strict(), query: kind === "read" ? record : empty, body: kind === "read" ? none : record, output: payload });
|
|
112
|
+
}, { path: z.object(pathShape).strict(), query: kind === "read" ? record : empty, body: kind === "read" ? none : options.body ?? record, output: payload });
|
|
102
113
|
}
|
|
103
114
|
const CONTROL_PLANE_OPERATIONS = {
|
|
115
|
+
aiInstances: AI_INSTANCE_OPERATIONS,
|
|
116
|
+
infrastructure: { topology: HOSTED_TOPOLOGY_OPERATIONS },
|
|
117
|
+
capabilities: capabilityOntologyOperations(),
|
|
118
|
+
inbox: inboxOperations(),
|
|
119
|
+
treeai: TREEAI_CONTROL_PLANE_OPERATIONS,
|
|
104
120
|
status: {
|
|
105
121
|
show: read("status.show", "/v1/status", "status.read", ["rest", "cli", "mcp_tool", "mcp_resource"])
|
|
106
122
|
},
|
|
@@ -121,12 +137,12 @@ const CONTROL_PLANE_OPERATIONS = {
|
|
|
121
137
|
surfaces: ["rest", "cli", "mcp_tool"],
|
|
122
138
|
cacheScope: "principal",
|
|
123
139
|
pagination: "cursor"
|
|
124
|
-
}, { path: empty, query: z.object({ teamId: z.string().min(1).optional(), limit: z.number().int().positive().max(200).optional(), cursor: z.string().min(1).optional() }).strict(), body: none, output: payload }),
|
|
140
|
+
}, { path: empty, query: z.object({ teamId: z.string().min(1).optional(), limit: z.coerce.number().int().positive().max(200).optional(), cursor: z.string().min(1).optional() }).strict(), body: none, output: payload }),
|
|
125
141
|
show: resource("projects.show", "GET", "/v1/projects/{projectId}", { projectId: z.string().min(1) }, { capability: "projects.read", surfaces: ["rest", "cli", "mcp_tool", "mcp_resource"] }),
|
|
126
|
-
create: resource("projects.create", "POST", "/v1/teams/{teamId}/projects", { teamId: z.string().min(1) }, { capability: "projects.write", surfaces: ["rest", "cli"
|
|
127
|
-
update: resource("projects.update", "PUT", "/v1/projects/{projectId}", { projectId: z.string().min(1) }, { capability: "projects.write", surfaces: ["rest", "cli"
|
|
128
|
-
archive: resource("projects.archive", "POST", "/v1/projects/{projectId}/archive", { projectId: z.string().min(1) }, { capability: "projects.write", surfaces: ["rest", "cli"
|
|
129
|
-
restore: resource("projects.restore", "POST", "/v1/projects/{projectId}/restore", { projectId: z.string().min(1) }, { capability: "projects.write", surfaces: ["rest", "cli"
|
|
142
|
+
create: resource("projects.create", "POST", "/v1/teams/{teamId}/projects", { teamId: z.string().min(1) }, { capability: "projects.write", surfaces: ["rest", "cli"] }),
|
|
143
|
+
update: resource("projects.update", "PUT", "/v1/projects/{projectId}", { projectId: z.string().min(1) }, { capability: "projects.write", surfaces: ["rest", "cli"], concurrency: true }),
|
|
144
|
+
archive: resource("projects.archive", "POST", "/v1/projects/{projectId}/archive", { projectId: z.string().min(1) }, { capability: "projects.write", surfaces: ["rest", "cli"], risk: "destructive", concurrency: true }),
|
|
145
|
+
restore: resource("projects.restore", "POST", "/v1/projects/{projectId}/restore", { projectId: z.string().min(1) }, { capability: "projects.write", surfaces: ["rest", "cli"], concurrency: true }),
|
|
130
146
|
deletionBlockers: resource("projects.deletion.blockers", "GET", "/v1/projects/{projectId}/deletion-blockers", { projectId: z.string().min(1) }, { capability: "projects.read" }),
|
|
131
147
|
remove: resource("projects.delete", "DELETE", "/v1/projects/{projectId}", { projectId: z.string().min(1) }, { capability: "projects.delete", risk: "irreversible", concurrency: true }),
|
|
132
148
|
access: resource("projects.access.show", "GET", "/v1/projects/{projectId}/access", { projectId: z.string().min(1) }, { capability: "projects.read" }),
|
|
@@ -136,7 +152,8 @@ const CONTROL_PLANE_OPERATIONS = {
|
|
|
136
152
|
updateRepositoryTopology: resource("projects.repository.update", "PUT", "/v1/projects/{projectId}/repository-topology", { projectId: z.string().min(1) }, { capability: "repositories.write", concurrency: true })
|
|
137
153
|
},
|
|
138
154
|
accounts: {
|
|
139
|
-
|
|
155
|
+
...adminAccountOperations,
|
|
156
|
+
current: resource("accounts.current.show", "GET", "/v1/me", {}, { capability: "accounts.read", surfaces: ["rest", "cli"] }),
|
|
140
157
|
register: resource("accounts.register", "POST", "/v1/auth/web/sign-up", {}, { capability: "accounts.register", scopes: [], redactedPaths: ["body.password"] }),
|
|
141
158
|
confirmEmail: resource("accounts.email.confirm", "POST", "/v1/auth/web/confirm-email", {}, { capability: "accounts.register", scopes: [], redactedPaths: ["body.token"] }),
|
|
142
159
|
requestPasswordReset: resource("accounts.password.reset.request", "POST", "/v1/auth/web/password-reset/request", {}, { capability: "accounts.register", scopes: [] }),
|
|
@@ -159,9 +176,10 @@ const CONTROL_PLANE_OPERATIONS = {
|
|
|
159
176
|
readNotification: resource("accounts.notifications.read", "POST", "/v1/auth/web/notifications/{notificationId}/read", { notificationId: z.string().min(1) }, { capability: "accounts.write" })
|
|
160
177
|
},
|
|
161
178
|
teams: {
|
|
179
|
+
...adminTeamOperations,
|
|
162
180
|
list: resource("teams.list", "GET", "/v1/teams", {}, { capability: "teams.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
|
|
163
|
-
create: resource("teams.create", "POST", "/v1/teams", {}, { capability: "teams.write", surfaces: ["rest", "cli"
|
|
164
|
-
profile: resource("teams.profile.show", "GET", "/v1/teams/by-name/{name}/profile", { name: z.string().min(1) }, { capability: "teams.read",
|
|
181
|
+
create: resource("teams.create", "POST", "/v1/teams", {}, { capability: "teams.write", surfaces: ["rest", "cli"] }),
|
|
182
|
+
profile: resource("teams.profile.show", "GET", "/v1/teams/by-name/{name}/profile", { name: z.string().min(1) }, { capability: "teams.read", scopes: [], authentication: "anonymous", cacheScope: "public", surfaces: ["rest"] }),
|
|
165
183
|
update: resource("teams.update", "PATCH", "/v1/teams/{teamId}", { teamId: z.string().min(1) }, { capability: "teams.write", concurrency: true }),
|
|
166
184
|
access: resource("teams.access.show", "GET", "/v1/teams/{teamId}/access", { teamId: z.string().min(1) }, { capability: "teams.read" }),
|
|
167
185
|
members: resource("teams.members.list", "GET", "/v1/teams/{teamId}/members", { teamId: z.string().min(1) }, { capability: "teams.read", pagination: "cursor" }),
|
|
@@ -178,11 +196,12 @@ const CONTROL_PLANE_OPERATIONS = {
|
|
|
178
196
|
leave: resource("teams.leave", "POST", "/v1/teams/{teamId}/leave", { teamId: z.string().min(1) }, { capability: "teams.write", risk: "destructive" })
|
|
179
197
|
},
|
|
180
198
|
discussions: {
|
|
181
|
-
list: resource("discussions.list", "GET", "/v1/discussions", {}, { capability: "discussions.read", surfaces: ["rest"
|
|
182
|
-
create: resource("discussions.create", "POST", "/v1/discussions", {}, { capability: "discussions.write", scopes: ["treeseed:knowledge:write"], surfaces: ["rest"
|
|
199
|
+
list: resource("discussions.list", "GET", "/v1/discussions", {}, { capability: "discussions.read", surfaces: ["rest"], pagination: "cursor" }),
|
|
200
|
+
create: resource("discussions.create", "POST", "/v1/discussions", {}, { capability: "discussions.write", scopes: ["treeseed:knowledge:write"], surfaces: ["rest"] }),
|
|
183
201
|
updateStatus: resource("discussions.status.update", "POST", "/v1/discussions/{discussionId}/status", { discussionId: z.string().min(1) }, { capability: "discussions.write", scopes: ["treeseed:knowledge:write"], concurrency: true })
|
|
184
202
|
},
|
|
185
203
|
knowledge: {
|
|
204
|
+
...knowledgeShareOperations(),
|
|
186
205
|
library: resource("knowledge.library.list", "GET", "/v1/knowledge/library", {}, { capability: "knowledge.read", surfaces: ["rest", "mcp_tool", "mcp_resource"], pagination: "cursor" }),
|
|
187
206
|
reader: resource("knowledge.reader.show", "GET", "/v1/knowledge/reader", {}, { capability: "knowledge.read", surfaces: ["rest", "mcp_resource"] }),
|
|
188
207
|
context: resource("knowledge.context.show", "GET", "/v1/knowledge/context", {}, { capability: "knowledge.read", surfaces: ["rest", "mcp_tool"] }),
|
|
@@ -190,37 +209,45 @@ const CONTROL_PLANE_OPERATIONS = {
|
|
|
190
209
|
search: resource("knowledge.search", "GET", "/v1/knowledge/search", {}, { capability: "knowledge.read", surfaces: ["rest", "mcp_tool"], pagination: "cursor" }),
|
|
191
210
|
teamCatalog: resource("knowledge.catalog.team", "GET", "/v1/teams/{teamId}/knowledge/catalog", { teamId: z.string().min(1) }, { capability: "knowledge.read", pagination: "cursor" }),
|
|
192
211
|
projectCatalog: resource("knowledge.catalog.project", "GET", "/v1/projects/{projectId}/knowledge/catalog", { projectId: z.string().min(1) }, { capability: "knowledge.read", pagination: "cursor" }),
|
|
193
|
-
createWorkspace: resource("knowledge.workspaces.create", "POST", "/v1/projects/{projectId}/knowledge/workspaces", { projectId: z.string().min(1) }, { capability: "knowledge.write", scopes: ["treeseed:knowledge:write"] }),
|
|
194
|
-
workspace: resource("knowledge.workspaces.show", "GET", "/v1/knowledge/workspaces/{workspaceId}", { workspaceId: z.string().min(1) }, { capability: "knowledge.read" }),
|
|
195
|
-
workspaceContent: resource("knowledge.workspaces.content.show", "GET", "/v1/knowledge/workspaces/{workspaceId}/content", { workspaceId: z.string().min(1) }, { capability: "knowledge.read" }),
|
|
196
|
-
updateWorkspaceContent: resource("knowledge.workspaces.content.update", "PUT", "/v1/knowledge/workspaces/{workspaceId}/content", { workspaceId: z.string().min(1) }, { capability: "knowledge.write", scopes: ["treeseed:knowledge:write"], concurrency: true }),
|
|
197
|
-
workspaceDiff: resource("knowledge.workspaces.diff", "GET", "/v1/knowledge/workspaces/{workspaceId}/diff", { workspaceId: z.string().min(1) }, { capability: "knowledge.read" }),
|
|
198
|
-
abandonWorkspace: resource("knowledge.workspaces.abandon", "POST", "/v1/knowledge/workspaces/{workspaceId}/abandon", { workspaceId: z.string().min(1) }, { capability: "knowledge.write", scopes: ["treeseed:knowledge:write"], risk: "destructive", concurrency: true }),
|
|
199
|
-
submitWorkspace: resource("knowledge.workspaces.submit", "POST", "/v1/knowledge/workspaces/{workspaceId}/submit", { workspaceId: z.string().min(1) }, { capability: "knowledge.write", scopes: ["treeseed:knowledge:write"], concurrency: true }),
|
|
200
|
-
reviews: resource("knowledge.reviews.list", "GET", "/v1/teams/{teamId}/knowledge/reviews", { teamId: z.string().min(1) }, { capability: "knowledge.review", pagination: "cursor" }),
|
|
212
|
+
createWorkspace: resource("knowledge.workspaces.create", "POST", "/v1/projects/{projectId}/knowledge/workspaces", { projectId: z.string().min(1) }, { capability: "knowledge.write", scopes: ["treeseed:knowledge:write"], surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
213
|
+
workspace: resource("knowledge.workspaces.show", "GET", "/v1/knowledge/workspaces/{workspaceId}", { workspaceId: z.string().min(1) }, { capability: "knowledge.read", surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
214
|
+
workspaceContent: resource("knowledge.workspaces.content.show", "GET", "/v1/knowledge/workspaces/{workspaceId}/content", { workspaceId: z.string().min(1) }, { capability: "knowledge.read", surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
215
|
+
updateWorkspaceContent: resource("knowledge.workspaces.content.update", "PUT", "/v1/knowledge/workspaces/{workspaceId}/content", { workspaceId: z.string().min(1) }, { capability: "knowledge.write", scopes: ["treeseed:knowledge:write"], surfaces: ["rest", "cli", "mcp_tool"], concurrency: true }),
|
|
216
|
+
workspaceDiff: resource("knowledge.workspaces.diff", "GET", "/v1/knowledge/workspaces/{workspaceId}/diff", { workspaceId: z.string().min(1) }, { capability: "knowledge.read", surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
217
|
+
abandonWorkspace: resource("knowledge.workspaces.abandon", "POST", "/v1/knowledge/workspaces/{workspaceId}/abandon", { workspaceId: z.string().min(1) }, { capability: "knowledge.write", scopes: ["treeseed:knowledge:write"], surfaces: ["rest", "cli", "mcp_tool"], risk: "destructive", concurrency: true }),
|
|
218
|
+
submitWorkspace: resource("knowledge.workspaces.submit", "POST", "/v1/knowledge/workspaces/{workspaceId}/submit", { workspaceId: z.string().min(1) }, { capability: "knowledge.write", scopes: ["treeseed:knowledge:write"], surfaces: ["rest", "cli", "mcp_tool"], concurrency: true }),
|
|
219
|
+
reviews: resource("knowledge.reviews.list", "GET", "/v1/teams/{teamId}/knowledge/reviews", { teamId: z.string().min(1) }, { capability: "knowledge.review", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
|
|
201
220
|
commentReview: resource("knowledge.reviews.comments.create", "POST", "/v1/knowledge/reviews/{reviewId}/comments", { reviewId: z.string().min(1) }, { capability: "knowledge.review", scopes: ["treeseed:knowledge:write"] }),
|
|
202
|
-
decideReview: resource("knowledge.reviews.decide", "POST", "/v1/knowledge/reviews/{reviewId}/decision", { reviewId: z.string().min(1) }, { capability: "knowledge.review", scopes: ["treeseed:knowledge:write"], concurrency: true }),
|
|
203
|
-
publishReview: resource("knowledge.reviews.publish", "POST", "/v1/knowledge/reviews/{reviewId}/publish", { reviewId: z.string().min(1) }, { capability: "knowledge.publish", scopes: ["treeseed:knowledge:write"], concurrency: true })
|
|
221
|
+
decideReview: resource("knowledge.reviews.decide", "POST", "/v1/knowledge/reviews/{reviewId}/decision", { reviewId: z.string().min(1) }, { capability: "knowledge.review", scopes: ["treeseed:knowledge:write"], surfaces: ["rest", "cli", "mcp_tool"], concurrency: true }),
|
|
222
|
+
publishReview: resource("knowledge.reviews.publish", "POST", "/v1/knowledge/reviews/{reviewId}/publish", { reviewId: z.string().min(1) }, { capability: "knowledge.publish", scopes: ["treeseed:knowledge:write"], surfaces: ["rest", "cli", "mcp_tool"], concurrency: true })
|
|
204
223
|
},
|
|
205
224
|
governance: {
|
|
206
|
-
proposals: resource("governance.proposals.list", "GET", "/v1/projects/{projectId}/proposals", { projectId: z.string().min(1) }, { capability: "governance.read", surfaces: ["rest", "mcp_tool", "mcp_resource"], pagination: "cursor" }),
|
|
207
|
-
createProposal: resource("governance.proposals.create", "POST", "/v1/projects/{projectId}/proposals", { projectId: z.string().min(1) }, { capability: "governance.write", scopes: ["treeseed:governance:write"], surfaces: ["rest", "mcp_tool"] }),
|
|
208
|
-
proposal: resource("governance.proposals.show", "GET", "/v1/projects/{projectId}/proposals/{proposalId}", { projectId: z.string().min(1), proposalId: z.string().min(1) }, { capability: "governance.read", surfaces: ["rest", "mcp_resource"] }),
|
|
209
|
-
updateProposal: resource("governance.proposals.update", "PATCH", "/v1/projects/{projectId}/proposals/{proposalId}", { projectId: z.string().min(1), proposalId: z.string().min(1) }, { capability: "governance.write", scopes: ["treeseed:governance:write"], concurrency: true }),
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
225
|
+
proposals: resource("governance.proposals.list", "GET", "/v1/projects/{projectId}/proposals", { projectId: z.string().min(1) }, { capability: "governance.read", surfaces: ["rest", "cli", "mcp_tool", "mcp_resource"], pagination: "cursor" }),
|
|
226
|
+
createProposal: resource("governance.proposals.create", "POST", "/v1/projects/{projectId}/proposals", { projectId: z.string().min(1) }, { capability: "governance.write", scopes: ["treeseed:governance:write"], surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
227
|
+
proposal: resource("governance.proposals.show", "GET", "/v1/projects/{projectId}/proposals/{proposalId}", { projectId: z.string().min(1), proposalId: z.string().min(1) }, { capability: "governance.read", surfaces: ["rest", "cli", "mcp_tool", "mcp_resource"] }),
|
|
228
|
+
updateProposal: resource("governance.proposals.update", "PATCH", "/v1/projects/{projectId}/proposals/{proposalId}", { projectId: z.string().min(1), proposalId: z.string().min(1) }, { capability: "governance.write", scopes: ["treeseed:governance:write"], surfaces: ["rest", "cli", "mcp_tool"], concurrency: true }),
|
|
229
|
+
resolveProposalFeedback: resource("governance.proposals.feedback.resolve", "POST", "/v1/projects/{projectId}/proposals/{proposalId}/feedback/{feedbackId}/resolve", { projectId: z.string().min(1), proposalId: z.string().min(1), feedbackId: z.string().min(1) }, { capability: "governance.write", scopes: ["treeseed:governance:write"], surfaces: ["rest", "cli"], concurrency: true }),
|
|
230
|
+
openProposal: resource("governance.proposals.open", "POST", "/v1/projects/{projectId}/proposals/{proposalId}/open", { projectId: z.string().min(1), proposalId: z.string().min(1) }, { capability: "governance.write", scopes: ["treeseed:governance:write"], surfaces: ["rest", "cli", "mcp_tool"], concurrency: true }),
|
|
231
|
+
startVoting: resource("governance.proposals.voting.start", "POST", "/v1/projects/{projectId}/proposals/{proposalId}/start-voting", { projectId: z.string().min(1), proposalId: z.string().min(1) }, { capability: "governance.write", scopes: ["treeseed:governance:write"], surfaces: ["rest", "cli"], concurrency: true }),
|
|
232
|
+
vote: resource("governance.proposals.vote", "POST", "/v1/projects/{projectId}/proposals/{proposalId}/vote", { projectId: z.string().min(1), proposalId: z.string().min(1) }, { capability: "governance.write", scopes: ["treeseed:governance:write"], surfaces: ["rest", "cli"] }),
|
|
233
|
+
evaluate: resource("governance.proposals.evaluate", "POST", "/v1/projects/{projectId}/proposals/{proposalId}/evaluate", { projectId: z.string().min(1), proposalId: z.string().min(1) }, { capability: "governance.decide", scopes: ["treeseed:governance:write"], surfaces: ["rest", "cli"], concurrency: true }),
|
|
234
|
+
withdraw: resource("governance.proposals.withdraw", "POST", "/v1/projects/{projectId}/proposals/{proposalId}/withdraw", { projectId: z.string().min(1), proposalId: z.string().min(1) }, { capability: "governance.write", scopes: ["treeseed:governance:write"], surfaces: ["rest", "cli"], risk: "destructive", concurrency: true }),
|
|
235
|
+
supersede: resource("governance.proposals.supersede", "POST", "/v1/projects/{projectId}/proposals/{proposalId}/supersede", { projectId: z.string().min(1), proposalId: z.string().min(1) }, { capability: "governance.write", scopes: ["treeseed:governance:write"], surfaces: ["rest", "cli"], concurrency: true }),
|
|
216
236
|
proposalEvents: resource("governance.proposals.events", "GET", "/v1/projects/{projectId}/proposals/{proposalId}/events", { projectId: z.string().min(1), proposalId: z.string().min(1) }, { capability: "governance.read", pagination: "cursor" }),
|
|
217
|
-
decisions: resource("governance.decisions.list", "GET", "/v1/projects/{projectId}/decisions", { projectId: z.string().min(1) }, { capability: "governance.read", surfaces: ["rest", "mcp_tool", "mcp_resource"], pagination: "cursor" }),
|
|
218
|
-
decision: resource("governance.decisions.show", "GET", "/v1/projects/{projectId}/decisions/{decisionId}", { projectId: z.string().min(1), decisionId: z.string().min(1) }, { capability: "governance.read", surfaces: ["rest", "mcp_resource"] }),
|
|
237
|
+
decisions: resource("governance.decisions.list", "GET", "/v1/projects/{projectId}/decisions", { projectId: z.string().min(1) }, { capability: "governance.read", surfaces: ["rest", "cli", "mcp_tool", "mcp_resource"], pagination: "cursor" }),
|
|
238
|
+
decision: resource("governance.decisions.show", "GET", "/v1/projects/{projectId}/decisions/{decisionId}", { projectId: z.string().min(1), decisionId: z.string().min(1) }, { capability: "governance.read", surfaces: ["rest", "cli", "mcp_tool", "mcp_resource"] }),
|
|
219
239
|
decisionEvents: resource("governance.decisions.events", "GET", "/v1/projects/{projectId}/decisions/{decisionId}/events", { projectId: z.string().min(1), decisionId: z.string().min(1) }, { capability: "governance.read", pagination: "cursor" }),
|
|
220
240
|
approvals: resource("governance.approvals.list", "GET", "/v1/projects/{projectId}/approvals", { projectId: z.string().min(1) }, { capability: "governance.read", pagination: "cursor" }),
|
|
221
241
|
approval: resource("governance.approvals.show", "GET", "/v1/projects/{projectId}/approvals/{approvalId}", { projectId: z.string().min(1), approvalId: z.string().min(1) }, { capability: "governance.read" }),
|
|
222
242
|
decideApproval: resource("governance.approvals.decide", "POST", "/v1/projects/{projectId}/approvals/{approvalId}/decision", { projectId: z.string().min(1), approvalId: z.string().min(1) }, { capability: "governance.decide", scopes: ["treeseed:governance:write"], risk: "authority", concurrency: true })
|
|
223
243
|
},
|
|
244
|
+
execution: EXECUTION_OPERATIONS,
|
|
245
|
+
research: {
|
|
246
|
+
createWorkflow: resource("research.workflows.create", "POST", "/v1/projects/{projectId}/research-workflows", { projectId: z.string().min(1) }, { capability: "research.write", scopes: ["treeseed:knowledge:write"], surfaces: ["rest"] }),
|
|
247
|
+
workflows: resource("research.workflows.list", "GET", "/v1/projects/{projectId}/research-workflows", { projectId: z.string().min(1) }, { capability: "research.read", surfaces: ["rest"], pagination: "cursor" }),
|
|
248
|
+
workflow: resource("research.workflows.show", "GET", "/v1/research-workflows/{workflowId}", { workflowId: z.string().min(1) }, { capability: "research.read", surfaces: ["rest"] }),
|
|
249
|
+
completeStage: resource("research.workflows.stages.complete", "POST", "/v1/research-workflows/{workflowId}/stages/{stage}/complete", { workflowId: z.string().min(1), stage: z.string().min(1) }, { capability: "research.write", scopes: ["treeseed:knowledge:write"], surfaces: ["rest"], concurrency: true })
|
|
250
|
+
},
|
|
224
251
|
repositories: {
|
|
225
252
|
githubSetup: resource("repositories.github.setup", "POST", "/v1/provider-connectors/github/{kind}/setup", { kind: z.string().min(1) }, { capability: "repositories.connect", scopes: ["treeseed:projects:write"], risk: "authority" }),
|
|
226
253
|
githubCallback: resource("repositories.github.callback", "GET", "/v1/provider-connectors/github/{kind}/callback", { kind: z.string().min(1) }, { capability: "repositories.connect", scopes: [], authentication: "signed_request" }),
|
|
@@ -241,68 +268,87 @@ const CONTROL_PLANE_OPERATIONS = {
|
|
|
241
268
|
deleteWorkflowVariable: resource("repositories.workflow.variables.delete", "DELETE", "/v1/projects/{projectId}/workflow-configuration/variables/{name}", { projectId: z.string().min(1), name: z.string().min(1) }, { capability: "workflows.write", risk: "destructive", concurrency: true })
|
|
242
269
|
},
|
|
243
270
|
services: {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
271
|
+
...SECRET_OPERATIONS,
|
|
272
|
+
providers: resource("services.providers.list", "GET", "/v1/service-providers", {}, { capability: "services.read", surfaces: ["rest", "cli"] }),
|
|
273
|
+
connections: resource("services.connections.list", "GET", "/v1/teams/{teamId}/services", { teamId: z.string().min(1) }, { capability: "services.read", surfaces: ["rest", "cli"], pagination: "cursor" }),
|
|
274
|
+
connection: resource("services.connections.show", "GET", "/v1/teams/{teamId}/services/{connectionId}", { teamId: z.string().min(1), connectionId: z.string().min(1) }, { capability: "services.read", surfaces: ["rest", "cli"] }),
|
|
275
|
+
createConnection: resource("services.connections.create", "POST", "/v1/teams/{teamId}/services", { teamId: z.string().min(1) }, { capability: "services.write", surfaces: ["rest", "cli"], risk: "credential" }),
|
|
276
|
+
updateConnection: resource("services.connections.update", "PUT", "/v1/teams/{teamId}/services/{connectionId}", { teamId: z.string().min(1), connectionId: z.string().min(1) }, { capability: "services.write", surfaces: ["rest", "cli"], concurrency: true }),
|
|
277
|
+
disconnect: resource("services.connections.disconnect", "DELETE", "/v1/teams/{teamId}/services/{connectionId}", { teamId: z.string().min(1), connectionId: z.string().min(1) }, { capability: "services.write", surfaces: ["rest", "cli"], risk: "destructive", concurrency: true }),
|
|
278
|
+
authorities: resource("services.credential.authorities.list", "GET", "/v1/teams/{teamId}/services/{connectionId}/credential-authorities", { teamId: z.string().min(1), connectionId: z.string().min(1) }, { capability: "secrets.read", surfaces: ["rest", "cli"], pagination: "cursor" })
|
|
252
279
|
},
|
|
253
280
|
agents: {
|
|
281
|
+
teamClone: AGENT_TEAM_CLONE_OPERATIONS,
|
|
254
282
|
list: resource("agents.list", "GET", "/v1/projects/{projectId}/agents", { projectId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
|
|
255
283
|
show: resource("agents.show", "GET", "/v1/projects/{projectId}/agents/{agentSlug}", { projectId: z.string().min(1), agentSlug: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "cli", "mcp_resource"] }),
|
|
284
|
+
handlers: resource("agents.handlers.list", "GET", "/v1/projects/{projectId}/agent-handlers", { projectId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
285
|
+
handler: resource("agents.handlers.show", "GET", "/v1/projects/{projectId}/agent-handlers/{handlerId}", { projectId: z.string().min(1), handlerId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "cli", "mcp_resource"] }),
|
|
286
|
+
validateProfile: resource("agents.profiles.validate", "GET", "/v1/projects/{projectId}/agents/{agentSlug}/validation", { projectId: z.string().min(1), agentSlug: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
256
287
|
classes: resource("agents.classes.list", "GET", "/v1/projects/{projectId}/agent-classes", { projectId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "cli"], pagination: "cursor" }),
|
|
257
288
|
classShow: resource("agents.classes.show", "GET", "/v1/projects/{projectId}/agent-classes/{classId}", { projectId: z.string().min(1), classId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "cli"] }),
|
|
258
289
|
artifacts: resource("agents.artifacts.list", "GET", "/v1/projects/{projectId}/agent-artifacts", { projectId: z.string().min(1) }, { capability: "agents.read", pagination: "cursor" }),
|
|
259
290
|
artifact: resource("agents.artifacts.show", "GET", "/v1/projects/{projectId}/agent-artifacts/{artifactId}", { projectId: z.string().min(1), artifactId: z.string().min(1) }, { capability: "agents.read" })
|
|
260
291
|
},
|
|
292
|
+
communications: {
|
|
293
|
+
...communicationOperations(),
|
|
294
|
+
invocations: resource("communications.invocations.list", "GET", "/v1/teams/{teamId}/agent-invocations", { teamId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "mcp_tool", "mcp_resource"], pagination: "cursor" }),
|
|
295
|
+
invocation: resource("communications.invocations.show", "GET", "/v1/teams/{teamId}/agent-invocations/{invocationId}", { teamId: z.string().min(1), invocationId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "mcp_resource"] }),
|
|
296
|
+
status: resource("communications.status.show", "GET", "/v1/teams/{teamId}/communication-status", { teamId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "mcp_tool", "mcp_resource"] }),
|
|
297
|
+
handoffs: resource("communications.handoffs.list", "GET", "/v1/teams/{teamId}/operation-handoffs", { teamId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "mcp_resource"], pagination: "cursor" }),
|
|
298
|
+
clientActions: resource("communications.client.actions.list", "GET", "/v1/teams/{teamId}/client-actions", { teamId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "mcp_resource"], pagination: "cursor" }),
|
|
299
|
+
cancelInvocation: resource("communications.invocations.cancel", "POST", "/v1/teams/{teamId}/agent-invocations/{invocationId}/cancel", { teamId: z.string().min(1), invocationId: z.string().min(1) }, { capability: "agents.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"], risk: "destructive", concurrency: true })
|
|
300
|
+
},
|
|
261
301
|
capacity: {
|
|
262
302
|
availability: resource("capacity.status", "GET", "/v1/teams/{teamId}/capacity/availability-sessions", { teamId: z.string().min(1) }, { capability: "capacity.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
|
|
263
|
-
|
|
303
|
+
explain: resource("capacity.explain", "GET", "/v1/teams/{teamId}/capacity/explanation", { teamId: z.string().min(1) }, { capability: "capacity.read", surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
304
|
+
usage: resource("capacity.usage", "GET", "/v1/teams/{teamId}/capacity/usage", { teamId: z.string().min(1) }, { capability: "capacity.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
|
|
264
305
|
ledger: resource("capacity.ledger", "GET", "/v1/teams/{teamId}/capacity/ledger", { teamId: z.string().min(1) }, { capability: "capacity.read", surfaces: ["rest", "cli"], pagination: "cursor" }),
|
|
306
|
+
audit: resource("capacity.audit", "GET", "/v1/teams/{teamId}/capacity/audit", { teamId: z.string().min(1) }, { capability: "capacity.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
|
|
307
|
+
lanes: resource("capacity.lanes.list", "GET", "/v1/teams/{teamId}/capacity/lanes", { teamId: z.string().min(1) }, { capability: "capacity.read", surfaces: ["rest", "mcp_tool"], pagination: "cursor" }),
|
|
265
308
|
grants: resource("capacity.grants.list", "GET", "/v1/teams/{teamId}/capacity-grants", { teamId: z.string().min(1) }, { capability: "capacity.read", pagination: "cursor" }),
|
|
266
309
|
grant: resource("capacity.grants.show", "GET", "/v1/teams/{teamId}/capacity-grants/{grantId}", { teamId: z.string().min(1), grantId: z.string().min(1) }, { capability: "capacity.read" })
|
|
267
310
|
},
|
|
268
|
-
plans: {
|
|
269
|
-
list: resource("plans.list", "GET", "/v1/decisions/{decisionId}/capacity-plans", { decisionId: z.string().min(1) }, { capability: "plans.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
|
|
270
|
-
show: resource("plans.show", "GET", "/v1/capacity-plans/{capacityPlanId}", { capacityPlanId: z.string().min(1) }, { capability: "plans.read", surfaces: ["rest", "cli", "mcp_resource"] })
|
|
271
|
-
},
|
|
272
311
|
workdays: {
|
|
312
|
+
...WORKDAY_PROFILE_OPERATIONS,
|
|
273
313
|
list: resource("workdays.list", "GET", "/v1/teams/{teamId}/workday-runs", { teamId: z.string().min(1) }, { capability: "workdays.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
|
|
274
|
-
preflight: resource("workdays.plan", "POST", "/v1/teams/{teamId}/workday-runs/preflight", { teamId: z.string().min(1) }, { capability: "workdays.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
275
|
-
start: resource("workdays.start", "POST", "/v1/teams/{teamId}/workday-runs", { teamId: z.string().min(1) }, { capability: "workdays.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
276
|
-
show: resource("workdays.show", "GET", "/v1/teams/{teamId}/workday-runs/{runId}", { teamId: z.string().min(1), runId: z.string().min(1) }, { capability: "workdays.read", surfaces: ["rest", "cli", "mcp_resource"] }),
|
|
277
|
-
|
|
314
|
+
preflight: resource("workdays.plan", "POST", "/v1/teams/{teamId}/workday-runs/preflight", { teamId: z.string().min(1) }, { capability: "workdays.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "cli", "mcp_tool"], body: workdayIntent }),
|
|
315
|
+
start: resource("workdays.start", "POST", "/v1/teams/{teamId}/workday-runs", { teamId: z.string().min(1) }, { capability: "workdays.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "cli", "mcp_tool"], risk: "authority", body: z.object({ preflightId: z.string().min(1), preflightDigest: z.string().min(1) }).strict() }),
|
|
316
|
+
show: resource("workdays.show", "GET", "/v1/teams/{teamId}/workday-runs/{runId}", { teamId: z.string().min(1), runId: z.string().min(1) }, { capability: "workdays.read", surfaces: ["rest", "cli", "mcp_tool", "mcp_resource"] }),
|
|
317
|
+
stop: resource("workdays.stop", "POST", "/v1/teams/{teamId}/workday-runs/{runId}/stop", { teamId: z.string().min(1), runId: z.string().min(1) }, { capability: "workdays.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "cli", "mcp_tool"], risk: "authority" }),
|
|
318
|
+
events: resource("workdays.events.list", "GET", "/v1/teams/{teamId}/workday-runs/{runId}/events", { teamId: z.string().min(1), runId: z.string().min(1) }, { capability: "workdays.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
|
|
278
319
|
schedules: resource("workdays.schedules.list", "GET", "/v1/teams/{teamId}/workday-schedules", { teamId: z.string().min(1) }, { capability: "workdays.read", surfaces: ["rest", "cli"], pagination: "cursor" }),
|
|
279
|
-
createSchedule: resource("workdays.schedules.create", "POST", "/v1/teams/{teamId}/workday-schedules", { teamId: z.string().min(1) }, { capability: "workdays.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "cli"] }),
|
|
320
|
+
createSchedule: resource("workdays.schedules.create", "POST", "/v1/teams/{teamId}/workday-schedules", { teamId: z.string().min(1) }, { capability: "workdays.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "cli"], risk: "authority", body: scheduledWorkdayIntent }),
|
|
280
321
|
updateSchedule: resource("workdays.schedules.update", "PATCH", "/v1/teams/{teamId}/workday-schedules/{scheduleId}", { teamId: z.string().min(1), scheduleId: z.string().min(1) }, { capability: "workdays.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "cli"], concurrency: true })
|
|
281
322
|
},
|
|
282
323
|
assignments: {
|
|
324
|
+
recover: resource("assignments.recover", "POST", "/v1/teams/{teamId}/capacity/assignments/{assignmentId}/recover", { teamId: z.string().min(1), assignmentId: z.string().min(1) }, { capability: "assignments.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "cli", "mcp_tool"], risk: "destructive", body: z.object({ expectedStateVersion: z.number().int().positive().max(Number.MAX_SAFE_INTEGER), reason: z.string().trim().min(1).max(2e3) }).strict() }),
|
|
283
325
|
list: resource("assignments.list", "GET", "/v1/teams/{teamId}/capacity/assignments", { teamId: z.string().min(1) }, { capability: "assignments.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
|
|
284
|
-
show: resource("assignments.show", "GET", "/v1/teams/{teamId}/capacity/assignments/{assignmentId}", { teamId: z.string().min(1), assignmentId: z.string().min(1) }, { capability: "assignments.read", surfaces: ["rest", "cli", "mcp_resource"] }),
|
|
326
|
+
show: resource("assignments.show", "GET", "/v1/teams/{teamId}/capacity/assignments/{assignmentId}", { teamId: z.string().min(1), assignmentId: z.string().min(1) }, { capability: "assignments.read", surfaces: ["rest", "cli", "mcp_tool", "mcp_resource"] }),
|
|
285
327
|
explain: resource("assignments.explain", "GET", "/v1/teams/{teamId}/capacity/assignments/{assignmentId}/explanation", { teamId: z.string().min(1), assignmentId: z.string().min(1) }, { capability: "assignments.read", surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
286
328
|
cancel: resource("assignments.cancel", "POST", "/v1/teams/{teamId}/capacity/assignments/{assignmentId}/cancel", { teamId: z.string().min(1), assignmentId: z.string().min(1) }, { capability: "assignments.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "cli", "mcp_tool"], risk: "destructive" }),
|
|
287
|
-
retry: resource("assignments.retry", "POST", "/v1/teams/{teamId}/capacity/assignments/{assignmentId}/requeue", { teamId: z.string().min(1), assignmentId: z.string().min(1) }, { capability: "assignments.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "cli", "mcp_tool"] })
|
|
329
|
+
retry: resource("assignments.retry", "POST", "/v1/teams/{teamId}/capacity/assignments/{assignmentId}/requeue", { teamId: z.string().min(1), assignmentId: z.string().min(1) }, { capability: "assignments.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "cli", "mcp_tool"], risk: "authority" })
|
|
288
330
|
},
|
|
289
331
|
operations: {
|
|
290
|
-
list: resource("operations.list", "GET", "/v1/platform/operations", {}, { capability: "operations.read", surfaces: ["rest", "mcp_tool"], pagination: "cursor" }),
|
|
332
|
+
list: resource("operations.list", "GET", "/v1/platform/operations", {}, { capability: "operations.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
|
|
291
333
|
create: resource("operations.create", "POST", "/v1/platform/operations", {}, { capability: "operations.execute", scopes: ["treeseed:execution"] }),
|
|
292
|
-
show: resource("operations.show", "GET", "/v1/platform/operations/{operationId}", { operationId: z.string().min(1) }, { capability: "operations.read", surfaces: ["rest", "mcp_resource"] }),
|
|
334
|
+
show: resource("operations.show", "GET", "/v1/platform/operations/{operationId}", { operationId: z.string().min(1) }, { capability: "operations.read", surfaces: ["rest", "cli", "mcp_resource"] }),
|
|
293
335
|
events: resource("operations.events.list", "GET", "/v1/platform/operations/{operationId}/events", { operationId: z.string().min(1) }, { capability: "operations.read", pagination: "cursor" }),
|
|
294
336
|
cancel: resource("operations.cancel", "POST", "/v1/platform/operations/{operationId}/cancel", { operationId: z.string().min(1) }, { capability: "operations.execute", scopes: ["treeseed:execution"], risk: "destructive" }),
|
|
295
|
-
retry: resource("operations.retry", "POST", "/v1/platform/operations/{operationId}/retry", { operationId: z.string().min(1) }, { capability: "operations.execute", scopes: ["treeseed:execution"] })
|
|
337
|
+
retry: resource("operations.retry", "POST", "/v1/platform/operations/{operationId}/retry", { operationId: z.string().min(1) }, { capability: "operations.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "cli"] })
|
|
296
338
|
},
|
|
297
339
|
seeds: {
|
|
298
340
|
runs: resource("seeds.runs.list", "GET", "/v1/seeds/runs", {}, { capability: "seeds.read", pagination: "cursor" }),
|
|
299
341
|
run: resource("seeds.runs.show", "GET", "/v1/seeds/runs/{runId}", { runId: z.string().min(1) }, { capability: "seeds.read" }),
|
|
300
|
-
|
|
301
|
-
|
|
342
|
+
validate: postRead("seeds.validate", "/v1/seeds/validate", {}, "seeds.read", ["treeseed:admin"], ["rest", "cli"]),
|
|
343
|
+
plan: postRead("seeds.plan", "/v1/seeds/{name}/plan", { name: z.string().min(1) }, "seeds.write", ["treeseed:admin"], ["rest", "cli"]),
|
|
344
|
+
apply: resource("seeds.apply", "POST", "/v1/seeds/{name}/apply", { name: z.string().min(1) }, { capability: "seeds.write", scopes: ["treeseed:admin"], surfaces: ["rest", "cli"], risk: "authority" }),
|
|
345
|
+
show: resource("seeds.show", "GET", "/v1/seeds/{name}", { name: z.string().min(1) }, { capability: "seeds.read", scopes: ["treeseed:admin"], surfaces: ["rest", "cli"] }),
|
|
346
|
+
verify: postRead("seeds.verify", "/v1/seeds/{name}/verify", { name: z.string().min(1) }, "seeds.read", ["treeseed:admin"], ["rest", "cli"]),
|
|
347
|
+
reconcile: resource("seeds.reconcile", "POST", "/v1/seeds/{name}/reconcile", { name: z.string().min(1) }, { capability: "seeds.write", scopes: ["treeseed:admin"], risk: "authority" }),
|
|
302
348
|
resolveResources: resource("seeds.resources.resolve", "POST", "/v1/seeds/resources/resolve", {}, { capability: "seeds.read", scopes: ["treeseed:admin"] })
|
|
303
349
|
},
|
|
304
350
|
feedback: {
|
|
305
|
-
create: resource("feedback.create", "POST", "/v1/feedback", {}, { capability: "feedback.write", scopes: [], surfaces: ["rest"
|
|
351
|
+
create: resource("feedback.create", "POST", "/v1/feedback", {}, { capability: "feedback.write", authentication: "oauth", scopes: [], surfaces: ["rest"] }),
|
|
306
352
|
list: resource("feedback.list", "GET", "/v1/admin/feedback", {}, { capability: "feedback.admin", scopes: ["treeseed:admin"], pagination: "cursor" }),
|
|
307
353
|
show: resource("feedback.show", "GET", "/v1/admin/feedback/{feedbackId}", { feedbackId: z.string().min(1) }, { capability: "feedback.admin", scopes: ["treeseed:admin"] }),
|
|
308
354
|
updateStatus: resource("feedback.status.update", "PATCH", "/v1/admin/feedback/{feedbackId}/status", { feedbackId: z.string().min(1) }, { capability: "feedback.admin", scopes: ["treeseed:admin"], concurrency: true })
|
|
@@ -314,11 +360,126 @@ const CONTROL_PLANE_OPERATIONS = {
|
|
|
314
360
|
actions: resource("realtime.actions.list", "GET", "/v1/client-sessions/{sessionId}/actions", { sessionId: z.string().min(1) }, { capability: "realtime.read", pagination: "cursor" }),
|
|
315
361
|
actionResult: resource("realtime.actions.result", "POST", "/v1/client-sessions/{sessionId}/actions/{actionId}/result", { sessionId: z.string().min(1), actionId: z.string().min(1) }, { capability: "realtime.write" })
|
|
316
362
|
},
|
|
363
|
+
treedx: {
|
|
364
|
+
library: resource("treedx.library.show", "GET", "/v1/projects/{projectId}/treedx-library", { projectId: z.string().min(1) }, { capability: "treedx.read", surfaces: ["rest", "cli"] }),
|
|
365
|
+
bindLibrary: resource("treedx.library.bind", "POST", "/v1/projects/{projectId}/treedx-library", { projectId: z.string().min(1) }, { capability: "treedx.write", surfaces: ["rest", "cli"] }),
|
|
366
|
+
serviceContract: treedxProxy("treedx.service.contract", null, "GET", "/v1/dx/projects/{projectId}/service-contract", { projectId: z.string().min(1) }, { surfaces: ["rest", "cli"] }),
|
|
367
|
+
health: treedxProxy("treedx.health.show", "getHealth", "GET", "/v1/dx/projects/{projectId}/health", { projectId: z.string().min(1) }, { surfaces: ["rest", "cli"] }),
|
|
368
|
+
readiness: treedxProxy("treedx.readiness.show", "getReadiness", "GET", "/v1/dx/projects/{projectId}/readiness", { projectId: z.string().min(1) }, { surfaces: ["rest", "cli"] }),
|
|
369
|
+
version: treedxProxy("treedx.version.show", "getVersion", "GET", "/v1/dx/projects/{projectId}/version", { projectId: z.string().min(1) }, { surfaces: ["rest", "cli"] }),
|
|
370
|
+
capabilities: treedxProxy("treedx.capabilities.list", "listCapabilities", "GET", "/v1/dx/projects/{projectId}/capabilities", { projectId: z.string().min(1) }, { surfaces: ["rest", "cli"] }),
|
|
371
|
+
effectiveScope: treedxProxy("treedx.scope.show", "getEffectiveScope", "GET", "/v1/dx/projects/{projectId}/effective-scope", { projectId: z.string().min(1) }, { surfaces: ["rest"] }),
|
|
372
|
+
repositories: {
|
|
373
|
+
list: treedxProxy("treedx.repositories.list", "listRepositories", "GET", "/v1/dx/projects/{projectId}/repos", { projectId: z.string().min(1) }, { pagination: "cursor" }),
|
|
374
|
+
create: treedxProxy("treedx.repositories.create", "createRepository", "POST", "/v1/dx/projects/{projectId}/repos", { projectId: z.string().min(1) }),
|
|
375
|
+
show: treedxProxy("treedx.repositories.show", "getRepository", "GET", "/v1/dx/projects/{projectId}/repos/{repoId}", { projectId: z.string().min(1), repoId: z.string().min(1) }),
|
|
376
|
+
retire: treedxProxy("treedx.repositories.retire", "retireRepository", "DELETE", "/v1/dx/projects/{projectId}/repos/{repoId}", { projectId: z.string().min(1), repoId: z.string().min(1) }, { risk: "destructive", surfaces: ["internal"] }),
|
|
377
|
+
status: treedxProxy("treedx.repositories.status", "getRepositoryStatus", "GET", "/v1/dx/projects/{projectId}/repos/{repoId}/status", { projectId: z.string().min(1), repoId: z.string().min(1) }),
|
|
378
|
+
refs: treedxProxy("treedx.repositories.refs", "listRepositoryRefs", "GET", "/v1/dx/projects/{projectId}/repos/{repoId}/refs", { projectId: z.string().min(1), repoId: z.string().min(1) }),
|
|
379
|
+
sync: treedxProxy("treedx.repositories.sync", "syncRepository", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/sync", { projectId: z.string().min(1), repoId: z.string().min(1) }),
|
|
380
|
+
push: treedxProxy("treedx.repositories.push", "pushRepository", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/push", { projectId: z.string().min(1), repoId: z.string().min(1) }, { risk: "authority" }),
|
|
381
|
+
promoteRef: treedxProxy("treedx.repositories.refs.promote", "promoteRepositoryRef", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/refs/promote", { projectId: z.string().min(1), repoId: z.string().min(1) }, { risk: "authority" }),
|
|
382
|
+
retireRef: treedxProxy("treedx.repositories.refs.retire", "retireRepositoryRef", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/refs/retire", { projectId: z.string().min(1), repoId: z.string().min(1) }, { risk: "destructive" }),
|
|
383
|
+
readFiles: treedxProxy("treedx.repositories.files.read", "readRepositoryFile", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/files/read", { projectId: z.string().min(1), repoId: z.string().min(1) }, { read: true }),
|
|
384
|
+
listPaths: treedxProxy("treedx.repositories.paths.list", "listRepositoryPaths", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/paths/list", { projectId: z.string().min(1), repoId: z.string().min(1) }, { read: true, pagination: "cursor" }),
|
|
385
|
+
searchFiles: treedxProxy("treedx.repositories.files.search", "searchRepositoryFiles", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/files/search", { projectId: z.string().min(1), repoId: z.string().min(1) }, { read: true, pagination: "cursor" }),
|
|
386
|
+
query: treedxProxy("treedx.repositories.query", "queryRepository", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/query", { projectId: z.string().min(1), repoId: z.string().min(1) }, { read: true })
|
|
387
|
+
},
|
|
388
|
+
workspaces: {
|
|
389
|
+
list: treedxProxy("treedx.workspaces.list", null, "GET", "/v1/dx/projects/{projectId}/workspaces", { projectId: z.string().min(1) }, { surfaces: ["rest", "cli"], pagination: "cursor" }),
|
|
390
|
+
create: treedxProxy("treedx.workspaces.create", "createWorkspace", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/workspaces", { projectId: z.string().min(1), repoId: z.string().min(1) }),
|
|
391
|
+
show: treedxProxy("treedx.workspaces.show", "getWorkspace", "GET", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}", { projectId: z.string().min(1), workspaceId: z.string().min(1) }, { surfaces: ["rest", "cli"] }),
|
|
392
|
+
status: treedxProxy("treedx.workspaces.status", "getWorkspaceStatus", "GET", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/status", { projectId: z.string().min(1), workspaceId: z.string().min(1) }),
|
|
393
|
+
diff: treedxProxy("treedx.workspaces.diff", "getWorkspaceDiff", "GET", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/diff", { projectId: z.string().min(1), workspaceId: z.string().min(1) }),
|
|
394
|
+
tree: treedxProxy("treedx.workspaces.tree", "listWorkspaceTree", "GET", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/tree", { projectId: z.string().min(1), workspaceId: z.string().min(1) }),
|
|
395
|
+
close: treedxProxy("treedx.workspaces.close", "closeWorkspace", "POST", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/close", { projectId: z.string().min(1), workspaceId: z.string().min(1) }),
|
|
396
|
+
abandon: treedxProxy("treedx.workspaces.abandon", "abandonWorkspace", "POST", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/abandon", { projectId: z.string().min(1), workspaceId: z.string().min(1) }, { risk: "destructive", surfaces: ["rest", "cli"] })
|
|
397
|
+
},
|
|
398
|
+
files: {
|
|
399
|
+
read: treedxProxy("treedx.workspaces.files.read", "readWorkspaceFile", "GET", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/files", { projectId: z.string().min(1), workspaceId: z.string().min(1) }),
|
|
400
|
+
write: treedxProxy("treedx.workspaces.files.write", "writeWorkspaceFile", "PUT", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/files", { projectId: z.string().min(1), workspaceId: z.string().min(1) }),
|
|
401
|
+
writeBatch: treedxProxy("treedx.workspaces.files.batch", "writeWorkspaceFiles", "PUT", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/files/batch", { projectId: z.string().min(1), workspaceId: z.string().min(1) }),
|
|
402
|
+
patch: treedxProxy("treedx.workspaces.files.patch", "patchWorkspaceFile", "PATCH", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/files", { projectId: z.string().min(1), workspaceId: z.string().min(1) }),
|
|
403
|
+
remove: treedxProxy("treedx.workspaces.files.delete", "deleteWorkspaceFile", "DELETE", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/files", { projectId: z.string().min(1), workspaceId: z.string().min(1) }, { risk: "destructive" }),
|
|
404
|
+
search: treedxProxy("treedx.workspaces.files.search", "searchWorkspace", "POST", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/search", { projectId: z.string().min(1), workspaceId: z.string().min(1) }, { read: true, pagination: "cursor" }),
|
|
405
|
+
applyChangeset: treedxProxy("treedx.workspaces.changesets.apply", "applyWorkspaceChangeset", "POST", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/changesets", { projectId: z.string().min(1), workspaceId: z.string().min(1) }),
|
|
406
|
+
commit: treedxProxy("treedx.workspaces.commit", "commitWorkspace", "POST", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/commit", { projectId: z.string().min(1), workspaceId: z.string().min(1) })
|
|
407
|
+
},
|
|
408
|
+
blobs: {
|
|
409
|
+
read: treedxProxy("treedx.repositories.blobs.read", "readRepositoryBlob", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/blobs/read", { projectId: z.string().min(1), repoId: z.string().min(1) }, { read: true }),
|
|
410
|
+
write: treedxProxy("treedx.workspaces.blobs.write", "writeWorkspaceBlob", "POST", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/blobs/write", { projectId: z.string().min(1), workspaceId: z.string().min(1) }),
|
|
411
|
+
remove: treedxProxy("treedx.workspaces.blobs.delete", "deleteWorkspaceBlob", "POST", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/blobs/delete", { projectId: z.string().min(1), workspaceId: z.string().min(1) }, { risk: "destructive" }),
|
|
412
|
+
download: treedxProxy("treedx.workspaces.blobs.download", "downloadWorkspaceBlob", "GET", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/blobs/download", { projectId: z.string().min(1), workspaceId: z.string().min(1) }, { surfaces: ["rest"] }),
|
|
413
|
+
upload: treedxProxy("treedx.workspaces.blobs.upload", "uploadWorkspaceBlob", "PUT", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/blobs/upload", { projectId: z.string().min(1), workspaceId: z.string().min(1) }),
|
|
414
|
+
createUpload: treedxProxy("treedx.workspaces.blobs.uploads.create", "createWorkspaceBlobUpload", "POST", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/blobs/uploads", { projectId: z.string().min(1), workspaceId: z.string().min(1) }),
|
|
415
|
+
uploadPart: treedxProxy("treedx.workspaces.blobs.uploads.parts.write", "uploadWorkspaceBlobPart", "PUT", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/blobs/uploads/{uploadId}/parts/{partNumber}", { projectId: z.string().min(1), workspaceId: z.string().min(1), uploadId: z.string().min(1), partNumber: z.string().min(1) }),
|
|
416
|
+
completeUpload: treedxProxy("treedx.workspaces.blobs.uploads.complete", "completeWorkspaceBlobUpload", "POST", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/blobs/uploads/{uploadId}/complete", { projectId: z.string().min(1), workspaceId: z.string().min(1), uploadId: z.string().min(1) }),
|
|
417
|
+
abortUpload: treedxProxy("treedx.workspaces.blobs.uploads.abort", "abortWorkspaceBlobUpload", "DELETE", "/v1/dx/projects/{projectId}/workspaces/{workspaceId}/blobs/uploads/{uploadId}", { projectId: z.string().min(1), workspaceId: z.string().min(1), uploadId: z.string().min(1) }, { risk: "destructive" })
|
|
418
|
+
},
|
|
419
|
+
graph: {
|
|
420
|
+
refresh: treedxProxy("treedx.repositories.graph.refresh", "refreshRepositoryGraph", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/graph/refresh", { projectId: z.string().min(1), repoId: z.string().min(1) }),
|
|
421
|
+
refreshJob: treedxProxy("treedx.repositories.graph.jobs.show", "getGraphRefreshJob", "GET", "/v1/dx/projects/{projectId}/repos/{repoId}/graph/jobs/{jobId}", { projectId: z.string().min(1), repoId: z.string().min(1), jobId: z.string().min(1) }),
|
|
422
|
+
query: treedxProxy("treedx.repositories.graph.query", "queryRepositoryGraph", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/graph/query", { projectId: z.string().min(1), repoId: z.string().min(1) }, { read: true }),
|
|
423
|
+
node: treedxProxy("treedx.repositories.graph.nodes.show", "getGraphNode", "GET", "/v1/dx/projects/{projectId}/repos/{repoId}/graph/nodes/{nodeId}", { projectId: z.string().min(1), repoId: z.string().min(1), nodeId: z.string().min(1) }),
|
|
424
|
+
related: treedxProxy("treedx.repositories.graph.related", "getRelatedGraphNodes", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/graph/related", { projectId: z.string().min(1), repoId: z.string().min(1) }, { read: true }),
|
|
425
|
+
subgraph: treedxProxy("treedx.repositories.graph.subgraph", "getGraphSubgraph", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/graph/subgraph", { projectId: z.string().min(1), repoId: z.string().min(1) }, { read: true }),
|
|
426
|
+
searchFiles: treedxProxy("treedx.repositories.graph.files.search", "searchGraphFiles", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/graph/search/files", { projectId: z.string().min(1), repoId: z.string().min(1) }, { read: true }),
|
|
427
|
+
searchSections: treedxProxy("treedx.repositories.graph.sections.search", "searchGraphSections", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/graph/search/sections", { projectId: z.string().min(1), repoId: z.string().min(1) }, { read: true }),
|
|
428
|
+
searchEntities: treedxProxy("treedx.repositories.graph.entities.search", "searchGraphEntities", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/graph/search/entities", { projectId: z.string().min(1), repoId: z.string().min(1) }, { read: true })
|
|
429
|
+
},
|
|
430
|
+
context: {
|
|
431
|
+
build: treedxProxy("treedx.repositories.context.build", "buildContext", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/context/build", { projectId: z.string().min(1), repoId: z.string().min(1) }, { read: true }),
|
|
432
|
+
parse: treedxProxy("treedx.repositories.context.parse", "parseContextQuery", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/context/parse", { projectId: z.string().min(1), repoId: z.string().min(1) }, { read: true })
|
|
433
|
+
},
|
|
434
|
+
federated: {
|
|
435
|
+
search: treedxProxy("treedx.federated.search", "federatedSearch", "POST", "/v1/dx/projects/{projectId}/search", { projectId: z.string().min(1) }, { read: true, pagination: "cursor" }),
|
|
436
|
+
query: treedxProxy("treedx.federated.query", "federatedQuery", "POST", "/v1/dx/projects/{projectId}/query", { projectId: z.string().min(1) }, { read: true }),
|
|
437
|
+
context: treedxProxy("treedx.federated.context", "federatedContextBuild", "POST", "/v1/dx/projects/{projectId}/context", { projectId: z.string().min(1) }, { read: true }),
|
|
438
|
+
graph: treedxProxy("treedx.federated.graph", "federatedGraphQuery", "POST", "/v1/dx/projects/{projectId}/graph", { projectId: z.string().min(1) }, { read: true })
|
|
439
|
+
},
|
|
440
|
+
snapshots: {
|
|
441
|
+
build: treedxProxy("treedx.repositories.snapshots.build", "buildSnapshot", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/snapshots", { projectId: z.string().min(1), repoId: z.string().min(1) }),
|
|
442
|
+
show: treedxProxy("treedx.repositories.snapshots.show", "getSnapshot", "GET", "/v1/dx/projects/{projectId}/repos/{repoId}/snapshots/{snapshotId}", { projectId: z.string().min(1), repoId: z.string().min(1), snapshotId: z.string().min(1) })
|
|
443
|
+
},
|
|
444
|
+
artifacts: {
|
|
445
|
+
export: treedxProxy("treedx.repositories.artifacts.export", "exportArtifact", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/artifacts", { projectId: z.string().min(1), repoId: z.string().min(1) }),
|
|
446
|
+
list: treedxProxy("treedx.repositories.artifacts.list", "listArtifacts", "GET", "/v1/dx/projects/{projectId}/repos/{repoId}/artifacts", { projectId: z.string().min(1), repoId: z.string().min(1) }, { pagination: "cursor" }),
|
|
447
|
+
show: treedxProxy("treedx.repositories.artifacts.show", "getArtifact", "GET", "/v1/dx/projects/{projectId}/repos/{repoId}/artifacts/{artifactId}", { projectId: z.string().min(1), repoId: z.string().min(1), artifactId: z.string().min(1) }),
|
|
448
|
+
remove: treedxProxy("treedx.repositories.artifacts.delete", "deleteArtifact", "DELETE", "/v1/dx/projects/{projectId}/repos/{repoId}/artifacts/{artifactId}", { projectId: z.string().min(1), repoId: z.string().min(1), artifactId: z.string().min(1) }, { risk: "destructive" })
|
|
449
|
+
},
|
|
450
|
+
searchIndex: {
|
|
451
|
+
status: treedxProxy("treedx.repositories.search.index.status", "getSearchIndexStatus", "GET", "/v1/dx/projects/{projectId}/repos/{repoId}/search-index", { projectId: z.string().min(1), repoId: z.string().min(1) }),
|
|
452
|
+
refresh: treedxProxy("treedx.repositories.search.index.refresh", "refreshSearchIndex", "POST", "/v1/dx/projects/{projectId}/repos/{repoId}/search-index/refresh", { projectId: z.string().min(1), repoId: z.string().min(1) })
|
|
453
|
+
}
|
|
454
|
+
},
|
|
317
455
|
providers: {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
456
|
+
capabilityProposal: noPathProvider("providers.capabilities.propose", "POST", "/v1/provider/capability-proposals"),
|
|
457
|
+
capabilityProposalStatus: providerPath("providers.capabilities.proposal.show", "GET", "/v1/provider/capability-proposals/{proposalId}", { proposalId: z.string().min(1) }, { read: true }),
|
|
458
|
+
list: resource("providers.list", "GET", "/v1/teams/{teamId}/capacity-providers", { teamId: z.string().min(1) }, { capability: "providers.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
|
|
459
|
+
show: resource("providers.show", "GET", "/v1/teams/{teamId}/capacity-providers/{providerId}", { teamId: z.string().min(1), providerId: z.string().min(1) }, { capability: "providers.read", surfaces: ["rest", "cli", "mcp_resource"] }),
|
|
460
|
+
status: resource("providers.status", "GET", "/v1/teams/{teamId}/capacity-providers/{providerId}/status", { teamId: z.string().min(1), providerId: z.string().min(1) }, { capability: "providers.read", surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
461
|
+
diagnose: resource("providers.diagnose", "GET", "/v1/teams/{teamId}/capacity-providers/{providerId}/diagnosis", { teamId: z.string().min(1), providerId: z.string().min(1) }, { capability: "providers.read", surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
462
|
+
offers: resource("providers.offers.show", "GET", "/v1/teams/{teamId}/capacity-providers/{providerId}/offers", { teamId: z.string().min(1), providerId: z.string().min(1) }, { capability: "providers.read", surfaces: ["rest", "cli", "mcp_resource"] }),
|
|
463
|
+
connect: resource("providers.connect", "POST", "/v1/teams/{teamId}/capacity-provider-connections", { teamId: z.string().min(1) }, { capability: "providers.write", scopes: ["treeseed:admin"], surfaces: ["rest", "cli"], risk: "credential", redactedPaths: ["body.enrollmentToken"] }),
|
|
464
|
+
registrationCode: PROVIDER_ENVIRONMENT_OPERATIONS.registrationCode,
|
|
465
|
+
disconnect: resource("providers.disconnect", "POST", "/v1/teams/{teamId}/capacity-provider-connections/{connectionId}/disconnect", { teamId: z.string().min(1), connectionId: z.string().min(1) }, { capability: "providers.write", scopes: ["treeseed:admin"], surfaces: ["rest", "cli"], risk: "destructive" }),
|
|
466
|
+
requests: {
|
|
467
|
+
list: resource("providers.requests.list", "GET", "/v1/teams/{teamId}/capacity-provider-requests", { teamId: z.string().min(1) }, { capability: "providers.read", surfaces: ["rest", "cli"], pagination: "cursor" }),
|
|
468
|
+
show: resource("providers.requests.show", "GET", "/v1/teams/{teamId}/capacity-provider-requests/{requestId}", { teamId: z.string().min(1), requestId: z.string().min(1) }, { capability: "providers.read", surfaces: ["rest", "cli"] }),
|
|
469
|
+
approve: resource("providers.requests.approve", "POST", "/v1/teams/{teamId}/capacity-provider-requests/{requestId}/approve", { teamId: z.string().min(1), requestId: z.string().min(1) }, { capability: "providers.write", scopes: ["treeseed:admin"], surfaces: ["rest", "cli"], risk: "authority" }),
|
|
470
|
+
reject: resource("providers.requests.reject", "POST", "/v1/teams/{teamId}/capacity-provider-requests/{requestId}/reject", { teamId: z.string().min(1), requestId: z.string().min(1) }, { capability: "providers.write", scopes: ["treeseed:admin"], surfaces: ["rest", "cli"], risk: "authority" })
|
|
471
|
+
},
|
|
472
|
+
credentials: {
|
|
473
|
+
status: resource("providers.credentials.status", "GET", "/v1/teams/{teamId}/capacity-provider-connections/{connectionId}/credentials", { teamId: z.string().min(1), connectionId: z.string().min(1) }, { capability: "providers.read", surfaces: ["rest", "cli"] }),
|
|
474
|
+
rotate: resource("providers.credentials.rotate", "POST", "/v1/teams/{teamId}/capacity-provider-connections/{connectionId}/credentials/rotate", { teamId: z.string().min(1), connectionId: z.string().min(1) }, { capability: "providers.write", scopes: ["treeseed:admin"], surfaces: ["rest", "cli"], risk: "credential" }),
|
|
475
|
+
revoke: resource("providers.credentials.revoke", "POST", "/v1/teams/{teamId}/capacity-provider-connections/{connectionId}/credentials/revoke", { teamId: z.string().min(1), connectionId: z.string().min(1) }, { capability: "providers.write", scopes: ["treeseed:admin"], surfaces: ["rest", "cli"], risk: "irreversible" })
|
|
476
|
+
},
|
|
477
|
+
environmentProfiles: PROVIDER_ENVIRONMENT_OPERATIONS.environmentProfiles,
|
|
478
|
+
environmentGrants: PROVIDER_ENVIRONMENT_OPERATIONS.environmentGrants,
|
|
479
|
+
register: noPathProvider("providers.register", "POST", "/v1/provider-registrations", { authentication: "signed_request", redactedPaths: ["body.registrationKey"] }),
|
|
480
|
+
registration: providerPath("providers.registration.show", "GET", "/v1/provider-registrations/{requestId}", { requestId: z.string().min(1) }, { authentication: "signed_request", read: true }),
|
|
481
|
+
exchangeCredential: providerPath("providers.registration.credential", "POST", "/v1/provider-registrations/{requestId}/credential", { requestId: z.string().min(1) }, { authentication: "signed_request", redactedPaths: ["body.proof"] }),
|
|
482
|
+
issueAccessToken: noPathProvider("providers.token.issue", "POST", "/v1/provider/access-tokens", { authentication: "signed_request", redactedPaths: ["body.credential", "body.proof"] }),
|
|
322
483
|
leaveMembership: noPathProvider("providers.membership.leave", "POST", "/v1/provider/membership/leave"),
|
|
323
484
|
rotateIdentity: noPathProvider("providers.identity.rotate", "POST", "/v1/provider/identity/rotate", { redactedPaths: ["body.oldProof", "body.newProof"] }),
|
|
324
485
|
rotateCredential: noPathProvider("providers.credential.rotate", "POST", "/v1/provider/credential-rotation"),
|
|
@@ -328,32 +489,24 @@ const CONTROL_PLANE_OPERATIONS = {
|
|
|
328
489
|
nextAssignment: noPathProvider("providers.assignments.next", "POST", "/v1/provider/assignments/next"),
|
|
329
490
|
assignment: providerPath("providers.assignments.show", "GET", "/v1/provider/assignments/{assignmentId}", { assignmentId: z.string().min(1) }, { read: true }),
|
|
330
491
|
assignmentExplanation: providerPath("providers.assignments.explain", "GET", "/v1/provider/assignments/{assignmentId}/explanation", { assignmentId: z.string().min(1) }, { read: true }),
|
|
492
|
+
sourceWorkspace: providerPath("providers.assignments.source.authorize", "POST", "/v1/provider/assignments/{assignmentId}/source-workspace", { assignmentId: z.string().min(1) }, { redactedPaths: ["body.leaseToken", "output.credential.ciphertext"] }),
|
|
331
493
|
renewAssignment: providerPath("providers.assignments.renew", "POST", "/v1/provider/assignments/{assignmentId}/renew", { assignmentId: z.string().min(1) }),
|
|
332
494
|
startExecution: providerPath("providers.assignments.execution.start", "POST", "/v1/provider/assignments/{assignmentId}/execution-start", { assignmentId: z.string().min(1) }),
|
|
333
495
|
startCloseout: providerPath("providers.assignments.closeout.start", "POST", "/v1/provider/assignments/{assignmentId}/closeout-start", { assignmentId: z.string().min(1) }),
|
|
334
|
-
|
|
496
|
+
discussionResponse: providerDiscussionResponseOperation(),
|
|
497
|
+
...providerCommunicationLifecycleOperations(),
|
|
335
498
|
returnAssignment: providerPath("providers.assignments.return", "POST", "/v1/provider/assignments/{assignmentId}/return", { assignmentId: z.string().min(1) }),
|
|
336
499
|
completeAssignment: providerPath("providers.assignments.complete", "POST", "/v1/provider/assignments/{assignmentId}/complete", { assignmentId: z.string().min(1) }),
|
|
337
500
|
failAssignment: providerPath("providers.assignments.fail", "POST", "/v1/provider/assignments/{assignmentId}/fail", { assignmentId: z.string().min(1) }),
|
|
338
501
|
reportUsage: providerPath("providers.assignments.usage", "POST", "/v1/provider/assignments/{assignmentId}/usage", { assignmentId: z.string().min(1) }),
|
|
339
502
|
settleAssignment: providerPath("providers.assignments.settle", "POST", "/v1/provider/assignments/{assignmentId}/settle", { assignmentId: z.string().min(1) }),
|
|
340
|
-
|
|
341
|
-
createEvent: providerPath("providers.assignments.event.create", "POST", "/v1/provider/assignments/{assignmentId}/events", { assignmentId: z.string().min(1) }),
|
|
342
|
-
publishSignal: providerPath("providers.assignments.signal.publish", "POST", "/v1/provider/assignments/{assignmentId}/signals", { assignmentId: z.string().min(1) }),
|
|
503
|
+
createEvent: providerPath("providers.assignments.event.create", "POST", "/v1/provider/assignments/{assignmentId}/events", { assignmentId: z.string().min(1) }, { body: providerEventRequest }),
|
|
343
504
|
dispatchWorkflow: providerPath("providers.assignments.workflow.dispatch", "POST", "/v1/provider/assignments/{assignmentId}/workflow-operations/{operationId}/dispatch", { assignmentId: z.string().min(1), operationId: z.string().min(1) }),
|
|
344
505
|
workflowRun: providerPath("providers.assignments.workflow.show", "GET", "/v1/provider/assignments/{assignmentId}/workflow-runs/{runId}", { assignmentId: z.string().min(1), runId: z.string().min(1) }, { read: true })
|
|
345
506
|
}
|
|
346
507
|
};
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
else if (value && typeof value === "object") for (const child of Object.values(value)) flatten(child, output);
|
|
350
|
-
return output;
|
|
351
|
-
}
|
|
352
|
-
const CONTROL_PLANE_OPERATION_LIST = Object.freeze(flatten(CONTROL_PLANE_OPERATIONS));
|
|
353
|
-
const CONTROL_PLANE_CATALOG = Object.freeze({
|
|
354
|
-
schemaVersion: "treeseed.control-plane-catalog/v1",
|
|
355
|
-
operations: CONTROL_PLANE_OPERATION_LIST.map((operation) => operation.descriptor)
|
|
356
|
-
});
|
|
508
|
+
const CONTROL_PLANE_OPERATION_LIST = Object.freeze(flattenControlPlaneOperations(CONTROL_PLANE_OPERATIONS));
|
|
509
|
+
const CONTROL_PLANE_CATALOG = buildControlPlaneCatalog(CONTROL_PLANE_OPERATION_LIST);
|
|
357
510
|
function controlPlaneOperation(operationId) {
|
|
358
511
|
const operation = CONTROL_PLANE_OPERATION_LIST.find((candidate) => candidate.descriptor.operationId === operationId);
|
|
359
512
|
if (!operation) throw new Error(`Unknown control-plane operation ${operationId}.`);
|