deepline 0.3.89 → 0.3.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/contracts/install-commands.json +29 -0
  2. package/dist/bundling-sources/sdk/src/client.ts +221 -43
  3. package/dist/bundling-sources/sdk/src/index.ts +4 -0
  4. package/dist/bundling-sources/sdk/src/monitor-fleet-contract.ts +2 -556
  5. package/dist/bundling-sources/sdk/src/monitor-fleets.ts +2 -2
  6. package/dist/bundling-sources/sdk/src/pagination.ts +25 -0
  7. package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +1 -1
  8. package/dist/bundling-sources/sdk/src/release.ts +11 -9
  9. package/dist/bundling-sources/sdk/src/types.ts +29 -1
  10. package/dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts +549 -0
  11. package/dist/bundling-sources/shared_libs/monitors/analytics-public.ts +10 -0
  12. package/dist/bundling-sources/shared_libs/monitors/fleets/errors.ts +96 -0
  13. package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +8 -0
  14. package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +320 -0
  15. package/dist/bundling-sources/shared_libs/monitors/fleets/verdict.ts +106 -0
  16. package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +8 -1
  17. package/dist/bundling-sources/shared_libs/monitors/inbound-queue.ts +4 -4
  18. package/dist/bundling-sources/shared_libs/monitors/inventory-reconciliation.ts +59 -0
  19. package/dist/bundling-sources/shared_libs/monitors/lifecycle-notifications.ts +7 -9
  20. package/dist/bundling-sources/shared_libs/monitors/monitor-fleet-limits.ts +2 -12
  21. package/dist/bundling-sources/shared_libs/monitors/package.json +113 -4
  22. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +56 -9
  23. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-consumer-health.ts +2 -2
  24. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +2 -2
  25. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-public-aliases.ts +1 -1
  26. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +245 -0
  27. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-message.ts +38 -0
  28. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue-ack-probe.ts +94 -0
  29. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue-delivery.ts +60 -0
  30. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue.ts +60 -0
  31. package/dist/bundling-sources/shared_libs/monitors/snitcher-install-validation.ts +1 -1
  32. package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +2 -2
  33. package/dist/bundling-sources/shared_libs/monitors/snitcher-radar.ts +1 -1
  34. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +1 -1
  35. package/dist/bundling-sources/shared_libs/observability/build-context.ts +13 -0
  36. package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +160 -0
  37. package/dist/bundling-sources/shared_libs/observability/request-context.ts +68 -0
  38. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +690 -0
  39. package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +35 -0
  40. package/dist/bundling-sources/shared_libs/observability/scheduled-work.ts +5 -0
  41. package/dist/bundling-sources/shared_libs/play-data-plane/neon-constants.ts +9 -0
  42. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +272 -0
  43. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +46 -1
  44. package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +66 -1
  45. package/dist/bundling-sources/shared_libs/play-runtime/async-play-invocation.ts +0 -1
  46. package/dist/bundling-sources/shared_libs/play-runtime/bounceban-batching.ts +137 -0
  47. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +779 -140
  48. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +46 -0
  49. package/dist/bundling-sources/shared_libs/play-runtime/daytona-payload-contract.ts +68 -0
  50. package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-janitor.ts +103 -0
  51. package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-reaper.ts +725 -0
  52. package/dist/bundling-sources/shared_libs/play-runtime/db-session-lease-store.ts +578 -0
  53. package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-execution-relay.ts +521 -0
  54. package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-receipt-gateway.ts +1378 -0
  55. package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/runtime-topology.ts +1024 -0
  56. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-gateway-route-probe.ts +193 -0
  57. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machine-lifecycle.ts +104 -0
  58. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +1844 -0
  59. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +21 -0
  60. package/dist/bundling-sources/shared_libs/play-runtime/deployment/process-tree.ts +40 -0
  61. package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-gateway-drain.ts +262 -0
  62. package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-surface.ts +98 -0
  63. package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +303 -0
  64. package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-tuple-publication-guardian.ts +70 -0
  65. package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-tuple-recovery.ts +519 -0
  66. package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-fly-rollback-alignment.ts +280 -0
  67. package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-production-gate.ts +159 -0
  68. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +29 -0
  69. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +23 -0
  70. package/dist/bundling-sources/shared_libs/play-runtime/execution-gateway-invocation-fence.ts +442 -0
  71. package/dist/bundling-sources/shared_libs/play-runtime/execution-protocol.ts +3 -3
  72. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +18 -0
  73. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +9 -0
  74. package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +1 -1
  75. package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +1 -1
  76. package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/contracts.ts +66 -0
  77. package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/job.ts +145 -0
  78. package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/memory-store.ts +114 -0
  79. package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/ports.ts +21 -0
  80. package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/postgres-store.ts +170 -0
  81. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +1322 -0
  82. package/dist/bundling-sources/shared_libs/play-runtime/internal-step-ids.ts +2 -2
  83. package/dist/bundling-sources/shared_libs/play-runtime/lane-retirement-gate.ts +1 -1
  84. package/dist/bundling-sources/shared_libs/play-runtime/launch-source-policy.ts +112 -0
  85. package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +8 -0
  86. package/dist/bundling-sources/shared_libs/play-runtime/perf-trace.ts +127 -0
  87. package/dist/bundling-sources/shared_libs/play-runtime/play-artifact-runtime-contract.ts +5 -0
  88. package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +24 -1
  89. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/contracts.ts +56 -0
  90. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/index.ts +13 -0
  91. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/job.ts +41 -0
  92. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/ports.ts +17 -0
  93. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/postgres-adapter.ts +54 -0
  94. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/contracts.ts +114 -0
  95. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/engine-suspension.ts +108 -0
  96. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/index.ts +36 -0
  97. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/job.ts +97 -0
  98. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/ports.ts +104 -0
  99. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/postgres-fence-adapter.ts +263 -0
  100. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/worker-terminal-projection.ts +64 -0
  101. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/contracts.ts +29 -0
  102. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/gateway-adapter.ts +56 -0
  103. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/index.ts +15 -0
  104. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/job.ts +65 -0
  105. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/ports.ts +17 -0
  106. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/contracts.ts +42 -0
  107. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/index.ts +17 -0
  108. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +142 -0
  109. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/ports.ts +42 -0
  110. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/postgres-adapter.ts +102 -0
  111. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/contracts.ts +60 -0
  112. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/index.ts +16 -0
  113. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/job.ts +78 -0
  114. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/ports.ts +54 -0
  115. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/postgres-adapter.ts +71 -0
  116. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-batching-registry.ts +4 -0
  117. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +2 -0
  118. package/dist/bundling-sources/shared_libs/play-runtime/receipt-status.ts +5 -8
  119. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +3 -5
  120. package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +168 -0
  121. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +44 -5
  122. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/child-play-resolver.ts +26 -0
  123. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +3662 -0
  124. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/progress-sidecar.ts +47 -0
  125. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-deadline.ts +84 -0
  126. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-gateway-transport.ts +91 -0
  127. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +424 -0
  128. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-progress-push.ts +321 -0
  129. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-sheet-persistence-retry.ts +110 -0
  130. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +625 -0
  131. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +72 -9
  132. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +6 -12
  133. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +19 -0
  134. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/bundle.ts +0 -1
  135. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +14 -44
  136. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +103 -208
  137. package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +201 -0
  138. package/dist/bundling-sources/shared_libs/play-runtime/runtime-env.ts +6 -0
  139. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +67 -0
  140. package/dist/bundling-sources/shared_libs/play-runtime/runtime-release-environment.ts +2 -0
  141. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-contract.ts +68 -0
  142. package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +14 -2
  143. package/dist/bundling-sources/shared_libs/play-runtime/runtime-telemetry.ts +108 -0
  144. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +4 -0
  145. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +3 -0
  146. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +7 -0
  147. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-deadline-reconciliation.ts +88 -0
  148. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-play-deploy-task.ts +124 -0
  149. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-play-run-task.ts +68 -0
  150. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +193 -0
  151. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-queue-lifecycle.ts +269 -0
  152. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-queue-suffix.ts +73 -0
  153. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +6642 -0
  154. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +897 -0
  155. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-metrics.ts +120 -0
  156. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-required-env.ts +76 -0
  157. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +476 -0
  158. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/gateway-heavy-request-admission.ts +47 -0
  159. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/gateway-progress-registry.ts +147 -0
  160. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/index.ts +27 -0
  161. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/lazy.ts +50 -0
  162. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +98 -0
  163. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-budget-state.ts +260 -0
  164. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +1416 -0
  165. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +1255 -0
  166. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +942 -0
  167. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +14636 -0
  168. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/receipt-gateway.ts +888 -0
  169. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +355 -0
  170. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-terminal-transition.ts +46 -0
  171. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runner-push.ts +60 -0
  172. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +33 -0
  173. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-gateway-health.ts +64 -0
  174. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +835 -0
  175. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +1218 -0
  176. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-operation.ts +207 -0
  177. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-scheduler-schema.ts +10 -0
  178. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/scheduler-capacity.ts +123 -0
  179. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/scheduler-launch-read-observability.ts +78 -0
  180. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/submit-admission.ts +169 -0
  181. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/terminal-contract.ts +20 -0
  182. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/worker-queue-metrics.ts +34 -0
  183. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/worker-resource-metrics.ts +249 -0
  184. package/dist/bundling-sources/shared_libs/play-runtime/sheet-attempt-sql.ts +7 -0
  185. package/dist/bundling-sources/shared_libs/play-runtime/step-progress.ts +296 -0
  186. package/dist/bundling-sources/shared_libs/play-runtime/tool-call/native-batch.ts +3 -3
  187. package/dist/bundling-sources/shared_libs/play-runtime/tool-call/runtime-step-receipts-adapter.ts +20 -1
  188. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +60 -15
  189. package/dist/bundling-sources/shared_libs/play-runtime/tool-execution-outcome.ts +20 -0
  190. package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +12 -0
  191. package/dist/bundling-sources/shared_libs/play-runtime/vercel-protection.ts +14 -1
  192. package/dist/bundling-sources/shared_libs/play-runtime/webhook-receipt-retry.ts +50 -0
  193. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +165 -0
  194. package/dist/bundling-sources/shared_libs/play-runtime/work-receipts.ts +15 -23
  195. package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +169 -0
  196. package/dist/bundling-sources/shared_libs/play-runtime/zerobounce-batching.ts +122 -0
  197. package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +2 -0
  198. package/dist/bundling-sources/shared_libs/plays/bundling/repository-adapter.ts +24 -0
  199. package/dist/bundling-sources/shared_libs/plays/child-run-projection.ts +174 -0
  200. package/dist/bundling-sources/shared_libs/plays/contracts.ts +2 -0
  201. package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +267 -0
  202. package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +73 -0
  203. package/dist/bundling-sources/shared_libs/plays/deploy/manifest.ts +162 -0
  204. package/dist/bundling-sources/shared_libs/plays/deploy/project-serializer.ts +87 -0
  205. package/dist/bundling-sources/shared_libs/plays/deploy/source-file-path.ts +26 -0
  206. package/dist/bundling-sources/shared_libs/plays/deploy/target-paths.ts +36 -0
  207. package/dist/bundling-sources/shared_libs/plays/deployment-status.ts +1 -1
  208. package/dist/bundling-sources/shared_libs/plays/docflow.ts +1 -1
  209. package/dist/bundling-sources/shared_libs/plays/launch/input-contract.ts +400 -0
  210. package/dist/bundling-sources/shared_libs/plays/launch/prepare.ts +96 -0
  211. package/dist/bundling-sources/shared_libs/plays/local-file-discovery.ts +385 -0
  212. package/dist/bundling-sources/shared_libs/plays/play-grep-search.ts +112 -0
  213. package/dist/bundling-sources/shared_libs/plays/play-reference.ts +117 -0
  214. package/dist/bundling-sources/shared_libs/plays/run-input-summary.ts +260 -0
  215. package/dist/bundling-sources/shared_libs/plays/run-summary-types.ts +49 -0
  216. package/dist/bundling-sources/shared_libs/plays/secrets/errors.ts +19 -0
  217. package/dist/bundling-sources/shared_libs/plays/share/copy.ts +271 -0
  218. package/dist/bundling-sources/shared_libs/plays/share/metrics.ts +140 -0
  219. package/dist/bundling-sources/shared_libs/plays/share/public-read-model.ts +86 -0
  220. package/dist/bundling-sources/shared_libs/plays/share/seo-quality.ts +181 -0
  221. package/dist/bundling-sources/shared_libs/plays/share/static-pipeline-summary.ts +658 -0
  222. package/dist/bundling-sources/shared_libs/plays/share/types.ts +197 -0
  223. package/dist/bundling-sources/shared_libs/plays/sheet-filter.ts +347 -0
  224. package/dist/bundling-sources/shared_libs/plays/slack-hitl-timeout-error.ts +37 -0
  225. package/dist/bundling-sources/shared_libs/plays/standard-webhooks.ts +117 -0
  226. package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +6 -1
  227. package/dist/bundling-sources/shared_libs/plays/status-result.ts +388 -0
  228. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
  229. package/dist/bundling-sources/shared_libs/plays/transform-factor-structure.ts +377 -0
  230. package/dist/bundling-sources/shared_libs/plays/webhook-payload.ts +113 -0
  231. package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +7 -1
  232. package/dist/bundling-sources/shared_libs/product-notifications/default-policy.ts +3 -2
  233. package/dist/bundling-sources/shared_libs/product-notifications/overflow.ts +18 -0
  234. package/dist/bundling-sources/shared_libs/product-notifications/rolling-limit.ts +24 -0
  235. package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +624 -0
  236. package/dist/bundling-sources/shared_libs/product-notifications/slack-payload.ts +140 -0
  237. package/dist/bundling-sources/shared_libs/product-notifications/slack-transport.ts +75 -0
  238. package/dist/bundling-sources/shared_libs/runtime-env.ts +6 -0
  239. package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +42 -0
  240. package/dist/bundling-sources/shared_libs/security/header-safe-env.ts +10 -3
  241. package/dist/bundling-sources/shared_libs/security/slack-sanitize.ts +133 -0
  242. package/dist/cli/getting-started.d.mts +52 -0
  243. package/dist/cli/getting-started.d.ts +52 -0
  244. package/dist/cli/getting-started.js +65 -0
  245. package/dist/cli/getting-started.mjs +36 -0
  246. package/dist/cli/index.d.mts +9 -0
  247. package/dist/cli/index.d.ts +9 -0
  248. package/dist/cli/index.js +895 -407
  249. package/dist/cli/index.mjs +893 -414
  250. package/dist/{compiler-manifest-DsLbQaew.d.mts → compiler-manifest-x14KL83E.d.mts} +4 -2
  251. package/dist/{compiler-manifest-DsLbQaew.d.ts → compiler-manifest-x14KL83E.d.ts} +4 -2
  252. package/dist/index.d.mts +124 -154
  253. package/dist/index.d.ts +124 -154
  254. package/dist/index.js +132 -28
  255. package/dist/index.mjs +132 -28
  256. package/dist/install-integrity.json +182 -2
  257. package/dist/monitor-fleet-contract.d.mts +131 -0
  258. package/dist/monitor-fleet-contract.d.ts +131 -0
  259. package/dist/monitor-fleet-contract.js +406 -0
  260. package/dist/monitor-fleet-contract.mjs +367 -0
  261. package/dist/plays/bundle-play-file.d.mts +2 -2
  262. package/dist/plays/bundle-play-file.d.ts +2 -2
  263. package/dist/release.d.mts +255 -0
  264. package/dist/release.d.ts +255 -0
  265. package/dist/release.js +210 -0
  266. package/dist/release.mjs +183 -0
  267. package/package.json +21 -4
@@ -0,0 +1,29 @@
1
+ {
2
+ "skills": {
3
+ "index_path": "/.well-known/skills/index.json",
4
+ "default_agents": [
5
+ "codex",
6
+ "claude-code",
7
+ "cursor",
8
+ "gemini-cli",
9
+ "antigravity"
10
+ ],
11
+ "npx_binary": "npx",
12
+ "npx_add_args_template": [
13
+ "--yes",
14
+ "skills@1.5.15",
15
+ "add",
16
+ "{skills_source_url}",
17
+ "--agent",
18
+ "{agents}",
19
+ "--global",
20
+ "--yes",
21
+ "--skill",
22
+ "{skill_name}",
23
+ "--full-depth"
24
+ ]
25
+ },
26
+ "cli": {
27
+ "sdk_npm_global": "npm install -g deepline@latest"
28
+ }
29
+ }
@@ -1,3 +1,4 @@
1
+ import { iterateCursorPages } from './pagination.js';
1
2
  /**
2
3
  * The main API client for interacting with the Deepline platform.
3
4
  *
@@ -37,7 +38,10 @@ import { resolveConfig } from './config.js';
37
38
  import { DeeplineError } from './errors.js';
38
39
  import { HttpClient } from './http.js';
39
40
  import { PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES } from '../../shared_libs/product-notifications/contract.js';
40
- import { normalizeProductNotificationEmail } from '../../shared_libs/product-notifications/configuration.js';
41
+ import {
42
+ DEFAULT_PRODUCT_NOTIFICATION_DELIVERY_TIMING,
43
+ normalizeProductNotificationEmail,
44
+ } from '../../shared_libs/product-notifications/configuration.js';
41
45
  import {
42
46
  type ProductNotificationConfigurationChange,
43
47
  type EffectiveProductNotificationDestination,
@@ -592,6 +596,35 @@ export type RunsListOptions = {
592
596
  offset?: number;
593
597
  };
594
598
 
599
+ /** One server page; legacy runs.list continues to return an array. */
600
+ export type RunsListPage = {
601
+ runs: PlayRunListItem[];
602
+ total?: number;
603
+ offset?: number;
604
+ limit?: number;
605
+ hasMore?: boolean;
606
+ };
607
+
608
+ export type PlaysListOptions = {
609
+ origin?: 'prebuilt' | 'owned';
610
+ grep?: string;
611
+ /**
612
+ * @deprecated Grep is always evaluated by the Convex full-text index.
613
+ * This retained option is ignored for source compatibility.
614
+ */
615
+ grepMode?: 'all' | 'any' | 'phrase';
616
+ categories?: string | string[];
617
+ includeToolCategories?: boolean;
618
+ includeArchived?: boolean;
619
+ includeCostEstimates?: boolean;
620
+ };
621
+
622
+ export type PlaysListPage = {
623
+ plays: PlayListItem[];
624
+ cursor: string | null;
625
+ hasMore: boolean;
626
+ };
627
+
595
628
  /** Options for `client.runs.get(...)`. */
596
629
  export type RunsGetOptions = {
597
630
  /** Return the raw status payload instead of the compact package. */
@@ -716,6 +749,7 @@ export type PlaySecretMetadata = {
716
749
  scope: 'org' | 'play';
717
750
  playName?: string;
718
751
  name: string;
752
+ note?: string;
719
753
  status: string;
720
754
  hasValue: boolean;
721
755
  createdAt: number;
@@ -732,11 +766,8 @@ export type PlaySecretCheck = {
732
766
  };
733
767
 
734
768
  /**
735
- * Public runs namespace exposed as `client.runs`.
736
- *
737
- * This namespace mirrors the canonical `/api/v2/runs` resource family and is
738
- * the preferred low-level surface for polling, streaming, stopping, reading
739
- * logs, and exporting durable dataset rows.
769
+ * `client.runs` mirrors `/api/v2/runs`: the preferred low-level surface for
770
+ * polling, streaming, stopping, reading logs, and exporting durable dataset rows.
740
771
  *
741
772
  * @sdkReference client 020 client.runs
742
773
  */
@@ -761,6 +792,8 @@ export type RunsNamespace = {
761
792
  }>;
762
793
  /** List runs for one play, optionally filtered by status. */
763
794
  list: (options: RunsListOptions) => Promise<PlayRunListItem[]>;
795
+ /** Read one run page with total, offset, limit and completeness metadata. */
796
+ listPage: (options: RunsListOptions) => Promise<RunsListPage>;
764
797
  /** Stream run events and return the latest/terminal run status. */
765
798
  tail: (runId: string, options?: RunsTailOptions) => Promise<PlayStatus>;
766
799
  /** Fetch persisted log lines for a run. */
@@ -1053,7 +1086,13 @@ export type MonitorBatchOperationResult = {
1053
1086
  rejoined?: boolean;
1054
1087
  operation: {
1055
1088
  runId: string;
1056
- kind: 'audit' | 'deactivate' | 'reactivate' | 'deploy' | 'repair';
1089
+ kind:
1090
+ | 'audit'
1091
+ | 'converge'
1092
+ | 'deactivate'
1093
+ | 'reactivate'
1094
+ | 'deploy'
1095
+ | 'repair';
1057
1096
  state: 'running' | 'retry_scheduled' | 'completed' | 'failed';
1058
1097
  dryRun: boolean;
1059
1098
  scope: unknown;
@@ -1149,6 +1188,11 @@ export type MonitorsHealth = {
1149
1188
  };
1150
1189
  converged: number;
1151
1190
  needs_repair: number;
1191
+ /**
1192
+ * Unknown records without an upstream resource id. Use the exact inventory
1193
+ * reconciler to align them; ordinary repair never guesses an identity.
1194
+ */
1195
+ alignment_required: number;
1152
1196
  /** Observed active, but nothing delivered inside `silent_window_days`. */
1153
1197
  silent: number;
1154
1198
  silent_window_days: number;
@@ -1168,12 +1212,30 @@ export type MonitorsHealth = {
1168
1212
  /** Bounded current durable monitor work, if the server supports it. */
1169
1213
  batch_operations?: Array<{
1170
1214
  run_id: string;
1171
- kind: 'audit' | 'deactivate' | 'reactivate' | 'repair' | 'deploy';
1215
+ kind:
1216
+ | 'audit'
1217
+ | 'converge'
1218
+ | 'deactivate'
1219
+ | 'reactivate'
1220
+ | 'repair'
1221
+ | 'deploy';
1172
1222
  state: 'running' | 'retry_scheduled';
1173
1223
  updated_at: number;
1174
1224
  next_attempt_at?: number;
1175
1225
  summary?: Record<string, unknown>;
1176
1226
  }>;
1227
+ /** Bounded sample explaining why normal audit did not settle the row. */
1228
+ unaudited_monitors: Array<{
1229
+ monitor_key: string;
1230
+ tool: string;
1231
+ observed: 'unknown' | null;
1232
+ observed_at: number | null;
1233
+ provider_resource_id: string | null;
1234
+ reason:
1235
+ | 'not_yet_audited'
1236
+ | 'missing_provider_resource_id'
1237
+ | 'provider_observation_unknown';
1238
+ }>;
1177
1239
  };
1178
1240
 
1179
1241
  /** One bounded audit pass, from `POST /api/v2/monitors/audit`. */
@@ -1316,6 +1378,8 @@ export type MonitorsNamespace = {
1316
1378
 
1317
1379
  /** One credit grant pool reported by the billing subscription status endpoint. */
1318
1380
  export type BillingCreditPool = {
1381
+ /** Stable grant identity; optional when talking to an older server. */
1382
+ grant_id?: string;
1319
1383
  pool: string;
1320
1384
  credits_remaining: number;
1321
1385
  credits_granted: number;
@@ -1400,12 +1464,13 @@ export type TargetBillingOperation = {
1400
1464
  };
1401
1465
 
1402
1466
  export type TargetBillingPlan = {
1403
- sku: 'payg-v1' | 'builder-v1' | 'team-v1';
1467
+ sku: 'payg-v1' | 'builder-v1' | 'growth-v1' | 'growth-canary-v1' | 'team-v1';
1404
1468
  name: string;
1405
1469
  recurring_price_usd: number;
1406
- interval: 'month';
1470
+ interval: 'month' | 'year';
1407
1471
  included_credits: number;
1408
1472
  purchased_credit_price_usd: number;
1473
+ acquisition_enabled: boolean;
1409
1474
  };
1410
1475
 
1411
1476
  export type TargetBillingPlansResult = {
@@ -1414,6 +1479,7 @@ export type TargetBillingPlansResult = {
1414
1479
  current_plan_sku: string;
1415
1480
  pending_plan_sku: string | null;
1416
1481
  acquisition_enabled: boolean;
1482
+ enabled_offer_keys: TargetBillingPlan['sku'][];
1417
1483
  };
1418
1484
 
1419
1485
  export type TargetBillingStatusResult = {
@@ -1443,6 +1509,8 @@ export type TargetAutoRechargeResult = {
1443
1509
  threshold_credits: number | null;
1444
1510
  refill_to_credits: number | null;
1445
1511
  rolling_limit_cents: null;
1512
+ purchase_limit_cents?: number | null;
1513
+ rolling_committed_cents?: number;
1446
1514
  };
1447
1515
 
1448
1516
  export type TargetAutoRechargeUpdateOptions =
@@ -1454,6 +1522,8 @@ export type TargetAutoRechargeUpdateOptions =
1454
1522
  enabled: true;
1455
1523
  thresholdCredits: number;
1456
1524
  refillToCredits: number;
1525
+ /** Maximum automatic purchases in a rolling 30-day window, in USD cents. */
1526
+ purchaseLimitCents?: number | null;
1457
1527
  idempotencyKey: string;
1458
1528
  };
1459
1529
 
@@ -1581,10 +1651,8 @@ export type WorkspacesNamespace = {
1581
1651
  };
1582
1652
 
1583
1653
  /**
1584
- * Public billing namespace exposed as `client.billing`.
1585
- *
1586
- * Carries plans, subscription state, cancellation, and invoice/receipt history
1587
- * so CLI commands and programmatic callers share one surface.
1654
+ * Public `client.billing` namespace for CLI commands and programmatic callers.
1655
+ * Covers plans, subscription state, cancellation, and invoice/receipt history.
1588
1656
  *
1589
1657
  * @sdkReference client 030 client.billing
1590
1658
  */
@@ -1618,6 +1686,9 @@ export type BillingNamespace = {
1618
1686
  /** Read and manage the Metronome-backed automatic recharge configuration. */
1619
1687
  autoRecharge: {
1620
1688
  get: () => Promise<TargetAutoRechargeResult>;
1689
+ trigger: (options?: {
1690
+ idempotencyKey: string;
1691
+ }) => Promise<{ data: { status: string; operation_id?: string } }>;
1621
1692
  update: (
1622
1693
  options: TargetAutoRechargeUpdateOptions,
1623
1694
  ) => Promise<TargetAutoRechargeResult>;
@@ -1627,6 +1698,12 @@ export type BillingNamespace = {
1627
1698
  credits: number;
1628
1699
  idempotencyKey: string;
1629
1700
  }) => Promise<TargetBillingMutationResult>;
1701
+ /** Inspect or retire the original purchase intent without starting a payment. */
1702
+ recoverCreditPurchase: (options: {
1703
+ credits: number;
1704
+ orgId: string;
1705
+ idempotencyKey: string;
1706
+ }) => Promise<TargetBillingMutationResult>;
1630
1707
  /** Start, change, cancel, or undo a target plan transition. */
1631
1708
  transitionPlan: (
1632
1709
  options: TargetBillingPlanTransitionOptions,
@@ -2190,6 +2267,7 @@ export class DeeplineClient {
2190
2267
  this.runs = {
2191
2268
  get: (runId, options) => this.getRunStatus(runId, options),
2192
2269
  list: (options) => this.listRuns(options),
2270
+ listPage: (options) => this.listRunsPage(options),
2193
2271
  tail: (runId, options) => this.tailRun(runId, options),
2194
2272
  logs: (runId, options) => this.getRunLogs(runId, options),
2195
2273
  input: (runId) => this.getRunInput(runId),
@@ -2215,9 +2293,21 @@ export class DeeplineClient {
2215
2293
  targetStatus: () => this.getTargetBillingStatus(),
2216
2294
  autoRecharge: {
2217
2295
  get: () => this.getTargetAutoRecharge(),
2296
+ trigger: (options) =>
2297
+ this.http.post(
2298
+ '/api/v2/billing/auto-recharge/trigger',
2299
+ {},
2300
+ {
2301
+ 'Idempotency-Key': requireTargetBillingIdempotencyKey(
2302
+ options?.idempotencyKey ?? globalThis.crypto.randomUUID(),
2303
+ ),
2304
+ },
2305
+ ),
2218
2306
  update: (options) => this.updateTargetAutoRecharge(options),
2219
2307
  },
2220
2308
  purchaseCredits: (options) => this.purchaseTargetBillingCredits(options),
2309
+ recoverCreditPurchase: (options) =>
2310
+ this.recoverTargetBillingCreditPurchase(options),
2221
2311
  transitionPlan: (options) => this.transitionTargetBillingPlan(options),
2222
2312
  portalSession: () => this.createTargetBillingPortalSession(),
2223
2313
  };
@@ -2473,6 +2563,18 @@ export class DeeplineClient {
2473
2563
  return this.http.get(`/api/v2/secrets?${params.toString()}`);
2474
2564
  }
2475
2565
 
2566
+ /** Add, replace, or clear the non-sensitive note attached to one secret. */
2567
+ async updateSecretNote(
2568
+ secretId: string,
2569
+ note: string,
2570
+ ): Promise<PlaySecretMetadata> {
2571
+ const response = await this.http.patch<{ secret: PlaySecretMetadata }>(
2572
+ `/api/v2/secrets/${encodeURIComponent(secretId)}`,
2573
+ { note },
2574
+ );
2575
+ return response.secret;
2576
+ }
2577
+
2476
2578
  // ——————————————————————————————————————————————————————————
2477
2579
  // Tools
2478
2580
  // ——————————————————————————————————————————————————————————
@@ -3870,6 +3972,11 @@ export class DeeplineClient {
3870
3972
  * ```
3871
3973
  */
3872
3974
  async listRuns(options: RunsListOptions): Promise<PlayRunListItem[]> {
3975
+ return (await this.listRunsPage(options)).runs;
3976
+ }
3977
+
3978
+ /** Read one run page without discarding server pagination metadata. */
3979
+ async listRunsPage(options: RunsListOptions): Promise<RunsListPage> {
3873
3980
  const playName = options.play?.trim();
3874
3981
  const params = new URLSearchParams();
3875
3982
  if (playName) {
@@ -3901,10 +4008,10 @@ export class DeeplineClient {
3901
4008
  throw new Error('runs.list requires options.play or options.status.');
3902
4009
  }
3903
4010
  params.set('compact', 'true');
3904
- const response = await this.http.get<{ runs: PlayRunListItem[] }>(
4011
+ const response = await this.http.get<RunsListPage>(
3905
4012
  `/api/v2/runs?${params.toString()}`,
3906
4013
  );
3907
- return response.runs ?? [];
4014
+ return { ...response, runs: response.runs ?? [] };
3908
4015
  }
3909
4016
 
3910
4017
  /**
@@ -4395,20 +4502,46 @@ export class DeeplineClient {
4395
4502
  }
4396
4503
 
4397
4504
  /**
4398
- * List callable plays visible to the workspace.
4505
+ * List one page of callable plays; grep retains exhaustive matching results.
4506
+ * Use listPlaysPage to retain pagination metadata.
4399
4507
  *
4400
4508
  * Pass `origin: "prebuilt"` for Deepline-managed prebuilts or
4401
4509
  * `origin: "owned"` for org-owned plays.
4402
4510
  */
4403
- async listPlays(options?: {
4404
- origin?: 'prebuilt' | 'owned';
4405
- grep?: string;
4406
- grepMode?: 'all' | 'any' | 'phrase';
4407
- categories?: string | string[];
4408
- includeToolCategories?: boolean;
4409
- includeArchived?: boolean;
4410
- }): Promise<PlayListItem[]> {
4511
+ async listPlays(options?: PlaysListOptions): Promise<PlayListItem[]> {
4512
+ if (!options?.grep?.trim()) {
4513
+ return (await this.requestPlaysPage(options, false)).plays;
4514
+ }
4515
+ const plays: PlayListItem[] = [];
4516
+ for await (const items of iterateCursorPages(async (cursor) => {
4517
+ const page = await this.listPlaysPage({ ...options, cursor });
4518
+ return { items: page.plays, cursor: page.cursor, hasMore: page.hasMore };
4519
+ })) {
4520
+ plays.push(...items);
4521
+ }
4522
+ return plays;
4523
+ }
4524
+
4525
+ /** Read one bounded inventory page; cursor continues the same filters. */
4526
+ async listPlaysPage(
4527
+ options?: PlaysListOptions & {
4528
+ limit?: number;
4529
+ cursor?: string | null;
4530
+ },
4531
+ ): Promise<PlaysListPage> {
4532
+ return this.requestPlaysPage(options);
4533
+ }
4534
+
4535
+ private async requestPlaysPage(
4536
+ options?: PlaysListOptions & {
4537
+ limit?: number;
4538
+ cursor?: string | null;
4539
+ },
4540
+ paginateInventory = true,
4541
+ ): Promise<PlaysListPage> {
4411
4542
  const params = new URLSearchParams();
4543
+ if (paginateInventory && !options?.grep?.trim())
4544
+ params.set('inventory_paginated', '1');
4412
4545
  if (options?.origin) params.set('origin', options.origin);
4413
4546
  if (options?.categories) {
4414
4547
  params.set(
@@ -4422,32 +4555,32 @@ export class DeeplineClient {
4422
4555
  params.set('include_tool_categories', '1');
4423
4556
  }
4424
4557
  if (options?.includeArchived) params.set('include_archived', '1');
4558
+ if (options?.includeCostEstimates) {
4559
+ params.set('include_cost_estimates', '1');
4560
+ }
4425
4561
  if (options?.grep?.trim()) {
4426
4562
  params.set('grep', options.grep.trim());
4427
- params.set('grep_mode', options.grepMode ?? 'all');
4428
- params.set('grep_paginated', '1');
4429
4563
  params.set('limit', '60');
4430
4564
  }
4431
- type PlayListResponse = {
4565
+ if (options?.limit !== undefined) {
4566
+ if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
4567
+ throw new Error('Play page limit must be a positive integer');
4568
+ }
4569
+ params.set('limit', String(options.limit));
4570
+ }
4571
+ if (options?.cursor) params.set('cursor', options.cursor);
4572
+ const suffix = params.size ? `?${params.toString()}` : '';
4573
+ const response = await this.http.get<{
4432
4574
  plays?: PlayListItem[];
4433
4575
  cursor?: string | null;
4434
4576
  hasMore?: boolean;
4435
4577
  pagination?: { cursor?: string | null; hasMore?: boolean };
4578
+ }>(`/api/v2/plays${suffix}`);
4579
+ return {
4580
+ plays: response.plays ?? [],
4581
+ cursor: response.pagination?.cursor ?? response.cursor ?? null,
4582
+ hasMore: Boolean(response.pagination?.hasMore ?? response.hasMore),
4436
4583
  };
4437
- const plays: PlayListItem[] = [];
4438
- let cursor: string | null = null;
4439
- let hasMore = true;
4440
- do {
4441
- if (cursor) params.set('cursor', cursor);
4442
- const suffix = params.toString() ? `?${params.toString()}` : '';
4443
- const response = await this.http.get<PlayListResponse>(
4444
- `/api/v2/plays${suffix}`,
4445
- );
4446
- plays.push(...(response.plays ?? []));
4447
- cursor = response.pagination?.cursor ?? response.cursor ?? null;
4448
- hasMore = Boolean(response.pagination?.hasMore ?? response.hasMore);
4449
- } while (Boolean(options?.grep?.trim()) && hasMore && cursor);
4450
- return plays;
4451
4584
  }
4452
4585
 
4453
4586
  /** Set whether an org-owned Play sorts before unpinned Plays. */
@@ -4637,7 +4770,7 @@ export class DeeplineClient {
4637
4770
  groupKey,
4638
4771
  name,
4639
4772
  enabled: true,
4640
- deliveryTiming: { mode: 'immediate' },
4773
+ deliveryTiming: DEFAULT_PRODUCT_NOTIFICATION_DELIVERY_TIMING,
4641
4774
  source: 'workspace',
4642
4775
  configMode: 'custom',
4643
4776
  version: 0,
@@ -5338,6 +5471,9 @@ export class DeeplineClient {
5338
5471
  enabled: true,
5339
5472
  threshold_credits: options.thresholdCredits,
5340
5473
  refill_to_credits: options.refillToCredits,
5474
+ ...(options.purchaseLimitCents !== undefined
5475
+ ? { purchase_limit_cents: options.purchaseLimitCents }
5476
+ : {}),
5341
5477
  }
5342
5478
  : { enabled: false },
5343
5479
  { 'Idempotency-Key': idempotencyKey },
@@ -5364,6 +5500,48 @@ export class DeeplineClient {
5364
5500
  );
5365
5501
  }
5366
5502
 
5503
+ /** Recover only the original workspace, credit amount, and purchase key; never charge. */
5504
+ async recoverTargetBillingCreditPurchase(options: {
5505
+ credits: number;
5506
+ orgId: string;
5507
+ idempotencyKey: string;
5508
+ }): Promise<TargetBillingMutationResult> {
5509
+ if (typeof options.idempotencyKey !== 'string') {
5510
+ throw new DeeplineError(
5511
+ 'The original billing idempotencyKey is required.',
5512
+ undefined,
5513
+ 'INVALID_BILLING_IDEMPOTENCY_KEY',
5514
+ );
5515
+ }
5516
+ const idempotencyKey = requireTargetBillingIdempotencyKey(
5517
+ options.idempotencyKey,
5518
+ );
5519
+ if (!Number.isSafeInteger(options.credits) || options.credits <= 0) {
5520
+ throw new DeeplineError(
5521
+ 'credits must be a positive safe integer.',
5522
+ undefined,
5523
+ 'INVALID_CREDITS',
5524
+ );
5525
+ }
5526
+ if (
5527
+ typeof options.orgId !== 'string' ||
5528
+ !options.orgId.trim() ||
5529
+ options.orgId !== options.orgId.trim()
5530
+ ) {
5531
+ throw new DeeplineError(
5532
+ 'The original orgId is required without surrounding whitespace.',
5533
+ undefined,
5534
+ 'INVALID_ORG_ID',
5535
+ );
5536
+ }
5537
+ return this.http.post<TargetBillingMutationResult>(
5538
+ '/api/v2/billing/credit-purchases/recover',
5539
+ { credits: options.credits, org_id: options.orgId },
5540
+ { 'Idempotency-Key': idempotencyKey },
5541
+ { maxRetries: 0, exactUrlOnly: true },
5542
+ );
5543
+ }
5544
+
5367
5545
  /**
5368
5546
  * Start, change, cancel, or restore a target plan through one idempotent
5369
5547
  * commercial operation.
@@ -101,6 +101,9 @@ export type {
101
101
  PlaySheetRow,
102
102
  PlaySheetRowsResult,
103
103
  RunsListOptions,
104
+ RunsListPage,
105
+ PlaysListOptions,
106
+ PlaysListPage,
104
107
  RunsLogsOptions,
105
108
  RunsLogsResult,
106
109
  RunsNamespace,
@@ -234,6 +237,7 @@ export type {
234
237
  PublishPlayVersionRequest,
235
238
  PublishPlayVersionResult,
236
239
  StartPlayRunRequest,
240
+ PlayCostEstimate,
237
241
  PlayListItem,
238
242
  CustomerDbQueryResult,
239
243
  DeeplineToolCategory,