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
|
@@ -1,9 +1,9 @@
|
|
|
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 _chunkGAUNJCXQjs = require('./chunk-GAUNJCXQ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkWTQLUULBjs = require('./chunk-WTQLUULB.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -14,18 +14,18 @@ var _chunkTMQUMILMjs = require('./chunk-TMQUMILM.js');
|
|
|
14
14
|
var _chunkNTLBZUHDjs = require('./chunk-NTLBZUHD.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkIDAE5VDHjs = require('./chunk-IDAE5VDH.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkQYGYVCRIjs = require('./chunk-QYGYVCRI.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkEMUFF6EUjs = require('./chunk-EMUFF6EU.js');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkZLN2B5YAjs = require('./chunk-ZLN2B5YA.js');
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/describe.ts
|
|
31
31
|
var _fs = require('fs');
|
|
@@ -34,14 +34,14 @@ var _path = require('path');
|
|
|
34
34
|
// src/cli/doc-read-reporting.ts
|
|
35
35
|
var REPORT_TIMEOUT_MS = 1e3;
|
|
36
36
|
async function reportDocRead(docId) {
|
|
37
|
-
if (
|
|
37
|
+
if (_chunkQYGYVCRIjs.isFailureReportingDisabled.call(void 0, )) return;
|
|
38
38
|
try {
|
|
39
|
-
const baseUrl =
|
|
40
|
-
const apiKey =
|
|
39
|
+
const baseUrl = _chunkZLN2B5YAjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
40
|
+
const apiKey = _chunkZLN2B5YAjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
41
41
|
if (!apiKey) return;
|
|
42
42
|
await fetch(new URL("/api/v2/telemetry/doc-read", baseUrl), {
|
|
43
43
|
method: "POST",
|
|
44
|
-
headers:
|
|
44
|
+
headers: _chunkQYGYVCRIjs.failureReportHeaders.call(void 0, apiKey),
|
|
45
45
|
body: JSON.stringify({ doc_id: docId }),
|
|
46
46
|
signal: AbortSignal.timeout(REPORT_TIMEOUT_MS)
|
|
47
47
|
});
|
|
@@ -54,16 +54,16 @@ function nothingNamed(name) {
|
|
|
54
54
|
return `Nothing named "${name}". Search for it: deepline search ${JSON.stringify(name.replace(/[-_./]+/g, " "))}`;
|
|
55
55
|
}
|
|
56
56
|
function findNamed2(name, options) {
|
|
57
|
-
return _chunkTMQUMILMjs.findNamed.call(void 0, name, options, _chunkTMQUMILMjs.describeLookupsFor.call(void 0, new (0,
|
|
57
|
+
return _chunkTMQUMILMjs.findNamed.call(void 0, name, options, _chunkTMQUMILMjs.describeLookupsFor.call(void 0, new (0, _chunkIDAE5VDHjs.DeeplineClient)()));
|
|
58
58
|
}
|
|
59
59
|
async function describeAnything(name, options, onMissing) {
|
|
60
|
-
const client = new (0,
|
|
60
|
+
const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
|
|
61
61
|
const lookups = _chunkTMQUMILMjs.describeLookupsFor.call(void 0, client);
|
|
62
62
|
const outcome = await _chunkTMQUMILMjs.describeName.call(void 0, name, options, {
|
|
63
63
|
...lookups,
|
|
64
64
|
// `tools describe` has already fetched the tool for its compatibility check.
|
|
65
65
|
tool: async (toolName) => _nullishCoalesce(options.fetchedTool, () => ( lookups.tool(toolName))),
|
|
66
|
-
seedStarterScript:
|
|
66
|
+
seedStarterScript: _chunkGAUNJCXQjs.seedToolListScript
|
|
67
67
|
});
|
|
68
68
|
if (outcome.status === "missing") {
|
|
69
69
|
if (onMissing) return onMissing();
|
|
@@ -89,18 +89,18 @@ function deliver(envelope, lines, { json, out }) {
|
|
|
89
89
|
` : text;
|
|
90
90
|
_fs.writeFileSync.call(void 0, path, content);
|
|
91
91
|
const bytes = Buffer.byteLength(content);
|
|
92
|
-
|
|
92
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
93
93
|
{ path, bytes },
|
|
94
94
|
{ json, text: `Wrote ${path} (${bytes} bytes)
|
|
95
95
|
` }
|
|
96
96
|
);
|
|
97
97
|
return 0;
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, envelope, { json, text });
|
|
100
100
|
return 0;
|
|
101
101
|
}
|
|
102
102
|
function registerDescribeCommand(program) {
|
|
103
|
-
|
|
103
|
+
_chunkWTQLUULBjs.addDescribeOptions.call(void 0, program.command("describe <name>")).option("--web-url", "Print only a play's play page URL").description(
|
|
104
104
|
"Describe anything search returns: a tool, monitor type, or play."
|
|
105
105
|
).addHelpText(
|
|
106
106
|
"after",
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PZN24YQQ.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ACTIVE_ORG_ID_ENV,
|
|
8
8
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
saveHostEnvValues,
|
|
23
23
|
saveProjectDeeplineEnvValues,
|
|
24
24
|
storedHostApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-SHKRL7CW.mjs";
|
|
26
26
|
import {
|
|
27
27
|
SDK_API_CONTRACT,
|
|
28
28
|
SDK_VERSION,
|
|
29
29
|
connectionFailureMessage,
|
|
30
30
|
detectAgentRuntime,
|
|
31
31
|
networkCauseCode
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-7AD565DO.mjs";
|
|
33
33
|
import {
|
|
34
34
|
DeeplineError
|
|
35
35
|
} from "./chunk-HBL4PM5Q.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
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 _chunkBWAYMJ23js = require('./chunk-BWAYMJ23.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkZLN2B5YAjs = require('./chunk-ZLN2B5YA.js');
|
|
8
8
|
|
|
9
9
|
// src/plays/local-play-execution.ts
|
|
10
10
|
function importedNodes(graph) {
|
|
@@ -137,9 +137,9 @@ async function pinLocalPlayImports(client, graph) {
|
|
|
137
137
|
|
|
138
138
|
// src/plays/client.ts
|
|
139
139
|
function createPlayClient(options) {
|
|
140
|
-
const config =
|
|
141
|
-
return new (0,
|
|
142
|
-
new (0,
|
|
140
|
+
const config = _chunkZLN2B5YAjs.resolveConfig.call(void 0, options);
|
|
141
|
+
return new (0, _chunkBWAYMJ23js.PlayClient)(
|
|
142
|
+
new (0, _chunkZLN2B5YAjs.HttpClient)(config),
|
|
143
143
|
_nullishCoalesce(config.environment, () => ( process.env))
|
|
144
144
|
);
|
|
145
145
|
}
|
|
@@ -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) {
|