deepline 0.3.452 → 0.3.454

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 (122) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +65 -0
  2. package/dist/bundling-sources/sdk/src/http.ts +2 -1
  3. package/dist/bundling-sources/sdk/src/index.ts +2 -0
  4. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  5. package/dist/bundling-sources/sdk/src/types.ts +2 -0
  6. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +63 -0
  7. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +3 -0
  8. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +13 -1
  9. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +83 -4
  10. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +11 -3
  11. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +16 -0
  12. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-runtime-watchdog.ts +20 -0
  13. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +77 -12
  14. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +5 -2
  15. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +254 -64
  16. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +11 -0
  17. package/dist/cli/auth-GUZWKNXM.js +40 -0
  18. package/dist/cli/{auth-DKZLB6GN.mjs → auth-YNPT3IER.mjs} +4 -4
  19. package/dist/cli/{billing-DOFXWAZR.mjs → billing-TLRVAOXB.mjs} +18 -5
  20. package/dist/cli/{billing-CN3XSVER.js → billing-VXIIND6T.js} +87 -74
  21. package/dist/cli/{chunk-TXN27XQQ.mjs → chunk-27NNEBIS.mjs} +2 -2
  22. package/dist/cli/chunk-2I7GE7KB.mjs +155 -0
  23. package/dist/cli/{chunk-M4FFNUF4.js → chunk-33FEF4RH.js} +50 -50
  24. package/dist/cli/{chunk-FIQ2F5LA.mjs → chunk-5GJH2BYN.mjs} +2 -2
  25. package/dist/cli/{chunk-ELULDUX3.mjs → chunk-5OQMUDPM.mjs} +1 -1
  26. package/dist/cli/{chunk-5DRGDSJL.js → chunk-6JY2NGJN.js} +26 -26
  27. package/dist/cli/chunk-7ICOQRW5.js +155 -0
  28. package/dist/cli/{chunk-7JSZOUNU.js → chunk-7V3OKSB2.js} +1 -1
  29. package/dist/cli/{chunk-74BPYDDG.js → chunk-BUYQU7TB.js} +8 -8
  30. package/dist/cli/{chunk-RNM4HG3W.mjs → chunk-CPXT4KPC.mjs} +3 -3
  31. package/dist/cli/{chunk-KQUDU3ZE.mjs → chunk-DCZSJON4.mjs} +2 -2
  32. package/dist/cli/{chunk-2GMAPSJU.mjs → chunk-EXWKHMMP.mjs} +5 -5
  33. package/dist/cli/{chunk-ZH6HFV7Y.js → chunk-FKGXZXRP.js} +8 -8
  34. package/dist/cli/{chunk-UGPGB4C6.mjs → chunk-G6ZOZQXT.mjs} +4 -153
  35. package/dist/cli/{chunk-L2GATUZK.js → chunk-IJ5WCZ32.js} +20 -20
  36. package/dist/cli/{chunk-JT4ZSWBK.js → chunk-KPPL2WNH.js} +16 -16
  37. package/dist/cli/{chunk-X4IMX5AO.mjs → chunk-LVHRP7XM.mjs} +4 -4
  38. package/dist/cli/{chunk-RFDIXLRX.mjs → chunk-LWYOJG66.mjs} +1 -1
  39. package/dist/cli/{chunk-L6YCGSL4.js → chunk-P5IQ6LIK.js} +35 -35
  40. package/dist/cli/{chunk-2VERHTKO.js → chunk-QLMQ2NAQ.js} +2 -2
  41. package/dist/cli/{chunk-PBQSX6ES.mjs → chunk-RDAUQGPG.mjs} +1 -1
  42. package/dist/cli/{chunk-7OI33KE5.js → chunk-S2PO3X5R.js} +2 -2
  43. package/dist/cli/{chunk-ZKGK2JU3.js → chunk-SJH66N73.js} +6 -6
  44. package/dist/cli/{chunk-SM5RZ5JC.mjs → chunk-TECW24CR.mjs} +2 -2
  45. package/dist/cli/{chunk-R7YZKHN5.mjs → chunk-THJ7ORNM.mjs} +3 -3
  46. package/dist/cli/{chunk-POSAVPQZ.mjs → chunk-U72KDMYJ.mjs} +2 -2
  47. package/dist/cli/{chunk-JJOSUZMS.mjs → chunk-UT6W675P.mjs} +1 -1
  48. package/dist/cli/{chunk-G5BMPTZD.js → chunk-VHGGHRGY.js} +81 -81
  49. package/dist/cli/{chunk-ETFVH7PO.js → chunk-VXBEHDM6.js} +10 -10
  50. package/dist/cli/{chunk-WW63S4RC.js → chunk-WONLZMDF.js} +6 -6
  51. package/dist/cli/{chunk-QK65KBWN.mjs → chunk-YETNOEAZ.mjs} +8 -8
  52. package/dist/cli/{chunk-YWL4ULLT.js → chunk-YPYR4ACF.js} +73 -222
  53. package/dist/cli/{chunk-2SICEJBN.mjs → chunk-YXCLG3KB.mjs} +35 -1
  54. package/dist/cli/{chunk-J5O4AXSO.js → chunk-Z5PQSTYX.js} +84 -50
  55. package/dist/cli/{csv-N25FMDZQ.js → csv-BSKJR3CR.js} +12 -12
  56. package/dist/cli/{csv-QUNUQZYC.mjs → csv-I4CAAV6A.mjs} +3 -3
  57. package/dist/cli/{db-WYWDUYXS.mjs → db-EQP24K3B.mjs} +4 -4
  58. package/dist/cli/{db-2SGG56WR.js → db-RA3IL6MC.js} +25 -25
  59. package/dist/cli/{describe-QQ2XL6PV.js → describe-62KPTIFH.js} +17 -16
  60. package/dist/cli/{describe-4RBUIHR7.mjs → describe-EZDVJDPQ.mjs} +13 -12
  61. package/dist/cli/describe-core.d.mts +1 -1
  62. package/dist/cli/describe-core.d.ts +1 -1
  63. package/dist/cli/{executions-YLJHAHHX.js → executions-2HBBXRPM.js} +6 -6
  64. package/dist/cli/{executions-WOBIMQ7H.mjs → executions-W5KR56KP.mjs} +4 -4
  65. package/dist/cli/{feedback-VCGVROTY.mjs → feedback-6UTOLSFP.mjs} +3 -3
  66. package/dist/cli/{feedback-D653FAXY.js → feedback-CVYS7ZPV.js} +7 -7
  67. package/dist/cli/{git-SZ6RSLFN.mjs → git-JXH64LI4.mjs} +4 -4
  68. package/dist/cli/git-U6FMVAAM.js +24 -0
  69. package/dist/cli/index.js +133 -131
  70. package/dist/cli/index.mjs +39 -37
  71. package/dist/cli/{legacy-noops-TXZ75CWS.js → legacy-noops-5XTXIPU2.js} +7 -7
  72. package/dist/cli/{legacy-noops-UGLTI2ZY.mjs → legacy-noops-NYMLGQNX.mjs} +4 -4
  73. package/dist/cli/{monitors-HLIW4AIL.mjs → monitors-CEU6SP2B.mjs} +156 -4
  74. package/dist/cli/{monitors-VC6YSBYX.js → monitors-J6HAQLX2.js} +276 -124
  75. package/dist/cli/{org-I3VQDIGZ.js → org-CYE3DCIT.js} +66 -66
  76. package/dist/cli/{org-X4MVTSKM.mjs → org-RRKAJM5V.mjs} +4 -4
  77. package/dist/cli/{play-7TLGGN66.js → play-NJDW74YH.js} +284 -283
  78. package/dist/cli/{play-EAYGEAMI.mjs → play-PXISXZ2P.mjs} +11 -10
  79. package/dist/cli/{providers-MBTMUEGX.mjs → providers-6QGGDOWK.mjs} +4 -4
  80. package/dist/cli/{providers-IZ3YWZ4E.js → providers-JE3MUBYK.js} +7 -7
  81. package/dist/cli/{quickstart-MBDEV4RJ.js → quickstart-AQBBOFQL.js} +5 -5
  82. package/dist/cli/{quickstart-MDW2NMAS.mjs → quickstart-MKJ7TYQZ.mjs} +3 -3
  83. package/dist/cli/{search-4PQZYRQO.mjs → search-6PKFZ2JD.mjs} +5 -5
  84. package/dist/cli/search-EJGRNQQK.js +30 -0
  85. package/dist/cli/{secrets-3S7KUS2H.js → secrets-IKGJYESD.js} +13 -13
  86. package/dist/cli/{secrets-S55UCYYR.mjs → secrets-QBWRVZCT.mjs} +4 -4
  87. package/dist/cli/{sessions-UEHVIB6W.js → sessions-462I5YEQ.js} +5 -5
  88. package/dist/cli/{sessions-T6XVN737.mjs → sessions-SVYTBNRJ.mjs} +4 -4
  89. package/dist/cli/{settings-CGP7XMJZ.mjs → settings-FH4XZ7FE.mjs} +9 -8
  90. package/dist/cli/{settings-MYAUWNTF.js → settings-WHLTLPXZ.js} +76 -75
  91. package/dist/cli/{setup-5Z5HAWEG.js → setup-IKTCP3QB.js} +43 -42
  92. package/dist/cli/{setup-U66NZQXB.mjs → setup-ISCNCB4W.mjs} +8 -7
  93. package/dist/cli/{skills-2JS3SNFA.mjs → skills-HITZS5EJ.mjs} +6 -5
  94. package/dist/cli/skills-LC2YKUSO.js +30 -0
  95. package/dist/cli/{tools-G3VYZKTO.mjs → tools-SQUTVLPO.mjs} +13 -12
  96. package/dist/cli/tools-Y55OXE72.js +45 -0
  97. package/dist/cli/{update-C7CLWWIW.mjs → update-AFYEREBX.mjs} +8 -7
  98. package/dist/cli/update-Q3I6MSEQ.js +32 -0
  99. package/dist/cli/{workflow-TBKVIN4S.js → workflow-AAOOROIR.js} +15 -15
  100. package/dist/cli/{workflow-EUMRVXU7.mjs → workflow-VBCZPKVF.mjs} +5 -5
  101. package/dist/{client-CPRaigLC.d.ts → client-BV7tC6oq.d.ts} +28 -1
  102. package/dist/{client-DstDI5TV.d.mts → client-Ct6OBj9Y.d.mts} +28 -1
  103. package/dist/index.d.mts +2 -2
  104. package/dist/index.d.ts +2 -2
  105. package/dist/index.js +6 -6
  106. package/dist/index.mjs +3 -3
  107. package/dist/install-integrity.json +82 -80
  108. package/dist/plays/play-description.d.mts +1 -1
  109. package/dist/plays/play-description.d.ts +1 -1
  110. package/dist/plays/run-request.d.mts +1 -1
  111. package/dist/plays/run-request.d.ts +1 -1
  112. package/dist/release.d.mts +1 -1
  113. package/dist/release.d.ts +1 -1
  114. package/dist/release.js +2 -2
  115. package/dist/release.mjs +1 -1
  116. package/package.json +1 -1
  117. package/dist/cli/auth-36DQP46D.js +0 -40
  118. package/dist/cli/git-T6LBJEY6.js +0 -24
  119. package/dist/cli/search-5B4ZM7VS.js +0 -30
  120. package/dist/cli/skills-JXPQFJAJ.js +0 -29
  121. package/dist/cli/tools-RHRJ4SLY.js +0 -44
  122. package/dist/cli/update-5YBPJ3EQ.js +0 -31
@@ -0,0 +1,155 @@
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
+
3
+ var _chunkSJH66N73js = require('./chunk-SJH66N73.js');
4
+
5
+ // src/cli/progress.ts
6
+ var _worker_threads = require('worker_threads');
7
+ var CliProgress = (_class = class {
8
+ __init() {this.lastMessage = null}
9
+ __init2() {this.interactive = Boolean(process.stderr.isTTY)}
10
+ __init3() {this.grey = "\x1B[90m"}
11
+ __init4() {this.cyan = "\x1B[36m"}
12
+ __init5() {this.dim = "\x1B[2m"}
13
+ __init6() {this.reset = "\x1B[0m"}
14
+ __init7() {this.worker = null}
15
+
16
+ // --json output is one JSON document: progress never renders under it.
17
+ 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);
18
+ this.enabled = enabled && !_chunkSJH66N73js.isJsonOutputMode.call(void 0, );
19
+ }
20
+ phase(message) {
21
+ if (!this.enabled || this.lastMessage === message) {
22
+ return;
23
+ }
24
+ if (this.interactive && this.lastMessage) {
25
+ this.settle("\u2713");
26
+ }
27
+ this.lastMessage = message;
28
+ if (!this.interactive) {
29
+ process.stderr.write(`${message}
30
+ `);
31
+ return;
32
+ }
33
+ this.ensureWorker();
34
+ _optionalChain([this, 'access', _ => _.worker, 'optionalAccess', _2 => _2.postMessage, 'call', _3 => _3({ type: "phase", message })]);
35
+ }
36
+ complete() {
37
+ this.settle("\u2713");
38
+ }
39
+ fail() {
40
+ this.settle("\u2717");
41
+ }
42
+ writeLogLine(line) {
43
+ if (_chunkSJH66N73js.isJsonOutputMode.call(void 0, )) return;
44
+ if (!this.enabled) {
45
+ process.stderr.write(`${line}
46
+ `);
47
+ return;
48
+ }
49
+ const message = this.interactive ? `${this.cyan}[logs]${this.reset} ${this.dim}${line}${this.reset}` : `[logs] ${line}`;
50
+ if (!this.interactive) {
51
+ process.stderr.write(`${message}
52
+ `);
53
+ return;
54
+ }
55
+ const activeMessage = this.lastMessage;
56
+ _optionalChain([this, 'access', _4 => _4.worker, 'optionalAccess', _5 => _5.terminate, 'call', _6 => _6(), 'access', _7 => _7.catch, 'call', _8 => _8(() => void 0)]);
57
+ this.worker = null;
58
+ process.stderr.write(`\r\x1B[2K${message}
59
+ `);
60
+ if (activeMessage) {
61
+ this.startWorker().postMessage({ type: "phase", message: activeMessage });
62
+ }
63
+ }
64
+ writeLine(line, stream = process.stderr) {
65
+ if (!this.enabled || !this.interactive) {
66
+ stream.write(`${line}
67
+ `);
68
+ return;
69
+ }
70
+ const activeMessage = this.lastMessage;
71
+ _optionalChain([this, 'access', _9 => _9.worker, 'optionalAccess', _10 => _10.terminate, 'call', _11 => _11(), 'access', _12 => _12.catch, 'call', _13 => _13(() => void 0)]);
72
+ this.worker = null;
73
+ stream.write(`\r\x1B[2K${line}
74
+ `);
75
+ if (activeMessage) {
76
+ this.startWorker().postMessage({ type: "phase", message: activeMessage });
77
+ }
78
+ }
79
+ settle(mark) {
80
+ if (!this.enabled || !this.lastMessage) {
81
+ return;
82
+ }
83
+ if (this.interactive) {
84
+ _optionalChain([this, 'access', _14 => _14.worker, 'optionalAccess', _15 => _15.terminate, 'call', _16 => _16(), 'access', _17 => _17.catch, 'call', _18 => _18(() => void 0)]);
85
+ this.worker = null;
86
+ process.stderr.write(
87
+ `\r\x1B[2K${this.grey}${mark} ${this.lastMessage}${this.reset}
88
+ `
89
+ );
90
+ }
91
+ this.lastMessage = null;
92
+ }
93
+ ensureWorker() {
94
+ this.startWorker();
95
+ }
96
+ startWorker() {
97
+ if (this.worker) {
98
+ return this.worker;
99
+ }
100
+ this.worker = new (0, _worker_threads.Worker)(
101
+ `
102
+ const { parentPort } = require('node:worker_threads');
103
+ const { writeSync } = require('node:fs');
104
+ const frames = ['\u2014', '\\\\', '|', '/'];
105
+ const grey = '\\x1b[90m';
106
+ const reset = '\\x1b[0m';
107
+ let message = '';
108
+ let frameIndex = 0;
109
+ let timer = null;
110
+ function render() {
111
+ if (!message) return;
112
+ const frame = frames[frameIndex % frames.length] || '\u2014';
113
+ frameIndex += 1;
114
+ writeSync(2, '\\r\\x1b[2K' + grey + frame + ' ' + message + reset);
115
+ }
116
+ parentPort.on('message', (event) => {
117
+ if (event.type === 'phase') {
118
+ message = String(event.message || '');
119
+ frameIndex = 0;
120
+ render();
121
+ if (!timer) {
122
+ timer = setInterval(render, 120);
123
+ timer.unref && timer.unref();
124
+ }
125
+ }
126
+ if (event.type === 'stop') {
127
+ if (timer) clearInterval(timer);
128
+ timer = null;
129
+ writeSync(2, '\\r\\x1b[2K');
130
+ }
131
+ });
132
+ `,
133
+ { eval: true }
134
+ );
135
+ this.worker.unref();
136
+ return this.worker;
137
+ }
138
+ }, _class);
139
+ var activeProgress = null;
140
+ function setActiveCliProgress(progress) {
141
+ activeProgress = progress;
142
+ }
143
+ function getActiveCliProgress() {
144
+ return activeProgress;
145
+ }
146
+ function createCliProgress(enabled) {
147
+ const progress = new CliProgress(enabled);
148
+ setActiveCliProgress(progress);
149
+ return progress;
150
+ }
151
+
152
+
153
+
154
+
155
+ exports.getActiveCliProgress = getActiveCliProgress; exports.createCliProgress = createCliProgress;
@@ -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.452",
52
+ version: "0.3.454",
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."
@@ -3,15 +3,15 @@
3
3
  var _chunkZM2YPJQJjs = require('./chunk-ZM2YPJQJ.js');
4
4
 
5
5
 
6
- var _chunkJ5O4AXSOjs = require('./chunk-J5O4AXSO.js');
6
+ var _chunkZ5PQSTYXjs = require('./chunk-Z5PQSTYX.js');
7
7
 
8
8
 
9
9
 
10
- var _chunkZKGK2JU3js = require('./chunk-ZKGK2JU3.js');
10
+ var _chunkSJH66N73js = require('./chunk-SJH66N73.js');
11
11
 
12
12
 
13
13
 
14
- var _chunkETFVH7POjs = require('./chunk-ETFVH7PO.js');
14
+ var _chunkVXBEHDM6js = require('./chunk-VXBEHDM6.js');
15
15
 
16
16
 
17
17
 
@@ -5713,7 +5713,7 @@ var _fs = require('fs');
5713
5713
  var _path = require('path');
5714
5714
  var SEARCH_REF_TTL_MS = 15 * 6e4;
5715
5715
  function lastSearchPath() {
5716
- return _path.join.call(void 0, _chunkETFVH7POjs.sdkCliStateDirPath.call(void 0, _chunkETFVH7POjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
5716
+ return _path.join.call(void 0, _chunkVXBEHDM6js.sdkCliStateDirPath.call(void 0, _chunkVXBEHDM6js.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
5717
5717
  }
5718
5718
  function rememberSearchRef(searchRef) {
5719
5719
  try {
@@ -5877,7 +5877,7 @@ var OPTIONAL_COLUMNS = [
5877
5877
  ];
5878
5878
  function renderSearchResults(result, summaryWidth = DEFAULT_SUMMARY_WIDTH) {
5879
5879
  if (result.results.length === 0)
5880
- return _chunkZKGK2JU3js.renderCommandEnvelopeText.call(void 0, result);
5880
+ return _chunkSJH66N73js.renderCommandEnvelopeText.call(void 0, result);
5881
5881
  const rows = result.results.map((item) => searchRow(item, summaryWidth));
5882
5882
  const kinds = new Set(rows.map((row) => row.kind));
5883
5883
  const onlyTools = kinds.size === 1 && kinds.has("tool");
@@ -5902,7 +5902,7 @@ function renderSearchResults(result, summaryWidth = DEFAULT_SUMMARY_WIDTH) {
5902
5902
  actions: _optionalChain([render, 'optionalAccess', _12 => _12.actions])
5903
5903
  };
5904
5904
  const followUps = _optionalChain([remaining, 'access', _13 => _13.sections, 'optionalAccess', _14 => _14.length]) || _optionalChain([remaining, 'access', _15 => _15.actions, 'optionalAccess', _16 => _16.length]) ? `
5905
- ${_chunkZKGK2JU3js.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
5905
+ ${_chunkSJH66N73js.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
5906
5906
  const notes = rows.flatMap(
5907
5907
  (row) => row.notes.map((note) => ` ${row.id}: ${note}`)
5908
5908
  );
@@ -5987,7 +5987,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
5987
5987
  console.error("--summary-width must be an integer of at least 2.");
5988
5988
  return 1;
5989
5989
  }
5990
- const { search_ref: searchRef, ...result } = await new (0, _chunkJ5O4AXSOjs.DeeplineClient)().search({
5990
+ const { search_ref: searchRef, ...result } = await new (0, _chunkZ5PQSTYXjs.DeeplineClient)().search({
5991
5991
  query,
5992
5992
  types,
5993
5993
  exclude,
@@ -6001,7 +6001,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
6001
6001
  });
6002
6002
  if (searchRef) rememberSearchRef(searchRef);
6003
6003
  pointAtDescribe(result);
6004
- _chunkZKGK2JU3js.printCommandEnvelope.call(void 0, result, {
6004
+ _chunkSJH66N73js.printCommandEnvelope.call(void 0, result, {
6005
6005
  json: options.json === true,
6006
6006
  text: renderSearchResults(result, summaryWidth)
6007
6007
  });
@@ -3,15 +3,15 @@ import {
3
3
  } from "./chunk-LJ5747UC.mjs";
4
4
  import {
5
5
  DeeplineClient
6
- } from "./chunk-2SICEJBN.mjs";
6
+ } from "./chunk-YXCLG3KB.mjs";
7
7
  import {
8
8
  printCommandEnvelope,
9
9
  renderCommandEnvelopeText
10
- } from "./chunk-PBQSX6ES.mjs";
10
+ } from "./chunk-RDAUQGPG.mjs";
11
11
  import {
12
12
  resolveConfig,
13
13
  sdkCliStateDirPath
14
- } from "./chunk-SM5RZ5JC.mjs";
14
+ } from "./chunk-TECW24CR.mjs";
15
15
  import {
16
16
  __commonJS,
17
17
  __toESM
@@ -2,7 +2,7 @@ import {
2
2
  argsWantJson,
3
3
  openInBrowser,
4
4
  printCommandEnvelope
5
- } from "./chunk-PBQSX6ES.mjs";
5
+ } from "./chunk-RDAUQGPG.mjs";
6
6
  import {
7
7
  ACTIVE_ORG_ID_ENV,
8
8
  ACTIVE_ORG_NAME_ENV,
@@ -25,7 +25,7 @@ import {
25
25
  saveHostEnvValues,
26
26
  saveProjectDeeplineEnvValues,
27
27
  storedHostApiKey
28
- } from "./chunk-SM5RZ5JC.mjs";
28
+ } from "./chunk-TECW24CR.mjs";
29
29
 
30
30
  // src/cli/commands/auth.ts
31
31
  import {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  npmSupportsAllowScripts,
3
3
  readNpmVersion
4
- } from "./chunk-ELULDUX3.mjs";
4
+ } from "./chunk-5OQMUDPM.mjs";
5
5
  import {
6
6
  runSkillsCommand
7
- } from "./chunk-R7YZKHN5.mjs";
7
+ } from "./chunk-THJ7ORNM.mjs";
8
8
  import {
9
9
  resolveShellSpawn
10
- } from "./chunk-UGPGB4C6.mjs";
10
+ } from "./chunk-G6ZOZQXT.mjs";
11
11
  import {
12
12
  printCommandEnvelope
13
- } from "./chunk-PBQSX6ES.mjs";
13
+ } from "./chunk-RDAUQGPG.mjs";
14
14
  import {
15
15
  autoDetectBaseUrl
16
- } from "./chunk-SM5RZ5JC.mjs";
16
+ } from "./chunk-TECW24CR.mjs";
17
17
 
18
18
  // src/cli/commands/update.ts
19
19
  import { spawn, spawnSync } from "child_process";
@@ -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 _chunkZKGK2JU3js = require('./chunk-ZKGK2JU3.js');
4
+ var _chunkSJH66N73js = require('./chunk-SJH66N73.js');
5
5
 
6
6
 
7
- var _chunkETFVH7POjs = require('./chunk-ETFVH7PO.js');
7
+ var _chunkVXBEHDM6js = require('./chunk-VXBEHDM6.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 = _chunkETFVH7POjs.agentSessionIdFromEnvironment.call(void 0,
142
+ const sessionId = _chunkVXBEHDM6js.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 } = _chunkZKGK2JU3js.getAuthedHttpClient.call(void 0, );
454
+ const { http } = _chunkSJH66N73js.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
- _chunkZKGK2JU3js.printCommandEnvelope.call(void 0,
487
+ _chunkSJH66N73js.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
- _chunkZKGK2JU3js.printCommandEnvelope.call(void 0,
519
+ _chunkSJH66N73js.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
- _chunkZKGK2JU3js.printCommandEnvelope.call(void 0,
569
+ _chunkSJH66N73js.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
- _chunkZKGK2JU3js.printCommandEnvelope.call(void 0,
677
+ _chunkSJH66N73js.printCommandEnvelope.call(void 0,
678
678
  {
679
679
  ok: true,
680
680
  file: outputPath,
@@ -1,6 +1,6 @@
1
1
  import {
2
- isJsonOutputMode
3
- } from "./chunk-PBQSX6ES.mjs";
2
+ getActiveCliProgress
3
+ } from "./chunk-2I7GE7KB.mjs";
4
4
  import {
5
5
  DEFAULT_SKILL_AGENTS,
6
6
  KNOWN_SKILL_AGENTS,
@@ -17,13 +17,13 @@ import {
17
17
  sdkCliStateDirPath,
18
18
  skillsAgentPathSegment,
19
19
  writeSdkSkillsLocalVersion
20
- } from "./chunk-SM5RZ5JC.mjs";
20
+ } from "./chunk-TECW24CR.mjs";
21
21
  import {
22
22
  DeeplineError
23
23
  } from "./chunk-HBL4PM5Q.mjs";
24
24
  import {
25
25
  SDK_RELEASE
26
- } from "./chunk-RFDIXLRX.mjs";
26
+ } from "./chunk-LWYOJG66.mjs";
27
27
 
28
28
  // src/compat.ts
29
29
  import { randomUUID } from "crypto";
@@ -400,153 +400,6 @@ function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
400
400
  return rendered;
401
401
  }
402
402
 
403
- // src/cli/progress.ts
404
- import { Worker } from "worker_threads";
405
- var CliProgress = class {
406
- lastMessage = null;
407
- interactive = Boolean(process.stderr.isTTY);
408
- grey = "\x1B[90m";
409
- cyan = "\x1B[36m";
410
- dim = "\x1B[2m";
411
- reset = "\x1B[0m";
412
- worker = null;
413
- enabled;
414
- // --json output is one JSON document: progress never renders under it.
415
- constructor(enabled) {
416
- this.enabled = enabled && !isJsonOutputMode();
417
- }
418
- phase(message) {
419
- if (!this.enabled || this.lastMessage === message) {
420
- return;
421
- }
422
- if (this.interactive && this.lastMessage) {
423
- this.settle("\u2713");
424
- }
425
- this.lastMessage = message;
426
- if (!this.interactive) {
427
- process.stderr.write(`${message}
428
- `);
429
- return;
430
- }
431
- this.ensureWorker();
432
- this.worker?.postMessage({ type: "phase", message });
433
- }
434
- complete() {
435
- this.settle("\u2713");
436
- }
437
- fail() {
438
- this.settle("\u2717");
439
- }
440
- writeLogLine(line) {
441
- if (isJsonOutputMode()) return;
442
- if (!this.enabled) {
443
- process.stderr.write(`${line}
444
- `);
445
- return;
446
- }
447
- const message = this.interactive ? `${this.cyan}[logs]${this.reset} ${this.dim}${line}${this.reset}` : `[logs] ${line}`;
448
- if (!this.interactive) {
449
- process.stderr.write(`${message}
450
- `);
451
- return;
452
- }
453
- const activeMessage = this.lastMessage;
454
- this.worker?.terminate().catch(() => void 0);
455
- this.worker = null;
456
- process.stderr.write(`\r\x1B[2K${message}
457
- `);
458
- if (activeMessage) {
459
- this.startWorker().postMessage({ type: "phase", message: activeMessage });
460
- }
461
- }
462
- writeLine(line, stream = process.stderr) {
463
- if (!this.enabled || !this.interactive) {
464
- stream.write(`${line}
465
- `);
466
- return;
467
- }
468
- const activeMessage = this.lastMessage;
469
- this.worker?.terminate().catch(() => void 0);
470
- this.worker = null;
471
- stream.write(`\r\x1B[2K${line}
472
- `);
473
- if (activeMessage) {
474
- this.startWorker().postMessage({ type: "phase", message: activeMessage });
475
- }
476
- }
477
- settle(mark) {
478
- if (!this.enabled || !this.lastMessage) {
479
- return;
480
- }
481
- if (this.interactive) {
482
- this.worker?.terminate().catch(() => void 0);
483
- this.worker = null;
484
- process.stderr.write(
485
- `\r\x1B[2K${this.grey}${mark} ${this.lastMessage}${this.reset}
486
- `
487
- );
488
- }
489
- this.lastMessage = null;
490
- }
491
- ensureWorker() {
492
- this.startWorker();
493
- }
494
- startWorker() {
495
- if (this.worker) {
496
- return this.worker;
497
- }
498
- this.worker = new Worker(
499
- `
500
- const { parentPort } = require('node:worker_threads');
501
- const { writeSync } = require('node:fs');
502
- const frames = ['\u2014', '\\\\', '|', '/'];
503
- const grey = '\\x1b[90m';
504
- const reset = '\\x1b[0m';
505
- let message = '';
506
- let frameIndex = 0;
507
- let timer = null;
508
- function render() {
509
- if (!message) return;
510
- const frame = frames[frameIndex % frames.length] || '\u2014';
511
- frameIndex += 1;
512
- writeSync(2, '\\r\\x1b[2K' + grey + frame + ' ' + message + reset);
513
- }
514
- parentPort.on('message', (event) => {
515
- if (event.type === 'phase') {
516
- message = String(event.message || '');
517
- frameIndex = 0;
518
- render();
519
- if (!timer) {
520
- timer = setInterval(render, 120);
521
- timer.unref && timer.unref();
522
- }
523
- }
524
- if (event.type === 'stop') {
525
- if (timer) clearInterval(timer);
526
- timer = null;
527
- writeSync(2, '\\r\\x1b[2K');
528
- }
529
- });
530
- `,
531
- { eval: true }
532
- );
533
- this.worker.unref();
534
- return this.worker;
535
- }
536
- };
537
- var activeProgress = null;
538
- function setActiveCliProgress(progress) {
539
- activeProgress = progress;
540
- }
541
- function getActiveCliProgress() {
542
- return activeProgress;
543
- }
544
- function createCliProgress(enabled) {
545
- const progress = new CliProgress(enabled);
546
- setActiveCliProgress(progress);
547
- return progress;
548
- }
549
-
550
403
  // src/cli/windows-arg-escape.ts
551
404
  import { statSync } from "fs";
552
405
  import { win32 } from "path";
@@ -2085,8 +1938,6 @@ export {
2085
1938
  DEFAULT_SDK_SKILL_NAMES,
2086
1939
  LEGACY_SKILL_NAMES_TO_REMOVE,
2087
1940
  skillsSourceUrl,
2088
- getActiveCliProgress,
2089
- createCliProgress,
2090
1941
  resolveShellSpawn,
2091
1942
  isFailureReportingDisabled,
2092
1943
  redactFailureText,
@@ -4,18 +4,18 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkJT4ZSWBKjs = require('./chunk-JT4ZSWBK.js');
7
+ var _chunkKPPL2WNHjs = require('./chunk-KPPL2WNH.js');
8
8
 
9
9
 
10
- var _chunkYWL4ULLTjs = require('./chunk-YWL4ULLT.js');
10
+ var _chunkYPYR4ACFjs = require('./chunk-YPYR4ACF.js');
11
11
 
12
12
 
13
13
 
14
- var _chunkZKGK2JU3js = require('./chunk-ZKGK2JU3.js');
14
+ var _chunkSJH66N73js = require('./chunk-SJH66N73.js');
15
15
 
16
16
 
17
17
 
18
- var _chunkETFVH7POjs = require('./chunk-ETFVH7PO.js');
18
+ var _chunkVXBEHDM6js = require('./chunk-VXBEHDM6.js');
19
19
 
20
20
  // src/cli/compatibility-catalog.ts
21
21
  var readers = /* @__PURE__ */ new WeakMap();
@@ -42,7 +42,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
42
42
  async function reportAutoUpdateEvent(input) {
43
43
  let apiKey = "";
44
44
  try {
45
- apiKey = _chunkETFVH7POjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
45
+ apiKey = _chunkVXBEHDM6js.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
46
46
  } catch (e2) {
47
47
  return;
48
48
  }
@@ -58,15 +58,15 @@ async function reportAutoUpdateEvent(input) {
58
58
  headers: {
59
59
  Authorization: `Bearer ${apiKey}`,
60
60
  "Content-Type": "application/json",
61
- "User-Agent": `deepline-ts-sdk/${_chunkETFVH7POjs.SDK_VERSION}`,
61
+ "User-Agent": `deepline-ts-sdk/${_chunkVXBEHDM6js.SDK_VERSION}`,
62
62
  "X-Deepline-Client-Family": "sdk",
63
63
  "X-Deepline-CLI-Family": "sdk",
64
- "X-Deepline-CLI-Version": _chunkETFVH7POjs.SDK_VERSION,
65
- "X-Deepline-SDK-Version": _chunkETFVH7POjs.SDK_VERSION
64
+ "X-Deepline-CLI-Version": _chunkVXBEHDM6js.SDK_VERSION,
65
+ "X-Deepline-SDK-Version": _chunkVXBEHDM6js.SDK_VERSION
66
66
  },
67
67
  body: JSON.stringify({
68
68
  event: input.event,
69
- current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkETFVH7POjs.SDK_VERSION,
69
+ current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkVXBEHDM6js.SDK_VERSION,
70
70
  target_version: input.response.latest,
71
71
  reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
72
72
  command: _nullishCoalesce(input.response.command, () => ( null)),
@@ -85,13 +85,13 @@ function envTruthy(name) {
85
85
  return value === "1" || value === "true" || value === "yes";
86
86
  }
87
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") || !_chunkJT4ZSWBKjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkYWL4ULLTjs.isCiEnvironment.call(void 0, );
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") || !_chunkKPPL2WNHjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkYPYR4ACFjs.isCiEnvironment.call(void 0, );
89
89
  }
90
90
  function isDowngradeAutoUpdateResponse(response) {
91
91
  const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
92
- const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkETFVH7POjs.SDK_VERSION;
92
+ const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkVXBEHDM6js.SDK_VERSION;
93
93
  if (!target) return false;
94
- return _chunkJT4ZSWBKjs.compareUpdateVersions.call(void 0, target, current) < 0;
94
+ return _chunkKPPL2WNHjs.compareUpdateVersions.call(void 0, target, current) < 0;
95
95
  }
96
96
  function relaunchCurrentCommand(plan, runtime = {}) {
97
97
  return new Promise((resolve) => {
@@ -144,7 +144,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
144
144
  }
145
145
  if (isDowngradeAutoUpdateResponse(response)) {
146
146
  const target = response.latest;
147
- const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkETFVH7POjs.SDK_VERSION;
147
+ const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkVXBEHDM6js.SDK_VERSION;
148
148
  process.stderr.write(
149
149
  `Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
150
150
  `
@@ -152,21 +152,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
152
152
  return false;
153
153
  }
154
154
  const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
155
- const plan = _chunkJT4ZSWBKjs.resolveUpdatePlan.call(void 0, {
155
+ const plan = _chunkKPPL2WNHjs.resolveUpdatePlan.call(void 0, {
156
156
  packageSpec,
157
157
  requireVerifiedNpmOwnership: true,
158
158
  npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
159
159
  });
160
- if (!_chunkJT4ZSWBKjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
160
+ if (!_chunkKPPL2WNHjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
161
161
  return false;
162
162
  }
163
163
  if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
164
164
  deferredAutoUpdate = async () => {
165
165
  await applyAutoUpdate(response, baseUrl, plan, "next_command");
166
166
  };
167
- if (_chunkZKGK2JU3js.isJsonOutputMode.call(void 0, )) {
167
+ if (_chunkSJH66N73js.isJsonOutputMode.call(void 0, )) {
168
168
  const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
169
- _chunkZKGK2JU3js.addJsonNotice.call(void 0, {
169
+ _chunkSJH66N73js.addJsonNotice.call(void 0, {
170
170
  code: "sdk_update_queued",
171
171
  message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
172
172
  });
@@ -179,7 +179,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
179
179
  return true;
180
180
  }
181
181
  async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
182
- if (!_chunkJT4ZSWBKjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
182
+ if (!_chunkKPPL2WNHjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
183
183
  const autoUpdate = response.auto_update;
184
184
  const label = _optionalChain([autoUpdate, 'optionalAccess', _32 => _32.reason]) === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : _optionalChain([autoUpdate, 'optionalAccess', _33 => _33.reason]) === "deprecated" ? "is deprecated and will update automatically" : _optionalChain([autoUpdate, 'optionalAccess', _34 => _34.required]) ? "requires an update" : "has an update available and will update automatically";
185
185
  process.stderr.write(
@@ -192,7 +192,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
192
192
  event: "started",
193
193
  installKind: plan.kind
194
194
  });
195
- const updateResult = await _chunkJT4ZSWBKjs.runAutomaticUpdatePlan.call(void 0, plan);
195
+ const updateResult = await _chunkKPPL2WNHjs.runAutomaticUpdatePlan.call(void 0, plan);
196
196
  if (updateResult.status === "skipped_previous_failure") {
197
197
  void reportAutoUpdateEvent({
198
198
  baseUrl,
@@ -243,7 +243,7 @@ var _crypto = require('crypto');
243
243
  var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
244
244
  var activeToolExecuteCommand = null;
245
245
  function progressLine(line) {
246
- if (!_chunkZKGK2JU3js.isJsonOutputMode.call(void 0, )) console.error(line);
246
+ if (!_chunkSJH66N73js.isJsonOutputMode.call(void 0, )) console.error(line);
247
247
  }
248
248
  function beginToolExecuteCommand() {
249
249
  if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;