deepline 0.3.407 → 0.3.409

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 (127) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +8 -1
  2. package/dist/bundling-sources/sdk/src/play.ts +13 -0
  3. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  4. package/dist/bundling-sources/sdk/src/types.ts +23 -0
  5. package/dist/bundling-sources/shared_libs/play-runtime/admission-timings.ts +64 -0
  6. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +11 -1
  7. package/dist/bundling-sources/shared_libs/play-runtime/modal-runtime-config.ts +1 -4
  8. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +2 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/local-process.ts +15 -6
  10. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +188 -45
  11. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +22 -4
  12. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +10 -4
  13. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +72 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/webhook-receipt-source-commit-retry.ts +90 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/worker-api-types.ts +5 -0
  16. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +6 -0
  17. package/dist/cli/{auth-WURWNNLE.mjs → auth-5HIIACF7.mjs} +4 -4
  18. package/dist/cli/auth-F6BX32XZ.js +40 -0
  19. package/dist/cli/{billing-2QJGXGJX.js → billing-4275N7FL.js} +92 -85
  20. package/dist/cli/{billing-BP3E6WIM.mjs → billing-EVZ3ZWKC.mjs} +23 -16
  21. package/dist/cli/{chunk-WXLOW623.mjs → chunk-264PC2RN.mjs} +14 -7
  22. package/dist/cli/{chunk-RMZAOYDN.js → chunk-2GI3QD3L.js} +53 -53
  23. package/dist/cli/{chunk-ZBCTXQ3P.mjs → chunk-2PRO2JTX.mjs} +1 -1
  24. package/dist/cli/{chunk-GAMFK2ZP.mjs → chunk-44ZTYHMQ.mjs} +10 -3
  25. package/dist/cli/{chunk-G4LJS2RE.js → chunk-53HN7WZN.js} +8 -8
  26. package/dist/cli/{chunk-URWF7NGQ.js → chunk-5MLCBXXU.js} +36 -15
  27. package/dist/cli/{chunk-XT6GG3QO.mjs → chunk-7AALNGTA.mjs} +3 -3
  28. package/dist/cli/{chunk-WJYPBHTE.js → chunk-ALD4COBH.js} +11 -4
  29. package/dist/cli/{chunk-RZLXVHNO.js → chunk-AU4OFDFX.js} +26 -26
  30. package/dist/cli/{chunk-N6OAMAO5.mjs → chunk-BEVLCKXG.mjs} +1 -1
  31. package/dist/cli/{chunk-7LKYHZVB.js → chunk-DEC3JECC.js} +1 -1
  32. package/dist/cli/{chunk-UFFSOV6I.mjs → chunk-FHPCKULR.mjs} +2 -2
  33. package/dist/cli/{chunk-THHM4DPE.js → chunk-FJCIUF34.js} +4 -4
  34. package/dist/cli/{chunk-H6EWQFPQ.js → chunk-GAICVLKL.js} +2 -2
  35. package/dist/cli/{chunk-4TV43THC.mjs → chunk-IT3XBJQR.mjs} +4 -4
  36. package/dist/cli/{chunk-UFS752TU.mjs → chunk-J6DCKJNM.mjs} +5 -1
  37. package/dist/cli/{chunk-AYHLUHE5.js → chunk-JGHG4NBA.js} +6 -2
  38. package/dist/cli/{chunk-BKC6VMYZ.mjs → chunk-JRAVVJ3T.mjs} +73 -4
  39. package/dist/cli/{chunk-ZI2ZNDJK.mjs → chunk-LFSHGNT2.mjs} +36 -15
  40. package/dist/cli/{chunk-L25GBGQU.mjs → chunk-N44JHMKY.mjs} +6 -6
  41. package/dist/cli/{chunk-QJAX7QN7.mjs → chunk-NZSF57UO.mjs} +2 -2
  42. package/dist/cli/{chunk-IY6GKJ4O.js → chunk-O3VSXP2F.js} +50 -50
  43. package/dist/cli/{chunk-J67NU4MQ.mjs → chunk-PBZYY7VZ.mjs} +5 -2
  44. package/dist/cli/{chunk-G6U74WNM.js → chunk-RTCDW2GU.js} +15 -15
  45. package/dist/cli/{chunk-UPEOEYZ3.mjs → chunk-TQNHMWUR.mjs} +1 -1
  46. package/dist/cli/{chunk-KUQAU5MG.js → chunk-V76R6HMV.js} +10 -7
  47. package/dist/cli/{chunk-6JZZNP5G.mjs → chunk-VWBTTJYQ.mjs} +2 -2
  48. package/dist/cli/{chunk-SOQIPKF2.js → chunk-WHG43Z67.js} +8 -8
  49. package/dist/cli/{chunk-Y6CX4QPR.js → chunk-WLOCMJWV.js} +67 -67
  50. package/dist/cli/{chunk-QJBJZVG6.js → chunk-WNUR6VP5.js} +15 -8
  51. package/dist/cli/{chunk-P7HOTKOK.mjs → chunk-WYQO2CBS.mjs} +4 -4
  52. package/dist/cli/{chunk-D2ZRMZKF.js → chunk-YD7B53RW.js} +99 -30
  53. package/dist/cli/command-docs.js +2 -2
  54. package/dist/cli/command-docs.mjs +1 -1
  55. package/dist/cli/{csv-N6KYTG7L.mjs → csv-A2MP6EFV.mjs} +3 -3
  56. package/dist/cli/{csv-7E5BE23B.js → csv-BBOTCGQY.js} +12 -12
  57. package/dist/cli/{db-XMBJNVBD.mjs → db-3W5DMTUX.mjs} +4 -4
  58. package/dist/cli/{db-4VLZP33O.js → db-G4CODDCA.js} +25 -25
  59. package/dist/cli/{describe-4I6EIVXD.js → describe-PQTQ5B6F.js} +11 -11
  60. package/dist/cli/{describe-WERH4TD2.mjs → describe-XYJ2ZT4M.mjs} +7 -7
  61. package/dist/cli/describe-core.d.mts +2 -2
  62. package/dist/cli/describe-core.d.ts +2 -2
  63. package/dist/cli/{executions-W7TWJRBK.js → executions-TLANVR7Y.js} +6 -6
  64. package/dist/cli/{executions-JWQXE7G6.mjs → executions-UR67CA5H.mjs} +4 -4
  65. package/dist/cli/{feedback-FMGRC6KO.js → feedback-6C2YTRJL.js} +7 -7
  66. package/dist/cli/{feedback-OEJFX4F7.mjs → feedback-WHCMGEIL.mjs} +3 -3
  67. package/dist/cli/{git-IVC4KHXX.mjs → git-GWLB6VSA.mjs} +4 -4
  68. package/dist/cli/git-VQFF6D7C.js +24 -0
  69. package/dist/cli/index.js +204 -127
  70. package/dist/cli/index.mjs +124 -47
  71. package/dist/cli/{legacy-noops-LT36CLWZ.mjs → legacy-noops-KF4XIFEF.mjs} +4 -4
  72. package/dist/cli/{legacy-noops-X3BQ7MUK.js → legacy-noops-ZUFA7RWI.js} +7 -7
  73. package/dist/cli/{monitors-MNLCELF7.mjs → monitors-6UOIDIMB.mjs} +4 -4
  74. package/dist/cli/{monitors-DLIIAVLW.js → monitors-TB3K2IVE.js} +84 -84
  75. package/dist/cli/{org-CYHDEW7P.js → org-CKWMBPIR.js} +64 -64
  76. package/dist/cli/{org-QV5LMUPT.mjs → org-WGHHMVDZ.mjs} +4 -4
  77. package/dist/cli/{play-5Z4ROZ3P.mjs → play-LYPAXCLD.mjs} +70 -18
  78. package/dist/cli/{play-MEFXC2QA.js → play-N2B3KAVS.js} +345 -293
  79. package/dist/cli/{providers-FJLYSHB3.mjs → providers-6DI5BVZJ.mjs} +4 -4
  80. package/dist/cli/{providers-2MKUNFBQ.js → providers-UR42MD6Z.js} +7 -7
  81. package/dist/cli/{quickstart-ULWXKAOT.js → quickstart-FCJG4XGB.js} +5 -5
  82. package/dist/cli/{quickstart-PQO3OQRT.mjs → quickstart-MNA2S6PO.mjs} +3 -3
  83. package/dist/cli/search-NCEEONMQ.js +30 -0
  84. package/dist/cli/{search-KGAAXMDG.mjs → search-VPPYUJ2M.mjs} +5 -5
  85. package/dist/cli/{secrets-PD5I3KAF.mjs → secrets-DRI4W7Z5.mjs} +4 -4
  86. package/dist/cli/{secrets-X2VGG2PO.js → secrets-QOSMVO36.js} +13 -13
  87. package/dist/cli/{sessions-R3XAKTBQ.js → sessions-3WYKQABW.js} +5 -5
  88. package/dist/cli/{sessions-3WVEU4PE.mjs → sessions-DQNUKP43.mjs} +4 -4
  89. package/dist/cli/{settings-645RSFQX.mjs → settings-DWDK3Y2R.mjs} +8 -8
  90. package/dist/cli/{settings-ZIDO3IP6.js → settings-JUGGCOPS.js} +75 -75
  91. package/dist/cli/{setup-LH5HOZ3D.js → setup-AWBHNYXK.js} +42 -42
  92. package/dist/cli/{setup-LISKIJKP.mjs → setup-D5DWVNY4.mjs} +7 -7
  93. package/dist/cli/skills-AKPAJVSO.js +29 -0
  94. package/dist/cli/{skills-VVQJHLSF.mjs → skills-YV2XR35J.mjs} +5 -5
  95. package/dist/cli/{tools-FTPJCNAM.js → tools-RBKEK6PM.js} +8 -8
  96. package/dist/cli/{tools-Y3LOMXFT.mjs → tools-VFJYHNV2.mjs} +7 -7
  97. package/dist/cli/{update-DOBNQNJI.mjs → update-IM6VOTGL.mjs} +7 -7
  98. package/dist/cli/update-VFNUBLDA.js +29 -0
  99. package/dist/cli/{workflow-ZMAA5VCN.mjs → workflow-26URBWPV.mjs} +5 -5
  100. package/dist/cli/{workflow-LGENKZBV.js → workflow-3BS6U6SL.js} +15 -15
  101. package/dist/{client-IrPHUE5J.d.ts → client-BMjJFpan.d.ts} +28 -2
  102. package/dist/{client-6rEB46Lv.d.mts → client-BfInrZPB.d.mts} +28 -2
  103. package/dist/{compiler-manifest-BHnXE43X.d.ts → compiler-manifest-Ycx-hoAr.d.mts} +2 -0
  104. package/dist/{compiler-manifest-BHnXE43X.d.mts → compiler-manifest-Ycx-hoAr.d.ts} +2 -0
  105. package/dist/{index-Da_Y8z5e.d.mts → index-CZXgiN3E.d.mts} +1 -1
  106. package/dist/{index-SODb2ROS.d.ts → index-NPG5pqxQ.d.ts} +1 -1
  107. package/dist/index.d.mts +5 -5
  108. package/dist/index.d.ts +5 -5
  109. package/dist/index.js +26 -9
  110. package/dist/index.mjs +23 -6
  111. package/dist/install-integrity.json +86 -84
  112. package/dist/plays/bundle-play-file.d.mts +3 -3
  113. package/dist/plays/bundle-play-file.d.ts +3 -3
  114. package/dist/plays/play-description.d.mts +2 -2
  115. package/dist/plays/play-description.d.ts +2 -2
  116. package/dist/plays/run-request.d.mts +2 -2
  117. package/dist/plays/run-request.d.ts +2 -2
  118. package/dist/release.d.mts +1 -1
  119. package/dist/release.d.ts +1 -1
  120. package/dist/release.js +2 -2
  121. package/dist/release.mjs +1 -1
  122. package/package.json +1 -1
  123. package/dist/cli/auth-4JTX6AGM.js +0 -40
  124. package/dist/cli/git-OFXE7G4X.js +0 -24
  125. package/dist/cli/search-ANKSJ224.js +0 -30
  126. package/dist/cli/skills-WLHYSVQA.js +0 -29
  127. package/dist/cli/update-A622H2DZ.js +0 -29
@@ -1,4 +1,8 @@
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; }// src/cli/compatibility-catalog.ts
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
+
3
+ var _chunkYD7B53RWjs = require('./chunk-YD7B53RW.js');
4
+
5
+ // src/cli/compatibility-catalog.ts
2
6
  var readers = /* @__PURE__ */ new WeakMap();
3
7
  function registerCompatibilityCatalog(command, read) {
4
8
  readers.set(command, read);
@@ -11,6 +15,9 @@ function compatibilityCatalog(command) {
11
15
  var _crypto = require('crypto');
12
16
  var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
13
17
  var activeToolExecuteCommand = null;
18
+ function progressLine(line) {
19
+ if (!_chunkYD7B53RWjs.isJsonOutputMode.call(void 0, )) console.error(line);
20
+ }
14
21
  function beginToolExecuteCommand() {
15
22
  if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
16
23
  const invocationId = _crypto.randomUUID.call(void 0, );
@@ -18,7 +25,7 @@ function beginToolExecuteCommand() {
18
25
  invocationId,
19
26
  startedAt: performance.now()
20
27
  };
21
- console.error(`[tools execute ${invocationId}] started`);
28
+ progressLine(`[tools execute ${invocationId}] started`);
22
29
  return invocationId;
23
30
  }
24
31
  function getToolExecuteInvocationId() {
@@ -29,9 +36,9 @@ async function runToolExecuteStage(stage, action) {
29
36
  if (!command) return action();
30
37
  const startedAt = performance.now();
31
38
  const elapsedMs = () => Math.round(performance.now() - startedAt);
32
- console.error(`[tools execute ${command.invocationId}] ${stage} started`);
39
+ progressLine(`[tools execute ${command.invocationId}] ${stage} started`);
33
40
  const progressTimer = setInterval(() => {
34
- console.error(
41
+ progressLine(
35
42
  `[tools execute ${command.invocationId}] ${stage} still running (${elapsedMs()}ms)`
36
43
  );
37
44
  }, TOOL_EXECUTE_PROGRESS_INTERVAL_MS);
@@ -39,17 +46,17 @@ async function runToolExecuteStage(stage, action) {
39
46
  try {
40
47
  const result = await action();
41
48
  if (result === false) {
42
- console.error(
49
+ progressLine(
43
50
  `[tools execute ${command.invocationId}] ${stage} failed after ${elapsedMs()}ms`
44
51
  );
45
52
  } else {
46
- console.error(
53
+ progressLine(
47
54
  `[tools execute ${command.invocationId}] ${stage} completed in ${elapsedMs()}ms`
48
55
  );
49
56
  }
50
57
  return result;
51
58
  } catch (error) {
52
- console.error(
59
+ progressLine(
53
60
  `[tools execute ${command.invocationId}] ${stage} failed after ${elapsedMs()}ms`
54
61
  );
55
62
  throw error;
@@ -60,7 +67,7 @@ async function runToolExecuteStage(stage, action) {
60
67
  function finishToolExecuteCommand() {
61
68
  const command = activeToolExecuteCommand;
62
69
  if (!command) return;
63
- console.error(
70
+ progressLine(
64
71
  `[tools execute ${command.invocationId}] finished in ${Math.round(performance.now() - command.startedAt)}ms`
65
72
  );
66
73
  activeToolExecuteCommand = null;
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  npmSupportsAllowScripts,
3
3
  readNpmVersion
4
- } from "./chunk-N6OAMAO5.mjs";
4
+ } from "./chunk-BEVLCKXG.mjs";
5
5
  import {
6
6
  resolveShellSpawn,
7
7
  runSkillsCommand
8
- } from "./chunk-4TV43THC.mjs";
8
+ } from "./chunk-IT3XBJQR.mjs";
9
9
  import {
10
10
  printCommandEnvelope
11
- } from "./chunk-BKC6VMYZ.mjs";
11
+ } from "./chunk-JRAVVJ3T.mjs";
12
12
  import {
13
13
  autoDetectBaseUrl
14
- } from "./chunk-ZBCTXQ3P.mjs";
14
+ } from "./chunk-2PRO2JTX.mjs";
15
15
 
16
16
  // src/cli/commands/update.ts
17
17
  import { spawn, spawnSync } from "child_process";
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkTHHM4DPEjs = require('./chunk-THHM4DPE.js');
6
+ var _chunkFJCIUF34js = require('./chunk-FJCIUF34.js');
7
7
 
8
8
 
9
9
 
@@ -118,6 +118,68 @@ function describeArgs(target, options) {
118
118
  ];
119
119
  }
120
120
 
121
+ // src/cli/json-mode.ts
122
+ var ANSI_PATTERN = /\x1b\[[0-9;?]*[A-Za-z]|\r/g;
123
+ var installed = false;
124
+ var pending = [];
125
+ var rawStderrWrite = null;
126
+ var stdoutWritten = false;
127
+ function isJsonOutputMode() {
128
+ return process.argv.includes("--json");
129
+ }
130
+ function installJsonStderrGuard() {
131
+ if (installed || !isJsonOutputMode()) return;
132
+ installed = true;
133
+ rawStderrWrite = process.stderr.write.bind(process.stderr);
134
+ const stdoutWrite = process.stdout.write.bind(process.stdout);
135
+ process.stdout.write = ((...args) => {
136
+ stdoutWritten = true;
137
+ return stdoutWrite(...args);
138
+ });
139
+ const capture = (chunk) => {
140
+ const text = (typeof chunk === "string" ? chunk : chunk instanceof Uint8Array ? Buffer.from(chunk).toString("utf8") : String(chunk)).replace(ANSI_PATTERN, "").trim();
141
+ if (text) pending.push(text);
142
+ };
143
+ process.stderr.write = ((chunk, ...rest) => {
144
+ capture(chunk);
145
+ const callback = rest.find((arg) => typeof arg === "function");
146
+ _optionalChain([callback, 'optionalCall', _ => _()]);
147
+ return true;
148
+ });
149
+ const toNotice = (...args) => capture(
150
+ args.map(
151
+ (arg) => typeof arg === "string" ? arg : arg instanceof Error ? arg.message : JSON.stringify(arg)
152
+ ).join(" ")
153
+ );
154
+ console.error = toNotice;
155
+ console.warn = toNotice;
156
+ }
157
+ function addJsonNotice(notice) {
158
+ if (installed) pending.push(notice);
159
+ }
160
+ function writeRawStderr(text) {
161
+ (_nullishCoalesce(rawStderrWrite, () => ( process.stderr.write.bind(process.stderr))))(text);
162
+ }
163
+ function takeSilentJsonFailureMessage(exitCode) {
164
+ if (!installed || stdoutWritten || !exitCode || Number(exitCode) === 0) {
165
+ return null;
166
+ }
167
+ const index = pending.findIndex((notice) => typeof notice === "string");
168
+ if (index === -1) return "Command failed without an error message.";
169
+ const [message] = pending.splice(index, 1);
170
+ return message;
171
+ }
172
+ function withJsonNotices(value) {
173
+ if (pending.length === 0 || value === null || typeof value !== "object" || Array.isArray(value)) {
174
+ return value;
175
+ }
176
+ const record = value;
177
+ const existing = Array.isArray(record.notices) ? record.notices : [];
178
+ const notices = [...existing, ...pending];
179
+ pending = [];
180
+ return { ...record, notices };
181
+ }
182
+
121
183
  // src/cli/utils.ts
122
184
  var _crypto = require('crypto');
123
185
 
@@ -226,8 +288,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
226
288
  var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
227
289
  var defaultBrowserCommandRunner = childProcess;
228
290
  function getAuthedHttpClient() {
229
- const config = _chunkTHHM4DPEjs.resolveConfig.call(void 0, );
230
- return { config, http: new (0, _chunkTHHM4DPEjs.HttpClient)(config) };
291
+ const config = _chunkFJCIUF34js.resolveConfig.call(void 0, );
292
+ return { config, http: new (0, _chunkFJCIUF34js.HttpClient)(config) };
231
293
  }
232
294
  function stableOsUserId() {
233
295
  try {
@@ -337,7 +399,7 @@ function readMacosUserHome(runner = defaultBrowserCommandRunner) {
337
399
  { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }
338
400
  );
339
401
  const match = String(output).match(/NFSHomeDirectory:\s*(.+)\s*$/m);
340
- const home = _optionalChain([match, 'optionalAccess', _ => _[1], 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]);
402
+ const home = _optionalChain([match, 'optionalAccess', _2 => _2[1], 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]);
341
403
  if (home) return home;
342
404
  } catch (e7) {
343
405
  }
@@ -562,12 +624,12 @@ function sleep(ms) {
562
624
  return new Promise((resolvePromise) => setTimeout(resolvePromise, ms));
563
625
  }
564
626
  function collectLocalEnvInfo() {
565
- const homeDir = _optionalChain([process, 'access', _4 => _4.env, 'access', _5 => _5.HOME, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _os.homedir.call(void 0, );
627
+ const homeDir = _optionalChain([process, 'access', _5 => _5.env, 'access', _6 => _6.HOME, 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]) || _os.homedir.call(void 0, );
566
628
  const info = {
567
629
  os: `${process.platform} ${process.arch}`,
568
630
  node_version: process.version,
569
631
  home_dir: homeDir,
570
- agent_runtime: _chunkTHHM4DPEjs.detectAgentRuntime.call(void 0, )
632
+ agent_runtime: _chunkFJCIUF34js.detectAgentRuntime.call(void 0, )
571
633
  };
572
634
  const env = process.env;
573
635
  const optional = {
@@ -575,15 +637,15 @@ function collectLocalEnvInfo() {
575
637
  deepline_plugin_mode: env.DEEPLINE_PLUGIN_MODE
576
638
  };
577
639
  for (const [key, value] of Object.entries(optional)) {
578
- if (_optionalChain([value, 'optionalAccess', _8 => _8.trim, 'call', _9 => _9()])) info[key] = value.trim();
640
+ if (_optionalChain([value, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()])) info[key] = value.trim();
579
641
  }
580
- if (_optionalChain([env, 'access', _10 => _10.CLAUDE_PROJECT_DIR, 'optionalAccess', _11 => _11.trim, 'call', _12 => _12()])) {
642
+ if (_optionalChain([env, 'access', _11 => _11.CLAUDE_PROJECT_DIR, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()])) {
581
643
  info.claude_project_dir_present = "true";
582
644
  }
583
- if (_optionalChain([env, 'access', _13 => _13.DEEPLINE_PLUGIN_ROOT, 'optionalAccess', _14 => _14.trim, 'call', _15 => _15()])) {
645
+ if (_optionalChain([env, 'access', _14 => _14.DEEPLINE_PLUGIN_ROOT, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()])) {
584
646
  info.deepline_plugin_root_present = "true";
585
647
  }
586
- if (_optionalChain([env, 'access', _16 => _16.DEEPLINE_PLUGIN_SKILLS_DIR, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()])) {
648
+ if (_optionalChain([env, 'access', _17 => _17.DEEPLINE_PLUGIN_SKILLS_DIR, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()])) {
587
649
  info.deepline_plugin_skills_dir_present = "true";
588
650
  }
589
651
  if (info.home_dir === "/sessions" || info.home_dir.startsWith("/sessions/")) {
@@ -602,7 +664,7 @@ function readCsvRows(csvPath) {
602
664
  });
603
665
  }
604
666
  function csvStringFromRows(rows, columns) {
605
- const effectiveColumns = _optionalChain([columns, 'optionalAccess', _19 => _19.length]) ? columns : Object.keys(_nullishCoalesce(rows[0], () => ( {})));
667
+ const effectiveColumns = _optionalChain([columns, 'optionalAccess', _20 => _20.length]) ? columns : Object.keys(_nullishCoalesce(rows[0], () => ( {})));
606
668
  if (!effectiveColumns.length) {
607
669
  return _sync3.stringify.call(void 0,
608
670
  rows.map(() => ({})),
@@ -687,7 +749,7 @@ function failureMessageFromRecord(value) {
687
749
  const status = typeof value.status === "string" ? value.status.trim().toLowerCase() : "";
688
750
  const directError = typeof value.error === "string" ? value.error.trim() : typeof value.last_error === "string" ? value.last_error.trim() : "";
689
751
  const result = value.result && typeof value.result === "object" && !Array.isArray(value.result) ? value.result : null;
690
- const resultError = typeof _optionalChain([result, 'optionalAccess', _20 => _20.error]) === "string" ? result.error.trim() : typeof _optionalChain([result, 'optionalAccess', _21 => _21.message]) === "string" ? result.message.trim() : "";
752
+ const resultError = typeof _optionalChain([result, 'optionalAccess', _21 => _21.error]) === "string" ? result.error.trim() : typeof _optionalChain([result, 'optionalAccess', _22 => _22.message]) === "string" ? result.message.trim() : "";
691
753
  if (!directError && !resultError && status !== "error" && status !== "failed") {
692
754
  return null;
693
755
  }
@@ -814,20 +876,22 @@ function markdownTableFromRows(rows, preferredColumns = []) {
814
876
  }
815
877
  function withAgentCommandContext(value) {
816
878
  const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
817
- return _chunkTHHM4DPEjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
879
+ return _chunkFJCIUF34js.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
818
880
  ...valueRecord,
819
- command_context: _chunkTHHM4DPEjs.resolveCliCommandContext.call(void 0, )
881
+ command_context: _chunkFJCIUF34js.resolveCliCommandContext.call(void 0, )
820
882
  } : value;
821
883
  }
822
884
  function printJson(value, fields) {
823
885
  process.stdout.write(
824
- `${JSON.stringify(selectJsonFields(withAgentCommandContext(value), fields), null, 2)}
886
+ `${JSON.stringify(withJsonNotices(selectJsonFields(withAgentCommandContext(value), fields)), null, 2)}
825
887
  `
826
888
  );
827
889
  }
828
890
  function printCompactJson(value) {
829
- process.stdout.write(`${JSON.stringify(withAgentCommandContext(value))}
830
- `);
891
+ process.stdout.write(
892
+ `${JSON.stringify(withJsonNotices(withAgentCommandContext(value)))}
893
+ `
894
+ );
831
895
  }
832
896
  function cliToolExecutionFailure(error) {
833
897
  const failure = _chunk7P5AA3SNjs.serializeToolExecutionFailure.call(void 0, error);
@@ -854,35 +918,35 @@ function errorToJsonPayload(error) {
854
918
  const message = error instanceof Error ? error.message : String(error);
855
919
  const toolFailure = cliToolExecutionFailure(error);
856
920
  const maybeRecord = error && typeof error === "object" ? error : null;
857
- const code = typeof _optionalChain([maybeRecord, 'optionalAccess', _22 => _22.code]) === "string" ? maybeRecord.code : error instanceof SyntaxError ? "INVALID_JSON" : "CLI_ERROR";
921
+ const code = typeof _optionalChain([maybeRecord, 'optionalAccess', _23 => _23.code]) === "string" ? maybeRecord.code : error instanceof SyntaxError ? "INVALID_JSON" : "CLI_ERROR";
858
922
  const details = {};
859
- const exitCode = typeof _optionalChain([maybeRecord, 'optionalAccess', _23 => _23.exitCode]) === "number" ? maybeRecord.exitCode : void 0;
860
- if (typeof _optionalChain([maybeRecord, 'optionalAccess', _24 => _24.statusCode]) === "number") {
923
+ const exitCode = typeof _optionalChain([maybeRecord, 'optionalAccess', _24 => _24.exitCode]) === "number" ? maybeRecord.exitCode : void 0;
924
+ if (typeof _optionalChain([maybeRecord, 'optionalAccess', _25 => _25.statusCode]) === "number") {
861
925
  details.statusCode = maybeRecord.statusCode;
862
926
  }
863
- if (typeof _optionalChain([maybeRecord, 'optionalAccess', _25 => _25.status]) === "number") {
927
+ if (typeof _optionalChain([maybeRecord, 'optionalAccess', _26 => _26.status]) === "number") {
864
928
  details.status = maybeRecord.status;
865
929
  }
866
- if (typeof _optionalChain([maybeRecord, 'optionalAccess', _26 => _26.requestId]) === "string" || _optionalChain([maybeRecord, 'optionalAccess', _27 => _27.requestId]) === null) {
930
+ if (typeof _optionalChain([maybeRecord, 'optionalAccess', _27 => _27.requestId]) === "string" || _optionalChain([maybeRecord, 'optionalAccess', _28 => _28.requestId]) === null) {
867
931
  details.requestId = maybeRecord.requestId;
868
932
  }
869
- if (typeof _optionalChain([maybeRecord, 'optionalAccess', _28 => _28.retryable]) === "boolean") {
933
+ if (typeof _optionalChain([maybeRecord, 'optionalAccess', _29 => _29.retryable]) === "boolean") {
870
934
  details.retryable = maybeRecord.retryable;
871
935
  }
872
- if (_optionalChain([maybeRecord, 'optionalAccess', _29 => _29.publicDetails]) && typeof maybeRecord.publicDetails === "object" && !Array.isArray(maybeRecord.publicDetails)) {
936
+ if (_optionalChain([maybeRecord, 'optionalAccess', _30 => _30.publicDetails]) && typeof maybeRecord.publicDetails === "object" && !Array.isArray(maybeRecord.publicDetails)) {
873
937
  details.publicDetails = maybeRecord.publicDetails;
874
938
  }
875
- if (_optionalChain([maybeRecord, 'optionalAccess', _30 => _30.details]) && typeof maybeRecord.details === "object" && !Array.isArray(maybeRecord.details)) {
939
+ if (_optionalChain([maybeRecord, 'optionalAccess', _31 => _31.details]) && typeof maybeRecord.details === "object" && !Array.isArray(maybeRecord.details)) {
876
940
  details.details = maybeRecord.details;
877
941
  }
878
- if (_optionalChain([maybeRecord, 'optionalAccess', _31 => _31.guidance]) && typeof maybeRecord.guidance === "object" && !Array.isArray(maybeRecord.guidance)) {
942
+ if (_optionalChain([maybeRecord, 'optionalAccess', _32 => _32.guidance]) && typeof maybeRecord.guidance === "object" && !Array.isArray(maybeRecord.guidance)) {
879
943
  details.guidance = maybeRecord.guidance;
880
944
  }
881
945
  const providerConcurrency = providerConcurrencyDiagnostic(maybeRecord);
882
946
  if (providerConcurrency) {
883
947
  details.providerConcurrency = providerConcurrency;
884
948
  }
885
- if (typeof _optionalChain([maybeRecord, 'optionalAccess', _32 => _32.cause]) === "string") {
949
+ if (typeof _optionalChain([maybeRecord, 'optionalAccess', _33 => _33.cause]) === "string") {
886
950
  details.cause = maybeRecord.cause;
887
951
  }
888
952
  return {
@@ -943,12 +1007,12 @@ function clip(value, maxLength) {
943
1007
  // src/cli/command-envelope.ts
944
1008
  function renderSections(render) {
945
1009
  const lines = [];
946
- for (const section of _nullishCoalesce(_optionalChain([render, 'optionalAccess', _33 => _33.sections]), () => ( []))) {
1010
+ for (const section of _nullishCoalesce(_optionalChain([render, 'optionalAccess', _34 => _34.sections]), () => ( []))) {
947
1011
  if (!section.title || section.lines.length === 0) continue;
948
1012
  lines.push(section.title);
949
1013
  lines.push(...section.lines.map((line) => ` ${line}`));
950
1014
  }
951
- for (const action of _nullishCoalesce(_optionalChain([render, 'optionalAccess', _34 => _34.actions]), () => ( []))) {
1015
+ for (const action of _nullishCoalesce(_optionalChain([render, 'optionalAccess', _35 => _35.actions]), () => ( []))) {
952
1016
  if (!action.label || !action.command) continue;
953
1017
  lines.push(`${action.label}: ${action.command}`);
954
1018
  }
@@ -1000,4 +1064,9 @@ function printCommandEnvelope(envelope, options = {}) {
1000
1064
 
1001
1065
 
1002
1066
 
1003
- exports.parseJsonFields = parseJsonFields; exports.jsonFieldArgs = jsonFieldArgs; exports.describeArgs = describeArgs; exports.getAuthedHttpClient = getAuthedHttpClient; exports.openInBrowser = openInBrowser; exports.sleep = sleep; exports.collectLocalEnvInfo = collectLocalEnvInfo; exports.readCsvRows = readCsvRows; exports.csvStringFromRows = csvStringFromRows; exports.csvSafeJsonString = csvSafeJsonString; exports.recordRows = recordRows; exports.dataExportRows = dataExportRows; exports.dataExportColumns = dataExportColumns; exports.dataExportCsvString = dataExportCsvString; exports.markdownTableFromRows = markdownTableFromRows; exports.printJson = printJson; exports.printCompactJson = printCompactJson; exports.formatToolExecutionErrorDiagnostic = formatToolExecutionErrorDiagnostic; exports.errorToJsonPayload = errorToJsonPayload; exports.formatProviderConcurrencyDiagnostic = formatProviderConcurrencyDiagnostic; exports.printJsonError = printJsonError; exports.shouldEmitJson = shouldEmitJson; exports.argsWantJson = argsWantJson; exports.createTimestampedName = createTimestampedName; exports.clip = clip; exports.renderCommandEnvelopeText = renderCommandEnvelopeText; exports.printCommandEnvelope = printCommandEnvelope;
1067
+
1068
+
1069
+
1070
+
1071
+
1072
+ exports.parseJsonFields = parseJsonFields; exports.jsonFieldArgs = jsonFieldArgs; exports.describeArgs = describeArgs; exports.isJsonOutputMode = isJsonOutputMode; exports.installJsonStderrGuard = installJsonStderrGuard; exports.addJsonNotice = addJsonNotice; exports.writeRawStderr = writeRawStderr; exports.takeSilentJsonFailureMessage = takeSilentJsonFailureMessage; exports.getAuthedHttpClient = getAuthedHttpClient; exports.openInBrowser = openInBrowser; exports.sleep = sleep; exports.collectLocalEnvInfo = collectLocalEnvInfo; exports.readCsvRows = readCsvRows; exports.csvStringFromRows = csvStringFromRows; exports.csvSafeJsonString = csvSafeJsonString; exports.recordRows = recordRows; exports.dataExportRows = dataExportRows; exports.dataExportColumns = dataExportColumns; exports.dataExportCsvString = dataExportCsvString; exports.markdownTableFromRows = markdownTableFromRows; exports.printJson = printJson; exports.printCompactJson = printCompactJson; exports.formatToolExecutionErrorDiagnostic = formatToolExecutionErrorDiagnostic; exports.errorToJsonPayload = errorToJsonPayload; exports.formatProviderConcurrencyDiagnostic = formatProviderConcurrencyDiagnostic; exports.printJsonError = printJsonError; exports.shouldEmitJson = shouldEmitJson; exports.argsWantJson = argsWantJson; exports.createTimestampedName = createTimestampedName; exports.clip = clip; exports.renderCommandEnvelopeText = renderCommandEnvelopeText; exports.printCommandEnvelope = printCommandEnvelope;
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkURWF7NGQjs = require('./chunk-URWF7NGQ.js');
9
+ var _chunk5MLCBXXUjs = require('./chunk-5MLCBXXU.js');
10
10
  require('./chunk-COGTRVWW.js');
11
11
 
12
12
 
@@ -16,4 +16,4 @@ require('./chunk-COGTRVWW.js');
16
16
 
17
17
 
18
18
 
19
- exports.CLI_DOC_SURFACE = _chunkURWF7NGQjs.CLI_DOC_SURFACE; exports.COMMAND_DOCS = _chunkURWF7NGQjs.COMMAND_DOCS; exports.commandDocKey = _chunkURWF7NGQjs.commandDocKey; exports.helpDetailFromArgv = _chunkURWF7NGQjs.helpDetailFromArgv; exports.renderActionExplanation = _chunkURWF7NGQjs.renderActionExplanation; exports.renderCommandExplanation = _chunkURWF7NGQjs.renderCommandExplanation; exports.renderDocText = _chunkURWF7NGQjs.renderDocText;
19
+ exports.CLI_DOC_SURFACE = _chunk5MLCBXXUjs.CLI_DOC_SURFACE; exports.COMMAND_DOCS = _chunk5MLCBXXUjs.COMMAND_DOCS; exports.commandDocKey = _chunk5MLCBXXUjs.commandDocKey; exports.helpDetailFromArgv = _chunk5MLCBXXUjs.helpDetailFromArgv; exports.renderActionExplanation = _chunk5MLCBXXUjs.renderActionExplanation; exports.renderCommandExplanation = _chunk5MLCBXXUjs.renderCommandExplanation; exports.renderDocText = _chunk5MLCBXXUjs.renderDocText;
@@ -6,7 +6,7 @@ import {
6
6
  renderActionExplanation,
7
7
  renderCommandExplanation,
8
8
  renderDocText
9
- } from "./chunk-ZI2ZNDJK.mjs";
9
+ } from "./chunk-LFSHGNT2.mjs";
10
10
  import "./chunk-KRD6H754.mjs";
11
11
  export {
12
12
  CLI_DOC_SURFACE,
@@ -4,12 +4,12 @@ import {
4
4
  printCommandEnvelope,
5
5
  printJson,
6
6
  readCsvRows
7
- } from "./chunk-BKC6VMYZ.mjs";
8
- import "./chunk-ZBCTXQ3P.mjs";
7
+ } from "./chunk-JRAVVJ3T.mjs";
8
+ import "./chunk-2PRO2JTX.mjs";
9
9
  import "./chunk-YHPYUZZX.mjs";
10
10
  import "./chunk-DLIRSHV6.mjs";
11
11
  import "./chunk-NXGCO4JB.mjs";
12
- import "./chunk-UPEOEYZ3.mjs";
12
+ import "./chunk-TQNHMWUR.mjs";
13
13
  import "./chunk-WZYKRD7T.mjs";
14
14
  import "./chunk-KRD6H754.mjs";
15
15
 
@@ -4,12 +4,12 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkD2ZRMZKFjs = require('./chunk-D2ZRMZKF.js');
8
- require('./chunk-THHM4DPE.js');
7
+ var _chunkYD7B53RWjs = require('./chunk-YD7B53RW.js');
8
+ require('./chunk-FJCIUF34.js');
9
9
  require('./chunk-Q2E4E4FJ.js');
10
10
  require('./chunk-XNYIZMNQ.js');
11
11
  require('./chunk-7P5AA3SN.js');
12
- require('./chunk-7LKYHZVB.js');
12
+ require('./chunk-DEC3JECC.js');
13
13
  require('./chunk-OG64RBAC.js');
14
14
  require('./chunk-COGTRVWW.js');
15
15
 
@@ -127,7 +127,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
127
127
  column.length,
128
128
  ...rows.map((row) => {
129
129
  const value = _nullishCoalesce(row[column], () => ( ""));
130
- return (verbose ? value : _chunkD2ZRMZKFjs.clip.call(void 0, value, 42)).length;
130
+ return (verbose ? value : _chunkYD7B53RWjs.clip.call(void 0, value, 42)).length;
131
131
  })
132
132
  )
133
133
  ])
@@ -137,7 +137,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
137
137
  const body = rows.map(
138
138
  (row) => columns.map((column) => {
139
139
  const raw = _nullishCoalesce(row[column], () => ( ""));
140
- const display = verbose ? raw : _chunkD2ZRMZKFjs.clip.call(void 0, raw, 42);
140
+ const display = verbose ? raw : _chunkYD7B53RWjs.clip.call(void 0, raw, 42);
141
141
  return display.padEnd(widths[column]);
142
142
  }).join(" | ")
143
143
  );
@@ -157,7 +157,7 @@ async function handleCsvShow(path, options, command) {
157
157
  { exitCode: 2 }
158
158
  );
159
159
  }
160
- const allRows = _chunkD2ZRMZKFjs.readCsvRows.call(void 0, csvPath);
160
+ const allRows = _chunkYD7B53RWjs.readCsvRows.call(void 0, csvPath);
161
161
  const [rowStart, rowEnd] = parseRowRange(options.rows);
162
162
  const rows = options.summary && options.rows === void 0 ? allRows : selectRows(allRows, rowStart, rowEnd);
163
163
  const { rows: selected, columns } = selectColumns(
@@ -170,7 +170,7 @@ async function handleCsvShow(path, options, command) {
170
170
  if (options.summary) {
171
171
  const summaries = summarizeColumns(selected, columns);
172
172
  if (format === "json") {
173
- _chunkD2ZRMZKFjs.printJson.call(void 0, {
173
+ _chunkYD7B53RWjs.printJson.call(void 0, {
174
174
  rows: summaries,
175
175
  total_rows: selected.length,
176
176
  source_total_rows: allRows.length
@@ -179,7 +179,7 @@ async function handleCsvShow(path, options, command) {
179
179
  }
180
180
  const displayRows = summaryDisplayRows(summaries);
181
181
  if (format === "csv") {
182
- process.stdout.write(_chunkD2ZRMZKFjs.csvStringFromRows.call(void 0, displayRows));
182
+ process.stdout.write(_chunkYD7B53RWjs.csvStringFromRows.call(void 0, displayRows));
183
183
  return;
184
184
  }
185
185
  process.stdout.write(
@@ -194,7 +194,7 @@ async function handleCsvShow(path, options, command) {
194
194
  return;
195
195
  }
196
196
  if (format === "json") {
197
- _chunkD2ZRMZKFjs.printJson.call(void 0, {
197
+ _chunkYD7B53RWjs.printJson.call(void 0, {
198
198
  rows: selected.map((row, index) => ({ __row: rowStart + index, ...row }))
199
199
  });
200
200
  return;
@@ -437,7 +437,7 @@ async function handleCsvRenderStart(options) {
437
437
  if (log) {
438
438
  detail = `
439
439
  CSV render log:
440
- ${_chunkD2ZRMZKFjs.clip.call(void 0, log, 2e3)}`;
440
+ ${_chunkYD7B53RWjs.clip.call(void 0, log, 2e3)}`;
441
441
  }
442
442
  } catch (e7) {
443
443
  }
@@ -488,7 +488,7 @@ async function handleCsvRenderStatus(options) {
488
488
  if (payload.pid) lines.push(`Render PID: ${payload.pid}`);
489
489
  if (payload.url) lines.push(`Render URL: ${payload.url}`);
490
490
  lines.push(`Render Health: ${payload.health_status}`);
491
- _chunkD2ZRMZKFjs.printCommandEnvelope.call(void 0, payload, {
491
+ _chunkYD7B53RWjs.printCommandEnvelope.call(void 0, payload, {
492
492
  json: options.json,
493
493
  text: `${lines.join("\n")}
494
494
  `
@@ -524,7 +524,7 @@ async function handleCsvRenderStop(options) {
524
524
  };
525
525
  const text = stopped.length > 0 ? `Stopped CSV render process(es): ${stopped.join(" ")}
526
526
  ` : "No running CSV render process found.\n";
527
- _chunkD2ZRMZKFjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
527
+ _chunkYD7B53RWjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
528
528
  }
529
529
  async function handleCsvRender(action, options) {
530
530
  const normalized = _nullishCoalesce(action, () => ( "start"));
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  DeeplineClient,
6
6
  planCustomerDbQuery
7
- } from "./chunk-J67NU4MQ.mjs";
7
+ } from "./chunk-PBZYY7VZ.mjs";
8
8
  import "./chunk-6IKARAYD.mjs";
9
9
  import "./chunk-JI2B4RZP.mjs";
10
10
  import "./chunk-EIMG75BT.mjs";
@@ -18,8 +18,8 @@ import {
18
18
  printCommandEnvelope,
19
19
  recordRows,
20
20
  shouldEmitJson
21
- } from "./chunk-BKC6VMYZ.mjs";
22
- import "./chunk-ZBCTXQ3P.mjs";
21
+ } from "./chunk-JRAVVJ3T.mjs";
22
+ import "./chunk-2PRO2JTX.mjs";
23
23
  import {
24
24
  CustomerDbQueryOutcomeUnknownError
25
25
  } from "./chunk-YHPYUZZX.mjs";
@@ -27,7 +27,7 @@ import "./chunk-DLIRSHV6.mjs";
27
27
  import {
28
28
  DeeplineError
29
29
  } from "./chunk-NXGCO4JB.mjs";
30
- import "./chunk-UPEOEYZ3.mjs";
30
+ import "./chunk-TQNHMWUR.mjs";
31
31
  import "./chunk-WZYKRD7T.mjs";
32
32
  import "./chunk-KRD6H754.mjs";
33
33