deepline 0.3.384 → 0.3.385
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/cli/{auth-54CAXSHD.mjs → auth-4D4IBZZN.mjs} +4 -4
- package/dist/cli/auth-A4UKONKC.js +39 -0
- package/dist/cli/{billing-PXGESNMZ.mjs → billing-4RSI4634.mjs} +4 -4
- package/dist/cli/{billing-2XWGPZ5O.js → billing-6LXNCN5G.js} +73 -73
- package/dist/cli/{chunk-O4XVGZDX.js → chunk-2IXAMP5J.js} +2 -2
- package/dist/cli/{chunk-SOV673GH.js → chunk-3PGTFASB.js} +4 -4
- package/dist/cli/{chunk-4EMAJ3QX.js → chunk-CJVB4RVY.js} +64 -62
- package/dist/cli/{chunk-XPJKXSQS.js → chunk-CMIRZZT4.js} +6 -6
- package/dist/cli/{chunk-BT5Y6UNH.mjs → chunk-DIZYEI6O.mjs} +5 -5
- package/dist/cli/{chunk-UMVIHIQR.mjs → chunk-EGMLX2NR.mjs} +2 -2
- package/dist/cli/{chunk-IHYRCMS2.mjs → chunk-F44OPZOG.mjs} +2 -2
- package/dist/cli/{chunk-W5THLO6U.js → chunk-IFKSXI4W.js} +1 -1
- package/dist/cli/{chunk-4SRTIXOV.js → chunk-JFYOV3HL.js} +15 -15
- package/dist/cli/{chunk-D6Z646OQ.mjs → chunk-K5JZ3JMP.mjs} +4 -4
- package/dist/cli/{chunk-IWP4FVK6.mjs → chunk-KIZ7QHY5.mjs} +1 -1
- package/dist/cli/{chunk-OT35I43P.mjs → chunk-KKKKBDVM.mjs} +6 -6
- package/dist/cli/{chunk-5HWGQYSK.js → chunk-LEDRQPBQ.js} +50 -50
- package/dist/cli/{chunk-6XWYHSKE.js → chunk-MW6IPE3M.js} +9 -9
- package/dist/cli/{chunk-4GSECA4G.mjs → chunk-NV5VCWNJ.mjs} +1 -1
- package/dist/cli/{chunk-SPSQXIRR.js → chunk-POQ7QWVA.js} +48 -48
- package/dist/cli/{chunk-7TGFUXT3.mjs → chunk-Q2NRMSOJ.mjs} +1 -1
- package/dist/cli/{chunk-QX473E5P.mjs → chunk-RST4XEI7.mjs} +3 -3
- package/dist/cli/{chunk-GIMBOV7B.mjs → chunk-SC2MM6IY.mjs} +2 -2
- package/dist/cli/{chunk-JV3I3SPK.mjs → chunk-TIBMH2VI.mjs} +1 -1
- package/dist/cli/{chunk-FFXJKVSX.mjs → chunk-TTIISDJB.mjs} +1 -1
- package/dist/cli/{chunk-R3B7XJ3J.js → chunk-VCW425WW.js} +26 -26
- package/dist/cli/{chunk-LDTDN3RX.mjs → chunk-VUEQBNG7.mjs} +4 -2
- package/dist/cli/{chunk-EIEJKNLZ.js → chunk-WGPPCGGS.js} +8 -8
- package/dist/cli/{chunk-MPVA2MUT.js → chunk-XFS5MNSM.js} +226 -226
- package/dist/cli/{chunk-HNAXRSVI.js → chunk-YHSAUVJ3.js} +8 -8
- package/dist/cli/{csv-H4ZACHHS.js → csv-DZY7OAFK.js} +12 -12
- package/dist/cli/{csv-J4JP3DPS.mjs → csv-Q7XLUTXX.mjs} +3 -3
- package/dist/cli/{db-Y75OULXT.mjs → db-5CLCESHQ.mjs} +4 -4
- package/dist/cli/{db-XO7FOC3Y.js → db-FRJFSTIF.js} +29 -29
- package/dist/cli/{describe-EQWRAHDB.mjs → describe-QDIM53RP.mjs} +8 -8
- package/dist/cli/{describe-YNB27VDP.js → describe-Y7E6FPUC.js} +18 -18
- package/dist/cli/{executions-YVEIAM7M.mjs → executions-M2QRHUDM.mjs} +4 -4
- package/dist/cli/{executions-ERDR36BX.js → executions-YISFXRPZ.js} +6 -6
- package/dist/cli/{feedback-DVLIEVMN.mjs → feedback-FICCIDJQ.mjs} +3 -3
- package/dist/cli/{feedback-NED6Q7KT.js → feedback-HNJVF6AQ.js} +7 -7
- package/dist/cli/git-RBHELB5Y.js +23 -0
- package/dist/cli/{git-4RKNN3VY.mjs → git-WRTQIX6R.mjs} +4 -4
- package/dist/cli/index.js +172 -155
- package/dist/cli/index.mjs +121 -104
- package/dist/cli/{legacy-noops-6E2X2I3N.mjs → legacy-noops-6HJZDXLH.mjs} +4 -4
- package/dist/cli/{legacy-noops-RVUHMAGK.js → legacy-noops-E2R3P424.js} +7 -7
- package/dist/cli/{monitors-J2MY6A2I.js → monitors-DRWEUXDG.js} +85 -85
- package/dist/cli/{monitors-7LHN35U7.mjs → monitors-HGIB7TPZ.mjs} +4 -4
- package/dist/cli/{org-XSQK5EXX.js → org-467XUTRD.js} +64 -64
- package/dist/cli/{org-V4QQMVEU.mjs → org-NHILTL3P.mjs} +4 -4
- package/dist/cli/{play-UN5R5WLC.mjs → play-JEI3F2M4.mjs} +7 -7
- package/dist/cli/play-Y66Z4I7K.js +157 -0
- package/dist/cli/{providers-2GCHGAPY.mjs → providers-6INAFXGV.mjs} +4 -4
- package/dist/cli/{providers-RUZNJEZU.js → providers-KOKGN5YP.js} +7 -7
- package/dist/cli/{quickstart-QI7C3OE6.js → quickstart-ELSP2FZI.js} +5 -5
- package/dist/cli/{quickstart-SQJ3LD5S.mjs → quickstart-QMRYNXDM.mjs} +3 -3
- package/dist/cli/{search-UXEFJH6M.mjs → search-HFUSEL3S.mjs} +5 -5
- package/dist/cli/search-P5HU6U6X.js +26 -0
- package/dist/cli/{secrets-UELQR4TK.js → secrets-6OUGIWPM.js} +13 -13
- package/dist/cli/{secrets-VUXPAPWB.mjs → secrets-TSFBMX65.mjs} +4 -4
- package/dist/cli/{sessions-VJJA2IAJ.js → sessions-6VJUWBCJ.js} +5 -5
- package/dist/cli/{sessions-NZBULFH2.mjs → sessions-GE3GEQY3.mjs} +4 -4
- package/dist/cli/{settings-QUPYXEFE.js → settings-633RRITH.js} +74 -74
- package/dist/cli/{settings-IYSP5GKF.mjs → settings-G5FDUOZJ.mjs} +7 -7
- package/dist/cli/{setup-6AIDWIE5.mjs → setup-WOMOSJWB.mjs} +6 -6
- package/dist/cli/{setup-33FAUBBY.js → setup-X2U5RX5R.js} +41 -41
- package/dist/cli/skills-BZCMRUZZ.js +28 -0
- package/dist/cli/{skills-WQI5O2YD.mjs → skills-NDHK6HRC.mjs} +4 -4
- package/dist/cli/{tools-JRII45GV.mjs → tools-GILOEDEQ.mjs} +6 -6
- package/dist/cli/tools-Y6BDEUS3.js +40 -0
- package/dist/cli/{update-GSWO4TJZ.mjs → update-H6APTLX7.mjs} +6 -6
- package/dist/cli/update-RQWIZOBF.js +28 -0
- package/dist/cli/{workflow-RDDDDQEH.mjs → workflow-MLYJQCP3.mjs} +5 -5
- package/dist/cli/{workflow-HTFJ4KF7.js → workflow-TC72DBUF.js} +15 -15
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +72 -72
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-JLX4WME4.js +0 -39
- package/dist/cli/git-Q4YJMTMJ.js +0 -23
- package/dist/cli/play-QM2EHIEQ.js +0 -157
- package/dist/cli/search-4D6JH4UN.js +0 -26
- package/dist/cli/skills-VOZR6NYH.js +0 -28
- package/dist/cli/tools-NRW7RTA2.js +0 -40
- package/dist/cli/update-IKYKBHCM.js +0 -28
package/dist/cli/index.js
CHANGED
|
@@ -10,8 +10,8 @@ var _chunkQJBJZVG6js = require('./chunk-QJBJZVG6.js');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
require('./chunk-
|
|
13
|
+
var _chunkJFYOV3HLjs = require('./chunk-JFYOV3HL.js');
|
|
14
|
+
require('./chunk-2IXAMP5J.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -25,24 +25,24 @@ require('./chunk-O4XVGZDX.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var _chunk4EMAJ3QXjs = require('./chunk-4EMAJ3QX.js');
|
|
29
28
|
|
|
30
29
|
|
|
30
|
+
var _chunkCJVB4RVYjs = require('./chunk-CJVB4RVY.js');
|
|
31
31
|
|
|
32
|
-
var _chunkAYHLUHE5js = require('./chunk-AYHLUHE5.js');
|
|
33
32
|
|
|
34
33
|
|
|
35
|
-
var
|
|
34
|
+
var _chunkAYHLUHE5js = require('./chunk-AYHLUHE5.js');
|
|
36
35
|
|
|
37
36
|
|
|
37
|
+
var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var _chunkXPJKXSQSjs = require('./chunk-XPJKXSQS.js');
|
|
44
43
|
|
|
45
44
|
|
|
45
|
+
var _chunkCMIRZZT4js = require('./chunk-CMIRZZT4.js');
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
@@ -53,10 +53,10 @@ var _chunkXPJKXSQSjs = require('./chunk-XPJKXSQS.js');
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
var
|
|
56
|
+
var _chunk3PGTFASBjs = require('./chunk-3PGTFASB.js');
|
|
57
57
|
require('./chunk-XNYIZMNQ.js');
|
|
58
58
|
require('./chunk-7P5AA3SN.js');
|
|
59
|
-
require('./chunk-
|
|
59
|
+
require('./chunk-IFKSXI4W.js');
|
|
60
60
|
require('./chunk-OG64RBAC.js');
|
|
61
61
|
|
|
62
62
|
|
|
@@ -126,48 +126,48 @@ var _os = require('os');
|
|
|
126
126
|
var COMMAND_GROUPS = [
|
|
127
127
|
{
|
|
128
128
|
names: ["auth"],
|
|
129
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-
|
|
129
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-A4UKONKC.js")))).registerAuthCommands
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
names: ["providers"],
|
|
133
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./providers-
|
|
133
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./providers-KOKGN5YP.js")))).registerProviderCommands
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
names: ["search"],
|
|
137
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./search-
|
|
137
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./search-P5HU6U6X.js")))).registerSearchCommand
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
names: ["describe"],
|
|
141
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
141
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-Y7E6FPUC.js")))).registerDescribeCommand
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
names: ["tools"],
|
|
145
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-
|
|
145
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-Y6BDEUS3.js")))).registerToolsCommands
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
names: ["executions"],
|
|
149
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./executions-
|
|
149
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./executions-YISFXRPZ.js")))).registerExecutionsCommands
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
names: ["plays", "runs"],
|
|
153
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./play-
|
|
153
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./play-Y66Z4I7K.js")))).registerPlayCommands
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
names: ["sessions"],
|
|
157
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./sessions-
|
|
157
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./sessions-6VJUWBCJ.js")))).registerSessionsCommands
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
names: ["workflows"],
|
|
161
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-
|
|
161
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-TC72DBUF.js")))).registerWorkflowCommands
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
names: ["secrets"],
|
|
165
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./secrets-
|
|
165
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./secrets-6OUGIWPM.js")))).registerSecretsCommands
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
names: ["settings", "notifications"],
|
|
169
169
|
load: async () => {
|
|
170
|
-
const commands = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-
|
|
170
|
+
const commands = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-633RRITH.js")));
|
|
171
171
|
return (p) => {
|
|
172
172
|
commands.registerSettingsCommands(p);
|
|
173
173
|
commands.registerNotificationCommands(p);
|
|
@@ -176,51 +176,51 @@ var COMMAND_GROUPS = [
|
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
names: ["billing"],
|
|
179
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./billing-
|
|
179
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./billing-6LXNCN5G.js")))).registerBillingCommands
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
182
|
names: ["monitors"],
|
|
183
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./monitors-
|
|
183
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./monitors-DRWEUXDG.js")))).registerMonitorsCommands
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
names: ["org"],
|
|
187
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./org-
|
|
187
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./org-467XUTRD.js")))).registerOrgCommands
|
|
188
188
|
},
|
|
189
189
|
{
|
|
190
190
|
names: ["git", "projects", "deployments"],
|
|
191
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./git-
|
|
191
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./git-RBHELB5Y.js")))).registerGitCommands
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
194
|
names: ["csv"],
|
|
195
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./csv-
|
|
195
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./csv-DZY7OAFK.js")))).registerCsvCommands
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
198
|
names: ["db"],
|
|
199
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./db-
|
|
199
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./db-FRJFSTIF.js")))).registerDbCommands
|
|
200
200
|
},
|
|
201
201
|
{
|
|
202
202
|
names: ["feedback"],
|
|
203
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./feedback-
|
|
203
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./feedback-HNJVF6AQ.js")))).registerFeedbackCommands
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
206
|
names: ["enrich", "session", "backend"],
|
|
207
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./legacy-noops-
|
|
207
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./legacy-noops-E2R3P424.js")))).registerDeprecatedCommands
|
|
208
208
|
},
|
|
209
209
|
{
|
|
210
210
|
names: ["update"],
|
|
211
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./update-
|
|
211
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./update-RQWIZOBF.js")))).registerUpdateCommand
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
names: ["skills", "skills-auto-sync"],
|
|
215
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./skills-
|
|
215
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./skills-BZCMRUZZ.js")))).registerSkillsCommand
|
|
216
216
|
},
|
|
217
217
|
{
|
|
218
218
|
names: ["setup", "doctor"],
|
|
219
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./setup-
|
|
219
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./setup-X2U5RX5R.js")))).registerSetupCommands
|
|
220
220
|
},
|
|
221
221
|
{
|
|
222
222
|
names: ["quickstart"],
|
|
223
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./quickstart-
|
|
223
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./quickstart-ELSP2FZI.js")))).registerQuickstartCommands
|
|
224
224
|
}
|
|
225
225
|
];
|
|
226
226
|
async function registerDeeplineCommandGroups(program, requestedCommand) {
|
|
@@ -257,7 +257,7 @@ var MAX_SESSIONS = 20;
|
|
|
257
257
|
function helpSeenPath(homeDir = _os.homedir.call(void 0, )) {
|
|
258
258
|
return _path.join.call(void 0, homeDir, ".local", "deepline", "sdk-cli", "help-seen.json");
|
|
259
259
|
}
|
|
260
|
-
function resolveHelpDetail(argv, key, homeDir = _os.homedir.call(void 0, ), sessionId =
|
|
260
|
+
function resolveHelpDetail(argv, key, homeDir = _os.homedir.call(void 0, ), sessionId = _chunk3PGTFASBjs.agentSessionIdFromEnvironment.call(void 0, )) {
|
|
261
261
|
const explicit = _chunkHXENYWVSjs.helpDetailFromArgv.call(void 0, argv);
|
|
262
262
|
if (explicit === "quiet") return { detail: "quiet", firstRead: false };
|
|
263
263
|
if (!sessionId) return { detail: explicit, firstRead: false };
|
|
@@ -339,7 +339,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
|
339
339
|
async function reportAutoUpdateEvent(input) {
|
|
340
340
|
let apiKey = "";
|
|
341
341
|
try {
|
|
342
|
-
apiKey =
|
|
342
|
+
apiKey = _chunk3PGTFASBjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
343
343
|
} catch (e2) {
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
@@ -355,15 +355,15 @@ async function reportAutoUpdateEvent(input) {
|
|
|
355
355
|
headers: {
|
|
356
356
|
Authorization: `Bearer ${apiKey}`,
|
|
357
357
|
"Content-Type": "application/json",
|
|
358
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
358
|
+
"User-Agent": `deepline-ts-sdk/${_chunk3PGTFASBjs.SDK_VERSION}`,
|
|
359
359
|
"X-Deepline-Client-Family": "sdk",
|
|
360
360
|
"X-Deepline-CLI-Family": "sdk",
|
|
361
|
-
"X-Deepline-CLI-Version":
|
|
362
|
-
"X-Deepline-SDK-Version":
|
|
361
|
+
"X-Deepline-CLI-Version": _chunk3PGTFASBjs.SDK_VERSION,
|
|
362
|
+
"X-Deepline-SDK-Version": _chunk3PGTFASBjs.SDK_VERSION
|
|
363
363
|
},
|
|
364
364
|
body: JSON.stringify({
|
|
365
365
|
event: input.event,
|
|
366
|
-
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ||
|
|
366
|
+
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunk3PGTFASBjs.SDK_VERSION,
|
|
367
367
|
target_version: input.response.latest,
|
|
368
368
|
reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
|
|
369
369
|
command: _nullishCoalesce(input.response.command, () => ( null)),
|
|
@@ -382,7 +382,7 @@ function envTruthy(name) {
|
|
|
382
382
|
return value === "1" || value === "true" || value === "yes";
|
|
383
383
|
}
|
|
384
384
|
function shouldSkipSelfUpdate(policy) {
|
|
385
|
-
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !
|
|
385
|
+
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkJFYOV3HLjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkCJVB4RVYjs.isCiEnvironment.call(void 0, );
|
|
386
386
|
}
|
|
387
387
|
function parseSemver(version) {
|
|
388
388
|
const trimmed = _optionalChain([version, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]);
|
|
@@ -412,7 +412,7 @@ function compareSemver(left, right) {
|
|
|
412
412
|
}
|
|
413
413
|
function isDowngradeAutoUpdateResponse(response) {
|
|
414
414
|
const target = _optionalChain([response, 'optionalAccess', _19 => _19.latest, 'optionalAccess', _20 => _20.trim, 'call', _21 => _21()]);
|
|
415
|
-
const current = _optionalChain([response, 'optionalAccess', _22 => _22.current, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) ||
|
|
415
|
+
const current = _optionalChain([response, 'optionalAccess', _22 => _22.current, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunk3PGTFASBjs.SDK_VERSION;
|
|
416
416
|
if (!target) return false;
|
|
417
417
|
return compareSemver(target, current) < 0;
|
|
418
418
|
}
|
|
@@ -451,7 +451,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
451
451
|
}
|
|
452
452
|
if (isDowngradeAutoUpdateResponse(response)) {
|
|
453
453
|
const target = response.latest;
|
|
454
|
-
const current = _optionalChain([response, 'access', _27 => _27.current, 'optionalAccess', _28 => _28.trim, 'call', _29 => _29()]) ||
|
|
454
|
+
const current = _optionalChain([response, 'access', _27 => _27.current, 'optionalAccess', _28 => _28.trim, 'call', _29 => _29()]) || _chunk3PGTFASBjs.SDK_VERSION;
|
|
455
455
|
process.stderr.write(
|
|
456
456
|
`Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
|
|
457
457
|
`
|
|
@@ -459,12 +459,12 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
459
459
|
return false;
|
|
460
460
|
}
|
|
461
461
|
const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
|
|
462
|
-
const plan =
|
|
462
|
+
const plan = _chunkJFYOV3HLjs.resolveUpdatePlan.call(void 0, {
|
|
463
463
|
packageSpec,
|
|
464
464
|
requireVerifiedNpmOwnership: true,
|
|
465
465
|
npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
|
|
466
466
|
});
|
|
467
|
-
if (!
|
|
467
|
+
if (!_chunkJFYOV3HLjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
|
|
468
468
|
return false;
|
|
469
469
|
}
|
|
470
470
|
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";
|
|
@@ -478,7 +478,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
478
478
|
event: "started",
|
|
479
479
|
installKind: plan.kind
|
|
480
480
|
});
|
|
481
|
-
const updateResult = await
|
|
481
|
+
const updateResult = await _chunkJFYOV3HLjs.runAutomaticUpdatePlan.call(void 0, plan);
|
|
482
482
|
if (updateResult.status === "skipped_previous_failure") {
|
|
483
483
|
void reportAutoUpdateEvent({
|
|
484
484
|
baseUrl,
|
|
@@ -539,86 +539,103 @@ function resolveCliMaintenancePolicy(input) {
|
|
|
539
539
|
}
|
|
540
540
|
|
|
541
541
|
// src/cli/output-size-reporting.ts
|
|
542
|
-
var
|
|
543
|
-
var
|
|
544
|
-
var
|
|
542
|
+
var REPORT_MIN_LINES = 40;
|
|
543
|
+
var REPORT_TIMEOUT_MS = 1e3;
|
|
544
|
+
var FLUSH_TIMEOUT_MS = 250;
|
|
545
|
+
var EMPTY_TALLY = {
|
|
546
|
+
chars: 0,
|
|
547
|
+
newlines: 0,
|
|
548
|
+
endsMidLine: false,
|
|
549
|
+
epipe: false
|
|
550
|
+
};
|
|
551
|
+
function addText(tally, text) {
|
|
552
|
+
if (!text) return tally;
|
|
553
|
+
return {
|
|
554
|
+
...tally,
|
|
555
|
+
chars: tally.chars + text.length,
|
|
556
|
+
newlines: tally.newlines + text.split("\n").length - 1,
|
|
557
|
+
endsMidLine: !text.endsWith("\n")
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
function streamOutput({
|
|
561
|
+
chars,
|
|
562
|
+
newlines,
|
|
563
|
+
endsMidLine,
|
|
564
|
+
epipe
|
|
565
|
+
}) {
|
|
566
|
+
return { chars, lines: newlines + (endsMidLine ? 1 : 0), epipe };
|
|
567
|
+
}
|
|
568
|
+
function shouldReport(stdout, stderr) {
|
|
569
|
+
return stdout.epipe || stderr.epipe || stdout.lines + stderr.lines > REPORT_MIN_LINES;
|
|
570
|
+
}
|
|
545
571
|
function chunkText(chunk) {
|
|
546
572
|
if (typeof chunk === "string") return chunk;
|
|
547
573
|
if (chunk instanceof Uint8Array) return Buffer.from(chunk).toString();
|
|
548
574
|
return "";
|
|
549
575
|
}
|
|
550
|
-
function
|
|
551
|
-
let
|
|
552
|
-
|
|
553
|
-
|
|
576
|
+
function watch(stream) {
|
|
577
|
+
let tally = EMPTY_TALLY;
|
|
578
|
+
stream.on("error", (error) => {
|
|
579
|
+
if (error.code !== "EPIPE") throw error;
|
|
580
|
+
tally = { ...tally, epipe: true };
|
|
581
|
+
});
|
|
554
582
|
const write = stream.write.bind(stream);
|
|
555
583
|
stream.write = ((chunk, ...args) => {
|
|
556
|
-
|
|
557
|
-
if (text) {
|
|
558
|
-
chars += text.length;
|
|
559
|
-
newlines += text.split("\n").length - 1;
|
|
560
|
-
endsMidLine = !text.endsWith("\n");
|
|
561
|
-
}
|
|
584
|
+
tally = addText(tally, chunkText(chunk));
|
|
562
585
|
return write(chunk, ...args);
|
|
563
586
|
});
|
|
564
|
-
return
|
|
587
|
+
return {
|
|
588
|
+
settled: () => new Promise((resolve) => {
|
|
589
|
+
const done = () => resolve(streamOutput(tally));
|
|
590
|
+
const timeout = setTimeout(done, FLUSH_TIMEOUT_MS);
|
|
591
|
+
stream.write("", () => {
|
|
592
|
+
clearTimeout(timeout);
|
|
593
|
+
setImmediate(done);
|
|
594
|
+
});
|
|
595
|
+
})
|
|
596
|
+
};
|
|
565
597
|
}
|
|
566
|
-
function
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
const disabled = ["1", "true", "yes", "on"].includes(
|
|
571
|
-
String(_nullishCoalesce(process.env[REPORTING_DISABLE_ENV], () => ( ""))).trim().toLowerCase()
|
|
572
|
-
);
|
|
573
|
-
if (disabled) return;
|
|
574
|
-
const stdout = stdoutSize();
|
|
575
|
-
const stderr = stderrSize();
|
|
576
|
-
if (stdout.lines + stderr.lines <= REPORT_MIN_OUTPUT_LINES) return;
|
|
577
|
-
let baseUrl = "";
|
|
578
|
-
let apiKey = "";
|
|
579
|
-
try {
|
|
580
|
-
baseUrl = _chunkSOV673GHjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
581
|
-
apiKey = _chunkSOV673GHjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
582
|
-
} catch (e4) {
|
|
583
|
-
return;
|
|
584
|
-
}
|
|
598
|
+
async function postCommandOutput(body) {
|
|
599
|
+
try {
|
|
600
|
+
const baseUrl = _chunk3PGTFASBjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
601
|
+
const apiKey = _chunk3PGTFASBjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
585
602
|
if (!apiKey) return;
|
|
586
|
-
const
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
}
|
|
603
|
+
const agentSessionId = _chunk3PGTFASBjs.agentSessionIdFromEnvironment.call(void 0, );
|
|
604
|
+
await fetch(new URL("/api/v2/telemetry/command-output", baseUrl), {
|
|
605
|
+
method: "POST",
|
|
606
|
+
headers: {
|
|
607
|
+
..._chunkCJVB4RVYjs.failureReportHeaders.call(void 0, apiKey),
|
|
608
|
+
...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {}
|
|
609
|
+
},
|
|
610
|
+
body: JSON.stringify(body),
|
|
611
|
+
signal: AbortSignal.timeout(REPORT_TIMEOUT_MS)
|
|
612
|
+
});
|
|
613
|
+
} catch (e4) {
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
function startOutputSizeReporting(command, streams = {
|
|
617
|
+
stdout: process.stdout,
|
|
618
|
+
stderr: process.stderr
|
|
619
|
+
}) {
|
|
620
|
+
const stdoutWatch = watch(streams.stdout);
|
|
621
|
+
const stderrWatch = watch(streams.stderr);
|
|
622
|
+
return async (exitCode) => {
|
|
623
|
+
if (_chunkCJVB4RVYjs.isFailureReportingDisabled.call(void 0, )) return;
|
|
624
|
+
const [stdout, stderr] = await Promise.all([
|
|
625
|
+
stdoutWatch.settled(),
|
|
626
|
+
stderrWatch.settled()
|
|
627
|
+
]);
|
|
628
|
+
if (!shouldReport(stdout, stderr)) return;
|
|
629
|
+
await postCommandOutput({
|
|
630
|
+
command: _chunkCJVB4RVYjs.sanitizeCommand.call(void 0, command.argv),
|
|
631
|
+
exit_code: typeof exitCode === "number" ? exitCode : null,
|
|
632
|
+
duration_ms: Math.max(0, Date.now() - command.startedAtMs),
|
|
633
|
+
stdout_chars: stdout.chars,
|
|
634
|
+
stderr_chars: stderr.chars,
|
|
635
|
+
stdout_lines: stdout.lines,
|
|
636
|
+
stderr_lines: stderr.lines,
|
|
637
|
+
epipe: stdout.epipe || stderr.epipe
|
|
638
|
+
});
|
|
622
639
|
};
|
|
623
640
|
}
|
|
624
641
|
|
|
@@ -683,7 +700,7 @@ function topLevelCommandKnown(program, commandName) {
|
|
|
683
700
|
);
|
|
684
701
|
}
|
|
685
702
|
async function runPlayRunnerHealthCheck() {
|
|
686
|
-
|
|
703
|
+
_chunk3PGTFASBjs.resolveConfig.call(void 0, );
|
|
687
704
|
const dir = await _promises.mkdtemp.call(void 0, _path.join.call(void 0, _os.tmpdir.call(void 0, ), "deepline-health-play-"));
|
|
688
705
|
const file = _path.join.call(void 0, dir, "health-check.play.ts");
|
|
689
706
|
try {
|
|
@@ -713,7 +730,7 @@ async function runPlayRunnerHealthCheck() {
|
|
|
713
730
|
});
|
|
714
731
|
let exitCode = 1;
|
|
715
732
|
try {
|
|
716
|
-
const { handlePlayRun } = await Promise.resolve().then(() => _interopRequireWildcard(require("./play-
|
|
733
|
+
const { handlePlayRun } = await Promise.resolve().then(() => _interopRequireWildcard(require("./play-Y66Z4I7K.js")));
|
|
717
734
|
exitCode = await handlePlayRun([
|
|
718
735
|
file,
|
|
719
736
|
"--input",
|
|
@@ -753,7 +770,7 @@ function preflightErrorMessage(error) {
|
|
|
753
770
|
return error instanceof Error ? error.message : String(error);
|
|
754
771
|
}
|
|
755
772
|
async function runPreflightCheck() {
|
|
756
|
-
const baseUrl =
|
|
773
|
+
const baseUrl = _chunk3PGTFASBjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
757
774
|
const healthController = new AbortController();
|
|
758
775
|
const healthTimeout = setTimeout(
|
|
759
776
|
() => healthController.abort(),
|
|
@@ -768,9 +785,9 @@ async function runPreflightCheck() {
|
|
|
768
785
|
version: pickString(payload, "version")
|
|
769
786
|
};
|
|
770
787
|
}).catch(() => ({ status: "unreachable", version: null })).finally(() => clearTimeout(healthTimeout));
|
|
771
|
-
const apiKey =
|
|
772
|
-
const http = apiKey ? new (0,
|
|
773
|
-
|
|
788
|
+
const apiKey = _chunk3PGTFASBjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
789
|
+
const http = apiKey ? new (0, _chunk3PGTFASBjs.HttpClient)(
|
|
790
|
+
_chunk3PGTFASBjs.resolveConfig.call(void 0, {
|
|
774
791
|
baseUrl,
|
|
775
792
|
apiKey,
|
|
776
793
|
timeout: PREFLIGHT_TIMEOUT_MS,
|
|
@@ -815,7 +832,7 @@ async function runPreflightCheck() {
|
|
|
815
832
|
const connected = authStatus === "connected" || authStatus === "claimed";
|
|
816
833
|
return {
|
|
817
834
|
status: healthResult.status === "ok" && connected ? "ok" : "check",
|
|
818
|
-
cli_version:
|
|
835
|
+
cli_version: _chunk3PGTFASBjs.SDK_VERSION,
|
|
819
836
|
host: baseUrl,
|
|
820
837
|
health: {
|
|
821
838
|
status: healthResult.status,
|
|
@@ -841,7 +858,7 @@ async function runPreflightCheck() {
|
|
|
841
858
|
{
|
|
842
859
|
title: "preflight",
|
|
843
860
|
lines: [
|
|
844
|
-
`cli: ${
|
|
861
|
+
`cli: ${_chunk3PGTFASBjs.SDK_VERSION}`,
|
|
845
862
|
`host: ${baseUrl}`,
|
|
846
863
|
`health: ${healthResult.status}`,
|
|
847
864
|
`auth: ${authStatus}`,
|
|
@@ -866,12 +883,12 @@ function printPreflightHuman(data) {
|
|
|
866
883
|
}
|
|
867
884
|
async function newerCliCommandHint(baseUrl, command) {
|
|
868
885
|
if (!command.trim()) return null;
|
|
869
|
-
const { response, error } = await
|
|
886
|
+
const { response, error } = await _chunkCJVB4RVYjs.checkSdkCompatibility.call(void 0, baseUrl, { command });
|
|
870
887
|
if (error || !response) return null;
|
|
871
888
|
const introduced = response.command_introduced_in;
|
|
872
889
|
if (introduced) {
|
|
873
890
|
return [
|
|
874
|
-
`\`deepline ${introduced.command}\` was added in SDK CLI ${introduced.introduced_in}. This CLI is ${
|
|
891
|
+
`\`deepline ${introduced.command}\` was added in SDK CLI ${introduced.introduced_in}. This CLI is ${_chunk3PGTFASBjs.SDK_VERSION}.`,
|
|
875
892
|
` ${introduced.reason}`,
|
|
876
893
|
` Update with: ${response.update_command}`,
|
|
877
894
|
" Agent skills are served by Deepline and refresh on their own, so a skill can describe a command this CLI does not have yet."
|
|
@@ -880,7 +897,7 @@ async function newerCliCommandHint(baseUrl, command) {
|
|
|
880
897
|
if (!response.update_required) return null;
|
|
881
898
|
return [
|
|
882
899
|
response.message,
|
|
883
|
-
` Installed: ${
|
|
900
|
+
` Installed: ${_chunk3PGTFASBjs.SDK_VERSION}. Run: ${response.update_command}`,
|
|
884
901
|
" If an agent skill told you to run this, the skill is newer than this CLI."
|
|
885
902
|
].join("\n");
|
|
886
903
|
}
|
|
@@ -899,7 +916,7 @@ async function runMain(ensureTransport) {
|
|
|
899
916
|
const program = new (0, _commander.Command)();
|
|
900
917
|
program.name("deepline").description(
|
|
901
918
|
"Deepline CLI \u2014 GTM enrichment tools, plays, and runs from your terminal."
|
|
902
|
-
).version(
|
|
919
|
+
).version(_chunk3PGTFASBjs.SDK_VERSION, "-v, --version", "Show version").option(
|
|
903
920
|
"--maintenance <policy>",
|
|
904
921
|
"Installation maintenance: configured preferences or off; independent of output format",
|
|
905
922
|
parseCliMaintenancePolicy,
|
|
@@ -955,7 +972,7 @@ Exit codes:
|
|
|
955
972
|
if (actionCommand.name() !== "version") {
|
|
956
973
|
await ensureTransport();
|
|
957
974
|
}
|
|
958
|
-
if (actionCommand.name() === "version" || actionCommand.name() === "update" || actionCommand.name() === "setup" || actionCommand.name() === "skills" || actionCommand.name() ===
|
|
975
|
+
if (actionCommand.name() === "version" || actionCommand.name() === "update" || actionCommand.name() === "setup" || actionCommand.name() === "skills" || actionCommand.name() === _chunkCJVB4RVYjs.SKILLS_AUTO_SYNC_COMMAND || actionCommand.name() === "doctor" || isAutoUpdateSettingsInvocation() || isDeprecatedCommandInvocation()) {
|
|
959
976
|
return;
|
|
960
977
|
}
|
|
961
978
|
const compatibilityCommand = compatibilityCommandPath(actionCommand) || actionCommand.name();
|
|
@@ -968,16 +985,16 @@ Exit codes:
|
|
|
968
985
|
_optionalChain([progress, 'optionalAccess', _37 => _37.phase, 'call', _38 => _38("checking sdk compatibility")]);
|
|
969
986
|
}
|
|
970
987
|
const startup = await runStartupStage("SDK compatibility", async () => {
|
|
971
|
-
const baseUrl =
|
|
972
|
-
if (maintenance !== "off")
|
|
988
|
+
const baseUrl = _chunk3PGTFASBjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
989
|
+
if (maintenance !== "off") _chunkCJVB4RVYjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
973
990
|
const shouldDeferSkillsSync = maintenance === "off" || shouldDeferSkillsSyncForCommand();
|
|
974
|
-
const skillsVersion = shouldDeferSkillsSync ? void 0 :
|
|
975
|
-
const trusted =
|
|
991
|
+
const skillsVersion = shouldDeferSkillsSync ? void 0 : _chunk3PGTFASBjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
992
|
+
const trusted = _chunkCJVB4RVYjs.readTrustedCleanCompatibility.call(void 0,
|
|
976
993
|
baseUrl,
|
|
977
994
|
compatibilityCommand,
|
|
978
995
|
skillsVersion
|
|
979
996
|
);
|
|
980
|
-
const fastDeadline = trusted === null &&
|
|
997
|
+
const fastDeadline = trusted === null && _chunkCJVB4RVYjs.readFreshCleanCompatibility.call(void 0,
|
|
981
998
|
baseUrl,
|
|
982
999
|
compatibilityCommand,
|
|
983
1000
|
skillsVersion
|
|
@@ -1001,12 +1018,12 @@ Exit codes:
|
|
|
1001
1018
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null)),
|
|
1002
1019
|
fastDeadline
|
|
1003
1020
|
},
|
|
1004
|
-
() =>
|
|
1021
|
+
() => _chunkCJVB4RVYjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1005
1022
|
command: compatibilityCommand,
|
|
1006
1023
|
skillsVersion,
|
|
1007
1024
|
persistCache: maintenance !== "off",
|
|
1008
1025
|
catalog: _chunkQJBJZVG6js.compatibilityCatalog.call(void 0, actionCommand),
|
|
1009
|
-
...fastDeadline ? { timeoutMs:
|
|
1026
|
+
...fastDeadline ? { timeoutMs: _chunkCJVB4RVYjs.SDK_COMPATIBILITY_FAST_DEADLINE_MS } : {}
|
|
1010
1027
|
})
|
|
1011
1028
|
);
|
|
1012
1029
|
if (compatibility.error) {
|
|
@@ -1030,7 +1047,7 @@ Exit codes:
|
|
|
1030
1047
|
response: compatibility.response
|
|
1031
1048
|
};
|
|
1032
1049
|
}
|
|
1033
|
-
|
|
1050
|
+
_chunkCJVB4RVYjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
1034
1051
|
quietAdvisory: process.argv.includes("--json")
|
|
1035
1052
|
});
|
|
1036
1053
|
return {
|
|
@@ -1051,7 +1068,7 @@ Exit codes:
|
|
|
1051
1068
|
() => _chunkAYHLUHE5js.traceCliSpan.call(void 0,
|
|
1052
1069
|
"cli.sdk_skills_sync",
|
|
1053
1070
|
{ baseUrl: startup.baseUrl },
|
|
1054
|
-
() =>
|
|
1071
|
+
() => _chunkCJVB4RVYjs.syncSdkSkillsIfNeeded.call(void 0, startup.baseUrl, {
|
|
1055
1072
|
update: skillsUpdate,
|
|
1056
1073
|
mode: "detached"
|
|
1057
1074
|
})
|
|
@@ -1079,8 +1096,8 @@ Examples:
|
|
|
1079
1096
|
`
|
|
1080
1097
|
).action(async (options) => {
|
|
1081
1098
|
const data = await runPreflightCheck();
|
|
1082
|
-
if (
|
|
1083
|
-
|
|
1099
|
+
if (_chunkCMIRZZT4js.shouldEmitJson.call(void 0, options.json)) {
|
|
1100
|
+
_chunkCMIRZZT4js.printJson.call(void 0, data);
|
|
1084
1101
|
} else {
|
|
1085
1102
|
printPreflightHuman(data);
|
|
1086
1103
|
}
|
|
@@ -1102,7 +1119,7 @@ Examples:
|
|
|
1102
1119
|
).action(async (options) => {
|
|
1103
1120
|
if (options.playRunner) {
|
|
1104
1121
|
const data = await runPlayRunnerHealthCheck();
|
|
1105
|
-
|
|
1122
|
+
_chunkCMIRZZT4js.printCommandEnvelope.call(void 0, data, {
|
|
1106
1123
|
json: options.json,
|
|
1107
1124
|
text: `play runner: ${data.playRunner.status} (${data.playRunner.check})
|
|
1108
1125
|
`
|
|
@@ -1110,15 +1127,15 @@ Examples:
|
|
|
1110
1127
|
return;
|
|
1111
1128
|
}
|
|
1112
1129
|
try {
|
|
1113
|
-
const { httpJson, readStatusBanner, statusBannerLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-
|
|
1114
|
-
const baseUrl =
|
|
1130
|
+
const { httpJson, readStatusBanner, statusBannerLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-A4UKONKC.js")));
|
|
1131
|
+
const baseUrl = _chunk3PGTFASBjs.resolveBaseUrlOnly.call(void 0, );
|
|
1115
1132
|
const [{ status, data }, banner] = await Promise.all([
|
|
1116
1133
|
httpJson("GET", `${baseUrl}/api/v2/health`, null),
|
|
1117
1134
|
readStatusBanner(baseUrl)
|
|
1118
1135
|
]);
|
|
1119
1136
|
if (status !== 200) throw new Error(`HTTP ${status}`);
|
|
1120
1137
|
const lines = [`${baseUrl}: ${data.status}`, statusBannerLine(banner)];
|
|
1121
|
-
|
|
1138
|
+
_chunkCMIRZZT4js.printCommandEnvelope.call(void 0,
|
|
1122
1139
|
{ ...data, status_banner: banner },
|
|
1123
1140
|
{
|
|
1124
1141
|
json: options.json,
|
|
@@ -1146,10 +1163,10 @@ Examples:
|
|
|
1146
1163
|
`
|
|
1147
1164
|
).action((options) => {
|
|
1148
1165
|
if (options.json) {
|
|
1149
|
-
|
|
1166
|
+
_chunkCMIRZZT4js.printCompactJson.call(void 0, { version: _chunk3PGTFASBjs.SDK_VERSION });
|
|
1150
1167
|
return;
|
|
1151
1168
|
}
|
|
1152
|
-
process.stdout.write(`deepline ${
|
|
1169
|
+
process.stdout.write(`deepline ${_chunk3PGTFASBjs.SDK_VERSION}
|
|
1153
1170
|
`);
|
|
1154
1171
|
});
|
|
1155
1172
|
if (process.argv.slice(2).length === 0) {
|
|
@@ -1167,7 +1184,7 @@ Examples:
|
|
|
1167
1184
|
const requestedTopLevelCommand = _nullishCoalesce(process.argv.slice(2)[0], () => ( ""));
|
|
1168
1185
|
if (!topLevelCommandKnown(program, requestedTopLevelCommand)) {
|
|
1169
1186
|
console.error(`error: unknown command '${requestedTopLevelCommand}'`);
|
|
1170
|
-
const baseUrl =
|
|
1187
|
+
const baseUrl = _chunk3PGTFASBjs.autoDetectBaseUrl.call(void 0, );
|
|
1171
1188
|
await ensureTransport();
|
|
1172
1189
|
const versionHint = await newerCliCommandHint(
|
|
1173
1190
|
baseUrl,
|
|
@@ -1185,8 +1202,8 @@ Examples:
|
|
|
1185
1202
|
const helpArgs = process.argv.slice(2);
|
|
1186
1203
|
const helpPositionals = helpArgs.filter((arg) => !arg.startsWith("-"));
|
|
1187
1204
|
if (helpPositionals.length === 0 ? helpArgs.includes("--help") || helpArgs.includes("-h") : helpPositionals.length === 1 && helpPositionals[0] === "help") {
|
|
1188
|
-
const { authStatusLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-
|
|
1189
|
-
rootHelpStatus = `Version: ${
|
|
1205
|
+
const { authStatusLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-A4UKONKC.js")));
|
|
1206
|
+
rootHelpStatus = `Version: ${_chunk3PGTFASBjs.SDK_VERSION}
|
|
1190
1207
|
${await authStatusLine()}
|
|
1191
1208
|
`;
|
|
1192
1209
|
}
|
|
@@ -1196,7 +1213,7 @@ ${await authStatusLine()}
|
|
|
1196
1213
|
ms: Date.now() - mainStartedAt,
|
|
1197
1214
|
ok: true
|
|
1198
1215
|
});
|
|
1199
|
-
await
|
|
1216
|
+
await _chunkCJVB4RVYjs.maybeReportSdkCliFailure.call(void 0, {
|
|
1200
1217
|
argv: process.argv.slice(2),
|
|
1201
1218
|
startedAtMs: mainStartedAt,
|
|
1202
1219
|
exitCode: typeof process.exitCode === "number" ? process.exitCode : null
|
|
@@ -1221,7 +1238,7 @@ ${await authStatusLine()}
|
|
|
1221
1238
|
const commandPath = invocation.commandPath || requestedTopLevelCommand;
|
|
1222
1239
|
await ensureTransport();
|
|
1223
1240
|
const versionHint = await newerCliCommandHint(
|
|
1224
|
-
|
|
1241
|
+
_chunk3PGTFASBjs.autoDetectBaseUrl.call(void 0, ),
|
|
1225
1242
|
commandPath
|
|
1226
1243
|
);
|
|
1227
1244
|
if (versionHint) console.error(versionHint);
|
|
@@ -1232,24 +1249,24 @@ ${await authStatusLine()}
|
|
|
1232
1249
|
process.exitCode = commanderError.code === "commander.unknownCommand" && !wantsJson ? 2 : _nullishCoalesce(commanderError.exitCode, () => ( 1));
|
|
1233
1250
|
return;
|
|
1234
1251
|
} else if (wantsJson) {
|
|
1235
|
-
|
|
1236
|
-
...
|
|
1237
|
-
...error instanceof
|
|
1252
|
+
_chunkCMIRZZT4js.printJson.call(void 0, {
|
|
1253
|
+
..._chunkCMIRZZT4js.errorToJsonPayload.call(void 0, error),
|
|
1254
|
+
...error instanceof _chunk3PGTFASBjs.AuthError ? { next: AUTH_RECOVERY_COMMAND } : {}
|
|
1238
1255
|
});
|
|
1239
1256
|
} else if (error instanceof Error) {
|
|
1240
1257
|
console.error(`Error: ${error.message}`);
|
|
1241
|
-
if (error instanceof
|
|
1258
|
+
if (error instanceof _chunk3PGTFASBjs.AuthError) {
|
|
1242
1259
|
console.error(`Not authenticated. Run: ${AUTH_RECOVERY_COMMAND}`);
|
|
1243
1260
|
}
|
|
1244
|
-
const providerConcurrency =
|
|
1261
|
+
const providerConcurrency = _chunkCMIRZZT4js.formatProviderConcurrencyDiagnostic.call(void 0, error);
|
|
1245
1262
|
if (providerConcurrency) console.error(providerConcurrency);
|
|
1246
1263
|
} else {
|
|
1247
1264
|
console.error(`Error: ${String(error)}`);
|
|
1248
1265
|
}
|
|
1249
1266
|
const explicitExitCode = error && typeof error === "object" && typeof error.exitCode === "number" ? error.exitCode : void 0;
|
|
1250
|
-
const failureExitCode = _nullishCoalesce(explicitExitCode, () => (
|
|
1267
|
+
const failureExitCode = _nullishCoalesce(explicitExitCode, () => ( _chunkCJVB4RVYjs.resolveSdkCliFailureExitCode.call(void 0, error)));
|
|
1251
1268
|
process.exitCode = failureExitCode;
|
|
1252
|
-
await
|
|
1269
|
+
await _chunkCJVB4RVYjs.maybeReportSdkCliFailure.call(void 0, {
|
|
1253
1270
|
argv: process.argv.slice(2),
|
|
1254
1271
|
startedAtMs: mainStartedAt,
|
|
1255
1272
|
exitCode: failureExitCode,
|
|
@@ -1282,7 +1299,7 @@ async function main() {
|
|
|
1282
1299
|
try {
|
|
1283
1300
|
await runMain(ensureTransport);
|
|
1284
1301
|
await ensureTransport();
|
|
1285
|
-
await reportOutputSize();
|
|
1302
|
+
await reportOutputSize(process.exitCode);
|
|
1286
1303
|
} finally {
|
|
1287
1304
|
await _optionalChain([disposeTransport, 'optionalCall', _47 => _47()]);
|
|
1288
1305
|
}
|