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.js CHANGED
@@ -94,6 +94,26 @@ __export(src_exports, {
94
94
  });
95
95
  module.exports = __toCommonJS(src_exports);
96
96
 
97
+ // src/pagination.ts
98
+ async function* iterateCursorPages(fetchPage) {
99
+ let cursor = null;
100
+ const seen = /* @__PURE__ */ new Set();
101
+ for (; ; ) {
102
+ const page = await fetchPage(cursor);
103
+ if (page.hasMore) {
104
+ if (!page.cursor || seen.has(page.cursor)) {
105
+ throw new Error(
106
+ "Pagination reported more results without an advancing cursor"
107
+ );
108
+ }
109
+ seen.add(page.cursor);
110
+ }
111
+ yield page.items;
112
+ if (!page.hasMore) return;
113
+ cursor = page.cursor;
114
+ }
115
+ }
116
+
97
117
  // src/config.ts
98
118
  var import_node_fs = require("fs");
99
119
  var import_node_os = require("os");
@@ -779,7 +799,10 @@ function resolveConfig(options) {
779
799
  apiKey,
780
800
  baseUrl,
781
801
  timeout: options?.timeout ?? DEFAULT_TIMEOUT,
782
- maxRetries: options?.maxRetries ?? DEFAULT_MAX_RETRIES
802
+ maxRetries: options?.maxRetries ?? DEFAULT_MAX_RETRIES,
803
+ // Pass through untouched: the transport owns case-insensitive merging so
804
+ // there is exactly one place that decides which header wins.
805
+ ...options?.headers ? { headers: { ...options.headers } } : {}
783
806
  };
784
807
  }
785
808
 
@@ -832,20 +855,27 @@ var SDK_RELEASE = {
832
855
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
833
856
  // getters keep their established compatibility behavior.
834
857
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
835
- version: "0.3.88",
836
- 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.",
858
+ // 0.3.90 is the first deliberately versioned SDK release for API v3. Play
859
+ // grep hard-cuts to the single Convex full-text index; it does not retain a
860
+ // registry/scanner reader for any SDK/API major.
861
+ version: "0.3.90",
862
+ 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.",
837
863
  packageCapabilities: {
838
864
  updatePreferences: 1
839
865
  },
840
866
  contracts: {
841
867
  api: {
842
868
  name: "sdk-http-api",
843
- // API v2 is append-only. A breaking public request/response change needs
844
- // v3 and an explicit v2 support-window decision, never a patch release.
845
- currentMajor: 2,
846
- supportedMajors: [2],
847
- // Accepted only to bridge SDKs released before X-Deepline-API-Major.
869
+ // API v3 hard-cuts Play grep to the canonical Convex index. API v2 stays
870
+ // admitted for the explicit SDK support window, but it selects neither a
871
+ // registry scanner nor another grep reader: every accepted grep request
872
+ // uses the same indexed query and retired flags fail at the API boundary.
873
+ currentMajor: 3,
874
+ supportedMajors: [3, 2],
875
+ // The first wire id is emitted by the current SDK. Remaining ids are
876
+ // accepted only while the API v2 support window is open.
848
877
  legacyWireIds: [
878
+ "2026-09-play-grep-convex-index-hard-cutover",
849
879
  "2026-07-admin-cli-local-cutover",
850
880
  "2026-07-native-monitor-launch-hard-cutover"
851
881
  ]
@@ -1377,11 +1407,33 @@ function normalizeRequestAbortError(error, input) {
1377
1407
  }
1378
1408
  return normalized;
1379
1409
  }
1410
+ function applyExplicitHeaders(headers, explicit) {
1411
+ if (!explicit) return headers;
1412
+ for (const [rawName, value] of Object.entries(explicit)) {
1413
+ const name = rawName.trim().toLowerCase();
1414
+ if (!name) continue;
1415
+ for (const existing of Object.keys(headers)) {
1416
+ if (existing.toLowerCase() === name) delete headers[existing];
1417
+ }
1418
+ headers[name] = value;
1419
+ }
1420
+ return headers;
1421
+ }
1380
1422
  function isAbortLikeError(error) {
1381
1423
  const name = error.name.toLowerCase();
1382
1424
  const message = error.message.toLowerCase();
1383
1425
  return name === "aborterror" || message.includes("operation was aborted") || message === "aborted";
1384
1426
  }
1427
+ function withErrorCause(error, cause) {
1428
+ if (cause !== null && cause !== void 0) {
1429
+ Object.defineProperty(error, "cause", {
1430
+ value: cause,
1431
+ configurable: true,
1432
+ writable: true
1433
+ });
1434
+ }
1435
+ return error;
1436
+ }
1385
1437
  function mapNetworkError(baseUrl, error, targetLabel2) {
1386
1438
  const tagged = error;
1387
1439
  const timeoutMs = tagged?.[REQUEST_TIMEOUT_MARKER];
@@ -1498,7 +1550,7 @@ var HttpClient = class {
1498
1550
  if (coordinatorInternalToken?.trim() && (coordinatorUrl?.trim() || workerCallbackUrl?.trim() || runtimeTestFault?.trim() || absurdReleaseOverride?.trim() || preferredReceiptGatewayMachineId?.trim())) {
1499
1551
  headers[COORDINATOR_INTERNAL_TOKEN_HEADER] = coordinatorInternalToken.trim();
1500
1552
  }
1501
- return headers;
1553
+ return applyExplicitHeaders(headers, this.config.headers);
1502
1554
  }
1503
1555
  /**
1504
1556
  * Send an HTTP request with automatic retries and error handling.
@@ -1652,32 +1704,38 @@ var HttpClient = class {
1652
1704
  );
1653
1705
  if (options?.toolId) {
1654
1706
  const code = mappedNetworkError.code;
1655
- throw new ToolExecutionError(
1656
- withCoworkNetworkHint(mappedNetworkError.message),
1657
- {
1658
- toolId: options.toolId,
1659
- provider: providerLabelFromToolId(options.toolId),
1660
- operation: options.toolId,
1661
- code,
1662
- origin: "deepline",
1663
- category: "network",
1664
- // A direct client timeout has ambiguous delivery. Fail closed unless
1665
- // the server returns the authoritative action delivery contract.
1666
- retryable: false,
1667
- statusCode: null,
1668
- requestId: null,
1669
- retryAfterMs: null,
1670
- networkKind: code === "NETWORK_TIMEOUT" ? "timeout" : code === "NETWORK_ABORTED" ? "unknown" : "unavailable",
1671
- networkScope: "client_to_deepline",
1672
- details: mappedNetworkError.details
1673
- }
1707
+ throw withErrorCause(
1708
+ new ToolExecutionError(
1709
+ withCoworkNetworkHint(mappedNetworkError.message),
1710
+ {
1711
+ toolId: options.toolId,
1712
+ provider: providerLabelFromToolId(options.toolId),
1713
+ operation: options.toolId,
1714
+ code,
1715
+ origin: "deepline",
1716
+ category: "network",
1717
+ // A direct client timeout has ambiguous delivery. Fail closed unless
1718
+ // the server returns the authoritative action delivery contract.
1719
+ retryable: false,
1720
+ statusCode: null,
1721
+ requestId: null,
1722
+ retryAfterMs: null,
1723
+ networkKind: code === "NETWORK_TIMEOUT" ? "timeout" : code === "NETWORK_ABORTED" ? "unknown" : "unavailable",
1724
+ networkScope: "client_to_deepline",
1725
+ details: mappedNetworkError.details
1726
+ }
1727
+ ),
1728
+ lastError
1674
1729
  );
1675
1730
  }
1676
- throw new DeeplineError(
1677
- withCoworkNetworkHint(mappedNetworkError.message),
1678
- void 0,
1679
- mappedNetworkError.code,
1680
- mappedNetworkError.details
1731
+ throw withErrorCause(
1732
+ new DeeplineError(
1733
+ withCoworkNetworkHint(mappedNetworkError.message),
1734
+ void 0,
1735
+ mappedNetworkError.code,
1736
+ mappedNetworkError.details
1737
+ ),
1738
+ lastError
1681
1739
  );
1682
1740
  }
1683
1741
  /**
@@ -2026,6 +2084,17 @@ var PRODUCT_NOTIFICATION_DELIVERY_LEASE_MS = 2 * 6e4;
2026
2084
  var PRODUCT_NOTIFICATION_SUCCESS_TTL_MS = 15 * 6e4;
2027
2085
  var PRODUCT_NOTIFICATION_FAILURE_TTL_MS = 24 * 60 * 6e4;
2028
2086
 
2087
+ // ../product-notifications/configuration.ts
2088
+ var PRODUCT_NOTIFICATION_EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
2089
+ function normalizeProductNotificationEmail(value) {
2090
+ const email = typeof value === "string" ? value.trim().toLowerCase() : "";
2091
+ return email && email.length <= 320 && PRODUCT_NOTIFICATION_EMAIL_PATTERN.test(email) ? email : null;
2092
+ }
2093
+ var DEFAULT_PRODUCT_NOTIFICATION_DELIVERY_TIMING = {
2094
+ mode: "rolling_limit",
2095
+ windowMs: 36e5
2096
+ };
2097
+
2029
2098
  // src/stream-reconnect.ts
2030
2099
  var STREAM_RECONNECT_BASE_DELAY_MS = 500;
2031
2100
  var STREAM_RECONNECT_MAX_DELAY_MS = 15e3;
@@ -2554,7 +2623,7 @@ function isRecord4(value) {
2554
2623
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
2555
2624
  }
2556
2625
  function isPlayActivityObservation(value) {
2557
- 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)) {
2626
+ 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)) {
2558
2627
  return false;
2559
2628
  }
2560
2629
  const targetKinds = /* @__PURE__ */ new Set([
@@ -2661,7 +2730,6 @@ function projectPlayRunActivity(input) {
2661
2730
  if (input.waitKind === "detached_runner") {
2662
2731
  return projection(
2663
2732
  {
2664
- schemaVersion: 1,
2665
2733
  activityId: "runner:managed",
2666
2734
  target: {
2667
2735
  kind: "runner",
@@ -2677,7 +2745,6 @@ function projectPlayRunActivity(input) {
2677
2745
  if (input.waitKind === "sleep") {
2678
2746
  return projection(
2679
2747
  {
2680
- schemaVersion: 1,
2681
2748
  activityId: "run:sleep",
2682
2749
  target: {
2683
2750
  kind: "step",
@@ -2697,7 +2764,6 @@ function projectPlayRunActivity(input) {
2697
2764
  if (input.waitKind === "integration_event" || input.waitKind === "integration_event_batch") {
2698
2765
  return projection(
2699
2766
  {
2700
- schemaVersion: 1,
2701
2767
  activityId: `event:${input.activeNodeId ?? "run"}`,
2702
2768
  stepId: input.activeNodeId ?? void 0,
2703
2769
  target: {
@@ -2721,7 +2787,6 @@ function projectPlayRunActivity(input) {
2721
2787
  if (normalizedStatus === "waiting") {
2722
2788
  return projection(
2723
2789
  {
2724
- schemaVersion: 1,
2725
2790
  activityId: "run:legacy-wait",
2726
2791
  target: {
2727
2792
  kind: "step",
@@ -2748,7 +2813,6 @@ function projectPlayRunActivity(input) {
2748
2813
  const datasetProgress = datasetStep?.progress ?? null;
2749
2814
  return projection(
2750
2815
  {
2751
- schemaVersion: 1,
2752
2816
  activityId: `dataset:${pendingDataset.datasetId ?? pendingDataset.tableNamespace}`,
2753
2817
  target: {
2754
2818
  kind: "dataset",
@@ -2776,7 +2840,6 @@ function projectPlayRunActivity(input) {
2776
2840
  const provider = toolId?.split(/[._]/)[0]?.trim() || null;
2777
2841
  return projection(
2778
2842
  {
2779
- schemaVersion: 1,
2780
2843
  activityId: `step:${activeStep.nodeId}`,
2781
2844
  stepId: activeStep.nodeId,
2782
2845
  target: toolId && provider ? {
@@ -2801,7 +2864,6 @@ function projectPlayRunActivity(input) {
2801
2864
  if (normalizedStatus === "queued") {
2802
2865
  return projection(
2803
2866
  {
2804
- schemaVersion: 1,
2805
2867
  activityId: "capacity:worker",
2806
2868
  target: { kind: "capacity", pool: "worker" },
2807
2869
  state: { kind: "queued", reason: "capacity" },
@@ -2811,7 +2873,6 @@ function projectPlayRunActivity(input) {
2811
2873
  );
2812
2874
  }
2813
2875
  const fallback = {
2814
- schemaVersion: 1,
2815
2876
  activityId: "run:legacy",
2816
2877
  target: {
2817
2878
  kind: "step",
@@ -3826,7 +3887,7 @@ async function* observeRunEvents(options) {
3826
3887
  }
3827
3888
  }
3828
3889
 
3829
- // ../../shared_libs/integrations/theirstack-execution-policy.ts
3890
+ // ../integration-contracts/theirstack/execution-policy.ts
3830
3891
  var THEIRSTACK_SLOW_JOB_SEARCH_PROVIDER_TIMEOUT_MS = 135e3;
3831
3892
  var THEIRSTACK_SLOW_JOB_SEARCH_CLIENT_TIMEOUT_MS = 6e4 + THEIRSTACK_SLOW_JOB_SEARCH_PROVIDER_TIMEOUT_MS + 15e3;
3832
3893
  var THEIRSTACK_COMPANY_SEARCH_CLIENT_TIMEOUT_MS = 21e4;
@@ -3880,7 +3941,7 @@ function resolveTheirstackClientTimeoutMs(endpointId, payload) {
3880
3941
  return usesExtendedTheirstackJobSearchBudget(endpointId, payload) ? THEIRSTACK_SLOW_JOB_SEARCH_CLIENT_TIMEOUT_MS : null;
3881
3942
  }
3882
3943
 
3883
- // ../../shared_libs/integrations/bettercontact-execution-policy.ts
3944
+ // ../integration-contracts/bettercontact/execution-policy.ts
3884
3945
  var BETTERCONTACT_LAUNCHER_CLIENT_TIMEOUT_MS = 12e4;
3885
3946
  var BETTERCONTACT_LAUNCHER_TOOL_IDS = /* @__PURE__ */ new Set([
3886
3947
  "bettercontact_enrich",
@@ -3971,6 +4032,42 @@ function providerMetaFromToolResponseRawV2(rawV2, view) {
3971
4032
  }
3972
4033
 
3973
4034
  // src/client.ts
4035
+ var MAX_NOTIFICATION_GROUP_CREATE_TARGETS = 50;
4036
+ function parseNotificationGroupTarget(value) {
4037
+ const normalized = value.trim();
4038
+ if (normalized.toLowerCase().startsWith("email:")) {
4039
+ const email = normalizeProductNotificationEmail(normalized.slice(6));
4040
+ if (!email) {
4041
+ throw new Error(
4042
+ `Invalid email notification target "${value}". Use --to email:name@example.com.`
4043
+ );
4044
+ }
4045
+ return { kind: "email", email };
4046
+ }
4047
+ const slack = /^slack:(.+)$/i.exec(normalized)?.[1]?.trim();
4048
+ if (!slack) {
4049
+ const provider = normalized.split(":", 1)[0] || normalized;
4050
+ throw new Error(
4051
+ `Unsupported notification destination "${provider}". Use email: or slack:.`
4052
+ );
4053
+ }
4054
+ const member = /^member:([UW][A-Z0-9]{8,})$/i.exec(slack);
4055
+ if (member?.[1]) {
4056
+ return { kind: "slack", memberId: member[1].toUpperCase() };
4057
+ }
4058
+ if (slack.toLowerCase().startsWith("member:")) {
4059
+ throw new Error(
4060
+ "Slack member IDs must look like slack:member:U0123456789."
4061
+ );
4062
+ }
4063
+ if (!slack.replace(/^#/, "").trim()) {
4064
+ throw new Error("Use --to slack:#channel.");
4065
+ }
4066
+ return { kind: "slack", channel: slack };
4067
+ }
4068
+ function notificationObjectKey(kind) {
4069
+ return `${kind}.${globalThis.crypto.randomUUID()}`;
4070
+ }
3974
4071
  var TERMINAL_PLAY_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]);
3975
4072
  var INCLUDE_TOOL_METADATA_HEADER = "x-deepline-include-tool-metadata";
3976
4073
  var EXECUTE_RESPONSE_CONTRACT_HEADER = "x-deepline-execute-response-contract";
@@ -4490,6 +4587,7 @@ var DeeplineClient = class {
4490
4587
  this.runs = {
4491
4588
  get: (runId, options2) => this.getRunStatus(runId, options2),
4492
4589
  list: (options2) => this.listRuns(options2),
4590
+ listPage: (options2) => this.listRunsPage(options2),
4493
4591
  tail: (runId, options2) => this.tailRun(runId, options2),
4494
4592
  logs: (runId, options2) => this.getRunLogs(runId, options2),
4495
4593
  input: (runId) => this.getRunInput(runId),
@@ -4540,6 +4638,10 @@ var DeeplineClient = class {
4540
4638
  audit: (options2) => this.auditMonitors(options2),
4541
4639
  repair: (options2) => this.repairMonitors(options2),
4542
4640
  health: (options2) => this.readMonitorsHealth(options2),
4641
+ batch: {
4642
+ submit: (options2) => this.submitMonitorBatch(options2),
4643
+ get: (operationId, options2) => this.getMonitorBatch(operationId, options2)
4644
+ },
4543
4645
  fleets: {
4544
4646
  sync: (definitionOrId, options2) => this.syncMonitorFleet(definitionOrId, options2),
4545
4647
  get: (fleetId, options2) => fleetId === void 0 ? this.listMonitorFleets() : this.getMonitorFleet(fleetId, options2),
@@ -4672,6 +4774,16 @@ var DeeplineClient = class {
4672
4774
  (secret) => secret.name === normalized && secret.status === "active" && secret.hasValue
4673
4775
  ) ?? null;
4674
4776
  }
4777
+ /** Check effective scope and active-version health without reading the value.
4778
+ * Without playName, checks the organization-scoped secret only. With a Play
4779
+ * name, an active Play secret takes precedence; a deleted/disabled Play
4780
+ * secret falls back to the organization-scoped secret.
4781
+ */
4782
+ async inspectSecret(name, options = {}) {
4783
+ const params = new URLSearchParams({ name: name.trim().toUpperCase() });
4784
+ if (options.playName !== void 0) params.set("play", options.playName);
4785
+ return this.http.get(`/api/v2/secrets?${params.toString()}`);
4786
+ }
4675
4787
  // ——————————————————————————————————————————————————————————
4676
4788
  // Tools
4677
4789
  // ——————————————————————————————————————————————————————————
@@ -4763,6 +4875,10 @@ var DeeplineClient = class {
4763
4875
  `/api/v2/integrations/${encodeURIComponent(toolId)}/get`,
4764
4876
  {
4765
4877
  method: "GET",
4878
+ // Tool metadata is a read-only catalog lookup. Keep the metadata
4879
+ // header while opting into the same transient edge-response retries as
4880
+ // other GET catalog methods such as searchTools().
4881
+ retryApiErrors: true,
4766
4882
  headers: {
4767
4883
  "x-deepline-tool-meta-only": "1"
4768
4884
  }
@@ -5685,6 +5801,10 @@ var DeeplineClient = class {
5685
5801
  * ```
5686
5802
  */
5687
5803
  async listRuns(options) {
5804
+ return (await this.listRunsPage(options)).runs;
5805
+ }
5806
+ /** Read one run page without discarding server pagination metadata. */
5807
+ async listRunsPage(options) {
5688
5808
  const playName = options.play?.trim();
5689
5809
  const params = new URLSearchParams();
5690
5810
  if (playName) {
@@ -5715,7 +5835,7 @@ var DeeplineClient = class {
5715
5835
  const response = await this.http.get(
5716
5836
  `/api/v2/runs?${params.toString()}`
5717
5837
  );
5718
- return response.runs ?? [];
5838
+ return { ...response, runs: response.runs ?? [] };
5719
5839
  }
5720
5840
  /**
5721
5841
  * Observe one run's live events. Uses the Convex Run Snapshot subscription
@@ -6110,13 +6230,33 @@ var DeeplineClient = class {
6110
6230
  );
6111
6231
  }
6112
6232
  /**
6113
- * List callable plays visible to the workspace.
6233
+ * List one page of callable plays; grep retains exhaustive matching results.
6234
+ * Use listPlaysPage to retain pagination metadata.
6114
6235
  *
6115
6236
  * Pass `origin: "prebuilt"` for Deepline-managed prebuilts or
6116
6237
  * `origin: "owned"` for org-owned plays.
6117
6238
  */
6118
6239
  async listPlays(options) {
6240
+ if (!options?.grep?.trim()) {
6241
+ return (await this.requestPlaysPage(options, false)).plays;
6242
+ }
6243
+ const plays = [];
6244
+ for await (const items of iterateCursorPages(async (cursor) => {
6245
+ const page = await this.listPlaysPage({ ...options, cursor });
6246
+ return { items: page.plays, cursor: page.cursor, hasMore: page.hasMore };
6247
+ })) {
6248
+ plays.push(...items);
6249
+ }
6250
+ return plays;
6251
+ }
6252
+ /** Read one bounded inventory page; cursor continues the same filters. */
6253
+ async listPlaysPage(options) {
6254
+ return this.requestPlaysPage(options);
6255
+ }
6256
+ async requestPlaysPage(options, paginateInventory = true) {
6119
6257
  const params = new URLSearchParams();
6258
+ if (paginateInventory && !options?.grep?.trim())
6259
+ params.set("inventory_paginated", "1");
6120
6260
  if (options?.origin) params.set("origin", options.origin);
6121
6261
  if (options?.categories) {
6122
6262
  params.set(
@@ -6128,26 +6268,27 @@ var DeeplineClient = class {
6128
6268
  params.set("include_tool_categories", "1");
6129
6269
  }
6130
6270
  if (options?.includeArchived) params.set("include_archived", "1");
6271
+ if (options?.includeCostEstimates) {
6272
+ params.set("include_cost_estimates", "1");
6273
+ }
6131
6274
  if (options?.grep?.trim()) {
6132
6275
  params.set("grep", options.grep.trim());
6133
- params.set("grep_mode", options.grepMode ?? "all");
6134
- params.set("grep_paginated", "1");
6135
6276
  params.set("limit", "60");
6136
6277
  }
6137
- const plays = [];
6138
- let cursor = null;
6139
- let hasMore = true;
6140
- do {
6141
- if (cursor) params.set("cursor", cursor);
6142
- const suffix = params.toString() ? `?${params.toString()}` : "";
6143
- const response = await this.http.get(
6144
- `/api/v2/plays${suffix}`
6145
- );
6146
- plays.push(...response.plays ?? []);
6147
- cursor = response.pagination?.cursor ?? response.cursor ?? null;
6148
- hasMore = Boolean(response.pagination?.hasMore ?? response.hasMore);
6149
- } while (Boolean(options?.grep?.trim()) && hasMore && cursor);
6150
- return plays;
6278
+ if (options?.limit !== void 0) {
6279
+ if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
6280
+ throw new Error("Play page limit must be a positive integer");
6281
+ }
6282
+ params.set("limit", String(options.limit));
6283
+ }
6284
+ if (options?.cursor) params.set("cursor", options.cursor);
6285
+ const suffix = params.size ? `?${params.toString()}` : "";
6286
+ const response = await this.http.get(`/api/v2/plays${suffix}`);
6287
+ return {
6288
+ plays: response.plays ?? [],
6289
+ cursor: response.pagination?.cursor ?? response.cursor ?? null,
6290
+ hasMore: Boolean(response.pagination?.hasMore ?? response.hasMore)
6291
+ };
6151
6292
  }
6152
6293
  /** Set whether an org-owned Play sorts before unpinned Plays. */
6153
6294
  async setPlayPinned(playName, pinned) {
@@ -6218,6 +6359,197 @@ var DeeplineClient = class {
6218
6359
  async getNotifications() {
6219
6360
  return this.http.get("/api/v2/notifications");
6220
6361
  }
6362
+ /** Read the group-based product-notification configuration and rule catalog. */
6363
+ async getNotificationConfiguration() {
6364
+ return this.http.get("/api/v2/notifications/configuration");
6365
+ }
6366
+ /** Atomically apply one retry-safe desired configuration change. */
6367
+ async changeNotificationConfiguration(expectedWorkspaceVersion, change) {
6368
+ return this.http.put("/api/v2/notifications/configuration", {
6369
+ expectedWorkspaceVersion,
6370
+ change
6371
+ });
6372
+ }
6373
+ /** Create one notification group and its destinations as a retry-safe unit. */
6374
+ async createNotificationGroup(input) {
6375
+ const name = input.name.trim().replace(/\s+/g, " ");
6376
+ if (!name) throw new Error("Notification group name is required.");
6377
+ if (input.targets.length < 1 || input.targets.length > MAX_NOTIFICATION_GROUP_CREATE_TARGETS) {
6378
+ throw new Error(
6379
+ `Choose between 1 and ${MAX_NOTIFICATION_GROUP_CREATE_TARGETS} notification targets.`
6380
+ );
6381
+ }
6382
+ const targets = input.targets.map(parseNotificationGroupTarget);
6383
+ const legacyEvents = input.legacyEvents ?? [];
6384
+ const legacyTarget = targets.length === 1 && targets[0]?.kind === "slack" && legacyEvents.length > 0 ? targets[0] : null;
6385
+ if (legacyEvents.length > 0 && !legacyTarget) {
6386
+ throw new Error(
6387
+ "--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
6388
+ );
6389
+ }
6390
+ if (!legacyTarget && name.toLowerCase() === "default") {
6391
+ throw new Error(
6392
+ "Default is reserved for the workspace default notification group."
6393
+ );
6394
+ }
6395
+ const normalizedTargets = targets.map(
6396
+ (target) => target.kind === "email" ? `email:${target.email}` : "memberId" in target ? `slack:member:${target.memberId}` : `slack:${target.channel}`
6397
+ );
6398
+ if (input.dryRun) {
6399
+ return {
6400
+ mode: "dry_run",
6401
+ compatibilityMode: legacyTarget !== null,
6402
+ name: legacyTarget ? input.name : name,
6403
+ targets: normalizedTargets,
6404
+ legacyEvents
6405
+ };
6406
+ }
6407
+ if (legacyTarget) {
6408
+ const notification = await this.createNotification({
6409
+ name: input.name,
6410
+ provider: "slack",
6411
+ ..."channel" in legacyTarget ? { channel: legacyTarget.channel } : { memberId: legacyTarget.memberId },
6412
+ eventTypes: legacyEvents
6413
+ });
6414
+ return { mode: "legacy", notification };
6415
+ }
6416
+ const current = await this.getNotificationConfiguration();
6417
+ const existingGroup = current.configuration.groups.find(
6418
+ (candidate) => candidate.name.toLowerCase() === name.toLowerCase()
6419
+ );
6420
+ const groupKey = existingGroup?.groupKey ?? notificationObjectKey("group");
6421
+ const group = existingGroup ?? {
6422
+ groupKey,
6423
+ name,
6424
+ enabled: true,
6425
+ deliveryTiming: DEFAULT_PRODUCT_NOTIFICATION_DELIVERY_TIMING,
6426
+ source: "workspace",
6427
+ configMode: "custom",
6428
+ version: 0
6429
+ };
6430
+ const destinations = current.configuration.destinations.filter(
6431
+ (destination) => destination.groupKey === groupKey
6432
+ );
6433
+ const emails = [
6434
+ ...new Set(
6435
+ targets.flatMap(
6436
+ (target) => target.kind === "email" ? [target.email] : []
6437
+ )
6438
+ )
6439
+ ].sort();
6440
+ const existingEmails = new Set(
6441
+ destinations.flatMap(
6442
+ (destination) => destination.settings.kind === "email_addresses" ? destination.settings.to : []
6443
+ )
6444
+ );
6445
+ const newEmails = emails.filter((email) => !existingEmails.has(email));
6446
+ if (newEmails.length > 0) {
6447
+ destinations.push({
6448
+ destinationKey: notificationObjectKey("destination"),
6449
+ groupKey,
6450
+ name: "Email recipients",
6451
+ enabled: true,
6452
+ source: "workspace",
6453
+ configMode: "custom",
6454
+ version: 0,
6455
+ status: "active",
6456
+ settings: { kind: "email_addresses", to: newEmails }
6457
+ });
6458
+ }
6459
+ const slackTargets = /* @__PURE__ */ new Map();
6460
+ for (const target of targets) {
6461
+ if (target.kind !== "slack") continue;
6462
+ const targetKey = "memberId" in target ? `member:${target.memberId}` : `channel:${target.channel.replace(/^#/, "").toLowerCase()}`;
6463
+ slackTargets.set(targetKey, target);
6464
+ }
6465
+ const connectionId = current.slackConnection.connectionId;
6466
+ if (slackTargets.size > 0 && !connectionId) {
6467
+ throw new Error(
6468
+ "Slack is not connected to this workspace. Connect it in Dashboard \u2192 Integrations, then retry."
6469
+ );
6470
+ }
6471
+ const resolvedSlackTargets = await Promise.all(
6472
+ [...slackTargets.values()].map(async (target) => {
6473
+ if ("memberId" in target) {
6474
+ return {
6475
+ targetKind: "member",
6476
+ targetId: target.memberId,
6477
+ targetName: target.memberId
6478
+ };
6479
+ }
6480
+ const channel = target.channel;
6481
+ const requested = channel.replace(/^#/, "");
6482
+ const response = await this.listNotificationChannels(channel);
6483
+ const matches = response.channels.filter(
6484
+ (candidate) => candidate.id === requested || candidate.name.toLowerCase() === requested.toLowerCase()
6485
+ );
6486
+ if (matches.length !== 1) {
6487
+ throw new Error(
6488
+ 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.`
6489
+ );
6490
+ }
6491
+ return {
6492
+ targetKind: "channel",
6493
+ targetId: matches[0].id,
6494
+ targetName: matches[0].name
6495
+ };
6496
+ })
6497
+ );
6498
+ const uniqueSlackTargets = new Map(
6499
+ resolvedSlackTargets.map((target) => [
6500
+ `${target.targetKind}:${target.targetId}`,
6501
+ target
6502
+ ])
6503
+ );
6504
+ for (const target of uniqueSlackTargets.values()) {
6505
+ if (destinations.some(
6506
+ (destination) => destination.settings.kind === "slack" && destination.settings.targetKind === target.targetKind && destination.settings.targetId === target.targetId
6507
+ )) {
6508
+ continue;
6509
+ }
6510
+ destinations.push({
6511
+ destinationKey: notificationObjectKey("destination"),
6512
+ groupKey,
6513
+ name: `${target.targetKind === "channel" ? "#" : "@"}${target.targetName}`,
6514
+ enabled: true,
6515
+ source: "workspace",
6516
+ configMode: "custom",
6517
+ version: 0,
6518
+ status: "pending_verification",
6519
+ settings: {
6520
+ kind: "slack",
6521
+ ...target,
6522
+ oauthConnectionId: connectionId
6523
+ }
6524
+ });
6525
+ }
6526
+ const draft = {
6527
+ group,
6528
+ destinations,
6529
+ rules: current.configuration.rules.filter(
6530
+ (rule) => rule.groupKey === groupKey
6531
+ )
6532
+ };
6533
+ const result = await this.changeNotificationConfiguration(
6534
+ current.configuration.workspaceVersion,
6535
+ { kind: "save_group", draft }
6536
+ );
6537
+ const storedGroup = result.configuration.groups.find(
6538
+ (candidate) => candidate.groupKey === groupKey
6539
+ );
6540
+ if (!storedGroup) {
6541
+ throw new Error("Notification group creation returned no saved group.");
6542
+ }
6543
+ return {
6544
+ mode: "native",
6545
+ groupKey,
6546
+ targets: normalizedTargets,
6547
+ group: storedGroup,
6548
+ destinations: result.configuration.destinations.filter(
6549
+ (destination) => destination.groupKey === groupKey
6550
+ )
6551
+ };
6552
+ }
6221
6553
  /** List Slack channels available to an already-connected Slack integration. */
6222
6554
  async listNotificationChannels(query) {
6223
6555
  const suffix = query ? `?search=${encodeURIComponent(query)}` : "";
@@ -6762,6 +7094,78 @@ var DeeplineClient = class {
6762
7094
  { method: "GET" }
6763
7095
  );
6764
7096
  }
7097
+ /** Submit durable monitor work; transport retries use the same idempotency key. */
7098
+ async submitMonitorBatch(options) {
7099
+ const idempotencyKey = options.idempotencyKey.trim();
7100
+ if (!idempotencyKey) {
7101
+ throw new DeeplineError(
7102
+ "Monitor batch idempotencyKey is required.",
7103
+ void 0,
7104
+ "INVALID_MONITOR_BATCH_IDEMPOTENCY_KEY"
7105
+ );
7106
+ }
7107
+ if (options.kind === "deploy") {
7108
+ if (!options.manifestNdjson.trim()) {
7109
+ throw new DeeplineError(
7110
+ "Monitor batch deploy requires a non-empty NDJSON manifest.",
7111
+ void 0,
7112
+ "INVALID_MONITOR_BATCH_MANIFEST"
7113
+ );
7114
+ }
7115
+ return this.http.request(
7116
+ "/api/v2/monitors/batch",
7117
+ {
7118
+ method: "POST",
7119
+ body: {
7120
+ kind: "deploy",
7121
+ manifest_ndjson: options.manifestNdjson,
7122
+ dry_run: options.dryRun === true,
7123
+ idempotency_key: idempotencyKey
7124
+ },
7125
+ headers: { "Idempotency-Key": idempotencyKey },
7126
+ maxRetries: 0,
7127
+ exactUrlOnly: true
7128
+ }
7129
+ );
7130
+ }
7131
+ 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 };
7132
+ return this.http.request(
7133
+ "/api/v2/monitors/batch",
7134
+ {
7135
+ method: "POST",
7136
+ body: {
7137
+ kind: options.kind,
7138
+ scope,
7139
+ dry_run: options.dryRun === true,
7140
+ idempotency_key: idempotencyKey,
7141
+ ...options.deactivationReason === void 0 ? {} : { deactivation_reason: options.deactivationReason }
7142
+ },
7143
+ headers: { "Idempotency-Key": idempotencyKey },
7144
+ // Durable submission is itself idempotent, but an ambiguous local retry
7145
+ // must retain the exact key and never turn a CLI attempt into two runs.
7146
+ maxRetries: 0,
7147
+ exactUrlOnly: true
7148
+ }
7149
+ );
7150
+ }
7151
+ /** Get durable batch progress and a bounded retained evidence page. */
7152
+ async getMonitorBatch(operationId, options) {
7153
+ const runId = operationId.trim();
7154
+ if (!runId) {
7155
+ throw new DeeplineError(
7156
+ "Monitor batch operation id is required.",
7157
+ void 0,
7158
+ "INVALID_MONITOR_BATCH_OPERATION_ID"
7159
+ );
7160
+ }
7161
+ const params = new URLSearchParams();
7162
+ if (options?.cursor) params.set("cursor", options.cursor);
7163
+ const suffix = params.size > 0 ? `?${params}` : "";
7164
+ return this.http.request(
7165
+ `/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
7166
+ { method: "GET" }
7167
+ );
7168
+ }
6765
7169
  /**
6766
7170
  * The deployable monitor tools catalog. Pass a tool id (positional or
6767
7171
  * `{ tool }`) to describe one tool's full payload/stream contract, or no tool
@@ -9642,6 +10046,82 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
9642
10046
  description: "Unsupported legacy child-workflow timeout.",
9643
10047
  errorMessage: "ctx.runPlay timeoutMs is unsupported because child Plays execute inline."
9644
10048
  },
10049
+ "ctx.runPlayAsync.key": {
10050
+ schema: import_typebox.Type.String({ minLength: 1 }),
10051
+ fixtures: {
10052
+ valid: "request-approval",
10053
+ invalid: "",
10054
+ absent: void 0,
10055
+ unresolved: { expression: "callKey" },
10056
+ edition1: "request-approval"
10057
+ },
10058
+ referenceType: "string",
10059
+ required: true,
10060
+ resolution: "runtime-dynamic",
10061
+ issueCode: "play_authoring_run_play_option_invalid",
10062
+ description: "Stable identity for one independent child Play Run.",
10063
+ errorMessage: "ctx.runPlayAsync key must be a non-empty string."
10064
+ },
10065
+ "ctx.runPlayAsync.playRef": {
10066
+ schema: import_typebox.Type.Union([
10067
+ import_typebox.Type.String({ minLength: 1 }),
10068
+ import_typebox.Type.Union([
10069
+ import_typebox.Type.Object(
10070
+ { playName: import_typebox.Type.String({ minLength: 1 }) },
10071
+ { additionalProperties: true }
10072
+ ),
10073
+ import_typebox.Type.Object(
10074
+ { name: import_typebox.Type.String({ minLength: 1 }) },
10075
+ { additionalProperties: true }
10076
+ )
10077
+ ])
10078
+ ]),
10079
+ fixtures: {
10080
+ valid: "request-approval",
10081
+ invalid: {},
10082
+ absent: void 0,
10083
+ unresolved: { expression: "playRef" },
10084
+ edition1: "request-approval"
10085
+ },
10086
+ referenceType: "string | PlayReferenceLike",
10087
+ required: true,
10088
+ resolution: "runtime-dynamic",
10089
+ issueCode: "play_authoring_run_play_option_invalid",
10090
+ description: "Independently published scalar child Play name or strongly typed definition handle.",
10091
+ errorMessage: "ctx.runPlayAsync playRef must be a non-empty Play name or definition handle."
10092
+ },
10093
+ "ctx.runPlayAsync.input": {
10094
+ schema: import_typebox.Type.Record(import_typebox.Type.String(), import_typebox.Type.Unknown()),
10095
+ fixtures: {
10096
+ valid: { draftId: "draft-1" },
10097
+ invalid: "draft-1",
10098
+ absent: void 0,
10099
+ unresolved: "childInput",
10100
+ edition1: {}
10101
+ },
10102
+ referenceType: "Record<string, unknown>",
10103
+ required: true,
10104
+ resolution: "runtime-dynamic",
10105
+ issueCode: "play_authoring_run_play_option_invalid",
10106
+ description: "Scalar input object submitted to the independent child Run.",
10107
+ errorMessage: "ctx.runPlayAsync input must be an object."
10108
+ },
10109
+ "ctx.runPlayAsync.options.description": {
10110
+ schema: import_typebox.Type.String({ minLength: 1 }),
10111
+ fixtures: {
10112
+ valid: "Request approval.",
10113
+ invalid: "",
10114
+ absent: void 0,
10115
+ unresolved: { expression: "description" },
10116
+ edition1: "Request approval."
10117
+ },
10118
+ referenceType: "string",
10119
+ required: true,
10120
+ resolution: "runtime-dynamic",
10121
+ issueCode: "play_authoring_run_play_option_invalid",
10122
+ description: "Non-empty purpose for one independent child Play Run.",
10123
+ errorMessage: "ctx.runPlayAsync options.description must be non-empty."
10124
+ },
9645
10125
  "runtime.timeout": {
9646
10126
  schema: import_typebox.Type.String({ pattern: "^\\d+\\s*[mh]$" }),
9647
10127
  fixtures: {
@@ -9929,6 +10409,10 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
9929
10409
  `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")} };`,
9930
10410
  "export type PlayCallExecution = 'inline';",
9931
10411
  `export type PlayCallOptions = { description: ${cloudReferenceType("ctx.runPlay.options.description")}; execution?: ${cloudReferenceType("ctx.runPlay.options.execution")}; timeoutMs?: ${cloudReferenceType("ctx.runPlay.options.timeoutMs")} };`,
10412
+ `export type PlayAsyncCallOptions = { description: ${cloudReferenceType("ctx.runPlayAsync.options.description")} };`,
10413
+ "declare const PLAY_RUN_ID_BRAND: unique symbol;",
10414
+ "export type PlayRunId = string & { readonly [PLAY_RUN_ID_BRAND]: 'PlayRunId' };",
10415
+ "export type AsyncPlayRunRef = Readonly<{ runId: PlayRunId }>;",
9932
10416
  `export type RuntimeStepOptions = { semanticKey?: ${cloudReferenceType("ctx.step.semanticKey")}; staleAfterSeconds?: ${cloudReferenceType("ctx.step.staleAfterSeconds")} };`,
9933
10417
  `export type FetchOptions = { staleAfterSeconds?: ${cloudReferenceType("ctx.fetch.staleAfterSeconds")}; transient?: boolean };`,
9934
10418
  "export type PlayFetchResponse = { ok: boolean; status: number; statusText: string; url: string; headers: Record<string, string>; bodyText: string; json: unknown | null };",
@@ -9954,11 +10438,11 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
9954
10438
  " 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>>;",
9955
10439
  " withColumn<Name extends string, Value>(name: Name, definition: DatasetColumnDefinition<OutputRow, Value>): DatasetBuilder<InputRow, OutputRow & Record<Name, Value>>;",
9956
10440
  " withColumn<Name extends string, Value>(name: Name, resolver: StepResolver<OutputRow, Value> | RunnableColumnStepProgram<Value>, options: StepOptions<OutputRow, Value>): DatasetBuilder<InputRow, OutputRow & Record<Name, Value | null>>;",
9957
- " withColumns<Program extends StepProgram<OutputRow, object, unknown>>(program: Program): DatasetBuilder<InputRow, StepProgramOutput<Program>>;",
10441
+ " withColumns<ProgramOutput extends OutputRow, Return>(program: StepProgram<OutputRow, ProgramOutput, Return>): DatasetBuilder<InputRow, ProgramOutput>;",
9958
10442
  " step<Name extends string, Value>(name: Name, resolver: ColumnResolver<OutputRow, Value>): never;",
9959
10443
  " run(options?: DatasetRunOptions<InputRow>): Promise<PlayDataset<OutputRow>>;",
9960
10444
  "};",
9961
- "export type PlayReferenceLike = { readonly playName: string; readonly name?: string } | { readonly name: string; readonly playName?: string };",
10445
+ "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 };",
9962
10446
  "export interface DeeplinePlayRuntimeContext {",
9963
10447
  " csv<T = Record<string, unknown>>(path: string | CsvInput<T & object>, options?: CsvOptions): Promise<PlayDataset<T>>;",
9964
10448
  " dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): DatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object>;",
@@ -9972,6 +10456,8 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
9972
10456
  " fetch(key: string, url: string | URL, init?: RequestInit & { headers?: HeadersInit & { 'Idempotency-Key'?: string; 'X-Idempotency-Key'?: string }; auth?: SecretAuthInput }, options?: FetchOptions): Promise<PlayFetchResponse>;",
9973
10457
  " secrets: { get(name: string): SecretPromise; bearer(secret: string | SecretPromise | SecretHandle): SecretAuth; header(header: string, secret: string | SecretPromise | SecretHandle): SecretAuth };",
9974
10458
  ` runPlay<TOutput = unknown>(key: string, playRef: ${cloudReferenceType("ctx.runPlay.playRef")}, input: ${cloudReferenceType("ctx.runPlay.input")}, options: PlayCallOptions): Promise<TOutput>;`,
10459
+ " runPlayAsync<TInput extends Record<string, unknown>>(key: string, playRef: PlayReferenceLike<TInput>, input: NoInfer<TInput>, options: PlayAsyncCallOptions): Promise<AsyncPlayRunRef>;",
10460
+ " runPlayAsync(key: string, playRef: string, input: Record<string, unknown>, options: PlayAsyncCallOptions): Promise<AsyncPlayRunRef>;",
9975
10461
  " log(message: string, options?: { level?: 'debug' | 'info' | 'warn' | 'error' }): void;",
9976
10462
  ` sleep(ms: ${cloudReferenceType("ctx.sleep.ms")}): Promise<void>;`,
9977
10463
  "}",