deepline 0.3.357 → 0.3.359
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.
- package/dist/bundling-sources/sdk/src/release.ts +7 -1
- package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +14 -1
- package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +52 -19
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +35 -18
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +202 -44
- package/dist/cli/auth-CN5UHM3M.js +33 -0
- package/dist/cli/{auth-5Y2YV5LY.mjs → auth-ZOW4L37H.mjs} +6 -4
- package/dist/cli/{billing-UOFR7KDB.mjs → billing-JPMZX77W.mjs} +5 -5
- package/dist/cli/{billing-Y6IKDJ6H.js → billing-YZJ5Q4ZC.js} +74 -74
- package/dist/cli/{chunk-LJTZVC2T.mjs → chunk-36TKIMVG.mjs} +2 -2
- package/dist/cli/{chunk-SXXUOZRS.js → chunk-3EF4OMSE.js} +6 -1
- package/dist/cli/{chunk-2NZUC5OS.mjs → chunk-4DCOBHTZ.mjs} +4 -4
- package/dist/cli/{chunk-4YXJTQ5X.js → chunk-5ZKZWXVN.js} +5 -5
- package/dist/cli/{chunk-NZ6BT4NL.mjs → chunk-72362UER.mjs} +7 -7
- package/dist/cli/{chunk-5UNTNKNX.js → chunk-ARNODHMC.js} +6 -6
- package/dist/cli/{chunk-N47R7S3E.mjs → chunk-BJYW3XTM.mjs} +6 -1
- package/dist/cli/{chunk-SMLKQAEB.mjs → chunk-DZ34Z4DO.mjs} +3 -3
- package/dist/cli/{chunk-SCY4UCEZ.js → chunk-EMMXSY6F.js} +75 -50
- package/dist/cli/{chunk-VG5WMYSF.mjs → chunk-FCZIE4UQ.mjs} +3 -3
- package/dist/cli/{chunk-EWTVIN3O.js → chunk-I7XYIKAK.js} +47 -47
- package/dist/cli/{chunk-VXH4225Y.mjs → chunk-JHX6XSLT.mjs} +27 -2
- package/dist/cli/{chunk-ZYPSNUDU.js → chunk-LDGO56ZU.js} +231 -231
- package/dist/cli/{chunk-WQSV34KV.js → chunk-LXKJTNB3.js} +11 -11
- package/dist/cli/{chunk-O7IM72KW.mjs → chunk-M2DOAC65.mjs} +15 -15
- package/dist/cli/{chunk-R5P3KFF5.js → chunk-P4CCF5ZV.js} +8 -8
- package/dist/cli/{chunk-CPQIVH6G.js → chunk-QDLSDKEK.js} +8 -8
- package/dist/cli/chunk-QFBHEQCQ.mjs +1421 -0
- package/dist/cli/chunk-QILHWZFP.js +1421 -0
- package/dist/cli/{chunk-C2EHMMME.js → chunk-SVAI3Z3Q.js} +64 -60
- package/dist/cli/{chunk-2AROJ4EZ.mjs → chunk-U2G2WO43.mjs} +2 -2
- package/dist/cli/{chunk-6P235JSN.js → chunk-UC6KM43R.js} +15 -15
- package/dist/cli/{chunk-XYD76KJB.mjs → chunk-UKXON54N.mjs} +8 -8
- package/dist/cli/{chunk-NEMHJYA4.js → chunk-VGXKDHTJ.js} +2 -2
- package/dist/cli/{chunk-J4A4MRBK.js → chunk-WLDT7GTI.js} +26 -26
- package/dist/cli/{chunk-IWBFG4XI.mjs → chunk-WNBXT425.mjs} +1 -1
- package/dist/cli/{chunk-PJYCAGKK.mjs → chunk-WR7H6MZ6.mjs} +1 -1
- package/dist/cli/{chunk-QYCAH7SM.mjs → chunk-ZY6QZZ5K.mjs} +6 -2
- package/dist/cli/{client-23QTYYIR.mjs → client-32IMOGBO.mjs} +4 -4
- package/dist/cli/client-TNHDPNDK.js +20 -0
- package/dist/cli/command-docs.d.mts +50 -0
- package/dist/cli/command-docs.d.ts +50 -0
- package/dist/cli/command-docs.js +13 -0
- package/dist/cli/command-docs.mjs +13 -0
- package/dist/cli/{csv-VKEF5C65.mjs → csv-4QWZUAJP.mjs} +3 -3
- package/dist/cli/{csv-SQIEBX66.js → csv-BCPDP5UL.js} +12 -12
- package/dist/cli/{db-Z33ZRE3N.js → db-OF2SH2BI.js} +30 -30
- package/dist/cli/{db-KX7FDHL4.mjs → db-T4CMZPJQ.mjs} +5 -5
- package/dist/cli/{describe-K2SJ22B3.mjs → describe-5WQ55FIR.mjs} +16 -16
- package/dist/cli/{describe-5ZQ6KIJH.js → describe-LIHZ4U6X.js} +21 -21
- package/dist/cli/{executions-KCZZY6SS.js → executions-JSXFOVBH.js} +7 -7
- package/dist/cli/{executions-452G2REF.mjs → executions-R7WAC2JA.mjs} +5 -5
- package/dist/cli/{feedback-55HU4EQY.mjs → feedback-2V5PBCPX.mjs} +3 -3
- package/dist/cli/{feedback-BM7ZNH7Y.js → feedback-Y42C4WP2.js} +7 -7
- package/dist/cli/git-D5SJIU36.js +23 -0
- package/dist/cli/{git-CAPESVAJ.mjs → git-Y6VXODAK.mjs} +4 -4
- package/dist/cli/index.js +183 -83
- package/dist/cli/index.mjs +145 -45
- package/dist/cli/{legacy-noops-PV5AWTIZ.js → legacy-noops-KDRTNUUC.js} +7 -7
- package/dist/cli/{legacy-noops-3B3MG33Y.mjs → legacy-noops-YEEZNYIS.mjs} +4 -4
- package/dist/cli/{monitors-43R6CUFK.mjs → monitors-7GHIY5BR.mjs} +5 -5
- package/dist/cli/{monitors-DVFEJHQT.js → monitors-RVXH73TC.js} +86 -86
- package/dist/cli/{org-BGCB45VI.js → org-OMUUGH6W.js} +61 -61
- package/dist/cli/{org-X5WSLJRD.mjs → org-ZGU7BBDD.mjs} +5 -5
- package/dist/cli/{play-OFO6XZ5L.mjs → play-PB6LSSNG.mjs} +11 -11
- package/dist/cli/play-XKIDMLH7.js +153 -0
- package/dist/cli/{providers-L2MPYA3E.mjs → providers-GFR4DPBC.mjs} +5 -5
- package/dist/cli/{providers-RJYHQC4J.js → providers-J3OTP5VK.js} +8 -8
- package/dist/cli/{quickstart-E6OWYYMT.js → quickstart-ALUTGFAA.js} +7 -7
- package/dist/cli/{quickstart-NHFMGZ3B.mjs → quickstart-MXH3LZQ5.mjs} +5 -5
- package/dist/cli/{search-IPTZAOUE.mjs → search-OVRR4XOJ.mjs} +6 -6
- package/dist/cli/search-X3IZW2TP.js +26 -0
- package/dist/cli/{secrets-6LD4CA2X.js → secrets-KT4OFUKB.js} +14 -14
- package/dist/cli/{secrets-TCOPPNXR.mjs → secrets-VXXVGDET.mjs} +5 -5
- package/dist/cli/{sessions-QV4LUKEP.js → sessions-GXDEX5EM.js} +5 -5
- package/dist/cli/{sessions-D4JETMAW.mjs → sessions-JP4XKXEJ.mjs} +4 -4
- package/dist/cli/{settings-JOYKXSY7.js → settings-BJT3RAJD.js} +75 -75
- package/dist/cli/{settings-IVJPCORG.mjs → settings-MMC5Q5FJ.mjs} +8 -8
- package/dist/cli/{setup-WCKQK7FE.mjs → setup-6LWUQ34C.mjs} +8 -8
- package/dist/cli/{setup-MIJZTYMH.js → setup-RP4VN7WE.js} +43 -43
- package/dist/cli/skills-3S5UET5W.js +28 -0
- package/dist/cli/{skills-GYWMUDDF.mjs → skills-VRVG63GO.mjs} +4 -4
- package/dist/cli/{tools-ILYNEPGQ.mjs → tools-M4VNLWYB.mjs} +8 -8
- package/dist/cli/tools-MTRW5VF6.js +40 -0
- package/dist/cli/update-5PPNAWY7.js +28 -0
- package/dist/cli/{update-P3VIHMC6.mjs → update-HXQVI37L.mjs} +6 -6
- package/dist/cli/{workflow-YWKK3A4X.js → workflow-JTA3DWCM.js} +19 -19
- package/dist/cli/{workflow-A6ID4C6N.mjs → workflow-PE2IONVL.mjs} +9 -9
- package/dist/index.js +13 -13
- package/dist/index.mjs +12 -12
- package/dist/install-integrity.json +80 -74
- package/dist/release.d.mts +5 -1
- package/dist/release.d.ts +5 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +6 -1
- package/dist/cli/auth-AABYKR2S.js +0 -31
- package/dist/cli/client-3DYV3HZ4.js +0 -20
- package/dist/cli/git-VESXOJ4M.js +0 -23
- package/dist/cli/play-ZO4HDGMC.js +0 -153
- package/dist/cli/search-2FJA6OH4.js +0 -26
- package/dist/cli/skills-JL4J5CII.js +0 -28
- package/dist/cli/tools-ZOKG4AX4.js +0 -40
- package/dist/cli/update-WUMDEAEE.js +0 -28
package/dist/cli/index.mjs
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
canAutomaticallyApplyUpdatePlan,
|
|
4
|
+
resolveUpdatePlan,
|
|
5
|
+
runAutomaticUpdatePlan,
|
|
6
|
+
shouldRunCliAutoUpdate
|
|
7
|
+
} from "./chunk-4DCOBHTZ.mjs";
|
|
8
|
+
import "./chunk-WNBXT425.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-2NZUC5OS.mjs";
|
|
14
|
-
import "./chunk-IWBFG4XI.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-
|
|
28
|
-
import {
|
|
29
|
-
recordCliTrace,
|
|
30
|
-
traceCliSpan
|
|
31
|
-
} from "./chunk-UFS752TU.mjs";
|
|
31
|
+
} from "./chunk-ZY6QZZ5K.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-
|
|
41
|
+
} from "./chunk-WR7H6MZ6.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-
|
|
51
|
+
} from "./chunk-FCZIE4UQ.mjs";
|
|
51
52
|
import "./chunk-DLIRSHV6.mjs";
|
|
52
|
-
import "./chunk-N47R7S3E.mjs";
|
|
53
53
|
import "./chunk-NXGCO4JB.mjs";
|
|
54
|
+
import "./chunk-BJYW3XTM.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-
|
|
124
|
+
load: async () => (await import("./auth-ZOW4L37H.mjs")).registerAuthCommands
|
|
119
125
|
},
|
|
120
126
|
{
|
|
121
127
|
names: ["providers"],
|
|
122
|
-
load: async () => (await import("./providers-
|
|
128
|
+
load: async () => (await import("./providers-GFR4DPBC.mjs")).registerProviderCommands
|
|
123
129
|
},
|
|
124
130
|
{
|
|
125
131
|
names: ["search"],
|
|
126
|
-
load: async () => (await import("./search-
|
|
132
|
+
load: async () => (await import("./search-OVRR4XOJ.mjs")).registerSearchCommand
|
|
127
133
|
},
|
|
128
134
|
{
|
|
129
135
|
names: ["describe"],
|
|
130
|
-
load: async () => (await import("./describe-
|
|
136
|
+
load: async () => (await import("./describe-5WQ55FIR.mjs")).registerDescribeCommand
|
|
131
137
|
},
|
|
132
138
|
{
|
|
133
139
|
names: ["tools"],
|
|
134
|
-
load: async () => (await import("./tools-
|
|
140
|
+
load: async () => (await import("./tools-M4VNLWYB.mjs")).registerToolsCommands
|
|
135
141
|
},
|
|
136
142
|
{
|
|
137
143
|
names: ["executions"],
|
|
138
|
-
load: async () => (await import("./executions-
|
|
144
|
+
load: async () => (await import("./executions-R7WAC2JA.mjs")).registerExecutionsCommands
|
|
139
145
|
},
|
|
140
146
|
{
|
|
141
147
|
names: ["plays", "runs"],
|
|
142
|
-
load: async () => (await import("./play-
|
|
148
|
+
load: async () => (await import("./play-PB6LSSNG.mjs")).registerPlayCommands
|
|
143
149
|
},
|
|
144
150
|
{
|
|
145
151
|
names: ["sessions"],
|
|
146
|
-
load: async () => (await import("./sessions-
|
|
152
|
+
load: async () => (await import("./sessions-JP4XKXEJ.mjs")).registerSessionsCommands
|
|
147
153
|
},
|
|
148
154
|
{
|
|
149
155
|
names: ["workflows"],
|
|
150
|
-
load: async () => (await import("./workflow-
|
|
156
|
+
load: async () => (await import("./workflow-PE2IONVL.mjs")).registerWorkflowCommands
|
|
151
157
|
},
|
|
152
158
|
{
|
|
153
159
|
names: ["secrets"],
|
|
154
|
-
load: async () => (await import("./secrets-
|
|
160
|
+
load: async () => (await import("./secrets-VXXVGDET.mjs")).registerSecretsCommands
|
|
155
161
|
},
|
|
156
162
|
{
|
|
157
163
|
names: ["settings", "notifications"],
|
|
158
164
|
load: async () => {
|
|
159
|
-
const commands = await import("./settings-
|
|
165
|
+
const commands = await import("./settings-MMC5Q5FJ.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-
|
|
174
|
+
load: async () => (await import("./billing-JPMZX77W.mjs")).registerBillingCommands
|
|
169
175
|
},
|
|
170
176
|
{
|
|
171
177
|
names: ["monitors"],
|
|
172
|
-
load: async () => (await import("./monitors-
|
|
178
|
+
load: async () => (await import("./monitors-7GHIY5BR.mjs")).registerMonitorsCommands
|
|
173
179
|
},
|
|
174
180
|
{
|
|
175
181
|
names: ["org"],
|
|
176
|
-
load: async () => (await import("./org-
|
|
182
|
+
load: async () => (await import("./org-ZGU7BBDD.mjs")).registerOrgCommands
|
|
177
183
|
},
|
|
178
184
|
{
|
|
179
185
|
names: ["git", "projects", "deployments"],
|
|
180
|
-
load: async () => (await import("./git-
|
|
186
|
+
load: async () => (await import("./git-Y6VXODAK.mjs")).registerGitCommands
|
|
181
187
|
},
|
|
182
188
|
{
|
|
183
189
|
names: ["csv"],
|
|
184
|
-
load: async () => (await import("./csv-
|
|
190
|
+
load: async () => (await import("./csv-4QWZUAJP.mjs")).registerCsvCommands
|
|
185
191
|
},
|
|
186
192
|
{
|
|
187
193
|
names: ["db"],
|
|
188
|
-
load: async () => (await import("./db-
|
|
194
|
+
load: async () => (await import("./db-T4CMZPJQ.mjs")).registerDbCommands
|
|
189
195
|
},
|
|
190
196
|
{
|
|
191
197
|
names: ["feedback"],
|
|
192
|
-
load: async () => (await import("./feedback-
|
|
198
|
+
load: async () => (await import("./feedback-2V5PBCPX.mjs")).registerFeedbackCommands
|
|
193
199
|
},
|
|
194
200
|
{
|
|
195
201
|
names: ["enrich", "session", "backend"],
|
|
196
|
-
load: async () => (await import("./legacy-noops-
|
|
202
|
+
load: async () => (await import("./legacy-noops-YEEZNYIS.mjs")).registerDeprecatedCommands
|
|
197
203
|
},
|
|
198
204
|
{
|
|
199
205
|
names: ["update"],
|
|
200
|
-
load: async () => (await import("./update-
|
|
206
|
+
load: async () => (await import("./update-HXQVI37L.mjs")).registerUpdateCommand
|
|
201
207
|
},
|
|
202
208
|
{
|
|
203
209
|
names: ["skills", "skills-auto-sync"],
|
|
204
|
-
load: async () => (await import("./skills-
|
|
210
|
+
load: async () => (await import("./skills-VRVG63GO.mjs")).registerSkillsCommand
|
|
205
211
|
},
|
|
206
212
|
{
|
|
207
213
|
names: ["setup", "doctor"],
|
|
208
|
-
load: async () => (await import("./setup-
|
|
214
|
+
load: async () => (await import("./setup-6LWUQ34C.mjs")).registerSetupCommands
|
|
209
215
|
},
|
|
210
216
|
{
|
|
211
217
|
names: ["quickstart"],
|
|
212
|
-
load: async () => (await import("./quickstart-
|
|
218
|
+
load: async () => (await import("./quickstart-MXH3LZQ5.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(
|
|
511
|
-
const file =
|
|
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-
|
|
626
|
+
const { handlePlayRun } = await import("./play-PB6LSSNG.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-
|
|
1018
|
+
const { DeeplineClient } = await import("./client-32IMOGBO.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-ZOW4L37H.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
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkP4CCF5ZVjs = require('./chunk-P4CCF5ZV.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk3XX5TEA4js = require('./chunk-3XX5TEA4.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
require('./chunk-
|
|
9
|
+
var _chunkARNODHMCjs = require('./chunk-ARNODHMC.js');
|
|
10
|
+
require('./chunk-5ZKZWXVN.js');
|
|
11
11
|
require('./chunk-XNYIZMNQ.js');
|
|
12
|
-
require('./chunk-SXXUOZRS.js');
|
|
13
12
|
require('./chunk-7P5AA3SN.js');
|
|
13
|
+
require('./chunk-3EF4OMSE.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
|
-
|
|
54
|
+
_chunkARNODHMCjs.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
|
-
|
|
74
|
+
_chunkARNODHMCjs.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
|
-
|
|
117
|
+
_chunkP4CCF5ZVjs.registerSessionSendRenderCommands.call(void 0, session, "session");
|
|
118
118
|
for (const subcommand of SESSION_SUBCOMMANDS) {
|
|
119
119
|
addDeprecatedSubcommand(
|
|
120
120
|
session,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerSessionSendRenderCommands
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-U2G2WO43.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-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-WR7H6MZ6.mjs";
|
|
10
|
+
import "./chunk-FCZIE4UQ.mjs";
|
|
11
11
|
import "./chunk-DLIRSHV6.mjs";
|
|
12
|
-
import "./chunk-N47R7S3E.mjs";
|
|
13
12
|
import "./chunk-NXGCO4JB.mjs";
|
|
13
|
+
import "./chunk-BJYW3XTM.mjs";
|
|
14
14
|
import "./chunk-WZYKRD7T.mjs";
|
|
15
15
|
import "./chunk-KRD6H754.mjs";
|
|
16
16
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import "./chunk-EXMLR72R.mjs";
|
|
2
2
|
import {
|
|
3
3
|
DeeplineClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-72362UER.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-
|
|
20
|
+
} from "./chunk-WR7H6MZ6.mjs";
|
|
20
21
|
import {
|
|
21
22
|
AuthError
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FCZIE4UQ.mjs";
|
|
23
24
|
import "./chunk-DLIRSHV6.mjs";
|
|
24
|
-
import "./chunk-N47R7S3E.mjs";
|
|
25
|
-
import "./chunk-6IKARAYD.mjs";
|
|
26
25
|
import {
|
|
27
26
|
DeeplineError
|
|
28
27
|
} from "./chunk-NXGCO4JB.mjs";
|
|
28
|
+
import "./chunk-BJYW3XTM.mjs";
|
|
29
29
|
import "./chunk-WZYKRD7T.mjs";
|
|
30
30
|
import "./chunk-KRD6H754.mjs";
|
|
31
31
|
|