@treeseed/sdk 0.13.0-rc.6 → 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 +60 -0
- package/dist/entrypoints/clients/control-plane-client.js +134 -4
- 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/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/{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 +3 -40
- 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/agent-lab-interface.js +0 -0
- 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/interface.js +0 -0
- 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 → sdk-types/control-plane/resource-requests.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
|
@@ -1,528 +0,0 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
3
|
-
import { tmpdir } from "node:os";
|
|
4
|
-
import { dirname, resolve } from "node:path";
|
|
5
|
-
import { credentialEnvironment, git, migrationCredential, remoteHead } from "../repositories/repository-history.js";
|
|
6
|
-
import { assertMarketApiPackageLock, generateMarketApiPackageLock } from "./market-api-package-lock.js";
|
|
7
|
-
import { managedWorkspaceMatches, managedWorkspacePaths, missingApplicationBootstrapFiles, staleManagedWorkspacePaths } from "./managed-workspace-overlay.js";
|
|
8
|
-
function exactRef(value, label) {
|
|
9
|
-
if (!/^[a-f0-9]{40}$/u.test(value)) throw new Error(`${label} must be an exact 40-character commit SHA.`);
|
|
10
|
-
return value;
|
|
11
|
-
}
|
|
12
|
-
async function assertLocalGeneratedDescriptor(projectRoot, adminApiRef) {
|
|
13
|
-
const apiRoot = resolve(projectRoot, "packages", "api");
|
|
14
|
-
const head = (await git(apiRoot, ["rev-parse", "HEAD"])).stdout;
|
|
15
|
-
if (head !== adminApiRef) throw new Error(`Local Admin API checkout is ${head}, not requested ref ${adminApiRef}.`);
|
|
16
|
-
const dirty = (await git(apiRoot, ["status", "--porcelain"])).stdout;
|
|
17
|
-
if (dirty) throw new Error("Local Admin API checkout must be clean before its generated descriptor can seed Market API.");
|
|
18
|
-
const descriptor = resolve(apiRoot, "dist", "admin-api-descriptor.json");
|
|
19
|
-
try {
|
|
20
|
-
readFileSync(descriptor, "utf8");
|
|
21
|
-
} catch {
|
|
22
|
-
throw new Error(`Build Admin API ${adminApiRef} before reconciling Market API; ${descriptor} is missing.`);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function project(manifest, slug) {
|
|
26
|
-
const value = manifest.resources.projects.find((entry) => entry.slug === slug);
|
|
27
|
-
if (!value) throw new Error(`Seed ${manifest.name} does not declare ${slug}.`);
|
|
28
|
-
return value;
|
|
29
|
-
}
|
|
30
|
-
function journalPath(projectRoot, repository) {
|
|
31
|
-
return resolve(projectRoot, ".treeseed", "repository-migrations", `${repository.replace("/", "--")}--workspace.json`);
|
|
32
|
-
}
|
|
33
|
-
function journal(projectRoot, repository) {
|
|
34
|
-
try {
|
|
35
|
-
return JSON.parse(readFileSync(journalPath(projectRoot, repository), "utf8"));
|
|
36
|
-
} catch {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function writeJournal(projectRoot, plan, receipts) {
|
|
41
|
-
const path = journalPath(projectRoot, plan.repository);
|
|
42
|
-
mkdirSync(dirname(path), { recursive: true });
|
|
43
|
-
const verified = new Set(receipts.filter((receipt) => receipt.verified).map((receipt) => receipt.branch));
|
|
44
|
-
const status = verified.has("main") && verified.has("staging") ? "verified" : "partial";
|
|
45
|
-
writeFileSync(path, `${JSON.stringify({ schemaVersion: 1, kind: "treeseed.market-api-workspace", repository: plan.repository, status, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), receipts }, null, 2)}
|
|
46
|
-
`, "utf8");
|
|
47
|
-
}
|
|
48
|
-
function mergeReceipts(previous, current) {
|
|
49
|
-
const byBranch = new Map(previous.map((receipt) => [receipt.branch, receipt]));
|
|
50
|
-
for (const receipt of current) byBranch.set(receipt.branch, receipt);
|
|
51
|
-
return [...byBranch.values()].sort((left, right) => left.branch.localeCompare(right.branch));
|
|
52
|
-
}
|
|
53
|
-
function packageJson(sdkRef) {
|
|
54
|
-
return `${JSON.stringify({
|
|
55
|
-
name: "@treeseed/market-api",
|
|
56
|
-
version: "0.1.0",
|
|
57
|
-
private: true,
|
|
58
|
-
license: "UNLICENSED",
|
|
59
|
-
type: "module",
|
|
60
|
-
engines: { node: ">=22" },
|
|
61
|
-
workspaces: ["."],
|
|
62
|
-
scripts: { build: "tsc -p tsconfig.build.json", test: "vitest run tests", verify: "npm run build && npm test", start: "node dist/server.js" },
|
|
63
|
-
dependencies: { "@treeseed/sdk": `git+https://github.com/treeseed-ai/sdk.git#${sdkRef}` },
|
|
64
|
-
devDependencies: { "@types/node": "24.6.0", typescript: "5.9.3", vitest: "4.1.2" }
|
|
65
|
-
}, null, 2)}
|
|
66
|
-
`;
|
|
67
|
-
}
|
|
68
|
-
function siteManifest() {
|
|
69
|
-
return `name: TreeSeed Market API
|
|
70
|
-
slug: treeseed-market-api
|
|
71
|
-
siteUrl: https://api.treeseed.dev
|
|
72
|
-
contactEmail: hello@treeseed.email
|
|
73
|
-
authority:
|
|
74
|
-
kind: market-singleton
|
|
75
|
-
market:
|
|
76
|
-
profile: treeseed
|
|
77
|
-
controlPlane:
|
|
78
|
-
mode: market-passthrough
|
|
79
|
-
hosting:
|
|
80
|
-
kind: treeseed_control_plane
|
|
81
|
-
registration: none
|
|
82
|
-
teamId: treeseed
|
|
83
|
-
projectId: market-api
|
|
84
|
-
runtime:
|
|
85
|
-
mode: treeseed_managed
|
|
86
|
-
registration: none
|
|
87
|
-
providers:
|
|
88
|
-
deploy: railway
|
|
89
|
-
dns: cloudflare-dns
|
|
90
|
-
`;
|
|
91
|
-
}
|
|
92
|
-
function packageManifest() {
|
|
93
|
-
return `schemaVersion: treeseed.package/v1
|
|
94
|
-
id: "@treeseed/market-api"
|
|
95
|
-
name: TreeSeed Market API
|
|
96
|
-
kind: node-typescript
|
|
97
|
-
type: singleton-hosted-service
|
|
98
|
-
repository: treeseed-ai/market-api
|
|
99
|
-
capabilities: { save: true, verify: true, publish: false, deploy: false, localOnly: false }
|
|
100
|
-
workflowTemplateVersion: "1"
|
|
101
|
-
githubEnvironments:
|
|
102
|
-
- staging
|
|
103
|
-
- production
|
|
104
|
-
verify:
|
|
105
|
-
fast: npm run verify
|
|
106
|
-
local: npm run verify
|
|
107
|
-
release: npm run verify
|
|
108
|
-
releaseGate:
|
|
109
|
-
workflow: verify.yml
|
|
110
|
-
timeoutSeconds: 1800
|
|
111
|
-
projectArchitecture:
|
|
112
|
-
topology: split_site_content
|
|
113
|
-
rootPath: .
|
|
114
|
-
contentPath: src/content
|
|
115
|
-
contentRuntimeSource: r2_preview_overlay
|
|
116
|
-
localContentMaterialization: none
|
|
117
|
-
`;
|
|
118
|
-
}
|
|
119
|
-
function gatewaySource(descriptorDigest) {
|
|
120
|
-
return `import { createAdminPassthroughHandler, createGatewayHealthHandlers } from '@treeseed/sdk/market-gateway';
|
|
121
|
-
import descriptor from '../artifacts/admin-api-descriptor.json' with { type: 'json' };
|
|
122
|
-
|
|
123
|
-
export type MarketHandler = (request: Request) => Promise<Response> | Response;
|
|
124
|
-
export type DependencyChecks = Parameters<typeof createGatewayHealthHandlers>[0]['checks'];
|
|
125
|
-
|
|
126
|
-
export function createMarketGateway(options: { adminBaseUrl: string; checks: DependencyChecks; marketHandler?: MarketHandler; serviceAssertion?: (request: Request) => Promise<string | null> | string | null; fetchImpl?: typeof fetch }) {
|
|
127
|
-
const health = createGatewayHealthHandlers({ checks: options.checks });
|
|
128
|
-
const admin = createAdminPassthroughHandler({ adminBaseUrl: options.adminBaseUrl, adminRoutes: descriptor.routes, fetchImpl: options.fetchImpl, serviceAssertion: options.serviceAssertion });
|
|
129
|
-
return async (request: Request) => {
|
|
130
|
-
const path = new URL(request.url).pathname;
|
|
131
|
-
if (path === '/healthz') return health.process();
|
|
132
|
-
if (path === '/healthz/deep') return health.deep();
|
|
133
|
-
if (path === '/readyz') return health.ready();
|
|
134
|
-
if (path === '/v1/market/status') return Response.json({ ok: true, service: 'market-api', adminDescriptor: '${descriptorDigest}' });
|
|
135
|
-
if (path === '/v1/market/profile') return request.method === 'GET'
|
|
136
|
-
? Response.json({ ok: true, payload: { id: 'central', label: 'TreeSeed Central Market', baseUrl: 'https://api.treeseed.dev', kind: 'central', alwaysAvailable: true } })
|
|
137
|
-
: Response.json({ error: 'method-not-allowed' }, { status: 405, headers: { allow: 'GET' } });
|
|
138
|
-
if (path.startsWith('/v1/market/')) return options.marketHandler ? options.marketHandler(request) : Response.json({ error: 'market-route-not-found' }, { status: 404 });
|
|
139
|
-
if (path.startsWith('/v1/')) return admin(request);
|
|
140
|
-
return Response.json({ error: 'not-found' }, { status: 404 });
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
`;
|
|
144
|
-
}
|
|
145
|
-
function assertionSource() {
|
|
146
|
-
return `import { createHmac, randomUUID } from 'node:crypto';
|
|
147
|
-
|
|
148
|
-
const encode = (value: unknown) => Buffer.from(JSON.stringify(value)).toString('base64url');
|
|
149
|
-
|
|
150
|
-
export function createAudienceBoundAssertion(secret: string, audience: string, now = () => Date.now()) {
|
|
151
|
-
if (!secret) throw new Error('Market service assertion secret is required.');
|
|
152
|
-
return (request: Request) => {
|
|
153
|
-
const issuedAt = Math.floor(now() / 1000);
|
|
154
|
-
const requestId = request.headers.get('x-request-id') ?? randomUUID();
|
|
155
|
-
const header = encode({ alg: 'HS256', typ: 'JWT' });
|
|
156
|
-
const payload = encode({ aud: audience, iss: 'market-api', iat: issuedAt, exp: issuedAt + 30, method: request.method, path: new URL(request.url).pathname, requestId });
|
|
157
|
-
const signature = createHmac('sha256', secret).update(\`\${header}.\${payload}\`).digest('base64url');
|
|
158
|
-
return \`\${header}.\${payload}.\${signature}\`;
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
`;
|
|
162
|
-
}
|
|
163
|
-
function serverSource() {
|
|
164
|
-
return `import { createServer } from 'node:http';
|
|
165
|
-
import { Readable } from 'node:stream';
|
|
166
|
-
import { proxyNodeWebSocketUpgrade } from '@treeseed/sdk/market-gateway';
|
|
167
|
-
import descriptor from '../artifacts/admin-api-descriptor.json' with { type: 'json' };
|
|
168
|
-
import { createMarketGateway, type MarketHandler } from './gateway.js';
|
|
169
|
-
import { createAudienceBoundAssertion } from './service-assertion.js';
|
|
170
|
-
|
|
171
|
-
const adminBaseUrl = process.env.TREESEED_ADMIN_API_INTERNAL_URL ?? '';
|
|
172
|
-
if (!adminBaseUrl) throw new Error('TREESEED_ADMIN_API_INTERNAL_URL is required.');
|
|
173
|
-
const assertionSecret = process.env.TREESEED_MARKET_SERVICE_ASSERTION_SECRET ?? '';
|
|
174
|
-
const serviceAssertion = createAudienceBoundAssertion(assertionSecret, adminBaseUrl);
|
|
175
|
-
const checkUrl = async (url: string) => { try { return (await fetch(url, { signal: AbortSignal.timeout(3000) })).ok; } catch { return false; } };
|
|
176
|
-
const applicationModulePath = './market/app.js';
|
|
177
|
-
const application = await import(applicationModulePath) as { createMarketHandler: () => MarketHandler };
|
|
178
|
-
const gateway = createMarketGateway({
|
|
179
|
-
adminBaseUrl,
|
|
180
|
-
marketHandler: application.createMarketHandler(),
|
|
181
|
-
serviceAssertion,
|
|
182
|
-
checks: {
|
|
183
|
-
'market-database': async () => Boolean(process.env.TREESEED_MARKET_DATABASE_URL),
|
|
184
|
-
'admin-api': async () => checkUrl(\`\${adminBaseUrl.replace(/\\/$/u, '')}/healthz\`),
|
|
185
|
-
'internal-auth': async () => Boolean(assertionSecret),
|
|
186
|
-
'provider-bindings': async () => process.env.TREESEED_PROVIDER_BINDINGS_READY === 'true',
|
|
187
|
-
},
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
const server = createServer(async (incoming, outgoing) => {
|
|
191
|
-
const origin = \`http://\${incoming.headers.host ?? '127.0.0.1'}\`;
|
|
192
|
-
const body = incoming.method === 'GET' || incoming.method === 'HEAD' ? undefined : Readable.toWeb(incoming) as ReadableStream<Uint8Array>;
|
|
193
|
-
const response = await gateway(new Request(new URL(incoming.url ?? '/', origin), { method: incoming.method, headers: incoming.headers as HeadersInit, body, duplex: body ? 'half' : undefined } as RequestInit & { duplex?: 'half' }));
|
|
194
|
-
outgoing.statusCode = response.status;
|
|
195
|
-
for (const [name, value] of response.headers) if (name.toLowerCase() !== 'set-cookie') outgoing.setHeader(name, value);
|
|
196
|
-
const cookies = (response.headers as Headers & { getSetCookie?: () => string[] }).getSetCookie?.() ?? [];
|
|
197
|
-
if (cookies.length > 0) outgoing.setHeader('set-cookie', cookies);
|
|
198
|
-
if (!response.body) return outgoing.end();
|
|
199
|
-
Readable.fromWeb(response.body as never).pipe(outgoing);
|
|
200
|
-
});
|
|
201
|
-
server.on('upgrade', (incoming, socket, head) => {
|
|
202
|
-
void proxyNodeWebSocketUpgrade({ adminBaseUrl, adminRoutes: descriptor.routes, incoming, socket, head, serviceAssertion }).catch(() => socket.destroy());
|
|
203
|
-
});
|
|
204
|
-
server.listen(Number(process.env.PORT ?? 3000));
|
|
205
|
-
`;
|
|
206
|
-
}
|
|
207
|
-
function marketApplicationBootstrap() {
|
|
208
|
-
return `import type { MarketHandler } from '../gateway.js';
|
|
209
|
-
|
|
210
|
-
export function createMarketHandler(): MarketHandler {
|
|
211
|
-
return async () => Response.json({ error: 'market-route-not-implemented' }, { status: 501 });
|
|
212
|
-
}
|
|
213
|
-
`;
|
|
214
|
-
}
|
|
215
|
-
function gatewayTest() {
|
|
216
|
-
const sourceRoot = "../src";
|
|
217
|
-
return `import { describe, expect, it, vi } from 'vitest';
|
|
218
|
-
import descriptor from '../artifacts/admin-api-descriptor.json' with { type: 'json' };
|
|
219
|
-
import { createMarketGateway } from '${sourceRoot}/gateway.js';
|
|
220
|
-
import { createAudienceBoundAssertion } from '${sourceRoot}/service-assertion.js';
|
|
221
|
-
|
|
222
|
-
const checks = { 'market-database': async () => true, 'admin-api': async () => true, 'internal-auth': async () => true, 'provider-bindings': async () => true };
|
|
223
|
-
const concretePath = (path: string) => path.replace(/:[^/]+/gu, 'fixture');
|
|
224
|
-
|
|
225
|
-
describe('singleton Market gateway', () => {
|
|
226
|
-
it('owns Market routes and passes every declared Admin method and path through exactly', async () => {
|
|
227
|
-
const fetchImpl = vi.fn(async () => Response.json({ admin: true }, { status: 202 }));
|
|
228
|
-
const gateway = createMarketGateway({ adminBaseUrl: 'http://admin.internal', checks, fetchImpl });
|
|
229
|
-
expect((await gateway(new Request('https://api.treeseed.dev/v1/market/status'))).status).toBe(200);
|
|
230
|
-
for (const route of descriptor.routes) {
|
|
231
|
-
const response = await gateway(new Request(\`https://api.treeseed.dev\${concretePath(route.path)}?inventory=true\`, { method: route.method }));
|
|
232
|
-
expect(response.status, \`\${route.method} \${route.path}\`).toBe(202);
|
|
233
|
-
}
|
|
234
|
-
expect(fetchImpl).toHaveBeenCalledTimes(descriptor.routeCount);
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
it('rejects undeclared paths, method mismatches, and Admin shadowing of Market', async () => {
|
|
238
|
-
const fetchImpl = vi.fn(async () => Response.json({ admin: true }));
|
|
239
|
-
const gateway = createMarketGateway({ adminBaseUrl: 'http://admin.internal', checks, fetchImpl });
|
|
240
|
-
const route = descriptor.routes[0]!;
|
|
241
|
-
const methods = new Set(descriptor.routes.filter((candidate) => candidate.path === route.path).map((candidate) => candidate.method));
|
|
242
|
-
const mismatched = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'].find((method) => !methods.has(method))!;
|
|
243
|
-
expect((await gateway(new Request('https://api.treeseed.dev/v1/not-declared'))).status).toBe(404);
|
|
244
|
-
expect((await gateway(new Request(\`https://api.treeseed.dev\${concretePath(route.path)}\`, { method: mismatched }))).status).toBe(404);
|
|
245
|
-
expect((await gateway(new Request('https://api.treeseed.dev/v1/market/not-declared'))).status).toBe(404);
|
|
246
|
-
expect(fetchImpl).not.toHaveBeenCalled();
|
|
247
|
-
});
|
|
248
|
-
|
|
249
|
-
it('fails readiness when hosted Admin is unavailable while process health remains available', async () => {
|
|
250
|
-
const gateway = createMarketGateway({ adminBaseUrl: 'http://admin.internal', checks: { ...checks, 'admin-api': async () => false } });
|
|
251
|
-
expect((await gateway(new Request('https://api.treeseed.dev/healthz'))).status).toBe(200);
|
|
252
|
-
expect((await gateway(new Request('https://api.treeseed.dev/healthz/deep'))).status).toBe(503);
|
|
253
|
-
expect((await gateway(new Request('https://api.treeseed.dev/readyz'))).status).toBe(503);
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
it('creates short-lived audience-bound service assertions', () => {
|
|
257
|
-
const assertion = createAudienceBoundAssertion('secret', 'http://admin.internal', () => 1000)(new Request('https://api.treeseed.dev/v1/projects', { headers: { 'x-request-id': 'request-1' } }));
|
|
258
|
-
const payload = JSON.parse(Buffer.from(assertion.split('.')[1]!, 'base64url').toString());
|
|
259
|
-
expect(payload).toMatchObject({ aud: 'http://admin.internal', method: 'GET', path: '/v1/projects', requestId: 'request-1', exp: 31 });
|
|
260
|
-
});
|
|
261
|
-
});
|
|
262
|
-
`;
|
|
263
|
-
}
|
|
264
|
-
function profileTest() {
|
|
265
|
-
const sourceRoot = "../src";
|
|
266
|
-
return `import { describe, expect, it, vi } from 'vitest';
|
|
267
|
-
import { createMarketGateway } from '${sourceRoot}/gateway.js';
|
|
268
|
-
|
|
269
|
-
const checks = { 'market-database': async () => true, 'admin-api': async () => true, 'internal-auth': async () => true, 'provider-bindings': async () => true };
|
|
270
|
-
|
|
271
|
-
describe('singleton Market profile', () => {
|
|
272
|
-
it('owns the canonical profile route without contacting Admin', async () => {
|
|
273
|
-
const fetchImpl = vi.fn(async () => Response.json({ admin: true }));
|
|
274
|
-
const gateway = createMarketGateway({ adminBaseUrl: 'http://admin.internal', checks, fetchImpl });
|
|
275
|
-
const response = await gateway(new Request('https://api.treeseed.dev/v1/market/profile'));
|
|
276
|
-
expect(response.status).toBe(200);
|
|
277
|
-
expect(await response.json()).toEqual({ ok: true, payload: { id: 'central', label: 'TreeSeed Central Market', baseUrl: 'https://api.treeseed.dev', kind: 'central', alwaysAvailable: true } });
|
|
278
|
-
expect(fetchImpl).not.toHaveBeenCalled();
|
|
279
|
-
expect((await gateway(new Request('https://api.treeseed.dev/v1/market/profile', { method: 'POST' }))).status).toBe(405);
|
|
280
|
-
});
|
|
281
|
-
});
|
|
282
|
-
`;
|
|
283
|
-
}
|
|
284
|
-
function descriptorTest() {
|
|
285
|
-
return `import { createHash } from 'node:crypto';
|
|
286
|
-
import { readFileSync } from 'node:fs';
|
|
287
|
-
import { resolve } from 'node:path';
|
|
288
|
-
import { describe, expect, it } from 'vitest';
|
|
289
|
-
|
|
290
|
-
const descriptor = JSON.parse(readFileSync(resolve(import.meta.dirname, '../artifacts/admin-api-descriptor.json'), 'utf8'));
|
|
291
|
-
const deployment = JSON.parse(readFileSync(resolve(import.meta.dirname, '../singleton.manifest.json'), 'utf8'));
|
|
292
|
-
|
|
293
|
-
describe('Admin route descriptor pin', () => {
|
|
294
|
-
it('pins the exact Admin image ref and exposes a unique disjoint route union', () => {
|
|
295
|
-
expect(descriptor.sourceRef).toBe(deployment.adminApiRef);
|
|
296
|
-
expect(descriptor.routeCount).toBe(descriptor.routes.length);
|
|
297
|
-
expect(descriptor.routes.every((route: { path: string }) => !route.path.startsWith('/v1/market/'))).toBe(true);
|
|
298
|
-
expect(new Set(descriptor.routes.map((route: { method: string; path: string }) => \`\${route.method} \${route.path}\`)).size).toBe(descriptor.routeCount);
|
|
299
|
-
const digest = createHash('sha256').update(JSON.stringify(descriptor.routes)).digest('hex');
|
|
300
|
-
expect(\`sha256:\${digest}\`).toBe(descriptor.digest);
|
|
301
|
-
expect(descriptor.digest).toBe(deployment.adminDescriptorDigest);
|
|
302
|
-
});
|
|
303
|
-
});
|
|
304
|
-
`;
|
|
305
|
-
}
|
|
306
|
-
function workflow() {
|
|
307
|
-
return `name: Verify
|
|
308
|
-
|
|
309
|
-
on:
|
|
310
|
-
pull_request:
|
|
311
|
-
push:
|
|
312
|
-
branches: [main, staging]
|
|
313
|
-
workflow_dispatch:
|
|
314
|
-
|
|
315
|
-
permissions:
|
|
316
|
-
contents: read
|
|
317
|
-
|
|
318
|
-
concurrency:
|
|
319
|
-
group: verify-\${{ github.repository }}-\${{ github.ref }}
|
|
320
|
-
cancel-in-progress: true
|
|
321
|
-
|
|
322
|
-
jobs:
|
|
323
|
-
verify:
|
|
324
|
-
runs-on: ubuntu-latest
|
|
325
|
-
steps:
|
|
326
|
-
- uses: actions/checkout@v4
|
|
327
|
-
- uses: actions/setup-node@v4
|
|
328
|
-
with:
|
|
329
|
-
node-version: 24
|
|
330
|
-
- run: npm ci
|
|
331
|
-
- run: npm run verify
|
|
332
|
-
`;
|
|
333
|
-
}
|
|
334
|
-
const managedPaths = [
|
|
335
|
-
".github/workflows/verify.yml",
|
|
336
|
-
"LICENSE",
|
|
337
|
-
"README.md",
|
|
338
|
-
"artifacts/admin-api-descriptor.json",
|
|
339
|
-
"package.json",
|
|
340
|
-
"package-lock.json",
|
|
341
|
-
"singleton.manifest.json",
|
|
342
|
-
"src/gateway.ts",
|
|
343
|
-
"src/server.ts",
|
|
344
|
-
"src/service-assertion.ts",
|
|
345
|
-
"tests/descriptor.test.ts",
|
|
346
|
-
"tests/gateway.test.ts",
|
|
347
|
-
"tests/profile.test.ts",
|
|
348
|
-
"treeseed.package.yaml",
|
|
349
|
-
"treeseed.site.yaml",
|
|
350
|
-
"tsconfig.build.json",
|
|
351
|
-
"tsconfig.json"
|
|
352
|
-
].sort();
|
|
353
|
-
function marketApiWorkspaceFiles(projectRoot, sdkRef, adminApiRef, packageLock) {
|
|
354
|
-
const descriptor = JSON.parse(readFileSync(resolve(projectRoot, "packages/api/dist/admin-api-descriptor.json"), "utf8"));
|
|
355
|
-
descriptor.sourceRef = adminApiRef;
|
|
356
|
-
const descriptorContent = `${JSON.stringify(descriptor, null, 2)}
|
|
357
|
-
`;
|
|
358
|
-
return {
|
|
359
|
-
descriptorDigest: descriptor.digest,
|
|
360
|
-
bootstrapFiles: [["src/market/app.ts", marketApplicationBootstrap()]],
|
|
361
|
-
files: [
|
|
362
|
-
["package.json", packageJson(sdkRef)],
|
|
363
|
-
["treeseed.package.yaml", packageManifest()],
|
|
364
|
-
["treeseed.site.yaml", siteManifest()],
|
|
365
|
-
...packageLock ? [["package-lock.json", packageLock]] : [],
|
|
366
|
-
["tsconfig.json", `${JSON.stringify({ compilerOptions: { target: "ES2023", module: "NodeNext", moduleResolution: "NodeNext", resolveJsonModule: true, noEmit: true, strict: true, skipLibCheck: true, lib: ["ES2023", "DOM", "DOM.Iterable"] }, include: ["src/**/*.ts", "tests/**/*.ts"] }, null, 2)}
|
|
367
|
-
`],
|
|
368
|
-
["tsconfig.build.json", `${JSON.stringify({ extends: "./tsconfig.json", compilerOptions: { noEmit: false, outDir: "dist", rootDir: "src" }, include: ["src/**/*.ts"], exclude: ["tests/**/*.ts"] }, null, 2)}
|
|
369
|
-
`],
|
|
370
|
-
["LICENSE", "UNLICENSED\n\nCopyright (c) TreeSeed. All rights reserved. No license is granted.\n"],
|
|
371
|
-
["README.md", "# TreeSeed Market API\n\nPrivate singleton Market implementation and hosted Admin API gateway for `api.treeseed.dev`. This repository is never provisioned by Platform. Hosted deployment remains suspended.\n"],
|
|
372
|
-
["src/gateway.ts", gatewaySource(descriptor.digest)],
|
|
373
|
-
["src/service-assertion.ts", assertionSource()],
|
|
374
|
-
["src/server.ts", serverSource()],
|
|
375
|
-
["tests/gateway.test.ts", gatewayTest()],
|
|
376
|
-
["tests/profile.test.ts", profileTest()],
|
|
377
|
-
["tests/descriptor.test.ts", descriptorTest()],
|
|
378
|
-
["artifacts/admin-api-descriptor.json", descriptorContent],
|
|
379
|
-
["singleton.manifest.json", `${JSON.stringify({ schemaVersion: 3, authority: "market-singleton", sdkRef, adminApiRef, adminDescriptorDigest: descriptor.digest, deployment: "suspended", managedPaths }, null, 2)}
|
|
380
|
-
`],
|
|
381
|
-
[".github/workflows/verify.yml", workflow()]
|
|
382
|
-
]
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
function workspaceFilesDigest(entries) {
|
|
386
|
-
const hash = createHash("sha256");
|
|
387
|
-
for (const [path, content] of entries) hash.update(path).update("\0").update(content).update("\0");
|
|
388
|
-
return `sha256:${hash.digest("hex")}`;
|
|
389
|
-
}
|
|
390
|
-
function workspaceDigest(projectRoot, sdkRef, adminApiRef) {
|
|
391
|
-
return workspaceFilesDigest(marketApiWorkspaceFiles(projectRoot, sdkRef, adminApiRef).files);
|
|
392
|
-
}
|
|
393
|
-
async function recoverGeneratedReceipt(projectRoot, repository, branch, commit, gitEnv) {
|
|
394
|
-
const temporary = mkdtempSync(resolve(tmpdir(), "trsd-market-api-observe-"));
|
|
395
|
-
try {
|
|
396
|
-
await git(temporary, ["init", "--quiet"]);
|
|
397
|
-
await git(temporary, ["fetch", "--quiet", "--no-tags", `https://github.com/${repository}.git`, commit], { env: gitEnv });
|
|
398
|
-
const manifestResult = await git(temporary, ["show", `${commit}:singleton.manifest.json`], { allowFailure: true });
|
|
399
|
-
if (manifestResult.code !== 0) return null;
|
|
400
|
-
const manifest = JSON.parse(manifestResult.stdout);
|
|
401
|
-
if (manifest.authority !== "market-singleton" || manifest.deployment !== "suspended") return null;
|
|
402
|
-
if (typeof manifest.sdkRef !== "string" || !/^[a-f0-9]{40}$/u.test(manifest.sdkRef)) return null;
|
|
403
|
-
if (typeof manifest.adminApiRef !== "string" || !/^[a-f0-9]{40}$/u.test(manifest.adminApiRef)) return null;
|
|
404
|
-
const packageResult = await git(temporary, ["show", `${commit}:package.json`], { allowFailure: true });
|
|
405
|
-
const lockResult = await git(temporary, ["show", `${commit}:package-lock.json`], { allowFailure: true });
|
|
406
|
-
if (packageResult.code !== 0 || lockResult.code !== 0) return null;
|
|
407
|
-
try {
|
|
408
|
-
assertMarketApiPackageLock(lockResult.stdout, packageResult.stdout, manifest.sdkRef);
|
|
409
|
-
} catch {
|
|
410
|
-
return null;
|
|
411
|
-
}
|
|
412
|
-
const expected = marketApiWorkspaceFiles(projectRoot, manifest.sdkRef, manifest.adminApiRef, `${lockResult.stdout}
|
|
413
|
-
`).files;
|
|
414
|
-
const legacySourceRoot = ["..", "src"].join("/");
|
|
415
|
-
const historicalSourceExtension = [".", "ts"].join("");
|
|
416
|
-
const legacyExpected = expected.map(([path, content]) => [path, path === "tests/gateway.test.ts" ? content.replace(`${legacySourceRoot}/gateway.js`, `${legacySourceRoot}/gateway${historicalSourceExtension}`).replace(`${legacySourceRoot}/service-assertion.js`, `${legacySourceRoot}/service-assertion${historicalSourceExtension}`) : content]);
|
|
417
|
-
const observedPaths = (await git(temporary, ["ls-tree", "-r", "--name-only", commit])).stdout.split("\n").filter(Boolean).sort();
|
|
418
|
-
const observedFiles = /* @__PURE__ */ new Map();
|
|
419
|
-
for (const path of managedWorkspacePaths(expected)) {
|
|
420
|
-
const observed = await git(temporary, ["show", `${commit}:${path}`], { allowFailure: true });
|
|
421
|
-
if (observed.code !== 0) return null;
|
|
422
|
-
observedFiles.set(path, observed.stdout);
|
|
423
|
-
}
|
|
424
|
-
const declaredManagedPaths = Array.isArray(manifest.managedPaths) && manifest.managedPaths.every((path) => typeof path === "string") ? manifest.managedPaths : null;
|
|
425
|
-
const matched = [expected, legacyExpected].find((candidate) => managedWorkspaceMatches({
|
|
426
|
-
expected: candidate,
|
|
427
|
-
observed: observedFiles,
|
|
428
|
-
declaredManagedPaths,
|
|
429
|
-
legacyObservedPaths: observedPaths
|
|
430
|
-
}));
|
|
431
|
-
if (!matched) return null;
|
|
432
|
-
return { branch, targetCommit: commit, sdkRef: manifest.sdkRef, adminApiRef: manifest.adminApiRef, workspaceDigest: workspaceDigest(projectRoot, manifest.sdkRef, manifest.adminApiRef), verified: true };
|
|
433
|
-
} finally {
|
|
434
|
-
rmSync(temporary, { recursive: true, force: true });
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
async function planMarketApiWorkspace(input) {
|
|
438
|
-
const marketApi = project(input.manifest, "market-api");
|
|
439
|
-
const repository = `${marketApi.repository.owner}/${marketApi.repository.name}`;
|
|
440
|
-
const credential = migrationCredential(input.projectRoot, repository, input.env);
|
|
441
|
-
if (!credential.token) throw new Error(`Central GitHub credential ${credential.envName} is required for ${repository}.`);
|
|
442
|
-
const gitEnv = credentialEnvironment(credential.token);
|
|
443
|
-
const sdkRef = exactRef(input.sdkRef, "SDK ref");
|
|
444
|
-
const adminApiRef = exactRef(input.adminApiRef, "Admin API ref");
|
|
445
|
-
const observedSdk = await remoteHead(input.projectRoot, "treeseed-ai/sdk", input.targetBranch, gitEnv);
|
|
446
|
-
const observedAdminApi = await remoteHead(input.projectRoot, "treeseed-ai/api", input.targetBranch, gitEnv);
|
|
447
|
-
if (observedSdk !== sdkRef || observedAdminApi !== adminApiRef) throw new Error(`Requested dependency refs do not match live ${input.targetBranch}: SDK ${observedSdk ?? "missing"}, Admin API ${observedAdminApi ?? "missing"}.`);
|
|
448
|
-
await assertLocalGeneratedDescriptor(input.projectRoot, adminApiRef);
|
|
449
|
-
const descriptorDigest = marketApiWorkspaceFiles(input.projectRoot, sdkRef, adminApiRef).descriptorDigest;
|
|
450
|
-
const desiredWorkspaceDigest = workspaceDigest(input.projectRoot, sdkRef, adminApiRef);
|
|
451
|
-
const recorded = journal(input.projectRoot, repository);
|
|
452
|
-
const branches = [];
|
|
453
|
-
for (const branch of [input.targetBranch]) {
|
|
454
|
-
const targetCommit = await remoteHead(input.projectRoot, repository, branch, gitEnv);
|
|
455
|
-
const receipt = recorded?.receipts?.find((entry) => entry.branch === branch) ?? (targetCommit ? await recoverGeneratedReceipt(input.projectRoot, repository, branch, targetCommit, gitEnv) : null);
|
|
456
|
-
const owned = Boolean(targetCommit && receipt?.verified && receipt.targetCommit === targetCommit);
|
|
457
|
-
const verified = Boolean(owned && receipt?.sdkRef === sdkRef && receipt?.adminApiRef === adminApiRef && receipt?.workspaceDigest === desiredWorkspaceDigest);
|
|
458
|
-
branches.push({ branch, targetCommit, action: verified ? "noop" : owned ? "update" : targetCommit ? "blocked" : "create", reason: verified ? "Live branch matches the verified singleton workspace receipt." : owned ? "Fast-forward the reconciler-owned singleton workspace." : targetCommit ? "Target branch has unrecognized history." : "Create the private singleton gateway workspace." });
|
|
459
|
-
}
|
|
460
|
-
return { repository, sdkRef, adminApiRef, descriptorDigest, branches };
|
|
461
|
-
}
|
|
462
|
-
async function buildCommit(projectRoot, branch, plan, parent, gitEnv, packageLock) {
|
|
463
|
-
const temporary = mkdtempSync(resolve(tmpdir(), "trsd-market-api-"));
|
|
464
|
-
const indexPath = resolve(temporary, "index");
|
|
465
|
-
const indexEnv = { ...process.env, GIT_INDEX_FILE: indexPath };
|
|
466
|
-
try {
|
|
467
|
-
await git(temporary, ["init", "--quiet"]);
|
|
468
|
-
if (parent) await git(temporary, ["fetch", "--quiet", "--no-tags", `https://github.com/${plan.repository}.git`, parent], { env: gitEnv });
|
|
469
|
-
await git(temporary, ["read-tree", ...parent ? [parent] : ["--empty"]], { env: indexEnv });
|
|
470
|
-
const desiredWorkspace = marketApiWorkspaceFiles(projectRoot, plan.sdkRef, plan.adminApiRef, packageLock);
|
|
471
|
-
const desiredFiles = desiredWorkspace.files;
|
|
472
|
-
const existingPaths = parent ? (await git(temporary, ["ls-tree", "-r", "--name-only", parent])).stdout.split("\n").filter(Boolean) : [];
|
|
473
|
-
let previousManagedPaths = [];
|
|
474
|
-
if (parent) {
|
|
475
|
-
const previousManifest = await git(temporary, ["show", `${parent}:singleton.manifest.json`], { allowFailure: true });
|
|
476
|
-
if (previousManifest.code === 0) {
|
|
477
|
-
try {
|
|
478
|
-
const parsed = JSON.parse(previousManifest.stdout);
|
|
479
|
-
if (Array.isArray(parsed.managedPaths) && parsed.managedPaths.every((path) => typeof path === "string")) previousManagedPaths = parsed.managedPaths;
|
|
480
|
-
} catch {
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
for (const path of staleManagedWorkspacePaths(previousManagedPaths, managedWorkspacePaths(desiredFiles))) {
|
|
485
|
-
await git(temporary, ["update-index", "--force-remove", path], { env: indexEnv });
|
|
486
|
-
}
|
|
487
|
-
for (const [path, content] of desiredFiles) {
|
|
488
|
-
const blob = (await git(temporary, ["hash-object", "-w", "--stdin"], { input: content })).stdout;
|
|
489
|
-
await git(temporary, ["update-index", "--add", "--cacheinfo", "100644", blob, path], { env: indexEnv });
|
|
490
|
-
}
|
|
491
|
-
for (const [path, content] of missingApplicationBootstrapFiles(existingPaths, desiredWorkspace.bootstrapFiles)) {
|
|
492
|
-
const blob = (await git(temporary, ["hash-object", "-w", "--stdin"], { input: content })).stdout;
|
|
493
|
-
await git(temporary, ["update-index", "--add", "--cacheinfo", "100644", blob, path], { env: indexEnv });
|
|
494
|
-
}
|
|
495
|
-
const tree = (await git(temporary, ["write-tree"], { env: indexEnv })).stdout;
|
|
496
|
-
const commit = (await git(temporary, ["commit-tree", tree, ...parent ? ["-p", parent] : [], "-m", `${parent ? "Reconcile" : "Create"} Market API ${branch} gateway workspace`], { env: { ...process.env, GIT_AUTHOR_NAME: "TreeSeed migration", GIT_AUTHOR_EMAIL: "operations@treeseed.dev", GIT_COMMITTER_NAME: "TreeSeed migration", GIT_COMMITTER_EMAIL: "operations@treeseed.dev" } })).stdout;
|
|
497
|
-
await git(temporary, ["push", `https://github.com/${plan.repository}.git`, `${commit}:refs/heads/${branch}`], { env: gitEnv });
|
|
498
|
-
return commit;
|
|
499
|
-
} finally {
|
|
500
|
-
rmSync(temporary, { recursive: true, force: true });
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
async function applyMarketApiWorkspace(input) {
|
|
504
|
-
const plan = await planMarketApiWorkspace(input);
|
|
505
|
-
if (plan.branches.some((branch) => branch.action === "blocked")) throw new Error("Market API target contains unrecognized history.");
|
|
506
|
-
const credential = migrationCredential(input.projectRoot, plan.repository, input.env);
|
|
507
|
-
const gitEnv = credentialEnvironment(credential.token);
|
|
508
|
-
const previousReceipts = journal(input.projectRoot, plan.repository)?.receipts ?? [];
|
|
509
|
-
const receipts = [];
|
|
510
|
-
const packageLock = plan.branches.some((branch) => branch.action === "create" || branch.action === "update") ? generateMarketApiPackageLock(packageJson(plan.sdkRef), plan.sdkRef) : null;
|
|
511
|
-
for (const branch of plan.branches) {
|
|
512
|
-
let targetCommit = branch.targetCommit;
|
|
513
|
-
if (branch.action === "create" || branch.action === "update") {
|
|
514
|
-
if (!packageLock) throw new Error("Market API package lock generation was not completed.");
|
|
515
|
-
targetCommit = await buildCommit(input.projectRoot, branch.branch, plan, branch.targetCommit, gitEnv, packageLock);
|
|
516
|
-
}
|
|
517
|
-
const observed = await remoteHead(input.projectRoot, plan.repository, branch.branch, gitEnv);
|
|
518
|
-
if (!targetCommit || observed !== targetCommit) throw new Error(`Fresh GitHub read-back returned ${observed ?? "missing"}, expected ${targetCommit ?? "missing"}.`);
|
|
519
|
-
receipts.push({ branch: branch.branch, targetCommit, sdkRef: plan.sdkRef, adminApiRef: plan.adminApiRef, workspaceDigest: workspaceDigest(input.projectRoot, plan.sdkRef, plan.adminApiRef), verified: true });
|
|
520
|
-
writeJournal(input.projectRoot, plan, mergeReceipts(previousReceipts, receipts));
|
|
521
|
-
}
|
|
522
|
-
return { ...plan, status: "verified", receipts, journalPath: journalPath(input.projectRoot, plan.repository) };
|
|
523
|
-
}
|
|
524
|
-
export {
|
|
525
|
-
applyMarketApiWorkspace,
|
|
526
|
-
marketApiWorkspaceFiles,
|
|
527
|
-
planMarketApiWorkspace
|
|
528
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|