deepline 0.3.542 → 0.3.544

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 (246) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +112 -2
  2. package/dist/bundling-sources/sdk/src/index.ts +7 -0
  3. package/dist/bundling-sources/sdk/src/integrations.ts +198 -0
  4. package/dist/bundling-sources/sdk/src/plays/run-request.ts +3 -0
  5. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  6. package/dist/bundling-sources/sdk/src/tool-calls.ts +35 -11
  7. package/dist/bundling-sources/sdk/src/types.ts +10 -0
  8. package/dist/bundling-sources/shared_libs/integration-contracts/calendar-delegation.ts +132 -0
  9. package/dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts +3 -1
  10. package/dist/bundling-sources/shared_libs/integration-contracts/tool-connection.ts +13 -0
  11. package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +108 -1
  12. package/dist/bundling-sources/shared_libs/monitors/package.json +1 -1
  13. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
  14. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  15. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +5 -5
  16. package/dist/bundling-sources/shared_libs/play-data-plane/sheet-contract.ts +34 -0
  17. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +11 -5
  18. package/dist/bundling-sources/shared_libs/play-runtime/baked-runner-image.ts +9 -7
  19. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +235 -12
  20. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +20 -1
  21. package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-janitor.ts +39 -30
  22. package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +29 -0
  23. package/dist/bundling-sources/shared_libs/play-runtime/event-wait-tools.ts +2 -0
  24. package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +10 -4
  25. package/dist/bundling-sources/shared_libs/play-runtime/fleet-sandbox-sweep.ts +209 -0
  26. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +4 -0
  27. package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +24 -1
  28. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/contracts.ts +2 -1
  29. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +6 -1
  30. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +37 -0
  31. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +43 -3
  32. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +7 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-modal-fallback.ts +15 -0
  34. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +23 -5
  35. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +320 -836
  36. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/vercel-sandbox.ts +1061 -0
  37. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +862 -0
  38. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +45 -0
  39. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/sandbox-create-outcome.ts +3 -1
  40. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +11 -5
  41. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-contract.ts +20 -2
  42. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-placement-policy.ts +71 -34
  43. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-provider-profile.ts +286 -0
  44. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +4 -1
  45. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +12 -3
  46. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +7 -0
  47. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +49 -55
  48. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-required-env.ts +127 -5
  49. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +7 -1
  50. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +214 -0
  51. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/managed-sandbox-resource-sql.ts +118 -0
  52. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +1 -0
  53. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +229 -144
  54. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +2 -2
  55. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +2 -1
  56. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +11 -13
  57. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-operation.ts +42 -7
  58. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +2 -1
  59. package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +2 -2
  60. package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +17 -0
  61. package/dist/bundling-sources/shared_libs/play-runtime/vercel-sandbox-runtime-config.ts +217 -0
  62. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +23 -0
  63. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +1 -0
  64. package/dist/bundling-sources/shared_libs/plays/script-entry.ts +76 -6
  65. package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +1 -0
  66. package/dist/bundling-sources/shared_libs/security/credential-revision.ts +50 -0
  67. package/dist/bundling-sources/shared_libs/security/internal-actor.ts +2 -1
  68. package/dist/bundling-sources/shared_libs/security/receipt-admission-token.ts +37 -0
  69. package/dist/cli/auth-ENBXAKQS.js +43 -0
  70. package/dist/cli/{auth-IGBGOB4E.mjs → auth-IMWJAHPU.mjs} +5 -5
  71. package/dist/cli/{billing-IB2TWE74.js → billing-Y55PR2PV.js} +101 -101
  72. package/dist/cli/{billing-N37W2I62.mjs → billing-YQMW3QJI.mjs} +12 -12
  73. package/dist/cli/chunk-22OBDYHP.js +455 -0
  74. package/dist/cli/{chunk-GBAT5NMI.mjs → chunk-2HSZCQMT.mjs} +48 -6
  75. package/dist/cli/{chunk-VLEVVDWG.js → chunk-2JHYYB3F.js} +3 -3
  76. package/dist/cli/{chunk-D44DP4KJ.js → chunk-3I26HMJ7.js} +37 -17
  77. package/dist/cli/{chunk-B5NP3SHX.mjs → chunk-3JDA23NN.mjs} +2 -2
  78. package/dist/cli/{chunk-QXNOSCYL.js → chunk-3KGMM4KS.js} +1 -1
  79. package/dist/cli/{chunk-6WQDHEVF.mjs → chunk-456RRXAP.mjs} +5 -5
  80. package/dist/cli/{chunk-V4EYJKGJ.js → chunk-4JQEAYN3.js} +156 -17
  81. package/dist/cli/{chunk-FGGPCAGC.js → chunk-4PKHFW56.js} +18 -18
  82. package/dist/cli/{chunk-QONO7FRF.mjs → chunk-57G4NYOL.mjs} +1 -1
  83. package/dist/cli/{chunk-46V7QSJE.mjs → chunk-5PR4VLLL.mjs} +3 -3
  84. package/dist/cli/{chunk-OLH2PHMC.mjs → chunk-6P7TGCHQ.mjs} +1 -1
  85. package/dist/cli/{chunk-AKY7KZRJ.js → chunk-7GNZEOTH.js} +6 -6
  86. package/dist/cli/{chunk-LFMQVSEI.js → chunk-7HMMTSDA.js} +5 -5
  87. package/dist/cli/{chunk-ORA5TMML.mjs → chunk-BEQ7RQLT.mjs} +5 -5
  88. package/dist/cli/{chunk-KQSTV4MW.js → chunk-BLYW6FFB.js} +60 -18
  89. package/dist/cli/{chunk-GM73TZ2W.js → chunk-C4P2KLWT.js} +41 -41
  90. package/dist/cli/{chunk-DNGACHFX.js → chunk-COJHT2KF.js} +22 -22
  91. package/dist/cli/{chunk-6SLEHAXX.js → chunk-DF2X7GJG.js} +5 -5
  92. package/dist/cli/{chunk-TT4JUUC3.mjs → chunk-DVDWAC2M.mjs} +7 -3
  93. package/dist/cli/{chunk-5CAVURVS.js → chunk-DYDHLBSK.js} +53 -53
  94. package/dist/cli/{chunk-UNDLNT3V.js → chunk-ECWOIXAV.js} +1 -1
  95. package/dist/cli/{chunk-EHLCWGWN.js → chunk-G26VJCNT.js} +4 -4
  96. package/dist/cli/{chunk-WL2GUGNZ.js → chunk-GQHRGBHV.js} +7 -7
  97. package/dist/cli/{chunk-DADH3WPE.mjs → chunk-GV45TTI6.mjs} +2 -2
  98. package/dist/cli/{chunk-OVX3Q5Q3.mjs → chunk-GWNYLIF7.mjs} +1 -1
  99. package/dist/cli/{chunk-EGOCGWCI.mjs → chunk-H4SAHB3Q.mjs} +3 -3
  100. package/dist/cli/{chunk-FX4OWXKK.mjs → chunk-HAQRF6DJ.mjs} +2 -2
  101. package/dist/cli/{chunk-NLZHLEHD.mjs → chunk-HBSWATOU.mjs} +6 -6
  102. package/dist/cli/{chunk-ACVTMAW4.mjs → chunk-HVJQF5BI.mjs} +2 -2
  103. package/dist/cli/{chunk-L2VKAASU.mjs → chunk-HXIR3VQL.mjs} +21 -0
  104. package/dist/cli/{chunk-Z5YRKX7K.mjs → chunk-HXM2JUGD.mjs} +1 -1
  105. package/dist/cli/{chunk-JPT6VE54.js → chunk-IFIJ4DBJ.js} +2 -2
  106. package/dist/cli/{chunk-HAITCPCG.js → chunk-JBWOE6AP.js} +16 -16
  107. package/dist/cli/{chunk-AWLPERL3.js → chunk-JWVG7ZPX.js} +3 -3
  108. package/dist/cli/{chunk-3XXXMSSP.js → chunk-KE6CSCUF.js} +44 -44
  109. package/dist/cli/{chunk-2ZGSHVZE.mjs → chunk-LPUBBUKX.mjs} +24 -4
  110. package/dist/cli/{chunk-PLIKPGOO.mjs → chunk-LQ6RRYXN.mjs} +5 -5
  111. package/dist/cli/{chunk-FFDZT255.mjs → chunk-LW274RO7.mjs} +1 -1
  112. package/dist/cli/{chunk-Z2XA6YU4.mjs → chunk-LX35AXTN.mjs} +1 -0
  113. package/dist/cli/{chunk-FANIRW74.mjs → chunk-NIPLY25A.mjs} +0 -2
  114. package/dist/cli/{chunk-VHJUH3TB.js → chunk-ON56ISO6.js} +3 -3
  115. package/dist/cli/{chunk-4I47NCRI.js → chunk-PDJ4UDCO.js} +498 -328
  116. package/dist/cli/{chunk-SWO5QOXB.mjs → chunk-PFGOCUH3.mjs} +1 -1
  117. package/dist/cli/{chunk-Q7WDXLYO.js → chunk-PKRW76XG.js} +2 -2
  118. package/dist/cli/{chunk-YK7NNZD4.mjs → chunk-PMW5YP72.mjs} +37 -190
  119. package/dist/cli/{chunk-5APOJWJF.mjs → chunk-Q7ZOWNKR.mjs} +183 -13
  120. package/dist/cli/{chunk-WACIN4PR.mjs → chunk-REEOMNCO.mjs} +3 -3
  121. package/dist/cli/{chunk-DMXLZ57N.js → chunk-RG34YBDE.js} +2 -2
  122. package/dist/cli/{chunk-3LEUSRV3.mjs → chunk-RJPDCSTD.mjs} +4 -4
  123. package/dist/cli/{chunk-IPVRMYWT.js → chunk-RKF263LR.js} +5 -5
  124. package/dist/cli/{chunk-AUFE624T.js → chunk-RUFR4PUO.js} +10 -10
  125. package/dist/cli/{chunk-I5EAIFGO.mjs → chunk-SK3HPU2J.mjs} +1 -1
  126. package/dist/cli/{chunk-ZVNYBQ77.mjs → chunk-SKS53WM6.mjs} +4 -4
  127. package/dist/cli/{chunk-CQDQNZGH.js → chunk-SL6MYJYM.js} +1 -0
  128. package/dist/cli/{chunk-E4CABWXL.js → chunk-TI6DTURF.js} +22 -1
  129. package/dist/cli/{chunk-CFZCRM6R.js → chunk-UHIAQPVA.js} +26 -26
  130. package/dist/cli/{chunk-D7GWEBMF.js → chunk-UNMNGRPB.js} +7 -7
  131. package/dist/cli/{chunk-GWHA4DAC.js → chunk-UV4RU2TE.js} +0 -2
  132. package/dist/cli/{chunk-TTBHOMAA.js → chunk-W7X4KH45.js} +316 -469
  133. package/dist/cli/chunk-WBSGPLH5.mjs +455 -0
  134. package/dist/cli/{chunk-SCLP5H4P.mjs → chunk-WUEORIOY.mjs} +1 -1
  135. package/dist/cli/{chunk-IDDKNMFX.mjs → chunk-Y3T5GWYK.mjs} +153 -14
  136. package/dist/cli/{chunk-P4MDTBAA.mjs → chunk-YIRVKMON.mjs} +1 -1
  137. package/dist/cli/{chunk-NDNEARE3.js → chunk-Z44YTSTA.js} +13 -13
  138. package/dist/cli/{chunk-F6QV42MC.mjs → chunk-Z7SXGOIQ.mjs} +1 -1
  139. package/dist/cli/{chunk-2VRKBHMD.mjs → chunk-ZHY4T5M6.mjs} +1 -1
  140. package/dist/cli/{chunk-E7B73LGT.js → chunk-ZY6FL4O4.js} +24 -20
  141. package/dist/cli/command-docs.js +3 -3
  142. package/dist/cli/command-docs.mjs +2 -2
  143. package/dist/cli/{concurrent-runs-help-DIBGMEIN.mjs → concurrent-runs-help-KBWPKSTP.mjs} +7 -7
  144. package/dist/cli/concurrent-runs-help-TOMLCMV7.js +21 -0
  145. package/dist/cli/{csv-CAVA3EMS.mjs → csv-M5EBEMZH.mjs} +4 -4
  146. package/dist/cli/{csv-XZAM7EYZ.js → csv-XGGDZTQI.js} +13 -13
  147. package/dist/cli/{db-PPGEOBNG.js → db-CVPR54XK.js} +29 -29
  148. package/dist/cli/{db-HD332QI7.mjs → db-M6FJ6J6E.mjs} +8 -8
  149. package/dist/cli/describe-RUODIS6M.js +50 -0
  150. package/dist/cli/describe-X6QA2U3C.mjs +50 -0
  151. package/dist/cli/describe-core.d.mts +3 -3
  152. package/dist/cli/describe-core.d.ts +3 -3
  153. package/dist/cli/describe-core.js +3 -3
  154. package/dist/cli/describe-core.mjs +2 -2
  155. package/dist/cli/{executions-AFEOLB4A.mjs → executions-EHTS2XJX.mjs} +8 -8
  156. package/dist/cli/{executions-4ZKBL7IC.js → executions-VJEEWN22.js} +10 -10
  157. package/dist/cli/{feedback-J2YPLKMF.mjs → feedback-76VGY4GP.mjs} +6 -6
  158. package/dist/cli/{feedback-M6Y33JKT.js → feedback-DQPUCUXO.js} +14 -14
  159. package/dist/cli/{git-632RYEF6.mjs → git-IY6DKKLR.mjs} +5 -5
  160. package/dist/cli/git-RLHTSYRY.js +25 -0
  161. package/dist/cli/index.js +150 -146
  162. package/dist/cli/index.mjs +49 -45
  163. package/dist/cli/integrations-242LE3TQ.mjs +98 -0
  164. package/dist/cli/integrations-CQSTIKFY.js +98 -0
  165. package/dist/cli/{legacy-noops-KWZMXYAU.mjs → legacy-noops-SWTSTMRY.mjs} +6 -6
  166. package/dist/cli/{legacy-noops-4Y62TKPC.js → legacy-noops-U72DO6ZF.js} +9 -9
  167. package/dist/cli/{mcp-PESLHAAC.mjs → mcp-JJH6JR52.mjs} +72 -15
  168. package/dist/cli/{mcp-35QA6YG7.js → mcp-L473BKLJ.js} +89 -32
  169. package/dist/cli/{monitors-4DTUZLAI.js → monitors-3TF2DOFD.js} +119 -104
  170. package/dist/cli/{monitors-YVBKBJBU.mjs → monitors-VSYHUBKC.mjs} +26 -11
  171. package/dist/cli/{org-DJNKMFCZ.mjs → org-S5VIKU2E.mjs} +8 -8
  172. package/dist/cli/{org-FWCBZMER.js → org-YKVI2ZTI.js} +90 -90
  173. package/dist/cli/{play-PHVQEEEZ.mjs → play-C7T5A3QM.mjs} +44 -25
  174. package/dist/cli/{play-FZ45M4KD.js → play-DOWEG45Y.js} +374 -355
  175. package/dist/cli/{providers-46E67QG7.mjs → providers-BMVVX3VD.mjs} +10 -9
  176. package/dist/cli/{providers-QJU6FMDD.js → providers-TAZPPFTB.js} +13 -12
  177. package/dist/cli/{quickstart-6HMJJ4RR.mjs → quickstart-A3WKMKTW.mjs} +4 -4
  178. package/dist/cli/{quickstart-HOL7H5FS.js → quickstart-HD6FQXGR.js} +6 -6
  179. package/dist/cli/{run-WKSIRXEC.js → run-BVVV2UX7.js} +49 -48
  180. package/dist/cli/{run-2W2TJ6QA.mjs → run-FV7TWNOC.mjs} +28 -27
  181. package/dist/cli/{search-Y2CFLSYB.mjs → search-MGK6WIKS.mjs} +9 -9
  182. package/dist/cli/search-VJFCWUZN.js +32 -0
  183. package/dist/cli/{search-output-2IK6ZZDY.js → search-output-6Y7KEPIE.js} +6 -6
  184. package/dist/cli/{search-output-FCZ35PHF.mjs → search-output-GM7LDZKE.mjs} +4 -4
  185. package/dist/cli/{secrets-PNPNUZLX.mjs → secrets-4RFAR7YI.mjs} +8 -8
  186. package/dist/cli/{secrets-JVJIHGU4.js → secrets-SISXIXSZ.js} +17 -17
  187. package/dist/cli/{sessions-GY5VVQGO.mjs → sessions-CE3OMEG7.mjs} +6 -6
  188. package/dist/cli/sessions-OWWZJZXH.js +22 -0
  189. package/dist/cli/{settings-5WHMFRNQ.js → settings-4HPM3K4A.js} +89 -89
  190. package/dist/cli/{settings-YQOPF3AI.mjs → settings-E22IDSX2.mjs} +16 -16
  191. package/dist/cli/{setup-3VJMKDEU.js → setup-BDRSNLKX.js} +49 -49
  192. package/dist/cli/{setup-O5U5IEVW.mjs → setup-BK65MDZ6.mjs} +9 -9
  193. package/dist/cli/{skills-G6J5PF35.mjs → skills-FI2GZMR4.mjs} +7 -7
  194. package/dist/cli/skills-ZLBFUAFR.js +36 -0
  195. package/dist/cli/tools-3K72VE33.js +57 -0
  196. package/dist/cli/{tools-AG7SWL5Y.mjs → tools-HMMWYUNW.mjs} +20 -19
  197. package/dist/cli/update-QZV6DH5V.js +34 -0
  198. package/dist/cli/{update-K73DD6CR.mjs → update-WDKBSXV5.mjs} +9 -9
  199. package/dist/cli/{views-4D2OTLIO.js → views-775AUDWQ.js} +23 -23
  200. package/dist/cli/{views-MO6DIOMR.mjs → views-JYIJCO23.mjs} +8 -8
  201. package/dist/cli/{workflow-ZEMFCS4Y.js → workflow-4H6KQRFQ.js} +19 -19
  202. package/dist/cli/{workflow-MMZMAELI.mjs → workflow-FKKHE3IU.mjs} +9 -9
  203. package/dist/{client-DLG9mHDh.d.mts → client-ANT3pyoa.d.mts} +1 -1
  204. package/dist/{client-X-FJD5Dp.d.ts → client-DD_FyJVd.d.ts} +1 -1
  205. package/dist/{client-core-WtnqyBwY.d.mts → client-core-Dg9tKhdB.d.mts} +339 -3
  206. package/dist/{client-core-0jmHfFBv.d.ts → client-core-QHmo73k1.d.ts} +339 -3
  207. package/dist/{compiler-manifest-Cys06iYg.d.mts → compiler-manifest-BWFtsQIC.d.mts} +21 -0
  208. package/dist/{compiler-manifest-Cys06iYg.d.ts → compiler-manifest-BWFtsQIC.d.ts} +21 -0
  209. package/dist/{errors-B6eMjKcr.d.mts → errors-CwKXXtuu.d.mts} +1 -1
  210. package/dist/{errors-rdOUqcU2.d.ts → errors-Lm9_vJHZ.d.ts} +1 -1
  211. package/dist/{index-ejWadAL5.d.ts → index-3vJ-V9yw.d.ts} +1 -1
  212. package/dist/{index-CZdYO81A.d.mts → index-DjwsAt82.d.mts} +1 -1
  213. package/dist/index.d.mts +7 -7
  214. package/dist/index.d.ts +7 -7
  215. package/dist/index.js +12 -12
  216. package/dist/index.mjs +8 -8
  217. package/dist/install-integrity.json +147 -133
  218. package/dist/plays/bundle-play-file.d.mts +3 -3
  219. package/dist/plays/bundle-play-file.d.ts +3 -3
  220. package/dist/plays/bundle-play-file.mjs +23 -4
  221. package/dist/plays/play-description.d.mts +2 -2
  222. package/dist/plays/play-description.d.ts +2 -2
  223. package/dist/plays/run-request.d.mts +2 -2
  224. package/dist/plays/run-request.d.ts +2 -2
  225. package/dist/plays/run-request.js +2 -2
  226. package/dist/plays/run-request.mjs +1 -1
  227. package/dist/release.d.mts +1 -1
  228. package/dist/release.d.ts +1 -1
  229. package/dist/release.js +2 -2
  230. package/dist/release.mjs +1 -1
  231. package/dist/server.d.mts +4 -4
  232. package/dist/server.d.ts +4 -4
  233. package/dist/server.js +7 -7
  234. package/dist/server.mjs +5 -5
  235. package/package.json +1 -1
  236. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal-resource-usage.ts +0 -222
  237. package/dist/cli/auth-2PH6RSKL.js +0 -43
  238. package/dist/cli/concurrent-runs-help-BNIDBKML.js +0 -21
  239. package/dist/cli/describe-5TFFB2PM.js +0 -49
  240. package/dist/cli/describe-THQU7N47.mjs +0 -49
  241. package/dist/cli/git-AQLQYWRI.js +0 -25
  242. package/dist/cli/search-YLJFCJTK.js +0 -32
  243. package/dist/cli/sessions-TZ33UCPS.js +0 -22
  244. package/dist/cli/skills-WZY3XDT3.js +0 -36
  245. package/dist/cli/tools-BXQBL72Q.js +0 -56
  246. package/dist/cli/update-XYP5EII6.js +0 -34
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  concurrentRunsLine
3
- } from "./chunk-46V7QSJE.mjs";
4
- import "./chunk-EGOCGWCI.mjs";
3
+ } from "./chunk-5PR4VLLL.mjs";
4
+ import "./chunk-H4SAHB3Q.mjs";
5
5
  import {
6
6
  DeeplineClient
7
- } from "./chunk-DADH3WPE.mjs";
7
+ } from "./chunk-GV45TTI6.mjs";
8
8
  import {
9
9
  iterateCursorPages,
10
10
  requireBillingIdempotencyKey
11
- } from "./chunk-5APOJWJF.mjs";
12
- import "./chunk-L2VKAASU.mjs";
13
- import "./chunk-Z2XA6YU4.mjs";
11
+ } from "./chunk-Q7ZOWNKR.mjs";
12
+ import "./chunk-HXIR3VQL.mjs";
13
+ import "./chunk-LX35AXTN.mjs";
14
14
  import "./chunk-PSX3WHIH.mjs";
15
15
  import "./chunk-UBKA33KY.mjs";
16
16
  import {
17
17
  PLAY_RUNTIME_PRICING_NOTE
18
- } from "./chunk-IDDKNMFX.mjs";
18
+ } from "./chunk-Y3T5GWYK.mjs";
19
19
  import {
20
20
  PRICING_PAGE_NOTE
21
- } from "./chunk-FANIRW74.mjs";
21
+ } from "./chunk-NIPLY25A.mjs";
22
22
  import "./chunk-5LUF4LAR.mjs";
23
23
  import {
24
24
  PLAY_SANDBOX_SIZE_INPUTS
@@ -29,9 +29,9 @@ import {
29
29
  openInBrowser,
30
30
  printCommandEnvelope,
31
31
  shouldEmitJson
32
- } from "./chunk-TT4JUUC3.mjs";
33
- import "./chunk-Z5YRKX7K.mjs";
34
- import "./chunk-2VRKBHMD.mjs";
32
+ } from "./chunk-DVDWAC2M.mjs";
33
+ import "./chunk-HXM2JUGD.mjs";
34
+ import "./chunk-ZHY4T5M6.mjs";
35
35
  import {
36
36
  AuthError,
37
37
  ConfigError
@@ -40,7 +40,7 @@ import "./chunk-DLIRSHV6.mjs";
40
40
  import {
41
41
  DeeplineError
42
42
  } from "./chunk-JL2OTMSG.mjs";
43
- import "./chunk-SWO5QOXB.mjs";
43
+ import "./chunk-PFGOCUH3.mjs";
44
44
  import "./chunk-WZYKRD7T.mjs";
45
45
  import "./chunk-KRD6H754.mjs";
46
46
 
@@ -0,0 +1,455 @@
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
+
3
+ var _chunkDF2X7GJGjs = require('./chunk-DF2X7GJG.js');
4
+
5
+
6
+ var _chunkZY6FL4O4js = require('./chunk-ZY6FL4O4.js');
7
+
8
+ // src/cli/commands/integration-commands.ts
9
+ var _commander = require('commander');
10
+ var _fs = require('fs');
11
+ var _path = require('path');
12
+ function printIntegrationResult(value, json, lines, nextCursor) {
13
+ _chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
14
+ {},
15
+ {
16
+ json: json || void 0,
17
+ legacyJson: { value },
18
+ text: lines.length ? `${lines.join("\n")}
19
+ ` : "",
20
+ textStderr: nextCursor ? `Next page cursor: ${nextCursor}
21
+ ` : void 0
22
+ }
23
+ );
24
+ }
25
+ function registerIntegrationBalanceCommand(parent, hidden = false) {
26
+ return parent.command("balance <provider>", { hidden }).description(
27
+ "Read a fresh balance using this workspace\u2019s own provider connection (LeadMagic)."
28
+ ).option("--json", "Print the balance and observation timestamp as JSON").action(async (provider, options) => {
29
+ const balance = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().getIntegrationBalance(
30
+ provider
31
+ );
32
+ printIntegrationResult(balance, options.json, [
33
+ `${balance.provider}: ${balance.balance.value} ${balance.unit} (observed ${balance.observedAt})`
34
+ ]);
35
+ });
36
+ }
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(
41
+ "--members",
42
+ "List teammates\u2019 personal connections for this provider"
43
+ ).option("--cursor <cursor>", "Read the next page of members").action(
44
+ async (options) => {
45
+ const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
46
+ if (name === "list" && options.cursor && !options.members)
47
+ throw new Error(
48
+ "Use --cursor with --members to continue a member page."
49
+ );
50
+ if (name === "list" && options.inventory && options.members)
51
+ throw new Error("Choose --inventory or --members.");
52
+ if (options.members) {
53
+ if (options.provider !== "hubspot" && options.provider !== "google_calendar_availability")
54
+ throw new Error(
55
+ "Pass --provider hubspot or --provider google_calendar_availability."
56
+ );
57
+ const result = await client.listManagedConnectionMembers(
58
+ options.provider,
59
+ options.cursor
60
+ );
61
+ printIntegrationResult(
62
+ result,
63
+ options.json,
64
+ result.members.map(
65
+ (member) => `${member.name || member.email} ${member.status}${member.account ? " " + member.account.label : ""}`
66
+ ),
67
+ result.nextCursor
68
+ );
69
+ return;
70
+ }
71
+ const { connections } = await client.listWorkspaceConnectionInventory(
72
+ options.provider,
73
+ { authorizationsOnly: !options.inventory }
74
+ );
75
+ printIntegrationResult(
76
+ connections,
77
+ options.json,
78
+ connections.length ? connections.map(
79
+ (row) => `${row.provider} ${row.status} ${row.name ? row.name + " " : ""}${row.label}`
80
+ ) : ["No workspace connections."]
81
+ );
82
+ }
83
+ );
84
+ }
85
+ 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, _chunkDF2X7GJGjs.DeeplineClient)().listPersonalHubSpotMembers(
90
+ options.cursor
91
+ );
92
+ const rows = page.members.map((member) => {
93
+ const account = member.account ? ` Portal ${member.account.portalId} User ${member.account.userId}` : "";
94
+ return `${JSON.stringify(member.name || member.email)} ${member.status}${account}`;
95
+ });
96
+ printIntegrationResult(
97
+ page,
98
+ options.json,
99
+ rows.length ? rows : ["No workspace members on this page."],
100
+ page.nextCursor
101
+ );
102
+ });
103
+ }
104
+ 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(
106
+ async (provider, action, options) => {
107
+ if (provider !== "hubspot" && provider !== "google_calendar_availability")
108
+ throw new Error("Choose hubspot or google_calendar_availability.");
109
+ if (action !== "connect" && action !== "reconnect" && action !== "replace" && action !== "disconnect" && action !== "remove")
110
+ throw new Error(
111
+ "Choose connect, reconnect, replace, disconnect, or remove."
112
+ );
113
+ if (options.autoName && (action !== "connect" || options.name !== void 0))
114
+ throw new Error("Use --auto-name with connect and omit --name.");
115
+ const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
116
+ const { connections } = action === "connect" ? { connections: [] } : options.name ? await client.listWorkspaceConnectionInventory(provider) : await client.listWorkspaceIntegrationConnections();
117
+ const row = connections.find(
118
+ (connection) => connection.provider === provider && (!("type" in connection) || connection.type === "oauth") && (options.name === void 0 || "name" in connection && connection.name === options.name)
119
+ );
120
+ const result = await client.manageWorkspaceIntegrationConnection({
121
+ provider,
122
+ action,
123
+ name: options.name,
124
+ ...options.autoName ? { autoName: true } : {},
125
+ connectionId: _optionalChain([row, 'optionalAccess', _ => _.id]),
126
+ authorizationVersion: _optionalChain([row, 'optionalAccess', _2 => _2.authorizationVersion])
127
+ });
128
+ printIntegrationResult(result, options.json, [
129
+ _nullishCoalesce(result.url, () => ( (action === "remove" ? "Workspace connection removed." : "Workspace connection disconnected.")))
130
+ ]);
131
+ }
132
+ );
133
+ }
134
+ function registerLegacyCalendarDelegationCommand(parent, hidden = false) {
135
+ return parent.command("calendar-delegation <action>", { hidden }).description(
136
+ "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(
138
+ "--grant-revision <revision>",
139
+ "Workspace approval revision from list"
140
+ ).option("--members <memberIds...>", "Workspace member IDs to approve").option(
141
+ "--verification-email <email>",
142
+ "Verify Workspace approval with a work email"
143
+ ).option(
144
+ "--dry-run",
145
+ "Print the proposed change without contacting Google or saving it"
146
+ ).option("--json", "Print the result as JSON").action(
147
+ async (action, options) => {
148
+ const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
149
+ if (action === "list") {
150
+ const inventory = await client.listCalendarAvailabilityConnections();
151
+ const approvals = _optionalChain([inventory, 'access', _3 => _3.approvals, 'optionalAccess', _4 => _4.length]) ? inventory.approvals.map(
152
+ (approval) => `${approval.domain} ${approval.enabled ? "approved" : "paused"} revision ${approval.revision}`
153
+ ) : [
154
+ `Workspace approval ${inventory.grantEnabled ? "connected" : "disconnected"} \xB7 revision ${inventory.grantRevision}`
155
+ ];
156
+ printIntegrationResult(inventory, options.json, [
157
+ ...approvals,
158
+ ...inventory.connections.map(
159
+ (row) => `${row.name} ${row.label} ${row.enabled ? "enabled" : "disabled"}${row.domain ? ` ${row.domain}` : ""}`
160
+ )
161
+ ]);
162
+ return;
163
+ }
164
+ if (action === "status") {
165
+ if (options.members || options.revision || options.dryRun)
166
+ throw new Error(
167
+ "Use --members, --revision, and --dry-run with a settings change."
168
+ );
169
+ const settings = await client.getCalendarDelegation(
170
+ options.cursor,
171
+ options.name,
172
+ options.domain
173
+ );
174
+ printIntegrationResult(
175
+ settings,
176
+ options.json,
177
+ [
178
+ `${settings.enabled ? "Enabled" : "Disabled"} \xB7 revision ${settings.revision} \xB7 ${settings.domain}`,
179
+ `Google client ${settings.clientId} \xB7 ${settings.scope}`,
180
+ ...settings.members.map((member) => {
181
+ const readiness = settings.selectedMemberIds.includes(
182
+ member.memberId
183
+ ) ? "verified at setup" : member.eligible ? "eligible" : "verified work email required";
184
+ return `${member.memberId} ${member.email} ${readiness}`;
185
+ })
186
+ ],
187
+ settings.nextCursor
188
+ );
189
+ return;
190
+ }
191
+ const workspaceAction = [
192
+ "enable-workspace",
193
+ "disable-workspace",
194
+ "remove-workspace"
195
+ ].includes(action);
196
+ if (action !== "enable" && action !== "disable" && action !== "remove" && !workspaceAction)
197
+ throw new Error(
198
+ "Choose list, status, enable, disable, remove, enable-workspace, disable-workspace, or remove-workspace."
199
+ );
200
+ const revision = Number(options.revision);
201
+ if (!workspaceAction && (!options.revision || !/^\d+$/.test(options.revision) || !Number.isSafeInteger(revision)))
202
+ throw new Error(
203
+ "Pass --revision with the current revision from status."
204
+ );
205
+ 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
+ throw new Error(
207
+ "Use --verification-email for Workspace approval or --members for legacy settings. Use --cursor only with status."
208
+ );
209
+ const grantRevision = Number(options.grantRevision);
210
+ if ((workspaceAction || options.name) && (options.grantRevision === void 0 || !/^\d+$/.test(options.grantRevision) || !Number.isSafeInteger(grantRevision)))
211
+ throw new Error(
212
+ "Pass --grant-revision with the current workspace approval revision."
213
+ );
214
+ let change;
215
+ if (workspaceAction) {
216
+ const selection = {
217
+ grantRevision,
218
+ ...options.domain ? { domain: options.domain } : {}
219
+ };
220
+ if (action === "enable-workspace") {
221
+ if (options.verificationEmail) {
222
+ change = {
223
+ ...selection,
224
+ action: "enable_workspace",
225
+ verificationEmail: options.verificationEmail
226
+ };
227
+ } else {
228
+ if (_optionalChain([options, 'access', _7 => _7.members, 'optionalAccess', _8 => _8.length]) !== 1)
229
+ throw new Error(
230
+ "Pass --verification-email with an address in the approved domain."
231
+ );
232
+ change = {
233
+ ...selection,
234
+ action: "enable_workspace",
235
+ memberIds: options.members
236
+ };
237
+ }
238
+ } else if (action === "remove-workspace") {
239
+ if (!options.domain)
240
+ throw new Error("Pass --domain with the approval domain.");
241
+ if (!options.connectionId)
242
+ throw new Error(
243
+ "Pass --connection-id with the disconnected approval ID from list."
244
+ );
245
+ change = {
246
+ ...selection,
247
+ action: "remove_workspace",
248
+ domain: options.domain,
249
+ connectionId: options.connectionId
250
+ };
251
+ } else {
252
+ change = { ...selection, action: "disable_workspace" };
253
+ }
254
+ } else if (options.name) {
255
+ if (revision !== 0 && !options.connectionId)
256
+ throw new Error("Pass --connection-id from the connection status.");
257
+ const selection = {
258
+ name: options.name,
259
+ revision,
260
+ grantRevision,
261
+ connectionId: options.connectionId,
262
+ ...options.domain ? { domain: options.domain } : {}
263
+ };
264
+ change = action === "enable" ? {
265
+ ...selection,
266
+ action,
267
+ allMembers: options.everyone === true,
268
+ label: _nullishCoalesce(options.label, () => ( options.name)),
269
+ memberIds: options.members
270
+ } : {
271
+ ...selection,
272
+ action: action === "remove" ? "remove" : "disable"
273
+ };
274
+ } else {
275
+ if (action === "remove" || options.domain)
276
+ throw new Error(
277
+ "Pass --name to update a named connection, or use enable-workspace or disable-workspace to change its Google approval."
278
+ );
279
+ change = action === "enable" ? { action, revision, memberIds: options.members } : { action: "disable", revision };
280
+ }
281
+ if (options.dryRun) {
282
+ printIntegrationResult(change, true, []);
283
+ return;
284
+ }
285
+ const result = await client.changeCalendarDelegation(change);
286
+ printIntegrationResult(result, options.json, [
287
+ result.status === "validation_failed" ? "Google calendar verification failed." : `Delegation ${result.status}.`,
288
+ ...(_nullishCoalesce(result.checks, () => ( []))).map(
289
+ (check) => `${check.memberId} ${check.readiness}`
290
+ )
291
+ ]);
292
+ if (result.status === "validation_failed") process.exitCode = 1;
293
+ }
294
+ );
295
+ }
296
+ function registerLegacyAvailabilityCalendarsCommand(parent, hidden = false) {
297
+ 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, _chunkDF2X7GJGjs.DeeplineClient)().listAvailabilityCalendars(
299
+ options.cursor
300
+ );
301
+ printIntegrationResult(page, options.json, [
302
+ ...page.calendars.map(
303
+ (calendar) => `${JSON.stringify(calendar.name)} ${calendar.id}`
304
+ ),
305
+ ...page.cursor ? [`Next page cursor: ${JSON.stringify(page.cursor)}`] : []
306
+ ]);
307
+ });
308
+ }
309
+ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden = false) {
310
+ return parent.command("connect <provider>", { hidden }).description(
311
+ "Get a dashboard connection link or connect a provider with credentials or OAuth."
312
+ ).addOption(
313
+ new (0, _commander.Option)("--link", "Print a shareable dashboard link").conflicts([
314
+ "credentialsFile",
315
+ "oauth",
316
+ "preset",
317
+ "scopes",
318
+ "optionalScopes",
319
+ "expectedConnectionId"
320
+ ])
321
+ ).option(
322
+ "--credentials-file <path>",
323
+ "JSON object of credential field names and string values; keep this file private"
324
+ ).option("--oauth", "Return an OAuth authorization URL").addOption(new (0, _commander.Option)("--expected-connection-id <id>").hideHelp()).option("--preset <id>", "Server-defined access preset (HubSpot only)").option("--scopes <scopes>", "Comma-separated OAuth scopes").option(
325
+ "--optional-scopes <scopes>",
326
+ "Comma-separated optional OAuth scopes"
327
+ ).option(
328
+ "--dry-run",
329
+ "Print the proposed setup without saving credentials or starting OAuth"
330
+ ).option("--json", "Print JSON without credential values").action(
331
+ async (provider, options) => {
332
+ if (options.expectedConnectionId !== void 0 && (!options.expectedConnectionId.trim() || provider !== "google_calendar_availability" || !options.credentialsFile || options.oauth)) {
333
+ throw new Error(
334
+ "--expected-connection-id requires Calendar availability and a credentials file."
335
+ );
336
+ }
337
+ if (options.link || defaultLink && !options.oauth && !options.credentialsFile && options.preset === void 0 && options.scopes === void 0 && options.optionalScopes === void 0 && options.expectedConnectionId === void 0) {
338
+ if (options.dryRun) {
339
+ printSetupPlan({ provider, action: "connect_link" }, options.json);
340
+ return;
341
+ }
342
+ const link = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().getIntegrationConnectLink(
343
+ provider
344
+ );
345
+ printIntegrationResult(link, options.json, [link.connect_url]);
346
+ return;
347
+ }
348
+ if (options.oauth) {
349
+ if (options.credentialsFile)
350
+ throw new Error("Use --oauth or --credentials-file, not both.");
351
+ if (options.preset !== void 0 && (options.scopes !== void 0 || options.optionalScopes !== void 0))
352
+ throw new Error("Use --preset or individual scopes, not both.");
353
+ const splitScopes = (value) => value.split(",").map((scope) => scope.trim()).filter(Boolean);
354
+ if (options.scopes !== void 0 && splitScopes(options.scopes).length === 0)
355
+ throw new Error("scopes must contain at least one OAuth scope.");
356
+ if (options.dryRun) {
357
+ printSetupPlan(
358
+ {
359
+ provider,
360
+ action: "oauth",
361
+ ...options.preset !== void 0 ? { preset: options.preset } : {},
362
+ ...options.scopes !== void 0 ? { scopes: splitScopes(options.scopes) } : {},
363
+ ...options.optionalScopes !== void 0 ? { optionalScopes: splitScopes(options.optionalScopes) } : {}
364
+ },
365
+ options.json
366
+ );
367
+ return;
368
+ }
369
+ const result2 = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().startIntegrationOAuth(
370
+ provider,
371
+ {
372
+ ...options.preset !== void 0 ? { preset: options.preset } : {},
373
+ ...options.scopes !== void 0 ? { scopes: splitScopes(options.scopes) } : {},
374
+ ...options.optionalScopes !== void 0 ? { optionalScopes: splitScopes(options.optionalScopes) } : {}
375
+ }
376
+ );
377
+ if (!result2.ok || typeof result2.redirect_url !== "string" || !result2.redirect_url)
378
+ throw new Error(
379
+ "The API did not return an OAuth authorization URL."
380
+ );
381
+ printIntegrationResult(
382
+ { provider, redirect_url: result2.redirect_url },
383
+ options.json,
384
+ [result2.redirect_url]
385
+ );
386
+ return;
387
+ }
388
+ if (!options.credentialsFile || options.preset !== void 0 || options.scopes !== void 0 || options.optionalScopes !== void 0)
389
+ throw new Error(
390
+ "Use --link for a dashboard link, --credentials-file to save credentials, or --oauth to request access."
391
+ );
392
+ if (options.dryRun) {
393
+ printSetupPlan(
394
+ {
395
+ provider,
396
+ action: "save_credentials",
397
+ credentials_file: options.credentialsFile,
398
+ ...options.expectedConnectionId ? { expected_connection_id: options.expectedConnectionId } : {}
399
+ },
400
+ options.json
401
+ );
402
+ return;
403
+ }
404
+ let credentials;
405
+ try {
406
+ credentials = JSON.parse(
407
+ _fs.readFileSync.call(void 0, _path.resolve.call(void 0, options.credentialsFile), "utf8")
408
+ );
409
+ } catch (e) {
410
+ throw new Error(
411
+ "Unable to read --credentials-file as a JSON object."
412
+ );
413
+ }
414
+ if (!credentials || typeof credentials !== "object" || Array.isArray(credentials) || Object.keys(credentials).length === 0 || Object.values(credentials).some((value) => typeof value !== "string")) {
415
+ throw new Error(
416
+ "--credentials-file must contain a nonempty JSON object of string credential values."
417
+ );
418
+ }
419
+ const result = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().setIntegrationCredentials(
420
+ provider,
421
+ credentials,
422
+ { expectedConnectionId: options.expectedConnectionId }
423
+ );
424
+ if (!result.ok || result.credential_saved !== true) {
425
+ throw new Error(
426
+ "The API did not confirm that provider credentials were saved. Inspect the integration before retrying."
427
+ );
428
+ }
429
+ const confirmation = { provider, credential_saved: true };
430
+ printIntegrationResult(confirmation, options.json, [
431
+ `Credentials saved for ${provider} in the active workspace.`
432
+ ]);
433
+ }
434
+ );
435
+ }
436
+ function printSetupPlan(plan, json) {
437
+ printIntegrationResult(
438
+ plan,
439
+ json,
440
+ Object.entries(plan).map(
441
+ ([field, value]) => `${field}: ${Array.isArray(value) ? value.join(", ") : String(value)}`
442
+ )
443
+ );
444
+ }
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+ exports.printIntegrationResult = printIntegrationResult; exports.registerIntegrationBalanceCommand = registerIntegrationBalanceCommand; exports.registerWorkspaceConnectionListCommand = registerWorkspaceConnectionListCommand; exports.registerLegacyHubSpotMembersCommand = registerLegacyHubSpotMembersCommand; exports.registerLegacyWorkspaceConnectionCommand = registerLegacyWorkspaceConnectionCommand; exports.registerLegacyCalendarDelegationCommand = registerLegacyCalendarDelegationCommand; exports.registerLegacyAvailabilityCalendarsCommand = registerLegacyAvailabilityCalendarsCommand; exports.registerIntegrationConnectCommand = registerIntegrationConnectCommand;
@@ -1,3 +1,7 @@
1
+ import {
2
+ isToolConnectionName
3
+ } from "./chunk-HXIR3VQL.mjs";
4
+
1
5
  // ../plays/script-entry.ts
2
6
  import { basename } from "path";
3
7
 
@@ -238,22 +242,60 @@ function typeArgument(call) {
238
242
  const instantiation = call.typeArguments ?? call.typeParameters;
239
243
  return isAstNode(instantiation) && Array.isArray(instantiation.params) ? instantiation.params.find(isAstNode) ?? null : null;
240
244
  }
241
- function wrapScriptPlay(source, script, { typed }) {
245
+ function wrapScriptPlay(source, script, {
246
+ typed,
247
+ authoredSource = source
248
+ }) {
242
249
  const { entry, entryCall } = script;
250
+ const program = programOf(source);
251
+ const authoredProgram = programOf(authoredSource);
252
+ const authoredEntry = authoredSource === source ? entry : playForm(authoredProgram)?.entry;
253
+ let usesNamedConnection = false;
254
+ function inspectNamedCalls(node, nested) {
255
+ if (node.type === "CallExpression" && isAstNode(node.callee)) {
256
+ const callee = node.callee;
257
+ const namespace = callee.object;
258
+ const request = Array.isArray(node.arguments) ? node.arguments[0] : void 0;
259
+ if (callee.type === "MemberExpression" && !callee.computed && isAstNode(callee.property) && callee.property.name === "execute" && isAstNode(namespace) && namespace.type === "MemberExpression" && !namespace.computed && isAstNode(namespace.object) && namespace.object.name === script.contextName && isAstNode(namespace.property) && namespace.property.name === "tools" && isAstNode(request) && request.type === "ObjectExpression") {
260
+ const fields = Array.isArray(request.properties) ? request.properties.filter(isAstNode) : [];
261
+ const named = fields.find(
262
+ (field) => isAstNode(field.key) && (field.key.name === "connection" || field.key.value === "connection")
263
+ );
264
+ if (named) {
265
+ if (nested)
266
+ fail(
267
+ authoredSource,
268
+ named,
269
+ "Named connections currently require a tool call in the Play entry function."
270
+ );
271
+ if (!isAstNode(named.value) || !isToolConnectionName(named.value.value)) {
272
+ fail(
273
+ authoredSource,
274
+ named,
275
+ "Use a literal workspace connection name or Google Workspace domain."
276
+ );
277
+ }
278
+ usesNamedConnection = true;
279
+ }
280
+ }
281
+ }
282
+ const childIsNested = nested || FUNCTION_TYPES.has(node.type) && node !== authoredEntry?.node;
283
+ for (const child of childNodes(node))
284
+ inspectNamedCalls(child, childIsNested);
285
+ }
286
+ inspectNamedCalls(authoredProgram, false);
243
287
  const unknownType = typed ? ": unknown" : "";
244
288
  const anyType = typed ? ": any" : "";
245
- const runtimeImport = defaultImportName(
246
- headerOf(programOf(source)).find(isSdkImport)
247
- ) ? `import { runScriptPlay as __deeplineRunScriptPlay } from '${SCRIPT_SDK}';` : `import ${SCRIPT_SDK}, { runScriptPlay as __deeplineRunScriptPlay } from '${SCRIPT_SDK}';`;
289
+ const runtimeImport = defaultImportName(headerOf(program).find(isSdkImport)) ? `import { runScriptPlay as __deeplineRunScriptPlay } from '${SCRIPT_SDK}';` : `import ${SCRIPT_SDK}, { runScriptPlay as __deeplineRunScriptPlay } from '${SCRIPT_SDK}';`;
248
290
  const entryBindings = entry ? ` let __deeplineEntry${anyType}; let __deeplineEntryResult${anyType};` : "";
249
- const prefix = `${runtimeImport} export default async function (__deeplineContext${unknownType}, __deeplineInput${anyType}) { return __deeplineRunScriptPlay(__deeplineContext, __deeplineInput, async () => {${entryBindings}`;
291
+ const prefix = `${runtimeImport} export default async function (__deeplineContext${unknownType}, __deeplineInput${anyType}) { return __deeplineRunScriptPlay(__deeplineContext, __deeplineInput, async () => {${entryBindings}` + (usesNamedConnection ? ` if (!('namedWorkspaceConnections' in ${script.contextName}.tools)) throw new Error('This Play requires a runner that supports named workspace connections.');` : "");
250
292
  const edits = [
251
293
  {
252
294
  at: script.headerEnd,
253
295
  text: script.headerEnd === 0 ? `${prefix} ` : ` ${prefix}`
254
296
  }
255
297
  ];
256
- const configExport = configExportOf(programOf(source));
298
+ const configExport = configExportOf(program);
257
299
  if (configExport) {
258
300
  const declared = configExport.declaration;
259
301
  edits.push({
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
3
 
4
- var _chunkE4CABWXLjs = require('./chunk-E4CABWXL.js');
4
+ var _chunkTI6DTURFjs = require('./chunk-TI6DTURF.js');
5
5
 
6
6
  // ../play-runtime/scheduler-backend.ts
7
7
  var PLAY_SCHEDULER_BACKENDS = {
@@ -25,8 +25,8 @@ var PLAY_RUNTIME_PROVIDERS = {
25
25
  // Server runs execute on Daytona; the local-dev/test shape swaps the runner
26
26
  // axis to local_process (same as the local profile) via an explicit
27
27
  // runtimeBackend override at submit while tests drive local_process.
28
- runner: _chunkE4CABWXLjs.PLAY_RUNTIME_BACKENDS.daytona,
29
- artifactKind: _chunkE4CABWXLjs.PLAY_ARTIFACT_KINDS.cjsNode20,
28
+ runner: _chunkTI6DTURFjs.PLAY_RUNTIME_BACKENDS.daytona,
29
+ artifactKind: _chunkTI6DTURFjs.PLAY_ARTIFACT_KINDS.cjsNode20,
30
30
  label: "Absurd (Postgres-native durable) scheduler + one-shot Daytona runner"
31
31
  }
32
32
  };