deepline 0.3.505 → 0.3.507
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 +148 -11
- 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/deactivation-reasons.ts +38 -1
- 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/fleets/verdict.ts +4 -2
- package/dist/bundling-sources/shared_libs/monitors/legacy-radar-retirement.ts +29 -10
- package/dist/bundling-sources/shared_libs/monitors/package.json +6 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +15 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +24 -4
- package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +405 -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/durable-runs-rollout.ts +6 -1
- 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-6PJ4G5PC.js +43 -0
- package/dist/cli/{auth-AHE2EDQA.mjs → auth-BNP3M27C.mjs} +5 -5
- package/dist/cli/{billing-JOIZPHON.js → billing-7HIVX4YJ.js} +101 -91
- package/dist/cli/{billing-7CPWTGGI.mjs → billing-JKJ2AEZ6.mjs} +27 -17
- package/dist/cli/{chunk-PDLOPF5L.mjs → chunk-2OKEMB5A.mjs} +1 -1
- package/dist/cli/{chunk-HASFFOSU.js → chunk-2ZINJVWW.js} +16 -16
- package/dist/cli/{chunk-MHZAG2ZQ.js → chunk-3D5ZNYYI.js} +93 -60
- package/dist/cli/{chunk-7DDACLMX.js → chunk-56SRWY5F.js} +16 -16
- package/dist/cli/{chunk-QGNNAZ5M.mjs → chunk-5A66OJZD.mjs} +1 -1
- package/dist/cli/{chunk-UZ24SF7N.mjs → chunk-5I2XKXLS.mjs} +5 -5
- package/dist/cli/{chunk-SPN7U3MV.js → chunk-5PXGAA2M.js} +4 -4
- package/dist/cli/{chunk-EMUFF6EU.js → chunk-6AQO5OJ5.js} +7 -7
- package/dist/cli/{chunk-WTQLUULB.js → chunk-76R5I7HR.js} +6 -6
- package/dist/cli/{chunk-OMEDQ77C.mjs → chunk-7TZA6LJI.mjs} +5 -5
- package/dist/cli/{chunk-JVKEZT7L.mjs → chunk-AFSYNOG4.mjs} +22 -1
- package/dist/cli/{chunk-OORPAQVC.js → chunk-AXYLMDU3.js} +8 -8
- package/dist/cli/{chunk-FIQ5UEIF.mjs → chunk-D2T4W5LR.mjs} +2 -2
- package/dist/cli/{chunk-Y52XY56V.js → chunk-E5HGDYU3.js} +41 -41
- package/dist/cli/{chunk-3YEOOXD4.js → chunk-E7YIIEZU.js} +11 -11
- package/dist/cli/{chunk-NARJWXBR.mjs → chunk-EEJLV77L.mjs} +2 -2
- package/dist/cli/{chunk-7DDKLFOY.mjs → chunk-EYZJDHXA.mjs} +3 -3
- package/dist/cli/{chunk-K26YOPDO.js → chunk-GDHLL5EQ.js} +22 -1
- package/dist/cli/{chunk-WTUC5VKB.mjs → chunk-GMRWVXU2.mjs} +2 -2
- package/dist/cli/{chunk-PZN24YQQ.mjs → chunk-H334EFON.mjs} +2 -2
- package/dist/cli/{chunk-RT3HJBIH.mjs → chunk-H6PABDS4.mjs} +10 -10
- package/dist/cli/{chunk-7QLK2GHL.js → chunk-HPZONIDF.js} +5 -5
- package/dist/cli/{chunk-5XT4DZQL.mjs → chunk-IBKWVFWP.mjs} +2 -2
- package/dist/cli/{chunk-45XYW477.js → chunk-ILUZ7IHP.js} +21 -21
- package/dist/cli/{chunk-SHKRL7CW.mjs → chunk-IWZRQ6YW.mjs} +1 -1
- package/dist/cli/{chunk-ACI6CUDX.mjs → chunk-JCE2JNGD.mjs} +78 -45
- package/dist/cli/{chunk-XHPB6RGY.js → chunk-JPN6OBPW.js} +1 -1
- package/dist/cli/{chunk-W6I4N4JN.mjs → chunk-LSONU2E2.mjs} +6 -6
- package/dist/cli/{chunk-VXKWF3AD.js → chunk-MN5HO2PN.js} +9 -9
- package/dist/cli/{chunk-6FEN6VWZ.js → chunk-MQRT5NYP.js} +26 -26
- package/dist/cli/{chunk-52FPW2RD.mjs → chunk-NJRJGXVF.mjs} +2 -2
- package/dist/cli/{chunk-BWAYMJ23.js → chunk-OBATCFZO.js} +91 -48
- package/dist/cli/{chunk-YBIVVAL7.mjs → chunk-OPEJASMJ.mjs} +3 -3
- package/dist/cli/{chunk-GXMNOUHP.js → chunk-QWRSWQ7Z.js} +7 -7
- package/dist/cli/{chunk-GAUNJCXQ.js → chunk-REFT4DMJ.js} +96 -96
- package/dist/cli/{chunk-QYGYVCRI.js → chunk-RFJANXCC.js} +14 -14
- package/dist/cli/{chunk-4OFSAZN6.mjs → chunk-RTLWYERT.mjs} +46 -3
- package/dist/cli/{chunk-CSLLQWAB.mjs → chunk-T6FUNWXX.mjs} +1 -1
- package/dist/cli/{chunk-JA7YBRP4.mjs → chunk-TVR4R2E6.mjs} +1 -1
- package/dist/cli/{chunk-ZLN2B5YA.js → chunk-TZ7APOBM.js} +3 -3
- package/dist/cli/{chunk-JSTKLYYD.js → chunk-V2K34NAO.js} +2 -2
- package/dist/cli/{chunk-WPCF7C6B.js → chunk-V4GGTOCX.js} +3 -3
- package/dist/cli/{chunk-IZYOYXG7.mjs → chunk-VGEBRTHF.mjs} +4 -4
- package/dist/cli/{chunk-OA6U5NVB.mjs → chunk-VQLD5M43.mjs} +5 -5
- package/dist/cli/{chunk-LC4FG34E.js → chunk-WOPWSAGS.js} +53 -53
- package/dist/cli/{chunk-MAFZ64RN.mjs → chunk-WQAHMVBT.mjs} +2 -2
- package/dist/cli/{chunk-IDAE5VDH.js → chunk-WTY2R4R3.js} +5 -5
- package/dist/cli/{chunk-6U3AGJWI.mjs → chunk-XKGNEN4P.mjs} +1 -1
- package/dist/cli/{chunk-7AD565DO.mjs → chunk-YAAJHS6W.mjs} +1 -1
- package/dist/cli/{chunk-CA3SYXCS.js → chunk-ZCNGMQVD.js} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-WTPI6ZON.mjs → csv-LZTQOPP2.mjs} +4 -4
- package/dist/cli/{csv-DZHVIW3G.js → csv-WYJVU5HV.js} +13 -13
- package/dist/cli/{db-NR4PJ6AF.mjs → db-D6XFOQP3.mjs} +6 -6
- package/dist/cli/{db-D7LPPNCC.js → db-UCUXPY7S.js} +27 -27
- package/dist/cli/{describe-NCKAJPUG.mjs → describe-HKL2XK67.mjs} +18 -18
- package/dist/cli/describe-XS4OIASD.js +50 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-UQG6LWEN.js → executions-5CF5NM7V.js} +8 -8
- package/dist/cli/{executions-RQVJ4LAB.mjs → executions-AFHYXH73.mjs} +6 -6
- package/dist/cli/{feedback-TCHA67IA.js → feedback-GJAX3JZE.js} +8 -8
- package/dist/cli/{feedback-RD4Y3YQR.mjs → feedback-MLKQ572F.mjs} +4 -4
- package/dist/cli/{git-Z7434B7Y.mjs → git-BMLROZOU.mjs} +5 -5
- package/dist/cli/git-RIXUHRDL.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-FHRDF7MC.js} +8 -8
- package/dist/cli/{legacy-noops-LQJU4UIV.mjs → legacy-noops-Y7JSQVLQ.mjs} +5 -5
- package/dist/cli/{monitors-KOWN7M3V.js → monitors-Z6RPIQIH.js} +450 -138
- package/dist/cli/{monitors-Z6VYUZ2W.mjs → monitors-ZEVK3UD7.mjs} +332 -20
- package/dist/cli/{org-UBNRO5XO.mjs → org-PFLVANIN.mjs} +6 -6
- package/dist/cli/{org-2T5K2VP5.js → org-TXJ3RES5.js} +72 -72
- package/dist/cli/{pages-GHPJBVV3.mjs → pages-BKEMQ2J7.mjs} +6 -6
- package/dist/cli/{pages-SRXTU7XO.js → pages-ESKKBK5Y.js} +18 -18
- package/dist/cli/{play-HRQKGTXA.mjs → play-4Z6Z7KVY.mjs} +18 -18
- package/dist/cli/{play-2HMZ57EZ.js → play-AAFOZJKQ.js} +317 -317
- package/dist/cli/{providers-JWJRFRR5.mjs → providers-KYP2UWDV.mjs} +6 -6
- package/dist/cli/{providers-P5O676MZ.js → providers-WEU4UNKY.js} +9 -9
- package/dist/cli/{quickstart-S7NZUQRO.mjs → quickstart-7EUDF4IL.mjs} +4 -4
- package/dist/cli/{quickstart-YCY72TAO.js → quickstart-DXYZCOJY.js} +6 -6
- package/dist/cli/{run-MHLLGF4G.js → run-3YN6P26W.js} +41 -41
- package/dist/cli/{run-QWMRIUIU.mjs → run-MB2R5PQ7.mjs} +23 -23
- package/dist/cli/{search-4BFTQUEP.mjs → search-MIFBESRE.mjs} +8 -8
- package/dist/cli/search-Z7GUKVFE.js +33 -0
- package/dist/cli/{search-output-LIYHDTBP.mjs → search-output-2IR3UA4W.mjs} +4 -4
- package/dist/cli/{search-output-62LBVZHN.js → search-output-NUWL47SR.js} +6 -6
- package/dist/cli/{secrets-KKKHVSOO.js → secrets-6UT6BIDJ.js} +15 -15
- package/dist/cli/{secrets-GW27V77E.mjs → secrets-E6WIYONW.mjs} +6 -6
- package/dist/cli/{sessions-R75LBGIL.mjs → sessions-AP7L6YCL.mjs} +5 -5
- package/dist/cli/{sessions-R3OEINAR.js → sessions-NF2RBXMJ.js} +6 -6
- package/dist/cli/{settings-MQIHAEZN.js → settings-FZWXYP4W.js} +106 -79
- package/dist/cli/{settings-I3AQZSYG.mjs → settings-MMLHJ5E5.mjs} +39 -12
- package/dist/cli/{setup-2YA5MYMS.mjs → setup-WJNN2CZZ.mjs} +10 -10
- package/dist/cli/{setup-X3QRJERP.js → setup-YHXAAJNZ.js} +50 -50
- package/dist/cli/skills-4YYUFNMS.js +37 -0
- package/dist/cli/{skills-7252FOOI.mjs → skills-KXZ5PJU2.mjs} +8 -8
- package/dist/cli/{tools-SKQTSVGE.mjs → tools-K6S7RX7B.mjs} +17 -17
- package/dist/cli/tools-OCYEMMUP.js +57 -0
- package/dist/cli/{update-GNBBSKTB.mjs → update-2SFWEVM6.mjs} +10 -10
- package/dist/cli/update-WQIPUQ4K.js +35 -0
- package/dist/cli/{workflow-OJSAL5FO.mjs → workflow-IR3RCVHZ.mjs} +7 -7
- package/dist/cli/{workflow-QB7YYWPP.js → workflow-SM3Q45X5.js} +17 -17
- package/dist/{client-B3GSaSFn.d.ts → client-BlwD-G4v.d.ts} +1 -1
- package/dist/{client-DEJg0CZn.d.mts → client-DMpsMNH9.d.mts} +1 -1
- package/dist/{client-core-C404E33V.d.mts → client-core-CITtRTbB.d.mts} +77 -11
- package/dist/{client-core-GQmy3N8y.d.ts → client-core-DwBLuEkm.d.ts} +77 -11
- 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 +116 -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 _chunkV4GGTOCXjs = require('./chunk-V4GGTOCX.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkRFJANXCCjs = require('./chunk-RFJANXCC.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 _chunkTZ7APOBMjs = require('./chunk-TZ7APOBM.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunk5PXGAA2Mjs = require('./chunk-5PXGAA2M.js');
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkJPN6OBPWjs = require('./chunk-JPN6OBPW.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, _chunkTZ7APOBMjs.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: _chunk5PXGAA2Mjs.SDK_VERSION,
|
|
71
|
+
apiContract: _chunk5PXGAA2Mjs.SDK_API_CONTRACT,
|
|
72
|
+
apiMajor: _chunk5PXGAA2Mjs.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: _chunk5PXGAA2Mjs.SDK_VERSION,
|
|
81
|
+
apiContract: _chunk5PXGAA2Mjs.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, _chunkTZ7APOBMjs.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", _chunk5PXGAA2Mjs.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(_chunkJPN6OBPWjs.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
|
+
..._chunk5PXGAA2Mjs.deploymentProtectionHeaders.call(void 0, ),
|
|
214
|
+
"User-Agent": `deepline-ts-sdk/${_chunk5PXGAA2Mjs.SDK_VERSION}`,
|
|
215
|
+
"X-Deepline-SDK-Version": _chunk5PXGAA2Mjs.SDK_VERSION,
|
|
216
|
+
"X-Deepline-API-Major": String(_chunk5PXGAA2Mjs.SDK_API_MAJOR),
|
|
217
|
+
"X-Deepline-API-Contract": _chunk5PXGAA2Mjs.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 ${_chunkTZ7APOBMjs.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, () => ( _chunkTZ7APOBMjs.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 (_chunk5PXGAA2Mjs.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, _chunkTZ7APOBMjs.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 = _chunkTZ7APOBMjs.skillsAgentPathSegment;
|
|
503
529
|
function sortedLeaseAgents(agents) {
|
|
504
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
530
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkTZ7APOBMjs.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
|
+
_chunkTZ7APOBMjs.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 ${_chunkTZ7APOBMjs.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
|
+
_chunkTZ7APOBMjs.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() || _chunkTZ7APOBMjs.hasActivePluginSkills.call(void 0, )) return;
|
|
814
|
+
const agents = _chunkTZ7APOBMjs.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
|
+
_chunkTZ7APOBMjs.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, _chunkTZ7APOBMjs.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 === _chunkTZ7APOBMjs.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkTZ7APOBMjs.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: _chunk5PXGAA2Mjs.SDK_VERSION },
|
|
1079
1105
|
skills: {
|
|
1080
1106
|
version: localVersion,
|
|
1081
|
-
capability:
|
|
1107
|
+
capability: _chunkJPN6OBPWjs.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
|
+
_chunkTZ7APOBMjs.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 = _chunkTZ7APOBMjs.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 = _chunkV4GGTOCXjs.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 = _chunkTZ7APOBMjs.hasActivePluginSkills.call(void 0, );
|
|
1352
1379
|
if (usingPluginSkills) {
|
|
1353
1380
|
return;
|
|
1354
1381
|
}
|
|
1355
|
-
const agents =
|
|
1382
|
+
const agents = _chunkTZ7APOBMjs.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 = _chunkTZ7APOBMjs.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 _chunkRFJANXCCjs.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 _chunkRFJANXCCjs.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 (!_chunkTZ7APOBMjs.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,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkREFT4DMJjs = require('./chunk-REFT4DMJ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk76R5I7HRjs = require('./chunk-76R5I7HR.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -14,18 +14,18 @@ var _chunkTMQUMILMjs = require('./chunk-TMQUMILM.js');
|
|
|
14
14
|
var _chunkNTLBZUHDjs = require('./chunk-NTLBZUHD.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkWTY2R4R3js = require('./chunk-WTY2R4R3.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkRFJANXCCjs = require('./chunk-RFJANXCC.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunk6AQO5OJ5js = require('./chunk-6AQO5OJ5.js');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkTZ7APOBMjs = require('./chunk-TZ7APOBM.js');
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/describe.ts
|
|
31
31
|
var _fs = require('fs');
|
|
@@ -34,14 +34,14 @@ var _path = require('path');
|
|
|
34
34
|
// src/cli/doc-read-reporting.ts
|
|
35
35
|
var REPORT_TIMEOUT_MS = 1e3;
|
|
36
36
|
async function reportDocRead(docId) {
|
|
37
|
-
if (
|
|
37
|
+
if (_chunkRFJANXCCjs.isFailureReportingDisabled.call(void 0, )) return;
|
|
38
38
|
try {
|
|
39
|
-
const baseUrl =
|
|
40
|
-
const apiKey =
|
|
39
|
+
const baseUrl = _chunkTZ7APOBMjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
40
|
+
const apiKey = _chunkTZ7APOBMjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
41
41
|
if (!apiKey) return;
|
|
42
42
|
await fetch(new URL("/api/v2/telemetry/doc-read", baseUrl), {
|
|
43
43
|
method: "POST",
|
|
44
|
-
headers:
|
|
44
|
+
headers: _chunkRFJANXCCjs.failureReportHeaders.call(void 0, apiKey),
|
|
45
45
|
body: JSON.stringify({ doc_id: docId }),
|
|
46
46
|
signal: AbortSignal.timeout(REPORT_TIMEOUT_MS)
|
|
47
47
|
});
|
|
@@ -54,16 +54,16 @@ function nothingNamed(name) {
|
|
|
54
54
|
return `Nothing named "${name}". Search for it: deepline search ${JSON.stringify(name.replace(/[-_./]+/g, " "))}`;
|
|
55
55
|
}
|
|
56
56
|
function findNamed2(name, options) {
|
|
57
|
-
return _chunkTMQUMILMjs.findNamed.call(void 0, name, options, _chunkTMQUMILMjs.describeLookupsFor.call(void 0, new (0,
|
|
57
|
+
return _chunkTMQUMILMjs.findNamed.call(void 0, name, options, _chunkTMQUMILMjs.describeLookupsFor.call(void 0, new (0, _chunkWTY2R4R3js.DeeplineClient)()));
|
|
58
58
|
}
|
|
59
59
|
async function describeAnything(name, options, onMissing) {
|
|
60
|
-
const client = new (0,
|
|
60
|
+
const client = new (0, _chunkWTY2R4R3js.DeeplineClient)();
|
|
61
61
|
const lookups = _chunkTMQUMILMjs.describeLookupsFor.call(void 0, client);
|
|
62
62
|
const outcome = await _chunkTMQUMILMjs.describeName.call(void 0, name, options, {
|
|
63
63
|
...lookups,
|
|
64
64
|
// `tools describe` has already fetched the tool for its compatibility check.
|
|
65
65
|
tool: async (toolName) => _nullishCoalesce(options.fetchedTool, () => ( lookups.tool(toolName))),
|
|
66
|
-
seedStarterScript:
|
|
66
|
+
seedStarterScript: _chunkREFT4DMJjs.seedToolListScript
|
|
67
67
|
});
|
|
68
68
|
if (outcome.status === "missing") {
|
|
69
69
|
if (onMissing) return onMissing();
|
|
@@ -89,18 +89,18 @@ function deliver(envelope, lines, { json, out }) {
|
|
|
89
89
|
` : text;
|
|
90
90
|
_fs.writeFileSync.call(void 0, path, content);
|
|
91
91
|
const bytes = Buffer.byteLength(content);
|
|
92
|
-
|
|
92
|
+
_chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
|
|
93
93
|
{ path, bytes },
|
|
94
94
|
{ json, text: `Wrote ${path} (${bytes} bytes)
|
|
95
95
|
` }
|
|
96
96
|
);
|
|
97
97
|
return 0;
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
_chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, envelope, { json, text });
|
|
100
100
|
return 0;
|
|
101
101
|
}
|
|
102
102
|
function registerDescribeCommand(program) {
|
|
103
|
-
|
|
103
|
+
_chunk76R5I7HRjs.addDescribeOptions.call(void 0, program.command("describe <name>")).option("--web-url", "Print only a play's play page URL").description(
|
|
104
104
|
"Describe anything search returns: a tool, monitor type, or play."
|
|
105
105
|
).addHelpText(
|
|
106
106
|
"after",
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
resolveUpdatePlan,
|
|
5
5
|
runAutomaticUpdatePlan,
|
|
6
6
|
shouldRunCliAutoUpdate
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VQLD5M43.mjs";
|
|
8
8
|
import {
|
|
9
9
|
isCiEnvironment
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JCE2JNGD.mjs";
|
|
11
11
|
import {
|
|
12
12
|
addJsonNotice,
|
|
13
13
|
isJsonOutputMode
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-H334EFON.mjs";
|
|
15
15
|
import {
|
|
16
16
|
resolveApiKeyForBaseUrl
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IWZRQ6YW.mjs";
|
|
18
18
|
import {
|
|
19
19
|
SDK_VERSION
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YAAJHS6W.mjs";
|
|
21
21
|
|
|
22
22
|
// src/cli/compatibility-catalog.ts
|
|
23
23
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -16,12 +16,12 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
|
16
16
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkJPN6OBPWjs = require('./chunk-JPN6OBPW.js');
|
|
20
20
|
|
|
21
21
|
// src/version.ts
|
|
22
|
-
var SDK_VERSION =
|
|
23
|
-
var SDK_API_MAJOR =
|
|
24
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
22
|
+
var SDK_VERSION = _chunkJPN6OBPWjs.SDK_RELEASE.version;
|
|
23
|
+
var SDK_API_MAJOR = _chunkJPN6OBPWjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
24
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunkJPN6OBPWjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
25
25
|
|
|
26
26
|
// src/agent-runtime.ts
|
|
27
27
|
var _os = require('os');
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkTZ7APOBMjs = require('./chunk-TZ7APOBM.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk5PXGAA2Mjs = require('./chunk-5PXGAA2M.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -293,8 +293,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
293
293
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
294
294
|
var defaultBrowserCommandRunner = childProcess;
|
|
295
295
|
function getAuthedHttpClient() {
|
|
296
|
-
const config =
|
|
297
|
-
return { config, http: new (0,
|
|
296
|
+
const config = _chunkTZ7APOBMjs.resolveConfig.call(void 0, );
|
|
297
|
+
return { config, http: new (0, _chunkTZ7APOBMjs.HttpClient)(config) };
|
|
298
298
|
}
|
|
299
299
|
function stableOsUserId() {
|
|
300
300
|
try {
|
|
@@ -634,7 +634,7 @@ function collectLocalEnvInfo() {
|
|
|
634
634
|
os: `${process.platform} ${process.arch}`,
|
|
635
635
|
node_version: process.version,
|
|
636
636
|
home_dir: homeDir,
|
|
637
|
-
agent_runtime:
|
|
637
|
+
agent_runtime: _chunk5PXGAA2Mjs.detectAgentRuntime.call(void 0, )
|
|
638
638
|
};
|
|
639
639
|
const env = process.env;
|
|
640
640
|
const optional = {
|
|
@@ -881,9 +881,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
881
881
|
}
|
|
882
882
|
function withAgentCommandContext(value) {
|
|
883
883
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
884
|
-
return
|
|
884
|
+
return _chunk5PXGAA2Mjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
885
885
|
...valueRecord,
|
|
886
|
-
command_context:
|
|
886
|
+
command_context: _chunkTZ7APOBMjs.resolveCliCommandContext.call(void 0, )
|
|
887
887
|
} : value;
|
|
888
888
|
}
|
|
889
889
|
function printJson(value, fields) {
|