deepline 0.3.552 → 0.3.554

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +107 -12
  2. package/dist/bundling-sources/sdk/src/compat.ts +239 -87
  3. package/dist/bundling-sources/sdk/src/config.ts +113 -2
  4. package/dist/bundling-sources/sdk/src/errors.ts +2 -0
  5. package/dist/bundling-sources/sdk/src/http-core.ts +118 -8
  6. package/dist/bundling-sources/sdk/src/index.ts +2 -0
  7. package/dist/bundling-sources/sdk/src/integrations.ts +6 -4
  8. package/dist/bundling-sources/sdk/src/play.ts +3 -0
  9. package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -1
  10. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  11. package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +8 -1
  12. package/dist/bundling-sources/sdk/src/tool-calls.ts +2 -1
  13. package/dist/bundling-sources/sdk/src/tool-failure-hint.ts +104 -0
  14. package/dist/bundling-sources/sdk/src/types.ts +9 -1
  15. package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +4 -2
  16. package/dist/bundling-sources/shared_libs/integration-contracts/billing-plan-skus.ts +25 -0
  17. package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +2 -0
  18. package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +58 -4
  19. package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +8 -0
  20. package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +11 -0
  21. package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +13 -0
  22. package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +103 -5
  23. package/dist/bundling-sources/shared_libs/monitors/fleets/converge-admission.ts +133 -0
  24. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-attention.ts +165 -0
  25. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-release.ts +726 -0
  26. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-walk.ts +274 -0
  27. package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +1 -0
  28. package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +28 -0
  29. package/dist/bundling-sources/shared_libs/monitors/fleets/provider-bulk-wait.ts +126 -0
  30. package/dist/bundling-sources/shared_libs/monitors/fleets/shared-payload.ts +189 -0
  31. package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +28 -0
  32. package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +4 -0
  33. package/dist/bundling-sources/shared_libs/monitors/inventory-counter-errors.ts +25 -0
  34. package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +65 -0
  35. package/dist/bundling-sources/shared_libs/monitors/package.json +9 -0
  36. package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +152 -1
  37. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +6 -0
  38. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +390 -10
  39. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +34 -0
  40. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +66 -30
  41. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +30 -0
  42. package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +26 -3
  43. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +41 -13
  44. package/dist/bundling-sources/shared_libs/monitors/signal-radars/raw-receipt-causes.ts +219 -0
  45. package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +21 -10
  46. package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +13 -0
  47. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +6 -0
  48. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +13 -0
  49. package/dist/bundling-sources/shared_libs/observability/dlq.ts +1 -1
  50. package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +5 -3
  51. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +10 -1
  52. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  53. package/dist/bundling-sources/shared_libs/observability/redaction.ts +24 -1
  54. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +168 -41
  55. package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -2
  56. package/dist/bundling-sources/shared_libs/play-data-plane/preview-r2-oidc.ts +188 -0
  57. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +170 -16
  58. package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +5 -0
  59. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +68 -2
  60. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +444 -39
  61. package/dist/bundling-sources/shared_libs/play-runtime/ctx-fetch-caller-deadline.ts +200 -0
  62. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
  63. package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +21 -1
  64. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +3 -2
  65. package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +70 -2
  66. package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +3 -3
  67. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +16 -0
  68. package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +72 -0
  69. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +1 -0
  70. package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +7 -1
  71. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +62 -0
  72. package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +74 -3
  73. package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +31 -3
  74. package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +6 -0
  75. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +8 -0
  76. package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +19 -0
  77. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +39 -2
  78. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +9 -1
  79. package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +33 -0
  80. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +24 -0
  81. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +254 -44
  82. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +87 -6
  83. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +241 -10
  84. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox-egress.ts +161 -14
  85. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +16 -3
  86. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-compression.ts +37 -0
  87. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +9 -0
  88. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +259 -52
  89. package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +13 -0
  90. package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +30 -0
  91. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +62 -1
  92. package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +36 -0
  93. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +36 -0
  94. package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +206 -2
  95. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +42 -0
  96. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +185 -64
  97. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-slot-ledger.ts +157 -0
  98. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +110 -2
  99. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts +323 -0
  100. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/executor-attempt-standing.ts +72 -0
  101. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-storage.ts +23 -4
  102. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-workspace-purge.ts +199 -0
  103. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +632 -66
  104. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +517 -16
  105. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +1 -1
  106. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-value-storage.ts +9 -0
  107. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +599 -2
  108. package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +26 -1
  109. package/dist/bundling-sources/shared_libs/play-runtime/startup-read-tool-ids.ts +60 -0
  110. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +51 -0
  111. package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +2 -0
  112. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +113 -3
  113. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +5 -7
  114. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +2 -0
  115. package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
  116. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +40 -5
  117. package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -0
  118. package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +16 -0
  119. package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +10 -41
  120. package/dist/bundling-sources/shared_libs/plays/extension-bridge.ts +33 -0
  121. package/dist/bundling-sources/shared_libs/plays/row-identity.ts +18 -1
  122. package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +108 -0
  123. package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +14 -0
  124. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +171 -0
  125. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +27 -1
  126. package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +9 -24
  127. package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +178 -5
  128. package/dist/bundling-sources/shared_libs/security/signup-email-dns-screen.ts +148 -0
  129. package/dist/bundling-sources/shared_libs/tool-execution-error.ts +108 -0
  130. package/dist/cli/{auth-KVSBJZOX.mjs → auth-HJUNW7T2.mjs} +8 -7
  131. package/dist/cli/auth-SP6SKZJZ.js +44 -0
  132. package/dist/cli/{billing-FQREA7UA.js → billing-4TSA5HEC.js} +297 -161
  133. package/dist/cli/{billing-54RHFEBI.mjs → billing-SJYRJAQ2.mjs} +197 -61
  134. package/dist/cli/{chunk-4MK42735.js → chunk-2HMN5H54.js} +215 -130
  135. package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
  136. package/dist/cli/{chunk-EOPEYCY7.mjs → chunk-2ORPFQUA.mjs} +18 -18
  137. package/dist/cli/{chunk-RQZQVFCJ.js → chunk-2OVHNHCF.js} +2 -2
  138. package/dist/cli/{chunk-QX7LFGJR.mjs → chunk-33WRQSQ2.mjs} +1874 -91
  139. package/dist/cli/{chunk-UPMRIVZB.js → chunk-3IKGZ4CG.js} +74 -13
  140. package/dist/cli/{chunk-EUPVF4SU.mjs → chunk-3Z4VFCXO.mjs} +8 -8
  141. package/dist/cli/{chunk-GKYAYLRI.js → chunk-4DOFGIEJ.js} +27 -31
  142. package/dist/cli/{chunk-4TALT2M3.mjs → chunk-52Q5KETX.mjs} +69 -3
  143. package/dist/cli/{chunk-RBEUVDZF.js → chunk-5CYZHOKI.js} +249 -107
  144. package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
  145. package/dist/cli/{chunk-IYSTRCLX.mjs → chunk-62AUAWQV.mjs} +4 -4
  146. package/dist/cli/{chunk-ZIAXDBXX.mjs → chunk-62HWJXST.mjs} +17 -21
  147. package/dist/cli/{chunk-QY3ZNU6Z.mjs → chunk-6EXOAT6T.mjs} +2 -2
  148. package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
  149. package/dist/cli/{chunk-ADRC5I3R.js → chunk-7OWI736E.js} +30 -30
  150. package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
  151. package/dist/cli/{chunk-PTVD2GVQ.mjs → chunk-B6HO2XWH.mjs} +13 -13
  152. package/dist/cli/{chunk-YJHE3O5M.mjs → chunk-BOZAP2EM.mjs} +141 -56
  153. package/dist/cli/chunk-BVXIGOBZ.js +32 -0
  154. package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
  155. package/dist/cli/{chunk-WE5HES3H.mjs → chunk-D6Z6POKE.mjs} +151 -43
  156. package/dist/cli/{chunk-AZQ264ID.mjs → chunk-DSKSFFK2.mjs} +1 -1
  157. package/dist/cli/{chunk-SHLFOPD6.js → chunk-DUBXUAAO.js} +5 -5
  158. package/dist/cli/{chunk-V436Z54K.js → chunk-E2G2DNAB.js} +3 -1
  159. package/dist/cli/{chunk-HO3XK3R7.js → chunk-E74KGKFZ.js} +8 -8
  160. package/dist/cli/{chunk-77AAAGVB.js → chunk-ECHKAC7M.js} +2 -2
  161. package/dist/cli/{chunk-KWSH5T7K.js → chunk-EN5NHCCQ.js} +21 -21
  162. package/dist/cli/{chunk-6RZOWL2V.mjs → chunk-F7CMRKSK.mjs} +1 -1
  163. package/dist/cli/{chunk-JWUAX6OP.js → chunk-FBAFX43W.js} +11 -11
  164. package/dist/cli/{chunk-AQWQ2BFX.mjs → chunk-FXQ3JKE3.mjs} +1 -1
  165. package/dist/cli/{chunk-QPKH23EC.mjs → chunk-GA2M3G3Y.mjs} +5 -5
  166. package/dist/cli/{chunk-G4O75EXF.js → chunk-GHT2NDL7.js} +18 -18
  167. package/dist/cli/{chunk-MF2GHZDO.js → chunk-GRZENGNE.js} +2 -2
  168. package/dist/cli/{chunk-4UUR4TCH.js → chunk-IVZKMJUK.js} +1875 -92
  169. package/dist/cli/{chunk-FTJLJCE5.mjs → chunk-KVBQY4ST.mjs} +3 -3
  170. package/dist/cli/{chunk-S5S355UY.mjs → chunk-KZHBDMGF.mjs} +12 -12
  171. package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
  172. package/dist/cli/{chunk-6ZORHRKB.mjs → chunk-LRZGS6RZ.mjs} +2 -0
  173. package/dist/cli/{chunk-2WFPHBR4.js → chunk-LY5MMXFF.js} +47 -29
  174. package/dist/cli/{chunk-BAIST2BR.js → chunk-M7STM3MZ.js} +36 -36
  175. package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
  176. package/dist/cli/{chunk-45PVGZST.js → chunk-OPTV7D2V.js} +508 -361
  177. package/dist/cli/{chunk-PFO3ISXA.js → chunk-OVEYWO4H.js} +174 -129
  178. package/dist/cli/{chunk-BGBJV26E.mjs → chunk-PC2FTUCP.mjs} +4 -4
  179. package/dist/cli/{chunk-WLN3SUIA.js → chunk-PQQMPUCZ.js} +3 -3
  180. package/dist/cli/{chunk-HYC4MKGK.mjs → chunk-Q7ACILL2.mjs} +5 -5
  181. package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
  182. package/dist/cli/{chunk-57VZVF5D.mjs → chunk-RBBTCYQB.mjs} +3 -3
  183. package/dist/cli/{chunk-F2LH7TGF.js → chunk-RTHMGSZX.js} +21 -21
  184. package/dist/cli/{chunk-YLTMXJFC.mjs → chunk-S6W6SJ6E.mjs} +158 -16
  185. package/dist/cli/chunk-STXDSVQZ.mjs +32 -0
  186. package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-TGUQET3O.mjs} +67 -6
  187. package/dist/cli/{chunk-IHRKLXZN.js → chunk-TJ6HLN56.js} +5 -5
  188. package/dist/cli/{chunk-3FD5EQ62.js → chunk-TOO3YM5N.js} +6 -7
  189. package/dist/cli/{chunk-QILKGXYF.mjs → chunk-UBBYHB2B.mjs} +2 -2
  190. package/dist/cli/{chunk-6PRW5UBA.mjs → chunk-UC4BDZKI.mjs} +299 -69
  191. package/dist/cli/{chunk-634ZDA3F.js → chunk-UNNOZKRT.js} +1 -1
  192. package/dist/cli/{chunk-IDVVIXPJ.js → chunk-UOT7HPBH.js} +41 -41
  193. package/dist/cli/{chunk-6YCA5NKJ.js → chunk-UYCZFQYQ.js} +12 -12
  194. package/dist/cli/{chunk-7IKQKKNX.js → chunk-VIUUTEHY.js} +90 -24
  195. package/dist/cli/{chunk-Z5TSLLOW.mjs → chunk-VLO5NFH2.mjs} +63 -18
  196. package/dist/cli/{chunk-U7QRMBIY.mjs → chunk-VQ75KX7G.mjs} +5 -5
  197. package/dist/cli/{chunk-4NQF6KJ3.js → chunk-VV4XGZ24.js} +13 -13
  198. package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
  199. package/dist/cli/{chunk-S46HWQKO.js → chunk-W6CZDTIR.js} +69 -69
  200. package/dist/cli/{chunk-XVB7V4N7.js → chunk-WL7P32PI.js} +161 -53
  201. package/dist/cli/{chunk-DJ2JDK4O.mjs → chunk-XD3MFTHA.mjs} +1 -1
  202. package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-XFZX6FNM.mjs} +40 -22
  203. package/dist/cli/{chunk-AWJPDPMA.mjs → chunk-XU6QNM4D.mjs} +1 -1
  204. package/dist/cli/{chunk-QAORXEY3.mjs → chunk-YCOGPOUX.mjs} +6 -7
  205. package/dist/cli/{chunk-VQALXEXO.js → chunk-YQKCH4R7.js} +348 -118
  206. package/dist/cli/{chunk-6O5HOODW.mjs → chunk-YY55NYAH.mjs} +207 -60
  207. package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
  208. package/dist/cli/command-docs.js +3 -3
  209. package/dist/cli/command-docs.mjs +2 -2
  210. package/dist/cli/{concurrent-runs-help-Q4KPAUJX.mjs → concurrent-runs-help-O3Q5IPLF.mjs} +9 -8
  211. package/dist/cli/concurrent-runs-help-ZFRZWX5V.js +22 -0
  212. package/dist/cli/{csv-F5VAGX4K.js → csv-4ZQ2RATI.js} +16 -15
  213. package/dist/cli/{csv-2PTVDNO6.mjs → csv-Y3BFPEM6.mjs} +7 -6
  214. package/dist/cli/{db-IEDXAUF7.mjs → db-3JYY4JNN.mjs} +17 -17
  215. package/dist/cli/{db-Z3OIUFMM.js → db-VEIFS4M7.js} +45 -45
  216. package/dist/cli/describe-EVJ4MFVU.mjs +50 -0
  217. package/dist/cli/describe-FG625QPF.js +50 -0
  218. package/dist/cli/describe-core.d.mts +3 -3
  219. package/dist/cli/describe-core.d.ts +3 -3
  220. package/dist/cli/describe-core.js +7 -7
  221. package/dist/cli/describe-core.mjs +6 -6
  222. package/dist/cli/{executions-H6H5655J.js → executions-HPZXOOVX.js} +12 -12
  223. package/dist/cli/{executions-R3LP74QN.mjs → executions-PCXZKEHM.mjs} +10 -10
  224. package/dist/cli/{feedback-WL3MRVT5.mjs → feedback-Y6VKZNY6.mjs} +9 -8
  225. package/dist/cli/{feedback-VFOUR66B.js → feedback-ZKFHFVL6.js} +17 -16
  226. package/dist/cli/git-RUBMALLH.js +26 -0
  227. package/dist/cli/{git-YX2J4GCI.mjs → git-UMPR2QYC.mjs} +8 -7
  228. package/dist/cli/index.js +170 -158
  229. package/dist/cli/index.mjs +60 -48
  230. package/dist/cli/{integrations-E2JZYKHS.js → integrations-3GQCTRTF.js} +23 -27
  231. package/dist/cli/{integrations-5ZK5KLVP.mjs → integrations-V3TM6XAB.mjs} +15 -19
  232. package/dist/cli/{legacy-noops-SMN3GSXY.mjs → legacy-noops-JZBUD7ZE.mjs} +9 -8
  233. package/dist/cli/{legacy-noops-3VW4IJTH.js → legacy-noops-VYCO7NGW.js} +12 -11
  234. package/dist/cli/{mcp-UQV2K4EW.js → mcp-4OIWTCE6.js} +121 -48
  235. package/dist/cli/{mcp-V6MGCYAG.mjs → mcp-PH4KZ76P.mjs} +100 -27
  236. package/dist/cli/{monitors-R3BBDCRC.js → monitors-E2A6VPBY.js} +221 -186
  237. package/dist/cli/{monitors-GGKS5W6M.mjs → monitors-SSMGIDGX.mjs} +58 -23
  238. package/dist/cli/org-SFDKSK5D.mjs +2289 -0
  239. package/dist/cli/org-WUDZGWBT.js +2289 -0
  240. package/dist/cli/outcomes-QT7LQBPK.mjs +2865 -0
  241. package/dist/cli/outcomes-Y7SZTLSL.js +2865 -0
  242. package/dist/cli/{play-MDWPR4XG.mjs → play-EK7KSFPL.mjs} +376 -106
  243. package/dist/cli/{play-2MVO27VO.js → play-GDNHCRRR.js} +1150 -880
  244. package/dist/cli/{providers-AKDYFZJZ.mjs → providers-FVZLRXAU.mjs} +10 -10
  245. package/dist/cli/{providers-2AACRUZH.js → providers-ZKOSECLV.js} +13 -13
  246. package/dist/cli/{quickstart-H6IV3PV3.js → quickstart-KSDKIXYD.js} +9 -8
  247. package/dist/cli/{quickstart-QDGRJFZY.mjs → quickstart-UJZ6PIQV.mjs} +7 -6
  248. package/dist/cli/{run-RTSQNGRD.mjs → run-E7MZ7P35.mjs} +35 -33
  249. package/dist/cli/{run-2634REDK.js → run-PD2BBG6S.js} +55 -53
  250. package/dist/cli/run-identity-LMLFMACS.js +31 -0
  251. package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MAZ7ANH5.mjs} +9 -3
  252. package/dist/cli/search-TKSPTPHA.js +32 -0
  253. package/dist/cli/{search-6AOJ4XPP.mjs → search-VTFUFTOY.mjs} +11 -11
  254. package/dist/cli/{search-output-S5ODBL5E.js → search-output-G2AGDCOY.js} +13 -12
  255. package/dist/cli/{search-output-6ADMTOU5.mjs → search-output-PFVXQCWA.mjs} +10 -9
  256. package/dist/cli/{secrets-TFIFBFB3.mjs → secrets-7CIMEMX7.mjs} +11 -11
  257. package/dist/cli/{secrets-LHCIIHMT.js → secrets-BCOQ4U7U.js} +20 -20
  258. package/dist/cli/sessions-4CO556VD.js +23 -0
  259. package/dist/cli/{sessions-WHBVUHVW.mjs → sessions-IUCQZEF7.mjs} +9 -8
  260. package/dist/cli/{settings-EBONWL5C.mjs → settings-KZN62UQK.mjs} +16 -16
  261. package/dist/cli/{settings-CP4FVK2W.js → settings-REL4736M.js} +89 -89
  262. package/dist/cli/{setup-I5AZE3IU.mjs → setup-2P7OG3OU.mjs} +22 -24
  263. package/dist/cli/{setup-LFGHTNLQ.js → setup-2XIVBBCS.js} +62 -64
  264. package/dist/cli/skills-JYT5DEY6.js +37 -0
  265. package/dist/cli/{skills-W76AO5XE.mjs → skills-VIGNDJKI.mjs} +10 -9
  266. package/dist/cli/tools-NTVUQ2TG.js +57 -0
  267. package/dist/cli/{tools-7IJHGF6W.mjs → tools-W3QT5EJY.mjs} +24 -24
  268. package/dist/cli/{update-GFOPZTHY.mjs → update-GZVBVMY3.mjs} +14 -11
  269. package/dist/cli/update-TWJZPUZM.js +37 -0
  270. package/dist/cli/{views-D4NX4SBG.mjs → views-BOGEH424.mjs} +47 -49
  271. package/dist/cli/{views-BPL2TQJ4.js → views-TOLJNLSV.js} +62 -64
  272. package/dist/cli/{workflow-ZYNAUCKC.js → workflow-ENWFRK5M.js} +23 -23
  273. package/dist/cli/{workflow-YXP42FUI.mjs → workflow-VDG2FDQV.mjs} +13 -13
  274. package/dist/{client-CyXGrO4D.d.mts → client-B8f7RNF8.d.mts} +1 -1
  275. package/dist/{client-Bf3IpUKN.d.ts → client-C5TgXmJQ.d.ts} +1 -1
  276. package/dist/{client-core-BxsLnXlm.d.mts → client-core-SLLGBTht.d.mts} +268 -23
  277. package/dist/{client-core-BWd0lX0Z.d.ts → client-core-p0sOxnkl.d.ts} +268 -23
  278. package/dist/{compiler-manifest-BqwVrOri.d.ts → compiler-manifest-D_zZEh9Q.d.mts} +70 -5
  279. package/dist/{compiler-manifest-BqwVrOri.d.mts → compiler-manifest-D_zZEh9Q.d.ts} +70 -5
  280. package/dist/{errors-BU8FB99X.d.mts → errors-CZCrBFrQ.d.mts} +1 -1
  281. package/dist/{errors-DfVN_FUG.d.ts → errors-DsUkLrdZ.d.ts} +1 -1
  282. package/dist/{index-BGnvtYGc.d.ts → index-B6RTOZGC.d.ts} +1 -1
  283. package/dist/{index-DjZgwpGw.d.mts → index-DeOVrEmX.d.mts} +1 -1
  284. package/dist/index.d.mts +7 -7
  285. package/dist/index.d.ts +7 -7
  286. package/dist/index.js +66 -55
  287. package/dist/index.mjs +25 -14
  288. package/dist/install-integrity.json +163 -144
  289. package/dist/plays/bundle-play-file.d.mts +3 -3
  290. package/dist/plays/bundle-play-file.d.ts +3 -3
  291. package/dist/plays/bundle-play-file.mjs +23 -4
  292. package/dist/plays/csv-data-input.js +3 -3
  293. package/dist/plays/csv-data-input.mjs +2 -2
  294. package/dist/plays/play-description.d.mts +2 -2
  295. package/dist/plays/play-description.d.ts +2 -2
  296. package/dist/plays/run-request.d.mts +2 -2
  297. package/dist/plays/run-request.d.ts +2 -2
  298. package/dist/plays/run-request.js +4 -4
  299. package/dist/plays/run-request.mjs +3 -3
  300. package/dist/release.d.mts +1 -1
  301. package/dist/release.d.ts +1 -1
  302. package/dist/release.js +2 -2
  303. package/dist/release.mjs +1 -1
  304. package/dist/server.d.mts +4 -4
  305. package/dist/server.d.ts +4 -4
  306. package/dist/server.js +15 -13
  307. package/dist/server.mjs +9 -7
  308. package/package.json +1 -1
  309. package/dist/cli/auth-MMNVWATX.js +0 -43
  310. package/dist/cli/chunk-AID3OYVJ.js +0 -8
  311. package/dist/cli/chunk-OVDNJAJN.mjs +0 -8
  312. package/dist/cli/concurrent-runs-help-FQAIHKKC.js +0 -21
  313. package/dist/cli/describe-QDANCTS3.mjs +0 -50
  314. package/dist/cli/describe-VUTT5ZKU.js +0 -50
  315. package/dist/cli/git-ETB3GH3K.js +0 -25
  316. package/dist/cli/org-GRYVMNSW.js +0 -1282
  317. package/dist/cli/org-Z37NGJV4.mjs +0 -1282
  318. package/dist/cli/run-identity-G257GQED.js +0 -25
  319. package/dist/cli/search-VTW2YNBS.js +0 -32
  320. package/dist/cli/sessions-CJ4FJ2WB.js +0 -22
  321. package/dist/cli/skills-R7EBXREW.js +0 -36
  322. package/dist/cli/tools-V7U2BDXM.js +0 -57
  323. package/dist/cli/update-4COPZETK.js +0 -34
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk6YCA5NKJjs = require('./chunk-6YCA5NKJ.js');
5
+ var _chunkUYCZFQYQjs = require('./chunk-UYCZFQYQ.js');
6
6
 
7
7
 
8
8
 
@@ -11,11 +11,11 @@ var _chunk6YCA5NKJjs = require('./chunk-6YCA5NKJ.js');
11
11
 
12
12
 
13
13
 
14
- var _chunkGKYAYLRIjs = require('./chunk-GKYAYLRI.js');
14
+ var _chunk4DOFGIEJjs = require('./chunk-4DOFGIEJ.js');
15
15
 
16
16
 
17
17
 
18
- var _chunkJWUAX6OPjs = require('./chunk-JWUAX6OP.js');
18
+ var _chunkFBAFX43Wjs = require('./chunk-FBAFX43W.js');
19
19
 
20
20
 
21
21
 
@@ -36,13 +36,15 @@ var _chunkJWUAX6OPjs = require('./chunk-JWUAX6OP.js');
36
36
 
37
37
 
38
38
 
39
- var _chunkUPMRIVZBjs = require('./chunk-UPMRIVZB.js');
40
39
 
40
+ var _chunk3IKGZ4CGjs = require('./chunk-3IKGZ4CG.js');
41
41
 
42
- var _chunk2WFPHBR4js = require('./chunk-2WFPHBR4.js');
43
42
 
43
+ var _chunkLY5MMXFFjs = require('./chunk-LY5MMXFF.js');
44
44
 
45
- var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
45
+
46
+
47
+ var _chunkBVXIGOBZjs = require('./chunk-BVXIGOBZ.js');
46
48
 
47
49
 
48
50
  var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
@@ -55,31 +57,30 @@ var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
55
57
  var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
56
58
 
57
59
 
58
- var _chunkSHLFOPD6js = require('./chunk-SHLFOPD6.js');
60
+ var _chunkDUBXUAAOjs = require('./chunk-DUBXUAAO.js');
59
61
 
60
62
 
61
- var _chunkPFO3ISXAjs = require('./chunk-PFO3ISXA.js');
63
+ var _chunkOVEYWO4Hjs = require('./chunk-OVEYWO4H.js');
62
64
 
63
65
 
64
- var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
65
66
 
66
67
 
67
68
 
68
69
 
70
+ var _chunk7OWI736Ejs = require('./chunk-7OWI736E.js');
69
71
 
70
72
 
71
- var _chunkADRC5I3Rjs = require('./chunk-ADRC5I3R.js');
72
73
 
73
74
 
75
+ var _chunkGRZENGNEjs = require('./chunk-GRZENGNE.js');
74
76
 
75
77
 
76
- var _chunkMF2GHZDOjs = require('./chunk-MF2GHZDO.js');
77
78
 
78
79
 
79
80
 
80
81
 
82
+ var _chunk2HMN5H54js = require('./chunk-2HMN5H54.js');
81
83
 
82
- var _chunk4MK42735js = require('./chunk-4MK42735.js');
83
84
 
84
85
 
85
86
 
@@ -87,16 +88,18 @@ var _chunk4MK42735js = require('./chunk-4MK42735.js');
87
88
 
88
89
 
89
90
 
91
+ var _chunkYQKCH4R7js = require('./chunk-YQKCH4R7.js');
90
92
 
91
- var _chunkVQALXEXOjs = require('./chunk-VQALXEXO.js');
92
93
 
93
94
 
94
95
 
96
+ var _chunkVIUUTEHYjs = require('./chunk-VIUUTEHY.js');
95
97
 
96
- var _chunk7IKQKKNXjs = require('./chunk-7IKQKKNX.js');
97
98
 
99
+ var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
98
100
 
99
- var _chunkBBTKAASQjs = require('./chunk-BBTKAASQ.js');
101
+
102
+ var _chunkCFJFUVX2js = require('./chunk-CFJFUVX2.js');
100
103
 
101
104
  // src/cli/commands/tools.ts
102
105
  var _commander = require('commander');
@@ -199,10 +202,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
199
202
  }
200
203
  };
201
204
  function pendingToolExecutionPath(input) {
202
- const config = _chunk7IKQKKNXjs.resolveConfig.call(void 0, );
203
- 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");
205
+ const config = _chunkVIUUTEHYjs.resolveConfig.call(void 0, );
206
+ 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(_chunkCFJFUVX2js.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
204
207
  return _path.join.call(void 0,
205
- _chunk7IKQKKNXjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
208
+ _chunkVIUUTEHYjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
206
209
  `${PENDING_PREFIX}${fingerprint}.json`
207
210
  );
208
211
  }
@@ -347,6 +350,81 @@ function toolConnectionStatusMessage(input) {
347
350
  return null;
348
351
  }
349
352
 
353
+ // src/cli/tool-param-flags.ts
354
+ var NUMBER_TEXT = /^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
355
+ function couldBeTyped(value) {
356
+ return value === "true" || value === "false" || NUMBER_TEXT.test(value);
357
+ }
358
+ function parseParamFlags(entries) {
359
+ const params = {};
360
+ for (const entry of entries) {
361
+ const eqIdx = entry.indexOf("=");
362
+ if (eqIdx <= 0) {
363
+ throw new Error(
364
+ `--param ${JSON.stringify(entry)} must be key=value, for example -p email=a@b.com. Use --input for a JSON object.`
365
+ );
366
+ }
367
+ params[entry.slice(0, eqIdx)] = entry.slice(eqIdx + 1);
368
+ }
369
+ return {
370
+ params,
371
+ typedCandidates: Object.entries(params).filter(([, value]) => couldBeTyped(value)).map(([key]) => key)
372
+ };
373
+ }
374
+ function isRecord2(value) {
375
+ return typeof value === "object" && value !== null && !Array.isArray(value);
376
+ }
377
+ function declaredTypes(schema, types = /* @__PURE__ */ new Set()) {
378
+ if (!isRecord2(schema)) return types;
379
+ const { type } = schema;
380
+ if (typeof type === "string") types.add(type);
381
+ if (Array.isArray(type)) {
382
+ for (const entry of type) if (typeof entry === "string") types.add(entry);
383
+ }
384
+ for (const key of ["anyOf", "oneOf", "allOf"]) {
385
+ const variants = schema[key];
386
+ if (Array.isArray(variants)) {
387
+ for (const variant of variants) declaredTypes(variant, types);
388
+ }
389
+ }
390
+ const values = [
391
+ ...Array.isArray(schema.enum) ? schema.enum : [],
392
+ ..."const" in schema ? [schema.const] : []
393
+ ];
394
+ for (const value of values) {
395
+ if (typeof value === "string") types.add("string");
396
+ if (typeof value === "boolean") types.add("boolean");
397
+ if (typeof value === "number") types.add("number");
398
+ }
399
+ return types;
400
+ }
401
+ function typedParamValue(inputSchema, key, text) {
402
+ const wrapped = _optionalChain([inputSchema, 'optionalAccess', _4 => _4.jsonSchema]);
403
+ const root = isRecord2(wrapped) ? wrapped : inputSchema;
404
+ const properties = _optionalChain([root, 'optionalAccess', _5 => _5.properties]);
405
+ if (!isRecord2(properties)) return text;
406
+ const types = declaredTypes(properties[key]);
407
+ if (types.size === 0 || types.has("string")) return text;
408
+ if (types.has("boolean") && (text === "true" || text === "false")) {
409
+ return text === "true";
410
+ }
411
+ if (NUMBER_TEXT.test(text)) {
412
+ const number = Number(text);
413
+ if (!Number.isFinite(number)) return text;
414
+ if (types.has("number")) return number;
415
+ if (types.has("integer") && Number.isInteger(number)) return number;
416
+ }
417
+ return text;
418
+ }
419
+
420
+ // src/cli/json-file-text.ts
421
+ function jsonFileText(bytes) {
422
+ if (bytes[0] === 255 && bytes[1] === 254) {
423
+ return new TextDecoder("utf-16le").decode(bytes.subarray(2));
424
+ }
425
+ return new TextDecoder("utf-8").decode(bytes).replace(/^/, "");
426
+ }
427
+
350
428
  // src/cli/commands/tools.ts
351
429
  var TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS = 750;
352
430
  var TOOL_COMMAND_TEMPLATES = {
@@ -354,13 +432,13 @@ var TOOL_COMMAND_TEMPLATES = {
354
432
  execute: "deepline run <toolId> --input '{...}'"
355
433
  };
356
434
  function toListedTool(tool) {
357
- if (_chunkUPMRIVZBjs.isPlayLikeTool.call(void 0, tool)) {
435
+ if (_chunk3IKGZ4CGjs.isPlayLikeTool.call(void 0, tool)) {
358
436
  return {
359
437
  ...tool,
360
438
  description: listedToolDescription(tool),
361
439
  id: tool.toolId,
362
440
  type: "play",
363
- executeCommand: _chunkUPMRIVZBjs.playRunCommandForTool.call(void 0, tool, tool.toolId)
441
+ executeCommand: _chunk3IKGZ4CGjs.playRunCommandForTool.call(void 0, tool, tool.toolId)
364
442
  };
365
443
  }
366
444
  return {
@@ -378,12 +456,9 @@ function parseGrepTerms(query, mode) {
378
456
  const matches = _nullishCoalesce(trimmed.match(/"([^"]+)"|'([^']+)'|\S+/g), () => ( []));
379
457
  return matches.map((term) => term.replace(/^["']|["']$/g, "").trim()).filter(Boolean);
380
458
  }
381
- function shellCommandArg(value) {
382
- return `'${value.replace(/'/g, `'\\''`)}'`;
383
- }
384
459
  function zeroMatchToolGuidance(options) {
385
460
  const categories = _nullishCoalesce(options.categories, () => ( []));
386
- const query = _nullishCoalesce(_optionalChain([options, 'access', _4 => _4.query, 'optionalAccess', _5 => _5.trim, 'call', _6 => _6()]), () => ( ""));
461
+ const query = _nullishCoalesce(_optionalChain([options, 'access', _6 => _6.query, 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]), () => ( ""));
387
462
  const filterText = [
388
463
  categories.length ? `categories=${categories.join(",")}` : null,
389
464
  query ? `grep=${query}` : null,
@@ -393,12 +468,12 @@ function zeroMatchToolGuidance(options) {
393
468
  ...query ? [
394
469
  {
395
470
  label: "Use ranked semantic search for intent-style queries",
396
- command: `deepline search -- ${shellCommandArg(query)}`
471
+ command: `deepline search -- ${_chunkBVXIGOBZjs.shellArgument.call(void 0, query)}`
397
472
  },
398
473
  ...options.mode === "all" ? [
399
474
  {
400
475
  label: "Relax grep from AND to OR matching",
401
- command: `deepline tools grep --mode any -- ${shellCommandArg(query)}`
476
+ command: `deepline tools grep --mode any -- ${_chunkBVXIGOBZjs.shellArgument.call(void 0, query)}`
402
477
  }
403
478
  ] : []
404
479
  ] : [],
@@ -436,37 +511,37 @@ function firstSentence(text) {
436
511
  return (match ? match[0] : clean).trim();
437
512
  }
438
513
  function requiredInputIds(tool) {
439
- const inputSchema = _chunkUPMRIVZBjs.recordField.call(void 0,
514
+ const inputSchema = _chunk3IKGZ4CGjs.recordField.call(void 0,
440
515
  tool,
441
516
  "inputSchema",
442
517
  "input_schema"
443
518
  );
444
- return _chunkUPMRIVZBjs.toolInputFieldsForDisplay.call(void 0, inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
519
+ return _chunk3IKGZ4CGjs.toolInputFieldsForDisplay.call(void 0, inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
445
520
  }
446
521
  function notConnectedSuffix(tool) {
447
522
  const record = tool;
448
- const status = _chunkUPMRIVZBjs.stringField.call(void 0, record, "credentialStatus", "credential_status");
523
+ const status = _chunk3IKGZ4CGjs.stringField.call(void 0, record, "credentialStatus", "credential_status");
449
524
  const connected = record.connected;
450
525
  const message = toolConnectionStatusMessage({
451
526
  connected: connected === false ? false : void 0,
452
527
  credentialStatus: status || void 0,
453
- connectionMessage: _chunkUPMRIVZBjs.stringField.call(void 0, record, "connectionMessage", "connection_message") || void 0
528
+ connectionMessage: _chunk3IKGZ4CGjs.stringField.call(void 0, record, "connectionMessage", "connection_message") || void 0
454
529
  });
455
530
  return message ? ` - \u26A0 ${message}` : "";
456
531
  }
457
532
  function shortPricingHint(tool) {
458
- const pricing = _chunkUPMRIVZBjs.recordField.call(void 0,
533
+ const pricing = _chunk3IKGZ4CGjs.recordField.call(void 0,
459
534
  tool,
460
535
  "pricing"
461
536
  );
462
537
  const credits = numberField(pricing, "creditsPerUnit", "credits_per_unit");
463
- const unit = _chunkUPMRIVZBjs.stringField.call(void 0, pricing, "unit");
538
+ const unit = _chunk3IKGZ4CGjs.stringField.call(void 0, pricing, "unit");
464
539
  if (credits !== null) {
465
540
  return `${formatDecimal(credits)} cr/${unit || "unit"}`;
466
541
  }
467
- const summary = _chunkUPMRIVZBjs.stringField.call(void 0, pricing, "summary");
542
+ const summary = _chunk3IKGZ4CGjs.stringField.call(void 0, pricing, "summary");
468
543
  if (summary) return summary;
469
- const displayText = _chunkUPMRIVZBjs.stringField.call(void 0, pricing, "displayText", "display_text");
544
+ const displayText = _chunk3IKGZ4CGjs.stringField.call(void 0, pricing, "displayText", "display_text");
470
545
  return displayText || null;
471
546
  }
472
547
  function aggregateCategorySummaries(tools) {
@@ -510,13 +585,13 @@ function categoryEnumerationRender(summaries) {
510
585
  };
511
586
  }
512
587
  async function listToolCategories(emitJson, compact) {
513
- const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
588
+ const client = new (0, _chunkDUBXUAAOjs.DeeplineClient)();
514
589
  if (!emitJson) {
515
590
  const summaries2 = (await client.listToolCategories()).map((category) => ({
516
591
  ...category,
517
592
  description: describeToolCategory(category.name)
518
593
  }));
519
- _chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
594
+ _chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
520
595
  { categories: summaries2, render: categoryEnumerationRender(summaries2) },
521
596
  { json: false }
522
597
  );
@@ -526,7 +601,7 @@ async function listToolCategories(emitJson, compact) {
526
601
  const items = rawTools.map(toListedTool);
527
602
  const summaries = aggregateCategorySummaries(rawTools);
528
603
  const outputItems = compact ? items.map(compactTool) : items;
529
- _chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
604
+ _chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
530
605
  {
531
606
  tools: outputItems,
532
607
  count: outputItems.length,
@@ -545,7 +620,7 @@ function unknownCategoryError(category, summaries, emitJson) {
545
620
  const known = summaries.map((item) => item.name);
546
621
  const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
547
622
  if (emitJson) {
548
- _chunkVQALXEXOjs.printJson.call(void 0, {
623
+ _chunkYQKCH4R7js.printJson.call(void 0, {
549
624
  ok: false,
550
625
  exitCode: 4,
551
626
  code: "TOOL_CATEGORY_NOT_FOUND",
@@ -559,13 +634,13 @@ function unknownCategoryError(category, summaries, emitJson) {
559
634
  const render = categoryEnumerationRender(summaries);
560
635
  console.error(message);
561
636
  console.error("");
562
- console.error(_chunkVQALXEXOjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
637
+ console.error(_chunkYQKCH4R7js.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
563
638
  console.error("");
564
639
  console.error(`Valid categories: ${known.join(", ")}`);
565
640
  return 4;
566
641
  }
567
642
  async function listToolsInCategory(category, emitJson) {
568
- const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
643
+ const client = new (0, _chunkDUBXUAAOjs.DeeplineClient)();
569
644
  const { tools: rawTools, categories } = await client.listToolsInCategory(category);
570
645
  const summaries = categories.map((item) => ({
571
646
  ...item,
@@ -574,7 +649,7 @@ async function listToolsInCategory(category, emitJson) {
574
649
  if (!summaries.some((item) => item.name === category)) {
575
650
  return unknownCategoryError(category, summaries, emitJson);
576
651
  }
577
- const rows = rawTools.filter((tool) => _optionalChain([tool, 'access', _7 => _7.categories, 'optionalAccess', _8 => _8.includes, 'call', _9 => _9(category)])).map((tool) => ({
652
+ const rows = rawTools.filter((tool) => _optionalChain([tool, 'access', _9 => _9.categories, 'optionalAccess', _10 => _10.includes, 'call', _11 => _11(category)])).map((tool) => ({
578
653
  id: tool.toolId,
579
654
  provider: tool.provider,
580
655
  required: requiredInputIds(tool),
@@ -601,7 +676,7 @@ async function listToolsInCategory(category, emitJson) {
601
676
  }
602
677
  ]
603
678
  };
604
- _chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
679
+ _chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
605
680
  {
606
681
  category,
607
682
  total: rows.length,
@@ -614,7 +689,7 @@ async function listToolsInCategory(category, emitJson) {
614
689
  return 0;
615
690
  }
616
691
  async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
617
- const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
692
+ const client = new (0, _chunkDUBXUAAOjs.DeeplineClient)();
618
693
  const items = (await client.listTools({
619
694
  categories: requestedCategories.join(","),
620
695
  compact
@@ -643,7 +718,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
643
718
  ]
644
719
  };
645
720
  const outputItems = compact ? items.map(compactTool) : items;
646
- _chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
721
+ _chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
647
722
  {
648
723
  tools: outputItems,
649
724
  count: outputItems.length,
@@ -659,16 +734,16 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
659
734
  return 0;
660
735
  }
661
736
  async function listTools(category, options = {}) {
662
- const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
737
+ const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()]), () => ( ""));
663
738
  const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
664
739
  const compact = options.compact !== false;
665
- const emitJson = options.json === true || _chunkVQALXEXOjs.shouldEmitJson.call(void 0, );
740
+ const emitJson = options.json === true || _chunkYQKCH4R7js.shouldEmitJson.call(void 0, );
666
741
  if (positional && flagCategories.length > 0) {
667
742
  const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
668
743
  if (!flagIsSameSingle) {
669
744
  const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
670
745
  if (emitJson) {
671
- _chunkVQALXEXOjs.printJson.call(void 0, {
746
+ _chunkYQKCH4R7js.printJson.call(void 0, {
672
747
  ok: false,
673
748
  exitCode: 2,
674
749
  code: "TOOL_LIST_CATEGORY_CONFLICT",
@@ -695,7 +770,7 @@ async function grepTools(queryInput, options = {}) {
695
770
  console.error("Usage: deepline tools grep <query> [--json]");
696
771
  return 1;
697
772
  }
698
- const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
773
+ const client = new (0, _chunkDUBXUAAOjs.DeeplineClient)();
699
774
  const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
700
775
  const mode = _nullishCoalesce(options.mode, () => ( "all"));
701
776
  const jsonOutput = options.json === true;
@@ -719,7 +794,7 @@ async function grepTools(queryInput, options = {}) {
719
794
  query,
720
795
  mode
721
796
  }) : null;
722
- _chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
797
+ _chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
723
798
  {
724
799
  tools: outputTools,
725
800
  count: outputTools.length,
@@ -737,7 +812,7 @@ async function grepTools(queryInput, options = {}) {
737
812
  } : {},
738
813
  commandTemplates: TOOL_COMMAND_TEMPLATES
739
814
  },
740
- { json: options.json || _chunkVQALXEXOjs.shouldEmitJson.call(void 0, ) }
815
+ { json: options.json || _chunkYQKCH4R7js.shouldEmitJson.call(void 0, ) }
741
816
  );
742
817
  return 0;
743
818
  }
@@ -765,7 +840,7 @@ function compactTool(tool) {
765
840
  };
766
841
  }
767
842
  function playIdentifiers(play) {
768
- return [play.name, play.reference, ..._nullishCoalesce(play.aliases, () => ( []))].filter((value) => Boolean(_optionalChain([value, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()]))).map((value) => value.trim());
843
+ return [play.name, play.reference, ..._nullishCoalesce(play.aliases, () => ( []))].filter((value) => Boolean(_optionalChain([value, 'optionalAccess', _14 => _14.trim, 'call', _15 => _15()]))).map((value) => value.trim());
769
844
  }
770
845
  async function findPlayForToolId(client, toolId, cliInvocationId) {
771
846
  const requested = toolId.trim();
@@ -780,7 +855,7 @@ async function findPlayForToolId(client, toolId, cliInvocationId) {
780
855
  return _nullishCoalesce(plays.find((play) => playIdentifiers(play).includes(requested)), () => ( null));
781
856
  }
782
857
  function isMissingToolMetadataError(error) {
783
- return error instanceof _chunkBBTKAASQjs.DeeplineError && error.statusCode === 404;
858
+ return error instanceof _chunkLFQJW4S2js.DeeplineError && error.statusCode === 404;
784
859
  }
785
860
  function playAliasToolErrorMessage(toolId, play) {
786
861
  const playName = _nullishCoalesce(play.reference, () => ( play.name));
@@ -792,8 +867,8 @@ function printPlayAliasToolError(toolId, play) {
792
867
  console.error(playAliasToolErrorMessage(toolId, play));
793
868
  }
794
869
  function playLikeToolExecuteErrorMessage(toolId, tool) {
795
- const playReference = tool ? _chunkUPMRIVZBjs.playReferenceForTool.call(void 0, tool) : null;
796
- const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunkUPMRIVZBjs.playSearchCommandForToolId.call(void 0, toolId)}`;
870
+ const playReference = tool ? _chunk3IKGZ4CGjs.playReferenceForTool.call(void 0, tool) : null;
871
+ const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunk3IKGZ4CGjs.playSearchCommandForToolId.call(void 0, toolId)}`;
797
872
  return [
798
873
  `${toolId} is a workflow/play entry, not an atomic provider tool.`,
799
874
  nextStep,
@@ -829,17 +904,17 @@ Common commands:
829
904
  Output:
830
905
  deepline describe shows a tool's contract and price, and deepline run runs
831
906
  it. The receipt's billing command (next.billing with --json) gives a call's
832
- exact charge. Workspace balance changes also include other callers'
907
+ exact charge. Org balance changes also include other callers'
833
908
  activity.
834
909
  `
835
910
  );
836
- _chunkGKYAYLRIjs.registerIntegrationBalanceCommand.call(void 0, tools, true);
837
- _chunkGKYAYLRIjs.registerWorkspaceConnectionListCommand.call(void 0, tools, "workspace-connections", true);
838
- _chunkGKYAYLRIjs.registerLegacyHubSpotMembersCommand.call(void 0, tools, true);
839
- _chunkGKYAYLRIjs.registerLegacyWorkspaceConnectionCommand.call(void 0, tools, true);
840
- _chunkGKYAYLRIjs.registerLegacyCalendarDelegationCommand.call(void 0, tools, true);
841
- _chunkGKYAYLRIjs.registerLegacyAvailabilityCalendarsCommand.call(void 0, tools, true);
842
- _chunkGKYAYLRIjs.registerIntegrationConnectCommand.call(void 0, tools, false, true);
911
+ _chunk4DOFGIEJjs.registerIntegrationBalanceCommand.call(void 0, tools, true);
912
+ _chunk4DOFGIEJjs.registerWorkspaceConnectionListCommand.call(void 0, tools, "workspace-connections", true);
913
+ _chunk4DOFGIEJjs.registerLegacyHubSpotMembersCommand.call(void 0, tools, true);
914
+ _chunk4DOFGIEJjs.registerLegacyWorkspaceConnectionCommand.call(void 0, tools, true);
915
+ _chunk4DOFGIEJjs.registerLegacyCalendarDelegationCommand.call(void 0, tools, true);
916
+ _chunk4DOFGIEJjs.registerLegacyAvailabilityCalendarsCommand.call(void 0, tools, true);
917
+ _chunk4DOFGIEJjs.registerIntegrationConnectCommand.call(void 0, tools, false, true);
843
918
  tools.command("list [category]").description("Browse tool categories, or list every tool in a category.").addHelpText(
844
919
  "after",
845
920
  `
@@ -872,7 +947,7 @@ Examples:
872
947
  json: Boolean(options.json)
873
948
  });
874
949
  });
875
- _chunkJWUAX6OPjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
950
+ _chunkFBAFX43Wjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
876
951
  tools.command("grep <query>").description(
877
952
  "Regex grep over tool ids, descriptions, categories, and input fields."
878
953
  ).addHelpText(
@@ -907,7 +982,7 @@ Examples:
907
982
  });
908
983
  const addToolMetadataCommand = (command) => {
909
984
  let compatibilityMetadata;
910
- _chunkADRC5I3Rjs.registerCompatibilityCatalog.call(void 0, command, () => ({
985
+ _chunk7OWI736Ejs.registerCompatibilityCatalog.call(void 0, command, () => ({
911
986
  toolId: command.args[0],
912
987
  acceptMetadata: (metadata) => {
913
988
  compatibilityMetadata = metadata;
@@ -932,15 +1007,15 @@ Examples:
932
1007
  deepline describe hunter_email_verifier --feature byok
933
1008
  deepline tools describe deeplineagent --model openai/gpt-5.6-luna
934
1009
  deepline tools describe ai_inference --estimate-payload @payload.json
935
- deepline tools describe ai_evaluate --estimate-payload @payload.json
1010
+ deepline tools describe ai_decision --estimate-payload @payload.json
936
1011
  deepline run hunter_email_verifier --input '{"email":"a@b.com"}'
937
1012
  `
938
1013
  ).option("--json", "Emit JSON output").option(
939
1014
  "--model <model>",
940
- "For language tools, include AI Gateway metadata; for ai_evaluate, set the quote payload model"
1015
+ "For language tools, include AI Gateway metadata; for ai_decision, set the quote payload model"
941
1016
  ).option(
942
1017
  "--estimate-payload <payload>",
943
- "Quote an ai_evaluate, ai_inference, or deeplineagent JSON payload (inline or @file)"
1018
+ "Quote an ai_decision, ai_inference, or deeplineagent JSON payload (inline or @file)"
944
1019
  ).option("--pricing-only", "Only print pricing and billing semantics").option(
945
1020
  "--examples-only",
946
1021
  "Only print input payload and full Deepline execution response examples"
@@ -977,7 +1052,7 @@ Examples:
977
1052
  process.exitCode = await narrowView();
978
1053
  return;
979
1054
  }
980
- const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-VUTT5ZKU.js")));
1055
+ const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-FG625QPF.js")));
981
1056
  process.exitCode = await describeAnything(
982
1057
  toolId,
983
1058
  {
@@ -992,12 +1067,12 @@ Examples:
992
1067
  });
993
1068
  };
994
1069
  addToolMetadataCommand(
995
- _chunk6YCA5NKJjs.addDescribeOptions.call(void 0,
1070
+ _chunkUYCZFQYQjs.addDescribeOptions.call(void 0,
996
1071
  tools.command("describe <toolId>", { hidden: true }).alias("get"),
997
1072
  { json: false }
998
1073
  )
999
1074
  );
1000
- tools.command("execute <toolId>", { hidden: true }).alias("call").description("Execute a tool by id.").option("--connection <name>", "Use an exact named workspace connection").addHelpText(
1075
+ tools.command("execute <toolId>", { hidden: true }).alias("call").description("Execute a tool by id.").option("--connection <name>", "Use an exact named org connection").addHelpText(
1001
1076
  "after",
1002
1077
  `
1003
1078
  Notes:
@@ -1007,7 +1082,7 @@ Notes:
1007
1082
  stable result payload plus output preview and debugging helpers.
1008
1083
  Read pricing first with deepline describe <toolId>.
1009
1084
  Use the returned next.billing command to look up this execution's exact charge;
1010
- workspace balance changes also include other callers' activity.
1085
+ org balance changes also include other callers' activity.
1011
1086
  --timeout sets this CLI request's HTTP deadline; it does not cancel provider work.
1012
1087
 
1013
1088
  Examples:
@@ -1061,7 +1136,7 @@ Examples:
1061
1136
  options,
1062
1137
  void 0,
1063
1138
  true,
1064
- _chunkMF2GHZDOjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
1139
+ _chunkGRZENGNEjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
1065
1140
  );
1066
1141
  }
1067
1142
  );
@@ -1069,13 +1144,13 @@ Examples:
1069
1144
  function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
1070
1145
  let metadata;
1071
1146
  const startedAt = performance.now();
1072
- const baseUrl = _chunk7IKQKKNXjs.resolveConfig.call(void 0, ).baseUrl;
1073
- _chunkMF2GHZDOjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
1074
- const result = _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
1147
+ const baseUrl = _chunkVIUUTEHYjs.resolveConfig.call(void 0, ).baseUrl;
1148
+ _chunkGRZENGNEjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
1149
+ const result = _chunk7OWI736Ejs.runToolExecuteStage.call(void 0,
1075
1150
  "SDK compatibility",
1076
- () => _chunk4MK42735js.checkSdkCompatibility.call(void 0, baseUrl, {
1151
+ () => _chunk2HMN5H54js.checkSdkCompatibility.call(void 0, baseUrl, {
1077
1152
  command: "tools execute",
1078
- skillsVersion: _chunk7IKQKKNXjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
1153
+ skillsVersion: _chunkVIUUTEHYjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
1079
1154
  persistCache: false,
1080
1155
  timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
1081
1156
  catalog: {
@@ -1089,7 +1164,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
1089
1164
  })
1090
1165
  ).then(
1091
1166
  (compatibility) => {
1092
- _chunkMF2GHZDOjs.recordCliTrace.call(void 0, {
1167
+ _chunkGRZENGNEjs.recordCliTrace.call(void 0, {
1093
1168
  phase: "cli.tool_execute_compatibility_ready",
1094
1169
  ms: performance.now() - startedAt,
1095
1170
  ok: compatibility.error === null,
@@ -1098,7 +1173,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
1098
1173
  return compatibility;
1099
1174
  },
1100
1175
  (error) => {
1101
- _chunkMF2GHZDOjs.recordCliTrace.call(void 0, {
1176
+ _chunkGRZENGNEjs.recordCliTrace.call(void 0, {
1102
1177
  phase: "cli.tool_execute_compatibility_ready",
1103
1178
  ms: performance.now() - startedAt,
1104
1179
  ok: false
@@ -1113,7 +1188,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1113
1188
  console.error("Usage: deepline tools describe <toolId> [--json]");
1114
1189
  return 1;
1115
1190
  }
1116
- const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
1191
+ const client = new (0, _chunkDUBXUAAOjs.DeeplineClient)();
1117
1192
  let tool;
1118
1193
  try {
1119
1194
  tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
@@ -1127,11 +1202,13 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1127
1202
  }
1128
1203
  throw error;
1129
1204
  }
1205
+ const resolvedToolId = typeof tool.toolId === "string" && tool.toolId ? tool.toolId : toolId;
1130
1206
  let inferenceQuote = null;
1131
1207
  if (options.estimatePayload) {
1132
- if (toolId !== "deeplineagent" && toolId !== "ai_inference" && toolId !== "ai_evaluate") {
1208
+ const quoteToolId = resolvedToolId;
1209
+ if (quoteToolId !== "deeplineagent" && quoteToolId !== "ai_inference" && quoteToolId !== "ai_evaluate") {
1133
1210
  console.error(
1134
- "--estimate-payload is only supported for ai_evaluate, deeplineagent, and ai_inference."
1211
+ "--estimate-payload is only supported for ai_decision, deeplineagent, and ai_inference."
1135
1212
  );
1136
1213
  return 2;
1137
1214
  }
@@ -1142,10 +1219,13 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1142
1219
  if (options.model && estimatePayload.model === void 0) {
1143
1220
  estimatePayload.model = options.model;
1144
1221
  }
1145
- inferenceQuote = await client.quoteInferenceTool(toolId, estimatePayload);
1222
+ inferenceQuote = await client.quoteInferenceTool(
1223
+ quoteToolId,
1224
+ estimatePayload
1225
+ );
1146
1226
  }
1147
- const modelDescription = options.model && (toolId === "deeplineagent" || toolId === "ai_inference") ? await client.describeModel(options.model) : null;
1148
- if (options.model && !modelDescription && toolId !== "ai_evaluate") {
1227
+ const modelDescription = options.model && (resolvedToolId === "deeplineagent" || resolvedToolId === "ai_inference") ? await client.describeModel(options.model) : null;
1228
+ if (options.model && !modelDescription && resolvedToolId !== "ai_evaluate") {
1149
1229
  console.error(
1150
1230
  "--model is only supported for deeplineagent and ai_inference."
1151
1231
  );
@@ -1167,12 +1247,12 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1167
1247
  const lines = toolPricingOnlyLines(tool, toolId);
1168
1248
  if (inferenceQuote)
1169
1249
  lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
1170
- _chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
1250
+ _chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
1171
1251
  {
1172
1252
  toolId: String(tool.toolId || toolId),
1173
- cost: _chunkUPMRIVZBjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
1253
+ cost: _chunk3IKGZ4CGjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
1174
1254
  ...modelDescription ? { modelOptions: modelDescription } : {},
1175
- ..._chunkUPMRIVZBjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunkUPMRIVZBjs.recordField.call(void 0, tool, "pricing") } : {},
1255
+ ..._chunk3IKGZ4CGjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunk3IKGZ4CGjs.recordField.call(void 0, tool, "pricing") } : {},
1176
1256
  ...inferenceQuote ? { inferenceQuote } : {}
1177
1257
  },
1178
1258
  {
@@ -1183,14 +1263,14 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1183
1263
  );
1184
1264
  return 0;
1185
1265
  }
1186
- if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunkUPMRIVZBjs.isMonitorTypeTool.call(void 0, tool) && !_chunkUPMRIVZBjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
1187
- const contract = _chunkUPMRIVZBjs.toolContractJsonForDescribe.call(void 0,
1266
+ if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunk3IKGZ4CGjs.isMonitorTypeTool.call(void 0, tool) && !_chunk3IKGZ4CGjs.isMonitorVariantIndex.call(void 0, tool) && !_chunk3IKGZ4CGjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
1267
+ const contract = _chunk3IKGZ4CGjs.toolContractJsonForDescribe.call(void 0,
1188
1268
  tool,
1189
1269
  toolId,
1190
1270
  void 0,
1191
1271
  seedToolListScript
1192
1272
  );
1193
- _chunkVQALXEXOjs.printCompactJson.call(void 0, {
1273
+ _chunkYQKCH4R7js.printCompactJson.call(void 0, {
1194
1274
  toolId: contract.toolId,
1195
1275
  ...options.schemaOnly ? {
1196
1276
  inputSchema: contract.inputSchema,
@@ -1213,8 +1293,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1213
1293
  return 0;
1214
1294
  }
1215
1295
  if (options.contractJson) {
1216
- _chunkVQALXEXOjs.printCompactJson.call(void 0, {
1217
- ..._chunkUPMRIVZBjs.toolContractJsonForDescribe.call(void 0,
1296
+ _chunkYQKCH4R7js.printCompactJson.call(void 0, {
1297
+ ..._chunk3IKGZ4CGjs.toolContractJsonForDescribe.call(void 0,
1218
1298
  tool,
1219
1299
  toolId,
1220
1300
  void 0,
@@ -1227,8 +1307,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1227
1307
  }
1228
1308
  const emitJson = options.json === true;
1229
1309
  if (emitJson) {
1230
- _chunkVQALXEXOjs.printCompactJson.call(void 0, {
1231
- ..._chunkUPMRIVZBjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
1310
+ _chunkYQKCH4R7js.printCompactJson.call(void 0, {
1311
+ ..._chunk3IKGZ4CGjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
1232
1312
  ...modelDescription ? { modelOptions: modelDescription } : {},
1233
1313
  ...inferenceQuote ? { inferenceQuote } : {}
1234
1314
  });
@@ -1253,7 +1333,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1253
1333
  printCompactToolContract(tool, toolId);
1254
1334
  if (modelDescription) {
1255
1335
  process.stdout.write(`
1256
- ${_chunkUPMRIVZBjs.formatModelDescription.call(void 0, modelDescription)}`);
1336
+ ${_chunk3IKGZ4CGjs.formatModelDescription.call(void 0, modelDescription)}`);
1257
1337
  }
1258
1338
  if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
1259
1339
  return 0;
@@ -1261,7 +1341,7 @@ ${_chunkUPMRIVZBjs.formatModelDescription.call(void 0, modelDescription)}`);
1261
1341
  printCompactToolContract(tool, toolId);
1262
1342
  if (modelDescription) {
1263
1343
  process.stdout.write(`
1264
- ${_chunkUPMRIVZBjs.formatModelDescription.call(void 0, modelDescription)}`);
1344
+ ${_chunk3IKGZ4CGjs.formatModelDescription.call(void 0, modelDescription)}`);
1265
1345
  }
1266
1346
  if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
1267
1347
  return 0;
@@ -1278,10 +1358,10 @@ function printInferenceQuoteSummary(quote) {
1278
1358
  for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
1279
1359
  }
1280
1360
  function printMonitorTypeFilters(tool) {
1281
- const schema = _chunkUPMRIVZBjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
1282
- const properties = _chunkUPMRIVZBjs.recordField.call(void 0, schema, "properties");
1361
+ const schema = _chunk3IKGZ4CGjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
1362
+ const properties = _chunk3IKGZ4CGjs.recordField.call(void 0, schema, "properties");
1283
1363
  const required = new Set(
1284
- _chunkUPMRIVZBjs.arrayField.call(void 0, schema, "required").filter(
1364
+ _chunk3IKGZ4CGjs.arrayField.call(void 0, schema, "required").filter(
1285
1365
  (v) => typeof v === "string"
1286
1366
  )
1287
1367
  );
@@ -1292,24 +1372,24 @@ function printMonitorTypeFilters(tool) {
1292
1372
  }
1293
1373
  console.log("Deploy filters (set in the monitor payload):");
1294
1374
  for (const name of names) {
1295
- const field = _chunkUPMRIVZBjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
1375
+ const field = _chunk3IKGZ4CGjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
1296
1376
  const star = required.has(name) ? "*" : "";
1297
- const enumVals = _chunkUPMRIVZBjs.arrayField.call(void 0, field, "enum").filter(
1377
+ const enumVals = _chunk3IKGZ4CGjs.arrayField.call(void 0, field, "enum").filter(
1298
1378
  (v) => typeof v === "string"
1299
1379
  );
1300
- const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunkUPMRIVZBjs.stringField.call(void 0, field, "type") || "string";
1301
- const desc = _chunkUPMRIVZBjs.stringField.call(void 0, field, "description");
1380
+ const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunk3IKGZ4CGjs.stringField.call(void 0, field, "type") || "string";
1381
+ const desc = _chunk3IKGZ4CGjs.stringField.call(void 0, field, "description");
1302
1382
  console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
1303
1383
  }
1304
1384
  }
1305
1385
  function printMonitorTypeFilterExamples(tool) {
1306
- const documentation = _chunkUPMRIVZBjs.recordField.call(void 0, tool, "documentation");
1307
- const fields = _chunkUPMRIVZBjs.recordField.call(void 0, documentation, "fields");
1386
+ const documentation = _chunk3IKGZ4CGjs.recordField.call(void 0, tool, "documentation");
1387
+ const fields = _chunk3IKGZ4CGjs.recordField.call(void 0, documentation, "fields");
1308
1388
  const examples = Object.entries(fields).flatMap(([name, rawField]) => {
1309
- const grammar = _chunkUPMRIVZBjs.recordField.call(void 0, _chunkUPMRIVZBjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
1310
- const example = _chunkUPMRIVZBjs.stringField.call(void 0, grammar, "example");
1389
+ const grammar = _chunk3IKGZ4CGjs.recordField.call(void 0, _chunk3IKGZ4CGjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
1390
+ const example = _chunk3IKGZ4CGjs.stringField.call(void 0, grammar, "example");
1311
1391
  const values = [
1312
- ..._chunkUPMRIVZBjs.arrayField.call(void 0, grammar, "examples").filter(
1392
+ ..._chunk3IKGZ4CGjs.arrayField.call(void 0, grammar, "examples").filter(
1313
1393
  (value) => typeof value === "string" && Boolean(value)
1314
1394
  ),
1315
1395
  ...example ? [example] : []
@@ -1324,21 +1404,21 @@ function printMonitorTypeFilterExamples(tool) {
1324
1404
  }
1325
1405
  }
1326
1406
  function printMonitorTypeStreams(tool) {
1327
- const streams = _chunkUPMRIVZBjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
1328
- _chunkUPMRIVZBjs.isRecord
1407
+ const streams = _chunk3IKGZ4CGjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
1408
+ _chunk3IKGZ4CGjs.isRecord
1329
1409
  );
1330
1410
  if (!streams.length) return;
1331
1411
  console.log("");
1332
1412
  console.log("Filter columns (a play's sqlListeners.where, per stream):");
1333
1413
  for (const stream of streams) {
1334
- const name = _chunkUPMRIVZBjs.stringField.call(void 0, stream, "stream");
1335
- const cols = _chunkUPMRIVZBjs.arrayField.call(void 0, stream, "columns").filter(_chunkUPMRIVZBjs.isRecord).map((col) => _chunkUPMRIVZBjs.stringField.call(void 0, col, "name")).filter(Boolean);
1414
+ const name = _chunk3IKGZ4CGjs.stringField.call(void 0, stream, "stream");
1415
+ const cols = _chunk3IKGZ4CGjs.arrayField.call(void 0, stream, "columns").filter(_chunk3IKGZ4CGjs.isRecord).map((col) => _chunk3IKGZ4CGjs.stringField.call(void 0, col, "name")).filter(Boolean);
1336
1416
  console.log(`- ${name}: ${cols.join(", ")}`);
1337
1417
  }
1338
1418
  }
1339
1419
  function monitorTypePricingLines(tool) {
1340
- const pricing = _chunkUPMRIVZBjs.recordField.call(void 0, tool, "pricing");
1341
- const byType = _chunkUPMRIVZBjs.recordField.call(void 0,
1420
+ const pricing = _chunk3IKGZ4CGjs.recordField.call(void 0, tool, "pricing");
1421
+ const byType = _chunk3IKGZ4CGjs.recordField.call(void 0,
1342
1422
  pricing,
1343
1423
  "pricing_by_radar_type",
1344
1424
  "pricingByRadarType"
@@ -1349,9 +1429,9 @@ function monitorTypePricingLines(tool) {
1349
1429
  }
1350
1430
  const lines = ["Pricing (Deepline credits per accepted event):"];
1351
1431
  for (const key of keys) {
1352
- const entry = _chunkUPMRIVZBjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
1432
+ const entry = _chunk3IKGZ4CGjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
1353
1433
  const credits = numberField(entry, "deepline_credits", "deeplineCredits");
1354
- const display = _chunkUPMRIVZBjs.stringField.call(void 0, entry, "display");
1434
+ const display = _chunk3IKGZ4CGjs.stringField.call(void 0, entry, "display");
1355
1435
  const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
1356
1436
  lines.push(`- ${key}: ${shown}`);
1357
1437
  }
@@ -1361,20 +1441,20 @@ function printMonitorTypePricing(tool) {
1361
1441
  for (const line of monitorTypePricingLines(tool)) console.log(line);
1362
1442
  }
1363
1443
  function printMonitorTypeDeploy(tool) {
1364
- const deploy = _chunkUPMRIVZBjs.recordField.call(void 0, tool, "deploy");
1365
- const toolId = _chunkUPMRIVZBjs.stringField.call(void 0, tool, "toolId");
1366
- const example = _chunkUPMRIVZBjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
1444
+ const deploy = _chunk3IKGZ4CGjs.recordField.call(void 0, tool, "deploy");
1445
+ const toolId = _chunk3IKGZ4CGjs.stringField.call(void 0, tool, "toolId");
1446
+ const example = _chunk3IKGZ4CGjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
1367
1447
  console.log("Deploy (a monitor type is deployed, not executed):");
1368
1448
  console.log(` ${example}`);
1369
1449
  }
1370
1450
  function printMonitorTypeContract(tool, requestedToolId) {
1371
- const toolId = _chunkUPMRIVZBjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
1451
+ const toolId = _chunk3IKGZ4CGjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
1372
1452
  console.log(toolId);
1373
- const displayName = _chunkUPMRIVZBjs.stringField.call(void 0, tool, "displayName");
1453
+ const displayName = _chunk3IKGZ4CGjs.stringField.call(void 0, tool, "displayName");
1374
1454
  if (displayName) console.log(`Best for: ${displayName}`);
1375
- const description = _chunkUPMRIVZBjs.stringField.call(void 0, tool, "description");
1455
+ const description = _chunk3IKGZ4CGjs.stringField.call(void 0, tool, "description");
1376
1456
  if (description) console.log(`Description: ${description}`);
1377
- const categories = _chunkUPMRIVZBjs.arrayField.call(void 0, tool, "categories").filter(
1457
+ const categories = _chunk3IKGZ4CGjs.arrayField.call(void 0, tool, "categories").filter(
1378
1458
  (v) => typeof v === "string"
1379
1459
  );
1380
1460
  if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
@@ -1394,31 +1474,31 @@ function printMonitorTypeContract(tool, requestedToolId) {
1394
1474
  console.log(`More: deepline describe ${toolId}`);
1395
1475
  }
1396
1476
  function toolGuidanceLines(guidance) {
1397
- const record = _chunkUPMRIVZBjs.isRecord.call(void 0, guidance) ? guidance : {};
1398
- const toolGuidance = _chunkUPMRIVZBjs.stringField.call(void 0, record, "tool");
1399
- const providerGuidance = _chunkUPMRIVZBjs.stringField.call(void 0, record, "provider");
1477
+ const record = _chunk3IKGZ4CGjs.isRecord.call(void 0, guidance) ? guidance : {};
1478
+ const toolGuidance = _chunk3IKGZ4CGjs.stringField.call(void 0, record, "tool");
1479
+ const providerGuidance = _chunk3IKGZ4CGjs.stringField.call(void 0, record, "provider");
1400
1480
  return [
1401
1481
  ...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
1402
1482
  ...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
1403
1483
  ];
1404
1484
  }
1405
1485
  function printCompactToolContract(tool, requestedToolId) {
1406
- if (_chunkUPMRIVZBjs.isMonitorTypeTool.call(void 0, tool)) {
1486
+ if (_chunk3IKGZ4CGjs.isMonitorTypeTool.call(void 0, tool)) {
1407
1487
  printMonitorTypeContract(tool, requestedToolId);
1408
1488
  return;
1409
1489
  }
1410
- const contract = _chunkUPMRIVZBjs.toolContractJsonForDescribe.call(void 0,
1490
+ const contract = _chunk3IKGZ4CGjs.toolContractJsonForDescribe.call(void 0,
1411
1491
  tool,
1412
1492
  requestedToolId,
1413
1493
  void 0,
1414
1494
  seedToolListScript
1415
1495
  );
1416
- const cost = _chunkUPMRIVZBjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
1417
- const getters = _chunkUPMRIVZBjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
1496
+ const cost = _chunk3IKGZ4CGjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
1497
+ const getters = _chunk3IKGZ4CGjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
1418
1498
  const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
1419
1499
  const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
1420
- const inputFields = _chunkUPMRIVZBjs.recursiveToolInputFieldsForDisplay.call(void 0,
1421
- _chunkUPMRIVZBjs.recordField.call(void 0, contract, "inputSchema")
1500
+ const inputFields = _chunk3IKGZ4CGjs.recursiveToolInputFieldsForDisplay.call(void 0,
1501
+ _chunk3IKGZ4CGjs.recordField.call(void 0, contract, "inputSchema")
1422
1502
  );
1423
1503
  console.log(String(contract.toolId));
1424
1504
  if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
@@ -1435,9 +1515,9 @@ function printCompactToolContract(tool, requestedToolId) {
1435
1515
  printToolOutputArrayShape(contract);
1436
1516
  printToolExecutionHints(contract);
1437
1517
  if (contract.deprecated === true) {
1438
- const deprecation = _chunkUPMRIVZBjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
1439
- const message = _chunkUPMRIVZBjs.stringField.call(void 0, deprecation, "message");
1440
- const replacementToolId = _chunkUPMRIVZBjs.stringField.call(void 0,
1518
+ const deprecation = _chunk3IKGZ4CGjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
1519
+ const message = _chunk3IKGZ4CGjs.stringField.call(void 0, deprecation, "message");
1520
+ const replacementToolId = _chunk3IKGZ4CGjs.stringField.call(void 0,
1441
1521
  deprecation,
1442
1522
  "replacementToolId",
1443
1523
  "replacement_tool_id"
@@ -1460,12 +1540,12 @@ function printCompactToolContract(tool, requestedToolId) {
1460
1540
  console.log("");
1461
1541
  console.log("Inputs:");
1462
1542
  for (const field of inputFields) {
1463
- if (!_chunkUPMRIVZBjs.isRecord.call(void 0, field)) continue;
1464
- const name = _chunkUPMRIVZBjs.stringField.call(void 0, field, "name");
1543
+ if (!_chunk3IKGZ4CGjs.isRecord.call(void 0, field)) continue;
1544
+ const name = _chunk3IKGZ4CGjs.stringField.call(void 0, field, "name");
1465
1545
  if (!name) continue;
1466
1546
  const required = field.required ? "*" : "";
1467
- const type = _chunkUPMRIVZBjs.stringField.call(void 0, field, "type") || "unknown";
1468
- const description = _chunkUPMRIVZBjs.stringField.call(void 0, field, "description");
1547
+ const type = _chunk3IKGZ4CGjs.stringField.call(void 0, field, "type") || "unknown";
1548
+ const description = _chunk3IKGZ4CGjs.stringField.call(void 0, field, "description");
1469
1549
  const enumValues = Array.isArray(field.enum) ? field.enum : [];
1470
1550
  const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
1471
1551
  const itemBoundsSuffix = arrayItemBoundsSuffix(field);
@@ -1480,8 +1560,8 @@ function printCompactToolContract(tool, requestedToolId) {
1480
1560
  }
1481
1561
  console.log("");
1482
1562
  printToolExamplesOnly(tool, requestedToolId);
1483
- const starterScript = _chunkUPMRIVZBjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
1484
- const starterPath = _chunkUPMRIVZBjs.stringField.call(void 0, starterScript, "path");
1563
+ const starterScript = _chunk3IKGZ4CGjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
1564
+ const starterPath = _chunk3IKGZ4CGjs.stringField.call(void 0, starterScript, "path");
1485
1565
  if (starterPath) {
1486
1566
  console.log("");
1487
1567
  console.log(`Starter script: ${starterPath}`);
@@ -1492,16 +1572,16 @@ function printCompactToolContract(tool, requestedToolId) {
1492
1572
  console.log("Getters:");
1493
1573
  if (listGetters.length) console.log(listGetterHeading());
1494
1574
  for (const entry of listGetters) {
1495
- if (_chunkUPMRIVZBjs.isRecord.call(void 0, entry))
1575
+ if (_chunk3IKGZ4CGjs.isRecord.call(void 0, entry))
1496
1576
  console.log(
1497
- `- ${_chunkUPMRIVZBjs.stringField.call(void 0, entry, "name")}: ${_chunkUPMRIVZBjs.playResultExpression.call(void 0, entry)}`
1577
+ `- ${_chunk3IKGZ4CGjs.stringField.call(void 0, entry, "name")}: ${_chunk3IKGZ4CGjs.playResultExpression.call(void 0, entry)}`
1498
1578
  );
1499
1579
  }
1500
1580
  if (valueGetters.length) console.log("Values:");
1501
1581
  for (const entry of valueGetters) {
1502
- if (_chunkUPMRIVZBjs.isRecord.call(void 0, entry))
1582
+ if (_chunk3IKGZ4CGjs.isRecord.call(void 0, entry))
1503
1583
  console.log(
1504
- `- ${_chunkUPMRIVZBjs.stringField.call(void 0, entry, "name")}: ${_chunkUPMRIVZBjs.playResultExpression.call(void 0, entry)}`
1584
+ `- ${_chunk3IKGZ4CGjs.stringField.call(void 0, entry, "name")}: ${_chunk3IKGZ4CGjs.playResultExpression.call(void 0, entry)}`
1505
1585
  );
1506
1586
  }
1507
1587
  }
@@ -1512,22 +1592,22 @@ function printCompactToolContract(tool, requestedToolId) {
1512
1592
  console.log(`More: deepline describe ${contract.toolId}`);
1513
1593
  }
1514
1594
  function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
1515
- if (_chunkUPMRIVZBjs.isMonitorTypeTool.call(void 0, tool)) {
1595
+ if (_chunk3IKGZ4CGjs.isMonitorTypeTool.call(void 0, tool)) {
1516
1596
  return monitorTypePricingLines(tool);
1517
1597
  }
1518
1598
  const toolId = String(tool.toolId || requestedToolId);
1519
- const cost = _chunkUPMRIVZBjs.Capability.fromCatalogEntry(tool).describe().customerCost();
1520
- const pricingModel = _chunkUPMRIVZBjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
1521
- const billing = _chunkUPMRIVZBjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunkUPMRIVZBjs.stringField.call(void 0, cost, "billingSource") || _chunkUPMRIVZBjs.stringField.call(void 0, cost, "billingMode") || "unknown";
1522
- const explicitUnit = _chunkUPMRIVZBjs.stringField.call(void 0, cost, "unit");
1599
+ const cost = _chunk3IKGZ4CGjs.Capability.fromCatalogEntry(tool).describe().customerCost();
1600
+ const pricingModel = _chunk3IKGZ4CGjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
1601
+ const billing = _chunk3IKGZ4CGjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunk3IKGZ4CGjs.stringField.call(void 0, cost, "billingSource") || _chunk3IKGZ4CGjs.stringField.call(void 0, cost, "billingMode") || "unknown";
1602
+ const explicitUnit = _chunk3IKGZ4CGjs.stringField.call(void 0, cost, "unit");
1523
1603
  const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
1524
1604
  const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
1525
1605
  const usd = numberField(cost, "deeplineUsdPerPricingUnit");
1526
- const displayText = _chunkUPMRIVZBjs.stringField.call(void 0, cost, "displayText");
1527
- const summary = _chunkUPMRIVZBjs.stringField.call(void 0, cost, "summary");
1606
+ const displayText = _chunk3IKGZ4CGjs.stringField.call(void 0, cost, "displayText");
1607
+ const summary = _chunk3IKGZ4CGjs.stringField.call(void 0, cost, "summary");
1528
1608
  const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
1529
1609
  const reference = cost.observedReference;
1530
- const observedMax = _chunkUPMRIVZBjs.observedMaxText.call(void 0, cost);
1610
+ const observedMax = _chunk3IKGZ4CGjs.observedMaxText.call(void 0, cost);
1531
1611
  return [
1532
1612
  `${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
1533
1613
  ...observedMax ? [` ${observedMax}`] : [],
@@ -1544,19 +1624,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
1544
1624
  console.log(line);
1545
1625
  }
1546
1626
  function printToolSchemaOnly(tool, requestedToolId) {
1547
- if (_chunkUPMRIVZBjs.isMonitorTypeTool.call(void 0, tool)) {
1627
+ if (_chunk3IKGZ4CGjs.isMonitorTypeTool.call(void 0, tool)) {
1548
1628
  printMonitorTypeFilters(tool);
1549
1629
  printMonitorTypeStreams(tool);
1550
1630
  return;
1551
1631
  }
1552
- const contract = _chunkUPMRIVZBjs.toolContractJsonForDescribe.call(void 0,
1632
+ const contract = _chunk3IKGZ4CGjs.toolContractJsonForDescribe.call(void 0,
1553
1633
  tool,
1554
1634
  requestedToolId,
1555
1635
  void 0,
1556
1636
  seedToolListScript
1557
1637
  );
1558
- const inputFields = _chunkUPMRIVZBjs.recursiveToolInputFieldsForDisplay.call(void 0,
1559
- _chunkUPMRIVZBjs.recordField.call(void 0, contract, "inputSchema")
1638
+ const inputFields = _chunk3IKGZ4CGjs.recursiveToolInputFieldsForDisplay.call(void 0,
1639
+ _chunk3IKGZ4CGjs.recordField.call(void 0, contract, "inputSchema")
1560
1640
  );
1561
1641
  console.log(`Schema: ${contract.toolId}`);
1562
1642
  if (!inputFields.length) {
@@ -1583,27 +1663,37 @@ function printToolSchemaOnly(tool, requestedToolId) {
1583
1663
  }
1584
1664
  printToolOutputArrayShape(contract);
1585
1665
  const declaredSchema = declaredToolJsonSchema(
1586
- _chunkUPMRIVZBjs.recordField.call(void 0, contract, "inputSchema")
1666
+ _chunk3IKGZ4CGjs.recordField.call(void 0, contract, "inputSchema")
1587
1667
  );
1588
1668
  if (declaredSchema) {
1589
1669
  console.log("Declared input JSON Schema:");
1590
1670
  console.log(JSON.stringify(declaredSchema, null, 2));
1591
1671
  }
1592
- if (_chunkUPMRIVZBjs.isRecord.call(void 0, contract.responseSchema)) {
1672
+ if (_chunk3IKGZ4CGjs.isRecord.call(void 0, contract.responseSchema)) {
1593
1673
  console.log("Deepline execution response JSON Schema:");
1594
1674
  console.log(JSON.stringify(contract.responseSchema, null, 2));
1595
1675
  }
1596
1676
  }
1597
1677
  function printToolExamplesOnly(tool, requestedToolId) {
1598
- if (_chunkUPMRIVZBjs.isMonitorTypeTool.call(void 0, tool)) {
1678
+ if (_chunk3IKGZ4CGjs.isMonitorTypeTool.call(void 0, tool)) {
1599
1679
  printMonitorTypeDeploy(tool);
1600
1680
  return;
1601
1681
  }
1602
- if (_chunkUPMRIVZBjs.isPlayLikeTool.call(void 0, tool)) {
1682
+ if (_chunk3IKGZ4CGjs.isMonitorVariantIndex.call(void 0, tool)) {
1683
+ console.log(
1684
+ `${requestedToolId} is deployed as one monitor type per radar type. Describe one for its example:`
1685
+ );
1686
+ for (const variant of _chunk3IKGZ4CGjs.arrayField.call(void 0, tool, "variants").filter(_chunk3IKGZ4CGjs.isRecord)) {
1687
+ const describeCommand = _chunk3IKGZ4CGjs.stringField.call(void 0, variant, "describeCommand");
1688
+ if (describeCommand) console.log(` ${describeCommand}`);
1689
+ }
1690
+ return;
1691
+ }
1692
+ if (_chunk3IKGZ4CGjs.isPlayLikeTool.call(void 0, tool)) {
1603
1693
  printPlayLikeToolUsage(tool, requestedToolId);
1604
1694
  return;
1605
1695
  }
1606
- const contract = _chunkUPMRIVZBjs.toolContractJsonForDescribe.call(void 0,
1696
+ const contract = _chunk3IKGZ4CGjs.toolContractJsonForDescribe.call(void 0,
1607
1697
  tool,
1608
1698
  requestedToolId,
1609
1699
  void 0,
@@ -1611,9 +1701,9 @@ function printToolExamplesOnly(tool, requestedToolId) {
1611
1701
  );
1612
1702
  const toolId = String(contract.toolId);
1613
1703
  const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
1614
- const examples = _chunkUPMRIVZBjs.arrayField.call(void 0, tool, "examples").filter(_chunkUPMRIVZBjs.isRecord);
1704
+ const examples = _chunk3IKGZ4CGjs.arrayField.call(void 0, tool, "examples").filter(_chunk3IKGZ4CGjs.isRecord);
1615
1705
  const firstExample = examples[0];
1616
- const sampleInput = firstExample && _chunkUPMRIVZBjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunkUPMRIVZBjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunkUPMRIVZBjs.samplePayloadForInputFields.call(void 0, inputFields)));
1706
+ const sampleInput = firstExample && _chunk3IKGZ4CGjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunk3IKGZ4CGjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunk3IKGZ4CGjs.samplePayloadForInputFields.call(void 0, inputFields)));
1617
1707
  console.log("Example input payload:");
1618
1708
  console.log(JSON.stringify(sampleInput, null, 2));
1619
1709
  console.log(`Use in a play:`);
@@ -1627,32 +1717,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
1627
1717
  );
1628
1718
  console.log("});");
1629
1719
  console.log("const response = result.toolResponse.rawV2;");
1630
- const getters = _chunkUPMRIVZBjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
1720
+ const getters = _chunk3IKGZ4CGjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
1631
1721
  const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
1632
1722
  const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
1633
- const firstGetter = valueGetters.find(_chunkUPMRIVZBjs.isRecord);
1723
+ const firstGetter = valueGetters.find(_chunk3IKGZ4CGjs.isRecord);
1634
1724
  if (firstGetter) {
1635
- const name = _chunkUPMRIVZBjs.stringField.call(void 0, firstGetter, "name") || "value";
1636
- const expression = _chunkUPMRIVZBjs.stringField.call(void 0, firstGetter, "expression");
1725
+ const name = _chunk3IKGZ4CGjs.stringField.call(void 0, firstGetter, "name") || "value";
1726
+ const expression = _chunk3IKGZ4CGjs.stringField.call(void 0, firstGetter, "expression");
1637
1727
  if (expression)
1638
1728
  console.log(
1639
1729
  `const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
1640
1730
  );
1641
1731
  }
1642
1732
  const arrayNames = new Set(
1643
- _chunkUPMRIVZBjs.recursiveToolInputFieldsForDisplay.call(void 0,
1644
- _chunkUPMRIVZBjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
1733
+ _chunk3IKGZ4CGjs.recursiveToolInputFieldsForDisplay.call(void 0,
1734
+ _chunk3IKGZ4CGjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
1645
1735
  ).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
1646
1736
  );
1647
1737
  const firstList = _nullishCoalesce(listGetters.find(
1648
- (entry) => _chunkUPMRIVZBjs.isRecord.call(void 0, entry) && arrayNames.has(_chunkUPMRIVZBjs.stringField.call(void 0, entry, "name"))
1649
- ), () => ( listGetters.find(_chunkUPMRIVZBjs.isRecord)));
1650
- if (_chunkUPMRIVZBjs.isRecord.call(void 0, firstList)) {
1651
- const name = safeIdentifier(_chunkUPMRIVZBjs.stringField.call(void 0, firstList, "name") || "list");
1738
+ (entry) => _chunk3IKGZ4CGjs.isRecord.call(void 0, entry) && arrayNames.has(_chunk3IKGZ4CGjs.stringField.call(void 0, entry, "name"))
1739
+ ), () => ( listGetters.find(_chunk3IKGZ4CGjs.isRecord)));
1740
+ if (_chunk3IKGZ4CGjs.isRecord.call(void 0, firstList)) {
1741
+ const name = safeIdentifier(_chunk3IKGZ4CGjs.stringField.call(void 0, firstList, "name") || "list");
1652
1742
  if (_chunkJ33TSWO5js.playToolListGetterMode.call(void 0, ) === "array") {
1653
- console.log(`const ${name}_rows = ${_chunkUPMRIVZBjs.playResultExpression.call(void 0, firstList)};`);
1743
+ console.log(`const ${name}_rows = ${_chunk3IKGZ4CGjs.playResultExpression.call(void 0, firstList)};`);
1654
1744
  } else {
1655
- console.log(`const ${name}_ds = ${_chunkUPMRIVZBjs.playResultExpression.call(void 0, firstList)};`);
1745
+ console.log(`const ${name}_ds = ${_chunk3IKGZ4CGjs.playResultExpression.call(void 0, firstList)};`);
1656
1746
  console.log(
1657
1747
  "// Complete small list from this response; throws above the memory cap."
1658
1748
  );
@@ -1662,7 +1752,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
1662
1752
  console.log("```");
1663
1753
  if (firstList) printListGetterConsumption();
1664
1754
  for (const example of examples) {
1665
- const description = _chunkUPMRIVZBjs.stringField.call(void 0, example, "description");
1755
+ const description = _chunk3IKGZ4CGjs.stringField.call(void 0, example, "description");
1666
1756
  if (description) console.log(description);
1667
1757
  console.log("Example Deepline execution response:");
1668
1758
  console.log(JSON.stringify(example.response, null, 2));
@@ -1677,14 +1767,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
1677
1767
  }
1678
1768
  function printPlayLikeToolUsage(tool, requestedToolId) {
1679
1769
  const toolId = String(tool.toolId || requestedToolId);
1680
- const inputFields = _chunkUPMRIVZBjs.toolInputFieldsForDisplay.call(void 0,
1681
- _chunkUPMRIVZBjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
1770
+ const inputFields = _chunk3IKGZ4CGjs.toolInputFieldsForDisplay.call(void 0,
1771
+ _chunk3IKGZ4CGjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
1682
1772
  );
1683
- const sampleInput = _chunkUPMRIVZBjs.samplePayloadForInputFields.call(void 0, inputFields);
1684
- const playReference = _chunkUPMRIVZBjs.playReferenceForTool.call(void 0, tool);
1773
+ const sampleInput = _chunk3IKGZ4CGjs.samplePayloadForInputFields.call(void 0, inputFields);
1774
+ const playReference = _chunk3IKGZ4CGjs.playReferenceForTool.call(void 0, tool);
1685
1775
  console.log("Run as a play:");
1686
1776
  console.log(
1687
- _chunkUPMRIVZBjs.playRunCommandForTool.call(void 0,
1777
+ _chunk3IKGZ4CGjs.playRunCommandForTool.call(void 0,
1688
1778
  tool,
1689
1779
  toolId,
1690
1780
  Object.keys(sampleInput).length ? sampleInput : void 0
@@ -1695,13 +1785,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
1695
1785
  }
1696
1786
  }
1697
1787
  function printToolGettersOnly(tool, requestedToolId) {
1698
- const contract = _chunkUPMRIVZBjs.toolContractJsonForDescribe.call(void 0,
1788
+ const contract = _chunk3IKGZ4CGjs.toolContractJsonForDescribe.call(void 0,
1699
1789
  tool,
1700
1790
  requestedToolId,
1701
1791
  void 0,
1702
1792
  seedToolListScript
1703
1793
  );
1704
- const getters = _chunkUPMRIVZBjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
1794
+ const getters = _chunk3IKGZ4CGjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
1705
1795
  const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
1706
1796
  const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
1707
1797
  console.log(`Getters: ${contract.toolId}`);
@@ -1712,9 +1802,9 @@ function printToolGettersOnly(tool, requestedToolId) {
1712
1802
  if (listGetters.length) {
1713
1803
  console.log(listGetterHeading());
1714
1804
  for (const entry of listGetters) {
1715
- if (_chunkUPMRIVZBjs.isRecord.call(void 0, entry))
1805
+ if (_chunk3IKGZ4CGjs.isRecord.call(void 0, entry))
1716
1806
  console.log(
1717
- `- ${_chunkUPMRIVZBjs.stringField.call(void 0, entry, "name")}: ${_chunkUPMRIVZBjs.playResultExpression.call(void 0, entry)}`
1807
+ `- ${_chunk3IKGZ4CGjs.stringField.call(void 0, entry, "name")}: ${_chunk3IKGZ4CGjs.playResultExpression.call(void 0, entry)}`
1718
1808
  );
1719
1809
  }
1720
1810
  printListGetterConsumption();
@@ -1722,9 +1812,9 @@ function printToolGettersOnly(tool, requestedToolId) {
1722
1812
  if (valueGetters.length) {
1723
1813
  console.log("Values:");
1724
1814
  for (const entry of valueGetters) {
1725
- if (_chunkUPMRIVZBjs.isRecord.call(void 0, entry))
1815
+ if (_chunk3IKGZ4CGjs.isRecord.call(void 0, entry))
1726
1816
  console.log(
1727
- `- ${_chunkUPMRIVZBjs.stringField.call(void 0, entry, "name")}: ${_chunkUPMRIVZBjs.playResultExpression.call(void 0, entry)}`
1817
+ `- ${_chunk3IKGZ4CGjs.stringField.call(void 0, entry, "name")}: ${_chunk3IKGZ4CGjs.playResultExpression.call(void 0, entry)}`
1728
1818
  );
1729
1819
  }
1730
1820
  }
@@ -1762,22 +1852,22 @@ function listedToolDescription(tool) {
1762
1852
  }
1763
1853
  function formatListedToolCost(tool) {
1764
1854
  const record = tool;
1765
- if (_chunkUPMRIVZBjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
1855
+ if (_chunk3IKGZ4CGjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
1766
1856
  return "Cost: Free";
1767
1857
  }
1768
- const pricing = _chunkUPMRIVZBjs.recordField.call(void 0, record, "pricing");
1769
- const displayText = _chunkUPMRIVZBjs.stringField.call(void 0, pricing, "displayText", "display_text");
1858
+ const pricing = _chunk3IKGZ4CGjs.recordField.call(void 0, record, "pricing");
1859
+ const displayText = _chunk3IKGZ4CGjs.stringField.call(void 0, pricing, "displayText", "display_text");
1770
1860
  return displayText ? `Cost: ${displayText}` : "";
1771
1861
  }
1772
1862
  function printToolOutputArrayShape(tool) {
1773
- const outputFields = _chunkUPMRIVZBjs.toolOutputFieldsForDisplay.call(void 0,
1774
- _chunkUPMRIVZBjs.recordField.call(void 0, _chunkUPMRIVZBjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
1863
+ const outputFields = _chunk3IKGZ4CGjs.toolOutputFieldsForDisplay.call(void 0,
1864
+ _chunk3IKGZ4CGjs.recordField.call(void 0, _chunk3IKGZ4CGjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
1775
1865
  );
1776
1866
  if (outputFields.length === 0) return;
1777
1867
  console.log(" Output array shape (declared schema):");
1778
1868
  for (const field of outputFields.slice(0, 60)) {
1779
1869
  const name = String(field.name);
1780
- const type = _chunkUPMRIVZBjs.stringField.call(void 0, field, "type") || "unknown";
1870
+ const type = _chunk3IKGZ4CGjs.stringField.call(void 0, field, "type") || "unknown";
1781
1871
  const itemBounds = arrayItemBoundsSuffix(field);
1782
1872
  console.log(` - ${name}: ${type}${itemBounds}`);
1783
1873
  }
@@ -1786,15 +1876,15 @@ function printToolOutputArrayShape(tool) {
1786
1876
  }
1787
1877
  }
1788
1878
  function declaredToolJsonSchema(inputSchema) {
1789
- if (_chunkUPMRIVZBjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
1879
+ if (_chunk3IKGZ4CGjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
1790
1880
  return inputSchema.jsonSchema;
1791
1881
  }
1792
1882
  return Array.isArray(inputSchema.fields) ? null : inputSchema;
1793
1883
  }
1794
1884
  function arrayItemBoundsSuffix(field) {
1795
- const itemSchema = _chunkUPMRIVZBjs.isRecord.call(void 0, field.items) ? field.items : null;
1796
- const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunkUPMRIVZBjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
1797
- const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _14 => _14.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
1885
+ const itemSchema = _chunk3IKGZ4CGjs.isRecord.call(void 0, field.items) ? field.items : null;
1886
+ const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunk3IKGZ4CGjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
1887
+ const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _16 => _16.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
1798
1888
  const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
1799
1889
  const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
1800
1890
  const maxItems = typeof field.maxItems === "number" && Number.isFinite(field.maxItems) ? field.maxItems : null;
@@ -1806,21 +1896,21 @@ function arrayItemBoundsSuffix(field) {
1806
1896
  return itemTypeSuffix;
1807
1897
  }
1808
1898
  function printToolExecutionHints(value) {
1809
- const batchCapabilityRecord = _chunkUPMRIVZBjs.recordField.call(void 0,
1810
- _chunkUPMRIVZBjs.isRecord.call(void 0, value) ? value : {},
1899
+ const batchCapabilityRecord = _chunk3IKGZ4CGjs.recordField.call(void 0,
1900
+ _chunk3IKGZ4CGjs.isRecord.call(void 0, value) ? value : {},
1811
1901
  "batchCapability",
1812
1902
  "batch_capability"
1813
1903
  );
1814
1904
  const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
1815
- const executionMetadata = _chunkUPMRIVZBjs.recordField.call(void 0,
1816
- _chunkUPMRIVZBjs.isRecord.call(void 0, value) ? value : {},
1905
+ const executionMetadata = _chunk3IKGZ4CGjs.recordField.call(void 0,
1906
+ _chunk3IKGZ4CGjs.isRecord.call(void 0, value) ? value : {},
1817
1907
  "executionMetadata",
1818
1908
  "execution_metadata"
1819
1909
  );
1820
1910
  if (batchCapability) {
1821
- const status = _chunkUPMRIVZBjs.stringField.call(void 0, batchCapability, "status") || "unknown";
1822
- const surface = _chunkUPMRIVZBjs.stringField.call(void 0, batchCapability, "surface");
1823
- const operation = _chunkUPMRIVZBjs.stringField.call(void 0,
1911
+ const status = _chunk3IKGZ4CGjs.stringField.call(void 0, batchCapability, "status") || "unknown";
1912
+ const surface = _chunk3IKGZ4CGjs.stringField.call(void 0, batchCapability, "surface");
1913
+ const operation = _chunk3IKGZ4CGjs.stringField.call(void 0,
1824
1914
  batchCapability,
1825
1915
  "batchOperation",
1826
1916
  "batch_operation"
@@ -1830,7 +1920,7 @@ function printToolExecutionHints(value) {
1830
1920
  "maxBatchSize",
1831
1921
  "max_batch_size"
1832
1922
  );
1833
- const notes = _chunkUPMRIVZBjs.stringField.call(void 0, batchCapability, "notes");
1923
+ const notes = _chunk3IKGZ4CGjs.stringField.call(void 0, batchCapability, "notes");
1834
1924
  console.log("");
1835
1925
  console.log("Batching:");
1836
1926
  console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
@@ -1849,11 +1939,11 @@ function printToolExecutionHints(value) {
1849
1939
  }
1850
1940
  if (notes) console.log(`- Details: ${notes}`);
1851
1941
  }
1852
- const configuredRateLimits = _chunkUPMRIVZBjs.arrayField.call(void 0,
1942
+ const configuredRateLimits = _chunk3IKGZ4CGjs.arrayField.call(void 0,
1853
1943
  executionMetadata,
1854
1944
  "configuredRateLimits",
1855
1945
  "configured_rate_limits"
1856
- ).filter(_chunkUPMRIVZBjs.isRecord);
1946
+ ).filter(_chunk3IKGZ4CGjs.isRecord);
1857
1947
  if (configuredRateLimits.length > 0) {
1858
1948
  console.log("");
1859
1949
  console.log(
@@ -1863,7 +1953,7 @@ function printToolExecutionHints(value) {
1863
1953
  const requests = numberField(limit, "requestsPerWindow");
1864
1954
  const windowMs = numberField(limit, "windowMs");
1865
1955
  if (requests === null || windowMs === null) continue;
1866
- const usage = _chunkUPMRIVZBjs.stringField.call(void 0, limit, "usage") || "unknown";
1956
+ const usage = _chunk3IKGZ4CGjs.stringField.call(void 0, limit, "usage") || "unknown";
1867
1957
  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;
1868
1958
  const explicitMaxConcurrency = numberField(
1869
1959
  limit,
@@ -1872,11 +1962,11 @@ function printToolExecutionHints(value) {
1872
1962
  );
1873
1963
  const concurrencyText = explicitMaxConcurrency === null ? "no explicit concurrency limit" : `explicit concurrency limit ${explicitMaxConcurrency}`;
1874
1964
  console.log(
1875
- `- ${requests} requests per ${formatRateWindow(windowMs)}${_chunk2WFPHBR4js.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
1965
+ `- ${requests} requests per ${formatRateWindow(windowMs)}${_chunkLY5MMXFFjs.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
1876
1966
  );
1877
1967
  }
1878
1968
  }
1879
- const queueHint = _chunkUPMRIVZBjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
1969
+ const queueHint = _chunk3IKGZ4CGjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
1880
1970
  const requestsPerSecondHint = numberField(
1881
1971
  queueHint,
1882
1972
  "requestsPerSecondHint",
@@ -1902,35 +1992,35 @@ function formatRateWindow(windowMs) {
1902
1992
  }
1903
1993
  function samplePayload(samples, key) {
1904
1994
  const entry = samples[key];
1905
- if (!_chunkUPMRIVZBjs.isRecord.call(void 0, entry)) return void 0;
1995
+ if (!_chunk3IKGZ4CGjs.isRecord.call(void 0, entry)) return void 0;
1906
1996
  return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
1907
1997
  }
1908
1998
  function commandEnvelopeFromRawResponse(rawResponse) {
1909
- return _chunkUPMRIVZBjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
1999
+ return _chunk3IKGZ4CGjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
1910
2000
  }
1911
2001
  function toolExecuteExitCode(envelope) {
1912
2002
  return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
1913
2003
  }
1914
2004
  function extractToolExecutionWarningMessages(rawResponse) {
1915
- if (!_chunkUPMRIVZBjs.isRecord.call(void 0, rawResponse)) return [];
2005
+ if (!_chunk3IKGZ4CGjs.isRecord.call(void 0, rawResponse)) return [];
1916
2006
  const candidates = [
1917
- _chunkUPMRIVZBjs.recordField.call(void 0, _chunkUPMRIVZBjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
1918
- _chunkUPMRIVZBjs.recordField.call(void 0,
1919
- _chunkUPMRIVZBjs.recordField.call(void 0, _chunkUPMRIVZBjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
2007
+ _chunk3IKGZ4CGjs.recordField.call(void 0, _chunk3IKGZ4CGjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
2008
+ _chunk3IKGZ4CGjs.recordField.call(void 0,
2009
+ _chunk3IKGZ4CGjs.recordField.call(void 0, _chunk3IKGZ4CGjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
1920
2010
  "meta"
1921
2011
  ),
1922
- _chunkUPMRIVZBjs.recordField.call(void 0, rawResponse, "meta"),
1923
- _chunkUPMRIVZBjs.recordField.call(void 0, _chunkUPMRIVZBjs.recordField.call(void 0, rawResponse, "result"), "meta")
2012
+ _chunk3IKGZ4CGjs.recordField.call(void 0, rawResponse, "meta"),
2013
+ _chunk3IKGZ4CGjs.recordField.call(void 0, _chunk3IKGZ4CGjs.recordField.call(void 0, rawResponse, "result"), "meta")
1924
2014
  ];
1925
2015
  const messages = [];
1926
2016
  for (const candidate of candidates) {
1927
- const warnings = _optionalChain([candidate, 'optionalAccess', _15 => _15.warnings]);
2017
+ const warnings = _optionalChain([candidate, 'optionalAccess', _17 => _17.warnings]);
1928
2018
  if (!Array.isArray(warnings)) continue;
1929
2019
  for (const warning of warnings) {
1930
2020
  if (typeof warning === "string" && warning.trim()) {
1931
2021
  messages.push(warning.trim());
1932
- } else if (_chunkUPMRIVZBjs.isRecord.call(void 0, warning)) {
1933
- const message = _chunkUPMRIVZBjs.stringField.call(void 0, warning, "message");
2022
+ } else if (_chunk3IKGZ4CGjs.isRecord.call(void 0, warning)) {
2023
+ const message = _chunk3IKGZ4CGjs.stringField.call(void 0, warning, "message");
1934
2024
  if (message) messages.push(message);
1935
2025
  }
1936
2026
  }
@@ -1938,32 +2028,32 @@ function extractToolExecutionWarningMessages(rawResponse) {
1938
2028
  return [...new Set(messages)];
1939
2029
  }
1940
2030
  function apifySyncRecoveryNext(rawResponse) {
1941
- if (!_chunkUPMRIVZBjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
1942
- const toolResponse = _chunkUPMRIVZBjs.recordField.call(void 0, rawResponse, "toolResponse");
1943
- const raw = _chunkUPMRIVZBjs.recordField.call(void 0, toolResponse, "raw");
2031
+ if (!_chunk3IKGZ4CGjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
2032
+ const toolResponse = _chunk3IKGZ4CGjs.recordField.call(void 0, rawResponse, "toolResponse");
2033
+ const raw = _chunk3IKGZ4CGjs.recordField.call(void 0, toolResponse, "raw");
1944
2034
  if (raw.state !== "awaiting_apify") return null;
1945
- const next = _chunkUPMRIVZBjs.recordField.call(void 0, raw, "next");
1946
- const getActorRun = _chunkUPMRIVZBjs.recordField.call(void 0, next, "getActorRun");
1947
- const getActorRunTool = _chunkUPMRIVZBjs.stringField.call(void 0, getActorRun, "tool");
1948
- const getActorRunPayload = _chunkUPMRIVZBjs.recordField.call(void 0, getActorRun, "payload");
2035
+ const next = _chunk3IKGZ4CGjs.recordField.call(void 0, raw, "next");
2036
+ const getActorRun = _chunk3IKGZ4CGjs.recordField.call(void 0, next, "getActorRun");
2037
+ const getActorRunTool = _chunk3IKGZ4CGjs.stringField.call(void 0, getActorRun, "tool");
2038
+ const getActorRunPayload = _chunk3IKGZ4CGjs.recordField.call(void 0, getActorRun, "payload");
1949
2039
  if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
1950
2040
  return null;
1951
2041
  }
1952
- const getDatasetItems = _chunkUPMRIVZBjs.recordField.call(void 0, next, "getDatasetItems");
1953
- const getDatasetItemsTool = _chunkUPMRIVZBjs.stringField.call(void 0, getDatasetItems, "tool");
1954
- const getDatasetItemsPayload = _chunkUPMRIVZBjs.recordField.call(void 0, getDatasetItems, "payload");
2042
+ const getDatasetItems = _chunk3IKGZ4CGjs.recordField.call(void 0, next, "getDatasetItems");
2043
+ const getDatasetItemsTool = _chunk3IKGZ4CGjs.stringField.call(void 0, getDatasetItems, "tool");
2044
+ const getDatasetItemsPayload = _chunk3IKGZ4CGjs.recordField.call(void 0, getDatasetItems, "payload");
1955
2045
  return {
1956
- getActorRun: `deepline run ${getActorRunTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
2046
+ getActorRun: `deepline run ${getActorRunTool} --input ${_chunkBVXIGOBZjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
1957
2047
  ...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
1958
- getDatasetItems: `deepline run ${getDatasetItemsTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getDatasetItemsPayload))}`
2048
+ getDatasetItems: `deepline run ${getDatasetItemsTool} --input ${_chunkBVXIGOBZjs.shellQuote.call(void 0, JSON.stringify(getDatasetItemsPayload))}`
1959
2049
  } : {}
1960
2050
  };
1961
2051
  }
1962
2052
  function listExtractorPathsFromUsageGuidance(tool) {
1963
- const toolExecutionResult = _optionalChain([tool, 'access', _16 => _16.usageGuidance, 'optionalAccess', _17 => _17.toolExecutionResult]);
1964
- const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists : _chunkUPMRIVZBjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _19 => _19.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
2053
+ const toolExecutionResult = _optionalChain([tool, 'access', _18 => _18.usageGuidance, 'optionalAccess', _19 => _19.toolExecutionResult]);
2054
+ const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _20 => _20.extractedLists])) ? toolExecutionResult.extractedLists : _chunk3IKGZ4CGjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _21 => _21.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
1965
2055
  return extractedLists.flatMap((entry) => {
1966
- const paths = _nullishCoalesce(_optionalChain([entry, 'access', _20 => _20.details, 'optionalAccess', _21 => _21.candidatePaths]), () => ( _optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.rawToolOutputPaths])));
2056
+ const paths = _nullishCoalesce(_optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.candidatePaths]), () => ( _optionalChain([entry, 'access', _24 => _24.details, 'optionalAccess', _25 => _25.rawToolOutputPaths])));
1967
2057
  if (!Array.isArray(paths)) return [];
1968
2058
  return paths.map(
1969
2059
  (path) => path.trim().replace(/^toolExecutionResult\.toolResponse\.raw\.?/, "").replace(/^toolExecutionResult\.toolOutput\.raw\.?/, "").replace(/^\./, "")
@@ -2017,10 +2107,7 @@ function readJsonArgument(raw, flagName) {
2017
2107
  throw new Error(`Invalid ${flagName} value: empty @file path.`);
2018
2108
  }
2019
2109
  try {
2020
- return _fs.readFileSync.call(void 0, resolveAtFilePath(filePath), "utf8").replace(
2021
- /^\uFEFF/,
2022
- ""
2023
- );
2110
+ return jsonFileText(_fs.readFileSync.call(void 0, resolveAtFilePath(filePath)));
2024
2111
  } catch (error) {
2025
2112
  const message = error instanceof Error ? error.message : String(error);
2026
2113
  throw new Error(
@@ -2046,7 +2133,7 @@ function parseJsonObjectArgument(raw, flagName) {
2046
2133
  }
2047
2134
  throw invalidJsonError(flagName, message);
2048
2135
  }
2049
- if (!_chunkUPMRIVZBjs.isRecord.call(void 0, parsed)) {
2136
+ if (!_chunk3IKGZ4CGjs.isRecord.call(void 0, parsed)) {
2050
2137
  throw invalidJsonError(flagName, "expected an object.");
2051
2138
  }
2052
2139
  return parsed;
@@ -2064,33 +2151,37 @@ function parseExecuteOptions(toolId, options, output) {
2064
2151
  `Usage: deepline tools execute <toolId> [--param key=value ...] [--input '{"k":"v"}'] [--timeout <duration>] [--recover | --idempotency-key <key>] [--recovery-timeout-ms <ms>] [--out rows.csv] [--output-format auto|csv|csv_file|json|json_file] [--no-preview]`
2065
2152
  );
2066
2153
  }
2067
- const params = {};
2154
+ const paramFlags = parseParamFlags(_nullishCoalesce(options.param, () => ( [])));
2155
+ const jsonParams = {};
2068
2156
  let outputFormat = output.requested ? "json" : "auto";
2069
2157
  let recoveryTimeoutMs;
2070
- for (const kv of _nullishCoalesce(options.param, () => ( []))) {
2071
- const eqIdx = kv.indexOf("=");
2072
- if (eqIdx > 0) params[kv.slice(0, eqIdx)] = kv.slice(eqIdx + 1);
2073
- }
2074
2158
  if (output.legacyInput !== void 0) {
2075
2159
  Object.assign(
2076
- params,
2160
+ jsonParams,
2077
2161
  parseJsonObjectArgument(output.legacyInput, "--json")
2078
2162
  );
2079
2163
  }
2080
2164
  if (options.input !== void 0) {
2081
- Object.assign(params, parseJsonObjectArgument(options.input, "--input"));
2165
+ Object.assign(
2166
+ jsonParams,
2167
+ parseJsonObjectArgument(options.input, "--input")
2168
+ );
2082
2169
  }
2083
2170
  if (options.payload !== void 0) {
2084
2171
  Object.assign(
2085
- params,
2172
+ jsonParams,
2086
2173
  parseJsonObjectArgument(options.payload, "--payload")
2087
2174
  );
2088
2175
  }
2176
+ const params = {
2177
+ ...paramFlags.params,
2178
+ ...jsonParams
2179
+ };
2089
2180
  if (options.outputFormat !== void 0) {
2090
2181
  outputFormat = normalizeOutputFormat(options.outputFormat);
2091
2182
  }
2092
2183
  if (options.idempotencyKey !== void 0) {
2093
- _chunkPFO3ISXAjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
2184
+ _chunkOVEYWO4Hjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
2094
2185
  }
2095
2186
  if (options.connection !== void 0 && (options.recover || options.idempotencyKey !== void 0)) {
2096
2187
  throw new Error(
@@ -2107,6 +2198,10 @@ function parseExecuteOptions(toolId, options, output) {
2107
2198
  return {
2108
2199
  toolId,
2109
2200
  params,
2201
+ // -p values a JSON flag did not replace, which may need a typed value.
2202
+ typedParamCandidates: paramFlags.typedCandidates.filter(
2203
+ (key) => !Object.hasOwn(jsonParams, key)
2204
+ ),
2110
2205
  outputFormat,
2111
2206
  noPreview: options.preview === false,
2112
2207
  outPath: options.out !== void 0 ? _path.resolve.call(void 0, options.out) : null,
@@ -2196,13 +2291,13 @@ export default async function () {
2196
2291
  path: scriptPath,
2197
2292
  sourceCode: script,
2198
2293
  projectDir,
2199
- macCopyCommand: `mkdir -p ${_chunkAID3OYVJjs.shellQuote.call(void 0, projectDir)} && cp ${_chunkAID3OYVJjs.shellQuote.call(void 0, scriptPath)} ${_chunkAID3OYVJjs.shellQuote.call(void 0, `${projectDir}/${fileName}`)}`,
2294
+ macCopyCommand: `mkdir -p ${_chunkBVXIGOBZjs.shellQuote.call(void 0, projectDir)} && cp ${_chunkBVXIGOBZjs.shellQuote.call(void 0, scriptPath)} ${_chunkBVXIGOBZjs.shellQuote.call(void 0, `${projectDir}/${fileName}`)}`,
2200
2295
  windowsCopyCommand: `New-Item -ItemType Directory -Force -Path ${powerShellQuote(projectDir.replace(/\//g, "\\"))} | Out-Null; Copy-Item -LiteralPath ${powerShellQuote(scriptPath)} -Destination ${powerShellQuote(`${projectDir.replace(/\//g, "\\")}\\${fileName}`)}`
2201
2296
  };
2202
2297
  }
2203
2298
  function toolExecutionInspection(input) {
2204
2299
  return {
2205
- inspect: input.idempotencyKey !== void 0 ? `deepline executions get --idempotency-key ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.idempotencyKey)}` : `deepline describe ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.toolId)}`,
2300
+ inspect: input.idempotencyKey !== void 0 ? `deepline executions get --idempotency-key ${_chunkBVXIGOBZjs.shellQuote.call(void 0, input.idempotencyKey)}` : `deepline describe ${_chunkBVXIGOBZjs.shellQuote.call(void 0, input.toolId)}`,
2206
2301
  inspectDescription: input.idempotencyKey !== void 0 ? "Read the saved execution without starting new work." : "Read the tool contract; this unkeyed call has no saved recovery identity."
2207
2302
  };
2208
2303
  }
@@ -2225,12 +2320,12 @@ function buildToolExecuteBaseEnvelope(input) {
2225
2320
  kind: summaryEntries.length > 0 ? "object" : "raw",
2226
2321
  summary: input.summary
2227
2322
  };
2228
- const envelopeHasCanonicalOutput = _chunkUPMRIVZBjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
2323
+ const envelopeHasCanonicalOutput = _chunk3IKGZ4CGjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
2229
2324
  const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
2230
2325
  envelope,
2231
2326
  "output"
2232
2327
  );
2233
- const billingLookup = typeof envelope.job_id === "string" && envelope.job_id.trim() ? `deepline billing usage --request-id ${_chunkAID3OYVJjs.shellQuote.call(void 0, envelope.job_id)}` : null;
2328
+ const billingLookup = typeof envelope.job_id === "string" && envelope.job_id.trim() ? `deepline billing usage --request-id ${_chunkBVXIGOBZjs.shellQuote.call(void 0, envelope.job_id)}` : null;
2234
2329
  const inspection = toolExecutionInspection(input);
2235
2330
  const actions = input.listConversion ? [
2236
2331
  {
@@ -2253,7 +2348,7 @@ function buildToolExecuteBaseEnvelope(input) {
2253
2348
  return {
2254
2349
  ...envelope,
2255
2350
  ...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
2256
- ..._chunkUPMRIVZBjs.isRecord.call(void 0, input.rawResponse) && _chunkUPMRIVZBjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
2351
+ ..._chunk3IKGZ4CGjs.isRecord.call(void 0, input.rawResponse) && _chunk3IKGZ4CGjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
2257
2352
  ...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
2258
2353
  ...summaryEntries.length > 0 ? { summary: input.summary } : {},
2259
2354
  ...warningMessages.length > 0 ? { warnings: warningMessages } : {},
@@ -2314,7 +2409,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
2314
2409
  void _render;
2315
2410
  void _next;
2316
2411
  void _local;
2317
- const billingLookup = _chunkUPMRIVZBjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
2412
+ const billingLookup = _chunk3IKGZ4CGjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
2318
2413
  const inspection = toolExecutionInspection(input);
2319
2414
  return {
2320
2415
  ...base,
@@ -2396,7 +2491,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
2396
2491
  };
2397
2492
  }
2398
2493
  function printToolExecutionWarnings(toolId, params, metadata) {
2399
- if (_optionalChain([metadata, 'access', _24 => _24.deprecation, 'optionalAccess', _25 => _25.message])) {
2494
+ if (_optionalChain([metadata, 'access', _26 => _26.deprecation, 'optionalAccess', _27 => _27.message])) {
2400
2495
  console.error(
2401
2496
  `Warning: ${toolId} is deprecated. ${metadata.deprecation.message}`
2402
2497
  );
@@ -2410,8 +2505,8 @@ function printToolExecutionWarnings(toolId, params, metadata) {
2410
2505
  }
2411
2506
  }
2412
2507
  function assertExecutableToolMetadata(toolId, metadata) {
2413
- if (_chunkUPMRIVZBjs.isPlayLikeTool.call(void 0, metadata)) {
2414
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
2508
+ if (_chunk3IKGZ4CGjs.isPlayLikeTool.call(void 0, metadata)) {
2509
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
2415
2510
  playLikeToolExecuteErrorMessage(
2416
2511
  toolId,
2417
2512
  metadata
@@ -2428,7 +2523,7 @@ function valueAt(value, path) {
2428
2523
  for (const [index, part] of parts.entries()) {
2429
2524
  const each = part === "*" || part.endsWith("[*]");
2430
2525
  if (part !== "*") {
2431
- at = _chunkUPMRIVZBjs.isRecord.call(void 0, at) ? at[each ? part.slice(0, -3) : part] : void 0;
2526
+ at = _chunk3IKGZ4CGjs.isRecord.call(void 0, at) ? at[each ? part.slice(0, -3) : part] : void 0;
2432
2527
  }
2433
2528
  if (!each) continue;
2434
2529
  if (!Array.isArray(at)) return void 0;
@@ -2440,18 +2535,18 @@ function valueAt(value, path) {
2440
2535
  return at;
2441
2536
  }
2442
2537
  function declaredOutputs(metadata, envelope, data) {
2443
- const result = _optionalChain([metadata, 'access', _26 => _26.usageGuidance, 'optionalAccess', _27 => _27.toolExecutionResult]);
2538
+ const result = _optionalChain([metadata, 'access', _28 => _28.usageGuidance, 'optionalAccess', _29 => _29.toolExecutionResult]);
2444
2539
  const getters = ["extractedValues", "extractedLists"].flatMap(
2445
2540
  (kind) => {
2446
- const group = _optionalChain([result, 'optionalAccess', _28 => _28[kind]]);
2447
- return Array.isArray(group) ? group : _chunkUPMRIVZBjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
2541
+ const group = _optionalChain([result, 'optionalAccess', _30 => _30[kind]]);
2542
+ return Array.isArray(group) ? group : _chunk3IKGZ4CGjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
2448
2543
  name,
2449
2544
  ...getter
2450
2545
  })) : [];
2451
2546
  }
2452
2547
  );
2453
2548
  return getters.flatMap((getter) => {
2454
- const paths = _nullishCoalesce(_nullishCoalesce(_optionalChain([getter, 'access', _29 => _29.details, 'optionalAccess', _30 => _30.rawToolOutputPaths]), () => ( _optionalChain([getter, 'access', _31 => _31.details, 'optionalAccess', _32 => _32.candidatePaths]))), () => ( []));
2549
+ const paths = _nullishCoalesce(_nullishCoalesce(_optionalChain([getter, 'access', _31 => _31.details, 'optionalAccess', _32 => _32.rawToolOutputPaths]), () => ( _optionalChain([getter, 'access', _33 => _33.details, 'optionalAccess', _34 => _34.candidatePaths]))), () => ( []));
2455
2550
  for (const path of paths) {
2456
2551
  const value = valueAt(envelope, path);
2457
2552
  if (value === void 0) continue;
@@ -2469,13 +2564,13 @@ function declaredOutputs(metadata, envelope, data) {
2469
2564
  }
2470
2565
  function writeToolReceipt(input) {
2471
2566
  const { response, metadata } = input;
2472
- const envelope = _chunkUPMRIVZBjs.isRecord.call(void 0, response) ? response : {};
2567
+ const envelope = _chunk3IKGZ4CGjs.isRecord.call(void 0, response) ? response : {};
2473
2568
  const jobId = typeof envelope.job_id === "string" ? envelope.job_id : null;
2474
- const toolResponse = _chunkUPMRIVZBjs.recordField.call(void 0, envelope, "toolResponse");
2569
+ const toolResponse = _chunk3IKGZ4CGjs.recordField.call(void 0, envelope, "toolResponse");
2475
2570
  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;
2476
2571
  const status = typeof envelope.status === "string" ? envelope.status : "completed";
2477
- const charged = _chunkUPMRIVZBjs.recordField.call(void 0, envelope, "billing").credits_charged;
2478
- _chunk6YCA5NKJjs.writeExecutionOutput.call(void 0,
2572
+ const charged = _chunk3IKGZ4CGjs.recordField.call(void 0, envelope, "billing").credits_charged;
2573
+ _chunkUYCZFQYQjs.writeExecutionOutput.call(void 0,
2479
2574
  {
2480
2575
  id: _nullishCoalesce(input.key, () => ( jobId)),
2481
2576
  status,
@@ -2492,7 +2587,7 @@ function writeToolReceipt(input) {
2492
2587
  ...apifySyncRecoveryNext(response),
2493
2588
  ...input.key ? { status: `deepline runs get ${input.key}` } : {},
2494
2589
  ...jobId ? {
2495
- billing: `deepline billing usage --request-id ${_chunkAID3OYVJjs.shellQuote.call(void 0, jobId)} --json`
2590
+ billing: `deepline billing usage --request-id ${_chunkBVXIGOBZjs.shellQuote.call(void 0, jobId)} --json`
2496
2591
  } : {}
2497
2592
  }
2498
2593
  },
@@ -2506,14 +2601,14 @@ async function executeToolForReceipt(input) {
2506
2601
  let retryKey = null;
2507
2602
  let received = false;
2508
2603
  try {
2509
- const cliInvocationId = _nullishCoalesce(_chunkADRC5I3Rjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkADRC5I3Rjs.beginToolExecuteCommand.call(void 0, )));
2510
- const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
2604
+ const cliInvocationId = _nullishCoalesce(_chunk7OWI736Ejs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunk7OWI736Ejs.beginToolExecuteCommand.call(void 0, )));
2605
+ const client = new (0, _chunkDUBXUAAOjs.DeeplineClient)();
2511
2606
  const metadata = assertExecutableToolMetadata(
2512
2607
  toolId,
2513
2608
  await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
2514
2609
  );
2515
2610
  printToolExecutionWarnings(toolId, params, metadata);
2516
- const responseIntent = _optionalChain([output, 'access', _33 => _33.csvOut, 'optionalAccess', _34 => _34.length]) ? "row_artifact" : "raw";
2611
+ const responseIntent = _optionalChain([output, 'access', _35 => _35.csvOut, 'optionalAccess', _36 => _36.length]) ? "row_artifact" : "raw";
2517
2612
  const recovery = ToolCallRecovery.open({
2518
2613
  toolId,
2519
2614
  params,
@@ -2523,14 +2618,24 @@ async function executeToolForReceipt(input) {
2523
2618
  });
2524
2619
  key = _nullishCoalesce(recovery.idempotencyKey, () => ( null));
2525
2620
  retryKey = recovery;
2526
- const response = await client.executeTool(toolId, params, {
2621
+ const warnings = [];
2622
+ const call = (idempotencyKey) => client.executeTool(toolId, params, {
2527
2623
  responseIntent,
2528
2624
  ...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
2529
- ..._optionalChain([metadata, 'access', _35 => _35.executionMetadata, 'optionalAccess', _36 => _36.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
2530
- ...key ? { idempotencyKey: key } : {},
2531
- searchRef: _chunkJWUAX6OPjs.recentSearchRef.call(void 0, toolId),
2625
+ ..._optionalChain([metadata, 'access', _37 => _37.executionMetadata, 'optionalAccess', _38 => _38.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
2626
+ ...idempotencyKey ? { idempotencyKey } : {},
2627
+ searchRef: _chunkFBAFX43Wjs.recentSearchRef.call(void 0, toolId),
2532
2628
  cliInvocationId,
2533
- onResponseReceived: _chunk6YCA5NKJjs.recordApiResponse
2629
+ onResponseReceived: _chunkUYCZFQYQjs.recordApiResponse
2630
+ });
2631
+ const response = await call(key).catch((error) => {
2632
+ if (!key || !refusedRetryKey(error)) throw error;
2633
+ recovery.discard();
2634
+ key = null;
2635
+ const warning = `${toolId} cannot be resumed with a retry key, so this call runs without one. If it is interrupted, running it again calls the provider again.`;
2636
+ warnings.push(warning);
2637
+ console.error(warning);
2638
+ return call(null);
2534
2639
  }).catch((error) => {
2535
2640
  const guidance = toolGuidanceLines(metadata.guidance);
2536
2641
  if (guidance.length)
@@ -2543,21 +2648,25 @@ async function executeToolForReceipt(input) {
2543
2648
  metadata,
2544
2649
  response,
2545
2650
  output,
2546
- warnings: recovery.resumed ? [
2547
- "Resumed an interrupted call with its saved retry key; it was not charged again. --fresh calls the provider again."
2548
- ] : []
2651
+ warnings: [
2652
+ ...warnings,
2653
+ // Only a call that still carries its saved key was replayed.
2654
+ ...recovery.resumed && key ? [
2655
+ "Resumed an interrupted call with its saved retry key; it was not charged again. --fresh calls the provider again."
2656
+ ] : []
2657
+ ]
2549
2658
  });
2550
2659
  await recovery.acknowledgeDelivery();
2551
2660
  return code;
2552
2661
  } catch (error) {
2553
2662
  if (received) throw error;
2554
2663
  const outcomeKnown = answeredWithFailure(error);
2555
- if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _37 => _37.discard, 'call', _38 => _38()]);
2556
- _chunk6YCA5NKJjs.writeExecutionOutput.call(void 0,
2664
+ if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _39 => _39.discard, 'call', _40 => _40()]);
2665
+ _chunkUYCZFQYQjs.writeExecutionOutput.call(void 0,
2557
2666
  {
2558
2667
  id: outcomeKnown ? null : key,
2559
2668
  status: "failed",
2560
- error: _chunkVQALXEXOjs.errorToJsonPayload.call(void 0, error).error,
2669
+ error: _chunkYQKCH4R7js.errorToJsonPayload.call(void 0, error).error,
2561
2670
  ...key && !outcomeKnown ? {
2562
2671
  next: {
2563
2672
  retry: "Run the same command again: it picks up this call without paying twice."
@@ -2569,16 +2678,31 @@ async function executeToolForReceipt(input) {
2569
2678
  return 1;
2570
2679
  }
2571
2680
  }
2681
+ function refusedRetryKey(error) {
2682
+ return error instanceof _chunkLFQJW4S2js.DeeplineError && error.statusCode === 422 && error.code === "IDEMPOTENCY_NOT_SUPPORTED" && // The server's own answer to the keyed POST carries its response body.
2683
+ // The SDK raises the same code locally when a recovery read finds no
2684
+ // support after a POST that may have been dispatched; that one must keep
2685
+ // its key and report an unknown outcome, never call again.
2686
+ serverBodyHasCode(_optionalChain([error, 'access', _41 => _41.details, 'optionalAccess', _42 => _42.response]), "IDEMPOTENCY_NOT_SUPPORTED");
2687
+ }
2688
+ function serverBodyHasCode(body, code) {
2689
+ if (!body || typeof body !== "object") return false;
2690
+ const record = body;
2691
+ if (record.code === code) return true;
2692
+ return serverBodyHasCode(record.error, code);
2693
+ }
2572
2694
  function answeredWithFailure(error) {
2573
- return error instanceof _chunkBBTKAASQjs.DeeplineError && typeof error.statusCode === "number" && error.statusCode < 500 && // A request timeout says nothing about whether the call went through.
2574
- error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN";
2695
+ return error instanceof _chunkLFQJW4S2js.DeeplineError && typeof error.statusCode === "number" && error.statusCode < 500 && // A request timeout says nothing about whether the call went through.
2696
+ error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN" && // The SDK's own "no recovery support" after a keyed POST is not the
2697
+ // server's answer: that POST may have run, so its key must survive.
2698
+ !(error.code === "IDEMPOTENCY_NOT_SUPPORTED" && !serverBodyHasCode(_optionalChain([error, 'access', _43 => _43.details, 'optionalAccess', _44 => _44.response]), "IDEMPOTENCY_NOT_SUPPORTED"));
2575
2699
  }
2576
2700
  async function getToolExecutionReceipt(key, output) {
2577
- const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
2701
+ const client = new (0, _chunkDUBXUAAOjs.DeeplineClient)();
2578
2702
  const execution = await client.executions.getByKey(key);
2579
2703
  output.label = `${execution.toolId} (tool)`;
2580
2704
  if (execution.response === void 0) {
2581
- _chunk6YCA5NKJjs.writeExecutionOutput.call(void 0,
2705
+ _chunkUYCZFQYQjs.writeExecutionOutput.call(void 0,
2582
2706
  {
2583
2707
  id: key,
2584
2708
  status: execution.executionRecovery.state,
@@ -2607,19 +2731,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2607
2731
  parsed = parseExecuteOptions(toolId, options, output);
2608
2732
  } catch (error) {
2609
2733
  if (wantsJson) {
2610
- _chunkVQALXEXOjs.printJsonError.call(void 0, error);
2734
+ _chunkYQKCH4R7js.printJsonError.call(void 0, error);
2611
2735
  } else {
2612
2736
  console.error(error instanceof Error ? error.message : String(error));
2613
2737
  }
2614
- return error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
2738
+ return error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
2615
2739
  }
2616
- const cliInvocationId = _nullishCoalesce(_chunkADRC5I3Rjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkADRC5I3Rjs.beginToolExecuteCommand.call(void 0, )));
2740
+ const cliInvocationId = _nullishCoalesce(_chunk7OWI736Ejs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunk7OWI736Ejs.beginToolExecuteCommand.call(void 0, )));
2617
2741
  const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
2618
- const tracing = _chunkMF2GHZDOjs.isCliTraceEnabled.call(void 0, );
2742
+ const tracing = _chunkGRZENGNEjs.isCliTraceEnabled.call(void 0, );
2619
2743
  const clientStartedAt = tracing ? performance.now() : void 0;
2620
- const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
2744
+ const client = new (0, _chunkDUBXUAAOjs.DeeplineClient)();
2621
2745
  if (clientStartedAt !== void 0) {
2622
- _chunkMF2GHZDOjs.recordCliTrace.call(void 0, {
2746
+ _chunkGRZENGNEjs.recordCliTrace.call(void 0, {
2623
2747
  phase: "cli.tool_execute_client_setup",
2624
2748
  ms: performance.now() - clientStartedAt
2625
2749
  });
@@ -2628,18 +2752,18 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2628
2752
  const readMetadata = async () => {
2629
2753
  if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
2630
2754
  try {
2631
- metadata = await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
2755
+ metadata = await _chunk7OWI736Ejs.runToolExecuteStage.call(void 0,
2632
2756
  "tool metadata lookup",
2633
2757
  () => client.getTool(parsed.toolId, { cliInvocationId })
2634
2758
  );
2635
2759
  } catch (error) {
2636
2760
  if (isMissingToolMetadataError(error)) {
2637
- const play = await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
2761
+ const play = await _chunk7OWI736Ejs.runToolExecuteStage.call(void 0,
2638
2762
  "play alias lookup",
2639
2763
  () => findPlayForToolId(client, parsed.toolId, cliInvocationId)
2640
2764
  );
2641
2765
  if (play) {
2642
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
2766
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
2643
2767
  playAliasToolErrorMessage(parsed.toolId, play),
2644
2768
  400,
2645
2769
  "PLAY_ALIAS_USED_AS_TOOL"
@@ -2650,6 +2774,28 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2650
2774
  }
2651
2775
  return assertExecutableToolMetadata(parsed.toolId, metadata);
2652
2776
  };
2777
+ const commandParams = { ...parsed.params };
2778
+ if (parsed.typedParamCandidates.length > 0) {
2779
+ let toolMetadata;
2780
+ try {
2781
+ toolMetadata = await readMetadata();
2782
+ } catch (error) {
2783
+ if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
2784
+ if (wantsJson) _chunkYQKCH4R7js.printJsonError.call(void 0, error);
2785
+ else console.error(error.message);
2786
+ return 2;
2787
+ }
2788
+ }
2789
+ if (toolMetadata) {
2790
+ for (const key of parsed.typedParamCandidates) {
2791
+ parsed.params[key] = typedParamValue(
2792
+ toolMetadata.inputSchema,
2793
+ key,
2794
+ String(parsed.params[key])
2795
+ );
2796
+ }
2797
+ }
2798
+ }
2653
2799
  let executionWarningsPrinted = false;
2654
2800
  if (deferredCompatibility) {
2655
2801
  let preflightCompatibility;
@@ -2662,20 +2808,20 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2662
2808
  try {
2663
2809
  assertExecutableToolMetadata(parsed.toolId, metadata);
2664
2810
  } catch (error) {
2665
- if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
2666
- if (wantsJson) _chunkVQALXEXOjs.printJsonError.call(void 0, error);
2811
+ if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
2812
+ if (wantsJson) _chunkYQKCH4R7js.printJsonError.call(void 0, error);
2667
2813
  else console.error(error.message);
2668
2814
  return 2;
2669
2815
  }
2670
2816
  throw error;
2671
2817
  }
2672
2818
  }
2673
- if (!metadata && _optionalChain([preflightCompatibility, 'optionalAccess', _39 => _39.response, 'optionalAccess', _40 => _40.update_required]) !== true && !_optionalChain([preflightCompatibility, 'optionalAccess', _41 => _41.error])) {
2819
+ if (!metadata && _optionalChain([preflightCompatibility, 'optionalAccess', _45 => _45.response, 'optionalAccess', _46 => _46.update_required]) !== true && !_optionalChain([preflightCompatibility, 'optionalAccess', _47 => _47.error])) {
2674
2820
  try {
2675
2821
  metadata = await readMetadata();
2676
2822
  } catch (error) {
2677
- if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
2678
- if (wantsJson) _chunkVQALXEXOjs.printJsonError.call(void 0, error);
2823
+ if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
2824
+ if (wantsJson) _chunkYQKCH4R7js.printJsonError.call(void 0, error);
2679
2825
  else console.error(error.message);
2680
2826
  return 2;
2681
2827
  }
@@ -2690,8 +2836,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2690
2836
  try {
2691
2837
  metadata = await readMetadata();
2692
2838
  } catch (error) {
2693
- if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
2694
- if (wantsJson) _chunkVQALXEXOjs.printJsonError.call(void 0, error);
2839
+ if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
2840
+ if (wantsJson) _chunkYQKCH4R7js.printJsonError.call(void 0, error);
2695
2841
  else console.error(error.message);
2696
2842
  return 2;
2697
2843
  }
@@ -2702,7 +2848,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2702
2848
  const responseIntent = parsed.outPath || parsed.outputFormat === "csv" || parsed.outputFormat === "csv_file" ? "row_artifact" : "raw";
2703
2849
  const recovery = ToolCallRecovery.open({
2704
2850
  toolId: parsed.toolId,
2705
- params: parsed.params,
2851
+ params: commandParams,
2706
2852
  responseIntent,
2707
2853
  recover: parsed.recover,
2708
2854
  idempotencyKey: parsed.idempotencyKey
@@ -2718,11 +2864,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2718
2864
  ...parsed.connection !== void 0 ? { connection: parsed.connection } : {},
2719
2865
  ...idempotencyKey ? { idempotencyKey } : {},
2720
2866
  ...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
2721
- searchRef: _chunkJWUAX6OPjs.recentSearchRef.call(void 0, parsed.toolId),
2867
+ searchRef: _chunkFBAFX43Wjs.recentSearchRef.call(void 0, parsed.toolId),
2722
2868
  cliInvocationId,
2723
- onResponseReceived: _chunk6YCA5NKJjs.recordApiResponse,
2869
+ onResponseReceived: _chunkUYCZFQYQjs.recordApiResponse,
2724
2870
  ...tracing ? {
2725
- onServerTiming: (serverTiming) => _chunkMF2GHZDOjs.recordCliTrace.call(void 0, {
2871
+ onServerTiming: (serverTiming) => _chunkGRZENGNEjs.recordCliTrace.call(void 0, {
2726
2872
  phase: "tool_execute_server_timing",
2727
2873
  cliInvocationId,
2728
2874
  serverTiming,
@@ -2733,51 +2879,51 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2733
2879
  let rawResponse;
2734
2880
  let successfulCompatibilityResponse;
2735
2881
  try {
2736
- const executeResult = await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
2882
+ const executeResult = await _chunk7OWI736Ejs.runToolExecuteStage.call(void 0,
2737
2883
  "execute request",
2738
2884
  async () => {
2739
2885
  try {
2740
2886
  if (tracing) {
2741
2887
  submissionStartedAt = performance.now();
2742
- _chunkMF2GHZDOjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
2888
+ _chunkGRZENGNEjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
2743
2889
  }
2744
2890
  return await client.executeTool(parsed.toolId, parsed.params, {
2745
2891
  ...executeOptions,
2746
2892
  atomicToolOnly: true,
2747
- ..._optionalChain([metadata, 'optionalAccess', _42 => _42.executionMetadata, 'optionalAccess', _43 => _43.retrySafeAmbiguousDelivery]) === true ? { retryAmbiguousDelivery: true } : {}
2893
+ ..._optionalChain([metadata, 'optionalAccess', _48 => _48.executionMetadata, 'optionalAccess', _49 => _49.retrySafeAmbiguousDelivery]) === true ? { retryAmbiguousDelivery: true } : {}
2748
2894
  });
2749
2895
  } catch (error) {
2750
- if (parsed.connection !== void 0 || !(error instanceof _chunkBBTKAASQjs.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
2896
+ if (parsed.connection !== void 0 || !(error instanceof _chunkLFQJW4S2js.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
2751
2897
  throw error;
2752
- const baseUrl = _chunk7IKQKKNXjs.resolveConfig.call(void 0, ).baseUrl;
2898
+ const baseUrl = _chunkVIUUTEHYjs.resolveConfig.call(void 0, ).baseUrl;
2753
2899
  if (maintenancePolicy !== "off") {
2754
- _chunk4MK42735js.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
2900
+ _chunk2HMN5H54js.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
2755
2901
  }
2756
- const compatibility = deferredCompatibility ? await deferredCompatibility.result : await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
2902
+ const preflight = deferredCompatibility ? await deferredCompatibility.result.catch(() => null) : null;
2903
+ const compatibilityResponse = _optionalChain([preflight, 'optionalAccess', _50 => _50.live]) === true ? preflight.response : await _chunk7OWI736Ejs.runToolExecuteStage.call(void 0,
2757
2904
  "SDK compatibility",
2758
- () => _chunk4MK42735js.checkSdkCompatibility.call(void 0, baseUrl, {
2905
+ () => _chunk2HMN5H54js.requireSdkCompatibility.call(void 0, baseUrl, {
2759
2906
  command: "tools execute",
2760
- skillsVersion: _chunk7IKQKKNXjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
2907
+ skillsVersion: _chunkVIUUTEHYjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
2761
2908
  persistCache: maintenancePolicy !== "off"
2762
2909
  })
2763
2910
  );
2764
- if (compatibility.error) throw compatibility.error;
2765
- metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _44 => _44.readMetadata, 'call', _45 => _45()]), () => ( metadata));
2766
- if (maintenancePolicy !== "off" && await _chunkADRC5I3Rjs.maybeAutoUpdateAndRelaunch.call(void 0,
2767
- compatibility.response,
2911
+ metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _51 => _51.readMetadata, 'call', _52 => _52()]), () => ( metadata));
2912
+ if (maintenancePolicy !== "off" && await _chunk7OWI736Ejs.maybeAutoUpdateAndRelaunch.call(void 0,
2913
+ compatibilityResponse,
2768
2914
  baseUrl,
2769
2915
  maintenancePolicy
2770
2916
  )) {
2771
2917
  return void 0;
2772
2918
  }
2773
- _chunk4MK42735js.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
2919
+ _chunk2HMN5H54js.enforceSdkCompatibilityResponse.call(void 0, compatibilityResponse, {
2774
2920
  quietAdvisory: wantsJson
2775
2921
  });
2776
2922
  if (maintenancePolicy !== "off") {
2777
- await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
2923
+ await _chunk7OWI736Ejs.runToolExecuteStage.call(void 0,
2778
2924
  "agent skills sync",
2779
- () => _chunk4MK42735js.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
2780
- update: _optionalChain([compatibility, 'access', _46 => _46.response, 'optionalAccess', _47 => _47.skills]),
2925
+ () => _chunk2HMN5H54js.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
2926
+ update: _optionalChain([compatibilityResponse, 'optionalAccess', _53 => _53.skills]),
2781
2927
  mode: "detached"
2782
2928
  })
2783
2929
  );
@@ -2785,11 +2931,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2785
2931
  const legacyMetadata = await readMetadata();
2786
2932
  if (tracing) {
2787
2933
  submissionStartedAt = performance.now();
2788
- _chunkMF2GHZDOjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
2934
+ _chunkGRZENGNEjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
2789
2935
  }
2790
2936
  return client.executeTool(parsed.toolId, parsed.params, {
2791
2937
  ...executeOptions,
2792
- ..._optionalChain([legacyMetadata, 'access', _48 => _48.executionMetadata, 'optionalAccess', _49 => _49.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {}
2938
+ ..._optionalChain([legacyMetadata, 'access', _54 => _54.executionMetadata, 'optionalAccess', _55 => _55.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {}
2793
2939
  });
2794
2940
  }
2795
2941
  }
@@ -2806,10 +2952,10 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2806
2952
  compatibilityReadFailed = true;
2807
2953
  }
2808
2954
  metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
2809
- const updateRequiredBeforeExecution = error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
2955
+ const updateRequiredBeforeExecution = error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
2810
2956
  if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
2811
- const baseUrl = _chunk7IKQKKNXjs.resolveConfig.call(void 0, ).baseUrl;
2812
- if (await _chunkADRC5I3Rjs.maybeAutoUpdateAndRelaunch.call(void 0,
2957
+ const baseUrl = _chunkVIUUTEHYjs.resolveConfig.call(void 0, ).baseUrl;
2958
+ if (await _chunk7OWI736Ejs.maybeAutoUpdateAndRelaunch.call(void 0,
2813
2959
  compatibility.response,
2814
2960
  baseUrl,
2815
2961
  maintenancePolicy
@@ -2818,29 +2964,29 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2818
2964
  }
2819
2965
  }
2820
2966
  }
2821
- if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "SDK_UPDATE_REQUIRED")
2967
+ if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED")
2822
2968
  throw error;
2823
2969
  let failure = error;
2824
- if (!(failure instanceof _chunkBBTKAASQjs.DeeplineError) || failure.code !== "PLAY_ALIAS_USED_AS_TOOL") {
2825
- const warningPreflightWasAvailable = !deferredCompatibility || !compatibilityReadFailed && !_optionalChain([compatibility, 'optionalAccess', _50 => _50.error]);
2970
+ if (!(failure instanceof _chunkLFQJW4S2js.DeeplineError) || failure.code !== "PLAY_ALIAS_USED_AS_TOOL") {
2971
+ const warningPreflightWasAvailable = !deferredCompatibility || !compatibilityReadFailed && !_optionalChain([compatibility, 'optionalAccess', _56 => _56.error]);
2826
2972
  if (metadata || warningPreflightWasAvailable) {
2827
2973
  try {
2828
2974
  await readMetadata();
2829
2975
  } catch (diagnosticError) {
2830
- if (diagnosticError instanceof _chunkBBTKAASQjs.DeeplineError && diagnosticError.code === "PLAY_ALIAS_USED_AS_TOOL")
2976
+ if (diagnosticError instanceof _chunkLFQJW4S2js.DeeplineError && diagnosticError.code === "PLAY_ALIAS_USED_AS_TOOL")
2831
2977
  failure = diagnosticError;
2832
2978
  }
2833
2979
  }
2834
2980
  }
2835
- if (failure instanceof _chunkBBTKAASQjs.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
2836
- if (wantsJson) _chunkVQALXEXOjs.printJsonError.call(void 0, failure);
2981
+ if (failure instanceof _chunkLFQJW4S2js.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
2982
+ if (wantsJson) _chunkYQKCH4R7js.printJsonError.call(void 0, failure);
2837
2983
  else console.error(failure.message);
2838
2984
  return 2;
2839
2985
  }
2840
- const guidanceLines = toolGuidanceLines(_optionalChain([metadata, 'optionalAccess', _51 => _51.guidance]));
2986
+ const guidanceLines = toolGuidanceLines(_optionalChain([metadata, 'optionalAccess', _57 => _57.guidance]));
2841
2987
  if (guidanceLines.length > 0) {
2842
2988
  if (wantsJson && failure instanceof Error) {
2843
- Object.assign(failure, { guidance: _optionalChain([metadata, 'optionalAccess', _52 => _52.guidance]) });
2989
+ Object.assign(failure, { guidance: _optionalChain([metadata, 'optionalAccess', _58 => _58.guidance]) });
2844
2990
  } else {
2845
2991
  console.error(
2846
2992
  [`Guidance for ${parsed.toolId}:`, ...guidanceLines].join("\n")
@@ -2856,17 +3002,17 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2856
3002
  } catch (e4) {
2857
3003
  }
2858
3004
  metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
2859
- const compatibilityResponse = _optionalChain([compatibility, 'optionalAccess', _53 => _53.response]);
3005
+ const compatibilityResponse = _optionalChain([compatibility, 'optionalAccess', _59 => _59.response]);
2860
3006
  successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
2861
- const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _54 => _54.auto_update]);
2862
- if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _55 => _55.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
2863
- await _chunkADRC5I3Rjs.maybeAutoUpdateAndRelaunch.call(void 0,
3007
+ const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _60 => _60.auto_update]);
3008
+ if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _61 => _61.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
3009
+ await _chunk7OWI736Ejs.maybeAutoUpdateAndRelaunch.call(void 0,
2864
3010
  compatibilityResponse,
2865
- _chunk7IKQKKNXjs.resolveConfig.call(void 0, ).baseUrl,
3011
+ _chunkVIUUTEHYjs.resolveConfig.call(void 0, ).baseUrl,
2866
3012
  maintenancePolicy
2867
3013
  );
2868
3014
  }
2869
- if (!metadata && !_optionalChain([compatibility, 'optionalAccess', _56 => _56.error])) {
3015
+ if (!metadata && !_optionalChain([compatibility, 'optionalAccess', _62 => _62.error])) {
2870
3016
  try {
2871
3017
  metadata = await readMetadata();
2872
3018
  } catch (e5) {
@@ -2880,8 +3026,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2880
3026
  );
2881
3027
  }
2882
3028
  }
2883
- const responseMetadata = _chunkUPMRIVZBjs.recordField.call(void 0,
2884
- _chunkUPMRIVZBjs.recordField.call(void 0, rawResponse, "_metadata"),
3029
+ const responseMetadata = _chunk3IKGZ4CGjs.recordField.call(void 0,
3030
+ _chunk3IKGZ4CGjs.recordField.call(void 0, rawResponse, "_metadata"),
2885
3031
  "tool"
2886
3032
  );
2887
3033
  const listOutputPaths = responseMetadata.listOutputPaths;
@@ -2893,11 +3039,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2893
3039
  await readMetadata()
2894
3040
  );
2895
3041
  }
2896
- if (_chunkUPMRIVZBjs.isRecord.call(void 0, rawResponse)) {
3042
+ if (_chunk3IKGZ4CGjs.isRecord.call(void 0, rawResponse)) {
2897
3043
  const { _metadata, ...execution } = rawResponse;
2898
3044
  rawResponse = execution;
2899
3045
  }
2900
- const { listConversion, summary, baseEnvelope } = await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
3046
+ const { listConversion, summary, baseEnvelope } = await _chunk7OWI736Ejs.runToolExecuteStage.call(void 0,
2901
3047
  "result formatting",
2902
3048
  async () => {
2903
3049
  const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
@@ -2917,7 +3063,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2917
3063
  rawResponse,
2918
3064
  listConversion: listConversion2,
2919
3065
  summary: summary2,
2920
- guidance: _optionalChain([metadata, 'optionalAccess', _57 => _57.guidance]),
3066
+ guidance: _optionalChain([metadata, 'optionalAccess', _63 => _63.guidance]),
2921
3067
  listExpected: listExtractorPaths.length > 0
2922
3068
  });
2923
3069
  return { listConversion: listConversion2, summary: summary2, baseEnvelope: baseEnvelope2 };
@@ -2932,9 +3078,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2932
3078
  }
2933
3079
  skillsSyncAttempted = true;
2934
3080
  try {
2935
- await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
3081
+ await _chunk7OWI736Ejs.runToolExecuteStage.call(void 0,
2936
3082
  "agent skills sync",
2937
- () => _chunk4MK42735js.syncSdkSkillsIfNeeded.call(void 0, _chunk7IKQKKNXjs.resolveConfig.call(void 0, ).baseUrl, {
3083
+ () => _chunk2HMN5H54js.syncSdkSkillsIfNeeded.call(void 0, _chunkVIUUTEHYjs.resolveConfig.call(void 0, ).baseUrl, {
2938
3084
  update: deliveredCompatibilityResponse.skills,
2939
3085
  mode: "detached"
2940
3086
  })
@@ -2945,15 +3091,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2945
3091
  );
2946
3092
  }
2947
3093
  };
2948
- const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkVQALXEXOjs.printCommandEnvelope.call(void 0, envelope, {
3094
+ const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkYQKCH4R7js.printCommandEnvelope.call(void 0, envelope, {
2949
3095
  ...options2,
2950
3096
  json: _nullishCoalesce(options2.json, () => ( wantsJson))
2951
3097
  });
2952
3098
  const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
2953
3099
  await syncSkillsForDeliveredOutput();
2954
- _chunkVQALXEXOjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
3100
+ _chunkYQKCH4R7js.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
2955
3101
  };
2956
- const delivered = await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
3102
+ const delivered = await _chunk7OWI736Ejs.runToolExecuteStage.call(void 0, "output delivery", async () => {
2957
3103
  if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
2958
3104
  await printDeliveredJsonEnvelope(baseEnvelope);
2959
3105
  return true;
@@ -2966,7 +3112,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2966
3112
  await printDeliveredJsonEnvelope({
2967
3113
  ...baseEnvelope,
2968
3114
  local: {
2969
- ..._chunkUPMRIVZBjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
3115
+ ..._chunk3IKGZ4CGjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
2970
3116
  payload_file: jsonPath
2971
3117
  }
2972
3118
  });
@@ -2982,7 +3128,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
2982
3128
  `${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
2983
3129
  );
2984
3130
  if (wantsJson) {
2985
- _chunkVQALXEXOjs.printJsonError.call(void 0, error);
3131
+ _chunkYQKCH4R7js.printJsonError.call(void 0, error);
2986
3132
  } else {
2987
3133
  console.error(error.message);
2988
3134
  }
@@ -3077,14 +3223,14 @@ inspect: ${inspection.inspect}
3077
3223
  return true;
3078
3224
  });
3079
3225
  if (delivered) {
3080
- await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
3226
+ await _chunk7OWI736Ejs.runToolExecuteStage.call(void 0,
3081
3227
  "acknowledge delivery",
3082
3228
  () => recovery.acknowledgeDelivery()
3083
3229
  );
3084
3230
  }
3085
3231
  if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
3086
- _chunk4MK42735js.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
3087
- quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _58 => _58.auto_update, 'optionalAccess', _59 => _59.should_auto_update]) === true
3232
+ _chunk2HMN5H54js.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
3233
+ quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _64 => _64.auto_update, 'optionalAccess', _65 => _65.should_auto_update]) === true
3088
3234
  });
3089
3235
  }
3090
3236
  if (delivered && !skillsSyncAttempted) await syncSkillsForDeliveredOutput();
@@ -3102,4 +3248,5 @@ inspect: ${inspection.inspect}
3102
3248
 
3103
3249
 
3104
3250
 
3105
- 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;
3251
+
3252
+ exports.jsonFileText = jsonFileText; 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;