deepline 0.3.480 → 0.3.481
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/client-core.ts +35 -1
- package/dist/bundling-sources/sdk/src/http-core.ts +2 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +54 -31
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/legacy-radar-forward-routes.ts +569 -0
- package/dist/bundling-sources/shared_libs/monitors/legacy-radar-retirement.ts +451 -0
- package/dist/bundling-sources/shared_libs/monitors/package.json +5 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-array-input-receipts.ts +13 -6
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +125 -22
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +16 -53
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +34 -48
- package/dist/bundling-sources/shared_libs/security/receipt-admission-token.ts +44 -0
- package/dist/cli/auth-EQWYBNIE.js +43 -0
- package/dist/cli/{auth-KMKFQX7X.mjs → auth-FYY65LYD.mjs} +5 -5
- package/dist/cli/{billing-G3Y5FTQM.mjs → billing-3MELYUTI.mjs} +7 -7
- package/dist/cli/{billing-R5RCTEW6.js → billing-TROHWBSE.js} +80 -80
- package/dist/cli/{chunk-4V6KEXCM.js → chunk-27BYXQU4.js} +1 -1
- package/dist/cli/{chunk-OQOXR6JL.js → chunk-4CIVXXSU.js} +26 -26
- package/dist/cli/{chunk-RPJSVGSC.js → chunk-5ONCPLWC.js} +16 -16
- package/dist/cli/{chunk-K7E2DO5P.js → chunk-6VKDKATO.js} +53 -53
- package/dist/cli/{chunk-WQBJHB63.js → chunk-6WWBVWFQ.js} +7 -7
- package/dist/cli/{chunk-LLEBPM3N.mjs → chunk-6ZMUAASO.mjs} +4 -4
- package/dist/cli/{chunk-IQ6WL36K.mjs → chunk-75LUK4E5.mjs} +1 -1
- package/dist/cli/{chunk-AKCYZDBO.mjs → chunk-7VVC4RZX.mjs} +1 -1
- package/dist/cli/{chunk-JBQKBDDN.mjs → chunk-ASQJUUGB.mjs} +5 -5
- package/dist/cli/{chunk-DIDWIPMA.mjs → chunk-BJ5UFTWL.mjs} +28 -7
- package/dist/cli/{chunk-JH77OHD5.js → chunk-BJMEXKZY.js} +2 -2
- package/dist/cli/{chunk-53LLOGNV.mjs → chunk-C7UIUKW6.mjs} +2 -2
- package/dist/cli/{chunk-LHU6BMDV.js → chunk-CM3KC74A.js} +3 -3
- package/dist/cli/{chunk-XNXE7YWI.mjs → chunk-CS2P3EQS.mjs} +2 -2
- package/dist/cli/{chunk-APFFHSPL.js → chunk-CUSWZTS7.js} +8 -8
- package/dist/cli/{chunk-6AYQK7Z6.js → chunk-D3UHG54V.js} +199 -178
- package/dist/cli/{chunk-PM2CT7HZ.mjs → chunk-EJTU6X6C.mjs} +3 -3
- package/dist/cli/{chunk-FZX2DGQZ.js → chunk-EPEAQA6O.js} +37 -37
- package/dist/cli/{chunk-57MJL2HU.mjs → chunk-EPZSX7FZ.mjs} +4 -4
- package/dist/cli/{chunk-FZ42SO3Q.mjs → chunk-FXLMDAAY.mjs} +1 -1
- package/dist/cli/chunk-GBAT5NMI.mjs +789 -0
- package/dist/cli/{chunk-VPO2D7WV.js → chunk-GJOKFJ2Y.js} +10 -10
- package/dist/cli/{chunk-JDMR33HS.js → chunk-GVAENVIG.js} +28 -19
- package/dist/cli/{chunk-NELMCOWK.mjs → chunk-HNRELVCS.mjs} +27 -18
- package/dist/cli/{chunk-SUTQCM7U.mjs → chunk-HXG7TYRS.mjs} +2 -2
- package/dist/cli/{chunk-PDDUX5UY.js → chunk-J4D3PCQ2.js} +5 -5
- package/dist/cli/{chunk-PC42DFZC.mjs → chunk-JE27DTQM.mjs} +3 -3
- package/dist/cli/{chunk-MEJJD7PA.js → chunk-KDU6TSGE.js} +2 -2
- package/dist/cli/{chunk-NVTVS4AV.js → chunk-KPXP2DIY.js} +7 -9
- package/dist/cli/chunk-KQSTV4MW.js +789 -0
- package/dist/cli/{chunk-2AYWC63S.mjs → chunk-LISZBUA7.mjs} +2 -2
- package/dist/cli/{chunk-44TVNYYV.mjs → chunk-LTOY2GUJ.mjs} +10 -10
- package/dist/cli/{chunk-OGXG46LY.js → chunk-MKDWU3ZI.js} +93 -93
- package/dist/cli/{chunk-MTMOYZMK.mjs → chunk-N5267HEH.mjs} +1 -1
- package/dist/cli/{chunk-T7EWDIVM.mjs → chunk-PDJS6LFI.mjs} +2 -1
- package/dist/cli/{chunk-QEV3GFDS.js → chunk-R4EFW2I2.js} +3 -3
- package/dist/cli/{chunk-KQNQCZLB.mjs → chunk-RV2GB7KW.mjs} +2 -2
- package/dist/cli/{chunk-PYIWO4GS.mjs → chunk-S5BM6NPJ.mjs} +3 -5
- package/dist/cli/{chunk-7LMLHUCP.mjs → chunk-S5WXSC3P.mjs} +5 -5
- package/dist/cli/{chunk-63QH6FL3.mjs → chunk-SOGLBLMH.mjs} +4 -4
- package/dist/cli/{chunk-5IVGZCKY.js → chunk-SVPM2E2U.js} +5 -5
- package/dist/cli/{chunk-ZSWY5E3W.mjs → chunk-UUGSZZZH.mjs} +1 -1
- package/dist/cli/{chunk-TBJ23WKT.js → chunk-VBDR2DP6.js} +3 -3
- package/dist/cli/{chunk-TXFURKHD.mjs → chunk-VRAOWHXJ.mjs} +1 -1
- package/dist/cli/{chunk-ASARTL6E.mjs → chunk-VTKAIGW6.mjs} +3 -3
- package/dist/cli/{chunk-DQYJXVAF.js → chunk-WF5QE2IW.js} +17 -16
- package/dist/cli/{chunk-NBXG4S2X.js → chunk-WICQQ7GY.js} +53 -53
- package/dist/cli/{chunk-FFSOXQEM.js → chunk-WTWRZ5ZI.js} +8 -8
- package/dist/cli/{chunk-LBZLV6QF.js → chunk-X4XZFIK6.js} +14 -14
- package/dist/cli/{chunk-A3PZKD47.js → chunk-X6MEQBAT.js} +21 -21
- package/dist/cli/{csv-P3AEI4G4.mjs → csv-2EG7JW7V.mjs} +4 -4
- package/dist/cli/{csv-57D62T7L.js → csv-OUALOZBF.js} +13 -13
- package/dist/cli/{db-FWFYU34R.js → db-7BTOI6YB.js} +28 -28
- package/dist/cli/{db-PJQMPZJP.mjs → db-ECDQWI2Y.mjs} +7 -7
- package/dist/cli/describe-EXSH6OZD.js +48 -0
- package/dist/cli/{describe-F57VZZML.mjs → describe-KO6WKQIB.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-ZAJGMAAT.mjs → executions-3VMFBZT4.mjs} +7 -7
- package/dist/cli/{executions-YBT7NTY5.js → executions-VZSG3F3E.js} +9 -9
- package/dist/cli/{feedback-YLYY2EG4.js → feedback-ASKBWRXR.js} +8 -8
- package/dist/cli/{feedback-L3ZQCSY6.mjs → feedback-SN7AVALN.mjs} +4 -4
- package/dist/cli/{git-M7735NWJ.mjs → git-W2DZXEAY.mjs} +5 -5
- package/dist/cli/git-X2XUKYYX.js +25 -0
- package/dist/cli/index.js +167 -144
- package/dist/cli/index.mjs +73 -50
- package/dist/cli/{legacy-noops-TX37UP3U.js → legacy-noops-6KOC6LV7.js} +8 -8
- package/dist/cli/{legacy-noops-PKNMQMGY.mjs → legacy-noops-R2SML7ED.mjs} +5 -5
- package/dist/cli/{monitors-U7AUIOFZ.mjs → monitors-4VGZGJBT.mjs} +8 -8
- package/dist/cli/{monitors-5YTGQSGD.js → monitors-OJXDYU4G.js} +92 -92
- package/dist/cli/{org-N6DSSLLD.js → org-AELMZFUT.js} +73 -73
- package/dist/cli/{org-SRKZRVVH.mjs → org-UGN5ZG2Y.mjs} +7 -7
- package/dist/cli/{pages-YPN54RCC.js → pages-L26N7MK3.js} +18 -18
- package/dist/cli/{pages-UOPJUFCF.mjs → pages-ZYPAAYSS.mjs} +7 -7
- package/dist/cli/{play-4IK4WXWU.mjs → play-ENYB7X4S.mjs} +125 -53
- package/dist/cli/{play-MEYZEYOV.js → play-VTZWB3N5.js} +620 -548
- package/dist/cli/{providers-UGHUYP4C.mjs → providers-BZQTVAQG.mjs} +7 -7
- package/dist/cli/{providers-VS5MK4ZH.js → providers-HWBY6MGQ.js} +10 -10
- package/dist/cli/{quickstart-GW2ERQ2A.js → quickstart-D54IJ3PX.js} +6 -6
- package/dist/cli/{quickstart-YBOQSLFV.mjs → quickstart-SSQJDWPB.mjs} +4 -4
- package/dist/cli/{run-IVGMLY3J.js → run-45NKE7UY.js} +37 -37
- package/dist/cli/{run-44JT5GJM.mjs → run-FR3TPYT3.mjs} +23 -23
- package/dist/cli/{search-43NY73VR.mjs → search-CZCWSR5L.mjs} +8 -8
- package/dist/cli/search-V2GJKQQQ.js +32 -0
- package/dist/cli/{secrets-DABUD3B7.js → secrets-KJ5ZEDWT.js} +16 -16
- package/dist/cli/{secrets-ONDQGW3B.mjs → secrets-KKK55B4Y.mjs} +7 -7
- package/dist/cli/{sessions-AIAKKLSR.mjs → sessions-2YKA54PH.mjs} +5 -5
- package/dist/cli/{sessions-4ILQMBKR.js → sessions-QCNPUTDZ.js} +6 -6
- package/dist/cli/{settings-HSGKYOJT.mjs → settings-4NI2AS5V.mjs} +12 -12
- package/dist/cli/{settings-BWNLL7TP.js → settings-KM3LCPWD.js} +79 -79
- package/dist/cli/{setup-LE4OVH4M.mjs → setup-BZF3M54I.mjs} +9 -9
- package/dist/cli/{setup-37QOD4UT.js → setup-V5MTS2AA.js} +47 -47
- package/dist/cli/skills-CRFYW767.js +33 -0
- package/dist/cli/{skills-A3ZVR2YX.mjs → skills-NXYNB3LP.mjs} +7 -7
- package/dist/cli/{tools-ITKPPUDT.mjs → tools-57MWFRIZ.mjs} +17 -17
- package/dist/cli/tools-Q662HPVJ.js +55 -0
- package/dist/cli/{update-XJOSCOK5.mjs → update-QM6H677U.mjs} +9 -9
- package/dist/cli/update-TYHKF7F5.js +33 -0
- package/dist/cli/{workflow-KYQYFSND.mjs → workflow-NHYDIUWY.mjs} +8 -8
- package/dist/cli/{workflow-LERZ3TYV.js → workflow-TGEC4ITO.js} +18 -18
- package/dist/{client-B9N1bcGc.d.mts → client-DJ3r8VQJ.d.mts} +1 -1
- package/dist/{client-Btw075Hq.d.ts → client-JPSNljtj.d.ts} +1 -1
- package/dist/{client-core-TulbIeRB.d.mts → client-core-3SJlNsKU.d.mts} +21 -2
- package/dist/{client-core-DvGWlwtX.d.ts → client-core-rCoQ5Xz3.d.ts} +21 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +106 -104
- package/dist/plays/bundle-play-file.mjs +5426 -12
- 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/plays/run-request.js +4 -2
- package/dist/plays/run-request.mjs +3 -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 +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-7FOB243B.js +0 -43
- package/dist/cli/chunk-7UFFWPQ2.js +0 -6188
- package/dist/cli/chunk-ZBSUXXZS.mjs +0 -6188
- package/dist/cli/describe-ZAYUBNUQ.js +0 -48
- package/dist/cli/git-A3433UTN.js +0 -25
- package/dist/cli/search-2XTYY7BF.js +0 -32
- package/dist/cli/skills-TULQXRQJ.js +0 -33
- package/dist/cli/tools-QYYBWDXU.js +0 -55
- package/dist/cli/update-XSMY7KWH.js +0 -33
|
@@ -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(); } } 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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCM3KC74Ajs = require('./chunk-CM3KC74A.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ var _chunkLHU6BMDVjs = require('./chunk-LHU6BMDV.js');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkVBDR2DP6js = require('./chunk-VBDR2DP6.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -20,13 +20,13 @@ var _chunkTBJ23WKTjs = require('./chunk-TBJ23WKT.js');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkWF5QE2IWjs = require('./chunk-WF5QE2IW.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunk27BYXQU4js = require('./chunk-27BYXQU4.js');
|
|
30
30
|
|
|
31
31
|
// src/compat.ts
|
|
32
32
|
var _crypto = require('crypto');
|
|
@@ -61,7 +61,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
61
61
|
return value === "1" || value === "true" || value === "yes";
|
|
62
62
|
}
|
|
63
63
|
function sdkCompatibilityCachePath(baseUrl, homeDir = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.HOME, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]) || _os.homedir.call(void 0, )) {
|
|
64
|
-
return _path.join.call(void 0,
|
|
64
|
+
return _path.join.call(void 0, _chunkVBDR2DP6js.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
65
65
|
}
|
|
66
66
|
function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'access', _11 => _11.env, 'access', _12 => _12.HOME, 'optionalAccess', _13 => _13.trim, 'call', _14 => _14()]) || _os.homedir.call(void 0, )) {
|
|
67
67
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -69,9 +69,9 @@ function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'acc
|
|
|
69
69
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
70
70
|
return JSON.stringify({
|
|
71
71
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
72
|
-
version:
|
|
73
|
-
apiContract:
|
|
74
|
-
apiMajor:
|
|
72
|
+
version: _chunkWF5QE2IWjs.SDK_VERSION,
|
|
73
|
+
apiContract: _chunkWF5QE2IWjs.SDK_API_CONTRACT,
|
|
74
|
+
apiMajor: _chunkWF5QE2IWjs.SDK_API_MAJOR,
|
|
75
75
|
command: _optionalChain([command, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()]) || null,
|
|
76
76
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
77
77
|
});
|
|
@@ -79,8 +79,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
79
79
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
80
80
|
return JSON.stringify({
|
|
81
81
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
82
|
-
version:
|
|
83
|
-
apiContract:
|
|
82
|
+
version: _chunkWF5QE2IWjs.SDK_VERSION,
|
|
83
|
+
apiContract: _chunkWF5QE2IWjs.SDK_API_CONTRACT,
|
|
84
84
|
command: _optionalChain([command, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]) || null
|
|
85
85
|
});
|
|
86
86
|
}
|
|
@@ -105,7 +105,7 @@ function isSavedWithin(savedAt, windowMs, now) {
|
|
|
105
105
|
}
|
|
106
106
|
var UPDATE_ADVISORY_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
107
107
|
function claimUpdateAdvisory(baseUrl, now = Date.now()) {
|
|
108
|
-
const path = _path.join.call(void 0,
|
|
108
|
+
const path = _path.join.call(void 0, _chunkVBDR2DP6js.sdkCliStateDirPath.call(void 0, baseUrl), "update-advisory.json");
|
|
109
109
|
try {
|
|
110
110
|
const { shownAt } = JSON.parse(_fs.readFileSync.call(void 0, path, "utf8"));
|
|
111
111
|
if (isSavedWithin(shownAt, UPDATE_ADVISORY_INTERVAL_MS, now)) return false;
|
|
@@ -189,7 +189,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
189
189
|
);
|
|
190
190
|
try {
|
|
191
191
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
192
|
-
url.searchParams.set("version",
|
|
192
|
+
url.searchParams.set("version", _chunkWF5QE2IWjs.SDK_VERSION);
|
|
193
193
|
if (_optionalChain([options, 'access', _27 => _27.command, 'optionalAccess', _28 => _28.trim, 'call', _29 => _29()])) {
|
|
194
194
|
url.searchParams.set("command", options.command.trim());
|
|
195
195
|
}
|
|
@@ -197,7 +197,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
197
197
|
url.searchParams.set("skills_version", _nullishCoalesce(options.skillsVersion, () => ( "")));
|
|
198
198
|
url.searchParams.set(
|
|
199
199
|
"skills_cli_capability",
|
|
200
|
-
String(
|
|
200
|
+
String(_chunk27BYXQU4js.SDK_RELEASE.packageCapabilities.skillsGuidance)
|
|
201
201
|
);
|
|
202
202
|
}
|
|
203
203
|
if (options.catalog) {
|
|
@@ -209,14 +209,14 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
209
209
|
const response = await fetch(url, {
|
|
210
210
|
method: "GET",
|
|
211
211
|
headers: {
|
|
212
|
-
...
|
|
213
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
214
|
-
"X-Deepline-SDK-Version":
|
|
215
|
-
"X-Deepline-API-Major": String(
|
|
216
|
-
"X-Deepline-API-Contract":
|
|
212
|
+
..._chunkWF5QE2IWjs.deploymentProtectionHeaders.call(void 0, ),
|
|
213
|
+
"User-Agent": `deepline-ts-sdk/${_chunkWF5QE2IWjs.SDK_VERSION}`,
|
|
214
|
+
"X-Deepline-SDK-Version": _chunkWF5QE2IWjs.SDK_VERSION,
|
|
215
|
+
"X-Deepline-API-Major": String(_chunkWF5QE2IWjs.SDK_API_MAJOR),
|
|
216
|
+
"X-Deepline-API-Contract": _chunkWF5QE2IWjs.SDK_API_CONTRACT,
|
|
217
217
|
"X-Deepline-CLI-Update-Preferences": "1",
|
|
218
218
|
"X-Deepline-CLI-Auto-Update-Capability": SDK_CLI_AUTO_UPDATE_CAPABILITY,
|
|
219
|
-
...options.catalog ? { Authorization: `Bearer ${
|
|
219
|
+
...options.catalog ? { Authorization: `Bearer ${_chunkVBDR2DP6js.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {},
|
|
220
220
|
..._optionalChain([options, 'access', _30 => _30.catalog, 'optionalAccess', _31 => _31.cliInvocationId]) ? { "X-Deepline-CLI-Invocation-ID": options.catalog.cliInvocationId } : {}
|
|
221
221
|
},
|
|
222
222
|
signal: controller.signal
|
|
@@ -377,7 +377,7 @@ function skillsSourceUrl(baseUrl) {
|
|
|
377
377
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
378
378
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
379
379
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
380
|
-
const agents = _nullishCoalesce(options.agents, () => (
|
|
380
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunkVBDR2DP6js.DEFAULT_SKILL_AGENTS));
|
|
381
381
|
const values = {
|
|
382
382
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
383
383
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -596,7 +596,7 @@ function buildEnvironmentContext() {
|
|
|
596
596
|
node_version: process.version,
|
|
597
597
|
runtime: "Node.js",
|
|
598
598
|
hostname: _os.hostname.call(void 0, ),
|
|
599
|
-
agent_runtime:
|
|
599
|
+
agent_runtime: _chunkWF5QE2IWjs.detectAgentRuntime.call(void 0, )
|
|
600
600
|
};
|
|
601
601
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
602
602
|
const normalized = _optionalChain([process, 'access', _42 => _42.env, 'access', _43 => _43[key], 'optionalAccess', _44 => _44.trim, 'call', _45 => _45()]);
|
|
@@ -617,18 +617,18 @@ function buildEnvironmentContext() {
|
|
|
617
617
|
return context;
|
|
618
618
|
}
|
|
619
619
|
function failureReportHeaders(apiKey) {
|
|
620
|
-
const agentSessionId =
|
|
620
|
+
const agentSessionId = _chunkWF5QE2IWjs.agentSessionIdFromEnvironment.call(void 0, );
|
|
621
621
|
return {
|
|
622
|
-
...
|
|
622
|
+
..._chunkWF5QE2IWjs.deploymentProtectionHeaders.call(void 0, ),
|
|
623
623
|
...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {},
|
|
624
624
|
Authorization: `Bearer ${apiKey}`,
|
|
625
625
|
"Content-Type": "application/json",
|
|
626
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
626
|
+
"User-Agent": `deepline-ts-sdk/${_chunkWF5QE2IWjs.SDK_VERSION}`,
|
|
627
627
|
"X-Deepline-Client-Family": "sdk",
|
|
628
628
|
"X-Deepline-CLI-Family": "sdk",
|
|
629
|
-
"X-Deepline-Agent-Runtime":
|
|
630
|
-
"X-Deepline-CLI-Version":
|
|
631
|
-
"X-Deepline-SDK-Version":
|
|
629
|
+
"X-Deepline-Agent-Runtime": _chunkWF5QE2IWjs.detectAgentRuntime.call(void 0, ),
|
|
630
|
+
"X-Deepline-CLI-Version": _chunkWF5QE2IWjs.SDK_VERSION,
|
|
631
|
+
"X-Deepline-SDK-Version": _chunkWF5QE2IWjs.SDK_VERSION
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
634
|
async function postFailureReport(input) {
|
|
@@ -656,7 +656,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
656
656
|
if (isFailureReportingDisabled()) return false;
|
|
657
657
|
let apiKey = "";
|
|
658
658
|
try {
|
|
659
|
-
apiKey =
|
|
659
|
+
apiKey = _chunkVBDR2DP6js.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
660
660
|
} catch (e9) {
|
|
661
661
|
return false;
|
|
662
662
|
}
|
|
@@ -683,7 +683,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
683
683
|
failure_code: failureCode2,
|
|
684
684
|
failure_stage: failureStage,
|
|
685
685
|
error_body: "Automatic Deepline skills installation failed.",
|
|
686
|
-
cli_version:
|
|
686
|
+
cli_version: _chunkWF5QE2IWjs.SDK_VERSION,
|
|
687
687
|
context: {
|
|
688
688
|
environment: buildEnvironmentContext(),
|
|
689
689
|
skills_sync: {
|
|
@@ -803,7 +803,7 @@ function buildFailureReport(input) {
|
|
|
803
803
|
failure_kind: failureKind,
|
|
804
804
|
failure_code: code,
|
|
805
805
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
806
|
-
cli_version:
|
|
806
|
+
cli_version: _chunkWF5QE2IWjs.SDK_VERSION,
|
|
807
807
|
context: {
|
|
808
808
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
809
809
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -823,8 +823,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
823
823
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
824
824
|
const exitCode = resolvedExitCode(input);
|
|
825
825
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
826
|
-
const baseUrl =
|
|
827
|
-
const apiKey =
|
|
826
|
+
const baseUrl = _chunkVBDR2DP6js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
827
|
+
const apiKey = _chunkVBDR2DP6js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
828
828
|
if (!apiKey) return false;
|
|
829
829
|
return postFailureReport({
|
|
830
830
|
baseUrl,
|
|
@@ -861,25 +861,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
861
861
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
862
862
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
863
863
|
function shouldSkipSkillsSync() {
|
|
864
|
-
if (
|
|
864
|
+
if (_chunkWF5QE2IWjs.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
865
865
|
return true;
|
|
866
866
|
}
|
|
867
867
|
const value = _optionalChain([process, 'access', _66 => _66.env, 'access', _67 => _67.DEEPLINE_SKIP_SKILLS_SYNC, 'optionalAccess', _68 => _68.trim, 'call', _69 => _69(), 'access', _70 => _70.toLowerCase, 'call', _71 => _71()]);
|
|
868
868
|
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
869
869
|
}
|
|
870
870
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
871
|
-
return _path.join.call(void 0,
|
|
871
|
+
return _path.join.call(void 0, _chunkVBDR2DP6js.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
872
872
|
}
|
|
873
873
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
874
874
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
875
|
-
var agentLeaseSegment =
|
|
875
|
+
var agentLeaseSegment = _chunkVBDR2DP6js.skillsAgentPathSegment;
|
|
876
876
|
function sortedLeaseAgents(agents) {
|
|
877
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
877
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkVBDR2DP6js.KNOWN_SKILL_AGENTS] : agents;
|
|
878
878
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
879
879
|
}
|
|
880
880
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
881
881
|
return _path.join.call(void 0,
|
|
882
|
-
|
|
882
|
+
_chunkVBDR2DP6js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
883
883
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
884
884
|
);
|
|
885
885
|
}
|
|
@@ -1038,7 +1038,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
1038
1038
|
constructor(baseUrl, error) {
|
|
1039
1039
|
const detail = error instanceof Error ? error.message : String(error);
|
|
1040
1040
|
super(
|
|
1041
|
-
`Could not save skills state in ${
|
|
1041
|
+
`Could not save skills state in ${_chunkVBDR2DP6js.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
1042
1042
|
);
|
|
1043
1043
|
this.name = "SkillsStateUnavailableError";
|
|
1044
1044
|
}
|
|
@@ -1123,7 +1123,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
1125
1125
|
return _path.join.call(void 0,
|
|
1126
|
-
|
|
1126
|
+
_chunkVBDR2DP6js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1127
1127
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
1128
1128
|
);
|
|
1129
1129
|
}
|
|
@@ -1157,8 +1157,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
1157
1157
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
1158
1158
|
}
|
|
1159
1159
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
1160
|
-
if (shouldSkipSkillsSync() ||
|
|
1161
|
-
const agents =
|
|
1160
|
+
if (shouldSkipSkillsSync() || _chunkVBDR2DP6js.hasActivePluginSkills.call(void 0, )) return;
|
|
1161
|
+
const agents = _chunkVBDR2DP6js.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1162
1162
|
if (agents.length === 0) return;
|
|
1163
1163
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1164
1164
|
}
|
|
@@ -1174,7 +1174,7 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
|
1174
1174
|
}
|
|
1175
1175
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
1176
1176
|
return _path.join.call(void 0,
|
|
1177
|
-
|
|
1177
|
+
_chunkVBDR2DP6js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1178
1178
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
1179
1179
|
);
|
|
1180
1180
|
}
|
|
@@ -1203,7 +1203,7 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
1203
1203
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
1204
1204
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
1205
1205
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
1206
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess', _75 => _75.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames,
|
|
1206
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _75 => _75.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkVBDR2DP6js.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
1207
1207
|
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess', _76 => _76.bunx]) === "missing" && probes.npx === "missing" ? "neither `bunx` nor `npx` was found on PATH. Make one available." : `installer version check failed for ${Object.entries(_nullishCoalesce(probes, () => ( {}))).filter(([, result]) => result === "failed").map(([command]) => `\`${command}\``).join(" and ")}. Check those commands with --version.`;
|
|
1208
1208
|
notice(
|
|
1209
1209
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
@@ -1291,7 +1291,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
1291
1291
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
1292
1292
|
}
|
|
1293
1293
|
function isDefaultAgentSet(agents) {
|
|
1294
|
-
return agents.length ===
|
|
1294
|
+
return agents.length === _chunkVBDR2DP6js.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkVBDR2DP6js.DEFAULT_SKILL_AGENTS[index]);
|
|
1295
1295
|
}
|
|
1296
1296
|
function safeSkillFilePath(value) {
|
|
1297
1297
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1448,10 +1448,10 @@ async function fetchSkillsUpdate(baseUrl, localVersion) {
|
|
|
1448
1448
|
method: "POST",
|
|
1449
1449
|
headers: { "Content-Type": "application/json" },
|
|
1450
1450
|
body: JSON.stringify({
|
|
1451
|
-
sdk_cli: { version:
|
|
1451
|
+
sdk_cli: { version: _chunkWF5QE2IWjs.SDK_VERSION },
|
|
1452
1452
|
skills: {
|
|
1453
1453
|
version: localVersion,
|
|
1454
|
-
capability:
|
|
1454
|
+
capability: _chunk27BYXQU4js.SDK_RELEASE.packageCapabilities.skillsGuidance
|
|
1455
1455
|
}
|
|
1456
1456
|
}),
|
|
1457
1457
|
signal: controller.signal
|
|
@@ -1490,7 +1490,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1490
1490
|
}
|
|
1491
1491
|
function noInstallerProbePath(baseUrl) {
|
|
1492
1492
|
return _path.join.call(void 0,
|
|
1493
|
-
|
|
1493
|
+
_chunkVBDR2DP6js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1494
1494
|
"skills-sync-no-installer-unknown.json"
|
|
1495
1495
|
);
|
|
1496
1496
|
}
|
|
@@ -1569,7 +1569,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1569
1569
|
function resolveSkillsInstallSpawn(install, platform2 = process.platform) {
|
|
1570
1570
|
return resolveShellSpawn(install.command, install.args, platform2);
|
|
1571
1571
|
}
|
|
1572
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1572
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkVBDR2DP6js.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1573
1573
|
const commands = [];
|
|
1574
1574
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1575
1575
|
if (probes.bunx === "available") {
|
|
@@ -1711,7 +1711,7 @@ function runLegacySkillsCleanup(agents) {
|
|
|
1711
1711
|
}
|
|
1712
1712
|
}
|
|
1713
1713
|
function writeSdkSkillsStatusLine(line) {
|
|
1714
|
-
const progress =
|
|
1714
|
+
const progress = _chunkCM3KC74Ajs.getActiveCliProgress.call(void 0, );
|
|
1715
1715
|
if (progress) {
|
|
1716
1716
|
progress.writeLine(line);
|
|
1717
1717
|
return;
|
|
@@ -1721,11 +1721,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1721
1721
|
}
|
|
1722
1722
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1723
1723
|
if (shouldSkipSkillsSync()) return;
|
|
1724
|
-
const usingPluginSkills =
|
|
1724
|
+
const usingPluginSkills = _chunkVBDR2DP6js.hasActivePluginSkills.call(void 0, );
|
|
1725
1725
|
if (usingPluginSkills) {
|
|
1726
1726
|
return;
|
|
1727
1727
|
}
|
|
1728
|
-
const agents =
|
|
1728
|
+
const agents = _chunkVBDR2DP6js.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1729
1729
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1730
1730
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1731
1731
|
}
|
|
@@ -1753,7 +1753,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1753
1753
|
return;
|
|
1754
1754
|
}
|
|
1755
1755
|
try {
|
|
1756
|
-
const localVersion =
|
|
1756
|
+
const localVersion = _chunkVBDR2DP6js.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1757
1757
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1758
1758
|
needsUpdate: options.update.needs_update,
|
|
1759
1759
|
remoteVersion: options.update.remote.version
|
|
@@ -1919,7 +1919,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1919
1919
|
}
|
|
1920
1920
|
}
|
|
1921
1921
|
runLegacySkillsCleanup(agents);
|
|
1922
|
-
if (!
|
|
1922
|
+
if (!_chunkVBDR2DP6js.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
1923
1923
|
notice(
|
|
1924
1924
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
1925
1925
|
);
|
|
@@ -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(); } } 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
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk6WWBVWFQjs = require('./chunk-6WWBVWFQ.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkWF5QE2IWjs = require('./chunk-WF5QE2IW.js');
|
|
8
8
|
|
|
9
9
|
// src/cli/commands/sessions.ts
|
|
10
10
|
|
|
@@ -139,7 +139,7 @@ function currentSessionFile(agent) {
|
|
|
139
139
|
const newestFirst = listSessionFiles(agent).sort(
|
|
140
140
|
(a, b) => b.mtimeMs - a.mtimeMs
|
|
141
141
|
);
|
|
142
|
-
const sessionId =
|
|
142
|
+
const sessionId = _chunkWF5QE2IWjs.agentSessionIdFromEnvironment.call(void 0,
|
|
143
143
|
process.env,
|
|
144
144
|
agent === "auto" ? void 0 : agent === "claude" ? "claude_code" : "codex"
|
|
145
145
|
);
|
|
@@ -451,7 +451,7 @@ function buildSessionUploadContent(raw) {
|
|
|
451
451
|
return { encodedContent: encoded, needsChunking: true };
|
|
452
452
|
}
|
|
453
453
|
async function uploadPayload(path, payload) {
|
|
454
|
-
const { http } =
|
|
454
|
+
const { http } = _chunk6WWBVWFQjs.getAuthedHttpClient.call(void 0, );
|
|
455
455
|
return await http.post(path, payload);
|
|
456
456
|
}
|
|
457
457
|
async function uploadChunkedSessions(sessions, options) {
|
|
@@ -484,7 +484,7 @@ async function uploadChunkedSessions(sessions, options) {
|
|
|
484
484
|
...options.rating ? { rating: options.rating } : {}
|
|
485
485
|
});
|
|
486
486
|
const sessionIds = sessions.map((session) => session.sessionId);
|
|
487
|
-
|
|
487
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
488
488
|
{
|
|
489
489
|
...response,
|
|
490
490
|
ok: true,
|
|
@@ -516,7 +516,7 @@ async function handleSessionsSend(options) {
|
|
|
516
516
|
filename: _path.basename.call(void 0, filePath),
|
|
517
517
|
...rating ? { rating } : {}
|
|
518
518
|
});
|
|
519
|
-
|
|
519
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
520
520
|
{
|
|
521
521
|
...response2,
|
|
522
522
|
ok: true,
|
|
@@ -566,7 +566,7 @@ async function handleSessionsSend(options) {
|
|
|
566
566
|
...rating ? { rating } : {}
|
|
567
567
|
});
|
|
568
568
|
const sessionIds = built.map((session) => session.sessionId);
|
|
569
|
-
|
|
569
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
570
570
|
{
|
|
571
571
|
...response,
|
|
572
572
|
ok: true,
|
|
@@ -674,7 +674,7 @@ ${refreshMeta}
|
|
|
674
674
|
</body>
|
|
675
675
|
</html>`;
|
|
676
676
|
_fs.writeFileSync.call(void 0, outputPath, html, "utf8");
|
|
677
|
-
|
|
677
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
678
678
|
{
|
|
679
679
|
ok: true,
|
|
680
680
|
file: outputPath,
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkD3UHG54Vjs = require('./chunk-D3UHG54V.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkGVAENVIGjs = require('./chunk-GVAENVIG.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk6WWBVWFQjs = require('./chunk-6WWBVWFQ.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
@@ -579,7 +579,7 @@ function parseInputFlagValue(raw) {
|
|
|
579
579
|
return raw;
|
|
580
580
|
}
|
|
581
581
|
function parsePlayRunOptions(args, initialInput = null) {
|
|
582
|
-
const selection =
|
|
582
|
+
const selection = _chunk6WWBVWFQjs.parseJsonFields.call(void 0, args, "run");
|
|
583
583
|
args = selection.args;
|
|
584
584
|
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.";
|
|
585
585
|
let filePath = null;
|
|
@@ -591,7 +591,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
591
591
|
let revisionSelector = null;
|
|
592
592
|
const watch = !args.includes("--no-wait");
|
|
593
593
|
const dryRun = args.includes("--dry-run");
|
|
594
|
-
let jsonOutput = dryRun ?
|
|
594
|
+
let jsonOutput = dryRun ? _chunk6WWBVWFQjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunk6WWBVWFQjs.argsWantJson.call(void 0, args);
|
|
595
595
|
const fullJson = args.includes("--full");
|
|
596
596
|
const force = args.includes("--force");
|
|
597
597
|
const forceToolRefresh = args.includes("--force-tool-refresh");
|
|
@@ -654,7 +654,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
654
654
|
"--log-level requires one of: debug, info, warn, error."
|
|
655
655
|
);
|
|
656
656
|
}
|
|
657
|
-
const parsed =
|
|
657
|
+
const parsed = _chunkD3UHG54Vjs.parseLogLevel.call(void 0, value);
|
|
658
658
|
if (!parsed) {
|
|
659
659
|
throw new Error(
|
|
660
660
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -778,12 +778,12 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
778
778
|
}
|
|
779
779
|
if (arg === "--debug" && args[index + 1] && !args[index + 1].startsWith("--")) {
|
|
780
780
|
input ??= {};
|
|
781
|
-
|
|
781
|
+
_chunkGVAENVIGjs.setDottedInputValue.call(void 0, input, "debug", parseInputFlagValue(args[++index]));
|
|
782
782
|
continue;
|
|
783
783
|
}
|
|
784
784
|
if (arg.startsWith("--debug=")) {
|
|
785
785
|
input ??= {};
|
|
786
|
-
|
|
786
|
+
_chunkGVAENVIGjs.setDottedInputValue.call(void 0,
|
|
787
787
|
input,
|
|
788
788
|
"debug",
|
|
789
789
|
parseInputFlagValue(arg.slice("--debug=".length))
|
|
@@ -811,7 +811,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
811
811
|
if (arg.startsWith("--")) {
|
|
812
812
|
const { path, value } = parseInputFieldFlag(arg, args[index + 1]);
|
|
813
813
|
input ??= {};
|
|
814
|
-
|
|
814
|
+
_chunkGVAENVIGjs.setDottedInputValue.call(void 0, input, path, parseInputFlagValue(value));
|
|
815
815
|
if (!arg.includes("=")) {
|
|
816
816
|
index += 1;
|
|
817
817
|
}
|
|
@@ -900,7 +900,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
900
900
|
let initialInput = options.input === void 0 ? null : parseJsonInput(options.input);
|
|
901
901
|
if (typeof options.debug === "string") {
|
|
902
902
|
initialInput ??= {};
|
|
903
|
-
|
|
903
|
+
_chunkGVAENVIGjs.setDottedInputValue.call(void 0,
|
|
904
904
|
initialInput,
|
|
905
905
|
"debug",
|
|
906
906
|
parseInputFlagValue(options.debug)
|
|
@@ -972,7 +972,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
972
972
|
const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
|
|
973
973
|
(arg) => arg === "--log-level" || arg.startsWith("--log-level=")
|
|
974
974
|
);
|
|
975
|
-
let logLevel = options.logLevel === void 0 ? base.logLevel :
|
|
975
|
+
let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkD3UHG54Vjs.parseLogLevel.call(void 0, options.logLevel);
|
|
976
976
|
if (!logLevel)
|
|
977
977
|
throw new Error("--log-level requires one of: debug, info, warn, error.");
|
|
978
978
|
const debugAlias = options.logs || options.debug === true || inputArgs.some(
|
|
@@ -986,13 +986,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
986
986
|
if (debugAlias || debugMapLatency && logLevel === "info")
|
|
987
987
|
logLevel = "debug";
|
|
988
988
|
const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
|
|
989
|
-
const jsonFields = options.json === void 0 ? base.jsonFields :
|
|
990
|
-
[...fullJson ? ["--full"] : [], ...
|
|
989
|
+
const jsonFields = options.json === void 0 ? base.jsonFields : _chunk6WWBVWFQjs.parseJsonFields.call(void 0,
|
|
990
|
+
[...fullJson ? ["--full"] : [], ..._chunk6WWBVWFQjs.jsonFieldArgs.call(void 0, options.json)],
|
|
991
991
|
"run"
|
|
992
992
|
).fields;
|
|
993
993
|
const watch = options.wait === false ? false : base.watch;
|
|
994
994
|
const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
|
|
995
|
-
const jsonOutput = dryRun || !watch ? explicitJson ||
|
|
995
|
+
const jsonOutput = dryRun || !watch ? explicitJson || _chunk6WWBVWFQjs.argsWantJson.call(void 0, []) : explicitJson;
|
|
996
996
|
const verboseLogs = Boolean(
|
|
997
997
|
debugAlias || logLevel === "debug" || debugMapLatency
|
|
998
998
|
);
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk5ONCPLWCjs = require('./chunk-5ONCPLWC.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkWICQQ7GYjs = require('./chunk-WICQQ7GY.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk6WWBVWFQjs = require('./chunk-6WWBVWFQ.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkVBDR2DP6js = require('./chunk-VBDR2DP6.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkWF5QE2IWjs = require('./chunk-WF5QE2IW.js');
|
|
21
21
|
|
|
22
22
|
// src/cli/compatibility-catalog.ts
|
|
23
23
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -44,7 +44,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
|
44
44
|
async function reportAutoUpdateEvent(input) {
|
|
45
45
|
let apiKey = "";
|
|
46
46
|
try {
|
|
47
|
-
apiKey =
|
|
47
|
+
apiKey = _chunkVBDR2DP6js.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
48
48
|
} catch (e2) {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
@@ -60,15 +60,15 @@ async function reportAutoUpdateEvent(input) {
|
|
|
60
60
|
headers: {
|
|
61
61
|
Authorization: `Bearer ${apiKey}`,
|
|
62
62
|
"Content-Type": "application/json",
|
|
63
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
63
|
+
"User-Agent": `deepline-ts-sdk/${_chunkWF5QE2IWjs.SDK_VERSION}`,
|
|
64
64
|
"X-Deepline-Client-Family": "sdk",
|
|
65
65
|
"X-Deepline-CLI-Family": "sdk",
|
|
66
|
-
"X-Deepline-CLI-Version":
|
|
67
|
-
"X-Deepline-SDK-Version":
|
|
66
|
+
"X-Deepline-CLI-Version": _chunkWF5QE2IWjs.SDK_VERSION,
|
|
67
|
+
"X-Deepline-SDK-Version": _chunkWF5QE2IWjs.SDK_VERSION
|
|
68
68
|
},
|
|
69
69
|
body: JSON.stringify({
|
|
70
70
|
event: input.event,
|
|
71
|
-
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ||
|
|
71
|
+
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkWF5QE2IWjs.SDK_VERSION,
|
|
72
72
|
target_version: input.response.latest,
|
|
73
73
|
reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
|
|
74
74
|
command: _nullishCoalesce(input.response.command, () => ( null)),
|
|
@@ -87,13 +87,13 @@ function envTruthy(name) {
|
|
|
87
87
|
return value === "1" || value === "true" || value === "yes";
|
|
88
88
|
}
|
|
89
89
|
function shouldSkipSelfUpdate(policy) {
|
|
90
|
-
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !
|
|
90
|
+
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunk5ONCPLWCjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkWICQQ7GYjs.isCiEnvironment.call(void 0, );
|
|
91
91
|
}
|
|
92
92
|
function isDowngradeAutoUpdateResponse(response) {
|
|
93
93
|
const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
|
|
94
|
-
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) ||
|
|
94
|
+
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkWF5QE2IWjs.SDK_VERSION;
|
|
95
95
|
if (!target) return false;
|
|
96
|
-
return
|
|
96
|
+
return _chunk5ONCPLWCjs.compareUpdateVersions.call(void 0, target, current) < 0;
|
|
97
97
|
}
|
|
98
98
|
function relaunchCurrentCommand(plan, runtime = {}) {
|
|
99
99
|
return new Promise((resolve) => {
|
|
@@ -146,7 +146,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
146
146
|
}
|
|
147
147
|
if (isDowngradeAutoUpdateResponse(response)) {
|
|
148
148
|
const target = response.latest;
|
|
149
|
-
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) ||
|
|
149
|
+
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkWF5QE2IWjs.SDK_VERSION;
|
|
150
150
|
process.stderr.write(
|
|
151
151
|
`Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
|
|
152
152
|
`
|
|
@@ -154,21 +154,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
154
154
|
return false;
|
|
155
155
|
}
|
|
156
156
|
const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
|
|
157
|
-
const plan =
|
|
157
|
+
const plan = _chunk5ONCPLWCjs.resolveUpdatePlan.call(void 0, {
|
|
158
158
|
packageSpec,
|
|
159
159
|
requireVerifiedNpmOwnership: true,
|
|
160
160
|
npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
|
|
161
161
|
});
|
|
162
|
-
if (!
|
|
162
|
+
if (!_chunk5ONCPLWCjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
|
|
163
163
|
return false;
|
|
164
164
|
}
|
|
165
165
|
if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
166
166
|
deferredAutoUpdate = async () => {
|
|
167
167
|
await applyAutoUpdate(response, baseUrl, plan, "next_command");
|
|
168
168
|
};
|
|
169
|
-
if (
|
|
169
|
+
if (_chunk6WWBVWFQjs.isJsonOutputMode.call(void 0, )) {
|
|
170
170
|
const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
|
|
171
|
-
|
|
171
|
+
_chunk6WWBVWFQjs.addJsonNotice.call(void 0, {
|
|
172
172
|
code: "sdk_update_queued",
|
|
173
173
|
message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
|
|
174
174
|
});
|
|
@@ -181,7 +181,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
181
181
|
return true;
|
|
182
182
|
}
|
|
183
183
|
async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
184
|
-
if (!
|
|
184
|
+
if (!_chunk5ONCPLWCjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
|
|
185
185
|
const autoUpdate = response.auto_update;
|
|
186
186
|
const label = _optionalChain([autoUpdate, 'optionalAccess', _32 => _32.reason]) === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : _optionalChain([autoUpdate, 'optionalAccess', _33 => _33.reason]) === "deprecated" ? "is deprecated and will update automatically" : _optionalChain([autoUpdate, 'optionalAccess', _34 => _34.required]) ? "requires an update" : "has an update available and will update automatically";
|
|
187
187
|
process.stderr.write(
|
|
@@ -194,7 +194,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
194
194
|
event: "started",
|
|
195
195
|
installKind: plan.kind
|
|
196
196
|
});
|
|
197
|
-
const updateResult = await
|
|
197
|
+
const updateResult = await _chunk5ONCPLWCjs.runAutomaticUpdatePlan.call(void 0, plan);
|
|
198
198
|
if (updateResult.status === "skipped_previous_failure") {
|
|
199
199
|
void reportAutoUpdateEvent({
|
|
200
200
|
baseUrl,
|
|
@@ -245,7 +245,7 @@ var _crypto = require('crypto');
|
|
|
245
245
|
var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
|
|
246
246
|
var activeToolExecuteCommand = null;
|
|
247
247
|
function progressLine(line) {
|
|
248
|
-
if (!
|
|
248
|
+
if (!_chunk6WWBVWFQjs.isJsonOutputMode.call(void 0, )) console.error(line);
|
|
249
249
|
}
|
|
250
250
|
function beginToolExecuteCommand() {
|
|
251
251
|
if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
|