deepline 0.3.383 → 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-DHCQUXEG.mjs → auth-4D4IBZZN.mjs} +4 -4
- package/dist/cli/auth-A4UKONKC.js +39 -0
- package/dist/cli/{billing-LRF2NACZ.mjs → billing-4RSI4634.mjs} +4 -4
- package/dist/cli/{billing-44WIXRTK.js → billing-6LXNCN5G.js} +73 -73
- package/dist/cli/{chunk-LOWL2IEA.js → chunk-2IXAMP5J.js} +2 -2
- package/dist/cli/{chunk-3Z4P6FTT.js → chunk-3PGTFASB.js} +4 -4
- package/dist/cli/{chunk-A7HIN77W.js → chunk-CJVB4RVY.js} +64 -61
- package/dist/cli/{chunk-AFCHR4YF.js → chunk-CMIRZZT4.js} +6 -6
- package/dist/cli/{chunk-PLOQ3BBM.mjs → chunk-DIZYEI6O.mjs} +5 -5
- package/dist/cli/{chunk-ZAF746ZB.mjs → chunk-EGMLX2NR.mjs} +2 -2
- package/dist/cli/{chunk-26QUYLQT.mjs → chunk-F44OPZOG.mjs} +2 -2
- package/dist/cli/{chunk-MCRIYPOO.js → chunk-IFKSXI4W.js} +1 -1
- package/dist/cli/{chunk-SWYXUHCV.js → chunk-JFYOV3HL.js} +15 -15
- package/dist/cli/{chunk-YK6RRPOH.mjs → chunk-K5JZ3JMP.mjs} +4 -4
- package/dist/cli/{chunk-KB455XET.mjs → chunk-KIZ7QHY5.mjs} +1 -1
- package/dist/cli/{chunk-6BGD3GOJ.mjs → chunk-KKKKBDVM.mjs} +6 -6
- package/dist/cli/{chunk-BICTEMZN.js → chunk-LEDRQPBQ.js} +50 -50
- package/dist/cli/{chunk-GMVSUWPP.js → chunk-MW6IPE3M.js} +9 -9
- package/dist/cli/{chunk-4LE4OXXN.mjs → chunk-NV5VCWNJ.mjs} +1 -1
- package/dist/cli/{chunk-P2W372EW.js → chunk-POQ7QWVA.js} +48 -48
- package/dist/cli/{chunk-NTBOTP6U.mjs → chunk-Q2NRMSOJ.mjs} +1 -1
- package/dist/cli/{chunk-JF3R6BNL.mjs → chunk-RST4XEI7.mjs} +3 -3
- package/dist/cli/{chunk-TG6SWI26.mjs → chunk-SC2MM6IY.mjs} +2 -2
- package/dist/cli/{chunk-NGDV6VG6.mjs → chunk-TIBMH2VI.mjs} +1 -1
- package/dist/cli/{chunk-C4Q5JWU3.mjs → chunk-TTIISDJB.mjs} +1 -1
- package/dist/cli/{chunk-LRIXR5QU.js → chunk-VCW425WW.js} +26 -26
- package/dist/cli/{chunk-NGHN37LZ.mjs → chunk-VUEQBNG7.mjs} +5 -2
- package/dist/cli/{chunk-5UFGNQPB.js → chunk-WGPPCGGS.js} +8 -8
- package/dist/cli/{chunk-USVQU4FG.js → chunk-XFS5MNSM.js} +226 -226
- package/dist/cli/{chunk-XHP2OVMG.js → chunk-YHSAUVJ3.js} +8 -8
- package/dist/cli/{csv-JCT62ZYQ.js → csv-DZY7OAFK.js} +12 -12
- package/dist/cli/{csv-VRCG5NTO.mjs → csv-Q7XLUTXX.mjs} +3 -3
- package/dist/cli/{db-TXPBHVLO.mjs → db-5CLCESHQ.mjs} +4 -4
- package/dist/cli/{db-C2FWHDSR.js → db-FRJFSTIF.js} +29 -29
- package/dist/cli/{describe-BTXARLAZ.mjs → describe-QDIM53RP.mjs} +8 -8
- package/dist/cli/{describe-R5MCMIU3.js → describe-Y7E6FPUC.js} +18 -18
- package/dist/cli/{executions-OJYCYPK2.mjs → executions-M2QRHUDM.mjs} +4 -4
- package/dist/cli/{executions-Q5ZK7H6L.js → executions-YISFXRPZ.js} +6 -6
- package/dist/cli/{feedback-XIWI37PD.mjs → feedback-FICCIDJQ.mjs} +3 -3
- package/dist/cli/{feedback-X6Q3ABCY.js → feedback-HNJVF6AQ.js} +7 -7
- package/dist/cli/git-RBHELB5Y.js +23 -0
- package/dist/cli/{git-HW5SQRNJ.mjs → git-WRTQIX6R.mjs} +4 -4
- package/dist/cli/index.js +172 -153
- package/dist/cli/index.mjs +121 -102
- package/dist/cli/{legacy-noops-EBRICEDC.mjs → legacy-noops-6HJZDXLH.mjs} +4 -4
- package/dist/cli/{legacy-noops-2WHVV6XA.js → legacy-noops-E2R3P424.js} +7 -7
- package/dist/cli/{monitors-VNDYLLIX.js → monitors-DRWEUXDG.js} +85 -85
- package/dist/cli/{monitors-5CYSLU3P.mjs → monitors-HGIB7TPZ.mjs} +4 -4
- package/dist/cli/{org-3ESTK25P.js → org-467XUTRD.js} +64 -64
- package/dist/cli/{org-WV6GOBNV.mjs → org-NHILTL3P.mjs} +4 -4
- package/dist/cli/{play-AA2FORIH.mjs → play-JEI3F2M4.mjs} +7 -7
- package/dist/cli/play-Y66Z4I7K.js +157 -0
- package/dist/cli/{providers-H47XKFEX.mjs → providers-6INAFXGV.mjs} +4 -4
- package/dist/cli/{providers-F2V2QI5Z.js → providers-KOKGN5YP.js} +7 -7
- package/dist/cli/{quickstart-E3VQKDMU.js → quickstart-ELSP2FZI.js} +5 -5
- package/dist/cli/{quickstart-YIIXVX6Z.mjs → quickstart-QMRYNXDM.mjs} +3 -3
- package/dist/cli/{search-MI7OUPQS.mjs → search-HFUSEL3S.mjs} +5 -5
- package/dist/cli/search-P5HU6U6X.js +26 -0
- package/dist/cli/{secrets-HBNK3VCN.js → secrets-6OUGIWPM.js} +13 -13
- package/dist/cli/{secrets-B4A5SZR7.mjs → secrets-TSFBMX65.mjs} +4 -4
- package/dist/cli/{sessions-7L56I743.js → sessions-6VJUWBCJ.js} +5 -5
- package/dist/cli/{sessions-6CPUREXX.mjs → sessions-GE3GEQY3.mjs} +4 -4
- package/dist/cli/{settings-LVW2YBSI.js → settings-633RRITH.js} +74 -74
- package/dist/cli/{settings-GTABNW5O.mjs → settings-G5FDUOZJ.mjs} +7 -7
- package/dist/cli/{setup-WBWOV3LQ.mjs → setup-WOMOSJWB.mjs} +6 -6
- package/dist/cli/{setup-7I5ROB6J.js → setup-X2U5RX5R.js} +41 -41
- package/dist/cli/skills-BZCMRUZZ.js +28 -0
- package/dist/cli/{skills-HTJERGGP.mjs → skills-NDHK6HRC.mjs} +4 -4
- package/dist/cli/{tools-EHPNO6JC.mjs → tools-GILOEDEQ.mjs} +6 -6
- package/dist/cli/tools-Y6BDEUS3.js +40 -0
- package/dist/cli/{update-EEXWKAD2.mjs → update-H6APTLX7.mjs} +6 -6
- package/dist/cli/update-RQWIZOBF.js +28 -0
- package/dist/cli/{workflow-FWYWFUCN.mjs → workflow-MLYJQCP3.mjs} +5 -5
- package/dist/cli/{workflow-UBZDFKTY.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-2JOTPVMO.js +0 -39
- package/dist/cli/git-HFO5FYKX.js +0 -23
- package/dist/cli/play-NT6RJ6QD.js +0 -157
- package/dist/cli/search-EDN57JRG.js +0 -26
- package/dist/cli/skills-NFWV6IDQ.js +0 -28
- package/dist/cli/tools-SUWHHSVG.js +0 -40
- package/dist/cli/update-7OBAHXYB.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,7 +25,9 @@ require('./chunk-LOWL2IEA.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
var _chunkCJVB4RVYjs = require('./chunk-CJVB4RVY.js');
|
|
29
31
|
|
|
30
32
|
|
|
31
33
|
|
|
@@ -40,7 +42,7 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
|
40
42
|
|
|
41
43
|
|
|
42
44
|
|
|
43
|
-
var
|
|
45
|
+
var _chunkCMIRZZT4js = require('./chunk-CMIRZZT4.js');
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
|
|
@@ -51,11 +53,10 @@ var _chunkAFCHR4YFjs = require('./chunk-AFCHR4YF.js');
|
|
|
51
53
|
|
|
52
54
|
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
var _chunk3Z4P6FTTjs = require('./chunk-3Z4P6FTT.js');
|
|
56
|
+
var _chunk3PGTFASBjs = require('./chunk-3PGTFASB.js');
|
|
56
57
|
require('./chunk-XNYIZMNQ.js');
|
|
57
58
|
require('./chunk-7P5AA3SN.js');
|
|
58
|
-
require('./chunk-
|
|
59
|
+
require('./chunk-IFKSXI4W.js');
|
|
59
60
|
require('./chunk-OG64RBAC.js');
|
|
60
61
|
|
|
61
62
|
|
|
@@ -125,48 +126,48 @@ var _os = require('os');
|
|
|
125
126
|
var COMMAND_GROUPS = [
|
|
126
127
|
{
|
|
127
128
|
names: ["auth"],
|
|
128
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-
|
|
129
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-A4UKONKC.js")))).registerAuthCommands
|
|
129
130
|
},
|
|
130
131
|
{
|
|
131
132
|
names: ["providers"],
|
|
132
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./providers-
|
|
133
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./providers-KOKGN5YP.js")))).registerProviderCommands
|
|
133
134
|
},
|
|
134
135
|
{
|
|
135
136
|
names: ["search"],
|
|
136
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./search-
|
|
137
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./search-P5HU6U6X.js")))).registerSearchCommand
|
|
137
138
|
},
|
|
138
139
|
{
|
|
139
140
|
names: ["describe"],
|
|
140
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
141
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-Y7E6FPUC.js")))).registerDescribeCommand
|
|
141
142
|
},
|
|
142
143
|
{
|
|
143
144
|
names: ["tools"],
|
|
144
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-
|
|
145
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-Y6BDEUS3.js")))).registerToolsCommands
|
|
145
146
|
},
|
|
146
147
|
{
|
|
147
148
|
names: ["executions"],
|
|
148
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./executions-
|
|
149
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./executions-YISFXRPZ.js")))).registerExecutionsCommands
|
|
149
150
|
},
|
|
150
151
|
{
|
|
151
152
|
names: ["plays", "runs"],
|
|
152
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./play-
|
|
153
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./play-Y66Z4I7K.js")))).registerPlayCommands
|
|
153
154
|
},
|
|
154
155
|
{
|
|
155
156
|
names: ["sessions"],
|
|
156
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./sessions-
|
|
157
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./sessions-6VJUWBCJ.js")))).registerSessionsCommands
|
|
157
158
|
},
|
|
158
159
|
{
|
|
159
160
|
names: ["workflows"],
|
|
160
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-
|
|
161
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-TC72DBUF.js")))).registerWorkflowCommands
|
|
161
162
|
},
|
|
162
163
|
{
|
|
163
164
|
names: ["secrets"],
|
|
164
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./secrets-
|
|
165
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./secrets-6OUGIWPM.js")))).registerSecretsCommands
|
|
165
166
|
},
|
|
166
167
|
{
|
|
167
168
|
names: ["settings", "notifications"],
|
|
168
169
|
load: async () => {
|
|
169
|
-
const commands = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-
|
|
170
|
+
const commands = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-633RRITH.js")));
|
|
170
171
|
return (p) => {
|
|
171
172
|
commands.registerSettingsCommands(p);
|
|
172
173
|
commands.registerNotificationCommands(p);
|
|
@@ -175,51 +176,51 @@ var COMMAND_GROUPS = [
|
|
|
175
176
|
},
|
|
176
177
|
{
|
|
177
178
|
names: ["billing"],
|
|
178
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./billing-
|
|
179
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./billing-6LXNCN5G.js")))).registerBillingCommands
|
|
179
180
|
},
|
|
180
181
|
{
|
|
181
182
|
names: ["monitors"],
|
|
182
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./monitors-
|
|
183
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./monitors-DRWEUXDG.js")))).registerMonitorsCommands
|
|
183
184
|
},
|
|
184
185
|
{
|
|
185
186
|
names: ["org"],
|
|
186
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./org-
|
|
187
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./org-467XUTRD.js")))).registerOrgCommands
|
|
187
188
|
},
|
|
188
189
|
{
|
|
189
190
|
names: ["git", "projects", "deployments"],
|
|
190
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./git-
|
|
191
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./git-RBHELB5Y.js")))).registerGitCommands
|
|
191
192
|
},
|
|
192
193
|
{
|
|
193
194
|
names: ["csv"],
|
|
194
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./csv-
|
|
195
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./csv-DZY7OAFK.js")))).registerCsvCommands
|
|
195
196
|
},
|
|
196
197
|
{
|
|
197
198
|
names: ["db"],
|
|
198
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./db-
|
|
199
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./db-FRJFSTIF.js")))).registerDbCommands
|
|
199
200
|
},
|
|
200
201
|
{
|
|
201
202
|
names: ["feedback"],
|
|
202
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./feedback-
|
|
203
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./feedback-HNJVF6AQ.js")))).registerFeedbackCommands
|
|
203
204
|
},
|
|
204
205
|
{
|
|
205
206
|
names: ["enrich", "session", "backend"],
|
|
206
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./legacy-noops-
|
|
207
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./legacy-noops-E2R3P424.js")))).registerDeprecatedCommands
|
|
207
208
|
},
|
|
208
209
|
{
|
|
209
210
|
names: ["update"],
|
|
210
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./update-
|
|
211
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./update-RQWIZOBF.js")))).registerUpdateCommand
|
|
211
212
|
},
|
|
212
213
|
{
|
|
213
214
|
names: ["skills", "skills-auto-sync"],
|
|
214
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./skills-
|
|
215
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./skills-BZCMRUZZ.js")))).registerSkillsCommand
|
|
215
216
|
},
|
|
216
217
|
{
|
|
217
218
|
names: ["setup", "doctor"],
|
|
218
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./setup-
|
|
219
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./setup-X2U5RX5R.js")))).registerSetupCommands
|
|
219
220
|
},
|
|
220
221
|
{
|
|
221
222
|
names: ["quickstart"],
|
|
222
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./quickstart-
|
|
223
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./quickstart-ELSP2FZI.js")))).registerQuickstartCommands
|
|
223
224
|
}
|
|
224
225
|
];
|
|
225
226
|
async function registerDeeplineCommandGroups(program, requestedCommand) {
|
|
@@ -256,7 +257,7 @@ var MAX_SESSIONS = 20;
|
|
|
256
257
|
function helpSeenPath(homeDir = _os.homedir.call(void 0, )) {
|
|
257
258
|
return _path.join.call(void 0, homeDir, ".local", "deepline", "sdk-cli", "help-seen.json");
|
|
258
259
|
}
|
|
259
|
-
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, )) {
|
|
260
261
|
const explicit = _chunkHXENYWVSjs.helpDetailFromArgv.call(void 0, argv);
|
|
261
262
|
if (explicit === "quiet") return { detail: "quiet", firstRead: false };
|
|
262
263
|
if (!sessionId) return { detail: explicit, firstRead: false };
|
|
@@ -338,7 +339,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
|
338
339
|
async function reportAutoUpdateEvent(input) {
|
|
339
340
|
let apiKey = "";
|
|
340
341
|
try {
|
|
341
|
-
apiKey =
|
|
342
|
+
apiKey = _chunk3PGTFASBjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
342
343
|
} catch (e2) {
|
|
343
344
|
return;
|
|
344
345
|
}
|
|
@@ -354,15 +355,15 @@ async function reportAutoUpdateEvent(input) {
|
|
|
354
355
|
headers: {
|
|
355
356
|
Authorization: `Bearer ${apiKey}`,
|
|
356
357
|
"Content-Type": "application/json",
|
|
357
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
358
|
+
"User-Agent": `deepline-ts-sdk/${_chunk3PGTFASBjs.SDK_VERSION}`,
|
|
358
359
|
"X-Deepline-Client-Family": "sdk",
|
|
359
360
|
"X-Deepline-CLI-Family": "sdk",
|
|
360
|
-
"X-Deepline-CLI-Version":
|
|
361
|
-
"X-Deepline-SDK-Version":
|
|
361
|
+
"X-Deepline-CLI-Version": _chunk3PGTFASBjs.SDK_VERSION,
|
|
362
|
+
"X-Deepline-SDK-Version": _chunk3PGTFASBjs.SDK_VERSION
|
|
362
363
|
},
|
|
363
364
|
body: JSON.stringify({
|
|
364
365
|
event: input.event,
|
|
365
|
-
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,
|
|
366
367
|
target_version: input.response.latest,
|
|
367
368
|
reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
|
|
368
369
|
command: _nullishCoalesce(input.response.command, () => ( null)),
|
|
@@ -381,7 +382,7 @@ function envTruthy(name) {
|
|
|
381
382
|
return value === "1" || value === "true" || value === "yes";
|
|
382
383
|
}
|
|
383
384
|
function shouldSkipSelfUpdate(policy) {
|
|
384
|
-
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, );
|
|
385
386
|
}
|
|
386
387
|
function parseSemver(version) {
|
|
387
388
|
const trimmed = _optionalChain([version, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]);
|
|
@@ -411,7 +412,7 @@ function compareSemver(left, right) {
|
|
|
411
412
|
}
|
|
412
413
|
function isDowngradeAutoUpdateResponse(response) {
|
|
413
414
|
const target = _optionalChain([response, 'optionalAccess', _19 => _19.latest, 'optionalAccess', _20 => _20.trim, 'call', _21 => _21()]);
|
|
414
|
-
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;
|
|
415
416
|
if (!target) return false;
|
|
416
417
|
return compareSemver(target, current) < 0;
|
|
417
418
|
}
|
|
@@ -450,7 +451,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
450
451
|
}
|
|
451
452
|
if (isDowngradeAutoUpdateResponse(response)) {
|
|
452
453
|
const target = response.latest;
|
|
453
|
-
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;
|
|
454
455
|
process.stderr.write(
|
|
455
456
|
`Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
|
|
456
457
|
`
|
|
@@ -458,12 +459,12 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
458
459
|
return false;
|
|
459
460
|
}
|
|
460
461
|
const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
|
|
461
|
-
const plan =
|
|
462
|
+
const plan = _chunkJFYOV3HLjs.resolveUpdatePlan.call(void 0, {
|
|
462
463
|
packageSpec,
|
|
463
464
|
requireVerifiedNpmOwnership: true,
|
|
464
465
|
npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
|
|
465
466
|
});
|
|
466
|
-
if (!
|
|
467
|
+
if (!_chunkJFYOV3HLjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
|
|
467
468
|
return false;
|
|
468
469
|
}
|
|
469
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";
|
|
@@ -477,7 +478,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
477
478
|
event: "started",
|
|
478
479
|
installKind: plan.kind
|
|
479
480
|
});
|
|
480
|
-
const updateResult = await
|
|
481
|
+
const updateResult = await _chunkJFYOV3HLjs.runAutomaticUpdatePlan.call(void 0, plan);
|
|
481
482
|
if (updateResult.status === "skipped_previous_failure") {
|
|
482
483
|
void reportAutoUpdateEvent({
|
|
483
484
|
baseUrl,
|
|
@@ -538,85 +539,103 @@ function resolveCliMaintenancePolicy(input) {
|
|
|
538
539
|
}
|
|
539
540
|
|
|
540
541
|
// src/cli/output-size-reporting.ts
|
|
541
|
-
var
|
|
542
|
-
var
|
|
543
|
-
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
|
+
}
|
|
544
571
|
function chunkText(chunk) {
|
|
545
572
|
if (typeof chunk === "string") return chunk;
|
|
546
573
|
if (chunk instanceof Uint8Array) return Buffer.from(chunk).toString();
|
|
547
574
|
return "";
|
|
548
575
|
}
|
|
549
|
-
function
|
|
550
|
-
let
|
|
551
|
-
|
|
552
|
-
|
|
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
|
+
});
|
|
553
582
|
const write = stream.write.bind(stream);
|
|
554
583
|
stream.write = ((chunk, ...args) => {
|
|
555
|
-
|
|
556
|
-
if (text) {
|
|
557
|
-
chars += text.length;
|
|
558
|
-
newlines += text.split("\n").length - 1;
|
|
559
|
-
endsMidLine = !text.endsWith("\n");
|
|
560
|
-
}
|
|
584
|
+
tally = addText(tally, chunkText(chunk));
|
|
561
585
|
return write(chunk, ...args);
|
|
562
586
|
});
|
|
563
|
-
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
|
+
};
|
|
564
597
|
}
|
|
565
|
-
function
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
const disabled = ["1", "true", "yes", "on"].includes(
|
|
570
|
-
String(_nullishCoalesce(process.env[REPORTING_DISABLE_ENV], () => ( ""))).trim().toLowerCase()
|
|
571
|
-
);
|
|
572
|
-
if (disabled) return;
|
|
573
|
-
const stdout = stdoutSize();
|
|
574
|
-
const stderr = stderrSize();
|
|
575
|
-
if (stdout.lines + stderr.lines <= REPORT_MIN_OUTPUT_LINES) return;
|
|
576
|
-
let baseUrl = "";
|
|
577
|
-
let apiKey = "";
|
|
578
|
-
try {
|
|
579
|
-
baseUrl = _chunk3Z4P6FTTjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
580
|
-
apiKey = _chunk3Z4P6FTTjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
581
|
-
} catch (e4) {
|
|
582
|
-
return;
|
|
583
|
-
}
|
|
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);
|
|
584
602
|
if (!apiKey) return;
|
|
585
|
-
const
|
|
586
|
-
|
|
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
|
-
|
|
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
|
+
});
|
|
620
639
|
};
|
|
621
640
|
}
|
|
622
641
|
|
|
@@ -681,7 +700,7 @@ function topLevelCommandKnown(program, commandName) {
|
|
|
681
700
|
);
|
|
682
701
|
}
|
|
683
702
|
async function runPlayRunnerHealthCheck() {
|
|
684
|
-
|
|
703
|
+
_chunk3PGTFASBjs.resolveConfig.call(void 0, );
|
|
685
704
|
const dir = await _promises.mkdtemp.call(void 0, _path.join.call(void 0, _os.tmpdir.call(void 0, ), "deepline-health-play-"));
|
|
686
705
|
const file = _path.join.call(void 0, dir, "health-check.play.ts");
|
|
687
706
|
try {
|
|
@@ -711,7 +730,7 @@ async function runPlayRunnerHealthCheck() {
|
|
|
711
730
|
});
|
|
712
731
|
let exitCode = 1;
|
|
713
732
|
try {
|
|
714
|
-
const { handlePlayRun } = await Promise.resolve().then(() => _interopRequireWildcard(require("./play-
|
|
733
|
+
const { handlePlayRun } = await Promise.resolve().then(() => _interopRequireWildcard(require("./play-Y66Z4I7K.js")));
|
|
715
734
|
exitCode = await handlePlayRun([
|
|
716
735
|
file,
|
|
717
736
|
"--input",
|
|
@@ -751,7 +770,7 @@ function preflightErrorMessage(error) {
|
|
|
751
770
|
return error instanceof Error ? error.message : String(error);
|
|
752
771
|
}
|
|
753
772
|
async function runPreflightCheck() {
|
|
754
|
-
const baseUrl =
|
|
773
|
+
const baseUrl = _chunk3PGTFASBjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
755
774
|
const healthController = new AbortController();
|
|
756
775
|
const healthTimeout = setTimeout(
|
|
757
776
|
() => healthController.abort(),
|
|
@@ -766,9 +785,9 @@ async function runPreflightCheck() {
|
|
|
766
785
|
version: pickString(payload, "version")
|
|
767
786
|
};
|
|
768
787
|
}).catch(() => ({ status: "unreachable", version: null })).finally(() => clearTimeout(healthTimeout));
|
|
769
|
-
const apiKey =
|
|
770
|
-
const http = apiKey ? new (0,
|
|
771
|
-
|
|
788
|
+
const apiKey = _chunk3PGTFASBjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
789
|
+
const http = apiKey ? new (0, _chunk3PGTFASBjs.HttpClient)(
|
|
790
|
+
_chunk3PGTFASBjs.resolveConfig.call(void 0, {
|
|
772
791
|
baseUrl,
|
|
773
792
|
apiKey,
|
|
774
793
|
timeout: PREFLIGHT_TIMEOUT_MS,
|
|
@@ -813,7 +832,7 @@ async function runPreflightCheck() {
|
|
|
813
832
|
const connected = authStatus === "connected" || authStatus === "claimed";
|
|
814
833
|
return {
|
|
815
834
|
status: healthResult.status === "ok" && connected ? "ok" : "check",
|
|
816
|
-
cli_version:
|
|
835
|
+
cli_version: _chunk3PGTFASBjs.SDK_VERSION,
|
|
817
836
|
host: baseUrl,
|
|
818
837
|
health: {
|
|
819
838
|
status: healthResult.status,
|
|
@@ -839,7 +858,7 @@ async function runPreflightCheck() {
|
|
|
839
858
|
{
|
|
840
859
|
title: "preflight",
|
|
841
860
|
lines: [
|
|
842
|
-
`cli: ${
|
|
861
|
+
`cli: ${_chunk3PGTFASBjs.SDK_VERSION}`,
|
|
843
862
|
`host: ${baseUrl}`,
|
|
844
863
|
`health: ${healthResult.status}`,
|
|
845
864
|
`auth: ${authStatus}`,
|
|
@@ -864,12 +883,12 @@ function printPreflightHuman(data) {
|
|
|
864
883
|
}
|
|
865
884
|
async function newerCliCommandHint(baseUrl, command) {
|
|
866
885
|
if (!command.trim()) return null;
|
|
867
|
-
const { response, error } = await
|
|
886
|
+
const { response, error } = await _chunkCJVB4RVYjs.checkSdkCompatibility.call(void 0, baseUrl, { command });
|
|
868
887
|
if (error || !response) return null;
|
|
869
888
|
const introduced = response.command_introduced_in;
|
|
870
889
|
if (introduced) {
|
|
871
890
|
return [
|
|
872
|
-
`\`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}.`,
|
|
873
892
|
` ${introduced.reason}`,
|
|
874
893
|
` Update with: ${response.update_command}`,
|
|
875
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."
|
|
@@ -878,7 +897,7 @@ async function newerCliCommandHint(baseUrl, command) {
|
|
|
878
897
|
if (!response.update_required) return null;
|
|
879
898
|
return [
|
|
880
899
|
response.message,
|
|
881
|
-
` Installed: ${
|
|
900
|
+
` Installed: ${_chunk3PGTFASBjs.SDK_VERSION}. Run: ${response.update_command}`,
|
|
882
901
|
" If an agent skill told you to run this, the skill is newer than this CLI."
|
|
883
902
|
].join("\n");
|
|
884
903
|
}
|
|
@@ -897,7 +916,7 @@ async function runMain(ensureTransport) {
|
|
|
897
916
|
const program = new (0, _commander.Command)();
|
|
898
917
|
program.name("deepline").description(
|
|
899
918
|
"Deepline CLI \u2014 GTM enrichment tools, plays, and runs from your terminal."
|
|
900
|
-
).version(
|
|
919
|
+
).version(_chunk3PGTFASBjs.SDK_VERSION, "-v, --version", "Show version").option(
|
|
901
920
|
"--maintenance <policy>",
|
|
902
921
|
"Installation maintenance: configured preferences or off; independent of output format",
|
|
903
922
|
parseCliMaintenancePolicy,
|
|
@@ -953,7 +972,7 @@ Exit codes:
|
|
|
953
972
|
if (actionCommand.name() !== "version") {
|
|
954
973
|
await ensureTransport();
|
|
955
974
|
}
|
|
956
|
-
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()) {
|
|
957
976
|
return;
|
|
958
977
|
}
|
|
959
978
|
const compatibilityCommand = compatibilityCommandPath(actionCommand) || actionCommand.name();
|
|
@@ -966,16 +985,16 @@ Exit codes:
|
|
|
966
985
|
_optionalChain([progress, 'optionalAccess', _37 => _37.phase, 'call', _38 => _38("checking sdk compatibility")]);
|
|
967
986
|
}
|
|
968
987
|
const startup = await runStartupStage("SDK compatibility", async () => {
|
|
969
|
-
const baseUrl =
|
|
970
|
-
if (maintenance !== "off")
|
|
988
|
+
const baseUrl = _chunk3PGTFASBjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
989
|
+
if (maintenance !== "off") _chunkCJVB4RVYjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
971
990
|
const shouldDeferSkillsSync = maintenance === "off" || shouldDeferSkillsSyncForCommand();
|
|
972
|
-
const skillsVersion = shouldDeferSkillsSync ? void 0 :
|
|
973
|
-
const trusted =
|
|
991
|
+
const skillsVersion = shouldDeferSkillsSync ? void 0 : _chunk3PGTFASBjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
992
|
+
const trusted = _chunkCJVB4RVYjs.readTrustedCleanCompatibility.call(void 0,
|
|
974
993
|
baseUrl,
|
|
975
994
|
compatibilityCommand,
|
|
976
995
|
skillsVersion
|
|
977
996
|
);
|
|
978
|
-
const fastDeadline = trusted === null &&
|
|
997
|
+
const fastDeadline = trusted === null && _chunkCJVB4RVYjs.readFreshCleanCompatibility.call(void 0,
|
|
979
998
|
baseUrl,
|
|
980
999
|
compatibilityCommand,
|
|
981
1000
|
skillsVersion
|
|
@@ -999,12 +1018,12 @@ Exit codes:
|
|
|
999
1018
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null)),
|
|
1000
1019
|
fastDeadline
|
|
1001
1020
|
},
|
|
1002
|
-
() =>
|
|
1021
|
+
() => _chunkCJVB4RVYjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1003
1022
|
command: compatibilityCommand,
|
|
1004
1023
|
skillsVersion,
|
|
1005
1024
|
persistCache: maintenance !== "off",
|
|
1006
1025
|
catalog: _chunkQJBJZVG6js.compatibilityCatalog.call(void 0, actionCommand),
|
|
1007
|
-
...fastDeadline ? { timeoutMs:
|
|
1026
|
+
...fastDeadline ? { timeoutMs: _chunkCJVB4RVYjs.SDK_COMPATIBILITY_FAST_DEADLINE_MS } : {}
|
|
1008
1027
|
})
|
|
1009
1028
|
);
|
|
1010
1029
|
if (compatibility.error) {
|
|
@@ -1028,7 +1047,7 @@ Exit codes:
|
|
|
1028
1047
|
response: compatibility.response
|
|
1029
1048
|
};
|
|
1030
1049
|
}
|
|
1031
|
-
|
|
1050
|
+
_chunkCJVB4RVYjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
1032
1051
|
quietAdvisory: process.argv.includes("--json")
|
|
1033
1052
|
});
|
|
1034
1053
|
return {
|
|
@@ -1049,7 +1068,7 @@ Exit codes:
|
|
|
1049
1068
|
() => _chunkAYHLUHE5js.traceCliSpan.call(void 0,
|
|
1050
1069
|
"cli.sdk_skills_sync",
|
|
1051
1070
|
{ baseUrl: startup.baseUrl },
|
|
1052
|
-
() =>
|
|
1071
|
+
() => _chunkCJVB4RVYjs.syncSdkSkillsIfNeeded.call(void 0, startup.baseUrl, {
|
|
1053
1072
|
update: skillsUpdate,
|
|
1054
1073
|
mode: "detached"
|
|
1055
1074
|
})
|
|
@@ -1077,8 +1096,8 @@ Examples:
|
|
|
1077
1096
|
`
|
|
1078
1097
|
).action(async (options) => {
|
|
1079
1098
|
const data = await runPreflightCheck();
|
|
1080
|
-
if (
|
|
1081
|
-
|
|
1099
|
+
if (_chunkCMIRZZT4js.shouldEmitJson.call(void 0, options.json)) {
|
|
1100
|
+
_chunkCMIRZZT4js.printJson.call(void 0, data);
|
|
1082
1101
|
} else {
|
|
1083
1102
|
printPreflightHuman(data);
|
|
1084
1103
|
}
|
|
@@ -1100,7 +1119,7 @@ Examples:
|
|
|
1100
1119
|
).action(async (options) => {
|
|
1101
1120
|
if (options.playRunner) {
|
|
1102
1121
|
const data = await runPlayRunnerHealthCheck();
|
|
1103
|
-
|
|
1122
|
+
_chunkCMIRZZT4js.printCommandEnvelope.call(void 0, data, {
|
|
1104
1123
|
json: options.json,
|
|
1105
1124
|
text: `play runner: ${data.playRunner.status} (${data.playRunner.check})
|
|
1106
1125
|
`
|
|
@@ -1108,15 +1127,15 @@ Examples:
|
|
|
1108
1127
|
return;
|
|
1109
1128
|
}
|
|
1110
1129
|
try {
|
|
1111
|
-
const { httpJson, readStatusBanner, statusBannerLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-
|
|
1112
|
-
const baseUrl =
|
|
1130
|
+
const { httpJson, readStatusBanner, statusBannerLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-A4UKONKC.js")));
|
|
1131
|
+
const baseUrl = _chunk3PGTFASBjs.resolveBaseUrlOnly.call(void 0, );
|
|
1113
1132
|
const [{ status, data }, banner] = await Promise.all([
|
|
1114
1133
|
httpJson("GET", `${baseUrl}/api/v2/health`, null),
|
|
1115
1134
|
readStatusBanner(baseUrl)
|
|
1116
1135
|
]);
|
|
1117
1136
|
if (status !== 200) throw new Error(`HTTP ${status}`);
|
|
1118
1137
|
const lines = [`${baseUrl}: ${data.status}`, statusBannerLine(banner)];
|
|
1119
|
-
|
|
1138
|
+
_chunkCMIRZZT4js.printCommandEnvelope.call(void 0,
|
|
1120
1139
|
{ ...data, status_banner: banner },
|
|
1121
1140
|
{
|
|
1122
1141
|
json: options.json,
|
|
@@ -1144,10 +1163,10 @@ Examples:
|
|
|
1144
1163
|
`
|
|
1145
1164
|
).action((options) => {
|
|
1146
1165
|
if (options.json) {
|
|
1147
|
-
|
|
1166
|
+
_chunkCMIRZZT4js.printCompactJson.call(void 0, { version: _chunk3PGTFASBjs.SDK_VERSION });
|
|
1148
1167
|
return;
|
|
1149
1168
|
}
|
|
1150
|
-
process.stdout.write(`deepline ${
|
|
1169
|
+
process.stdout.write(`deepline ${_chunk3PGTFASBjs.SDK_VERSION}
|
|
1151
1170
|
`);
|
|
1152
1171
|
});
|
|
1153
1172
|
if (process.argv.slice(2).length === 0) {
|
|
@@ -1165,7 +1184,7 @@ Examples:
|
|
|
1165
1184
|
const requestedTopLevelCommand = _nullishCoalesce(process.argv.slice(2)[0], () => ( ""));
|
|
1166
1185
|
if (!topLevelCommandKnown(program, requestedTopLevelCommand)) {
|
|
1167
1186
|
console.error(`error: unknown command '${requestedTopLevelCommand}'`);
|
|
1168
|
-
const baseUrl =
|
|
1187
|
+
const baseUrl = _chunk3PGTFASBjs.autoDetectBaseUrl.call(void 0, );
|
|
1169
1188
|
await ensureTransport();
|
|
1170
1189
|
const versionHint = await newerCliCommandHint(
|
|
1171
1190
|
baseUrl,
|
|
@@ -1183,8 +1202,8 @@ Examples:
|
|
|
1183
1202
|
const helpArgs = process.argv.slice(2);
|
|
1184
1203
|
const helpPositionals = helpArgs.filter((arg) => !arg.startsWith("-"));
|
|
1185
1204
|
if (helpPositionals.length === 0 ? helpArgs.includes("--help") || helpArgs.includes("-h") : helpPositionals.length === 1 && helpPositionals[0] === "help") {
|
|
1186
|
-
const { authStatusLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-
|
|
1187
|
-
rootHelpStatus = `Version: ${
|
|
1205
|
+
const { authStatusLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-A4UKONKC.js")));
|
|
1206
|
+
rootHelpStatus = `Version: ${_chunk3PGTFASBjs.SDK_VERSION}
|
|
1188
1207
|
${await authStatusLine()}
|
|
1189
1208
|
`;
|
|
1190
1209
|
}
|
|
@@ -1194,7 +1213,7 @@ ${await authStatusLine()}
|
|
|
1194
1213
|
ms: Date.now() - mainStartedAt,
|
|
1195
1214
|
ok: true
|
|
1196
1215
|
});
|
|
1197
|
-
await
|
|
1216
|
+
await _chunkCJVB4RVYjs.maybeReportSdkCliFailure.call(void 0, {
|
|
1198
1217
|
argv: process.argv.slice(2),
|
|
1199
1218
|
startedAtMs: mainStartedAt,
|
|
1200
1219
|
exitCode: typeof process.exitCode === "number" ? process.exitCode : null
|
|
@@ -1219,7 +1238,7 @@ ${await authStatusLine()}
|
|
|
1219
1238
|
const commandPath = invocation.commandPath || requestedTopLevelCommand;
|
|
1220
1239
|
await ensureTransport();
|
|
1221
1240
|
const versionHint = await newerCliCommandHint(
|
|
1222
|
-
|
|
1241
|
+
_chunk3PGTFASBjs.autoDetectBaseUrl.call(void 0, ),
|
|
1223
1242
|
commandPath
|
|
1224
1243
|
);
|
|
1225
1244
|
if (versionHint) console.error(versionHint);
|
|
@@ -1230,24 +1249,24 @@ ${await authStatusLine()}
|
|
|
1230
1249
|
process.exitCode = commanderError.code === "commander.unknownCommand" && !wantsJson ? 2 : _nullishCoalesce(commanderError.exitCode, () => ( 1));
|
|
1231
1250
|
return;
|
|
1232
1251
|
} else if (wantsJson) {
|
|
1233
|
-
|
|
1234
|
-
...
|
|
1235
|
-
...error instanceof
|
|
1252
|
+
_chunkCMIRZZT4js.printJson.call(void 0, {
|
|
1253
|
+
..._chunkCMIRZZT4js.errorToJsonPayload.call(void 0, error),
|
|
1254
|
+
...error instanceof _chunk3PGTFASBjs.AuthError ? { next: AUTH_RECOVERY_COMMAND } : {}
|
|
1236
1255
|
});
|
|
1237
1256
|
} else if (error instanceof Error) {
|
|
1238
1257
|
console.error(`Error: ${error.message}`);
|
|
1239
|
-
if (error instanceof
|
|
1258
|
+
if (error instanceof _chunk3PGTFASBjs.AuthError) {
|
|
1240
1259
|
console.error(`Not authenticated. Run: ${AUTH_RECOVERY_COMMAND}`);
|
|
1241
1260
|
}
|
|
1242
|
-
const providerConcurrency =
|
|
1261
|
+
const providerConcurrency = _chunkCMIRZZT4js.formatProviderConcurrencyDiagnostic.call(void 0, error);
|
|
1243
1262
|
if (providerConcurrency) console.error(providerConcurrency);
|
|
1244
1263
|
} else {
|
|
1245
1264
|
console.error(`Error: ${String(error)}`);
|
|
1246
1265
|
}
|
|
1247
1266
|
const explicitExitCode = error && typeof error === "object" && typeof error.exitCode === "number" ? error.exitCode : void 0;
|
|
1248
|
-
const failureExitCode = _nullishCoalesce(explicitExitCode, () => (
|
|
1267
|
+
const failureExitCode = _nullishCoalesce(explicitExitCode, () => ( _chunkCJVB4RVYjs.resolveSdkCliFailureExitCode.call(void 0, error)));
|
|
1249
1268
|
process.exitCode = failureExitCode;
|
|
1250
|
-
await
|
|
1269
|
+
await _chunkCJVB4RVYjs.maybeReportSdkCliFailure.call(void 0, {
|
|
1251
1270
|
argv: process.argv.slice(2),
|
|
1252
1271
|
startedAtMs: mainStartedAt,
|
|
1253
1272
|
exitCode: failureExitCode,
|
|
@@ -1280,7 +1299,7 @@ async function main() {
|
|
|
1280
1299
|
try {
|
|
1281
1300
|
await runMain(ensureTransport);
|
|
1282
1301
|
await ensureTransport();
|
|
1283
|
-
await reportOutputSize();
|
|
1302
|
+
await reportOutputSize(process.exitCode);
|
|
1284
1303
|
} finally {
|
|
1285
1304
|
await _optionalChain([disposeTransport, 'optionalCall', _47 => _47()]);
|
|
1286
1305
|
}
|