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,3 +1,13 @@
1
+ import {
2
+ createIntegrationsNamespace,
3
+ type IntegrationsNamespace,
4
+ } from './integrations';
5
+ import type {
6
+ CalendarDelegationChange,
7
+ CalendarAvailabilityInventory,
8
+ CalendarDelegationSettings,
9
+ CalendarDelegationUpdate,
10
+ } from '../../shared_libs/integration-contracts/calendar-delegation';
1
11
  import type {
2
12
  BillingEntitlements,
3
13
  IncludedCompute,
@@ -1603,6 +1613,11 @@ export type MonitorFleetSyncOptions = {
1603
1613
  dryRun?: boolean;
1604
1614
  /** Optimistic concurrency: refuse the write unless the fleet is at this generation. */
1605
1615
  expectedGeneration?: number;
1616
+ /**
1617
+ * Take over live monitors no Fleet owns whose key a source row renders,
1618
+ * keeping their radar (`adopt_existing: true`). Without it they are refused.
1619
+ */
1620
+ adoptExisting?: boolean;
1606
1621
  /** Stable retry key; generated by the caller when omitted. */
1607
1622
  idempotencyKey?: string;
1608
1623
  };
@@ -3187,6 +3202,8 @@ export class DeeplineClient {
3187
3202
  readonly workspaces: WorkspacesNamespace;
3188
3203
  /** Monitors namespace: access, catalog, deploy/check, and lifecycle. */
3189
3204
  readonly monitors: MonitorsNamespace;
3205
+ /** Named workspace authorizations and provider setup wizard links. */
3206
+ readonly integrations: IntegrationsNamespace;
3190
3207
 
3191
3208
  /**
3192
3209
  * Create a low-level SDK client.
@@ -3205,6 +3222,7 @@ export class DeeplineClient {
3205
3222
  this.config = config;
3206
3223
  this.environment = this.config.environment ?? process.env;
3207
3224
  this.http = http;
3225
+ this.integrations = createIntegrationsNamespace(this);
3208
3226
  this.playClient = new PlayClient(this.http, this.environment);
3209
3227
  this.toolCalls = new ToolCalls(
3210
3228
  this.http,
@@ -6087,11 +6105,70 @@ export class DeeplineClient {
6087
6105
  label: string;
6088
6106
  status: string;
6089
6107
  authorizationVersion: number;
6108
+ grantedScopes?: string[];
6090
6109
  }>;
6091
6110
  }> {
6092
6111
  return this.http.get('/api/v2/integrations/connections');
6093
6112
  }
6094
6113
 
6114
+ async listWorkspaceConnectionInventory(
6115
+ provider?: string,
6116
+ options?: { authorizationsOnly?: boolean },
6117
+ ): Promise<{
6118
+ connections: Array<{
6119
+ id: string;
6120
+ provider: string;
6121
+ owner: 'workspace';
6122
+ name: string | null;
6123
+ type: string;
6124
+ label: string;
6125
+ status: string;
6126
+ authorizationVersion?: number;
6127
+ scopes?: string[];
6128
+ domain?: string;
6129
+ }>;
6130
+ }> {
6131
+ const params = new URLSearchParams({
6132
+ view: options?.authorizationsOnly ? 'authorizations' : 'inventory',
6133
+ });
6134
+ if (provider) params.set('provider', provider);
6135
+ return this.http.get(`/api/v2/integrations/connections?${params}`);
6136
+ }
6137
+
6138
+ async saveWorkspaceApiKeyConnection(input: {
6139
+ provider: 'close';
6140
+ name: string;
6141
+ apiKey: string;
6142
+ action: 'connect' | 'rotate';
6143
+ authorizationVersion?: number;
6144
+ }): Promise<{
6145
+ connection: { id: string; name: string; authorizationVersion: number };
6146
+ }> {
6147
+ return this.http.post('/api/v2/integrations/connections', {
6148
+ ...input,
6149
+ owner: 'workspace',
6150
+ type: 'api_key',
6151
+ });
6152
+ }
6153
+
6154
+ async listManagedConnectionMembers(
6155
+ provider: 'hubspot' | 'google_calendar_availability',
6156
+ cursor?: string,
6157
+ ): Promise<{
6158
+ members: Array<{
6159
+ memberId: string;
6160
+ name: string;
6161
+ email: string;
6162
+ status: string;
6163
+ account: { label: string; portalId?: string } | null;
6164
+ }>;
6165
+ nextCursor: string | null;
6166
+ }> {
6167
+ const params = new URLSearchParams({ view: 'members', provider });
6168
+ if (cursor) params.set('cursor', cursor);
6169
+ return this.http.get(`/api/v2/integrations/connections?${params}`);
6170
+ }
6171
+
6095
6172
  /** List workspace members' personal HubSpot connection status as an admin. */
6096
6173
  async listPersonalHubSpotMembers(cursor?: string): Promise<{
6097
6174
  members: Array<{
@@ -6115,13 +6192,45 @@ export class DeeplineClient {
6115
6192
  );
6116
6193
  }
6117
6194
 
6195
+ /** Read the Google Workspace delegate grant and a page of selectable members. */
6196
+ async getCalendarDelegation(
6197
+ cursor?: string,
6198
+ name?: string,
6199
+ domain?: string,
6200
+ ): Promise<CalendarDelegationSettings> {
6201
+ const path = '/api/v2/integrations/calendar-availability/delegation';
6202
+ const params = new URLSearchParams();
6203
+ if (cursor) params.set('cursor', cursor);
6204
+ if (name) params.set('name', name);
6205
+ if (domain) params.set('domain', domain);
6206
+ return this.http.get(params.size ? `${path}?${params}` : path);
6207
+ }
6208
+
6209
+ async listCalendarAvailabilityConnections(): Promise<CalendarAvailabilityInventory> {
6210
+ return this.http.get(
6211
+ '/api/v2/integrations/calendar-availability/delegation?view=inventory',
6212
+ );
6213
+ }
6214
+
6215
+ /** Verify, disconnect, or remove a Workspace approval. Legacy roster inputs remain supported. */
6216
+ async changeCalendarDelegation(
6217
+ change: CalendarDelegationChange,
6218
+ ): Promise<CalendarDelegationUpdate> {
6219
+ return this.http.post(
6220
+ '/api/v2/integrations/calendar-availability/delegation',
6221
+ change,
6222
+ );
6223
+ }
6224
+
6118
6225
  /** Manage a workspace-owned OAuth connection. Consent completes in the browser. */
6119
6226
  async manageWorkspaceIntegrationConnection(input: {
6120
- action: 'connect' | 'reconnect' | 'replace' | 'disconnect';
6227
+ action: 'connect' | 'reconnect' | 'replace' | 'disconnect' | 'remove';
6121
6228
  provider: 'hubspot' | 'google_calendar_availability';
6229
+ name?: string;
6230
+ autoName?: true;
6122
6231
  connectionId?: string;
6123
6232
  authorizationVersion?: number;
6124
- }): Promise<{ url?: string }> {
6233
+ }): Promise<{ url?: string; name?: string; status?: string }> {
6125
6234
  return this.http.post('/api/v2/integrations/connections', {
6126
6235
  ...input,
6127
6236
  owner: 'workspace',
@@ -8256,6 +8365,7 @@ export class DeeplineClient {
8256
8365
  ? {}
8257
8366
  : { definition: definitionOrId }),
8258
8367
  ...(options?.dryRun ? { dry_run: true } : {}),
8368
+ ...(options?.adoptExisting ? { adopt_existing: true } : {}),
8259
8369
  ...(options?.expectedGeneration !== undefined
8260
8370
  ? { expected_generation: options.expectedGeneration }
8261
8371
  : {}),
@@ -435,3 +435,10 @@ export type {
435
435
  } from './runs/receipts';
436
436
 
437
437
  export type { WorkspaceReuseResult } from './client-core.js';
438
+
439
+ export type {
440
+ IntegrationsNamespace,
441
+ WorkspaceConnection,
442
+ IntegrationChangeOptions,
443
+ IntegrationChangeResult,
444
+ } from './integrations.js';
@@ -0,0 +1,198 @@
1
+ import type { CalendarDelegationChange } from '../../shared_libs/integration-contracts/calendar-delegation';
2
+ import {
3
+ GOOGLE_WORKSPACE_DOMAIN_PATTERN,
4
+ GOOGLE_WORKSPACE_BOOKING_SCOPES,
5
+ GOOGLE_WORKSPACE_BOOKING_SCOPE,
6
+ } from '../../shared_libs/integration-contracts/calendar-delegation';
7
+ import type { DeeplineClient } from './client-core';
8
+ import { DeeplineError } from './errors';
9
+
10
+ type IntegrationClient = Pick<
11
+ DeeplineClient,
12
+ | 'listWorkspaceConnectionInventory'
13
+ | 'getCalendarDelegation'
14
+ | 'changeCalendarDelegation'
15
+ | 'manageWorkspaceIntegrationConnection'
16
+ | 'getIntegrationConnectLink'
17
+ | 'listManagedConnectionMembers'
18
+ >;
19
+
20
+ const CALENDAR_PROVIDER = 'google_calendar_availability';
21
+ export type WorkspaceConnection = Awaited<
22
+ ReturnType<DeeplineClient['listWorkspaceConnectionInventory']>
23
+ >['connections'][number];
24
+ export type IntegrationChangeOptions = {
25
+ provider?: string;
26
+ verificationEmail?: string;
27
+ dryRun?: boolean;
28
+ booking?: boolean;
29
+ };
30
+
31
+ function invalid(message: string): never {
32
+ throw new DeeplineError(message, 400, 'INVALID_ARGUMENT');
33
+ }
34
+
35
+ async function findConnection(
36
+ client: IntegrationClient,
37
+ name: string,
38
+ provider?: string,
39
+ ): Promise<WorkspaceConnection> {
40
+ const { connections } = await client.listWorkspaceConnectionInventory(
41
+ provider,
42
+ { authorizationsOnly: true },
43
+ );
44
+ const matches = connections.filter(
45
+ (row) => row.name === name && (!provider || row.provider === provider),
46
+ );
47
+ if (matches.length === 0)
48
+ throw new DeeplineError(
49
+ `No workspace connection named ${JSON.stringify(name)}. Run deepline integrations list --json.`,
50
+ 404,
51
+ 'NOT_FOUND',
52
+ );
53
+ if (matches.length > 1)
54
+ invalid('This name exists for multiple providers. Pass --provider.');
55
+ return matches[0]!;
56
+ }
57
+
58
+ async function changeConnection(
59
+ client: IntegrationClient,
60
+ action: 'reconnect' | 'disconnect' | 'delete',
61
+ name: string,
62
+ options: IntegrationChangeOptions,
63
+ ) {
64
+ const row = await findConnection(client, name, options.provider);
65
+ if (
66
+ options.booking &&
67
+ (action !== 'reconnect' || row.type !== 'workspace_delegation')
68
+ )
69
+ invalid('Use --booking with Google Workspace verify or reconnect.');
70
+ if (row.type === 'workspace_delegation') {
71
+ if (row.provider !== CALENDAR_PROVIDER || !row.domain)
72
+ invalid('The workspace approval is missing its provider or domain.');
73
+ if (row.authorizationVersion === undefined)
74
+ invalid('The API did not return a workspace approval revision.');
75
+ if (action === 'reconnect') {
76
+ return verifyWorkspace(client, row.domain, options, row);
77
+ }
78
+ if (options.verificationEmail)
79
+ invalid('Use --verification-email with reconnect or verify.');
80
+ if (action === 'delete' && row.status !== 'disconnected')
81
+ invalid('Disconnect this approval before deleting it.');
82
+ const change: CalendarDelegationChange =
83
+ action === 'delete'
84
+ ? {
85
+ action: 'remove_workspace',
86
+ domain: row.domain,
87
+ connectionId: row.id,
88
+ grantRevision: row.authorizationVersion,
89
+ }
90
+ : {
91
+ action: 'disable_workspace',
92
+ domain: row.domain,
93
+ connectionId: row.id,
94
+ grantRevision: row.authorizationVersion,
95
+ };
96
+ if (options.dryRun) return change;
97
+ return client.changeCalendarDelegation(change);
98
+ }
99
+ if (options.verificationEmail)
100
+ invalid('--verification-email applies to Google Workspace approvals.');
101
+ if (
102
+ row.type !== 'oauth' ||
103
+ (row.provider !== 'hubspot' && row.provider !== CALENDAR_PROVIDER)
104
+ )
105
+ invalid(
106
+ 'Manage this credential type through deepline integrations connect <provider> --link.',
107
+ );
108
+ if (row.authorizationVersion === undefined)
109
+ invalid('The API did not return a connection authorization version.');
110
+ const change = {
111
+ action: action === 'delete' ? ('remove' as const) : action,
112
+ provider: row.provider,
113
+ name,
114
+ connectionId: row.id,
115
+ authorizationVersion: row.authorizationVersion,
116
+ } satisfies Parameters<
117
+ IntegrationClient['manageWorkspaceIntegrationConnection']
118
+ >[0];
119
+ if (options.dryRun) return change;
120
+ return client.manageWorkspaceIntegrationConnection(change);
121
+ }
122
+
123
+ async function verifyWorkspace(
124
+ client: IntegrationClient,
125
+ domain: string,
126
+ options: IntegrationChangeOptions,
127
+ existing?: WorkspaceConnection,
128
+ ) {
129
+ domain = domain.trim().toLowerCase();
130
+ if (!GOOGLE_WORKSPACE_DOMAIN_PATTERN.test(domain))
131
+ invalid('Enter a Google Workspace domain, such as example.com.');
132
+ const email = options.verificationEmail?.trim().toLowerCase();
133
+ if (
134
+ !email ||
135
+ email.length > 254 ||
136
+ !/^[^\s@]+@[^\s@]+$/.test(email) ||
137
+ email.split('@')[1] !== domain
138
+ )
139
+ invalid('Pass --verification-email with a work email in this domain.');
140
+ const settings = existing
141
+ ? {
142
+ grantRevision: existing.authorizationVersion,
143
+ connectionId: existing.id,
144
+ grantedScopes: existing.scopes,
145
+ }
146
+ : await client.getCalendarDelegation(undefined, undefined, domain);
147
+ if (settings.grantRevision === undefined)
148
+ invalid('The API did not return a workspace approval revision.');
149
+ const requestedScopes = options.booking
150
+ ? [...GOOGLE_WORKSPACE_BOOKING_SCOPES]
151
+ : settings.grantedScopes;
152
+ const change: CalendarDelegationChange = {
153
+ action: 'enable_workspace',
154
+ domain,
155
+ grantRevision: settings.grantRevision,
156
+ ...(settings.connectionId ? { connectionId: settings.connectionId } : {}),
157
+ verificationEmail: email,
158
+ ...(requestedScopes?.includes(GOOGLE_WORKSPACE_BOOKING_SCOPE)
159
+ ? { requestedScopes }
160
+ : {}),
161
+ };
162
+ if (options.dryRun) return change;
163
+ return client.changeCalendarDelegation(change);
164
+ }
165
+
166
+ /** Workspace authorization management. Personal setup completes in the returned dashboard wizard. */
167
+ export function createIntegrationsNamespace(client: IntegrationClient) {
168
+ return {
169
+ list: (options: { provider?: string } = {}) =>
170
+ client.listWorkspaceConnectionInventory(options.provider, {
171
+ authorizationsOnly: true,
172
+ }),
173
+ get: (name: string, options: { provider?: string } = {}) =>
174
+ findConnection(client, name, options.provider),
175
+ connect: (provider: string) => client.getIntegrationConnectLink(provider),
176
+ reconnect: (name: string, options: IntegrationChangeOptions = {}) =>
177
+ changeConnection(client, 'reconnect', name, options),
178
+ disconnect: (name: string, options: IntegrationChangeOptions = {}) =>
179
+ changeConnection(client, 'disconnect', name, options),
180
+ delete: (name: string, options: IntegrationChangeOptions = {}) =>
181
+ changeConnection(client, 'delete', name, options),
182
+ verify: (
183
+ domain: string,
184
+ options: IntegrationChangeOptions & { verificationEmail: string },
185
+ ) => verifyWorkspace(client, domain, options),
186
+ members: (
187
+ provider: 'hubspot' | 'google_calendar_availability',
188
+ options: { cursor?: string } = {},
189
+ ) => client.listManagedConnectionMembers(provider, options.cursor),
190
+ };
191
+ }
192
+
193
+ export type IntegrationsNamespace = ReturnType<
194
+ typeof createIntegrationsNamespace
195
+ >;
196
+ export type IntegrationChangeResult = Awaited<
197
+ ReturnType<IntegrationsNamespace['disconnect']>
198
+ >;
@@ -202,6 +202,9 @@ export function buildPlayRunStartBody(
202
202
  : {}),
203
203
  ...(request.force ? { force: true } : {}),
204
204
  ...(request.forceToolRefresh === true ? { forceToolRefresh: true } : {}),
205
+ ...(typeof request.cacheReuseWindowSeconds === 'number'
206
+ ? { cacheReuseWindowSeconds: request.cacheReuseWindowSeconds }
207
+ : {}),
205
208
  ...(typeof request.maxConcurrentExternalCalls === 'number'
206
209
  ? { maxConcurrentExternalCalls: request.maxConcurrentExternalCalls }
207
210
  : {}),
@@ -205,7 +205,7 @@ export const SDK_RELEASE = {
205
205
  // getters keep their established compatibility behavior.
206
206
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
207
207
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
208
- version: '0.3.542',
208
+ version: '0.3.544',
209
209
  updateSummary: {
210
210
  introducedIn: '0.3.90',
211
211
  summary:
@@ -1,4 +1,5 @@
1
1
  import { resolveLookupClientTimeoutMs } from '../../shared_libs/integration-contracts/lookup-execution-policy.js';
2
+ import { isToolConnectionName } from '../../shared_libs/integration-contracts/tool-connection.js';
2
3
  import type { ToolResultBilling } from '../../shared_libs/plays/tool-result-types.js';
3
4
  import {
4
5
  parseExecuteServerTiming,
@@ -121,6 +122,7 @@ function executionRecoveryError(input: {
121
122
  const DEEPLINEAGENT_EXECUTE_TIMEOUT_MS = 15 * 60 * 1000;
122
123
 
123
124
  export type ExecuteToolRawOptions = {
125
+ connection?: string;
124
126
  includeToolMetadata?: boolean;
125
127
  /** Use the atomic-tools endpoint, which rejects Plays before charge admission. */
126
128
  atomicToolOnly?: boolean;
@@ -352,6 +354,19 @@ export class ToolCalls {
352
354
  input: Record<string, unknown>,
353
355
  options?: ExecuteToolRawOptions,
354
356
  ): Promise<ToolExecution<TData, TMeta>> {
357
+ const connection = options?.connection;
358
+ if (
359
+ connection !== undefined &&
360
+ (!isToolConnectionName(connection) ||
361
+ options?.idempotencyKey !== undefined ||
362
+ options?.recover)
363
+ ) {
364
+ throw new DeeplineError(
365
+ 'Use a valid workspace connection name without execution recovery.',
366
+ 400,
367
+ 'NAMED_CONNECTION_INVALID',
368
+ );
369
+ }
355
370
  if (options?.cliInvocationId !== undefined) {
356
371
  validateCliInvocationId(options.cliInvocationId);
357
372
  }
@@ -463,6 +478,7 @@ export class ToolCalls {
463
478
  let useLegacyEndpoint = idempotencyKey === undefined;
464
479
  const atomicToolOnly = options?.atomicToolOnly === true;
465
480
  const retryAmbiguousDelivery =
481
+ connection === undefined &&
466
482
  atomicToolOnly &&
467
483
  !idempotencyKey &&
468
484
  options?.retryAmbiguousDelivery === true;
@@ -473,28 +489,35 @@ export class ToolCalls {
473
489
  let atomicToolsSupported = false;
474
490
  const post = () =>
475
491
  this.http.post<ToolExecution<TData, TMeta>>(
476
- atomicToolOnly
477
- ? `/api/v2/tools/${encodeURIComponent(toolId)}/execute`
478
- : useLegacyEndpoint
479
- ? legacyEndpoint
480
- : `/api/v2/executions/by-key/${encodeURIComponent(idempotencyKey!)}?tool_id=${encodeURIComponent(toolId)}`,
492
+ connection !== undefined
493
+ ? `/api/v2/tools/${encodeURIComponent(toolId)}/execute-with-connection`
494
+ : atomicToolOnly
495
+ ? `/api/v2/tools/${encodeURIComponent(toolId)}/execute`
496
+ : useLegacyEndpoint
497
+ ? legacyEndpoint
498
+ : `/api/v2/executions/by-key/${encodeURIComponent(idempotencyKey!)}?tool_id=${encodeURIComponent(toolId)}`,
481
499
  {
482
500
  payload: inputSnapshot,
501
+ ...(connection !== undefined ? { connection } : {}),
483
502
  ...(metadataSnapshot ? { metadata: metadataSnapshot } : {}),
484
503
  },
485
504
  headers,
486
505
  {
487
506
  timeout: requestTimeoutMs,
488
- maxRetries: idempotencyKey
489
- ? 0
490
- : (options?.maxRetries ?? (retryAmbiguousDelivery ? 2 : 0)),
491
- ...(atomicToolOnly &&
507
+ maxRetries:
508
+ connection !== undefined || idempotencyKey
509
+ ? 0
510
+ : (options?.maxRetries ?? (retryAmbiguousDelivery ? 2 : 0)),
511
+ ...(connection === undefined &&
512
+ atomicToolOnly &&
492
513
  !idempotencyKey &&
493
514
  options?.maxRetries === undefined
494
515
  ? { executePolicyMaxRetries: 2 }
495
516
  : {}),
496
- retryApiErrors: atomicToolOnly || options?.retryApiErrors === true,
497
- retryFromExecutePolicy: atomicToolOnly,
517
+ retryApiErrors:
518
+ connection === undefined &&
519
+ (atomicToolOnly || options?.retryApiErrors === true),
520
+ retryFromExecutePolicy: connection === undefined && atomicToolOnly,
498
521
  retryAmbiguousDelivery,
499
522
  exactUrlOnly: true,
500
523
  toolId,
@@ -529,6 +552,7 @@ export class ToolCalls {
529
552
  try {
530
553
  return await post();
531
554
  } catch (error) {
555
+ if (connection !== undefined) throw error;
532
556
  if (atomicToolOnly) {
533
557
  if (
534
558
  !atomicToolsSupported &&
@@ -209,6 +209,8 @@ export interface ProviderDefinition {
209
209
  displayName: string;
210
210
  toolCount: number;
211
211
  categories: string[];
212
+ /** Present when the provider is part of the Beta Integrations rollout. */
213
+ beta?: true;
212
214
  /** Present for providers in the recent-additions ledger. */
213
215
  version?: string;
214
216
  /** ISO-8601 date on which this provider was added. */
@@ -1262,6 +1264,12 @@ export interface StopPlayRunResult {
1262
1264
  hitlCancelledCount: number;
1263
1265
  /** True if HITL state or its same-message Slack card still needs retrying. */
1264
1266
  hitlCancellationPending?: boolean;
1267
+ /** Managed message-wait rows cancelled in this stop request. */
1268
+ communicationCancelledCount?: number;
1269
+ /** The count is a lower bound; the durable Run fence already covers all waits. */
1270
+ communicationCancelledCountPartial?: boolean;
1271
+ /** True when managed message-wait cleanup needs another stop request. */
1272
+ communicationCancellationPending?: boolean;
1265
1273
  /**
1266
1274
  * True only when the scheduler and the canonical run ledger disagree and
1267
1275
  * the server could not confirm the stop.
@@ -2264,6 +2272,8 @@ export interface StartPlayRunRequest {
2264
2272
  force?: boolean;
2265
2273
  /** Explicit cache-bypass flag for durable dataset and tool-call reuse. */
2266
2274
  forceToolRefresh?: boolean;
2275
+ /** @internal Requires the `play_run.cache_reuse_window` capability. */
2276
+ cacheReuseWindowSeconds?: number;
2267
2277
  /**
2268
2278
  * Per-run ceiling for concurrently resident provider-tool executions and
2269
2279
  * direct ctx.fetch calls. The server validates the supported range.
@@ -0,0 +1,132 @@
1
+ export const CALENDAR_DELEGATION_ROSTER_LIMIT = 10;
2
+ export const GOOGLE_WORKSPACE_AVAILABILITY_SCOPE =
3
+ 'https://www.googleapis.com/auth/calendar.freebusy';
4
+ export const GOOGLE_WORKSPACE_BOOKING_SCOPE =
5
+ 'https://www.googleapis.com/auth/calendar.events.owned';
6
+ export const GOOGLE_WORKSPACE_BOOKING_SCOPES = [
7
+ GOOGLE_WORKSPACE_AVAILABILITY_SCOPE,
8
+ GOOGLE_WORKSPACE_BOOKING_SCOPE,
9
+ ] as const;
10
+ export const GOOGLE_WORKSPACE_DOMAIN_PATTERN =
11
+ /^(?=.{1,253}$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+$/;
12
+
13
+ export type CalendarDelegationSettings = {
14
+ connectionId?: string;
15
+ name?: string;
16
+ label?: string;
17
+ allMembers?: boolean;
18
+ grantRevision?: number;
19
+ rosterLimit: number;
20
+ domain: string;
21
+ clientId: string;
22
+ scope: string;
23
+ grantedScopes?: string[];
24
+ enabled: boolean;
25
+ connectionEnabled?: boolean;
26
+ revision: number;
27
+ selectedMemberIds: string[];
28
+ verifiedAt: number | null;
29
+ members: Array<{
30
+ memberId: string;
31
+ name: string;
32
+ email: string;
33
+ eligible: boolean;
34
+ }>;
35
+ nextCursor: string | null;
36
+ };
37
+
38
+ /** @deprecated Calendar targets belong in Play inputs. Retained for saved Plays. */
39
+ export type NamedCalendarAvailability = {
40
+ id: string;
41
+ name: string;
42
+ label: string;
43
+ enabled: boolean;
44
+ revision: number;
45
+ allMembers: boolean;
46
+ memberCount: number;
47
+ domain?: string;
48
+ approvalEnabled?: boolean;
49
+ };
50
+
51
+ export type GoogleWorkspaceApproval = {
52
+ id?: string;
53
+ domain: string;
54
+ enabled: boolean;
55
+ revision: number;
56
+ grantedScopes?: string[];
57
+ };
58
+
59
+ export type CalendarAvailabilityInventory = {
60
+ connections: NamedCalendarAvailability[];
61
+ grantEnabled: boolean;
62
+ grantRevision: number;
63
+ approvals?: GoogleWorkspaceApproval[];
64
+ };
65
+
66
+ type NamedCalendarChange = {
67
+ name: string;
68
+ domain?: string;
69
+ connectionId?: string;
70
+ grantRevision: number;
71
+ };
72
+
73
+ export type CalendarDelegationChange =
74
+ | { action: 'enable'; revision: number; memberIds: string[] }
75
+ | { action: 'disable'; revision: number }
76
+ | (NamedCalendarChange & {
77
+ action: 'enable';
78
+ revision: number;
79
+ label: string;
80
+ memberIds: string[];
81
+ allMembers: boolean;
82
+ })
83
+ | (NamedCalendarChange & { action: 'disable' | 'remove'; revision: number })
84
+ | {
85
+ action: 'enable_workspace';
86
+ domain?: string;
87
+ grantRevision: number;
88
+ connectionId?: string;
89
+ memberIds: string[];
90
+ }
91
+ | {
92
+ action: 'enable_workspace';
93
+ domain?: string;
94
+ grantRevision: number;
95
+ connectionId?: string;
96
+ verificationEmail: string;
97
+ requestedScopes?: string[];
98
+ }
99
+ | {
100
+ action: 'disable_workspace';
101
+ domain?: string;
102
+ grantRevision: number;
103
+ connectionId?: string;
104
+ }
105
+ | {
106
+ action: 'remove_workspace';
107
+ domain: string;
108
+ grantRevision: number;
109
+ connectionId: string;
110
+ };
111
+
112
+ export type CalendarDelegationCheck = {
113
+ memberId: string;
114
+ readiness:
115
+ | 'ready'
116
+ | 'runtime_identity'
117
+ | 'signing'
118
+ | 'google_grant'
119
+ | 'primary_calendar';
120
+ };
121
+
122
+ export type CalendarDelegationUpdate =
123
+ | {
124
+ status: 'enabled' | 'disabled' | 'removed';
125
+ revision: number;
126
+ checks?: CalendarDelegationCheck[];
127
+ }
128
+ | {
129
+ status: 'validation_failed';
130
+ checks: CalendarDelegationCheck[];
131
+ readiness?: Exclude<CalendarDelegationCheck['readiness'], 'ready'>;
132
+ };
@@ -11,7 +11,9 @@ import {
11
11
  // 20,000 is the first step up from 1,000. The whole Fleet lifecycle is proven
12
12
  // on the fake TamRadar at 5,000 and 10,000, and deploy, re-plan, the global
13
13
  // audit and teardown at 100,000 (docs/plans/2026-10-22-monitor-load-testing.md,
14
- // Stage 10); the full 100,000 run gates the next raise.
14
+ // Stage 10). The next raise waits on two readers outside the Fleet: the Monitor
15
+ // Ledger refuses a workspace past 20,000 summaries (#10551), and the billing
16
+ // policy pass stops after 100,000 definitions (#10552); see #10553.
15
17
  export const MONITOR_FLEET_MAX_MEMBERS = 20_000;
16
18
 
17
19
  /**
@@ -0,0 +1,13 @@
1
+ import { GOOGLE_WORKSPACE_DOMAIN_PATTERN } from './calendar-delegation';
2
+
3
+ const workspaceConnectionName = /^[a-z][a-z0-9-]{0,39}$/;
4
+
5
+ export const TOOL_CONNECTION_NAME_PATTERN = `^(?:${workspaceConnectionName.source.slice(1, -1)}|${GOOGLE_WORKSPACE_DOMAIN_PATTERN.source.slice(1, -1)})$`;
6
+
7
+ export function isToolConnectionName(value: unknown): value is string {
8
+ return (
9
+ typeof value === 'string' &&
10
+ (workspaceConnectionName.test(value) ||
11
+ GOOGLE_WORKSPACE_DOMAIN_PATTERN.test(value))
12
+ );
13
+ }