deepline 0.3.504 → 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/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-3L5AA5AX.mjs → auth-AHE2EDQA.mjs} +5 -5
- package/dist/cli/auth-SEPKNRHV.js +43 -0
- package/dist/cli/{billing-E7EASVPO.mjs → billing-7CPWTGGI.mjs} +7 -7
- package/dist/cli/{billing-HOGXVE2V.js → billing-JOIZPHON.js} +82 -82
- package/dist/cli/{chunk-67OI26OE.js → chunk-3YEOOXD4.js} +96 -37
- package/dist/cli/{chunk-IPAMOMGP.js → chunk-45XYW477.js} +21 -21
- package/dist/cli/{chunk-OX2D6BG4.mjs → chunk-4OFSAZN6.mjs} +1 -1
- package/dist/cli/{chunk-2ABRDH3B.mjs → chunk-52FPW2RD.mjs} +2 -2
- package/dist/cli/{chunk-NZ7Z7WNM.mjs → chunk-5XT4DZQL.mjs} +2 -2
- package/dist/cli/{chunk-FTRVCIGC.js → chunk-6FEN6VWZ.js} +26 -26
- package/dist/cli/{chunk-7F4OEHQK.mjs → chunk-6U3AGJWI.mjs} +1 -1
- package/dist/cli/{chunk-YOQ2NNDO.mjs → chunk-7AD565DO.mjs} +1 -1
- package/dist/cli/{chunk-JPR2546F.js → chunk-7DDACLMX.js} +16 -16
- package/dist/cli/{chunk-HUX5DZO6.mjs → chunk-7DDKLFOY.mjs} +3 -3
- package/dist/cli/{chunk-2W77YCKH.js → chunk-7QLK2GHL.js} +5 -5
- package/dist/cli/{chunk-XHZSPMNC.mjs → chunk-ACI6CUDX.mjs} +11 -401
- package/dist/cli/{chunk-7P2QVMBP.js → chunk-BWAYMJ23.js} +7 -7
- package/dist/cli/{chunk-UXQQPMYO.js → chunk-CA3SYXCS.js} +2 -2
- package/dist/cli/{chunk-SVFTZTCI.mjs → chunk-CSLLQWAB.mjs} +1 -1
- package/dist/cli/{chunk-QKKU2FH4.js → chunk-EMUFF6EU.js} +7 -7
- package/dist/cli/chunk-FIQ5UEIF.mjs +405 -0
- package/dist/cli/{chunk-KGUGNEKL.js → chunk-GAUNJCXQ.js} +96 -96
- package/dist/cli/{chunk-5Z6EULD5.js → chunk-GXMNOUHP.js} +6 -6
- package/dist/cli/{chunk-A6LA42JY.js → chunk-HASFFOSU.js} +16 -16
- package/dist/cli/{chunk-SMSQVRHE.js → chunk-IDAE5VDH.js} +5 -5
- package/dist/cli/{chunk-GGBXNQCR.mjs → chunk-IZYOYXG7.mjs} +4 -4
- package/dist/cli/{chunk-22OCKCYS.mjs → chunk-JA7YBRP4.mjs} +1 -1
- package/dist/cli/{chunk-6SMR7LU7.js → chunk-JSTKLYYD.js} +2 -2
- package/dist/cli/{chunk-UFYJTRSF.mjs → chunk-JVKEZT7L.mjs} +20 -6
- package/dist/cli/{chunk-GJ2DA35C.js → chunk-K26YOPDO.js} +20 -6
- package/dist/cli/{chunk-FISP4LCK.js → chunk-LC4FG34E.js} +53 -53
- package/dist/cli/{chunk-BTWUNKKX.mjs → chunk-MAFZ64RN.mjs} +2 -2
- package/dist/cli/{chunk-WZSFIJMG.js → chunk-MHZAG2ZQ.js} +80 -470
- package/dist/cli/{chunk-5CHBIJIM.mjs → chunk-NARJWXBR.mjs} +2 -2
- package/dist/cli/{chunk-VJVJWZ6I.mjs → chunk-OA6U5NVB.mjs} +5 -5
- package/dist/cli/{chunk-QOLX2O2S.mjs → chunk-OMEDQ77C.mjs} +93 -34
- package/dist/cli/{chunk-LHXYCZYO.js → chunk-OORPAQVC.js} +8 -8
- package/dist/cli/{chunk-Z6FXUDIL.mjs → chunk-PDLOPF5L.mjs} +1 -1
- package/dist/cli/{chunk-3MLFFWDM.mjs → chunk-PZN24YQQ.mjs} +2 -2
- package/dist/cli/{chunk-DEAJVQEG.mjs → chunk-QGNNAZ5M.mjs} +1 -1
- package/dist/cli/chunk-QYGYVCRI.js +405 -0
- package/dist/cli/{chunk-IGNQKOWT.mjs → chunk-RT3HJBIH.mjs} +12 -12
- package/dist/cli/{chunk-Y6XKCEPK.mjs → chunk-SHKRL7CW.mjs} +1 -1
- package/dist/cli/{chunk-UJMBG5JU.js → chunk-SPN7U3MV.js} +4 -4
- package/dist/cli/{chunk-MLMWM5DV.mjs → chunk-UZ24SF7N.mjs} +5 -5
- package/dist/cli/{chunk-USTJEEND.js → chunk-VXKWF3AD.js} +9 -9
- package/dist/cli/{chunk-Y7VEHKID.mjs → chunk-W6I4N4JN.mjs} +6 -6
- package/dist/cli/{chunk-MJTK6Q3G.js → chunk-WPCF7C6B.js} +3 -3
- package/dist/cli/{chunk-KCKAFTPY.js → chunk-WTQLUULB.js} +6 -6
- package/dist/cli/{chunk-BX45XMXZ.mjs → chunk-WTUC5VKB.mjs} +2 -2
- package/dist/cli/{chunk-6JNBMTCZ.js → chunk-XHPB6RGY.js} +1 -1
- package/dist/cli/{chunk-GRAGUYIE.js → chunk-Y52XY56V.js} +41 -41
- package/dist/cli/{chunk-4CC67XH5.mjs → chunk-YBIVVAL7.mjs} +2 -2
- package/dist/cli/{chunk-WBIDPDKJ.js → chunk-ZLN2B5YA.js} +3 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-2XWGPITO.js → csv-DZHVIW3G.js} +13 -13
- package/dist/cli/{csv-433JEHLQ.mjs → csv-WTPI6ZON.mjs} +4 -4
- package/dist/cli/{db-PJJMD4VH.js → db-D7LPPNCC.js} +27 -27
- package/dist/cli/{db-K747DH43.mjs → db-NR4PJ6AF.mjs} +6 -6
- package/dist/cli/describe-HVQBTKFM.js +50 -0
- package/dist/cli/{describe-VEDDYW4P.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-JWRX3XCT.mjs → executions-RQVJ4LAB.mjs} +6 -6
- package/dist/cli/{executions-HM5T72H6.js → executions-UQG6LWEN.js} +8 -8
- package/dist/cli/{feedback-MNSIA63Y.mjs → feedback-RD4Y3YQR.mjs} +4 -4
- package/dist/cli/{feedback-34UG4BO3.js → feedback-TCHA67IA.js} +8 -8
- package/dist/cli/git-TUB2ZUEH.js +25 -0
- package/dist/cli/{git-ZKEOXV3A.mjs → git-Z7434B7Y.mjs} +5 -5
- package/dist/cli/index.js +143 -141
- package/dist/cli/index.mjs +49 -47
- package/dist/cli/{legacy-noops-YXSI4FVU.js → legacy-noops-23WRA7DH.js} +8 -8
- package/dist/cli/{legacy-noops-5M4T4ZVT.mjs → legacy-noops-LQJU4UIV.mjs} +5 -5
- package/dist/cli/{monitors-O25GDOYE.js → monitors-KOWN7M3V.js} +95 -95
- package/dist/cli/{monitors-C65OC4AW.mjs → monitors-Z6VYUZ2W.mjs} +7 -7
- package/dist/cli/{org-2GSPLY2A.js → org-2T5K2VP5.js} +72 -72
- package/dist/cli/{org-ZRMG5NS2.mjs → org-UBNRO5XO.mjs} +6 -6
- package/dist/cli/{pages-TZZUFBRO.mjs → pages-GHPJBVV3.mjs} +6 -6
- package/dist/cli/{pages-45DPADK6.js → pages-SRXTU7XO.js} +18 -18
- package/dist/cli/{play-RCGMND6X.js → play-2HMZ57EZ.js} +317 -316
- package/dist/cli/{play-3D7HH273.mjs → play-HRQKGTXA.mjs} +18 -17
- package/dist/cli/{providers-PSAKV6CJ.mjs → providers-JWJRFRR5.mjs} +6 -6
- package/dist/cli/{providers-3N3ECMTY.js → providers-P5O676MZ.js} +9 -9
- package/dist/cli/{quickstart-2A35SMGC.mjs → quickstart-S7NZUQRO.mjs} +4 -4
- package/dist/cli/{quickstart-6R6AIXM6.js → quickstart-YCY72TAO.js} +6 -6
- package/dist/cli/{run-F6ZXTASZ.js → run-MHLLGF4G.js} +41 -40
- package/dist/cli/{run-F3TLDGUO.mjs → run-QWMRIUIU.mjs} +23 -22
- package/dist/cli/{search-CZLCY3D2.mjs → search-4BFTQUEP.mjs} +8 -7
- package/dist/cli/search-QPUHOEIL.js +33 -0
- package/dist/cli/{search-output-R5XDNILW.js → search-output-62LBVZHN.js} +6 -6
- package/dist/cli/{search-output-MQTSTLN5.mjs → search-output-LIYHDTBP.mjs} +4 -4
- package/dist/cli/{secrets-D3GF4B2Z.mjs → secrets-GW27V77E.mjs} +6 -6
- package/dist/cli/{secrets-DCJYHDSY.js → secrets-KKKHVSOO.js} +15 -15
- package/dist/cli/{sessions-Z4JYJSDP.js → sessions-R3OEINAR.js} +6 -6
- package/dist/cli/{sessions-QGEQ2UYZ.mjs → sessions-R75LBGIL.mjs} +5 -5
- package/dist/cli/{settings-G7QEXA4N.mjs → settings-I3AQZSYG.mjs} +12 -11
- package/dist/cli/{settings-UVXXAT4A.js → settings-MQIHAEZN.js} +79 -78
- package/dist/cli/{setup-QHJU3DUI.mjs → setup-2YA5MYMS.mjs} +10 -9
- package/dist/cli/{setup-5I42W7D4.js → setup-X3QRJERP.js} +50 -49
- package/dist/cli/{skills-5LRF4UKX.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-PUT6STVG.mjs → tools-SKQTSVGE.mjs} +17 -16
- package/dist/cli/{update-CJ2GA64X.mjs → update-GNBBSKTB.mjs} +10 -9
- package/dist/cli/update-TLSY6LC2.js +35 -0
- package/dist/cli/{workflow-HVEWRTXD.mjs → workflow-OJSAL5FO.mjs} +7 -7
- package/dist/cli/{workflow-O67MEBCP.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 +107 -104
- 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-UPK4IIIN.js +0 -43
- package/dist/cli/describe-OYS7LZJD.js +0 -49
- package/dist/cli/git-5YQJSJFR.js +0 -25
- package/dist/cli/search-R5VEWJO2.js +0 -32
- package/dist/cli/skills-FB6TV52O.js +0 -36
- package/dist/cli/tools-L2364RPA.js +0 -56
- package/dist/cli/update-ESYJGYVZ.js +0 -34
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkZLN2B5YAjs = require('./chunk-ZLN2B5YA.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkSPN7U3MVjs = require('./chunk-SPN7U3MV.js');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
14
|
+
|
|
15
|
+
// src/cli/failure-reporting.ts
|
|
16
|
+
var _os = require('os');
|
|
17
|
+
var FAILURE_REPORT_DISABLE_ENV = "DEEPLINE_DISABLE_FAILURE_REPORTING";
|
|
18
|
+
var REPORT_FAILURE_TIMEOUT_MS = 1e4;
|
|
19
|
+
var BACKGROUND_REPORT_FAILURE_TIMEOUT_MS = 2e3;
|
|
20
|
+
var MAX_FAILURE_TEXT_CHARS = 4e3;
|
|
21
|
+
var MAX_COMMAND_TOKENS = 3;
|
|
22
|
+
var REPORTABLE_EXIT_CODES = /* @__PURE__ */ new Set([4, 5]);
|
|
23
|
+
var EMAIL_RE = /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi;
|
|
24
|
+
var UNIX_PATH_RE = /(?:\/Users\/|\/home\/|\/var\/folders\/|\/tmp\/|\/sessions\/)[^"'\n\r`]+/g;
|
|
25
|
+
var WINDOWS_PATH_RE = /[A-Za-z]:(?:\\{1,2})(?:Users|Temp|tmp)(?:\\{1,2})[^"'\n\r`]+/g;
|
|
26
|
+
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;
|
|
27
|
+
var BEARER_SECRET_RE = /\b(bearer)\s+([A-Za-z0-9._-]+)/gi;
|
|
28
|
+
var GENERIC_TOKEN_RE = /\b(?:dlp|sk|ghp|xox[baprs])[-_A-Za-z0-9]{8,}\b/g;
|
|
29
|
+
var SECRET_OPTION_RE = /^--?(?:access[-_]?token|api[-_]?key|apikey|auth(?:orization)?|bearer|password|secret|session|token)$/i;
|
|
30
|
+
function truthyEnv(name) {
|
|
31
|
+
return ["1", "true", "yes", "on"].includes(
|
|
32
|
+
String(_nullishCoalesce(process.env[name], () => ( ""))).trim().toLowerCase()
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
function isFailureReportingDisabled() {
|
|
36
|
+
return truthyEnv(FAILURE_REPORT_DISABLE_ENV);
|
|
37
|
+
}
|
|
38
|
+
function redactFailureText(value, maxChars = MAX_FAILURE_TEXT_CHARS) {
|
|
39
|
+
const home = _optionalChain([process, 'access', _ => _.env, 'access', _2 => _2.HOME, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]);
|
|
40
|
+
let text = String(_nullishCoalesce(value, () => ( "")));
|
|
41
|
+
if (!text) return "";
|
|
42
|
+
if (home && home !== "/") {
|
|
43
|
+
text = text.split(home).join("~");
|
|
44
|
+
}
|
|
45
|
+
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);
|
|
46
|
+
}
|
|
47
|
+
function sanitizeCommand(argv, prefix = "deepline") {
|
|
48
|
+
const tokens = [];
|
|
49
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
50
|
+
const arg = argv[index];
|
|
51
|
+
const value = String(_nullishCoalesce(arg, () => ( ""))).trim();
|
|
52
|
+
if (!value) continue;
|
|
53
|
+
if (value.startsWith("-")) {
|
|
54
|
+
if (!value.includes("=") && SECRET_OPTION_RE.test(value)) {
|
|
55
|
+
index += 1;
|
|
56
|
+
}
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
tokens.push(redactFailureText(value, 200));
|
|
60
|
+
if (tokens.length >= MAX_COMMAND_TOKENS) break;
|
|
61
|
+
}
|
|
62
|
+
return tokens.length > 0 ? [prefix, ...tokens].join(" ") : prefix;
|
|
63
|
+
}
|
|
64
|
+
function errorMessage(error) {
|
|
65
|
+
if (error instanceof Error) return `${error.name}: ${error.message}`;
|
|
66
|
+
return String(_nullishCoalesce(error, () => ( "")));
|
|
67
|
+
}
|
|
68
|
+
function errorStack(error) {
|
|
69
|
+
if (error instanceof Error && error.stack) {
|
|
70
|
+
return redactFailureText(error.stack);
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
function classifyNetworkFailure(error) {
|
|
75
|
+
const seen = /* @__PURE__ */ new Set();
|
|
76
|
+
let current = error;
|
|
77
|
+
while (current && !seen.has(current)) {
|
|
78
|
+
seen.add(current);
|
|
79
|
+
const record = typeof current === "object" && current !== null ? current : {};
|
|
80
|
+
const code = String(_nullishCoalesce(record.code, () => ( ""))).toLowerCase();
|
|
81
|
+
const name = current instanceof Error ? current.name.toLowerCase() : "";
|
|
82
|
+
const text = String(
|
|
83
|
+
current instanceof Error ? current.message : current
|
|
84
|
+
).toLowerCase();
|
|
85
|
+
const combined = `${code} ${name} ${text}`;
|
|
86
|
+
if (combined.includes("aborterror") || combined.includes("timeout") || combined.includes("timed out") || combined.includes("etimedout")) {
|
|
87
|
+
return "network_timeout";
|
|
88
|
+
}
|
|
89
|
+
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")) {
|
|
90
|
+
return "network_dns_resolution_failed";
|
|
91
|
+
}
|
|
92
|
+
if (combined.includes("econnrefused") || combined.includes("connection refused")) {
|
|
93
|
+
return "network_connection_refused";
|
|
94
|
+
}
|
|
95
|
+
if (combined.includes("econnreset") || combined.includes("connection reset")) {
|
|
96
|
+
return "network_connection_reset";
|
|
97
|
+
}
|
|
98
|
+
if (combined.includes("incompleteread") || combined.includes("incomplete read")) {
|
|
99
|
+
return "network_incomplete_read";
|
|
100
|
+
}
|
|
101
|
+
if (combined.includes("remotedisconnected") || combined.includes("remote end closed connection") || combined.includes("other side closed") || combined.includes("socket hang up")) {
|
|
102
|
+
return "network_remote_disconnected";
|
|
103
|
+
}
|
|
104
|
+
if (
|
|
105
|
+
// Local filenames and retry commands may contain "ssl" or "tls".
|
|
106
|
+
// Require a transport identifier or protocol failure text instead.
|
|
107
|
+
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(
|
|
108
|
+
text
|
|
109
|
+
) || combined.includes("unexpected_eof_while_reading")
|
|
110
|
+
) {
|
|
111
|
+
return "network_ssl_error";
|
|
112
|
+
}
|
|
113
|
+
current = _nullishCoalesce(record.cause, () => ( record.context));
|
|
114
|
+
}
|
|
115
|
+
return "network_error";
|
|
116
|
+
}
|
|
117
|
+
function classifyNetworkCauseCategory(error) {
|
|
118
|
+
const seen = /* @__PURE__ */ new Set();
|
|
119
|
+
let cause = error;
|
|
120
|
+
while (cause && typeof cause === "object" && !seen.has(cause)) {
|
|
121
|
+
seen.add(cause);
|
|
122
|
+
const record = cause;
|
|
123
|
+
if (record.code === "UND_ERR_CONNECT_TIMEOUT") return "connect_timeout";
|
|
124
|
+
cause = record.cause;
|
|
125
|
+
}
|
|
126
|
+
switch (classifyNetworkFailure(error)) {
|
|
127
|
+
case "network_dns_resolution_failed":
|
|
128
|
+
return "dns";
|
|
129
|
+
case "network_ssl_error":
|
|
130
|
+
return "tls";
|
|
131
|
+
case "network_connection_reset":
|
|
132
|
+
return "reset";
|
|
133
|
+
case "network_timeout":
|
|
134
|
+
return "timeout";
|
|
135
|
+
default:
|
|
136
|
+
return "unknown";
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function isNetworkFailure(error) {
|
|
140
|
+
if (!(error instanceof Error)) return false;
|
|
141
|
+
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.statusCode) return false;
|
|
142
|
+
const code = classifyNetworkFailure(error);
|
|
143
|
+
return code !== "network_error" || /unable to connect|unable to stream/i.test(error.message);
|
|
144
|
+
}
|
|
145
|
+
function buildEnvironmentContext() {
|
|
146
|
+
const context = {
|
|
147
|
+
os: _os.platform.call(void 0, ),
|
|
148
|
+
os_release: _os.release.call(void 0, ),
|
|
149
|
+
platform: `${_os.platform.call(void 0, )}-${_os.release.call(void 0, )}-${process.arch}`,
|
|
150
|
+
node_version: process.version,
|
|
151
|
+
runtime: "Node.js",
|
|
152
|
+
hostname: _os.hostname.call(void 0, ),
|
|
153
|
+
agent_runtime: _chunkSPN7U3MVjs.detectAgentRuntime.call(void 0, )
|
|
154
|
+
};
|
|
155
|
+
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
156
|
+
const normalized = _optionalChain([process, 'access', _5 => _5.env, 'access', _6 => _6[key], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);
|
|
157
|
+
if (normalized) context[key.toLowerCase()] = normalized;
|
|
158
|
+
}
|
|
159
|
+
if (_optionalChain([process, 'access', _9 => _9.env, 'access', _10 => _10.CLAUDE_PROJECT_DIR, 'optionalAccess', _11 => _11.trim, 'call', _12 => _12()])) {
|
|
160
|
+
context.claude_project_dir_present = "true";
|
|
161
|
+
}
|
|
162
|
+
if (_optionalChain([process, 'access', _13 => _13.env, 'access', _14 => _14.DEEPLINE_PLUGIN_ROOT, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()])) {
|
|
163
|
+
context.deepline_plugin_root_present = "true";
|
|
164
|
+
}
|
|
165
|
+
if (_optionalChain([process, 'access', _17 => _17.env, 'access', _18 => _18.DEEPLINE_PLUGIN_SKILLS_DIR, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()])) {
|
|
166
|
+
context.deepline_plugin_skills_dir_present = "true";
|
|
167
|
+
}
|
|
168
|
+
if (_optionalChain([process, 'access', _21 => _21.env, 'access', _22 => _22.HOME, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24(), 'access', _25 => _25.startsWith, 'call', _26 => _26("/sessions/")])) {
|
|
169
|
+
context.home_scope = "sessions";
|
|
170
|
+
}
|
|
171
|
+
return context;
|
|
172
|
+
}
|
|
173
|
+
function failureReportHeaders(apiKey) {
|
|
174
|
+
const agentSessionId = _chunkSPN7U3MVjs.agentSessionIdFromEnvironment.call(void 0, );
|
|
175
|
+
return {
|
|
176
|
+
..._chunkSPN7U3MVjs.deploymentProtectionHeaders.call(void 0, ),
|
|
177
|
+
...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {},
|
|
178
|
+
Authorization: `Bearer ${apiKey}`,
|
|
179
|
+
"Content-Type": "application/json",
|
|
180
|
+
"User-Agent": `deepline-ts-sdk/${_chunkSPN7U3MVjs.SDK_VERSION}`,
|
|
181
|
+
"X-Deepline-Client-Family": "sdk",
|
|
182
|
+
"X-Deepline-CLI-Family": "sdk",
|
|
183
|
+
"X-Deepline-Agent-Runtime": _chunkSPN7U3MVjs.detectAgentRuntime.call(void 0, ),
|
|
184
|
+
"X-Deepline-CLI-Version": _chunkSPN7U3MVjs.SDK_VERSION,
|
|
185
|
+
"X-Deepline-SDK-Version": _chunkSPN7U3MVjs.SDK_VERSION
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
async function postFailureReport(input) {
|
|
189
|
+
const controller = new AbortController();
|
|
190
|
+
const timeout = setTimeout(() => controller.abort(), input.timeoutMs);
|
|
191
|
+
if (input.background) timeout.unref();
|
|
192
|
+
try {
|
|
193
|
+
await fetch(new URL("/api/v2/cli/report-failure", input.baseUrl), {
|
|
194
|
+
method: "POST",
|
|
195
|
+
headers: failureReportHeaders(input.apiKey),
|
|
196
|
+
body: JSON.stringify(input.body),
|
|
197
|
+
signal: controller.signal
|
|
198
|
+
});
|
|
199
|
+
return true;
|
|
200
|
+
} catch (e) {
|
|
201
|
+
return false;
|
|
202
|
+
} finally {
|
|
203
|
+
clearTimeout(timeout);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function boundedTelemetryString(value, maxChars) {
|
|
207
|
+
return redactFailureText(value.trim(), maxChars);
|
|
208
|
+
}
|
|
209
|
+
async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
210
|
+
if (isFailureReportingDisabled()) return false;
|
|
211
|
+
let apiKey = "";
|
|
212
|
+
try {
|
|
213
|
+
apiKey = _chunkZLN2B5YAjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
214
|
+
} catch (e2) {
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
if (!apiKey) return false;
|
|
218
|
+
const attempts = input.attempts.slice(0, 2).map((attempt) => ({
|
|
219
|
+
installer: attempt.installer,
|
|
220
|
+
outcome: attempt.outcome,
|
|
221
|
+
exit_code: typeof attempt.exitCode === "number" && Number.isFinite(attempt.exitCode) ? Math.trunc(attempt.exitCode) : null
|
|
222
|
+
}));
|
|
223
|
+
const agents = input.agents.slice(0, 8).map((agent) => boundedTelemetryString(agent, 100)).filter(Boolean);
|
|
224
|
+
const baseUrl = input.baseUrl.replace(/\/$/, "");
|
|
225
|
+
const failureKind = "background_warning";
|
|
226
|
+
const failureCode2 = "SKILLS_AUTO_SYNC_FAILED";
|
|
227
|
+
const failureStage = "skills_install";
|
|
228
|
+
return postFailureReport({
|
|
229
|
+
baseUrl,
|
|
230
|
+
apiKey,
|
|
231
|
+
timeoutMs: BACKGROUND_REPORT_FAILURE_TIMEOUT_MS,
|
|
232
|
+
background: true,
|
|
233
|
+
body: {
|
|
234
|
+
command: "deepline skills",
|
|
235
|
+
subcommand: "skills",
|
|
236
|
+
failure_kind: failureKind,
|
|
237
|
+
failure_code: failureCode2,
|
|
238
|
+
failure_stage: failureStage,
|
|
239
|
+
error_body: "Automatic Deepline skills installation failed.",
|
|
240
|
+
cli_version: _chunkSPN7U3MVjs.SDK_VERSION,
|
|
241
|
+
context: {
|
|
242
|
+
environment: buildEnvironmentContext(),
|
|
243
|
+
skills_sync: {
|
|
244
|
+
skills_package: boundedTelemetryString(input.skillsPackage, 100),
|
|
245
|
+
remote_skills_version: boundedTelemetryString(
|
|
246
|
+
input.remoteSkillsVersion,
|
|
247
|
+
200
|
|
248
|
+
),
|
|
249
|
+
agents,
|
|
250
|
+
target_skill_count: Math.max(
|
|
251
|
+
0,
|
|
252
|
+
Math.trunc(
|
|
253
|
+
Number.isFinite(input.targetSkillCount) ? input.targetSkillCount : 0
|
|
254
|
+
)
|
|
255
|
+
),
|
|
256
|
+
marker_written: input.markerWritten,
|
|
257
|
+
attempts
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
function subcommandFromArgv(argv) {
|
|
264
|
+
return _nullishCoalesce(argv.find((arg) => arg && !arg.startsWith("-")), () => ( null));
|
|
265
|
+
}
|
|
266
|
+
function commandTokens(argv) {
|
|
267
|
+
return argv.map((arg) => String(_nullishCoalesce(arg, () => ( ""))).trim()).filter((arg) => arg && !arg.startsWith("-"));
|
|
268
|
+
}
|
|
269
|
+
function isServerLoggedPlayRunStartFailure(input) {
|
|
270
|
+
const [subcommand, command] = commandTokens(input.argv);
|
|
271
|
+
return subcommand === "plays" && command === "run" && input.error instanceof _chunkDIAWYWT5js.DeeplineError && typeof input.error.statusCode === "number";
|
|
272
|
+
}
|
|
273
|
+
function shouldReport(input) {
|
|
274
|
+
if (input.error !== void 0) return true;
|
|
275
|
+
return input.exitCode !== null && REPORTABLE_EXIT_CODES.has(input.exitCode);
|
|
276
|
+
}
|
|
277
|
+
function failureCode(input) {
|
|
278
|
+
if (input.error !== void 0) {
|
|
279
|
+
if (isNetworkFailure(input.error))
|
|
280
|
+
return classifyNetworkFailure(input.error);
|
|
281
|
+
if (input.error instanceof _chunkDIAWYWT5js.DeeplineError && input.error.code) {
|
|
282
|
+
return input.error.code;
|
|
283
|
+
}
|
|
284
|
+
if (input.error instanceof Error && input.error.name)
|
|
285
|
+
return input.error.name;
|
|
286
|
+
return "CLI_FAILURE";
|
|
287
|
+
}
|
|
288
|
+
return input.exitCode === 4 ? "network_error" : "command_exit";
|
|
289
|
+
}
|
|
290
|
+
function resolvedExitCode(input) {
|
|
291
|
+
if (typeof input.exitCode === "number" && Number.isFinite(input.exitCode)) {
|
|
292
|
+
return Math.trunc(input.exitCode);
|
|
293
|
+
}
|
|
294
|
+
if (input.error === void 0) return null;
|
|
295
|
+
return isNetworkFailure(input.error) ? 4 : 5;
|
|
296
|
+
}
|
|
297
|
+
function resolveSdkCliFailureExitCode(error) {
|
|
298
|
+
return isNetworkFailure(error) ? 4 : 1;
|
|
299
|
+
}
|
|
300
|
+
function resolvedFailureKind(input) {
|
|
301
|
+
return input.error === void 0 ? "command_exit" : "uncaught_exception";
|
|
302
|
+
}
|
|
303
|
+
function safeRequestDiagnostics(error) {
|
|
304
|
+
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError)) return null;
|
|
305
|
+
const request = _optionalChain([error, 'access', _27 => _27.details, 'optionalAccess', _28 => _28.request]);
|
|
306
|
+
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
307
|
+
return null;
|
|
308
|
+
const value = request;
|
|
309
|
+
const result = {};
|
|
310
|
+
if (typeof value.phase === "string" && [
|
|
311
|
+
"before_request",
|
|
312
|
+
"retry_wait",
|
|
313
|
+
"awaiting_headers",
|
|
314
|
+
"reading_body"
|
|
315
|
+
].includes(value.phase))
|
|
316
|
+
result.phase = value.phase;
|
|
317
|
+
if (typeof value.method === "string" && /^(GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS)$/.test(value.method))
|
|
318
|
+
result.method = value.method;
|
|
319
|
+
if (typeof value.url === "string") {
|
|
320
|
+
try {
|
|
321
|
+
const url = new URL(value.url);
|
|
322
|
+
if (url.protocol === "https:" || url.protocol === "http:") {
|
|
323
|
+
result.url = redactFailureText(`${url.origin}${url.pathname}`, 1e3);
|
|
324
|
+
}
|
|
325
|
+
} catch (e3) {
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
if (typeof value.failedAtUtc === "string" && Number.isFinite(Date.parse(value.failedAtUtc))) {
|
|
329
|
+
result.failedAtUtc = new Date(value.failedAtUtc).toISOString();
|
|
330
|
+
}
|
|
331
|
+
for (const key of ["elapsedMs", "attempts"]) {
|
|
332
|
+
const number = value[key];
|
|
333
|
+
if (typeof number === "number" && Number.isSafeInteger(number) && number >= 0)
|
|
334
|
+
result[key] = number;
|
|
335
|
+
}
|
|
336
|
+
return Object.keys(result).length > 0 ? result : null;
|
|
337
|
+
}
|
|
338
|
+
function buildFailureReport(input) {
|
|
339
|
+
const durationMs = Math.max(0, Date.now() - input.startedAtMs);
|
|
340
|
+
const request = safeRequestDiagnostics(input.error);
|
|
341
|
+
const failureKind = resolvedFailureKind({
|
|
342
|
+
exitCode: input.exitCode,
|
|
343
|
+
error: input.error
|
|
344
|
+
});
|
|
345
|
+
const code = failureCode({ exitCode: input.exitCode, error: input.error });
|
|
346
|
+
const errorBody = input.error === void 0 ? `SDK CLI command exited ${_nullishCoalesce(input.exitCode, () => ( "unknown"))}` : errorMessage(input.error);
|
|
347
|
+
const networkCauseCategory = input.error !== void 0 && isNetworkFailure(input.error) ? classifyNetworkCauseCategory(input.error) : null;
|
|
348
|
+
return {
|
|
349
|
+
command: sanitizeCommand(input.argv),
|
|
350
|
+
subcommand: subcommandFromArgv(input.argv),
|
|
351
|
+
error_status: input.exitCode,
|
|
352
|
+
error_body: redactFailureText(errorBody),
|
|
353
|
+
exit_code: input.exitCode,
|
|
354
|
+
duration_ms: durationMs,
|
|
355
|
+
error_class: input.error instanceof Error ? input.error.name : null,
|
|
356
|
+
stack_trace: errorStack(input.error),
|
|
357
|
+
failure_kind: failureKind,
|
|
358
|
+
failure_code: code,
|
|
359
|
+
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
360
|
+
cli_version: _chunkSPN7U3MVjs.SDK_VERSION,
|
|
361
|
+
context: {
|
|
362
|
+
base_url: redactFailureText(input.baseUrl, 400),
|
|
363
|
+
command_summary: sanitizeCommand(input.argv),
|
|
364
|
+
environment: buildEnvironmentContext(),
|
|
365
|
+
...request ? { request } : {},
|
|
366
|
+
failure_kind: failureKind,
|
|
367
|
+
failure_code: code,
|
|
368
|
+
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
369
|
+
duration_ms: durationMs,
|
|
370
|
+
...input.exitCode !== null ? { exit_code: input.exitCode } : {},
|
|
371
|
+
...networkCauseCategory ? { network_cause_category: networkCauseCategory } : {}
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
async function maybeReportSdkCliFailure(input) {
|
|
376
|
+
if (isFailureReportingDisabled()) return false;
|
|
377
|
+
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
378
|
+
const exitCode = resolvedExitCode(input);
|
|
379
|
+
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
380
|
+
const baseUrl = _chunkZLN2B5YAjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
381
|
+
const apiKey = _chunkZLN2B5YAjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
382
|
+
if (!apiKey) return false;
|
|
383
|
+
return postFailureReport({
|
|
384
|
+
baseUrl,
|
|
385
|
+
apiKey,
|
|
386
|
+
timeoutMs: REPORT_FAILURE_TIMEOUT_MS,
|
|
387
|
+
body: buildFailureReport({
|
|
388
|
+
argv: input.argv,
|
|
389
|
+
startedAtMs: input.startedAtMs,
|
|
390
|
+
error: input.error,
|
|
391
|
+
exitCode,
|
|
392
|
+
baseUrl
|
|
393
|
+
})
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
exports.isFailureReportingDisabled = isFailureReportingDisabled; exports.redactFailureText = redactFailureText; exports.sanitizeCommand = sanitizeCommand; exports.failureReportHeaders = failureReportHeaders; exports.maybeReportAutomaticSkillsSyncFailure = maybeReportAutomaticSkillsSyncFailure; exports.resolveSdkCliFailureExitCode = resolveSdkCliFailureExitCode; exports.maybeReportSdkCliFailure = maybeReportSdkCliFailure;
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
addDescribeOptions,
|
|
3
3
|
recordApiResponse,
|
|
4
4
|
writeExecutionOutput
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JA7YBRP4.mjs";
|
|
6
6
|
import {
|
|
7
7
|
recentSearchRef,
|
|
8
8
|
registerDeprecatedSearchCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OMEDQ77C.mjs";
|
|
10
10
|
import {
|
|
11
11
|
Capability,
|
|
12
12
|
arrayField,
|
|
@@ -46,10 +46,10 @@ import {
|
|
|
46
46
|
} from "./chunk-FIVKWNMT.mjs";
|
|
47
47
|
import {
|
|
48
48
|
DeeplineClient
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-52FPW2RD.mjs";
|
|
50
50
|
import {
|
|
51
51
|
validateExecutionIdempotencyKey
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-4OFSAZN6.mjs";
|
|
53
53
|
import {
|
|
54
54
|
stableStringify
|
|
55
55
|
} from "./chunk-BMCRTI6Z.mjs";
|
|
@@ -59,18 +59,18 @@ import {
|
|
|
59
59
|
maybeAutoUpdateAndRelaunch,
|
|
60
60
|
registerCompatibilityCatalog,
|
|
61
61
|
runToolExecuteStage
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-UZ24SF7N.mjs";
|
|
63
63
|
import {
|
|
64
64
|
isCliTraceEnabled,
|
|
65
65
|
recordCliTrace,
|
|
66
66
|
resolveCliMaintenancePolicy
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-PDLOPF5L.mjs";
|
|
68
68
|
import {
|
|
69
69
|
checkSdkCompatibility,
|
|
70
70
|
enforceSdkCompatibilityResponse,
|
|
71
71
|
flushDeferredSkillsSyncNotices,
|
|
72
72
|
syncSdkSkillsIfNeeded
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-ACI6CUDX.mjs";
|
|
74
74
|
import {
|
|
75
75
|
printCommandEnvelope,
|
|
76
76
|
printCompactJson,
|
|
@@ -78,12 +78,12 @@ import {
|
|
|
78
78
|
printJsonError,
|
|
79
79
|
renderCommandEnvelopeText,
|
|
80
80
|
shouldEmitJson
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-PZN24YQQ.mjs";
|
|
82
82
|
import {
|
|
83
83
|
readSdkSkillsLocalVersion,
|
|
84
84
|
resolveConfig,
|
|
85
85
|
sdkCliStateDirPath
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-SHKRL7CW.mjs";
|
|
87
87
|
import {
|
|
88
88
|
DeeplineError
|
|
89
89
|
} from "./chunk-HBL4PM5Q.mjs";
|
|
@@ -1053,7 +1053,7 @@ Examples:
|
|
|
1053
1053
|
process.exitCode = await narrowView();
|
|
1054
1054
|
return;
|
|
1055
1055
|
}
|
|
1056
|
-
const { describeAnything } = await import("./describe-
|
|
1056
|
+
const { describeAnything } = await import("./describe-NCKAJPUG.mjs");
|
|
1057
1057
|
process.exitCode = await describeAnything(
|
|
1058
1058
|
toolId,
|
|
1059
1059
|
{
|
|
@@ -2598,7 +2598,7 @@ async function executeToolForReceipt(input) {
|
|
|
2598
2598
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2599
2599
|
...metadata.executionMetadata?.retrySafeTransientHttp === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2600
2600
|
...key ? { idempotencyKey: key } : {},
|
|
2601
|
-
searchRef: recentSearchRef(),
|
|
2601
|
+
searchRef: recentSearchRef(toolId),
|
|
2602
2602
|
cliInvocationId,
|
|
2603
2603
|
onResponseReceived: recordApiResponse
|
|
2604
2604
|
}).catch((error) => {
|
|
@@ -2790,7 +2790,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2790
2790
|
responseIntent,
|
|
2791
2791
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2792
2792
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2793
|
-
searchRef: recentSearchRef(),
|
|
2793
|
+
searchRef: recentSearchRef(parsed.toolId),
|
|
2794
2794
|
cliInvocationId,
|
|
2795
2795
|
onResponseReceived: recordApiResponse,
|
|
2796
2796
|
...tracing ? {
|
|
@@ -16,12 +16,12 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
|
16
16
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkXHPB6RGYjs = require('./chunk-XHPB6RGY.js');
|
|
20
20
|
|
|
21
21
|
// src/version.ts
|
|
22
|
-
var SDK_VERSION =
|
|
23
|
-
var SDK_API_MAJOR =
|
|
24
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
22
|
+
var SDK_VERSION = _chunkXHPB6RGYjs.SDK_RELEASE.version;
|
|
23
|
+
var SDK_API_MAJOR = _chunkXHPB6RGYjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
24
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunkXHPB6RGYjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
25
25
|
|
|
26
26
|
// src/agent-runtime.ts
|
|
27
27
|
var _os = require('os');
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
resolveUpdatePlan,
|
|
5
5
|
runAutomaticUpdatePlan,
|
|
6
6
|
shouldRunCliAutoUpdate
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OA6U5NVB.mjs";
|
|
8
8
|
import {
|
|
9
9
|
isCiEnvironment
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ACI6CUDX.mjs";
|
|
11
11
|
import {
|
|
12
12
|
addJsonNotice,
|
|
13
13
|
isJsonOutputMode
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PZN24YQQ.mjs";
|
|
15
15
|
import {
|
|
16
16
|
resolveApiKeyForBaseUrl
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SHKRL7CW.mjs";
|
|
18
18
|
import {
|
|
19
19
|
SDK_VERSION
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7AD565DO.mjs";
|
|
21
21
|
|
|
22
22
|
// src/cli/compatibility-catalog.ts
|
|
23
23
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkBWAYMJ23js = require('./chunk-BWAYMJ23.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkRNSHCJMEjs = require('./chunk-RNSHCJME.js');
|
|
@@ -11,7 +11,7 @@ var _chunkRNSHCJMEjs = require('./chunk-RNSHCJME.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkEMUFF6EUjs = require('./chunk-EMUFF6EU.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
@@ -581,7 +581,7 @@ function parseInputFlagValue(raw) {
|
|
|
581
581
|
return raw;
|
|
582
582
|
}
|
|
583
583
|
function parsePlayRunOptions(args, initialInput = null) {
|
|
584
|
-
const selection =
|
|
584
|
+
const selection = _chunkEMUFF6EUjs.parseJsonFields.call(void 0, args, "run");
|
|
585
585
|
args = selection.args;
|
|
586
586
|
const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--json] [--full] [--<input> value]\n Runs use the Absurd CJS runtime.\n --header '<name>: <value>' may repeat; each is sent on every request for this run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and deepline.dataset guidance.";
|
|
587
587
|
let filePath = null;
|
|
@@ -593,7 +593,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
593
593
|
let revisionSelector = null;
|
|
594
594
|
const watch = !args.includes("--no-wait");
|
|
595
595
|
const dryRun = args.includes("--dry-run");
|
|
596
|
-
let jsonOutput = dryRun ?
|
|
596
|
+
let jsonOutput = dryRun ? _chunkEMUFF6EUjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkEMUFF6EUjs.argsWantJson.call(void 0, args);
|
|
597
597
|
const fullJson = args.includes("--full");
|
|
598
598
|
const force = args.includes("--force") || args.includes("--from-start");
|
|
599
599
|
const forceToolRefresh = args.includes("--force-tool-refresh") || args.includes("--refresh-cache");
|
|
@@ -656,7 +656,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
656
656
|
"--log-level requires one of: debug, info, warn, error."
|
|
657
657
|
);
|
|
658
658
|
}
|
|
659
|
-
const parsed =
|
|
659
|
+
const parsed = _chunkBWAYMJ23js.parseLogLevel.call(void 0, value);
|
|
660
660
|
if (!parsed) {
|
|
661
661
|
throw new Error(
|
|
662
662
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -974,7 +974,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
974
974
|
const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
|
|
975
975
|
(arg) => arg === "--log-level" || arg.startsWith("--log-level=")
|
|
976
976
|
);
|
|
977
|
-
let logLevel = options.logLevel === void 0 ? base.logLevel :
|
|
977
|
+
let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkBWAYMJ23js.parseLogLevel.call(void 0, options.logLevel);
|
|
978
978
|
if (!logLevel)
|
|
979
979
|
throw new Error("--log-level requires one of: debug, info, warn, error.");
|
|
980
980
|
const debugAlias = options.logs || options.debug === true || inputArgs.some(
|
|
@@ -988,13 +988,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
988
988
|
if (debugAlias || debugMapLatency && logLevel === "info")
|
|
989
989
|
logLevel = "debug";
|
|
990
990
|
const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
|
|
991
|
-
const jsonFields = options.json === void 0 ? base.jsonFields :
|
|
992
|
-
[...fullJson ? ["--full"] : [], ...
|
|
991
|
+
const jsonFields = options.json === void 0 ? base.jsonFields : _chunkEMUFF6EUjs.parseJsonFields.call(void 0,
|
|
992
|
+
[...fullJson ? ["--full"] : [], ..._chunkEMUFF6EUjs.jsonFieldArgs.call(void 0, options.json)],
|
|
993
993
|
"run"
|
|
994
994
|
).fields;
|
|
995
995
|
const watch = options.wait === false ? false : base.watch;
|
|
996
996
|
const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
|
|
997
|
-
const jsonOutput = dryRun || !watch ? explicitJson ||
|
|
997
|
+
const jsonOutput = dryRun || !watch ? explicitJson || _chunkEMUFF6EUjs.argsWantJson.call(void 0, []) : explicitJson;
|
|
998
998
|
const verboseLogs = Boolean(
|
|
999
999
|
debugAlias || logLevel === "debug" || debugMapLatency
|
|
1000
1000
|
);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
seedToolListScript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RT3HJBIH.mjs";
|
|
4
4
|
import {
|
|
5
5
|
addDescribeOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JA7YBRP4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
describeLookupsFor,
|
|
9
9
|
describeName,
|
|
@@ -14,18 +14,18 @@ import {
|
|
|
14
14
|
} from "./chunk-ITJ7NB2D.mjs";
|
|
15
15
|
import {
|
|
16
16
|
DeeplineClient
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-52FPW2RD.mjs";
|
|
18
18
|
import {
|
|
19
19
|
failureReportHeaders,
|
|
20
20
|
isFailureReportingDisabled
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-FIQ5UEIF.mjs";
|
|
22
22
|
import {
|
|
23
23
|
printCommandEnvelope
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-PZN24YQQ.mjs";
|
|
25
25
|
import {
|
|
26
26
|
autoDetectBaseUrl,
|
|
27
27
|
resolveApiKeyForBaseUrl
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-SHKRL7CW.mjs";
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/describe.ts
|
|
31
31
|
import { writeFileSync } from "fs";
|