deepline 0.3.552 → 0.3.554

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 (323) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +107 -12
  2. package/dist/bundling-sources/sdk/src/compat.ts +239 -87
  3. package/dist/bundling-sources/sdk/src/config.ts +113 -2
  4. package/dist/bundling-sources/sdk/src/errors.ts +2 -0
  5. package/dist/bundling-sources/sdk/src/http-core.ts +118 -8
  6. package/dist/bundling-sources/sdk/src/index.ts +2 -0
  7. package/dist/bundling-sources/sdk/src/integrations.ts +6 -4
  8. package/dist/bundling-sources/sdk/src/play.ts +3 -0
  9. package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -1
  10. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  11. package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +8 -1
  12. package/dist/bundling-sources/sdk/src/tool-calls.ts +2 -1
  13. package/dist/bundling-sources/sdk/src/tool-failure-hint.ts +104 -0
  14. package/dist/bundling-sources/sdk/src/types.ts +9 -1
  15. package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +4 -2
  16. package/dist/bundling-sources/shared_libs/integration-contracts/billing-plan-skus.ts +25 -0
  17. package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +2 -0
  18. package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +58 -4
  19. package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +8 -0
  20. package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +11 -0
  21. package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +13 -0
  22. package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +103 -5
  23. package/dist/bundling-sources/shared_libs/monitors/fleets/converge-admission.ts +133 -0
  24. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-attention.ts +165 -0
  25. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-release.ts +726 -0
  26. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-walk.ts +274 -0
  27. package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +1 -0
  28. package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +28 -0
  29. package/dist/bundling-sources/shared_libs/monitors/fleets/provider-bulk-wait.ts +126 -0
  30. package/dist/bundling-sources/shared_libs/monitors/fleets/shared-payload.ts +189 -0
  31. package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +28 -0
  32. package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +4 -0
  33. package/dist/bundling-sources/shared_libs/monitors/inventory-counter-errors.ts +25 -0
  34. package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +65 -0
  35. package/dist/bundling-sources/shared_libs/monitors/package.json +9 -0
  36. package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +152 -1
  37. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +6 -0
  38. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +390 -10
  39. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +34 -0
  40. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +66 -30
  41. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +30 -0
  42. package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +26 -3
  43. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +41 -13
  44. package/dist/bundling-sources/shared_libs/monitors/signal-radars/raw-receipt-causes.ts +219 -0
  45. package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +21 -10
  46. package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +13 -0
  47. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +6 -0
  48. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +13 -0
  49. package/dist/bundling-sources/shared_libs/observability/dlq.ts +1 -1
  50. package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +5 -3
  51. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +10 -1
  52. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  53. package/dist/bundling-sources/shared_libs/observability/redaction.ts +24 -1
  54. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +168 -41
  55. package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -2
  56. package/dist/bundling-sources/shared_libs/play-data-plane/preview-r2-oidc.ts +188 -0
  57. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +170 -16
  58. package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +5 -0
  59. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +68 -2
  60. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +444 -39
  61. package/dist/bundling-sources/shared_libs/play-runtime/ctx-fetch-caller-deadline.ts +200 -0
  62. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
  63. package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +21 -1
  64. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +3 -2
  65. package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +70 -2
  66. package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +3 -3
  67. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +16 -0
  68. package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +72 -0
  69. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +1 -0
  70. package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +7 -1
  71. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +62 -0
  72. package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +74 -3
  73. package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +31 -3
  74. package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +6 -0
  75. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +8 -0
  76. package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +19 -0
  77. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +39 -2
  78. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +9 -1
  79. package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +33 -0
  80. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +24 -0
  81. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +254 -44
  82. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +87 -6
  83. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +241 -10
  84. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox-egress.ts +161 -14
  85. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +16 -3
  86. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-compression.ts +37 -0
  87. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +9 -0
  88. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +259 -52
  89. package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +13 -0
  90. package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +30 -0
  91. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +62 -1
  92. package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +36 -0
  93. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +36 -0
  94. package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +206 -2
  95. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +42 -0
  96. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +185 -64
  97. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-slot-ledger.ts +157 -0
  98. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +110 -2
  99. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts +323 -0
  100. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/executor-attempt-standing.ts +72 -0
  101. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-storage.ts +23 -4
  102. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-workspace-purge.ts +199 -0
  103. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +632 -66
  104. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +517 -16
  105. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +1 -1
  106. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-value-storage.ts +9 -0
  107. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +599 -2
  108. package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +26 -1
  109. package/dist/bundling-sources/shared_libs/play-runtime/startup-read-tool-ids.ts +60 -0
  110. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +51 -0
  111. package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +2 -0
  112. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +113 -3
  113. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +5 -7
  114. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +2 -0
  115. package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
  116. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +40 -5
  117. package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -0
  118. package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +16 -0
  119. package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +10 -41
  120. package/dist/bundling-sources/shared_libs/plays/extension-bridge.ts +33 -0
  121. package/dist/bundling-sources/shared_libs/plays/row-identity.ts +18 -1
  122. package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +108 -0
  123. package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +14 -0
  124. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +171 -0
  125. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +27 -1
  126. package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +9 -24
  127. package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +178 -5
  128. package/dist/bundling-sources/shared_libs/security/signup-email-dns-screen.ts +148 -0
  129. package/dist/bundling-sources/shared_libs/tool-execution-error.ts +108 -0
  130. package/dist/cli/{auth-KVSBJZOX.mjs → auth-HJUNW7T2.mjs} +8 -7
  131. package/dist/cli/auth-SP6SKZJZ.js +44 -0
  132. package/dist/cli/{billing-FQREA7UA.js → billing-4TSA5HEC.js} +297 -161
  133. package/dist/cli/{billing-54RHFEBI.mjs → billing-SJYRJAQ2.mjs} +197 -61
  134. package/dist/cli/{chunk-4MK42735.js → chunk-2HMN5H54.js} +215 -130
  135. package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
  136. package/dist/cli/{chunk-EOPEYCY7.mjs → chunk-2ORPFQUA.mjs} +18 -18
  137. package/dist/cli/{chunk-RQZQVFCJ.js → chunk-2OVHNHCF.js} +2 -2
  138. package/dist/cli/{chunk-QX7LFGJR.mjs → chunk-33WRQSQ2.mjs} +1874 -91
  139. package/dist/cli/{chunk-UPMRIVZB.js → chunk-3IKGZ4CG.js} +74 -13
  140. package/dist/cli/{chunk-EUPVF4SU.mjs → chunk-3Z4VFCXO.mjs} +8 -8
  141. package/dist/cli/{chunk-GKYAYLRI.js → chunk-4DOFGIEJ.js} +27 -31
  142. package/dist/cli/{chunk-4TALT2M3.mjs → chunk-52Q5KETX.mjs} +69 -3
  143. package/dist/cli/{chunk-RBEUVDZF.js → chunk-5CYZHOKI.js} +249 -107
  144. package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
  145. package/dist/cli/{chunk-IYSTRCLX.mjs → chunk-62AUAWQV.mjs} +4 -4
  146. package/dist/cli/{chunk-ZIAXDBXX.mjs → chunk-62HWJXST.mjs} +17 -21
  147. package/dist/cli/{chunk-QY3ZNU6Z.mjs → chunk-6EXOAT6T.mjs} +2 -2
  148. package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
  149. package/dist/cli/{chunk-ADRC5I3R.js → chunk-7OWI736E.js} +30 -30
  150. package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
  151. package/dist/cli/{chunk-PTVD2GVQ.mjs → chunk-B6HO2XWH.mjs} +13 -13
  152. package/dist/cli/{chunk-YJHE3O5M.mjs → chunk-BOZAP2EM.mjs} +141 -56
  153. package/dist/cli/chunk-BVXIGOBZ.js +32 -0
  154. package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
  155. package/dist/cli/{chunk-WE5HES3H.mjs → chunk-D6Z6POKE.mjs} +151 -43
  156. package/dist/cli/{chunk-AZQ264ID.mjs → chunk-DSKSFFK2.mjs} +1 -1
  157. package/dist/cli/{chunk-SHLFOPD6.js → chunk-DUBXUAAO.js} +5 -5
  158. package/dist/cli/{chunk-V436Z54K.js → chunk-E2G2DNAB.js} +3 -1
  159. package/dist/cli/{chunk-HO3XK3R7.js → chunk-E74KGKFZ.js} +8 -8
  160. package/dist/cli/{chunk-77AAAGVB.js → chunk-ECHKAC7M.js} +2 -2
  161. package/dist/cli/{chunk-KWSH5T7K.js → chunk-EN5NHCCQ.js} +21 -21
  162. package/dist/cli/{chunk-6RZOWL2V.mjs → chunk-F7CMRKSK.mjs} +1 -1
  163. package/dist/cli/{chunk-JWUAX6OP.js → chunk-FBAFX43W.js} +11 -11
  164. package/dist/cli/{chunk-AQWQ2BFX.mjs → chunk-FXQ3JKE3.mjs} +1 -1
  165. package/dist/cli/{chunk-QPKH23EC.mjs → chunk-GA2M3G3Y.mjs} +5 -5
  166. package/dist/cli/{chunk-G4O75EXF.js → chunk-GHT2NDL7.js} +18 -18
  167. package/dist/cli/{chunk-MF2GHZDO.js → chunk-GRZENGNE.js} +2 -2
  168. package/dist/cli/{chunk-4UUR4TCH.js → chunk-IVZKMJUK.js} +1875 -92
  169. package/dist/cli/{chunk-FTJLJCE5.mjs → chunk-KVBQY4ST.mjs} +3 -3
  170. package/dist/cli/{chunk-S5S355UY.mjs → chunk-KZHBDMGF.mjs} +12 -12
  171. package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
  172. package/dist/cli/{chunk-6ZORHRKB.mjs → chunk-LRZGS6RZ.mjs} +2 -0
  173. package/dist/cli/{chunk-2WFPHBR4.js → chunk-LY5MMXFF.js} +47 -29
  174. package/dist/cli/{chunk-BAIST2BR.js → chunk-M7STM3MZ.js} +36 -36
  175. package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
  176. package/dist/cli/{chunk-45PVGZST.js → chunk-OPTV7D2V.js} +508 -361
  177. package/dist/cli/{chunk-PFO3ISXA.js → chunk-OVEYWO4H.js} +174 -129
  178. package/dist/cli/{chunk-BGBJV26E.mjs → chunk-PC2FTUCP.mjs} +4 -4
  179. package/dist/cli/{chunk-WLN3SUIA.js → chunk-PQQMPUCZ.js} +3 -3
  180. package/dist/cli/{chunk-HYC4MKGK.mjs → chunk-Q7ACILL2.mjs} +5 -5
  181. package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
  182. package/dist/cli/{chunk-57VZVF5D.mjs → chunk-RBBTCYQB.mjs} +3 -3
  183. package/dist/cli/{chunk-F2LH7TGF.js → chunk-RTHMGSZX.js} +21 -21
  184. package/dist/cli/{chunk-YLTMXJFC.mjs → chunk-S6W6SJ6E.mjs} +158 -16
  185. package/dist/cli/chunk-STXDSVQZ.mjs +32 -0
  186. package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-TGUQET3O.mjs} +67 -6
  187. package/dist/cli/{chunk-IHRKLXZN.js → chunk-TJ6HLN56.js} +5 -5
  188. package/dist/cli/{chunk-3FD5EQ62.js → chunk-TOO3YM5N.js} +6 -7
  189. package/dist/cli/{chunk-QILKGXYF.mjs → chunk-UBBYHB2B.mjs} +2 -2
  190. package/dist/cli/{chunk-6PRW5UBA.mjs → chunk-UC4BDZKI.mjs} +299 -69
  191. package/dist/cli/{chunk-634ZDA3F.js → chunk-UNNOZKRT.js} +1 -1
  192. package/dist/cli/{chunk-IDVVIXPJ.js → chunk-UOT7HPBH.js} +41 -41
  193. package/dist/cli/{chunk-6YCA5NKJ.js → chunk-UYCZFQYQ.js} +12 -12
  194. package/dist/cli/{chunk-7IKQKKNX.js → chunk-VIUUTEHY.js} +90 -24
  195. package/dist/cli/{chunk-Z5TSLLOW.mjs → chunk-VLO5NFH2.mjs} +63 -18
  196. package/dist/cli/{chunk-U7QRMBIY.mjs → chunk-VQ75KX7G.mjs} +5 -5
  197. package/dist/cli/{chunk-4NQF6KJ3.js → chunk-VV4XGZ24.js} +13 -13
  198. package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
  199. package/dist/cli/{chunk-S46HWQKO.js → chunk-W6CZDTIR.js} +69 -69
  200. package/dist/cli/{chunk-XVB7V4N7.js → chunk-WL7P32PI.js} +161 -53
  201. package/dist/cli/{chunk-DJ2JDK4O.mjs → chunk-XD3MFTHA.mjs} +1 -1
  202. package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-XFZX6FNM.mjs} +40 -22
  203. package/dist/cli/{chunk-AWJPDPMA.mjs → chunk-XU6QNM4D.mjs} +1 -1
  204. package/dist/cli/{chunk-QAORXEY3.mjs → chunk-YCOGPOUX.mjs} +6 -7
  205. package/dist/cli/{chunk-VQALXEXO.js → chunk-YQKCH4R7.js} +348 -118
  206. package/dist/cli/{chunk-6O5HOODW.mjs → chunk-YY55NYAH.mjs} +207 -60
  207. package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
  208. package/dist/cli/command-docs.js +3 -3
  209. package/dist/cli/command-docs.mjs +2 -2
  210. package/dist/cli/{concurrent-runs-help-Q4KPAUJX.mjs → concurrent-runs-help-O3Q5IPLF.mjs} +9 -8
  211. package/dist/cli/concurrent-runs-help-ZFRZWX5V.js +22 -0
  212. package/dist/cli/{csv-F5VAGX4K.js → csv-4ZQ2RATI.js} +16 -15
  213. package/dist/cli/{csv-2PTVDNO6.mjs → csv-Y3BFPEM6.mjs} +7 -6
  214. package/dist/cli/{db-IEDXAUF7.mjs → db-3JYY4JNN.mjs} +17 -17
  215. package/dist/cli/{db-Z3OIUFMM.js → db-VEIFS4M7.js} +45 -45
  216. package/dist/cli/describe-EVJ4MFVU.mjs +50 -0
  217. package/dist/cli/describe-FG625QPF.js +50 -0
  218. package/dist/cli/describe-core.d.mts +3 -3
  219. package/dist/cli/describe-core.d.ts +3 -3
  220. package/dist/cli/describe-core.js +7 -7
  221. package/dist/cli/describe-core.mjs +6 -6
  222. package/dist/cli/{executions-H6H5655J.js → executions-HPZXOOVX.js} +12 -12
  223. package/dist/cli/{executions-R3LP74QN.mjs → executions-PCXZKEHM.mjs} +10 -10
  224. package/dist/cli/{feedback-WL3MRVT5.mjs → feedback-Y6VKZNY6.mjs} +9 -8
  225. package/dist/cli/{feedback-VFOUR66B.js → feedback-ZKFHFVL6.js} +17 -16
  226. package/dist/cli/git-RUBMALLH.js +26 -0
  227. package/dist/cli/{git-YX2J4GCI.mjs → git-UMPR2QYC.mjs} +8 -7
  228. package/dist/cli/index.js +170 -158
  229. package/dist/cli/index.mjs +60 -48
  230. package/dist/cli/{integrations-E2JZYKHS.js → integrations-3GQCTRTF.js} +23 -27
  231. package/dist/cli/{integrations-5ZK5KLVP.mjs → integrations-V3TM6XAB.mjs} +15 -19
  232. package/dist/cli/{legacy-noops-SMN3GSXY.mjs → legacy-noops-JZBUD7ZE.mjs} +9 -8
  233. package/dist/cli/{legacy-noops-3VW4IJTH.js → legacy-noops-VYCO7NGW.js} +12 -11
  234. package/dist/cli/{mcp-UQV2K4EW.js → mcp-4OIWTCE6.js} +121 -48
  235. package/dist/cli/{mcp-V6MGCYAG.mjs → mcp-PH4KZ76P.mjs} +100 -27
  236. package/dist/cli/{monitors-R3BBDCRC.js → monitors-E2A6VPBY.js} +221 -186
  237. package/dist/cli/{monitors-GGKS5W6M.mjs → monitors-SSMGIDGX.mjs} +58 -23
  238. package/dist/cli/org-SFDKSK5D.mjs +2289 -0
  239. package/dist/cli/org-WUDZGWBT.js +2289 -0
  240. package/dist/cli/outcomes-QT7LQBPK.mjs +2865 -0
  241. package/dist/cli/outcomes-Y7SZTLSL.js +2865 -0
  242. package/dist/cli/{play-MDWPR4XG.mjs → play-EK7KSFPL.mjs} +376 -106
  243. package/dist/cli/{play-2MVO27VO.js → play-GDNHCRRR.js} +1150 -880
  244. package/dist/cli/{providers-AKDYFZJZ.mjs → providers-FVZLRXAU.mjs} +10 -10
  245. package/dist/cli/{providers-2AACRUZH.js → providers-ZKOSECLV.js} +13 -13
  246. package/dist/cli/{quickstart-H6IV3PV3.js → quickstart-KSDKIXYD.js} +9 -8
  247. package/dist/cli/{quickstart-QDGRJFZY.mjs → quickstart-UJZ6PIQV.mjs} +7 -6
  248. package/dist/cli/{run-RTSQNGRD.mjs → run-E7MZ7P35.mjs} +35 -33
  249. package/dist/cli/{run-2634REDK.js → run-PD2BBG6S.js} +55 -53
  250. package/dist/cli/run-identity-LMLFMACS.js +31 -0
  251. package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MAZ7ANH5.mjs} +9 -3
  252. package/dist/cli/search-TKSPTPHA.js +32 -0
  253. package/dist/cli/{search-6AOJ4XPP.mjs → search-VTFUFTOY.mjs} +11 -11
  254. package/dist/cli/{search-output-S5ODBL5E.js → search-output-G2AGDCOY.js} +13 -12
  255. package/dist/cli/{search-output-6ADMTOU5.mjs → search-output-PFVXQCWA.mjs} +10 -9
  256. package/dist/cli/{secrets-TFIFBFB3.mjs → secrets-7CIMEMX7.mjs} +11 -11
  257. package/dist/cli/{secrets-LHCIIHMT.js → secrets-BCOQ4U7U.js} +20 -20
  258. package/dist/cli/sessions-4CO556VD.js +23 -0
  259. package/dist/cli/{sessions-WHBVUHVW.mjs → sessions-IUCQZEF7.mjs} +9 -8
  260. package/dist/cli/{settings-EBONWL5C.mjs → settings-KZN62UQK.mjs} +16 -16
  261. package/dist/cli/{settings-CP4FVK2W.js → settings-REL4736M.js} +89 -89
  262. package/dist/cli/{setup-I5AZE3IU.mjs → setup-2P7OG3OU.mjs} +22 -24
  263. package/dist/cli/{setup-LFGHTNLQ.js → setup-2XIVBBCS.js} +62 -64
  264. package/dist/cli/skills-JYT5DEY6.js +37 -0
  265. package/dist/cli/{skills-W76AO5XE.mjs → skills-VIGNDJKI.mjs} +10 -9
  266. package/dist/cli/tools-NTVUQ2TG.js +57 -0
  267. package/dist/cli/{tools-7IJHGF6W.mjs → tools-W3QT5EJY.mjs} +24 -24
  268. package/dist/cli/{update-GFOPZTHY.mjs → update-GZVBVMY3.mjs} +14 -11
  269. package/dist/cli/update-TWJZPUZM.js +37 -0
  270. package/dist/cli/{views-D4NX4SBG.mjs → views-BOGEH424.mjs} +47 -49
  271. package/dist/cli/{views-BPL2TQJ4.js → views-TOLJNLSV.js} +62 -64
  272. package/dist/cli/{workflow-ZYNAUCKC.js → workflow-ENWFRK5M.js} +23 -23
  273. package/dist/cli/{workflow-YXP42FUI.mjs → workflow-VDG2FDQV.mjs} +13 -13
  274. package/dist/{client-CyXGrO4D.d.mts → client-B8f7RNF8.d.mts} +1 -1
  275. package/dist/{client-Bf3IpUKN.d.ts → client-C5TgXmJQ.d.ts} +1 -1
  276. package/dist/{client-core-BxsLnXlm.d.mts → client-core-SLLGBTht.d.mts} +268 -23
  277. package/dist/{client-core-BWd0lX0Z.d.ts → client-core-p0sOxnkl.d.ts} +268 -23
  278. package/dist/{compiler-manifest-BqwVrOri.d.ts → compiler-manifest-D_zZEh9Q.d.mts} +70 -5
  279. package/dist/{compiler-manifest-BqwVrOri.d.mts → compiler-manifest-D_zZEh9Q.d.ts} +70 -5
  280. package/dist/{errors-BU8FB99X.d.mts → errors-CZCrBFrQ.d.mts} +1 -1
  281. package/dist/{errors-DfVN_FUG.d.ts → errors-DsUkLrdZ.d.ts} +1 -1
  282. package/dist/{index-BGnvtYGc.d.ts → index-B6RTOZGC.d.ts} +1 -1
  283. package/dist/{index-DjZgwpGw.d.mts → index-DeOVrEmX.d.mts} +1 -1
  284. package/dist/index.d.mts +7 -7
  285. package/dist/index.d.ts +7 -7
  286. package/dist/index.js +66 -55
  287. package/dist/index.mjs +25 -14
  288. package/dist/install-integrity.json +163 -144
  289. package/dist/plays/bundle-play-file.d.mts +3 -3
  290. package/dist/plays/bundle-play-file.d.ts +3 -3
  291. package/dist/plays/bundle-play-file.mjs +23 -4
  292. package/dist/plays/csv-data-input.js +3 -3
  293. package/dist/plays/csv-data-input.mjs +2 -2
  294. package/dist/plays/play-description.d.mts +2 -2
  295. package/dist/plays/play-description.d.ts +2 -2
  296. package/dist/plays/run-request.d.mts +2 -2
  297. package/dist/plays/run-request.d.ts +2 -2
  298. package/dist/plays/run-request.js +4 -4
  299. package/dist/plays/run-request.mjs +3 -3
  300. package/dist/release.d.mts +1 -1
  301. package/dist/release.d.ts +1 -1
  302. package/dist/release.js +2 -2
  303. package/dist/release.mjs +1 -1
  304. package/dist/server.d.mts +4 -4
  305. package/dist/server.d.ts +4 -4
  306. package/dist/server.js +15 -13
  307. package/dist/server.mjs +9 -7
  308. package/package.json +1 -1
  309. package/dist/cli/auth-MMNVWATX.js +0 -43
  310. package/dist/cli/chunk-AID3OYVJ.js +0 -8
  311. package/dist/cli/chunk-OVDNJAJN.mjs +0 -8
  312. package/dist/cli/concurrent-runs-help-FQAIHKKC.js +0 -21
  313. package/dist/cli/describe-QDANCTS3.mjs +0 -50
  314. package/dist/cli/describe-VUTT5ZKU.js +0 -50
  315. package/dist/cli/git-ETB3GH3K.js +0 -25
  316. package/dist/cli/org-GRYVMNSW.js +0 -1282
  317. package/dist/cli/org-Z37NGJV4.mjs +0 -1282
  318. package/dist/cli/run-identity-G257GQED.js +0 -25
  319. package/dist/cli/search-VTW2YNBS.js +0 -32
  320. package/dist/cli/sessions-CJ4FJ2WB.js +0 -22
  321. package/dist/cli/skills-R7EBXREW.js +0 -36
  322. package/dist/cli/tools-V7U2BDXM.js +0 -57
  323. package/dist/cli/update-4COPZETK.js +0 -34
@@ -2,7 +2,12 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk2WFPHBR4js = require('./chunk-2WFPHBR4.js');
5
+ var _chunkLY5MMXFFjs = require('./chunk-LY5MMXFF.js');
6
+
7
+
8
+
9
+
10
+ var _chunkBVXIGOBZjs = require('./chunk-BVXIGOBZ.js');
6
11
 
7
12
 
8
13
  var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
@@ -50,6 +55,8 @@ var CapabilityDescription = class _CapabilityDescription {
50
55
  customerCost() {
51
56
  const legacyCost = recordValue(this.#catalogEntry.cost);
52
57
  const pricing = recordValue(this.#catalogEntry.pricing);
58
+ const monitorCost = monitorCustomerCost(pricing);
59
+ if (monitorCost) return monitorCost;
53
60
  const unit = stringValue(pricing.unit);
54
61
  const legacyPricingModel = stringValue(
55
62
  _nullishCoalesce(legacyCost.pricingModel, () => ( legacyCost.pricing_model))
@@ -107,6 +114,22 @@ var CapabilityDescription = class _CapabilityDescription {
107
114
  };
108
115
  }
109
116
  };
117
+ function monitorCustomerCost(pricing) {
118
+ const credits = pricing.deepline_credits;
119
+ if (typeof credits !== "number" || !Number.isFinite(credits)) return null;
120
+ const chargeTiming = stringValue(pricing.charge_timing);
121
+ return {
122
+ pricingModel: stringValue(pricing.mode),
123
+ unit: stringValue(pricing.unit),
124
+ displayText: stringValue(pricing.display),
125
+ summary: chargeTiming ? `Charged ${chargeTiming}.` : null,
126
+ billingMode: null,
127
+ billingSource: null,
128
+ billingSourceLabel: null,
129
+ deeplineCreditsPerPricingUnit: credits,
130
+ deeplineUsdPerPricingUnit: null
131
+ };
132
+ }
110
133
  function recordValue(value) {
111
134
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
112
135
  }
@@ -136,6 +159,9 @@ function isPlayLikeTool(tool) {
136
159
  function isMonitorTypeTool(tool) {
137
160
  return stringField(tool, "kind") === "monitor_type";
138
161
  }
162
+ function isMonitorVariantIndex(tool) {
163
+ return stringField(tool, "kind") === "monitor_variant_index";
164
+ }
139
165
  function playReferenceForTool(tool) {
140
166
  const record = tool;
141
167
  const declared = stringField(record, "playReference", "play_reference");
@@ -147,14 +173,22 @@ function playReferenceForTool(tool) {
147
173
  function playSearchCommandForToolId(toolId) {
148
174
  return `deepline search ${JSON.stringify(toolId.replace(/_/g, " "))}`;
149
175
  }
150
- function playRunCommandForTool(tool, toolId, input) {
176
+ function playRunCommandForTool(tool, toolId, input, platform = process.platform) {
151
177
  const playReference = playReferenceForTool(tool);
152
178
  if (!playReference) return playSearchCommandForToolId(toolId);
153
- const inputArg = input === void 0 ? "'{...}'" : `'${JSON.stringify(input)}'`;
154
- return `deepline run ${playReference} --input ${inputArg}`;
179
+ if (input === void 0) {
180
+ return `deepline run ${playReference} ${_chunkBVXIGOBZjs.examplePlaceholderInput.call(void 0, platform)}`;
181
+ }
182
+ const { argument, file } = _chunkBVXIGOBZjs.exampleJsonInput.call(void 0, JSON.stringify(input), platform);
183
+ const command = `deepline run ${playReference} ${argument}`;
184
+ return file ? `${_chunkBVXIGOBZjs.exampleInputFileLine.call(void 0, file)}
185
+ ${command}` : command;
155
186
  }
156
187
  function toolContractJsonForDescribe(tool, requestedToolId, authoringContractEdition, seedStarterScript) {
157
188
  const toolId = String(tool.toolId || requestedToolId);
189
+ if (isMonitorTypeTool(tool) || isMonitorVariantIndex(tool)) {
190
+ return { ...tool, toolId };
191
+ }
158
192
  const inputFields = toolInputFieldsForDisplay(
159
193
  recordField(tool, "inputSchema", "input_schema")
160
194
  );
@@ -280,7 +314,7 @@ function extractorValueType(name) {
280
314
  }
281
315
  const named = NAMED_VALUE_SHAPES[definition.valueKind];
282
316
  if (!named) return { type: "string" };
283
- const { type, fields } = _chunk2WFPHBR4js.schemaField.call(void 0, name, named.schema, true);
317
+ const { type, fields } = _chunkLY5MMXFFjs.schemaField.call(void 0, name, named.schema, true);
284
318
  return { type, ...fields ? { fields } : {}, shape: named.shape };
285
319
  }
286
320
  function jsonSchemaOf(wrapper) {
@@ -309,15 +343,38 @@ function describedTool(tool, requestedToolId) {
309
343
  const id = stringField(tool, "toolId") || requestedToolId;
310
344
  const displayName = stringField(tool, "displayName") || void 0;
311
345
  const description = stringField(tool, "bestFor", "best_for") || stringField(tool, "description") || void 0;
346
+ if (isMonitorVariantIndex(tool)) {
347
+ const variants = arrayField(tool, "variants").filter(isRecord);
348
+ return {
349
+ kind: "monitor_type",
350
+ id,
351
+ displayName,
352
+ description,
353
+ guidance: variants.map(
354
+ (variant) => `Radar type ${stringField(variant, "radar_type")}: ${stringField(
355
+ variant,
356
+ "describeCommand"
357
+ )}${stringField(variant, "displayName") ? ` (${stringField(variant, "displayName")})` : ""}`
358
+ ),
359
+ inputs: [],
360
+ outputs: [],
361
+ runner: {
362
+ via: "monitor",
363
+ deploy: stringField(tool, "next") || "deepline tools list --categories monitors"
364
+ }
365
+ };
366
+ }
312
367
  if (isMonitorTypeTool(tool)) {
368
+ const pricing = recordField(tool, "pricing");
313
369
  return {
314
370
  kind: "monitor_type",
315
371
  id,
316
372
  displayName,
317
373
  description,
318
- cost: stringField(recordField(tool, "pricing"), "displayText") || void 0,
374
+ // The server's public monitor pricing sends `display`.
375
+ cost: stringField(pricing, "display", "displayText") || void 0,
319
376
  guidance: [],
320
- inputs: _chunk2WFPHBR4js.schemaFields.call(void 0,
377
+ inputs: _chunkLY5MMXFFjs.schemaFields.call(void 0,
321
378
  recordField(tool, "payload_schema", "payloadSchema")
322
379
  ),
323
380
  outputs: [],
@@ -354,7 +411,7 @@ function describedTool(tool, requestedToolId) {
354
411
  (path) => path.replace(/^toolResponse\.raw\./, "")
355
412
  );
356
413
  const node = roots.flatMap((root) => paths.map((path) => schemaNodeAt(root, path))).find(isRecord);
357
- const { fields, ...typed } = _chunk2WFPHBR4js.schemaField.call(void 0, name, node, true);
414
+ const { fields, ...typed } = _chunkLY5MMXFFjs.schemaField.call(void 0, name, node, true);
358
415
  const valueType = stringField(_nullishCoalesce(details.get(name), () => ( {})), "valueType");
359
416
  const deepline = kind === "extractedValues" ? extractorValueType(name) : void 0;
360
417
  const known = typed.type !== "unknown" ? void 0 : kind === "extractedLists" ? { type: "object[]" } : deepline;
@@ -423,7 +480,7 @@ function describedTool(tool, requestedToolId) {
423
480
  ],
424
481
  rateLimit: withPlanRateLimit(
425
482
  recordField(recordField(tool, "pricing"), "benefit").requestsPerMinute,
426
- _chunk2WFPHBR4js.rateLimitSummary.call(void 0,
483
+ _chunkLY5MMXFFjs.rateLimitSummary.call(void 0,
427
484
  recordField(contract, "executionMetadata").configuredRateLimits
428
485
  )
429
486
  ),
@@ -433,14 +490,14 @@ function describedTool(tool, requestedToolId) {
433
490
  ...connectCommand && !_optionalChain([tool, 'access', _5 => _5.auth, 'optionalAccess', _6 => _6.connectionRequired]) ? { connectCommand } : {},
434
491
  ...tool.auth ? { auth: tool.auth } : {},
435
492
  ...tool.toolUsage ? { toolUsage: tool.toolUsage } : {},
436
- inputs: _chunk2WFPHBR4js.schemaFields.call(void 0, inputSchema),
493
+ inputs: _chunkLY5MMXFFjs.schemaFields.call(void 0, inputSchema),
437
494
  outputs: [...lists, ...values].map(({ field }) => field),
438
- rawResponse: _chunk2WFPHBR4js.schemaFields.call(void 0, outputSchema),
495
+ rawResponse: _chunkLY5MMXFFjs.schemaFields.call(void 0, outputSchema),
439
496
  runner: playReference ? { via: "play", reference: playReference } : { via: "tool", toolId: String(contract.toolId), inputSchema }
440
497
  };
441
498
  }
442
499
  function withPlanRateLimit(planRequestsPerMinute, configuredLimit) {
443
- return typeof planRequestsPerMinute === "number" ? `${planRequestsPerMinute} requests/minute for this workspace on its plan` : configuredLimit;
500
+ return typeof planRequestsPerMinute === "number" ? `${planRequestsPerMinute} requests/minute for this org on its plan` : configuredLimit;
444
501
  }
445
502
  function sampleValueForField(field) {
446
503
  const name = stringField(field, "name").toLowerCase();
@@ -476,6 +533,9 @@ function playResultExpression(entry) {
476
533
  }
477
534
  function toolMetadataJsonForDescribe(tool, requestedToolId, seedStarterScript) {
478
535
  const toolId = String(tool.toolId || requestedToolId);
536
+ if (isMonitorTypeTool(tool) || isMonitorVariantIndex(tool)) {
537
+ return { ...tool, toolId };
538
+ }
479
539
  const inputFields = toolInputFieldsForDisplay(
480
540
  recordField(tool, "inputSchema", "input_schema")
481
541
  );
@@ -885,4 +945,5 @@ function arrayField2(value, key) {
885
945
 
886
946
 
887
947
 
888
- exports.observedMaxText = observedMaxText; exports.Capability = Capability; exports.isPlayLikeTool = isPlayLikeTool; exports.isMonitorTypeTool = isMonitorTypeTool; exports.playReferenceForTool = playReferenceForTool; exports.playSearchCommandForToolId = playSearchCommandForToolId; exports.playRunCommandForTool = playRunCommandForTool; exports.toolContractJsonForDescribe = toolContractJsonForDescribe; exports.publicToolSchemas = publicToolSchemas; exports.describedTool = describedTool; exports.samplePayloadForInputFields = samplePayloadForInputFields; exports.playResultExpression = playResultExpression; exports.toolMetadataJsonForDescribe = toolMetadataJsonForDescribe; exports.toolInputFieldsForDisplay = toolInputFieldsForDisplay; exports.toolOutputFieldsForDisplay = toolOutputFieldsForDisplay; exports.recursiveToolInputFieldsForDisplay = recursiveToolInputFieldsForDisplay; exports.isRecord = isRecord; exports.stringField = stringField; exports.arrayField = arrayField; exports.recordField = recordField; exports.formatModelDescription = formatModelDescription;
948
+
949
+ exports.observedMaxText = observedMaxText; exports.Capability = Capability; exports.isPlayLikeTool = isPlayLikeTool; exports.isMonitorTypeTool = isMonitorTypeTool; exports.isMonitorVariantIndex = isMonitorVariantIndex; exports.playReferenceForTool = playReferenceForTool; exports.playSearchCommandForToolId = playSearchCommandForToolId; exports.playRunCommandForTool = playRunCommandForTool; exports.toolContractJsonForDescribe = toolContractJsonForDescribe; exports.publicToolSchemas = publicToolSchemas; exports.describedTool = describedTool; exports.samplePayloadForInputFields = samplePayloadForInputFields; exports.playResultExpression = playResultExpression; exports.toolMetadataJsonForDescribe = toolMetadataJsonForDescribe; exports.toolInputFieldsForDisplay = toolInputFieldsForDisplay; exports.toolOutputFieldsForDisplay = toolOutputFieldsForDisplay; exports.recursiveToolInputFieldsForDisplay = recursiveToolInputFieldsForDisplay; exports.isRecord = isRecord; exports.stringField = stringField; exports.arrayField = arrayField; exports.recordField = recordField; exports.formatModelDescription = formatModelDescription;
@@ -1,29 +1,29 @@
1
1
  import {
2
2
  seedToolListScript
3
- } from "./chunk-6O5HOODW.mjs";
3
+ } from "./chunk-YY55NYAH.mjs";
4
4
  import {
5
5
  addDescribeOptions
6
- } from "./chunk-FTJLJCE5.mjs";
6
+ } from "./chunk-KVBQY4ST.mjs";
7
7
  import {
8
8
  describeLookupsFor,
9
9
  describeName,
10
10
  findNamed
11
- } from "./chunk-BGBJV26E.mjs";
11
+ } from "./chunk-PC2FTUCP.mjs";
12
12
  import {
13
13
  SCHEMA_LINE_LIMIT
14
- } from "./chunk-GGGAEVCX.mjs";
14
+ } from "./chunk-XFZX6FNM.mjs";
15
15
  import {
16
16
  DeeplineClient
17
- } from "./chunk-QY3ZNU6Z.mjs";
17
+ } from "./chunk-6EXOAT6T.mjs";
18
18
  import {
19
19
  failureReportHeaders,
20
20
  isFailureReportingDisabled,
21
21
  printCommandEnvelope
22
- } from "./chunk-6PRW5UBA.mjs";
22
+ } from "./chunk-UC4BDZKI.mjs";
23
23
  import {
24
24
  autoDetectBaseUrl,
25
25
  resolveApiKeyForBaseUrl
26
- } from "./chunk-4TALT2M3.mjs";
26
+ } from "./chunk-52Q5KETX.mjs";
27
27
 
28
28
  // src/cli/commands/describe.ts
29
29
  import { writeFileSync } from "fs";
@@ -114,7 +114,7 @@ What you can describe:
114
114
  docs/skills/<name> prints that skill.
115
115
 
116
116
  When a name is taken twice:
117
- A play your workspace created is shown instead of a Deepline tool, monitor
117
+ A play your org created is shown instead of a Deepline tool, monitor
118
118
  type or prebuilt play with the same name, and the output says so.
119
119
  Name it deepline/<name> to see the Deepline one (--prebuilt does the same).
120
120
 
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkSHLFOPD6js = require('./chunk-SHLFOPD6.js');
3
+ var _chunkDUBXUAAOjs = require('./chunk-DUBXUAAO.js');
4
4
 
5
5
 
6
- var _chunkVQALXEXOjs = require('./chunk-VQALXEXO.js');
6
+ var _chunkYQKCH4R7js = require('./chunk-YQKCH4R7.js');
7
7
 
8
8
  // src/cli/commands/integration-commands.ts
9
9
  var _commander = require('commander');
10
10
  var _fs = require('fs');
11
11
  var _path = require('path');
12
12
  function printIntegrationResult(value, json, lines, nextCursor) {
13
- _chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
13
+ _chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
14
14
  {},
15
15
  {
16
16
  json: json || void 0,
@@ -24,9 +24,9 @@ function printIntegrationResult(value, json, lines, nextCursor) {
24
24
  }
25
25
  function registerIntegrationBalanceCommand(parent, hidden = false) {
26
26
  return parent.command("balance <provider>", { hidden }).description(
27
- "Read a fresh balance using this workspace\u2019s own provider connection (LeadMagic)."
27
+ "Read a fresh balance using this org\u2019s own provider connection (LeadMagic)."
28
28
  ).option("--json", "Print the balance and observation timestamp as JSON").action(async (provider, options) => {
29
- const balance = await new (0, _chunkSHLFOPD6js.DeeplineClient)().getIntegrationBalance(
29
+ const balance = await new (0, _chunkDUBXUAAOjs.DeeplineClient)().getIntegrationBalance(
30
30
  provider
31
31
  );
32
32
  printIntegrationResult(balance, options.json, [
@@ -35,14 +35,12 @@ function registerIntegrationBalanceCommand(parent, hidden = false) {
35
35
  });
36
36
  }
37
37
  function registerWorkspaceConnectionListCommand(parent, name = "workspace-connections", hidden = false) {
38
- return parent.command(name, { hidden }).description(
39
- "List named workspace authorizations and their connection status."
40
- ).option("--json", "Print connection summaries as JSON").option("--inventory", "List workspace connections across credential types").option("--provider <provider>", "List connections for one provider").option(
38
+ return parent.command(name, { hidden }).description("List named org authorizations and their connection status.").option("--json", "Print connection summaries as JSON").option("--inventory", "List org connections across credential types").option("--provider <provider>", "List connections for one provider").option(
41
39
  "--members",
42
40
  "List teammates\u2019 personal connections for this provider"
43
41
  ).option("--cursor <cursor>", "Read the next page of members").action(
44
42
  async (options) => {
45
- const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
43
+ const client = new (0, _chunkDUBXUAAOjs.DeeplineClient)();
46
44
  if (name === "list" && options.cursor && !options.members)
47
45
  throw new Error(
48
46
  "Use --cursor with --members to continue a member page."
@@ -77,16 +75,14 @@ function registerWorkspaceConnectionListCommand(parent, name = "workspace-connec
77
75
  options.json,
78
76
  connections.length ? connections.map(
79
77
  (row) => `${row.provider} ${row.status} ${row.name ? row.name + " " : ""}${row.label}`
80
- ) : ["No workspace connections."]
78
+ ) : ["No org connections."]
81
79
  );
82
80
  }
83
81
  );
84
82
  }
85
83
  function registerLegacyHubSpotMembersCommand(parent, hidden = false) {
86
- return parent.command("hubspot-members", { hidden }).description(
87
- "List personal HubSpot connection status for workspace members."
88
- ).option("--cursor <cursor>", "Read the next roster page").option("--json", "Print the roster page as JSON").action(async (options) => {
89
- const page = await new (0, _chunkSHLFOPD6js.DeeplineClient)().listPersonalHubSpotMembers(
84
+ return parent.command("hubspot-members", { hidden }).description("List personal HubSpot connection status for org members.").option("--cursor <cursor>", "Read the next roster page").option("--json", "Print the roster page as JSON").action(async (options) => {
85
+ const page = await new (0, _chunkDUBXUAAOjs.DeeplineClient)().listPersonalHubSpotMembers(
90
86
  options.cursor
91
87
  );
92
88
  const rows = page.members.map((member) => {
@@ -96,13 +92,13 @@ function registerLegacyHubSpotMembersCommand(parent, hidden = false) {
96
92
  printIntegrationResult(
97
93
  page,
98
94
  options.json,
99
- rows.length ? rows : ["No workspace members on this page."],
95
+ rows.length ? rows : ["No org members on this page."],
100
96
  page.nextCursor
101
97
  );
102
98
  });
103
99
  }
104
100
  function registerLegacyWorkspaceConnectionCommand(parent, hidden = false) {
105
- return parent.command("workspace-connection <provider> <action>", { hidden }).description("Manage a shared workspace account.").option("--json", "Print the result as JSON").option("--name <name>", "Name of a workspace connection").option("--auto-name", "Assign a name when connecting a workspace account").action(
101
+ return parent.command("workspace-connection <provider> <action>", { hidden }).description("Manage a shared org account.").option("--json", "Print the result as JSON").option("--name <name>", "Name of an org connection").option("--auto-name", "Assign a name when connecting an org account").action(
106
102
  async (provider, action, options) => {
107
103
  if (provider !== "hubspot" && provider !== "google_calendar_availability")
108
104
  throw new Error("Choose hubspot or google_calendar_availability.");
@@ -112,7 +108,7 @@ function registerLegacyWorkspaceConnectionCommand(parent, hidden = false) {
112
108
  );
113
109
  if (options.autoName && (action !== "connect" || options.name !== void 0))
114
110
  throw new Error("Use --auto-name with connect and omit --name.");
115
- const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
111
+ const client = new (0, _chunkDUBXUAAOjs.DeeplineClient)();
116
112
  const { connections } = action === "connect" ? { connections: [] } : options.name ? await client.listWorkspaceConnectionInventory(provider) : await client.listWorkspaceIntegrationConnections();
117
113
  const row = connections.find(
118
114
  (connection) => connection.provider === provider && (!("type" in connection) || connection.type === "oauth") && (options.name === void 0 || "name" in connection && connection.name === options.name)
@@ -126,7 +122,7 @@ function registerLegacyWorkspaceConnectionCommand(parent, hidden = false) {
126
122
  authorizationVersion: _optionalChain([row, 'optionalAccess', _2 => _2.authorizationVersion])
127
123
  });
128
124
  printIntegrationResult(result, options.json, [
129
- _nullishCoalesce(result.url, () => ( (action === "remove" ? "Workspace connection removed." : "Workspace connection disconnected.")))
125
+ _nullishCoalesce(result.url, () => ( (action === "remove" ? "Org connection removed." : "Org connection disconnected.")))
130
126
  ]);
131
127
  }
132
128
  );
@@ -134,24 +130,24 @@ function registerLegacyWorkspaceConnectionCommand(parent, hidden = false) {
134
130
  function registerLegacyCalendarDelegationCommand(parent, hidden = false) {
135
131
  return parent.command("calendar-delegation <action>", { hidden }).description(
136
132
  "Manage Google Workspace approval. Named-team settings are deprecated."
137
- ).option("--name <name>", "Select a named availability connection").option("--domain <domain>", "Select a Google Workspace by domain").option("--label <label>", "Display name for a named connection").option("--everyone", "Include all eligible current and future members").option("--cursor <cursor>", "Read the next page of workspace members").option("--revision <revision>", "Current connection revision from status").option("--connection-id <id>", "Connection ID from status for edits").option(
133
+ ).option("--name <name>", "Select a named availability connection").option("--domain <domain>", "Select a Google Workspace by domain").option("--label <label>", "Display name for a named connection").option("--everyone", "Include all eligible current and future members").option("--cursor <cursor>", "Read the next page of org members").option("--revision <revision>", "Current connection revision from status").option("--connection-id <id>", "Connection ID from status for edits").option(
138
134
  "--grant-revision <revision>",
139
- "Workspace approval revision from list"
140
- ).option("--members <memberIds...>", "Workspace member IDs to approve").option(
135
+ "Google Workspace approval revision from list"
136
+ ).option("--members <memberIds...>", "Org member IDs to approve").option(
141
137
  "--verification-email <email>",
142
- "Verify Workspace approval with a work email"
138
+ "Verify Google Workspace approval with a work email"
143
139
  ).option(
144
140
  "--dry-run",
145
141
  "Print the proposed change without contacting Google or saving it"
146
142
  ).option("--json", "Print the result as JSON").action(
147
143
  async (action, options) => {
148
- const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
144
+ const client = new (0, _chunkDUBXUAAOjs.DeeplineClient)();
149
145
  if (action === "list") {
150
146
  const inventory = await client.listCalendarAvailabilityConnections();
151
147
  const approvals = _optionalChain([inventory, 'access', _3 => _3.approvals, 'optionalAccess', _4 => _4.length]) ? inventory.approvals.map(
152
148
  (approval) => `${approval.domain} ${approval.enabled ? "approved" : "paused"} revision ${approval.revision}`
153
149
  ) : [
154
- `Workspace approval ${inventory.grantEnabled ? "connected" : "disconnected"} \xB7 revision ${inventory.grantRevision}`
150
+ `Google Workspace approval ${inventory.grantEnabled ? "connected" : "disconnected"} \xB7 revision ${inventory.grantRevision}`
155
151
  ];
156
152
  printIntegrationResult(inventory, options.json, [
157
153
  ...approvals,
@@ -204,12 +200,12 @@ function registerLegacyCalendarDelegationCommand(parent, hidden = false) {
204
200
  );
205
201
  if (options.cursor || (action === "enable" || action === "enable-workspace" ? !(_optionalChain([options, 'access', _5 => _5.members, 'optionalAccess', _6 => _6.length]) || action === "enable-workspace" && options.verificationEmail) : options.members || options.verificationEmail) || options.members && options.verificationEmail)
206
202
  throw new Error(
207
- "Use --verification-email for Workspace approval or --members for legacy settings. Use --cursor only with status."
203
+ "Use --verification-email for Google Workspace approval or --members for legacy settings. Use --cursor only with status."
208
204
  );
209
205
  const grantRevision = Number(options.grantRevision);
210
206
  if ((workspaceAction || options.name) && (options.grantRevision === void 0 || !/^\d+$/.test(options.grantRevision) || !Number.isSafeInteger(grantRevision)))
211
207
  throw new Error(
212
- "Pass --grant-revision with the current workspace approval revision."
208
+ "Pass --grant-revision with the current Google Workspace approval revision."
213
209
  );
214
210
  let change;
215
211
  if (workspaceAction) {
@@ -295,7 +291,7 @@ function registerLegacyCalendarDelegationCommand(parent, hidden = false) {
295
291
  }
296
292
  function registerLegacyAvailabilityCalendarsCommand(parent, hidden = false) {
297
293
  return parent.command("availability-calendars", { hidden }).description("Calendar discovery compatibility command for the pilot.").option("--cursor <cursor>", "Legacy calendar page cursor").option("--json", "Print the response as JSON").action(async (options) => {
298
- const page = await new (0, _chunkSHLFOPD6js.DeeplineClient)().listAvailabilityCalendars(
294
+ const page = await new (0, _chunkDUBXUAAOjs.DeeplineClient)().listAvailabilityCalendars(
299
295
  options.cursor
300
296
  );
301
297
  printIntegrationResult(page, options.json, [
@@ -339,7 +335,7 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
339
335
  printSetupPlan({ provider, action: "connect_link" }, options.json);
340
336
  return;
341
337
  }
342
- const link = await new (0, _chunkSHLFOPD6js.DeeplineClient)().getIntegrationConnectLink(
338
+ const link = await new (0, _chunkDUBXUAAOjs.DeeplineClient)().getIntegrationConnectLink(
343
339
  provider
344
340
  );
345
341
  printIntegrationResult(link, options.json, [link.connect_url]);
@@ -366,7 +362,7 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
366
362
  );
367
363
  return;
368
364
  }
369
- const result2 = await new (0, _chunkSHLFOPD6js.DeeplineClient)().startIntegrationOAuth(
365
+ const result2 = await new (0, _chunkDUBXUAAOjs.DeeplineClient)().startIntegrationOAuth(
370
366
  provider,
371
367
  {
372
368
  ...options.preset !== void 0 ? { preset: options.preset } : {},
@@ -416,7 +412,7 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
416
412
  "--credentials-file must contain a nonempty JSON object of string credential values."
417
413
  );
418
414
  }
419
- const result = await new (0, _chunkSHLFOPD6js.DeeplineClient)().setIntegrationCredentials(
415
+ const result = await new (0, _chunkDUBXUAAOjs.DeeplineClient)().setIntegrationCredentials(
420
416
  provider,
421
417
  credentials,
422
418
  { expectedConnectionId: options.expectedConnectionId }
@@ -428,7 +424,7 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
428
424
  }
429
425
  const confirmation = { provider, credential_saved: true };
430
426
  printIntegrationResult(confirmation, options.json, [
431
- `Credentials saved for ${provider} in the active workspace.`
427
+ `Credentials saved for ${provider} in the active org.`
432
428
  ]);
433
429
  }
434
430
  );
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  HttpClient,
3
3
  detectAgentRuntime
4
- } from "./chunk-YLTMXJFC.mjs";
4
+ } from "./chunk-S6W6SJ6E.mjs";
5
5
  import {
6
6
  ConfigError
7
- } from "./chunk-NURW5XH4.mjs";
7
+ } from "./chunk-ASB47RXJ.mjs";
8
8
 
9
9
  // src/config.ts
10
10
  import {
@@ -23,9 +23,21 @@ var API_KEY_ENV = "DEEPLINE_API_KEY";
23
23
  var ACTIVE_ORG_ID_ENV = "DEEPLINE_ACTIVE_ORG_ID";
24
24
  var ACTIVE_ORG_NAME_ENV = "DEEPLINE_ACTIVE_ORG_NAME";
25
25
  var FEATURES_ENV = "DEEPLINE_FEATURES";
26
+ var WORKSPACE_ID_ENV = "DEEPLINE_WORKSPACE_ID";
26
27
  var PROD_URL = "https://code.deepline.com";
27
28
  var DEFAULT_TIMEOUT = 6e4;
28
29
  var DEFAULT_MAX_RETRIES = 3;
30
+ var TRANSIENT_HTTP_STATUSES = /* @__PURE__ */ new Set([
31
+ 408,
32
+ 425,
33
+ 429,
34
+ 502,
35
+ 503,
36
+ 504
37
+ ]);
38
+ function defaultRetryBackoffMs(retry) {
39
+ return Math.min(1e3 * 2 ** (retry - 1), 3e4);
40
+ }
29
41
  var PROJECT_DEEPLINE_ENV_FILE = ".env.deepline";
30
42
  var COWORK_IGNORED_WORKSPACE_DIRS = /* @__PURE__ */ new Set([
31
43
  ".auto-memory",
@@ -48,7 +60,8 @@ var CLI_ENV_ALLOWED_KEYS = /* @__PURE__ */ new Set([
48
60
  API_KEY_ENV,
49
61
  ACTIVE_ORG_ID_ENV,
50
62
  ACTIVE_ORG_NAME_ENV,
51
- FEATURES_ENV
63
+ FEATURES_ENV,
64
+ WORKSPACE_ID_ENV
52
65
  ]);
53
66
  function featureEnvValues(data) {
54
67
  if (!Array.isArray(data.features)) return {};
@@ -281,6 +294,10 @@ function mergePersistedEnvValues(existing, values) {
281
294
  delete merged[ACTIVE_ORG_ID_ENV];
282
295
  delete merged[ACTIVE_ORG_NAME_ENV];
283
296
  delete merged[FEATURES_ENV];
297
+ delete merged[WORKSPACE_ID_ENV];
298
+ }
299
+ if (values[WORKSPACE_ID_ENV] === void 0 && values[ACTIVE_ORG_ID_ENV] !== void 0 && values[ACTIVE_ORG_ID_ENV] !== existing[ACTIVE_ORG_ID_ENV]) {
300
+ delete merged[WORKSPACE_ID_ENV];
284
301
  }
285
302
  if (values[FEATURES_ENV] === "") {
286
303
  delete merged[FEATURES_ENV];
@@ -388,6 +405,48 @@ function resolveBaseUrlOnly(options) {
388
405
  }
389
406
  return baseUrl;
390
407
  }
408
+ function resolveCredentialEnvFile(config, startDir = process.cwd()) {
409
+ const apiKey = config.apiKey.trim();
410
+ if (!apiKey || process.env[API_KEY_ENV]?.trim()) return null;
411
+ const folder = getResolvedProjectAuthSource(config.baseUrl, apiKey, startDir);
412
+ if (folder) {
413
+ return { scope: "folder", filePath: folder.filePath, env: folder.env };
414
+ }
415
+ const filePath = sdkCliEnvFilePath(config.baseUrl);
416
+ const env = parseEnvFile(filePath);
417
+ return (env[API_KEY_ENV] ?? "").trim() === apiKey ? { scope: "global", filePath, env } : null;
418
+ }
419
+ function resolveCliWorkspace(config, explicitWorkspace) {
420
+ const option = explicitWorkspace?.trim();
421
+ if (option) return { workspaceId: option, source: "option" };
422
+ const env = process.env[WORKSPACE_ID_ENV]?.trim();
423
+ if (env) return { workspaceId: env, source: "env" };
424
+ const saved = resolveCredentialEnvFile(config)?.env[WORKSPACE_ID_ENV]?.trim();
425
+ if (saved) return { workspaceId: saved, source: "saved" };
426
+ return { workspaceId: null, source: "default" };
427
+ }
428
+ function saveCliWorkspace(config, workspaceId) {
429
+ const target = resolveCredentialEnvFile(config);
430
+ if (!target) {
431
+ throw new ConfigError(
432
+ `${API_KEY_ENV} comes from the environment, so there is no saved auth to add a workspace to. Set ${WORKSPACE_ID_ENV} for that invocation instead.`
433
+ );
434
+ }
435
+ const values = { [WORKSPACE_ID_ENV]: workspaceId ?? "" };
436
+ if (target.scope === "folder") {
437
+ mergeProjectEnvFile(target.filePath, values);
438
+ } else {
439
+ saveHostEnvValues(config.baseUrl, values);
440
+ }
441
+ return { scope: target.scope, filePath: target.filePath };
442
+ }
443
+ function workspaceConfig(baseUrl, apiKey, explicitWorkspace) {
444
+ const { workspaceId } = resolveCliWorkspace(
445
+ { baseUrl, apiKey },
446
+ explicitWorkspace
447
+ );
448
+ return workspaceId ? { workspace: workspaceId } : {};
449
+ }
391
450
  function resolveConfig(options) {
392
451
  const baseUrl = normalizeBaseUrl(
393
452
  options?.baseUrl?.trim() || autoDetectBaseUrl()
@@ -408,6 +467,7 @@ function resolveConfig(options) {
408
467
  baseUrl,
409
468
  timeout: options?.timeout ?? DEFAULT_TIMEOUT,
410
469
  maxRetries: options?.maxRetries ?? DEFAULT_MAX_RETRIES,
470
+ ...workspaceConfig(baseUrl, apiKey, options?.workspace),
411
471
  // Pass through untouched: the transport owns case-insensitive merging so
412
472
  // there is exactly one place that decides which header wins.
413
473
  ...options?.headers ? { headers: { ...options.headers } } : {},
@@ -794,6 +854,10 @@ export {
794
854
  ACTIVE_ORG_NAME_ENV,
795
855
  FEATURES_ENV,
796
856
  PROD_URL,
857
+ DEFAULT_TIMEOUT,
858
+ DEFAULT_MAX_RETRIES,
859
+ TRANSIENT_HTTP_STATUSES,
860
+ defaultRetryBackoffMs,
797
861
  featureEnvValues,
798
862
  storedHostApiKey,
799
863
  storedHostFeatures,
@@ -809,6 +873,8 @@ export {
809
873
  resolveGlobalApiKeyForBaseUrl,
810
874
  getResolvedProjectAuthSource,
811
875
  resolveBaseUrlOnly,
876
+ resolveCliWorkspace,
877
+ saveCliWorkspace,
812
878
  resolveConfig,
813
879
  ensureProjectPrivatePathsIgnored,
814
880
  saveProjectDeeplineEnvValues,