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
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");
@@ -835,20 +855,22 @@ var SDK_RELEASE = {
835
855
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
836
856
  // getters keep their established compatibility behavior.
837
857
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
838
- version: "0.3.89",
839
- 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.
859
+ version: "0.3.91",
860
+ updateSummary: "Play grep now returns concise results with the matched fields and terms. 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.",
840
861
  packageCapabilities: {
841
862
  updatePreferences: 1
842
863
  },
843
864
  contracts: {
844
865
  api: {
845
866
  name: "sdk-http-api",
846
- // API v2 is append-only. A breaking public request/response change needs
847
- // v3 and an explicit v2 support-window decision, never a patch release.
848
- currentMajor: 2,
849
- supportedMajors: [2],
850
- // Accepted only to bridge SDKs released before X-Deepline-API-Major.
867
+ // Concise Play grep has the current wire id. Older ids follow the
868
+ // standard API support window.
869
+ currentMajor: 3,
870
+ supportedMajors: [3, 2],
871
+ // Older ids remain subject to the API support window.
851
872
  legacyWireIds: [
873
+ "2026-09-play-grep-concise-results",
852
874
  "2026-07-admin-cli-local-cutover",
853
875
  "2026-07-native-monitor-launch-hard-cutover"
854
876
  ]
@@ -2063,6 +2085,10 @@ function normalizeProductNotificationEmail(value) {
2063
2085
  const email = typeof value === "string" ? value.trim().toLowerCase() : "";
2064
2086
  return email && email.length <= 320 && PRODUCT_NOTIFICATION_EMAIL_PATTERN.test(email) ? email : null;
2065
2087
  }
2088
+ var DEFAULT_PRODUCT_NOTIFICATION_DELIVERY_TIMING = {
2089
+ mode: "rolling_limit",
2090
+ windowMs: 36e5
2091
+ };
2066
2092
 
2067
2093
  // src/stream-reconnect.ts
2068
2094
  var STREAM_RECONNECT_BASE_DELAY_MS = 500;
@@ -4556,6 +4582,7 @@ var DeeplineClient = class {
4556
4582
  this.runs = {
4557
4583
  get: (runId, options2) => this.getRunStatus(runId, options2),
4558
4584
  list: (options2) => this.listRuns(options2),
4585
+ listPage: (options2) => this.listRunsPage(options2),
4559
4586
  tail: (runId, options2) => this.tailRun(runId, options2),
4560
4587
  logs: (runId, options2) => this.getRunLogs(runId, options2),
4561
4588
  input: (runId) => this.getRunInput(runId),
@@ -4581,9 +4608,19 @@ var DeeplineClient = class {
4581
4608
  targetStatus: () => this.getTargetBillingStatus(),
4582
4609
  autoRecharge: {
4583
4610
  get: () => this.getTargetAutoRecharge(),
4611
+ trigger: (options2) => this.http.post(
4612
+ "/api/v2/billing/auto-recharge/trigger",
4613
+ {},
4614
+ {
4615
+ "Idempotency-Key": requireTargetBillingIdempotencyKey(
4616
+ options2?.idempotencyKey ?? globalThis.crypto.randomUUID()
4617
+ )
4618
+ }
4619
+ ),
4584
4620
  update: (options2) => this.updateTargetAutoRecharge(options2)
4585
4621
  },
4586
4622
  purchaseCredits: (options2) => this.purchaseTargetBillingCredits(options2),
4623
+ recoverCreditPurchase: (options2) => this.recoverTargetBillingCreditPurchase(options2),
4587
4624
  transitionPlan: (options2) => this.transitionTargetBillingPlan(options2),
4588
4625
  portalSession: () => this.createTargetBillingPortalSession()
4589
4626
  };
@@ -4752,6 +4789,14 @@ var DeeplineClient = class {
4752
4789
  if (options.playName !== void 0) params.set("play", options.playName);
4753
4790
  return this.http.get(`/api/v2/secrets?${params.toString()}`);
4754
4791
  }
4792
+ /** Add, replace, or clear the non-sensitive note attached to one secret. */
4793
+ async updateSecretNote(secretId, note) {
4794
+ const response = await this.http.patch(
4795
+ `/api/v2/secrets/${encodeURIComponent(secretId)}`,
4796
+ { note }
4797
+ );
4798
+ return response.secret;
4799
+ }
4755
4800
  // ——————————————————————————————————————————————————————————
4756
4801
  // Tools
4757
4802
  // ——————————————————————————————————————————————————————————
@@ -5769,6 +5814,10 @@ var DeeplineClient = class {
5769
5814
  * ```
5770
5815
  */
5771
5816
  async listRuns(options) {
5817
+ return (await this.listRunsPage(options)).runs;
5818
+ }
5819
+ /** Read one run page without discarding server pagination metadata. */
5820
+ async listRunsPage(options) {
5772
5821
  const playName = options.play?.trim();
5773
5822
  const params = new URLSearchParams();
5774
5823
  if (playName) {
@@ -5799,7 +5848,7 @@ var DeeplineClient = class {
5799
5848
  const response = await this.http.get(
5800
5849
  `/api/v2/runs?${params.toString()}`
5801
5850
  );
5802
- return response.runs ?? [];
5851
+ return { ...response, runs: response.runs ?? [] };
5803
5852
  }
5804
5853
  /**
5805
5854
  * Observe one run's live events. Uses the Convex Run Snapshot subscription
@@ -6194,13 +6243,33 @@ var DeeplineClient = class {
6194
6243
  );
6195
6244
  }
6196
6245
  /**
6197
- * List callable plays visible to the workspace.
6246
+ * List one page of callable plays; grep retains exhaustive matching results.
6247
+ * Use listPlaysPage to retain pagination metadata.
6198
6248
  *
6199
6249
  * Pass `origin: "prebuilt"` for Deepline-managed prebuilts or
6200
6250
  * `origin: "owned"` for org-owned plays.
6201
6251
  */
6202
6252
  async listPlays(options) {
6253
+ if (!options?.grep?.trim()) {
6254
+ return (await this.requestPlaysPage(options, false)).plays;
6255
+ }
6256
+ const plays = [];
6257
+ for await (const items of iterateCursorPages(async (cursor) => {
6258
+ const page = await this.listPlaysPage({ ...options, cursor });
6259
+ return { items: page.plays, cursor: page.cursor, hasMore: page.hasMore };
6260
+ })) {
6261
+ plays.push(...items);
6262
+ }
6263
+ return plays;
6264
+ }
6265
+ /** Read one bounded inventory page; cursor continues the same filters. */
6266
+ async listPlaysPage(options) {
6267
+ return this.requestPlaysPage(options);
6268
+ }
6269
+ async requestPlaysPage(options, paginateInventory = true) {
6203
6270
  const params = new URLSearchParams();
6271
+ if (paginateInventory && !options?.grep?.trim())
6272
+ params.set("inventory_paginated", "1");
6204
6273
  if (options?.origin) params.set("origin", options.origin);
6205
6274
  if (options?.categories) {
6206
6275
  params.set(
@@ -6212,26 +6281,27 @@ var DeeplineClient = class {
6212
6281
  params.set("include_tool_categories", "1");
6213
6282
  }
6214
6283
  if (options?.includeArchived) params.set("include_archived", "1");
6284
+ if (options?.includeCostEstimates) {
6285
+ params.set("include_cost_estimates", "1");
6286
+ }
6215
6287
  if (options?.grep?.trim()) {
6216
6288
  params.set("grep", options.grep.trim());
6217
- params.set("grep_mode", options.grepMode ?? "all");
6218
- params.set("grep_paginated", "1");
6219
6289
  params.set("limit", "60");
6220
6290
  }
6221
- const plays = [];
6222
- let cursor = null;
6223
- let hasMore = true;
6224
- do {
6225
- if (cursor) params.set("cursor", cursor);
6226
- const suffix = params.toString() ? `?${params.toString()}` : "";
6227
- const response = await this.http.get(
6228
- `/api/v2/plays${suffix}`
6229
- );
6230
- plays.push(...response.plays ?? []);
6231
- cursor = response.pagination?.cursor ?? response.cursor ?? null;
6232
- hasMore = Boolean(response.pagination?.hasMore ?? response.hasMore);
6233
- } while (Boolean(options?.grep?.trim()) && hasMore && cursor);
6234
- return plays;
6291
+ if (options?.limit !== void 0) {
6292
+ if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
6293
+ throw new Error("Play page limit must be a positive integer");
6294
+ }
6295
+ params.set("limit", String(options.limit));
6296
+ }
6297
+ if (options?.cursor) params.set("cursor", options.cursor);
6298
+ const suffix = params.size ? `?${params.toString()}` : "";
6299
+ const response = await this.http.get(`/api/v2/plays${suffix}`);
6300
+ return {
6301
+ plays: response.plays ?? [],
6302
+ cursor: response.pagination?.cursor ?? response.cursor ?? null,
6303
+ hasMore: Boolean(response.pagination?.hasMore ?? response.hasMore)
6304
+ };
6235
6305
  }
6236
6306
  /** Set whether an org-owned Play sorts before unpinned Plays. */
6237
6307
  async setPlayPinned(playName, pinned) {
@@ -6365,7 +6435,7 @@ var DeeplineClient = class {
6365
6435
  groupKey,
6366
6436
  name,
6367
6437
  enabled: true,
6368
- deliveryTiming: { mode: "immediate" },
6438
+ deliveryTiming: DEFAULT_PRODUCT_NOTIFICATION_DELIVERY_TIMING,
6369
6439
  source: "workspace",
6370
6440
  configMode: "custom",
6371
6441
  version: 0
@@ -6920,7 +6990,8 @@ var DeeplineClient = class {
6920
6990
  options.enabled ? {
6921
6991
  enabled: true,
6922
6992
  threshold_credits: options.thresholdCredits,
6923
- refill_to_credits: options.refillToCredits
6993
+ refill_to_credits: options.refillToCredits,
6994
+ ...options.purchaseLimitCents !== void 0 ? { purchase_limit_cents: options.purchaseLimitCents } : {}
6924
6995
  } : { enabled: false },
6925
6996
  { "Idempotency-Key": idempotencyKey }
6926
6997
  );
@@ -6941,6 +7012,39 @@ var DeeplineClient = class {
6941
7012
  { maxRetries: 0, exactUrlOnly: true }
6942
7013
  );
6943
7014
  }
7015
+ /** Recover only the original workspace, credit amount, and purchase key; never charge. */
7016
+ async recoverTargetBillingCreditPurchase(options) {
7017
+ if (typeof options.idempotencyKey !== "string") {
7018
+ throw new DeeplineError(
7019
+ "The original billing idempotencyKey is required.",
7020
+ void 0,
7021
+ "INVALID_BILLING_IDEMPOTENCY_KEY"
7022
+ );
7023
+ }
7024
+ const idempotencyKey = requireTargetBillingIdempotencyKey(
7025
+ options.idempotencyKey
7026
+ );
7027
+ if (!Number.isSafeInteger(options.credits) || options.credits <= 0) {
7028
+ throw new DeeplineError(
7029
+ "credits must be a positive safe integer.",
7030
+ void 0,
7031
+ "INVALID_CREDITS"
7032
+ );
7033
+ }
7034
+ if (typeof options.orgId !== "string" || !options.orgId.trim() || options.orgId !== options.orgId.trim()) {
7035
+ throw new DeeplineError(
7036
+ "The original orgId is required without surrounding whitespace.",
7037
+ void 0,
7038
+ "INVALID_ORG_ID"
7039
+ );
7040
+ }
7041
+ return this.http.post(
7042
+ "/api/v2/billing/credit-purchases/recover",
7043
+ { credits: options.credits, org_id: options.orgId },
7044
+ { "Idempotency-Key": idempotencyKey },
7045
+ { maxRetries: 0, exactUrlOnly: true }
7046
+ );
7047
+ }
6944
7048
  /**
6945
7049
  * Start, change, cancel, or restore a target plan through one idempotent
6946
7050
  * commercial operation.
@@ -11135,7 +11239,7 @@ function defineMonitor(definition) {
11135
11239
  return definition;
11136
11240
  }
11137
11241
 
11138
- // src/monitor-fleet-contract.ts
11242
+ // ../integration-contracts/monitor-fleet-contract.ts
11139
11243
  var MONITOR_FLEET_MAX_MEMBERS = 1e3;
11140
11244
  var MONITOR_FLEET_FRONTIER_MAX_ROWS = 1e4;
11141
11245
  var MONITOR_FLEET_AUTHORING_CONTRACT_EDITION = 1;
package/dist/index.mjs CHANGED
@@ -1,3 +1,23 @@
1
+ // src/pagination.ts
2
+ async function* iterateCursorPages(fetchPage) {
3
+ let cursor = null;
4
+ const seen = /* @__PURE__ */ new Set();
5
+ for (; ; ) {
6
+ const page = await fetchPage(cursor);
7
+ if (page.hasMore) {
8
+ if (!page.cursor || seen.has(page.cursor)) {
9
+ throw new Error(
10
+ "Pagination reported more results without an advancing cursor"
11
+ );
12
+ }
13
+ seen.add(page.cursor);
14
+ }
15
+ yield page.items;
16
+ if (!page.hasMore) return;
17
+ cursor = page.cursor;
18
+ }
19
+ }
20
+
1
21
  // src/config.ts
2
22
  import {
3
23
  existsSync,
@@ -747,20 +767,22 @@ var SDK_RELEASE = {
747
767
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
748
768
  // getters keep their established compatibility behavior.
749
769
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
750
- version: "0.3.89",
751
- updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
770
+ // 0.3.90 is the first deliberately versioned SDK release for API v3.
771
+ version: "0.3.91",
772
+ updateSummary: "Play grep now returns concise results with the matched fields and terms. 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.",
752
773
  packageCapabilities: {
753
774
  updatePreferences: 1
754
775
  },
755
776
  contracts: {
756
777
  api: {
757
778
  name: "sdk-http-api",
758
- // API v2 is append-only. A breaking public request/response change needs
759
- // v3 and an explicit v2 support-window decision, never a patch release.
760
- currentMajor: 2,
761
- supportedMajors: [2],
762
- // Accepted only to bridge SDKs released before X-Deepline-API-Major.
779
+ // Concise Play grep has the current wire id. Older ids follow the
780
+ // standard API support window.
781
+ currentMajor: 3,
782
+ supportedMajors: [3, 2],
783
+ // Older ids remain subject to the API support window.
763
784
  legacyWireIds: [
785
+ "2026-09-play-grep-concise-results",
764
786
  "2026-07-admin-cli-local-cutover",
765
787
  "2026-07-native-monitor-launch-hard-cutover"
766
788
  ]
@@ -1975,6 +1997,10 @@ function normalizeProductNotificationEmail(value) {
1975
1997
  const email = typeof value === "string" ? value.trim().toLowerCase() : "";
1976
1998
  return email && email.length <= 320 && PRODUCT_NOTIFICATION_EMAIL_PATTERN.test(email) ? email : null;
1977
1999
  }
2000
+ var DEFAULT_PRODUCT_NOTIFICATION_DELIVERY_TIMING = {
2001
+ mode: "rolling_limit",
2002
+ windowMs: 36e5
2003
+ };
1978
2004
 
1979
2005
  // src/stream-reconnect.ts
1980
2006
  var STREAM_RECONNECT_BASE_DELAY_MS = 500;
@@ -4468,6 +4494,7 @@ var DeeplineClient = class {
4468
4494
  this.runs = {
4469
4495
  get: (runId, options2) => this.getRunStatus(runId, options2),
4470
4496
  list: (options2) => this.listRuns(options2),
4497
+ listPage: (options2) => this.listRunsPage(options2),
4471
4498
  tail: (runId, options2) => this.tailRun(runId, options2),
4472
4499
  logs: (runId, options2) => this.getRunLogs(runId, options2),
4473
4500
  input: (runId) => this.getRunInput(runId),
@@ -4493,9 +4520,19 @@ var DeeplineClient = class {
4493
4520
  targetStatus: () => this.getTargetBillingStatus(),
4494
4521
  autoRecharge: {
4495
4522
  get: () => this.getTargetAutoRecharge(),
4523
+ trigger: (options2) => this.http.post(
4524
+ "/api/v2/billing/auto-recharge/trigger",
4525
+ {},
4526
+ {
4527
+ "Idempotency-Key": requireTargetBillingIdempotencyKey(
4528
+ options2?.idempotencyKey ?? globalThis.crypto.randomUUID()
4529
+ )
4530
+ }
4531
+ ),
4496
4532
  update: (options2) => this.updateTargetAutoRecharge(options2)
4497
4533
  },
4498
4534
  purchaseCredits: (options2) => this.purchaseTargetBillingCredits(options2),
4535
+ recoverCreditPurchase: (options2) => this.recoverTargetBillingCreditPurchase(options2),
4499
4536
  transitionPlan: (options2) => this.transitionTargetBillingPlan(options2),
4500
4537
  portalSession: () => this.createTargetBillingPortalSession()
4501
4538
  };
@@ -4664,6 +4701,14 @@ var DeeplineClient = class {
4664
4701
  if (options.playName !== void 0) params.set("play", options.playName);
4665
4702
  return this.http.get(`/api/v2/secrets?${params.toString()}`);
4666
4703
  }
4704
+ /** Add, replace, or clear the non-sensitive note attached to one secret. */
4705
+ async updateSecretNote(secretId, note) {
4706
+ const response = await this.http.patch(
4707
+ `/api/v2/secrets/${encodeURIComponent(secretId)}`,
4708
+ { note }
4709
+ );
4710
+ return response.secret;
4711
+ }
4667
4712
  // ——————————————————————————————————————————————————————————
4668
4713
  // Tools
4669
4714
  // ——————————————————————————————————————————————————————————
@@ -5681,6 +5726,10 @@ var DeeplineClient = class {
5681
5726
  * ```
5682
5727
  */
5683
5728
  async listRuns(options) {
5729
+ return (await this.listRunsPage(options)).runs;
5730
+ }
5731
+ /** Read one run page without discarding server pagination metadata. */
5732
+ async listRunsPage(options) {
5684
5733
  const playName = options.play?.trim();
5685
5734
  const params = new URLSearchParams();
5686
5735
  if (playName) {
@@ -5711,7 +5760,7 @@ var DeeplineClient = class {
5711
5760
  const response = await this.http.get(
5712
5761
  `/api/v2/runs?${params.toString()}`
5713
5762
  );
5714
- return response.runs ?? [];
5763
+ return { ...response, runs: response.runs ?? [] };
5715
5764
  }
5716
5765
  /**
5717
5766
  * Observe one run's live events. Uses the Convex Run Snapshot subscription
@@ -6106,13 +6155,33 @@ var DeeplineClient = class {
6106
6155
  );
6107
6156
  }
6108
6157
  /**
6109
- * List callable plays visible to the workspace.
6158
+ * List one page of callable plays; grep retains exhaustive matching results.
6159
+ * Use listPlaysPage to retain pagination metadata.
6110
6160
  *
6111
6161
  * Pass `origin: "prebuilt"` for Deepline-managed prebuilts or
6112
6162
  * `origin: "owned"` for org-owned plays.
6113
6163
  */
6114
6164
  async listPlays(options) {
6165
+ if (!options?.grep?.trim()) {
6166
+ return (await this.requestPlaysPage(options, false)).plays;
6167
+ }
6168
+ const plays = [];
6169
+ for await (const items of iterateCursorPages(async (cursor) => {
6170
+ const page = await this.listPlaysPage({ ...options, cursor });
6171
+ return { items: page.plays, cursor: page.cursor, hasMore: page.hasMore };
6172
+ })) {
6173
+ plays.push(...items);
6174
+ }
6175
+ return plays;
6176
+ }
6177
+ /** Read one bounded inventory page; cursor continues the same filters. */
6178
+ async listPlaysPage(options) {
6179
+ return this.requestPlaysPage(options);
6180
+ }
6181
+ async requestPlaysPage(options, paginateInventory = true) {
6115
6182
  const params = new URLSearchParams();
6183
+ if (paginateInventory && !options?.grep?.trim())
6184
+ params.set("inventory_paginated", "1");
6116
6185
  if (options?.origin) params.set("origin", options.origin);
6117
6186
  if (options?.categories) {
6118
6187
  params.set(
@@ -6124,26 +6193,27 @@ var DeeplineClient = class {
6124
6193
  params.set("include_tool_categories", "1");
6125
6194
  }
6126
6195
  if (options?.includeArchived) params.set("include_archived", "1");
6196
+ if (options?.includeCostEstimates) {
6197
+ params.set("include_cost_estimates", "1");
6198
+ }
6127
6199
  if (options?.grep?.trim()) {
6128
6200
  params.set("grep", options.grep.trim());
6129
- params.set("grep_mode", options.grepMode ?? "all");
6130
- params.set("grep_paginated", "1");
6131
6201
  params.set("limit", "60");
6132
6202
  }
6133
- const plays = [];
6134
- let cursor = null;
6135
- let hasMore = true;
6136
- do {
6137
- if (cursor) params.set("cursor", cursor);
6138
- const suffix = params.toString() ? `?${params.toString()}` : "";
6139
- const response = await this.http.get(
6140
- `/api/v2/plays${suffix}`
6141
- );
6142
- plays.push(...response.plays ?? []);
6143
- cursor = response.pagination?.cursor ?? response.cursor ?? null;
6144
- hasMore = Boolean(response.pagination?.hasMore ?? response.hasMore);
6145
- } while (Boolean(options?.grep?.trim()) && hasMore && cursor);
6146
- return plays;
6203
+ if (options?.limit !== void 0) {
6204
+ if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
6205
+ throw new Error("Play page limit must be a positive integer");
6206
+ }
6207
+ params.set("limit", String(options.limit));
6208
+ }
6209
+ if (options?.cursor) params.set("cursor", options.cursor);
6210
+ const suffix = params.size ? `?${params.toString()}` : "";
6211
+ const response = await this.http.get(`/api/v2/plays${suffix}`);
6212
+ return {
6213
+ plays: response.plays ?? [],
6214
+ cursor: response.pagination?.cursor ?? response.cursor ?? null,
6215
+ hasMore: Boolean(response.pagination?.hasMore ?? response.hasMore)
6216
+ };
6147
6217
  }
6148
6218
  /** Set whether an org-owned Play sorts before unpinned Plays. */
6149
6219
  async setPlayPinned(playName, pinned) {
@@ -6277,7 +6347,7 @@ var DeeplineClient = class {
6277
6347
  groupKey,
6278
6348
  name,
6279
6349
  enabled: true,
6280
- deliveryTiming: { mode: "immediate" },
6350
+ deliveryTiming: DEFAULT_PRODUCT_NOTIFICATION_DELIVERY_TIMING,
6281
6351
  source: "workspace",
6282
6352
  configMode: "custom",
6283
6353
  version: 0
@@ -6832,7 +6902,8 @@ var DeeplineClient = class {
6832
6902
  options.enabled ? {
6833
6903
  enabled: true,
6834
6904
  threshold_credits: options.thresholdCredits,
6835
- refill_to_credits: options.refillToCredits
6905
+ refill_to_credits: options.refillToCredits,
6906
+ ...options.purchaseLimitCents !== void 0 ? { purchase_limit_cents: options.purchaseLimitCents } : {}
6836
6907
  } : { enabled: false },
6837
6908
  { "Idempotency-Key": idempotencyKey }
6838
6909
  );
@@ -6853,6 +6924,39 @@ var DeeplineClient = class {
6853
6924
  { maxRetries: 0, exactUrlOnly: true }
6854
6925
  );
6855
6926
  }
6927
+ /** Recover only the original workspace, credit amount, and purchase key; never charge. */
6928
+ async recoverTargetBillingCreditPurchase(options) {
6929
+ if (typeof options.idempotencyKey !== "string") {
6930
+ throw new DeeplineError(
6931
+ "The original billing idempotencyKey is required.",
6932
+ void 0,
6933
+ "INVALID_BILLING_IDEMPOTENCY_KEY"
6934
+ );
6935
+ }
6936
+ const idempotencyKey = requireTargetBillingIdempotencyKey(
6937
+ options.idempotencyKey
6938
+ );
6939
+ if (!Number.isSafeInteger(options.credits) || options.credits <= 0) {
6940
+ throw new DeeplineError(
6941
+ "credits must be a positive safe integer.",
6942
+ void 0,
6943
+ "INVALID_CREDITS"
6944
+ );
6945
+ }
6946
+ if (typeof options.orgId !== "string" || !options.orgId.trim() || options.orgId !== options.orgId.trim()) {
6947
+ throw new DeeplineError(
6948
+ "The original orgId is required without surrounding whitespace.",
6949
+ void 0,
6950
+ "INVALID_ORG_ID"
6951
+ );
6952
+ }
6953
+ return this.http.post(
6954
+ "/api/v2/billing/credit-purchases/recover",
6955
+ { credits: options.credits, org_id: options.orgId },
6956
+ { "Idempotency-Key": idempotencyKey },
6957
+ { maxRetries: 0, exactUrlOnly: true }
6958
+ );
6959
+ }
6856
6960
  /**
6857
6961
  * Start, change, cancel, or restore a target plan through one idempotent
6858
6962
  * commercial operation.
@@ -11047,7 +11151,7 @@ function defineMonitor(definition) {
11047
11151
  return definition;
11048
11152
  }
11049
11153
 
11050
- // src/monitor-fleet-contract.ts
11154
+ // ../integration-contracts/monitor-fleet-contract.ts
11051
11155
  var MONITOR_FLEET_MAX_MEMBERS = 1e3;
11052
11156
  var MONITOR_FLEET_FRONTIER_MAX_ROWS = 1e4;
11053
11157
  var MONITOR_FLEET_AUTHORING_CONTRACT_EDITION = 1;