deepline 0.3.409 → 0.3.411

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 (215) hide show
  1. package/dist/bundling-sources/sdk/src/agent-runtime.ts +18 -1
  2. package/dist/bundling-sources/sdk/src/client.ts +206 -333
  3. package/dist/bundling-sources/sdk/src/compat.ts +45 -2
  4. package/dist/bundling-sources/sdk/src/db/query.ts +9 -10
  5. package/dist/bundling-sources/sdk/src/http.ts +38 -20
  6. package/dist/bundling-sources/sdk/src/index.ts +4 -5
  7. package/dist/bundling-sources/sdk/src/play.ts +10 -10
  8. package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +6 -4
  9. package/dist/bundling-sources/sdk/src/plays/check-local-play-graph.ts +114 -0
  10. package/dist/bundling-sources/sdk/src/plays/client.ts +431 -0
  11. package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +2 -2
  12. package/dist/bundling-sources/sdk/src/plays/run-request.ts +106 -16
  13. package/dist/bundling-sources/sdk/src/release.ts +13 -7
  14. package/dist/bundling-sources/sdk/src/runs/read-errors.ts +8 -0
  15. package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +124 -13
  16. package/dist/bundling-sources/sdk/src/tool-calls.ts +108 -19
  17. package/dist/bundling-sources/sdk/src/types.ts +18 -0
  18. package/dist/bundling-sources/shared_libs/integration-contracts/execute-retry-contract.ts +37 -0
  19. package/dist/bundling-sources/shared_libs/integration-contracts/package.json +3 -0
  20. package/dist/bundling-sources/shared_libs/monitors/package.json +1 -1
  21. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +3 -1
  22. package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +1 -1
  23. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +277 -76
  24. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
  25. package/dist/bundling-sources/shared_libs/play-runtime/dataset-row-input.ts +124 -0
  26. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +6 -62
  27. package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +1 -0
  28. package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +67 -0
  29. package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +64 -6
  30. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +1 -5
  31. package/dist/bundling-sources/shared_libs/play-runtime/ledger-safe-payload.ts +1 -1
  32. package/dist/bundling-sources/shared_libs/play-runtime/play-artifact-runtime-contract.ts +3 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +10 -0
  34. package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +3 -0
  35. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/egress-probe.ts +3 -0
  36. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +26 -16
  37. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +36 -11
  38. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +35 -0
  39. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +21 -0
  40. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +21 -6
  41. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +11 -2
  42. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +85 -20
  43. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +71 -13
  44. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-execution-queries.ts +100 -0
  45. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +9 -5
  46. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +337 -146
  47. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +26 -12
  48. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +3 -1
  49. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +425 -102
  50. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +4 -0
  51. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +4 -0
  52. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +9 -0
  53. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +181 -124
  54. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +152 -0
  55. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +5 -3
  56. package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +31 -0
  57. package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +10 -0
  58. package/dist/bundling-sources/shared_libs/plays/ambiguous-write-error.ts +25 -0
  59. package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +4 -0
  60. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +63 -68
  61. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +129 -63
  62. package/dist/bundling-sources/shared_libs/plays/contracts.ts +14 -0
  63. package/dist/bundling-sources/shared_libs/plays/enrich-play-compiler.ts +58 -16
  64. package/dist/bundling-sources/shared_libs/plays/fetch-http-error.ts +50 -0
  65. package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +351 -0
  66. package/dist/bundling-sources/shared_libs/plays/tool-list-getter-mode.ts +9 -0
  67. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
  68. package/dist/cli/auth-M7TBLW55.js +40 -0
  69. package/dist/cli/{auth-5HIIACF7.mjs → auth-YD6ZTMB2.mjs} +6 -6
  70. package/dist/cli/{billing-4275N7FL.js → billing-2L3MOB42.js} +84 -84
  71. package/dist/cli/{billing-EVZ3ZWKC.mjs → billing-ZT46GV4C.mjs} +8 -8
  72. package/dist/cli/{chunk-ZAAKSJAS.js → chunk-27GJKC5Q.js} +17 -10
  73. package/dist/cli/{chunk-UHNDVD3P.js → chunk-2H4EY7KH.js} +100 -41
  74. package/dist/cli/{chunk-GAICVLKL.js → chunk-2NI6DHN7.js} +2 -2
  75. package/dist/cli/{chunk-JGHG4NBA.js → chunk-2WUY3VNK.js} +19 -4
  76. package/dist/cli/{chunk-FHPCKULR.mjs → chunk-4BA6ATHA.mjs} +2 -2
  77. package/dist/cli/{chunk-RTCDW2GU.js → chunk-4O4WNFFC.js} +170 -49
  78. package/dist/cli/{chunk-OSDXE27V.mjs → chunk-4PG4ARL2.mjs} +17 -10
  79. package/dist/cli/{chunk-AU4OFDFX.js → chunk-5IGDNBG7.js} +26 -26
  80. package/dist/cli/{chunk-WYQO2CBS.mjs → chunk-5LRWWMRV.mjs} +149 -28
  81. package/dist/cli/{chunk-PMVFAYL7.mjs → chunk-63ILLN5H.mjs} +2 -2
  82. package/dist/cli/chunk-6AUE6JXY.js +35 -0
  83. package/dist/cli/chunk-7DSMMCXP.js +501 -0
  84. package/dist/cli/{chunk-6BJK4EJ3.mjs → chunk-AARWVK4C.mjs} +2132 -65
  85. package/dist/cli/{chunk-FERRDNMO.js → chunk-AD47BXN2.js} +5 -5
  86. package/dist/cli/{chunk-J6DCKJNM.mjs → chunk-BJV3VSKE.mjs} +16 -1
  87. package/dist/cli/{chunk-S6R3OX7B.js → chunk-E4CABWXL.js} +25 -2
  88. package/dist/cli/{chunk-NXGCO4JB.mjs → chunk-E4IXDAZI.mjs} +5 -0
  89. package/dist/cli/{chunk-BEVLCKXG.mjs → chunk-E4KBNNNB.mjs} +1 -1
  90. package/dist/cli/{chunk-2PRO2JTX.mjs → chunk-E52TKKVI.mjs} +36 -284
  91. package/dist/cli/chunk-FR2ILQ4G.mjs +8 -0
  92. package/dist/cli/{chunk-2GI3QD3L.js → chunk-FRVPOXGB.js} +644 -330
  93. package/dist/cli/chunk-G43JLBDE.mjs +501 -0
  94. package/dist/cli/{chunk-BZAMOCPA.mjs → chunk-IMZ56EOH.mjs} +3 -3
  95. package/dist/cli/chunk-IPGV6VFA.mjs +6084 -0
  96. package/dist/cli/{chunk-IT3XBJQR.mjs → chunk-IR3AKJAY.mjs} +330 -625
  97. package/dist/cli/chunk-J33TSWO5.js +8 -0
  98. package/dist/cli/chunk-JQMZUWNM.mjs +35 -0
  99. package/dist/cli/chunk-JYHSEGRM.js +6084 -0
  100. package/dist/cli/{chunk-JI2B4RZP.mjs → chunk-KCC3FKIW.mjs} +71 -12
  101. package/dist/cli/{chunk-6IKARAYD.mjs → chunk-L2VKAASU.mjs} +23 -0
  102. package/dist/cli/{chunk-O3VSXP2F.js → chunk-LWBM5FFL.js} +50 -50
  103. package/dist/cli/{chunk-VWBTTJYQ.mjs → chunk-M6OASCVL.mjs} +6 -3
  104. package/dist/cli/{chunk-YHPYUZZX.mjs → chunk-MAMVGOSC.mjs} +1 -1
  105. package/dist/cli/{chunk-Q2E4E4FJ.js → chunk-NPBJI7RE.js} +8 -8
  106. package/dist/cli/chunk-NQWIZ5PZ.js +313 -0
  107. package/dist/cli/{chunk-HQXL5526.mjs → chunk-NUX2QHNC.mjs} +1 -1
  108. package/dist/cli/{chunk-TQNHMWUR.mjs → chunk-OGSXENOF.mjs} +5 -2
  109. package/dist/cli/{chunk-SEFMGO3Z.js → chunk-OQQOXSYA.js} +2184 -117
  110. package/dist/cli/{chunk-FJCIUF34.js → chunk-OZSC6CEW.js} +128 -376
  111. package/dist/cli/{chunk-NZSF57UO.mjs → chunk-PO2VU6WV.mjs} +2 -2
  112. package/dist/cli/{chunk-7P5AA3SN.js → chunk-PPDBRJRW.js} +6 -1
  113. package/dist/cli/{chunk-ILHRA7AD.js → chunk-QADCFSGH.js} +7 -7
  114. package/dist/cli/{chunk-N44JHMKY.mjs → chunk-RFES6Q2J.mjs} +452 -138
  115. package/dist/cli/{chunk-DEC3JECC.js → chunk-RMINBDYY.js} +5 -2
  116. package/dist/cli/{chunk-WLOCMJWV.js → chunk-TPFD4F5S.js} +426 -721
  117. package/dist/cli/{chunk-V76R6HMV.js → chunk-U5AQKE3T.js} +1029 -806
  118. package/dist/cli/{chunk-PBZYY7VZ.mjs → chunk-UAEVKAUR.mjs} +734 -511
  119. package/dist/cli/{chunk-WHG43Z67.js → chunk-VGHWJL4W.js} +11 -8
  120. package/dist/cli/chunk-VKKVSFRD.js +62 -0
  121. package/dist/cli/{chunk-GSK6NHVM.js → chunk-WU4U6VSB.js} +5 -5
  122. package/dist/cli/chunk-XAB47ZRV.mjs +313 -0
  123. package/dist/cli/{chunk-JRAVVJ3T.mjs → chunk-XJD6LZCO.mjs} +2 -2
  124. package/dist/cli/chunk-ZCALLYF6.mjs +62 -0
  125. package/dist/cli/{chunk-YD7B53RW.js → chunk-ZHWBU36H.js} +12 -12
  126. package/dist/cli/{csv-A2MP6EFV.mjs → csv-BKNRRW7D.mjs} +5 -5
  127. package/dist/cli/{csv-BBOTCGQY.js → csv-SVDP2EU7.js} +14 -14
  128. package/dist/cli/{db-3W5DMTUX.mjs → db-LU4KLRM6.mjs} +15 -20
  129. package/dist/cli/{db-G4CODDCA.js → db-OQ6S7TTZ.js} +42 -47
  130. package/dist/cli/{describe-PQTQ5B6F.js → describe-45TGETKR.js} +27 -22
  131. package/dist/cli/{describe-XYJ2ZT4M.mjs → describe-U4KOGDRA.mjs} +20 -15
  132. package/dist/cli/describe-core.d.mts +2 -2
  133. package/dist/cli/describe-core.d.ts +2 -2
  134. package/dist/cli/describe-core.js +6 -6
  135. package/dist/cli/describe-core.mjs +5 -5
  136. package/dist/cli/{executions-UR67CA5H.mjs → executions-2GAAUXLA.mjs} +8 -8
  137. package/dist/cli/{executions-TLANVR7Y.js → executions-VZN56VRC.js} +10 -10
  138. package/dist/cli/{feedback-6C2YTRJL.js → feedback-NS76B5GU.js} +13 -9
  139. package/dist/cli/{feedback-WHCMGEIL.mjs → feedback-XW5IWA5R.mjs} +11 -7
  140. package/dist/cli/{git-GWLB6VSA.mjs → git-CLI66XP6.mjs} +6 -6
  141. package/dist/cli/git-VGYRGFEN.js +24 -0
  142. package/dist/cli/index.js +236 -348
  143. package/dist/cli/index.mjs +162 -274
  144. package/dist/cli/{legacy-noops-ZUFA7RWI.js → legacy-noops-HCFB3ZOV.js} +9 -9
  145. package/dist/cli/{legacy-noops-KF4XIFEF.mjs → legacy-noops-ODDOMLBL.mjs} +6 -6
  146. package/dist/cli/{monitors-TB3K2IVE.js → monitors-7WXQ7JFT.js} +94 -94
  147. package/dist/cli/{monitors-6UOIDIMB.mjs → monitors-ZXX456TE.mjs} +8 -8
  148. package/dist/cli/{org-CKWMBPIR.js → org-YLX5PHBQ.js} +68 -68
  149. package/dist/cli/{org-WGHHMVDZ.mjs → org-YUN3TLNP.mjs} +8 -8
  150. package/dist/cli/{play-LYPAXCLD.mjs → play-LL73A7EP.mjs} +533 -98
  151. package/dist/cli/{play-N2B3KAVS.js → play-YGOXL52D.js} +1067 -632
  152. package/dist/cli/{providers-6DI5BVZJ.mjs → providers-35QSAUHL.mjs} +8 -8
  153. package/dist/cli/{providers-UR42MD6Z.js → providers-RHCIU2PX.js} +11 -11
  154. package/dist/cli/{quickstart-MNA2S6PO.mjs → quickstart-6BN3LCZH.mjs} +5 -5
  155. package/dist/cli/{quickstart-FCJG4XGB.js → quickstart-ORMM4NRK.js} +7 -7
  156. package/dist/cli/search-EWDMUPHR.js +30 -0
  157. package/dist/cli/{search-VPPYUJ2M.mjs → search-GAERWLSE.mjs} +9 -9
  158. package/dist/cli/{secrets-QOSMVO36.js → secrets-3AFCTGT7.js} +17 -17
  159. package/dist/cli/{secrets-DRI4W7Z5.mjs → secrets-FCL5PALY.mjs} +8 -8
  160. package/dist/cli/sessions-3OEHEQG7.js +16 -0
  161. package/dist/cli/{sessions-DQNUKP43.mjs → sessions-RSSL7I7O.mjs} +6 -6
  162. package/dist/cli/{settings-DWDK3Y2R.mjs → settings-GE4NRE7Y.mjs} +12 -12
  163. package/dist/cli/{settings-JUGGCOPS.js → settings-RX5K4I7H.js} +79 -79
  164. package/dist/cli/{setup-AWBHNYXK.js → setup-N3ZNAEL5.js} +45 -44
  165. package/dist/cli/{setup-D5DWVNY4.mjs → setup-X3RXGG4F.mjs} +11 -10
  166. package/dist/cli/{skills-YV2XR35J.mjs → skills-5JEAJBDE.mjs} +7 -7
  167. package/dist/cli/skills-VAAQVEQC.js +29 -0
  168. package/dist/cli/tools-BYYOT2DU.js +44 -0
  169. package/dist/cli/{tools-VFJYHNV2.mjs → tools-JOKUWEBZ.mjs} +19 -14
  170. package/dist/cli/update-36G4ZD7B.js +31 -0
  171. package/dist/cli/{update-IM6VOTGL.mjs → update-UBHEVFR3.mjs} +11 -9
  172. package/dist/cli/{workflow-26URBWPV.mjs → workflow-FR6EXAXF.mjs} +44 -20
  173. package/dist/cli/{workflow-3BS6U6SL.js → workflow-SZAVOHN6.js} +54 -30
  174. package/dist/{client-BfInrZPB.d.mts → client-74k4IPh6.d.mts} +135 -54
  175. package/dist/{client-BMjJFpan.d.ts → client-C1IK1f8c.d.ts} +135 -54
  176. package/dist/{compiler-manifest-Ycx-hoAr.d.mts → compiler-manifest-lzWpbV3w.d.mts} +83 -66
  177. package/dist/{compiler-manifest-Ycx-hoAr.d.ts → compiler-manifest-lzWpbV3w.d.ts} +83 -66
  178. package/dist/{index-CZXgiN3E.d.mts → index-C8Cy-YTm.d.ts} +5 -1
  179. package/dist/{index-NPG5pqxQ.d.ts → index-CtNK-0nI.d.mts} +5 -1
  180. package/dist/index.d.mts +47 -9
  181. package/dist/index.d.ts +47 -9
  182. package/dist/index.js +17 -14
  183. package/dist/index.mjs +13 -10
  184. package/dist/install-integrity.json +118 -102
  185. package/dist/plays/bundle-play-file.d.mts +3 -3
  186. package/dist/plays/bundle-play-file.d.ts +3 -3
  187. package/dist/plays/bundle-play-file.mjs +5 -4
  188. package/dist/plays/csv-data-input.js +3 -3
  189. package/dist/plays/csv-data-input.mjs +2 -2
  190. package/dist/plays/play-description.d.mts +2 -2
  191. package/dist/plays/play-description.d.ts +2 -2
  192. package/dist/plays/run-request.d.mts +2 -2
  193. package/dist/plays/run-request.d.ts +2 -2
  194. package/dist/plays/run-request.js +11 -3
  195. package/dist/plays/run-request.mjs +10 -2
  196. package/dist/release.d.mts +15 -6
  197. package/dist/release.d.ts +15 -6
  198. package/dist/release.js +2 -2
  199. package/dist/release.mjs +1 -1
  200. package/package.json +2 -2
  201. package/dist/cli/auth-F6BX32XZ.js +0 -40
  202. package/dist/cli/chunk-264PC2RN.mjs +0 -83
  203. package/dist/cli/chunk-44ZTYHMQ.mjs +0 -155
  204. package/dist/cli/chunk-53HN7WZN.js +0 -392
  205. package/dist/cli/chunk-7AALNGTA.mjs +0 -392
  206. package/dist/cli/chunk-ALD4COBH.js +0 -155
  207. package/dist/cli/chunk-CLJGSOVM.mjs +0 -1716
  208. package/dist/cli/chunk-WNUR6VP5.js +0 -83
  209. package/dist/cli/chunk-Z4VNJOF7.js +0 -1716
  210. package/dist/cli/git-VQFF6D7C.js +0 -24
  211. package/dist/cli/search-NCEEONMQ.js +0 -30
  212. package/dist/cli/sessions-3WYKQABW.js +0 -16
  213. package/dist/cli/skills-AKPAJVSO.js +0 -29
  214. package/dist/cli/tools-RBKEK6PM.js +0 -39
  215. package/dist/cli/update-VFNUBLDA.js +0 -29
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkYD7B53RWjs = require('./chunk-YD7B53RW.js');
4
+ var _chunkZHWBU36Hjs = require('./chunk-ZHWBU36H.js');
5
5
 
6
6
 
7
- var _chunkFJCIUF34js = require('./chunk-FJCIUF34.js');
7
+ var _chunkOZSC6CEWjs = require('./chunk-OZSC6CEW.js');
8
8
 
9
9
  // src/cli/commands/sessions.ts
10
10
 
@@ -139,7 +139,10 @@ function currentSessionFile(agent) {
139
139
  const newestFirst = listSessionFiles(agent).sort(
140
140
  (a, b) => b.mtimeMs - a.mtimeMs
141
141
  );
142
- const sessionId = _chunkFJCIUF34js.agentSessionIdFromEnvironment.call(void 0, );
142
+ const sessionId = _chunkOZSC6CEWjs.agentSessionIdFromEnvironment.call(void 0,
143
+ process.env,
144
+ agent === "auto" ? void 0 : agent === "claude" ? "claude_code" : "codex"
145
+ );
143
146
  const cwd = process.cwd();
144
147
  return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(newestFirst.find((candidate) => candidate.sessionId === sessionId), () => ( newestFirst.find(
145
148
  (candidate) => sessionStartedInDirectory(candidate, cwd)
@@ -448,7 +451,7 @@ function buildSessionUploadContent(raw) {
448
451
  return { encodedContent: encoded, needsChunking: true };
449
452
  }
450
453
  async function uploadPayload(path, payload) {
451
- const { http } = _chunkYD7B53RWjs.getAuthedHttpClient.call(void 0, );
454
+ const { http } = _chunkZHWBU36Hjs.getAuthedHttpClient.call(void 0, );
452
455
  return await http.post(path, payload);
453
456
  }
454
457
  async function uploadChunkedSessions(sessions, options) {
@@ -481,7 +484,7 @@ async function uploadChunkedSessions(sessions, options) {
481
484
  ...options.rating ? { rating: options.rating } : {}
482
485
  });
483
486
  const sessionIds = sessions.map((session) => session.sessionId);
484
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
487
+ _chunkZHWBU36Hjs.printCommandEnvelope.call(void 0,
485
488
  {
486
489
  ...response,
487
490
  ok: true,
@@ -513,7 +516,7 @@ async function handleSessionsSend(options) {
513
516
  filename: _path.basename.call(void 0, filePath),
514
517
  ...rating ? { rating } : {}
515
518
  });
516
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
519
+ _chunkZHWBU36Hjs.printCommandEnvelope.call(void 0,
517
520
  {
518
521
  ...response2,
519
522
  ok: true,
@@ -563,7 +566,7 @@ async function handleSessionsSend(options) {
563
566
  ...rating ? { rating } : {}
564
567
  });
565
568
  const sessionIds = built.map((session) => session.sessionId);
566
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
569
+ _chunkZHWBU36Hjs.printCommandEnvelope.call(void 0,
567
570
  {
568
571
  ...response,
569
572
  ok: true,
@@ -671,7 +674,7 @@ ${refreshMeta}
671
674
  </body>
672
675
  </html>`;
673
676
  _fs.writeFileSync.call(void 0, outputPath, html, "utf8");
674
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
677
+ _chunkZHWBU36Hjs.printCommandEnvelope.call(void 0,
675
678
  {
676
679
  ok: true,
677
680
  file: outputPath,
@@ -0,0 +1,62 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class; var _class2;// ../plays/fetch-http-error.ts
2
+ var CtxFetchHttpError = (_class = class extends Error {
3
+ /** Build the error from the durable response record. */
4
+ constructor(response) {
5
+ const body = response.bodyText || "empty response body";
6
+ super(
7
+ `ctx.fetch(${response.url}) returned HTTP ${response.status}${response.statusText ? ` ${response.statusText}` : ""}: ${body}`
8
+ );_class.prototype.__init.call(this);;
9
+ this.response = response;
10
+ this.name = "CtxFetchHttpError";
11
+ this.status = response.status;
12
+ this.statusText = response.statusText;
13
+ this.url = response.url;
14
+ this.headers = response.headers;
15
+ this.bodyText = response.bodyText;
16
+ this.json = response.json;
17
+ }
18
+ /**
19
+ * Play source and the runtime are separately bundled. Recognize the stable
20
+ * public error code so `instanceof` works across that boundary as well.
21
+ */
22
+ static [Symbol.hasInstance](value) {
23
+ return value !== null && typeof value === "object" && value.code === "CTX_FETCH_HTTP_ERROR";
24
+ }
25
+ /** Stable machine-readable HTTP-failure code. */
26
+ __init() {this.code = "CTX_FETCH_HTTP_ERROR"}
27
+ /** Upstream HTTP status. */
28
+
29
+ /** Upstream HTTP status text. */
30
+
31
+ /** Final response URL after redirects. */
32
+
33
+ /** Secret-redacted response headers. */
34
+
35
+ /** Complete secret-redacted response body. */
36
+
37
+ /** Eagerly parsed secret-redacted JSON, or null. */
38
+
39
+ }, _class);
40
+
41
+ // ../plays/ambiguous-write-error.ts
42
+ var CtxFetchAmbiguousWriteError = (_class2 = class extends Error {
43
+ constructor(method, origin, options) {
44
+ super(
45
+ `ctx.fetch ${method} to ${origin} was dispatched, but its outcome is unknown. Reconcile with the provider or retry only under its supported idempotency contract using the same intended-operation key.`,
46
+ options
47
+ );_class2.prototype.__init2.call(this);_class2.prototype.__init3.call(this);;
48
+ this.method = method;
49
+ this.origin = origin;
50
+ this.name = "CtxFetchAmbiguousWriteError";
51
+ }
52
+ static [Symbol.hasInstance](value) {
53
+ return value !== null && typeof value === "object" && value.code === "CTX_FETCH_WRITE_OUTCOME_UNKNOWN";
54
+ }
55
+ __init2() {this.code = "CTX_FETCH_WRITE_OUTCOME_UNKNOWN"}
56
+ __init3() {this.outcome = "unknown"}
57
+ }, _class2);
58
+
59
+
60
+
61
+
62
+ exports.CtxFetchHttpError = CtxFetchHttpError; exports.CtxFetchAmbiguousWriteError = CtxFetchAmbiguousWriteError;
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
3
+ var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
4
4
 
5
5
  // node_modules/csv-parse/dist/esm/sync.js
6
6
  var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
@@ -3000,7 +3000,7 @@ function parseCsvDataInput(source, content, options = {}) {
3000
3000
  } : {}
3001
3001
  });
3002
3002
  } catch (error) {
3003
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
3003
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
3004
3004
  `Input ${source.inputPath} could not be parsed as CSV (${source.value}): ${error instanceof Error ? error.message : String(error)}. This usually means an unclosed quote or ragged quoting. No run was created.`,
3005
3005
  void 0,
3006
3006
  "PLAY_INPUT_FILE_PREFLIGHT",
@@ -3008,7 +3008,7 @@ function parseCsvDataInput(source, content, options = {}) {
3008
3008
  );
3009
3009
  }
3010
3010
  if (records.length === 0) {
3011
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
3011
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
3012
3012
  `${source.value} is empty: it has no header row and no data rows. No run was created.`,
3013
3013
  void 0,
3014
3014
  "PLAY_INPUT_FILE_PREFLIGHT",
@@ -3023,7 +3023,7 @@ function parseCsvDataInput(source, content, options = {}) {
3023
3023
  if (name.length === 0) continue;
3024
3024
  const prior = seen.get(name);
3025
3025
  if (prior) {
3026
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
3026
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
3027
3027
  `Input ${source.inputPath} (${source.value}) has a duplicate CSV header "${name}" (columns ${prior.index + 1} and ${i + 1}). The second column would silently overwrite the first. Rename one of them. No run was created.`,
3028
3028
  void 0,
3029
3029
  "PLAY_INPUT_FILE_PREFLIGHT",
@@ -3039,7 +3039,7 @@ function parseCsvDataInput(source, content, options = {}) {
3039
3039
  seen.set(name, { index: i, raw });
3040
3040
  }
3041
3041
  if (records.length - 1 < 1) {
3042
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
3042
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
3043
3043
  `${source.value} has a header row but no data rows. No run was created.`,
3044
3044
  void 0,
3045
3045
  "PLAY_INPUT_FILE_PREFLIGHT",
@@ -0,0 +1,313 @@
1
+ import {
2
+ canAutomaticallyApplyUpdatePlan,
3
+ compareUpdateVersions,
4
+ resolveUpdatePlan,
5
+ runAutomaticUpdatePlan,
6
+ shouldRunCliAutoUpdate
7
+ } from "./chunk-5LRWWMRV.mjs";
8
+ import {
9
+ isCiEnvironment
10
+ } from "./chunk-IR3AKJAY.mjs";
11
+ import {
12
+ addJsonNotice,
13
+ isJsonOutputMode
14
+ } from "./chunk-XJD6LZCO.mjs";
15
+ import {
16
+ SDK_VERSION,
17
+ resolveApiKeyForBaseUrl
18
+ } from "./chunk-E52TKKVI.mjs";
19
+
20
+ // src/cli/compatibility-catalog.ts
21
+ var readers = /* @__PURE__ */ new WeakMap();
22
+ function registerCompatibilityCatalog(command, read) {
23
+ readers.set(command, read);
24
+ }
25
+ function compatibilityCatalog(command) {
26
+ return readers.get(command)?.();
27
+ }
28
+
29
+ // src/cli/self-update.ts
30
+ import { spawn } from "child_process";
31
+ var AUTO_UPDATE_TELEMETRY_TIMEOUT_MS = 2e3;
32
+ var TRUSTED_AUTO_UPDATE_ORIGIN = "https://code.deepline.com";
33
+ function trustedAutoUpdateRegistryUrl(baseUrl) {
34
+ try {
35
+ const url = new URL(baseUrl);
36
+ if (url.origin !== TRUSTED_AUTO_UPDATE_ORIGIN) return null;
37
+ return new URL("/api/v2/npm/", url.origin).toString();
38
+ } catch {
39
+ return null;
40
+ }
41
+ }
42
+ async function reportAutoUpdateEvent(input) {
43
+ let apiKey = "";
44
+ try {
45
+ apiKey = resolveApiKeyForBaseUrl(input.baseUrl);
46
+ } catch {
47
+ return;
48
+ }
49
+ if (!apiKey) return;
50
+ const controller = new AbortController();
51
+ const timeout = setTimeout(
52
+ () => controller.abort(),
53
+ AUTO_UPDATE_TELEMETRY_TIMEOUT_MS
54
+ );
55
+ try {
56
+ await fetch(new URL("/api/v2/telemetry/auto-update", input.baseUrl), {
57
+ method: "POST",
58
+ headers: {
59
+ Authorization: `Bearer ${apiKey}`,
60
+ "Content-Type": "application/json",
61
+ "User-Agent": `deepline-ts-sdk/${SDK_VERSION}`,
62
+ "X-Deepline-Client-Family": "sdk",
63
+ "X-Deepline-CLI-Family": "sdk",
64
+ "X-Deepline-CLI-Version": SDK_VERSION,
65
+ "X-Deepline-SDK-Version": SDK_VERSION
66
+ },
67
+ body: JSON.stringify({
68
+ event: input.event,
69
+ current_version: input.response.current?.trim() || SDK_VERSION,
70
+ target_version: input.response.latest,
71
+ reason: input.response.auto_update?.reason,
72
+ command: input.response.command ?? null,
73
+ install_kind: input.installKind,
74
+ ...input.exitCode === void 0 ? {} : { exit_code: input.exitCode }
75
+ }),
76
+ signal: controller.signal
77
+ });
78
+ } catch {
79
+ } finally {
80
+ clearTimeout(timeout);
81
+ }
82
+ }
83
+ function envTruthy(name) {
84
+ const value = process.env[name]?.trim().toLowerCase();
85
+ return value === "1" || value === "true" || value === "yes";
86
+ }
87
+ function shouldSkipSelfUpdate(policy) {
88
+ return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !shouldRunCliAutoUpdate() || isCiEnvironment();
89
+ }
90
+ function isDowngradeAutoUpdateResponse(response) {
91
+ const target = response?.latest?.trim();
92
+ const current = response?.current?.trim() || SDK_VERSION;
93
+ if (!target) return false;
94
+ return compareUpdateVersions(target, current) < 0;
95
+ }
96
+ function relaunchCurrentCommand(plan, runtime = {}) {
97
+ return new Promise((resolve) => {
98
+ const command = plan.kind === "python-sidecar" ? plan.sidecarPath : runtime.execPath ?? process.execPath;
99
+ const argv = runtime.argv ?? process.argv;
100
+ const args = plan.kind === "python-sidecar" ? argv.slice(2) : argv.slice(1);
101
+ const platform = runtime.platform ?? process.platform;
102
+ const child = spawn(command, args, {
103
+ stdio: "inherit",
104
+ // The Node executable is a native binary and must be spawned directly;
105
+ // passing `C:\Program Files\...\node.exe` through cmd.exe splits it
106
+ // at the first space. The Python-sidecar launcher is a `.cmd` file on
107
+ // Windows and still needs the shell dispatch it has always used.
108
+ shell: plan.kind === "python-sidecar" && platform === "win32",
109
+ env: {
110
+ ...process.env,
111
+ DEEPLINE_NO_AUTO_UPDATE: "1"
112
+ }
113
+ });
114
+ child.on("error", (error) => {
115
+ process.stderr.write(
116
+ `Deepline SDK/CLI updated, but relaunch failed: ${error.message}
117
+ `
118
+ );
119
+ resolve(1);
120
+ });
121
+ child.on("close", (code) => resolve(code ?? 1));
122
+ });
123
+ }
124
+ var deferredAutoUpdate = null;
125
+ function hasDeferredAutoUpdate() {
126
+ return deferredAutoUpdate !== null;
127
+ }
128
+ async function runDeferredAutoUpdate() {
129
+ const apply = deferredAutoUpdate;
130
+ deferredAutoUpdate = null;
131
+ try {
132
+ await apply?.();
133
+ } catch (error) {
134
+ process.stderr.write(
135
+ `Deepline SDK/CLI auto-update failed: ${error instanceof Error ? error.message : String(error)}
136
+ `
137
+ );
138
+ }
139
+ }
140
+ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configured") {
141
+ const autoUpdate = response?.auto_update;
142
+ if (!response || !autoUpdate?.should_auto_update || shouldSkipSelfUpdate(policy)) {
143
+ return false;
144
+ }
145
+ if (isDowngradeAutoUpdateResponse(response)) {
146
+ const target = response.latest;
147
+ const current = response.current?.trim() || SDK_VERSION;
148
+ process.stderr.write(
149
+ `Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
150
+ `
151
+ );
152
+ return false;
153
+ }
154
+ const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
155
+ const plan = resolveUpdatePlan({
156
+ packageSpec,
157
+ requireVerifiedNpmOwnership: true,
158
+ npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
159
+ });
160
+ if (!canAutomaticallyApplyUpdatePlan(plan)) {
161
+ return false;
162
+ }
163
+ if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
164
+ deferredAutoUpdate = async () => {
165
+ await applyAutoUpdate(response, baseUrl, plan, "next_command");
166
+ };
167
+ if (isJsonOutputMode()) {
168
+ const target = response.latest?.trim();
169
+ addJsonNotice({
170
+ code: "sdk_update_queued",
171
+ message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
172
+ });
173
+ }
174
+ return false;
175
+ }
176
+ if (!await applyAutoUpdate(response, baseUrl, plan, "rerun")) return false;
177
+ const exitCode = await relaunchCurrentCommand(plan);
178
+ process.exit(exitCode);
179
+ return true;
180
+ }
181
+ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
182
+ if (!canAutomaticallyApplyUpdatePlan(plan)) return false;
183
+ const autoUpdate = response.auto_update;
184
+ const label = autoUpdate?.reason === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : autoUpdate?.reason === "deprecated" ? "is deprecated and will update automatically" : autoUpdate?.required ? "requires an update" : "has an update available and will update automatically";
185
+ process.stderr.write(
186
+ `Deepline SDK/CLI ${label}; running ${plan.manualCommand}
187
+ `
188
+ );
189
+ void reportAutoUpdateEvent({
190
+ baseUrl,
191
+ response,
192
+ event: "started",
193
+ installKind: plan.kind
194
+ });
195
+ const updateResult = await runAutomaticUpdatePlan(plan);
196
+ if (updateResult.status === "skipped_previous_failure") {
197
+ void reportAutoUpdateEvent({
198
+ baseUrl,
199
+ response,
200
+ event: "skipped_previous_failure",
201
+ installKind: plan.kind,
202
+ exitCode: updateResult.exitCode
203
+ });
204
+ return false;
205
+ }
206
+ if (updateResult.exitCode !== 0) {
207
+ void reportAutoUpdateEvent({
208
+ baseUrl,
209
+ response,
210
+ event: "failed",
211
+ installKind: plan.kind,
212
+ exitCode: updateResult.exitCode
213
+ });
214
+ if (autoUpdate?.required) {
215
+ throw new Error(
216
+ `Automatic Deepline SDK/CLI update failed with exit code ${updateResult.exitCode}. ${response.message}`
217
+ );
218
+ }
219
+ process.stderr.write(
220
+ `Deepline SDK/CLI auto-update failed with exit code ${updateResult.exitCode}; continuing with ${response.current ?? "current version"}.
221
+ `
222
+ );
223
+ return false;
224
+ }
225
+ void reportAutoUpdateEvent({
226
+ baseUrl,
227
+ response,
228
+ event: "succeeded",
229
+ installKind: plan.kind,
230
+ exitCode: 0
231
+ });
232
+ const updateSummary = response.update_summary ? `
233
+ What changed in ${response.update_summary.version}: ${response.update_summary.summary}` : "";
234
+ process.stderr.write(
235
+ `${takesEffect === "rerun" ? "Deepline SDK/CLI updated; rerunning command." : `Deepline SDK/CLI updated to ${response.latest}; the next command uses it.`}${updateSummary}
236
+ `
237
+ );
238
+ return true;
239
+ }
240
+
241
+ // src/cli/tool-execute-observability.ts
242
+ import { randomUUID } from "crypto";
243
+ var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
244
+ var activeToolExecuteCommand = null;
245
+ function progressLine(line) {
246
+ if (!isJsonOutputMode()) console.error(line);
247
+ }
248
+ function beginToolExecuteCommand() {
249
+ if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
250
+ const invocationId = randomUUID();
251
+ activeToolExecuteCommand = {
252
+ invocationId,
253
+ startedAt: performance.now()
254
+ };
255
+ progressLine(`[tools execute ${invocationId}] started`);
256
+ return invocationId;
257
+ }
258
+ function getToolExecuteInvocationId() {
259
+ return activeToolExecuteCommand?.invocationId ?? null;
260
+ }
261
+ async function runToolExecuteStage(stage, action) {
262
+ const command = activeToolExecuteCommand;
263
+ if (!command) return action();
264
+ const startedAt = performance.now();
265
+ const elapsedMs = () => Math.round(performance.now() - startedAt);
266
+ progressLine(`[tools execute ${command.invocationId}] ${stage} started`);
267
+ const progressTimer = setInterval(() => {
268
+ progressLine(
269
+ `[tools execute ${command.invocationId}] ${stage} still running (${elapsedMs()}ms)`
270
+ );
271
+ }, TOOL_EXECUTE_PROGRESS_INTERVAL_MS);
272
+ progressTimer.unref?.();
273
+ try {
274
+ const result = await action();
275
+ if (result === false) {
276
+ progressLine(
277
+ `[tools execute ${command.invocationId}] ${stage} failed after ${elapsedMs()}ms`
278
+ );
279
+ } else {
280
+ progressLine(
281
+ `[tools execute ${command.invocationId}] ${stage} completed in ${elapsedMs()}ms`
282
+ );
283
+ }
284
+ return result;
285
+ } catch (error) {
286
+ progressLine(
287
+ `[tools execute ${command.invocationId}] ${stage} failed after ${elapsedMs()}ms`
288
+ );
289
+ throw error;
290
+ } finally {
291
+ clearInterval(progressTimer);
292
+ }
293
+ }
294
+ function finishToolExecuteCommand() {
295
+ const command = activeToolExecuteCommand;
296
+ if (!command) return;
297
+ progressLine(
298
+ `[tools execute ${command.invocationId}] finished in ${Math.round(performance.now() - command.startedAt)}ms`
299
+ );
300
+ activeToolExecuteCommand = null;
301
+ }
302
+
303
+ export {
304
+ registerCompatibilityCatalog,
305
+ compatibilityCatalog,
306
+ hasDeferredAutoUpdate,
307
+ runDeferredAutoUpdate,
308
+ maybeAutoUpdateAndRelaunch,
309
+ beginToolExecuteCommand,
310
+ getToolExecuteInvocationId,
311
+ runToolExecuteStage,
312
+ finishToolExecuteCommand
313
+ };
@@ -3,11 +3,11 @@ import {
3
3
  detectAgentRuntime,
4
4
  resolveCliCommandContext,
5
5
  resolveConfig
6
- } from "./chunk-2PRO2JTX.mjs";
6
+ } from "./chunk-E52TKKVI.mjs";
7
7
  import {
8
8
  DeeplineError,
9
9
  serializeToolExecutionFailure
10
- } from "./chunk-NXGCO4JB.mjs";
10
+ } from "./chunk-E4IXDAZI.mjs";
11
11
 
12
12
  // src/cli/json-fields.ts
13
13
  var RUN_FIELDS = new Set(
@@ -0,0 +1,62 @@
1
+ // ../plays/fetch-http-error.ts
2
+ var CtxFetchHttpError = class extends Error {
3
+ /** Build the error from the durable response record. */
4
+ constructor(response) {
5
+ const body = response.bodyText || "empty response body";
6
+ super(
7
+ `ctx.fetch(${response.url}) returned HTTP ${response.status}${response.statusText ? ` ${response.statusText}` : ""}: ${body}`
8
+ );
9
+ this.response = response;
10
+ this.name = "CtxFetchHttpError";
11
+ this.status = response.status;
12
+ this.statusText = response.statusText;
13
+ this.url = response.url;
14
+ this.headers = response.headers;
15
+ this.bodyText = response.bodyText;
16
+ this.json = response.json;
17
+ }
18
+ /**
19
+ * Play source and the runtime are separately bundled. Recognize the stable
20
+ * public error code so `instanceof` works across that boundary as well.
21
+ */
22
+ static [Symbol.hasInstance](value) {
23
+ return value !== null && typeof value === "object" && value.code === "CTX_FETCH_HTTP_ERROR";
24
+ }
25
+ /** Stable machine-readable HTTP-failure code. */
26
+ code = "CTX_FETCH_HTTP_ERROR";
27
+ /** Upstream HTTP status. */
28
+ status;
29
+ /** Upstream HTTP status text. */
30
+ statusText;
31
+ /** Final response URL after redirects. */
32
+ url;
33
+ /** Secret-redacted response headers. */
34
+ headers;
35
+ /** Complete secret-redacted response body. */
36
+ bodyText;
37
+ /** Eagerly parsed secret-redacted JSON, or null. */
38
+ json;
39
+ };
40
+
41
+ // ../plays/ambiguous-write-error.ts
42
+ var CtxFetchAmbiguousWriteError = class extends Error {
43
+ constructor(method, origin, options) {
44
+ super(
45
+ `ctx.fetch ${method} to ${origin} was dispatched, but its outcome is unknown. Reconcile with the provider or retry only under its supported idempotency contract using the same intended-operation key.`,
46
+ options
47
+ );
48
+ this.method = method;
49
+ this.origin = origin;
50
+ this.name = "CtxFetchAmbiguousWriteError";
51
+ }
52
+ static [Symbol.hasInstance](value) {
53
+ return value !== null && typeof value === "object" && value.code === "CTX_FETCH_WRITE_OUTCOME_UNKNOWN";
54
+ }
55
+ code = "CTX_FETCH_WRITE_OUTCOME_UNKNOWN";
56
+ outcome = "unknown";
57
+ };
58
+
59
+ export {
60
+ CtxFetchHttpError,
61
+ CtxFetchAmbiguousWriteError
62
+ };
@@ -3,11 +3,11 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkFJCIUF34js = require('./chunk-FJCIUF34.js');
6
+ var _chunkOZSC6CEWjs = require('./chunk-OZSC6CEW.js');
7
7
 
8
8
 
9
9
 
10
- var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
10
+ var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
11
11
 
12
12
  // src/cli/json-fields.ts
13
13
  var RUN_FIELDS = new Set(
@@ -42,7 +42,7 @@ function parseJsonFields(args, surface) {
42
42
  if (parts.some(
43
43
  (part) => !/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(part) || ["__proto__", "prototype", "constructor"].includes(part)
44
44
  ) || !allowed.has(parts[0])) {
45
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
45
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
46
46
  `Unknown --json field '${path}'. Available roots: ${[...allowed].join(", ")}.`,
47
47
  void 0,
48
48
  "INVALID_ARGUMENT"
@@ -50,7 +50,7 @@ function parseJsonFields(args, surface) {
50
50
  }
51
51
  if (parts[0] === "run" && parts[1] && !RUN_FIELDS.has(parts[1])) {
52
52
  const hint = parts[1] === "url" ? " Use run.dashboardUrl." : parts[1] === "stats" ? " Dataset summaries are in datasets; run timing is in run.durationMs." : "";
53
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
53
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
54
54
  `Unknown --json run field '${parts[1]}'. Available: ${[...RUN_FIELDS].join(", ")}.${hint}`,
55
55
  void 0,
56
56
  "INVALID_ARGUMENT"
@@ -60,7 +60,7 @@ function parseJsonFields(args, surface) {
60
60
  const target = args[0] && !args[0].startsWith("-") ? args[0] : "<target>";
61
61
  const command = surface === "get" ? "runs get" : `plays ${surface}`;
62
62
  const quotedTarget = `'${target.replace(/'/g, "'\\''")}'`;
63
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
63
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
64
64
  `--json diagnostics requires --full. For inspection, use: deepline ${surface === "run" ? "runs get <run-id>" : `${command} ${quotedTarget}`} --full`,
65
65
  void 0,
66
66
  "INVALID_ARGUMENT"
@@ -70,7 +70,7 @@ function parseJsonFields(args, surface) {
70
70
  fields = [..._nullishCoalesce(fields, () => ( [])), ...paths];
71
71
  }
72
72
  if (fields && normalized.includes("--input") && surface === "get") {
73
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
73
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
74
74
  "--json fields selects the run response, not --input. Use bare --json with --input.",
75
75
  void 0,
76
76
  "INVALID_ARGUMENT"
@@ -288,8 +288,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
288
288
  var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
289
289
  var defaultBrowserCommandRunner = childProcess;
290
290
  function getAuthedHttpClient() {
291
- const config = _chunkFJCIUF34js.resolveConfig.call(void 0, );
292
- return { config, http: new (0, _chunkFJCIUF34js.HttpClient)(config) };
291
+ const config = _chunkOZSC6CEWjs.resolveConfig.call(void 0, );
292
+ return { config, http: new (0, _chunkOZSC6CEWjs.HttpClient)(config) };
293
293
  }
294
294
  function stableOsUserId() {
295
295
  try {
@@ -629,7 +629,7 @@ function collectLocalEnvInfo() {
629
629
  os: `${process.platform} ${process.arch}`,
630
630
  node_version: process.version,
631
631
  home_dir: homeDir,
632
- agent_runtime: _chunkFJCIUF34js.detectAgentRuntime.call(void 0, )
632
+ agent_runtime: _chunkOZSC6CEWjs.detectAgentRuntime.call(void 0, )
633
633
  };
634
634
  const env = process.env;
635
635
  const optional = {
@@ -876,9 +876,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
876
876
  }
877
877
  function withAgentCommandContext(value) {
878
878
  const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
879
- return _chunkFJCIUF34js.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
879
+ return _chunkOZSC6CEWjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
880
880
  ...valueRecord,
881
- command_context: _chunkFJCIUF34js.resolveCliCommandContext.call(void 0, )
881
+ command_context: _chunkOZSC6CEWjs.resolveCliCommandContext.call(void 0, )
882
882
  } : value;
883
883
  }
884
884
  function printJson(value, fields) {
@@ -894,7 +894,7 @@ function printCompactJson(value) {
894
894
  );
895
895
  }
896
896
  function cliToolExecutionFailure(error) {
897
- const failure = _chunk7P5AA3SNjs.serializeToolExecutionFailure.call(void 0, error);
897
+ const failure = _chunkPPDBRJRWjs.serializeToolExecutionFailure.call(void 0, error);
898
898
  if (!failure) return null;
899
899
  const { publicDetails: _publicDetails, ...facts } = failure;
900
900
  return facts;
@@ -4,12 +4,12 @@ import {
4
4
  printCommandEnvelope,
5
5
  printJson,
6
6
  readCsvRows
7
- } from "./chunk-JRAVVJ3T.mjs";
8
- import "./chunk-2PRO2JTX.mjs";
9
- import "./chunk-YHPYUZZX.mjs";
7
+ } from "./chunk-XJD6LZCO.mjs";
8
+ import "./chunk-E52TKKVI.mjs";
9
+ import "./chunk-MAMVGOSC.mjs";
10
10
  import "./chunk-DLIRSHV6.mjs";
11
- import "./chunk-NXGCO4JB.mjs";
12
- import "./chunk-TQNHMWUR.mjs";
11
+ import "./chunk-E4IXDAZI.mjs";
12
+ import "./chunk-OGSXENOF.mjs";
13
13
  import "./chunk-WZYKRD7T.mjs";
14
14
  import "./chunk-KRD6H754.mjs";
15
15