deepline 0.3.384 → 0.3.385

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 (90) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/cli/{auth-54CAXSHD.mjs → auth-4D4IBZZN.mjs} +4 -4
  3. package/dist/cli/auth-A4UKONKC.js +39 -0
  4. package/dist/cli/{billing-PXGESNMZ.mjs → billing-4RSI4634.mjs} +4 -4
  5. package/dist/cli/{billing-2XWGPZ5O.js → billing-6LXNCN5G.js} +73 -73
  6. package/dist/cli/{chunk-O4XVGZDX.js → chunk-2IXAMP5J.js} +2 -2
  7. package/dist/cli/{chunk-SOV673GH.js → chunk-3PGTFASB.js} +4 -4
  8. package/dist/cli/{chunk-4EMAJ3QX.js → chunk-CJVB4RVY.js} +64 -62
  9. package/dist/cli/{chunk-XPJKXSQS.js → chunk-CMIRZZT4.js} +6 -6
  10. package/dist/cli/{chunk-BT5Y6UNH.mjs → chunk-DIZYEI6O.mjs} +5 -5
  11. package/dist/cli/{chunk-UMVIHIQR.mjs → chunk-EGMLX2NR.mjs} +2 -2
  12. package/dist/cli/{chunk-IHYRCMS2.mjs → chunk-F44OPZOG.mjs} +2 -2
  13. package/dist/cli/{chunk-W5THLO6U.js → chunk-IFKSXI4W.js} +1 -1
  14. package/dist/cli/{chunk-4SRTIXOV.js → chunk-JFYOV3HL.js} +15 -15
  15. package/dist/cli/{chunk-D6Z646OQ.mjs → chunk-K5JZ3JMP.mjs} +4 -4
  16. package/dist/cli/{chunk-IWP4FVK6.mjs → chunk-KIZ7QHY5.mjs} +1 -1
  17. package/dist/cli/{chunk-OT35I43P.mjs → chunk-KKKKBDVM.mjs} +6 -6
  18. package/dist/cli/{chunk-5HWGQYSK.js → chunk-LEDRQPBQ.js} +50 -50
  19. package/dist/cli/{chunk-6XWYHSKE.js → chunk-MW6IPE3M.js} +9 -9
  20. package/dist/cli/{chunk-4GSECA4G.mjs → chunk-NV5VCWNJ.mjs} +1 -1
  21. package/dist/cli/{chunk-SPSQXIRR.js → chunk-POQ7QWVA.js} +48 -48
  22. package/dist/cli/{chunk-7TGFUXT3.mjs → chunk-Q2NRMSOJ.mjs} +1 -1
  23. package/dist/cli/{chunk-QX473E5P.mjs → chunk-RST4XEI7.mjs} +3 -3
  24. package/dist/cli/{chunk-GIMBOV7B.mjs → chunk-SC2MM6IY.mjs} +2 -2
  25. package/dist/cli/{chunk-JV3I3SPK.mjs → chunk-TIBMH2VI.mjs} +1 -1
  26. package/dist/cli/{chunk-FFXJKVSX.mjs → chunk-TTIISDJB.mjs} +1 -1
  27. package/dist/cli/{chunk-R3B7XJ3J.js → chunk-VCW425WW.js} +26 -26
  28. package/dist/cli/{chunk-LDTDN3RX.mjs → chunk-VUEQBNG7.mjs} +4 -2
  29. package/dist/cli/{chunk-EIEJKNLZ.js → chunk-WGPPCGGS.js} +8 -8
  30. package/dist/cli/{chunk-MPVA2MUT.js → chunk-XFS5MNSM.js} +226 -226
  31. package/dist/cli/{chunk-HNAXRSVI.js → chunk-YHSAUVJ3.js} +8 -8
  32. package/dist/cli/{csv-H4ZACHHS.js → csv-DZY7OAFK.js} +12 -12
  33. package/dist/cli/{csv-J4JP3DPS.mjs → csv-Q7XLUTXX.mjs} +3 -3
  34. package/dist/cli/{db-Y75OULXT.mjs → db-5CLCESHQ.mjs} +4 -4
  35. package/dist/cli/{db-XO7FOC3Y.js → db-FRJFSTIF.js} +29 -29
  36. package/dist/cli/{describe-EQWRAHDB.mjs → describe-QDIM53RP.mjs} +8 -8
  37. package/dist/cli/{describe-YNB27VDP.js → describe-Y7E6FPUC.js} +18 -18
  38. package/dist/cli/{executions-YVEIAM7M.mjs → executions-M2QRHUDM.mjs} +4 -4
  39. package/dist/cli/{executions-ERDR36BX.js → executions-YISFXRPZ.js} +6 -6
  40. package/dist/cli/{feedback-DVLIEVMN.mjs → feedback-FICCIDJQ.mjs} +3 -3
  41. package/dist/cli/{feedback-NED6Q7KT.js → feedback-HNJVF6AQ.js} +7 -7
  42. package/dist/cli/git-RBHELB5Y.js +23 -0
  43. package/dist/cli/{git-4RKNN3VY.mjs → git-WRTQIX6R.mjs} +4 -4
  44. package/dist/cli/index.js +172 -155
  45. package/dist/cli/index.mjs +121 -104
  46. package/dist/cli/{legacy-noops-6E2X2I3N.mjs → legacy-noops-6HJZDXLH.mjs} +4 -4
  47. package/dist/cli/{legacy-noops-RVUHMAGK.js → legacy-noops-E2R3P424.js} +7 -7
  48. package/dist/cli/{monitors-J2MY6A2I.js → monitors-DRWEUXDG.js} +85 -85
  49. package/dist/cli/{monitors-7LHN35U7.mjs → monitors-HGIB7TPZ.mjs} +4 -4
  50. package/dist/cli/{org-XSQK5EXX.js → org-467XUTRD.js} +64 -64
  51. package/dist/cli/{org-V4QQMVEU.mjs → org-NHILTL3P.mjs} +4 -4
  52. package/dist/cli/{play-UN5R5WLC.mjs → play-JEI3F2M4.mjs} +7 -7
  53. package/dist/cli/play-Y66Z4I7K.js +157 -0
  54. package/dist/cli/{providers-2GCHGAPY.mjs → providers-6INAFXGV.mjs} +4 -4
  55. package/dist/cli/{providers-RUZNJEZU.js → providers-KOKGN5YP.js} +7 -7
  56. package/dist/cli/{quickstart-QI7C3OE6.js → quickstart-ELSP2FZI.js} +5 -5
  57. package/dist/cli/{quickstart-SQJ3LD5S.mjs → quickstart-QMRYNXDM.mjs} +3 -3
  58. package/dist/cli/{search-UXEFJH6M.mjs → search-HFUSEL3S.mjs} +5 -5
  59. package/dist/cli/search-P5HU6U6X.js +26 -0
  60. package/dist/cli/{secrets-UELQR4TK.js → secrets-6OUGIWPM.js} +13 -13
  61. package/dist/cli/{secrets-VUXPAPWB.mjs → secrets-TSFBMX65.mjs} +4 -4
  62. package/dist/cli/{sessions-VJJA2IAJ.js → sessions-6VJUWBCJ.js} +5 -5
  63. package/dist/cli/{sessions-NZBULFH2.mjs → sessions-GE3GEQY3.mjs} +4 -4
  64. package/dist/cli/{settings-QUPYXEFE.js → settings-633RRITH.js} +74 -74
  65. package/dist/cli/{settings-IYSP5GKF.mjs → settings-G5FDUOZJ.mjs} +7 -7
  66. package/dist/cli/{setup-6AIDWIE5.mjs → setup-WOMOSJWB.mjs} +6 -6
  67. package/dist/cli/{setup-33FAUBBY.js → setup-X2U5RX5R.js} +41 -41
  68. package/dist/cli/skills-BZCMRUZZ.js +28 -0
  69. package/dist/cli/{skills-WQI5O2YD.mjs → skills-NDHK6HRC.mjs} +4 -4
  70. package/dist/cli/{tools-JRII45GV.mjs → tools-GILOEDEQ.mjs} +6 -6
  71. package/dist/cli/tools-Y6BDEUS3.js +40 -0
  72. package/dist/cli/{update-GSWO4TJZ.mjs → update-H6APTLX7.mjs} +6 -6
  73. package/dist/cli/update-RQWIZOBF.js +28 -0
  74. package/dist/cli/{workflow-RDDDDQEH.mjs → workflow-MLYJQCP3.mjs} +5 -5
  75. package/dist/cli/{workflow-HTFJ4KF7.js → workflow-TC72DBUF.js} +15 -15
  76. package/dist/index.js +6 -6
  77. package/dist/index.mjs +3 -3
  78. package/dist/install-integrity.json +72 -72
  79. package/dist/release.d.mts +1 -1
  80. package/dist/release.d.ts +1 -1
  81. package/dist/release.js +2 -2
  82. package/dist/release.mjs +1 -1
  83. package/package.json +1 -1
  84. package/dist/cli/auth-JLX4WME4.js +0 -39
  85. package/dist/cli/git-Q4YJMTMJ.js +0 -23
  86. package/dist/cli/play-QM2EHIEQ.js +0 -157
  87. package/dist/cli/search-4D6JH4UN.js +0 -26
  88. package/dist/cli/skills-VOZR6NYH.js +0 -28
  89. package/dist/cli/tools-NRW7RTA2.js +0 -40
  90. package/dist/cli/update-IKYKBHCM.js +0 -28
@@ -10,22 +10,24 @@ import {
10
10
  resolveUpdatePlan,
11
11
  runAutomaticUpdatePlan,
12
12
  shouldRunCliAutoUpdate
13
- } from "./chunk-D6Z646OQ.mjs";
14
- import "./chunk-IWP4FVK6.mjs";
13
+ } from "./chunk-K5JZ3JMP.mjs";
14
+ import "./chunk-KIZ7QHY5.mjs";
15
15
  import {
16
16
  SDK_COMPATIBILITY_FAST_DEADLINE_MS,
17
17
  SKILLS_AUTO_SYNC_COMMAND,
18
18
  checkSdkCompatibility,
19
19
  enforceSdkCompatibilityResponse,
20
+ failureReportHeaders,
20
21
  flushDeferredSkillsSyncNotices,
21
22
  isCiEnvironment,
23
+ isFailureReportingDisabled,
22
24
  maybeReportSdkCliFailure,
23
25
  readFreshCleanCompatibility,
24
26
  readTrustedCleanCompatibility,
25
27
  resolveSdkCliFailureExitCode,
26
28
  sanitizeCommand,
27
29
  syncSdkSkillsIfNeeded
28
- } from "./chunk-LDTDN3RX.mjs";
30
+ } from "./chunk-VUEQBNG7.mjs";
29
31
  import {
30
32
  recordCliTrace,
31
33
  traceCliSpan
@@ -40,23 +42,21 @@ import {
40
42
  printCompactJson,
41
43
  printJson,
42
44
  shouldEmitJson
43
- } from "./chunk-JV3I3SPK.mjs";
45
+ } from "./chunk-TIBMH2VI.mjs";
44
46
  import {
45
47
  AuthError,
46
48
  HttpClient,
47
49
  SDK_VERSION,
48
50
  agentSessionIdFromEnvironment,
49
51
  autoDetectBaseUrl,
50
- deploymentProtectionHeaders,
51
- detectAgentRuntime,
52
52
  readSdkSkillsLocalVersion,
53
53
  resolveApiKeyForBaseUrl,
54
54
  resolveBaseUrlOnly,
55
55
  resolveConfig
56
- } from "./chunk-4GSECA4G.mjs";
56
+ } from "./chunk-NV5VCWNJ.mjs";
57
57
  import "./chunk-DLIRSHV6.mjs";
58
58
  import "./chunk-NXGCO4JB.mjs";
59
- import "./chunk-FFXJKVSX.mjs";
59
+ import "./chunk-TTIISDJB.mjs";
60
60
  import "./chunk-WZYKRD7T.mjs";
61
61
  import {
62
62
  commandDocKey,
@@ -126,48 +126,48 @@ import { Command as Command2 } from "commander";
126
126
  var COMMAND_GROUPS = [
127
127
  {
128
128
  names: ["auth"],
129
- load: async () => (await import("./auth-54CAXSHD.mjs")).registerAuthCommands
129
+ load: async () => (await import("./auth-4D4IBZZN.mjs")).registerAuthCommands
130
130
  },
131
131
  {
132
132
  names: ["providers"],
133
- load: async () => (await import("./providers-2GCHGAPY.mjs")).registerProviderCommands
133
+ load: async () => (await import("./providers-6INAFXGV.mjs")).registerProviderCommands
134
134
  },
135
135
  {
136
136
  names: ["search"],
137
- load: async () => (await import("./search-UXEFJH6M.mjs")).registerSearchCommand
137
+ load: async () => (await import("./search-HFUSEL3S.mjs")).registerSearchCommand
138
138
  },
139
139
  {
140
140
  names: ["describe"],
141
- load: async () => (await import("./describe-EQWRAHDB.mjs")).registerDescribeCommand
141
+ load: async () => (await import("./describe-QDIM53RP.mjs")).registerDescribeCommand
142
142
  },
143
143
  {
144
144
  names: ["tools"],
145
- load: async () => (await import("./tools-JRII45GV.mjs")).registerToolsCommands
145
+ load: async () => (await import("./tools-GILOEDEQ.mjs")).registerToolsCommands
146
146
  },
147
147
  {
148
148
  names: ["executions"],
149
- load: async () => (await import("./executions-YVEIAM7M.mjs")).registerExecutionsCommands
149
+ load: async () => (await import("./executions-M2QRHUDM.mjs")).registerExecutionsCommands
150
150
  },
151
151
  {
152
152
  names: ["plays", "runs"],
153
- load: async () => (await import("./play-UN5R5WLC.mjs")).registerPlayCommands
153
+ load: async () => (await import("./play-JEI3F2M4.mjs")).registerPlayCommands
154
154
  },
155
155
  {
156
156
  names: ["sessions"],
157
- load: async () => (await import("./sessions-NZBULFH2.mjs")).registerSessionsCommands
157
+ load: async () => (await import("./sessions-GE3GEQY3.mjs")).registerSessionsCommands
158
158
  },
159
159
  {
160
160
  names: ["workflows"],
161
- load: async () => (await import("./workflow-RDDDDQEH.mjs")).registerWorkflowCommands
161
+ load: async () => (await import("./workflow-MLYJQCP3.mjs")).registerWorkflowCommands
162
162
  },
163
163
  {
164
164
  names: ["secrets"],
165
- load: async () => (await import("./secrets-VUXPAPWB.mjs")).registerSecretsCommands
165
+ load: async () => (await import("./secrets-TSFBMX65.mjs")).registerSecretsCommands
166
166
  },
167
167
  {
168
168
  names: ["settings", "notifications"],
169
169
  load: async () => {
170
- const commands = await import("./settings-IYSP5GKF.mjs");
170
+ const commands = await import("./settings-G5FDUOZJ.mjs");
171
171
  return (p) => {
172
172
  commands.registerSettingsCommands(p);
173
173
  commands.registerNotificationCommands(p);
@@ -176,51 +176,51 @@ var COMMAND_GROUPS = [
176
176
  },
177
177
  {
178
178
  names: ["billing"],
179
- load: async () => (await import("./billing-PXGESNMZ.mjs")).registerBillingCommands
179
+ load: async () => (await import("./billing-4RSI4634.mjs")).registerBillingCommands
180
180
  },
181
181
  {
182
182
  names: ["monitors"],
183
- load: async () => (await import("./monitors-7LHN35U7.mjs")).registerMonitorsCommands
183
+ load: async () => (await import("./monitors-HGIB7TPZ.mjs")).registerMonitorsCommands
184
184
  },
185
185
  {
186
186
  names: ["org"],
187
- load: async () => (await import("./org-V4QQMVEU.mjs")).registerOrgCommands
187
+ load: async () => (await import("./org-NHILTL3P.mjs")).registerOrgCommands
188
188
  },
189
189
  {
190
190
  names: ["git", "projects", "deployments"],
191
- load: async () => (await import("./git-4RKNN3VY.mjs")).registerGitCommands
191
+ load: async () => (await import("./git-WRTQIX6R.mjs")).registerGitCommands
192
192
  },
193
193
  {
194
194
  names: ["csv"],
195
- load: async () => (await import("./csv-J4JP3DPS.mjs")).registerCsvCommands
195
+ load: async () => (await import("./csv-Q7XLUTXX.mjs")).registerCsvCommands
196
196
  },
197
197
  {
198
198
  names: ["db"],
199
- load: async () => (await import("./db-Y75OULXT.mjs")).registerDbCommands
199
+ load: async () => (await import("./db-5CLCESHQ.mjs")).registerDbCommands
200
200
  },
201
201
  {
202
202
  names: ["feedback"],
203
- load: async () => (await import("./feedback-DVLIEVMN.mjs")).registerFeedbackCommands
203
+ load: async () => (await import("./feedback-FICCIDJQ.mjs")).registerFeedbackCommands
204
204
  },
205
205
  {
206
206
  names: ["enrich", "session", "backend"],
207
- load: async () => (await import("./legacy-noops-6E2X2I3N.mjs")).registerDeprecatedCommands
207
+ load: async () => (await import("./legacy-noops-6HJZDXLH.mjs")).registerDeprecatedCommands
208
208
  },
209
209
  {
210
210
  names: ["update"],
211
- load: async () => (await import("./update-GSWO4TJZ.mjs")).registerUpdateCommand
211
+ load: async () => (await import("./update-H6APTLX7.mjs")).registerUpdateCommand
212
212
  },
213
213
  {
214
214
  names: ["skills", "skills-auto-sync"],
215
- load: async () => (await import("./skills-WQI5O2YD.mjs")).registerSkillsCommand
215
+ load: async () => (await import("./skills-NDHK6HRC.mjs")).registerSkillsCommand
216
216
  },
217
217
  {
218
218
  names: ["setup", "doctor"],
219
- load: async () => (await import("./setup-6AIDWIE5.mjs")).registerSetupCommands
219
+ load: async () => (await import("./setup-WOMOSJWB.mjs")).registerSetupCommands
220
220
  },
221
221
  {
222
222
  names: ["quickstart"],
223
- load: async () => (await import("./quickstart-SQJ3LD5S.mjs")).registerQuickstartCommands
223
+ load: async () => (await import("./quickstart-QMRYNXDM.mjs")).registerQuickstartCommands
224
224
  }
225
225
  ];
226
226
  async function registerDeeplineCommandGroups(program, requestedCommand) {
@@ -539,86 +539,103 @@ function resolveCliMaintenancePolicy(input) {
539
539
  }
540
540
 
541
541
  // src/cli/output-size-reporting.ts
542
- var REPORTING_DISABLE_ENV = "DEEPLINE_DISABLE_FAILURE_REPORTING";
543
- var OUTPUT_SIZE_REPORT_TIMEOUT_MS = 1e3;
544
- var REPORT_MIN_OUTPUT_LINES = 40;
542
+ var REPORT_MIN_LINES = 40;
543
+ var REPORT_TIMEOUT_MS = 1e3;
544
+ var FLUSH_TIMEOUT_MS = 250;
545
+ var EMPTY_TALLY = {
546
+ chars: 0,
547
+ newlines: 0,
548
+ endsMidLine: false,
549
+ epipe: false
550
+ };
551
+ function addText(tally, text) {
552
+ if (!text) return tally;
553
+ return {
554
+ ...tally,
555
+ chars: tally.chars + text.length,
556
+ newlines: tally.newlines + text.split("\n").length - 1,
557
+ endsMidLine: !text.endsWith("\n")
558
+ };
559
+ }
560
+ function streamOutput({
561
+ chars,
562
+ newlines,
563
+ endsMidLine,
564
+ epipe
565
+ }) {
566
+ return { chars, lines: newlines + (endsMidLine ? 1 : 0), epipe };
567
+ }
568
+ function shouldReport(stdout, stderr) {
569
+ return stdout.epipe || stderr.epipe || stdout.lines + stderr.lines > REPORT_MIN_LINES;
570
+ }
545
571
  function chunkText(chunk) {
546
572
  if (typeof chunk === "string") return chunk;
547
573
  if (chunk instanceof Uint8Array) return Buffer.from(chunk).toString();
548
574
  return "";
549
575
  }
550
- function countWrites(stream) {
551
- let chars = 0;
552
- let newlines = 0;
553
- let endsMidLine = false;
576
+ function watch(stream) {
577
+ let tally = EMPTY_TALLY;
578
+ stream.on("error", (error) => {
579
+ if (error.code !== "EPIPE") throw error;
580
+ tally = { ...tally, epipe: true };
581
+ });
554
582
  const write = stream.write.bind(stream);
555
583
  stream.write = ((chunk, ...args) => {
556
- const text = chunkText(chunk);
557
- if (text) {
558
- chars += text.length;
559
- newlines += text.split("\n").length - 1;
560
- endsMidLine = !text.endsWith("\n");
561
- }
584
+ tally = addText(tally, chunkText(chunk));
562
585
  return write(chunk, ...args);
563
586
  });
564
- return () => ({ chars, lines: newlines + (endsMidLine ? 1 : 0) });
587
+ return {
588
+ settled: () => new Promise((resolve) => {
589
+ const done = () => resolve(streamOutput(tally));
590
+ const timeout = setTimeout(done, FLUSH_TIMEOUT_MS);
591
+ stream.write("", () => {
592
+ clearTimeout(timeout);
593
+ setImmediate(done);
594
+ });
595
+ })
596
+ };
565
597
  }
566
- function startOutputSizeReporting(input) {
567
- const stdoutSize = countWrites(process.stdout);
568
- const stderrSize = countWrites(process.stderr);
569
- return async () => {
570
- const disabled = ["1", "true", "yes", "on"].includes(
571
- String(process.env[REPORTING_DISABLE_ENV] ?? "").trim().toLowerCase()
572
- );
573
- if (disabled) return;
574
- const stdout = stdoutSize();
575
- const stderr = stderrSize();
576
- if (stdout.lines + stderr.lines <= REPORT_MIN_OUTPUT_LINES) return;
577
- let baseUrl = "";
578
- let apiKey = "";
579
- try {
580
- baseUrl = autoDetectBaseUrl().replace(/\/$/, "");
581
- apiKey = resolveApiKeyForBaseUrl(baseUrl);
582
- } catch {
583
- return;
584
- }
598
+ async function postCommandOutput(body) {
599
+ try {
600
+ const baseUrl = autoDetectBaseUrl().replace(/\/$/, "");
601
+ const apiKey = resolveApiKeyForBaseUrl(baseUrl);
585
602
  if (!apiKey) return;
586
- const controller = new AbortController();
587
- const timeout = setTimeout(
588
- () => controller.abort(),
589
- OUTPUT_SIZE_REPORT_TIMEOUT_MS
590
- );
591
- try {
592
- const agentSessionId = agentSessionIdFromEnvironment();
593
- await fetch(new URL("/api/v2/telemetry/command-output", baseUrl), {
594
- method: "POST",
595
- headers: {
596
- ...deploymentProtectionHeaders(),
597
- ...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {},
598
- Authorization: `Bearer ${apiKey}`,
599
- "Content-Type": "application/json",
600
- "User-Agent": `deepline-ts-sdk/${SDK_VERSION}`,
601
- "X-Deepline-Client-Family": "sdk",
602
- "X-Deepline-CLI-Family": "sdk",
603
- "X-Deepline-Agent-Runtime": detectAgentRuntime(),
604
- "X-Deepline-CLI-Version": SDK_VERSION,
605
- "X-Deepline-SDK-Version": SDK_VERSION
606
- },
607
- body: JSON.stringify({
608
- command: sanitizeCommand(input.argv),
609
- exit_code: typeof process.exitCode === "number" ? process.exitCode : null,
610
- duration_ms: Math.max(0, Date.now() - input.startedAtMs),
611
- stdout_chars: stdout.chars,
612
- stderr_chars: stderr.chars,
613
- stdout_lines: stdout.lines,
614
- stderr_lines: stderr.lines
615
- }),
616
- signal: controller.signal
617
- });
618
- } catch {
619
- } finally {
620
- clearTimeout(timeout);
621
- }
603
+ const agentSessionId = agentSessionIdFromEnvironment();
604
+ await fetch(new URL("/api/v2/telemetry/command-output", baseUrl), {
605
+ method: "POST",
606
+ headers: {
607
+ ...failureReportHeaders(apiKey),
608
+ ...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {}
609
+ },
610
+ body: JSON.stringify(body),
611
+ signal: AbortSignal.timeout(REPORT_TIMEOUT_MS)
612
+ });
613
+ } catch {
614
+ }
615
+ }
616
+ function startOutputSizeReporting(command, streams = {
617
+ stdout: process.stdout,
618
+ stderr: process.stderr
619
+ }) {
620
+ const stdoutWatch = watch(streams.stdout);
621
+ const stderrWatch = watch(streams.stderr);
622
+ return async (exitCode) => {
623
+ if (isFailureReportingDisabled()) return;
624
+ const [stdout, stderr] = await Promise.all([
625
+ stdoutWatch.settled(),
626
+ stderrWatch.settled()
627
+ ]);
628
+ if (!shouldReport(stdout, stderr)) return;
629
+ await postCommandOutput({
630
+ command: sanitizeCommand(command.argv),
631
+ exit_code: typeof exitCode === "number" ? exitCode : null,
632
+ duration_ms: Math.max(0, Date.now() - command.startedAtMs),
633
+ stdout_chars: stdout.chars,
634
+ stderr_chars: stderr.chars,
635
+ stdout_lines: stdout.lines,
636
+ stderr_lines: stderr.lines,
637
+ epipe: stdout.epipe || stderr.epipe
638
+ });
622
639
  };
623
640
  }
624
641
 
@@ -713,7 +730,7 @@ async function runPlayRunnerHealthCheck() {
713
730
  });
714
731
  let exitCode = 1;
715
732
  try {
716
- const { handlePlayRun } = await import("./play-UN5R5WLC.mjs");
733
+ const { handlePlayRun } = await import("./play-JEI3F2M4.mjs");
717
734
  exitCode = await handlePlayRun([
718
735
  file,
719
736
  "--input",
@@ -1110,7 +1127,7 @@ Examples:
1110
1127
  return;
1111
1128
  }
1112
1129
  try {
1113
- const { httpJson, readStatusBanner, statusBannerLine } = await import("./auth-54CAXSHD.mjs");
1130
+ const { httpJson, readStatusBanner, statusBannerLine } = await import("./auth-4D4IBZZN.mjs");
1114
1131
  const baseUrl = resolveBaseUrlOnly();
1115
1132
  const [{ status, data }, banner] = await Promise.all([
1116
1133
  httpJson("GET", `${baseUrl}/api/v2/health`, null),
@@ -1185,7 +1202,7 @@ Examples:
1185
1202
  const helpArgs = process.argv.slice(2);
1186
1203
  const helpPositionals = helpArgs.filter((arg) => !arg.startsWith("-"));
1187
1204
  if (helpPositionals.length === 0 ? helpArgs.includes("--help") || helpArgs.includes("-h") : helpPositionals.length === 1 && helpPositionals[0] === "help") {
1188
- const { authStatusLine } = await import("./auth-54CAXSHD.mjs");
1205
+ const { authStatusLine } = await import("./auth-4D4IBZZN.mjs");
1189
1206
  rootHelpStatus = `Version: ${SDK_VERSION}
1190
1207
  ${await authStatusLine()}
1191
1208
  `;
@@ -1282,7 +1299,7 @@ async function main() {
1282
1299
  try {
1283
1300
  await runMain(ensureTransport);
1284
1301
  await ensureTransport();
1285
- await reportOutputSize();
1302
+ await reportOutputSize(process.exitCode);
1286
1303
  } finally {
1287
1304
  await disposeTransport?.();
1288
1305
  }
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  registerSessionSendRenderCommands
3
- } from "./chunk-IHYRCMS2.mjs";
3
+ } from "./chunk-F44OPZOG.mjs";
4
4
  import {
5
5
  ENRICH_COMMAND_DEPRECATION_MESSAGE
6
6
  } from "./chunk-ITOFSXIU.mjs";
7
7
  import {
8
8
  printCommandEnvelope
9
- } from "./chunk-JV3I3SPK.mjs";
10
- import "./chunk-4GSECA4G.mjs";
9
+ } from "./chunk-TIBMH2VI.mjs";
10
+ import "./chunk-NV5VCWNJ.mjs";
11
11
  import "./chunk-DLIRSHV6.mjs";
12
12
  import "./chunk-NXGCO4JB.mjs";
13
- import "./chunk-FFXJKVSX.mjs";
13
+ import "./chunk-TTIISDJB.mjs";
14
14
  import "./chunk-WZYKRD7T.mjs";
15
15
  import "./chunk-KRD6H754.mjs";
16
16
 
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkHNAXRSVIjs = require('./chunk-HNAXRSVI.js');
3
+ var _chunkYHSAUVJ3js = require('./chunk-YHSAUVJ3.js');
4
4
 
5
5
 
6
6
  var _chunk3XX5TEA4js = require('./chunk-3XX5TEA4.js');
7
7
 
8
8
 
9
- var _chunkXPJKXSQSjs = require('./chunk-XPJKXSQS.js');
10
- require('./chunk-SOV673GH.js');
9
+ var _chunkCMIRZZT4js = require('./chunk-CMIRZZT4.js');
10
+ require('./chunk-3PGTFASB.js');
11
11
  require('./chunk-XNYIZMNQ.js');
12
12
  require('./chunk-7P5AA3SN.js');
13
- require('./chunk-W5THLO6U.js');
13
+ require('./chunk-IFKSXI4W.js');
14
14
  require('./chunk-OG64RBAC.js');
15
15
  require('./chunk-COGTRVWW.js');
16
16
 
@@ -51,7 +51,7 @@ function deprecatedCommandEnvelope(input) {
51
51
  };
52
52
  }
53
53
  function printDeprecatedCommand(input) {
54
- _chunkXPJKXSQSjs.printCommandEnvelope.call(void 0, deprecatedCommandEnvelope(input), {
54
+ _chunkCMIRZZT4js.printCommandEnvelope.call(void 0, deprecatedCommandEnvelope(input), {
55
55
  json: input.options.json
56
56
  });
57
57
  process.exitCode = 2;
@@ -71,7 +71,7 @@ function registerDeprecatedCommands(program) {
71
71
  program.command("enrich", { hidden: true }).description("Deprecated CSV enrichment command.").allowUnknownOption(true).allowExcessArguments(true).option("--json", "Emit JSON output").argument("[args...]").addHelpText("after", `
72
72
  ${_chunk3XX5TEA4js.ENRICH_COMMAND_DEPRECATION_MESSAGE}
73
73
  `).action((_args, options) => {
74
- _chunkXPJKXSQSjs.printCommandEnvelope.call(void 0,
74
+ _chunkCMIRZZT4js.printCommandEnvelope.call(void 0,
75
75
  {
76
76
  ok: false,
77
77
  command: "deepline enrich",
@@ -114,7 +114,7 @@ Examples:
114
114
  options
115
115
  });
116
116
  });
117
- _chunkHNAXRSVIjs.registerSessionSendRenderCommands.call(void 0, session, "session");
117
+ _chunkYHSAUVJ3js.registerSessionSendRenderCommands.call(void 0, session, "session");
118
118
  for (const subcommand of SESSION_SUBCOMMANDS) {
119
119
  addDeprecatedSubcommand(
120
120
  session,