deepline 0.3.88 → 0.3.90
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/contracts/install-commands.json +29 -0
- package/dist/bundling-sources/sdk/src/client.ts +652 -39
- package/dist/bundling-sources/sdk/src/config.ts +77 -0
- package/dist/bundling-sources/sdk/src/http.ts +76 -30
- package/dist/bundling-sources/sdk/src/index.ts +10 -0
- package/dist/bundling-sources/sdk/src/monitor-fleet-contract.ts +1 -1
- package/dist/bundling-sources/sdk/src/pagination.ts +25 -0
- package/dist/bundling-sources/sdk/src/play.ts +15 -1
- package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +3 -3
- package/dist/bundling-sources/sdk/src/release.ts +16 -9
- package/dist/bundling-sources/sdk/src/types.ts +106 -4
- package/dist/bundling-sources/shared_libs/integration-contracts/AGENTS.md +9 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/README.md +3 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/index.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/analytics-install-guides.ts +77 -0
- package/dist/bundling-sources/shared_libs/monitors/analytics-public.ts +10 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/charges.ts +125 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +686 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +54 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/public-pricing.ts +72 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/session.ts +45 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/state.ts +454 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/tamradar.ts +260 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +215 -0
- package/dist/bundling-sources/shared_libs/monitors/callback-security.ts +333 -0
- package/dist/bundling-sources/shared_libs/monitors/cursor-page.ts +42 -0
- package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +16 -0
- package/dist/bundling-sources/shared_libs/monitors/framework-managed-payload-fields.ts +71 -0
- package/dist/bundling-sources/shared_libs/monitors/generated/provider-monitor-callback-admission-targets.ts +16 -0
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +270 -0
- package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +39 -0
- package/dist/bundling-sources/shared_libs/monitors/inbound-queue.ts +82 -0
- package/dist/bundling-sources/shared_libs/monitors/inventory-reconciliation.ts +59 -0
- package/dist/bundling-sources/shared_libs/monitors/lifecycle-notifications.ts +471 -0
- package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/package.json +36 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +1125 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +305 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +964 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-consumer-health.ts +56 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +131 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +535 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-legacy-aliases.ts +16 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-priority-execution.ts +56 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-public-aliases.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-runtime-read-eligibility.ts +38 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +122 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-status.ts +10 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +112 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-webhook-monitor-runtime.ts +300 -0
- package/dist/bundling-sources/shared_libs/monitors/quickstart-prompts.ts +22 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +245 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-message.ts +38 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue-ack-probe.ts +94 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue-delivery.ts +60 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue.ts +60 -0
- package/dist/bundling-sources/shared_libs/monitors/snitcher-install-validation.ts +93 -0
- package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +332 -0
- package/dist/bundling-sources/shared_libs/monitors/snitcher-radar.ts +221 -0
- package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +105 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +73 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +81 -0
- package/dist/bundling-sources/shared_libs/monitors/tsconfig.json +10 -0
- package/dist/bundling-sources/shared_libs/observability/build-context.ts +13 -0
- package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +160 -0
- package/dist/bundling-sources/shared_libs/observability/request-context.ts +68 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +654 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +35 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-work.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/neon-constants.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +272 -0
- package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +6 -11
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +135 -12
- package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +66 -1
- package/dist/bundling-sources/shared_libs/play-runtime/async-play-invocation.ts +77 -0
- package/dist/bundling-sources/shared_libs/play-runtime/bounceban-batching.ts +137 -0
- package/dist/bundling-sources/shared_libs/play-runtime/checkpoint-boundaries.ts +70 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +1159 -166
- package/dist/bundling-sources/shared_libs/play-runtime/coordinator-headers.ts +1 -32
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +103 -0
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-payload-contract.ts +68 -0
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-janitor.ts +103 -0
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-reaper.ts +725 -0
- package/dist/bundling-sources/shared_libs/play-runtime/default-batch-strategies.ts +20 -1
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execution-gateway-invocation-fence.ts +442 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execution-protocol.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/contracts.ts +66 -0
- package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/job.ts +145 -0
- package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/ports.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/postgres-store.ts +170 -0
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +1322 -0
- package/dist/bundling-sources/shared_libs/play-runtime/internal-step-ids.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/lane-retirement-gate.ts +189 -0
- package/dist/bundling-sources/shared_libs/play-runtime/launch-source-policy.ts +112 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/perf-trace.ts +127 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-artifact-runtime-contract.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +24 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/contracts.ts +56 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/index.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/job.ts +41 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/ports.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/postgres-adapter.ts +54 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/contracts.ts +114 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/engine-suspension.ts +108 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/index.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/job.ts +97 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/ports.ts +104 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/postgres-fence-adapter.ts +263 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/worker-terminal-projection.ts +64 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/contracts.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/gateway-adapter.ts +56 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/index.ts +15 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/job.ts +65 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/ports.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/contracts.ts +42 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/index.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +142 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/ports.ts +42 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/postgres-adapter.ts +102 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/contracts.ts +60 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/index.ts +16 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/job.ts +78 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/ports.ts +54 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/postgres-adapter.ts +71 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-batching-registry.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +28 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/receipt-status.ts +5 -8
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +23 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +168 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +90 -13
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +6 -12
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-start-admission.ts +68 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/bundle.ts +0 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +14 -43
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +67 -213
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +201 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-capacity-policy.ts +20 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-contract.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-env.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +67 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-release-environment.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-contract.ts +68 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +38 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-telemetry.ts +108 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +37 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-deadline-reconciliation.ts +88 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-play-deploy-task.ts +124 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-play-run-task.ts +68 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +193 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-queue-lifecycle.ts +269 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-queue-suffix.ts +73 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +6642 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +897 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-metrics.ts +120 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-required-env.ts +76 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +476 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/gateway-heavy-request-admission.ts +47 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/gateway-progress-registry.ts +147 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/index.ts +27 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/lazy.ts +50 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +98 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-budget-state.ts +260 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +1416 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +1255 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +942 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +14636 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/receipt-gateway.ts +888 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +355 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-terminal-transition.ts +46 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runner-push.ts +60 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +33 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-gateway-health.ts +64 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +835 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +1218 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-operation.ts +207 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-scheduler-schema.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/scheduler-capacity.ts +123 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/scheduler-launch-read-observability.ts +78 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/submit-admission.ts +169 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/terminal-contract.ts +20 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/worker-queue-metrics.ts +34 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/worker-resource-metrics.ts +249 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sheet-attempt-sql.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/step-progress.ts +296 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/native-batch.ts +3 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/runtime-step-receipts-adapter.ts +20 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +60 -15
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execution-outcome.ts +20 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/vercel-protection.ts +14 -1
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +165 -0
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipts.ts +15 -23
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +169 -0
- package/dist/bundling-sources/shared_libs/play-runtime/zerobounce-batching.ts +122 -0
- package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +8 -3
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +454 -17
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +19 -4
- package/dist/bundling-sources/shared_libs/plays/contracts.ts +8 -14
- package/dist/bundling-sources/shared_libs/plays/core.ts +11 -6
- package/dist/bundling-sources/shared_libs/plays/deployment-status.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/docflow-binding-owner.ts +16 -11
- package/dist/bundling-sources/shared_libs/plays/docflow.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/email-status.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/play-grep-search.ts +39 -0
- package/dist/bundling-sources/shared_libs/plays/resolve-static-pipeline.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/share/copy.ts +271 -0
- package/dist/bundling-sources/shared_libs/plays/share/metrics.ts +140 -0
- package/dist/bundling-sources/shared_libs/plays/share/public-read-model.ts +86 -0
- package/dist/bundling-sources/shared_libs/plays/share/seo-quality.ts +181 -0
- package/dist/bundling-sources/shared_libs/plays/share/static-pipeline-summary.ts +658 -0
- package/dist/bundling-sources/shared_libs/plays/share/types.ts +197 -0
- package/dist/bundling-sources/shared_libs/plays/slack-hitl-timeout-error.ts +37 -0
- package/dist/bundling-sources/shared_libs/plays/slug.ts +115 -0
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +50 -15
- package/dist/bundling-sources/shared_libs/plays/tool-category-descriptions.ts +2 -2
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +877 -0
- package/dist/bundling-sources/shared_libs/product-notifications/configuration-draft.ts +456 -0
- package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +566 -0
- package/dist/bundling-sources/shared_libs/product-notifications/content.ts +28 -0
- package/dist/bundling-sources/shared_libs/product-notifications/default-policy.ts +60 -0
- package/dist/bundling-sources/shared_libs/product-notifications/email.ts +246 -0
- package/dist/bundling-sources/shared_libs/product-notifications/evaluation.ts +280 -0
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +433 -0
- package/dist/bundling-sources/shared_libs/product-notifications/legacy-slack.ts +80 -0
- package/dist/bundling-sources/shared_libs/product-notifications/overflow.ts +18 -0
- package/dist/bundling-sources/shared_libs/product-notifications/rolling-limit.ts +24 -0
- package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +624 -0
- package/dist/bundling-sources/shared_libs/product-notifications/slack-payload.ts +140 -0
- package/dist/bundling-sources/shared_libs/product-notifications/slack-transport.ts +75 -0
- package/dist/bundling-sources/shared_libs/product-notifications/workspace.ts +38 -0
- package/dist/bundling-sources/shared_libs/runtime-env.ts +12 -0
- package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +42 -0
- package/dist/bundling-sources/shared_libs/security/header-safe-env.ts +35 -0
- package/dist/bundling-sources/shared_libs/security/internal-actor.ts +50 -0
- package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +267 -0
- package/dist/bundling-sources/shared_libs/security/slack-sanitize.ts +133 -0
- package/dist/cli/getting-started.d.mts +52 -0
- package/dist/cli/getting-started.d.ts +52 -0
- package/dist/cli/getting-started.js +65 -0
- package/dist/cli/getting-started.mjs +36 -0
- package/dist/cli/index.d.mts +9 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.js +1611 -453
- package/dist/cli/index.mjs +1596 -447
- package/dist/{compiler-manifest-Dbov16F7.d.mts → compiler-manifest-BaJfE-5H.d.mts} +136 -10
- package/dist/{compiler-manifest-Dbov16F7.d.ts → compiler-manifest-BaJfE-5H.d.ts} +136 -10
- package/dist/index.d.mts +910 -155
- package/dist/index.d.ts +910 -155
- package/dist/index.js +550 -64
- package/dist/index.mjs +550 -64
- package/dist/install-integrity.json +193 -4
- package/dist/monitor-fleet-contract.d.mts +138 -0
- package/dist/monitor-fleet-contract.d.ts +138 -0
- package/dist/monitor-fleet-contract.js +404 -0
- package/dist/monitor-fleet-contract.mjs +367 -0
- package/dist/plays/bundle-play-file.d.mts +8 -3
- package/dist/plays/bundle-play-file.d.ts +8 -3
- package/dist/plays/bundle-play-file.mjs +100 -20
- package/dist/release.d.mts +255 -0
- package/dist/release.d.ts +255 -0
- package/dist/release.js +215 -0
- package/dist/release.mjs +188 -0
- package/package.json +23 -4
- /package/dist/bundling-sources/shared_libs/{integrations/bettercontact-execution-policy.ts → integration-contracts/bettercontact/execution-policy.ts} +0 -0
- /package/dist/bundling-sources/shared_libs/{integrations/theirstack-execution-policy.ts → integration-contracts/theirstack/execution-policy.ts} +0 -0
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared, provider-agnostic vocabulary for a durable monitor operation.
|
|
3
|
+
*
|
|
4
|
+
* A batch operation is deliberately a small control document. It names a
|
|
5
|
+
* stable scope and a retry key; monitor definitions remain the source of
|
|
6
|
+
* truth for every individual item and the retained operation evidence is only
|
|
7
|
+
* a log of what the runner observed or did. Keeping this vocabulary pure
|
|
8
|
+
* makes CLI/API parsing, Convex admission and the background runner agree on
|
|
9
|
+
* the exact same request identity.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { requireMonitorDeactivationReason } from './deactivation-reasons';
|
|
13
|
+
|
|
14
|
+
export const PROVIDER_MONITOR_BATCH_OPERATION_KINDS = [
|
|
15
|
+
'deploy',
|
|
16
|
+
'deactivate',
|
|
17
|
+
'reactivate',
|
|
18
|
+
'audit',
|
|
19
|
+
'repair',
|
|
20
|
+
] as const;
|
|
21
|
+
|
|
22
|
+
export type ProviderMonitorBatchOperationKind =
|
|
23
|
+
(typeof PROVIDER_MONITOR_BATCH_OPERATION_KINDS)[number];
|
|
24
|
+
|
|
25
|
+
export const PROVIDER_MONITOR_BATCH_TARGETS = [
|
|
26
|
+
'all',
|
|
27
|
+
'all-active',
|
|
28
|
+
'billing-suspended',
|
|
29
|
+
'needs-repair',
|
|
30
|
+
] as const;
|
|
31
|
+
|
|
32
|
+
export type ProviderMonitorBatchTarget =
|
|
33
|
+
(typeof PROVIDER_MONITOR_BATCH_TARGETS)[number];
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* A manifest lives in durable blob storage. The runner reads it in bounded
|
|
37
|
+
* pages; never embed its definitions or a growing result array in a run
|
|
38
|
+
* record. `count` is declared at upload time and is used for honest progress
|
|
39
|
+
* before the first item has been processed.
|
|
40
|
+
*/
|
|
41
|
+
export type ProviderMonitorBatchManifestScope = {
|
|
42
|
+
kind: 'manifest';
|
|
43
|
+
storageId: string;
|
|
44
|
+
count: number;
|
|
45
|
+
/** Content address used for idempotent retries; storage ids are ephemeral. */
|
|
46
|
+
sha256?: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type ProviderMonitorBatchScope =
|
|
50
|
+
| { kind: 'keys'; monitorKeys: readonly string[] }
|
|
51
|
+
| { kind: 'target'; target: ProviderMonitorBatchTarget }
|
|
52
|
+
| { kind: 'fleet'; fleetId: string }
|
|
53
|
+
| ProviderMonitorBatchManifestScope;
|
|
54
|
+
|
|
55
|
+
export type ProviderMonitorBatchOperationRequest = {
|
|
56
|
+
kind: ProviderMonitorBatchOperationKind;
|
|
57
|
+
scope: ProviderMonitorBatchScope;
|
|
58
|
+
dryRun: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* The application deployment that accepted this operation. A provider
|
|
61
|
+
* callback is part of the create side effect, so a continuation must retain
|
|
62
|
+
* this origin instead of recomputing it from a later deployment.
|
|
63
|
+
*/
|
|
64
|
+
callbackBaseUrl?: string;
|
|
65
|
+
/** Required for deactivate; absent for every other operation. */
|
|
66
|
+
deactivationReason?: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export type ProviderMonitorBatchOperationState =
|
|
70
|
+
| 'running'
|
|
71
|
+
| 'retry_scheduled'
|
|
72
|
+
| 'completed'
|
|
73
|
+
| 'failed';
|
|
74
|
+
|
|
75
|
+
const IDEMPOTENCY_KEY = /^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$/;
|
|
76
|
+
|
|
77
|
+
function canonicalJson(value: unknown): string {
|
|
78
|
+
if (Array.isArray(value)) return `[${value.map(canonicalJson).join(',')}]`;
|
|
79
|
+
if (value && typeof value === 'object') {
|
|
80
|
+
return `{${Object.entries(value as Record<string, unknown>)
|
|
81
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
82
|
+
.map(([key, child]) => `${JSON.stringify(key)}:${canonicalJson(child)}`)
|
|
83
|
+
.join(',')}}`;
|
|
84
|
+
}
|
|
85
|
+
return JSON.stringify(value);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function normalizeCallbackBaseUrl(
|
|
89
|
+
value: string | undefined,
|
|
90
|
+
): string | undefined {
|
|
91
|
+
if (value === undefined) return undefined;
|
|
92
|
+
let parsed: URL;
|
|
93
|
+
try {
|
|
94
|
+
parsed = new URL(value);
|
|
95
|
+
} catch {
|
|
96
|
+
throw new Error('callbackBaseUrl must be an absolute HTTP(S) origin.');
|
|
97
|
+
}
|
|
98
|
+
if (
|
|
99
|
+
(parsed.protocol !== 'http:' && parsed.protocol !== 'https:') ||
|
|
100
|
+
parsed.username ||
|
|
101
|
+
parsed.password ||
|
|
102
|
+
parsed.search ||
|
|
103
|
+
parsed.hash ||
|
|
104
|
+
(parsed.pathname !== '' && parsed.pathname !== '/')
|
|
105
|
+
) {
|
|
106
|
+
throw new Error('callbackBaseUrl must be an absolute HTTP(S) origin.');
|
|
107
|
+
}
|
|
108
|
+
return parsed.origin;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* A job id is deterministic on purpose. Convex's existing `by_run` point
|
|
113
|
+
* lookup is then the idempotency index: the same org/key can only own one run,
|
|
114
|
+
* and its canonical request below decides whether it is a rejoin or conflict.
|
|
115
|
+
*/
|
|
116
|
+
export function providerMonitorBatchOperationId(input: {
|
|
117
|
+
orgId: string;
|
|
118
|
+
idempotencyKey: string;
|
|
119
|
+
}): string {
|
|
120
|
+
const orgId = input.orgId.trim();
|
|
121
|
+
const idempotencyKey = input.idempotencyKey.trim();
|
|
122
|
+
if (!orgId)
|
|
123
|
+
throw new Error('A monitor batch operation requires an organization.');
|
|
124
|
+
if (!IDEMPOTENCY_KEY.test(idempotencyKey)) {
|
|
125
|
+
throw new Error(
|
|
126
|
+
'idempotencyKey must be 1-96 characters of letters, numbers, dot, underscore, or hyphen.',
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
return `monitor-batch:${orgId}:${idempotencyKey}`;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function isProviderMonitorBatchOperationKind(
|
|
133
|
+
value: string,
|
|
134
|
+
): value is ProviderMonitorBatchOperationKind {
|
|
135
|
+
return (PROVIDER_MONITOR_BATCH_OPERATION_KINDS as readonly string[]).includes(
|
|
136
|
+
value,
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function isProviderMonitorBatchTarget(
|
|
141
|
+
value: string,
|
|
142
|
+
): value is ProviderMonitorBatchTarget {
|
|
143
|
+
return (PROVIDER_MONITOR_BATCH_TARGETS as readonly string[]).includes(value);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Validate the representation shared by all entry points before any state is
|
|
148
|
+
* mutated. A request chooses exactly one selection mechanism. Key lists are
|
|
149
|
+
* kept intentionally small because a large explicit selection is a manifest,
|
|
150
|
+
* not an unbounded mutation argument.
|
|
151
|
+
*/
|
|
152
|
+
export function validateProviderMonitorBatchOperationRequest(
|
|
153
|
+
request: ProviderMonitorBatchOperationRequest,
|
|
154
|
+
): ProviderMonitorBatchOperationRequest {
|
|
155
|
+
if (!isProviderMonitorBatchOperationKind(request.kind)) {
|
|
156
|
+
throw new Error(`Unknown monitor batch operation '${request.kind}'.`);
|
|
157
|
+
}
|
|
158
|
+
const callbackBaseUrl = normalizeCallbackBaseUrl(request.callbackBaseUrl);
|
|
159
|
+
if (callbackBaseUrl !== undefined && request.kind !== 'deploy') {
|
|
160
|
+
throw new Error('callbackBaseUrl is only valid for a batch deploy.');
|
|
161
|
+
}
|
|
162
|
+
if (!request.scope || typeof request.scope !== 'object') {
|
|
163
|
+
throw new Error('A monitor batch operation requires exactly one scope.');
|
|
164
|
+
}
|
|
165
|
+
const scope = request.scope;
|
|
166
|
+
if (scope.kind === 'keys') {
|
|
167
|
+
const keys = [...new Set(scope.monitorKeys.map((key) => key.trim()))];
|
|
168
|
+
if (
|
|
169
|
+
keys.length === 0 ||
|
|
170
|
+
keys.length !== scope.monitorKeys.length ||
|
|
171
|
+
keys.some((key) => key.length === 0)
|
|
172
|
+
) {
|
|
173
|
+
throw new Error(
|
|
174
|
+
'Monitor key scopes must contain unique, non-empty keys.',
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
if (keys.length > 100) {
|
|
178
|
+
throw new Error(
|
|
179
|
+
'An explicit monitor batch contains at most 100 keys. Upload a manifest for larger selections.',
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
if (request.kind === 'deploy') {
|
|
183
|
+
throw new Error(
|
|
184
|
+
'Batch deploy requires a durable manifest of complete definitions.',
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
if (request.kind === 'deactivate' && !request.deactivationReason) {
|
|
188
|
+
throw new Error(
|
|
189
|
+
'Batch deactivate requires a declared deactivation reason.',
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
if (request.kind === 'deactivate') {
|
|
193
|
+
requireMonitorDeactivationReason(request.deactivationReason!);
|
|
194
|
+
}
|
|
195
|
+
return {
|
|
196
|
+
...request,
|
|
197
|
+
scope: { kind: 'keys', monitorKeys: keys },
|
|
198
|
+
...(callbackBaseUrl === undefined ? {} : { callbackBaseUrl }),
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
if (scope.kind === 'target') {
|
|
202
|
+
if (request.kind === 'deploy') {
|
|
203
|
+
throw new Error(
|
|
204
|
+
'Batch deploy requires a durable manifest of complete definitions.',
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
if (!isProviderMonitorBatchTarget(scope.target)) {
|
|
208
|
+
throw new Error(`Unknown monitor batch target '${scope.target}'.`);
|
|
209
|
+
}
|
|
210
|
+
if (request.kind === 'deactivate' && !request.deactivationReason) {
|
|
211
|
+
throw new Error(
|
|
212
|
+
'Batch deactivate requires a declared deactivation reason.',
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
if (request.kind === 'deactivate') {
|
|
216
|
+
requireMonitorDeactivationReason(request.deactivationReason!);
|
|
217
|
+
}
|
|
218
|
+
return {
|
|
219
|
+
...request,
|
|
220
|
+
...(callbackBaseUrl === undefined ? {} : { callbackBaseUrl }),
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
if (scope.kind === 'fleet') {
|
|
224
|
+
if (request.kind === 'deploy') {
|
|
225
|
+
throw new Error(
|
|
226
|
+
'Batch deploy requires a durable manifest of complete definitions.',
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
if (!scope.fleetId.trim())
|
|
230
|
+
throw new Error('A Fleet scope requires fleetId.');
|
|
231
|
+
if (request.kind === 'deactivate' && !request.deactivationReason) {
|
|
232
|
+
throw new Error(
|
|
233
|
+
'Batch deactivate requires a declared deactivation reason.',
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
if (request.kind === 'deactivate') {
|
|
237
|
+
requireMonitorDeactivationReason(request.deactivationReason!);
|
|
238
|
+
}
|
|
239
|
+
return {
|
|
240
|
+
...request,
|
|
241
|
+
scope: { kind: 'fleet', fleetId: scope.fleetId.trim() },
|
|
242
|
+
...(callbackBaseUrl === undefined ? {} : { callbackBaseUrl }),
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
if (scope.kind === 'manifest') {
|
|
246
|
+
if (
|
|
247
|
+
!scope.storageId.trim() ||
|
|
248
|
+
!Number.isSafeInteger(scope.count) ||
|
|
249
|
+
scope.count < 1
|
|
250
|
+
) {
|
|
251
|
+
throw new Error(
|
|
252
|
+
'A manifest scope requires a storage id and a positive item count.',
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
if (request.kind !== 'deploy') {
|
|
256
|
+
throw new Error('Only batch deploy accepts a manifest scope.');
|
|
257
|
+
}
|
|
258
|
+
if (
|
|
259
|
+
scope.sha256 !== undefined &&
|
|
260
|
+
!/^[a-f0-9]{64}$/i.test(scope.sha256.trim())
|
|
261
|
+
) {
|
|
262
|
+
throw new Error('A manifest sha256 must be a 64-character hex digest.');
|
|
263
|
+
}
|
|
264
|
+
return {
|
|
265
|
+
...request,
|
|
266
|
+
scope: {
|
|
267
|
+
kind: 'manifest',
|
|
268
|
+
storageId: scope.storageId.trim(),
|
|
269
|
+
count: scope.count,
|
|
270
|
+
...(scope.sha256 === undefined
|
|
271
|
+
? {}
|
|
272
|
+
: { sha256: scope.sha256.trim().toLowerCase() }),
|
|
273
|
+
},
|
|
274
|
+
...(callbackBaseUrl === undefined ? {} : { callbackBaseUrl }),
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
throw new Error(
|
|
278
|
+
'A monitor batch operation requires exactly one supported scope.',
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* The persisted fingerprint is an equality proof, not a display hash. It is
|
|
284
|
+
* compact for normal target/key requests, collision-free, and avoids a Node
|
|
285
|
+
* crypto dependency in code shared with Convex.
|
|
286
|
+
*/
|
|
287
|
+
export function providerMonitorBatchOperationRequestFingerprint(
|
|
288
|
+
request: ProviderMonitorBatchOperationRequest,
|
|
289
|
+
): string {
|
|
290
|
+
const normalized = validateProviderMonitorBatchOperationRequest(request);
|
|
291
|
+
// A storage id is an implementation detail of an uploaded immutable file.
|
|
292
|
+
// Re-uploading identical bytes after a lost HTTP response must rejoin the
|
|
293
|
+
// same operation, not conflict merely because storage issued another id.
|
|
294
|
+
if (normalized.scope.kind === 'manifest' && normalized.scope.sha256) {
|
|
295
|
+
return canonicalJson({
|
|
296
|
+
...normalized,
|
|
297
|
+
scope: {
|
|
298
|
+
kind: 'manifest',
|
|
299
|
+
count: normalized.scope.count,
|
|
300
|
+
sha256: normalized.scope.sha256,
|
|
301
|
+
},
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
return canonicalJson(normalized);
|
|
305
|
+
}
|