@treeseed/sdk 0.13.0-rc.12 → 0.13.0-rc.121
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 +23 -9
- package/dist/.treeseed-build-complete.json +1 -0
- package/dist/accounts/account-contracts.d.ts +6 -0
- package/dist/agent-capacity/allocation.d.ts +0 -3
- package/dist/agent-capacity/allocation.js +0 -221
- package/dist/agent-capacity/artifact-mutation-receipt.d.ts +1 -1
- package/dist/agent-capacity/artifacts.d.ts +17 -1
- package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.d.ts +4395 -0
- package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.js +176 -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-records.d.ts +22 -2
- 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 +0 -2
- package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.d.ts +82 -0
- package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.js +115 -0
- package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.d.ts +142 -0
- package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.js +51 -0
- package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.d.ts +331 -0
- package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.js +135 -0
- package/dist/agent-capacity/contracts/capacity/workdays/workday-records.d.ts +3 -22
- package/dist/agent-capacity/contracts/configuration/configuration.js +1 -1
- 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 +0 -1
- package/dist/agent-capacity/contracts/runtime/runtime-observability.d.ts +3 -3
- package/dist/agent-capacity/contracts/support/decision-work.d.ts +3 -27
- package/dist/agent-capacity/contracts/support/execution-graph.d.ts +1087 -0
- package/dist/agent-capacity/contracts/support/execution-graph.js +120 -0
- 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/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 +2687 -8933
- package/dist/agent-capacity/validation/agent-definition-schema.js +64 -174
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +23 -23
- package/dist/agent-capacity/validation/assignment-records.js +1 -1
- package/dist/agent-capacity/validation/configuration.d.ts +1 -1
- package/dist/agent-capacity/validation/configuration.js +1 -2
- 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/index.d.ts +2 -1
- package/dist/agent-capacity/validation/index.js +2 -1
- package/dist/capacity/agents/agent-capacity.d.ts +9 -1
- package/dist/capacity/agents/agent-capacity.js +8 -1
- 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 +69 -0
- package/dist/capacity-provider/client.js +22 -1
- package/dist/capacity-provider/contracts/capacity-facts.d.ts +14 -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 +109 -35
- package/dist/capacity-provider/contracts/index.d.ts +1 -0
- package/dist/capacity-provider/contracts/index.js +1 -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 +642 -0
- package/dist/capacity-provider/source-workspace.js +126 -0
- package/dist/capacity-provider/validation.d.ts +2 -2
- package/dist/capacity-provider/validation.js +91 -55
- 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 +431 -780
- package/dist/content/validation/agent-operational-content-schemas.js +29 -57
- package/dist/content/validation/auxiliary-content-schemas.d.ts +208 -208
- package/dist/content/validation/content-model-schemas.d.ts +9362 -19159
- package/dist/content/validation/content-model-schemas.js +172 -43
- package/dist/content/validation/portable-content-data.d.ts +453 -1761
- package/dist/content/validation/portable-content-data.js +5 -4
- 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 +5 -0
- package/dist/guarantees/evidence-trust.d.ts +32 -0
- package/dist/guarantees/evidence-trust.js +47 -0
- package/dist/guarantees/index.d.ts +130 -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 +72 -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/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/operator-contracts/canonical-command-tree.js +397 -43
- 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 +60 -0
- package/dist/operator-contracts/catalog/commands/command-tree-builders.js +191 -0
- package/dist/operator-contracts/catalog/communication-operations.d.ts +439 -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 +23 -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 +62 -0
- package/dist/operator-contracts/catalog/services/secret-operations.js +51 -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 +29 -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 +1824 -0
- package/dist/operator-contracts/communication/contracts.js +190 -0
- package/dist/operator-contracts/control-plane-operation.d.ts +9 -0
- package/dist/operator-contracts/control-plane-operation.js +12 -2
- package/dist/operator-contracts/control-plane-operations.d.ts +2356 -209
- package/dist/operator-contracts/control-plane-operations.js +239 -102
- 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 +61 -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 +21 -28
- package/dist/operator-contracts/workday-lifecycle.js +46 -8
- 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 +986 -0
- package/dist/platform/schemas.js +73 -0
- package/dist/platform/verification.d.ts +9 -0
- package/dist/platform/verification.js +104 -0
- package/dist/platform/workset.d.ts +21 -0
- package/dist/platform/workset.js +106 -0
- 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/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 +2 -0
- package/dist/treedx/types.d.ts +8 -7
- package/dist/treedx/types.js +0 -7
- package/dist/types/agents/agent-activity-profile.d.ts +42 -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/package.json +64 -11
- 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/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/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/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/{treedx/generated/openapi-types.js → site-contracts/platform.js} +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { TREEDX_OPENAPI_CONTRACT, TREEDX_OPENAPI_OPERATIONS } from "@treeseed/treedx";
|
|
2
|
+
import { CONTROL_PLANE_CATALOG } from "../operator-contracts/control-plane-operations.js";
|
|
3
|
+
import { standardsSha256 } from "../standards/canonicalize.js";
|
|
4
|
+
const TREESEED_TREEDX_SERVICE_CONTRACT_SCHEMA = "treeseed.treedx-service-contract/v1";
|
|
5
|
+
const TREESEED_PRIVATE_TREEDX_OPERATION_IDS = /* @__PURE__ */ new Set([
|
|
6
|
+
"createDevToken",
|
|
7
|
+
"putCapabilityGrant",
|
|
8
|
+
"listCapabilityGrants",
|
|
9
|
+
"listAuditEvents",
|
|
10
|
+
"proxyInternalFederationRequest",
|
|
11
|
+
"exportInternalFederationMirror",
|
|
12
|
+
"importInternalFederationMirror",
|
|
13
|
+
"putRepositoryPlacement",
|
|
14
|
+
"createMigration",
|
|
15
|
+
"getMigration",
|
|
16
|
+
"putMirror",
|
|
17
|
+
"syncMirror",
|
|
18
|
+
"promoteMirror",
|
|
19
|
+
"execWorkspace"
|
|
20
|
+
]);
|
|
21
|
+
function treeDxProxyOperationMapping() {
|
|
22
|
+
return CONTROL_PLANE_CATALOG.operations.filter((operation) => operation.upstream?.service === "treedx").map((operation) => ({
|
|
23
|
+
treeseedOperationId: operation.operationId,
|
|
24
|
+
treedxOperationId: operation.upstream.operationId,
|
|
25
|
+
contractVersion: operation.upstream.contractVersion,
|
|
26
|
+
contractDigest: operation.upstream.contractDigest
|
|
27
|
+
})).sort((left, right) => left.treeseedOperationId.localeCompare(right.treeseedOperationId));
|
|
28
|
+
}
|
|
29
|
+
function validateTreeDxProxyOperationMapping() {
|
|
30
|
+
const authoritativeIds = new Set(TREEDX_OPENAPI_OPERATIONS.map((operation) => operation.operationId));
|
|
31
|
+
const diagnostics = [];
|
|
32
|
+
for (const mapping of treeDxProxyOperationMapping()) {
|
|
33
|
+
if (!authoritativeIds.has(mapping.treedxOperationId)) diagnostics.push(`unknown_upstream_operation:${mapping.treedxOperationId}`);
|
|
34
|
+
if (TREESEED_PRIVATE_TREEDX_OPERATION_IDS.has(mapping.treedxOperationId)) diagnostics.push(`private_upstream_operation:${mapping.treedxOperationId}`);
|
|
35
|
+
if (mapping.contractVersion !== TREEDX_OPENAPI_CONTRACT.openapiVersion) diagnostics.push(`contract_version_drift:${mapping.treeseedOperationId}`);
|
|
36
|
+
if (mapping.contractDigest !== TREEDX_OPENAPI_CONTRACT.openapiSha256) diagnostics.push(`contract_digest_drift:${mapping.treeseedOperationId}`);
|
|
37
|
+
}
|
|
38
|
+
return diagnostics.sort();
|
|
39
|
+
}
|
|
40
|
+
async function createTreeDxServiceContractReceipt(controlPlaneCatalogDigest, evidence) {
|
|
41
|
+
const operationMapping = treeDxProxyOperationMapping();
|
|
42
|
+
return {
|
|
43
|
+
schema: TREESEED_TREEDX_SERVICE_CONTRACT_SCHEMA,
|
|
44
|
+
treedxPackageVersion: TREEDX_OPENAPI_CONTRACT.packageVersion,
|
|
45
|
+
treedxOpenapiVersion: TREEDX_OPENAPI_CONTRACT.openapiVersion,
|
|
46
|
+
treedxOpenapiDigest: TREEDX_OPENAPI_CONTRACT.openapiSha256,
|
|
47
|
+
treedxOperationInventoryDigest: TREEDX_OPENAPI_CONTRACT.operationInventorySha256,
|
|
48
|
+
treedxGeneratedTypesDigest: TREEDX_OPENAPI_CONTRACT.generatedTypesSha256,
|
|
49
|
+
treedxSourceCommit: evidence.treedxSourceCommit,
|
|
50
|
+
treedxPackageArtifactDigest: evidence.treedxPackageArtifactDigest,
|
|
51
|
+
controlPlaneCatalogDigest,
|
|
52
|
+
operationMapping,
|
|
53
|
+
operationMappingDigest: await standardsSha256(operationMapping),
|
|
54
|
+
compatibility: TREEDX_OPENAPI_CONTRACT.compatibility
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
TREESEED_PRIVATE_TREEDX_OPERATION_IDS,
|
|
59
|
+
TREESEED_TREEDX_SERVICE_CONTRACT_SCHEMA,
|
|
60
|
+
createTreeDxServiceContractReceipt,
|
|
61
|
+
treeDxProxyOperationMapping,
|
|
62
|
+
validateTreeDxProxyOperationMapping
|
|
63
|
+
};
|
package/dist/treedx/types.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export type { TreeDxApiErrorPayload, TreeDxCursor, TreeDxJson, TreeDxPage, TreeDxRecord, } from '@treeseed/treedx/treedx/types';
|
|
2
|
+
export interface TreeSeedTreeDxResourceLink {
|
|
3
|
+
type: 'resource_link';
|
|
4
|
+
uri: `treeseed://dx/projects/${string}/${string}`;
|
|
5
|
+
name: string;
|
|
6
|
+
mimeType?: string;
|
|
7
|
+
expiresAt?: string;
|
|
8
|
+
}
|
package/dist/treedx/types.js
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from "./types/tree-dx-actor.js";
|
|
2
|
-
export * from "./types/tree-dx-artifact-list-response.js";
|
|
3
|
-
export * from "./types/tree-dx-context-request.js";
|
|
4
|
-
export * from "./types/tree-dx-changeset.js";
|
|
5
|
-
export * from "./types/tree-dx-exec-result.js";
|
|
6
|
-
export * from "./types/tree-dx-list-tree-request.js";
|
|
7
|
-
export * from "./types/tree-dx-push-request.js";
|
|
@@ -1,91 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { AgentActivityType, AgentReasoningEffort, EngineeringHandlerKind, ExecutionProviderKind, ExecutionProviderPressure, ExecutionProviderQuotaVisibility, ExecutionResourceNeedKind } from './agent-trigger-kinds.js';
|
|
2
|
+
export declare const AGENT_CONTENT_MODELS: readonly ["agent", "book", "knowledge", "objective", "discussion", "discussion-message", "proposal", "question", "note", "decision"];
|
|
3
|
+
export type AgentContentModel = (typeof AGENT_CONTENT_MODELS)[number];
|
|
4
|
+
export declare const AGENT_TOOL_GROUPS: readonly ["discussion", "source.read", "source.write", "verification", "release"];
|
|
5
|
+
export type AgentToolGroup = (typeof AGENT_TOOL_GROUPS)[number];
|
|
6
|
+
export interface AgentDependencySelectors {
|
|
7
|
+
agents?: string[];
|
|
8
|
+
events?: Array<'workday-closing'>;
|
|
9
|
+
}
|
|
10
|
+
export interface AgentPermissionSet {
|
|
11
|
+
content: {
|
|
12
|
+
read: AgentContentModel[];
|
|
13
|
+
write: AgentContentModel[];
|
|
14
|
+
};
|
|
15
|
+
tools: AgentToolGroup[];
|
|
16
|
+
}
|
|
17
|
+
export interface AgentPrompt {
|
|
18
|
+
system: string;
|
|
19
|
+
instructions?: string[];
|
|
6
20
|
}
|
|
7
21
|
export interface AgentActivityProfile {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
prompt:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
authorityPresets?: AgentAuthorityPresetId[];
|
|
15
|
-
contextQueryRefs?: AgentContentRevisionRef[];
|
|
16
|
-
contextQuerySetRefs?: AgentContentRevisionRef[];
|
|
17
|
-
instructionTemplateRefs?: AgentContentRevisionRef[];
|
|
18
|
-
artifactTriggers?: Array<{
|
|
19
|
-
event: string;
|
|
20
|
-
artifactKind: string;
|
|
21
|
-
model?: string;
|
|
22
|
-
required?: boolean;
|
|
23
|
-
}>;
|
|
24
|
-
closeoutPolicy?: {
|
|
25
|
-
warningSeconds?: number;
|
|
26
|
-
summaryRequired?: boolean;
|
|
27
|
-
requiredArtifactKinds?: string[];
|
|
28
|
-
blockOnOpenQuestions?: boolean;
|
|
29
|
-
};
|
|
30
|
-
providerOverrides?: {
|
|
31
|
-
requiredCapabilities?: string[];
|
|
32
|
-
disallowedProviderIds?: string[];
|
|
33
|
-
promptRef?: string;
|
|
34
|
-
instructionTemplateRefs?: AgentContentRevisionRef[];
|
|
35
|
-
maxRuntimeSeconds?: number;
|
|
36
|
-
maxTotalTokens?: number;
|
|
37
|
-
maxCostAmount?: number;
|
|
38
|
-
};
|
|
39
|
-
tools: AgentToolPolicy;
|
|
40
|
-
signals?: AgentSignalPolicy;
|
|
41
|
-
outputs: AgentOutputContract;
|
|
42
|
-
planningIntent?: AgentActivityPlanningIntent;
|
|
43
|
-
questionPolicy?: AgentQuestionPolicy;
|
|
44
|
-
execution?: AgentActivityExecutionConfig;
|
|
22
|
+
handler: string;
|
|
23
|
+
dependsOn?: AgentDependencySelectors;
|
|
24
|
+
permissions: AgentPermissionSet;
|
|
25
|
+
prompt: AgentPrompt;
|
|
26
|
+
additionalContext?: string[];
|
|
27
|
+
parameters?: Record<string, unknown>;
|
|
45
28
|
}
|
|
46
29
|
export type AgentActivityProfilesConfiguration = Partial<Record<AgentActivityType, AgentActivityProfile>>;
|
|
47
|
-
export interface
|
|
48
|
-
|
|
49
|
-
responseStyle?: string;
|
|
50
|
-
promptTask?: string;
|
|
51
|
-
requiredCapabilities?: string[];
|
|
52
|
-
maxRuntimeSeconds?: number;
|
|
53
|
-
maxTotalTokens?: number;
|
|
54
|
-
warningTokens?: number;
|
|
55
|
-
maxCostAmount?: number;
|
|
56
|
-
costCurrency?: string;
|
|
57
|
-
toolAdditions?: string[];
|
|
58
|
-
contextModels?: string[];
|
|
59
|
-
}
|
|
60
|
-
export interface AgentCapability {
|
|
30
|
+
export interface AgentDefinition {
|
|
31
|
+
schemaVersion: 'treeseed.agent/v1';
|
|
61
32
|
id: string;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
requires?: string[];
|
|
65
|
-
reviews?: string[];
|
|
66
|
-
metadata?: Record<string, unknown>;
|
|
67
|
-
}
|
|
68
|
-
export interface AgentDefinitionIdentity {
|
|
33
|
+
name: string;
|
|
34
|
+
agentClass: string;
|
|
69
35
|
purpose: string;
|
|
70
36
|
responsibilities: string[];
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
title: string;
|
|
76
|
-
agentClass: string;
|
|
77
|
-
template?: string;
|
|
78
|
-
identity: AgentDefinitionIdentity;
|
|
79
|
-
capabilities: AgentCapability[];
|
|
37
|
+
capabilities: string[];
|
|
38
|
+
context: {
|
|
39
|
+
include: string[];
|
|
40
|
+
};
|
|
80
41
|
activityProfiles: Partial<Record<AgentActivityType, AgentActivityProfile>>;
|
|
81
|
-
|
|
42
|
+
}
|
|
43
|
+
/** @deprecated Transitional read-only shape used only by execution-run receipts. */
|
|
44
|
+
export type AgentDefinitionIdentity = Pick<AgentDefinition, 'purpose' | 'responsibilities'>;
|
|
45
|
+
export interface AgentCapabilityRequirement {
|
|
46
|
+
capabilityId: string;
|
|
47
|
+
versionRange: string;
|
|
48
|
+
requirement: 'required' | 'preferred';
|
|
82
49
|
}
|
|
83
50
|
export interface AgentExecutionConfig {
|
|
84
|
-
provider?: string;
|
|
85
|
-
model?: string;
|
|
86
51
|
approvalPolicy?: 'never' | 'on_request' | 'always' | string;
|
|
87
52
|
sandboxMode?: 'read_only' | 'workspace_write' | string;
|
|
88
|
-
reasoningEffort?:
|
|
53
|
+
reasoningEffort?: AgentReasoningEffort;
|
|
89
54
|
allowedPaths?: string[];
|
|
90
55
|
forbiddenPaths?: string[];
|
|
91
56
|
worktree?: {
|
|
@@ -99,30 +64,10 @@ export interface AgentExecutionConfig {
|
|
|
99
64
|
leaseSeconds: number;
|
|
100
65
|
retryLimit: number;
|
|
101
66
|
branchPrefix: string;
|
|
102
|
-
providerProfile?: AgentProviderProfile;
|
|
103
67
|
}
|
|
104
68
|
export type AgentProviderFallbackPolicy = 'allow_substitution' | 'require_same_model_class' | 'fail_if_unavailable' | 'ask_for_approval';
|
|
105
|
-
export interface AgentExecutionProviderPreference {
|
|
106
|
-
providerId?: string;
|
|
107
|
-
provider?: string;
|
|
108
|
-
model?: string;
|
|
109
|
-
modelClass?: string;
|
|
110
|
-
weight: number;
|
|
111
|
-
reason?: string;
|
|
112
|
-
}
|
|
113
|
-
export interface AgentProviderFallback {
|
|
114
|
-
providerId?: string;
|
|
115
|
-
provider?: string;
|
|
116
|
-
model?: string;
|
|
117
|
-
modelClass?: string;
|
|
118
|
-
maxQualityPenalty?: number;
|
|
119
|
-
}
|
|
120
69
|
export interface AgentProviderProfile {
|
|
121
|
-
|
|
122
|
-
preferredExecutionProviders: AgentExecutionProviderPreference[];
|
|
123
|
-
acceptableFallbacks: AgentProviderFallback[];
|
|
124
|
-
disallowedProviders?: string[];
|
|
125
|
-
disallowedRegions?: string[];
|
|
70
|
+
capabilityRequirements: AgentCapabilityRequirement[];
|
|
126
71
|
fallbackPolicy: AgentProviderFallbackPolicy;
|
|
127
72
|
}
|
|
128
73
|
export interface ExecutionResourceNeed {
|
|
@@ -145,7 +90,6 @@ export interface ExecutionCapabilitySupply {
|
|
|
145
90
|
executionProviderId: string;
|
|
146
91
|
kind: ExecutionProviderKind;
|
|
147
92
|
capabilities: string[];
|
|
148
|
-
aliases?: string[];
|
|
149
93
|
grants: string[];
|
|
150
94
|
availability?: Record<string, unknown>;
|
|
151
95
|
pressure?: ExecutionProviderPressure;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const AGENT_CONTENT_MODELS = [
|
|
2
|
+
"agent",
|
|
3
|
+
"book",
|
|
4
|
+
"knowledge",
|
|
5
|
+
"objective",
|
|
6
|
+
"discussion",
|
|
7
|
+
"discussion-message",
|
|
8
|
+
"proposal",
|
|
9
|
+
"question",
|
|
10
|
+
"note",
|
|
11
|
+
"decision"
|
|
12
|
+
];
|
|
13
|
+
const AGENT_TOOL_GROUPS = [
|
|
14
|
+
"discussion",
|
|
15
|
+
"source.read",
|
|
16
|
+
"source.write",
|
|
17
|
+
"verification",
|
|
18
|
+
"release"
|
|
19
|
+
];
|
|
20
|
+
export {
|
|
21
|
+
AGENT_CONTENT_MODELS,
|
|
22
|
+
AGENT_TOOL_GROUPS
|
|
23
|
+
};
|
|
@@ -7,8 +7,7 @@ export declare const AGENT_ACTIVITY_TYPES: readonly ["planning", "estimating", "
|
|
|
7
7
|
export declare const ENGINEERING_HANDLER_KINDS: readonly ["writer", "actor", "estimate", "releaser", "reporter"];
|
|
8
8
|
export declare const AGENT_CLI_ALLOW_TOOLS: readonly ["shell(git)", "shell(npm)", "web"];
|
|
9
9
|
export declare const EXECUTION_RESOURCE_NEED_KINDS: readonly ["repository", "treedx_workspace", "workflow", "secret", "external_issue", "external_job"];
|
|
10
|
-
export declare const EXECUTION_PROVIDER_KINDS: readonly ["ai_model", "human_issue_queue", "deterministic_workflow"
|
|
11
|
-
export declare const BUILT_IN_AGENT_EXECUTION_PROVIDER_IDS: readonly ["codex", "opencode", "copilot", "jira", "github_issues", "discord", "workflow", "platform-operation"];
|
|
10
|
+
export declare const EXECUTION_PROVIDER_KINDS: readonly ["ai_model", "human_issue_queue", "deterministic_workflow"];
|
|
12
11
|
export declare const EXECUTION_RUN_STATUSES: readonly ["accepted", "running", "waiting", "blocked", "completed", "returned", "failed", "cancelled"];
|
|
13
12
|
export declare const EXECUTION_PROVIDER_PRESSURE_STATES: readonly ["idle", "normal", "busy", "throttled", "exhausted"];
|
|
14
13
|
export declare const EXECUTION_PROVIDER_QUOTA_VISIBILITIES: readonly ["opaque", "partial", "exact"];
|
|
@@ -18,11 +17,11 @@ export type AgentMessageStatus = (typeof AGENT_MESSAGE_STATUSES)[number];
|
|
|
18
17
|
export type AgentRunStatus = (typeof AGENT_RUN_STATUSES)[number];
|
|
19
18
|
export type AgentHandlerKind = string;
|
|
20
19
|
export type AgentActivityType = (typeof AGENT_ACTIVITY_TYPES)[number];
|
|
20
|
+
export type AgentReasoningEffort = 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
21
21
|
export type EngineeringHandlerKind = (typeof ENGINEERING_HANDLER_KINDS)[number];
|
|
22
22
|
export type AgentCliAllowTool = (typeof AGENT_CLI_ALLOW_TOOLS)[number];
|
|
23
23
|
export type ExecutionResourceNeedKind = (typeof EXECUTION_RESOURCE_NEED_KINDS)[number] | string;
|
|
24
24
|
export type ExecutionProviderKind = (typeof EXECUTION_PROVIDER_KINDS)[number] | string;
|
|
25
|
-
export type BuiltInAgentExecutionProviderId = (typeof BUILT_IN_AGENT_EXECUTION_PROVIDER_IDS)[number];
|
|
26
25
|
export type ExecutionRunStatus = (typeof EXECUTION_RUN_STATUSES)[number];
|
|
27
26
|
export type ExecutionProviderPressure = (typeof EXECUTION_PROVIDER_PRESSURE_STATES)[number];
|
|
28
27
|
export type ExecutionProviderQuotaVisibility = (typeof EXECUTION_PROVIDER_QUOTA_VISIBILITIES)[number];
|
|
@@ -152,7 +151,7 @@ export interface AgentActivityPromptConfig {
|
|
|
152
151
|
templates?: Record<string, string>;
|
|
153
152
|
}
|
|
154
153
|
export interface AgentActivityExecutionConfig {
|
|
155
|
-
|
|
154
|
+
reasoningEffort?: AgentReasoningEffort;
|
|
156
155
|
maxRuntimeSeconds?: number;
|
|
157
156
|
closeoutWarningSeconds?: number;
|
|
158
157
|
maxRetries?: number;
|
|
@@ -185,5 +184,4 @@ export interface AgentActivityPlanningIntent {
|
|
|
185
184
|
signals?: AgentSignalPolicy;
|
|
186
185
|
}>;
|
|
187
186
|
requiresArtifactKinds?: string[];
|
|
188
|
-
proposalTypes?: string[];
|
|
189
187
|
}
|
|
@@ -54,18 +54,7 @@ const EXECUTION_RESOURCE_NEED_KINDS = [
|
|
|
54
54
|
const EXECUTION_PROVIDER_KINDS = [
|
|
55
55
|
"ai_model",
|
|
56
56
|
"human_issue_queue",
|
|
57
|
-
"deterministic_workflow"
|
|
58
|
-
"local_process"
|
|
59
|
-
];
|
|
60
|
-
const BUILT_IN_AGENT_EXECUTION_PROVIDER_IDS = [
|
|
61
|
-
"codex",
|
|
62
|
-
"opencode",
|
|
63
|
-
"copilot",
|
|
64
|
-
"jira",
|
|
65
|
-
"github_issues",
|
|
66
|
-
"discord",
|
|
67
|
-
"workflow",
|
|
68
|
-
"platform-operation"
|
|
57
|
+
"deterministic_workflow"
|
|
69
58
|
];
|
|
70
59
|
const EXECUTION_RUN_STATUSES = [
|
|
71
60
|
"accepted",
|
|
@@ -97,7 +86,6 @@ export {
|
|
|
97
86
|
AGENT_PERMISSION_OPERATIONS,
|
|
98
87
|
AGENT_RUN_STATUSES,
|
|
99
88
|
AGENT_TRIGGER_KINDS,
|
|
100
|
-
BUILT_IN_AGENT_EXECUTION_PROVIDER_IDS,
|
|
101
89
|
ENGINEERING_HANDLER_KINDS,
|
|
102
90
|
EXECUTION_PROVIDER_KINDS,
|
|
103
91
|
EXECUTION_PROVIDER_PRESSURE_STATES,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentActivityProfile, AgentDefinitionIdentity, AgentExecutionConfig, AgentHandlerConfig } from './agent-activity-profile.js';
|
|
2
|
-
import {
|
|
2
|
+
import { AgentActivityType, AgentBranchPolicy, AgentCliAllowTool, AgentContentAccessPolicy, AgentHandlerKind, AgentMessageStatus, AgentOutputContract, AgentPermissionConfig, AgentQuestionPolicy, AgentRunStatus, AgentSignalPolicy, AgentToolPolicy, AgentTriggerConfig, ExecutionRunStatus } from './agent-trigger-kinds.js';
|
|
3
3
|
export interface ExecutionRunRef {
|
|
4
4
|
assignmentId: string;
|
|
5
5
|
executionProviderId?: string | null;
|
|
@@ -63,13 +63,6 @@ export interface AgentRuntimeSpec {
|
|
|
63
63
|
handler: AgentHandlerKind;
|
|
64
64
|
activityType?: AgentActivityType;
|
|
65
65
|
activityProfiles?: Partial<Record<AgentActivityType, AgentActivityProfile>>;
|
|
66
|
-
authorityPresetIds?: import('../../agent-capacity/authority/agent-authority-presets.js').AgentAuthorityPresetId[];
|
|
67
|
-
authoritySnapshot?: {
|
|
68
|
-
presetIds: import('../../agent-capacity/authority/agent-authority-presets.js').AgentAuthorityPresetId[];
|
|
69
|
-
permissions?: AgentActivityPermissions;
|
|
70
|
-
tools: AgentToolPolicy;
|
|
71
|
-
branchPolicy: AgentBranchPolicy;
|
|
72
|
-
};
|
|
73
66
|
branchPolicy?: AgentBranchPolicy;
|
|
74
67
|
questionPolicy?: AgentQuestionPolicy;
|
|
75
68
|
identity?: AgentDefinitionIdentity;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treeseed/sdk",
|
|
3
|
-
"version": "0.13.0-rc.
|
|
3
|
+
"version": "0.13.0-rc.121",
|
|
4
4
|
"description": "Portable TreeSeed contracts, standards, and typed remote control-plane clients.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"build:dist": "node --import tsx ./scripts/build/build-dist.ts",
|
|
31
31
|
"check:file-lengths": "node --import tsx ./scripts/verification/check-file-lengths.ts && npm run check:file-architecture",
|
|
32
32
|
"check:file-architecture": "node --import tsx ./scripts/verification/check-file-architecture.ts",
|
|
33
|
+
"prepare": "npm run build:dist",
|
|
33
34
|
"prepack": "npm run build:dist",
|
|
34
35
|
"test": "npm run test:contracts",
|
|
35
36
|
"test:contracts": "vitest run --config ./vitest.contracts.config.ts",
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
"release:verify": "npm run check:file-lengths && node --import tsx ./scripts/packages/release-verify.ts",
|
|
42
43
|
"release:publish": "node --import tsx ./scripts/packages/publish-package.ts",
|
|
43
44
|
"release:readback": "node --import tsx ./scripts/packages/verify-published-package.ts",
|
|
45
|
+
"release:verify-custody": "node --import tsx ./scripts/packages/verify-release-custody.ts",
|
|
44
46
|
"standards:baseline": "node --import tsx ./scripts/standards/acquire-accepted-baseline.ts",
|
|
45
47
|
"standards:build": "node --import tsx ./scripts/standards/build-contract-bundle.ts",
|
|
46
48
|
"standards:compatibility": "node --import tsx ./scripts/standards/compare-compatibility.ts",
|
|
@@ -49,7 +51,9 @@
|
|
|
49
51
|
"standards:release-evidence": "node --import tsx ./scripts/standards/create-release-evidence.ts"
|
|
50
52
|
},
|
|
51
53
|
"dependencies": {
|
|
54
|
+
"@treeseed/treedx": "0.3.0-rc.17",
|
|
52
55
|
"esbuild": "^0.28.0",
|
|
56
|
+
"libsodium-wrappers-sumo": "0.8.4",
|
|
53
57
|
"typescript": "^5.9.3",
|
|
54
58
|
"yaml": "^2.8.1",
|
|
55
59
|
"zod": "^3.25.76"
|
|
@@ -57,9 +61,29 @@
|
|
|
57
61
|
"devDependencies": {
|
|
58
62
|
"@types/node": "^24.6.0",
|
|
59
63
|
"tsx": "^4.21.0",
|
|
60
|
-
"vitest": "
|
|
64
|
+
"vitest": "4.1.11"
|
|
61
65
|
},
|
|
62
66
|
"exports": {
|
|
67
|
+
"./identity": {
|
|
68
|
+
"types": "./dist/identity/index.d.ts",
|
|
69
|
+
"default": "./dist/identity/index.js"
|
|
70
|
+
},
|
|
71
|
+
"./platform": {
|
|
72
|
+
"types": "./dist/platform/index.d.ts",
|
|
73
|
+
"default": "./dist/platform/index.js"
|
|
74
|
+
},
|
|
75
|
+
"./security": {
|
|
76
|
+
"types": "./dist/security/index.d.ts",
|
|
77
|
+
"default": "./dist/security/index.js"
|
|
78
|
+
},
|
|
79
|
+
"./development": {
|
|
80
|
+
"types": "./dist/development/index.d.ts",
|
|
81
|
+
"default": "./dist/development/index.js"
|
|
82
|
+
},
|
|
83
|
+
"./deployment": {
|
|
84
|
+
"types": "./dist/deployment/index.d.ts",
|
|
85
|
+
"default": "./dist/deployment/index.js"
|
|
86
|
+
},
|
|
63
87
|
"./standards": {
|
|
64
88
|
"types": "./dist/standards/index.d.ts",
|
|
65
89
|
"default": "./dist/standards/index.js"
|
|
@@ -80,6 +104,30 @@
|
|
|
80
104
|
"types": "./dist/operator-contracts/index.d.ts",
|
|
81
105
|
"default": "./dist/operator-contracts/index.js"
|
|
82
106
|
},
|
|
107
|
+
"./guarantees": {
|
|
108
|
+
"types": "./dist/guarantees/index.d.ts",
|
|
109
|
+
"default": "./dist/guarantees/index.js"
|
|
110
|
+
},
|
|
111
|
+
"./site-contracts/platform": {
|
|
112
|
+
"types": "./dist/site-contracts/platform.d.ts",
|
|
113
|
+
"default": "./dist/site-contracts/platform.js"
|
|
114
|
+
},
|
|
115
|
+
"./site-contracts/plugin": {
|
|
116
|
+
"types": "./dist/site-contracts/plugin.d.ts",
|
|
117
|
+
"default": "./dist/site-contracts/plugin.js"
|
|
118
|
+
},
|
|
119
|
+
"./site-contracts/cloudflare": {
|
|
120
|
+
"types": "./dist/site-contracts/cloudflare.d.ts",
|
|
121
|
+
"default": "./dist/site-contracts/cloudflare.js"
|
|
122
|
+
},
|
|
123
|
+
"./site-contracts/catalog": {
|
|
124
|
+
"types": "./dist/site-contracts/catalog.d.ts",
|
|
125
|
+
"default": "./dist/site-contracts/catalog.js"
|
|
126
|
+
},
|
|
127
|
+
"./field-aliases": {
|
|
128
|
+
"types": "./dist/entrypoints/models/field-aliases.d.ts",
|
|
129
|
+
"default": "./dist/entrypoints/models/field-aliases.js"
|
|
130
|
+
},
|
|
83
131
|
"./control-plane-client": {
|
|
84
132
|
"types": "./dist/entrypoints/clients/control-plane-client.d.ts",
|
|
85
133
|
"default": "./dist/entrypoints/clients/control-plane-client.js"
|
|
@@ -112,25 +160,30 @@
|
|
|
112
160
|
"types": "./dist/content/validation/index.d.ts",
|
|
113
161
|
"default": "./dist/content/validation/index.js"
|
|
114
162
|
},
|
|
115
|
-
"./treedx
|
|
116
|
-
"types": "./dist/treedx/
|
|
117
|
-
"
|
|
118
|
-
"default": "./dist/treedx/support/client.js"
|
|
163
|
+
"./treedx": {
|
|
164
|
+
"types": "./dist/treedx/index.d.ts",
|
|
165
|
+
"default": "./dist/treedx/index.js"
|
|
119
166
|
},
|
|
120
|
-
"./treedx/
|
|
121
|
-
"types": "./dist/treedx/
|
|
122
|
-
"
|
|
123
|
-
"default": "./dist/treedx/accounts/auth.js"
|
|
167
|
+
"./treedx/client": {
|
|
168
|
+
"types": "./dist/treedx/client.d.ts",
|
|
169
|
+
"default": "./dist/treedx/client.js"
|
|
124
170
|
},
|
|
125
171
|
"./treedx/types": {
|
|
126
172
|
"types": "./dist/treedx/types.d.ts",
|
|
127
|
-
"import": "./dist/treedx/types.js",
|
|
128
173
|
"default": "./dist/treedx/types.js"
|
|
129
174
|
},
|
|
175
|
+
"./treeai": {
|
|
176
|
+
"types": "./dist/treeai/index.d.ts",
|
|
177
|
+
"default": "./dist/treeai/index.js"
|
|
178
|
+
},
|
|
130
179
|
"./capacity-provider": {
|
|
131
180
|
"types": "./dist/capacity/providers/capacity-provider.d.ts",
|
|
132
181
|
"default": "./dist/capacity/providers/capacity-provider.js"
|
|
133
182
|
},
|
|
183
|
+
"./capacity-provider/sandbox": {
|
|
184
|
+
"types": "./dist/capacity-provider/sandbox.d.ts",
|
|
185
|
+
"default": "./dist/capacity-provider/sandbox.js"
|
|
186
|
+
},
|
|
134
187
|
"./capacity-provider/contracts": {
|
|
135
188
|
"types": "./dist/capacity-provider/contracts/index.d.ts",
|
|
136
189
|
"default": "./dist/capacity-provider/contracts/index.js"
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { AgentActivityPermissions, AgentActivityProfile, AgentActivityType, AgentToolPolicy } from '../../types/agents.js';
|
|
2
|
-
export declare const AGENT_AUTHORITY_PRESET_IDS: readonly ["messaging", "direction", "influence", "estimation", "plan-contribution", "source-execution", "review-authority", "reporting"];
|
|
3
|
-
export type AgentAuthorityPresetId = (typeof AGENT_AUTHORITY_PRESET_IDS)[number];
|
|
4
|
-
export interface CompiledAgentAuthoritySnapshot {
|
|
5
|
-
presetIds: AgentAuthorityPresetId[];
|
|
6
|
-
permissions?: AgentActivityPermissions;
|
|
7
|
-
tools: AgentToolPolicy;
|
|
8
|
-
branchPolicy: AgentActivityProfile['branchPolicy'];
|
|
9
|
-
diagnostics: string[];
|
|
10
|
-
}
|
|
11
|
-
export declare function defaultAgentAuthorityPresets(activityType: AgentActivityType): ("reporting" | "messaging" | "direction" | "influence" | "estimation" | "plan-contribution" | "source-execution" | "review-authority")[];
|
|
12
|
-
export declare function compileAgentAuthoritySnapshot(activityType: AgentActivityType, profile: AgentActivityProfile): CompiledAgentAuthoritySnapshot;
|
|
13
|
-
export declare function allowedSafetyModesForActivity(activityType: AgentActivityType): Array<'planning' | 'acting'>;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
const AGENT_AUTHORITY_PRESET_IDS = [
|
|
2
|
-
"messaging",
|
|
3
|
-
"direction",
|
|
4
|
-
"influence",
|
|
5
|
-
"estimation",
|
|
6
|
-
"plan-contribution",
|
|
7
|
-
"source-execution",
|
|
8
|
-
"review-authority",
|
|
9
|
-
"reporting"
|
|
10
|
-
];
|
|
11
|
-
const OPERATIONAL_TOOLS = ["treeseed.status", "treeseed.assignment_activity", "treeseed.assignment_plan", "treeseed.assignment_status_update", "treeseed.assignment_summary"];
|
|
12
|
-
const MESSAGING_TOOLS = ["treeseed.discussion.read", "treeseed.discussion.follow", "treeseed.discussion.respond", "treeseed.discussion.request_handoff"];
|
|
13
|
-
const CONTENT_TOOLS = ["treeseed.content.describe", "treeseed.content.query", "treeseed.content.read", "treeseed.content.create", "treeseed.content.update", "treeseed.content.link", "treeseed.content.validate", "treeseed.content.commit"];
|
|
14
|
-
const SOURCE_READ_TOOLS = ["treeseed.repository.read_file", "treeseed.repository.search", "treeseed.changed_paths", "treeseed.verify"];
|
|
15
|
-
const SOURCE_EXECUTION_TOOLS = [...SOURCE_READ_TOOLS, "treeseed.checkpoint"];
|
|
16
|
-
const RAW_CONTENT_MUTATION_TOOLS = /* @__PURE__ */ new Set(["treedx.apply_workspace_changeset", "treedx.commit_workspace"]);
|
|
17
|
-
const CHAT_ALLOWED_TOOLS = /* @__PURE__ */ new Set([
|
|
18
|
-
...OPERATIONAL_TOOLS,
|
|
19
|
-
...MESSAGING_TOOLS,
|
|
20
|
-
...CONTENT_TOOLS,
|
|
21
|
-
"treedx.build_context",
|
|
22
|
-
"treedx.read_repository_files",
|
|
23
|
-
"treedx.search_workspace",
|
|
24
|
-
"treedx.read_workspace_file",
|
|
25
|
-
"treeseed.discussion.create_artifact",
|
|
26
|
-
"treeseed.operation.prepare_handoff",
|
|
27
|
-
"treeseed.client_session.request_action"
|
|
28
|
-
]);
|
|
29
|
-
const PROFILE_PRESETS = {
|
|
30
|
-
planning: ["influence", "plan-contribution"],
|
|
31
|
-
estimating: ["messaging", "estimation"],
|
|
32
|
-
acting: ["source-execution", "influence"],
|
|
33
|
-
reviewing: ["review-authority", "plan-contribution"],
|
|
34
|
-
reporting: ["messaging", "reporting"],
|
|
35
|
-
chat: ["influence"]
|
|
36
|
-
};
|
|
37
|
-
function toolsForPreset(preset) {
|
|
38
|
-
if (preset === "messaging") return MESSAGING_TOOLS;
|
|
39
|
-
if (preset === "direction") return CONTENT_TOOLS;
|
|
40
|
-
if (preset === "influence") return [...MESSAGING_TOOLS, ...CONTENT_TOOLS];
|
|
41
|
-
if (preset === "estimation") return MESSAGING_TOOLS;
|
|
42
|
-
if (preset === "plan-contribution") return [];
|
|
43
|
-
if (preset === "source-execution") return SOURCE_EXECUTION_TOOLS;
|
|
44
|
-
if (preset === "review-authority") return [...MESSAGING_TOOLS, ...CONTENT_TOOLS, ...SOURCE_READ_TOOLS];
|
|
45
|
-
return [...MESSAGING_TOOLS, ...CONTENT_TOOLS];
|
|
46
|
-
}
|
|
47
|
-
const OPERATIONAL_MODELS = /* @__PURE__ */ new Set(["assignment_plan", "assignment_status", "assignment_summary"]);
|
|
48
|
-
const MUTABLE_MODELS = {
|
|
49
|
-
planning: /* @__PURE__ */ new Set(["proposal", "question", "note", "discussion_message", ...OPERATIONAL_MODELS]),
|
|
50
|
-
estimating: /* @__PURE__ */ new Set(["note", "question", "discussion_message", ...OPERATIONAL_MODELS]),
|
|
51
|
-
acting: /* @__PURE__ */ new Set(),
|
|
52
|
-
reviewing: /* @__PURE__ */ new Set(["note", "question", "discussion_message", ...OPERATIONAL_MODELS]),
|
|
53
|
-
reporting: /* @__PURE__ */ new Set(["note", "discussion_message", ...OPERATIONAL_MODELS]),
|
|
54
|
-
chat: /* @__PURE__ */ new Set(["proposal", "question", "note", "discussion_message", ...OPERATIONAL_MODELS])
|
|
55
|
-
};
|
|
56
|
-
function boundedPermissions(activityType, permissions) {
|
|
57
|
-
if (!permissions) return permissions;
|
|
58
|
-
const content = Object.fromEntries(Object.entries(permissions.content ?? {}).map(([model, policy]) => {
|
|
59
|
-
if (activityType === "acting" || MUTABLE_MODELS[activityType].has(model)) return [model, policy];
|
|
60
|
-
return [model, { ...policy, operations: policy.operations.filter((operation) => ["describe", "query", "read", "validate"].includes(operation)) }];
|
|
61
|
-
}).filter(([, policy]) => policy.operations.length));
|
|
62
|
-
if (activityType === "acting") return { ...permissions, content };
|
|
63
|
-
return {
|
|
64
|
-
...permissions,
|
|
65
|
-
content,
|
|
66
|
-
repository: { ...permissions.repository ?? {}, writePaths: [], allowCodeMutation: false },
|
|
67
|
-
commit: { allowed: Object.entries(content).some(([model, policy]) => MUTABLE_MODELS[activityType].has(model) && (policy.operations.includes("create") || policy.operations.includes("update") || policy.operations.includes("link") || policy.operations.includes("commit"))) },
|
|
68
|
-
network: permissions.network,
|
|
69
|
-
shell: { ...permissions.shell ?? {}, allowCommands: false, allowedCommands: [] }
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
function defaultAgentAuthorityPresets(activityType) {
|
|
73
|
-
return [...PROFILE_PRESETS[activityType]];
|
|
74
|
-
}
|
|
75
|
-
function compileAgentAuthoritySnapshot(activityType, profile) {
|
|
76
|
-
const declared = profile.authorityPresets?.length ? profile.authorityPresets : defaultAgentAuthorityPresets(activityType);
|
|
77
|
-
const presetIds = [...new Set(declared)];
|
|
78
|
-
const diagnostics = [];
|
|
79
|
-
for (const preset of presetIds) if (!AGENT_AUTHORITY_PRESET_IDS.includes(preset)) diagnostics.push(`Unknown authority preset ${preset}.`);
|
|
80
|
-
const declaredTools = [.../* @__PURE__ */ new Set([...OPERATIONAL_TOOLS, ...presetIds.flatMap(toolsForPreset), ...profile.tools?.allowed ?? []])];
|
|
81
|
-
const hasModelAwareContentMutation = declaredTools.some((tool) => /^treeseed\.content\.(?:create|update|link|commit)$/u.test(tool));
|
|
82
|
-
const allowed = hasModelAwareContentMutation ? declaredTools.filter((tool) => !RAW_CONTENT_MUTATION_TOOLS.has(tool)) : declaredTools;
|
|
83
|
-
const denied = new Set(profile.tools?.denied ?? []);
|
|
84
|
-
const profileAllowed = activityType === "acting" ? allowed : activityType === "reviewing" ? allowed.filter((tool) => tool !== "treeseed.checkpoint") : activityType === "chat" ? allowed.filter((tool) => CHAT_ALLOWED_TOOLS.has(tool)) : allowed.filter((tool) => tool !== "treeseed.checkpoint" && !tool.startsWith("treeseed.repository.") && tool !== "treeseed.changed_paths" && tool !== "treeseed.verify");
|
|
85
|
-
if (activityType === "chat") {
|
|
86
|
-
for (const tool of allowed) if (!CHAT_ALLOWED_TOOLS.has(tool)) diagnostics.push(`Chat cannot use ${tool}.`);
|
|
87
|
-
}
|
|
88
|
-
const tools = { allowed: profileAllowed.filter((tool) => !denied.has(tool)), ...denied.size ? { denied: [...denied] } : {} };
|
|
89
|
-
if (activityType !== "acting" && profile.permissions?.repository?.allowCodeMutation === true) diagnostics.push(`${activityType} cannot enable repository code mutation.`);
|
|
90
|
-
if (activityType === "reviewing" && tools.allowed.includes("treeseed.checkpoint")) diagnostics.push("Review authority cannot checkpoint or modify the reviewed implementation.");
|
|
91
|
-
if (activityType === "acting" && profile.permissions?.repository?.allowCodeMutation !== true && profile.permissions?.commit?.allowed !== true) diagnostics.push("Acting requires explicit source-mutation or governed content-commit authority.");
|
|
92
|
-
const permissions = boundedPermissions(activityType, profile.permissions);
|
|
93
|
-
const branchPolicy = profile.branchPolicy;
|
|
94
|
-
return { presetIds, permissions, tools, branchPolicy, diagnostics };
|
|
95
|
-
}
|
|
96
|
-
function allowedSafetyModesForActivity(activityType) {
|
|
97
|
-
if (activityType === "acting") return ["acting"];
|
|
98
|
-
if (activityType === "reviewing") return ["planning", "acting"];
|
|
99
|
-
return ["planning"];
|
|
100
|
-
}
|
|
101
|
-
export {
|
|
102
|
-
AGENT_AUTHORITY_PRESET_IDS,
|
|
103
|
-
allowedSafetyModesForActivity,
|
|
104
|
-
compileAgentAuthoritySnapshot,
|
|
105
|
-
defaultAgentAuthorityPresets
|
|
106
|
-
};
|