deepline 0.3.484 → 0.3.486

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 (210) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +91 -30
  2. package/dist/bundling-sources/sdk/src/compat.ts +13 -0
  3. package/dist/bundling-sources/sdk/src/plays/client-core.ts +4 -1
  4. package/dist/bundling-sources/sdk/src/plays/run-request.ts +143 -9
  5. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  6. package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +31 -4
  7. package/dist/bundling-sources/sdk/src/tool-calls.ts +1 -1
  8. package/dist/bundling-sources/sdk/src/types.ts +7 -1
  9. package/dist/bundling-sources/shared_libs/play-data-plane/sheet-column-storage.ts +32 -3
  10. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +126 -41
  11. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +231 -25
  12. package/dist/bundling-sources/shared_libs/play-runtime/daytona-runtime-config.ts +9 -0
  13. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +130 -19
  14. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +105 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +4 -2
  16. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +194 -56
  17. package/dist/bundling-sources/shared_libs/play-runtime/ledger-safe-payload.ts +8 -4
  18. package/dist/bundling-sources/shared_libs/play-runtime/log-provenance.ts +11 -6
  19. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +3 -0
  20. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/ports.ts +2 -0
  21. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/postgres-adapter.ts +2 -1
  22. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +30 -0
  23. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +195 -2
  24. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +20 -1
  25. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +15 -0
  26. package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +2 -2
  27. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +139 -67
  28. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/progress-sidecar.ts +9 -1
  29. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-control-transport.ts +25 -5
  30. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +133 -82
  31. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +58 -16
  32. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-sandbox-absence.ts +171 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +69 -0
  34. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +100 -40
  35. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +8 -0
  36. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +67 -9
  37. package/dist/bundling-sources/shared_libs/play-runtime/runtime-incident-drills.ts +5 -5
  38. package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +6 -3
  39. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-errors.ts +14 -0
  40. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-writer.ts +87 -31
  41. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +18 -0
  42. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/index.ts +19 -0
  43. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +14 -0
  44. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +206 -7
  45. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +39 -0
  46. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +12 -1
  47. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +28 -9
  48. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +44 -15
  49. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +60 -11
  50. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +656 -64
  51. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +6 -1
  52. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +17 -0
  53. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +25 -33
  54. package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +12 -0
  55. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +21 -0
  56. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +1 -1
  57. package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +1 -1
  58. package/dist/cli/auth-ARKH3OAU.js +43 -0
  59. package/dist/cli/{auth-EBFOTF7X.mjs → auth-B4DJO4FB.mjs} +5 -5
  60. package/dist/cli/{billing-G2G3EF3I.js → billing-GDWAMARK.js} +80 -80
  61. package/dist/cli/{billing-2ZOIMW5V.mjs → billing-IIQ3VNXU.mjs} +7 -7
  62. package/dist/cli/{chunk-YWC5AN26.mjs → chunk-2DVFQYPG.mjs} +62 -34
  63. package/dist/cli/{chunk-UWOY74RU.js → chunk-5DUP4ZUE.js} +21 -21
  64. package/dist/cli/{chunk-EACX7QXO.mjs → chunk-5QYZ4MEW.mjs} +2 -2
  65. package/dist/cli/{chunk-HEI3BWIV.mjs → chunk-5RLVCOKH.mjs} +1 -1
  66. package/dist/cli/{chunk-TIRSKEZH.mjs → chunk-5Y7LLRWO.mjs} +1 -1
  67. package/dist/cli/{chunk-IXWQOVNW.js → chunk-5YILTBF7.js} +87 -76
  68. package/dist/cli/{chunk-OHKKDPA5.js → chunk-7FTQKEZ6.js} +13 -13
  69. package/dist/cli/{chunk-TN2GW57M.mjs → chunk-A456YVDE.mjs} +1 -1
  70. package/dist/cli/{chunk-GVAENVIG.js → chunk-AUQQVDAB.js} +110 -21
  71. package/dist/cli/{chunk-3XQIVEAT.js → chunk-BJL7RYQN.js} +3 -3
  72. package/dist/cli/{chunk-2AWYJXBX.js → chunk-BNB2RK4L.js} +5 -5
  73. package/dist/cli/{chunk-U7IJAGWB.js → chunk-BYEDI5PM.js} +7 -7
  74. package/dist/cli/{chunk-RLLEH2SP.js → chunk-C4GFBB52.js} +26 -26
  75. package/dist/cli/{chunk-AK7UKQ5R.js → chunk-CSBMKHTV.js} +5 -5
  76. package/dist/cli/{chunk-UT4YMA2N.js → chunk-DFHS5XVZ.js} +5 -4
  77. package/dist/cli/{chunk-XZXIWPT3.mjs → chunk-F3G2HAUQ.mjs} +1 -1
  78. package/dist/cli/{chunk-C62NI2X6.js → chunk-FCAKAW6S.js} +5 -5
  79. package/dist/cli/{chunk-AF7MOUZP.mjs → chunk-FGPJXQEJ.mjs} +2 -2
  80. package/dist/cli/chunk-FSCOYTRV.js +42 -0
  81. package/dist/cli/{chunk-6GRZEYSG.js → chunk-GCEUOHJW.js} +7 -7
  82. package/dist/cli/{chunk-SD7QWZTV.mjs → chunk-INW22YP7.mjs} +1 -1
  83. package/dist/cli/{chunk-OWUZKXE7.mjs → chunk-J7EENGKJ.mjs} +1 -1
  84. package/dist/cli/{chunk-QIDDTIVZ.js → chunk-KPIVQFXZ.js} +322 -294
  85. package/dist/cli/{chunk-4IOY2SCQ.js → chunk-LOX3BISD.js} +4 -4
  86. package/dist/cli/{chunk-WYUCDLVR.mjs → chunk-MJ56FCYU.mjs} +2 -1
  87. package/dist/cli/{chunk-DBJ62RAO.js → chunk-NSPMJLYA.js} +3 -3
  88. package/dist/cli/{chunk-HNRELVCS.mjs → chunk-ONONSV2Q.mjs} +96 -7
  89. package/dist/cli/{chunk-PU52JXKA.mjs → chunk-P6KGYOCM.mjs} +13 -4
  90. package/dist/cli/{chunk-VEVGM6B5.js → chunk-PCYZDTDC.js} +14 -14
  91. package/dist/cli/{chunk-NW4QJE54.js → chunk-PHWFY26F.js} +2 -2
  92. package/dist/cli/{chunk-LTZXLYKE.mjs → chunk-PKOFEHZL.mjs} +93 -17
  93. package/dist/cli/{chunk-7K5CWKKZ.mjs → chunk-PQHDZHZG.mjs} +2 -2
  94. package/dist/cli/{chunk-UKM74PAA.js → chunk-PTM3QRAT.js} +37 -37
  95. package/dist/cli/{chunk-YGN77QA5.mjs → chunk-PV7AYBKQ.mjs} +3 -3
  96. package/dist/cli/{chunk-4OEOM6GP.mjs → chunk-PYDHVRAF.mjs} +5 -5
  97. package/dist/cli/{chunk-FRD5WFT4.js → chunk-QD22TY33.js} +323 -247
  98. package/dist/cli/{chunk-5KNRQWHE.js → chunk-QEQ3KHVY.js} +3 -3
  99. package/dist/cli/{chunk-KGOC6HGI.js → chunk-S5EYODEG.js} +53 -53
  100. package/dist/cli/{chunk-FQK7BULS.js → chunk-S7OILDJH.js} +1 -1
  101. package/dist/cli/{chunk-TRLDJNVE.mjs → chunk-T3Q6BMVH.mjs} +1 -1
  102. package/dist/cli/{chunk-5K5CAND4.mjs → chunk-TBE2K5W4.mjs} +4 -4
  103. package/dist/cli/{chunk-YHA3EV3I.mjs → chunk-TE2QT2MX.mjs} +15 -4
  104. package/dist/cli/{chunk-ZOKM7DVA.js → chunk-TNHY3ATN.js} +8 -8
  105. package/dist/cli/{chunk-4OVHIWE7.mjs → chunk-U23L57VU.mjs} +2 -2
  106. package/dist/cli/{chunk-5GOG5ZGC.mjs → chunk-UEJLWUJ3.mjs} +2 -2
  107. package/dist/cli/{chunk-6NPWXE32.mjs → chunk-VJLL5XIP.mjs} +1 -1
  108. package/dist/cli/{chunk-WXRM3UC6.mjs → chunk-WCOJH4W4.mjs} +3 -3
  109. package/dist/cli/{chunk-4SFC2XUF.mjs → chunk-XAZWUW6I.mjs} +5 -5
  110. package/dist/cli/{chunk-ZM2YPJQJ.js → chunk-XK5DMLZE.js} +5 -1
  111. package/dist/cli/{chunk-LJ5747UC.mjs → chunk-XRDXNAAY.mjs} +5 -1
  112. package/dist/cli/{chunk-V7JCMBLU.mjs → chunk-YIKHNZ6B.mjs} +4 -4
  113. package/dist/cli/{chunk-M4PG7FGC.js → chunk-YS6JOYYS.js} +2 -2
  114. package/dist/cli/{chunk-DEXSQGXB.mjs → chunk-ZMRZ3BXG.mjs} +5 -5
  115. package/dist/cli/{chunk-CYWBAV5H.js → chunk-ZQI26KE4.js} +16 -16
  116. package/dist/cli/{csv-S3CHUKI6.js → csv-3PSMPZM5.js} +13 -13
  117. package/dist/cli/{csv-NLWVWD3H.mjs → csv-LFCT3WQ4.mjs} +4 -4
  118. package/dist/cli/{db-OGRPAEEM.mjs → db-HULKVAMU.mjs} +7 -7
  119. package/dist/cli/{db-WBSKMMOH.js → db-R7I2PPTV.js} +28 -28
  120. package/dist/cli/{describe-FAD3Z7LN.mjs → describe-D55V42LH.mjs} +21 -21
  121. package/dist/cli/describe-H47BLOEP.js +49 -0
  122. package/dist/cli/describe-core.d.mts +3 -3
  123. package/dist/cli/describe-core.d.ts +3 -3
  124. package/dist/cli/describe-core.js +4 -4
  125. package/dist/cli/describe-core.mjs +3 -3
  126. package/dist/cli/{executions-LYCL344R.mjs → executions-ICVVOYVG.mjs} +7 -7
  127. package/dist/cli/{executions-SOAZHCY4.js → executions-O37FN2SK.js} +9 -9
  128. package/dist/cli/{feedback-AVF6V7SV.mjs → feedback-3K3QPGCQ.mjs} +4 -4
  129. package/dist/cli/{feedback-OROUPUNJ.js → feedback-MAZQ7C6S.js} +8 -8
  130. package/dist/cli/{git-J5N5M57H.mjs → git-2MMD5KJS.mjs} +5 -5
  131. package/dist/cli/git-RQ2XLFYZ.js +25 -0
  132. package/dist/cli/index.js +142 -139
  133. package/dist/cli/index.mjs +45 -42
  134. package/dist/cli/{legacy-noops-QAQMZMEG.js → legacy-noops-2OX2Y3Y2.js} +8 -8
  135. package/dist/cli/{legacy-noops-ENRRM7BL.mjs → legacy-noops-VLSWJ6VE.mjs} +5 -5
  136. package/dist/cli/{monitors-CKQ65WRL.mjs → monitors-2NODQQWG.mjs} +8 -8
  137. package/dist/cli/{monitors-SFMQ5LFR.js → monitors-UCSV5FOR.js} +92 -92
  138. package/dist/cli/{org-3UNTDLT2.js → org-4YY73VTW.js} +73 -73
  139. package/dist/cli/{org-K4UIEU5P.mjs → org-W7AUQCDE.mjs} +7 -7
  140. package/dist/cli/{pages-NKZTGB4C.js → pages-FBZEUMXK.js} +18 -18
  141. package/dist/cli/{pages-6GPGBIAH.mjs → pages-ZRP7U5PO.mjs} +7 -7
  142. package/dist/cli/{play-BDEADESI.js → play-LFCTQJXA.js} +858 -632
  143. package/dist/cli/{play-62BEE7IX.mjs → play-XF2BSGTP.mjs} +372 -146
  144. package/dist/cli/{providers-SXGP44GH.js → providers-5456JNHP.js} +10 -10
  145. package/dist/cli/{providers-X3CUWMFP.mjs → providers-SICAPKGI.mjs} +7 -7
  146. package/dist/cli/{quickstart-XQ4426M4.js → quickstart-2KLLIPIU.js} +6 -6
  147. package/dist/cli/{quickstart-7LN22BKX.mjs → quickstart-IBVG6GX6.mjs} +4 -4
  148. package/dist/cli/{run-PBJ4ZJ4W.js → run-DNLDGJRC.js} +41 -41
  149. package/dist/cli/{run-XXSN3B5A.mjs → run-XPIZIQ7H.mjs} +26 -26
  150. package/dist/cli/search-2KQA65LH.js +32 -0
  151. package/dist/cli/{search-M75VMADD.mjs → search-PW22AEAL.mjs} +8 -8
  152. package/dist/cli/{search-output-F6HCFYEI.js → search-output-H6F6QMRF.js} +22 -16
  153. package/dist/cli/{search-output-NUQAKWDM.mjs → search-output-JFD53H2N.mjs} +14 -8
  154. package/dist/cli/{secrets-J2H6V33R.mjs → secrets-542CTZRZ.mjs} +7 -7
  155. package/dist/cli/{secrets-LRYY4QPE.js → secrets-LCCRRAN7.js} +16 -16
  156. package/dist/cli/{sessions-YPF62CZE.js → sessions-5FYDQE3N.js} +6 -6
  157. package/dist/cli/{sessions-IMT336UV.mjs → sessions-CALLS2XD.mjs} +5 -5
  158. package/dist/cli/{settings-PDWVQIGH.mjs → settings-GSKPHUEC.mjs} +12 -12
  159. package/dist/cli/{settings-35YYC5WA.js → settings-ORGKOBP6.js} +79 -79
  160. package/dist/cli/{setup-UR7GOR7H.js → setup-4BUWJKB6.js} +47 -47
  161. package/dist/cli/{setup-DG5DISSE.mjs → setup-V57GHVAF.mjs} +9 -9
  162. package/dist/cli/skills-KYZPPGSN.js +33 -0
  163. package/dist/cli/{skills-U6NJD5J7.mjs → skills-NGLCFQFT.mjs} +7 -7
  164. package/dist/cli/tools-AFYXUEMD.js +56 -0
  165. package/dist/cli/{tools-2HGEOELR.mjs → tools-G2YNCFNX.mjs} +19 -19
  166. package/dist/cli/{update-FRAYBAHK.mjs → update-IZ3Z5T5C.mjs} +9 -9
  167. package/dist/cli/update-T6JJ7A3K.js +33 -0
  168. package/dist/cli/{workflow-JKKLOMBX.js → workflow-7AHST2XV.js} +18 -18
  169. package/dist/cli/{workflow-DDKVTF36.mjs → workflow-L7ROQIM7.mjs} +8 -8
  170. package/dist/{client-DJ3r8VQJ.d.mts → client-BkbDHRIg.d.mts} +1 -1
  171. package/dist/{client-JPSNljtj.d.ts → client-D3hVHXjK.d.ts} +1 -1
  172. package/dist/{client-core-3SJlNsKU.d.mts → client-core-BZoSMKcY.d.mts} +30 -15
  173. package/dist/{client-core-rCoQ5Xz3.d.ts → client-core-DUdVqO_m.d.ts} +30 -15
  174. package/dist/{compiler-manifest-gkO9ZkVg.d.mts → compiler-manifest-BFTwq1HI.d.mts} +1 -1
  175. package/dist/{compiler-manifest-gkO9ZkVg.d.ts → compiler-manifest-BFTwq1HI.d.ts} +1 -1
  176. package/dist/{errors-Cc92LKH-.d.ts → errors-c3pMsylw.d.ts} +1 -1
  177. package/dist/{errors-CeCCOKSA.d.mts → errors-w31ybrQM.d.mts} +1 -1
  178. package/dist/{index-DJQKdV76.d.ts → index-CQ-15-QL.d.ts} +1 -1
  179. package/dist/{index-DsqWJL3Q.d.mts → index-DvNtxucX.d.mts} +1 -1
  180. package/dist/index.d.mts +7 -7
  181. package/dist/index.d.ts +7 -7
  182. package/dist/index.js +10 -10
  183. package/dist/index.mjs +7 -7
  184. package/dist/install-integrity.json +117 -116
  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 +2 -2
  188. package/dist/plays/play-description.d.mts +2 -2
  189. package/dist/plays/play-description.d.ts +2 -2
  190. package/dist/plays/run-request.d.mts +2 -2
  191. package/dist/plays/run-request.d.ts +2 -2
  192. package/dist/plays/run-request.js +12 -2
  193. package/dist/plays/run-request.mjs +11 -1
  194. package/dist/release.d.mts +1 -1
  195. package/dist/release.d.ts +1 -1
  196. package/dist/release.js +2 -2
  197. package/dist/release.mjs +1 -1
  198. package/dist/server.d.mts +4 -4
  199. package/dist/server.d.ts +4 -4
  200. package/dist/server.js +6 -6
  201. package/dist/server.mjs +4 -4
  202. package/package.json +1 -1
  203. package/dist/cli/auth-L5CSV3UO.js +0 -43
  204. package/dist/cli/chunk-KA2LNIUP.js +0 -33
  205. package/dist/cli/describe-UIAYCHWW.js +0 -49
  206. package/dist/cli/git-ATMWC27D.js +0 -25
  207. package/dist/cli/search-IGHLRLBD.js +0 -32
  208. package/dist/cli/skills-4U5WC4MJ.js +0 -33
  209. package/dist/cli/tools-PYJTQVVS.js +0 -56
  210. package/dist/cli/update-344OTRFM.js +0 -33
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
2
2
 
3
- var _chunkU7IJAGWBjs = require('./chunk-U7IJAGWB.js');
3
+ var _chunkBYEDI5PMjs = require('./chunk-BYEDI5PM.js');
4
4
 
5
5
  // src/cli/progress.ts
6
6
  var _worker_threads = require('worker_threads');
@@ -17,7 +17,7 @@ var CliProgress = (_class = class {
17
17
 
18
18
  // --json output is one JSON document: progress never renders under it.
19
19
  constructor(enabled) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);
20
- this.enabled = enabled && !_chunkU7IJAGWBjs.isJsonOutputMode.call(void 0, );
20
+ this.enabled = enabled && !_chunkBYEDI5PMjs.isJsonOutputMode.call(void 0, );
21
21
  }
22
22
  setLogWriter(writer) {
23
23
  this.logWriter = writer;
@@ -49,7 +49,7 @@ var CliProgress = (_class = class {
49
49
  this.logWriter(line);
50
50
  return;
51
51
  }
52
- if (_chunkU7IJAGWBjs.isJsonOutputMode.call(void 0, )) return;
52
+ if (_chunkBYEDI5PMjs.isJsonOutputMode.call(void 0, )) return;
53
53
  if (!this.enabled) {
54
54
  process.stderr.write(`${line}
55
55
  `);
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkU7IJAGWBjs = require('./chunk-U7IJAGWB.js');
5
+ var _chunkBYEDI5PMjs = require('./chunk-BYEDI5PM.js');
6
6
 
7
7
 
8
8
 
@@ -22,14 +22,14 @@ var _chunkU7IJAGWBjs = require('./chunk-U7IJAGWB.js');
22
22
 
23
23
 
24
24
 
25
- var _chunk3XQIVEATjs = require('./chunk-3XQIVEAT.js');
25
+ var _chunkBJL7RYQNjs = require('./chunk-BJL7RYQN.js');
26
26
 
27
27
 
28
28
 
29
29
 
30
30
 
31
31
 
32
- var _chunkUT4YMA2Njs = require('./chunk-UT4YMA2N.js');
32
+ var _chunkDFHS5XVZjs = require('./chunk-DFHS5XVZ.js');
33
33
 
34
34
 
35
35
  var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
@@ -60,7 +60,7 @@ function statusBannerLine(value) {
60
60
  return `Service notice: ${banner.message}`;
61
61
  }
62
62
  function envFilePath(baseUrl) {
63
- return _chunk3XQIVEATjs.hostEnvFilePath.call(void 0, baseUrl);
63
+ return _chunkBJL7RYQNjs.hostEnvFilePath.call(void 0, baseUrl);
64
64
  }
65
65
  function normalizeAuthScope(value) {
66
66
  if (!value || value === "global") return "global";
@@ -73,7 +73,7 @@ function parseAuthScope(args) {
73
73
  }
74
74
  function pendingClaimPath(baseUrl, scope) {
75
75
  if (scope === "folder") {
76
- const target = _chunk3XQIVEATjs.resolveProjectPinTarget.call(void 0, );
76
+ const target = _chunkBJL7RYQNjs.resolveProjectPinTarget.call(void 0, );
77
77
  if (!target.ok) {
78
78
  throw new Error(
79
79
  `Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
@@ -83,10 +83,10 @@ function pendingClaimPath(baseUrl, scope) {
83
83
  }
84
84
  return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
85
85
  }
86
- return `${_chunk3XQIVEATjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
86
+ return `${_chunkBJL7RYQNjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
87
87
  }
88
88
  function legacyPendingClaimTokenPath(baseUrl) {
89
- return `${_chunk3XQIVEATjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
89
+ return `${_chunkBJL7RYQNjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
90
90
  }
91
91
  function savePendingClaim(baseUrl, claim) {
92
92
  const filePath = pendingClaimPath(baseUrl, claim.scope);
@@ -190,21 +190,21 @@ function parseRegisterWaitMode(args) {
190
190
  function shouldWaitForRegisterClaim(mode) {
191
191
  if (mode === "yes") return true;
192
192
  if (mode === "no") return false;
193
- return _chunkUT4YMA2Njs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
193
+ return _chunkDFHS5XVZjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
194
194
  }
195
195
  function saveEnvValues(values, baseUrl, scope) {
196
196
  const filtered = {
197
- ...values[_chunk3XQIVEATjs.HOST_URL_ENV] ? { [_chunk3XQIVEATjs.HOST_URL_ENV]: values[_chunk3XQIVEATjs.HOST_URL_ENV] } : {},
198
- ...values[_chunk3XQIVEATjs.API_KEY_ENV] ? { [_chunk3XQIVEATjs.API_KEY_ENV]: values[_chunk3XQIVEATjs.API_KEY_ENV] } : {},
199
- ...values[_chunk3XQIVEATjs.ACTIVE_ORG_ID_ENV] ? { [_chunk3XQIVEATjs.ACTIVE_ORG_ID_ENV]: values[_chunk3XQIVEATjs.ACTIVE_ORG_ID_ENV] } : {},
200
- ...Object.prototype.hasOwnProperty.call(values, _chunk3XQIVEATjs.ACTIVE_ORG_NAME_ENV) ? { [_chunk3XQIVEATjs.ACTIVE_ORG_NAME_ENV]: values[_chunk3XQIVEATjs.ACTIVE_ORG_NAME_ENV] } : {},
197
+ ...values[_chunkBJL7RYQNjs.HOST_URL_ENV] ? { [_chunkBJL7RYQNjs.HOST_URL_ENV]: values[_chunkBJL7RYQNjs.HOST_URL_ENV] } : {},
198
+ ...values[_chunkBJL7RYQNjs.API_KEY_ENV] ? { [_chunkBJL7RYQNjs.API_KEY_ENV]: values[_chunkBJL7RYQNjs.API_KEY_ENV] } : {},
199
+ ...values[_chunkBJL7RYQNjs.ACTIVE_ORG_ID_ENV] ? { [_chunkBJL7RYQNjs.ACTIVE_ORG_ID_ENV]: values[_chunkBJL7RYQNjs.ACTIVE_ORG_ID_ENV] } : {},
200
+ ...Object.prototype.hasOwnProperty.call(values, _chunkBJL7RYQNjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkBJL7RYQNjs.ACTIVE_ORG_NAME_ENV]: values[_chunkBJL7RYQNjs.ACTIVE_ORG_NAME_ENV] } : {},
201
201
  // An explicit empty list must reach the store: it clears a stale line.
202
- ...Object.prototype.hasOwnProperty.call(values, _chunk3XQIVEATjs.FEATURES_ENV) ? { [_chunk3XQIVEATjs.FEATURES_ENV]: values[_chunk3XQIVEATjs.FEATURES_ENV] } : {}
202
+ ...Object.prototype.hasOwnProperty.call(values, _chunkBJL7RYQNjs.FEATURES_ENV) ? { [_chunkBJL7RYQNjs.FEATURES_ENV]: values[_chunkBJL7RYQNjs.FEATURES_ENV] } : {}
203
203
  };
204
204
  if (scope === "folder") {
205
- _chunk3XQIVEATjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
205
+ _chunkBJL7RYQNjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
206
206
  } else {
207
- _chunk3XQIVEATjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
207
+ _chunkBJL7RYQNjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
208
208
  }
209
209
  }
210
210
  function activeOrgEnvValues(data) {
@@ -212,21 +212,21 @@ function activeOrgEnvValues(data) {
212
212
  if (!orgId) return {};
213
213
  const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
214
214
  return {
215
- [_chunk3XQIVEATjs.ACTIVE_ORG_ID_ENV]: orgId,
216
- [_chunk3XQIVEATjs.ACTIVE_ORG_NAME_ENV]: orgName,
217
- ..._chunk3XQIVEATjs.featureEnvValues.call(void 0, data)
215
+ [_chunkBJL7RYQNjs.ACTIVE_ORG_ID_ENV]: orgId,
216
+ [_chunkBJL7RYQNjs.ACTIVE_ORG_NAME_ENV]: orgName,
217
+ ..._chunkBJL7RYQNjs.featureEnvValues.call(void 0, data)
218
218
  };
219
219
  }
220
220
  async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
221
221
  const headers = {
222
222
  "Content-Type": "application/json",
223
- "User-Agent": `deepline-ts-sdk/${_chunkUT4YMA2Njs.SDK_VERSION}`,
223
+ "User-Agent": `deepline-ts-sdk/${_chunkDFHS5XVZjs.SDK_VERSION}`,
224
224
  "X-Deepline-Client-Family": "sdk",
225
225
  "X-Deepline-CLI-Family": "sdk",
226
- "X-Deepline-Agent-Runtime": _chunkUT4YMA2Njs.detectAgentRuntime.call(void 0, ),
227
- "X-Deepline-CLI-Version": _chunkUT4YMA2Njs.SDK_VERSION,
228
- "X-Deepline-SDK-Version": _chunkUT4YMA2Njs.SDK_VERSION,
229
- "X-Deepline-API-Contract": _chunkUT4YMA2Njs.SDK_API_CONTRACT
226
+ "X-Deepline-Agent-Runtime": _chunkDFHS5XVZjs.detectAgentRuntime.call(void 0, ),
227
+ "X-Deepline-CLI-Version": _chunkDFHS5XVZjs.SDK_VERSION,
228
+ "X-Deepline-SDK-Version": _chunkDFHS5XVZjs.SDK_VERSION,
229
+ "X-Deepline-API-Contract": _chunkDFHS5XVZjs.SDK_API_CONTRACT
230
230
  };
231
231
  if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
232
232
  const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
@@ -265,10 +265,10 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
265
265
  if (failure.name === "AbortError" || failure.name === "TimeoutError") {
266
266
  throw failure;
267
267
  }
268
- const causeCode = _chunkUT4YMA2Njs.networkCauseCode.call(void 0, failure);
268
+ const causeCode = _chunkDFHS5XVZjs.networkCauseCode.call(void 0, failure);
269
269
  throw Object.assign(
270
270
  new (0, _chunkDIAWYWT5js.DeeplineError)(
271
- _chunkUT4YMA2Njs.connectionFailureMessage.call(void 0, new URL(url).origin, failure),
271
+ _chunkDFHS5XVZjs.connectionFailureMessage.call(void 0, new URL(url).origin, failure),
272
272
  void 0,
273
273
  "NETWORK_ERROR",
274
274
  causeCode ? { causeCode } : void 0
@@ -285,7 +285,7 @@ async function readStatusBanner(baseUrl) {
285
285
  return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
286
286
  }
287
287
  async function reportSetupCompleted(input) {
288
- const apiKey = input.authScope === "folder" ? _chunk3XQIVEATjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunk3XQIVEATjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
288
+ const apiKey = input.authScope === "folder" ? _chunkBJL7RYQNjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkBJL7RYQNjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
289
289
  if (!apiKey) return;
290
290
  try {
291
291
  await httpJson(
@@ -398,7 +398,7 @@ async function reportApprovalLinkShown(baseUrl, claim, mode) {
398
398
  }
399
399
  }
400
400
  async function handleRegister(args, options) {
401
- const baseUrl = _chunk3XQIVEATjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
401
+ const baseUrl = _chunkBJL7RYQNjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
402
402
  let orgName = "";
403
403
  let orgId = "";
404
404
  let agentName = "";
@@ -457,19 +457,19 @@ async function handleRegister(args, options) {
457
457
  savePendingClaim(baseUrl, pendingClaim);
458
458
  saveEnvValues(
459
459
  {
460
- [_chunk3XQIVEATjs.HOST_URL_ENV]: baseUrl
460
+ [_chunkBJL7RYQNjs.HOST_URL_ENV]: baseUrl
461
461
  },
462
462
  baseUrl,
463
463
  authScope
464
464
  );
465
465
  }
466
466
  if (claimUrl) {
467
- const shouldOpen = waitMode !== "no" && _chunkUT4YMA2Njs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
467
+ const shouldOpen = waitMode !== "no" && _chunkDFHS5XVZjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
468
468
  console.log(
469
469
  shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
470
470
  );
471
471
  console.log(` ${claimUrl}`);
472
- if (shouldOpen) _chunkU7IJAGWBjs.openInBrowser.call(void 0, claimUrl);
472
+ if (shouldOpen) _chunkBYEDI5PMjs.openInBrowser.call(void 0, claimUrl);
473
473
  if (claimToken && pendingClaim.approvalLinkReporting && !_optionalChain([options, 'optionalAccess', _16 => _16.deferApprovalLinkReport])) {
474
474
  await reportApprovalLinkShown(
475
475
  baseUrl,
@@ -519,8 +519,8 @@ async function handleRegister(args, options) {
519
519
  if (apiKey) {
520
520
  saveEnvValues(
521
521
  {
522
- [_chunk3XQIVEATjs.HOST_URL_ENV]: baseUrl,
523
- [_chunk3XQIVEATjs.API_KEY_ENV]: apiKey,
522
+ [_chunkBJL7RYQNjs.HOST_URL_ENV]: baseUrl,
523
+ [_chunkBJL7RYQNjs.API_KEY_ENV]: apiKey,
524
524
  ...activeOrgEnvValues(statusData)
525
525
  },
526
526
  baseUrl,
@@ -542,7 +542,7 @@ async function handleRegister(args, options) {
542
542
  }
543
543
  }
544
544
  async function handleWait(args) {
545
- const baseUrl = _chunk3XQIVEATjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
545
+ const baseUrl = _chunkBJL7RYQNjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
546
546
  let timeoutSeconds = 300;
547
547
  let requestedScope;
548
548
  if (args.includes("--auth-scope")) {
@@ -566,7 +566,7 @@ async function handleWait(args) {
566
566
  const authScope = resumed.scope;
567
567
  const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _17 => _17.claimToken]), () => ( ""));
568
568
  if (!pendingClaim) {
569
- const scopedApiKey = authScope === "folder" ? _chunk3XQIVEATjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunk3XQIVEATjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
569
+ const scopedApiKey = authScope === "folder" ? _chunkBJL7RYQNjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkBJL7RYQNjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
570
570
  if (scopedApiKey) {
571
571
  console.log("Already connected.");
572
572
  return EXIT_OK;
@@ -609,8 +609,8 @@ async function handleWait(args) {
609
609
  if (apiKey) {
610
610
  saveEnvValues(
611
611
  {
612
- [_chunk3XQIVEATjs.HOST_URL_ENV]: baseUrl,
613
- [_chunk3XQIVEATjs.API_KEY_ENV]: apiKey,
612
+ [_chunkBJL7RYQNjs.HOST_URL_ENV]: baseUrl,
613
+ [_chunkBJL7RYQNjs.API_KEY_ENV]: apiKey,
614
614
  ...activeOrgEnvValues(data)
615
615
  },
616
616
  baseUrl,
@@ -634,8 +634,8 @@ async function handleWait(args) {
634
634
  return EXIT_AUTH;
635
635
  }
636
636
  async function authStatusLine(timeoutMs = 3e3) {
637
- const baseUrl = _chunk3XQIVEATjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
638
- const apiKey = _chunk3XQIVEATjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
637
+ const baseUrl = _chunkBJL7RYQNjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
638
+ const apiKey = _chunkBJL7RYQNjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
639
639
  if (!apiKey) return `Auth: not connected (${baseUrl})`;
640
640
  try {
641
641
  const { status, data } = await httpJson(
@@ -658,9 +658,9 @@ async function authStatusLine(timeoutMs = 3e3) {
658
658
  }
659
659
  }
660
660
  async function handleStatus(args) {
661
- const baseUrl = _chunk3XQIVEATjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
661
+ const baseUrl = _chunkBJL7RYQNjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
662
662
  const reveal = args.includes("--reveal");
663
- const jsonOutput = _chunkU7IJAGWBjs.argsWantJson.call(void 0, args);
663
+ const jsonOutput = _chunkBYEDI5PMjs.argsWantJson.call(void 0, args);
664
664
  const hasExplicitAuthScope = args.includes("--auth-scope");
665
665
  let authScope = null;
666
666
  if (hasExplicitAuthScope) {
@@ -701,14 +701,14 @@ async function handleStatus(args) {
701
701
  };
702
702
  hostLines.push(`Host: ${baseUrl} (unreachable)`);
703
703
  }
704
- const apiKey = authScope === "folder" ? _chunk3XQIVEATjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunk3XQIVEATjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunk3XQIVEATjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
704
+ const apiKey = authScope === "folder" ? _chunkBJL7RYQNjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkBJL7RYQNjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkBJL7RYQNjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
705
705
  if (!apiKey) {
706
706
  const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
707
707
  baseUrl,
708
708
  _nullishCoalesce(authScope, () => ( void 0))
709
709
  );
710
710
  if (pendingClaim) {
711
- _chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
711
+ _chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
712
712
  {
713
713
  ..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
714
714
  status: "pending",
@@ -729,7 +729,7 @@ async function handleStatus(args) {
729
729
  );
730
730
  return EXIT_OK;
731
731
  }
732
- _chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
732
+ _chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
733
733
  {
734
734
  ..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
735
735
  status: "not connected",
@@ -762,7 +762,7 @@ async function handleStatus(args) {
762
762
  }
763
763
  );
764
764
  if (status === 401 || status === 403) {
765
- _chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
765
+ _chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
766
766
  {
767
767
  ..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
768
768
  status: "unauthorized",
@@ -789,7 +789,7 @@ async function handleStatus(args) {
789
789
  console.error(`Auth status error (status ${status}).`);
790
790
  return EXIT_SERVER;
791
791
  }
792
- const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunk3XQIVEATjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
792
+ const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkBJL7RYQNjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
793
793
  clearSatisfiedPendingClaim(
794
794
  baseUrl,
795
795
  resolvedAuthScope,
@@ -817,28 +817,28 @@ async function handleStatus(args) {
817
817
  if (apiKeyResp) {
818
818
  saveEnvValues(
819
819
  {
820
- [_chunk3XQIVEATjs.HOST_URL_ENV]: baseUrl,
821
- [_chunk3XQIVEATjs.API_KEY_ENV]: apiKeyResp,
820
+ [_chunkBJL7RYQNjs.HOST_URL_ENV]: baseUrl,
821
+ [_chunkBJL7RYQNjs.API_KEY_ENV]: apiKeyResp,
822
822
  ...activeOrgEnvValues(data)
823
823
  },
824
824
  baseUrl,
825
825
  resolvedAuthScope
826
826
  );
827
827
  if (resolvedAuthScope === "folder") {
828
- const target = _chunk3XQIVEATjs.resolveProjectPinTarget.call(void 0, );
828
+ const target = _chunkBJL7RYQNjs.resolveProjectPinTarget.call(void 0, );
829
829
  savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
830
830
  } else {
831
831
  savedApiKeyPath = envFilePath(baseUrl);
832
832
  }
833
833
  }
834
- } else if (resolvedAuthScope === "folder" || _chunk3XQIVEATjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
835
- saveEnvValues(_chunk3XQIVEATjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
834
+ } else if (resolvedAuthScope === "folder" || _chunkBJL7RYQNjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
835
+ saveEnvValues(_chunkBJL7RYQNjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
836
836
  }
837
- _chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
837
+ _chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
838
838
  {
839
839
  ...payload,
840
- ..._chunkUT4YMA2Njs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
841
- command_context: _chunk3XQIVEATjs.resolveCliCommandContext.call(void 0,
840
+ ..._chunkDFHS5XVZjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
841
+ command_context: _chunkBJL7RYQNjs.resolveCliCommandContext.call(void 0,
842
842
  { baseUrl, apiKey },
843
843
  resolvedAuthScope
844
844
  )
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
49
49
  // getters keep their established compatibility behavior.
50
50
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
51
51
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
52
- version: "0.3.484",
52
+ version: "0.3.486",
53
53
  updateSummary: {
54
54
  introducedIn: "0.3.90",
55
55
  summary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release."
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HttpClient,
3
3
  detectAgentRuntime
4
- } from "./chunk-WYUCDLVR.mjs";
4
+ } from "./chunk-MJ56FCYU.mjs";
5
5
  import {
6
6
  ConfigError
7
7
  } from "./chunk-4QF2K7TM.mjs";
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-5AEDYVB6.mjs";
4
4
  import {
5
5
  DeeplineClient
6
- } from "./chunk-4OVHIWE7.mjs";
6
+ } from "./chunk-U23L57VU.mjs";
7
7
  import {
8
8
  printCommandEnvelope
9
- } from "./chunk-7K5CWKKZ.mjs";
9
+ } from "./chunk-PQHDZHZG.mjs";
10
10
  import {
11
11
  resolveConfig,
12
12
  sdkCliStateDirPath
13
- } from "./chunk-TRLDJNVE.mjs";
13
+ } from "./chunk-T3Q6BMVH.mjs";
14
14
 
15
15
  // src/cli/commands/search.ts
16
16
  import { Option } from "commander";
@@ -132,7 +132,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
132
132
  });
133
133
  if (searchRef) rememberSearchRef(searchRef);
134
134
  pointAtDescribe(result);
135
- const { renderSearchResults } = await import("./search-output-NUQAKWDM.mjs");
135
+ const { renderSearchResults } = await import("./search-output-JFD53H2N.mjs");
136
136
  printCommandEnvelope(result, {
137
137
  json: options.json === true,
138
138
  text: renderSearchResults(result, summaryWidth)
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getActiveCliProgress
3
- } from "./chunk-TN2GW57M.mjs";
3
+ } from "./chunk-A456YVDE.mjs";
4
4
  import {
5
5
  DEFAULT_SKILL_AGENTS,
6
6
  KNOWN_SKILL_AGENTS,
@@ -12,7 +12,7 @@ import {
12
12
  sdkCliStateDirPath,
13
13
  skillsAgentPathSegment,
14
14
  writeSdkSkillsLocalVersion
15
- } from "./chunk-TRLDJNVE.mjs";
15
+ } from "./chunk-T3Q6BMVH.mjs";
16
16
  import {
17
17
  SDK_API_CONTRACT,
18
18
  SDK_API_MAJOR,
@@ -20,13 +20,13 @@ import {
20
20
  agentSessionIdFromEnvironment,
21
21
  deploymentProtectionHeaders,
22
22
  detectAgentRuntime
23
- } from "./chunk-WYUCDLVR.mjs";
23
+ } from "./chunk-MJ56FCYU.mjs";
24
24
  import {
25
25
  DeeplineError
26
26
  } from "./chunk-HBL4PM5Q.mjs";
27
27
  import {
28
28
  SDK_RELEASE
29
- } from "./chunk-HEI3BWIV.mjs";
29
+ } from "./chunk-5RLVCOKH.mjs";
30
30
 
31
31
  // src/compat.ts
32
32
  import { randomUUID } from "crypto";
@@ -183,6 +183,9 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
183
183
  return { response: null, error: null };
184
184
  }
185
185
  const controller = new AbortController();
186
+ const abortFromCaller = () => controller.abort(options.signal?.reason);
187
+ if (options.signal?.aborted) abortFromCaller();
188
+ else options.signal?.addEventListener("abort", abortFromCaller, { once: true });
186
189
  const timeout = setTimeout(
187
190
  () => controller.abort(),
188
191
  options.timeoutMs ?? CHECK_TIMEOUT_MS
@@ -222,6 +225,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
222
225
  signal: controller.signal
223
226
  });
224
227
  const raw = await response.json().catch(() => null);
228
+ options.signal?.throwIfAborted();
225
229
  if (!raw || typeof raw.ok !== "boolean" || typeof raw.status !== "string") {
226
230
  throw new Error(
227
231
  `SDK compatibility endpoint returned a non-policy response (HTTP ${response.status}).`
@@ -241,6 +245,12 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
241
245
  }
242
246
  return { response: data, error: null };
243
247
  } catch (error) {
248
+ if (options.signal?.aborted) {
249
+ return {
250
+ response: null,
251
+ error: error instanceof Error ? error : new Error(String(error))
252
+ };
253
+ }
244
254
  const cached = readCachedCompatibility(
245
255
  baseUrl,
246
256
  options.command,
@@ -262,6 +272,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
262
272
  };
263
273
  } finally {
264
274
  clearTimeout(timeout);
275
+ options.signal?.removeEventListener("abort", abortFromCaller);
265
276
  }
266
277
  }
267
278
  function isCiEnvironment() {
@@ -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 _chunkU7IJAGWBjs = require('./chunk-U7IJAGWB.js');
4
+ var _chunkBYEDI5PMjs = require('./chunk-BYEDI5PM.js');
5
5
 
6
6
 
7
- var _chunkUT4YMA2Njs = require('./chunk-UT4YMA2N.js');
7
+ var _chunkDFHS5XVZjs = require('./chunk-DFHS5XVZ.js');
8
8
 
9
9
  // src/cli/commands/sessions.ts
10
10
 
@@ -139,7 +139,7 @@ function currentSessionFile(agent) {
139
139
  const newestFirst = listSessionFiles(agent).sort(
140
140
  (a, b) => b.mtimeMs - a.mtimeMs
141
141
  );
142
- const sessionId = _chunkUT4YMA2Njs.agentSessionIdFromEnvironment.call(void 0,
142
+ const sessionId = _chunkDFHS5XVZjs.agentSessionIdFromEnvironment.call(void 0,
143
143
  process.env,
144
144
  agent === "auto" ? void 0 : agent === "claude" ? "claude_code" : "codex"
145
145
  );
@@ -451,7 +451,7 @@ function buildSessionUploadContent(raw) {
451
451
  return { encodedContent: encoded, needsChunking: true };
452
452
  }
453
453
  async function uploadPayload(path, payload) {
454
- const { http } = _chunkU7IJAGWBjs.getAuthedHttpClient.call(void 0, );
454
+ const { http } = _chunkBYEDI5PMjs.getAuthedHttpClient.call(void 0, );
455
455
  return await http.post(path, payload);
456
456
  }
457
457
  async function uploadChunkedSessions(sessions, options) {
@@ -484,7 +484,7 @@ async function uploadChunkedSessions(sessions, options) {
484
484
  ...options.rating ? { rating: options.rating } : {}
485
485
  });
486
486
  const sessionIds = sessions.map((session) => session.sessionId);
487
- _chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
487
+ _chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
488
488
  {
489
489
  ...response,
490
490
  ok: true,
@@ -516,7 +516,7 @@ async function handleSessionsSend(options) {
516
516
  filename: _path.basename.call(void 0, filePath),
517
517
  ...rating ? { rating } : {}
518
518
  });
519
- _chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
519
+ _chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
520
520
  {
521
521
  ...response2,
522
522
  ok: true,
@@ -566,7 +566,7 @@ async function handleSessionsSend(options) {
566
566
  ...rating ? { rating } : {}
567
567
  });
568
568
  const sessionIds = built.map((session) => session.sessionId);
569
- _chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
569
+ _chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
570
570
  {
571
571
  ...response,
572
572
  ok: true,
@@ -674,7 +674,7 @@ ${refreshMeta}
674
674
  </body>
675
675
  </html>`;
676
676
  _fs.writeFileSync.call(void 0, outputPath, html, "utf8");
677
- _chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
677
+ _chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
678
678
  {
679
679
  ok: true,
680
680
  file: outputPath,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  DeeplineClient
3
- } from "./chunk-LTZXLYKE.mjs";
3
+ } from "./chunk-PKOFEHZL.mjs";
4
4
  import {
5
5
  HttpClient,
6
6
  resolveConfig
7
- } from "./chunk-TRLDJNVE.mjs";
7
+ } from "./chunk-T3Q6BMVH.mjs";
8
8
 
9
9
  // src/client.ts
10
10
  var DeeplineClient2 = class extends DeeplineClient {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getAuthedHttpClient,
3
3
  printCommandEnvelope
4
- } from "./chunk-7K5CWKKZ.mjs";
4
+ } from "./chunk-PQHDZHZG.mjs";
5
5
  import {
6
6
  agentSessionIdFromEnvironment
7
- } from "./chunk-WYUCDLVR.mjs";
7
+ } from "./chunk-MJ56FCYU.mjs";
8
8
 
9
9
  // src/cli/commands/sessions.ts
10
10
  import {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeRawStderr
3
- } from "./chunk-7K5CWKKZ.mjs";
3
+ } from "./chunk-PQHDZHZG.mjs";
4
4
 
5
5
  // src/cli/maintenance-policy.ts
6
6
  import { InvalidArgumentError } from "commander";
@@ -2,7 +2,7 @@ import {
2
2
  argsWantJson,
3
3
  openInBrowser,
4
4
  printCommandEnvelope
5
- } from "./chunk-7K5CWKKZ.mjs";
5
+ } from "./chunk-PQHDZHZG.mjs";
6
6
  import {
7
7
  ACTIVE_ORG_ID_ENV,
8
8
  ACTIVE_ORG_NAME_ENV,
@@ -22,14 +22,14 @@ import {
22
22
  saveHostEnvValues,
23
23
  saveProjectDeeplineEnvValues,
24
24
  storedHostApiKey
25
- } from "./chunk-TRLDJNVE.mjs";
25
+ } from "./chunk-T3Q6BMVH.mjs";
26
26
  import {
27
27
  SDK_API_CONTRACT,
28
28
  SDK_VERSION,
29
29
  connectionFailureMessage,
30
30
  detectAgentRuntime,
31
31
  networkCauseCode
32
- } from "./chunk-WYUCDLVR.mjs";
32
+ } from "./chunk-MJ56FCYU.mjs";
33
33
  import {
34
34
  DeeplineError
35
35
  } from "./chunk-HBL4PM5Q.mjs";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  npmSupportsAllowScripts,
3
3
  readNpmVersion
4
- } from "./chunk-XZXIWPT3.mjs";
4
+ } from "./chunk-F3G2HAUQ.mjs";
5
5
  import {
6
6
  runSkillsCommand
7
- } from "./chunk-V7JCMBLU.mjs";
7
+ } from "./chunk-YIKHNZ6B.mjs";
8
8
  import {
9
9
  resolveShellSpawn
10
- } from "./chunk-YHA3EV3I.mjs";
10
+ } from "./chunk-TE2QT2MX.mjs";
11
11
  import {
12
12
  printCommandEnvelope
13
- } from "./chunk-7K5CWKKZ.mjs";
13
+ } from "./chunk-PQHDZHZG.mjs";
14
14
  import {
15
15
  autoDetectBaseUrl
16
- } from "./chunk-TRLDJNVE.mjs";
16
+ } from "./chunk-T3Q6BMVH.mjs";
17
17
 
18
18
  // src/cli/commands/update.ts
19
19
  import { spawn, spawnSync } from "child_process";
@@ -1,7 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/cli/tool-description.ts
2
2
  function observedMaxText(pricing) {
3
3
  const max = recordValue(recordValue(pricing).observedMax);
4
- return typeof max.creditsPerCall === "number" && max.creditsPerCall > 0 ? `max observed ${max.creditsPerCall} credits/call (last ${String(max.windowDays)} days)` : "";
4
+ if (typeof max.creditsPerCall !== "number" || max.creditsPerCall <= 0)
5
+ return "";
6
+ const avg = typeof max.avgCreditsPerCall === "number" && typeof max.sampleCount === "number" ? `${max.avgCreditsPerCall} avg, ` : "";
7
+ const calls = avg && typeof max.sampleCount === "number" ? `${max.sampleCount} observed, ` : "";
8
+ return `observed ${avg}${max.creditsPerCall} max credits/call (${calls}last ${String(max.windowDays)} days)`;
5
9
  }
6
10
  var Capability = class _Capability {
7
11
  #catalogEntry;
@@ -1,7 +1,11 @@
1
1
  // src/cli/tool-description.ts
2
2
  function observedMaxText(pricing) {
3
3
  const max = recordValue(recordValue(pricing).observedMax);
4
- return typeof max.creditsPerCall === "number" && max.creditsPerCall > 0 ? `max observed ${max.creditsPerCall} credits/call (last ${String(max.windowDays)} days)` : "";
4
+ if (typeof max.creditsPerCall !== "number" || max.creditsPerCall <= 0)
5
+ return "";
6
+ const avg = typeof max.avgCreditsPerCall === "number" && typeof max.sampleCount === "number" ? `${max.avgCreditsPerCall} avg, ` : "";
7
+ const calls = avg && typeof max.sampleCount === "number" ? `${max.sampleCount} observed, ` : "";
8
+ return `observed ${avg}${max.creditsPerCall} max credits/call (${calls}last ${String(max.windowDays)} days)`;
5
9
  }
6
10
  var Capability = class _Capability {
7
11
  #catalogEntry;