deepline 0.3.460 → 0.3.462

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 (297) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +7593 -0
  2. package/dist/bundling-sources/sdk/src/client.ts +8 -7366
  3. package/dist/bundling-sources/sdk/src/http-core.ts +1239 -0
  4. package/dist/bundling-sources/sdk/src/http.ts +6 -1231
  5. package/dist/bundling-sources/sdk/src/index.ts +4 -1
  6. package/dist/bundling-sources/sdk/src/play.ts +5 -5
  7. package/dist/bundling-sources/sdk/src/plays/client-core.ts +437 -0
  8. package/dist/bundling-sources/sdk/src/plays/client.ts +4 -421
  9. package/dist/bundling-sources/sdk/src/plays/input-example.ts +3 -4
  10. package/dist/bundling-sources/sdk/src/plays/play-description.ts +1 -1
  11. package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -1
  12. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  13. package/dist/bundling-sources/sdk/src/server.ts +43 -0
  14. package/dist/bundling-sources/sdk/src/types.ts +15 -5
  15. package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +15 -0
  16. package/dist/bundling-sources/shared_libs/monitors/billing/state.ts +28 -0
  17. package/dist/bundling-sources/shared_libs/monitors/callback-security.ts +0 -307
  18. package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +3 -0
  19. package/dist/bundling-sources/shared_libs/monitors/lifecycle-notifications.ts +3 -2
  20. package/dist/bundling-sources/shared_libs/monitors/package.json +2 -0
  21. package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +34 -0
  22. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +59 -0
  23. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +94 -1
  24. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +35 -1
  25. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-failure-codes.ts +24 -0
  26. package/dist/bundling-sources/shared_libs/observability/dlq.ts +32 -0
  27. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +57 -3
  28. package/dist/bundling-sources/shared_libs/observability/scheduled-work.ts +1 -0
  29. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +66 -1
  30. package/dist/bundling-sources/shared_libs/play-data-plane/sheet-column-storage.ts +36 -7
  31. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +250 -11
  32. package/dist/bundling-sources/shared_libs/play-runtime/array-input-store.ts +319 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +991 -359
  34. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +17 -0
  35. package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-janitor.ts +13 -0
  36. package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-reaper.ts +110 -0
  37. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +155 -6
  38. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +110 -6
  39. package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +127 -13
  40. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +14 -1
  41. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +57 -1
  42. package/dist/bundling-sources/shared_libs/play-runtime/free-company-lookup-batching.ts +218 -0
  43. package/dist/bundling-sources/shared_libs/play-runtime/gateway-postgres-admission.ts +42 -5
  44. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-budget-state-backend.ts +6 -1
  45. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +92 -31
  46. package/dist/bundling-sources/shared_libs/play-runtime/governor/block-reserving-budget-state-backend.ts +69 -14
  47. package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +93 -23
  48. package/dist/bundling-sources/shared_libs/play-runtime/governor/in-memory-rate-state-backend.ts +15 -4
  49. package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +22 -18
  50. package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +5 -0
  51. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +2 -0
  52. package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +190 -14
  53. package/dist/bundling-sources/shared_libs/play-runtime/memory-ledger.ts +131 -0
  54. package/dist/bundling-sources/shared_libs/play-runtime/modal-runtime-config.ts +77 -2
  55. package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +271 -2
  56. package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +51 -0
  57. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/contracts.ts +2 -0
  58. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +27 -1
  59. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-batching-registry.ts +2 -0
  60. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +3 -0
  61. package/dist/bundling-sources/shared_libs/play-runtime/provider-text-for-log.ts +63 -0
  62. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +19 -0
  63. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-event-transport.ts +112 -16
  64. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +104 -2
  65. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +265 -151
  66. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-gateway-transport.ts +17 -0
  67. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-progress-push.ts +35 -14
  68. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-sheet-persistence-retry.ts +12 -1
  69. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-control-transport.ts +4 -0
  70. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-labels.ts +36 -0
  71. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +136 -70
  72. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +237 -36
  73. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-runtime-watchdog.ts +148 -4
  74. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +6 -0
  75. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +285 -32
  76. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +251 -56
  77. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +29 -4
  78. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/sandbox-create-outcome.ts +27 -0
  79. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +22 -1
  80. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +1397 -382
  81. package/dist/bundling-sources/shared_libs/play-runtime/runtime-array-input-receipts.ts +920 -0
  82. package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +16 -0
  83. package/dist/bundling-sources/shared_libs/play-runtime/runtime-environment.ts +38 -0
  84. package/dist/bundling-sources/shared_libs/play-runtime/runtime-flow.ts +6 -0
  85. package/dist/bundling-sources/shared_libs/play-runtime/runtime-incident-drills.ts +26 -1
  86. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +30 -0
  87. package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +14 -3
  88. package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-writer.ts +31 -4
  89. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +47 -0
  90. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +20 -7
  91. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +12 -0
  92. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/index.ts +9 -0
  93. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +10 -0
  94. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +4 -0
  95. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +1496 -320
  96. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-required-env.ts +31 -1
  97. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +1389 -129
  98. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/receipt-gateway.ts +36 -0
  99. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +4 -0
  100. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +162 -23
  101. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +499 -115
  102. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +377 -9
  103. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +117 -8
  104. package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +25 -0
  105. package/dist/bundling-sources/shared_libs/play-runtime/terminal-runtime-performance.ts +391 -0
  106. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +40 -0
  107. package/dist/bundling-sources/shared_libs/play-runtime/tool-call/index.ts +6 -0
  108. package/dist/bundling-sources/shared_libs/play-runtime/tool-call/mapped-calls.ts +171 -0
  109. package/dist/bundling-sources/shared_libs/play-runtime/tool-call/receipt-cohort.ts +16 -1
  110. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +26 -3
  111. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +16 -2
  112. package/dist/bundling-sources/shared_libs/play-runtime/transport-error-diagnostics.ts +28 -0
  113. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +55 -5
  114. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +41 -1
  115. package/dist/bundling-sources/shared_libs/plays/contracts.ts +4 -0
  116. package/dist/bundling-sources/shared_libs/plays/dataset.ts +9 -3
  117. package/dist/bundling-sources/shared_libs/plays/deploy/manifest-contract.ts +2 -0
  118. package/dist/bundling-sources/shared_libs/plays/deploy/manifest.ts +3 -2
  119. package/dist/bundling-sources/shared_libs/plays/deploy/project-serializer.ts +2 -2
  120. package/dist/bundling-sources/shared_libs/plays/run-output-summary.ts +66 -0
  121. package/dist/bundling-sources/shared_libs/plays/script-entry.ts +1 -1
  122. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +43 -1
  123. package/dist/bundling-sources/shared_libs/product-notifications/content.ts +9 -0
  124. package/dist/bundling-sources/shared_libs/product-notifications/email.ts +91 -13
  125. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +3 -0
  126. package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +41 -24
  127. package/dist/bundling-sources/shared_libs/security/attested-client-ip.ts +91 -0
  128. package/dist/bundling-sources/shared_libs/security/internal-actor.ts +0 -11
  129. package/dist/cli/{auth-HKA6ZVHQ.mjs → auth-JDLEY7VU.mjs} +5 -4
  130. package/dist/cli/auth-UXKY6TCC.js +41 -0
  131. package/dist/cli/{billing-MTO2ZZ3G.js → billing-HXAXB3XZ.js} +152 -78
  132. package/dist/cli/{billing-26G44S5N.mjs → billing-SDHLBLMV.mjs} +84 -10
  133. package/dist/cli/{chunk-BHGII2D6.js → chunk-3ACMRZRV.js} +8 -6
  134. package/dist/cli/{chunk-S4Q2XCGM.mjs → chunk-3KZCFOZ6.mjs} +1 -1
  135. package/dist/cli/chunk-4KQ6SIBC.mjs +1038 -0
  136. package/dist/cli/{chunk-Z2GUFYT6.js → chunk-5LEAXRHV.js} +11 -11
  137. package/dist/cli/{chunk-XAYO3Q2X.mjs → chunk-6NNVJDVR.mjs} +7 -5
  138. package/dist/cli/{chunk-NMJ4D2WO.js → chunk-6PMCRYDA.js} +216 -91
  139. package/dist/cli/{chunk-OMM54B3X.mjs → chunk-6RNQGWFD.mjs} +16 -806
  140. package/dist/cli/{chunk-EBU7LQ64.js → chunk-6V7KVRR5.js} +3 -3
  141. package/dist/cli/{chunk-RDPTDDKX.js → chunk-7LFIMWMW.js} +2 -2
  142. package/dist/cli/chunk-7MJ6VI2T.mjs +19 -0
  143. package/dist/cli/chunk-7SWNPNML.js +1039 -0
  144. package/dist/cli/{chunk-CTRPCARW.mjs → chunk-7U3XNPOA.mjs} +267 -38
  145. package/dist/cli/{chunk-RBTTUYZZ.js → chunk-7VZHXVOQ.js} +1 -1
  146. package/dist/cli/{chunk-YVBWO647.mjs → chunk-AT636LLU.mjs} +2 -2
  147. package/dist/cli/{chunk-VTODQWQA.js → chunk-BGTPIMSM.js} +392 -261
  148. package/dist/cli/{chunk-KADIT5NV.mjs → chunk-CKSOY47X.mjs} +2 -2
  149. package/dist/cli/{chunk-7DH2FD7Y.mjs → chunk-D464JW3N.mjs} +5 -85
  150. package/dist/cli/chunk-D6DXOUTO.mjs +827 -0
  151. package/dist/cli/{describe-QW54QQNB.js → chunk-EM4TXCCI.js} +27 -44
  152. package/dist/cli/chunk-F6QV42MC.mjs +91 -0
  153. package/dist/cli/chunk-FKVYR3QA.mjs +1039 -0
  154. package/dist/cli/{chunk-LMAULZLF.js → chunk-GEGW5HPZ.js} +29 -27
  155. package/dist/cli/{chunk-M52JQSLK.js → chunk-HUB3CCM2.js} +13 -4
  156. package/dist/cli/{chunk-YHTQM5XI.js → chunk-I6VHOU5O.js} +27 -27
  157. package/dist/cli/{chunk-Z2XUZC34.js → chunk-IAYSWZDJ.js} +188 -76
  158. package/dist/cli/chunk-JF3TLIMQ.js +19 -0
  159. package/dist/cli/{chunk-HDFRJ4IT.mjs → chunk-JVHOS3K3.mjs} +177 -65
  160. package/dist/cli/{chunk-LAWEURCT.mjs → chunk-LFXLQEZN.mjs} +1 -1
  161. package/dist/cli/{chunk-2PBN4SZE.js → chunk-LROWFPGN.js} +16 -16
  162. package/dist/cli/{chunk-SLEUWLJE.mjs → chunk-MSY22NQW.mjs} +5 -5
  163. package/dist/cli/{chunk-LVJOFUU7.mjs → chunk-MUUQZIOF.mjs} +23 -49
  164. package/dist/cli/{chunk-2XHWOQF4.js → chunk-NBLSCHKK.js} +52 -50
  165. package/dist/cli/{chunk-526R2HON.mjs → chunk-NHRWZPWZ.mjs} +4 -2
  166. package/dist/cli/{chunk-KXMNM4AQ.js → chunk-NMU3VR5U.js} +4 -5
  167. package/dist/cli/{chunk-W3BE3CHK.mjs → chunk-O2RX5A66.mjs} +14 -12
  168. package/dist/cli/{chunk-UKFZT7RF.js → chunk-OMQ23IXL.js} +2 -2
  169. package/dist/cli/{chunk-LJTFZOHU.js → chunk-OPJAJBD4.js} +28 -54
  170. package/dist/cli/{chunk-MLFR6DVF.mjs → chunk-PHSEINNH.mjs} +5 -5
  171. package/dist/cli/{chunk-3DNKFH2G.mjs → chunk-PKHVSIJG.mjs} +19 -1
  172. package/dist/cli/{chunk-WIYWSYDS.mjs → chunk-Q2EIZKVX.mjs} +3 -3
  173. package/dist/cli/{chunk-VJAEA4CS.js → chunk-QJZ6WNWD.js} +8 -8
  174. package/dist/cli/{chunk-EIMG75BT.mjs → chunk-S3A4IXBQ.mjs} +4 -5
  175. package/dist/cli/{chunk-RZSTT45F.mjs → chunk-S42YIQNE.mjs} +13 -8
  176. package/dist/cli/{chunk-YULBYKAK.mjs → chunk-S6UAJR6V.mjs} +3 -3
  177. package/dist/cli/{chunk-G7L27KZB.mjs → chunk-TKAQR3IB.mjs} +31 -21
  178. package/dist/cli/{chunk-QWRHGGUH.js → chunk-UAJFWWZE.js} +20 -2
  179. package/dist/cli/{chunk-ZR2RLI4O.mjs → chunk-UDRPEZ5F.mjs} +223 -92
  180. package/dist/cli/{chunk-QGAWTBIR.js → chunk-ULK7JGGI.js} +511 -282
  181. package/dist/cli/chunk-V335HGX5.js +1038 -0
  182. package/dist/cli/{chunk-NH6JSJW6.mjs → chunk-V3MEA7NB.mjs} +7 -5
  183. package/dist/cli/{chunk-NRGGFVVB.js → chunk-VFGVXXZP.js} +37 -35
  184. package/dist/cli/chunk-VLEVVDWG.js +91 -0
  185. package/dist/cli/{chunk-R2GLGLDR.mjs → chunk-VPHN2HAL.mjs} +216 -91
  186. package/dist/cli/{chunk-CFUTOWE4.js → chunk-WG3KGAII.js} +8 -88
  187. package/dist/cli/{describe-TOMIAT37.mjs → chunk-WIY6U6GD.mjs} +19 -36
  188. package/dist/cli/{chunk-YS2YBSJB.js → chunk-XANRM3QA.js} +6 -6
  189. package/dist/cli/{chunk-KGQNIA37.js → chunk-XQCTG5OO.js} +44 -34
  190. package/dist/cli/{chunk-EJGBLXDZ.mjs → chunk-XZAFIOUQ.mjs} +1 -1
  191. package/dist/cli/chunk-Y4DPU4OM.js +827 -0
  192. package/dist/cli/chunk-YT5EODJO.js +920 -0
  193. package/dist/cli/{chunk-2WRO2UJ5.js → chunk-ZGQSFYD2.js} +56 -51
  194. package/dist/cli/{chunk-OJ6RUKVT.mjs → chunk-ZUK6LIJB.mjs} +10 -1
  195. package/dist/cli/command-docs.d.mts +5 -0
  196. package/dist/cli/command-docs.d.ts +5 -0
  197. package/dist/cli/command-docs.js +2 -2
  198. package/dist/cli/command-docs.mjs +1 -1
  199. package/dist/cli/{csv-6FNFYJUC.js → csv-C56GSCEU.js} +13 -12
  200. package/dist/cli/{csv-MDHT4BKK.mjs → csv-L54JS7TF.mjs} +4 -3
  201. package/dist/cli/{db-D6AMVOEW.js → db-MOGRMZTA.js} +30 -27
  202. package/dist/cli/{db-74O3RFWY.mjs → db-YVBUW2DX.mjs} +10 -7
  203. package/dist/cli/describe-KYEULWPG.js +48 -0
  204. package/dist/cli/describe-NLZKKT7C.mjs +48 -0
  205. package/dist/cli/describe-core.d.mts +153 -5
  206. package/dist/cli/describe-core.d.ts +153 -5
  207. package/dist/cli/describe-core.js +9 -5
  208. package/dist/cli/describe-core.mjs +10 -6
  209. package/dist/cli/{executions-N4FMGVSC.js → executions-A7L4ULPP.js} +9 -7
  210. package/dist/cli/{executions-PVSF4HUF.mjs → executions-ZBGSTT37.mjs} +7 -5
  211. package/dist/cli/{feedback-OB7NANZW.mjs → feedback-G6GU37FD.mjs} +6 -5
  212. package/dist/cli/{feedback-WFSPCAI2.js → feedback-OHLY7RYD.js} +10 -9
  213. package/dist/cli/getting-started.d.mts +6 -6
  214. package/dist/cli/getting-started.d.ts +6 -6
  215. package/dist/cli/getting-started.js +2 -2
  216. package/dist/cli/getting-started.mjs +1 -1
  217. package/dist/cli/git-P76N4NDQ.js +25 -0
  218. package/dist/cli/{git-FHUSPAEU.mjs → git-PKZW3QD5.mjs} +5 -4
  219. package/dist/cli/index.js +152 -142
  220. package/dist/cli/index.mjs +56 -46
  221. package/dist/cli/{legacy-noops-ECHNA5HN.js → legacy-noops-5LM3D724.js} +8 -7
  222. package/dist/cli/{legacy-noops-HMK4BSCI.mjs → legacy-noops-LJJYG6YA.mjs} +5 -4
  223. package/dist/cli/{monitors-U7VQ3EZM.mjs → monitors-72QV4ALO.mjs} +19 -6
  224. package/dist/cli/{monitors-XLLFNENH.js → monitors-UX3H5DC2.js} +103 -90
  225. package/dist/cli/{org-6H3USO5M.mjs → org-6RRRKOCP.mjs} +9 -6
  226. package/dist/cli/{org-QX6ER2HN.js → org-IF7ISUVB.js} +70 -67
  227. package/dist/cli/pages-3SU3HKL7.js +252 -0
  228. package/dist/cli/pages-DXDYYKEK.mjs +252 -0
  229. package/dist/cli/{play-MOB2WYOR.mjs → play-AHASKRLA.mjs} +512 -1508
  230. package/dist/cli/{play-WNB7HBZK.js → play-EUIUVLUH.js} +1090 -2086
  231. package/dist/cli/{providers-CXEZ23E2.mjs → providers-GWGE3WY3.mjs} +7 -5
  232. package/dist/cli/{providers-7M3DISKX.js → providers-V5WU4VXJ.js} +10 -8
  233. package/dist/cli/{quickstart-ZFCHKHF6.mjs → quickstart-OXKQ5ZST.mjs} +5 -4
  234. package/dist/cli/{quickstart-CLJT4AZL.js → quickstart-QP65I5PF.js} +13 -12
  235. package/dist/cli/run-6MM72IGL.mjs +443 -0
  236. package/dist/cli/run-F3FTYS56.js +443 -0
  237. package/dist/cli/search-OYKOOI7A.js +32 -0
  238. package/dist/cli/{search-FVYWYIC3.mjs → search-ZMEBVJZB.mjs} +8 -6
  239. package/dist/cli/{secrets-YRLKZQS5.js → secrets-ACND5N6A.js} +16 -14
  240. package/dist/cli/{secrets-WAMPTQFC.mjs → secrets-XRCJFF3L.mjs} +7 -5
  241. package/dist/cli/{sessions-IQ332BJH.mjs → sessions-RTK3CEW6.mjs} +5 -4
  242. package/dist/cli/{sessions-44J6WIVU.js → sessions-ZGRJPCFF.js} +6 -5
  243. package/dist/cli/{settings-4IJR2I2T.js → settings-PD5KWQQZ.js} +80 -77
  244. package/dist/cli/{settings-22S6NIFQ.mjs → settings-XDRBPRDE.mjs} +14 -11
  245. package/dist/cli/{setup-OZUPKKPW.mjs → setup-3HPYAOCC.mjs} +12 -10
  246. package/dist/cli/{setup-3FWSRNOX.js → setup-E2Q6PXHC.js} +53 -51
  247. package/dist/cli/{skills-5CW3NFP3.mjs → skills-OOQFMPOV.mjs} +7 -6
  248. package/dist/cli/skills-XYWV52KB.js +31 -0
  249. package/dist/cli/tools-ASCDZJCK.js +55 -0
  250. package/dist/cli/tools-C5ZT3UIC.mjs +55 -0
  251. package/dist/cli/update-5RQSEIFM.js +33 -0
  252. package/dist/cli/{update-IBULOV7P.mjs → update-ZWJTADIW.mjs} +9 -8
  253. package/dist/cli/{workflow-MVZT7MWT.mjs → workflow-23NMPAJ7.mjs} +10 -8
  254. package/dist/cli/{workflow-Z7FW6GT2.js → workflow-TCXU5YJV.js} +20 -18
  255. package/dist/client-DS2IWYZF.d.ts +10 -0
  256. package/dist/client-DTwnz_AW.d.mts +10 -0
  257. package/dist/{client-CYqG23K1.d.ts → client-core-B_6HAIBy.d.ts} +385 -12
  258. package/dist/{client-BbU5_j7n.d.mts → client-core-DzBSlY1U.d.mts} +385 -12
  259. package/dist/{compiler-manifest-CWz_sNOQ.d.mts → compiler-manifest-Dcyd3-Zd.d.mts} +43 -1
  260. package/dist/{compiler-manifest-CWz_sNOQ.d.ts → compiler-manifest-Dcyd3-Zd.d.ts} +43 -1
  261. package/dist/errors-d-sTrZhe.d.mts +142 -0
  262. package/dist/errors-yQwfgrcX.d.ts +142 -0
  263. package/dist/{index-BF2JB_Ug.d.mts → index-C6oXchjN.d.mts} +1 -1
  264. package/dist/{index-4NPXDzlD.d.ts → index-P56zy_z5.d.ts} +1 -1
  265. package/dist/index.d.mts +11 -147
  266. package/dist/index.d.ts +11 -147
  267. package/dist/index.js +15 -11
  268. package/dist/index.mjs +14 -10
  269. package/dist/install-integrity.json +141 -104
  270. package/dist/plays/bundle-play-file.d.mts +3 -3
  271. package/dist/plays/bundle-play-file.d.ts +3 -3
  272. package/dist/plays/bundle-play-file.mjs +2 -1
  273. package/dist/plays/play-description.d.mts +2 -2
  274. package/dist/plays/play-description.d.ts +2 -2
  275. package/dist/plays/play-description.js +2 -2
  276. package/dist/plays/play-description.mjs +1 -1
  277. package/dist/plays/run-request.d.mts +2 -2
  278. package/dist/plays/run-request.d.ts +2 -2
  279. package/dist/release.d.mts +1 -1
  280. package/dist/release.d.ts +1 -1
  281. package/dist/release.js +2 -2
  282. package/dist/release.mjs +1 -1
  283. package/dist/server.d.mts +17 -0
  284. package/dist/server.d.ts +17 -0
  285. package/dist/server.js +76 -0
  286. package/dist/server.mjs +76 -0
  287. package/package.json +6 -1
  288. package/dist/cli/auth-VDOCNR7H.js +0 -40
  289. package/dist/cli/chunk-PQUUWFXY.js +0 -95
  290. package/dist/cli/chunk-QJLKYYPX.js +0 -1710
  291. package/dist/cli/chunk-YBWAG72P.mjs +0 -95
  292. package/dist/cli/git-4PMBJSH5.js +0 -24
  293. package/dist/cli/search-4CCQCTVD.js +0 -30
  294. package/dist/cli/skills-LMNM6B5F.js +0 -30
  295. package/dist/cli/tools-AGBBDJ7P.js +0 -45
  296. package/dist/cli/tools-NOPBDRGW.mjs +0 -45
  297. package/dist/cli/update-U3W6USVD.js +0 -32
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkPQUUWFXYjs = require('./chunk-PQUUWFXY.js');
5
4
 
5
+ var _chunk7SWNPNMLjs = require('./chunk-7SWNPNML.js');
6
6
 
7
7
 
8
- var _chunkLJTFZOHUjs = require('./chunk-LJTFZOHU.js');
9
8
 
9
+ var _chunkOPJAJBD4js = require('./chunk-OPJAJBD4.js');
10
10
 
11
11
 
12
12
 
@@ -24,10 +24,11 @@ var _chunkLJTFZOHUjs = require('./chunk-LJTFZOHU.js');
24
24
 
25
25
 
26
26
 
27
- var _chunkZ2GUFYT6js = require('./chunk-Z2GUFYT6.js');
28
27
 
28
+ var _chunk5LEAXRHVjs = require('./chunk-5LEAXRHV.js');
29
29
 
30
- var _chunkZ2XUZC34js = require('./chunk-Z2XUZC34.js');
30
+
31
+ var _chunkIAYSWZDJjs = require('./chunk-IAYSWZDJ.js');
31
32
 
32
33
 
33
34
  var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
@@ -47,8 +48,10 @@ var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
47
48
  var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
48
49
 
49
50
 
51
+ var _chunkJF3TLIMQjs = require('./chunk-JF3TLIMQ.js');
52
+
50
53
 
51
- var _chunkVTODQWQAjs = require('./chunk-VTODQWQA.js');
54
+ var _chunkBGTPIMSMjs = require('./chunk-BGTPIMSM.js');
52
55
 
53
56
 
54
57
  var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
@@ -58,18 +61,18 @@ var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
58
61
 
59
62
 
60
63
 
61
- var _chunkLMAULZLFjs = require('./chunk-LMAULZLF.js');
64
+ var _chunkGEGW5HPZjs = require('./chunk-GEGW5HPZ.js');
62
65
 
63
66
 
64
67
 
65
68
 
66
- var _chunkRDPTDDKXjs = require('./chunk-RDPTDDKX.js');
69
+ var _chunk7LFIMWMWjs = require('./chunk-7LFIMWMW.js');
67
70
 
68
71
 
69
72
 
70
73
 
71
74
 
72
- var _chunk2WRO2UJ5js = require('./chunk-2WRO2UJ5.js');
75
+ var _chunkZGQSFYD2js = require('./chunk-ZGQSFYD2.js');
73
76
 
74
77
 
75
78
 
@@ -77,12 +80,12 @@ var _chunk2WRO2UJ5js = require('./chunk-2WRO2UJ5.js');
77
80
 
78
81
 
79
82
 
80
- var _chunkBHGII2D6js = require('./chunk-BHGII2D6.js');
83
+ var _chunk3ACMRZRVjs = require('./chunk-3ACMRZRV.js');
81
84
 
82
85
 
83
86
 
84
87
 
85
- var _chunkQJLKYYPXjs = require('./chunk-QJLKYYPX.js');
88
+ var _chunkY4DPU4OMjs = require('./chunk-Y4DPU4OM.js');
86
89
 
87
90
 
88
91
  var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
@@ -144,35 +147,99 @@ var _crypto = require('crypto');
144
147
 
145
148
 
146
149
 
150
+
151
+
152
+ var PENDING_KEY_TTL_MS = 60 * 60 * 1e3;
153
+ var PENDING_PREFIX = "pending-tool-execution-";
147
154
  var ToolCallRecovery = class _ToolCallRecovery {
148
- constructor(idempotencyKey, path) {
155
+ constructor(idempotencyKey, path, resumed = false) {
149
156
  this.idempotencyKey = idempotencyKey;
150
157
  this.path = path;
158
+ this.resumed = resumed;
151
159
  }
152
160
  static open(input) {
153
161
  if (!input.recover || input.idempotencyKey) {
154
162
  return new _ToolCallRecovery(input.idempotencyKey, null);
155
163
  }
156
164
  const path = pendingToolExecutionPath(input);
157
- return new _ToolCallRecovery(loadOrCreatePendingToolExecution(path), path);
165
+ discardExpiredPendingExecutions(_path.dirname.call(void 0, path));
166
+ if (input.fresh && _fs.existsSync.call(void 0, path)) {
167
+ discard(
168
+ path,
169
+ `Discarded the saved retry key for ${input.toolId} (--fresh).`
170
+ );
171
+ }
172
+ const { key, resumed } = loadOrCreatePendingToolExecution(path);
173
+ return new _ToolCallRecovery(key, path, resumed);
174
+ }
175
+ /**
176
+ * Drop the key after the server answered with a failure: the call ended,
177
+ * so running it again tries again instead of replaying that failure.
178
+ */
179
+ discard() {
180
+ if (!this.path || !this.idempotencyKey) return;
181
+ try {
182
+ if (readPendingToolExecution(this.path) === this.idempotencyKey) {
183
+ _fs.unlinkSync.call(void 0, this.path);
184
+ }
185
+ } catch (error) {
186
+ if (error.code !== "ENOENT") throw error;
187
+ }
158
188
  }
159
189
  async acknowledgeDelivery() {
160
190
  await completePendingToolExecution(this.path, this.idempotencyKey);
161
191
  }
162
192
  };
163
193
  function pendingToolExecutionPath(input) {
164
- const config = _chunkQJLKYYPXjs.resolveConfig.call(void 0, );
194
+ const config = _chunkY4DPU4OMjs.resolveConfig.call(void 0, );
165
195
  const fingerprint = _crypto.createHash.call(void 0, "sha256").update(config.baseUrl).update("\0").update(_crypto.createHash.call(void 0, "sha256").update(config.apiKey).digest("hex")).update("\0").update(input.toolId).update("\0").update(_chunkXDVT3GOMjs.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
166
196
  return _path.join.call(void 0,
167
- _chunkQJLKYYPXjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
168
- `pending-tool-execution-${fingerprint}.json`
197
+ _chunkY4DPU4OMjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
198
+ `${PENDING_PREFIX}${fingerprint}.json`
169
199
  );
170
200
  }
201
+ function discard(path, note) {
202
+ try {
203
+ _fs.unlinkSync.call(void 0, path);
204
+ process.stderr.write(`${note}
205
+ `);
206
+ } catch (error) {
207
+ if (error.code !== "ENOENT") throw error;
208
+ }
209
+ }
210
+ function discardExpiredPendingExecutions(directory) {
211
+ if (!_fs.existsSync.call(void 0, directory)) return;
212
+ const now = Date.now();
213
+ for (const name of _fs.readdirSync.call(void 0, directory)) {
214
+ if (!name.startsWith(PENDING_PREFIX) || !name.endsWith(".json")) continue;
215
+ const path = _path.join.call(void 0, directory, name);
216
+ try {
217
+ const modified = _fs.statSync.call(void 0, path).mtimeMs;
218
+ if (now - modified <= PENDING_KEY_TTL_MS) continue;
219
+ discard(
220
+ path,
221
+ `Discarded a retry key saved ${new Date(modified).toISOString()}, older than ${PENDING_KEY_TTL_MS / 6e4} minutes; the call runs again.`
222
+ );
223
+ } catch (error) {
224
+ if (error.code !== "ENOENT") throw error;
225
+ }
226
+ }
227
+ }
171
228
  function loadOrCreatePendingToolExecution(path) {
172
229
  _fs.mkdirSync.call(void 0, _path.dirname.call(void 0, path), { recursive: true });
173
230
  if (_fs.existsSync.call(void 0, path)) {
174
- return readPendingToolExecution(path);
231
+ try {
232
+ return { key: readPendingToolExecution(path), resumed: true };
233
+ } catch (error) {
234
+ discard(
235
+ path,
236
+ `Discarded an unreadable retry key at ${path} (${error instanceof Error ? error.message : String(error)}).`
237
+ );
238
+ }
175
239
  }
240
+ return { key: createPendingToolExecution(path), resumed: false };
241
+ }
242
+ function createPendingToolExecution(path) {
176
243
  const idempotencyKey = _crypto.randomUUID.call(void 0, );
177
244
  const temporaryPath = `${path}.${process.pid}.${_crypto.randomUUID.call(void 0, )}.tmp`;
178
245
  try {
@@ -276,16 +343,16 @@ function toolConnectionStatusMessage(input) {
276
343
  var TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS = 750;
277
344
  var TOOL_COMMAND_TEMPLATES = {
278
345
  describe: "deepline describe <toolId>",
279
- execute: "deepline tools execute <toolId> --input '{...}'"
346
+ execute: "deepline run <toolId> --input '{...}'"
280
347
  };
281
348
  function toListedTool(tool) {
282
- if (_chunkZ2GUFYT6js.isPlayLikeTool.call(void 0, tool)) {
349
+ if (_chunk5LEAXRHVjs.isPlayLikeTool.call(void 0, tool)) {
283
350
  return {
284
351
  ...tool,
285
352
  description: listedToolDescription(tool),
286
353
  id: tool.toolId,
287
354
  type: "play",
288
- executeCommand: _chunkZ2GUFYT6js.playRunCommandForTool.call(void 0, tool, tool.toolId)
355
+ executeCommand: _chunk5LEAXRHVjs.playRunCommandForTool.call(void 0, tool, tool.toolId)
289
356
  };
290
357
  }
291
358
  return {
@@ -293,7 +360,7 @@ function toListedTool(tool) {
293
360
  description: listedToolDescription(tool),
294
361
  id: tool.toolId,
295
362
  type: "tool",
296
- executeCommand: `deepline tools execute ${tool.toolId}`
363
+ executeCommand: `deepline run ${tool.toolId}`
297
364
  };
298
365
  }
299
366
  function parseGrepTerms(query, mode) {
@@ -367,16 +434,16 @@ function firstSentence(text) {
367
434
  return (match ? match[0] : clean).trim();
368
435
  }
369
436
  function requiredInputIds(tool) {
370
- const inputSchema = _chunkZ2GUFYT6js.recordField.call(void 0,
437
+ const inputSchema = _chunk5LEAXRHVjs.recordField.call(void 0,
371
438
  tool,
372
439
  "inputSchema",
373
440
  "input_schema"
374
441
  );
375
- return _chunkZ2GUFYT6js.toolInputFieldsForDisplay.call(void 0, inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
442
+ return _chunk5LEAXRHVjs.toolInputFieldsForDisplay.call(void 0, inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
376
443
  }
377
444
  function notConnectedSuffix(tool) {
378
445
  const record = tool;
379
- const status = _chunkZ2GUFYT6js.stringField.call(void 0, record, "credentialStatus", "credential_status");
446
+ const status = _chunk5LEAXRHVjs.stringField.call(void 0, record, "credentialStatus", "credential_status");
380
447
  const connected = record.connected;
381
448
  const message = toolConnectionStatusMessage({
382
449
  connected: connected === false ? false : void 0,
@@ -385,18 +452,18 @@ function notConnectedSuffix(tool) {
385
452
  return message ? ` - \u26A0 ${message}` : "";
386
453
  }
387
454
  function shortPricingHint(tool) {
388
- const pricing = _chunkZ2GUFYT6js.recordField.call(void 0,
455
+ const pricing = _chunk5LEAXRHVjs.recordField.call(void 0,
389
456
  tool,
390
457
  "pricing"
391
458
  );
392
459
  const credits = numberField(pricing, "creditsPerUnit", "credits_per_unit");
393
- const unit = _chunkZ2GUFYT6js.stringField.call(void 0, pricing, "unit");
460
+ const unit = _chunk5LEAXRHVjs.stringField.call(void 0, pricing, "unit");
394
461
  if (credits !== null) {
395
462
  return `${formatDecimal(credits)} cr/${unit || "unit"}`;
396
463
  }
397
- const summary = _chunkZ2GUFYT6js.stringField.call(void 0, pricing, "summary");
464
+ const summary = _chunk5LEAXRHVjs.stringField.call(void 0, pricing, "summary");
398
465
  if (summary) return summary;
399
- const displayText = _chunkZ2GUFYT6js.stringField.call(void 0, pricing, "displayText", "display_text");
466
+ const displayText = _chunk5LEAXRHVjs.stringField.call(void 0, pricing, "displayText", "display_text");
400
467
  return displayText || null;
401
468
  }
402
469
  function aggregateCategorySummaries(tools) {
@@ -440,13 +507,13 @@ function categoryEnumerationRender(summaries) {
440
507
  };
441
508
  }
442
509
  async function listToolCategories(emitJson, compact) {
443
- const client = new (0, _chunkVTODQWQAjs.DeeplineClient)();
510
+ const client = new (0, _chunkJF3TLIMQjs.DeeplineClient)();
444
511
  if (!emitJson) {
445
512
  const summaries2 = (await client.listToolCategories()).map((category) => ({
446
513
  ...category,
447
514
  description: describeToolCategory(category.name)
448
515
  }));
449
- _chunkBHGII2D6js.printCommandEnvelope.call(void 0,
516
+ _chunk3ACMRZRVjs.printCommandEnvelope.call(void 0,
450
517
  { categories: summaries2, render: categoryEnumerationRender(summaries2) },
451
518
  { json: false }
452
519
  );
@@ -456,7 +523,7 @@ async function listToolCategories(emitJson, compact) {
456
523
  const items = rawTools.map(toListedTool);
457
524
  const summaries = aggregateCategorySummaries(rawTools);
458
525
  const outputItems = compact ? items.map(compactTool) : items;
459
- _chunkBHGII2D6js.printCommandEnvelope.call(void 0,
526
+ _chunk3ACMRZRVjs.printCommandEnvelope.call(void 0,
460
527
  {
461
528
  tools: outputItems,
462
529
  count: outputItems.length,
@@ -475,7 +542,7 @@ function unknownCategoryError(category, summaries, emitJson) {
475
542
  const known = summaries.map((item) => item.name);
476
543
  const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
477
544
  if (emitJson) {
478
- _chunkBHGII2D6js.printJson.call(void 0, {
545
+ _chunk3ACMRZRVjs.printJson.call(void 0, {
479
546
  ok: false,
480
547
  exitCode: 4,
481
548
  code: "TOOL_CATEGORY_NOT_FOUND",
@@ -489,13 +556,13 @@ function unknownCategoryError(category, summaries, emitJson) {
489
556
  const render = categoryEnumerationRender(summaries);
490
557
  console.error(message);
491
558
  console.error("");
492
- console.error(_chunkBHGII2D6js.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
559
+ console.error(_chunk3ACMRZRVjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
493
560
  console.error("");
494
561
  console.error(`Valid categories: ${known.join(", ")}`);
495
562
  return 4;
496
563
  }
497
564
  async function listToolsInCategory(category, emitJson) {
498
- const client = new (0, _chunkVTODQWQAjs.DeeplineClient)();
565
+ const client = new (0, _chunkJF3TLIMQjs.DeeplineClient)();
499
566
  const { tools: rawTools, categories } = await client.listToolsInCategory(category);
500
567
  const summaries = categories.map((item) => ({
501
568
  ...item,
@@ -531,7 +598,7 @@ async function listToolsInCategory(category, emitJson) {
531
598
  }
532
599
  ]
533
600
  };
534
- _chunkBHGII2D6js.printCommandEnvelope.call(void 0,
601
+ _chunk3ACMRZRVjs.printCommandEnvelope.call(void 0,
535
602
  {
536
603
  category,
537
604
  total: rows.length,
@@ -544,7 +611,7 @@ async function listToolsInCategory(category, emitJson) {
544
611
  return 0;
545
612
  }
546
613
  async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
547
- const client = new (0, _chunkVTODQWQAjs.DeeplineClient)();
614
+ const client = new (0, _chunkJF3TLIMQjs.DeeplineClient)();
548
615
  const items = (await client.listTools({
549
616
  categories: requestedCategories.join(","),
550
617
  compact
@@ -573,7 +640,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
573
640
  ]
574
641
  };
575
642
  const outputItems = compact ? items.map(compactTool) : items;
576
- _chunkBHGII2D6js.printCommandEnvelope.call(void 0,
643
+ _chunk3ACMRZRVjs.printCommandEnvelope.call(void 0,
577
644
  {
578
645
  tools: outputItems,
579
646
  count: outputItems.length,
@@ -592,13 +659,13 @@ async function listTools(category, options = {}) {
592
659
  const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
593
660
  const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
594
661
  const compact = options.compact !== false;
595
- const emitJson = options.json === true || _chunkBHGII2D6js.shouldEmitJson.call(void 0, );
662
+ const emitJson = options.json === true || _chunk3ACMRZRVjs.shouldEmitJson.call(void 0, );
596
663
  if (positional && flagCategories.length > 0) {
597
664
  const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
598
665
  if (!flagIsSameSingle) {
599
666
  const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
600
667
  if (emitJson) {
601
- _chunkBHGII2D6js.printJson.call(void 0, {
668
+ _chunk3ACMRZRVjs.printJson.call(void 0, {
602
669
  ok: false,
603
670
  exitCode: 2,
604
671
  code: "TOOL_LIST_CATEGORY_CONFLICT",
@@ -625,7 +692,7 @@ async function grepTools(queryInput, options = {}) {
625
692
  console.error("Usage: deepline tools grep <query> [--json]");
626
693
  return 1;
627
694
  }
628
- const client = new (0, _chunkVTODQWQAjs.DeeplineClient)();
695
+ const client = new (0, _chunkJF3TLIMQjs.DeeplineClient)();
629
696
  const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
630
697
  const mode = _nullishCoalesce(options.mode, () => ( "all"));
631
698
  const jsonOutput = options.json === true;
@@ -649,7 +716,7 @@ async function grepTools(queryInput, options = {}) {
649
716
  query,
650
717
  mode
651
718
  }) : null;
652
- _chunkBHGII2D6js.printCommandEnvelope.call(void 0,
719
+ _chunk3ACMRZRVjs.printCommandEnvelope.call(void 0,
653
720
  {
654
721
  tools: outputTools,
655
722
  count: outputTools.length,
@@ -667,7 +734,7 @@ async function grepTools(queryInput, options = {}) {
667
734
  } : {},
668
735
  commandTemplates: TOOL_COMMAND_TEMPLATES
669
736
  },
670
- { json: options.json || _chunkBHGII2D6js.shouldEmitJson.call(void 0, ) }
737
+ { json: options.json || _chunk3ACMRZRVjs.shouldEmitJson.call(void 0, ) }
671
738
  );
672
739
  return 0;
673
740
  }
@@ -715,15 +782,15 @@ function isMissingToolMetadataError(error) {
715
782
  function playAliasToolErrorMessage(toolId, play) {
716
783
  const playName = _nullishCoalesce(play.reference, () => ( play.name));
717
784
  return `${toolId} is a play, not a tool.
718
- Use: deepline plays run ${playName} --input '{...}'
785
+ Use: deepline run ${playName} --input '{...}'
719
786
  Inspect its schema with: deepline describe ${playName}`;
720
787
  }
721
788
  function printPlayAliasToolError(toolId, play) {
722
789
  console.error(playAliasToolErrorMessage(toolId, play));
723
790
  }
724
791
  function playLikeToolExecuteErrorMessage(toolId, tool) {
725
- const playReference = tool ? _chunkZ2GUFYT6js.playReferenceForTool.call(void 0, tool) : null;
726
- const nextStep = playReference ? `Use: deepline plays run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunkZ2GUFYT6js.playSearchCommandForToolId.call(void 0, toolId)}`;
792
+ const playReference = tool ? _chunk5LEAXRHVjs.playReferenceForTool.call(void 0, tool) : null;
793
+ const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunk5LEAXRHVjs.playSearchCommandForToolId.call(void 0, toolId)}`;
727
794
  return [
728
795
  `${toolId} is a workflow/play entry, not an atomic provider tool.`,
729
796
  nextStep,
@@ -746,20 +813,20 @@ function registerToolsCommands(program) {
746
813
  "after",
747
814
  `
748
815
  Concepts:
749
- Tools are atomic provider/API operations. Plays are workflows and must be run
750
- through the plays namespace.
816
+ Tools are atomic provider/API operations; plays are workflows. deepline run
817
+ runs either.
751
818
 
752
819
  Common commands:
753
820
  deepline search "name and company domain -> work email" --type tools
754
821
  deepline describe hunter_email_verifier
755
- deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
756
- deepline billing usage --request-id <job_id>
822
+ deepline run hunter_email_verifier --input '{"email":"a@b.com"}'
823
+ deepline billing usage --request-id <request-id>
757
824
 
758
825
  Output:
759
- Use deepline describe for tool contracts.
760
- Use execute to run a tool.
761
- Read pricing before execution; use the returned next.billing command for its
762
- exact charge. Workspace balance changes also include other callers' activity.
826
+ deepline describe shows a tool's contract and price, and deepline run runs
827
+ it. The receipt's billing command (next.billing with --json) gives a call's
828
+ exact charge. Workspace balance changes also include other callers'
829
+ activity.
763
830
  `
764
831
  );
765
832
  tools.command("connect <provider>").description(
@@ -778,7 +845,7 @@ Output:
778
845
  if (options.preset !== void 0 && (options.scopes !== void 0 || options.optionalScopes !== void 0))
779
846
  throw new Error("Use --preset or individual scopes, not both.");
780
847
  const splitScopes = (value) => value.split(",").map((scope) => scope.trim()).filter(Boolean);
781
- const result2 = await new (0, _chunkVTODQWQAjs.DeeplineClient)().startIntegrationOAuth(
848
+ const result2 = await new (0, _chunkJF3TLIMQjs.DeeplineClient)().startIntegrationOAuth(
782
849
  provider,
783
850
  {
784
851
  ...options.preset !== void 0 ? { preset: options.preset } : {},
@@ -790,7 +857,7 @@ Output:
790
857
  throw new Error(
791
858
  "The API did not return an OAuth authorization URL."
792
859
  );
793
- if (_chunkBHGII2D6js.shouldEmitJson.call(void 0, options.json))
860
+ if (_chunk3ACMRZRVjs.shouldEmitJson.call(void 0, options.json))
794
861
  console.log(
795
862
  JSON.stringify({ provider, redirect_url: result2.redirect_url })
796
863
  );
@@ -816,7 +883,7 @@ Output:
816
883
  "--credentials-file must contain a nonempty JSON object of string credential values."
817
884
  );
818
885
  }
819
- const result = await new (0, _chunkVTODQWQAjs.DeeplineClient)().setIntegrationCredentials(
886
+ const result = await new (0, _chunkJF3TLIMQjs.DeeplineClient)().setIntegrationCredentials(
820
887
  provider,
821
888
  credentials
822
889
  );
@@ -826,7 +893,7 @@ Output:
826
893
  );
827
894
  }
828
895
  const confirmation = { provider, credential_saved: true };
829
- if (_chunkBHGII2D6js.shouldEmitJson.call(void 0, options.json))
896
+ if (_chunk3ACMRZRVjs.shouldEmitJson.call(void 0, options.json))
830
897
  console.log(JSON.stringify(confirmation));
831
898
  else
832
899
  console.log(
@@ -866,7 +933,7 @@ Examples:
866
933
  json: Boolean(options.json)
867
934
  });
868
935
  });
869
- _chunkLJTFZOHUjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
936
+ _chunkOPJAJBD4js.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
870
937
  tools.command("grep <query>").description(
871
938
  "Regex grep over tool ids, descriptions, categories, and input fields."
872
939
  ).addHelpText(
@@ -901,7 +968,7 @@ Examples:
901
968
  });
902
969
  const addToolMetadataCommand = (command) => {
903
970
  let compatibilityMetadata;
904
- _chunkLMAULZLFjs.registerCompatibilityCatalog.call(void 0, command, () => ({
971
+ _chunkGEGW5HPZjs.registerCompatibilityCatalog.call(void 0, command, () => ({
905
972
  toolId: command.args[0],
906
973
  acceptMetadata: (metadata) => {
907
974
  compatibilityMetadata = metadata;
@@ -927,7 +994,7 @@ Examples:
927
994
  deepline tools describe deeplineagent --model openai/gpt-5.6-luna
928
995
  deepline tools describe ai_inference --estimate-payload @payload.json
929
996
  deepline tools describe ai_evaluate --estimate-payload @payload.json
930
- deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
997
+ deepline run hunter_email_verifier --input '{"email":"a@b.com"}'
931
998
  `
932
999
  ).option("--json", "Emit JSON output").option(
933
1000
  "--model <model>",
@@ -971,7 +1038,7 @@ Examples:
971
1038
  process.exitCode = await narrowView();
972
1039
  return;
973
1040
  }
974
- const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-QW54QQNB.js")));
1041
+ const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-KYEULWPG.js")));
975
1042
  process.exitCode = await describeAnything(
976
1043
  toolId,
977
1044
  {
@@ -986,12 +1053,12 @@ Examples:
986
1053
  });
987
1054
  };
988
1055
  addToolMetadataCommand(
989
- _chunkPQUUWFXYjs.addDescribeOptions.call(void 0,
1056
+ _chunk7SWNPNMLjs.addDescribeOptions.call(void 0,
990
1057
  tools.command("describe <toolId>", { hidden: true }).alias("get"),
991
1058
  { json: false }
992
1059
  )
993
1060
  );
994
- tools.command("execute <toolId>").alias("call").description("Execute a tool by id.").addHelpText(
1061
+ tools.command("execute <toolId>", { hidden: true }).alias("call").description("Execute a tool by id.").addHelpText(
995
1062
  "after",
996
1063
  `
997
1064
  Notes:
@@ -1055,7 +1122,7 @@ Examples:
1055
1122
  options,
1056
1123
  void 0,
1057
1124
  true,
1058
- _chunkRDPTDDKXjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
1125
+ _chunk7LFIMWMWjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
1059
1126
  );
1060
1127
  }
1061
1128
  );
@@ -1063,13 +1130,13 @@ Examples:
1063
1130
  function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
1064
1131
  let metadata;
1065
1132
  const startedAt = performance.now();
1066
- const baseUrl = _chunkQJLKYYPXjs.resolveConfig.call(void 0, ).baseUrl;
1067
- _chunkRDPTDDKXjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
1068
- const result = _chunkLMAULZLFjs.runToolExecuteStage.call(void 0,
1133
+ const baseUrl = _chunkY4DPU4OMjs.resolveConfig.call(void 0, ).baseUrl;
1134
+ _chunk7LFIMWMWjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
1135
+ const result = _chunkGEGW5HPZjs.runToolExecuteStage.call(void 0,
1069
1136
  "SDK compatibility",
1070
- () => _chunk2WRO2UJ5js.checkSdkCompatibility.call(void 0, baseUrl, {
1137
+ () => _chunkZGQSFYD2js.checkSdkCompatibility.call(void 0, baseUrl, {
1071
1138
  command: "tools execute",
1072
- skillsVersion: _chunkQJLKYYPXjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
1139
+ skillsVersion: _chunkY4DPU4OMjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
1073
1140
  persistCache: false,
1074
1141
  timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
1075
1142
  catalog: {
@@ -1083,7 +1150,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
1083
1150
  })
1084
1151
  ).then(
1085
1152
  (compatibility) => {
1086
- _chunkRDPTDDKXjs.recordCliTrace.call(void 0, {
1153
+ _chunk7LFIMWMWjs.recordCliTrace.call(void 0, {
1087
1154
  phase: "cli.tool_execute_compatibility_ready",
1088
1155
  ms: performance.now() - startedAt,
1089
1156
  ok: compatibility.error === null,
@@ -1092,7 +1159,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
1092
1159
  return compatibility;
1093
1160
  },
1094
1161
  (error) => {
1095
- _chunkRDPTDDKXjs.recordCliTrace.call(void 0, {
1162
+ _chunk7LFIMWMWjs.recordCliTrace.call(void 0, {
1096
1163
  phase: "cli.tool_execute_compatibility_ready",
1097
1164
  ms: performance.now() - startedAt,
1098
1165
  ok: false
@@ -1107,7 +1174,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1107
1174
  console.error("Usage: deepline tools describe <toolId> [--json]");
1108
1175
  return 1;
1109
1176
  }
1110
- const client = new (0, _chunkVTODQWQAjs.DeeplineClient)();
1177
+ const client = new (0, _chunkJF3TLIMQjs.DeeplineClient)();
1111
1178
  let tool;
1112
1179
  try {
1113
1180
  tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
@@ -1161,12 +1228,12 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1161
1228
  const lines = toolPricingOnlyLines(tool, toolId);
1162
1229
  if (inferenceQuote)
1163
1230
  lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
1164
- _chunkBHGII2D6js.printCommandEnvelope.call(void 0,
1231
+ _chunk3ACMRZRVjs.printCommandEnvelope.call(void 0,
1165
1232
  {
1166
1233
  toolId: String(tool.toolId || toolId),
1167
1234
  cost: _chunkZM2YPJQJjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
1168
1235
  ...modelDescription ? { modelOptions: modelDescription } : {},
1169
- ..._chunkZ2GUFYT6js.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunkZ2GUFYT6js.recordField.call(void 0, tool, "pricing") } : {},
1236
+ ..._chunk5LEAXRHVjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunk5LEAXRHVjs.recordField.call(void 0, tool, "pricing") } : {},
1170
1237
  ...inferenceQuote ? { inferenceQuote } : {}
1171
1238
  },
1172
1239
  {
@@ -1177,14 +1244,14 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1177
1244
  );
1178
1245
  return 0;
1179
1246
  }
1180
- if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunkZ2GUFYT6js.isMonitorTypeTool.call(void 0, tool) && !_chunkZ2GUFYT6js.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
1181
- const contract = _chunkZ2GUFYT6js.toolContractJsonForDescribe.call(void 0,
1247
+ if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunk5LEAXRHVjs.isMonitorTypeTool.call(void 0, tool) && !_chunk5LEAXRHVjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
1248
+ const contract = _chunk5LEAXRHVjs.toolContractJsonForDescribe.call(void 0,
1182
1249
  tool,
1183
1250
  toolId,
1184
1251
  void 0,
1185
1252
  seedToolListScript
1186
1253
  );
1187
- _chunkBHGII2D6js.printCompactJson.call(void 0, {
1254
+ _chunk3ACMRZRVjs.printCompactJson.call(void 0, {
1188
1255
  toolId: contract.toolId,
1189
1256
  ...options.schemaOnly ? {
1190
1257
  inputSchema: contract.inputSchema,
@@ -1207,8 +1274,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1207
1274
  return 0;
1208
1275
  }
1209
1276
  if (options.contractJson) {
1210
- _chunkBHGII2D6js.printCompactJson.call(void 0, {
1211
- ..._chunkZ2GUFYT6js.toolContractJsonForDescribe.call(void 0,
1277
+ _chunk3ACMRZRVjs.printCompactJson.call(void 0, {
1278
+ ..._chunk5LEAXRHVjs.toolContractJsonForDescribe.call(void 0,
1212
1279
  tool,
1213
1280
  toolId,
1214
1281
  void 0,
@@ -1221,8 +1288,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1221
1288
  }
1222
1289
  const emitJson = options.json === true;
1223
1290
  if (emitJson) {
1224
- _chunkBHGII2D6js.printCompactJson.call(void 0, {
1225
- ..._chunkZ2GUFYT6js.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
1291
+ _chunk3ACMRZRVjs.printCompactJson.call(void 0, {
1292
+ ..._chunk5LEAXRHVjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
1226
1293
  ...modelDescription ? { modelOptions: modelDescription } : {},
1227
1294
  ...inferenceQuote ? { inferenceQuote } : {}
1228
1295
  });
@@ -1247,7 +1314,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1247
1314
  printCompactToolContract(tool, toolId);
1248
1315
  if (modelDescription) {
1249
1316
  process.stdout.write(`
1250
- ${_chunkZ2GUFYT6js.formatModelDescription.call(void 0, modelDescription)}`);
1317
+ ${_chunk5LEAXRHVjs.formatModelDescription.call(void 0, modelDescription)}`);
1251
1318
  }
1252
1319
  if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
1253
1320
  return 0;
@@ -1255,7 +1322,7 @@ ${_chunkZ2GUFYT6js.formatModelDescription.call(void 0, modelDescription)}`);
1255
1322
  printCompactToolContract(tool, toolId);
1256
1323
  if (modelDescription) {
1257
1324
  process.stdout.write(`
1258
- ${_chunkZ2GUFYT6js.formatModelDescription.call(void 0, modelDescription)}`);
1325
+ ${_chunk5LEAXRHVjs.formatModelDescription.call(void 0, modelDescription)}`);
1259
1326
  }
1260
1327
  if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
1261
1328
  return 0;
@@ -1272,10 +1339,10 @@ function printInferenceQuoteSummary(quote) {
1272
1339
  for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
1273
1340
  }
1274
1341
  function printMonitorTypeFilters(tool) {
1275
- const schema = _chunkZ2GUFYT6js.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
1276
- const properties = _chunkZ2GUFYT6js.recordField.call(void 0, schema, "properties");
1342
+ const schema = _chunk5LEAXRHVjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
1343
+ const properties = _chunk5LEAXRHVjs.recordField.call(void 0, schema, "properties");
1277
1344
  const required = new Set(
1278
- _chunkZ2GUFYT6js.arrayField.call(void 0, schema, "required").filter(
1345
+ _chunk5LEAXRHVjs.arrayField.call(void 0, schema, "required").filter(
1279
1346
  (v) => typeof v === "string"
1280
1347
  )
1281
1348
  );
@@ -1286,24 +1353,24 @@ function printMonitorTypeFilters(tool) {
1286
1353
  }
1287
1354
  console.log("Deploy filters (set in the monitor payload):");
1288
1355
  for (const name of names) {
1289
- const field = _chunkZ2GUFYT6js.isRecord.call(void 0, properties[name]) ? properties[name] : {};
1356
+ const field = _chunk5LEAXRHVjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
1290
1357
  const star = required.has(name) ? "*" : "";
1291
- const enumVals = _chunkZ2GUFYT6js.arrayField.call(void 0, field, "enum").filter(
1358
+ const enumVals = _chunk5LEAXRHVjs.arrayField.call(void 0, field, "enum").filter(
1292
1359
  (v) => typeof v === "string"
1293
1360
  );
1294
- const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunkZ2GUFYT6js.stringField.call(void 0, field, "type") || "string";
1295
- const desc = _chunkZ2GUFYT6js.stringField.call(void 0, field, "description");
1361
+ const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunk5LEAXRHVjs.stringField.call(void 0, field, "type") || "string";
1362
+ const desc = _chunk5LEAXRHVjs.stringField.call(void 0, field, "description");
1296
1363
  console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
1297
1364
  }
1298
1365
  }
1299
1366
  function printMonitorTypeFilterExamples(tool) {
1300
- const documentation = _chunkZ2GUFYT6js.recordField.call(void 0, tool, "documentation");
1301
- const fields = _chunkZ2GUFYT6js.recordField.call(void 0, documentation, "fields");
1367
+ const documentation = _chunk5LEAXRHVjs.recordField.call(void 0, tool, "documentation");
1368
+ const fields = _chunk5LEAXRHVjs.recordField.call(void 0, documentation, "fields");
1302
1369
  const examples = Object.entries(fields).flatMap(([name, rawField]) => {
1303
- const grammar = _chunkZ2GUFYT6js.recordField.call(void 0, _chunkZ2GUFYT6js.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
1304
- const example = _chunkZ2GUFYT6js.stringField.call(void 0, grammar, "example");
1370
+ const grammar = _chunk5LEAXRHVjs.recordField.call(void 0, _chunk5LEAXRHVjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
1371
+ const example = _chunk5LEAXRHVjs.stringField.call(void 0, grammar, "example");
1305
1372
  const values = [
1306
- ..._chunkZ2GUFYT6js.arrayField.call(void 0, grammar, "examples").filter(
1373
+ ..._chunk5LEAXRHVjs.arrayField.call(void 0, grammar, "examples").filter(
1307
1374
  (value) => typeof value === "string" && Boolean(value)
1308
1375
  ),
1309
1376
  ...example ? [example] : []
@@ -1318,21 +1385,21 @@ function printMonitorTypeFilterExamples(tool) {
1318
1385
  }
1319
1386
  }
1320
1387
  function printMonitorTypeStreams(tool) {
1321
- const streams = _chunkZ2GUFYT6js.arrayField.call(void 0, tool, "streams", "output_streams").filter(
1322
- _chunkZ2GUFYT6js.isRecord
1388
+ const streams = _chunk5LEAXRHVjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
1389
+ _chunk5LEAXRHVjs.isRecord
1323
1390
  );
1324
1391
  if (!streams.length) return;
1325
1392
  console.log("");
1326
1393
  console.log("Filter columns (a play's sqlListeners.where, per stream):");
1327
1394
  for (const stream of streams) {
1328
- const name = _chunkZ2GUFYT6js.stringField.call(void 0, stream, "stream");
1329
- const cols = _chunkZ2GUFYT6js.arrayField.call(void 0, stream, "columns").filter(_chunkZ2GUFYT6js.isRecord).map((col) => _chunkZ2GUFYT6js.stringField.call(void 0, col, "name")).filter(Boolean);
1395
+ const name = _chunk5LEAXRHVjs.stringField.call(void 0, stream, "stream");
1396
+ const cols = _chunk5LEAXRHVjs.arrayField.call(void 0, stream, "columns").filter(_chunk5LEAXRHVjs.isRecord).map((col) => _chunk5LEAXRHVjs.stringField.call(void 0, col, "name")).filter(Boolean);
1330
1397
  console.log(`- ${name}: ${cols.join(", ")}`);
1331
1398
  }
1332
1399
  }
1333
1400
  function monitorTypePricingLines(tool) {
1334
- const pricing = _chunkZ2GUFYT6js.recordField.call(void 0, tool, "pricing");
1335
- const byType = _chunkZ2GUFYT6js.recordField.call(void 0,
1401
+ const pricing = _chunk5LEAXRHVjs.recordField.call(void 0, tool, "pricing");
1402
+ const byType = _chunk5LEAXRHVjs.recordField.call(void 0,
1336
1403
  pricing,
1337
1404
  "pricing_by_radar_type",
1338
1405
  "pricingByRadarType"
@@ -1343,9 +1410,9 @@ function monitorTypePricingLines(tool) {
1343
1410
  }
1344
1411
  const lines = ["Pricing (Deepline credits per accepted event):"];
1345
1412
  for (const key of keys) {
1346
- const entry = _chunkZ2GUFYT6js.isRecord.call(void 0, byType[key]) ? byType[key] : {};
1413
+ const entry = _chunk5LEAXRHVjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
1347
1414
  const credits = numberField(entry, "deepline_credits", "deeplineCredits");
1348
- const display = _chunkZ2GUFYT6js.stringField.call(void 0, entry, "display");
1415
+ const display = _chunk5LEAXRHVjs.stringField.call(void 0, entry, "display");
1349
1416
  const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
1350
1417
  lines.push(`- ${key}: ${shown}`);
1351
1418
  }
@@ -1355,20 +1422,20 @@ function printMonitorTypePricing(tool) {
1355
1422
  for (const line of monitorTypePricingLines(tool)) console.log(line);
1356
1423
  }
1357
1424
  function printMonitorTypeDeploy(tool) {
1358
- const deploy = _chunkZ2GUFYT6js.recordField.call(void 0, tool, "deploy");
1359
- const toolId = _chunkZ2GUFYT6js.stringField.call(void 0, tool, "toolId");
1360
- const example = _chunkZ2GUFYT6js.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
1425
+ const deploy = _chunk5LEAXRHVjs.recordField.call(void 0, tool, "deploy");
1426
+ const toolId = _chunk5LEAXRHVjs.stringField.call(void 0, tool, "toolId");
1427
+ const example = _chunk5LEAXRHVjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
1361
1428
  console.log("Deploy (a monitor type is deployed, not executed):");
1362
1429
  console.log(` ${example}`);
1363
1430
  }
1364
1431
  function printMonitorTypeContract(tool, requestedToolId) {
1365
- const toolId = _chunkZ2GUFYT6js.stringField.call(void 0, tool, "toolId") || requestedToolId;
1432
+ const toolId = _chunk5LEAXRHVjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
1366
1433
  console.log(toolId);
1367
- const displayName = _chunkZ2GUFYT6js.stringField.call(void 0, tool, "displayName");
1434
+ const displayName = _chunk5LEAXRHVjs.stringField.call(void 0, tool, "displayName");
1368
1435
  if (displayName) console.log(`Best for: ${displayName}`);
1369
- const description = _chunkZ2GUFYT6js.stringField.call(void 0, tool, "description");
1436
+ const description = _chunk5LEAXRHVjs.stringField.call(void 0, tool, "description");
1370
1437
  if (description) console.log(`Description: ${description}`);
1371
- const categories = _chunkZ2GUFYT6js.arrayField.call(void 0, tool, "categories").filter(
1438
+ const categories = _chunk5LEAXRHVjs.arrayField.call(void 0, tool, "categories").filter(
1372
1439
  (v) => typeof v === "string"
1373
1440
  );
1374
1441
  if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
@@ -1388,31 +1455,31 @@ function printMonitorTypeContract(tool, requestedToolId) {
1388
1455
  console.log(`More: deepline describe ${toolId}`);
1389
1456
  }
1390
1457
  function toolGuidanceLines(guidance) {
1391
- const record = _chunkZ2GUFYT6js.isRecord.call(void 0, guidance) ? guidance : {};
1392
- const toolGuidance = _chunkZ2GUFYT6js.stringField.call(void 0, record, "tool");
1393
- const providerGuidance = _chunkZ2GUFYT6js.stringField.call(void 0, record, "provider");
1458
+ const record = _chunk5LEAXRHVjs.isRecord.call(void 0, guidance) ? guidance : {};
1459
+ const toolGuidance = _chunk5LEAXRHVjs.stringField.call(void 0, record, "tool");
1460
+ const providerGuidance = _chunk5LEAXRHVjs.stringField.call(void 0, record, "provider");
1394
1461
  return [
1395
1462
  ...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
1396
1463
  ...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
1397
1464
  ];
1398
1465
  }
1399
1466
  function printCompactToolContract(tool, requestedToolId) {
1400
- if (_chunkZ2GUFYT6js.isMonitorTypeTool.call(void 0, tool)) {
1467
+ if (_chunk5LEAXRHVjs.isMonitorTypeTool.call(void 0, tool)) {
1401
1468
  printMonitorTypeContract(tool, requestedToolId);
1402
1469
  return;
1403
1470
  }
1404
- const contract = _chunkZ2GUFYT6js.toolContractJsonForDescribe.call(void 0,
1471
+ const contract = _chunk5LEAXRHVjs.toolContractJsonForDescribe.call(void 0,
1405
1472
  tool,
1406
1473
  requestedToolId,
1407
1474
  void 0,
1408
1475
  seedToolListScript
1409
1476
  );
1410
- const cost = _chunkZ2GUFYT6js.isRecord.call(void 0, contract.cost) ? contract.cost : {};
1411
- const getters = _chunkZ2GUFYT6js.isRecord.call(void 0, contract.getters) ? contract.getters : {};
1477
+ const cost = _chunk5LEAXRHVjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
1478
+ const getters = _chunk5LEAXRHVjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
1412
1479
  const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
1413
1480
  const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
1414
- const inputFields = _chunkZ2GUFYT6js.recursiveToolInputFieldsForDisplay.call(void 0,
1415
- _chunkZ2GUFYT6js.recordField.call(void 0, contract, "inputSchema")
1481
+ const inputFields = _chunk5LEAXRHVjs.recursiveToolInputFieldsForDisplay.call(void 0,
1482
+ _chunk5LEAXRHVjs.recordField.call(void 0, contract, "inputSchema")
1416
1483
  );
1417
1484
  console.log(String(contract.toolId));
1418
1485
  if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
@@ -1429,9 +1496,9 @@ function printCompactToolContract(tool, requestedToolId) {
1429
1496
  printToolOutputArrayShape(contract);
1430
1497
  printToolExecutionHints(contract);
1431
1498
  if (contract.deprecated === true) {
1432
- const deprecation = _chunkZ2GUFYT6js.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
1433
- const message = _chunkZ2GUFYT6js.stringField.call(void 0, deprecation, "message");
1434
- const replacementToolId = _chunkZ2GUFYT6js.stringField.call(void 0,
1499
+ const deprecation = _chunk5LEAXRHVjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
1500
+ const message = _chunk5LEAXRHVjs.stringField.call(void 0, deprecation, "message");
1501
+ const replacementToolId = _chunk5LEAXRHVjs.stringField.call(void 0,
1435
1502
  deprecation,
1436
1503
  "replacementToolId",
1437
1504
  "replacement_tool_id"
@@ -1441,9 +1508,7 @@ function printCompactToolContract(tool, requestedToolId) {
1441
1508
  );
1442
1509
  if (message) console.log(`Migration: ${message}`);
1443
1510
  if (replacementToolId) {
1444
- console.log(
1445
- `Use: deepline tools execute ${replacementToolId} --input '{...}'`
1446
- );
1511
+ console.log(`Use: deepline run ${replacementToolId} --input '{...}'`);
1447
1512
  }
1448
1513
  console.log("");
1449
1514
  console.log(
@@ -1456,12 +1521,12 @@ function printCompactToolContract(tool, requestedToolId) {
1456
1521
  console.log("");
1457
1522
  console.log("Inputs:");
1458
1523
  for (const field of inputFields) {
1459
- if (!_chunkZ2GUFYT6js.isRecord.call(void 0, field)) continue;
1460
- const name = _chunkZ2GUFYT6js.stringField.call(void 0, field, "name");
1524
+ if (!_chunk5LEAXRHVjs.isRecord.call(void 0, field)) continue;
1525
+ const name = _chunk5LEAXRHVjs.stringField.call(void 0, field, "name");
1461
1526
  if (!name) continue;
1462
1527
  const required = field.required ? "*" : "";
1463
- const type = _chunkZ2GUFYT6js.stringField.call(void 0, field, "type") || "unknown";
1464
- const description = _chunkZ2GUFYT6js.stringField.call(void 0, field, "description");
1528
+ const type = _chunk5LEAXRHVjs.stringField.call(void 0, field, "type") || "unknown";
1529
+ const description = _chunk5LEAXRHVjs.stringField.call(void 0, field, "description");
1465
1530
  const enumValues = Array.isArray(field.enum) ? field.enum : [];
1466
1531
  const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
1467
1532
  const itemBoundsSuffix = arrayItemBoundsSuffix(field);
@@ -1476,8 +1541,8 @@ function printCompactToolContract(tool, requestedToolId) {
1476
1541
  }
1477
1542
  console.log("");
1478
1543
  printToolExamplesOnly(tool, requestedToolId);
1479
- const starterScript = _chunkZ2GUFYT6js.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
1480
- const starterPath = _chunkZ2GUFYT6js.stringField.call(void 0, starterScript, "path");
1544
+ const starterScript = _chunk5LEAXRHVjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
1545
+ const starterPath = _chunk5LEAXRHVjs.stringField.call(void 0, starterScript, "path");
1481
1546
  if (starterPath) {
1482
1547
  console.log("");
1483
1548
  console.log(`Starter script: ${starterPath}`);
@@ -1488,16 +1553,16 @@ function printCompactToolContract(tool, requestedToolId) {
1488
1553
  console.log("Getters:");
1489
1554
  if (listGetters.length) console.log(listGetterHeading());
1490
1555
  for (const entry of listGetters) {
1491
- if (_chunkZ2GUFYT6js.isRecord.call(void 0, entry))
1556
+ if (_chunk5LEAXRHVjs.isRecord.call(void 0, entry))
1492
1557
  console.log(
1493
- `- ${_chunkZ2GUFYT6js.stringField.call(void 0, entry, "name")}: ${_chunkZ2GUFYT6js.playResultExpression.call(void 0, entry)}`
1558
+ `- ${_chunk5LEAXRHVjs.stringField.call(void 0, entry, "name")}: ${_chunk5LEAXRHVjs.playResultExpression.call(void 0, entry)}`
1494
1559
  );
1495
1560
  }
1496
1561
  if (valueGetters.length) console.log("Values:");
1497
1562
  for (const entry of valueGetters) {
1498
- if (_chunkZ2GUFYT6js.isRecord.call(void 0, entry))
1563
+ if (_chunk5LEAXRHVjs.isRecord.call(void 0, entry))
1499
1564
  console.log(
1500
- `- ${_chunkZ2GUFYT6js.stringField.call(void 0, entry, "name")}: ${_chunkZ2GUFYT6js.playResultExpression.call(void 0, entry)}`
1565
+ `- ${_chunk5LEAXRHVjs.stringField.call(void 0, entry, "name")}: ${_chunk5LEAXRHVjs.playResultExpression.call(void 0, entry)}`
1501
1566
  );
1502
1567
  }
1503
1568
  }
@@ -1508,19 +1573,19 @@ function printCompactToolContract(tool, requestedToolId) {
1508
1573
  console.log(`More: deepline describe ${contract.toolId}`);
1509
1574
  }
1510
1575
  function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
1511
- if (_chunkZ2GUFYT6js.isMonitorTypeTool.call(void 0, tool)) {
1576
+ if (_chunk5LEAXRHVjs.isMonitorTypeTool.call(void 0, tool)) {
1512
1577
  return monitorTypePricingLines(tool);
1513
1578
  }
1514
1579
  const toolId = String(tool.toolId || requestedToolId);
1515
1580
  const cost = _chunkZM2YPJQJjs.Capability.fromCatalogEntry(tool).describe().customerCost();
1516
- const pricingModel = _chunkZ2GUFYT6js.stringField.call(void 0, cost, "pricingModel") || "unknown";
1517
- const billing = _chunkZ2GUFYT6js.stringField.call(void 0, cost, "billingSourceLabel") || _chunkZ2GUFYT6js.stringField.call(void 0, cost, "billingSource") || _chunkZ2GUFYT6js.stringField.call(void 0, cost, "billingMode") || "unknown";
1518
- const explicitUnit = _chunkZ2GUFYT6js.stringField.call(void 0, cost, "unit");
1581
+ const pricingModel = _chunk5LEAXRHVjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
1582
+ const billing = _chunk5LEAXRHVjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunk5LEAXRHVjs.stringField.call(void 0, cost, "billingSource") || _chunk5LEAXRHVjs.stringField.call(void 0, cost, "billingMode") || "unknown";
1583
+ const explicitUnit = _chunk5LEAXRHVjs.stringField.call(void 0, cost, "unit");
1519
1584
  const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
1520
1585
  const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
1521
1586
  const usd = numberField(cost, "deeplineUsdPerPricingUnit");
1522
- const displayText = _chunkZ2GUFYT6js.stringField.call(void 0, cost, "displayText");
1523
- const summary = _chunkZ2GUFYT6js.stringField.call(void 0, cost, "summary");
1587
+ const displayText = _chunk5LEAXRHVjs.stringField.call(void 0, cost, "displayText");
1588
+ const summary = _chunk5LEAXRHVjs.stringField.call(void 0, cost, "summary");
1524
1589
  const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
1525
1590
  return [
1526
1591
  `${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
@@ -1537,19 +1602,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
1537
1602
  console.log(line);
1538
1603
  }
1539
1604
  function printToolSchemaOnly(tool, requestedToolId) {
1540
- if (_chunkZ2GUFYT6js.isMonitorTypeTool.call(void 0, tool)) {
1605
+ if (_chunk5LEAXRHVjs.isMonitorTypeTool.call(void 0, tool)) {
1541
1606
  printMonitorTypeFilters(tool);
1542
1607
  printMonitorTypeStreams(tool);
1543
1608
  return;
1544
1609
  }
1545
- const contract = _chunkZ2GUFYT6js.toolContractJsonForDescribe.call(void 0,
1610
+ const contract = _chunk5LEAXRHVjs.toolContractJsonForDescribe.call(void 0,
1546
1611
  tool,
1547
1612
  requestedToolId,
1548
1613
  void 0,
1549
1614
  seedToolListScript
1550
1615
  );
1551
- const inputFields = _chunkZ2GUFYT6js.recursiveToolInputFieldsForDisplay.call(void 0,
1552
- _chunkZ2GUFYT6js.recordField.call(void 0, contract, "inputSchema")
1616
+ const inputFields = _chunk5LEAXRHVjs.recursiveToolInputFieldsForDisplay.call(void 0,
1617
+ _chunk5LEAXRHVjs.recordField.call(void 0, contract, "inputSchema")
1553
1618
  );
1554
1619
  console.log(`Schema: ${contract.toolId}`);
1555
1620
  if (!inputFields.length) {
@@ -1576,27 +1641,27 @@ function printToolSchemaOnly(tool, requestedToolId) {
1576
1641
  }
1577
1642
  printToolOutputArrayShape(contract);
1578
1643
  const declaredSchema = declaredToolJsonSchema(
1579
- _chunkZ2GUFYT6js.recordField.call(void 0, contract, "inputSchema")
1644
+ _chunk5LEAXRHVjs.recordField.call(void 0, contract, "inputSchema")
1580
1645
  );
1581
1646
  if (declaredSchema) {
1582
1647
  console.log("Declared input JSON Schema:");
1583
1648
  console.log(JSON.stringify(declaredSchema, null, 2));
1584
1649
  }
1585
- if (_chunkZ2GUFYT6js.isRecord.call(void 0, contract.responseSchema)) {
1650
+ if (_chunk5LEAXRHVjs.isRecord.call(void 0, contract.responseSchema)) {
1586
1651
  console.log("Deepline execution response JSON Schema:");
1587
1652
  console.log(JSON.stringify(contract.responseSchema, null, 2));
1588
1653
  }
1589
1654
  }
1590
1655
  function printToolExamplesOnly(tool, requestedToolId) {
1591
- if (_chunkZ2GUFYT6js.isMonitorTypeTool.call(void 0, tool)) {
1656
+ if (_chunk5LEAXRHVjs.isMonitorTypeTool.call(void 0, tool)) {
1592
1657
  printMonitorTypeDeploy(tool);
1593
1658
  return;
1594
1659
  }
1595
- if (_chunkZ2GUFYT6js.isPlayLikeTool.call(void 0, tool)) {
1660
+ if (_chunk5LEAXRHVjs.isPlayLikeTool.call(void 0, tool)) {
1596
1661
  printPlayLikeToolUsage(tool, requestedToolId);
1597
1662
  return;
1598
1663
  }
1599
- const contract = _chunkZ2GUFYT6js.toolContractJsonForDescribe.call(void 0,
1664
+ const contract = _chunk5LEAXRHVjs.toolContractJsonForDescribe.call(void 0,
1600
1665
  tool,
1601
1666
  requestedToolId,
1602
1667
  void 0,
@@ -1604,9 +1669,9 @@ function printToolExamplesOnly(tool, requestedToolId) {
1604
1669
  );
1605
1670
  const toolId = String(contract.toolId);
1606
1671
  const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
1607
- const examples = _chunkZ2GUFYT6js.arrayField.call(void 0, tool, "examples").filter(_chunkZ2GUFYT6js.isRecord);
1672
+ const examples = _chunk5LEAXRHVjs.arrayField.call(void 0, tool, "examples").filter(_chunk5LEAXRHVjs.isRecord);
1608
1673
  const firstExample = examples[0];
1609
- const sampleInput = firstExample && _chunkZ2GUFYT6js.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunkZ2GUFYT6js.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunkZ2GUFYT6js.samplePayloadForInputFields.call(void 0, inputFields)));
1674
+ const sampleInput = firstExample && _chunk5LEAXRHVjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunk5LEAXRHVjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunk5LEAXRHVjs.samplePayloadForInputFields.call(void 0, inputFields)));
1610
1675
  console.log("Example input payload:");
1611
1676
  console.log(JSON.stringify(sampleInput, null, 2));
1612
1677
  console.log(`Use in a play:`);
@@ -1620,32 +1685,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
1620
1685
  );
1621
1686
  console.log("});");
1622
1687
  console.log("const response = result.toolResponse.rawV2;");
1623
- const getters = _chunkZ2GUFYT6js.isRecord.call(void 0, contract.getters) ? contract.getters : {};
1688
+ const getters = _chunk5LEAXRHVjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
1624
1689
  const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
1625
1690
  const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
1626
- const firstGetter = valueGetters.find(_chunkZ2GUFYT6js.isRecord);
1691
+ const firstGetter = valueGetters.find(_chunk5LEAXRHVjs.isRecord);
1627
1692
  if (firstGetter) {
1628
- const name = _chunkZ2GUFYT6js.stringField.call(void 0, firstGetter, "name") || "value";
1629
- const expression = _chunkZ2GUFYT6js.stringField.call(void 0, firstGetter, "expression");
1693
+ const name = _chunk5LEAXRHVjs.stringField.call(void 0, firstGetter, "name") || "value";
1694
+ const expression = _chunk5LEAXRHVjs.stringField.call(void 0, firstGetter, "expression");
1630
1695
  if (expression)
1631
1696
  console.log(
1632
1697
  `const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
1633
1698
  );
1634
1699
  }
1635
1700
  const arrayNames = new Set(
1636
- _chunkZ2GUFYT6js.recursiveToolInputFieldsForDisplay.call(void 0,
1637
- _chunkZ2GUFYT6js.recordField.call(void 0, tool, "outputSchema", "output_schema")
1701
+ _chunk5LEAXRHVjs.recursiveToolInputFieldsForDisplay.call(void 0,
1702
+ _chunk5LEAXRHVjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
1638
1703
  ).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
1639
1704
  );
1640
1705
  const firstList = _nullishCoalesce(listGetters.find(
1641
- (entry) => _chunkZ2GUFYT6js.isRecord.call(void 0, entry) && arrayNames.has(_chunkZ2GUFYT6js.stringField.call(void 0, entry, "name"))
1642
- ), () => ( listGetters.find(_chunkZ2GUFYT6js.isRecord)));
1643
- if (_chunkZ2GUFYT6js.isRecord.call(void 0, firstList)) {
1644
- const name = safeIdentifier(_chunkZ2GUFYT6js.stringField.call(void 0, firstList, "name") || "list");
1706
+ (entry) => _chunk5LEAXRHVjs.isRecord.call(void 0, entry) && arrayNames.has(_chunk5LEAXRHVjs.stringField.call(void 0, entry, "name"))
1707
+ ), () => ( listGetters.find(_chunk5LEAXRHVjs.isRecord)));
1708
+ if (_chunk5LEAXRHVjs.isRecord.call(void 0, firstList)) {
1709
+ const name = safeIdentifier(_chunk5LEAXRHVjs.stringField.call(void 0, firstList, "name") || "list");
1645
1710
  if (_chunkJ33TSWO5js.playToolListGetterMode.call(void 0, ) === "array") {
1646
- console.log(`const ${name}_rows = ${_chunkZ2GUFYT6js.playResultExpression.call(void 0, firstList)};`);
1711
+ console.log(`const ${name}_rows = ${_chunk5LEAXRHVjs.playResultExpression.call(void 0, firstList)};`);
1647
1712
  } else {
1648
- console.log(`const ${name}_ds = ${_chunkZ2GUFYT6js.playResultExpression.call(void 0, firstList)};`);
1713
+ console.log(`const ${name}_ds = ${_chunk5LEAXRHVjs.playResultExpression.call(void 0, firstList)};`);
1649
1714
  console.log(
1650
1715
  "// Complete small list from this response; throws above the memory cap."
1651
1716
  );
@@ -1655,7 +1720,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
1655
1720
  console.log("```");
1656
1721
  if (firstList) printListGetterConsumption();
1657
1722
  for (const example of examples) {
1658
- const description = _chunkZ2GUFYT6js.stringField.call(void 0, example, "description");
1723
+ const description = _chunk5LEAXRHVjs.stringField.call(void 0, example, "description");
1659
1724
  if (description) console.log(description);
1660
1725
  console.log("Example Deepline execution response:");
1661
1726
  console.log(JSON.stringify(example.response, null, 2));
@@ -1670,14 +1735,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
1670
1735
  }
1671
1736
  function printPlayLikeToolUsage(tool, requestedToolId) {
1672
1737
  const toolId = String(tool.toolId || requestedToolId);
1673
- const inputFields = _chunkZ2GUFYT6js.toolInputFieldsForDisplay.call(void 0,
1674
- _chunkZ2GUFYT6js.recordField.call(void 0, tool, "inputSchema", "input_schema")
1738
+ const inputFields = _chunk5LEAXRHVjs.toolInputFieldsForDisplay.call(void 0,
1739
+ _chunk5LEAXRHVjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
1675
1740
  );
1676
- const sampleInput = _chunkZ2GUFYT6js.samplePayloadForInputFields.call(void 0, inputFields);
1677
- const playReference = _chunkZ2GUFYT6js.playReferenceForTool.call(void 0, tool);
1741
+ const sampleInput = _chunk5LEAXRHVjs.samplePayloadForInputFields.call(void 0, inputFields);
1742
+ const playReference = _chunk5LEAXRHVjs.playReferenceForTool.call(void 0, tool);
1678
1743
  console.log("Run as a play:");
1679
1744
  console.log(
1680
- _chunkZ2GUFYT6js.playRunCommandForTool.call(void 0,
1745
+ _chunk5LEAXRHVjs.playRunCommandForTool.call(void 0,
1681
1746
  tool,
1682
1747
  toolId,
1683
1748
  Object.keys(sampleInput).length ? sampleInput : void 0
@@ -1688,13 +1753,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
1688
1753
  }
1689
1754
  }
1690
1755
  function printToolGettersOnly(tool, requestedToolId) {
1691
- const contract = _chunkZ2GUFYT6js.toolContractJsonForDescribe.call(void 0,
1756
+ const contract = _chunk5LEAXRHVjs.toolContractJsonForDescribe.call(void 0,
1692
1757
  tool,
1693
1758
  requestedToolId,
1694
1759
  void 0,
1695
1760
  seedToolListScript
1696
1761
  );
1697
- const getters = _chunkZ2GUFYT6js.isRecord.call(void 0, contract.getters) ? contract.getters : {};
1762
+ const getters = _chunk5LEAXRHVjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
1698
1763
  const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
1699
1764
  const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
1700
1765
  console.log(`Getters: ${contract.toolId}`);
@@ -1705,9 +1770,9 @@ function printToolGettersOnly(tool, requestedToolId) {
1705
1770
  if (listGetters.length) {
1706
1771
  console.log(listGetterHeading());
1707
1772
  for (const entry of listGetters) {
1708
- if (_chunkZ2GUFYT6js.isRecord.call(void 0, entry))
1773
+ if (_chunk5LEAXRHVjs.isRecord.call(void 0, entry))
1709
1774
  console.log(
1710
- `- ${_chunkZ2GUFYT6js.stringField.call(void 0, entry, "name")}: ${_chunkZ2GUFYT6js.playResultExpression.call(void 0, entry)}`
1775
+ `- ${_chunk5LEAXRHVjs.stringField.call(void 0, entry, "name")}: ${_chunk5LEAXRHVjs.playResultExpression.call(void 0, entry)}`
1711
1776
  );
1712
1777
  }
1713
1778
  printListGetterConsumption();
@@ -1715,9 +1780,9 @@ function printToolGettersOnly(tool, requestedToolId) {
1715
1780
  if (valueGetters.length) {
1716
1781
  console.log("Values:");
1717
1782
  for (const entry of valueGetters) {
1718
- if (_chunkZ2GUFYT6js.isRecord.call(void 0, entry))
1783
+ if (_chunk5LEAXRHVjs.isRecord.call(void 0, entry))
1719
1784
  console.log(
1720
- `- ${_chunkZ2GUFYT6js.stringField.call(void 0, entry, "name")}: ${_chunkZ2GUFYT6js.playResultExpression.call(void 0, entry)}`
1785
+ `- ${_chunk5LEAXRHVjs.stringField.call(void 0, entry, "name")}: ${_chunk5LEAXRHVjs.playResultExpression.call(void 0, entry)}`
1721
1786
  );
1722
1787
  }
1723
1788
  }
@@ -1755,22 +1820,22 @@ function listedToolDescription(tool) {
1755
1820
  }
1756
1821
  function formatListedToolCost(tool) {
1757
1822
  const record = tool;
1758
- if (_chunkZ2GUFYT6js.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
1823
+ if (_chunk5LEAXRHVjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
1759
1824
  return "Cost: Free";
1760
1825
  }
1761
- const pricing = _chunkZ2GUFYT6js.recordField.call(void 0, record, "pricing");
1762
- const displayText = _chunkZ2GUFYT6js.stringField.call(void 0, pricing, "displayText", "display_text");
1826
+ const pricing = _chunk5LEAXRHVjs.recordField.call(void 0, record, "pricing");
1827
+ const displayText = _chunk5LEAXRHVjs.stringField.call(void 0, pricing, "displayText", "display_text");
1763
1828
  return displayText ? `Cost: ${displayText}` : "";
1764
1829
  }
1765
1830
  function printToolOutputArrayShape(tool) {
1766
- const outputFields = _chunkZ2GUFYT6js.toolOutputFieldsForDisplay.call(void 0,
1767
- _chunkZ2GUFYT6js.recordField.call(void 0, _chunkZ2GUFYT6js.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
1831
+ const outputFields = _chunk5LEAXRHVjs.toolOutputFieldsForDisplay.call(void 0,
1832
+ _chunk5LEAXRHVjs.recordField.call(void 0, _chunk5LEAXRHVjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
1768
1833
  );
1769
1834
  if (outputFields.length === 0) return;
1770
1835
  console.log(" Output array shape (declared schema):");
1771
1836
  for (const field of outputFields.slice(0, 60)) {
1772
1837
  const name = String(field.name);
1773
- const type = _chunkZ2GUFYT6js.stringField.call(void 0, field, "type") || "unknown";
1838
+ const type = _chunk5LEAXRHVjs.stringField.call(void 0, field, "type") || "unknown";
1774
1839
  const itemBounds = arrayItemBoundsSuffix(field);
1775
1840
  console.log(` - ${name}: ${type}${itemBounds}`);
1776
1841
  }
@@ -1779,14 +1844,14 @@ function printToolOutputArrayShape(tool) {
1779
1844
  }
1780
1845
  }
1781
1846
  function declaredToolJsonSchema(inputSchema) {
1782
- if (_chunkZ2GUFYT6js.isRecord.call(void 0, inputSchema.jsonSchema)) {
1847
+ if (_chunk5LEAXRHVjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
1783
1848
  return inputSchema.jsonSchema;
1784
1849
  }
1785
1850
  return Array.isArray(inputSchema.fields) ? null : inputSchema;
1786
1851
  }
1787
1852
  function arrayItemBoundsSuffix(field) {
1788
- const itemSchema = _chunkZ2GUFYT6js.isRecord.call(void 0, field.items) ? field.items : null;
1789
- const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunkZ2GUFYT6js.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
1853
+ const itemSchema = _chunk5LEAXRHVjs.isRecord.call(void 0, field.items) ? field.items : null;
1854
+ const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunk5LEAXRHVjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
1790
1855
  const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _14 => _14.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
1791
1856
  const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
1792
1857
  const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
@@ -1799,21 +1864,21 @@ function arrayItemBoundsSuffix(field) {
1799
1864
  return itemTypeSuffix;
1800
1865
  }
1801
1866
  function printToolExecutionHints(value) {
1802
- const batchCapabilityRecord = _chunkZ2GUFYT6js.recordField.call(void 0,
1803
- _chunkZ2GUFYT6js.isRecord.call(void 0, value) ? value : {},
1867
+ const batchCapabilityRecord = _chunk5LEAXRHVjs.recordField.call(void 0,
1868
+ _chunk5LEAXRHVjs.isRecord.call(void 0, value) ? value : {},
1804
1869
  "batchCapability",
1805
1870
  "batch_capability"
1806
1871
  );
1807
1872
  const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
1808
- const executionMetadata = _chunkZ2GUFYT6js.recordField.call(void 0,
1809
- _chunkZ2GUFYT6js.isRecord.call(void 0, value) ? value : {},
1873
+ const executionMetadata = _chunk5LEAXRHVjs.recordField.call(void 0,
1874
+ _chunk5LEAXRHVjs.isRecord.call(void 0, value) ? value : {},
1810
1875
  "executionMetadata",
1811
1876
  "execution_metadata"
1812
1877
  );
1813
1878
  if (batchCapability) {
1814
- const status = _chunkZ2GUFYT6js.stringField.call(void 0, batchCapability, "status") || "unknown";
1815
- const surface = _chunkZ2GUFYT6js.stringField.call(void 0, batchCapability, "surface");
1816
- const operation = _chunkZ2GUFYT6js.stringField.call(void 0,
1879
+ const status = _chunk5LEAXRHVjs.stringField.call(void 0, batchCapability, "status") || "unknown";
1880
+ const surface = _chunk5LEAXRHVjs.stringField.call(void 0, batchCapability, "surface");
1881
+ const operation = _chunk5LEAXRHVjs.stringField.call(void 0,
1817
1882
  batchCapability,
1818
1883
  "batchOperation",
1819
1884
  "batch_operation"
@@ -1823,7 +1888,7 @@ function printToolExecutionHints(value) {
1823
1888
  "maxBatchSize",
1824
1889
  "max_batch_size"
1825
1890
  );
1826
- const notes = _chunkZ2GUFYT6js.stringField.call(void 0, batchCapability, "notes");
1891
+ const notes = _chunk5LEAXRHVjs.stringField.call(void 0, batchCapability, "notes");
1827
1892
  console.log("");
1828
1893
  console.log("Batching:");
1829
1894
  console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
@@ -1833,7 +1898,7 @@ function printToolExecutionHints(value) {
1833
1898
  }
1834
1899
  if (status === "compiled") {
1835
1900
  console.log(
1836
- "- Compatible per-row Play calls can coalesce; separate tools execute requests do not coalesce."
1901
+ "- Compatible per-row Play calls can coalesce; each separate deepline run call makes its own request."
1837
1902
  );
1838
1903
  } else if (surface !== "docs") {
1839
1904
  console.log(
@@ -1842,11 +1907,11 @@ function printToolExecutionHints(value) {
1842
1907
  }
1843
1908
  if (notes) console.log(`- Details: ${notes}`);
1844
1909
  }
1845
- const configuredRateLimits = _chunkZ2GUFYT6js.arrayField.call(void 0,
1910
+ const configuredRateLimits = _chunk5LEAXRHVjs.arrayField.call(void 0,
1846
1911
  executionMetadata,
1847
1912
  "configuredRateLimits",
1848
1913
  "configured_rate_limits"
1849
- ).filter(_chunkZ2GUFYT6js.isRecord);
1914
+ ).filter(_chunk5LEAXRHVjs.isRecord);
1850
1915
  if (configuredRateLimits.length > 0) {
1851
1916
  console.log("");
1852
1917
  console.log(
@@ -1856,7 +1921,7 @@ function printToolExecutionHints(value) {
1856
1921
  const requests = numberField(limit, "requestsPerWindow");
1857
1922
  const windowMs = numberField(limit, "windowMs");
1858
1923
  if (requests === null || windowMs === null) continue;
1859
- const usage = _chunkZ2GUFYT6js.stringField.call(void 0, limit, "usage") || "unknown";
1924
+ const usage = _chunk5LEAXRHVjs.stringField.call(void 0, limit, "usage") || "unknown";
1860
1925
  const usageText = usage === "queue_hint" ? "queue hint" : usage === "enforced" ? "Deepline enforced" : usage === "queue_hint_and_enforced" ? "queue hint and Deepline enforced" : usage === "disabled" ? "disabled" : usage;
1861
1926
  const explicitMaxConcurrency = numberField(
1862
1927
  limit,
@@ -1865,11 +1930,11 @@ function printToolExecutionHints(value) {
1865
1930
  );
1866
1931
  const concurrencyText = explicitMaxConcurrency === null ? "no explicit concurrency limit" : `explicit concurrency limit ${explicitMaxConcurrency}`;
1867
1932
  console.log(
1868
- `- ${requests} requests per ${formatRateWindow(windowMs)}${_chunkZ2XUZC34js.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
1933
+ `- ${requests} requests per ${formatRateWindow(windowMs)}${_chunkIAYSWZDJjs.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
1869
1934
  );
1870
1935
  }
1871
1936
  }
1872
- const queueHint = _chunkZ2GUFYT6js.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
1937
+ const queueHint = _chunk5LEAXRHVjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
1873
1938
  const requestsPerSecondHint = numberField(
1874
1939
  queueHint,
1875
1940
  "requestsPerSecondHint",
@@ -1895,25 +1960,25 @@ function formatRateWindow(windowMs) {
1895
1960
  }
1896
1961
  function samplePayload(samples, key) {
1897
1962
  const entry = samples[key];
1898
- if (!_chunkZ2GUFYT6js.isRecord.call(void 0, entry)) return void 0;
1963
+ if (!_chunk5LEAXRHVjs.isRecord.call(void 0, entry)) return void 0;
1899
1964
  return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
1900
1965
  }
1901
1966
  function commandEnvelopeFromRawResponse(rawResponse) {
1902
- return _chunkZ2GUFYT6js.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
1967
+ return _chunk5LEAXRHVjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
1903
1968
  }
1904
1969
  function toolExecuteExitCode(envelope) {
1905
1970
  return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
1906
1971
  }
1907
1972
  function extractToolExecutionWarningMessages(rawResponse) {
1908
- if (!_chunkZ2GUFYT6js.isRecord.call(void 0, rawResponse)) return [];
1973
+ if (!_chunk5LEAXRHVjs.isRecord.call(void 0, rawResponse)) return [];
1909
1974
  const candidates = [
1910
- _chunkZ2GUFYT6js.recordField.call(void 0, _chunkZ2GUFYT6js.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
1911
- _chunkZ2GUFYT6js.recordField.call(void 0,
1912
- _chunkZ2GUFYT6js.recordField.call(void 0, _chunkZ2GUFYT6js.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
1975
+ _chunk5LEAXRHVjs.recordField.call(void 0, _chunk5LEAXRHVjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
1976
+ _chunk5LEAXRHVjs.recordField.call(void 0,
1977
+ _chunk5LEAXRHVjs.recordField.call(void 0, _chunk5LEAXRHVjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
1913
1978
  "meta"
1914
1979
  ),
1915
- _chunkZ2GUFYT6js.recordField.call(void 0, rawResponse, "meta"),
1916
- _chunkZ2GUFYT6js.recordField.call(void 0, _chunkZ2GUFYT6js.recordField.call(void 0, rawResponse, "result"), "meta")
1980
+ _chunk5LEAXRHVjs.recordField.call(void 0, rawResponse, "meta"),
1981
+ _chunk5LEAXRHVjs.recordField.call(void 0, _chunk5LEAXRHVjs.recordField.call(void 0, rawResponse, "result"), "meta")
1917
1982
  ];
1918
1983
  const messages = [];
1919
1984
  for (const candidate of candidates) {
@@ -1922,8 +1987,8 @@ function extractToolExecutionWarningMessages(rawResponse) {
1922
1987
  for (const warning of warnings) {
1923
1988
  if (typeof warning === "string" && warning.trim()) {
1924
1989
  messages.push(warning.trim());
1925
- } else if (_chunkZ2GUFYT6js.isRecord.call(void 0, warning)) {
1926
- const message = _chunkZ2GUFYT6js.stringField.call(void 0, warning, "message");
1990
+ } else if (_chunk5LEAXRHVjs.isRecord.call(void 0, warning)) {
1991
+ const message = _chunk5LEAXRHVjs.stringField.call(void 0, warning, "message");
1927
1992
  if (message) messages.push(message);
1928
1993
  }
1929
1994
  }
@@ -1931,30 +1996,30 @@ function extractToolExecutionWarningMessages(rawResponse) {
1931
1996
  return [...new Set(messages)];
1932
1997
  }
1933
1998
  function apifySyncRecoveryNext(rawResponse) {
1934
- if (!_chunkZ2GUFYT6js.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
1935
- const toolResponse = _chunkZ2GUFYT6js.recordField.call(void 0, rawResponse, "toolResponse");
1936
- const raw = _chunkZ2GUFYT6js.recordField.call(void 0, toolResponse, "raw");
1999
+ if (!_chunk5LEAXRHVjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
2000
+ const toolResponse = _chunk5LEAXRHVjs.recordField.call(void 0, rawResponse, "toolResponse");
2001
+ const raw = _chunk5LEAXRHVjs.recordField.call(void 0, toolResponse, "raw");
1937
2002
  if (raw.state !== "awaiting_apify") return null;
1938
- const next = _chunkZ2GUFYT6js.recordField.call(void 0, raw, "next");
1939
- const getActorRun = _chunkZ2GUFYT6js.recordField.call(void 0, next, "getActorRun");
1940
- const getActorRunTool = _chunkZ2GUFYT6js.stringField.call(void 0, getActorRun, "tool");
1941
- const getActorRunPayload = _chunkZ2GUFYT6js.recordField.call(void 0, getActorRun, "payload");
2003
+ const next = _chunk5LEAXRHVjs.recordField.call(void 0, raw, "next");
2004
+ const getActorRun = _chunk5LEAXRHVjs.recordField.call(void 0, next, "getActorRun");
2005
+ const getActorRunTool = _chunk5LEAXRHVjs.stringField.call(void 0, getActorRun, "tool");
2006
+ const getActorRunPayload = _chunk5LEAXRHVjs.recordField.call(void 0, getActorRun, "payload");
1942
2007
  if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
1943
2008
  return null;
1944
2009
  }
1945
- const getDatasetItems = _chunkZ2GUFYT6js.recordField.call(void 0, next, "getDatasetItems");
1946
- const getDatasetItemsTool = _chunkZ2GUFYT6js.stringField.call(void 0, getDatasetItems, "tool");
1947
- const getDatasetItemsPayload = _chunkZ2GUFYT6js.recordField.call(void 0, getDatasetItems, "payload");
2010
+ const getDatasetItems = _chunk5LEAXRHVjs.recordField.call(void 0, next, "getDatasetItems");
2011
+ const getDatasetItemsTool = _chunk5LEAXRHVjs.stringField.call(void 0, getDatasetItems, "tool");
2012
+ const getDatasetItemsPayload = _chunk5LEAXRHVjs.recordField.call(void 0, getDatasetItems, "payload");
1948
2013
  return {
1949
- getActorRun: `deepline tools execute ${getActorRunTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
2014
+ getActorRun: `deepline run ${getActorRunTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
1950
2015
  ...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
1951
- getDatasetItems: `deepline tools execute ${getDatasetItemsTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getDatasetItemsPayload))}`
2016
+ getDatasetItems: `deepline run ${getDatasetItemsTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getDatasetItemsPayload))}`
1952
2017
  } : {}
1953
2018
  };
1954
2019
  }
1955
2020
  function listExtractorPathsFromUsageGuidance(tool) {
1956
2021
  const toolExecutionResult = _optionalChain([tool, 'access', _16 => _16.usageGuidance, 'optionalAccess', _17 => _17.toolExecutionResult]);
1957
- const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists : _chunkZ2GUFYT6js.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _19 => _19.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
2022
+ const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists : _chunk5LEAXRHVjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _19 => _19.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
1958
2023
  return extractedLists.flatMap((entry) => {
1959
2024
  const paths = _nullishCoalesce(_optionalChain([entry, 'access', _20 => _20.details, 'optionalAccess', _21 => _21.candidatePaths]), () => ( _optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.rawToolOutputPaths])));
1960
2025
  if (!Array.isArray(paths)) return [];
@@ -2039,7 +2104,7 @@ function parseJsonObjectArgument(raw, flagName) {
2039
2104
  }
2040
2105
  throw invalidJsonError(flagName, message);
2041
2106
  }
2042
- if (!_chunkZ2GUFYT6js.isRecord.call(void 0, parsed)) {
2107
+ if (!_chunk5LEAXRHVjs.isRecord.call(void 0, parsed)) {
2043
2108
  throw invalidJsonError(flagName, "expected an object.");
2044
2109
  }
2045
2110
  return parsed;
@@ -2083,7 +2148,7 @@ function parseExecuteOptions(toolId, options, output) {
2083
2148
  outputFormat = normalizeOutputFormat(options.outputFormat);
2084
2149
  }
2085
2150
  if (options.idempotencyKey !== void 0) {
2086
- _chunkVTODQWQAjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
2151
+ _chunkBGTPIMSMjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
2087
2152
  }
2088
2153
  if (options.recoveryTimeoutMs !== void 0) {
2089
2154
  const parsed = Number(options.recoveryTimeoutMs);
@@ -2212,7 +2277,7 @@ function buildToolExecuteBaseEnvelope(input) {
2212
2277
  kind: summaryEntries.length > 0 ? "object" : "raw",
2213
2278
  summary: input.summary
2214
2279
  };
2215
- const envelopeHasCanonicalOutput = _chunkZ2GUFYT6js.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
2280
+ const envelopeHasCanonicalOutput = _chunk5LEAXRHVjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
2216
2281
  const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
2217
2282
  envelope,
2218
2283
  "output"
@@ -2240,7 +2305,7 @@ function buildToolExecuteBaseEnvelope(input) {
2240
2305
  return {
2241
2306
  ...envelope,
2242
2307
  ...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
2243
- ..._chunkZ2GUFYT6js.isRecord.call(void 0, input.rawResponse) && _chunkZ2GUFYT6js.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
2308
+ ..._chunk5LEAXRHVjs.isRecord.call(void 0, input.rawResponse) && _chunk5LEAXRHVjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
2244
2309
  ...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
2245
2310
  ...summaryEntries.length > 0 ? { summary: input.summary } : {},
2246
2311
  ...warningMessages.length > 0 ? { warnings: warningMessages } : {},
@@ -2301,7 +2366,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
2301
2366
  void _render;
2302
2367
  void _next;
2303
2368
  void _local;
2304
- const billingLookup = _chunkZ2GUFYT6js.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
2369
+ const billingLookup = _chunk5LEAXRHVjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
2305
2370
  const inspection = toolExecutionInspection(input);
2306
2371
  return {
2307
2372
  ...base,
@@ -2396,6 +2461,166 @@ function printToolExecutionWarnings(toolId, params, metadata) {
2396
2461
  console.error(`Warning: ${requestWarning.message}`);
2397
2462
  }
2398
2463
  }
2464
+ function valueAt(value, path) {
2465
+ return path.split(".").reduce((at, key) => _chunk5LEAXRHVjs.isRecord.call(void 0, at) ? at[key] : void 0, value);
2466
+ }
2467
+ function declaredOutputs(metadata, envelope, data) {
2468
+ const result = _optionalChain([metadata, 'access', _26 => _26.usageGuidance, 'optionalAccess', _27 => _27.toolExecutionResult]);
2469
+ const getters = ["extractedValues", "extractedLists"].flatMap(
2470
+ (kind) => {
2471
+ const group = _optionalChain([result, 'optionalAccess', _28 => _28[kind]]);
2472
+ return Array.isArray(group) ? group : _chunk5LEAXRHVjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
2473
+ name,
2474
+ ...getter
2475
+ })) : [];
2476
+ }
2477
+ );
2478
+ return getters.flatMap((getter) => {
2479
+ const paths = _nullishCoalesce(_nullishCoalesce(_optionalChain([getter, 'access', _29 => _29.details, 'optionalAccess', _30 => _30.rawToolOutputPaths]), () => ( _optionalChain([getter, 'access', _31 => _31.details, 'optionalAccess', _32 => _32.candidatePaths]))), () => ( []));
2480
+ for (const path of paths) {
2481
+ const value = valueAt(envelope, path);
2482
+ if (value === void 0) continue;
2483
+ const inFile = path.replace(/^toolResponse\.raw(V2)?\./, "");
2484
+ return [
2485
+ {
2486
+ name: getter.name,
2487
+ value,
2488
+ path: valueAt(data, inFile) === void 0 ? null : inFile
2489
+ }
2490
+ ];
2491
+ }
2492
+ return [];
2493
+ });
2494
+ }
2495
+ function writeToolReceipt(input) {
2496
+ const { response, metadata } = input;
2497
+ const envelope = _chunk5LEAXRHVjs.isRecord.call(void 0, response) ? response : {};
2498
+ const jobId = typeof envelope.job_id === "string" ? envelope.job_id : null;
2499
+ const toolResponse = _chunk5LEAXRHVjs.recordField.call(void 0, envelope, "toolResponse");
2500
+ const data = Object.hasOwn(toolResponse, "rawV2") ? toolResponse.rawV2 : Object.hasOwn(toolResponse, "raw") ? toolResponse.raw : Object.hasOwn(envelope, "output") ? envelope.output : Object.hasOwn(envelope, "result") ? envelope.result : response;
2501
+ const status = typeof envelope.status === "string" ? envelope.status : "completed";
2502
+ const charged = _chunk5LEAXRHVjs.recordField.call(void 0, envelope, "billing").credits_charged;
2503
+ _chunk7SWNPNMLjs.writeExecutionOutput.call(void 0,
2504
+ {
2505
+ id: _nullishCoalesce(input.key, () => ( jobId)),
2506
+ status,
2507
+ ...["queued", "running", "pending"].includes(status) ? {} : { data },
2508
+ error: _nullishCoalesce(envelope.error, () => ( null)),
2509
+ complete: null,
2510
+ declared: declaredOutputs(metadata, envelope, data),
2511
+ credits: typeof charged === "number" ? charged : null,
2512
+ warnings: [
2513
+ ..._nullishCoalesce(input.warnings, () => ( [])),
2514
+ ...extractToolExecutionWarningMessages(response)
2515
+ ],
2516
+ next: {
2517
+ ...apifySyncRecoveryNext(response),
2518
+ ...input.key ? { status: `deepline runs get ${input.key}` } : {},
2519
+ ...jobId ? {
2520
+ billing: `deepline billing usage --request-id ${_chunkAID3OYVJjs.shellQuote.call(void 0, jobId)} --json`
2521
+ } : {}
2522
+ }
2523
+ },
2524
+ input.output
2525
+ );
2526
+ return status === "failed" || envelope.error ? 1 : 0;
2527
+ }
2528
+ async function executeToolForReceipt(input) {
2529
+ const { toolId, params, output } = input;
2530
+ let key = null;
2531
+ let retryKey = null;
2532
+ let received = false;
2533
+ try {
2534
+ const cliInvocationId = _nullishCoalesce(_chunkGEGW5HPZjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkGEGW5HPZjs.beginToolExecuteCommand.call(void 0, )));
2535
+ const client = new (0, _chunkJF3TLIMQjs.DeeplineClient)();
2536
+ const metadata = await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })));
2537
+ printToolExecutionWarnings(toolId, params, metadata);
2538
+ const responseIntent = _optionalChain([output, 'access', _33 => _33.csvOut, 'optionalAccess', _34 => _34.length]) ? "row_artifact" : "raw";
2539
+ const recovery = ToolCallRecovery.open({
2540
+ toolId,
2541
+ params,
2542
+ responseIntent,
2543
+ recover: true,
2544
+ fresh: input.fresh
2545
+ });
2546
+ key = _nullishCoalesce(recovery.idempotencyKey, () => ( null));
2547
+ retryKey = recovery;
2548
+ const response = await client.executeTool(toolId, params, {
2549
+ responseIntent,
2550
+ ...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
2551
+ ..._optionalChain([metadata, 'access', _35 => _35.executionMetadata, 'optionalAccess', _36 => _36.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
2552
+ ...key ? { idempotencyKey: key } : {},
2553
+ searchRef: _chunkOPJAJBD4js.recentSearchRef.call(void 0, ),
2554
+ cliInvocationId,
2555
+ onResponseReceived: _chunk7SWNPNMLjs.recordApiResponse
2556
+ }).catch((error) => {
2557
+ const guidance = toolGuidanceLines(metadata.guidance);
2558
+ if (guidance.length)
2559
+ console.error([`Guidance for ${toolId}:`, ...guidance].join("\n"));
2560
+ throw error;
2561
+ });
2562
+ received = true;
2563
+ const code = writeToolReceipt({
2564
+ key,
2565
+ metadata,
2566
+ response,
2567
+ output,
2568
+ warnings: recovery.resumed ? [
2569
+ "Resumed an interrupted call with its saved retry key; it was not charged again. --fresh calls the provider again."
2570
+ ] : []
2571
+ });
2572
+ await recovery.acknowledgeDelivery();
2573
+ return code;
2574
+ } catch (error) {
2575
+ if (received) throw error;
2576
+ const outcomeKnown = answeredWithFailure(error);
2577
+ if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _37 => _37.discard, 'call', _38 => _38()]);
2578
+ _chunk7SWNPNMLjs.writeExecutionOutput.call(void 0,
2579
+ {
2580
+ id: outcomeKnown ? null : key,
2581
+ status: "failed",
2582
+ error: {
2583
+ message: error instanceof Error ? error.message : String(error),
2584
+ ...error instanceof _chunkDIAWYWT5js.DeeplineError ? { code: error.code } : {}
2585
+ },
2586
+ ...key && !outcomeKnown ? {
2587
+ next: {
2588
+ retry: "Run the same command again: it picks up this call without paying twice."
2589
+ }
2590
+ } : {}
2591
+ },
2592
+ output
2593
+ );
2594
+ return 1;
2595
+ }
2596
+ }
2597
+ function answeredWithFailure(error) {
2598
+ return error instanceof _chunkDIAWYWT5js.DeeplineError && typeof error.statusCode === "number" && error.statusCode < 500 && // A request timeout says nothing about whether the call went through.
2599
+ error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN";
2600
+ }
2601
+ async function getToolExecutionReceipt(key, output) {
2602
+ const client = new (0, _chunkJF3TLIMQjs.DeeplineClient)();
2603
+ const execution = await client.executions.getByKey(key);
2604
+ output.label = `${execution.toolId} (tool)`;
2605
+ if (execution.response === void 0) {
2606
+ _chunk7SWNPNMLjs.writeExecutionOutput.call(void 0,
2607
+ {
2608
+ id: key,
2609
+ status: execution.executionRecovery.state,
2610
+ next: { status: `deepline runs get ${key}` }
2611
+ },
2612
+ output
2613
+ );
2614
+ return 1;
2615
+ }
2616
+ const metadata = await client.getTool(execution.toolId);
2617
+ return writeToolReceipt({
2618
+ key,
2619
+ metadata,
2620
+ response: execution.response,
2621
+ output
2622
+ });
2623
+ }
2399
2624
  async function executeTool(toolId, options, compatibilityMetadata, deferCompatibility = false, maintenancePolicy = "configured") {
2400
2625
  const output = toolExecuteJsonOption(options.json);
2401
2626
  const wantsJson = (_nullishCoalesce(options.outputFormat, () => ( "auto"))).trim().toLowerCase() !== "csv";
@@ -2404,19 +2629,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2404
2629
  parsed = parseExecuteOptions(toolId, options, output);
2405
2630
  } catch (error) {
2406
2631
  if (wantsJson) {
2407
- _chunkBHGII2D6js.printJsonError.call(void 0, error);
2632
+ _chunk3ACMRZRVjs.printJsonError.call(void 0, error);
2408
2633
  } else {
2409
2634
  console.error(error instanceof Error ? error.message : String(error));
2410
2635
  }
2411
2636
  return error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
2412
2637
  }
2413
- const cliInvocationId = _nullishCoalesce(_chunkLMAULZLFjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkLMAULZLFjs.beginToolExecuteCommand.call(void 0, )));
2638
+ const cliInvocationId = _nullishCoalesce(_chunkGEGW5HPZjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkGEGW5HPZjs.beginToolExecuteCommand.call(void 0, )));
2414
2639
  const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
2415
- const tracing = _chunkRDPTDDKXjs.isCliTraceEnabled.call(void 0, );
2640
+ const tracing = _chunk7LFIMWMWjs.isCliTraceEnabled.call(void 0, );
2416
2641
  const clientStartedAt = tracing ? performance.now() : void 0;
2417
- const client = new (0, _chunkVTODQWQAjs.DeeplineClient)();
2642
+ const client = new (0, _chunkJF3TLIMQjs.DeeplineClient)();
2418
2643
  if (clientStartedAt !== void 0) {
2419
- _chunkRDPTDDKXjs.recordCliTrace.call(void 0, {
2644
+ _chunk7LFIMWMWjs.recordCliTrace.call(void 0, {
2420
2645
  phase: "cli.tool_execute_client_setup",
2421
2646
  ms: performance.now() - clientStartedAt
2422
2647
  });
@@ -2425,13 +2650,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2425
2650
  const readMetadata = async () => {
2426
2651
  if (metadata) return metadata;
2427
2652
  try {
2428
- metadata = await _chunkLMAULZLFjs.runToolExecuteStage.call(void 0,
2653
+ metadata = await _chunkGEGW5HPZjs.runToolExecuteStage.call(void 0,
2429
2654
  "tool metadata lookup",
2430
2655
  () => client.getTool(parsed.toolId, { cliInvocationId })
2431
2656
  );
2432
2657
  } catch (error) {
2433
2658
  if (isMissingToolMetadataError(error)) {
2434
- const play = await _chunkLMAULZLFjs.runToolExecuteStage.call(void 0,
2659
+ const play = await _chunkGEGW5HPZjs.runToolExecuteStage.call(void 0,
2435
2660
  "play alias lookup",
2436
2661
  () => findPlayForToolId(client, parsed.toolId, cliInvocationId)
2437
2662
  );
@@ -2445,7 +2670,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2445
2670
  }
2446
2671
  throw error;
2447
2672
  }
2448
- if (_chunkZ2GUFYT6js.isPlayLikeTool.call(void 0, metadata)) {
2673
+ if (_chunk5LEAXRHVjs.isPlayLikeTool.call(void 0, metadata)) {
2449
2674
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
2450
2675
  playLikeToolExecuteErrorMessage(
2451
2676
  parsed.toolId,
@@ -2465,12 +2690,12 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2465
2690
  } catch (e3) {
2466
2691
  }
2467
2692
  metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
2468
- if (!metadata && _optionalChain([preflightCompatibility, 'optionalAccess', _26 => _26.response, 'optionalAccess', _27 => _27.update_required]) !== true) {
2693
+ if (!metadata && _optionalChain([preflightCompatibility, 'optionalAccess', _39 => _39.response, 'optionalAccess', _40 => _40.update_required]) !== true) {
2469
2694
  try {
2470
2695
  metadata = await readMetadata();
2471
2696
  } catch (error) {
2472
2697
  if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
2473
- if (wantsJson) _chunkBHGII2D6js.printJsonError.call(void 0, error);
2698
+ if (wantsJson) _chunk3ACMRZRVjs.printJsonError.call(void 0, error);
2474
2699
  else console.error(error.message);
2475
2700
  return 2;
2476
2701
  }
@@ -2486,7 +2711,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2486
2711
  metadata = await readMetadata();
2487
2712
  } catch (error) {
2488
2713
  if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
2489
- if (wantsJson) _chunkBHGII2D6js.printJsonError.call(void 0, error);
2714
+ if (wantsJson) _chunk3ACMRZRVjs.printJsonError.call(void 0, error);
2490
2715
  else console.error(error.message);
2491
2716
  return 2;
2492
2717
  }
@@ -2512,11 +2737,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2512
2737
  responseIntent,
2513
2738
  ...idempotencyKey ? { idempotencyKey } : {},
2514
2739
  ...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
2515
- searchRef: _chunkLJTFZOHUjs.recentSearchRef.call(void 0, ),
2740
+ searchRef: _chunkOPJAJBD4js.recentSearchRef.call(void 0, ),
2516
2741
  cliInvocationId,
2517
- onResponseReceived: _chunkPQUUWFXYjs.recordApiResponse,
2742
+ onResponseReceived: _chunk7SWNPNMLjs.recordApiResponse,
2518
2743
  ...tracing ? {
2519
- onServerTiming: (serverTiming) => _chunkRDPTDDKXjs.recordCliTrace.call(void 0, {
2744
+ onServerTiming: (serverTiming) => _chunk7LFIMWMWjs.recordCliTrace.call(void 0, {
2520
2745
  phase: "tool_execute_server_timing",
2521
2746
  cliInvocationId,
2522
2747
  serverTiming,
@@ -2527,51 +2752,51 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2527
2752
  let rawResponse;
2528
2753
  let successfulCompatibilityResponse;
2529
2754
  try {
2530
- const executeResult = await _chunkLMAULZLFjs.runToolExecuteStage.call(void 0,
2755
+ const executeResult = await _chunkGEGW5HPZjs.runToolExecuteStage.call(void 0,
2531
2756
  "execute request",
2532
2757
  async () => {
2533
2758
  try {
2534
2759
  if (tracing) {
2535
2760
  submissionStartedAt = performance.now();
2536
- _chunkRDPTDDKXjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
2761
+ _chunk7LFIMWMWjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
2537
2762
  }
2538
2763
  return await client.executeTool(parsed.toolId, parsed.params, {
2539
2764
  ...executeOptions,
2540
2765
  atomicToolOnly: true,
2541
- ..._optionalChain([metadata, 'optionalAccess', _28 => _28.executionMetadata, 'optionalAccess', _29 => _29.retrySafeAmbiguousDelivery]) === true ? { retryAmbiguousDelivery: true } : {}
2766
+ ..._optionalChain([metadata, 'optionalAccess', _41 => _41.executionMetadata, 'optionalAccess', _42 => _42.retrySafeAmbiguousDelivery]) === true ? { retryAmbiguousDelivery: true } : {}
2542
2767
  });
2543
2768
  } catch (error) {
2544
2769
  if (!(error instanceof _chunkDIAWYWT5js.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
2545
2770
  throw error;
2546
- const baseUrl = _chunkQJLKYYPXjs.resolveConfig.call(void 0, ).baseUrl;
2771
+ const baseUrl = _chunkY4DPU4OMjs.resolveConfig.call(void 0, ).baseUrl;
2547
2772
  if (maintenancePolicy !== "off") {
2548
- _chunk2WRO2UJ5js.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
2773
+ _chunkZGQSFYD2js.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
2549
2774
  }
2550
- const compatibility = deferredCompatibility ? await deferredCompatibility.result : await _chunkLMAULZLFjs.runToolExecuteStage.call(void 0,
2775
+ const compatibility = deferredCompatibility ? await deferredCompatibility.result : await _chunkGEGW5HPZjs.runToolExecuteStage.call(void 0,
2551
2776
  "SDK compatibility",
2552
- () => _chunk2WRO2UJ5js.checkSdkCompatibility.call(void 0, baseUrl, {
2777
+ () => _chunkZGQSFYD2js.checkSdkCompatibility.call(void 0, baseUrl, {
2553
2778
  command: "tools execute",
2554
- skillsVersion: _chunkQJLKYYPXjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
2779
+ skillsVersion: _chunkY4DPU4OMjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
2555
2780
  persistCache: maintenancePolicy !== "off"
2556
2781
  })
2557
2782
  );
2558
2783
  if (compatibility.error) throw compatibility.error;
2559
- metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _30 => _30.readMetadata, 'call', _31 => _31()]), () => ( metadata));
2560
- if (maintenancePolicy !== "off" && await _chunkLMAULZLFjs.maybeAutoUpdateAndRelaunch.call(void 0,
2784
+ metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _43 => _43.readMetadata, 'call', _44 => _44()]), () => ( metadata));
2785
+ if (maintenancePolicy !== "off" && await _chunkGEGW5HPZjs.maybeAutoUpdateAndRelaunch.call(void 0,
2561
2786
  compatibility.response,
2562
2787
  baseUrl,
2563
2788
  maintenancePolicy
2564
2789
  )) {
2565
2790
  return void 0;
2566
2791
  }
2567
- _chunk2WRO2UJ5js.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
2792
+ _chunkZGQSFYD2js.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
2568
2793
  quietAdvisory: wantsJson
2569
2794
  });
2570
2795
  if (maintenancePolicy !== "off") {
2571
- await _chunkLMAULZLFjs.runToolExecuteStage.call(void 0,
2796
+ await _chunkGEGW5HPZjs.runToolExecuteStage.call(void 0,
2572
2797
  "agent skills sync",
2573
- () => _chunk2WRO2UJ5js.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
2574
- update: _optionalChain([compatibility, 'access', _32 => _32.response, 'optionalAccess', _33 => _33.skills]),
2798
+ () => _chunkZGQSFYD2js.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
2799
+ update: _optionalChain([compatibility, 'access', _45 => _45.response, 'optionalAccess', _46 => _46.skills]),
2575
2800
  mode: "detached"
2576
2801
  })
2577
2802
  );
@@ -2579,11 +2804,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2579
2804
  const legacyMetadata = await readMetadata();
2580
2805
  if (tracing) {
2581
2806
  submissionStartedAt = performance.now();
2582
- _chunkRDPTDDKXjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
2807
+ _chunk7LFIMWMWjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
2583
2808
  }
2584
2809
  return client.executeTool(parsed.toolId, parsed.params, {
2585
2810
  ...executeOptions,
2586
- ..._optionalChain([legacyMetadata, 'access', _34 => _34.executionMetadata, 'optionalAccess', _35 => _35.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {}
2811
+ ..._optionalChain([legacyMetadata, 'access', _47 => _47.executionMetadata, 'optionalAccess', _48 => _48.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {}
2587
2812
  });
2588
2813
  }
2589
2814
  }
@@ -2600,8 +2825,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2600
2825
  metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
2601
2826
  const updateRequiredBeforeExecution = error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
2602
2827
  if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
2603
- const baseUrl = _chunkQJLKYYPXjs.resolveConfig.call(void 0, ).baseUrl;
2604
- if (await _chunkLMAULZLFjs.maybeAutoUpdateAndRelaunch.call(void 0,
2828
+ const baseUrl = _chunkY4DPU4OMjs.resolveConfig.call(void 0, ).baseUrl;
2829
+ if (await _chunkGEGW5HPZjs.maybeAutoUpdateAndRelaunch.call(void 0,
2605
2830
  compatibility.response,
2606
2831
  baseUrl,
2607
2832
  maintenancePolicy
@@ -2620,14 +2845,14 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2620
2845
  failure = diagnosticError;
2621
2846
  }
2622
2847
  if (failure instanceof _chunkDIAWYWT5js.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
2623
- if (wantsJson) _chunkBHGII2D6js.printJsonError.call(void 0, failure);
2848
+ if (wantsJson) _chunk3ACMRZRVjs.printJsonError.call(void 0, failure);
2624
2849
  else console.error(failure.message);
2625
2850
  return 2;
2626
2851
  }
2627
- const guidanceLines = toolGuidanceLines(_optionalChain([metadata, 'optionalAccess', _36 => _36.guidance]));
2852
+ const guidanceLines = toolGuidanceLines(_optionalChain([metadata, 'optionalAccess', _49 => _49.guidance]));
2628
2853
  if (guidanceLines.length > 0) {
2629
2854
  if (wantsJson && failure instanceof Error) {
2630
- Object.assign(failure, { guidance: _optionalChain([metadata, 'optionalAccess', _37 => _37.guidance]) });
2855
+ Object.assign(failure, { guidance: _optionalChain([metadata, 'optionalAccess', _50 => _50.guidance]) });
2631
2856
  } else {
2632
2857
  console.error(
2633
2858
  [`Guidance for ${parsed.toolId}:`, ...guidanceLines].join("\n")
@@ -2643,13 +2868,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2643
2868
  } catch (e5) {
2644
2869
  }
2645
2870
  metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
2646
- const compatibilityResponse = _optionalChain([compatibility, 'optionalAccess', _38 => _38.response]);
2871
+ const compatibilityResponse = _optionalChain([compatibility, 'optionalAccess', _51 => _51.response]);
2647
2872
  successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
2648
- const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _39 => _39.auto_update]);
2649
- if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _40 => _40.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
2650
- await _chunkLMAULZLFjs.maybeAutoUpdateAndRelaunch.call(void 0,
2873
+ const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _52 => _52.auto_update]);
2874
+ if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _53 => _53.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
2875
+ await _chunkGEGW5HPZjs.maybeAutoUpdateAndRelaunch.call(void 0,
2651
2876
  compatibilityResponse,
2652
- _chunkQJLKYYPXjs.resolveConfig.call(void 0, ).baseUrl,
2877
+ _chunkY4DPU4OMjs.resolveConfig.call(void 0, ).baseUrl,
2653
2878
  maintenancePolicy
2654
2879
  );
2655
2880
  }
@@ -2667,8 +2892,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2667
2892
  );
2668
2893
  }
2669
2894
  }
2670
- const responseMetadata = _chunkZ2GUFYT6js.recordField.call(void 0,
2671
- _chunkZ2GUFYT6js.recordField.call(void 0, rawResponse, "_metadata"),
2895
+ const responseMetadata = _chunk5LEAXRHVjs.recordField.call(void 0,
2896
+ _chunk5LEAXRHVjs.recordField.call(void 0, rawResponse, "_metadata"),
2672
2897
  "tool"
2673
2898
  );
2674
2899
  const listOutputPaths = responseMetadata.listOutputPaths;
@@ -2680,11 +2905,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2680
2905
  await readMetadata()
2681
2906
  );
2682
2907
  }
2683
- if (_chunkZ2GUFYT6js.isRecord.call(void 0, rawResponse)) {
2908
+ if (_chunk5LEAXRHVjs.isRecord.call(void 0, rawResponse)) {
2684
2909
  const { _metadata, ...execution } = rawResponse;
2685
2910
  rawResponse = execution;
2686
2911
  }
2687
- const { listConversion, summary, baseEnvelope } = await _chunkLMAULZLFjs.runToolExecuteStage.call(void 0,
2912
+ const { listConversion, summary, baseEnvelope } = await _chunkGEGW5HPZjs.runToolExecuteStage.call(void 0,
2688
2913
  "result formatting",
2689
2914
  async () => {
2690
2915
  const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
@@ -2704,7 +2929,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2704
2929
  rawResponse,
2705
2930
  listConversion: listConversion2,
2706
2931
  summary: summary2,
2707
- guidance: _optionalChain([metadata, 'optionalAccess', _41 => _41.guidance]),
2932
+ guidance: _optionalChain([metadata, 'optionalAccess', _54 => _54.guidance]),
2708
2933
  listExpected: listExtractorPaths.length > 0
2709
2934
  });
2710
2935
  return { listConversion: listConversion2, summary: summary2, baseEnvelope: baseEnvelope2 };
@@ -2719,9 +2944,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2719
2944
  }
2720
2945
  skillsSyncAttempted = true;
2721
2946
  try {
2722
- await _chunkLMAULZLFjs.runToolExecuteStage.call(void 0,
2947
+ await _chunkGEGW5HPZjs.runToolExecuteStage.call(void 0,
2723
2948
  "agent skills sync",
2724
- () => _chunk2WRO2UJ5js.syncSdkSkillsIfNeeded.call(void 0, _chunkQJLKYYPXjs.resolveConfig.call(void 0, ).baseUrl, {
2949
+ () => _chunkZGQSFYD2js.syncSdkSkillsIfNeeded.call(void 0, _chunkY4DPU4OMjs.resolveConfig.call(void 0, ).baseUrl, {
2725
2950
  update: deliveredCompatibilityResponse.skills,
2726
2951
  mode: "detached"
2727
2952
  })
@@ -2732,15 +2957,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2732
2957
  );
2733
2958
  }
2734
2959
  };
2735
- const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkBHGII2D6js.printCommandEnvelope.call(void 0, envelope, {
2960
+ const printDeliveredEnvelope = (envelope, options2 = {}) => _chunk3ACMRZRVjs.printCommandEnvelope.call(void 0, envelope, {
2736
2961
  ...options2,
2737
2962
  json: _nullishCoalesce(options2.json, () => ( wantsJson))
2738
2963
  });
2739
2964
  const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
2740
2965
  await syncSkillsForDeliveredOutput();
2741
- _chunkBHGII2D6js.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
2966
+ _chunk3ACMRZRVjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
2742
2967
  };
2743
- const delivered = await _chunkLMAULZLFjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
2968
+ const delivered = await _chunkGEGW5HPZjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
2744
2969
  if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
2745
2970
  await printDeliveredJsonEnvelope(baseEnvelope);
2746
2971
  return true;
@@ -2753,7 +2978,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2753
2978
  await printDeliveredJsonEnvelope({
2754
2979
  ...baseEnvelope,
2755
2980
  local: {
2756
- ..._chunkZ2GUFYT6js.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
2981
+ ..._chunk5LEAXRHVjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
2757
2982
  payload_file: jsonPath
2758
2983
  }
2759
2984
  });
@@ -2769,7 +2994,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2769
2994
  `${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
2770
2995
  );
2771
2996
  if (wantsJson) {
2772
- _chunkBHGII2D6js.printJsonError.call(void 0, error);
2997
+ _chunk3ACMRZRVjs.printJsonError.call(void 0, error);
2773
2998
  } else {
2774
2999
  console.error(error.message);
2775
3000
  }
@@ -2864,14 +3089,14 @@ inspect: ${inspection.inspect}
2864
3089
  return true;
2865
3090
  });
2866
3091
  if (delivered) {
2867
- await _chunkLMAULZLFjs.runToolExecuteStage.call(void 0,
3092
+ await _chunkGEGW5HPZjs.runToolExecuteStage.call(void 0,
2868
3093
  "acknowledge delivery",
2869
3094
  () => recovery.acknowledgeDelivery()
2870
3095
  );
2871
3096
  }
2872
3097
  if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
2873
- _chunk2WRO2UJ5js.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
2874
- quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _42 => _42.auto_update, 'optionalAccess', _43 => _43.should_auto_update]) === true
3098
+ _chunkZGQSFYD2js.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
3099
+ quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _55 => _55.auto_update, 'optionalAccess', _56 => _56.should_auto_update]) === true
2875
3100
  });
2876
3101
  }
2877
3102
  if (delivered && !skillsSyncAttempted) await syncSkillsForDeliveredOutput();
@@ -2885,4 +3110,8 @@ inspect: ${inspection.inspect}
2885
3110
 
2886
3111
 
2887
3112
 
2888
- exports.registerToolsCommands = registerToolsCommands; exports.printMonitorTypeContract = printMonitorTypeContract; exports.printCompactToolContract = printCompactToolContract; exports.extractToolExecutionWarningMessages = extractToolExecutionWarningMessages; exports.seedToolListScript = seedToolListScript; exports.buildToolExecuteBaseEnvelope = buildToolExecuteBaseEnvelope;
3113
+
3114
+
3115
+
3116
+
3117
+ exports.registerToolsCommands = registerToolsCommands; exports.printMonitorTypeContract = printMonitorTypeContract; exports.printCompactToolContract = printCompactToolContract; exports.extractToolExecutionWarningMessages = extractToolExecutionWarningMessages; exports.parseToolExecuteTimeout = parseToolExecuteTimeout; exports.seedToolListScript = seedToolListScript; exports.buildToolExecuteBaseEnvelope = buildToolExecuteBaseEnvelope; exports.writeToolReceipt = writeToolReceipt; exports.executeToolForReceipt = executeToolForReceipt; exports.getToolExecutionReceipt = getToolExecutionReceipt;