deepline 0.3.505 → 0.3.506
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 +121 -5
- package/dist/bundling-sources/sdk/src/index.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +176 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +17 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/overview.ts +118 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +29 -1
- package/dist/bundling-sources/shared_libs/monitors/legacy-radar-retirement.ts +29 -10
- package/dist/bundling-sources/shared_libs/monitors/package.json +4 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +8 -8
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +52 -5
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +48 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +13 -40
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +36 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-egress.ts +55 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +66 -0
- package/dist/cli/auth-MMHG2OFE.js +43 -0
- package/dist/cli/{auth-AHE2EDQA.mjs → auth-ZHFONT2D.mjs} +5 -5
- package/dist/cli/{billing-JOIZPHON.js → billing-3Z7N4WTL.js} +101 -91
- package/dist/cli/{billing-7CPWTGGI.mjs → billing-B2YEMNHE.mjs} +27 -17
- package/dist/cli/{chunk-CA3SYXCS.js → chunk-26DJ4BDY.js} +2 -2
- package/dist/cli/{chunk-PZN24YQQ.mjs → chunk-2CFTDVEP.mjs} +2 -2
- package/dist/cli/{chunk-OMEDQ77C.mjs → chunk-2IXXB7OA.mjs} +5 -5
- package/dist/cli/{chunk-XHPB6RGY.js → chunk-2OY5DXTC.js} +1 -1
- package/dist/cli/{chunk-CSLLQWAB.mjs → chunk-3BFZEHBH.mjs} +1 -1
- package/dist/cli/{chunk-3YEOOXD4.js → chunk-3F676QXJ.js} +11 -11
- package/dist/cli/{chunk-WTQLUULB.js → chunk-5ARG7J7A.js} +6 -6
- package/dist/cli/{chunk-NARJWXBR.mjs → chunk-6RYVIZRP.mjs} +2 -2
- package/dist/cli/{chunk-EMUFF6EU.js → chunk-75NAFY36.js} +7 -7
- package/dist/cli/{chunk-BWAYMJ23.js → chunk-AD2WJUZA.js} +91 -48
- package/dist/cli/{chunk-JVKEZT7L.mjs → chunk-AFSYNOG4.mjs} +22 -1
- package/dist/cli/{chunk-OA6U5NVB.mjs → chunk-BJ5OX62J.mjs} +5 -5
- package/dist/cli/{chunk-7DDKLFOY.mjs → chunk-BQBPVUFJ.mjs} +3 -3
- package/dist/cli/{chunk-UZ24SF7N.mjs → chunk-CHGRURBN.mjs} +5 -5
- package/dist/cli/{chunk-JA7YBRP4.mjs → chunk-D7OCORZ7.mjs} +1 -1
- package/dist/cli/{chunk-IDAE5VDH.js → chunk-DB54ROPH.js} +5 -5
- package/dist/cli/{chunk-GAUNJCXQ.js → chunk-E554XCJI.js} +96 -96
- package/dist/cli/{chunk-IZYOYXG7.mjs → chunk-EN7GXLFX.mjs} +4 -4
- package/dist/cli/{chunk-7QLK2GHL.js → chunk-F53SGS3C.js} +5 -5
- package/dist/cli/{chunk-JSTKLYYD.js → chunk-F7IQQYKV.js} +2 -2
- package/dist/cli/{chunk-FIQ5UEIF.mjs → chunk-FFGQR5J3.mjs} +2 -2
- package/dist/cli/{chunk-SPN7U3MV.js → chunk-FWSEGIT6.js} +4 -4
- package/dist/cli/{chunk-K26YOPDO.js → chunk-GDHLL5EQ.js} +22 -1
- package/dist/cli/{chunk-ACI6CUDX.mjs → chunk-GJNIC2CO.mjs} +78 -45
- package/dist/cli/{chunk-QYGYVCRI.js → chunk-GRESJ3H3.js} +14 -14
- package/dist/cli/{chunk-MHZAG2ZQ.js → chunk-HINTYT5H.js} +93 -60
- package/dist/cli/{chunk-HASFFOSU.js → chunk-LRSRJJPD.js} +16 -16
- package/dist/cli/{chunk-ZLN2B5YA.js → chunk-MHRR47VQ.js} +3 -3
- package/dist/cli/{chunk-6FEN6VWZ.js → chunk-N7G36GXB.js} +26 -26
- package/dist/cli/{chunk-MAFZ64RN.mjs → chunk-ND4WPLTE.mjs} +2 -2
- package/dist/cli/{chunk-5XT4DZQL.mjs → chunk-O4DZG4VA.mjs} +2 -2
- package/dist/cli/{chunk-OORPAQVC.js → chunk-OD6TASBP.js} +8 -8
- package/dist/cli/{chunk-Y52XY56V.js → chunk-OHNMJ5XQ.js} +41 -41
- package/dist/cli/{chunk-4OFSAZN6.mjs → chunk-ONBXTEFQ.mjs} +46 -3
- package/dist/cli/{chunk-6U3AGJWI.mjs → chunk-OPBXKB57.mjs} +1 -1
- package/dist/cli/{chunk-W6I4N4JN.mjs → chunk-OUGJUM5X.mjs} +6 -6
- package/dist/cli/{chunk-VXKWF3AD.js → chunk-PRIHD5XS.js} +9 -9
- package/dist/cli/{chunk-RT3HJBIH.mjs → chunk-QAY5AS2H.mjs} +10 -10
- package/dist/cli/{chunk-GXMNOUHP.js → chunk-QP333GFE.js} +7 -7
- package/dist/cli/{chunk-7DDACLMX.js → chunk-SUJIVF6L.js} +16 -16
- package/dist/cli/{chunk-QGNNAZ5M.mjs → chunk-TEMORCEE.mjs} +1 -1
- package/dist/cli/{chunk-7AD565DO.mjs → chunk-TS4KFQKS.mjs} +1 -1
- package/dist/cli/{chunk-YBIVVAL7.mjs → chunk-XUY7WQ2R.mjs} +3 -3
- package/dist/cli/{chunk-PDLOPF5L.mjs → chunk-YEX6RPUO.mjs} +1 -1
- package/dist/cli/{chunk-WPCF7C6B.js → chunk-YJKKOSXS.js} +3 -3
- package/dist/cli/{chunk-SHKRL7CW.mjs → chunk-YVOS5KSG.mjs} +1 -1
- package/dist/cli/{chunk-52FPW2RD.mjs → chunk-YWZEBPXK.mjs} +2 -2
- package/dist/cli/{chunk-WTUC5VKB.mjs → chunk-Z7EHY2MF.mjs} +2 -2
- package/dist/cli/{chunk-LC4FG34E.js → chunk-ZM5BJ5MP.js} +53 -53
- package/dist/cli/{chunk-45XYW477.js → chunk-ZZDTWVCQ.js} +21 -21
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-DZHVIW3G.js → csv-7K7LK63Y.js} +13 -13
- package/dist/cli/{csv-WTPI6ZON.mjs → csv-ARHQ54HA.mjs} +4 -4
- package/dist/cli/{db-NR4PJ6AF.mjs → db-JBX24NJY.mjs} +6 -6
- package/dist/cli/{db-D7LPPNCC.js → db-V4Z2I6DY.js} +27 -27
- package/dist/cli/describe-AYXVS6DZ.js +50 -0
- package/dist/cli/{describe-NCKAJPUG.mjs → describe-RBDSGSZ7.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-RQVJ4LAB.mjs → executions-BAZEU63W.mjs} +6 -6
- package/dist/cli/{executions-UQG6LWEN.js → executions-XEZKV5QU.js} +8 -8
- package/dist/cli/{feedback-TCHA67IA.js → feedback-LOERESRU.js} +8 -8
- package/dist/cli/{feedback-RD4Y3YQR.mjs → feedback-YDSWBHCO.mjs} +4 -4
- package/dist/cli/{git-Z7434B7Y.mjs → git-4Z3W2CQU.mjs} +5 -5
- package/dist/cli/git-T6WKO7EA.js +25 -0
- package/dist/cli/index.js +145 -149
- package/dist/cli/index.mjs +46 -50
- package/dist/cli/{legacy-noops-23WRA7DH.js → legacy-noops-4QIQPVE5.js} +8 -8
- package/dist/cli/{legacy-noops-LQJU4UIV.mjs → legacy-noops-E4HH7S5O.mjs} +5 -5
- package/dist/cli/{monitors-Z6VYUZ2W.mjs → monitors-FPDW5DDM.mjs} +305 -8
- package/dist/cli/{monitors-KOWN7M3V.js → monitors-QBHDSDA7.js} +423 -126
- package/dist/cli/{org-2T5K2VP5.js → org-JO4GGSAH.js} +72 -72
- package/dist/cli/{org-UBNRO5XO.mjs → org-UCDHIHAD.mjs} +6 -6
- package/dist/cli/{pages-GHPJBVV3.mjs → pages-6V52IZXY.mjs} +6 -6
- package/dist/cli/{pages-SRXTU7XO.js → pages-FJAAXAWO.js} +18 -18
- package/dist/cli/{play-2HMZ57EZ.js → play-F3AENS6W.js} +317 -317
- package/dist/cli/{play-HRQKGTXA.mjs → play-MF4DWROJ.mjs} +18 -18
- package/dist/cli/{providers-JWJRFRR5.mjs → providers-NJJLTECA.mjs} +6 -6
- package/dist/cli/{providers-P5O676MZ.js → providers-XXOQLPX7.js} +9 -9
- package/dist/cli/{quickstart-YCY72TAO.js → quickstart-JCE3XGQG.js} +6 -6
- package/dist/cli/{quickstart-S7NZUQRO.mjs → quickstart-Z5MSMI7S.mjs} +4 -4
- package/dist/cli/{run-QWMRIUIU.mjs → run-56UGPIRL.mjs} +23 -23
- package/dist/cli/{run-MHLLGF4G.js → run-X2DNIW3F.js} +41 -41
- package/dist/cli/search-B753RTKC.js +33 -0
- package/dist/cli/{search-4BFTQUEP.mjs → search-SZYI4NBB.mjs} +8 -8
- package/dist/cli/{search-output-62LBVZHN.js → search-output-7UNT6EMP.js} +6 -6
- package/dist/cli/{search-output-LIYHDTBP.mjs → search-output-T35QNZUF.mjs} +4 -4
- package/dist/cli/{secrets-KKKHVSOO.js → secrets-JMUAVIVC.js} +15 -15
- package/dist/cli/{secrets-GW27V77E.mjs → secrets-Q36VC35L.mjs} +6 -6
- package/dist/cli/{sessions-R75LBGIL.mjs → sessions-HG6I3HMY.mjs} +5 -5
- package/dist/cli/{sessions-R3OEINAR.js → sessions-SUXU7OM7.js} +6 -6
- package/dist/cli/{settings-MQIHAEZN.js → settings-UIELQ5CV.js} +106 -79
- package/dist/cli/{settings-I3AQZSYG.mjs → settings-Z76XW4KF.mjs} +39 -12
- package/dist/cli/{setup-X3QRJERP.js → setup-2L7H5P2O.js} +50 -50
- package/dist/cli/{setup-2YA5MYMS.mjs → setup-OXNYAOQ4.mjs} +10 -10
- package/dist/cli/skills-DEVXYGYH.js +37 -0
- package/dist/cli/{skills-7252FOOI.mjs → skills-XSNLXJGI.mjs} +8 -8
- package/dist/cli/tools-SCGHABDL.js +57 -0
- package/dist/cli/{tools-SKQTSVGE.mjs → tools-SUSFAYFH.mjs} +17 -17
- package/dist/cli/update-BSIILGO3.js +35 -0
- package/dist/cli/{update-GNBBSKTB.mjs → update-ENSTG3QO.mjs} +10 -10
- package/dist/cli/{workflow-QB7YYWPP.js → workflow-FMBZNY4F.js} +17 -17
- package/dist/cli/{workflow-OJSAL5FO.mjs → workflow-Z33QE6VT.mjs} +7 -7
- package/dist/{client-DEJg0CZn.d.mts → client-BDbouy3Y.d.mts} +1 -1
- package/dist/{client-B3GSaSFn.d.ts → client-Cx0420fs.d.ts} +1 -1
- package/dist/{client-core-GQmy3N8y.d.ts → client-core-B4hq0-m2.d.ts} +51 -4
- package/dist/{client-core-C404E33V.d.mts → client-core-CwiVaMZ5.d.mts} +51 -4
- package/dist/{compiler-manifest-DaJrA2KV.d.mts → compiler-manifest-BeURaD5Y.d.mts} +2 -0
- package/dist/{compiler-manifest-DaJrA2KV.d.ts → compiler-manifest-BeURaD5Y.d.ts} +2 -0
- package/dist/{errors-KLga4bLr.d.ts → errors-BoPXPrSy.d.ts} +1 -1
- package/dist/{errors-BKnSYueU.d.mts → errors-kBuT4kGK.d.mts} +1 -1
- package/dist/{index-C5nAZ-VS.d.ts → index-D0crdGM1.d.ts} +1 -1
- package/dist/{index-C-8AFpWy.d.mts → index-DC7oRAAC.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +115 -112
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- 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 +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-SEPKNRHV.js +0 -43
- package/dist/cli/describe-HVQBTKFM.js +0 -50
- package/dist/cli/git-TUB2ZUEH.js +0 -25
- package/dist/cli/search-QPUHOEIL.js +0 -33
- package/dist/cli/skills-BPZWMZSL.js +0 -37
- package/dist/cli/tools-F7RVQ3IK.js +0 -57
- package/dist/cli/update-TLSY6LC2.js +0 -35
|
@@ -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(); } } 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 _chunkYJKKOSXSjs = require('./chunk-YJKKOSXS.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkGRESJ3H3js = require('./chunk-GRESJ3H3.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -14,17 +14,17 @@ var _chunkQYGYVCRIjs = require('./chunk-QYGYVCRI.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkMHRR47VQjs = require('./chunk-MHRR47VQ.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkFWSEGIT6js = require('./chunk-FWSEGIT6.js');
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunk2OY5DXTCjs = require('./chunk-2OY5DXTC.js');
|
|
28
28
|
|
|
29
29
|
// src/compat.ts
|
|
30
30
|
var _crypto = require('crypto');
|
|
@@ -59,7 +59,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
59
59
|
return value === "1" || value === "true" || value === "yes";
|
|
60
60
|
}
|
|
61
61
|
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, )) {
|
|
62
|
-
return _path.join.call(void 0,
|
|
62
|
+
return _path.join.call(void 0, _chunkMHRR47VQjs.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
63
63
|
}
|
|
64
64
|
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, )) {
|
|
65
65
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -67,9 +67,9 @@ function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'acc
|
|
|
67
67
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
68
68
|
return JSON.stringify({
|
|
69
69
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
70
|
-
version:
|
|
71
|
-
apiContract:
|
|
72
|
-
apiMajor:
|
|
70
|
+
version: _chunkFWSEGIT6js.SDK_VERSION,
|
|
71
|
+
apiContract: _chunkFWSEGIT6js.SDK_API_CONTRACT,
|
|
72
|
+
apiMajor: _chunkFWSEGIT6js.SDK_API_MAJOR,
|
|
73
73
|
command: _optionalChain([command, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()]) || null,
|
|
74
74
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
75
75
|
});
|
|
@@ -77,8 +77,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
77
77
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
78
78
|
return JSON.stringify({
|
|
79
79
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
80
|
-
version:
|
|
81
|
-
apiContract:
|
|
80
|
+
version: _chunkFWSEGIT6js.SDK_VERSION,
|
|
81
|
+
apiContract: _chunkFWSEGIT6js.SDK_API_CONTRACT,
|
|
82
82
|
command: _optionalChain([command, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]) || null
|
|
83
83
|
});
|
|
84
84
|
}
|
|
@@ -103,7 +103,7 @@ function isSavedWithin(savedAt, windowMs, now) {
|
|
|
103
103
|
}
|
|
104
104
|
var UPDATE_ADVISORY_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
105
105
|
function claimUpdateAdvisory(baseUrl, now = Date.now()) {
|
|
106
|
-
const path = _path.join.call(void 0,
|
|
106
|
+
const path = _path.join.call(void 0, _chunkMHRR47VQjs.sdkCliStateDirPath.call(void 0, baseUrl), "update-advisory.json");
|
|
107
107
|
try {
|
|
108
108
|
const { shownAt } = JSON.parse(_fs.readFileSync.call(void 0, path, "utf8"));
|
|
109
109
|
if (isSavedWithin(shownAt, UPDATE_ADVISORY_INTERVAL_MS, now)) return false;
|
|
@@ -190,7 +190,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
190
190
|
);
|
|
191
191
|
try {
|
|
192
192
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
193
|
-
url.searchParams.set("version",
|
|
193
|
+
url.searchParams.set("version", _chunkFWSEGIT6js.SDK_VERSION);
|
|
194
194
|
if (_optionalChain([options, 'access', _34 => _34.command, 'optionalAccess', _35 => _35.trim, 'call', _36 => _36()])) {
|
|
195
195
|
url.searchParams.set("command", options.command.trim());
|
|
196
196
|
}
|
|
@@ -198,7 +198,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
198
198
|
url.searchParams.set("skills_version", _nullishCoalesce(options.skillsVersion, () => ( "")));
|
|
199
199
|
url.searchParams.set(
|
|
200
200
|
"skills_cli_capability",
|
|
201
|
-
String(
|
|
201
|
+
String(_chunk2OY5DXTCjs.SDK_RELEASE.packageCapabilities.skillsGuidance)
|
|
202
202
|
);
|
|
203
203
|
}
|
|
204
204
|
if (options.catalog) {
|
|
@@ -210,14 +210,14 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
210
210
|
const response = await fetch(url, {
|
|
211
211
|
method: "GET",
|
|
212
212
|
headers: {
|
|
213
|
-
...
|
|
214
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
215
|
-
"X-Deepline-SDK-Version":
|
|
216
|
-
"X-Deepline-API-Major": String(
|
|
217
|
-
"X-Deepline-API-Contract":
|
|
213
|
+
..._chunkFWSEGIT6js.deploymentProtectionHeaders.call(void 0, ),
|
|
214
|
+
"User-Agent": `deepline-ts-sdk/${_chunkFWSEGIT6js.SDK_VERSION}`,
|
|
215
|
+
"X-Deepline-SDK-Version": _chunkFWSEGIT6js.SDK_VERSION,
|
|
216
|
+
"X-Deepline-API-Major": String(_chunkFWSEGIT6js.SDK_API_MAJOR),
|
|
217
|
+
"X-Deepline-API-Contract": _chunkFWSEGIT6js.SDK_API_CONTRACT,
|
|
218
218
|
"X-Deepline-CLI-Update-Preferences": "1",
|
|
219
219
|
"X-Deepline-CLI-Auto-Update-Capability": SDK_CLI_AUTO_UPDATE_CAPABILITY,
|
|
220
|
-
...options.catalog ? { Authorization: `Bearer ${
|
|
220
|
+
...options.catalog ? { Authorization: `Bearer ${_chunkMHRR47VQjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {},
|
|
221
221
|
..._optionalChain([options, 'access', _37 => _37.catalog, 'optionalAccess', _38 => _38.cliInvocationId]) ? { "X-Deepline-CLI-Invocation-ID": options.catalog.cliInvocationId } : {}
|
|
222
222
|
},
|
|
223
223
|
signal: controller.signal
|
|
@@ -386,7 +386,7 @@ function skillsSourceUrl(baseUrl) {
|
|
|
386
386
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
387
387
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
388
388
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
389
|
-
const agents = _nullishCoalesce(options.agents, () => (
|
|
389
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunkMHRR47VQjs.DEFAULT_SKILL_AGENTS));
|
|
390
390
|
const values = {
|
|
391
391
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
392
392
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -467,6 +467,32 @@ function resolveWindowsExecutable(command, env, cwd) {
|
|
|
467
467
|
return void 0;
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
+
// src/cli/skills-sync-preferences.ts
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
function skillsSyncDisabledPath() {
|
|
475
|
+
return _path.join.call(void 0,
|
|
476
|
+
_optionalChain([process, 'access', _53 => _53.env, 'access', _54 => _54.HOME, 'optionalAccess', _55 => _55.trim, 'call', _56 => _56()]) || _os.homedir.call(void 0, ),
|
|
477
|
+
".local",
|
|
478
|
+
"deepline",
|
|
479
|
+
"sdk-cli",
|
|
480
|
+
"skills-sync-disabled"
|
|
481
|
+
);
|
|
482
|
+
}
|
|
483
|
+
function isCliSkillsSyncEnabled() {
|
|
484
|
+
return !_fs.existsSync.call(void 0, skillsSyncDisabledPath());
|
|
485
|
+
}
|
|
486
|
+
function setCliSkillsSyncEnabled(enabled) {
|
|
487
|
+
const path = skillsSyncDisabledPath();
|
|
488
|
+
if (enabled) {
|
|
489
|
+
_fs.rmSync.call(void 0, path, { force: true });
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
_fs.mkdirSync.call(void 0, _path.dirname.call(void 0, path), { recursive: true });
|
|
493
|
+
_fs.writeFileSync.call(void 0, path, "", { flag: "a", mode: 384 });
|
|
494
|
+
}
|
|
495
|
+
|
|
470
496
|
// src/cli/skills-sync.ts
|
|
471
497
|
var _child_process = require('child_process');
|
|
472
498
|
|
|
@@ -488,25 +514,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
488
514
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
489
515
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
490
516
|
function shouldSkipSkillsSync() {
|
|
491
|
-
if (
|
|
517
|
+
if (_chunkFWSEGIT6js.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
492
518
|
return true;
|
|
493
519
|
}
|
|
494
|
-
const value = _optionalChain([process, 'access',
|
|
495
|
-
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
520
|
+
const value = _optionalChain([process, 'access', _57 => _57.env, 'access', _58 => _58.DEEPLINE_SKIP_SKILLS_SYNC, 'optionalAccess', _59 => _59.trim, 'call', _60 => _60(), 'access', _61 => _61.toLowerCase, 'call', _62 => _62()]);
|
|
521
|
+
return value === "1" || value === "true" || value === "yes" || value === "on" || !isCliSkillsSyncEnabled();
|
|
496
522
|
}
|
|
497
523
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
498
|
-
return _path.join.call(void 0,
|
|
524
|
+
return _path.join.call(void 0, _chunkMHRR47VQjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
499
525
|
}
|
|
500
526
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
501
527
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
502
|
-
var agentLeaseSegment =
|
|
528
|
+
var agentLeaseSegment = _chunkMHRR47VQjs.skillsAgentPathSegment;
|
|
503
529
|
function sortedLeaseAgents(agents) {
|
|
504
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
530
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkMHRR47VQjs.KNOWN_SKILL_AGENTS] : agents;
|
|
505
531
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
506
532
|
}
|
|
507
533
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
508
534
|
return _path.join.call(void 0,
|
|
509
|
-
|
|
535
|
+
_chunkMHRR47VQjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
510
536
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
511
537
|
);
|
|
512
538
|
}
|
|
@@ -665,7 +691,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
665
691
|
constructor(baseUrl, error) {
|
|
666
692
|
const detail = error instanceof Error ? error.message : String(error);
|
|
667
693
|
super(
|
|
668
|
-
`Could not save skills state in ${
|
|
694
|
+
`Could not save skills state in ${_chunkMHRR47VQjs.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
669
695
|
);
|
|
670
696
|
this.name = "SkillsStateUnavailableError";
|
|
671
697
|
}
|
|
@@ -740,7 +766,7 @@ async function acquireSkillsInstallLease(baseUrl, agents, version, options = {
|
|
|
740
766
|
if (Date.now() >= deadline) return null;
|
|
741
767
|
if (!waited) {
|
|
742
768
|
waited = true;
|
|
743
|
-
_optionalChain([options, 'access',
|
|
769
|
+
_optionalChain([options, 'access', _63 => _63.onWait, 'optionalCall', _64 => _64()]);
|
|
744
770
|
}
|
|
745
771
|
await new Promise((resolve) => setTimeout(resolve, pollMs));
|
|
746
772
|
}
|
|
@@ -750,7 +776,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
750
776
|
}
|
|
751
777
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
752
778
|
return _path.join.call(void 0,
|
|
753
|
-
|
|
779
|
+
_chunkMHRR47VQjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
754
780
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
755
781
|
);
|
|
756
782
|
}
|
|
@@ -784,8 +810,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
784
810
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
785
811
|
}
|
|
786
812
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
787
|
-
if (shouldSkipSkillsSync() ||
|
|
788
|
-
const agents =
|
|
813
|
+
if (shouldSkipSkillsSync() || _chunkMHRR47VQjs.hasActivePluginSkills.call(void 0, )) return;
|
|
814
|
+
const agents = _chunkMHRR47VQjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
789
815
|
if (agents.length === 0) return;
|
|
790
816
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
791
817
|
}
|
|
@@ -796,12 +822,12 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
|
796
822
|
stdio: "ignore",
|
|
797
823
|
env: process.env
|
|
798
824
|
});
|
|
799
|
-
child.on("error", () => _optionalChain([onSpawnError, 'optionalCall',
|
|
825
|
+
child.on("error", () => _optionalChain([onSpawnError, 'optionalCall', _65 => _65()]));
|
|
800
826
|
child.unref();
|
|
801
827
|
}
|
|
802
828
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
803
829
|
return _path.join.call(void 0,
|
|
804
|
-
|
|
830
|
+
_chunkMHRR47VQjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
805
831
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
806
832
|
);
|
|
807
833
|
}
|
|
@@ -830,8 +856,8 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
830
856
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
831
857
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
832
858
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
833
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess',
|
|
834
|
-
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess',
|
|
859
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _66 => _66.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkMHRR47VQjs.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
860
|
+
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess', _67 => _67.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.`;
|
|
835
861
|
notice(
|
|
836
862
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
837
863
|
${manualCommand}`
|
|
@@ -907,7 +933,7 @@ async function fetchV1SkillIndex(baseUrl) {
|
|
|
907
933
|
}
|
|
908
934
|
}
|
|
909
935
|
function v1SkillNames(index) {
|
|
910
|
-
const skills = Array.isArray(_optionalChain([index, 'optionalAccess',
|
|
936
|
+
const skills = Array.isArray(_optionalChain([index, 'optionalAccess', _68 => _68.skills])) ? index.skills : [];
|
|
911
937
|
return sortedUniqueSkillNames(
|
|
912
938
|
skills.filter((skill) => skill && skill.install_surface === "v1").map((skill) => skill.name).filter(
|
|
913
939
|
(name) => typeof name === "string" && name.length > 0
|
|
@@ -918,7 +944,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
918
944
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
919
945
|
}
|
|
920
946
|
function isDefaultAgentSet(agents) {
|
|
921
|
-
return agents.length ===
|
|
947
|
+
return agents.length === _chunkMHRR47VQjs.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkMHRR47VQjs.DEFAULT_SKILL_AGENTS[index]);
|
|
922
948
|
}
|
|
923
949
|
function safeSkillFilePath(value) {
|
|
924
950
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -978,7 +1004,7 @@ function publishedArchiveFiles(bytes, expectedFiles, name) {
|
|
|
978
1004
|
var PublishedSkillsVerificationError = class extends Error {
|
|
979
1005
|
};
|
|
980
1006
|
async function verifyDefaultAgentSkillsInstall(baseUrl, remoteVersion, skillNames, index) {
|
|
981
|
-
if (_optionalChain([index, 'optionalAccess',
|
|
1007
|
+
if (_optionalChain([index, 'optionalAccess', _69 => _69.version]) !== remoteVersion) {
|
|
982
1008
|
throw new PublishedSkillsVerificationError(
|
|
983
1009
|
"the published skill index version does not match the server version"
|
|
984
1010
|
);
|
|
@@ -994,7 +1020,7 @@ async function verifyDefaultAgentSkillsInstall(baseUrl, remoteVersion, skillName
|
|
|
994
1020
|
const entry = entries.find(
|
|
995
1021
|
(skill) => skill && skill.name === name && skill.install_surface === "v1"
|
|
996
1022
|
);
|
|
997
|
-
if (!Array.isArray(_optionalChain([entry, 'optionalAccess',
|
|
1023
|
+
if (!Array.isArray(_optionalChain([entry, 'optionalAccess', _70 => _70.files])) || !entry.files.length || !entry.files.every(safeSkillFilePath) || new Set(entry.files).size !== entry.files.length || !entry.files.includes("SKILL.md") || entry.type !== "archive" || entry.url !== `./archives/${name}.tar.gz` || typeof entry.digest !== "string" || !/^sha256:[a-f0-9]{64}$/.test(entry.digest)) {
|
|
998
1024
|
throw new PublishedSkillsVerificationError(
|
|
999
1025
|
`invalid published file list for ${name}`
|
|
1000
1026
|
);
|
|
@@ -1048,7 +1074,7 @@ async function verifyDefaultAgentSkillsInstall(baseUrl, remoteVersion, skillName
|
|
|
1048
1074
|
controller.abort();
|
|
1049
1075
|
}
|
|
1050
1076
|
const home = _os.homedir.call(void 0, );
|
|
1051
|
-
const claudeConfigDir = _optionalChain([process, 'access',
|
|
1077
|
+
const claudeConfigDir = _optionalChain([process, 'access', _71 => _71.env, 'access', _72 => _72.CLAUDE_CONFIG_DIR, 'optionalAccess', _73 => _73.trim, 'call', _74 => _74()]) || _path.join.call(void 0, home, ".claude");
|
|
1052
1078
|
for (const [name, { files }] of published) {
|
|
1053
1079
|
for (const root of [
|
|
1054
1080
|
_path.join.call(void 0, home, ".agents", "skills", name),
|
|
@@ -1075,21 +1101,21 @@ async function fetchSkillsUpdate(baseUrl, localVersion) {
|
|
|
1075
1101
|
method: "POST",
|
|
1076
1102
|
headers: { "Content-Type": "application/json" },
|
|
1077
1103
|
body: JSON.stringify({
|
|
1078
|
-
sdk_cli: { version:
|
|
1104
|
+
sdk_cli: { version: _chunkFWSEGIT6js.SDK_VERSION },
|
|
1079
1105
|
skills: {
|
|
1080
1106
|
version: localVersion,
|
|
1081
|
-
capability:
|
|
1107
|
+
capability: _chunk2OY5DXTCjs.SDK_RELEASE.packageCapabilities.skillsGuidance
|
|
1082
1108
|
}
|
|
1083
1109
|
}),
|
|
1084
1110
|
signal: controller.signal
|
|
1085
1111
|
});
|
|
1086
1112
|
if (!response.ok) return null;
|
|
1087
1113
|
const data = await response.json().catch(() => null);
|
|
1088
|
-
const skills = _optionalChain([data, 'optionalAccess',
|
|
1114
|
+
const skills = _optionalChain([data, 'optionalAccess', _75 => _75.skills]);
|
|
1089
1115
|
if (!skills) return null;
|
|
1090
1116
|
return {
|
|
1091
1117
|
needsUpdate: skills.needs_update === true,
|
|
1092
|
-
remoteVersion: typeof _optionalChain([skills, 'access',
|
|
1118
|
+
remoteVersion: typeof _optionalChain([skills, 'access', _76 => _76.remote, 'optionalAccess', _77 => _77.version]) === "string" ? skills.remote.version.trim() : ""
|
|
1093
1119
|
};
|
|
1094
1120
|
} catch (e21) {
|
|
1095
1121
|
return null;
|
|
@@ -1117,7 +1143,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1117
1143
|
}
|
|
1118
1144
|
function noInstallerProbePath(baseUrl) {
|
|
1119
1145
|
return _path.join.call(void 0,
|
|
1120
|
-
|
|
1146
|
+
_chunkMHRR47VQjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1121
1147
|
"skills-sync-no-installer-unknown.json"
|
|
1122
1148
|
);
|
|
1123
1149
|
}
|
|
@@ -1125,7 +1151,7 @@ function cachedUnavailableInstallerProbes(baseUrl, remoteVersion, allowBoundedFa
|
|
|
1125
1151
|
const path = noInstallerProbePath(baseUrl);
|
|
1126
1152
|
try {
|
|
1127
1153
|
const cached = JSON.parse(_fs.readFileSync.call(void 0, path, "utf-8"));
|
|
1128
|
-
if (typeof cached.version === "string" && (!remoteVersion || cached.version === remoteVersion) && typeof cached.checkedAt === "number" && cached.checkedAt <= Date.now() && Date.now() - cached.checkedAt < NEGATIVE_INSTALLER_PROBE_TTL_MS && (_optionalChain([cached, 'access',
|
|
1154
|
+
if (typeof cached.version === "string" && (!remoteVersion || cached.version === remoteVersion) && typeof cached.checkedAt === "number" && cached.checkedAt <= Date.now() && Date.now() - cached.checkedAt < NEGATIVE_INSTALLER_PROBE_TTL_MS && (_optionalChain([cached, 'access', _78 => _78.probes, 'optionalAccess', _79 => _79.bunx]) === "missing" || _optionalChain([cached, 'access', _80 => _80.probes, 'optionalAccess', _81 => _81.bunx]) === "failed") && (_optionalChain([cached, 'access', _82 => _82.probes, 'optionalAccess', _83 => _83.npx]) === "missing" || _optionalChain([cached, 'access', _84 => _84.probes, 'optionalAccess', _85 => _85.npx]) === "failed") && // A terminal timeout is not evidence that the unbounded child probe
|
|
1129
1155
|
// will fail. Older caches without probe provenance are ambiguous too.
|
|
1130
1156
|
(allowBoundedFailures || cached.probeTimeoutMs === null || cached.probes.bunx === "missing" && cached.probes.npx === "missing")) {
|
|
1131
1157
|
return cached.probes;
|
|
@@ -1179,7 +1205,7 @@ function probeCommand(command, timeoutMs) {
|
|
|
1179
1205
|
timeout: timeoutMs
|
|
1180
1206
|
});
|
|
1181
1207
|
if (result.status === 0) return "available";
|
|
1182
|
-
return _optionalChain([result, 'access',
|
|
1208
|
+
return _optionalChain([result, 'access', _86 => _86.error, 'optionalAccess', _87 => _87.code]) === "ENOENT" ? "missing" : "failed";
|
|
1183
1209
|
}
|
|
1184
1210
|
function hasCommand(command) {
|
|
1185
1211
|
return probeCommand(command) === "available";
|
|
@@ -1196,7 +1222,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1196
1222
|
function resolveSkillsInstallSpawn(install, platform = process.platform) {
|
|
1197
1223
|
return resolveShellSpawn(install.command, install.args, platform);
|
|
1198
1224
|
}
|
|
1199
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1225
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkMHRR47VQjs.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1200
1226
|
const commands = [];
|
|
1201
1227
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1202
1228
|
if (probes.bunx === "available") {
|
|
@@ -1338,7 +1364,7 @@ function runLegacySkillsCleanup(agents) {
|
|
|
1338
1364
|
}
|
|
1339
1365
|
}
|
|
1340
1366
|
function writeSdkSkillsStatusLine(line) {
|
|
1341
|
-
const progress =
|
|
1367
|
+
const progress = _chunkYJKKOSXSjs.getActiveCliProgress.call(void 0, );
|
|
1342
1368
|
if (progress) {
|
|
1343
1369
|
progress.writeLine(line);
|
|
1344
1370
|
return;
|
|
@@ -1347,12 +1373,13 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1347
1373
|
`);
|
|
1348
1374
|
}
|
|
1349
1375
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1350
|
-
|
|
1351
|
-
|
|
1376
|
+
const skip = shouldSkipSkillsSync();
|
|
1377
|
+
if (skip && !options.claim) return;
|
|
1378
|
+
const usingPluginSkills = _chunkMHRR47VQjs.hasActivePluginSkills.call(void 0, );
|
|
1352
1379
|
if (usingPluginSkills) {
|
|
1353
1380
|
return;
|
|
1354
1381
|
}
|
|
1355
|
-
const agents =
|
|
1382
|
+
const agents = _chunkMHRR47VQjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1356
1383
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1357
1384
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1358
1385
|
}
|
|
@@ -1364,6 +1391,10 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1364
1391
|
if (leases && [...leases.values()].some((lease) => lease.owner !== options.claim)) {
|
|
1365
1392
|
return;
|
|
1366
1393
|
}
|
|
1394
|
+
if (skip) {
|
|
1395
|
+
if (leases) releaseInProgressSkillsSync(baseUrl, claimTokensOf(leases));
|
|
1396
|
+
return;
|
|
1397
|
+
}
|
|
1367
1398
|
if (leases) recordOwnPidOnInProgressSkillsSync(baseUrl, leases);
|
|
1368
1399
|
const claimedVersion = leases ? claimedSkillsVersion(leases) : "";
|
|
1369
1400
|
if (options.mode === "detached" && agents.length > 0 && options.update === void 0 && !claimedVersion) {
|
|
@@ -1380,12 +1411,12 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1380
1411
|
return;
|
|
1381
1412
|
}
|
|
1382
1413
|
try {
|
|
1383
|
-
const localVersion =
|
|
1414
|
+
const localVersion = _chunkMHRR47VQjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1384
1415
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1385
1416
|
needsUpdate: options.update.needs_update,
|
|
1386
1417
|
remoteVersion: options.update.remote.version
|
|
1387
1418
|
} : null;
|
|
1388
|
-
if (!_optionalChain([update, 'optionalAccess',
|
|
1419
|
+
if (!_optionalChain([update, 'optionalAccess', _88 => _88.needsUpdate]) || !update.remoteVersion) {
|
|
1389
1420
|
return;
|
|
1390
1421
|
}
|
|
1391
1422
|
if (agents.length > 0 && hasFailedSkillsSync(baseUrl, update.remoteVersion, agents)) {
|
|
@@ -1502,7 +1533,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1502
1533
|
update.remoteVersion,
|
|
1503
1534
|
agents
|
|
1504
1535
|
);
|
|
1505
|
-
void
|
|
1536
|
+
void _chunkGRESJ3H3js.maybeReportAutomaticSkillsSyncFailure.call(void 0, {
|
|
1506
1537
|
baseUrl,
|
|
1507
1538
|
remoteSkillsVersion: update.remoteVersion,
|
|
1508
1539
|
agents,
|
|
@@ -1533,7 +1564,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1533
1564
|
notice(
|
|
1534
1565
|
publishedFailure ? `Deepline could not verify the published skills: ${detail}. The local version remains stale; it will retry automatically on a later command.` : `Deepline agent-skills refresh could not verify the five installed targets: ${detail}. The local version remains stale. After fixing the install, remove ${failedSkillsSyncPath(baseUrl, agents)} to retry this version automatically.`
|
|
1535
1566
|
);
|
|
1536
|
-
void
|
|
1567
|
+
void _chunkGRESJ3H3js.maybeReportAutomaticSkillsSyncFailure.call(void 0, {
|
|
1537
1568
|
baseUrl,
|
|
1538
1569
|
remoteSkillsVersion: update.remoteVersion,
|
|
1539
1570
|
agents,
|
|
@@ -1546,7 +1577,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1546
1577
|
}
|
|
1547
1578
|
}
|
|
1548
1579
|
runLegacySkillsCleanup(agents);
|
|
1549
|
-
if (!
|
|
1580
|
+
if (!_chunkMHRR47VQjs.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
1550
1581
|
notice(
|
|
1551
1582
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
1552
1583
|
);
|
|
@@ -1579,4 +1610,6 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1579
1610
|
|
|
1580
1611
|
|
|
1581
1612
|
|
|
1582
|
-
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
exports.SDK_COMPATIBILITY_FAST_DEADLINE_MS = SDK_COMPATIBILITY_FAST_DEADLINE_MS; exports.readFreshCleanCompatibility = readFreshCleanCompatibility; exports.readTrustedCleanCompatibility = readTrustedCleanCompatibility; exports.claimUpdateAdvisory = claimUpdateAdvisory; exports.checkSdkCompatibility = checkSdkCompatibility; exports.isCiEnvironment = isCiEnvironment; exports.enforceSdkCompatibilityResponse = enforceSdkCompatibilityResponse; exports.SKILLS_NPX_PACKAGE = SKILLS_NPX_PACKAGE; exports.DEFAULT_SDK_SKILL_NAMES = DEFAULT_SDK_SKILL_NAMES; exports.LEGACY_SKILL_NAMES_TO_REMOVE = LEGACY_SKILL_NAMES_TO_REMOVE; exports.skillsSourceUrl = skillsSourceUrl; exports.resolveShellSpawn = resolveShellSpawn; exports.isCliSkillsSyncEnabled = isCliSkillsSyncEnabled; exports.setCliSkillsSyncEnabled = setCliSkillsSyncEnabled; exports.SkillsStateUnavailableError = SkillsStateUnavailableError; exports.acquireSkillsInstallLease = acquireSkillsInstallLease; exports.skillsInstallLeasePath = skillsInstallLeasePath; exports.flushDeferredSkillsSyncNotices = flushDeferredSkillsSyncNotices; exports.SKILLS_AUTO_SYNC_COMMAND = SKILLS_AUTO_SYNC_COMMAND; exports.hasFailedAutomaticSkillsSync = hasFailedAutomaticSkillsSync; exports.clearFailedAutomaticSkillsSync = clearFailedAutomaticSkillsSync; exports.syncSdkSkillsIfNeeded = syncSdkSkillsIfNeeded;
|
|
@@ -1,19 +1,19 @@
|
|
|
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 _chunkF7IQQYKVjs = require('./chunk-F7IQQYKV.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkOHNMJ5XQjs = require('./chunk-OHNMJ5XQ.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkHINTYT5Hjs = require('./chunk-HINTYT5H.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunk75NAFY36js = require('./chunk-75NAFY36.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkMHRR47VQjs = require('./chunk-MHRR47VQ.js');
|
|
17
17
|
|
|
18
18
|
// src/cli/commands/update.ts
|
|
19
19
|
var _child_process = require('child_process');
|
|
@@ -495,7 +495,7 @@ function normalizedNpmPrefix(value) {
|
|
|
495
495
|
}
|
|
496
496
|
function resolveNpmGlobalPrefix(env) {
|
|
497
497
|
try {
|
|
498
|
-
const plan =
|
|
498
|
+
const plan = _chunkHINTYT5Hjs.resolveShellSpawn.call(void 0,
|
|
499
499
|
"npm",
|
|
500
500
|
["prefix", "-g"],
|
|
501
501
|
process.platform,
|
|
@@ -556,8 +556,8 @@ function resolveUpdatePlan(options = {}) {
|
|
|
556
556
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
557
557
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
558
558
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
559
|
-
const npmVersion = options.npmVersion === void 0 ?
|
|
560
|
-
const npmGlobalInstallFlags =
|
|
559
|
+
const npmVersion = options.npmVersion === void 0 ? _chunkF7IQQYKVjs.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
560
|
+
const npmGlobalInstallFlags = _chunkF7IQQYKVjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
561
561
|
const args = installPrefix ? [
|
|
562
562
|
"install",
|
|
563
563
|
"-g",
|
|
@@ -567,7 +567,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
567
567
|
packageSpec
|
|
568
568
|
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
569
569
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
570
|
-
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) ||
|
|
570
|
+
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunkMHRR47VQjs.autoDetectBaseUrl.call(void 0, )
|
|
571
571
|
);
|
|
572
572
|
return {
|
|
573
573
|
kind: "npm-global",
|
|
@@ -816,7 +816,7 @@ function sidecarInstallFailure(versionDir) {
|
|
|
816
816
|
function runCommand(command, args, env = process.env) {
|
|
817
817
|
return new Promise((resolveResult) => {
|
|
818
818
|
let output = "";
|
|
819
|
-
const plan =
|
|
819
|
+
const plan = _chunkHINTYT5Hjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
|
|
820
820
|
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
821
821
|
stdio: ["inherit", "pipe", "pipe"],
|
|
822
822
|
shell: plan.shell,
|
|
@@ -1199,14 +1199,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
|
|
|
1199
1199
|
throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
|
|
1200
1200
|
}
|
|
1201
1201
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1202
|
-
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => (
|
|
1202
|
+
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkMHRR47VQjs.autoDetectBaseUrl));
|
|
1203
1203
|
const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
|
|
1204
1204
|
const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
|
|
1205
1205
|
const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
|
|
1206
1206
|
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
1207
1207
|
process.stdout.write = (() => true);
|
|
1208
1208
|
try {
|
|
1209
|
-
const exitCode = await
|
|
1209
|
+
const exitCode = await _chunkOHNMJ5XQjs.runSkillsCommand.call(void 0, { json: true });
|
|
1210
1210
|
if (exitCode !== 0) {
|
|
1211
1211
|
throw new Error(
|
|
1212
1212
|
`Deepline skills update failed with exit ${exitCode}.`
|
|
@@ -1277,11 +1277,11 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1277
1277
|
]
|
|
1278
1278
|
};
|
|
1279
1279
|
if (options.json && !options.executeWithJson) {
|
|
1280
|
-
|
|
1280
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
|
|
1281
1281
|
return 0;
|
|
1282
1282
|
}
|
|
1283
1283
|
if (options.printCommand) {
|
|
1284
|
-
|
|
1284
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
1285
1285
|
{
|
|
1286
1286
|
...plan,
|
|
1287
1287
|
render: {
|
|
@@ -1294,7 +1294,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1294
1294
|
return 0;
|
|
1295
1295
|
}
|
|
1296
1296
|
if (plan.kind === "source" || plan.kind === "homebrew") {
|
|
1297
|
-
|
|
1297
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
|
|
1298
1298
|
return 0;
|
|
1299
1299
|
}
|
|
1300
1300
|
stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
|
|
@@ -1324,7 +1324,7 @@ To retry with full installer output, run: deepline skills install
|
|
|
1324
1324
|
);
|
|
1325
1325
|
}
|
|
1326
1326
|
if (options.executeWithJson && options.json) {
|
|
1327
|
-
|
|
1327
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
1328
1328
|
{
|
|
1329
1329
|
ok: true,
|
|
1330
1330
|
pinnedVersion
|
|
@@ -1,7 +1,7 @@
|
|
|
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 _chunkFWSEGIT6js = require('./chunk-FWSEGIT6.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
|
|
@@ -711,7 +711,7 @@ function readSkillsVersionFile(path) {
|
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
function resolveAutoSyncSkillAgents() {
|
|
714
|
-
switch (
|
|
714
|
+
switch (_chunkFWSEGIT6js.detectAgentRuntime.call(void 0, )) {
|
|
715
715
|
case "codex":
|
|
716
716
|
return ["codex"];
|
|
717
717
|
case "claude_code":
|
|
@@ -781,7 +781,7 @@ function writeSdkSkillsLocalVersion(baseUrl, version, agents) {
|
|
|
781
781
|
}
|
|
782
782
|
|
|
783
783
|
// src/http.ts
|
|
784
|
-
var HttpClient2 = class extends
|
|
784
|
+
var HttpClient2 = class extends _chunkFWSEGIT6js.HttpClient {
|
|
785
785
|
constructor(config) {
|
|
786
786
|
super(config, readSdkSkillsLocalVersion);
|
|
787
787
|
}
|