@treeseed/sdk 0.13.0-rc.5 → 0.13.0-rc.8
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/dist/accounts/account-contracts.d.ts +1 -1
- package/dist/agent-capacity/authority/assignment-authority-probe.d.ts +2 -2
- package/dist/agent-capacity/validation/agent-definition-schema.d.ts +108 -108
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +1 -1
- package/dist/ai-appliance/contracts.d.ts +2 -2
- package/dist/ai-appliance/contracts.js +2 -2
- package/dist/ai-appliance/validation.js +1 -1
- package/dist/capacity-provider/client.d.ts +2 -2
- package/dist/capacity-provider/client.js +4 -4
- package/dist/capacity-provider/contracts/governance.d.ts +6 -6
- package/dist/capacity-provider/validation.js +2 -2
- package/dist/content/validation/agent-operational-content-schemas.d.ts +64 -64
- package/dist/content/validation/auxiliary-content-schemas.d.ts +46 -46
- package/dist/content/validation/auxiliary-content-schemas.js +2 -2
- package/dist/content/validation/content-model-schemas.d.ts +426 -426
- package/dist/content/validation/portable-content-data.d.ts +60 -60
- package/dist/db/index.d.ts +0 -1
- package/dist/db/index.js +0 -1
- package/dist/entrypoints/clients/control-plane-client.d.ts +122 -0
- package/dist/entrypoints/clients/control-plane-client.js +226 -0
- package/dist/entrypoints/models/sdk-types.d.ts +1 -7
- package/dist/entrypoints/models/sdk-types.js +1 -7
- package/dist/guarantees/contracts/parse-agent-guarantee-proof.js +1 -1
- package/dist/guarantees/index/run-verifier-command.d.ts +1 -1
- package/dist/index/operations-and-workflows.d.ts +0 -1
- package/dist/index/operations-and-workflows.js +0 -36
- package/dist/index/platform-and-hosting.d.ts +1 -2
- package/dist/index/platform-and-hosting.js +23 -45
- package/dist/index/public-contracts.d.ts +0 -3
- package/dist/index/public-contracts.js +0 -3
- package/dist/index/templates-and-catalog.d.ts +1 -1
- package/dist/index/templates-and-catalog.js +1 -1
- package/dist/local-dev/managed-dev-process-spec.js +0 -1
- package/dist/operations/providers/default/preflight-operation.d.ts +6 -6
- package/dist/operations/services/config-runtime/configuration/create-default-machine-config.d.ts +2 -0
- package/dist/operations/services/config-runtime/configuration/create-default-machine-config.js +2 -0
- package/dist/operations/services/config-runtime/configuration/list-relevant-config-entries.js +1 -1
- package/dist/operations/services/config-runtime/support/resolve-entry-value-from-buckets.js +1 -1
- package/dist/operations/services/config-runtime/support/rotate-machine-key-passphrase.d.ts +4 -0
- package/dist/operations/services/config-runtime/{commerce/catalog/resolve-template-catalog-endpoint.d.ts → templates/catalog/template-catalog-settings.d.ts} +1 -0
- package/dist/operations/services/configuration/config-runtime.d.ts +1 -1
- package/dist/operations/services/configuration/config-runtime.js +1 -1
- package/dist/operations/services/deploy/accounts/local-runtime-auth-env-keys.d.ts +2 -2
- package/dist/operations/services/deploy/accounts/local-runtime-auth-env-keys.js +3 -3
- package/dist/operations/services/deploy/hosting/assert-cloudflare-cache-purge-succeeded.d.ts +0 -1
- package/dist/operations/services/deploy/hosting/assert-cloudflare-cache-purge-succeeded.js +1 -6
- package/dist/operations/services/deploy/hosting/configured-surface-hosts.d.ts +0 -2
- package/dist/operations/services/deploy/hosting/configured-surface-hosts.js +1 -3
- package/dist/operations/services/deploy/hosting/load-deploy-state.js +2 -2
- package/dist/operations/services/deploy/support/default-compatibility-date.d.ts +0 -1
- package/dist/operations/services/deploy/support/default-compatibility-date.js +0 -2
- package/dist/operations/services/github-actions-verification/git-hub-actions-workflow-state.d.ts +1 -1
- package/dist/operations/services/hosting/audit/managed-host-security.js +0 -1
- package/dist/operations/services/hosting-audit/hosting-audit-environment.d.ts +2 -2
- package/dist/operations/services/key-agent/read-legacy-project-machine-key.d.ts +1 -1
- package/dist/operations/services/template-registry/sync-managed-package-json.d.ts +3 -3
- package/dist/operations/services/template-registry/template-categories.d.ts +1 -1
- package/dist/operations/services/template-registry/validate-template-placeholders.js +1 -1
- package/dist/operator-contracts/control-plane-operation.d.ts +60 -0
- package/dist/operator-contracts/control-plane-operation.js +75 -0
- package/dist/operator-contracts/index.d.ts +3 -0
- package/dist/operator-contracts/index.js +3 -0
- package/dist/operator-contracts/mcp.d.ts +78 -0
- package/dist/operator-contracts/mcp.js +23 -0
- package/dist/operator-contracts/oauth.d.ts +38 -0
- package/dist/platform/deploy-config/deploy-config-field-aliases.d.ts +2 -2
- package/dist/platform/deploy-config/deploy-config-field-aliases.js +3 -3
- package/dist/platform/deploy-config/normalize-planes-from-legacy-hosting.d.ts +2 -2
- package/dist/platform/deploy-config/normalize-planes-from-legacy-hosting.js +5 -5
- package/dist/platform/deploy-config/parse-deploy-config.js +2 -4
- package/dist/platform/deploy-config/parse-platform-connections.d.ts +2 -4
- package/dist/platform/deploy-config/parse-platform-connections.js +4 -25
- package/dist/platform/desired-state/desired-environment.d.ts +1 -1
- package/dist/platform/env.yaml +2 -199
- package/dist/platform/environment/environment-scopes.d.ts +1 -2
- package/dist/platform/environment/environment-scopes.js +0 -2
- package/dist/platform/environment/resolve-content-bucket-binding.d.ts +1 -4
- package/dist/platform/environment/resolve-content-bucket-binding.js +1 -16
- package/dist/platform/packages/published-content-pipeline.d.ts +1 -1
- package/dist/platform/packages/published-content-pipeline.js +1 -1
- package/dist/platform/published-content/published-content-manifest-schema-version.d.ts +2 -2
- package/dist/platform/published-content/runtime/build-runtime-publication.js +1 -1
- package/dist/platform/published-content-pipeline/default-artifact-builder.d.ts +1 -1
- package/dist/platform/published-content-pipeline/default-artifact-builder.js +2 -2
- package/dist/platform/published-content-pipeline/list-markdown-files.d.ts +1 -1
- package/dist/platform/published-content-pipeline/list-markdown-files.js +1 -1
- package/dist/platform/published-content-pipeline/{resolve-commerce-offer-mode.d.ts → resolve-publication-access-mode.d.ts} +3 -2
- package/dist/platform/published-content-pipeline/{resolve-commerce-offer-mode.js → resolve-publication-access-mode.js} +4 -4
- package/dist/platform/support/contracts.d.ts +4 -11
- package/dist/reconcile/builtin-adapters/capacity/providers/capacity-provider-variables-for-service.d.ts +1 -2
- package/dist/reconcile/builtin-adapters/capacity/providers/capacity-provider-variables-for-service.js +3 -18
- package/dist/reconcile/builtin-adapters/hosting/observe-railway-unit.js +1 -10
- package/dist/reconcile/index.d.ts +0 -2
- package/dist/reconcile/index.js +0 -2
- package/dist/reconcile/seeds/local-seed-bootstrap-adapter.js +2 -18
- package/dist/scenes/accounts/auth.js +5 -5
- package/dist/scenes/index.d.ts +0 -8
- package/dist/scenes/index.js +0 -50
- package/dist/scenes/runner/run-scene.js +1 -26
- package/dist/scenes/seeds/seed.js +7 -8
- package/dist/scenes/support/execution/base-url.js +1 -1
- package/dist/scenes/visual-audit/run-scene-visual-audit.js +3 -21
- package/dist/scenes/visual-audit/split-diagnostics.js +1 -1
- package/dist/scripts/verification/check-file-architecture.js +0 -3
- package/dist/sdk/support/messages/dispatch.js +3 -3
- package/dist/sdk-types/configuration/sdk-dispatch-credential-source.d.ts +1 -1
- package/dist/sdk-types/{commerce/catalog/upsert-catalog-item-request.d.ts → control-plane/resource-requests.d.ts} +4 -4
- package/dist/sdk-types/support/platform-contracts.d.ts +3 -7
- package/dist/sdk-types/support/platform-contracts.js +2 -22
- package/dist/seeds/index.d.ts +0 -5
- package/dist/seeds/index.js +0 -8
- package/dist/seeds/schema/resource-buckets.d.ts +1 -1
- package/dist/standards/mcp/compare.d.ts +2 -0
- package/dist/standards/mcp/compare.js +38 -0
- package/dist/standards/mcp/contracts.d.ts +34 -0
- package/dist/standards/mcp/index.d.ts +3 -0
- package/dist/standards/mcp/index.js +3 -0
- package/dist/standards/mcp/normalize.d.ts +4 -0
- package/dist/standards/mcp/normalize.js +30 -0
- package/dist/{commerce/catalog → templates}/template-catalog.d.ts +1 -1
- package/dist/treeseed/template-catalog/catalog.fixture.json +1 -1
- package/dist/workflow/operations/configuration/workflow-config.d.ts +2 -2
- package/dist/workflow/operations/configuration/workflow-config.js +1 -1
- package/dist/workflow/operations/coordination/workflow-ci.js +1 -1
- package/dist/workflow/operations/coordination/workflow-destroy.js +1 -1
- package/dist/workflow/operations/guarantees/workflow-proof.d.ts +1 -1
- package/dist/workflow/operations/guarantees/workflow-proof.js +2 -2
- package/dist/workflow/operations/packages/collect-published-release-artifact-checks.js +1 -1
- package/dist/workflow/operations/packages/collect-release-plan-blockers.js +1 -1
- package/dist/workflow/operations/packages/normalize-release-candidate-mode.js +1 -1
- package/dist/workflow/operations/packages/prepare-fresh-release-run.d.ts +1 -1
- package/dist/workflow/operations/packages/prepare-fresh-release-run.js +1 -1
- package/dist/workflow/operations/packages/release-admin-message.d.ts +1 -1
- package/dist/workflow/operations/packages/release-admin-message.js +1 -1
- package/dist/workflow/operations/reconciliation/reconcile-save-hosted-environment.js +1 -1
- package/dist/workflow/operations/reconciliation/run-release-gate-reconcile-facade.js +1 -1
- package/dist/workflow/operations/recovery/fail-workflow-run.js +1 -1
- package/dist/workflow/operations/recovery/workflow-resume.js +1 -1
- package/dist/workflow/operations/release/workflow-release.js +2 -2
- package/dist/workflow/operations/{commerce/catalog → release-support/helpers}/back-merge-production-into-staging.d.ts +1 -0
- package/dist/workflow/operations/{commerce/catalog → release-support/helpers}/run-release-production-guarantees.d.ts +1 -0
- package/dist/workflow/operations/repositories/gates-for-saved-repository-reports.d.ts +1 -1
- package/dist/workflow/operations/repositories/gates-for-saved-repository-reports.js +1 -1
- package/dist/workflow/operations/support/create-repo-report.d.ts +1 -1
- package/dist/workflow/operations/support/create-repo-report.js +1 -1
- package/dist/workflow/operations/support/sync-current-branch-to-origin.d.ts +1 -1
- package/dist/workflow/operations/support/sync-current-branch-to-origin.js +1 -1
- package/dist/workflow/operations/support/update-ahead-behind.js +1 -1
- package/dist/workflow/operations/support/workflow-helpers.js +1 -1
- package/dist/workflow/operations/workspace-lifecycle/workflow-close.js +1 -1
- package/dist/workflow/operations/workspace-lifecycle/workflow-save.js +2 -2
- package/dist/workflow/operations/workspace-lifecycle/workflow-stage.js +1 -1
- package/dist/workflow/operations/workspace-lifecycle/workflow-switch.js +1 -1
- package/dist/workflow/operations/workspace-lifecycle/workflow-update.js +1 -1
- package/dist/workflow/operations.d.ts +2 -2
- package/dist/workflow/operations.js +2 -2
- package/dist/workflow-state/readiness-for-environment.d.ts +1 -0
- package/dist/workflow-state/resolve-workflow-state.js +1 -1
- package/package.json +10 -39
- package/dist/api/auth/d1-database.d.ts +0 -3
- package/dist/api/auth/d1-database.js +0 -20
- package/dist/api/auth/d1-provider.d.ts +0 -54
- package/dist/api/auth/d1-provider.js +0 -95
- package/dist/api/auth/d1-store/accounts/identity/can-adopt-username-match.d.ts +0 -3
- package/dist/api/auth/d1-store/accounts/identity/can-adopt-username-match.js +0 -13
- package/dist/api/auth/d1-store/accounts/identity/ensure-auth-schema.d.ts +0 -2
- package/dist/api/auth/d1-store/accounts/identity/ensure-auth-schema.js +0 -14
- package/dist/api/auth/d1-store/accounts/identity/load-user-by-username.d.ts +0 -2
- package/dist/api/auth/d1-store/accounts/identity/load-user-by-username.js +0 -6
- package/dist/api/auth/d1-store/accounts/identity/load-user-by-verified-email.d.ts +0 -2
- package/dist/api/auth/d1-store/accounts/identity/load-user-by-verified-email.js +0 -6
- package/dist/api/auth/d1-store/accounts/sessions/authenticate-service.d.ts +0 -6
- package/dist/api/auth/d1-store/accounts/sessions/authenticate-service.js +0 -34
- package/dist/api/auth/d1-store/accounts/sessions/issue-user-session.d.ts +0 -7
- package/dist/api/auth/d1-store/accounts/sessions/issue-user-session.js +0 -69
- package/dist/api/auth/d1-store/accounts/tokens/authenticate-bearer-token.d.ts +0 -6
- package/dist/api/auth/d1-store/accounts/tokens/authenticate-bearer-token.js +0 -42
- package/dist/api/auth/d1-store/accounts/tokens/create-personal-access-token.d.ts +0 -12
- package/dist/api/auth/d1-store/accounts/tokens/create-personal-access-token.js +0 -36
- package/dist/api/auth/d1-store/accounts/tokens/list-personal-access-tokens.d.ts +0 -2
- package/dist/api/auth/d1-store/accounts/tokens/list-personal-access-tokens.js +0 -10
- package/dist/api/auth/d1-store/accounts/tokens/refresh-access-token.d.ts +0 -3
- package/dist/api/auth/d1-store/accounts/tokens/refresh-access-token.js +0 -46
- package/dist/api/auth/d1-store/accounts/tokens/revoke-personal-access-token.d.ts +0 -2
- package/dist/api/auth/d1-store/accounts/tokens/revoke-personal-access-token.js +0 -15
- package/dist/api/auth/d1-store/capacity/providers/load-identity-by-provider.d.ts +0 -2
- package/dist/api/auth/d1-store/capacity/providers/load-identity-by-provider.js +0 -6
- package/dist/api/auth/d1-store/commerce/catalog/seed-catalog.d.ts +0 -2
- package/dist/api/auth/d1-store/commerce/catalog/seed-catalog.js +0 -27
- package/dist/api/auth/d1-store/configuration/create-service-credential.d.ts +0 -7
- package/dist/api/auth/d1-store/configuration/create-service-credential.js +0 -10
- package/dist/api/auth/d1-store/configuration/rotate-service-credential.d.ts +0 -2
- package/dist/api/auth/d1-store/configuration/rotate-service-credential.js +0 -17
- package/dist/api/auth/d1-store/configuration/upsert-service-credential.d.ts +0 -8
- package/dist/api/auth/d1-store/configuration/upsert-service-credential.js +0 -20
- package/dist/api/auth/d1-store/methods.d.ts +0 -40
- package/dist/api/auth/d1-store/methods.js +0 -82
- package/dist/api/auth/d1-store/runtime/approve-device-flow.d.ts +0 -5
- package/dist/api/auth/d1-store/runtime/approve-device-flow.js +0 -27
- package/dist/api/auth/d1-store/runtime/poll-device-flow.d.ts +0 -3
- package/dist/api/auth/d1-store/runtime/poll-device-flow.js +0 -71
- package/dist/api/auth/d1-store/runtime/start-device-flow.d.ts +0 -3
- package/dist/api/auth/d1-store/runtime/start-device-flow.js +0 -34
- package/dist/api/auth/d1-store/seeds/seed-configured-services.d.ts +0 -2
- package/dist/api/auth/d1-store/seeds/seed-configured-services.js +0 -14
- package/dist/api/auth/d1-store/support/audit/write-audit-event.d.ts +0 -9
- package/dist/api/auth/d1-store/support/audit/write-audit-event.js +0 -18
- package/dist/api/auth/d1-store/support/lifecycle/ensure-initialized.d.ts +0 -2
- package/dist/api/auth/d1-store/support/lifecycle/ensure-initialized.js +0 -9
- package/dist/api/auth/d1-store/support/principals/create-user.d.ts +0 -7
- package/dist/api/auth/d1-store/support/principals/create-user.js +0 -30
- package/dist/api/auth/d1-store/support/principals/exchange-trusted-user-assertion.d.ts +0 -10
- package/dist/api/auth/d1-store/support/principals/exchange-trusted-user-assertion.js +0 -50
- package/dist/api/auth/d1-store/support/principals/load-user.d.ts +0 -2
- package/dist/api/auth/d1-store/support/principals/load-user.js +0 -6
- package/dist/api/auth/d1-store/support/principals/permissions-for-user.d.ts +0 -2
- package/dist/api/auth/d1-store/support/principals/permissions-for-user.js +0 -11
- package/dist/api/auth/d1-store/support/principals/principal-for-user.d.ts +0 -2
- package/dist/api/auth/d1-store/support/principals/principal-for-user.js +0 -27
- package/dist/api/auth/d1-store/support/principals/scopes-for-principal.d.ts +0 -2
- package/dist/api/auth/d1-store/support/principals/scopes-for-principal.js +0 -13
- package/dist/api/auth/d1-store/support/principals/sync-user.d.ts +0 -7
- package/dist/api/auth/d1-store/support/principals/sync-user.js +0 -96
- package/dist/api/auth/d1-store/support/principals/user-metadata.d.ts +0 -9
- package/dist/api/auth/d1-store/support/principals/user-metadata.js +0 -13
- package/dist/api/auth/d1-store/support/queries/execute-statement.d.ts +0 -2
- package/dist/api/auth/d1-store/support/queries/execute-statement.js +0 -6
- package/dist/api/auth/d1-store/support/queries/query-all.d.ts +0 -2
- package/dist/api/auth/d1-store/support/queries/query-all.js +0 -7
- package/dist/api/auth/d1-store/support/queries/query-first.d.ts +0 -2
- package/dist/api/auth/d1-store/support/queries/query-first.js +0 -6
- package/dist/api/auth/d1-store/teams/assign-role.d.ts +0 -2
- package/dist/api/auth/d1-store/teams/assign-role.js +0 -12
- package/dist/api/auth/d1-store/teams/bootstrap-roles-for-user.d.ts +0 -3
- package/dist/api/auth/d1-store/teams/bootstrap-roles-for-user.js +0 -22
- package/dist/api/auth/d1-store/teams/permissions-for-roles.d.ts +0 -2
- package/dist/api/auth/d1-store/teams/permissions-for-roles.js +0 -15
- package/dist/api/auth/d1-store/teams/reconcile-bootstrap-admins.d.ts +0 -2
- package/dist/api/auth/d1-store/teams/reconcile-bootstrap-admins.js +0 -34
- package/dist/api/auth/d1-store/teams/replace-roles.d.ts +0 -2
- package/dist/api/auth/d1-store/teams/replace-roles.js +0 -9
- package/dist/api/auth/d1-store/teams/roles-for-user.d.ts +0 -2
- package/dist/api/auth/d1-store/teams/roles-for-user.js +0 -10
- package/dist/api/auth/d1-store/teams/set-user-roles.d.ts +0 -2
- package/dist/api/auth/d1-store/teams/set-user-roles.js +0 -25
- package/dist/api/auth/d1-store.d.ts +0 -133
- package/dist/api/auth/d1-store.js +0 -225
- package/dist/api/auth/memory-provider.d.ts +0 -82
- package/dist/api/auth/memory-provider.js +0 -297
- package/dist/api/auth/rbac.d.ts +0 -27
- package/dist/api/auth/rbac.js +0 -171
- package/dist/api/auth/tokens.d.ts +0 -18
- package/dist/api/auth/tokens.js +0 -56
- package/dist/api/auth/trusted-assertion.d.ts +0 -10
- package/dist/api/auth/trusted-assertion.js +0 -19
- package/dist/api/capacity/providers/providers.d.ts +0 -2
- package/dist/api/capacity/providers/providers.js +0 -69
- package/dist/api/configuration/config.d.ts +0 -4
- package/dist/api/configuration/config.js +0 -149
- package/dist/api/hosting/railway.d.ts +0 -53
- package/dist/api/hosting/railway.js +0 -71
- package/dist/api/index.d.ts +0 -13
- package/dist/api/index.js +0 -33
- package/dist/api/operations/operations-routes.d.ts +0 -11
- package/dist/api/operations/operations-routes.js +0 -39
- package/dist/api/operations/operations.d.ts +0 -3
- package/dist/api/operations/operations.js +0 -26
- package/dist/api/support/app.d.ts +0 -8
- package/dist/api/support/app.js +0 -410
- package/dist/api/support/http.d.ts +0 -28
- package/dist/api/support/http.js +0 -51
- package/dist/api/support/sdk-dispatch.d.ts +0 -6
- package/dist/api/support/sdk-dispatch.js +0 -14
- package/dist/api/support/sdk-routes.d.ts +0 -11
- package/dist/api/support/sdk-routes.js +0 -29
- package/dist/api/support/templates.d.ts +0 -3
- package/dist/api/support/templates.js +0 -31
- package/dist/api/types.d.ts +0 -242
- package/dist/db/market-schema/accounts/agent-lab-view-state.d.ts +0 -228
- package/dist/db/market-schema/accounts/agent-lab-view-state.js +0 -22
- package/dist/db/market-schema/accounts/better-auth-account.d.ts +0 -2491
- package/dist/db/market-schema/accounts/better-auth-account.js +0 -248
- package/dist/db/market-schema/accounts/notification-events.d.ts +0 -2911
- package/dist/db/market-schema/accounts/notification-events.js +0 -252
- package/dist/db/market-schema/accounts/team-services.d.ts +0 -1780
- package/dist/db/market-schema/accounts/team-services.js +0 -150
- package/dist/db/market-schema/agents/agent-context-query-checks.d.ts +0 -296
- package/dist/db/market-schema/agents/agent-context-query-checks.js +0 -33
- package/dist/db/market-schema/agents/agent-mode-runs.d.ts +0 -3137
- package/dist/db/market-schema/agents/agent-mode-runs.js +0 -311
- package/dist/db/market-schema/agents/communication-control.d.ts +0 -820
- package/dist/db/market-schema/agents/communication-control.js +0 -86
- package/dist/db/market-schema/capacity/accounting/capacity-ledger-entries.d.ts +0 -3187
- package/dist/db/market-schema/capacity/accounting/capacity-ledger-entries.js +0 -300
- package/dist/db/market-schema/capacity/providers/capacity-provider-team-credentials.d.ts +0 -2637
- package/dist/db/market-schema/capacity/providers/capacity-provider-team-credentials.js +0 -271
- package/dist/db/market-schema/capacity/workdays/capacity-workday-events.d.ts +0 -3882
- package/dist/db/market-schema/capacity/workdays/capacity-workday-events.js +0 -373
- package/dist/db/market-schema/commerce/capacity/commerce-capacity-listings.d.ts +0 -1681
- package/dist/db/market-schema/commerce/capacity/commerce-capacity-listings.js +0 -150
- package/dist/db/market-schema/commerce/catalog/catalog-items.d.ts +0 -3076
- package/dist/db/market-schema/commerce/catalog/catalog-items.js +0 -263
- package/dist/db/market-schema/commerce/catalog/commerce-product-versions.d.ts +0 -2943
- package/dist/db/market-schema/commerce/catalog/commerce-product-versions.js +0 -253
- package/dist/db/market-schema/commerce/payments/commerce-subscriptions.d.ts +0 -3072
- package/dist/db/market-schema/commerce/payments/commerce-subscriptions.js +0 -263
- package/dist/db/market-schema/governance/commons/commons-participants.d.ts +0 -3117
- package/dist/db/market-schema/governance/commons/commons-participants.js +0 -260
- package/dist/db/market-schema/governance/policy/governance-electorate-snapshots.d.ts +0 -2498
- package/dist/db/market-schema/governance/policy/governance-electorate-snapshots.js +0 -212
- package/dist/db/market-schema/projects/integrations/provider-operations.d.ts +0 -2586
- package/dist/db/market-schema/projects/integrations/provider-operations.js +0 -196
- package/dist/db/market-schema/projects/knowledge/knowledge-collaboration.d.ts +0 -1426
- package/dist/db/market-schema/projects/knowledge/knowledge-collaboration.js +0 -111
- package/dist/db/market-schema/projects/knowledge/project-knowledge-governance.d.ts +0 -1269
- package/dist/db/market-schema/projects/knowledge/project-knowledge-governance.js +0 -95
- package/dist/db/market-schema/projects/knowledge/tree-dx-project-libraries.d.ts +0 -1937
- package/dist/db/market-schema/projects/knowledge/tree-dx-project-libraries.js +0 -160
- package/dist/db/market-schema/support/feedback.d.ts +0 -1055
- package/dist/db/market-schema/support/feedback.js +0 -86
- package/dist/db/market-schema/support/market-schema.d.ts +0 -45339
- package/dist/db/market-schema/support/market-schema.js +0 -216
- package/dist/db/market-schema/support/subscribers.d.ts +0 -3027
- package/dist/db/market-schema/support/subscribers.js +0 -267
- package/dist/db/market-schema.d.ts +0 -22
- package/dist/db/market-schema.js +0 -22
- package/dist/entrypoints/clients/market-client.d.ts +0 -184
- package/dist/entrypoints/clients/market-client.js +0 -369
- package/dist/gateway/admin-passthrough.d.ts +0 -17
- package/dist/gateway/admin-passthrough.js +0 -131
- package/dist/gateway/admin-route-inventory.d.ts +0 -5
- package/dist/gateway/admin-route-inventory.js +0 -27
- package/dist/gateway/header-policy.d.ts +0 -3
- package/dist/gateway/header-policy.js +0 -38
- package/dist/gateway/health.d.ts +0 -9
- package/dist/gateway/health.js +0 -26
- package/dist/gateway/index.d.ts +0 -7
- package/dist/gateway/index.js +0 -8
- package/dist/gateway/node-websocket-proxy.d.ts +0 -13
- package/dist/gateway/node-websocket-proxy.js +0 -109
- package/dist/market-client/accounts/contracts/account-deletion-blockers.d.ts +0 -2
- package/dist/market-client/accounts/contracts/account-deletion-blockers.js +0 -6
- package/dist/market-client/accounts/contracts/account-identity.d.ts +0 -2
- package/dist/market-client/accounts/contracts/account-identity.js +0 -6
- package/dist/market-client/accounts/contracts/local-auth-paths.d.ts +0 -2
- package/dist/market-client/accounts/contracts/local-auth-paths.js +0 -6
- package/dist/market-client/accounts/contracts/logout.d.ts +0 -2
- package/dist/market-client/accounts/contracts/logout.js +0 -9
- package/dist/market-client/accounts/contracts/poll-device-login.d.ts +0 -3
- package/dist/market-client/accounts/contracts/poll-device-login.js +0 -9
- package/dist/market-client/accounts/contracts/web-appearance.d.ts +0 -2
- package/dist/market-client/accounts/contracts/web-appearance.js +0 -6
- package/dist/market-client/accounts/contracts/web-emails.d.ts +0 -2
- package/dist/market-client/accounts/contracts/web-emails.js +0 -6
- package/dist/market-client/accounts/contracts/web-notification-preferences.d.ts +0 -2
- package/dist/market-client/accounts/contracts/web-notification-preferences.js +0 -6
- package/dist/market-client/accounts/contracts/web-notifications.d.ts +0 -2
- package/dist/market-client/accounts/contracts/web-notifications.js +0 -6
- package/dist/market-client/accounts/contracts/web-sessions.d.ts +0 -2
- package/dist/market-client/accounts/contracts/web-sessions.js +0 -6
- package/dist/market-client/accounts/creation/add-web-email.d.ts +0 -4
- package/dist/market-client/accounts/creation/add-web-email.js +0 -10
- package/dist/market-client/accounts/creation/request-web-password-reset.d.ts +0 -4
- package/dist/market-client/accounts/creation/request-web-password-reset.js +0 -9
- package/dist/market-client/accounts/creation/start-device-login.d.ts +0 -3
- package/dist/market-client/accounts/creation/start-device-login.js +0 -9
- package/dist/market-client/accounts/lifecycle/complete-web-password-reset.d.ts +0 -5
- package/dist/market-client/accounts/lifecycle/complete-web-password-reset.js +0 -9
- package/dist/market-client/accounts/lifecycle/confirm-web-email.d.ts +0 -4
- package/dist/market-client/accounts/lifecycle/confirm-web-email.js +0 -9
- package/dist/market-client/accounts/lifecycle/verify-web-email.d.ts +0 -2
- package/dist/market-client/accounts/lifecycle/verify-web-email.js +0 -6
- package/dist/market-client/accounts/preferences/account-preferences.d.ts +0 -4
- package/dist/market-client/accounts/preferences/account-preferences.js +0 -14
- package/dist/market-client/accounts/queries/check-web-email.d.ts +0 -2
- package/dist/market-client/accounts/queries/check-web-email.js +0 -6
- package/dist/market-client/accounts/queries/check-web-username.d.ts +0 -2
- package/dist/market-client/accounts/queries/check-web-username.js +0 -6
- package/dist/market-client/accounts/retirement/delete-account.d.ts +0 -6
- package/dist/market-client/accounts/retirement/delete-account.js +0 -10
- package/dist/market-client/accounts/retirement/delete-web-email.d.ts +0 -2
- package/dist/market-client/accounts/retirement/delete-web-email.js +0 -6
- package/dist/market-client/accounts/retirement/revoke-web-session.d.ts +0 -2
- package/dist/market-client/accounts/retirement/revoke-web-session.js +0 -6
- package/dist/market-client/accounts/updates/mark-web-notification-read.d.ts +0 -2
- package/dist/market-client/accounts/updates/mark-web-notification-read.js +0 -6
- package/dist/market-client/accounts/updates/refresh-token.d.ts +0 -3
- package/dist/market-client/accounts/updates/refresh-token.js +0 -9
- package/dist/market-client/accounts/updates/set-primary-web-email.d.ts +0 -2
- package/dist/market-client/accounts/updates/set-primary-web-email.js +0 -6
- package/dist/market-client/accounts/updates/update-web-appearance.d.ts +0 -10
- package/dist/market-client/accounts/updates/update-web-appearance.js +0 -10
- package/dist/market-client/accounts/updates/update-web-notification-preferences.d.ts +0 -3
- package/dist/market-client/accounts/updates/update-web-notification-preferences.js +0 -6
- package/dist/market-client/accounts/updates/update-web-password.d.ts +0 -6
- package/dist/market-client/accounts/updates/update-web-password.js +0 -10
- package/dist/market-client/agent-lab-interface.d.ts +0 -12
- package/dist/market-client/agents/creation/create-structured-agent-estimate.d.ts +0 -2
- package/dist/market-client/agents/creation/create-structured-agent-estimate.js +0 -6
- package/dist/market-client/agents/lifecycle/accept-structured-agent-estimate.d.ts +0 -2
- package/dist/market-client/agents/lifecycle/accept-structured-agent-estimate.js +0 -6
- package/dist/market-client/capacity/accounting/contracts/capacity-ledger.d.ts +0 -7
- package/dist/market-client/capacity/accounting/contracts/capacity-ledger.js +0 -6
- package/dist/market-client/capacity/accounting/contracts/capacity-reservation-explanation.d.ts +0 -2
- package/dist/market-client/capacity/accounting/contracts/capacity-reservation-explanation.js +0 -6
- package/dist/market-client/capacity/accounting/contracts/capacity-reservations.d.ts +0 -7
- package/dist/market-client/capacity/accounting/contracts/capacity-reservations.js +0 -6
- package/dist/market-client/capacity/accounting/contracts/capacity-usage.d.ts +0 -7
- package/dist/market-client/capacity/accounting/contracts/capacity-usage.js +0 -6
- package/dist/market-client/capacity/accounting/lifecycle/decide-capacity-overrun.d.ts +0 -4
- package/dist/market-client/capacity/accounting/lifecycle/decide-capacity-overrun.js +0 -6
- package/dist/market-client/capacity/admission/contracts/team-capacity-registration-key.d.ts +0 -2
- package/dist/market-client/capacity/admission/contracts/team-capacity-registration-key.js +0 -6
- package/dist/market-client/capacity/admission/lifecycle/enable-team-capacity-registration-key.d.ts +0 -2
- package/dist/market-client/capacity/admission/lifecycle/enable-team-capacity-registration-key.js +0 -6
- package/dist/market-client/capacity/admission/lifecycle/reveal-team-capacity-registration-key.d.ts +0 -2
- package/dist/market-client/capacity/admission/lifecycle/reveal-team-capacity-registration-key.js +0 -6
- package/dist/market-client/capacity/admission/retirement/disable-team-capacity-registration-key.d.ts +0 -2
- package/dist/market-client/capacity/admission/retirement/disable-team-capacity-registration-key.js +0 -6
- package/dist/market-client/capacity/admission/updates/rotate-team-capacity-registration-key.d.ts +0 -2
- package/dist/market-client/capacity/admission/updates/rotate-team-capacity-registration-key.js +0 -6
- package/dist/market-client/capacity/admission/updates/update-team-capacity-registration-key-status.d.ts +0 -2
- package/dist/market-client/capacity/admission/updates/update-team-capacity-registration-key-status.js +0 -6
- package/dist/market-client/capacity/allocations/contracts/capacity-allocation-set.d.ts +0 -2
- package/dist/market-client/capacity/allocations/contracts/capacity-allocation-set.js +0 -6
- package/dist/market-client/capacity/allocations/contracts/capacity-allocation-sets.d.ts +0 -5
- package/dist/market-client/capacity/allocations/contracts/capacity-allocation-sets.js +0 -11
- package/dist/market-client/capacity/allocations/contracts/capacity-grant.d.ts +0 -2
- package/dist/market-client/capacity/allocations/contracts/capacity-grant.js +0 -6
- package/dist/market-client/capacity/allocations/contracts/capacity-grants.d.ts +0 -5
- package/dist/market-client/capacity/allocations/contracts/capacity-grants.js +0 -11
- package/dist/market-client/capacity/allocations/creation/create-capacity-allocation-set.d.ts +0 -2
- package/dist/market-client/capacity/allocations/creation/create-capacity-allocation-set.js +0 -6
- package/dist/market-client/capacity/allocations/creation/create-capacity-grant.d.ts +0 -2
- package/dist/market-client/capacity/allocations/creation/create-capacity-grant.js +0 -6
- package/dist/market-client/capacity/allocations/creation/plan-capacity-allocation-set.d.ts +0 -2
- package/dist/market-client/capacity/allocations/creation/plan-capacity-allocation-set.js +0 -6
- package/dist/market-client/capacity/allocations/creation/plan-capacity-grant.d.ts +0 -2
- package/dist/market-client/capacity/allocations/creation/plan-capacity-grant.js +0 -6
- package/dist/market-client/capacity/allocations/lifecycle/activate-capacity-allocation-set.d.ts +0 -2
- package/dist/market-client/capacity/allocations/lifecycle/activate-capacity-allocation-set.js +0 -6
- package/dist/market-client/capacity/allocations/queries/explain-capacity-allocation-set.d.ts +0 -2
- package/dist/market-client/capacity/allocations/queries/explain-capacity-allocation-set.js +0 -6
- package/dist/market-client/capacity/allocations/retirement/archive-capacity-allocation-set.d.ts +0 -2
- package/dist/market-client/capacity/allocations/retirement/archive-capacity-allocation-set.js +0 -6
- package/dist/market-client/capacity/allocations/updates/supersede-capacity-allocation-set.d.ts +0 -2
- package/dist/market-client/capacity/allocations/updates/supersede-capacity-allocation-set.js +0 -6
- package/dist/market-client/capacity/allocations/updates/transition-capacity-grant.d.ts +0 -2
- package/dist/market-client/capacity/allocations/updates/transition-capacity-grant.js +0 -6
- package/dist/market-client/capacity/assignments/contracts/assignment-authority-probe.d.ts +0 -2
- package/dist/market-client/capacity/assignments/contracts/assignment-authority-probe.js +0 -6
- package/dist/market-client/capacity/assignments/contracts/capacity-provider-assignment.d.ts +0 -2
- package/dist/market-client/capacity/assignments/contracts/capacity-provider-assignment.js +0 -6
- package/dist/market-client/capacity/assignments/contracts/capacity-provider-assignments.d.ts +0 -12
- package/dist/market-client/capacity/assignments/contracts/capacity-provider-assignments.js +0 -26
- package/dist/market-client/capacity/assignments/contracts/decision-assignment-graph.d.ts +0 -2
- package/dist/market-client/capacity/assignments/contracts/decision-assignment-graph.js +0 -6
- package/dist/market-client/capacity/assignments/contracts/decision-assignment-graphs.d.ts +0 -4
- package/dist/market-client/capacity/assignments/contracts/decision-assignment-graphs.js +0 -7
- package/dist/market-client/capacity/assignments/contracts/provider-assignment-explanation.d.ts +0 -2
- package/dist/market-client/capacity/assignments/contracts/provider-assignment-explanation.js +0 -6
- package/dist/market-client/capacity/assignments/lifecycle/admit-capacity-assignment.d.ts +0 -2
- package/dist/market-client/capacity/assignments/lifecycle/admit-capacity-assignment.js +0 -6
- package/dist/market-client/capacity/assignments/lifecycle/integrate-assignment-content.d.ts +0 -10
- package/dist/market-client/capacity/assignments/lifecycle/integrate-assignment-content.js +0 -9
- package/dist/market-client/capacity/assignments/lifecycle/requeue-capacity-assignment.d.ts +0 -5
- package/dist/market-client/capacity/assignments/lifecycle/requeue-capacity-assignment.js +0 -6
- package/dist/market-client/capacity/assignments/retirement/abandon-assignment-content.d.ts +0 -9
- package/dist/market-client/capacity/assignments/retirement/abandon-assignment-content.js +0 -9
- package/dist/market-client/capacity/assignments/retirement/cancel-capacity-assignment.d.ts +0 -5
- package/dist/market-client/capacity/assignments/retirement/cancel-capacity-assignment.js +0 -6
- package/dist/market-client/capacity/capacity-core/contracts/capacity-audit-events.d.ts +0 -11
- package/dist/market-client/capacity/capacity-core/contracts/capacity-audit-events.js +0 -11
- package/dist/market-client/capacity/observability/contracts/agent-lab.d.ts +0 -27
- package/dist/market-client/capacity/observability/contracts/agent-lab.js +0 -37
- package/dist/market-client/capacity/observability/contracts/capacity-evidence-page.d.ts +0 -7
- package/dist/market-client/capacity/observability/contracts/capacity-evidence-page.js +0 -13
- package/dist/market-client/capacity/observability/contracts/project-capacity-diagnostics.d.ts +0 -2
- package/dist/market-client/capacity/observability/contracts/project-capacity-diagnostics.js +0 -7
- package/dist/market-client/capacity/observability/contracts/project-capacity-runtime-diagnostics.d.ts +0 -2
- package/dist/market-client/capacity/observability/contracts/project-capacity-runtime-diagnostics.js +0 -7
- package/dist/market-client/capacity/planning/contracts/capacity-plan.d.ts +0 -2
- package/dist/market-client/capacity/planning/contracts/capacity-plan.js +0 -6
- package/dist/market-client/capacity/planning/contracts/decision-capacity-plans.d.ts +0 -4
- package/dist/market-client/capacity/planning/contracts/decision-capacity-plans.js +0 -7
- package/dist/market-client/capacity/planning/creation/create-decision-capacity-plan.d.ts +0 -2
- package/dist/market-client/capacity/planning/creation/create-decision-capacity-plan.js +0 -6
- package/dist/market-client/capacity/planning/creation/request-capacity-plan-revision.d.ts +0 -2
- package/dist/market-client/capacity/planning/creation/request-capacity-plan-revision.js +0 -6
- package/dist/market-client/capacity/planning/lifecycle/accept-capacity-plan.d.ts +0 -2
- package/dist/market-client/capacity/planning/lifecycle/accept-capacity-plan.js +0 -6
- package/dist/market-client/capacity/planning/lifecycle/schedule-capacity-plan.d.ts +0 -2
- package/dist/market-client/capacity/planning/lifecycle/schedule-capacity-plan.js +0 -6
- package/dist/market-client/capacity/planning/updates/supersede-capacity-plan.d.ts +0 -2
- package/dist/market-client/capacity/planning/updates/supersede-capacity-plan.js +0 -6
- package/dist/market-client/capacity/providers/contracts/auth-providers.d.ts +0 -2
- package/dist/market-client/capacity/providers/contracts/auth-providers.js +0 -6
- package/dist/market-client/capacity/providers/contracts/capacity-provider-credentials.d.ts +0 -6
- package/dist/market-client/capacity/providers/contracts/capacity-provider-credentials.js +0 -13
- package/dist/market-client/capacity/providers/contracts/capacity-provider-membership.d.ts +0 -2
- package/dist/market-client/capacity/providers/contracts/capacity-provider-membership.js +0 -6
- package/dist/market-client/capacity/providers/contracts/capacity-provider-memberships.d.ts +0 -7
- package/dist/market-client/capacity/providers/contracts/capacity-provider-memberships.js +0 -15
- package/dist/market-client/capacity/providers/contracts/capacity-provider-registration-request.d.ts +0 -2
- package/dist/market-client/capacity/providers/contracts/capacity-provider-registration-request.js +0 -6
- package/dist/market-client/capacity/providers/contracts/capacity-provider-registration-requests.d.ts +0 -6
- package/dist/market-client/capacity/providers/contracts/capacity-provider-registration-requests.js +0 -13
- package/dist/market-client/capacity/providers/contracts/provider-availability-sessions.d.ts +0 -7
- package/dist/market-client/capacity/providers/contracts/provider-availability-sessions.js +0 -16
- package/dist/market-client/capacity/providers/lifecycle/authorize-capacity-provider-credential-rotation.d.ts +0 -2
- package/dist/market-client/capacity/providers/lifecycle/authorize-capacity-provider-credential-rotation.js +0 -6
- package/dist/market-client/capacity/providers/lifecycle/resume-capacity-provider-membership.d.ts +0 -2
- package/dist/market-client/capacity/providers/lifecycle/resume-capacity-provider-membership.js +0 -6
- package/dist/market-client/capacity/providers/lifecycle/review-capacity-provider-registration.d.ts +0 -5
- package/dist/market-client/capacity/providers/lifecycle/review-capacity-provider-registration.js +0 -6
- package/dist/market-client/capacity/providers/retirement/revoke-capacity-provider-credential.d.ts +0 -2
- package/dist/market-client/capacity/providers/retirement/revoke-capacity-provider-credential.js +0 -6
- package/dist/market-client/capacity/providers/retirement/revoke-capacity-provider-membership.d.ts +0 -2
- package/dist/market-client/capacity/providers/retirement/revoke-capacity-provider-membership.js +0 -6
- package/dist/market-client/capacity/providers/retirement/suspend-capacity-provider-membership.d.ts +0 -2
- package/dist/market-client/capacity/providers/retirement/suspend-capacity-provider-membership.js +0 -6
- package/dist/market-client/capacity/providers/updates/update-capacity-provider-membership-status.d.ts +0 -2
- package/dist/market-client/capacity/providers/updates/update-capacity-provider-membership-status.js +0 -6
- package/dist/market-client/capacity/workdays/contracts/workday-events.d.ts +0 -5
- package/dist/market-client/capacity/workdays/contracts/workday-events.js +0 -11
- package/dist/market-client/capacity/workdays/contracts/workday-run.d.ts +0 -2
- package/dist/market-client/capacity/workdays/contracts/workday-run.js +0 -6
- package/dist/market-client/capacity/workdays/contracts/workday-runs.d.ts +0 -7
- package/dist/market-client/capacity/workdays/contracts/workday-runs.js +0 -16
- package/dist/market-client/capacity/workdays/contracts/workday-summary.d.ts +0 -6
- package/dist/market-client/capacity/workdays/contracts/workday-summary.js +0 -14
- package/dist/market-client/capacity/workdays/contracts/workday.d.ts +0 -2
- package/dist/market-client/capacity/workdays/contracts/workday.js +0 -6
- package/dist/market-client/capacity/workdays/creation/create-workday-event.d.ts +0 -2
- package/dist/market-client/capacity/workdays/creation/create-workday-event.js +0 -6
- package/dist/market-client/capacity/workdays/creation/create-workday-run.d.ts +0 -2
- package/dist/market-client/capacity/workdays/creation/create-workday-run.js +0 -6
- package/dist/market-client/capacity/workdays/creation/create-workday.d.ts +0 -2
- package/dist/market-client/capacity/workdays/creation/create-workday.js +0 -6
- package/dist/market-client/capacity/workdays/creation/preflight-workday-run.d.ts +0 -2
- package/dist/market-client/capacity/workdays/creation/preflight-workday-run.js +0 -6
- package/dist/market-client/capacity/workdays/creation/start-workday.d.ts +0 -2
- package/dist/market-client/capacity/workdays/creation/start-workday.js +0 -6
- package/dist/market-client/capacity/workdays/lifecycle/close-workday-admission.d.ts +0 -29
- package/dist/market-client/capacity/workdays/lifecycle/close-workday-admission.js +0 -9
- package/dist/market-client/capacity/workdays/lifecycle/complete-workday.d.ts +0 -2
- package/dist/market-client/capacity/workdays/lifecycle/complete-workday.js +0 -6
- package/dist/market-client/capacity/workdays/lifecycle/pause-workday.d.ts +0 -2
- package/dist/market-client/capacity/workdays/lifecycle/pause-workday.js +0 -6
- package/dist/market-client/capacity/workdays/lifecycle/resume-workday.d.ts +0 -2
- package/dist/market-client/capacity/workdays/lifecycle/resume-workday.js +0 -6
- package/dist/market-client/capacity/workdays/lifecycle/tick-workday-run.d.ts +0 -5
- package/dist/market-client/capacity/workdays/lifecycle/tick-workday-run.js +0 -6
- package/dist/market-client/capacity/workdays/retirement/cancel-workday.d.ts +0 -2
- package/dist/market-client/capacity/workdays/retirement/cancel-workday.js +0 -6
- package/dist/market-client/capacity/workdays/updates/update-workday-run.d.ts +0 -2
- package/dist/market-client/capacity/workdays/updates/update-workday-run.js +0 -6
- package/dist/market-client/commerce/catalog/contracts/catalog.d.ts +0 -2
- package/dist/market-client/commerce/catalog/contracts/catalog.js +0 -7
- package/dist/market-client/discussions/contracts/discussions.d.ts +0 -27
- package/dist/market-client/discussions/contracts/discussions.js +0 -21
- package/dist/market-client/interface.d.ts +0 -192
- package/dist/market-client/internal-capacity-allocation.d.ts +0 -4
- package/dist/market-client/internal-capacity-allocation.js +0 -17
- package/dist/market-client/methods.d.ts +0 -2
- package/dist/market-client/methods.js +0 -396
- package/dist/market-client/operations/contracts/research-workflow.d.ts +0 -2
- package/dist/market-client/operations/contracts/research-workflow.js +0 -6
- package/dist/market-client/operations/creation/create-research-workflow.d.ts +0 -2
- package/dist/market-client/operations/creation/create-research-workflow.js +0 -6
- package/dist/market-client/project-agent-interface.d.ts +0 -15
- package/dist/market-client/project-agent-interface.js +0 -0
- package/dist/market-client/projects/access/contracts/project-access.d.ts +0 -2
- package/dist/market-client/projects/access/contracts/project-access.js +0 -6
- package/dist/market-client/projects/agents/contracts/agent-deployments.d.ts +0 -34
- package/dist/market-client/projects/agents/contracts/agent-deployments.js +0 -22
- package/dist/market-client/projects/agents/contracts/project-agent-authoring-draft.d.ts +0 -10
- package/dist/market-client/projects/agents/contracts/project-agent-authoring-draft.js +0 -13
- package/dist/market-client/projects/agents/contracts/project-agent-class.d.ts +0 -2
- package/dist/market-client/projects/agents/contracts/project-agent-class.js +0 -6
- package/dist/market-client/projects/agents/contracts/project-agent-classes.d.ts +0 -5
- package/dist/market-client/projects/agents/contracts/project-agent-classes.js +0 -11
- package/dist/market-client/projects/agents/contracts/project-agent-fallback-outputs.d.ts +0 -8
- package/dist/market-client/projects/agents/contracts/project-agent-fallback-outputs.js +0 -17
- package/dist/market-client/projects/agents/contracts/project-agent-mode-runs.d.ts +0 -8
- package/dist/market-client/projects/agents/contracts/project-agent-mode-runs.js +0 -18
- package/dist/market-client/projects/agents/contracts/project-context-query-checks.d.ts +0 -2
- package/dist/market-client/projects/agents/contracts/project-context-query-checks.js +0 -6
- package/dist/market-client/projects/agents/creation/author-project-agent.d.ts +0 -10
- package/dist/market-client/projects/agents/creation/author-project-agent.js +0 -10
- package/dist/market-client/projects/agents/creation/author-project-definitions.d.ts +0 -12
- package/dist/market-client/projects/agents/creation/author-project-definitions.js +0 -10
- package/dist/market-client/projects/agents/creation/check-project-context-query.d.ts +0 -7
- package/dist/market-client/projects/agents/creation/check-project-context-query.js +0 -11
- package/dist/market-client/projects/agents/creation/create-project-agent-class.d.ts +0 -2
- package/dist/market-client/projects/agents/creation/create-project-agent-class.js +0 -6
- package/dist/market-client/projects/agents/creation/launch-project-agent-simulation.d.ts +0 -8
- package/dist/market-client/projects/agents/creation/launch-project-agent-simulation.js +0 -10
- package/dist/market-client/projects/agents/updates/update-project-agent-class.d.ts +0 -2
- package/dist/market-client/projects/agents/updates/update-project-agent-class.js +0 -6
- package/dist/market-client/projects/knowledge/contracts/project-tree-dx-library.d.ts +0 -2
- package/dist/market-client/projects/knowledge/contracts/project-tree-dx-library.js +0 -6
- package/dist/market-client/projects/knowledge/contracts/project-tree-dx-proxy-audit.d.ts +0 -7
- package/dist/market-client/projects/knowledge/contracts/project-tree-dx-proxy-audit.js +0 -15
- package/dist/market-client/projects/knowledge/creation/upsert-project-tree-dx-library.d.ts +0 -3
- package/dist/market-client/projects/knowledge/creation/upsert-project-tree-dx-library.js +0 -6
- package/dist/market-client/projects/projects-core/contracts/dispatch-project-workflow-operation.d.ts +0 -2
- package/dist/market-client/projects/projects-core/contracts/dispatch-project-workflow-operation.js +0 -6
- package/dist/market-client/projects/projects-core/contracts/project-deletion-blockers.d.ts +0 -2
- package/dist/market-client/projects/projects-core/contracts/project-deletion-blockers.js +0 -6
- package/dist/market-client/projects/projects-core/contracts/project-workflow-operations.d.ts +0 -10
- package/dist/market-client/projects/projects-core/contracts/project-workflow-operations.js +0 -50
- package/dist/market-client/projects/projects-core/contracts/projects.d.ts +0 -2
- package/dist/market-client/projects/projects-core/contracts/projects.js +0 -7
- package/dist/market-client/projects/projects-core/creation/create-project.d.ts +0 -8
- package/dist/market-client/projects/projects-core/creation/create-project.js +0 -6
- package/dist/market-client/projects/projects-core/retirement/delete-project.d.ts +0 -2
- package/dist/market-client/projects/projects-core/retirement/delete-project.js +0 -6
- package/dist/market-client/projects/projects-core/updates/set-project-inventory-status.d.ts +0 -3
- package/dist/market-client/projects/projects-core/updates/set-project-inventory-status.js +0 -10
- package/dist/market-client/projects/repositories/contracts/project-repository-topology.d.ts +0 -2
- package/dist/market-client/projects/repositories/contracts/project-repository-topology.js +0 -6
- package/dist/market-client/projects/repositories/updates/update-project-repository-topology.d.ts +0 -3
- package/dist/market-client/projects/repositories/updates/update-project-repository-topology.js +0 -6
- package/dist/market-client/seeds/creation/apply-seed.d.ts +0 -2
- package/dist/market-client/seeds/creation/apply-seed.js +0 -6
- package/dist/market-client/seeds/creation/export-seed.d.ts +0 -2
- package/dist/market-client/seeds/creation/export-seed.js +0 -6
- package/dist/market-client/seeds/creation/plan-seed.d.ts +0 -2
- package/dist/market-client/seeds/creation/plan-seed.js +0 -6
- package/dist/market-client/seeds/interface.d.ts +0 -10
- package/dist/market-client/seeds/interface.js +0 -0
- package/dist/market-client/seeds/queries/list-seed-runs.d.ts +0 -2
- package/dist/market-client/seeds/queries/list-seed-runs.js +0 -7
- package/dist/market-client/seeds/queries/resolve-seed-resources.d.ts +0 -9
- package/dist/market-client/seeds/queries/resolve-seed-resources.js +0 -10
- package/dist/market-client/support/creation/create-decision-execution-input.d.ts +0 -2
- package/dist/market-client/support/creation/create-decision-execution-input.js +0 -6
- package/dist/market-client/support/creation/create-personal-theme.d.ts +0 -3
- package/dist/market-client/support/creation/create-personal-theme.js +0 -6
- package/dist/market-client/support/creation/create-planning-input-request.d.ts +0 -2
- package/dist/market-client/support/creation/create-planning-input-request.js +0 -6
- package/dist/market-client/support/creation/request-decision-execution-input-revision.d.ts +0 -2
- package/dist/market-client/support/creation/request-decision-execution-input-revision.js +0 -6
- package/dist/market-client/support/creation/request-first.d.ts +0 -7
- package/dist/market-client/support/creation/request-first.js +0 -19
- package/dist/market-client/support/delivery/artifact-download.d.ts +0 -2
- package/dist/market-client/support/delivery/artifact-download.js +0 -6
- package/dist/market-client/support/delivery/deliverable-manifest.d.ts +0 -4
- package/dist/market-client/support/delivery/deliverable-manifest.js +0 -14
- package/dist/market-client/support/identity/markets.d.ts +0 -2
- package/dist/market-client/support/identity/markets.js +0 -6
- package/dist/market-client/support/identity/me.d.ts +0 -2
- package/dist/market-client/support/identity/me.js +0 -6
- package/dist/market-client/support/identity/personal-themes.d.ts +0 -2
- package/dist/market-client/support/identity/personal-themes.js +0 -6
- package/dist/market-client/support/identity/web-sign-in.d.ts +0 -7
- package/dist/market-client/support/identity/web-sign-in.js +0 -9
- package/dist/market-client/support/identity/web-sign-up.d.ts +0 -9
- package/dist/market-client/support/identity/web-sign-up.js +0 -9
- package/dist/market-client/support/lifecycle/accept-decision-execution-input.d.ts +0 -2
- package/dist/market-client/support/lifecycle/accept-decision-execution-input.js +0 -6
- package/dist/market-client/support/planning/decision-execution-inputs.d.ts +0 -4
- package/dist/market-client/support/planning/decision-execution-inputs.js +0 -7
- package/dist/market-client/support/planning/decision-planning-status.d.ts +0 -2
- package/dist/market-client/support/planning/decision-planning-status.js +0 -6
- package/dist/market-client/support/planning/decision-structured-estimates.d.ts +0 -2
- package/dist/market-client/support/planning/decision-structured-estimates.js +0 -7
- package/dist/market-client/support/planning/execution-runs.d.ts +0 -12
- package/dist/market-client/support/planning/execution-runs.js +0 -11
- package/dist/market-client/support/preferences/request.d.ts +0 -7
- package/dist/market-client/support/preferences/request.js +0 -36
- package/dist/market-client/support/queries/current-market.d.ts +0 -2
- package/dist/market-client/support/queries/current-market.js +0 -6
- package/dist/market-client/support/retirement/delete-personal-theme.d.ts +0 -2
- package/dist/market-client/support/retirement/delete-personal-theme.js +0 -6
- package/dist/market-client/support/updates/update-personal-theme.d.ts +0 -3
- package/dist/market-client/support/updates/update-personal-theme.js +0 -6
- package/dist/market-client/support/updates/update-web-profile.d.ts +0 -5
- package/dist/market-client/support/updates/update-web-profile.js +0 -10
- package/dist/market-client/teams/contracts/team-deletion-blockers.d.ts +0 -2
- package/dist/market-client/teams/contracts/team-deletion-blockers.js +0 -6
- package/dist/market-client/teams/contracts/team-members.d.ts +0 -2
- package/dist/market-client/teams/contracts/team-members.js +0 -6
- package/dist/market-client/teams/contracts/team-permissions.d.ts +0 -2
- package/dist/market-client/teams/contracts/team-permissions.js +0 -6
- package/dist/market-client/teams/contracts/teams.d.ts +0 -2
- package/dist/market-client/teams/contracts/teams.js +0 -6
- package/dist/market-client/teams/creation/create-team.d.ts +0 -6
- package/dist/market-client/teams/creation/create-team.js +0 -10
- package/dist/market-client/teams/lifecycle/team-lifecycle.d.ts +0 -22
- package/dist/market-client/teams/lifecycle/team-lifecycle.js +0 -30
- package/dist/market-client/treedx/graph/contracts/tree-dx-build-context.d.ts +0 -2
- package/dist/market-client/treedx/graph/contracts/tree-dx-build-context.js +0 -6
- package/dist/market-client/treedx/repositories/contracts/team-tree-dx.d.ts +0 -2
- package/dist/market-client/treedx/repositories/contracts/team-tree-dx.js +0 -6
- package/dist/market-client/treedx/repositories/contracts/tree-dx-mirrors.d.ts +0 -2
- package/dist/market-client/treedx/repositories/contracts/tree-dx-mirrors.js +0 -6
- package/dist/market-client/treedx/repositories/contracts/tree-dx-read-repository-files.d.ts +0 -2
- package/dist/market-client/treedx/repositories/contracts/tree-dx-read-repository-files.js +0 -6
- package/dist/market-client/treedx/repositories/contracts/tree-dx-shares.d.ts +0 -2
- package/dist/market-client/treedx/repositories/contracts/tree-dx-shares.js +0 -6
- package/dist/market-client/treedx/repositories/creation/create-tree-dx-mirror.d.ts +0 -3
- package/dist/market-client/treedx/repositories/creation/create-tree-dx-mirror.js +0 -6
- package/dist/market-client/treedx/repositories/creation/create-tree-dx-share.d.ts +0 -3
- package/dist/market-client/treedx/repositories/creation/create-tree-dx-share.js +0 -6
- package/dist/market-client/treedx/repositories/creation/create-tree-dx-workspace.d.ts +0 -2
- package/dist/market-client/treedx/repositories/creation/create-tree-dx-workspace.js +0 -6
- package/dist/market-client/treedx/repositories/creation/provision-team-tree-dx.d.ts +0 -2
- package/dist/market-client/treedx/repositories/creation/provision-team-tree-dx.js +0 -6
- package/dist/market-client/treedx/repositories/updates/sync-tree-dx-mirror.d.ts +0 -2
- package/dist/market-client/treedx/repositories/updates/sync-tree-dx-mirror.js +0 -6
- package/dist/market-client/treedx/repositories/updates/update-team-tree-dx.d.ts +0 -3
- package/dist/market-client/treedx/repositories/updates/update-team-tree-dx.js +0 -6
- package/dist/operations/platform-operation-store.d.ts +0 -2
- package/dist/operations/platform-operation-store.js +0 -2
- package/dist/operations/platform-operations.d.ts +0 -3
- package/dist/operations/platform-operations.js +0 -3
- package/dist/operations/services/support/market-packaging.d.ts +0 -43
- package/dist/operations/services/support/market-packaging.js +0 -169
- package/dist/platform-operation-store/database-provider.d.ts +0 -44
- package/dist/platform-operation-store/database-provider.js +0 -205
- package/dist/platform-operation-store/platform-operation-store.d.ts +0 -56
- package/dist/platform-operation-store/platform-operation-store.js +0 -224
- package/dist/platform-operations/nested-record.d.ts +0 -21
- package/dist/platform-operations/nested-record.js +0 -262
- package/dist/platform-operations/platform-operation-endpoints.d.ts +0 -208
- package/dist/platform-operations/platform-operation-endpoints.js +0 -71
- package/dist/platform-operations/platform-runner-client.d.ts +0 -52
- package/dist/platform-operations/platform-runner-client.js +0 -143
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-cleanup.d.ts +0 -55
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-cleanup.js +0 -103
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-competition.d.ts +0 -29
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-competition.js +0 -179
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-context.d.ts +0 -132
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-context.js +0 -388
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-executor.d.ts +0 -50
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-executor.js +0 -0
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-governance.d.ts +0 -65
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-governance.js +0 -206
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-guards.d.ts +0 -19
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-guards.js +0 -36
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-proof.d.ts +0 -14
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-proof.js +0 -514
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-scope.d.ts +0 -14
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-scope.js +0 -122
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-terminal.d.ts +0 -17
- package/dist/reconcile/capacity/capacity-core/live-acceptance-capacity-terminal.js +0 -101
- package/dist/reconcile/capacity/providers/live-acceptance-provider-config.d.ts +0 -1
- package/dist/reconcile/capacity/providers/live-acceptance-provider-config.js +0 -20
- package/dist/reconcile/hosting/live-acceptance-cloudflare-client.d.ts +0 -29
- package/dist/reconcile/hosting/live-acceptance-cloudflare-client.js +0 -119
- package/dist/reconcile/hosting/live-acceptance-cloudflare.d.ts +0 -14
- package/dist/reconcile/hosting/live-acceptance-cloudflare.js +0 -316
- package/dist/reconcile/hosting/live-acceptance-railway.d.ts +0 -14
- package/dist/reconcile/hosting/live-acceptance-railway.js +0 -420
- package/dist/reconcile/repositories/live-acceptance-github-client.d.ts +0 -6
- package/dist/reconcile/repositories/live-acceptance-github-client.js +0 -42
- package/dist/reconcile/repositories/live-acceptance-github.d.ts +0 -12
- package/dist/reconcile/repositories/live-acceptance-github.js +0 -301
- package/dist/reconcile/runtime/live-acceptance-local.d.ts +0 -16
- package/dist/reconcile/runtime/live-acceptance-local.js +0 -260
- package/dist/reconcile/runtime/live-acceptance-runtime.d.ts +0 -67
- package/dist/reconcile/runtime/live-acceptance-runtime.js +0 -324
- package/dist/reconcile/runtime/live-acceptance-starter-runtime.d.ts +0 -123
- package/dist/reconcile/runtime/live-acceptance-starter-runtime.js +0 -439
- package/dist/reconcile/support/acceptance/live-acceptance-starter-concurrency.d.ts +0 -19
- package/dist/reconcile/support/acceptance/live-acceptance-starter-concurrency.js +0 -128
- package/dist/reconcile/support/acceptance/live-acceptance-starter-engineering.d.ts +0 -18
- package/dist/reconcile/support/acceptance/live-acceptance-starter-engineering.js +0 -264
- package/dist/reconcile/support/acceptance/live-acceptance-starter-planning.d.ts +0 -44
- package/dist/reconcile/support/acceptance/live-acceptance-starter-planning.js +0 -154
- package/dist/reconcile/support/acceptance/live-acceptance-starters.d.ts +0 -51
- package/dist/reconcile/support/acceptance/live-acceptance-starters.js +0 -12
- package/dist/reconcile/support/acceptance/live-acceptance-values.d.ts +0 -2
- package/dist/reconcile/support/acceptance/live-acceptance-values.js +0 -10
- package/dist/reconcile/support/acceptance/live-acceptance-worktree-cleanup.d.ts +0 -7
- package/dist/reconcile/support/acceptance/live-acceptance-worktree-cleanup.js +0 -38
- package/dist/reconcile/support/acceptance/live-acceptance.d.ts +0 -102
- package/dist/reconcile/support/acceptance/live-acceptance.js +0 -322
- package/dist/scenes/agent-lab/activity-collector.d.ts +0 -114
- package/dist/scenes/agent-lab/activity-collector.js +0 -394
- package/dist/scenes/agent-lab/production-lifecycle.d.ts +0 -18
- package/dist/scenes/agent-lab/production-lifecycle.js +0 -573
- package/dist/scenes/agent-lab/profile-input-seed.d.ts +0 -23
- package/dist/scenes/agent-lab/profile-input-seed.js +0 -41
- package/dist/scenes/agent-lab/report-adapters.d.ts +0 -3
- package/dist/scenes/agent-lab/report-adapters.js +0 -33
- package/dist/scenes/agent-lab/report-model.d.ts +0 -122
- package/dist/scenes/agent-lab/report-model.js +0 -194
- package/dist/scenes/agent-lab/report-writer.d.ts +0 -14
- package/dist/scenes/agent-lab/report-writer.js +0 -143
- package/dist/scenes/agent-lab/run-agent-lab-scene.d.ts +0 -6
- package/dist/scenes/agent-lab/run-agent-lab-scene.js +0 -122
- package/dist/scenes/agent-lab/runtime/diagnostics.d.ts +0 -7
- package/dist/scenes/agent-lab/runtime/diagnostics.js +0 -42
- package/dist/scenes/agent-lab/runtime/metadata.d.ts +0 -7
- package/dist/scenes/agent-lab/runtime/metadata.js +0 -19
- package/dist/scenes/agent-lab/runtime/team-scope.d.ts +0 -29
- package/dist/scenes/agent-lab/runtime/team-scope.js +0 -54
- package/dist/scenes/agent-lab/semantic-artifact-assertions.d.ts +0 -29
- package/dist/scenes/agent-lab/semantic-artifact-assertions.js +0 -66
- package/dist/scenes/agent-lab/terminal-verification.d.ts +0 -17
- package/dist/scenes/agent-lab/terminal-verification.js +0 -31
- package/dist/scenes/agent-lab/viewer/runtime.d.ts +0 -1
- package/dist/scenes/agent-lab/viewer/runtime.js +0 -576
- package/dist/scenes/agent-lab/viewer/styles.d.ts +0 -1
- package/dist/scenes/agent-lab/viewer/styles.js +0 -28
- package/dist/scenes/agent-lab/workday-snapshot.d.ts +0 -116
- package/dist/scenes/agent-lab/workday-snapshot.js +0 -153
- package/dist/scenes/testing/visual-audit-fixtures.d.ts +0 -25
- package/dist/scenes/testing/visual-audit-fixtures.js +0 -299
- package/dist/scripts/maintenance/repair-extracted-class-interfaces.js +0 -36
- package/dist/scripts/testing/test-live-acceptance-cleanup-service.js +0 -57
- package/dist/sdk-types/commerce/capacity/commerce-capacity-listing-input.d.ts +0 -250
- package/dist/sdk-types/commerce/capacity/commerce-capacity-listing-input.js +0 -0
- package/dist/sdk-types/commerce/catalog/upsert-catalog-item-request.js +0 -0
- package/dist/sdk-types/commerce/governance/commerce-governance-states.d.ts +0 -42
- package/dist/sdk-types/commerce/governance/commerce-governance-states.js +0 -198
- package/dist/sdk-types/commerce/payments/commerce-entitlement.d.ts +0 -244
- package/dist/sdk-types/commerce/payments/commerce-entitlement.js +0 -0
- package/dist/sdk-types/commerce/payments/commerce-subscription-statuses.d.ts +0 -77
- package/dist/sdk-types/commerce/payments/commerce-subscription-statuses.js +0 -166
- package/dist/sdk-types/commerce/services/commerce-service-contract.d.ts +0 -247
- package/dist/sdk-types/commerce/services/commerce-service-contract.js +0 -0
- package/dist/sdk-types/commerce/vendors/commerce-stripe-onboarding-request-input.d.ts +0 -233
- package/dist/sdk-types/commerce/vendors/commerce-stripe-onboarding-request-input.js +0 -0
- package/dist/seeds/runtime/local-capacity.d.ts +0 -65
- package/dist/seeds/runtime/local-capacity.js +0 -402
- package/dist/seeds/workspaces/gateway-contract-migration.d.ts +0 -31
- package/dist/seeds/workspaces/gateway-contract-migration.js +0 -176
- package/dist/seeds/workspaces/market-api-workspace.d.ts +0 -60
- package/dist/seeds/workspaces/market-api-workspace.js +0 -528
- /package/dist/operations/services/config-runtime/{commerce/catalog/resolve-template-catalog-endpoint.js → templates/catalog/template-catalog-settings.js} +0 -0
- /package/dist/{api/types.js → operator-contracts/oauth.js} +0 -0
- /package/dist/{market-client/agent-lab-interface.js → sdk-types/control-plane/resource-requests.js} +0 -0
- /package/dist/{market-client/interface.js → standards/mcp/contracts.js} +0 -0
- /package/dist/{commerce/catalog → templates}/template-catalog.js +0 -0
- /package/dist/workflow/operations/{commerce/catalog → release-support/helpers}/back-merge-production-into-staging.js +0 -0
- /package/dist/workflow/operations/{commerce/catalog → release-support/helpers}/run-release-production-guarantees.js +0 -0
package/dist/api/auth/rbac.js
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
const CONTENT_RESOURCES = [
|
|
2
|
-
"pages",
|
|
3
|
-
"notes",
|
|
4
|
-
"questions",
|
|
5
|
-
"objectives",
|
|
6
|
-
"proposals",
|
|
7
|
-
"decisions",
|
|
8
|
-
"people",
|
|
9
|
-
"agents",
|
|
10
|
-
"books",
|
|
11
|
-
"templates",
|
|
12
|
-
"workdays"
|
|
13
|
-
];
|
|
14
|
-
const PLATFORM_RESOURCES = [
|
|
15
|
-
"users",
|
|
16
|
-
"roles",
|
|
17
|
-
"api_tokens",
|
|
18
|
-
"services",
|
|
19
|
-
"jobs",
|
|
20
|
-
"audit",
|
|
21
|
-
"auth",
|
|
22
|
-
"sdk",
|
|
23
|
-
"agent",
|
|
24
|
-
"operations",
|
|
25
|
-
"feedback"
|
|
26
|
-
];
|
|
27
|
-
const ALL_PERMISSION_RESOURCES = [...CONTENT_RESOURCES, ...PLATFORM_RESOURCES];
|
|
28
|
-
function principalHasPlatformPermission(principal, permission) {
|
|
29
|
-
return Boolean(
|
|
30
|
-
principal && (principal.roles?.includes("platform_admin") || principal.permissions?.includes("*:*:*") || principal.permissions?.includes(permission))
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
function permissionKey(resource, action, scope) {
|
|
34
|
-
return `${resource}:${action}:${scope}`;
|
|
35
|
-
}
|
|
36
|
-
function contentPermission(resource, action, scope, description) {
|
|
37
|
-
return {
|
|
38
|
-
key: permissionKey(resource, action, scope),
|
|
39
|
-
resource,
|
|
40
|
-
action,
|
|
41
|
-
scope,
|
|
42
|
-
description
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const permissionDefinitions = [
|
|
46
|
-
{
|
|
47
|
-
key: permissionKey("*", "*", "*"),
|
|
48
|
-
resource: "*",
|
|
49
|
-
action: "*",
|
|
50
|
-
scope: "*",
|
|
51
|
-
description: "Full platform access."
|
|
52
|
-
},
|
|
53
|
-
contentPermission("auth", "read", "self", "Read the authenticated principal."),
|
|
54
|
-
contentPermission("api_tokens", "read", "self", "List personal API tokens."),
|
|
55
|
-
contentPermission("api_tokens", "create", "self", "Create personal API tokens."),
|
|
56
|
-
contentPermission("api_tokens", "delete", "self", "Revoke personal API tokens."),
|
|
57
|
-
contentPermission("services", "impersonate", "global", "Allow trusted web and service impersonation flows."),
|
|
58
|
-
contentPermission("services", "manage", "global", "Manage service credentials and internal service auth."),
|
|
59
|
-
contentPermission("users", "read", "global", "Read user records."),
|
|
60
|
-
contentPermission("users", "manage", "global", "Manage user records."),
|
|
61
|
-
contentPermission("roles", "manage", "global", "Manage role assignments."),
|
|
62
|
-
contentPermission("audit", "read", "global", "Read audit events."),
|
|
63
|
-
contentPermission("jobs", "manage", "global", "Manage internal job and worker control surfaces."),
|
|
64
|
-
contentPermission("sdk", "execute", "global", "Execute SDK routes."),
|
|
65
|
-
contentPermission("agent", "execute", "global", "Execute agent routes."),
|
|
66
|
-
contentPermission("operations", "execute", "global", "Execute workflow operation routes."),
|
|
67
|
-
contentPermission("feedback", "read", "global", "Read private platform feedback."),
|
|
68
|
-
contentPermission("feedback", "manage", "global", "Triage and resolve private platform feedback."),
|
|
69
|
-
contentPermission("feedback", "export", "global", "Export privacy-safe platform feedback bundles.")
|
|
70
|
-
];
|
|
71
|
-
for (const resource of CONTENT_RESOURCES) {
|
|
72
|
-
permissionDefinitions.push(
|
|
73
|
-
contentPermission(resource, "read", "global", `Read ${resource}.`),
|
|
74
|
-
contentPermission(resource, "create", "global", `Create ${resource}.`),
|
|
75
|
-
contentPermission(resource, "update", "global", `Update ${resource}.`),
|
|
76
|
-
contentPermission(resource, "delete", "global", `Delete ${resource}.`)
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
const DEFAULT_PERMISSIONS = permissionDefinitions;
|
|
80
|
-
const DEFAULT_ROLES = [
|
|
81
|
-
{
|
|
82
|
-
key: "platform_admin",
|
|
83
|
-
description: "Full platform administration.",
|
|
84
|
-
permissions: [permissionKey("*", "*", "*")]
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
key: "market_admin",
|
|
88
|
-
description: "Manage market content and core operational surfaces.",
|
|
89
|
-
permissions: [
|
|
90
|
-
permissionKey("auth", "read", "self"),
|
|
91
|
-
permissionKey("api_tokens", "read", "self"),
|
|
92
|
-
permissionKey("api_tokens", "create", "self"),
|
|
93
|
-
permissionKey("api_tokens", "delete", "self"),
|
|
94
|
-
permissionKey("sdk", "execute", "global"),
|
|
95
|
-
permissionKey("agent", "execute", "global"),
|
|
96
|
-
permissionKey("operations", "execute", "global"),
|
|
97
|
-
permissionKey("users", "read", "global"),
|
|
98
|
-
permissionKey("audit", "read", "global"),
|
|
99
|
-
permissionKey("jobs", "manage", "global")
|
|
100
|
-
]
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
key: "content_admin",
|
|
104
|
-
description: "Manage all content resources.",
|
|
105
|
-
permissions: [
|
|
106
|
-
permissionKey("auth", "read", "self"),
|
|
107
|
-
permissionKey("api_tokens", "read", "self"),
|
|
108
|
-
permissionKey("api_tokens", "create", "self"),
|
|
109
|
-
permissionKey("api_tokens", "delete", "self")
|
|
110
|
-
]
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
key: "content_editor",
|
|
114
|
-
description: "Edit marketplace content.",
|
|
115
|
-
permissions: [
|
|
116
|
-
permissionKey("auth", "read", "self"),
|
|
117
|
-
permissionKey("api_tokens", "read", "self"),
|
|
118
|
-
permissionKey("api_tokens", "create", "self"),
|
|
119
|
-
permissionKey("api_tokens", "delete", "self")
|
|
120
|
-
]
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
key: "member",
|
|
124
|
-
description: "Authenticated member with personal API tokens.",
|
|
125
|
-
permissions: [
|
|
126
|
-
permissionKey("auth", "read", "self"),
|
|
127
|
-
permissionKey("api_tokens", "read", "self"),
|
|
128
|
-
permissionKey("api_tokens", "create", "self"),
|
|
129
|
-
permissionKey("api_tokens", "delete", "self")
|
|
130
|
-
]
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
key: "viewer",
|
|
134
|
-
description: "Read-only marketplace viewer.",
|
|
135
|
-
permissions: [permissionKey("auth", "read", "self")]
|
|
136
|
-
}
|
|
137
|
-
];
|
|
138
|
-
for (const role of DEFAULT_ROLES) {
|
|
139
|
-
if (role.key === "content_admin") {
|
|
140
|
-
for (const resource of CONTENT_RESOURCES) {
|
|
141
|
-
role.permissions.push(
|
|
142
|
-
permissionKey(resource, "read", "global"),
|
|
143
|
-
permissionKey(resource, "create", "global"),
|
|
144
|
-
permissionKey(resource, "update", "global"),
|
|
145
|
-
permissionKey(resource, "delete", "global")
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
if (role.key === "content_editor") {
|
|
150
|
-
for (const resource of CONTENT_RESOURCES) {
|
|
151
|
-
role.permissions.push(
|
|
152
|
-
permissionKey(resource, "read", "global"),
|
|
153
|
-
permissionKey(resource, "create", "global"),
|
|
154
|
-
permissionKey(resource, "update", "global")
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
function permissionGranted(granted, required) {
|
|
160
|
-
return granted.includes(permissionKey("*", "*", "*")) || granted.includes(required);
|
|
161
|
-
}
|
|
162
|
-
export {
|
|
163
|
-
ALL_PERMISSION_RESOURCES,
|
|
164
|
-
CONTENT_RESOURCES,
|
|
165
|
-
DEFAULT_PERMISSIONS,
|
|
166
|
-
DEFAULT_ROLES,
|
|
167
|
-
PLATFORM_RESOURCES,
|
|
168
|
-
permissionGranted,
|
|
169
|
-
permissionKey,
|
|
170
|
-
principalHasPlatformPermission
|
|
171
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ApiPrincipal } from '../types.js';
|
|
2
|
-
export interface AccessTokenPayload {
|
|
3
|
-
sub: string;
|
|
4
|
-
displayName?: string;
|
|
5
|
-
scopes: string[];
|
|
6
|
-
roles: string[];
|
|
7
|
-
permissions: string[];
|
|
8
|
-
iat: number;
|
|
9
|
-
exp: number;
|
|
10
|
-
iss: string;
|
|
11
|
-
jti: string;
|
|
12
|
-
tokenType: 'access' | 'service';
|
|
13
|
-
metadata?: Record<string, unknown>;
|
|
14
|
-
}
|
|
15
|
-
export declare function nextOpaqueToken(prefix: string): string;
|
|
16
|
-
export declare function createAccessToken(payload: AccessTokenPayload, secret: string): string;
|
|
17
|
-
export declare function verifyAccessToken(token: string, secret: string): AccessTokenPayload | null;
|
|
18
|
-
export declare function principalFromAccessTokenPayload(payload: AccessTokenPayload): ApiPrincipal;
|
package/dist/api/auth/tokens.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { createHmac, randomBytes } from "node:crypto";
|
|
2
|
-
function encodeBase64Url(value) {
|
|
3
|
-
return Buffer.from(value).toString("base64url");
|
|
4
|
-
}
|
|
5
|
-
function decodeBase64Url(value) {
|
|
6
|
-
return Buffer.from(value, "base64url").toString("utf8");
|
|
7
|
-
}
|
|
8
|
-
function sign(input, secret) {
|
|
9
|
-
return createHmac("sha256", secret).update(input).digest("base64url");
|
|
10
|
-
}
|
|
11
|
-
function nextOpaqueToken(prefix) {
|
|
12
|
-
return `${prefix}_${randomBytes(24).toString("base64url")}`;
|
|
13
|
-
}
|
|
14
|
-
function createAccessToken(payload, secret) {
|
|
15
|
-
const encodedPayload = encodeBase64Url(JSON.stringify(payload));
|
|
16
|
-
const encodedSignature = sign(encodedPayload, secret);
|
|
17
|
-
return `${encodedPayload}.${encodedSignature}`;
|
|
18
|
-
}
|
|
19
|
-
function verifyAccessToken(token, secret) {
|
|
20
|
-
const [encodedPayload, encodedSignature] = token.split(".");
|
|
21
|
-
if (!encodedPayload || !encodedSignature) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
const expected = sign(encodedPayload, secret);
|
|
25
|
-
if (expected !== encodedSignature) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
try {
|
|
29
|
-
const payload = JSON.parse(decodeBase64Url(encodedPayload));
|
|
30
|
-
if (!payload.sub || !Array.isArray(payload.scopes) || !payload.exp) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
if (payload.exp <= Math.floor(Date.now() / 1e3)) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
return payload;
|
|
37
|
-
} catch {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function principalFromAccessTokenPayload(payload) {
|
|
42
|
-
return {
|
|
43
|
-
id: payload.sub,
|
|
44
|
-
displayName: payload.displayName,
|
|
45
|
-
scopes: [...payload.scopes],
|
|
46
|
-
roles: [...payload.roles],
|
|
47
|
-
permissions: [...payload.permissions],
|
|
48
|
-
metadata: payload.metadata
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
export {
|
|
52
|
-
createAccessToken,
|
|
53
|
-
nextOpaqueToken,
|
|
54
|
-
principalFromAccessTokenPayload,
|
|
55
|
-
verifyAccessToken
|
|
56
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { createHmac, randomUUID } from "node:crypto";
|
|
2
|
-
function createSignedUserAssertion(input) {
|
|
3
|
-
if (!input.secret.trim()) throw new Error("A web assertion secret is required.");
|
|
4
|
-
const now = input.now ?? /* @__PURE__ */ new Date();
|
|
5
|
-
const claims = {
|
|
6
|
-
userId: input.userId,
|
|
7
|
-
sessionId: input.sessionId,
|
|
8
|
-
identityId: input.identityId ?? null,
|
|
9
|
-
authTime: input.authTime,
|
|
10
|
-
expiresAt: new Date(now.getTime() + (input.ttlSeconds ?? 300) * 1e3).toISOString(),
|
|
11
|
-
nonce: input.nonce ?? randomUUID()
|
|
12
|
-
};
|
|
13
|
-
const payload = Buffer.from(JSON.stringify(claims)).toString("base64url");
|
|
14
|
-
const signature = createHmac("sha256", input.secret).update(payload).digest("base64url");
|
|
15
|
-
return `${payload}.${signature}`;
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
createSignedUserAssertion
|
|
19
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { BUILT_IN_AGENT_EXECUTION_PROVIDER_IDS } from "../../../types/agents.js";
|
|
2
|
-
import { resolveApiD1Database } from "../../auth/d1-database.js";
|
|
3
|
-
import { D1AuthProvider } from "../../auth/d1-provider.js";
|
|
4
|
-
import { MemoryDeviceCodeAuthProvider } from "../../auth/memory-provider.js";
|
|
5
|
-
function addProviders(target, incoming, label) {
|
|
6
|
-
for (const [id, value] of Object.entries(incoming ?? {})) {
|
|
7
|
-
if (target.has(id)) {
|
|
8
|
-
throw new Error(`Treeseed API runtime found duplicate ${label} provider "${id}".`);
|
|
9
|
-
}
|
|
10
|
-
target.set(id, value);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
function resolveSelectedProvider(registry, selectedId, label) {
|
|
14
|
-
const selected = registry.get(selectedId);
|
|
15
|
-
if (!selected) {
|
|
16
|
-
throw new Error(`Treeseed API runtime could not resolve ${label} provider "${selectedId}".`);
|
|
17
|
-
}
|
|
18
|
-
return selected;
|
|
19
|
-
}
|
|
20
|
-
function resolveApiRuntimeProviders(config, overrides = {}) {
|
|
21
|
-
const authRegistry = /* @__PURE__ */ new Map();
|
|
22
|
-
const agentExecution = /* @__PURE__ */ new Map();
|
|
23
|
-
const agentQueue = /* @__PURE__ */ new Map();
|
|
24
|
-
const agentNotification = /* @__PURE__ */ new Map();
|
|
25
|
-
const agentRepository = /* @__PURE__ */ new Map();
|
|
26
|
-
const agentVerification = /* @__PURE__ */ new Map();
|
|
27
|
-
addProviders(authRegistry, {
|
|
28
|
-
memory: ({ config: runtimeConfig }) => new MemoryDeviceCodeAuthProvider({
|
|
29
|
-
...runtimeConfig,
|
|
30
|
-
baseUrl: runtimeConfig.authApprovalBaseUrl ?? runtimeConfig.baseUrl
|
|
31
|
-
}),
|
|
32
|
-
d1: ({ config: runtimeConfig }) => new D1AuthProvider({
|
|
33
|
-
...runtimeConfig,
|
|
34
|
-
baseUrl: runtimeConfig.authApprovalBaseUrl ?? runtimeConfig.baseUrl
|
|
35
|
-
}, { db: resolveApiD1Database(runtimeConfig) })
|
|
36
|
-
}, "auth");
|
|
37
|
-
addProviders(authRegistry, overrides.auth, "auth");
|
|
38
|
-
addProviders(agentExecution, Object.fromEntries(BUILT_IN_AGENT_EXECUTION_PROVIDER_IDS.map((id) => [id, { id }])), "agent execution");
|
|
39
|
-
addProviders(agentQueue, { memory: { id: "memory" } }, "agent queue");
|
|
40
|
-
addProviders(agentNotification, { sdk_message: { id: "sdk_message" } }, "agent notification");
|
|
41
|
-
addProviders(agentRepository, { git: { id: "git" } }, "agent repository");
|
|
42
|
-
addProviders(agentVerification, { local: { id: "local" } }, "agent verification");
|
|
43
|
-
addProviders(agentExecution, overrides.agentExecution, "agent execution");
|
|
44
|
-
addProviders(agentQueue, overrides.agentQueue, "agent queue");
|
|
45
|
-
addProviders(agentNotification, overrides.agentNotification, "agent notification");
|
|
46
|
-
addProviders(agentRepository, overrides.agentRepository, "agent repository");
|
|
47
|
-
addProviders(agentVerification, overrides.agentVerification, "agent verification");
|
|
48
|
-
const authFactory = resolveSelectedProvider(authRegistry, config.providers.auth, "auth");
|
|
49
|
-
resolveSelectedProvider(agentExecution, config.providers.agents.execution, "agent execution");
|
|
50
|
-
resolveSelectedProvider(agentQueue, config.providers.agents.queue, "agent queue");
|
|
51
|
-
resolveSelectedProvider(agentNotification, config.providers.agents.notification, "agent notification");
|
|
52
|
-
resolveSelectedProvider(agentRepository, config.providers.agents.repository, "agent repository");
|
|
53
|
-
resolveSelectedProvider(agentVerification, config.providers.agents.verification, "agent verification");
|
|
54
|
-
return {
|
|
55
|
-
auth: authFactory({ config }),
|
|
56
|
-
registries: {
|
|
57
|
-
auth: authRegistry,
|
|
58
|
-
agentExecution,
|
|
59
|
-
agentQueue,
|
|
60
|
-
agentNotification,
|
|
61
|
-
agentRepository,
|
|
62
|
-
agentVerification
|
|
63
|
-
},
|
|
64
|
-
selections: config.providers
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
export {
|
|
68
|
-
resolveApiRuntimeProviders
|
|
69
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ApiConfig } from '../types.js';
|
|
2
|
-
export declare function resolveLocalApiDatabaseUrl(env?: NodeJS.ProcessEnv): string;
|
|
3
|
-
export declare function resolveApiDatabaseUrl(env?: NodeJS.ProcessEnv, baseUrl?: string): string | undefined;
|
|
4
|
-
export declare function resolveApiConfig(env?: NodeJS.ProcessEnv): ApiConfig;
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
|
-
const LOCAL_DEV_AUTH_TTL_SECONDS = 365 * 24 * 60 * 60;
|
|
4
|
-
const DEFAULT_AUTH_TTL_SECONDS = 15 * 60;
|
|
5
|
-
const DEFAULT_REFRESH_TTL_SECONDS = 7 * 24 * 60 * 60;
|
|
6
|
-
const DEFAULT_LOCAL_API_DATABASE_PORT = "54329";
|
|
7
|
-
const DEFAULT_LOCAL_API_DATABASE_NAME = "treeseed_api";
|
|
8
|
-
const DEFAULT_LOCAL_API_DATABASE_USER = "treeseed";
|
|
9
|
-
const DEFAULT_LOCAL_API_DATABASE_PASSWORD = "treeseed-local-dev";
|
|
10
|
-
function parseInteger(value, fallback) {
|
|
11
|
-
if (!value) return fallback;
|
|
12
|
-
const parsed = Number.parseInt(value, 10);
|
|
13
|
-
return Number.isFinite(parsed) ? parsed : fallback;
|
|
14
|
-
}
|
|
15
|
-
function resolveLocalWranglerConfigPath(repoRoot, env) {
|
|
16
|
-
const explicit = env.TREESEED_API_D1_WRANGLER_CONFIG?.trim() || env.TREESEED_LOCAL_WRANGLER_CONFIG?.trim();
|
|
17
|
-
if (explicit) return resolve(repoRoot, explicit);
|
|
18
|
-
const generated = resolve(repoRoot, ".treeseed", "generated", "environments", "local", "wrangler.toml");
|
|
19
|
-
return existsSync(generated) ? generated : void 0;
|
|
20
|
-
}
|
|
21
|
-
function normalizeUrl(value) {
|
|
22
|
-
return value.endsWith("/") ? value.slice(0, -1) : value;
|
|
23
|
-
}
|
|
24
|
-
function isLoopbackUrl(value) {
|
|
25
|
-
try {
|
|
26
|
-
const url = new URL(value);
|
|
27
|
-
return url.hostname === "127.0.0.1" || url.hostname === "localhost";
|
|
28
|
-
} catch {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function parseCsv(value) {
|
|
33
|
-
return (value ?? "").split(",").map((entry) => entry.trim().toLowerCase()).filter(Boolean);
|
|
34
|
-
}
|
|
35
|
-
function firstEnvValue(env, ...keys) {
|
|
36
|
-
for (const key of keys) {
|
|
37
|
-
const value = env[key]?.trim();
|
|
38
|
-
if (value) return value;
|
|
39
|
-
}
|
|
40
|
-
return void 0;
|
|
41
|
-
}
|
|
42
|
-
function encodeDatabaseUrlPart(value) {
|
|
43
|
-
return encodeURIComponent(value);
|
|
44
|
-
}
|
|
45
|
-
function resolveLocalApiDatabaseUrl(env = process.env) {
|
|
46
|
-
const port = firstEnvValue(env, "TREESEED_MARKET_LOCAL_POSTGRES_PORT", "TREESEED_API_LOCAL_POSTGRES_PORT") || DEFAULT_LOCAL_API_DATABASE_PORT;
|
|
47
|
-
const database = firstEnvValue(env, "TREESEED_MARKET_LOCAL_POSTGRES_DATABASE", "TREESEED_API_LOCAL_POSTGRES_DATABASE") || DEFAULT_LOCAL_API_DATABASE_NAME;
|
|
48
|
-
const user = firstEnvValue(env, "TREESEED_MARKET_LOCAL_POSTGRES_USER", "TREESEED_API_LOCAL_POSTGRES_USER") || DEFAULT_LOCAL_API_DATABASE_USER;
|
|
49
|
-
const password = firstEnvValue(env, "TREESEED_MARKET_LOCAL_POSTGRES_PASSWORD", "TREESEED_API_LOCAL_POSTGRES_PASSWORD") || DEFAULT_LOCAL_API_DATABASE_PASSWORD;
|
|
50
|
-
return `postgres://${encodeDatabaseUrlPart(user)}:${encodeDatabaseUrlPart(password)}@127.0.0.1:${port}/${encodeDatabaseUrlPart(database)}`;
|
|
51
|
-
}
|
|
52
|
-
function resolveApiDatabaseUrl(env = process.env, baseUrl) {
|
|
53
|
-
const explicit = firstEnvValue(env, "TREESEED_DATABASE_URL");
|
|
54
|
-
if (explicit) return explicit;
|
|
55
|
-
const environment = firstEnvValue(env, "TREESEED_API_ENVIRONMENT", "TREESEED_ENVIRONMENT");
|
|
56
|
-
const localMode = env.LOCAL_DEV_MODE !== void 0 || environment === "local" || (baseUrl ? isLoopbackUrl(baseUrl) : false);
|
|
57
|
-
return localMode ? resolveLocalApiDatabaseUrl(env) : void 0;
|
|
58
|
-
}
|
|
59
|
-
function resolveBaseUrl(env, host, port) {
|
|
60
|
-
if (env.TREESEED_API_BASE_URL?.trim()) {
|
|
61
|
-
return normalizeUrl(env.TREESEED_API_BASE_URL.trim());
|
|
62
|
-
}
|
|
63
|
-
if (env.RAILWAY_PUBLIC_DOMAIN?.trim()) {
|
|
64
|
-
return normalizeUrl(`https://${env.RAILWAY_PUBLIC_DOMAIN.trim()}`);
|
|
65
|
-
}
|
|
66
|
-
return normalizeUrl(`http://${host}:${port}`);
|
|
67
|
-
}
|
|
68
|
-
function resolveAuthApprovalBaseUrl(env, baseUrl) {
|
|
69
|
-
const explicit = env.TREESEED_API_AUTH_APPROVAL_BASE_URL?.trim() || env.TREESEED_SITE_URL?.trim() || env.TREESEED_BETTER_AUTH_URL?.trim();
|
|
70
|
-
const explicitIsLoopback = explicit ? isLoopbackUrl(explicit) : false;
|
|
71
|
-
try {
|
|
72
|
-
const url = new URL(baseUrl);
|
|
73
|
-
const isLocalApi = url.hostname === "127.0.0.1" || url.hostname === "localhost";
|
|
74
|
-
if (!isLocalApi && explicit && explicitIsLoopback) {
|
|
75
|
-
throw new Error(`Refusing loopback device approval URL "${explicit}" for remote API "${baseUrl}".`);
|
|
76
|
-
}
|
|
77
|
-
if (explicit) {
|
|
78
|
-
return normalizeUrl(explicit);
|
|
79
|
-
}
|
|
80
|
-
if (isLocalApi && url.port === "3000") {
|
|
81
|
-
url.port = "4321";
|
|
82
|
-
return normalizeUrl(url.toString());
|
|
83
|
-
}
|
|
84
|
-
} catch (error) {
|
|
85
|
-
if (error instanceof Error && error.message.includes("Refusing loopback device approval URL")) {
|
|
86
|
-
throw error;
|
|
87
|
-
}
|
|
88
|
-
if (explicit && /^https?:\/\//u.test(explicit)) {
|
|
89
|
-
throw new Error(`Invalid device approval URL configuration for API "${baseUrl}".`);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return baseUrl;
|
|
93
|
-
}
|
|
94
|
-
function resolveApiConfig(env = process.env) {
|
|
95
|
-
const host = env.HOST?.trim() || "0.0.0.0";
|
|
96
|
-
const port = parseInteger(env.PORT, 3e3);
|
|
97
|
-
const baseUrl = resolveBaseUrl(env, host === "0.0.0.0" ? "127.0.0.1" : host, port);
|
|
98
|
-
const issuer = normalizeUrl(env.TREESEED_API_ISSUER?.trim() || baseUrl);
|
|
99
|
-
const repoRoot = resolve(env.TREESEED_API_REPO_ROOT?.trim() || process.cwd());
|
|
100
|
-
const localDevAuth = env.LOCAL_DEV_MODE === "cloudflare" || isLoopbackUrl(baseUrl);
|
|
101
|
-
const defaultAccessTokenTtl = localDevAuth ? LOCAL_DEV_AUTH_TTL_SECONDS : DEFAULT_AUTH_TTL_SECONDS;
|
|
102
|
-
const defaultRefreshTokenTtl = localDevAuth ? LOCAL_DEV_AUTH_TTL_SECONDS : DEFAULT_REFRESH_TTL_SECONDS;
|
|
103
|
-
return {
|
|
104
|
-
name: env.TREESEED_API_NAME?.trim() || "@treeseed/sdk/api",
|
|
105
|
-
host,
|
|
106
|
-
port,
|
|
107
|
-
baseUrl,
|
|
108
|
-
authApprovalBaseUrl: resolveAuthApprovalBaseUrl(env, baseUrl),
|
|
109
|
-
issuer,
|
|
110
|
-
repoRoot,
|
|
111
|
-
projectId: env.TREESEED_PROJECT_ID?.trim() || "treeseed-project",
|
|
112
|
-
authSecret: env.TREESEED_API_AUTH_SECRET?.trim() || "treeseed-api-dev-secret",
|
|
113
|
-
projectApiKey: env.TREESEED_API_PROJECT_KEY?.trim() || void 0,
|
|
114
|
-
projectApiLabel: env.TREESEED_API_PROJECT_LABEL?.trim() || "Project API Key",
|
|
115
|
-
projectApiPermissions: parseCsv(env.TREESEED_API_PROJECT_KEY_PERMISSIONS).length > 0 ? parseCsv(env.TREESEED_API_PROJECT_KEY_PERMISSIONS) : ["sdk:execute:global", "agent:execute:global", "operations:execute:global"],
|
|
116
|
-
cloudflareAccountId: env.TREESEED_CLOUDFLARE_ACCOUNT_ID?.trim() || void 0,
|
|
117
|
-
cloudflareApiToken: env.TREESEED_CLOUDFLARE_API_TOKEN?.trim() || void 0,
|
|
118
|
-
apiDatabaseUrl: resolveApiDatabaseUrl(env, baseUrl),
|
|
119
|
-
d1DatabaseId: env.TREESEED_API_D1_DATABASE_ID?.trim() || void 0,
|
|
120
|
-
d1DatabaseName: env.TREESEED_API_D1_DATABASE_NAME?.trim() || env.SITE_DATA_DB?.trim() || void 0,
|
|
121
|
-
d1LocalPersistTo: env.TREESEED_API_D1_LOCAL_PERSIST_TO?.trim() || resolve(repoRoot, ".wrangler/state/v3/d1"),
|
|
122
|
-
d1WranglerConfigPath: resolveLocalWranglerConfigPath(repoRoot, env),
|
|
123
|
-
webServiceId: firstEnvValue(env, "TREESEED_WEB_SERVICE_ID", "TREESEED_API_WEB_SERVICE_ID") || "web",
|
|
124
|
-
webServiceSecret: firstEnvValue(env, "TREESEED_WEB_SERVICE_SECRET", "TREESEED_API_WEB_SERVICE_SECRET") || "treeseed-web-service-dev-secret",
|
|
125
|
-
webAssertionSecret: firstEnvValue(env, "TREESEED_API_WEB_ASSERTION_SECRET", "TREESEED_WEB_ASSERTION_SECRET", "TREESEED_API_AUTH_SECRET") || "treeseed-web-assertion-dev-secret",
|
|
126
|
-
webExchangeTtlSeconds: parseInteger(env.TREESEED_API_WEB_EXCHANGE_TTL, 300),
|
|
127
|
-
bootstrapAdminAllowlist: parseCsv(env.TREESEED_API_BOOTSTRAP_ADMIN_ALLOWLIST),
|
|
128
|
-
accessTokenTtlSeconds: parseInteger(env.TREESEED_API_ACCESS_TOKEN_TTL, defaultAccessTokenTtl),
|
|
129
|
-
refreshTokenTtlSeconds: parseInteger(env.TREESEED_API_REFRESH_TOKEN_TTL, defaultRefreshTokenTtl),
|
|
130
|
-
deviceCodeTtlSeconds: parseInteger(env.TREESEED_API_DEVICE_CODE_TTL, 10 * 60),
|
|
131
|
-
deviceCodePollIntervalSeconds: parseInteger(env.TREESEED_API_DEVICE_CODE_POLL_INTERVAL, 5),
|
|
132
|
-
templateCatalogPath: env.TREESEED_API_TEMPLATE_CATALOG_PATH?.trim() || void 0,
|
|
133
|
-
providers: {
|
|
134
|
-
auth: env.TREESEED_API_PROVIDER_AUTH?.trim() || "d1",
|
|
135
|
-
agents: {
|
|
136
|
-
execution: env.TREESEED_API_PROVIDER_AGENT_EXECUTION?.trim() || "codex",
|
|
137
|
-
queue: env.TREESEED_API_PROVIDER_AGENT_QUEUE?.trim() || "memory",
|
|
138
|
-
notification: env.TREESEED_API_PROVIDER_AGENT_NOTIFICATION?.trim() || "sdk_message",
|
|
139
|
-
repository: env.TREESEED_API_PROVIDER_AGENT_REPOSITORY?.trim() || "git",
|
|
140
|
-
verification: env.TREESEED_API_PROVIDER_AGENT_VERIFICATION?.trim() || "local"
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
export {
|
|
146
|
-
resolveApiConfig,
|
|
147
|
-
resolveApiDatabaseUrl,
|
|
148
|
-
resolveLocalApiDatabaseUrl
|
|
149
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { Hono } from 'hono';
|
|
2
|
-
import { type Server } from 'node:http';
|
|
3
|
-
import type { ApiServerOptions } from '../types.js';
|
|
4
|
-
export declare function createNodeServer(options?: ApiServerOptions): Promise<{
|
|
5
|
-
app: Hono<{
|
|
6
|
-
Variables: import("../types.js").AppVariables;
|
|
7
|
-
}, import("hono/types").BlankSchema, "/">;
|
|
8
|
-
config: {
|
|
9
|
-
providers: {
|
|
10
|
-
agents: {
|
|
11
|
-
execution: string;
|
|
12
|
-
queue: string;
|
|
13
|
-
notification: string;
|
|
14
|
-
repository: string;
|
|
15
|
-
verification: string;
|
|
16
|
-
};
|
|
17
|
-
auth: string;
|
|
18
|
-
};
|
|
19
|
-
name: string;
|
|
20
|
-
host: string;
|
|
21
|
-
port: number;
|
|
22
|
-
baseUrl: string;
|
|
23
|
-
authApprovalBaseUrl?: string;
|
|
24
|
-
issuer: string;
|
|
25
|
-
repoRoot: string;
|
|
26
|
-
projectId: string;
|
|
27
|
-
authSecret: string;
|
|
28
|
-
projectApiKey?: string;
|
|
29
|
-
projectApiLabel: string;
|
|
30
|
-
projectApiPermissions: string[];
|
|
31
|
-
cloudflareAccountId?: string;
|
|
32
|
-
cloudflareApiToken?: string;
|
|
33
|
-
apiDatabaseUrl?: string;
|
|
34
|
-
d1DatabaseId?: string;
|
|
35
|
-
d1DatabaseName?: string;
|
|
36
|
-
d1LocalPersistTo?: string;
|
|
37
|
-
d1WranglerConfigPath?: string;
|
|
38
|
-
webServiceId: string;
|
|
39
|
-
webServiceSecret: string;
|
|
40
|
-
webAssertionSecret: string;
|
|
41
|
-
webExchangeTtlSeconds: number;
|
|
42
|
-
bootstrapAdminAllowlist: string[];
|
|
43
|
-
accessTokenTtlSeconds: number;
|
|
44
|
-
refreshTokenTtlSeconds: number;
|
|
45
|
-
deviceCodeTtlSeconds: number;
|
|
46
|
-
deviceCodePollIntervalSeconds: number;
|
|
47
|
-
templateCatalogPath?: string;
|
|
48
|
-
};
|
|
49
|
-
server: Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
|
|
50
|
-
url: string;
|
|
51
|
-
close(): Promise<void>;
|
|
52
|
-
}>;
|
|
53
|
-
export declare const createRailwayApiServer: typeof createNodeServer;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { createServer } from "node:http";
|
|
2
|
-
import { Readable } from "node:stream";
|
|
3
|
-
import { resolveApiConfig } from "../configuration/config.js";
|
|
4
|
-
import { createApiApp } from "../support/app.js";
|
|
5
|
-
function hasRequestBody(method) {
|
|
6
|
-
return method !== "GET" && method !== "HEAD";
|
|
7
|
-
}
|
|
8
|
-
async function honoNodeHandler(app, request, response) {
|
|
9
|
-
const req = request;
|
|
10
|
-
const res = response;
|
|
11
|
-
const origin = req.headers.host ? `http://${req.headers.host}` : "http://127.0.0.1";
|
|
12
|
-
const url = new URL(req.url ?? "/", origin);
|
|
13
|
-
const webRequest = new Request(url, {
|
|
14
|
-
method: req.method,
|
|
15
|
-
headers: req.headers,
|
|
16
|
-
body: hasRequestBody(req.method) ? req : void 0,
|
|
17
|
-
duplex: "half"
|
|
18
|
-
});
|
|
19
|
-
const webResponse = await app.fetch(webRequest);
|
|
20
|
-
res.statusCode = webResponse.status;
|
|
21
|
-
webResponse.headers.forEach((value, key) => {
|
|
22
|
-
res.setHeader(key, value);
|
|
23
|
-
});
|
|
24
|
-
if (!webResponse.body) {
|
|
25
|
-
res.end();
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
Readable.fromWeb(webResponse.body).pipe(res);
|
|
29
|
-
}
|
|
30
|
-
async function createNodeServer(options = {}) {
|
|
31
|
-
const config = {
|
|
32
|
-
...resolveApiConfig(),
|
|
33
|
-
...options.config ?? {},
|
|
34
|
-
providers: {
|
|
35
|
-
...resolveApiConfig().providers,
|
|
36
|
-
...options.config?.providers ?? {},
|
|
37
|
-
agents: {
|
|
38
|
-
...resolveApiConfig().providers.agents,
|
|
39
|
-
...options.config?.providers?.agents ?? {}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const app = createApiApp({
|
|
44
|
-
...options,
|
|
45
|
-
config
|
|
46
|
-
});
|
|
47
|
-
const server = createServer((req, res) => {
|
|
48
|
-
void honoNodeHandler(app, req, res);
|
|
49
|
-
});
|
|
50
|
-
await new Promise((resolvePromise) => {
|
|
51
|
-
server.listen(config.port, config.host, () => resolvePromise());
|
|
52
|
-
});
|
|
53
|
-
const address = server.address();
|
|
54
|
-
const resolvedUrl = address ? `${config.baseUrl.startsWith("http") ? config.baseUrl : `http://${address.address}:${address.port}`}` : config.baseUrl;
|
|
55
|
-
return {
|
|
56
|
-
app,
|
|
57
|
-
config,
|
|
58
|
-
server,
|
|
59
|
-
url: resolvedUrl,
|
|
60
|
-
async close() {
|
|
61
|
-
await new Promise((resolvePromise, rejectPromise) => {
|
|
62
|
-
server.close((error) => error ? rejectPromise(error) : resolvePromise());
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
const createRailwayApiServer = createNodeServer;
|
|
68
|
-
export {
|
|
69
|
-
createNodeServer,
|
|
70
|
-
createRailwayApiServer
|
|
71
|
-
};
|
package/dist/api/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { resolveApiD1Database } from './auth/d1-database.js';
|
|
2
|
-
export { D1AuthProvider } from './auth/d1-provider.js';
|
|
3
|
-
export { MemoryDeviceCodeAuthProvider } from './auth/memory-provider.js';
|
|
4
|
-
export { createSignedUserAssertion } from './auth/trusted-assertion.js';
|
|
5
|
-
export { principalHasPlatformPermission } from './auth/rbac.js';
|
|
6
|
-
export type { PermissionPrincipal } from './auth/rbac.js';
|
|
7
|
-
export { resolveApiRuntimeProviders } from './capacity/providers/providers.js';
|
|
8
|
-
export { resolveApiConfig, resolveApiDatabaseUrl, resolveLocalApiDatabaseUrl } from './configuration/config.js';
|
|
9
|
-
export { createNodeServer, createRailwayApiServer } from './hosting/railway.js';
|
|
10
|
-
export { createApiApp, createApiRouter } from './support/app.js';
|
|
11
|
-
export { bearerTokenFromRequest, jsonError, requireActorType, requireAuthentication, requirePermission, requireScope } from './support/http.js';
|
|
12
|
-
export { loadTemplateCatalog } from './support/templates.js';
|
|
13
|
-
export type * from './types.js';
|