deepline 0.3.357 → 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 +35 -18
  5. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +202 -44
  6. package/dist/cli/{auth-5Y2YV5LY.mjs → auth-QSEB4OI6.mjs} +6 -4
  7. package/dist/cli/auth-VP5WIGFS.js +33 -0
  8. package/dist/cli/{billing-UOFR7KDB.mjs → billing-KNJ6ZHSN.mjs} +5 -5
  9. package/dist/cli/{billing-Y6IKDJ6H.js → billing-UE2CP5O5.js} +74 -74
  10. package/dist/cli/{chunk-O7IM72KW.mjs → chunk-3DP24EZA.mjs} +15 -15
  11. package/dist/cli/{chunk-IWBFG4XI.mjs → chunk-4IUOBUNS.mjs} +1 -1
  12. package/dist/cli/{chunk-C2EHMMME.js → chunk-5PJ6XYRV.js} +64 -60
  13. package/dist/cli/{chunk-CPQIVH6G.js → chunk-5RWJSROL.js} +8 -8
  14. package/dist/cli/{chunk-5UNTNKNX.js → chunk-BVPN57AD.js} +6 -6
  15. package/dist/cli/{chunk-PJYCAGKK.mjs → chunk-EL62MLRD.mjs} +1 -1
  16. package/dist/cli/{chunk-NZ6BT4NL.mjs → chunk-EVPWVNJV.mjs} +7 -7
  17. package/dist/cli/{chunk-SCY4UCEZ.js → chunk-GYDSDOXB.js} +75 -50
  18. package/dist/cli/{chunk-VXH4225Y.mjs → chunk-HGLESMAC.mjs} +27 -2
  19. package/dist/cli/{chunk-EWTVIN3O.js → chunk-HKRJUIRL.js} +47 -47
  20. package/dist/cli/{chunk-R5P3KFF5.js → chunk-HNAFCPM4.js} +8 -8
  21. package/dist/cli/{chunk-WQSV34KV.js → chunk-KIRDHNX5.js} +11 -11
  22. package/dist/cli/{chunk-NEMHJYA4.js → chunk-LOSZZCER.js} +2 -2
  23. package/dist/cli/{chunk-2AROJ4EZ.mjs → chunk-NMHQTEIQ.mjs} +2 -2
  24. package/dist/cli/{chunk-J4A4MRBK.js → chunk-OO3MYL2Y.js} +26 -26
  25. package/dist/cli/{chunk-SXXUOZRS.js → chunk-OVUDXZCK.js} +1 -1
  26. package/dist/cli/{chunk-2NZUC5OS.mjs → chunk-Q77PWYDF.mjs} +4 -4
  27. package/dist/cli/chunk-QFBHEQCQ.mjs +1421 -0
  28. package/dist/cli/{chunk-SMLKQAEB.mjs → chunk-QH6PV7IJ.mjs} +3 -3
  29. package/dist/cli/chunk-QILHWZFP.js +1421 -0
  30. package/dist/cli/{chunk-N47R7S3E.mjs → chunk-SJY4SUCH.mjs} +1 -1
  31. package/dist/cli/{chunk-LJTZVC2T.mjs → chunk-SPJ3IDR4.mjs} +2 -2
  32. package/dist/cli/{chunk-4YXJTQ5X.js → chunk-UZQWPQ6V.js} +5 -5
  33. package/dist/cli/{chunk-ZYPSNUDU.js → chunk-V4MVLHOW.js} +231 -231
  34. package/dist/cli/{chunk-VG5WMYSF.mjs → chunk-VZBNBCEB.mjs} +3 -3
  35. package/dist/cli/{chunk-6P235JSN.js → chunk-WVO6AJM7.js} +15 -15
  36. package/dist/cli/{chunk-XYD76KJB.mjs → chunk-WYVUMIEF.mjs} +8 -8
  37. package/dist/cli/{chunk-QYCAH7SM.mjs → chunk-YWGKGXSH.mjs} +6 -2
  38. package/dist/cli/client-I4RRFLPM.js +20 -0
  39. package/dist/cli/{client-23QTYYIR.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-VKEF5C65.mjs → csv-OQUTHAMD.mjs} +3 -3
  45. package/dist/cli/{csv-SQIEBX66.js → csv-VSVZWQ24.js} +12 -12
  46. package/dist/cli/{db-Z33ZRE3N.js → db-6QNWRH47.js} +30 -30
  47. package/dist/cli/{db-KX7FDHL4.mjs → db-QH56PKPT.mjs} +5 -5
  48. package/dist/cli/{describe-5ZQ6KIJH.js → describe-BKJNG2I5.js} +21 -21
  49. package/dist/cli/{describe-K2SJ22B3.mjs → describe-NCUJW2JG.mjs} +16 -16
  50. package/dist/cli/{executions-KCZZY6SS.js → executions-63CSEYKE.js} +7 -7
  51. package/dist/cli/{executions-452G2REF.mjs → executions-NOZELHEN.mjs} +5 -5
  52. package/dist/cli/{feedback-55HU4EQY.mjs → feedback-GL7YHJAK.mjs} +3 -3
  53. package/dist/cli/{feedback-BM7ZNH7Y.js → feedback-T4FGM7DY.js} +7 -7
  54. package/dist/cli/git-4EBFGJAN.js +23 -0
  55. package/dist/cli/{git-CAPESVAJ.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-3B3MG33Y.mjs → legacy-noops-BBDNHMAW.mjs} +4 -4
  59. package/dist/cli/{legacy-noops-PV5AWTIZ.js → legacy-noops-W6UWORVY.js} +7 -7
  60. package/dist/cli/{monitors-43R6CUFK.mjs → monitors-LEGM63T3.mjs} +5 -5
  61. package/dist/cli/{monitors-DVFEJHQT.js → monitors-R32SKFE3.js} +86 -86
  62. package/dist/cli/{org-X5WSLJRD.mjs → org-RBIBSVP3.mjs} +5 -5
  63. package/dist/cli/{org-BGCB45VI.js → org-RYRHB22V.js} +61 -61
  64. package/dist/cli/{play-OFO6XZ5L.mjs → play-FMPNHLXU.mjs} +11 -11
  65. package/dist/cli/play-GDDOUU3I.js +153 -0
  66. package/dist/cli/{providers-L2MPYA3E.mjs → providers-5JHHZWMF.mjs} +5 -5
  67. package/dist/cli/{providers-RJYHQC4J.js → providers-WAUWYRTK.js} +8 -8
  68. package/dist/cli/{quickstart-NHFMGZ3B.mjs → quickstart-RYKNMAFN.mjs} +5 -5
  69. package/dist/cli/{quickstart-E6OWYYMT.js → quickstart-V5LHMW2X.js} +7 -7
  70. package/dist/cli/{search-IPTZAOUE.mjs → search-B2BB2MHO.mjs} +6 -6
  71. package/dist/cli/search-RQLY5D2A.js +26 -0
  72. package/dist/cli/{secrets-6LD4CA2X.js → secrets-BEAESK2H.js} +14 -14
  73. package/dist/cli/{secrets-TCOPPNXR.mjs → secrets-XJOXWVUG.mjs} +5 -5
  74. package/dist/cli/{sessions-QV4LUKEP.js → sessions-ELBTWKLS.js} +5 -5
  75. package/dist/cli/{sessions-D4JETMAW.mjs → sessions-VRDJCPKE.mjs} +4 -4
  76. package/dist/cli/{settings-IVJPCORG.mjs → settings-QEL2SD7N.mjs} +8 -8
  77. package/dist/cli/{settings-JOYKXSY7.js → settings-V5RI4UWE.js} +75 -75
  78. package/dist/cli/{setup-MIJZTYMH.js → setup-CS3IACGU.js} +43 -43
  79. package/dist/cli/{setup-WCKQK7FE.mjs → setup-FNVP5XQR.mjs} +8 -8
  80. package/dist/cli/{skills-GYWMUDDF.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-ILYNEPGQ.mjs → tools-N2H5HJYP.mjs} +8 -8
  84. package/dist/cli/{update-P3VIHMC6.mjs → update-MUMZ6L7J.mjs} +6 -6
  85. package/dist/cli/update-PEGDRQ3G.js +28 -0
  86. package/dist/cli/{workflow-A6ID4C6N.mjs → workflow-WY2CL73A.mjs} +9 -9
  87. package/dist/cli/{workflow-YWKK3A4X.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-AABYKR2S.js +0 -31
  97. package/dist/cli/client-3DYV3HZ4.js +0 -20
  98. package/dist/cli/git-VESXOJ4M.js +0 -23
  99. package/dist/cli/play-ZO4HDGMC.js +0 -153
  100. package/dist/cli/search-2FJA6OH4.js +0 -26
  101. package/dist/cli/skills-JL4J5CII.js +0 -28
  102. package/dist/cli/tools-ZOKG4AX4.js +0 -40
  103. package/dist/cli/update-WUMDEAEE.js +0 -28
package/dist/cli/index.js CHANGED
@@ -4,17 +4,18 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkQJBJZVG6js = require('./chunk-QJBJZVG6.js');
7
+ var _chunkWVO6AJM7js = require('./chunk-WVO6AJM7.js');
8
+ require('./chunk-LOSZZCER.js');
8
9
 
9
10
 
10
11
 
12
+ var _chunkAYHLUHE5js = require('./chunk-AYHLUHE5.js');
11
13
 
12
14
 
13
- var _chunk6P235JSNjs = require('./chunk-6P235JSN.js');
14
- require('./chunk-NEMHJYA4.js');
15
15
 
16
16
 
17
17
 
18
+ var _chunkQJBJZVG6js = require('./chunk-QJBJZVG6.js');
18
19
 
19
20
 
20
21
 
@@ -24,11 +25,10 @@ require('./chunk-NEMHJYA4.js');
24
25
 
25
26
 
26
27
 
27
- var _chunkC2EHMMMEjs = require('./chunk-C2EHMMME.js');
28
28
 
29
29
 
30
30
 
31
- var _chunkAYHLUHE5js = require('./chunk-AYHLUHE5.js');
31
+ var _chunk5PJ6XYRVjs = require('./chunk-5PJ6XYRV.js');
32
32
 
33
33
 
34
34
  var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
@@ -38,7 +38,8 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
38
38
 
39
39
 
40
40
 
41
- var _chunk5UNTNKNXjs = require('./chunk-5UNTNKNX.js');
41
+ var _chunkBVPN57ADjs = require('./chunk-BVPN57AD.js');
42
+
42
43
 
43
44
 
44
45
 
@@ -47,11 +48,16 @@ var _chunk5UNTNKNXjs = require('./chunk-5UNTNKNX.js');
47
48
 
48
49
 
49
50
 
50
- var _chunk4YXJTQ5Xjs = require('./chunk-4YXJTQ5X.js');
51
+ var _chunkUZQWPQ6Vjs = require('./chunk-UZQWPQ6V.js');
51
52
  require('./chunk-XNYIZMNQ.js');
52
- require('./chunk-SXXUOZRS.js');
53
53
  require('./chunk-7P5AA3SN.js');
54
+ require('./chunk-OVUDXZCK.js');
54
55
  require('./chunk-OG64RBAC.js');
56
+
57
+
58
+
59
+
60
+ var _chunkQILHWZFPjs = require('./chunk-QILHWZFP.js');
55
61
  require('./chunk-COGTRVWW.js');
56
62
 
57
63
  // src/cli/command-invocation.ts
@@ -115,48 +121,48 @@ var _os = require('os');
115
121
  var COMMAND_GROUPS = [
116
122
  {
117
123
  names: ["auth"],
118
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-AABYKR2S.js")))).registerAuthCommands
124
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-VP5WIGFS.js")))).registerAuthCommands
119
125
  },
120
126
  {
121
127
  names: ["providers"],
122
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./providers-RJYHQC4J.js")))).registerProviderCommands
128
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./providers-WAUWYRTK.js")))).registerProviderCommands
123
129
  },
124
130
  {
125
131
  names: ["search"],
126
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./search-2FJA6OH4.js")))).registerSearchCommand
132
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./search-RQLY5D2A.js")))).registerSearchCommand
127
133
  },
128
134
  {
129
135
  names: ["describe"],
130
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-5ZQ6KIJH.js")))).registerDescribeCommand
136
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-BKJNG2I5.js")))).registerDescribeCommand
131
137
  },
132
138
  {
133
139
  names: ["tools"],
134
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-ZOKG4AX4.js")))).registerToolsCommands
140
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-BY6D7M4I.js")))).registerToolsCommands
135
141
  },
136
142
  {
137
143
  names: ["executions"],
138
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./executions-KCZZY6SS.js")))).registerExecutionsCommands
144
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./executions-63CSEYKE.js")))).registerExecutionsCommands
139
145
  },
140
146
  {
141
147
  names: ["plays", "runs"],
142
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./play-ZO4HDGMC.js")))).registerPlayCommands
148
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./play-GDDOUU3I.js")))).registerPlayCommands
143
149
  },
144
150
  {
145
151
  names: ["sessions"],
146
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./sessions-QV4LUKEP.js")))).registerSessionsCommands
152
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./sessions-ELBTWKLS.js")))).registerSessionsCommands
147
153
  },
148
154
  {
149
155
  names: ["workflows"],
150
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-YWKK3A4X.js")))).registerWorkflowCommands
156
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-X66V6L3H.js")))).registerWorkflowCommands
151
157
  },
152
158
  {
153
159
  names: ["secrets"],
154
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./secrets-6LD4CA2X.js")))).registerSecretsCommands
160
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./secrets-BEAESK2H.js")))).registerSecretsCommands
155
161
  },
156
162
  {
157
163
  names: ["settings", "notifications"],
158
164
  load: async () => {
159
- const commands = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-JOYKXSY7.js")));
165
+ const commands = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-V5RI4UWE.js")));
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 Promise.resolve().then(() => _interopRequireWildcard(require("./billing-Y6IKDJ6H.js")))).registerBillingCommands
174
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./billing-UE2CP5O5.js")))).registerBillingCommands
169
175
  },
170
176
  {
171
177
  names: ["monitors"],
172
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./monitors-DVFEJHQT.js")))).registerMonitorsCommands
178
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./monitors-R32SKFE3.js")))).registerMonitorsCommands
173
179
  },
174
180
  {
175
181
  names: ["org"],
176
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./org-BGCB45VI.js")))).registerOrgCommands
182
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./org-RYRHB22V.js")))).registerOrgCommands
177
183
  },
178
184
  {
179
185
  names: ["git", "projects", "deployments"],
180
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./git-VESXOJ4M.js")))).registerGitCommands
186
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./git-4EBFGJAN.js")))).registerGitCommands
181
187
  },
182
188
  {
183
189
  names: ["csv"],
184
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./csv-SQIEBX66.js")))).registerCsvCommands
190
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./csv-VSVZWQ24.js")))).registerCsvCommands
185
191
  },
186
192
  {
187
193
  names: ["db"],
188
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./db-Z33ZRE3N.js")))).registerDbCommands
194
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./db-6QNWRH47.js")))).registerDbCommands
189
195
  },
190
196
  {
191
197
  names: ["feedback"],
192
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./feedback-BM7ZNH7Y.js")))).registerFeedbackCommands
198
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./feedback-T4FGM7DY.js")))).registerFeedbackCommands
193
199
  },
194
200
  {
195
201
  names: ["enrich", "session", "backend"],
196
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./legacy-noops-PV5AWTIZ.js")))).registerDeprecatedCommands
202
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./legacy-noops-W6UWORVY.js")))).registerDeprecatedCommands
197
203
  },
198
204
  {
199
205
  names: ["update"],
200
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./update-WUMDEAEE.js")))).registerUpdateCommand
206
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./update-PEGDRQ3G.js")))).registerUpdateCommand
201
207
  },
202
208
  {
203
209
  names: ["skills", "skills-auto-sync"],
204
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./skills-JL4J5CII.js")))).registerSkillsCommand
210
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./skills-OH3X3OUA.js")))).registerSkillsCommand
205
211
  },
206
212
  {
207
213
  names: ["setup", "doctor"],
208
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./setup-MIJZTYMH.js")))).registerSetupCommands
214
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./setup-CS3IACGU.js")))).registerSetupCommands
209
215
  },
210
216
  {
211
217
  names: ["quickstart"],
212
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./quickstart-E6OWYYMT.js")))).registerQuickstartCommands
218
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./quickstart-V5LHMW2X.js")))).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
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+ var _fs = require('fs');
249
+
250
+
251
+ var MAX_SESSIONS = 20;
252
+ function helpSeenPath(homeDir = _os.homedir.call(void 0, )) {
253
+ return _path.join.call(void 0, homeDir, ".local", "deepline", "sdk-cli", "help-seen.json");
254
+ }
255
+ function resolveHelpDetail(argv, key, homeDir = _os.homedir.call(void 0, ), sessionId = _chunkUZQWPQ6Vjs.agentSessionIdFromEnvironment.call(void 0, )) {
256
+ const explicit = _chunkQILHWZFPjs.helpDetailFromArgv.call(void 0, 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 (!_fs.existsSync.call(void 0, path)) return /* @__PURE__ */ new Map();
272
+ try {
273
+ const parsed = JSON.parse(_fs.readFileSync.call(void 0, 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
+ _fs.mkdirSync.call(void 0, _path.dirname.call(void 0, path), { recursive: true });
297
+ _fs.writeFileSync.call(void 0,
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
+ _fs.renameSync.call(void 0, 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
+ _fs.rmSync.call(void 0, tempPath, { force: true });
318
+ }
319
+ }
320
+
234
321
  // src/cli/self-update.ts
235
322
  var _child_process = require('child_process');
236
323
  var AUTO_UPDATE_TELEMETRY_TIMEOUT_MS = 2e3;
@@ -247,7 +334,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
247
334
  async function reportAutoUpdateEvent(input) {
248
335
  let apiKey = "";
249
336
  try {
250
- apiKey = _chunk4YXJTQ5Xjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
337
+ apiKey = _chunkUZQWPQ6Vjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
251
338
  } catch (e2) {
252
339
  return;
253
340
  }
@@ -263,15 +350,15 @@ async function reportAutoUpdateEvent(input) {
263
350
  headers: {
264
351
  Authorization: `Bearer ${apiKey}`,
265
352
  "Content-Type": "application/json",
266
- "User-Agent": `deepline-ts-sdk/${_chunk4YXJTQ5Xjs.SDK_VERSION}`,
353
+ "User-Agent": `deepline-ts-sdk/${_chunkUZQWPQ6Vjs.SDK_VERSION}`,
267
354
  "X-Deepline-Client-Family": "sdk",
268
355
  "X-Deepline-CLI-Family": "sdk",
269
- "X-Deepline-CLI-Version": _chunk4YXJTQ5Xjs.SDK_VERSION,
270
- "X-Deepline-SDK-Version": _chunk4YXJTQ5Xjs.SDK_VERSION
356
+ "X-Deepline-CLI-Version": _chunkUZQWPQ6Vjs.SDK_VERSION,
357
+ "X-Deepline-SDK-Version": _chunkUZQWPQ6Vjs.SDK_VERSION
271
358
  },
272
359
  body: JSON.stringify({
273
360
  event: input.event,
274
- current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunk4YXJTQ5Xjs.SDK_VERSION,
361
+ current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkUZQWPQ6Vjs.SDK_VERSION,
275
362
  target_version: input.response.latest,
276
363
  reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
277
364
  command: _nullishCoalesce(input.response.command, () => ( null)),
@@ -290,7 +377,7 @@ function envTruthy(name) {
290
377
  return value === "1" || value === "true" || value === "yes";
291
378
  }
292
379
  function shouldSkipSelfUpdate(policy) {
293
- return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunk6P235JSNjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkC2EHMMMEjs.isCiEnvironment.call(void 0, );
380
+ return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkWVO6AJM7js.shouldRunCliAutoUpdate.call(void 0, ) || _chunk5PJ6XYRVjs.isCiEnvironment.call(void 0, );
294
381
  }
295
382
  function parseSemver(version) {
296
383
  const trimmed = _optionalChain([version, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]);
@@ -320,7 +407,7 @@ function compareSemver(left, right) {
320
407
  }
321
408
  function isDowngradeAutoUpdateResponse(response) {
322
409
  const target = _optionalChain([response, 'optionalAccess', _19 => _19.latest, 'optionalAccess', _20 => _20.trim, 'call', _21 => _21()]);
323
- const current = _optionalChain([response, 'optionalAccess', _22 => _22.current, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunk4YXJTQ5Xjs.SDK_VERSION;
410
+ const current = _optionalChain([response, 'optionalAccess', _22 => _22.current, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunkUZQWPQ6Vjs.SDK_VERSION;
324
411
  if (!target) return false;
325
412
  return compareSemver(target, current) < 0;
326
413
  }
@@ -359,7 +446,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
359
446
  }
360
447
  if (isDowngradeAutoUpdateResponse(response)) {
361
448
  const target = response.latest;
362
- const current = _optionalChain([response, 'access', _27 => _27.current, 'optionalAccess', _28 => _28.trim, 'call', _29 => _29()]) || _chunk4YXJTQ5Xjs.SDK_VERSION;
449
+ const current = _optionalChain([response, 'access', _27 => _27.current, 'optionalAccess', _28 => _28.trim, 'call', _29 => _29()]) || _chunkUZQWPQ6Vjs.SDK_VERSION;
363
450
  process.stderr.write(
364
451
  `Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
365
452
  `
@@ -367,12 +454,12 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
367
454
  return false;
368
455
  }
369
456
  const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
370
- const plan = _chunk6P235JSNjs.resolveUpdatePlan.call(void 0, {
457
+ const plan = _chunkWVO6AJM7js.resolveUpdatePlan.call(void 0, {
371
458
  packageSpec,
372
459
  requireVerifiedNpmOwnership: true,
373
460
  npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
374
461
  });
375
- if (!_chunk6P235JSNjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
462
+ if (!_chunkWVO6AJM7js.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
376
463
  return false;
377
464
  }
378
465
  const label = autoUpdate.reason === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : autoUpdate.reason === "deprecated" ? "is deprecated and will update automatically" : autoUpdate.required ? "requires an update" : "has an update available and will update automatically";
@@ -386,7 +473,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
386
473
  event: "started",
387
474
  installKind: plan.kind
388
475
  });
389
- const updateResult = await _chunk6P235JSNjs.runAutomaticUpdatePlan.call(void 0, plan);
476
+ const updateResult = await _chunkWVO6AJM7js.runAutomaticUpdatePlan.call(void 0, plan);
390
477
  if (updateResult.status === "skipped_previous_failure") {
391
478
  void reportAutoUpdateEvent({
392
479
  baseUrl,
@@ -536,7 +623,7 @@ async function runPlayRunnerHealthCheck() {
536
623
  });
537
624
  let exitCode = 1;
538
625
  try {
539
- const { handlePlayRun } = await Promise.resolve().then(() => _interopRequireWildcard(require("./play-ZO4HDGMC.js")));
626
+ const { handlePlayRun } = await Promise.resolve().then(() => _interopRequireWildcard(require("./play-GDDOUU3I.js")));
540
627
  exitCode = await handlePlayRun([
541
628
  file,
542
629
  "--input",
@@ -576,7 +663,7 @@ function preflightErrorMessage(error) {
576
663
  return error instanceof Error ? error.message : String(error);
577
664
  }
578
665
  async function runPreflightCheck() {
579
- const baseUrl = _chunk4YXJTQ5Xjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
666
+ const baseUrl = _chunkUZQWPQ6Vjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
580
667
  const healthController = new AbortController();
581
668
  const healthTimeout = setTimeout(
582
669
  () => healthController.abort(),
@@ -591,9 +678,9 @@ async function runPreflightCheck() {
591
678
  version: pickString(payload, "version")
592
679
  };
593
680
  }).catch(() => ({ status: "unreachable", version: null })).finally(() => clearTimeout(healthTimeout));
594
- const apiKey = _chunk4YXJTQ5Xjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
595
- const http = apiKey ? new (0, _chunk4YXJTQ5Xjs.HttpClient)(
596
- _chunk4YXJTQ5Xjs.resolveConfig.call(void 0, {
681
+ const apiKey = _chunkUZQWPQ6Vjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
682
+ const http = apiKey ? new (0, _chunkUZQWPQ6Vjs.HttpClient)(
683
+ _chunkUZQWPQ6Vjs.resolveConfig.call(void 0, {
597
684
  baseUrl,
598
685
  apiKey,
599
686
  timeout: PREFLIGHT_TIMEOUT_MS,
@@ -638,7 +725,7 @@ async function runPreflightCheck() {
638
725
  const connected = authStatus === "connected" || authStatus === "claimed";
639
726
  return {
640
727
  status: healthResult.status === "ok" && connected ? "ok" : "check",
641
- cli_version: _chunk4YXJTQ5Xjs.SDK_VERSION,
728
+ cli_version: _chunkUZQWPQ6Vjs.SDK_VERSION,
642
729
  host: baseUrl,
643
730
  health: {
644
731
  status: healthResult.status,
@@ -664,7 +751,7 @@ async function runPreflightCheck() {
664
751
  {
665
752
  title: "preflight",
666
753
  lines: [
667
- `cli: ${_chunk4YXJTQ5Xjs.SDK_VERSION}`,
754
+ `cli: ${_chunkUZQWPQ6Vjs.SDK_VERSION}`,
668
755
  `host: ${baseUrl}`,
669
756
  `health: ${healthResult.status}`,
670
757
  `auth: ${authStatus}`,
@@ -689,12 +776,12 @@ function printPreflightHuman(data) {
689
776
  }
690
777
  async function newerCliCommandHint(baseUrl, command) {
691
778
  if (!command.trim()) return null;
692
- const { response, error } = await _chunkC2EHMMMEjs.checkSdkCompatibility.call(void 0, baseUrl, { command });
779
+ const { response, error } = await _chunk5PJ6XYRVjs.checkSdkCompatibility.call(void 0, baseUrl, { command });
693
780
  if (error || !response) return null;
694
781
  const introduced = response.command_introduced_in;
695
782
  if (introduced) {
696
783
  return [
697
- `\`deepline ${introduced.command}\` was added in SDK CLI ${introduced.introduced_in}. This CLI is ${_chunk4YXJTQ5Xjs.SDK_VERSION}.`,
784
+ `\`deepline ${introduced.command}\` was added in SDK CLI ${introduced.introduced_in}. This CLI is ${_chunkUZQWPQ6Vjs.SDK_VERSION}.`,
698
785
  ` ${introduced.reason}`,
699
786
  ` Update with: ${response.update_command}`,
700
787
  " Agent skills are served by Deepline and refresh on their own, so a skill can describe a command this CLI does not have yet."
@@ -703,12 +790,13 @@ async function newerCliCommandHint(baseUrl, command) {
703
790
  if (!response.update_required) return null;
704
791
  return [
705
792
  response.message,
706
- ` Installed: ${_chunk4YXJTQ5Xjs.SDK_VERSION}. Run: ${response.update_command}`,
793
+ ` Installed: ${_chunkUZQWPQ6Vjs.SDK_VERSION}. Run: ${response.update_command}`,
707
794
  " If an agent skill told you to run this, the skill is newer than this CLI."
708
795
  ].join("\n");
709
796
  }
710
797
  async function runMain(ensureTransport) {
711
798
  const mainStartedAt = Date.now();
799
+ let rootHelpStatus = "";
712
800
  _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
713
801
  phase: "cli.main_start",
714
802
  argv: process.argv.slice(2)
@@ -721,7 +809,7 @@ async function runMain(ensureTransport) {
721
809
  const program = new (0, _commander.Command)();
722
810
  program.name("deepline").description(
723
811
  "Deepline CLI \u2014 GTM enrichment tools, plays, and runs from your terminal."
724
- ).version(_chunk4YXJTQ5Xjs.SDK_VERSION, "-v, --version", "Show version").option(
812
+ ).version(_chunkUZQWPQ6Vjs.SDK_VERSION, "-v, --version", "Show version").option(
725
813
  "--maintenance <policy>",
726
814
  "Installation maintenance: configured preferences or off; independent of output format",
727
815
  parseCliMaintenancePolicy,
@@ -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 = _chunkQILHWZFPjs.commandDocKey.call(void 0, command);
858
+ const { detail, firstRead } = resolveHelpDetail(process.argv, key);
859
+ return _chunkQILHWZFPjs.renderCommandExplanation.call(void 0, key, detail, { firstRead });
860
+ });
769
861
  program.hook("preAction", async (_thisCommand, actionCommand) => {
770
862
  const maintenance = resolveCliMaintenancePolicy(
771
863
  actionCommand.optsWithGlobals()
@@ -773,7 +865,7 @@ Exit codes:
773
865
  if (actionCommand.name() !== "version") {
774
866
  await ensureTransport();
775
867
  }
776
- if (actionCommand.name() === "version" || actionCommand.name() === "update" || actionCommand.name() === "setup" || actionCommand.name() === "skills" || actionCommand.name() === _chunkC2EHMMMEjs.SKILLS_AUTO_SYNC_COMMAND || actionCommand.name() === "doctor" || isAutoUpdateSettingsInvocation() || isDeprecatedCommandInvocation()) {
868
+ if (actionCommand.name() === "version" || actionCommand.name() === "update" || actionCommand.name() === "setup" || actionCommand.name() === "skills" || actionCommand.name() === _chunk5PJ6XYRVjs.SKILLS_AUTO_SYNC_COMMAND || actionCommand.name() === "doctor" || isAutoUpdateSettingsInvocation() || isDeprecatedCommandInvocation()) {
777
869
  return;
778
870
  }
779
871
  const compatibilityCommand = compatibilityCommandPath(actionCommand) || actionCommand.name();
@@ -786,16 +878,16 @@ Exit codes:
786
878
  _optionalChain([progress, 'optionalAccess', _37 => _37.phase, 'call', _38 => _38("checking sdk compatibility")]);
787
879
  }
788
880
  const startup = await runStartupStage("SDK compatibility", async () => {
789
- const baseUrl = _chunk4YXJTQ5Xjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
790
- if (maintenance !== "off") _chunkC2EHMMMEjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
881
+ const baseUrl = _chunkUZQWPQ6Vjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
882
+ if (maintenance !== "off") _chunk5PJ6XYRVjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
791
883
  const shouldDeferSkillsSync = maintenance === "off" || shouldDeferSkillsSyncForCommand();
792
- const skillsVersion = shouldDeferSkillsSync ? void 0 : _chunk4YXJTQ5Xjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
793
- const trusted = _chunkC2EHMMMEjs.readTrustedCleanCompatibility.call(void 0,
884
+ const skillsVersion = shouldDeferSkillsSync ? void 0 : _chunkUZQWPQ6Vjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
885
+ const trusted = _chunk5PJ6XYRVjs.readTrustedCleanCompatibility.call(void 0,
794
886
  baseUrl,
795
887
  compatibilityCommand,
796
888
  skillsVersion
797
889
  );
798
- const fastDeadline = trusted === null && _chunkC2EHMMMEjs.readFreshCleanCompatibility.call(void 0,
890
+ const fastDeadline = trusted === null && _chunk5PJ6XYRVjs.readFreshCleanCompatibility.call(void 0,
799
891
  baseUrl,
800
892
  compatibilityCommand,
801
893
  skillsVersion
@@ -819,12 +911,12 @@ Exit codes:
819
911
  skillsVersion: _nullishCoalesce(skillsVersion, () => ( null)),
820
912
  fastDeadline
821
913
  },
822
- () => _chunkC2EHMMMEjs.checkSdkCompatibility.call(void 0, baseUrl, {
914
+ () => _chunk5PJ6XYRVjs.checkSdkCompatibility.call(void 0, baseUrl, {
823
915
  command: compatibilityCommand,
824
916
  skillsVersion,
825
917
  persistCache: maintenance !== "off",
826
918
  catalog: _chunkQJBJZVG6js.compatibilityCatalog.call(void 0, actionCommand),
827
- ...fastDeadline ? { timeoutMs: _chunkC2EHMMMEjs.SDK_COMPATIBILITY_FAST_DEADLINE_MS } : {}
919
+ ...fastDeadline ? { timeoutMs: _chunk5PJ6XYRVjs.SDK_COMPATIBILITY_FAST_DEADLINE_MS } : {}
828
920
  })
829
921
  );
830
922
  if (compatibility.error) {
@@ -848,7 +940,7 @@ Exit codes:
848
940
  response: compatibility.response
849
941
  };
850
942
  }
851
- _chunkC2EHMMMEjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
943
+ _chunk5PJ6XYRVjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
852
944
  quietAdvisory: process.argv.includes("--json")
853
945
  });
854
946
  return {
@@ -869,7 +961,7 @@ Exit codes:
869
961
  () => _chunkAYHLUHE5js.traceCliSpan.call(void 0,
870
962
  "cli.sdk_skills_sync",
871
963
  { baseUrl: startup.baseUrl },
872
- () => _chunkC2EHMMMEjs.syncSdkSkillsIfNeeded.call(void 0, startup.baseUrl, {
964
+ () => _chunk5PJ6XYRVjs.syncSdkSkillsIfNeeded.call(void 0, startup.baseUrl, {
873
965
  update: skillsUpdate,
874
966
  mode: "detached"
875
967
  })
@@ -897,8 +989,8 @@ Examples:
897
989
  `
898
990
  ).action(async (options) => {
899
991
  const data = await runPreflightCheck();
900
- if (_chunk5UNTNKNXjs.shouldEmitJson.call(void 0, options.json)) {
901
- _chunk5UNTNKNXjs.printJson.call(void 0, data);
992
+ if (_chunkBVPN57ADjs.shouldEmitJson.call(void 0, options.json)) {
993
+ _chunkBVPN57ADjs.printJson.call(void 0, data);
902
994
  } else {
903
995
  printPreflightHuman(data);
904
996
  }
@@ -920,13 +1012,13 @@ Examples:
920
1012
  try {
921
1013
  if (options.playRunner) {
922
1014
  const data2 = await runPlayRunnerHealthCheck();
923
- _chunk5UNTNKNXjs.printJson.call(void 0, data2);
1015
+ _chunkBVPN57ADjs.printJson.call(void 0, data2);
924
1016
  return;
925
1017
  }
926
- const { DeeplineClient } = await Promise.resolve().then(() => _interopRequireWildcard(require("./client-3DYV3HZ4.js")));
1018
+ const { DeeplineClient } = await Promise.resolve().then(() => _interopRequireWildcard(require("./client-I4RRFLPM.js")));
927
1019
  const client = new DeeplineClient();
928
1020
  const data = await client.health();
929
- _chunk5UNTNKNXjs.printJson.call(void 0, data);
1021
+ _chunkBVPN57ADjs.printJson.call(void 0, data);
930
1022
  } catch (error) {
931
1023
  throw new Error(
932
1024
  `Cannot reach Deepline API: ${error instanceof Error ? error.message : String(error)}`
@@ -947,15 +1039,15 @@ Examples:
947
1039
  `
948
1040
  ).action((options) => {
949
1041
  if (options.json) {
950
- _chunk5UNTNKNXjs.printCompactJson.call(void 0, { version: _chunk4YXJTQ5Xjs.SDK_VERSION });
1042
+ _chunkBVPN57ADjs.printCompactJson.call(void 0, { version: _chunkUZQWPQ6Vjs.SDK_VERSION });
951
1043
  return;
952
1044
  }
953
- process.stdout.write(`deepline ${_chunk4YXJTQ5Xjs.SDK_VERSION}
1045
+ process.stdout.write(`deepline ${_chunkUZQWPQ6Vjs.SDK_VERSION}
954
1046
  `);
955
1047
  });
956
1048
  if (process.argv.slice(2).length === 0) {
957
1049
  if (!process.stdout.isTTY) {
958
- _chunk5UNTNKNXjs.printJson.call(void 0, {
1050
+ _chunkBVPN57ADjs.printJson.call(void 0, {
959
1051
  ok: false,
960
1052
  exitCode: 2,
961
1053
  code: "MISSING_COMMAND",
@@ -979,7 +1071,7 @@ Examples:
979
1071
  const requestedTopLevelCommand = _nullishCoalesce(process.argv.slice(2)[0], () => ( ""));
980
1072
  if (!topLevelCommandKnown(program, requestedTopLevelCommand)) {
981
1073
  console.error(`error: unknown command '${requestedTopLevelCommand}'`);
982
- const baseUrl = _chunk4YXJTQ5Xjs.autoDetectBaseUrl.call(void 0, );
1074
+ const baseUrl = _chunkUZQWPQ6Vjs.autoDetectBaseUrl.call(void 0, );
983
1075
  await ensureTransport();
984
1076
  const versionHint = await newerCliCommandHint(
985
1077
  baseUrl,
@@ -994,13 +1086,21 @@ 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 Promise.resolve().then(() => _interopRequireWildcard(require("./auth-VP5WIGFS.js")));
1093
+ rootHelpStatus = `Version: ${_chunkUZQWPQ6Vjs.SDK_VERSION}
1094
+ ${await authStatusLine()}
1095
+ `;
1096
+ }
997
1097
  await program.parseAsync(process.argv);
998
1098
  _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
999
1099
  phase: "cli.main_total",
1000
1100
  ms: Date.now() - mainStartedAt,
1001
1101
  ok: true
1002
1102
  });
1003
- await _chunkC2EHMMMEjs.maybeReportSdkCliFailure.call(void 0, {
1103
+ await _chunk5PJ6XYRVjs.maybeReportSdkCliFailure.call(void 0, {
1004
1104
  argv: process.argv.slice(2),
1005
1105
  startedAtMs: mainStartedAt,
1006
1106
  exitCode: typeof process.exitCode === "number" ? process.exitCode : null
@@ -1025,7 +1125,7 @@ Examples:
1025
1125
  const commandPath = invocation.commandPath || requestedTopLevelCommand;
1026
1126
  await ensureTransport();
1027
1127
  const versionHint = await newerCliCommandHint(
1028
- _chunk4YXJTQ5Xjs.autoDetectBaseUrl.call(void 0, ),
1128
+ _chunkUZQWPQ6Vjs.autoDetectBaseUrl.call(void 0, ),
1029
1129
  commandPath
1030
1130
  );
1031
1131
  if (versionHint) console.error(versionHint);
@@ -1036,24 +1136,24 @@ Examples:
1036
1136
  process.exitCode = commanderError.code === "commander.unknownCommand" && !wantsJson ? 2 : _nullishCoalesce(commanderError.exitCode, () => ( 1));
1037
1137
  return;
1038
1138
  } else if (wantsJson) {
1039
- _chunk5UNTNKNXjs.printJson.call(void 0, {
1040
- ..._chunk5UNTNKNXjs.errorToJsonPayload.call(void 0, error),
1041
- ...error instanceof _chunk4YXJTQ5Xjs.AuthError ? { next: AUTH_RECOVERY_COMMAND } : {}
1139
+ _chunkBVPN57ADjs.printJson.call(void 0, {
1140
+ ..._chunkBVPN57ADjs.errorToJsonPayload.call(void 0, error),
1141
+ ...error instanceof _chunkUZQWPQ6Vjs.AuthError ? { next: AUTH_RECOVERY_COMMAND } : {}
1042
1142
  });
1043
1143
  } else if (error instanceof Error) {
1044
1144
  console.error(`Error: ${error.message}`);
1045
- if (error instanceof _chunk4YXJTQ5Xjs.AuthError) {
1145
+ if (error instanceof _chunkUZQWPQ6Vjs.AuthError) {
1046
1146
  console.error(`Not authenticated. Run: ${AUTH_RECOVERY_COMMAND}`);
1047
1147
  }
1048
- const providerConcurrency = _chunk5UNTNKNXjs.formatProviderConcurrencyDiagnostic.call(void 0, error);
1148
+ const providerConcurrency = _chunkBVPN57ADjs.formatProviderConcurrencyDiagnostic.call(void 0, error);
1049
1149
  if (providerConcurrency) console.error(providerConcurrency);
1050
1150
  } else {
1051
1151
  console.error(`Error: ${String(error)}`);
1052
1152
  }
1053
1153
  const explicitExitCode = error && typeof error === "object" && typeof error.exitCode === "number" ? error.exitCode : void 0;
1054
- const failureExitCode = _nullishCoalesce(explicitExitCode, () => ( _chunkC2EHMMMEjs.resolveSdkCliFailureExitCode.call(void 0, error)));
1154
+ const failureExitCode = _nullishCoalesce(explicitExitCode, () => ( _chunk5PJ6XYRVjs.resolveSdkCliFailureExitCode.call(void 0, error)));
1055
1155
  process.exitCode = failureExitCode;
1056
- await _chunkC2EHMMMEjs.maybeReportSdkCliFailure.call(void 0, {
1156
+ await _chunk5PJ6XYRVjs.maybeReportSdkCliFailure.call(void 0, {
1057
1157
  argv: process.argv.slice(2),
1058
1158
  startedAtMs: mainStartedAt,
1059
1159
  exitCode: failureExitCode,