@treeseed/sdk 0.13.0-rc.11 → 0.13.0-rc.111
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/artifact-mutation-receipt.d.ts +1 -1
- package/dist/agent-capacity/artifacts.d.ts +17 -1
- package/dist/agent-capacity/authority/agent-authority-presets.js +2 -1
- 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 +10 -1
- 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/workday-records.d.ts +1 -1
- package/dist/agent-capacity/contracts/configuration/configuration.js +1 -1
- 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 +2 -3
- package/dist/agent-capacity/validation/activity-profile.js +25 -12
- package/dist/agent-capacity/validation/agent-definition-schema.d.ts +1092 -1170
- package/dist/agent-capacity/validation/agent-definition-schema.js +11 -29
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +20 -20
- package/dist/agent-capacity/validation/configuration.d.ts +1 -1
- package/dist/agent-capacity/validation/configuration.js +1 -2
- package/dist/capacity/agents/agent-capacity.d.ts +2 -0
- package/dist/capacity/agents/agent-capacity.js +2 -0
- 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 +24 -0
- package/dist/capacity-provider/client.js +11 -1
- 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 +103 -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 +548 -0
- package/dist/capacity-provider/sandbox-contracts.js +86 -0
- package/dist/capacity-provider/sandbox.d.ts +1 -0
- package/dist/capacity-provider/sandbox.js +1 -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/validation/agent-operational-content-schemas.d.ts +490 -168
- package/dist/content/validation/agent-operational-content-schemas.js +18 -3
- package/dist/content/validation/auxiliary-content-schemas.d.ts +160 -160
- package/dist/content/validation/content-model-schemas.d.ts +2943 -2747
- package/dist/content/validation/portable-content-data.d.ts +296 -292
- 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 +14 -0
- package/dist/deployment/postgres/requirements.js +30 -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 +3578 -0
- package/dist/development/schemas.js +199 -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.js +1 -1
- package/dist/operator-contracts/canonical-command-tree.js +465 -16
- 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/capability-ontology-operations.d.ts +163 -0
- package/dist/operator-contracts/catalog/capability-ontology-operations.js +24 -0
- package/dist/operator-contracts/catalog/communication-operations.d.ts +437 -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/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 +261 -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/command-tree.d.ts +28 -0
- package/dist/operator-contracts/command-tree.js +49 -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 +1818 -0
- package/dist/operator-contracts/communication/contracts.js +188 -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 +2255 -195
- package/dist/operator-contracts/control-plane-operations.js +247 -85
- package/dist/operator-contracts/inbox/contracts.d.ts +1099 -0
- package/dist/operator-contracts/inbox/contracts.js +134 -0
- package/dist/operator-contracts/index.d.ts +6 -0
- package/dist/operator-contracts/index.js +6 -0
- 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/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/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 +18 -36
- package/dist/types/agents/agent-trigger-kinds.d.ts +3 -5
- package/dist/types/agents/agent-trigger-kinds.js +1 -13
- package/package.json +64 -11
- 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-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/{treedx/generated/openapi-types.js → site-contracts/cloudflare.js} +0 -0
- /package/dist/{treedx/types/tree-dx-artifact-list-response.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,9 +1,21 @@
|
|
|
1
|
-
import { AgentActivityExecutionConfig, AgentActivityPermissions, AgentActivityPlanningIntent, AgentActivityPromptConfig, AgentActivityType, AgentBranchPolicy, AgentOutputContract, AgentQuestionPolicy, AgentSignalPolicy, AgentToolPolicy, EngineeringHandlerKind, ExecutionProviderKind, ExecutionProviderPressure, ExecutionProviderQuotaVisibility, ExecutionResourceNeedKind } from './agent-trigger-kinds.js';
|
|
1
|
+
import { AgentActivityExecutionConfig, AgentActivityPermissions, AgentActivityPlanningIntent, AgentActivityPromptConfig, AgentActivityType, AgentBranchPolicy, AgentOutputContract, AgentQuestionPolicy, AgentReasoningEffort, AgentSignalPolicy, AgentToolPolicy, EngineeringHandlerKind, ExecutionProviderKind, ExecutionProviderPressure, ExecutionProviderQuotaVisibility, ExecutionResourceNeedKind } from './agent-trigger-kinds.js';
|
|
2
2
|
import type { AgentAuthorityPresetId } from '../../agent-capacity/authority/agent-authority-presets.js';
|
|
3
3
|
export interface AgentContentRevisionRef {
|
|
4
4
|
id: string;
|
|
5
5
|
revision: number;
|
|
6
6
|
}
|
|
7
|
+
export interface AgentCapabilityConfigurationValue {
|
|
8
|
+
value: unknown;
|
|
9
|
+
requirement: 'required' | 'preferred';
|
|
10
|
+
}
|
|
11
|
+
export interface AgentCapabilityRequirement {
|
|
12
|
+
capabilityId: string;
|
|
13
|
+
versionRange: string;
|
|
14
|
+
requirement: 'required' | 'preferred';
|
|
15
|
+
alternativeGroup?: string | null;
|
|
16
|
+
requiredFeatures?: string[];
|
|
17
|
+
configuration?: Record<string, AgentCapabilityConfigurationValue>;
|
|
18
|
+
}
|
|
7
19
|
export interface AgentActivityProfile {
|
|
8
20
|
activityType?: AgentActivityType;
|
|
9
21
|
enabled: boolean;
|
|
@@ -15,6 +27,7 @@ export interface AgentActivityProfile {
|
|
|
15
27
|
contextQueryRefs?: AgentContentRevisionRef[];
|
|
16
28
|
contextQuerySetRefs?: AgentContentRevisionRef[];
|
|
17
29
|
instructionTemplateRefs?: AgentContentRevisionRef[];
|
|
30
|
+
capabilityRequirements?: AgentCapabilityRequirement[];
|
|
18
31
|
artifactTriggers?: Array<{
|
|
19
32
|
event: string;
|
|
20
33
|
artifactKind: string;
|
|
@@ -27,15 +40,6 @@ export interface AgentActivityProfile {
|
|
|
27
40
|
requiredArtifactKinds?: string[];
|
|
28
41
|
blockOnOpenQuestions?: boolean;
|
|
29
42
|
};
|
|
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
43
|
tools: AgentToolPolicy;
|
|
40
44
|
signals?: AgentSignalPolicy;
|
|
41
45
|
outputs: AgentOutputContract;
|
|
@@ -48,7 +52,8 @@ export interface AgentChatProfileConfiguration {
|
|
|
48
52
|
foundation: 'discussion-v1';
|
|
49
53
|
responseStyle?: string;
|
|
50
54
|
promptTask?: string;
|
|
51
|
-
|
|
55
|
+
reasoningEffort?: AgentReasoningEffort;
|
|
56
|
+
capabilityRequirements?: AgentCapabilityRequirement[];
|
|
52
57
|
maxRuntimeSeconds?: number;
|
|
53
58
|
maxTotalTokens?: number;
|
|
54
59
|
warningTokens?: number;
|
|
@@ -81,11 +86,9 @@ export interface AgentDefinition {
|
|
|
81
86
|
chatProfile?: AgentChatProfileConfiguration;
|
|
82
87
|
}
|
|
83
88
|
export interface AgentExecutionConfig {
|
|
84
|
-
provider?: string;
|
|
85
|
-
model?: string;
|
|
86
89
|
approvalPolicy?: 'never' | 'on_request' | 'always' | string;
|
|
87
90
|
sandboxMode?: 'read_only' | 'workspace_write' | string;
|
|
88
|
-
reasoningEffort?:
|
|
91
|
+
reasoningEffort?: AgentReasoningEffort;
|
|
89
92
|
allowedPaths?: string[];
|
|
90
93
|
forbiddenPaths?: string[];
|
|
91
94
|
worktree?: {
|
|
@@ -99,30 +102,10 @@ export interface AgentExecutionConfig {
|
|
|
99
102
|
leaseSeconds: number;
|
|
100
103
|
retryLimit: number;
|
|
101
104
|
branchPrefix: string;
|
|
102
|
-
providerProfile?: AgentProviderProfile;
|
|
103
105
|
}
|
|
104
106
|
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
107
|
export interface AgentProviderProfile {
|
|
121
|
-
|
|
122
|
-
preferredExecutionProviders: AgentExecutionProviderPreference[];
|
|
123
|
-
acceptableFallbacks: AgentProviderFallback[];
|
|
124
|
-
disallowedProviders?: string[];
|
|
125
|
-
disallowedRegions?: string[];
|
|
108
|
+
capabilityRequirements: AgentCapabilityRequirement[];
|
|
126
109
|
fallbackPolicy: AgentProviderFallbackPolicy;
|
|
127
110
|
}
|
|
128
111
|
export interface ExecutionResourceNeed {
|
|
@@ -145,7 +128,6 @@ export interface ExecutionCapabilitySupply {
|
|
|
145
128
|
executionProviderId: string;
|
|
146
129
|
kind: ExecutionProviderKind;
|
|
147
130
|
capabilities: string[];
|
|
148
|
-
aliases?: string[];
|
|
149
131
|
grants: string[];
|
|
150
132
|
availability?: Record<string, unknown>;
|
|
151
133
|
pressure?: ExecutionProviderPressure;
|
|
@@ -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,
|
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.111",
|
|
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,61 +0,0 @@
|
|
|
1
|
-
export declare const SERVICE_VAULT_ENCRYPTION_VERSION: "service-vault-v1";
|
|
2
|
-
export declare const SERVICE_VAULT_AEAD_ALGORITHM: "xchacha20-poly1305-ietf";
|
|
3
|
-
export declare const SERVICE_VAULT_KEY_AGREEMENT: "x25519-sealed-box";
|
|
4
|
-
export declare const SERVICE_VAULT_KDF: "argon2id";
|
|
5
|
-
export type EncryptedCredentialEnvelope = {
|
|
6
|
-
version: typeof SERVICE_VAULT_ENCRYPTION_VERSION;
|
|
7
|
-
algorithm: typeof SERVICE_VAULT_AEAD_ALGORITHM;
|
|
8
|
-
ciphertext: string;
|
|
9
|
-
nonce: string;
|
|
10
|
-
wrappedKey: string;
|
|
11
|
-
wrappedKeyNonce: string;
|
|
12
|
-
associatedData: string;
|
|
13
|
-
associatedDataDigest: string;
|
|
14
|
-
fingerprint: string;
|
|
15
|
-
};
|
|
16
|
-
export type EncryptedPrivateKeyEnvelope = {
|
|
17
|
-
version: typeof SERVICE_VAULT_ENCRYPTION_VERSION;
|
|
18
|
-
algorithm: typeof SERVICE_VAULT_AEAD_ALGORITHM;
|
|
19
|
-
kdf: {
|
|
20
|
-
algorithm: typeof SERVICE_VAULT_KDF;
|
|
21
|
-
opsLimit: number;
|
|
22
|
-
memLimit: number;
|
|
23
|
-
salt: string;
|
|
24
|
-
};
|
|
25
|
-
nonce: string;
|
|
26
|
-
ciphertext: string;
|
|
27
|
-
publicKey: string;
|
|
28
|
-
};
|
|
29
|
-
export type TeamVaultGrantEnvelope = {
|
|
30
|
-
version: typeof SERVICE_VAULT_ENCRYPTION_VERSION;
|
|
31
|
-
algorithm: typeof SERVICE_VAULT_KEY_AGREEMENT;
|
|
32
|
-
recipientPublicKey: string;
|
|
33
|
-
wrappedTeamVaultKey: string;
|
|
34
|
-
};
|
|
35
|
-
export type SecretOperationLease = {
|
|
36
|
-
id: string;
|
|
37
|
-
teamId: string;
|
|
38
|
-
connectionId: string;
|
|
39
|
-
capabilityType: string;
|
|
40
|
-
purpose: 'provider-connection-validation' | 'remote-git-publication' | 'workflow-dispatch' | 'workflow-configuration';
|
|
41
|
-
resourceScope: Record<string, string>;
|
|
42
|
-
credentialProfileId: string;
|
|
43
|
-
actorUserId: string;
|
|
44
|
-
requiredFields: string[];
|
|
45
|
-
publicKey: string;
|
|
46
|
-
status: 'awaiting-runner' | 'pending' | 'ready' | 'consumed' | 'expired' | 'cancelled' | 'failed';
|
|
47
|
-
expiresAt: string;
|
|
48
|
-
consumedAt?: string | null;
|
|
49
|
-
operationCorrelationId: string;
|
|
50
|
-
};
|
|
51
|
-
export type ServiceVaultAssociatedData = {
|
|
52
|
-
teamId: string;
|
|
53
|
-
connectionId: string;
|
|
54
|
-
credentialProfileId: string;
|
|
55
|
-
field: string;
|
|
56
|
-
purpose: string;
|
|
57
|
-
version: number;
|
|
58
|
-
};
|
|
59
|
-
export declare function containsForbiddenPlaintextSecretMaterial(value: unknown, path?: string): string[];
|
|
60
|
-
export declare function canonicalServiceVaultAssociatedData(input: ServiceVaultAssociatedData): string;
|
|
61
|
-
export declare function validateEncryptedCredentialEnvelope(value: unknown): value is EncryptedCredentialEnvelope;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const SERVICE_VAULT_ENCRYPTION_VERSION = "service-vault-v1";
|
|
2
|
-
const SERVICE_VAULT_AEAD_ALGORITHM = "xchacha20-poly1305-ietf";
|
|
3
|
-
const SERVICE_VAULT_KEY_AGREEMENT = "x25519-sealed-box";
|
|
4
|
-
const SERVICE_VAULT_KDF = "argon2id";
|
|
5
|
-
const FORBIDDEN_SECRET_KEYS = /(?:passphrase|password|plaintext|derivedKey|privateKey|apiToken|accessToken|secretValue|credentialValue)$/iu;
|
|
6
|
-
function containsForbiddenPlaintextSecretMaterial(value, path = "") {
|
|
7
|
-
if (!value || typeof value !== "object") return [];
|
|
8
|
-
const failures = [];
|
|
9
|
-
for (const [key, entry] of Object.entries(value)) {
|
|
10
|
-
const nextPath = path ? `${path}.${key}` : key;
|
|
11
|
-
if (FORBIDDEN_SECRET_KEYS.test(key) && typeof entry === "string" && entry.trim()) failures.push(nextPath);
|
|
12
|
-
if (entry && typeof entry === "object") failures.push(...containsForbiddenPlaintextSecretMaterial(entry, nextPath));
|
|
13
|
-
}
|
|
14
|
-
return failures;
|
|
15
|
-
}
|
|
16
|
-
function canonicalServiceVaultAssociatedData(input) {
|
|
17
|
-
return JSON.stringify({
|
|
18
|
-
teamId: input.teamId,
|
|
19
|
-
connectionId: input.connectionId,
|
|
20
|
-
credentialProfileId: input.credentialProfileId,
|
|
21
|
-
field: input.field,
|
|
22
|
-
purpose: input.purpose,
|
|
23
|
-
version: input.version
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
function validateEncryptedCredentialEnvelope(value) {
|
|
27
|
-
if (!value || typeof value !== "object") return false;
|
|
28
|
-
const envelope = value;
|
|
29
|
-
return envelope.version === SERVICE_VAULT_ENCRYPTION_VERSION && envelope.algorithm === SERVICE_VAULT_AEAD_ALGORITHM && [envelope.ciphertext, envelope.nonce, envelope.wrappedKey, envelope.wrappedKeyNonce, envelope.associatedData, envelope.associatedDataDigest, envelope.fingerprint].every((field) => typeof field === "string" && field.length > 0);
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
SERVICE_VAULT_AEAD_ALGORITHM,
|
|
33
|
-
SERVICE_VAULT_ENCRYPTION_VERSION,
|
|
34
|
-
SERVICE_VAULT_KDF,
|
|
35
|
-
SERVICE_VAULT_KEY_AGREEMENT,
|
|
36
|
-
canonicalServiceVaultAssociatedData,
|
|
37
|
-
containsForbiddenPlaintextSecretMaterial,
|
|
38
|
-
validateEncryptedCredentialEnvelope
|
|
39
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface TreeDxHs256TokenInput {
|
|
2
|
-
secret: string;
|
|
3
|
-
issuer: string;
|
|
4
|
-
audience: string;
|
|
5
|
-
actorId: string;
|
|
6
|
-
tenantId: string;
|
|
7
|
-
repoIds?: string[];
|
|
8
|
-
capabilities?: string[];
|
|
9
|
-
refs?: string[];
|
|
10
|
-
paths?: string[];
|
|
11
|
-
projectId?: string;
|
|
12
|
-
capacityWorkdayRunId?: string;
|
|
13
|
-
ttlSeconds?: number;
|
|
14
|
-
nowEpochSeconds?: number;
|
|
15
|
-
jti?: string;
|
|
16
|
-
}
|
|
17
|
-
export declare function mintTreeDxHs256Token(input: TreeDxHs256TokenInput): string;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { createHmac, randomUUID } from "node:crypto";
|
|
2
|
-
function required(value, owner) {
|
|
3
|
-
const normalized = value.trim();
|
|
4
|
-
if (!normalized) throw new Error(`${owner} is required to mint a TreeDX token.`);
|
|
5
|
-
return normalized;
|
|
6
|
-
}
|
|
7
|
-
function normalizedStrings(values, fallback) {
|
|
8
|
-
const normalized = values?.map((value) => String(value).trim()).filter(Boolean) ?? [];
|
|
9
|
-
return normalized.length > 0 ? [...new Set(normalized)] : fallback;
|
|
10
|
-
}
|
|
11
|
-
function base64urlJson(value) {
|
|
12
|
-
return Buffer.from(JSON.stringify(value)).toString("base64url");
|
|
13
|
-
}
|
|
14
|
-
function mintTreeDxHs256Token(input) {
|
|
15
|
-
const secret = required(input.secret, "secret");
|
|
16
|
-
const issuer = required(input.issuer, "issuer");
|
|
17
|
-
const audience = required(input.audience, "audience");
|
|
18
|
-
const actorId = required(input.actorId, "actorId");
|
|
19
|
-
const tenantId = required(input.tenantId, "tenantId");
|
|
20
|
-
const ttlSeconds = input.ttlSeconds ?? 300;
|
|
21
|
-
if (!Number.isInteger(ttlSeconds) || ttlSeconds < 30 || ttlSeconds > 3600) {
|
|
22
|
-
throw new Error("ttlSeconds must be an integer between 30 and 3600.");
|
|
23
|
-
}
|
|
24
|
-
const now = input.nowEpochSeconds ?? Math.floor(Date.now() / 1e3);
|
|
25
|
-
if (!Number.isInteger(now) || now < 0) throw new Error("nowEpochSeconds must be a nonnegative integer.");
|
|
26
|
-
const payload = {
|
|
27
|
-
iss: issuer,
|
|
28
|
-
aud: audience,
|
|
29
|
-
sub: actorId,
|
|
30
|
-
jti: input.jti?.trim() || randomUUID(),
|
|
31
|
-
iat: now,
|
|
32
|
-
nbf: now - 5,
|
|
33
|
-
exp: now + ttlSeconds,
|
|
34
|
-
treedx_actor_id: actorId,
|
|
35
|
-
treedx_tenant_id: tenantId,
|
|
36
|
-
treedx_repo_ids: normalizedStrings(input.repoIds, ["*"]),
|
|
37
|
-
treedx_capabilities: normalizedStrings(input.capabilities, []),
|
|
38
|
-
treedx_refs: normalizedStrings(input.refs, ["*"]),
|
|
39
|
-
treedx_paths: normalizedStrings(input.paths, ["**"]),
|
|
40
|
-
...input.projectId?.trim() ? { treeseed_project_id: input.projectId.trim() } : {},
|
|
41
|
-
...input.capacityWorkdayRunId?.trim() ? { treeseed_capacity_workday_run_id: input.capacityWorkdayRunId.trim() } : {}
|
|
42
|
-
};
|
|
43
|
-
const signingInput = `${base64urlJson({ alg: "HS256", typ: "JWT" })}.${base64urlJson(payload)}`;
|
|
44
|
-
return `${signingInput}.${createHmac("sha256", secret).update(signingInput).digest("base64url")}`;
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
mintTreeDxHs256Token
|
|
48
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { firstPayload } from "../../../support/client.js";
|
|
2
|
-
function buildSnapshotMethod(input = {}) {
|
|
3
|
-
const { repoId, ...body } = input;
|
|
4
|
-
return this.request("POST", `/api/v1/repos/${encodeURIComponent(this.repoId(repoId))}/snapshots/build`, body, { tokenRequired: true }).then((payload) => firstPayload(payload, ["snapshot"]));
|
|
5
|
-
}
|
|
6
|
-
export {
|
|
7
|
-
buildSnapshotMethod
|
|
8
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { firstPayload } from "../../../../support/client.js";
|
|
2
|
-
function putCapabilityGrantMethod(input) {
|
|
3
|
-
return this.request("POST", "/api/v1/policy/grants", input, { tokenRequired: true }).then((payload) => firstPayload(payload, ["grant"]));
|
|
4
|
-
}
|
|
5
|
-
export {
|
|
6
|
-
putCapabilityGrantMethod
|
|
7
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { TreeDxClient } from "../../../../support/client.js";
|
|
2
|
-
import type { TreeDxCapabilityGrant } from "../../../../types.js";
|
|
3
|
-
export declare function listCapabilityGrantsMethod(this: TreeDxClient, input?: {
|
|
4
|
-
actorId?: string;
|
|
5
|
-
repoId?: string;
|
|
6
|
-
}): Promise<TreeDxCapabilityGrant[]>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { firstPayload } from "../../../../support/client.js";
|
|
2
|
-
function listCapabilityGrantsMethod(input = {}) {
|
|
3
|
-
return this.request("GET", "/api/v1/policy/grants", void 0, {
|
|
4
|
-
query: input,
|
|
5
|
-
tokenRequired: true
|
|
6
|
-
}).then((payload) => firstPayload(payload, ["grants"]));
|
|
7
|
-
}
|
|
8
|
-
export {
|
|
9
|
-
listCapabilityGrantsMethod
|
|
10
|
-
};
|