deepline 0.3.89 → 0.3.91
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 +221 -43
- package/dist/bundling-sources/sdk/src/index.ts +4 -0
- package/dist/bundling-sources/sdk/src/monitor-fleet-contract.ts +2 -556
- package/dist/bundling-sources/sdk/src/monitor-fleets.ts +2 -2
- package/dist/bundling-sources/sdk/src/pagination.ts +25 -0
- package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +11 -9
- package/dist/bundling-sources/sdk/src/types.ts +29 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts +549 -0
- package/dist/bundling-sources/shared_libs/monitors/analytics-public.ts +10 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/errors.ts +96 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +8 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +320 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/verdict.ts +106 -0
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +8 -1
- package/dist/bundling-sources/shared_libs/monitors/inbound-queue.ts +4 -4
- package/dist/bundling-sources/shared_libs/monitors/inventory-reconciliation.ts +59 -0
- package/dist/bundling-sources/shared_libs/monitors/lifecycle-notifications.ts +7 -9
- package/dist/bundling-sources/shared_libs/monitors/monitor-fleet-limits.ts +2 -12
- package/dist/bundling-sources/shared_libs/monitors/package.json +113 -4
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +56 -9
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-consumer-health.ts +2 -2
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +2 -2
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-public-aliases.ts +1 -1
- 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 +1 -1
- package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +2 -2
- package/dist/bundling-sources/shared_libs/monitors/snitcher-radar.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +1 -1
- 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 +690 -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/app-runtime-api.ts +46 -1
- 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 +0 -1
- package/dist/bundling-sources/shared_libs/play-runtime/bounceban-batching.ts +137 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +779 -140
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +46 -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/db-session-lease-store.ts +578 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-execution-relay.ts +521 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-receipt-gateway.ts +1378 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/runtime-topology.ts +1024 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-gateway-route-probe.ts +193 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machine-lifecycle.ts +104 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +1844 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/process-tree.ts +40 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-gateway-drain.ts +262 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-surface.ts +98 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +303 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-tuple-publication-guardian.ts +70 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-tuple-recovery.ts +519 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-fly-rollback-alignment.ts +280 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-production-gate.ts +159 -0
- 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 +23 -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 +3 -3
- 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/memory-store.ts +114 -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 +1 -1
- 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/protocol.ts +2 -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 +3 -5
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +168 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +44 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/child-play-resolver.ts +26 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +3662 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/progress-sidecar.ts +47 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-deadline.ts +84 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-gateway-transport.ts +91 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +424 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-progress-push.ts +321 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-sheet-persistence-retry.ts +110 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +625 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +72 -9
- 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.ts +19 -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 -44
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +103 -208
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +201 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-env.ts +6 -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 +14 -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 +7 -0
- 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/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/webhook-receipt-retry.ts +50 -0
- 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 +2 -0
- package/dist/bundling-sources/shared_libs/plays/bundling/repository-adapter.ts +24 -0
- package/dist/bundling-sources/shared_libs/plays/child-run-projection.ts +174 -0
- package/dist/bundling-sources/shared_libs/plays/contracts.ts +2 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +267 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +73 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/manifest.ts +162 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/project-serializer.ts +87 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/source-file-path.ts +26 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/target-paths.ts +36 -0
- package/dist/bundling-sources/shared_libs/plays/deployment-status.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/docflow.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/launch/input-contract.ts +400 -0
- package/dist/bundling-sources/shared_libs/plays/launch/prepare.ts +96 -0
- package/dist/bundling-sources/shared_libs/plays/local-file-discovery.ts +385 -0
- package/dist/bundling-sources/shared_libs/plays/play-grep-search.ts +112 -0
- package/dist/bundling-sources/shared_libs/plays/play-reference.ts +117 -0
- package/dist/bundling-sources/shared_libs/plays/run-input-summary.ts +260 -0
- package/dist/bundling-sources/shared_libs/plays/run-summary-types.ts +49 -0
- package/dist/bundling-sources/shared_libs/plays/secrets/errors.ts +19 -0
- 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/sheet-filter.ts +347 -0
- package/dist/bundling-sources/shared_libs/plays/slack-hitl-timeout-error.ts +37 -0
- package/dist/bundling-sources/shared_libs/plays/standard-webhooks.ts +117 -0
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +6 -1
- package/dist/bundling-sources/shared_libs/plays/status-result.ts +388 -0
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/transform-factor-structure.ts +377 -0
- package/dist/bundling-sources/shared_libs/plays/webhook-payload.ts +113 -0
- package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +7 -1
- package/dist/bundling-sources/shared_libs/product-notifications/default-policy.ts +3 -2
- 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/runtime-env.ts +6 -0
- package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +42 -0
- package/dist/bundling-sources/shared_libs/security/header-safe-env.ts +10 -3
- 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 +895 -407
- package/dist/cli/index.mjs +893 -414
- package/dist/{compiler-manifest-DsLbQaew.d.mts → compiler-manifest-x14KL83E.d.mts} +4 -2
- package/dist/{compiler-manifest-DsLbQaew.d.ts → compiler-manifest-x14KL83E.d.ts} +4 -2
- package/dist/index.d.mts +124 -154
- package/dist/index.d.ts +124 -154
- package/dist/index.js +132 -28
- package/dist/index.mjs +132 -28
- package/dist/install-integrity.json +182 -2
- package/dist/monitor-fleet-contract.d.mts +131 -0
- package/dist/monitor-fleet-contract.d.ts +131 -0
- package/dist/monitor-fleet-contract.js +406 -0
- package/dist/monitor-fleet-contract.mjs +367 -0
- package/dist/plays/bundle-play-file.d.mts +2 -2
- package/dist/plays/bundle-play-file.d.ts +2 -2
- package/dist/release.d.mts +255 -0
- package/dist/release.d.ts +255 -0
- package/dist/release.js +210 -0
- package/dist/release.mjs +183 -0
- package/package.json +21 -4
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Declarative Fly runtime topology.
|
|
3
|
+
*
|
|
4
|
+
* This is the only place that defines the durable platform (app identities,
|
|
5
|
+
* ingress, Machine shapes, and release ownership). Release code selects an
|
|
6
|
+
* immutable image and replaces only the declared release unit; it does not
|
|
7
|
+
* invent an app, IP, queue, or controller relationship.
|
|
8
|
+
*/
|
|
9
|
+
export type RuntimeGatewayRole = 'receipt' | 'execution';
|
|
10
|
+
export type RuntimeGatewayTopologyProfile = 'production' | 'preview';
|
|
11
|
+
|
|
12
|
+
export type RuntimeGatewayMachineConfig = {
|
|
13
|
+
env: Record<string, string>;
|
|
14
|
+
guest: {
|
|
15
|
+
cpu_kind: 'shared' | 'performance';
|
|
16
|
+
cpus: number;
|
|
17
|
+
memory_mb: number;
|
|
18
|
+
};
|
|
19
|
+
restart: { policy: 'always' };
|
|
20
|
+
stop_config: { signal: 'SIGTERM'; timeout: string };
|
|
21
|
+
metrics: { port: number; path: '/metrics' };
|
|
22
|
+
services: Array<Record<string, unknown>>;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type GatewayTopology = {
|
|
26
|
+
app?: string;
|
|
27
|
+
region: 'iad';
|
|
28
|
+
minimumMachines: number;
|
|
29
|
+
processGroup: 'app';
|
|
30
|
+
machine: RuntimeGatewayMachineConfig;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type ProductionGatewayTopology = GatewayTopology & {
|
|
34
|
+
app: string;
|
|
35
|
+
machine: RuntimeGatewayMachineConfig & {
|
|
36
|
+
guest: { cpu_kind: 'performance'; cpus: number; memory_mb: number };
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const httpService = (minimumMachines: number): Record<string, unknown> => ({
|
|
41
|
+
protocol: 'tcp',
|
|
42
|
+
internal_port: 8788,
|
|
43
|
+
autostop: false,
|
|
44
|
+
autostart: true,
|
|
45
|
+
min_machines_running: minimumMachines,
|
|
46
|
+
ports: [
|
|
47
|
+
{ port: 80, handlers: ['http'], force_https: true },
|
|
48
|
+
{ port: 443, handlers: ['http', 'tls'] },
|
|
49
|
+
],
|
|
50
|
+
checks: [
|
|
51
|
+
{
|
|
52
|
+
type: 'http',
|
|
53
|
+
interval: '15s',
|
|
54
|
+
timeout: '5s',
|
|
55
|
+
grace_period: '15s',
|
|
56
|
+
// Fly owns liveness only. Version/schema compatibility is a deliberate
|
|
57
|
+
// cordoned-candidate proof, never a service-check side effect.
|
|
58
|
+
path: '/healthz',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
concurrency: { type: 'requests', soft_limit: 1, hard_limit: 64 },
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
function gatewayMachine(
|
|
65
|
+
profile: RuntimeGatewayTopologyProfile,
|
|
66
|
+
role: RuntimeGatewayRole,
|
|
67
|
+
minimumMachines: number,
|
|
68
|
+
): RuntimeGatewayMachineConfig {
|
|
69
|
+
const production = profile === 'production';
|
|
70
|
+
return {
|
|
71
|
+
env: {
|
|
72
|
+
PORT: '8788',
|
|
73
|
+
GATEWAY_METRICS_PORT: '8789',
|
|
74
|
+
DEEPLINE_RUNTIME_GATEWAY_ROLE: role,
|
|
75
|
+
FLY_PROCESS_GROUP: 'app',
|
|
76
|
+
...(production
|
|
77
|
+
? { DEEPLINE_RUNTIME_JWKS_ORIGIN: 'https://code.deepline.com' }
|
|
78
|
+
: {
|
|
79
|
+
DEEPLINE_ENV: 'dev',
|
|
80
|
+
DEEPLINE_TEST_RUNTIME_SEAMS: '1',
|
|
81
|
+
DEEPLINE_RUNTIME_SCHEDULER_SCHEMA:
|
|
82
|
+
'runtime_scheduler_absurd_preview',
|
|
83
|
+
}),
|
|
84
|
+
},
|
|
85
|
+
guest: production
|
|
86
|
+
? { cpu_kind: 'performance', cpus: 2, memory_mb: 4096 }
|
|
87
|
+
: { cpu_kind: 'shared', cpus: 1, memory_mb: 1024 },
|
|
88
|
+
restart: { policy: 'always' },
|
|
89
|
+
stop_config: {
|
|
90
|
+
signal: 'SIGTERM',
|
|
91
|
+
timeout: production ? '5m0s' : '30s',
|
|
92
|
+
},
|
|
93
|
+
metrics: { port: 8789, path: '/metrics' },
|
|
94
|
+
services: [httpService(minimumMachines)],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function productionGatewayMachine(
|
|
99
|
+
role: RuntimeGatewayRole,
|
|
100
|
+
minimumMachines: number,
|
|
101
|
+
): ProductionGatewayTopology['machine'] {
|
|
102
|
+
return gatewayMachine(
|
|
103
|
+
'production',
|
|
104
|
+
role,
|
|
105
|
+
minimumMachines,
|
|
106
|
+
) as ProductionGatewayTopology['machine'];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const productionGateways: Record<
|
|
110
|
+
RuntimeGatewayRole,
|
|
111
|
+
ProductionGatewayTopology
|
|
112
|
+
> = {
|
|
113
|
+
receipt: {
|
|
114
|
+
app: 'deepline-runtime-receipt-gateway',
|
|
115
|
+
region: 'iad',
|
|
116
|
+
minimumMachines: 2,
|
|
117
|
+
processGroup: 'app',
|
|
118
|
+
machine: productionGatewayMachine('receipt', 2),
|
|
119
|
+
},
|
|
120
|
+
execution: {
|
|
121
|
+
app: 'deepline-runtime-execution-relay',
|
|
122
|
+
region: 'iad',
|
|
123
|
+
minimumMachines: 2,
|
|
124
|
+
processGroup: 'app',
|
|
125
|
+
machine: productionGatewayMachine('execution', 2),
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const previewGateways: Record<RuntimeGatewayRole, GatewayTopology> = {
|
|
130
|
+
receipt: {
|
|
131
|
+
region: 'iad',
|
|
132
|
+
minimumMachines: 2,
|
|
133
|
+
processGroup: 'app',
|
|
134
|
+
machine: gatewayMachine('preview', 'receipt', 2),
|
|
135
|
+
},
|
|
136
|
+
execution: {
|
|
137
|
+
region: 'iad',
|
|
138
|
+
minimumMachines: 2,
|
|
139
|
+
processGroup: 'app',
|
|
140
|
+
machine: gatewayMachine('preview', 'execution', 2),
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export const RUNTIME_TOPOLOGY = {
|
|
145
|
+
production: {
|
|
146
|
+
components: {
|
|
147
|
+
receiptGateway: {
|
|
148
|
+
...productionGateways.receipt,
|
|
149
|
+
release: 'machine-set',
|
|
150
|
+
publicIngress: true,
|
|
151
|
+
image: {
|
|
152
|
+
kind: 'gateway',
|
|
153
|
+
config: 'deploy/fly/runtime-worker/receipt-gateway.toml',
|
|
154
|
+
dockerfile: 'deploy/fly/runtime-worker/receipt-gateway.Dockerfile',
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
executionRelay: {
|
|
158
|
+
...productionGateways.execution,
|
|
159
|
+
release: 'machine-set',
|
|
160
|
+
publicIngress: true,
|
|
161
|
+
image: {
|
|
162
|
+
kind: 'gateway',
|
|
163
|
+
config: 'deploy/fly/runtime-worker/execution-relay.toml',
|
|
164
|
+
dockerfile: 'deploy/fly/runtime-worker/receipt-gateway.Dockerfile',
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
worker: {
|
|
168
|
+
app: 'deepline-absurd-worker-prod',
|
|
169
|
+
release: 'immutable-lane',
|
|
170
|
+
publicIngress: false,
|
|
171
|
+
image: {
|
|
172
|
+
kind: 'worker',
|
|
173
|
+
config: 'deploy/fly/runtime-worker/absurd-worker.toml',
|
|
174
|
+
dockerfile: 'deploy/fly/runtime-worker/Dockerfile.absurd',
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
scaler: {
|
|
178
|
+
app: 'deepline-absurd-worker-prod-scaler',
|
|
179
|
+
release: 'lease-holder',
|
|
180
|
+
publicIngress: false,
|
|
181
|
+
image: {
|
|
182
|
+
kind: 'scaler',
|
|
183
|
+
config: 'deploy/fly/runtime-worker/absurd-scaler.toml',
|
|
184
|
+
dockerfile: 'deploy/fly/runtime-worker/Dockerfile.absurd-scaler',
|
|
185
|
+
},
|
|
186
|
+
processGroups: {
|
|
187
|
+
app: { desiredStarted: 1, healthCheck: 'scaler_ready' },
|
|
188
|
+
projector: { desiredStarted: 2, healthCheck: 'projector_ready' },
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
workerLogShipper: {
|
|
192
|
+
app: 'deepline-runtime-log-shipper',
|
|
193
|
+
release: 'singleton',
|
|
194
|
+
publicIngress: false,
|
|
195
|
+
config: 'deploy/fly/runtime-log-shipper/fly.toml',
|
|
196
|
+
},
|
|
197
|
+
receiptGatewayLogShipper: {
|
|
198
|
+
app: 'deepline-runtime-receipt-gateway-log-shipper',
|
|
199
|
+
release: 'singleton',
|
|
200
|
+
publicIngress: false,
|
|
201
|
+
config: 'deploy/fly/runtime-log-shipper/receipt-gateway.fly.toml',
|
|
202
|
+
},
|
|
203
|
+
executionRelayLogShipper: {
|
|
204
|
+
app: 'deepline-runtime-execution-relay-log-shipper',
|
|
205
|
+
release: 'singleton',
|
|
206
|
+
publicIngress: false,
|
|
207
|
+
config: 'deploy/fly/runtime-log-shipper/execution-relay.fly.toml',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
preview: { gateways: previewGateways },
|
|
212
|
+
} as const;
|
|
213
|
+
|
|
214
|
+
export type RuntimeComponent =
|
|
215
|
+
keyof typeof RUNTIME_TOPOLOGY.production.components;
|
|
216
|
+
|
|
217
|
+
type ProductionComponent =
|
|
218
|
+
(typeof RUNTIME_TOPOLOGY.production.components)[RuntimeComponent];
|
|
219
|
+
|
|
220
|
+
type SingletonComponent = ProductionComponent & {
|
|
221
|
+
release: 'singleton';
|
|
222
|
+
config: string;
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
export function productionRuntimeAppNames(): string[] {
|
|
226
|
+
return Object.values(RUNTIME_TOPOLOGY.production.components).map(
|
|
227
|
+
(component) => component.app,
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Singleton components are the only fixed services that can be deployed as a
|
|
233
|
+
* group. Adding another declared singleton automatically adds its app shell
|
|
234
|
+
* and its no-public-IP deployment to topology reconciliation.
|
|
235
|
+
*/
|
|
236
|
+
export function productionSingletonComponents(): SingletonComponent[] {
|
|
237
|
+
return Object.values(RUNTIME_TOPOLOGY.production.components).filter(
|
|
238
|
+
(component): component is SingletonComponent =>
|
|
239
|
+
component.release === 'singleton' &&
|
|
240
|
+
'config' in component &&
|
|
241
|
+
typeof component.config === 'string',
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export function assertRuntimeTopologyInvariants(): void {
|
|
246
|
+
const components = Object.values(
|
|
247
|
+
RUNTIME_TOPOLOGY.production.components,
|
|
248
|
+
) as Array<{ app: string; release: string; publicIngress: boolean }>;
|
|
249
|
+
const apps = components.map((component) => component.app);
|
|
250
|
+
if (new Set(apps).size !== apps.length) {
|
|
251
|
+
throw new Error(
|
|
252
|
+
'Every production runtime component requires a unique app.',
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
for (const component of components) {
|
|
256
|
+
if (component.release === 'machine-set' && !component.publicIngress) {
|
|
257
|
+
throw new Error(
|
|
258
|
+
`Machine-set component ${component.app} must declare public ingress.`,
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
if (component.release === 'immutable-lane' && component.publicIngress) {
|
|
262
|
+
throw new Error(
|
|
263
|
+
`Immutable-lane component ${component.app} cannot declare public ingress.`,
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
assertRuntimeTopologyInvariants();
|
|
270
|
+
|
|
271
|
+
export function runtimeGatewayTopology(
|
|
272
|
+
profile: RuntimeGatewayTopologyProfile,
|
|
273
|
+
role: RuntimeGatewayRole,
|
|
274
|
+
): GatewayTopology {
|
|
275
|
+
if (profile === 'production') return productionGateways[role];
|
|
276
|
+
return previewGateways[role];
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export function productionGatewayTopology(
|
|
280
|
+
role: RuntimeGatewayRole,
|
|
281
|
+
): ProductionGatewayTopology {
|
|
282
|
+
return productionGateways[role];
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export function gatewayMachineConfig(input: {
|
|
286
|
+
profile: RuntimeGatewayTopologyProfile;
|
|
287
|
+
role: RuntimeGatewayRole;
|
|
288
|
+
image: string;
|
|
289
|
+
metadata: Record<string, string>;
|
|
290
|
+
env?: Record<string, string>;
|
|
291
|
+
}): Record<string, unknown> {
|
|
292
|
+
const machine = runtimeGatewayTopology(input.profile, input.role).machine;
|
|
293
|
+
return {
|
|
294
|
+
image: input.image,
|
|
295
|
+
env: { ...machine.env, ...input.env },
|
|
296
|
+
guest: machine.guest,
|
|
297
|
+
restart: machine.restart,
|
|
298
|
+
stop_config: machine.stop_config,
|
|
299
|
+
metrics: machine.metrics,
|
|
300
|
+
services: machine.services,
|
|
301
|
+
metadata: input.metadata,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import {
|
|
3
|
+
createRuntimeTuplePanicRecovery,
|
|
4
|
+
type RuntimeTupleRecoveryCommand,
|
|
5
|
+
} from './runtime-tuple-recovery';
|
|
6
|
+
|
|
7
|
+
function required(name: string): string {
|
|
8
|
+
const value = process.env[name]?.trim();
|
|
9
|
+
if (!value) {
|
|
10
|
+
throw new Error(`${name} is required for runtime tuple recovery.`);
|
|
11
|
+
}
|
|
12
|
+
return value;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function command(
|
|
16
|
+
input: Parameters<RuntimeTupleRecoveryCommand>[0],
|
|
17
|
+
): Promise<void> {
|
|
18
|
+
return new Promise((resolve, reject) => {
|
|
19
|
+
const child = spawn(input.executable, [...input.args], {
|
|
20
|
+
env: { ...process.env, ...input.environment },
|
|
21
|
+
stdio: 'inherit',
|
|
22
|
+
});
|
|
23
|
+
child.once('error', reject);
|
|
24
|
+
child.once('close', (code, signal) => {
|
|
25
|
+
if (code === 0) {
|
|
26
|
+
resolve();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
reject(
|
|
30
|
+
new Error(
|
|
31
|
+
signal
|
|
32
|
+
? `${input.description} was terminated by ${signal}.`
|
|
33
|
+
: `${input.description} failed with exit code ${code ?? '<unknown>'}.`,
|
|
34
|
+
),
|
|
35
|
+
);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function recovery() {
|
|
41
|
+
return createRuntimeTuplePanicRecovery({
|
|
42
|
+
controlUrl: required('RUNTIME_TUPLE_CONTROL_URL'),
|
|
43
|
+
internalToken: required('DEEPLINE_INTERNAL_TOKEN'),
|
|
44
|
+
vercelProtectionBypassToken: process.env.VERCEL_PROTECTION_BYPASS_TOKEN,
|
|
45
|
+
vercel: {
|
|
46
|
+
token: required('VERCEL_TOKEN'),
|
|
47
|
+
teamId: required('VERCEL_TEAM_ID'),
|
|
48
|
+
projectId: required('VERCEL_PROJECT_ID'),
|
|
49
|
+
},
|
|
50
|
+
gatewayFlyToken: required('RUNTIME_GATEWAY_FAS_API_TOKEN'),
|
|
51
|
+
command,
|
|
52
|
+
log: (event, fields) =>
|
|
53
|
+
console.info(`[runtime-tuple-guardian] ${event}`, fields),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export async function activeRuntimeTuplePublication() {
|
|
58
|
+
return await recovery().activePublication();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* One idempotent convergence pass. The scaler invokes this on every tick; a
|
|
63
|
+
* provider outage leaves the durable operation in panic and the next tick
|
|
64
|
+
* resumes from the same baseline rather than declaring recovery failed.
|
|
65
|
+
*/
|
|
66
|
+
export async function reconcileRuntimeTuplePublicationPanic(input: {
|
|
67
|
+
owner: string;
|
|
68
|
+
}): Promise<boolean> {
|
|
69
|
+
return await recovery().reconcile(input);
|
|
70
|
+
}
|