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
package/dist/index.mjs CHANGED
@@ -1,3 +1,23 @@
1
+ // src/pagination.ts
2
+ async function* iterateCursorPages(fetchPage) {
3
+ let cursor = null;
4
+ const seen = /* @__PURE__ */ new Set();
5
+ for (; ; ) {
6
+ const page = await fetchPage(cursor);
7
+ if (page.hasMore) {
8
+ if (!page.cursor || seen.has(page.cursor)) {
9
+ throw new Error(
10
+ "Pagination reported more results without an advancing cursor"
11
+ );
12
+ }
13
+ seen.add(page.cursor);
14
+ }
15
+ yield page.items;
16
+ if (!page.hasMore) return;
17
+ cursor = page.cursor;
18
+ }
19
+ }
20
+
1
21
  // src/config.ts
2
22
  import {
3
23
  existsSync,
@@ -691,7 +711,10 @@ function resolveConfig(options) {
691
711
  apiKey,
692
712
  baseUrl,
693
713
  timeout: options?.timeout ?? DEFAULT_TIMEOUT,
694
- maxRetries: options?.maxRetries ?? DEFAULT_MAX_RETRIES
714
+ maxRetries: options?.maxRetries ?? DEFAULT_MAX_RETRIES,
715
+ // Pass through untouched: the transport owns case-insensitive merging so
716
+ // there is exactly one place that decides which header wins.
717
+ ...options?.headers ? { headers: { ...options.headers } } : {}
695
718
  };
696
719
  }
697
720
 
@@ -744,20 +767,27 @@ var SDK_RELEASE = {
744
767
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
745
768
  // getters keep their established compatibility behavior.
746
769
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
747
- version: "0.3.88",
748
- updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
770
+ // 0.3.90 is the first deliberately versioned SDK release for API v3. Play
771
+ // grep hard-cuts to the single Convex full-text index; it does not retain a
772
+ // registry/scanner reader for any SDK/API major.
773
+ version: "0.3.90",
774
+ updateSummary: "Play grep now uses one source-only Convex full-text index. It no longer scans the registry, pages through the complete indexed match set, and rejects retired grep modes. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
749
775
  packageCapabilities: {
750
776
  updatePreferences: 1
751
777
  },
752
778
  contracts: {
753
779
  api: {
754
780
  name: "sdk-http-api",
755
- // API v2 is append-only. A breaking public request/response change needs
756
- // v3 and an explicit v2 support-window decision, never a patch release.
757
- currentMajor: 2,
758
- supportedMajors: [2],
759
- // Accepted only to bridge SDKs released before X-Deepline-API-Major.
781
+ // API v3 hard-cuts Play grep to the canonical Convex index. API v2 stays
782
+ // admitted for the explicit SDK support window, but it selects neither a
783
+ // registry scanner nor another grep reader: every accepted grep request
784
+ // uses the same indexed query and retired flags fail at the API boundary.
785
+ currentMajor: 3,
786
+ supportedMajors: [3, 2],
787
+ // The first wire id is emitted by the current SDK. Remaining ids are
788
+ // accepted only while the API v2 support window is open.
760
789
  legacyWireIds: [
790
+ "2026-09-play-grep-convex-index-hard-cutover",
761
791
  "2026-07-admin-cli-local-cutover",
762
792
  "2026-07-native-monitor-launch-hard-cutover"
763
793
  ]
@@ -1289,11 +1319,33 @@ function normalizeRequestAbortError(error, input) {
1289
1319
  }
1290
1320
  return normalized;
1291
1321
  }
1322
+ function applyExplicitHeaders(headers, explicit) {
1323
+ if (!explicit) return headers;
1324
+ for (const [rawName, value] of Object.entries(explicit)) {
1325
+ const name = rawName.trim().toLowerCase();
1326
+ if (!name) continue;
1327
+ for (const existing of Object.keys(headers)) {
1328
+ if (existing.toLowerCase() === name) delete headers[existing];
1329
+ }
1330
+ headers[name] = value;
1331
+ }
1332
+ return headers;
1333
+ }
1292
1334
  function isAbortLikeError(error) {
1293
1335
  const name = error.name.toLowerCase();
1294
1336
  const message = error.message.toLowerCase();
1295
1337
  return name === "aborterror" || message.includes("operation was aborted") || message === "aborted";
1296
1338
  }
1339
+ function withErrorCause(error, cause) {
1340
+ if (cause !== null && cause !== void 0) {
1341
+ Object.defineProperty(error, "cause", {
1342
+ value: cause,
1343
+ configurable: true,
1344
+ writable: true
1345
+ });
1346
+ }
1347
+ return error;
1348
+ }
1297
1349
  function mapNetworkError(baseUrl, error, targetLabel2) {
1298
1350
  const tagged = error;
1299
1351
  const timeoutMs = tagged?.[REQUEST_TIMEOUT_MARKER];
@@ -1410,7 +1462,7 @@ var HttpClient = class {
1410
1462
  if (coordinatorInternalToken?.trim() && (coordinatorUrl?.trim() || workerCallbackUrl?.trim() || runtimeTestFault?.trim() || absurdReleaseOverride?.trim() || preferredReceiptGatewayMachineId?.trim())) {
1411
1463
  headers[COORDINATOR_INTERNAL_TOKEN_HEADER] = coordinatorInternalToken.trim();
1412
1464
  }
1413
- return headers;
1465
+ return applyExplicitHeaders(headers, this.config.headers);
1414
1466
  }
1415
1467
  /**
1416
1468
  * Send an HTTP request with automatic retries and error handling.
@@ -1564,32 +1616,38 @@ var HttpClient = class {
1564
1616
  );
1565
1617
  if (options?.toolId) {
1566
1618
  const code = mappedNetworkError.code;
1567
- throw new ToolExecutionError(
1568
- withCoworkNetworkHint(mappedNetworkError.message),
1569
- {
1570
- toolId: options.toolId,
1571
- provider: providerLabelFromToolId(options.toolId),
1572
- operation: options.toolId,
1573
- code,
1574
- origin: "deepline",
1575
- category: "network",
1576
- // A direct client timeout has ambiguous delivery. Fail closed unless
1577
- // the server returns the authoritative action delivery contract.
1578
- retryable: false,
1579
- statusCode: null,
1580
- requestId: null,
1581
- retryAfterMs: null,
1582
- networkKind: code === "NETWORK_TIMEOUT" ? "timeout" : code === "NETWORK_ABORTED" ? "unknown" : "unavailable",
1583
- networkScope: "client_to_deepline",
1584
- details: mappedNetworkError.details
1585
- }
1619
+ throw withErrorCause(
1620
+ new ToolExecutionError(
1621
+ withCoworkNetworkHint(mappedNetworkError.message),
1622
+ {
1623
+ toolId: options.toolId,
1624
+ provider: providerLabelFromToolId(options.toolId),
1625
+ operation: options.toolId,
1626
+ code,
1627
+ origin: "deepline",
1628
+ category: "network",
1629
+ // A direct client timeout has ambiguous delivery. Fail closed unless
1630
+ // the server returns the authoritative action delivery contract.
1631
+ retryable: false,
1632
+ statusCode: null,
1633
+ requestId: null,
1634
+ retryAfterMs: null,
1635
+ networkKind: code === "NETWORK_TIMEOUT" ? "timeout" : code === "NETWORK_ABORTED" ? "unknown" : "unavailable",
1636
+ networkScope: "client_to_deepline",
1637
+ details: mappedNetworkError.details
1638
+ }
1639
+ ),
1640
+ lastError
1586
1641
  );
1587
1642
  }
1588
- throw new DeeplineError(
1589
- withCoworkNetworkHint(mappedNetworkError.message),
1590
- void 0,
1591
- mappedNetworkError.code,
1592
- mappedNetworkError.details
1643
+ throw withErrorCause(
1644
+ new DeeplineError(
1645
+ withCoworkNetworkHint(mappedNetworkError.message),
1646
+ void 0,
1647
+ mappedNetworkError.code,
1648
+ mappedNetworkError.details
1649
+ ),
1650
+ lastError
1593
1651
  );
1594
1652
  }
1595
1653
  /**
@@ -1938,6 +1996,17 @@ var PRODUCT_NOTIFICATION_DELIVERY_LEASE_MS = 2 * 6e4;
1938
1996
  var PRODUCT_NOTIFICATION_SUCCESS_TTL_MS = 15 * 6e4;
1939
1997
  var PRODUCT_NOTIFICATION_FAILURE_TTL_MS = 24 * 60 * 6e4;
1940
1998
 
1999
+ // ../product-notifications/configuration.ts
2000
+ var PRODUCT_NOTIFICATION_EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
2001
+ function normalizeProductNotificationEmail(value) {
2002
+ const email = typeof value === "string" ? value.trim().toLowerCase() : "";
2003
+ return email && email.length <= 320 && PRODUCT_NOTIFICATION_EMAIL_PATTERN.test(email) ? email : null;
2004
+ }
2005
+ var DEFAULT_PRODUCT_NOTIFICATION_DELIVERY_TIMING = {
2006
+ mode: "rolling_limit",
2007
+ windowMs: 36e5
2008
+ };
2009
+
1941
2010
  // src/stream-reconnect.ts
1942
2011
  var STREAM_RECONNECT_BASE_DELAY_MS = 500;
1943
2012
  var STREAM_RECONNECT_MAX_DELAY_MS = 15e3;
@@ -2466,7 +2535,7 @@ function isRecord4(value) {
2466
2535
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
2467
2536
  }
2468
2537
  function isPlayActivityObservation(value) {
2469
- if (!isRecord4(value) || value.schemaVersion !== 1 || typeof value.activityId !== "string" || !value.activityId.trim() || typeof value.observedAt !== "number" || !Number.isFinite(value.observedAt) || !isRecord4(value.target) || !isRecord4(value.state)) {
2538
+ if (!isRecord4(value) || value.schemaVersion !== void 0 && value.schemaVersion !== 1 || typeof value.activityId !== "string" || !value.activityId.trim() || typeof value.observedAt !== "number" || !Number.isFinite(value.observedAt) || !isRecord4(value.target) || !isRecord4(value.state)) {
2470
2539
  return false;
2471
2540
  }
2472
2541
  const targetKinds = /* @__PURE__ */ new Set([
@@ -2573,7 +2642,6 @@ function projectPlayRunActivity(input) {
2573
2642
  if (input.waitKind === "detached_runner") {
2574
2643
  return projection(
2575
2644
  {
2576
- schemaVersion: 1,
2577
2645
  activityId: "runner:managed",
2578
2646
  target: {
2579
2647
  kind: "runner",
@@ -2589,7 +2657,6 @@ function projectPlayRunActivity(input) {
2589
2657
  if (input.waitKind === "sleep") {
2590
2658
  return projection(
2591
2659
  {
2592
- schemaVersion: 1,
2593
2660
  activityId: "run:sleep",
2594
2661
  target: {
2595
2662
  kind: "step",
@@ -2609,7 +2676,6 @@ function projectPlayRunActivity(input) {
2609
2676
  if (input.waitKind === "integration_event" || input.waitKind === "integration_event_batch") {
2610
2677
  return projection(
2611
2678
  {
2612
- schemaVersion: 1,
2613
2679
  activityId: `event:${input.activeNodeId ?? "run"}`,
2614
2680
  stepId: input.activeNodeId ?? void 0,
2615
2681
  target: {
@@ -2633,7 +2699,6 @@ function projectPlayRunActivity(input) {
2633
2699
  if (normalizedStatus === "waiting") {
2634
2700
  return projection(
2635
2701
  {
2636
- schemaVersion: 1,
2637
2702
  activityId: "run:legacy-wait",
2638
2703
  target: {
2639
2704
  kind: "step",
@@ -2660,7 +2725,6 @@ function projectPlayRunActivity(input) {
2660
2725
  const datasetProgress = datasetStep?.progress ?? null;
2661
2726
  return projection(
2662
2727
  {
2663
- schemaVersion: 1,
2664
2728
  activityId: `dataset:${pendingDataset.datasetId ?? pendingDataset.tableNamespace}`,
2665
2729
  target: {
2666
2730
  kind: "dataset",
@@ -2688,7 +2752,6 @@ function projectPlayRunActivity(input) {
2688
2752
  const provider = toolId?.split(/[._]/)[0]?.trim() || null;
2689
2753
  return projection(
2690
2754
  {
2691
- schemaVersion: 1,
2692
2755
  activityId: `step:${activeStep.nodeId}`,
2693
2756
  stepId: activeStep.nodeId,
2694
2757
  target: toolId && provider ? {
@@ -2713,7 +2776,6 @@ function projectPlayRunActivity(input) {
2713
2776
  if (normalizedStatus === "queued") {
2714
2777
  return projection(
2715
2778
  {
2716
- schemaVersion: 1,
2717
2779
  activityId: "capacity:worker",
2718
2780
  target: { kind: "capacity", pool: "worker" },
2719
2781
  state: { kind: "queued", reason: "capacity" },
@@ -2723,7 +2785,6 @@ function projectPlayRunActivity(input) {
2723
2785
  );
2724
2786
  }
2725
2787
  const fallback = {
2726
- schemaVersion: 1,
2727
2788
  activityId: "run:legacy",
2728
2789
  target: {
2729
2790
  kind: "step",
@@ -3738,7 +3799,7 @@ async function* observeRunEvents(options) {
3738
3799
  }
3739
3800
  }
3740
3801
 
3741
- // ../../shared_libs/integrations/theirstack-execution-policy.ts
3802
+ // ../integration-contracts/theirstack/execution-policy.ts
3742
3803
  var THEIRSTACK_SLOW_JOB_SEARCH_PROVIDER_TIMEOUT_MS = 135e3;
3743
3804
  var THEIRSTACK_SLOW_JOB_SEARCH_CLIENT_TIMEOUT_MS = 6e4 + THEIRSTACK_SLOW_JOB_SEARCH_PROVIDER_TIMEOUT_MS + 15e3;
3744
3805
  var THEIRSTACK_COMPANY_SEARCH_CLIENT_TIMEOUT_MS = 21e4;
@@ -3792,7 +3853,7 @@ function resolveTheirstackClientTimeoutMs(endpointId, payload) {
3792
3853
  return usesExtendedTheirstackJobSearchBudget(endpointId, payload) ? THEIRSTACK_SLOW_JOB_SEARCH_CLIENT_TIMEOUT_MS : null;
3793
3854
  }
3794
3855
 
3795
- // ../../shared_libs/integrations/bettercontact-execution-policy.ts
3856
+ // ../integration-contracts/bettercontact/execution-policy.ts
3796
3857
  var BETTERCONTACT_LAUNCHER_CLIENT_TIMEOUT_MS = 12e4;
3797
3858
  var BETTERCONTACT_LAUNCHER_TOOL_IDS = /* @__PURE__ */ new Set([
3798
3859
  "bettercontact_enrich",
@@ -3883,6 +3944,42 @@ function providerMetaFromToolResponseRawV2(rawV2, view) {
3883
3944
  }
3884
3945
 
3885
3946
  // src/client.ts
3947
+ var MAX_NOTIFICATION_GROUP_CREATE_TARGETS = 50;
3948
+ function parseNotificationGroupTarget(value) {
3949
+ const normalized = value.trim();
3950
+ if (normalized.toLowerCase().startsWith("email:")) {
3951
+ const email = normalizeProductNotificationEmail(normalized.slice(6));
3952
+ if (!email) {
3953
+ throw new Error(
3954
+ `Invalid email notification target "${value}". Use --to email:name@example.com.`
3955
+ );
3956
+ }
3957
+ return { kind: "email", email };
3958
+ }
3959
+ const slack = /^slack:(.+)$/i.exec(normalized)?.[1]?.trim();
3960
+ if (!slack) {
3961
+ const provider = normalized.split(":", 1)[0] || normalized;
3962
+ throw new Error(
3963
+ `Unsupported notification destination "${provider}". Use email: or slack:.`
3964
+ );
3965
+ }
3966
+ const member = /^member:([UW][A-Z0-9]{8,})$/i.exec(slack);
3967
+ if (member?.[1]) {
3968
+ return { kind: "slack", memberId: member[1].toUpperCase() };
3969
+ }
3970
+ if (slack.toLowerCase().startsWith("member:")) {
3971
+ throw new Error(
3972
+ "Slack member IDs must look like slack:member:U0123456789."
3973
+ );
3974
+ }
3975
+ if (!slack.replace(/^#/, "").trim()) {
3976
+ throw new Error("Use --to slack:#channel.");
3977
+ }
3978
+ return { kind: "slack", channel: slack };
3979
+ }
3980
+ function notificationObjectKey(kind) {
3981
+ return `${kind}.${globalThis.crypto.randomUUID()}`;
3982
+ }
3886
3983
  var TERMINAL_PLAY_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]);
3887
3984
  var INCLUDE_TOOL_METADATA_HEADER = "x-deepline-include-tool-metadata";
3888
3985
  var EXECUTE_RESPONSE_CONTRACT_HEADER = "x-deepline-execute-response-contract";
@@ -4402,6 +4499,7 @@ var DeeplineClient = class {
4402
4499
  this.runs = {
4403
4500
  get: (runId, options2) => this.getRunStatus(runId, options2),
4404
4501
  list: (options2) => this.listRuns(options2),
4502
+ listPage: (options2) => this.listRunsPage(options2),
4405
4503
  tail: (runId, options2) => this.tailRun(runId, options2),
4406
4504
  logs: (runId, options2) => this.getRunLogs(runId, options2),
4407
4505
  input: (runId) => this.getRunInput(runId),
@@ -4452,6 +4550,10 @@ var DeeplineClient = class {
4452
4550
  audit: (options2) => this.auditMonitors(options2),
4453
4551
  repair: (options2) => this.repairMonitors(options2),
4454
4552
  health: (options2) => this.readMonitorsHealth(options2),
4553
+ batch: {
4554
+ submit: (options2) => this.submitMonitorBatch(options2),
4555
+ get: (operationId, options2) => this.getMonitorBatch(operationId, options2)
4556
+ },
4455
4557
  fleets: {
4456
4558
  sync: (definitionOrId, options2) => this.syncMonitorFleet(definitionOrId, options2),
4457
4559
  get: (fleetId, options2) => fleetId === void 0 ? this.listMonitorFleets() : this.getMonitorFleet(fleetId, options2),
@@ -4584,6 +4686,16 @@ var DeeplineClient = class {
4584
4686
  (secret) => secret.name === normalized && secret.status === "active" && secret.hasValue
4585
4687
  ) ?? null;
4586
4688
  }
4689
+ /** Check effective scope and active-version health without reading the value.
4690
+ * Without playName, checks the organization-scoped secret only. With a Play
4691
+ * name, an active Play secret takes precedence; a deleted/disabled Play
4692
+ * secret falls back to the organization-scoped secret.
4693
+ */
4694
+ async inspectSecret(name, options = {}) {
4695
+ const params = new URLSearchParams({ name: name.trim().toUpperCase() });
4696
+ if (options.playName !== void 0) params.set("play", options.playName);
4697
+ return this.http.get(`/api/v2/secrets?${params.toString()}`);
4698
+ }
4587
4699
  // ——————————————————————————————————————————————————————————
4588
4700
  // Tools
4589
4701
  // ——————————————————————————————————————————————————————————
@@ -4675,6 +4787,10 @@ var DeeplineClient = class {
4675
4787
  `/api/v2/integrations/${encodeURIComponent(toolId)}/get`,
4676
4788
  {
4677
4789
  method: "GET",
4790
+ // Tool metadata is a read-only catalog lookup. Keep the metadata
4791
+ // header while opting into the same transient edge-response retries as
4792
+ // other GET catalog methods such as searchTools().
4793
+ retryApiErrors: true,
4678
4794
  headers: {
4679
4795
  "x-deepline-tool-meta-only": "1"
4680
4796
  }
@@ -5597,6 +5713,10 @@ var DeeplineClient = class {
5597
5713
  * ```
5598
5714
  */
5599
5715
  async listRuns(options) {
5716
+ return (await this.listRunsPage(options)).runs;
5717
+ }
5718
+ /** Read one run page without discarding server pagination metadata. */
5719
+ async listRunsPage(options) {
5600
5720
  const playName = options.play?.trim();
5601
5721
  const params = new URLSearchParams();
5602
5722
  if (playName) {
@@ -5627,7 +5747,7 @@ var DeeplineClient = class {
5627
5747
  const response = await this.http.get(
5628
5748
  `/api/v2/runs?${params.toString()}`
5629
5749
  );
5630
- return response.runs ?? [];
5750
+ return { ...response, runs: response.runs ?? [] };
5631
5751
  }
5632
5752
  /**
5633
5753
  * Observe one run's live events. Uses the Convex Run Snapshot subscription
@@ -6022,13 +6142,33 @@ var DeeplineClient = class {
6022
6142
  );
6023
6143
  }
6024
6144
  /**
6025
- * List callable plays visible to the workspace.
6145
+ * List one page of callable plays; grep retains exhaustive matching results.
6146
+ * Use listPlaysPage to retain pagination metadata.
6026
6147
  *
6027
6148
  * Pass `origin: "prebuilt"` for Deepline-managed prebuilts or
6028
6149
  * `origin: "owned"` for org-owned plays.
6029
6150
  */
6030
6151
  async listPlays(options) {
6152
+ if (!options?.grep?.trim()) {
6153
+ return (await this.requestPlaysPage(options, false)).plays;
6154
+ }
6155
+ const plays = [];
6156
+ for await (const items of iterateCursorPages(async (cursor) => {
6157
+ const page = await this.listPlaysPage({ ...options, cursor });
6158
+ return { items: page.plays, cursor: page.cursor, hasMore: page.hasMore };
6159
+ })) {
6160
+ plays.push(...items);
6161
+ }
6162
+ return plays;
6163
+ }
6164
+ /** Read one bounded inventory page; cursor continues the same filters. */
6165
+ async listPlaysPage(options) {
6166
+ return this.requestPlaysPage(options);
6167
+ }
6168
+ async requestPlaysPage(options, paginateInventory = true) {
6031
6169
  const params = new URLSearchParams();
6170
+ if (paginateInventory && !options?.grep?.trim())
6171
+ params.set("inventory_paginated", "1");
6032
6172
  if (options?.origin) params.set("origin", options.origin);
6033
6173
  if (options?.categories) {
6034
6174
  params.set(
@@ -6040,26 +6180,27 @@ var DeeplineClient = class {
6040
6180
  params.set("include_tool_categories", "1");
6041
6181
  }
6042
6182
  if (options?.includeArchived) params.set("include_archived", "1");
6183
+ if (options?.includeCostEstimates) {
6184
+ params.set("include_cost_estimates", "1");
6185
+ }
6043
6186
  if (options?.grep?.trim()) {
6044
6187
  params.set("grep", options.grep.trim());
6045
- params.set("grep_mode", options.grepMode ?? "all");
6046
- params.set("grep_paginated", "1");
6047
6188
  params.set("limit", "60");
6048
6189
  }
6049
- const plays = [];
6050
- let cursor = null;
6051
- let hasMore = true;
6052
- do {
6053
- if (cursor) params.set("cursor", cursor);
6054
- const suffix = params.toString() ? `?${params.toString()}` : "";
6055
- const response = await this.http.get(
6056
- `/api/v2/plays${suffix}`
6057
- );
6058
- plays.push(...response.plays ?? []);
6059
- cursor = response.pagination?.cursor ?? response.cursor ?? null;
6060
- hasMore = Boolean(response.pagination?.hasMore ?? response.hasMore);
6061
- } while (Boolean(options?.grep?.trim()) && hasMore && cursor);
6062
- return plays;
6190
+ if (options?.limit !== void 0) {
6191
+ if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
6192
+ throw new Error("Play page limit must be a positive integer");
6193
+ }
6194
+ params.set("limit", String(options.limit));
6195
+ }
6196
+ if (options?.cursor) params.set("cursor", options.cursor);
6197
+ const suffix = params.size ? `?${params.toString()}` : "";
6198
+ const response = await this.http.get(`/api/v2/plays${suffix}`);
6199
+ return {
6200
+ plays: response.plays ?? [],
6201
+ cursor: response.pagination?.cursor ?? response.cursor ?? null,
6202
+ hasMore: Boolean(response.pagination?.hasMore ?? response.hasMore)
6203
+ };
6063
6204
  }
6064
6205
  /** Set whether an org-owned Play sorts before unpinned Plays. */
6065
6206
  async setPlayPinned(playName, pinned) {
@@ -6130,6 +6271,197 @@ var DeeplineClient = class {
6130
6271
  async getNotifications() {
6131
6272
  return this.http.get("/api/v2/notifications");
6132
6273
  }
6274
+ /** Read the group-based product-notification configuration and rule catalog. */
6275
+ async getNotificationConfiguration() {
6276
+ return this.http.get("/api/v2/notifications/configuration");
6277
+ }
6278
+ /** Atomically apply one retry-safe desired configuration change. */
6279
+ async changeNotificationConfiguration(expectedWorkspaceVersion, change) {
6280
+ return this.http.put("/api/v2/notifications/configuration", {
6281
+ expectedWorkspaceVersion,
6282
+ change
6283
+ });
6284
+ }
6285
+ /** Create one notification group and its destinations as a retry-safe unit. */
6286
+ async createNotificationGroup(input) {
6287
+ const name = input.name.trim().replace(/\s+/g, " ");
6288
+ if (!name) throw new Error("Notification group name is required.");
6289
+ if (input.targets.length < 1 || input.targets.length > MAX_NOTIFICATION_GROUP_CREATE_TARGETS) {
6290
+ throw new Error(
6291
+ `Choose between 1 and ${MAX_NOTIFICATION_GROUP_CREATE_TARGETS} notification targets.`
6292
+ );
6293
+ }
6294
+ const targets = input.targets.map(parseNotificationGroupTarget);
6295
+ const legacyEvents = input.legacyEvents ?? [];
6296
+ const legacyTarget = targets.length === 1 && targets[0]?.kind === "slack" && legacyEvents.length > 0 ? targets[0] : null;
6297
+ if (legacyEvents.length > 0 && !legacyTarget) {
6298
+ throw new Error(
6299
+ "--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
6300
+ );
6301
+ }
6302
+ if (!legacyTarget && name.toLowerCase() === "default") {
6303
+ throw new Error(
6304
+ "Default is reserved for the workspace default notification group."
6305
+ );
6306
+ }
6307
+ const normalizedTargets = targets.map(
6308
+ (target) => target.kind === "email" ? `email:${target.email}` : "memberId" in target ? `slack:member:${target.memberId}` : `slack:${target.channel}`
6309
+ );
6310
+ if (input.dryRun) {
6311
+ return {
6312
+ mode: "dry_run",
6313
+ compatibilityMode: legacyTarget !== null,
6314
+ name: legacyTarget ? input.name : name,
6315
+ targets: normalizedTargets,
6316
+ legacyEvents
6317
+ };
6318
+ }
6319
+ if (legacyTarget) {
6320
+ const notification = await this.createNotification({
6321
+ name: input.name,
6322
+ provider: "slack",
6323
+ ..."channel" in legacyTarget ? { channel: legacyTarget.channel } : { memberId: legacyTarget.memberId },
6324
+ eventTypes: legacyEvents
6325
+ });
6326
+ return { mode: "legacy", notification };
6327
+ }
6328
+ const current = await this.getNotificationConfiguration();
6329
+ const existingGroup = current.configuration.groups.find(
6330
+ (candidate) => candidate.name.toLowerCase() === name.toLowerCase()
6331
+ );
6332
+ const groupKey = existingGroup?.groupKey ?? notificationObjectKey("group");
6333
+ const group = existingGroup ?? {
6334
+ groupKey,
6335
+ name,
6336
+ enabled: true,
6337
+ deliveryTiming: DEFAULT_PRODUCT_NOTIFICATION_DELIVERY_TIMING,
6338
+ source: "workspace",
6339
+ configMode: "custom",
6340
+ version: 0
6341
+ };
6342
+ const destinations = current.configuration.destinations.filter(
6343
+ (destination) => destination.groupKey === groupKey
6344
+ );
6345
+ const emails = [
6346
+ ...new Set(
6347
+ targets.flatMap(
6348
+ (target) => target.kind === "email" ? [target.email] : []
6349
+ )
6350
+ )
6351
+ ].sort();
6352
+ const existingEmails = new Set(
6353
+ destinations.flatMap(
6354
+ (destination) => destination.settings.kind === "email_addresses" ? destination.settings.to : []
6355
+ )
6356
+ );
6357
+ const newEmails = emails.filter((email) => !existingEmails.has(email));
6358
+ if (newEmails.length > 0) {
6359
+ destinations.push({
6360
+ destinationKey: notificationObjectKey("destination"),
6361
+ groupKey,
6362
+ name: "Email recipients",
6363
+ enabled: true,
6364
+ source: "workspace",
6365
+ configMode: "custom",
6366
+ version: 0,
6367
+ status: "active",
6368
+ settings: { kind: "email_addresses", to: newEmails }
6369
+ });
6370
+ }
6371
+ const slackTargets = /* @__PURE__ */ new Map();
6372
+ for (const target of targets) {
6373
+ if (target.kind !== "slack") continue;
6374
+ const targetKey = "memberId" in target ? `member:${target.memberId}` : `channel:${target.channel.replace(/^#/, "").toLowerCase()}`;
6375
+ slackTargets.set(targetKey, target);
6376
+ }
6377
+ const connectionId = current.slackConnection.connectionId;
6378
+ if (slackTargets.size > 0 && !connectionId) {
6379
+ throw new Error(
6380
+ "Slack is not connected to this workspace. Connect it in Dashboard \u2192 Integrations, then retry."
6381
+ );
6382
+ }
6383
+ const resolvedSlackTargets = await Promise.all(
6384
+ [...slackTargets.values()].map(async (target) => {
6385
+ if ("memberId" in target) {
6386
+ return {
6387
+ targetKind: "member",
6388
+ targetId: target.memberId,
6389
+ targetName: target.memberId
6390
+ };
6391
+ }
6392
+ const channel = target.channel;
6393
+ const requested = channel.replace(/^#/, "");
6394
+ const response = await this.listNotificationChannels(channel);
6395
+ const matches = response.channels.filter(
6396
+ (candidate) => candidate.id === requested || candidate.name.toLowerCase() === requested.toLowerCase()
6397
+ );
6398
+ if (matches.length !== 1) {
6399
+ throw new Error(
6400
+ matches.length === 0 ? `Slack channel ${channel} was not found or is not visible to the Deepline app.` : `Slack channel ${channel} is ambiguous. Use its channel ID.`
6401
+ );
6402
+ }
6403
+ return {
6404
+ targetKind: "channel",
6405
+ targetId: matches[0].id,
6406
+ targetName: matches[0].name
6407
+ };
6408
+ })
6409
+ );
6410
+ const uniqueSlackTargets = new Map(
6411
+ resolvedSlackTargets.map((target) => [
6412
+ `${target.targetKind}:${target.targetId}`,
6413
+ target
6414
+ ])
6415
+ );
6416
+ for (const target of uniqueSlackTargets.values()) {
6417
+ if (destinations.some(
6418
+ (destination) => destination.settings.kind === "slack" && destination.settings.targetKind === target.targetKind && destination.settings.targetId === target.targetId
6419
+ )) {
6420
+ continue;
6421
+ }
6422
+ destinations.push({
6423
+ destinationKey: notificationObjectKey("destination"),
6424
+ groupKey,
6425
+ name: `${target.targetKind === "channel" ? "#" : "@"}${target.targetName}`,
6426
+ enabled: true,
6427
+ source: "workspace",
6428
+ configMode: "custom",
6429
+ version: 0,
6430
+ status: "pending_verification",
6431
+ settings: {
6432
+ kind: "slack",
6433
+ ...target,
6434
+ oauthConnectionId: connectionId
6435
+ }
6436
+ });
6437
+ }
6438
+ const draft = {
6439
+ group,
6440
+ destinations,
6441
+ rules: current.configuration.rules.filter(
6442
+ (rule) => rule.groupKey === groupKey
6443
+ )
6444
+ };
6445
+ const result = await this.changeNotificationConfiguration(
6446
+ current.configuration.workspaceVersion,
6447
+ { kind: "save_group", draft }
6448
+ );
6449
+ const storedGroup = result.configuration.groups.find(
6450
+ (candidate) => candidate.groupKey === groupKey
6451
+ );
6452
+ if (!storedGroup) {
6453
+ throw new Error("Notification group creation returned no saved group.");
6454
+ }
6455
+ return {
6456
+ mode: "native",
6457
+ groupKey,
6458
+ targets: normalizedTargets,
6459
+ group: storedGroup,
6460
+ destinations: result.configuration.destinations.filter(
6461
+ (destination) => destination.groupKey === groupKey
6462
+ )
6463
+ };
6464
+ }
6133
6465
  /** List Slack channels available to an already-connected Slack integration. */
6134
6466
  async listNotificationChannels(query) {
6135
6467
  const suffix = query ? `?search=${encodeURIComponent(query)}` : "";
@@ -6674,6 +7006,78 @@ var DeeplineClient = class {
6674
7006
  { method: "GET" }
6675
7007
  );
6676
7008
  }
7009
+ /** Submit durable monitor work; transport retries use the same idempotency key. */
7010
+ async submitMonitorBatch(options) {
7011
+ const idempotencyKey = options.idempotencyKey.trim();
7012
+ if (!idempotencyKey) {
7013
+ throw new DeeplineError(
7014
+ "Monitor batch idempotencyKey is required.",
7015
+ void 0,
7016
+ "INVALID_MONITOR_BATCH_IDEMPOTENCY_KEY"
7017
+ );
7018
+ }
7019
+ if (options.kind === "deploy") {
7020
+ if (!options.manifestNdjson.trim()) {
7021
+ throw new DeeplineError(
7022
+ "Monitor batch deploy requires a non-empty NDJSON manifest.",
7023
+ void 0,
7024
+ "INVALID_MONITOR_BATCH_MANIFEST"
7025
+ );
7026
+ }
7027
+ return this.http.request(
7028
+ "/api/v2/monitors/batch",
7029
+ {
7030
+ method: "POST",
7031
+ body: {
7032
+ kind: "deploy",
7033
+ manifest_ndjson: options.manifestNdjson,
7034
+ dry_run: options.dryRun === true,
7035
+ idempotency_key: idempotencyKey
7036
+ },
7037
+ headers: { "Idempotency-Key": idempotencyKey },
7038
+ maxRetries: 0,
7039
+ exactUrlOnly: true
7040
+ }
7041
+ );
7042
+ }
7043
+ const scope = options.scope.kind === "keys" ? { kind: "keys", monitor_keys: options.scope.monitorKeys } : options.scope.kind === "fleet" ? { kind: "fleet", fleet_id: options.scope.fleetId } : { kind: "target", target: options.scope.target };
7044
+ return this.http.request(
7045
+ "/api/v2/monitors/batch",
7046
+ {
7047
+ method: "POST",
7048
+ body: {
7049
+ kind: options.kind,
7050
+ scope,
7051
+ dry_run: options.dryRun === true,
7052
+ idempotency_key: idempotencyKey,
7053
+ ...options.deactivationReason === void 0 ? {} : { deactivation_reason: options.deactivationReason }
7054
+ },
7055
+ headers: { "Idempotency-Key": idempotencyKey },
7056
+ // Durable submission is itself idempotent, but an ambiguous local retry
7057
+ // must retain the exact key and never turn a CLI attempt into two runs.
7058
+ maxRetries: 0,
7059
+ exactUrlOnly: true
7060
+ }
7061
+ );
7062
+ }
7063
+ /** Get durable batch progress and a bounded retained evidence page. */
7064
+ async getMonitorBatch(operationId, options) {
7065
+ const runId = operationId.trim();
7066
+ if (!runId) {
7067
+ throw new DeeplineError(
7068
+ "Monitor batch operation id is required.",
7069
+ void 0,
7070
+ "INVALID_MONITOR_BATCH_OPERATION_ID"
7071
+ );
7072
+ }
7073
+ const params = new URLSearchParams();
7074
+ if (options?.cursor) params.set("cursor", options.cursor);
7075
+ const suffix = params.size > 0 ? `?${params}` : "";
7076
+ return this.http.request(
7077
+ `/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
7078
+ { method: "GET" }
7079
+ );
7080
+ }
6677
7081
  /**
6678
7082
  * The deployable monitor tools catalog. Pass a tool id (positional or
6679
7083
  * `{ tool }`) to describe one tool's full payload/stream contract, or no tool
@@ -9554,6 +9958,82 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
9554
9958
  description: "Unsupported legacy child-workflow timeout.",
9555
9959
  errorMessage: "ctx.runPlay timeoutMs is unsupported because child Plays execute inline."
9556
9960
  },
9961
+ "ctx.runPlayAsync.key": {
9962
+ schema: Type.String({ minLength: 1 }),
9963
+ fixtures: {
9964
+ valid: "request-approval",
9965
+ invalid: "",
9966
+ absent: void 0,
9967
+ unresolved: { expression: "callKey" },
9968
+ edition1: "request-approval"
9969
+ },
9970
+ referenceType: "string",
9971
+ required: true,
9972
+ resolution: "runtime-dynamic",
9973
+ issueCode: "play_authoring_run_play_option_invalid",
9974
+ description: "Stable identity for one independent child Play Run.",
9975
+ errorMessage: "ctx.runPlayAsync key must be a non-empty string."
9976
+ },
9977
+ "ctx.runPlayAsync.playRef": {
9978
+ schema: Type.Union([
9979
+ Type.String({ minLength: 1 }),
9980
+ Type.Union([
9981
+ Type.Object(
9982
+ { playName: Type.String({ minLength: 1 }) },
9983
+ { additionalProperties: true }
9984
+ ),
9985
+ Type.Object(
9986
+ { name: Type.String({ minLength: 1 }) },
9987
+ { additionalProperties: true }
9988
+ )
9989
+ ])
9990
+ ]),
9991
+ fixtures: {
9992
+ valid: "request-approval",
9993
+ invalid: {},
9994
+ absent: void 0,
9995
+ unresolved: { expression: "playRef" },
9996
+ edition1: "request-approval"
9997
+ },
9998
+ referenceType: "string | PlayReferenceLike",
9999
+ required: true,
10000
+ resolution: "runtime-dynamic",
10001
+ issueCode: "play_authoring_run_play_option_invalid",
10002
+ description: "Independently published scalar child Play name or strongly typed definition handle.",
10003
+ errorMessage: "ctx.runPlayAsync playRef must be a non-empty Play name or definition handle."
10004
+ },
10005
+ "ctx.runPlayAsync.input": {
10006
+ schema: Type.Record(Type.String(), Type.Unknown()),
10007
+ fixtures: {
10008
+ valid: { draftId: "draft-1" },
10009
+ invalid: "draft-1",
10010
+ absent: void 0,
10011
+ unresolved: "childInput",
10012
+ edition1: {}
10013
+ },
10014
+ referenceType: "Record<string, unknown>",
10015
+ required: true,
10016
+ resolution: "runtime-dynamic",
10017
+ issueCode: "play_authoring_run_play_option_invalid",
10018
+ description: "Scalar input object submitted to the independent child Run.",
10019
+ errorMessage: "ctx.runPlayAsync input must be an object."
10020
+ },
10021
+ "ctx.runPlayAsync.options.description": {
10022
+ schema: Type.String({ minLength: 1 }),
10023
+ fixtures: {
10024
+ valid: "Request approval.",
10025
+ invalid: "",
10026
+ absent: void 0,
10027
+ unresolved: { expression: "description" },
10028
+ edition1: "Request approval."
10029
+ },
10030
+ referenceType: "string",
10031
+ required: true,
10032
+ resolution: "runtime-dynamic",
10033
+ issueCode: "play_authoring_run_play_option_invalid",
10034
+ description: "Non-empty purpose for one independent child Play Run.",
10035
+ errorMessage: "ctx.runPlayAsync options.description must be non-empty."
10036
+ },
9557
10037
  "runtime.timeout": {
9558
10038
  schema: Type.String({ pattern: "^\\d+\\s*[mh]$" }),
9559
10039
  fixtures: {
@@ -9841,6 +10321,10 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
9841
10321
  `export type CsvOptions = { description?: ${cloudReferenceType("ctx.csv.options.description")}; columns?: ${cloudReferenceType("ctx.csv.options.columns")}; rename?: ${cloudReferenceType("ctx.csv.options.rename")}; required?: ${cloudReferenceType("ctx.csv.options.required")} };`,
9842
10322
  "export type PlayCallExecution = 'inline';",
9843
10323
  `export type PlayCallOptions = { description: ${cloudReferenceType("ctx.runPlay.options.description")}; execution?: ${cloudReferenceType("ctx.runPlay.options.execution")}; timeoutMs?: ${cloudReferenceType("ctx.runPlay.options.timeoutMs")} };`,
10324
+ `export type PlayAsyncCallOptions = { description: ${cloudReferenceType("ctx.runPlayAsync.options.description")} };`,
10325
+ "declare const PLAY_RUN_ID_BRAND: unique symbol;",
10326
+ "export type PlayRunId = string & { readonly [PLAY_RUN_ID_BRAND]: 'PlayRunId' };",
10327
+ "export type AsyncPlayRunRef = Readonly<{ runId: PlayRunId }>;",
9844
10328
  `export type RuntimeStepOptions = { semanticKey?: ${cloudReferenceType("ctx.step.semanticKey")}; staleAfterSeconds?: ${cloudReferenceType("ctx.step.staleAfterSeconds")} };`,
9845
10329
  `export type FetchOptions = { staleAfterSeconds?: ${cloudReferenceType("ctx.fetch.staleAfterSeconds")}; transient?: boolean };`,
9846
10330
  "export type PlayFetchResponse = { ok: boolean; status: number; statusText: string; url: string; headers: Record<string, string>; bodyText: string; json: unknown | null };",
@@ -9866,11 +10350,11 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
9866
10350
  " withColumn<Name extends string, Value>(name: Name, definition: DatasetColumnDefinition<OutputRow, Value> & { readonly runIf: (row: OutputRow, index: number) => boolean | Promise<boolean> }): DatasetBuilder<InputRow, OutputRow & Record<Name, Value | null>>;",
9867
10351
  " withColumn<Name extends string, Value>(name: Name, definition: DatasetColumnDefinition<OutputRow, Value>): DatasetBuilder<InputRow, OutputRow & Record<Name, Value>>;",
9868
10352
  " withColumn<Name extends string, Value>(name: Name, resolver: StepResolver<OutputRow, Value> | RunnableColumnStepProgram<Value>, options: StepOptions<OutputRow, Value>): DatasetBuilder<InputRow, OutputRow & Record<Name, Value | null>>;",
9869
- " withColumns<Program extends StepProgram<OutputRow, object, unknown>>(program: Program): DatasetBuilder<InputRow, StepProgramOutput<Program>>;",
10353
+ " withColumns<ProgramOutput extends OutputRow, Return>(program: StepProgram<OutputRow, ProgramOutput, Return>): DatasetBuilder<InputRow, ProgramOutput>;",
9870
10354
  " step<Name extends string, Value>(name: Name, resolver: ColumnResolver<OutputRow, Value>): never;",
9871
10355
  " run(options?: DatasetRunOptions<InputRow>): Promise<PlayDataset<OutputRow>>;",
9872
10356
  "};",
9873
- "export type PlayReferenceLike = { readonly playName: string; readonly name?: string } | { readonly name: string; readonly playName?: string };",
10357
+ "export type PlayReferenceLike<TInput extends Record<string, unknown> = Record<string, unknown>> = ({ readonly playName: string; readonly name?: string } | { readonly name: string; readonly playName?: string }) & { readonly __inputType?: TInput };",
9874
10358
  "export interface DeeplinePlayRuntimeContext {",
9875
10359
  " csv<T = Record<string, unknown>>(path: string | CsvInput<T & object>, options?: CsvOptions): Promise<PlayDataset<T>>;",
9876
10360
  " dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): DatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object>;",
@@ -9884,6 +10368,8 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
9884
10368
  " fetch(key: string, url: string | URL, init?: RequestInit & { headers?: HeadersInit & { 'Idempotency-Key'?: string; 'X-Idempotency-Key'?: string }; auth?: SecretAuthInput }, options?: FetchOptions): Promise<PlayFetchResponse>;",
9885
10369
  " secrets: { get(name: string): SecretPromise; bearer(secret: string | SecretPromise | SecretHandle): SecretAuth; header(header: string, secret: string | SecretPromise | SecretHandle): SecretAuth };",
9886
10370
  ` runPlay<TOutput = unknown>(key: string, playRef: ${cloudReferenceType("ctx.runPlay.playRef")}, input: ${cloudReferenceType("ctx.runPlay.input")}, options: PlayCallOptions): Promise<TOutput>;`,
10371
+ " runPlayAsync<TInput extends Record<string, unknown>>(key: string, playRef: PlayReferenceLike<TInput>, input: NoInfer<TInput>, options: PlayAsyncCallOptions): Promise<AsyncPlayRunRef>;",
10372
+ " runPlayAsync(key: string, playRef: string, input: Record<string, unknown>, options: PlayAsyncCallOptions): Promise<AsyncPlayRunRef>;",
9887
10373
  " log(message: string, options?: { level?: 'debug' | 'info' | 'warn' | 'error' }): void;",
9888
10374
  ` sleep(ms: ${cloudReferenceType("ctx.sleep.ms")}): Promise<void>;`,
9889
10375
  "}",