deepline 0.3.356 → 0.3.358

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 (103) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +14 -1
  3. package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +52 -19
  4. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +77 -25
  5. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +202 -44
  6. package/dist/cli/{auth-PFLCB6IL.mjs → auth-QSEB4OI6.mjs} +6 -4
  7. package/dist/cli/auth-VP5WIGFS.js +33 -0
  8. package/dist/cli/{billing-T3K2KS55.mjs → billing-KNJ6ZHSN.mjs} +5 -5
  9. package/dist/cli/{billing-TJOZMRIV.js → billing-UE2CP5O5.js} +74 -74
  10. package/dist/cli/{chunk-NAMT3YP5.mjs → chunk-3DP24EZA.mjs} +15 -15
  11. package/dist/cli/{chunk-35AZMPQV.mjs → chunk-4IUOBUNS.mjs} +1 -1
  12. package/dist/cli/{chunk-6GOZN6ZF.js → chunk-5PJ6XYRV.js} +64 -60
  13. package/dist/cli/{chunk-26FD35VW.js → chunk-5RWJSROL.js} +8 -8
  14. package/dist/cli/{chunk-HBN5ORV2.js → chunk-BVPN57AD.js} +6 -6
  15. package/dist/cli/{chunk-6S2HRJIV.mjs → chunk-EL62MLRD.mjs} +1 -1
  16. package/dist/cli/{chunk-AUQYSGGD.mjs → chunk-EVPWVNJV.mjs} +7 -7
  17. package/dist/cli/{chunk-OXNEO6OS.js → chunk-GYDSDOXB.js} +75 -50
  18. package/dist/cli/{chunk-X4PJURJH.mjs → chunk-HGLESMAC.mjs} +27 -2
  19. package/dist/cli/{chunk-447A2YBS.js → chunk-HKRJUIRL.js} +47 -47
  20. package/dist/cli/{chunk-MK3WFSJN.js → chunk-HNAFCPM4.js} +8 -8
  21. package/dist/cli/{chunk-UC27KYXC.js → chunk-KIRDHNX5.js} +11 -11
  22. package/dist/cli/{chunk-2EYFTDKU.js → chunk-LOSZZCER.js} +2 -2
  23. package/dist/cli/{chunk-GD4YCB5C.mjs → chunk-NMHQTEIQ.mjs} +2 -2
  24. package/dist/cli/{chunk-OIJR6SCZ.js → chunk-OO3MYL2Y.js} +26 -26
  25. package/dist/cli/{chunk-YILVDBYO.js → chunk-OVUDXZCK.js} +1 -1
  26. package/dist/cli/{chunk-YFLAUIJN.mjs → chunk-Q77PWYDF.mjs} +4 -4
  27. package/dist/cli/chunk-QFBHEQCQ.mjs +1421 -0
  28. package/dist/cli/{chunk-W3VTKDQK.mjs → chunk-QH6PV7IJ.mjs} +3 -3
  29. package/dist/cli/chunk-QILHWZFP.js +1421 -0
  30. package/dist/cli/{chunk-2CTZ4MRZ.mjs → chunk-SJY4SUCH.mjs} +1 -1
  31. package/dist/cli/{chunk-2RMJLL3R.mjs → chunk-SPJ3IDR4.mjs} +2 -2
  32. package/dist/cli/{chunk-A544Z3OR.js → chunk-UZQWPQ6V.js} +5 -5
  33. package/dist/cli/{chunk-HXL4ZESY.js → chunk-V4MVLHOW.js} +231 -231
  34. package/dist/cli/{chunk-WF5BHZWA.mjs → chunk-VZBNBCEB.mjs} +3 -3
  35. package/dist/cli/{chunk-LDOOR6AE.js → chunk-WVO6AJM7.js} +15 -15
  36. package/dist/cli/{chunk-RPALAI2R.mjs → chunk-WYVUMIEF.mjs} +8 -8
  37. package/dist/cli/{chunk-7LFNGGH6.mjs → chunk-YWGKGXSH.mjs} +6 -2
  38. package/dist/cli/client-I4RRFLPM.js +20 -0
  39. package/dist/cli/{client-XMFAODL2.mjs → client-M2TQV23S.mjs} +4 -4
  40. package/dist/cli/command-docs.d.mts +50 -0
  41. package/dist/cli/command-docs.d.ts +50 -0
  42. package/dist/cli/command-docs.js +13 -0
  43. package/dist/cli/command-docs.mjs +13 -0
  44. package/dist/cli/{csv-NLCVCEZ3.mjs → csv-OQUTHAMD.mjs} +3 -3
  45. package/dist/cli/{csv-4TMZI4RY.js → csv-VSVZWQ24.js} +12 -12
  46. package/dist/cli/{db-PWID5GLT.js → db-6QNWRH47.js} +30 -30
  47. package/dist/cli/{db-IMLYZF3N.mjs → db-QH56PKPT.mjs} +5 -5
  48. package/dist/cli/{describe-LTYF5NWH.js → describe-BKJNG2I5.js} +21 -21
  49. package/dist/cli/{describe-LFKBFDRQ.mjs → describe-NCUJW2JG.mjs} +16 -16
  50. package/dist/cli/{executions-RB4WIKFH.js → executions-63CSEYKE.js} +7 -7
  51. package/dist/cli/{executions-6UVFDX2O.mjs → executions-NOZELHEN.mjs} +5 -5
  52. package/dist/cli/{feedback-PH3WH5LE.mjs → feedback-GL7YHJAK.mjs} +3 -3
  53. package/dist/cli/{feedback-EOUSGLRS.js → feedback-T4FGM7DY.js} +7 -7
  54. package/dist/cli/git-4EBFGJAN.js +23 -0
  55. package/dist/cli/{git-BLVZPTBC.mjs → git-C3SPUEUB.mjs} +4 -4
  56. package/dist/cli/index.js +183 -83
  57. package/dist/cli/index.mjs +145 -45
  58. package/dist/cli/{legacy-noops-5JDDNT4H.mjs → legacy-noops-BBDNHMAW.mjs} +4 -4
  59. package/dist/cli/{legacy-noops-KQBQ4WMC.js → legacy-noops-W6UWORVY.js} +7 -7
  60. package/dist/cli/{monitors-JL7A5ZOX.mjs → monitors-LEGM63T3.mjs} +5 -5
  61. package/dist/cli/{monitors-IETMP6ER.js → monitors-R32SKFE3.js} +86 -86
  62. package/dist/cli/{org-L6TG5MRM.mjs → org-RBIBSVP3.mjs} +5 -5
  63. package/dist/cli/{org-HL2CWV6W.js → org-RYRHB22V.js} +61 -61
  64. package/dist/cli/{play-42RA7JRU.mjs → play-FMPNHLXU.mjs} +11 -11
  65. package/dist/cli/play-GDDOUU3I.js +153 -0
  66. package/dist/cli/{providers-RH5ZPZXO.mjs → providers-5JHHZWMF.mjs} +5 -5
  67. package/dist/cli/{providers-MASSERVB.js → providers-WAUWYRTK.js} +8 -8
  68. package/dist/cli/{quickstart-OMZY743O.mjs → quickstart-RYKNMAFN.mjs} +5 -5
  69. package/dist/cli/{quickstart-6AYK534A.js → quickstart-V5LHMW2X.js} +7 -7
  70. package/dist/cli/{search-TBOZ5R36.mjs → search-B2BB2MHO.mjs} +6 -6
  71. package/dist/cli/search-RQLY5D2A.js +26 -0
  72. package/dist/cli/{secrets-74CH44OT.js → secrets-BEAESK2H.js} +14 -14
  73. package/dist/cli/{secrets-IN4XCGBJ.mjs → secrets-XJOXWVUG.mjs} +5 -5
  74. package/dist/cli/{sessions-KK47BDGG.js → sessions-ELBTWKLS.js} +5 -5
  75. package/dist/cli/{sessions-BAMVNM3F.mjs → sessions-VRDJCPKE.mjs} +4 -4
  76. package/dist/cli/{settings-HZFVYTEW.mjs → settings-QEL2SD7N.mjs} +8 -8
  77. package/dist/cli/{settings-VSKWLX2B.js → settings-V5RI4UWE.js} +75 -75
  78. package/dist/cli/{setup-IYVMYYZW.js → setup-CS3IACGU.js} +43 -43
  79. package/dist/cli/{setup-3YOU6BBX.mjs → setup-FNVP5XQR.mjs} +8 -8
  80. package/dist/cli/{skills-DB3TE5LF.mjs → skills-73PM6I6F.mjs} +4 -4
  81. package/dist/cli/skills-OH3X3OUA.js +28 -0
  82. package/dist/cli/tools-BY6D7M4I.js +40 -0
  83. package/dist/cli/{tools-AMNLACHH.mjs → tools-N2H5HJYP.mjs} +8 -8
  84. package/dist/cli/{update-3PBHH5FL.mjs → update-MUMZ6L7J.mjs} +6 -6
  85. package/dist/cli/update-PEGDRQ3G.js +28 -0
  86. package/dist/cli/{workflow-C2KGKJJD.mjs → workflow-WY2CL73A.mjs} +9 -9
  87. package/dist/cli/{workflow-5YDAWSKH.js → workflow-X66V6L3H.js} +19 -19
  88. package/dist/index.js +13 -13
  89. package/dist/index.mjs +12 -12
  90. package/dist/install-integrity.json +80 -74
  91. package/dist/release.d.mts +1 -1
  92. package/dist/release.d.ts +1 -1
  93. package/dist/release.js +2 -2
  94. package/dist/release.mjs +1 -1
  95. package/package.json +6 -1
  96. package/dist/cli/auth-IHV3XXSN.js +0 -31
  97. package/dist/cli/client-TDH32IGR.js +0 -20
  98. package/dist/cli/git-V6HWB6JB.js +0 -23
  99. package/dist/cli/play-QQLZQILD.js +0 -153
  100. package/dist/cli/search-FR6FXEXN.js +0 -26
  101. package/dist/cli/skills-3HFZGYM7.js +0 -28
  102. package/dist/cli/tools-GJ7TH2T3.js +0 -40
  103. package/dist/cli/update-SUNCN4SV.js +0 -28
@@ -1,17 +1,21 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ canAutomaticallyApplyUpdatePlan,
4
+ resolveUpdatePlan,
5
+ runAutomaticUpdatePlan,
6
+ shouldRunCliAutoUpdate
7
+ } from "./chunk-Q77PWYDF.mjs";
8
+ import "./chunk-4IUOBUNS.mjs";
9
+ import {
10
+ recordCliTrace,
11
+ traceCliSpan
12
+ } from "./chunk-UFS752TU.mjs";
2
13
  import {
3
14
  beginToolExecuteCommand,
4
15
  compatibilityCatalog,
5
16
  finishToolExecuteCommand,
6
17
  runToolExecuteStage
7
18
  } from "./chunk-WXLOW623.mjs";
8
- import {
9
- canAutomaticallyApplyUpdatePlan,
10
- resolveUpdatePlan,
11
- runAutomaticUpdatePlan,
12
- shouldRunCliAutoUpdate
13
- } from "./chunk-YFLAUIJN.mjs";
14
- import "./chunk-35AZMPQV.mjs";
15
19
  import {
16
20
  SDK_COMPATIBILITY_FAST_DEADLINE_MS,
17
21
  SKILLS_AUTO_SYNC_COMMAND,
@@ -24,11 +28,7 @@ import {
24
28
  readTrustedCleanCompatibility,
25
29
  resolveSdkCliFailureExitCode,
26
30
  syncSdkSkillsIfNeeded
27
- } from "./chunk-7LFNGGH6.mjs";
28
- import {
29
- recordCliTrace,
30
- traceCliSpan
31
- } from "./chunk-UFS752TU.mjs";
31
+ } from "./chunk-YWGKGXSH.mjs";
32
32
  import {
33
33
  createCliProgress
34
34
  } from "./chunk-GAMFK2ZP.mjs";
@@ -38,20 +38,26 @@ import {
38
38
  printCompactJson,
39
39
  printJson,
40
40
  shouldEmitJson
41
- } from "./chunk-6S2HRJIV.mjs";
41
+ } from "./chunk-EL62MLRD.mjs";
42
42
  import {
43
43
  AuthError,
44
44
  HttpClient,
45
45
  SDK_VERSION,
46
+ agentSessionIdFromEnvironment,
46
47
  autoDetectBaseUrl,
47
48
  readSdkSkillsLocalVersion,
48
49
  resolveApiKeyForBaseUrl,
49
50
  resolveConfig
50
- } from "./chunk-WF5BHZWA.mjs";
51
+ } from "./chunk-VZBNBCEB.mjs";
51
52
  import "./chunk-DLIRSHV6.mjs";
52
- import "./chunk-2CTZ4MRZ.mjs";
53
53
  import "./chunk-NXGCO4JB.mjs";
54
+ import "./chunk-SJY4SUCH.mjs";
54
55
  import "./chunk-WZYKRD7T.mjs";
56
+ import {
57
+ commandDocKey,
58
+ helpDetailFromArgv,
59
+ renderCommandExplanation
60
+ } from "./chunk-QFBHEQCQ.mjs";
55
61
  import "./chunk-KRD6H754.mjs";
56
62
 
57
63
  // src/cli/command-invocation.ts
@@ -107,7 +113,7 @@ function inspectCliInvocation(program, argv) {
107
113
 
108
114
  // src/cli/index.ts
109
115
  import { mkdtemp, rm, writeFile } from "fs/promises";
110
- import { join } from "path";
116
+ import { join as join2 } from "path";
111
117
  import { tmpdir } from "os";
112
118
  import { Command as Command2 } from "commander";
113
119
 
@@ -115,48 +121,48 @@ import { Command as Command2 } from "commander";
115
121
  var COMMAND_GROUPS = [
116
122
  {
117
123
  names: ["auth"],
118
- load: async () => (await import("./auth-PFLCB6IL.mjs")).registerAuthCommands
124
+ load: async () => (await import("./auth-QSEB4OI6.mjs")).registerAuthCommands
119
125
  },
120
126
  {
121
127
  names: ["providers"],
122
- load: async () => (await import("./providers-RH5ZPZXO.mjs")).registerProviderCommands
128
+ load: async () => (await import("./providers-5JHHZWMF.mjs")).registerProviderCommands
123
129
  },
124
130
  {
125
131
  names: ["search"],
126
- load: async () => (await import("./search-TBOZ5R36.mjs")).registerSearchCommand
132
+ load: async () => (await import("./search-B2BB2MHO.mjs")).registerSearchCommand
127
133
  },
128
134
  {
129
135
  names: ["describe"],
130
- load: async () => (await import("./describe-LFKBFDRQ.mjs")).registerDescribeCommand
136
+ load: async () => (await import("./describe-NCUJW2JG.mjs")).registerDescribeCommand
131
137
  },
132
138
  {
133
139
  names: ["tools"],
134
- load: async () => (await import("./tools-AMNLACHH.mjs")).registerToolsCommands
140
+ load: async () => (await import("./tools-N2H5HJYP.mjs")).registerToolsCommands
135
141
  },
136
142
  {
137
143
  names: ["executions"],
138
- load: async () => (await import("./executions-6UVFDX2O.mjs")).registerExecutionsCommands
144
+ load: async () => (await import("./executions-NOZELHEN.mjs")).registerExecutionsCommands
139
145
  },
140
146
  {
141
147
  names: ["plays", "runs"],
142
- load: async () => (await import("./play-42RA7JRU.mjs")).registerPlayCommands
148
+ load: async () => (await import("./play-FMPNHLXU.mjs")).registerPlayCommands
143
149
  },
144
150
  {
145
151
  names: ["sessions"],
146
- load: async () => (await import("./sessions-BAMVNM3F.mjs")).registerSessionsCommands
152
+ load: async () => (await import("./sessions-VRDJCPKE.mjs")).registerSessionsCommands
147
153
  },
148
154
  {
149
155
  names: ["workflows"],
150
- load: async () => (await import("./workflow-C2KGKJJD.mjs")).registerWorkflowCommands
156
+ load: async () => (await import("./workflow-WY2CL73A.mjs")).registerWorkflowCommands
151
157
  },
152
158
  {
153
159
  names: ["secrets"],
154
- load: async () => (await import("./secrets-IN4XCGBJ.mjs")).registerSecretsCommands
160
+ load: async () => (await import("./secrets-XJOXWVUG.mjs")).registerSecretsCommands
155
161
  },
156
162
  {
157
163
  names: ["settings", "notifications"],
158
164
  load: async () => {
159
- const commands = await import("./settings-HZFVYTEW.mjs");
165
+ const commands = await import("./settings-QEL2SD7N.mjs");
160
166
  return (p) => {
161
167
  commands.registerSettingsCommands(p);
162
168
  commands.registerNotificationCommands(p);
@@ -165,51 +171,51 @@ var COMMAND_GROUPS = [
165
171
  },
166
172
  {
167
173
  names: ["billing"],
168
- load: async () => (await import("./billing-T3K2KS55.mjs")).registerBillingCommands
174
+ load: async () => (await import("./billing-KNJ6ZHSN.mjs")).registerBillingCommands
169
175
  },
170
176
  {
171
177
  names: ["monitors"],
172
- load: async () => (await import("./monitors-JL7A5ZOX.mjs")).registerMonitorsCommands
178
+ load: async () => (await import("./monitors-LEGM63T3.mjs")).registerMonitorsCommands
173
179
  },
174
180
  {
175
181
  names: ["org"],
176
- load: async () => (await import("./org-L6TG5MRM.mjs")).registerOrgCommands
182
+ load: async () => (await import("./org-RBIBSVP3.mjs")).registerOrgCommands
177
183
  },
178
184
  {
179
185
  names: ["git", "projects", "deployments"],
180
- load: async () => (await import("./git-BLVZPTBC.mjs")).registerGitCommands
186
+ load: async () => (await import("./git-C3SPUEUB.mjs")).registerGitCommands
181
187
  },
182
188
  {
183
189
  names: ["csv"],
184
- load: async () => (await import("./csv-NLCVCEZ3.mjs")).registerCsvCommands
190
+ load: async () => (await import("./csv-OQUTHAMD.mjs")).registerCsvCommands
185
191
  },
186
192
  {
187
193
  names: ["db"],
188
- load: async () => (await import("./db-IMLYZF3N.mjs")).registerDbCommands
194
+ load: async () => (await import("./db-QH56PKPT.mjs")).registerDbCommands
189
195
  },
190
196
  {
191
197
  names: ["feedback"],
192
- load: async () => (await import("./feedback-PH3WH5LE.mjs")).registerFeedbackCommands
198
+ load: async () => (await import("./feedback-GL7YHJAK.mjs")).registerFeedbackCommands
193
199
  },
194
200
  {
195
201
  names: ["enrich", "session", "backend"],
196
- load: async () => (await import("./legacy-noops-5JDDNT4H.mjs")).registerDeprecatedCommands
202
+ load: async () => (await import("./legacy-noops-BBDNHMAW.mjs")).registerDeprecatedCommands
197
203
  },
198
204
  {
199
205
  names: ["update"],
200
- load: async () => (await import("./update-3PBHH5FL.mjs")).registerUpdateCommand
206
+ load: async () => (await import("./update-MUMZ6L7J.mjs")).registerUpdateCommand
201
207
  },
202
208
  {
203
209
  names: ["skills", "skills-auto-sync"],
204
- load: async () => (await import("./skills-DB3TE5LF.mjs")).registerSkillsCommand
210
+ load: async () => (await import("./skills-73PM6I6F.mjs")).registerSkillsCommand
205
211
  },
206
212
  {
207
213
  names: ["setup", "doctor"],
208
- load: async () => (await import("./setup-3YOU6BBX.mjs")).registerSetupCommands
214
+ load: async () => (await import("./setup-FNVP5XQR.mjs")).registerSetupCommands
209
215
  },
210
216
  {
211
217
  names: ["quickstart"],
212
- load: async () => (await import("./quickstart-OMZY743O.mjs")).registerQuickstartCommands
218
+ load: async () => (await import("./quickstart-RYKNMAFN.mjs")).registerQuickstartCommands
213
219
  }
214
220
  ];
215
221
  async function registerDeeplineCommandGroups(program, requestedCommand) {
@@ -231,6 +237,87 @@ function registerDeeplineInlineCommands(program) {
231
237
  return { preflight, health, version };
232
238
  }
233
239
 
240
+ // src/cli/help-seen.ts
241
+ import {
242
+ existsSync,
243
+ mkdirSync,
244
+ readFileSync,
245
+ renameSync,
246
+ rmSync,
247
+ writeFileSync
248
+ } from "fs";
249
+ import { homedir } from "os";
250
+ import { dirname, join } from "path";
251
+ var MAX_SESSIONS = 20;
252
+ function helpSeenPath(homeDir = homedir()) {
253
+ return join(homeDir, ".local", "deepline", "sdk-cli", "help-seen.json");
254
+ }
255
+ function resolveHelpDetail(argv, key, homeDir = homedir(), sessionId = agentSessionIdFromEnvironment()) {
256
+ const explicit = helpDetailFromArgv(argv);
257
+ if (explicit === "quiet") return { detail: "quiet", firstRead: false };
258
+ if (!sessionId) return { detail: explicit, firstRead: false };
259
+ const path = helpSeenPath(homeDir);
260
+ const sessions = readSessions(path);
261
+ const seen = new Set(sessions.get(sessionId));
262
+ const firstRead = !seen.has(key);
263
+ if (!firstRead) return { detail: explicit, firstRead: false };
264
+ seen.add(key);
265
+ sessions.delete(sessionId);
266
+ sessions.set(sessionId, [...seen].sort());
267
+ writeSessions(path, sessions);
268
+ return { detail: "verbose", firstRead: true };
269
+ }
270
+ function readSessions(path) {
271
+ if (!existsSync(path)) return /* @__PURE__ */ new Map();
272
+ try {
273
+ const parsed = JSON.parse(readFileSync(path, "utf8"));
274
+ const sessions = /* @__PURE__ */ new Map();
275
+ for (const entry of Array.isArray(parsed.sessions) ? parsed.sessions : []) {
276
+ const { id, seen } = entry;
277
+ if (typeof id !== "string" || !Array.isArray(seen)) continue;
278
+ sessions.set(
279
+ id,
280
+ seen.filter((value) => typeof value === "string")
281
+ );
282
+ }
283
+ return sessions;
284
+ } catch (error) {
285
+ const detail = error instanceof Error ? error.message : String(error);
286
+ console.error(
287
+ `[deepline] Could not read ${path}; treating every command's help as unread. ${detail}`
288
+ );
289
+ return /* @__PURE__ */ new Map();
290
+ }
291
+ }
292
+ function writeSessions(path, sessions) {
293
+ const tempPath = `${path}.${process.pid}.tmp`;
294
+ const recent = [...sessions].slice(-MAX_SESSIONS);
295
+ try {
296
+ mkdirSync(dirname(path), { recursive: true });
297
+ writeFileSync(
298
+ tempPath,
299
+ `${JSON.stringify(
300
+ {
301
+ schemaVersion: 2,
302
+ sessions: recent.map(([id, seen]) => ({ id, seen }))
303
+ },
304
+ null,
305
+ 2
306
+ )}
307
+ `,
308
+ { encoding: "utf8", mode: 384 }
309
+ );
310
+ renameSync(tempPath, path);
311
+ } catch (error) {
312
+ const detail = error instanceof Error ? error.message : String(error);
313
+ console.error(
314
+ `[deepline] Could not record help state at ${path}; the full explanation will print again next time. ${detail}`
315
+ );
316
+ } finally {
317
+ rmSync(tempPath, { force: true });
318
+ }
319
+ }
320
+
234
321
  // src/cli/self-update.ts
235
322
  import { spawn } from "child_process";
236
323
  var AUTO_UPDATE_TELEMETRY_TIMEOUT_MS = 2e3;
@@ -507,8 +594,8 @@ function topLevelCommandKnown(program, commandName) {
507
594
  );
508
595
  }
509
596
  async function runPlayRunnerHealthCheck() {
510
- const dir = await mkdtemp(join(tmpdir(), "deepline-health-play-"));
511
- const file = join(dir, "health-check.play.ts");
597
+ const dir = await mkdtemp(join2(tmpdir(), "deepline-health-play-"));
598
+ const file = join2(dir, "health-check.play.ts");
512
599
  try {
513
600
  await writeFile(
514
601
  file,
@@ -536,7 +623,7 @@ async function runPlayRunnerHealthCheck() {
536
623
  });
537
624
  let exitCode = 1;
538
625
  try {
539
- const { handlePlayRun } = await import("./play-42RA7JRU.mjs");
626
+ const { handlePlayRun } = await import("./play-FMPNHLXU.mjs");
540
627
  exitCode = await handlePlayRun([
541
628
  file,
542
629
  "--input",
@@ -709,6 +796,7 @@ async function newerCliCommandHint(baseUrl, command) {
709
796
  }
710
797
  async function runMain(ensureTransport) {
711
798
  const mainStartedAt = Date.now();
799
+ let rootHelpStatus = "";
712
800
  recordCliTrace({
713
801
  phase: "cli.main_start",
714
802
  argv: process.argv.slice(2)
@@ -729,7 +817,7 @@ async function runMain(ensureTransport) {
729
817
  ).exitOverride().showHelpAfterError().showSuggestionAfterError(true).addHelpText(
730
818
  "beforeAll",
731
819
  "for agents: ensure you are using the /deepline-gtm skill\n"
732
- ).addHelpText(
820
+ ).addHelpText("before", () => rootHelpStatus).addHelpText(
733
821
  "after",
734
822
  `
735
823
  Common commands:
@@ -765,7 +853,11 @@ Exit codes:
765
853
  0 success; 2 usage/local input error; 3 auth/permission error; 4 not found;
766
854
  5 server/runtime/provider failure; 7 validation/check failed.
767
855
  `
768
- );
856
+ ).addHelpText("afterAll", ({ command }) => {
857
+ const key = commandDocKey(command);
858
+ const { detail, firstRead } = resolveHelpDetail(process.argv, key);
859
+ return renderCommandExplanation(key, detail, { firstRead });
860
+ });
769
861
  program.hook("preAction", async (_thisCommand, actionCommand) => {
770
862
  const maintenance = resolveCliMaintenancePolicy(
771
863
  actionCommand.optsWithGlobals()
@@ -923,7 +1015,7 @@ Examples:
923
1015
  printJson(data2);
924
1016
  return;
925
1017
  }
926
- const { DeeplineClient } = await import("./client-XMFAODL2.mjs");
1018
+ const { DeeplineClient } = await import("./client-M2TQV23S.mjs");
927
1019
  const client = new DeeplineClient();
928
1020
  const data = await client.health();
929
1021
  printJson(data);
@@ -994,6 +1086,14 @@ Examples:
994
1086
  return;
995
1087
  }
996
1088
  try {
1089
+ const helpArgs = process.argv.slice(2);
1090
+ const helpPositionals = helpArgs.filter((arg) => !arg.startsWith("-"));
1091
+ if (helpPositionals.length === 0 ? helpArgs.includes("--help") || helpArgs.includes("-h") : helpPositionals.length === 1 && helpPositionals[0] === "help") {
1092
+ const { authStatusLine } = await import("./auth-QSEB4OI6.mjs");
1093
+ rootHelpStatus = `Version: ${SDK_VERSION}
1094
+ ${await authStatusLine()}
1095
+ `;
1096
+ }
997
1097
  await program.parseAsync(process.argv);
998
1098
  recordCliTrace({
999
1099
  phase: "cli.main_total",
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  registerSessionSendRenderCommands
3
- } from "./chunk-GD4YCB5C.mjs";
3
+ } from "./chunk-NMHQTEIQ.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-6S2HRJIV.mjs";
10
- import "./chunk-WF5BHZWA.mjs";
9
+ } from "./chunk-EL62MLRD.mjs";
10
+ import "./chunk-VZBNBCEB.mjs";
11
11
  import "./chunk-DLIRSHV6.mjs";
12
- import "./chunk-2CTZ4MRZ.mjs";
13
12
  import "./chunk-NXGCO4JB.mjs";
13
+ import "./chunk-SJY4SUCH.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 _chunkMK3WFSJNjs = require('./chunk-MK3WFSJN.js');
3
+ var _chunkHNAFCPM4js = require('./chunk-HNAFCPM4.js');
4
4
 
5
5
 
6
6
  var _chunk3XX5TEA4js = require('./chunk-3XX5TEA4.js');
7
7
 
8
8
 
9
- var _chunkHBN5ORV2js = require('./chunk-HBN5ORV2.js');
10
- require('./chunk-A544Z3OR.js');
9
+ var _chunkBVPN57ADjs = require('./chunk-BVPN57AD.js');
10
+ require('./chunk-UZQWPQ6V.js');
11
11
  require('./chunk-XNYIZMNQ.js');
12
- require('./chunk-YILVDBYO.js');
13
12
  require('./chunk-7P5AA3SN.js');
13
+ require('./chunk-OVUDXZCK.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
- _chunkHBN5ORV2js.printCommandEnvelope.call(void 0, deprecatedCommandEnvelope(input), {
54
+ _chunkBVPN57ADjs.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
- _chunkHBN5ORV2js.printCommandEnvelope.call(void 0,
74
+ _chunkBVPN57ADjs.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
- _chunkMK3WFSJNjs.registerSessionSendRenderCommands.call(void 0, session, "session");
117
+ _chunkHNAFCPM4js.registerSessionSendRenderCommands.call(void 0, session, "session");
118
118
  for (const subcommand of SESSION_SUBCOMMANDS) {
119
119
  addDeprecatedSubcommand(
120
120
  session,
@@ -1,7 +1,8 @@
1
1
  import "./chunk-EXMLR72R.mjs";
2
2
  import {
3
3
  DeeplineClient
4
- } from "./chunk-AUQYSGGD.mjs";
4
+ } from "./chunk-EVPWVNJV.mjs";
5
+ import "./chunk-6IKARAYD.mjs";
5
6
  import "./chunk-CBVIJSHF.mjs";
6
7
  import {
7
8
  MONITOR_FLEET_DOCUMENTATION,
@@ -16,16 +17,15 @@ import {
16
17
  printCommandEnvelope,
17
18
  printJson,
18
19
  shouldEmitJson
19
- } from "./chunk-6S2HRJIV.mjs";
20
+ } from "./chunk-EL62MLRD.mjs";
20
21
  import {
21
22
  AuthError
22
- } from "./chunk-WF5BHZWA.mjs";
23
+ } from "./chunk-VZBNBCEB.mjs";
23
24
  import "./chunk-DLIRSHV6.mjs";
24
- import "./chunk-2CTZ4MRZ.mjs";
25
- import "./chunk-6IKARAYD.mjs";
26
25
  import {
27
26
  DeeplineError
28
27
  } from "./chunk-NXGCO4JB.mjs";
28
+ import "./chunk-SJY4SUCH.mjs";
29
29
  import "./chunk-WZYKRD7T.mjs";
30
30
  import "./chunk-KRD6H754.mjs";
31
31