deepline 0.3.503 → 0.3.505
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/bundling-sources/sdk/src/types.ts +5 -0
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +35 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-public-aliases.ts +13 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +144 -7
- package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +18 -0
- package/dist/bundling-sources/shared_libs/product-notifications/onboarding-unsubscribe.ts +23 -0
- package/dist/cli/{auth-IC4WLSE3.mjs → auth-AHE2EDQA.mjs} +5 -5
- package/dist/cli/auth-SEPKNRHV.js +43 -0
- package/dist/cli/{billing-2VOV64SD.mjs → billing-7CPWTGGI.mjs} +19 -12
- package/dist/cli/{billing-LWQOII22.js → billing-JOIZPHON.js} +92 -85
- package/dist/cli/{chunk-33JUK73X.js → chunk-3YEOOXD4.js} +96 -37
- package/dist/cli/{chunk-FVDTERO2.js → chunk-45XYW477.js} +21 -21
- package/dist/cli/{chunk-5GI6NKOE.mjs → chunk-4OFSAZN6.mjs} +1 -1
- package/dist/cli/{chunk-D27HP3HS.mjs → chunk-52FPW2RD.mjs} +2 -2
- package/dist/cli/chunk-5LUF4LAR.mjs +209 -0
- package/dist/cli/{chunk-VC5B462T.mjs → chunk-5XT4DZQL.mjs} +2 -2
- package/dist/cli/{chunk-26RSSTCF.js → chunk-6FEN6VWZ.js} +26 -26
- package/dist/cli/{chunk-7HEDCIR3.mjs → chunk-6U3AGJWI.mjs} +1 -1
- package/dist/cli/{chunk-KPBBT6OS.mjs → chunk-7AD565DO.mjs} +1 -1
- package/dist/cli/{chunk-FZHOWPSN.js → chunk-7DDACLMX.js} +16 -16
- package/dist/cli/{chunk-ZEQPCEV4.mjs → chunk-7DDKLFOY.mjs} +3 -3
- package/dist/cli/{chunk-WHP3FJ7T.js → chunk-7QLK2GHL.js} +5 -5
- package/dist/cli/{chunk-BI2Q45SY.mjs → chunk-ACI6CUDX.mjs} +11 -401
- package/dist/cli/{chunk-C5RQTTLP.js → chunk-BWAYMJ23.js} +7 -7
- package/dist/cli/{chunk-YXGPMTAK.js → chunk-CA3SYXCS.js} +2 -2
- package/dist/cli/{chunk-J6RBOLK7.mjs → chunk-CSLLQWAB.mjs} +1 -1
- package/dist/cli/{chunk-F73PD2XD.js → chunk-EMUFF6EU.js} +7 -7
- package/dist/cli/chunk-FIQ5UEIF.mjs +405 -0
- package/dist/cli/{chunk-2626LTU3.js → chunk-GAUNJCXQ.js} +96 -96
- package/dist/cli/{chunk-A2C6ONWA.js → chunk-GXMNOUHP.js} +6 -6
- package/dist/cli/{chunk-MJQOG4TZ.js → chunk-HASFFOSU.js} +16 -16
- package/dist/cli/{chunk-TCQYWZFS.js → chunk-IDAE5VDH.js} +5 -5
- package/dist/cli/{chunk-JJVN7OIX.mjs → chunk-IZYOYXG7.mjs} +4 -4
- package/dist/cli/{chunk-FHJ54BHH.mjs → chunk-JA7YBRP4.mjs} +1 -1
- package/dist/cli/{chunk-HRTDCXHI.js → chunk-JSTKLYYD.js} +2 -2
- package/dist/cli/{chunk-5M5WSFRZ.mjs → chunk-JVKEZT7L.mjs} +48 -8
- package/dist/cli/{chunk-4IIYSBEP.js → chunk-K26YOPDO.js} +50 -10
- package/dist/cli/{chunk-2K2QBLYO.js → chunk-LC4FG34E.js} +53 -53
- package/dist/cli/{chunk-XYZZZLN6.mjs → chunk-MAFZ64RN.mjs} +2 -2
- package/dist/cli/{chunk-B3X4YWQ6.js → chunk-MHZAG2ZQ.js} +80 -470
- package/dist/cli/{chunk-DPI5OYVU.mjs → chunk-NARJWXBR.mjs} +2 -2
- package/dist/cli/{chunk-GLZBFBJS.mjs → chunk-OA6U5NVB.mjs} +5 -5
- package/dist/cli/{chunk-URZNSJE2.mjs → chunk-OMEDQ77C.mjs} +93 -34
- package/dist/cli/{chunk-QIEYEY6Z.js → chunk-OORPAQVC.js} +8 -8
- package/dist/cli/{chunk-WS274KID.mjs → chunk-PDLOPF5L.mjs} +1 -1
- package/dist/cli/{chunk-KGLVATEB.mjs → chunk-PZN24YQQ.mjs} +2 -2
- package/dist/cli/{chunk-GIHNEYBG.mjs → chunk-QGNNAZ5M.mjs} +1 -1
- package/dist/cli/chunk-QYGYVCRI.js +405 -0
- package/dist/cli/chunk-R7J7CJPZ.js +209 -0
- package/dist/cli/{chunk-6XTE6C3W.mjs → chunk-RT3HJBIH.mjs} +12 -12
- package/dist/cli/{chunk-L3TZV625.mjs → chunk-SHKRL7CW.mjs} +1 -1
- package/dist/cli/{chunk-FIUTDSJX.js → chunk-SPN7U3MV.js} +4 -4
- package/dist/cli/{chunk-EQ3WMKFY.mjs → chunk-UZ24SF7N.mjs} +5 -5
- package/dist/cli/{chunk-AARF4SOW.js → chunk-VXKWF3AD.js} +9 -9
- package/dist/cli/{chunk-JPDD4Y53.mjs → chunk-W6I4N4JN.mjs} +6 -6
- package/dist/cli/{chunk-PVA3MWCO.js → chunk-WPCF7C6B.js} +3 -3
- package/dist/cli/{chunk-3CXHK4TW.js → chunk-WTQLUULB.js} +6 -6
- package/dist/cli/{chunk-EDMV4JT5.mjs → chunk-WTUC5VKB.mjs} +2 -2
- package/dist/cli/{chunk-IIP46RVC.js → chunk-XHPB6RGY.js} +1 -1
- package/dist/cli/{chunk-RVOBFO7C.js → chunk-Y52XY56V.js} +41 -41
- package/dist/cli/{chunk-K7NFFQFU.mjs → chunk-YBIVVAL7.mjs} +2 -2
- package/dist/cli/{chunk-HS63YBT5.js → chunk-ZLN2B5YA.js} +3 -3
- package/dist/cli/command-docs.d.mts +2 -1
- package/dist/cli/command-docs.d.ts +2 -1
- package/dist/cli/command-docs.js +6 -2
- package/dist/cli/command-docs.mjs +5 -1
- package/dist/cli/{csv-NEWCNOSZ.js → csv-DZHVIW3G.js} +13 -13
- package/dist/cli/{csv-2TXOI3UE.mjs → csv-WTPI6ZON.mjs} +4 -4
- package/dist/cli/{db-J3IJS4OG.js → db-D7LPPNCC.js} +27 -27
- package/dist/cli/{db-PX7EQEIG.mjs → db-NR4PJ6AF.mjs} +6 -6
- package/dist/cli/describe-HVQBTKFM.js +50 -0
- package/dist/cli/{describe-GQHGTZSL.mjs → describe-NCKAJPUG.mjs} +18 -17
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-FFKK24RY.mjs → executions-RQVJ4LAB.mjs} +6 -6
- package/dist/cli/{executions-RO3TJUXL.js → executions-UQG6LWEN.js} +8 -8
- package/dist/cli/{feedback-ZTO56SRL.mjs → feedback-RD4Y3YQR.mjs} +4 -4
- package/dist/cli/{feedback-XRR4HIS6.js → feedback-TCHA67IA.js} +8 -8
- package/dist/cli/git-TUB2ZUEH.js +25 -0
- package/dist/cli/{git-FIPBVFYZ.mjs → git-Z7434B7Y.mjs} +5 -5
- package/dist/cli/index.js +145 -141
- package/dist/cli/index.mjs +51 -47
- package/dist/cli/{legacy-noops-MTBBGM27.js → legacy-noops-23WRA7DH.js} +8 -8
- package/dist/cli/{legacy-noops-AMD2NWHF.mjs → legacy-noops-LQJU4UIV.mjs} +5 -5
- package/dist/cli/{monitors-42PIGLBF.js → monitors-KOWN7M3V.js} +95 -95
- package/dist/cli/{monitors-24LDKDJX.mjs → monitors-Z6VYUZ2W.mjs} +7 -7
- package/dist/cli/{org-GQMCA3MN.js → org-2T5K2VP5.js} +72 -72
- package/dist/cli/{org-4B7SCFRL.mjs → org-UBNRO5XO.mjs} +6 -6
- package/dist/cli/{pages-PD5EGL2R.mjs → pages-GHPJBVV3.mjs} +6 -6
- package/dist/cli/{pages-RL2M62GJ.js → pages-SRXTU7XO.js} +18 -18
- package/dist/cli/{play-FST6ZAHW.js → play-2HMZ57EZ.js} +324 -517
- package/dist/cli/{play-5V54VTUR.mjs → play-HRQKGTXA.mjs} +24 -217
- package/dist/cli/{providers-N5YVCKPL.mjs → providers-JWJRFRR5.mjs} +6 -6
- package/dist/cli/{providers-HBUUPN7J.js → providers-P5O676MZ.js} +9 -9
- package/dist/cli/{quickstart-NJDDVTQR.mjs → quickstart-S7NZUQRO.mjs} +4 -4
- package/dist/cli/{quickstart-4QIQNSHG.js → quickstart-YCY72TAO.js} +6 -6
- package/dist/cli/{run-FGOKCG4J.js → run-MHLLGF4G.js} +41 -40
- package/dist/cli/{run-JHI5MTHD.mjs → run-QWMRIUIU.mjs} +23 -22
- package/dist/cli/{search-EWIZBIY2.mjs → search-4BFTQUEP.mjs} +8 -7
- package/dist/cli/search-QPUHOEIL.js +33 -0
- package/dist/cli/{search-output-TMQTRC2W.js → search-output-62LBVZHN.js} +6 -6
- package/dist/cli/{search-output-NAK3MWBH.mjs → search-output-LIYHDTBP.mjs} +4 -4
- package/dist/cli/{secrets-ONQVW5SR.mjs → secrets-GW27V77E.mjs} +6 -6
- package/dist/cli/{secrets-5TSUEOJB.js → secrets-KKKHVSOO.js} +15 -15
- package/dist/cli/{sessions-BSGE5EET.js → sessions-R3OEINAR.js} +6 -6
- package/dist/cli/{sessions-B7F5O3ZR.mjs → sessions-R75LBGIL.mjs} +5 -5
- package/dist/cli/{settings-SGGFQV5R.mjs → settings-I3AQZSYG.mjs} +12 -11
- package/dist/cli/{settings-47LARBRU.js → settings-MQIHAEZN.js} +79 -78
- package/dist/cli/{setup-ATGNXQUK.mjs → setup-2YA5MYMS.mjs} +10 -9
- package/dist/cli/{setup-BNFZFXO6.js → setup-X3QRJERP.js} +50 -49
- package/dist/cli/{skills-CIMBRM5R.mjs → skills-7252FOOI.mjs} +8 -7
- package/dist/cli/skills-BPZWMZSL.js +37 -0
- package/dist/cli/tools-F7RVQ3IK.js +57 -0
- package/dist/cli/{tools-DTDXAULX.mjs → tools-SKQTSVGE.mjs} +17 -16
- package/dist/cli/{update-EOIJBJCO.mjs → update-GNBBSKTB.mjs} +10 -9
- package/dist/cli/update-TLSY6LC2.js +35 -0
- package/dist/cli/{workflow-IWXUJPWY.mjs → workflow-OJSAL5FO.mjs} +7 -7
- package/dist/cli/{workflow-V5VKPICQ.js → workflow-QB7YYWPP.js} +17 -17
- package/dist/{client-CIwenMFS.d.ts → client-B3GSaSFn.d.ts} +1 -1
- package/dist/{client-DYAfJpaN.d.mts → client-DEJg0CZn.d.mts} +1 -1
- package/dist/{client-core-DlzP8vEs.d.mts → client-core-C404E33V.d.mts} +5 -0
- package/dist/{client-core-CRjtyMAI.d.ts → client-core-GQmy3N8y.d.ts} +5 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +109 -104
- package/dist/plays/bundle-play-file.mjs +4 -4
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- 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/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-ZCMSXZO4.js +0 -43
- package/dist/cli/describe-LE7EZCL4.js +0 -49
- package/dist/cli/git-26AH4XIO.js +0 -25
- package/dist/cli/search-CTKSEVSO.js +0 -32
- package/dist/cli/skills-6RD25MVM.js +0 -36
- package/dist/cli/tools-TDZH4XHS.js +0 -56
- package/dist/cli/update-Y32VT4VL.js +0 -34
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getActiveCliProgress
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QGNNAZ5M.mjs";
|
|
4
|
+
import {
|
|
5
|
+
maybeReportAutomaticSkillsSyncFailure
|
|
6
|
+
} from "./chunk-FIQ5UEIF.mjs";
|
|
4
7
|
import {
|
|
5
8
|
DEFAULT_SKILL_AGENTS,
|
|
6
9
|
KNOWN_SKILL_AGENTS,
|
|
7
|
-
autoDetectBaseUrl,
|
|
8
10
|
hasActivePluginSkills,
|
|
9
11
|
readSdkSkillsLocalVersion,
|
|
10
12
|
resolveApiKeyForBaseUrl,
|
|
@@ -12,21 +14,17 @@ import {
|
|
|
12
14
|
sdkCliStateDirPath,
|
|
13
15
|
skillsAgentPathSegment,
|
|
14
16
|
writeSdkSkillsLocalVersion
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SHKRL7CW.mjs";
|
|
16
18
|
import {
|
|
17
19
|
SDK_API_CONTRACT,
|
|
18
20
|
SDK_API_MAJOR,
|
|
19
21
|
SDK_VERSION,
|
|
20
|
-
agentSessionIdFromEnvironment,
|
|
21
22
|
deploymentProtectionHeaders,
|
|
22
23
|
detectAgentRuntime
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import {
|
|
25
|
-
DeeplineError
|
|
26
|
-
} from "./chunk-HBL4PM5Q.mjs";
|
|
24
|
+
} from "./chunk-7AD565DO.mjs";
|
|
27
25
|
import {
|
|
28
26
|
SDK_RELEASE
|
|
29
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-6U3AGJWI.mjs";
|
|
30
28
|
|
|
31
29
|
// src/compat.ts
|
|
32
30
|
import { randomUUID } from "crypto";
|
|
@@ -294,388 +292,6 @@ function enforceSdkCompatibilityResponse(response, options = {}) {
|
|
|
294
292
|
}
|
|
295
293
|
}
|
|
296
294
|
|
|
297
|
-
// src/cli/failure-reporting.ts
|
|
298
|
-
import { hostname, platform, release } from "os";
|
|
299
|
-
var FAILURE_REPORT_DISABLE_ENV = "DEEPLINE_DISABLE_FAILURE_REPORTING";
|
|
300
|
-
var REPORT_FAILURE_TIMEOUT_MS = 1e4;
|
|
301
|
-
var BACKGROUND_REPORT_FAILURE_TIMEOUT_MS = 2e3;
|
|
302
|
-
var MAX_FAILURE_TEXT_CHARS = 4e3;
|
|
303
|
-
var MAX_COMMAND_TOKENS = 3;
|
|
304
|
-
var REPORTABLE_EXIT_CODES = /* @__PURE__ */ new Set([4, 5]);
|
|
305
|
-
var EMAIL_RE = /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi;
|
|
306
|
-
var UNIX_PATH_RE = /(?:\/Users\/|\/home\/|\/var\/folders\/|\/tmp\/|\/sessions\/)[^"'\n\r`]+/g;
|
|
307
|
-
var WINDOWS_PATH_RE = /[A-Za-z]:(?:\\{1,2})(?:Users|Temp|tmp)(?:\\{1,2})[^"'\n\r`]+/g;
|
|
308
|
-
var ASSIGNMENT_SECRET_RE = /\b(access[_-]?token|api[_-]?key|apikey|auth(?:orization)?|bearer|password|secret|session)\b(\s*[:=]\s*)(?!Bearer\s+\[redacted-secret\])([^\s,;]+)/gi;
|
|
309
|
-
var BEARER_SECRET_RE = /\b(bearer)\s+([A-Za-z0-9._-]+)/gi;
|
|
310
|
-
var GENERIC_TOKEN_RE = /\b(?:dlp|sk|ghp|xox[baprs])[-_A-Za-z0-9]{8,}\b/g;
|
|
311
|
-
var SECRET_OPTION_RE = /^--?(?:access[-_]?token|api[-_]?key|apikey|auth(?:orization)?|bearer|password|secret|session|token)$/i;
|
|
312
|
-
function truthyEnv(name) {
|
|
313
|
-
return ["1", "true", "yes", "on"].includes(
|
|
314
|
-
String(process.env[name] ?? "").trim().toLowerCase()
|
|
315
|
-
);
|
|
316
|
-
}
|
|
317
|
-
function isFailureReportingDisabled() {
|
|
318
|
-
return truthyEnv(FAILURE_REPORT_DISABLE_ENV);
|
|
319
|
-
}
|
|
320
|
-
function redactFailureText(value, maxChars = MAX_FAILURE_TEXT_CHARS) {
|
|
321
|
-
const home = process.env.HOME?.trim();
|
|
322
|
-
let text = String(value ?? "");
|
|
323
|
-
if (!text) return "";
|
|
324
|
-
if (home && home !== "/") {
|
|
325
|
-
text = text.split(home).join("~");
|
|
326
|
-
}
|
|
327
|
-
return text.replace(EMAIL_RE, "[redacted-email]").replace(UNIX_PATH_RE, "[redacted-path]").replace(WINDOWS_PATH_RE, "[redacted-path]").replace(BEARER_SECRET_RE, "$1 [redacted-secret]").replace(ASSIGNMENT_SECRET_RE, "$1$2[redacted-secret]").replace(GENERIC_TOKEN_RE, "[redacted-secret]").slice(0, maxChars);
|
|
328
|
-
}
|
|
329
|
-
function sanitizeCommand(argv, prefix = "deepline") {
|
|
330
|
-
const tokens = [];
|
|
331
|
-
for (let index = 0; index < argv.length; index += 1) {
|
|
332
|
-
const arg = argv[index];
|
|
333
|
-
const value = String(arg ?? "").trim();
|
|
334
|
-
if (!value) continue;
|
|
335
|
-
if (value.startsWith("-")) {
|
|
336
|
-
if (!value.includes("=") && SECRET_OPTION_RE.test(value)) {
|
|
337
|
-
index += 1;
|
|
338
|
-
}
|
|
339
|
-
continue;
|
|
340
|
-
}
|
|
341
|
-
tokens.push(redactFailureText(value, 200));
|
|
342
|
-
if (tokens.length >= MAX_COMMAND_TOKENS) break;
|
|
343
|
-
}
|
|
344
|
-
return tokens.length > 0 ? [prefix, ...tokens].join(" ") : prefix;
|
|
345
|
-
}
|
|
346
|
-
function errorMessage(error) {
|
|
347
|
-
if (error instanceof Error) return `${error.name}: ${error.message}`;
|
|
348
|
-
return String(error ?? "");
|
|
349
|
-
}
|
|
350
|
-
function errorStack(error) {
|
|
351
|
-
if (error instanceof Error && error.stack) {
|
|
352
|
-
return redactFailureText(error.stack);
|
|
353
|
-
}
|
|
354
|
-
return null;
|
|
355
|
-
}
|
|
356
|
-
function classifyNetworkFailure(error) {
|
|
357
|
-
const seen = /* @__PURE__ */ new Set();
|
|
358
|
-
let current = error;
|
|
359
|
-
while (current && !seen.has(current)) {
|
|
360
|
-
seen.add(current);
|
|
361
|
-
const record = typeof current === "object" && current !== null ? current : {};
|
|
362
|
-
const code = String(record.code ?? "").toLowerCase();
|
|
363
|
-
const name = current instanceof Error ? current.name.toLowerCase() : "";
|
|
364
|
-
const text = String(
|
|
365
|
-
current instanceof Error ? current.message : current
|
|
366
|
-
).toLowerCase();
|
|
367
|
-
const combined = `${code} ${name} ${text}`;
|
|
368
|
-
if (combined.includes("aborterror") || combined.includes("timeout") || combined.includes("timed out") || combined.includes("etimedout")) {
|
|
369
|
-
return "network_timeout";
|
|
370
|
-
}
|
|
371
|
-
if (combined.includes("enotfound") || combined.includes("eai_again") || combined.includes("getaddrinfo") || combined.includes("name or service not known") || combined.includes("temporary failure in name resolution")) {
|
|
372
|
-
return "network_dns_resolution_failed";
|
|
373
|
-
}
|
|
374
|
-
if (combined.includes("econnrefused") || combined.includes("connection refused")) {
|
|
375
|
-
return "network_connection_refused";
|
|
376
|
-
}
|
|
377
|
-
if (combined.includes("econnreset") || combined.includes("connection reset")) {
|
|
378
|
-
return "network_connection_reset";
|
|
379
|
-
}
|
|
380
|
-
if (combined.includes("incompleteread") || combined.includes("incomplete read")) {
|
|
381
|
-
return "network_incomplete_read";
|
|
382
|
-
}
|
|
383
|
-
if (combined.includes("remotedisconnected") || combined.includes("remote end closed connection") || combined.includes("other side closed") || combined.includes("socket hang up")) {
|
|
384
|
-
return "network_remote_disconnected";
|
|
385
|
-
}
|
|
386
|
-
if (
|
|
387
|
-
// Local filenames and retry commands may contain "ssl" or "tls".
|
|
388
|
-
// Require a transport identifier or protocol failure text instead.
|
|
389
|
-
code.includes("ssl") || code.includes("tls") || name.includes("ssl") || name.includes("tls") || /(?:^|[\s[(:])(?:ssl|tls)[\s:_-]+(?:error|handshake|certificate|routines|connection|failed|failure)(?:$|[\s:_-])/.test(
|
|
390
|
-
text
|
|
391
|
-
) || combined.includes("unexpected_eof_while_reading")
|
|
392
|
-
) {
|
|
393
|
-
return "network_ssl_error";
|
|
394
|
-
}
|
|
395
|
-
current = record.cause ?? record.context;
|
|
396
|
-
}
|
|
397
|
-
return "network_error";
|
|
398
|
-
}
|
|
399
|
-
function classifyNetworkCauseCategory(error) {
|
|
400
|
-
const seen = /* @__PURE__ */ new Set();
|
|
401
|
-
let cause = error;
|
|
402
|
-
while (cause && typeof cause === "object" && !seen.has(cause)) {
|
|
403
|
-
seen.add(cause);
|
|
404
|
-
const record = cause;
|
|
405
|
-
if (record.code === "UND_ERR_CONNECT_TIMEOUT") return "connect_timeout";
|
|
406
|
-
cause = record.cause;
|
|
407
|
-
}
|
|
408
|
-
switch (classifyNetworkFailure(error)) {
|
|
409
|
-
case "network_dns_resolution_failed":
|
|
410
|
-
return "dns";
|
|
411
|
-
case "network_ssl_error":
|
|
412
|
-
return "tls";
|
|
413
|
-
case "network_connection_reset":
|
|
414
|
-
return "reset";
|
|
415
|
-
case "network_timeout":
|
|
416
|
-
return "timeout";
|
|
417
|
-
default:
|
|
418
|
-
return "unknown";
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
function isNetworkFailure(error) {
|
|
422
|
-
if (!(error instanceof Error)) return false;
|
|
423
|
-
if (error instanceof DeeplineError && error.statusCode) return false;
|
|
424
|
-
const code = classifyNetworkFailure(error);
|
|
425
|
-
return code !== "network_error" || /unable to connect|unable to stream/i.test(error.message);
|
|
426
|
-
}
|
|
427
|
-
function buildEnvironmentContext() {
|
|
428
|
-
const context = {
|
|
429
|
-
os: platform(),
|
|
430
|
-
os_release: release(),
|
|
431
|
-
platform: `${platform()}-${release()}-${process.arch}`,
|
|
432
|
-
node_version: process.version,
|
|
433
|
-
runtime: "Node.js",
|
|
434
|
-
hostname: hostname(),
|
|
435
|
-
agent_runtime: detectAgentRuntime()
|
|
436
|
-
};
|
|
437
|
-
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
438
|
-
const normalized = process.env[key]?.trim();
|
|
439
|
-
if (normalized) context[key.toLowerCase()] = normalized;
|
|
440
|
-
}
|
|
441
|
-
if (process.env.CLAUDE_PROJECT_DIR?.trim()) {
|
|
442
|
-
context.claude_project_dir_present = "true";
|
|
443
|
-
}
|
|
444
|
-
if (process.env.DEEPLINE_PLUGIN_ROOT?.trim()) {
|
|
445
|
-
context.deepline_plugin_root_present = "true";
|
|
446
|
-
}
|
|
447
|
-
if (process.env.DEEPLINE_PLUGIN_SKILLS_DIR?.trim()) {
|
|
448
|
-
context.deepline_plugin_skills_dir_present = "true";
|
|
449
|
-
}
|
|
450
|
-
if (process.env.HOME?.trim().startsWith("/sessions/")) {
|
|
451
|
-
context.home_scope = "sessions";
|
|
452
|
-
}
|
|
453
|
-
return context;
|
|
454
|
-
}
|
|
455
|
-
function failureReportHeaders(apiKey) {
|
|
456
|
-
const agentSessionId = agentSessionIdFromEnvironment();
|
|
457
|
-
return {
|
|
458
|
-
...deploymentProtectionHeaders(),
|
|
459
|
-
...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {},
|
|
460
|
-
Authorization: `Bearer ${apiKey}`,
|
|
461
|
-
"Content-Type": "application/json",
|
|
462
|
-
"User-Agent": `deepline-ts-sdk/${SDK_VERSION}`,
|
|
463
|
-
"X-Deepline-Client-Family": "sdk",
|
|
464
|
-
"X-Deepline-CLI-Family": "sdk",
|
|
465
|
-
"X-Deepline-Agent-Runtime": detectAgentRuntime(),
|
|
466
|
-
"X-Deepline-CLI-Version": SDK_VERSION,
|
|
467
|
-
"X-Deepline-SDK-Version": SDK_VERSION
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
async function postFailureReport(input) {
|
|
471
|
-
const controller = new AbortController();
|
|
472
|
-
const timeout = setTimeout(() => controller.abort(), input.timeoutMs);
|
|
473
|
-
if (input.background) timeout.unref();
|
|
474
|
-
try {
|
|
475
|
-
await fetch(new URL("/api/v2/cli/report-failure", input.baseUrl), {
|
|
476
|
-
method: "POST",
|
|
477
|
-
headers: failureReportHeaders(input.apiKey),
|
|
478
|
-
body: JSON.stringify(input.body),
|
|
479
|
-
signal: controller.signal
|
|
480
|
-
});
|
|
481
|
-
return true;
|
|
482
|
-
} catch {
|
|
483
|
-
return false;
|
|
484
|
-
} finally {
|
|
485
|
-
clearTimeout(timeout);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
function boundedTelemetryString(value, maxChars) {
|
|
489
|
-
return redactFailureText(value.trim(), maxChars);
|
|
490
|
-
}
|
|
491
|
-
async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
492
|
-
if (isFailureReportingDisabled()) return false;
|
|
493
|
-
let apiKey = "";
|
|
494
|
-
try {
|
|
495
|
-
apiKey = resolveApiKeyForBaseUrl(input.baseUrl);
|
|
496
|
-
} catch {
|
|
497
|
-
return false;
|
|
498
|
-
}
|
|
499
|
-
if (!apiKey) return false;
|
|
500
|
-
const attempts = input.attempts.slice(0, 2).map((attempt) => ({
|
|
501
|
-
installer: attempt.installer,
|
|
502
|
-
outcome: attempt.outcome,
|
|
503
|
-
exit_code: typeof attempt.exitCode === "number" && Number.isFinite(attempt.exitCode) ? Math.trunc(attempt.exitCode) : null
|
|
504
|
-
}));
|
|
505
|
-
const agents = input.agents.slice(0, 8).map((agent) => boundedTelemetryString(agent, 100)).filter(Boolean);
|
|
506
|
-
const baseUrl = input.baseUrl.replace(/\/$/, "");
|
|
507
|
-
const failureKind = "background_warning";
|
|
508
|
-
const failureCode2 = "SKILLS_AUTO_SYNC_FAILED";
|
|
509
|
-
const failureStage = "skills_install";
|
|
510
|
-
return postFailureReport({
|
|
511
|
-
baseUrl,
|
|
512
|
-
apiKey,
|
|
513
|
-
timeoutMs: BACKGROUND_REPORT_FAILURE_TIMEOUT_MS,
|
|
514
|
-
background: true,
|
|
515
|
-
body: {
|
|
516
|
-
command: "deepline skills",
|
|
517
|
-
subcommand: "skills",
|
|
518
|
-
failure_kind: failureKind,
|
|
519
|
-
failure_code: failureCode2,
|
|
520
|
-
failure_stage: failureStage,
|
|
521
|
-
error_body: "Automatic Deepline skills installation failed.",
|
|
522
|
-
cli_version: SDK_VERSION,
|
|
523
|
-
context: {
|
|
524
|
-
environment: buildEnvironmentContext(),
|
|
525
|
-
skills_sync: {
|
|
526
|
-
skills_package: boundedTelemetryString(input.skillsPackage, 100),
|
|
527
|
-
remote_skills_version: boundedTelemetryString(
|
|
528
|
-
input.remoteSkillsVersion,
|
|
529
|
-
200
|
|
530
|
-
),
|
|
531
|
-
agents,
|
|
532
|
-
target_skill_count: Math.max(
|
|
533
|
-
0,
|
|
534
|
-
Math.trunc(
|
|
535
|
-
Number.isFinite(input.targetSkillCount) ? input.targetSkillCount : 0
|
|
536
|
-
)
|
|
537
|
-
),
|
|
538
|
-
marker_written: input.markerWritten,
|
|
539
|
-
attempts
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
function subcommandFromArgv(argv) {
|
|
546
|
-
return argv.find((arg) => arg && !arg.startsWith("-")) ?? null;
|
|
547
|
-
}
|
|
548
|
-
function commandTokens(argv) {
|
|
549
|
-
return argv.map((arg) => String(arg ?? "").trim()).filter((arg) => arg && !arg.startsWith("-"));
|
|
550
|
-
}
|
|
551
|
-
function isServerLoggedPlayRunStartFailure(input) {
|
|
552
|
-
const [subcommand, command] = commandTokens(input.argv);
|
|
553
|
-
return subcommand === "plays" && command === "run" && input.error instanceof DeeplineError && typeof input.error.statusCode === "number";
|
|
554
|
-
}
|
|
555
|
-
function shouldReport(input) {
|
|
556
|
-
if (input.error !== void 0) return true;
|
|
557
|
-
return input.exitCode !== null && REPORTABLE_EXIT_CODES.has(input.exitCode);
|
|
558
|
-
}
|
|
559
|
-
function failureCode(input) {
|
|
560
|
-
if (input.error !== void 0) {
|
|
561
|
-
if (isNetworkFailure(input.error))
|
|
562
|
-
return classifyNetworkFailure(input.error);
|
|
563
|
-
if (input.error instanceof DeeplineError && input.error.code) {
|
|
564
|
-
return input.error.code;
|
|
565
|
-
}
|
|
566
|
-
if (input.error instanceof Error && input.error.name)
|
|
567
|
-
return input.error.name;
|
|
568
|
-
return "CLI_FAILURE";
|
|
569
|
-
}
|
|
570
|
-
return input.exitCode === 4 ? "network_error" : "command_exit";
|
|
571
|
-
}
|
|
572
|
-
function resolvedExitCode(input) {
|
|
573
|
-
if (typeof input.exitCode === "number" && Number.isFinite(input.exitCode)) {
|
|
574
|
-
return Math.trunc(input.exitCode);
|
|
575
|
-
}
|
|
576
|
-
if (input.error === void 0) return null;
|
|
577
|
-
return isNetworkFailure(input.error) ? 4 : 5;
|
|
578
|
-
}
|
|
579
|
-
function resolveSdkCliFailureExitCode(error) {
|
|
580
|
-
return isNetworkFailure(error) ? 4 : 1;
|
|
581
|
-
}
|
|
582
|
-
function resolvedFailureKind(input) {
|
|
583
|
-
return input.error === void 0 ? "command_exit" : "uncaught_exception";
|
|
584
|
-
}
|
|
585
|
-
function safeRequestDiagnostics(error) {
|
|
586
|
-
if (!(error instanceof DeeplineError)) return null;
|
|
587
|
-
const request = error.details?.request;
|
|
588
|
-
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
589
|
-
return null;
|
|
590
|
-
const value = request;
|
|
591
|
-
const result = {};
|
|
592
|
-
if (typeof value.phase === "string" && [
|
|
593
|
-
"before_request",
|
|
594
|
-
"retry_wait",
|
|
595
|
-
"awaiting_headers",
|
|
596
|
-
"reading_body"
|
|
597
|
-
].includes(value.phase))
|
|
598
|
-
result.phase = value.phase;
|
|
599
|
-
if (typeof value.method === "string" && /^(GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS)$/.test(value.method))
|
|
600
|
-
result.method = value.method;
|
|
601
|
-
if (typeof value.url === "string") {
|
|
602
|
-
try {
|
|
603
|
-
const url = new URL(value.url);
|
|
604
|
-
if (url.protocol === "https:" || url.protocol === "http:") {
|
|
605
|
-
result.url = redactFailureText(`${url.origin}${url.pathname}`, 1e3);
|
|
606
|
-
}
|
|
607
|
-
} catch {
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
if (typeof value.failedAtUtc === "string" && Number.isFinite(Date.parse(value.failedAtUtc))) {
|
|
611
|
-
result.failedAtUtc = new Date(value.failedAtUtc).toISOString();
|
|
612
|
-
}
|
|
613
|
-
for (const key of ["elapsedMs", "attempts"]) {
|
|
614
|
-
const number = value[key];
|
|
615
|
-
if (typeof number === "number" && Number.isSafeInteger(number) && number >= 0)
|
|
616
|
-
result[key] = number;
|
|
617
|
-
}
|
|
618
|
-
return Object.keys(result).length > 0 ? result : null;
|
|
619
|
-
}
|
|
620
|
-
function buildFailureReport(input) {
|
|
621
|
-
const durationMs = Math.max(0, Date.now() - input.startedAtMs);
|
|
622
|
-
const request = safeRequestDiagnostics(input.error);
|
|
623
|
-
const failureKind = resolvedFailureKind({
|
|
624
|
-
exitCode: input.exitCode,
|
|
625
|
-
error: input.error
|
|
626
|
-
});
|
|
627
|
-
const code = failureCode({ exitCode: input.exitCode, error: input.error });
|
|
628
|
-
const errorBody = input.error === void 0 ? `SDK CLI command exited ${input.exitCode ?? "unknown"}` : errorMessage(input.error);
|
|
629
|
-
const networkCauseCategory = input.error !== void 0 && isNetworkFailure(input.error) ? classifyNetworkCauseCategory(input.error) : null;
|
|
630
|
-
return {
|
|
631
|
-
command: sanitizeCommand(input.argv),
|
|
632
|
-
subcommand: subcommandFromArgv(input.argv),
|
|
633
|
-
error_status: input.exitCode,
|
|
634
|
-
error_body: redactFailureText(errorBody),
|
|
635
|
-
exit_code: input.exitCode,
|
|
636
|
-
duration_ms: durationMs,
|
|
637
|
-
error_class: input.error instanceof Error ? input.error.name : null,
|
|
638
|
-
stack_trace: errorStack(input.error),
|
|
639
|
-
failure_kind: failureKind,
|
|
640
|
-
failure_code: code,
|
|
641
|
-
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
642
|
-
cli_version: SDK_VERSION,
|
|
643
|
-
context: {
|
|
644
|
-
base_url: redactFailureText(input.baseUrl, 400),
|
|
645
|
-
command_summary: sanitizeCommand(input.argv),
|
|
646
|
-
environment: buildEnvironmentContext(),
|
|
647
|
-
...request ? { request } : {},
|
|
648
|
-
failure_kind: failureKind,
|
|
649
|
-
failure_code: code,
|
|
650
|
-
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
651
|
-
duration_ms: durationMs,
|
|
652
|
-
...input.exitCode !== null ? { exit_code: input.exitCode } : {},
|
|
653
|
-
...networkCauseCategory ? { network_cause_category: networkCauseCategory } : {}
|
|
654
|
-
}
|
|
655
|
-
};
|
|
656
|
-
}
|
|
657
|
-
async function maybeReportSdkCliFailure(input) {
|
|
658
|
-
if (isFailureReportingDisabled()) return false;
|
|
659
|
-
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
660
|
-
const exitCode = resolvedExitCode(input);
|
|
661
|
-
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
662
|
-
const baseUrl = autoDetectBaseUrl().replace(/\/$/, "");
|
|
663
|
-
const apiKey = resolveApiKeyForBaseUrl(baseUrl);
|
|
664
|
-
if (!apiKey) return false;
|
|
665
|
-
return postFailureReport({
|
|
666
|
-
baseUrl,
|
|
667
|
-
apiKey,
|
|
668
|
-
timeoutMs: REPORT_FAILURE_TIMEOUT_MS,
|
|
669
|
-
body: buildFailureReport({
|
|
670
|
-
argv: input.argv,
|
|
671
|
-
startedAtMs: input.startedAtMs,
|
|
672
|
-
error: input.error,
|
|
673
|
-
exitCode,
|
|
674
|
-
baseUrl
|
|
675
|
-
})
|
|
676
|
-
});
|
|
677
|
-
}
|
|
678
|
-
|
|
679
295
|
// contracts/install-commands.json
|
|
680
296
|
var install_commands_default = {
|
|
681
297
|
skills: {
|
|
@@ -810,8 +426,8 @@ function escapeCmdArgument(arg, forBatchFile = true) {
|
|
|
810
426
|
function escapeCmdCommand(command) {
|
|
811
427
|
return command.replace(CMD_META_CHARS, "^$1");
|
|
812
428
|
}
|
|
813
|
-
function resolveShellSpawn(command, args,
|
|
814
|
-
if (
|
|
429
|
+
function resolveShellSpawn(command, args, platform = process.platform, env = process.env, cwd = process.cwd()) {
|
|
430
|
+
if (platform !== "win32") {
|
|
815
431
|
return { command, args: [...args], shell: false };
|
|
816
432
|
}
|
|
817
433
|
const resolved = resolveWindowsExecutable(command, env, cwd);
|
|
@@ -1577,8 +1193,8 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1577
1193
|
}
|
|
1578
1194
|
return "DEEPLINE_SKIP_SKILLS_SYNC=1 deepline <command>";
|
|
1579
1195
|
}
|
|
1580
|
-
function resolveSkillsInstallSpawn(install,
|
|
1581
|
-
return resolveShellSpawn(install.command, install.args,
|
|
1196
|
+
function resolveSkillsInstallSpawn(install, platform = process.platform) {
|
|
1197
|
+
return resolveShellSpawn(install.command, install.args, platform);
|
|
1582
1198
|
}
|
|
1583
1199
|
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1584
1200
|
const commands = [];
|
|
@@ -1950,12 +1566,6 @@ export {
|
|
|
1950
1566
|
checkSdkCompatibility,
|
|
1951
1567
|
isCiEnvironment,
|
|
1952
1568
|
enforceSdkCompatibilityResponse,
|
|
1953
|
-
isFailureReportingDisabled,
|
|
1954
|
-
redactFailureText,
|
|
1955
|
-
sanitizeCommand,
|
|
1956
|
-
failureReportHeaders,
|
|
1957
|
-
resolveSdkCliFailureExitCode,
|
|
1958
|
-
maybeReportSdkCliFailure,
|
|
1959
1569
|
SKILLS_NPX_PACKAGE,
|
|
1960
1570
|
DEFAULT_SDK_SKILL_NAMES,
|
|
1961
1571
|
LEGACY_SKILL_NAMES_TO_REMOVE,
|
|
@@ -31,7 +31,7 @@ var _chunkNMU3VR5Ujs = require('./chunk-NMU3VR5U.js');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkSPN7U3MVjs = require('./chunk-SPN7U3MV.js');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
|
|
@@ -652,7 +652,7 @@ var ToolCalls = class {
|
|
|
652
652
|
idempotencyKey,
|
|
653
653
|
onResponse: (response2) => {
|
|
654
654
|
lastResponse = null;
|
|
655
|
-
atomicToolsSupported = response2.headers.get(
|
|
655
|
+
atomicToolsSupported = response2.headers.get(_chunkSPN7U3MVjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
656
656
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
657
657
|
if (_optionalChain([options, 'optionalAccess', _30 => _30.onServerTiming])) {
|
|
658
658
|
try {
|
|
@@ -1107,8 +1107,8 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1107
1107
|
}
|
|
1108
1108
|
const receivers = _optionalChain([env, 'access', _55 => _55.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()]);
|
|
1109
1109
|
return {
|
|
1110
|
-
[
|
|
1111
|
-
...receivers ? { [
|
|
1110
|
+
[_chunkSPN7U3MVjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1111
|
+
...receivers ? { [_chunkSPN7U3MVjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1112
1112
|
};
|
|
1113
1113
|
}
|
|
1114
1114
|
function normalizeTestPolicyOverrides(value, source) {
|
|
@@ -1179,7 +1179,7 @@ var PlayClient = class {
|
|
|
1179
1179
|
return _chunkRNSHCJMEjs.startPlayRun.call(void 0,
|
|
1180
1180
|
this.http,
|
|
1181
1181
|
resolved.request,
|
|
1182
|
-
_optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1182
|
+
_optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkSPN7U3MVjs.SDK_API_MAJOR) } : headers,
|
|
1183
1183
|
options
|
|
1184
1184
|
);
|
|
1185
1185
|
}
|
|
@@ -3260,7 +3260,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3260
3260
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3261
3261
|
);
|
|
3262
3262
|
}
|
|
3263
|
-
return { [
|
|
3263
|
+
return { [_chunkSPN7U3MVjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3264
3264
|
}
|
|
3265
3265
|
function sleep(ms) {
|
|
3266
3266
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -4072,7 +4072,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4072
4072
|
);
|
|
4073
4073
|
const headers = _optionalChain([options, 'optionalAccess', _184 => _184.cliAdmission]) ? {
|
|
4074
4074
|
...runtimeHeaders,
|
|
4075
|
-
"X-Deepline-API-Major": String(
|
|
4075
|
+
"X-Deepline-API-Major": String(_chunkSPN7U3MVjs.SDK_API_MAJOR)
|
|
4076
4076
|
} : runtimeHeaders;
|
|
4077
4077
|
const http = this.http;
|
|
4078
4078
|
let submitted = false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEMUFF6EUjs = require('./chunk-EMUFF6EU.js');
|
|
4
4
|
|
|
5
5
|
// src/cli/maintenance-policy.ts
|
|
6
6
|
var _commander = require('commander');
|
|
@@ -33,7 +33,7 @@ function recordCliTrace(event) {
|
|
|
33
33
|
sinceStartMs: now - cliTraceStartedAt,
|
|
34
34
|
...event
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
_chunkEMUFF6EUjs.writeRawStderr.call(void 0, `[cli-trace] ${JSON.stringify(payload)}
|
|
37
37
|
`);
|
|
38
38
|
}
|
|
39
39
|
async function traceCliSpan(phase, fields, run) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkZLN2B5YAjs = require('./chunk-ZLN2B5YA.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkSPN7U3MVjs = require('./chunk-SPN7U3MV.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -293,8 +293,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
293
293
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
294
294
|
var defaultBrowserCommandRunner = childProcess;
|
|
295
295
|
function getAuthedHttpClient() {
|
|
296
|
-
const config =
|
|
297
|
-
return { config, http: new (0,
|
|
296
|
+
const config = _chunkZLN2B5YAjs.resolveConfig.call(void 0, );
|
|
297
|
+
return { config, http: new (0, _chunkZLN2B5YAjs.HttpClient)(config) };
|
|
298
298
|
}
|
|
299
299
|
function stableOsUserId() {
|
|
300
300
|
try {
|
|
@@ -634,7 +634,7 @@ function collectLocalEnvInfo() {
|
|
|
634
634
|
os: `${process.platform} ${process.arch}`,
|
|
635
635
|
node_version: process.version,
|
|
636
636
|
home_dir: homeDir,
|
|
637
|
-
agent_runtime:
|
|
637
|
+
agent_runtime: _chunkSPN7U3MVjs.detectAgentRuntime.call(void 0, )
|
|
638
638
|
};
|
|
639
639
|
const env = process.env;
|
|
640
640
|
const optional = {
|
|
@@ -881,9 +881,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
881
881
|
}
|
|
882
882
|
function withAgentCommandContext(value) {
|
|
883
883
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
884
|
-
return
|
|
884
|
+
return _chunkSPN7U3MVjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
885
885
|
...valueRecord,
|
|
886
|
-
command_context:
|
|
886
|
+
command_context: _chunkZLN2B5YAjs.resolveCliCommandContext.call(void 0, )
|
|
887
887
|
} : value;
|
|
888
888
|
}
|
|
889
889
|
function printJson(value, fields) {
|