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.
Files changed (280) hide show
  1. package/contracts/install-commands.json +29 -0
  2. package/dist/bundling-sources/sdk/src/client.ts +652 -39
  3. package/dist/bundling-sources/sdk/src/config.ts +77 -0
  4. package/dist/bundling-sources/sdk/src/http.ts +76 -30
  5. package/dist/bundling-sources/sdk/src/index.ts +10 -0
  6. package/dist/bundling-sources/sdk/src/monitor-fleet-contract.ts +1 -1
  7. package/dist/bundling-sources/sdk/src/pagination.ts +25 -0
  8. package/dist/bundling-sources/sdk/src/play.ts +15 -1
  9. package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +3 -3
  10. package/dist/bundling-sources/sdk/src/release.ts +16 -9
  11. package/dist/bundling-sources/sdk/src/types.ts +106 -4
  12. package/dist/bundling-sources/shared_libs/integration-contracts/AGENTS.md +9 -0
  13. package/dist/bundling-sources/shared_libs/integration-contracts/README.md +3 -0
  14. package/dist/bundling-sources/shared_libs/integration-contracts/index.ts +2 -0
  15. package/dist/bundling-sources/shared_libs/monitors/analytics-install-guides.ts +77 -0
  16. package/dist/bundling-sources/shared_libs/monitors/analytics-public.ts +10 -0
  17. package/dist/bundling-sources/shared_libs/monitors/billing/charges.ts +125 -0
  18. package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +686 -0
  19. package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +54 -0
  20. package/dist/bundling-sources/shared_libs/monitors/billing/public-pricing.ts +72 -0
  21. package/dist/bundling-sources/shared_libs/monitors/billing/session.ts +45 -0
  22. package/dist/bundling-sources/shared_libs/monitors/billing/state.ts +454 -0
  23. package/dist/bundling-sources/shared_libs/monitors/billing/tamradar.ts +260 -0
  24. package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +215 -0
  25. package/dist/bundling-sources/shared_libs/monitors/callback-security.ts +333 -0
  26. package/dist/bundling-sources/shared_libs/monitors/cursor-page.ts +42 -0
  27. package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +16 -0
  28. package/dist/bundling-sources/shared_libs/monitors/framework-managed-payload-fields.ts +71 -0
  29. package/dist/bundling-sources/shared_libs/monitors/generated/provider-monitor-callback-admission-targets.ts +16 -0
  30. package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +270 -0
  31. package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +39 -0
  32. package/dist/bundling-sources/shared_libs/monitors/inbound-queue.ts +82 -0
  33. package/dist/bundling-sources/shared_libs/monitors/inventory-reconciliation.ts +59 -0
  34. package/dist/bundling-sources/shared_libs/monitors/lifecycle-notifications.ts +471 -0
  35. package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +1 -1
  36. package/dist/bundling-sources/shared_libs/monitors/package.json +36 -0
  37. package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +1125 -0
  38. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +305 -0
  39. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +964 -0
  40. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-consumer-health.ts +56 -0
  41. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +131 -0
  42. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +535 -0
  43. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-legacy-aliases.ts +16 -0
  44. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-priority-execution.ts +56 -0
  45. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-public-aliases.ts +28 -0
  46. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-runtime-read-eligibility.ts +38 -0
  47. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +122 -0
  48. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-status.ts +10 -0
  49. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +112 -0
  50. package/dist/bundling-sources/shared_libs/monitors/provider-webhook-monitor-runtime.ts +300 -0
  51. package/dist/bundling-sources/shared_libs/monitors/quickstart-prompts.ts +22 -0
  52. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +245 -0
  53. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-message.ts +38 -0
  54. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue-ack-probe.ts +94 -0
  55. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue-delivery.ts +60 -0
  56. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue.ts +60 -0
  57. package/dist/bundling-sources/shared_libs/monitors/snitcher-install-validation.ts +93 -0
  58. package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +332 -0
  59. package/dist/bundling-sources/shared_libs/monitors/snitcher-radar.ts +221 -0
  60. package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +105 -0
  61. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +73 -0
  62. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +81 -0
  63. package/dist/bundling-sources/shared_libs/monitors/tsconfig.json +10 -0
  64. package/dist/bundling-sources/shared_libs/observability/build-context.ts +13 -0
  65. package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +160 -0
  66. package/dist/bundling-sources/shared_libs/observability/request-context.ts +68 -0
  67. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +654 -0
  68. package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +35 -0
  69. package/dist/bundling-sources/shared_libs/observability/scheduled-work.ts +5 -0
  70. package/dist/bundling-sources/shared_libs/play-data-plane/neon-constants.ts +9 -0
  71. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +272 -0
  72. package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +6 -11
  73. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +135 -12
  74. package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +66 -1
  75. package/dist/bundling-sources/shared_libs/play-runtime/async-play-invocation.ts +77 -0
  76. package/dist/bundling-sources/shared_libs/play-runtime/bounceban-batching.ts +137 -0
  77. package/dist/bundling-sources/shared_libs/play-runtime/checkpoint-boundaries.ts +70 -0
  78. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +1159 -166
  79. package/dist/bundling-sources/shared_libs/play-runtime/coordinator-headers.ts +1 -32
  80. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +103 -0
  81. package/dist/bundling-sources/shared_libs/play-runtime/daytona-payload-contract.ts +68 -0
  82. package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-janitor.ts +103 -0
  83. package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-reaper.ts +725 -0
  84. package/dist/bundling-sources/shared_libs/play-runtime/default-batch-strategies.ts +20 -1
  85. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +29 -0
  86. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +29 -0
  87. package/dist/bundling-sources/shared_libs/play-runtime/execution-gateway-invocation-fence.ts +442 -0
  88. package/dist/bundling-sources/shared_libs/play-runtime/execution-protocol.ts +7 -1
  89. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +18 -0
  90. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +9 -0
  91. package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +1 -1
  92. package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +1 -1
  93. package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/contracts.ts +66 -0
  94. package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/job.ts +145 -0
  95. package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/ports.ts +21 -0
  96. package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/postgres-store.ts +170 -0
  97. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +1322 -0
  98. package/dist/bundling-sources/shared_libs/play-runtime/internal-step-ids.ts +2 -2
  99. package/dist/bundling-sources/shared_libs/play-runtime/lane-retirement-gate.ts +189 -0
  100. package/dist/bundling-sources/shared_libs/play-runtime/launch-source-policy.ts +112 -0
  101. package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +8 -0
  102. package/dist/bundling-sources/shared_libs/play-runtime/perf-trace.ts +127 -0
  103. package/dist/bundling-sources/shared_libs/play-runtime/play-artifact-runtime-contract.ts +5 -0
  104. package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +24 -1
  105. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/contracts.ts +56 -0
  106. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/index.ts +13 -0
  107. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/job.ts +41 -0
  108. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/ports.ts +17 -0
  109. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/postgres-adapter.ts +54 -0
  110. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/contracts.ts +114 -0
  111. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/engine-suspension.ts +108 -0
  112. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/index.ts +36 -0
  113. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/job.ts +97 -0
  114. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/ports.ts +104 -0
  115. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/postgres-fence-adapter.ts +263 -0
  116. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/worker-terminal-projection.ts +64 -0
  117. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/contracts.ts +29 -0
  118. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/gateway-adapter.ts +56 -0
  119. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/index.ts +15 -0
  120. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/job.ts +65 -0
  121. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/ports.ts +17 -0
  122. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/contracts.ts +42 -0
  123. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/index.ts +17 -0
  124. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +142 -0
  125. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/ports.ts +42 -0
  126. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/postgres-adapter.ts +102 -0
  127. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/contracts.ts +60 -0
  128. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/index.ts +16 -0
  129. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/job.ts +78 -0
  130. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/ports.ts +54 -0
  131. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/postgres-adapter.ts +71 -0
  132. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-batching-registry.ts +4 -0
  133. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +28 -0
  134. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +4 -0
  135. package/dist/bundling-sources/shared_libs/play-runtime/receipt-status.ts +5 -8
  136. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +23 -2
  137. package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +168 -0
  138. package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +1 -1
  139. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +90 -13
  140. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +6 -12
  141. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-start-admission.ts +68 -0
  142. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +21 -0
  143. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/bundle.ts +0 -1
  144. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +14 -43
  145. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +67 -213
  146. package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +201 -0
  147. package/dist/bundling-sources/shared_libs/play-runtime/runtime-capacity-policy.ts +20 -0
  148. package/dist/bundling-sources/shared_libs/play-runtime/runtime-contract.ts +6 -0
  149. package/dist/bundling-sources/shared_libs/play-runtime/runtime-env.ts +12 -0
  150. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +67 -0
  151. package/dist/bundling-sources/shared_libs/play-runtime/runtime-release-environment.ts +2 -0
  152. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-contract.ts +68 -0
  153. package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +38 -2
  154. package/dist/bundling-sources/shared_libs/play-runtime/runtime-telemetry.ts +108 -0
  155. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +4 -0
  156. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +3 -0
  157. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +37 -1
  158. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-deadline-reconciliation.ts +88 -0
  159. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-play-deploy-task.ts +124 -0
  160. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-play-run-task.ts +68 -0
  161. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +193 -0
  162. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-queue-lifecycle.ts +269 -0
  163. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-queue-suffix.ts +73 -0
  164. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +6642 -0
  165. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +897 -0
  166. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-metrics.ts +120 -0
  167. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-required-env.ts +76 -0
  168. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +476 -0
  169. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/gateway-heavy-request-admission.ts +47 -0
  170. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/gateway-progress-registry.ts +147 -0
  171. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/index.ts +27 -0
  172. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/lazy.ts +50 -0
  173. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +98 -0
  174. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-budget-state.ts +260 -0
  175. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +1416 -0
  176. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +1255 -0
  177. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +942 -0
  178. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +14636 -0
  179. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/receipt-gateway.ts +888 -0
  180. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +355 -0
  181. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-terminal-transition.ts +46 -0
  182. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runner-push.ts +60 -0
  183. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +33 -0
  184. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-gateway-health.ts +64 -0
  185. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +835 -0
  186. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +1218 -0
  187. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-operation.ts +207 -0
  188. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-scheduler-schema.ts +10 -0
  189. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/scheduler-capacity.ts +123 -0
  190. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/scheduler-launch-read-observability.ts +78 -0
  191. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/submit-admission.ts +169 -0
  192. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/terminal-contract.ts +20 -0
  193. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/worker-queue-metrics.ts +34 -0
  194. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/worker-resource-metrics.ts +249 -0
  195. package/dist/bundling-sources/shared_libs/play-runtime/sheet-attempt-sql.ts +7 -0
  196. package/dist/bundling-sources/shared_libs/play-runtime/step-progress.ts +296 -0
  197. package/dist/bundling-sources/shared_libs/play-runtime/tool-call/native-batch.ts +3 -3
  198. package/dist/bundling-sources/shared_libs/play-runtime/tool-call/runtime-step-receipts-adapter.ts +20 -1
  199. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +60 -15
  200. package/dist/bundling-sources/shared_libs/play-runtime/tool-execution-outcome.ts +20 -0
  201. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +1 -1
  202. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +1 -1
  203. package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +12 -0
  204. package/dist/bundling-sources/shared_libs/play-runtime/vercel-protection.ts +14 -1
  205. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +165 -0
  206. package/dist/bundling-sources/shared_libs/play-runtime/work-receipts.ts +15 -23
  207. package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +169 -0
  208. package/dist/bundling-sources/shared_libs/play-runtime/zerobounce-batching.ts +122 -0
  209. package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +8 -3
  210. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +454 -17
  211. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +19 -4
  212. package/dist/bundling-sources/shared_libs/plays/contracts.ts +8 -14
  213. package/dist/bundling-sources/shared_libs/plays/core.ts +11 -6
  214. package/dist/bundling-sources/shared_libs/plays/deployment-status.ts +1 -1
  215. package/dist/bundling-sources/shared_libs/plays/docflow-binding-owner.ts +16 -11
  216. package/dist/bundling-sources/shared_libs/plays/docflow.ts +1 -1
  217. package/dist/bundling-sources/shared_libs/plays/email-status.ts +1 -1
  218. package/dist/bundling-sources/shared_libs/plays/play-grep-search.ts +39 -0
  219. package/dist/bundling-sources/shared_libs/plays/resolve-static-pipeline.ts +1 -1
  220. package/dist/bundling-sources/shared_libs/plays/share/copy.ts +271 -0
  221. package/dist/bundling-sources/shared_libs/plays/share/metrics.ts +140 -0
  222. package/dist/bundling-sources/shared_libs/plays/share/public-read-model.ts +86 -0
  223. package/dist/bundling-sources/shared_libs/plays/share/seo-quality.ts +181 -0
  224. package/dist/bundling-sources/shared_libs/plays/share/static-pipeline-summary.ts +658 -0
  225. package/dist/bundling-sources/shared_libs/plays/share/types.ts +197 -0
  226. package/dist/bundling-sources/shared_libs/plays/slack-hitl-timeout-error.ts +37 -0
  227. package/dist/bundling-sources/shared_libs/plays/slug.ts +115 -0
  228. package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +50 -15
  229. package/dist/bundling-sources/shared_libs/plays/tool-category-descriptions.ts +2 -2
  230. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
  231. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +877 -0
  232. package/dist/bundling-sources/shared_libs/product-notifications/configuration-draft.ts +456 -0
  233. package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +566 -0
  234. package/dist/bundling-sources/shared_libs/product-notifications/content.ts +28 -0
  235. package/dist/bundling-sources/shared_libs/product-notifications/default-policy.ts +60 -0
  236. package/dist/bundling-sources/shared_libs/product-notifications/email.ts +246 -0
  237. package/dist/bundling-sources/shared_libs/product-notifications/evaluation.ts +280 -0
  238. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +433 -0
  239. package/dist/bundling-sources/shared_libs/product-notifications/legacy-slack.ts +80 -0
  240. package/dist/bundling-sources/shared_libs/product-notifications/overflow.ts +18 -0
  241. package/dist/bundling-sources/shared_libs/product-notifications/rolling-limit.ts +24 -0
  242. package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +624 -0
  243. package/dist/bundling-sources/shared_libs/product-notifications/slack-payload.ts +140 -0
  244. package/dist/bundling-sources/shared_libs/product-notifications/slack-transport.ts +75 -0
  245. package/dist/bundling-sources/shared_libs/product-notifications/workspace.ts +38 -0
  246. package/dist/bundling-sources/shared_libs/runtime-env.ts +12 -0
  247. package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +42 -0
  248. package/dist/bundling-sources/shared_libs/security/header-safe-env.ts +35 -0
  249. package/dist/bundling-sources/shared_libs/security/internal-actor.ts +50 -0
  250. package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +267 -0
  251. package/dist/bundling-sources/shared_libs/security/slack-sanitize.ts +133 -0
  252. package/dist/cli/getting-started.d.mts +52 -0
  253. package/dist/cli/getting-started.d.ts +52 -0
  254. package/dist/cli/getting-started.js +65 -0
  255. package/dist/cli/getting-started.mjs +36 -0
  256. package/dist/cli/index.d.mts +9 -0
  257. package/dist/cli/index.d.ts +9 -0
  258. package/dist/cli/index.js +1611 -453
  259. package/dist/cli/index.mjs +1596 -447
  260. package/dist/{compiler-manifest-Dbov16F7.d.mts → compiler-manifest-BaJfE-5H.d.mts} +136 -10
  261. package/dist/{compiler-manifest-Dbov16F7.d.ts → compiler-manifest-BaJfE-5H.d.ts} +136 -10
  262. package/dist/index.d.mts +910 -155
  263. package/dist/index.d.ts +910 -155
  264. package/dist/index.js +550 -64
  265. package/dist/index.mjs +550 -64
  266. package/dist/install-integrity.json +193 -4
  267. package/dist/monitor-fleet-contract.d.mts +138 -0
  268. package/dist/monitor-fleet-contract.d.ts +138 -0
  269. package/dist/monitor-fleet-contract.js +404 -0
  270. package/dist/monitor-fleet-contract.mjs +367 -0
  271. package/dist/plays/bundle-play-file.d.mts +8 -3
  272. package/dist/plays/bundle-play-file.d.ts +8 -3
  273. package/dist/plays/bundle-play-file.mjs +100 -20
  274. package/dist/release.d.mts +255 -0
  275. package/dist/release.d.ts +255 -0
  276. package/dist/release.js +215 -0
  277. package/dist/release.mjs +188 -0
  278. package/package.json +23 -4
  279. /package/dist/bundling-sources/shared_libs/{integrations/bettercontact-execution-policy.ts → integration-contracts/bettercontact/execution-policy.ts} +0 -0
  280. /package/dist/bundling-sources/shared_libs/{integrations/theirstack-execution-policy.ts → integration-contracts/theirstack/execution-policy.ts} +0 -0
@@ -95,11 +95,26 @@ export type AsyncOperationContractWire = {
95
95
  * status. This rule applies only to that launch response; unknown poll
96
96
  * responses still use terminal.defaultOutcome.
97
97
  */
98
- launch?: { unclassifiedJobOutcome: 'running' };
98
+ launch?: {
99
+ unclassifiedJobOutcome: 'running';
100
+ /** Ask this start action for its handle instead of its legacy sync result. */
101
+ preferAsync?: boolean;
102
+ };
99
103
  job: { idPaths: readonly string[] };
100
104
  polling: {
101
105
  initialDelayMs: number;
102
106
  intervalMs: number;
107
+ /**
108
+ * The longest one provider status/result read may wait when the caller
109
+ * owns the lifecycle. This is deliberately separate from the complete
110
+ * job timeout: a Play fan-out must release its transport slot promptly
111
+ * and let the next invocation perform the next check.
112
+ *
113
+ * Provider adapters translate this generic budget into their native
114
+ * long-poll parameter when they have one. Omit it when a poll endpoint
115
+ * already returns immediately.
116
+ */
117
+ checkTimeoutMs?: number;
103
118
  /** Optional public start-input field that overrides intervalMs for this call. */
104
119
  intervalInputField?: string;
105
120
  backoffMultiplier?: number;
@@ -128,6 +143,14 @@ export type AsyncOperationContractWire = {
128
143
  };
129
144
 
130
145
  export type AsyncOperationContract = AsyncOperationContractWire;
146
+ /**
147
+ * Runtime projection for one lifecycle companion action. This is the single
148
+ * cadence fact a provider adapter receives; it does not expose a provider
149
+ * handle or make a result receipt into provider-job state.
150
+ */
151
+ export type AsyncOperationPollExecution = {
152
+ checkTimeoutMs: number;
153
+ };
131
154
  export type AsyncActionFlowCompatibilityProjection = {
132
155
  pollActions: readonly string[];
133
156
  finishAction?: string;
@@ -261,6 +284,12 @@ export function defineAsyncOperation(
261
284
  nonNegativeInteger(contract.polling.initialDelayMs, 'polling.initialDelayMs');
262
285
  positiveInteger(contract.polling.intervalMs, 'polling.intervalMs');
263
286
  positiveInteger(contract.polling.timeoutMs, 'polling.timeoutMs');
287
+ if (contract.polling.checkTimeoutMs !== undefined) {
288
+ positiveInteger(
289
+ contract.polling.checkTimeoutMs,
290
+ 'polling.checkTimeoutMs',
291
+ );
292
+ }
264
293
  if (contract.polling.intervalInputField !== undefined) {
265
294
  required(contract.polling.intervalInputField, 'polling.intervalInputField');
266
295
  }
@@ -406,6 +435,17 @@ export function defineCallerManagedAsyncOperation(input: {
406
435
  pollActions: readonly string[];
407
436
  finishAction?: string;
408
437
  jobIdPaths?: readonly string[];
438
+ /**
439
+ * The provider has an explicit asynchronous launch path. A Play will receive
440
+ * its job handle immediately and own subsequent polling.
441
+ */
442
+ preferAsyncStart?: boolean;
443
+ /**
444
+ * Bound one provider-side status/result check for Plays. The default keeps
445
+ * large fan-outs nonblocking while direct SDK and CLI calls retain their
446
+ * provider-specific behavior.
447
+ */
448
+ checkTimeoutMs?: number;
409
449
  /**
410
450
  * Preserve an existing public asyncGetAction, or pass null when the legacy
411
451
  * action exposed only asyncFlow metadata.
@@ -431,6 +471,14 @@ export function defineCallerManagedAsyncOperation(input: {
431
471
  ? { finishAction: companion(input.finishAction) }
432
472
  : {}),
433
473
  },
474
+ ...(input.preferAsyncStart
475
+ ? {
476
+ launch: {
477
+ unclassifiedJobOutcome: 'running' as const,
478
+ preferAsync: true,
479
+ },
480
+ }
481
+ : {}),
434
482
  job: {
435
483
  idPaths: input.jobIdPaths ?? [
436
484
  'job_id',
@@ -446,6 +494,7 @@ export function defineCallerManagedAsyncOperation(input: {
446
494
  polling: {
447
495
  initialDelayMs: 0,
448
496
  intervalMs: 1_000,
497
+ checkTimeoutMs: input.checkTimeoutMs ?? 1_000,
449
498
  timeoutMs: 15 * 60_000,
450
499
  },
451
500
  terminal: {
@@ -462,6 +511,22 @@ export function defineCallerManagedAsyncOperation(input: {
462
511
  });
463
512
  }
464
513
 
514
+ /**
515
+ * Project the generic caller-managed cadence onto each polling companion.
516
+ * `always` and `input_flag` operations execute their complete lifecycle at
517
+ * the API boundary, so exposing a bounded companion policy for them would be
518
+ * misleading.
519
+ */
520
+ export function projectAsyncOperationPollExecution(
521
+ contract: AsyncOperationContractWire,
522
+ ): AsyncOperationPollExecution | null {
523
+ if (contract.wait.kind !== 'caller_managed') return null;
524
+ return {
525
+ checkTimeoutMs:
526
+ contract.polling.checkTimeoutMs ?? contract.polling.intervalMs,
527
+ };
528
+ }
529
+
465
530
  export function asyncOperationCompanionActions(
466
531
  contract: AsyncOperationContract,
467
532
  ): string[] {
@@ -0,0 +1,77 @@
1
+ import {
2
+ flattenStaticPipeline,
3
+ type PlayStaticPipeline,
4
+ } from '../plays/static-pipeline';
5
+ import { SHARED_EXECUTION_POLICY } from './governor/policy';
6
+
7
+ export const CTX_RUN_PLAY_ASYNC_TARGET_UNRESOLVED =
8
+ 'CTX_RUN_PLAY_ASYNC_TARGET_UNRESOLVED';
9
+ export const CTX_RUN_PLAY_ASYNC_DATASET_UNSUPPORTED =
10
+ 'CTX_RUN_PLAY_ASYNC_DATASET_UNSUPPORTED';
11
+ export const CTX_RUN_PLAY_ASYNC_RECURSIVE = 'CTX_RUN_PLAY_ASYNC_RECURSIVE';
12
+ export const CTX_RUN_PLAY_ASYNC_DEPTH_EXCEEDED =
13
+ 'CTX_RUN_PLAY_ASYNC_DEPTH_EXCEEDED';
14
+ export const MAX_ASYNC_PLAY_CALL_DEPTH =
15
+ SHARED_EXECUTION_POLICY.budgets.maxPlayCallDepth;
16
+
17
+ /**
18
+ * Assert that one independently scheduled Play closure may be admitted.
19
+ *
20
+ * Async children may suspend for sleep/HITL, but never own a Dataset, CSV, or
21
+ * Runtime Sheet. The checker and runtime both call this function so the same
22
+ * authored target cannot pass publish and fail differently at execution.
23
+ */
24
+ export function assertAsyncPlayInvocation(input: {
25
+ pipeline: PlayStaticPipeline | null | undefined;
26
+ childPlayName?: string | null;
27
+ }): void {
28
+ const childPlayName = input.childPlayName?.trim() || 'child';
29
+ if (!input.pipeline) {
30
+ throw new Error(
31
+ `${CTX_RUN_PLAY_ASYNC_TARGET_UNRESOLVED}: ctx.runPlayAsync("${childPlayName}") requires a statically resolved published Play contract. Publish the target with the current Deepline CLI before launching it.`,
32
+ );
33
+ }
34
+
35
+ const steps = flattenStaticPipeline(input.pipeline);
36
+ if (
37
+ input.pipeline.tableNamespace ||
38
+ input.pipeline.sheetContract ||
39
+ steps.some((step) => step.type === 'dataset' || step.type === 'csv')
40
+ ) {
41
+ throw new Error(
42
+ `${CTX_RUN_PLAY_ASYNC_DATASET_UNSUPPORTED}: ctx.runPlayAsync("${childPlayName}") launches one independent scalar or HITL Play Run, but the target owns ctx.dataset(), ctx.csv(), or a Runtime Sheet. Keep batch work in its top-level Play or extract a scalar per-record child.`,
43
+ );
44
+ }
45
+ }
46
+
47
+ /** Admit a child against the persisted root-to-parent Play lineage. */
48
+ export function admitAsyncPlayLineage(input: {
49
+ ancestryPlayIds: readonly string[];
50
+ childPlayName: string;
51
+ }): Readonly<{ ancestryPlayIds: readonly string[]; callDepth: number }> {
52
+ const childPlayName = input.childPlayName.trim();
53
+ const ancestryPlayIds = input.ancestryPlayIds
54
+ .map((playId) => playId.trim())
55
+ .filter(Boolean);
56
+ if (ancestryPlayIds.includes(childPlayName)) {
57
+ throw new Error(
58
+ `${CTX_RUN_PLAY_ASYNC_RECURSIVE}: Recursive play graph detected: ${[
59
+ ...ancestryPlayIds,
60
+ childPlayName,
61
+ ].join(' -> ')}`,
62
+ );
63
+ }
64
+ // The lineage includes the root Play, while call depth counts child edges.
65
+ // Appending this child therefore makes its depth equal to the current
66
+ // lineage length: [root] -> child is depth 1, not depth 2.
67
+ const callDepth = ancestryPlayIds.length;
68
+ if (callDepth > MAX_ASYNC_PLAY_CALL_DEPTH) {
69
+ throw new Error(
70
+ `${CTX_RUN_PLAY_ASYNC_DEPTH_EXCEEDED}: Play-call depth exceeded (${callDepth}/${MAX_ASYNC_PLAY_CALL_DEPTH}).`,
71
+ );
72
+ }
73
+ return {
74
+ ancestryPlayIds: [...ancestryPlayIds, childPlayName],
75
+ callDepth,
76
+ };
77
+ }
@@ -0,0 +1,137 @@
1
+ import {
2
+ defineBatchStrategyMap,
3
+ type BatchOperationStrategy,
4
+ } from './batching-types';
5
+
6
+ type Single = {
7
+ email: string;
8
+ mode?: 'regular' | 'deepverify';
9
+ disable_catchall_verify?: '0' | '1';
10
+ url?: string;
11
+ };
12
+ type Bulk = Omit<Single, 'email'> & { emails: string[] };
13
+ type Verdict = Record<string, unknown> & { email: string; status?: string };
14
+ type Results = { items?: Verdict[]; data?: { items?: Verdict[] } };
15
+
16
+ function options(payload: Single) {
17
+ return {
18
+ mode: payload.mode ?? 'regular',
19
+ disable_catchall_verify: payload.disable_catchall_verify ?? '0',
20
+ };
21
+ }
22
+ function bucket(payload: Single) {
23
+ // Single and bulk webhook payloads differ. Do not batch webhook callers.
24
+ return JSON.stringify([options(payload), payload.url ?? null]);
25
+ }
26
+ function emailKey(email: string) {
27
+ return email.trim().toLowerCase();
28
+ }
29
+
30
+ export const bouncebanVerifyBatchStrategy: BatchOperationStrategy<
31
+ Single,
32
+ Bulk | Single,
33
+ Results,
34
+ { data: Verdict }
35
+ > = {
36
+ sourceOperation: 'bounceban_verify_single',
37
+ batchOperation: 'bounceban_verify_bulk',
38
+ kind: 'async_dataset_job',
39
+ // The async finish action retrieves at most 100 emails per request.
40
+ maxBatchSize: 100,
41
+ bucketKeyPayloadFields: ['mode', 'disable_catchall_verify', 'url'],
42
+ canBatchWith(left, right) {
43
+ return !left.url && !right.url && bucket(left) === bucket(right);
44
+ },
45
+ toBucketKey: bucket,
46
+ toItemKey: (payload) => emailKey(payload.email),
47
+ compile(payloads) {
48
+ const first = payloads[0];
49
+ if (payloads.length === 1 && first) {
50
+ return {
51
+ batchOperation: 'bounceban_verify_single',
52
+ batchPayload: first,
53
+ items: [{ itemKey: emailKey(first.email), payload: first }],
54
+ };
55
+ }
56
+ if (
57
+ !first ||
58
+ payloads.length > 100 ||
59
+ payloads.some((p) => p.url || bucket(p) !== bucket(first))
60
+ ) {
61
+ throw new Error(
62
+ 'BounceBan batch requires 1–100 emails with matching verification options and no webhooks.',
63
+ );
64
+ }
65
+ return {
66
+ batchOperation: 'bounceban_verify_bulk',
67
+ batchPayload: {
68
+ emails: [...new Set(payloads.map((p) => emailKey(p.email)))],
69
+ ...options(first),
70
+ },
71
+ items: payloads.map((payload) => ({
72
+ itemKey: emailKey(payload.email),
73
+ payload,
74
+ })),
75
+ };
76
+ },
77
+ splitResult(fullResult, compiled) {
78
+ if (compiled.batchOperation === 'bounceban_verify_single') {
79
+ const row = (fullResult.data ?? fullResult) as Verdict;
80
+ if (
81
+ row.status !== 'success' ||
82
+ typeof row.email !== 'string' ||
83
+ emailKey(row.email) !== compiled.items[0]?.itemKey ||
84
+ !['deliverable', 'undeliverable', 'risky', 'unknown'].includes(
85
+ String(row.result),
86
+ )
87
+ ) {
88
+ throw new Error(
89
+ 'BounceBan single verification returned an unfinished or malformed verdict.',
90
+ );
91
+ }
92
+ return [
93
+ {
94
+ itemKey: compiled.items[0]!.itemKey,
95
+ result: { data: row },
96
+ rawResult: row,
97
+ },
98
+ ];
99
+ }
100
+ const rows = fullResult.items ?? fullResult.data?.items;
101
+ if (!Array.isArray(rows))
102
+ throw new Error('BounceBan bulk verification returned no result list.');
103
+ const byEmail = new Map<string, Verdict>();
104
+ for (const row of rows) {
105
+ if (
106
+ !row ||
107
+ typeof row.email !== 'string' ||
108
+ (row.status !== undefined && row.status !== 'success') ||
109
+ !['deliverable', 'undeliverable', 'risky', 'unknown'].includes(
110
+ String(row.result),
111
+ )
112
+ ) {
113
+ throw new Error(
114
+ 'BounceBan bulk verification returned an unfinished or malformed verdict.',
115
+ );
116
+ }
117
+ const key = emailKey(row.email);
118
+ if (byEmail.has(key))
119
+ throw new Error(
120
+ 'BounceBan bulk verification returned duplicate verdicts.',
121
+ );
122
+ byEmail.set(key, row);
123
+ }
124
+ return compiled.items.map((item) => {
125
+ const row = byEmail.get(item.itemKey);
126
+ if (!row)
127
+ throw new Error(
128
+ `BounceBan bulk verification omitted a requested email result.`,
129
+ );
130
+ return { itemKey: item.itemKey, result: { data: row }, rawResult: row };
131
+ });
132
+ },
133
+ };
134
+
135
+ export const bouncebanBatchStrategies = defineBatchStrategyMap({
136
+ bounceban_verify_single: bouncebanVerifyBatchStrategy,
137
+ });
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Durable checkpoint boundary kinds — the one list every checkpoint reader
3
+ * narrows against.
4
+ *
5
+ * Compatibility contract (`docs/runtime-compatibility-contract.md`): a parked
6
+ * run's checkpoint is written by one build and read by a newer-or-same build.
7
+ * Adding a boundary KIND is therefore not an additive change: a build that does
8
+ * not know the kind falls through every `existing?.kind === '...'` narrow and
9
+ * silently re-arms the wait or re-executes the side effect the boundary already
10
+ * resolved. That is a duplicate durable wait or a duplicate external effect,
11
+ * with no trace of what happened.
12
+ *
13
+ * So an unknown kind FAILS LOUD here instead. Recovery is roll-forward: deploy a
14
+ * build that understands the kind, and the parked run resumes.
15
+ */
16
+ import type { PlayCheckpoint } from './ctx-types';
17
+
18
+ /** One entry of `PlayCheckpoint.resolvedBoundaries`. */
19
+ export type PlayResolvedBoundary = NonNullable<
20
+ PlayCheckpoint['resolvedBoundaries']
21
+ >[string];
22
+
23
+ /** Every boundary kind this build can replay. */
24
+ export const PLAY_RESOLVED_BOUNDARY_KINDS = [
25
+ 'sleep',
26
+ 'integration_event',
27
+ 'fetch',
28
+ 'step',
29
+ ] as const satisfies readonly PlayResolvedBoundary['kind'][];
30
+
31
+ /**
32
+ * Compile fence in the other direction: adding a kind to `PlayCheckpoint`
33
+ * without listing it above resolves to `never` and fails the build, rather than
34
+ * shipping a kind that every reader would then reject at runtime.
35
+ */
36
+ type UnlistedBoundaryKind = Exclude<
37
+ PlayResolvedBoundary['kind'],
38
+ (typeof PLAY_RESOLVED_BOUNDARY_KINDS)[number]
39
+ >;
40
+ const ALL_BOUNDARY_KINDS_LISTED: UnlistedBoundaryKind extends never
41
+ ? true
42
+ : never = true;
43
+ void ALL_BOUNDARY_KINDS_LISTED;
44
+
45
+ /**
46
+ * Return the checkpoint entry for `boundaryId`, or throw when it carries a kind
47
+ * this build cannot replay. Absent (`undefined`/`null`) stays absent — an
48
+ * unresolved boundary is normal and simply re-arms.
49
+ */
50
+ export function assertKnownResolvedBoundary(
51
+ boundaryId: string,
52
+ entry: PlayResolvedBoundary | null | undefined,
53
+ ): PlayResolvedBoundary | undefined {
54
+ if (entry === null || entry === undefined) return undefined;
55
+ const kind = (entry as { kind?: unknown }).kind;
56
+ if (
57
+ typeof kind !== 'string' ||
58
+ !(PLAY_RESOLVED_BOUNDARY_KINDS as readonly string[]).includes(kind)
59
+ ) {
60
+ throw new Error(
61
+ `Play checkpoint boundary "${boundaryId}" is resolved with unknown kind ` +
62
+ `"${String(kind)}". This build only replays ` +
63
+ `${PLAY_RESOLVED_BOUNDARY_KINDS.join(', ')}. The checkpoint was written ` +
64
+ `by a newer runtime build; continuing would re-arm the wait or re-run ` +
65
+ `the effect this boundary already resolved. Roll forward to a build ` +
66
+ `that understands "${String(kind)}".`,
67
+ );
68
+ }
69
+ return entry;
70
+ }