deepline 0.3.451 → 0.3.453
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.ts +65 -0
- package/dist/bundling-sources/sdk/src/http.ts +2 -1
- package/dist/bundling-sources/sdk/src/index.ts +2 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +63 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +5 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +49 -11
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +17 -2
- package/dist/cli/{auth-YLBWEMRW.mjs → auth-6CXS55CN.mjs} +4 -4
- package/dist/cli/auth-AICIA232.js +40 -0
- package/dist/cli/{billing-GWG5D3P6.js → billing-QC52XTAD.js} +87 -74
- package/dist/cli/{billing-DUFOEOPT.mjs → billing-SWLTV6PV.mjs} +18 -5
- package/dist/cli/{chunk-37CPEQBE.mjs → chunk-2LDU5BMG.mjs} +3 -3
- package/dist/cli/{chunk-JUCEEIEC.mjs → chunk-43HOSM2F.mjs} +1 -1
- package/dist/cli/{chunk-E7V5CRA2.mjs → chunk-6CTVXF6X.mjs} +8 -8
- package/dist/cli/{chunk-BJOVX7EB.mjs → chunk-7557D4FM.mjs} +2 -2
- package/dist/cli/chunk-BX343KU7.mjs +155 -0
- package/dist/cli/{chunk-7VRWERTM.js → chunk-DMTAFWMS.js} +84 -50
- package/dist/cli/{chunk-XLOXUW5Y.mjs → chunk-FS2RMEJ7.mjs} +1 -1
- package/dist/cli/{chunk-EJ6YI46S.js → chunk-HUDUN4AR.js} +2 -2
- package/dist/cli/{chunk-OKTCLFKM.mjs → chunk-IFBLLSGH.mjs} +5 -5
- package/dist/cli/{chunk-33EM4SMH.mjs → chunk-IWFI6FTJ.mjs} +4 -153
- package/dist/cli/{chunk-ZPV7DMAA.mjs → chunk-IXVABCNA.mjs} +1 -1
- package/dist/cli/{chunk-O3KVUHCG.js → chunk-JOF3B22H.js} +20 -20
- package/dist/cli/{chunk-6TFACCXN.js → chunk-KFKM5J2N.js} +2 -2
- package/dist/cli/{chunk-WLVGRU5A.mjs → chunk-KQD6EFPD.mjs} +2 -2
- package/dist/cli/{chunk-HSKLAPMD.js → chunk-MP35NE55.js} +26 -26
- package/dist/cli/chunk-NOHA3SZJ.js +155 -0
- package/dist/cli/{chunk-Z3DBS4IB.js → chunk-NSQZUUYB.js} +81 -81
- package/dist/cli/{chunk-BQQLTSGC.mjs → chunk-P4UQCYKH.mjs} +4 -4
- package/dist/cli/{chunk-CH2WDSBC.js → chunk-PJWXEUUH.js} +8 -8
- package/dist/cli/{chunk-L2IUGWV5.js → chunk-RG644LJU.js} +1 -1
- package/dist/cli/{chunk-5DUMNKQG.js → chunk-RNCIPLU5.js} +50 -50
- package/dist/cli/{chunk-WDOWAOYB.js → chunk-RTR2KUU6.js} +10 -10
- package/dist/cli/{chunk-4C7HPD57.mjs → chunk-SQUJHT7O.mjs} +1 -1
- package/dist/cli/{chunk-ZNDE2BTH.js → chunk-V6AZQ4JH.js} +16 -16
- package/dist/cli/{chunk-F2DW7DFE.js → chunk-V7S2RUVE.js} +8 -8
- package/dist/cli/{chunk-C4NPWUZY.js → chunk-VG6WESY7.js} +73 -222
- package/dist/cli/{chunk-6G6KX7I7.js → chunk-WTTHH2K3.js} +6 -6
- package/dist/cli/{chunk-JRPNCMMN.js → chunk-WWZ4YJ6J.js} +35 -35
- package/dist/cli/{chunk-PJYTV24I.mjs → chunk-X2LUT22I.mjs} +2 -2
- package/dist/cli/{chunk-YXXIFMXI.mjs → chunk-XH4QC5ZX.mjs} +2 -2
- package/dist/cli/{chunk-3HT47QPJ.mjs → chunk-XNN3OTGT.mjs} +2 -2
- package/dist/cli/{chunk-LPPAJJJN.mjs → chunk-XV4463XW.mjs} +35 -1
- package/dist/cli/{chunk-TFCLUWDQ.js → chunk-YU6IE234.js} +6 -6
- package/dist/cli/{chunk-RFPP4Q66.mjs → chunk-ZVBLECZX.mjs} +3 -3
- package/dist/cli/{csv-RL7WQD6Y.mjs → csv-FON4ZQKC.mjs} +3 -3
- package/dist/cli/{csv-4CHXZQXO.js → csv-WIQB5XWZ.js} +12 -12
- package/dist/cli/{db-ZDBAWV7B.mjs → db-3KA62DOQ.mjs} +4 -4
- package/dist/cli/{db-MRI5IM2A.js → db-VMDDODCN.js} +25 -25
- package/dist/cli/{describe-RRQUUJQ3.mjs → describe-LGDK77QI.mjs} +13 -12
- package/dist/cli/{describe-2FYKXM5B.js → describe-NTAAHCCX.js} +17 -16
- package/dist/cli/describe-core.d.mts +1 -1
- package/dist/cli/describe-core.d.ts +1 -1
- package/dist/cli/{executions-KDBD47A5.js → executions-OT2KNJDO.js} +6 -6
- package/dist/cli/{executions-RJL76TJS.mjs → executions-TM6AMTQ7.mjs} +4 -4
- package/dist/cli/{feedback-2CE24NHD.js → feedback-4HQGY3TO.js} +7 -7
- package/dist/cli/{feedback-KOYLXHYE.mjs → feedback-HWLUVFE2.mjs} +3 -3
- package/dist/cli/git-QIZWO5BA.js +24 -0
- package/dist/cli/{git-RDUHU6L6.mjs → git-TDJVSPE6.mjs} +4 -4
- package/dist/cli/index.js +133 -131
- package/dist/cli/index.mjs +39 -37
- package/dist/cli/{legacy-noops-7FOMGBMN.js → legacy-noops-XH3FDLWT.js} +7 -7
- package/dist/cli/{legacy-noops-4HS2LYP6.mjs → legacy-noops-YB2PES43.mjs} +4 -4
- package/dist/cli/{monitors-IJXNK5BL.js → monitors-E3QFEJKF.js} +276 -124
- package/dist/cli/{monitors-JLBTNBVU.mjs → monitors-KQDDMSDR.mjs} +156 -4
- package/dist/cli/{org-OWP6K4AA.mjs → org-7X2C7YKA.mjs} +4 -4
- package/dist/cli/{org-JL7SW6VY.js → org-PMTLR7VP.js} +66 -66
- package/dist/cli/{play-FNOVKU74.mjs → play-7FNEPSVR.mjs} +11 -10
- package/dist/cli/{play-LLNZWHT6.js → play-RH22Z3D6.js} +284 -283
- package/dist/cli/{providers-WBOEOKE7.mjs → providers-HOEDJNUK.mjs} +4 -4
- package/dist/cli/{providers-E4XIEUC7.js → providers-X5NY5IQH.js} +7 -7
- package/dist/cli/{quickstart-3FUHKGEY.js → quickstart-FI4A6VTV.js} +5 -5
- package/dist/cli/{quickstart-6G5G3BVA.mjs → quickstart-NCL7P2US.mjs} +3 -3
- package/dist/cli/search-6FUMJBIY.js +30 -0
- package/dist/cli/{search-CNMB4Z6M.mjs → search-UHT7ZNPO.mjs} +5 -5
- package/dist/cli/{secrets-5FY5APVK.mjs → secrets-D4ZB5RKB.mjs} +4 -4
- package/dist/cli/{secrets-BDSWOYAT.js → secrets-TT6J3SZJ.js} +13 -13
- package/dist/cli/{sessions-PMIKVPQN.mjs → sessions-HRLJ6SLL.mjs} +4 -4
- package/dist/cli/{sessions-B7T2CHYK.js → sessions-SRQQZMM7.js} +5 -5
- package/dist/cli/{settings-RXQJRRLR.js → settings-EJIKXLC7.js} +76 -75
- package/dist/cli/{settings-4TAYLTPR.mjs → settings-PJJYPWU3.mjs} +9 -8
- package/dist/cli/{setup-ZTMETGSO.js → setup-3FL77Z33.js} +43 -42
- package/dist/cli/{setup-LVUISLVO.mjs → setup-DNI6ENFD.mjs} +8 -7
- package/dist/cli/skills-DEKOSL7F.js +30 -0
- package/dist/cli/{skills-NSJ43Z5Q.mjs → skills-FO7MY2OE.mjs} +6 -5
- package/dist/cli/tools-E6XRW6PW.js +45 -0
- package/dist/cli/{tools-CFCKIGDY.mjs → tools-F72WONN3.mjs} +13 -12
- package/dist/cli/update-6M3CAS4T.js +32 -0
- package/dist/cli/{update-HYOCBXJO.mjs → update-JZU33TC5.mjs} +8 -7
- package/dist/cli/{workflow-U6S4SWTF.js → workflow-BGKC73V2.js} +15 -15
- package/dist/cli/{workflow-RKX45RJ4.mjs → workflow-PQYQXQPH.mjs} +5 -5
- package/dist/{client-CPRaigLC.d.ts → client-D6XhrO0f.d.ts} +26 -1
- package/dist/{client-DstDI5TV.d.mts → client-mRA_esYI.d.mts} +26 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +82 -80
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-WPQBEOES.js +0 -40
- package/dist/cli/git-DZ5GROPH.js +0 -24
- package/dist/cli/search-4ECC773X.js +0 -30
- package/dist/cli/skills-MIENPTOD.js +0 -29
- package/dist/cli/tools-CXJO5XSH.js +0 -44
- package/dist/cli/update-B2LQGEXF.js +0 -31
|
@@ -1,6 +1,6 @@
|
|
|
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; }
|
|
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 _chunkNOHA3SZJjs = require('./chunk-NOHA3SZJ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -17,13 +17,13 @@ var _chunk6G6KX7I7js = require('./chunk-6G6KX7I7.js');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkRTR2KUU6js = require('./chunk-RTR2KUU6.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkRG644LJUjs = require('./chunk-RG644LJU.js');
|
|
27
27
|
|
|
28
28
|
// src/compat.ts
|
|
29
29
|
var _crypto = require('crypto');
|
|
@@ -58,7 +58,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
58
58
|
return value === "1" || value === "true" || value === "yes";
|
|
59
59
|
}
|
|
60
60
|
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, )) {
|
|
61
|
-
return _path.join.call(void 0,
|
|
61
|
+
return _path.join.call(void 0, _chunkRTR2KUU6js.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
62
62
|
}
|
|
63
63
|
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, )) {
|
|
64
64
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -66,9 +66,9 @@ function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'acc
|
|
|
66
66
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
67
67
|
return JSON.stringify({
|
|
68
68
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
69
|
-
version:
|
|
70
|
-
apiContract:
|
|
71
|
-
apiMajor:
|
|
69
|
+
version: _chunkRTR2KUU6js.SDK_VERSION,
|
|
70
|
+
apiContract: _chunkRTR2KUU6js.SDK_API_CONTRACT,
|
|
71
|
+
apiMajor: _chunkRTR2KUU6js.SDK_API_MAJOR,
|
|
72
72
|
command: _optionalChain([command, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()]) || null,
|
|
73
73
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
74
74
|
});
|
|
@@ -76,8 +76,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
76
76
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
77
77
|
return JSON.stringify({
|
|
78
78
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
79
|
-
version:
|
|
80
|
-
apiContract:
|
|
79
|
+
version: _chunkRTR2KUU6js.SDK_VERSION,
|
|
80
|
+
apiContract: _chunkRTR2KUU6js.SDK_API_CONTRACT,
|
|
81
81
|
command: _optionalChain([command, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]) || null
|
|
82
82
|
});
|
|
83
83
|
}
|
|
@@ -102,7 +102,7 @@ function isSavedWithin(savedAt, windowMs, now) {
|
|
|
102
102
|
}
|
|
103
103
|
var UPDATE_ADVISORY_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
104
104
|
function claimUpdateAdvisory(baseUrl, now = Date.now()) {
|
|
105
|
-
const path = _path.join.call(void 0,
|
|
105
|
+
const path = _path.join.call(void 0, _chunkRTR2KUU6js.sdkCliStateDirPath.call(void 0, baseUrl), "update-advisory.json");
|
|
106
106
|
try {
|
|
107
107
|
const { shownAt } = JSON.parse(_fs.readFileSync.call(void 0, path, "utf8"));
|
|
108
108
|
if (isSavedWithin(shownAt, UPDATE_ADVISORY_INTERVAL_MS, now)) return false;
|
|
@@ -186,7 +186,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
186
186
|
);
|
|
187
187
|
try {
|
|
188
188
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
189
|
-
url.searchParams.set("version",
|
|
189
|
+
url.searchParams.set("version", _chunkRTR2KUU6js.SDK_VERSION);
|
|
190
190
|
if (_optionalChain([options, 'access', _27 => _27.command, 'optionalAccess', _28 => _28.trim, 'call', _29 => _29()])) {
|
|
191
191
|
url.searchParams.set("command", options.command.trim());
|
|
192
192
|
}
|
|
@@ -194,7 +194,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
194
194
|
url.searchParams.set("skills_version", _nullishCoalesce(options.skillsVersion, () => ( "")));
|
|
195
195
|
url.searchParams.set(
|
|
196
196
|
"skills_cli_capability",
|
|
197
|
-
String(
|
|
197
|
+
String(_chunkRG644LJUjs.SDK_RELEASE.packageCapabilities.skillsGuidance)
|
|
198
198
|
);
|
|
199
199
|
}
|
|
200
200
|
if (options.catalog) {
|
|
@@ -206,14 +206,14 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
206
206
|
const response = await fetch(url, {
|
|
207
207
|
method: "GET",
|
|
208
208
|
headers: {
|
|
209
|
-
...
|
|
210
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
211
|
-
"X-Deepline-SDK-Version":
|
|
212
|
-
"X-Deepline-API-Major": String(
|
|
213
|
-
"X-Deepline-API-Contract":
|
|
209
|
+
..._chunkRTR2KUU6js.deploymentProtectionHeaders.call(void 0, ),
|
|
210
|
+
"User-Agent": `deepline-ts-sdk/${_chunkRTR2KUU6js.SDK_VERSION}`,
|
|
211
|
+
"X-Deepline-SDK-Version": _chunkRTR2KUU6js.SDK_VERSION,
|
|
212
|
+
"X-Deepline-API-Major": String(_chunkRTR2KUU6js.SDK_API_MAJOR),
|
|
213
|
+
"X-Deepline-API-Contract": _chunkRTR2KUU6js.SDK_API_CONTRACT,
|
|
214
214
|
"X-Deepline-CLI-Update-Preferences": "1",
|
|
215
215
|
"X-Deepline-CLI-Auto-Update-Capability": SDK_CLI_AUTO_UPDATE_CAPABILITY,
|
|
216
|
-
...options.catalog ? { Authorization: `Bearer ${
|
|
216
|
+
...options.catalog ? { Authorization: `Bearer ${_chunkRTR2KUU6js.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {},
|
|
217
217
|
..._optionalChain([options, 'access', _30 => _30.catalog, 'optionalAccess', _31 => _31.cliInvocationId]) ? { "X-Deepline-CLI-Invocation-ID": options.catalog.cliInvocationId } : {}
|
|
218
218
|
},
|
|
219
219
|
signal: controller.signal
|
|
@@ -374,7 +374,7 @@ function skillsSourceUrl(baseUrl) {
|
|
|
374
374
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
375
375
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
376
376
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
377
|
-
const agents = _nullishCoalesce(options.agents, () => (
|
|
377
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunkRTR2KUU6js.DEFAULT_SKILL_AGENTS));
|
|
378
378
|
const values = {
|
|
379
379
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
380
380
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -400,153 +400,6 @@ function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
|
400
400
|
return rendered;
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
// src/cli/progress.ts
|
|
404
|
-
var _worker_threads = require('worker_threads');
|
|
405
|
-
var CliProgress = (_class = class {
|
|
406
|
-
__init() {this.lastMessage = null}
|
|
407
|
-
__init2() {this.interactive = Boolean(process.stderr.isTTY)}
|
|
408
|
-
__init3() {this.grey = "\x1B[90m"}
|
|
409
|
-
__init4() {this.cyan = "\x1B[36m"}
|
|
410
|
-
__init5() {this.dim = "\x1B[2m"}
|
|
411
|
-
__init6() {this.reset = "\x1B[0m"}
|
|
412
|
-
__init7() {this.worker = null}
|
|
413
|
-
|
|
414
|
-
// --json output is one JSON document: progress never renders under it.
|
|
415
|
-
constructor(enabled) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);
|
|
416
|
-
this.enabled = enabled && !_chunk6G6KX7I7js.isJsonOutputMode.call(void 0, );
|
|
417
|
-
}
|
|
418
|
-
phase(message) {
|
|
419
|
-
if (!this.enabled || this.lastMessage === message) {
|
|
420
|
-
return;
|
|
421
|
-
}
|
|
422
|
-
if (this.interactive && this.lastMessage) {
|
|
423
|
-
this.settle("\u2713");
|
|
424
|
-
}
|
|
425
|
-
this.lastMessage = message;
|
|
426
|
-
if (!this.interactive) {
|
|
427
|
-
process.stderr.write(`${message}
|
|
428
|
-
`);
|
|
429
|
-
return;
|
|
430
|
-
}
|
|
431
|
-
this.ensureWorker();
|
|
432
|
-
_optionalChain([this, 'access', _38 => _38.worker, 'optionalAccess', _39 => _39.postMessage, 'call', _40 => _40({ type: "phase", message })]);
|
|
433
|
-
}
|
|
434
|
-
complete() {
|
|
435
|
-
this.settle("\u2713");
|
|
436
|
-
}
|
|
437
|
-
fail() {
|
|
438
|
-
this.settle("\u2717");
|
|
439
|
-
}
|
|
440
|
-
writeLogLine(line) {
|
|
441
|
-
if (_chunk6G6KX7I7js.isJsonOutputMode.call(void 0, )) return;
|
|
442
|
-
if (!this.enabled) {
|
|
443
|
-
process.stderr.write(`${line}
|
|
444
|
-
`);
|
|
445
|
-
return;
|
|
446
|
-
}
|
|
447
|
-
const message = this.interactive ? `${this.cyan}[logs]${this.reset} ${this.dim}${line}${this.reset}` : `[logs] ${line}`;
|
|
448
|
-
if (!this.interactive) {
|
|
449
|
-
process.stderr.write(`${message}
|
|
450
|
-
`);
|
|
451
|
-
return;
|
|
452
|
-
}
|
|
453
|
-
const activeMessage = this.lastMessage;
|
|
454
|
-
_optionalChain([this, 'access', _41 => _41.worker, 'optionalAccess', _42 => _42.terminate, 'call', _43 => _43(), 'access', _44 => _44.catch, 'call', _45 => _45(() => void 0)]);
|
|
455
|
-
this.worker = null;
|
|
456
|
-
process.stderr.write(`\r\x1B[2K${message}
|
|
457
|
-
`);
|
|
458
|
-
if (activeMessage) {
|
|
459
|
-
this.startWorker().postMessage({ type: "phase", message: activeMessage });
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
writeLine(line, stream = process.stderr) {
|
|
463
|
-
if (!this.enabled || !this.interactive) {
|
|
464
|
-
stream.write(`${line}
|
|
465
|
-
`);
|
|
466
|
-
return;
|
|
467
|
-
}
|
|
468
|
-
const activeMessage = this.lastMessage;
|
|
469
|
-
_optionalChain([this, 'access', _46 => _46.worker, 'optionalAccess', _47 => _47.terminate, 'call', _48 => _48(), 'access', _49 => _49.catch, 'call', _50 => _50(() => void 0)]);
|
|
470
|
-
this.worker = null;
|
|
471
|
-
stream.write(`\r\x1B[2K${line}
|
|
472
|
-
`);
|
|
473
|
-
if (activeMessage) {
|
|
474
|
-
this.startWorker().postMessage({ type: "phase", message: activeMessage });
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
settle(mark) {
|
|
478
|
-
if (!this.enabled || !this.lastMessage) {
|
|
479
|
-
return;
|
|
480
|
-
}
|
|
481
|
-
if (this.interactive) {
|
|
482
|
-
_optionalChain([this, 'access', _51 => _51.worker, 'optionalAccess', _52 => _52.terminate, 'call', _53 => _53(), 'access', _54 => _54.catch, 'call', _55 => _55(() => void 0)]);
|
|
483
|
-
this.worker = null;
|
|
484
|
-
process.stderr.write(
|
|
485
|
-
`\r\x1B[2K${this.grey}${mark} ${this.lastMessage}${this.reset}
|
|
486
|
-
`
|
|
487
|
-
);
|
|
488
|
-
}
|
|
489
|
-
this.lastMessage = null;
|
|
490
|
-
}
|
|
491
|
-
ensureWorker() {
|
|
492
|
-
this.startWorker();
|
|
493
|
-
}
|
|
494
|
-
startWorker() {
|
|
495
|
-
if (this.worker) {
|
|
496
|
-
return this.worker;
|
|
497
|
-
}
|
|
498
|
-
this.worker = new (0, _worker_threads.Worker)(
|
|
499
|
-
`
|
|
500
|
-
const { parentPort } = require('node:worker_threads');
|
|
501
|
-
const { writeSync } = require('node:fs');
|
|
502
|
-
const frames = ['\u2014', '\\\\', '|', '/'];
|
|
503
|
-
const grey = '\\x1b[90m';
|
|
504
|
-
const reset = '\\x1b[0m';
|
|
505
|
-
let message = '';
|
|
506
|
-
let frameIndex = 0;
|
|
507
|
-
let timer = null;
|
|
508
|
-
function render() {
|
|
509
|
-
if (!message) return;
|
|
510
|
-
const frame = frames[frameIndex % frames.length] || '\u2014';
|
|
511
|
-
frameIndex += 1;
|
|
512
|
-
writeSync(2, '\\r\\x1b[2K' + grey + frame + ' ' + message + reset);
|
|
513
|
-
}
|
|
514
|
-
parentPort.on('message', (event) => {
|
|
515
|
-
if (event.type === 'phase') {
|
|
516
|
-
message = String(event.message || '');
|
|
517
|
-
frameIndex = 0;
|
|
518
|
-
render();
|
|
519
|
-
if (!timer) {
|
|
520
|
-
timer = setInterval(render, 120);
|
|
521
|
-
timer.unref && timer.unref();
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
if (event.type === 'stop') {
|
|
525
|
-
if (timer) clearInterval(timer);
|
|
526
|
-
timer = null;
|
|
527
|
-
writeSync(2, '\\r\\x1b[2K');
|
|
528
|
-
}
|
|
529
|
-
});
|
|
530
|
-
`,
|
|
531
|
-
{ eval: true }
|
|
532
|
-
);
|
|
533
|
-
this.worker.unref();
|
|
534
|
-
return this.worker;
|
|
535
|
-
}
|
|
536
|
-
}, _class);
|
|
537
|
-
var activeProgress = null;
|
|
538
|
-
function setActiveCliProgress(progress) {
|
|
539
|
-
activeProgress = progress;
|
|
540
|
-
}
|
|
541
|
-
function getActiveCliProgress() {
|
|
542
|
-
return activeProgress;
|
|
543
|
-
}
|
|
544
|
-
function createCliProgress(enabled) {
|
|
545
|
-
const progress = new CliProgress(enabled);
|
|
546
|
-
setActiveCliProgress(progress);
|
|
547
|
-
return progress;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
403
|
// src/cli/windows-arg-escape.ts
|
|
551
404
|
|
|
552
405
|
|
|
@@ -626,7 +479,7 @@ function isFailureReportingDisabled() {
|
|
|
626
479
|
return truthyEnv(FAILURE_REPORT_DISABLE_ENV);
|
|
627
480
|
}
|
|
628
481
|
function redactFailureText(value, maxChars = MAX_FAILURE_TEXT_CHARS) {
|
|
629
|
-
const home = _optionalChain([process, 'access',
|
|
482
|
+
const home = _optionalChain([process, 'access', _38 => _38.env, 'access', _39 => _39.HOME, 'optionalAccess', _40 => _40.trim, 'call', _41 => _41()]);
|
|
630
483
|
let text = String(_nullishCoalesce(value, () => ( "")));
|
|
631
484
|
if (!text) return "";
|
|
632
485
|
if (home && home !== "/") {
|
|
@@ -740,37 +593,37 @@ function buildEnvironmentContext() {
|
|
|
740
593
|
node_version: process.version,
|
|
741
594
|
runtime: "Node.js",
|
|
742
595
|
hostname: _os.hostname.call(void 0, ),
|
|
743
|
-
agent_runtime:
|
|
596
|
+
agent_runtime: _chunkRTR2KUU6js.detectAgentRuntime.call(void 0, )
|
|
744
597
|
};
|
|
745
598
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
746
|
-
const normalized = _optionalChain([process, 'access',
|
|
599
|
+
const normalized = _optionalChain([process, 'access', _42 => _42.env, 'access', _43 => _43[key], 'optionalAccess', _44 => _44.trim, 'call', _45 => _45()]);
|
|
747
600
|
if (normalized) context[key.toLowerCase()] = normalized;
|
|
748
601
|
}
|
|
749
|
-
if (_optionalChain([process, 'access',
|
|
602
|
+
if (_optionalChain([process, 'access', _46 => _46.env, 'access', _47 => _47.CLAUDE_PROJECT_DIR, 'optionalAccess', _48 => _48.trim, 'call', _49 => _49()])) {
|
|
750
603
|
context.claude_project_dir_present = "true";
|
|
751
604
|
}
|
|
752
|
-
if (_optionalChain([process, 'access',
|
|
605
|
+
if (_optionalChain([process, 'access', _50 => _50.env, 'access', _51 => _51.DEEPLINE_PLUGIN_ROOT, 'optionalAccess', _52 => _52.trim, 'call', _53 => _53()])) {
|
|
753
606
|
context.deepline_plugin_root_present = "true";
|
|
754
607
|
}
|
|
755
|
-
if (_optionalChain([process, 'access',
|
|
608
|
+
if (_optionalChain([process, 'access', _54 => _54.env, 'access', _55 => _55.DEEPLINE_PLUGIN_SKILLS_DIR, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()])) {
|
|
756
609
|
context.deepline_plugin_skills_dir_present = "true";
|
|
757
610
|
}
|
|
758
|
-
if (_optionalChain([process, 'access',
|
|
611
|
+
if (_optionalChain([process, 'access', _58 => _58.env, 'access', _59 => _59.HOME, 'optionalAccess', _60 => _60.trim, 'call', _61 => _61(), 'access', _62 => _62.startsWith, 'call', _63 => _63("/sessions/")])) {
|
|
759
612
|
context.home_scope = "sessions";
|
|
760
613
|
}
|
|
761
614
|
return context;
|
|
762
615
|
}
|
|
763
616
|
function failureReportHeaders(apiKey) {
|
|
764
617
|
return {
|
|
765
|
-
...
|
|
618
|
+
..._chunkRTR2KUU6js.deploymentProtectionHeaders.call(void 0, ),
|
|
766
619
|
Authorization: `Bearer ${apiKey}`,
|
|
767
620
|
"Content-Type": "application/json",
|
|
768
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
621
|
+
"User-Agent": `deepline-ts-sdk/${_chunkRTR2KUU6js.SDK_VERSION}`,
|
|
769
622
|
"X-Deepline-Client-Family": "sdk",
|
|
770
623
|
"X-Deepline-CLI-Family": "sdk",
|
|
771
|
-
"X-Deepline-Agent-Runtime":
|
|
772
|
-
"X-Deepline-CLI-Version":
|
|
773
|
-
"X-Deepline-SDK-Version":
|
|
624
|
+
"X-Deepline-Agent-Runtime": _chunkRTR2KUU6js.detectAgentRuntime.call(void 0, ),
|
|
625
|
+
"X-Deepline-CLI-Version": _chunkRTR2KUU6js.SDK_VERSION,
|
|
626
|
+
"X-Deepline-SDK-Version": _chunkRTR2KUU6js.SDK_VERSION
|
|
774
627
|
};
|
|
775
628
|
}
|
|
776
629
|
async function postFailureReport(input) {
|
|
@@ -798,7 +651,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
798
651
|
if (isFailureReportingDisabled()) return false;
|
|
799
652
|
let apiKey = "";
|
|
800
653
|
try {
|
|
801
|
-
apiKey =
|
|
654
|
+
apiKey = _chunkRTR2KUU6js.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
802
655
|
} catch (e9) {
|
|
803
656
|
return false;
|
|
804
657
|
}
|
|
@@ -825,7 +678,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
825
678
|
failure_code: failureCode2,
|
|
826
679
|
failure_stage: failureStage,
|
|
827
680
|
error_body: "Automatic Deepline skills installation failed.",
|
|
828
|
-
cli_version:
|
|
681
|
+
cli_version: _chunkRTR2KUU6js.SDK_VERSION,
|
|
829
682
|
context: {
|
|
830
683
|
environment: buildEnvironmentContext(),
|
|
831
684
|
skills_sync: {
|
|
@@ -890,7 +743,7 @@ function resolvedFailureKind(input) {
|
|
|
890
743
|
}
|
|
891
744
|
function safeRequestDiagnostics(error) {
|
|
892
745
|
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError)) return null;
|
|
893
|
-
const request = _optionalChain([error, 'access',
|
|
746
|
+
const request = _optionalChain([error, 'access', _64 => _64.details, 'optionalAccess', _65 => _65.request]);
|
|
894
747
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
895
748
|
return null;
|
|
896
749
|
const value = request;
|
|
@@ -945,7 +798,7 @@ function buildFailureReport(input) {
|
|
|
945
798
|
failure_kind: failureKind,
|
|
946
799
|
failure_code: code,
|
|
947
800
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
948
|
-
cli_version:
|
|
801
|
+
cli_version: _chunkRTR2KUU6js.SDK_VERSION,
|
|
949
802
|
context: {
|
|
950
803
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
951
804
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -965,8 +818,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
965
818
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
966
819
|
const exitCode = resolvedExitCode(input);
|
|
967
820
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
968
|
-
const baseUrl =
|
|
969
|
-
const apiKey =
|
|
821
|
+
const baseUrl = _chunkRTR2KUU6js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
822
|
+
const apiKey = _chunkRTR2KUU6js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
970
823
|
if (!apiKey) return false;
|
|
971
824
|
return postFailureReport({
|
|
972
825
|
baseUrl,
|
|
@@ -1003,25 +856,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
1003
856
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
1004
857
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
1005
858
|
function shouldSkipSkillsSync() {
|
|
1006
|
-
if (
|
|
859
|
+
if (_chunkRTR2KUU6js.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
1007
860
|
return true;
|
|
1008
861
|
}
|
|
1009
|
-
const value = _optionalChain([process, 'access',
|
|
862
|
+
const value = _optionalChain([process, 'access', _66 => _66.env, 'access', _67 => _67.DEEPLINE_SKIP_SKILLS_SYNC, 'optionalAccess', _68 => _68.trim, 'call', _69 => _69(), 'access', _70 => _70.toLowerCase, 'call', _71 => _71()]);
|
|
1010
863
|
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
1011
864
|
}
|
|
1012
865
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
1013
|
-
return _path.join.call(void 0,
|
|
866
|
+
return _path.join.call(void 0, _chunkRTR2KUU6js.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
1014
867
|
}
|
|
1015
868
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
1016
869
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
1017
|
-
var agentLeaseSegment =
|
|
870
|
+
var agentLeaseSegment = _chunkRTR2KUU6js.skillsAgentPathSegment;
|
|
1018
871
|
function sortedLeaseAgents(agents) {
|
|
1019
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
872
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkRTR2KUU6js.KNOWN_SKILL_AGENTS] : agents;
|
|
1020
873
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
1021
874
|
}
|
|
1022
875
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
1023
876
|
return _path.join.call(void 0,
|
|
1024
|
-
|
|
877
|
+
_chunkRTR2KUU6js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1025
878
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
1026
879
|
);
|
|
1027
880
|
}
|
|
@@ -1180,7 +1033,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
1180
1033
|
constructor(baseUrl, error) {
|
|
1181
1034
|
const detail = error instanceof Error ? error.message : String(error);
|
|
1182
1035
|
super(
|
|
1183
|
-
`Could not save skills state in ${
|
|
1036
|
+
`Could not save skills state in ${_chunkRTR2KUU6js.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
1184
1037
|
);
|
|
1185
1038
|
this.name = "SkillsStateUnavailableError";
|
|
1186
1039
|
}
|
|
@@ -1255,7 +1108,7 @@ async function acquireSkillsInstallLease(baseUrl, agents, version, options = {
|
|
|
1255
1108
|
if (Date.now() >= deadline) return null;
|
|
1256
1109
|
if (!waited) {
|
|
1257
1110
|
waited = true;
|
|
1258
|
-
_optionalChain([options, 'access',
|
|
1111
|
+
_optionalChain([options, 'access', _72 => _72.onWait, 'optionalCall', _73 => _73()]);
|
|
1259
1112
|
}
|
|
1260
1113
|
await new Promise((resolve) => setTimeout(resolve, pollMs));
|
|
1261
1114
|
}
|
|
@@ -1265,7 +1118,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
1265
1118
|
}
|
|
1266
1119
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
1267
1120
|
return _path.join.call(void 0,
|
|
1268
|
-
|
|
1121
|
+
_chunkRTR2KUU6js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1269
1122
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
1270
1123
|
);
|
|
1271
1124
|
}
|
|
@@ -1299,8 +1152,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
1299
1152
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
1300
1153
|
}
|
|
1301
1154
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
1302
|
-
if (shouldSkipSkillsSync() ||
|
|
1303
|
-
const agents =
|
|
1155
|
+
if (shouldSkipSkillsSync() || _chunkRTR2KUU6js.hasActivePluginSkills.call(void 0, )) return;
|
|
1156
|
+
const agents = _chunkRTR2KUU6js.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1304
1157
|
if (agents.length === 0) return;
|
|
1305
1158
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1306
1159
|
}
|
|
@@ -1311,12 +1164,12 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
|
1311
1164
|
stdio: "ignore",
|
|
1312
1165
|
env: process.env
|
|
1313
1166
|
});
|
|
1314
|
-
child.on("error", () => _optionalChain([onSpawnError, 'optionalCall',
|
|
1167
|
+
child.on("error", () => _optionalChain([onSpawnError, 'optionalCall', _74 => _74()]));
|
|
1315
1168
|
child.unref();
|
|
1316
1169
|
}
|
|
1317
1170
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
1318
1171
|
return _path.join.call(void 0,
|
|
1319
|
-
|
|
1172
|
+
_chunkRTR2KUU6js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1320
1173
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
1321
1174
|
);
|
|
1322
1175
|
}
|
|
@@ -1345,8 +1198,8 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
1345
1198
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
1346
1199
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
1347
1200
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
1348
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess',
|
|
1349
|
-
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess',
|
|
1201
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _75 => _75.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkRTR2KUU6js.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
1202
|
+
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess', _76 => _76.bunx]) === "missing" && probes.npx === "missing" ? "neither `bunx` nor `npx` was found on PATH. Make one available." : `installer version check failed for ${Object.entries(_nullishCoalesce(probes, () => ( {}))).filter(([, result]) => result === "failed").map(([command]) => `\`${command}\``).join(" and ")}. Check those commands with --version.`;
|
|
1350
1203
|
notice(
|
|
1351
1204
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
1352
1205
|
${manualCommand}`
|
|
@@ -1422,7 +1275,7 @@ async function fetchV1SkillIndex(baseUrl) {
|
|
|
1422
1275
|
}
|
|
1423
1276
|
}
|
|
1424
1277
|
function v1SkillNames(index) {
|
|
1425
|
-
const skills = Array.isArray(_optionalChain([index, 'optionalAccess',
|
|
1278
|
+
const skills = Array.isArray(_optionalChain([index, 'optionalAccess', _77 => _77.skills])) ? index.skills : [];
|
|
1426
1279
|
return sortedUniqueSkillNames(
|
|
1427
1280
|
skills.filter((skill) => skill && skill.install_surface === "v1").map((skill) => skill.name).filter(
|
|
1428
1281
|
(name) => typeof name === "string" && name.length > 0
|
|
@@ -1433,7 +1286,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
1433
1286
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
1434
1287
|
}
|
|
1435
1288
|
function isDefaultAgentSet(agents) {
|
|
1436
|
-
return agents.length ===
|
|
1289
|
+
return agents.length === _chunkRTR2KUU6js.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkRTR2KUU6js.DEFAULT_SKILL_AGENTS[index]);
|
|
1437
1290
|
}
|
|
1438
1291
|
function safeSkillFilePath(value) {
|
|
1439
1292
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1493,7 +1346,7 @@ function publishedArchiveFiles(bytes, expectedFiles, name) {
|
|
|
1493
1346
|
var PublishedSkillsVerificationError = class extends Error {
|
|
1494
1347
|
};
|
|
1495
1348
|
async function verifyDefaultAgentSkillsInstall(baseUrl, remoteVersion, skillNames, index) {
|
|
1496
|
-
if (_optionalChain([index, 'optionalAccess',
|
|
1349
|
+
if (_optionalChain([index, 'optionalAccess', _78 => _78.version]) !== remoteVersion) {
|
|
1497
1350
|
throw new PublishedSkillsVerificationError(
|
|
1498
1351
|
"the published skill index version does not match the server version"
|
|
1499
1352
|
);
|
|
@@ -1509,7 +1362,7 @@ async function verifyDefaultAgentSkillsInstall(baseUrl, remoteVersion, skillName
|
|
|
1509
1362
|
const entry = entries.find(
|
|
1510
1363
|
(skill) => skill && skill.name === name && skill.install_surface === "v1"
|
|
1511
1364
|
);
|
|
1512
|
-
if (!Array.isArray(_optionalChain([entry, 'optionalAccess',
|
|
1365
|
+
if (!Array.isArray(_optionalChain([entry, 'optionalAccess', _79 => _79.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)) {
|
|
1513
1366
|
throw new PublishedSkillsVerificationError(
|
|
1514
1367
|
`invalid published file list for ${name}`
|
|
1515
1368
|
);
|
|
@@ -1563,7 +1416,7 @@ async function verifyDefaultAgentSkillsInstall(baseUrl, remoteVersion, skillName
|
|
|
1563
1416
|
controller.abort();
|
|
1564
1417
|
}
|
|
1565
1418
|
const home = _os.homedir.call(void 0, );
|
|
1566
|
-
const claudeConfigDir = _optionalChain([process, 'access',
|
|
1419
|
+
const claudeConfigDir = _optionalChain([process, 'access', _80 => _80.env, 'access', _81 => _81.CLAUDE_CONFIG_DIR, 'optionalAccess', _82 => _82.trim, 'call', _83 => _83()]) || _path.join.call(void 0, home, ".claude");
|
|
1567
1420
|
for (const [name, { files }] of published) {
|
|
1568
1421
|
for (const root of [
|
|
1569
1422
|
_path.join.call(void 0, home, ".agents", "skills", name),
|
|
@@ -1590,21 +1443,21 @@ async function fetchSkillsUpdate(baseUrl, localVersion) {
|
|
|
1590
1443
|
method: "POST",
|
|
1591
1444
|
headers: { "Content-Type": "application/json" },
|
|
1592
1445
|
body: JSON.stringify({
|
|
1593
|
-
sdk_cli: { version:
|
|
1446
|
+
sdk_cli: { version: _chunkRTR2KUU6js.SDK_VERSION },
|
|
1594
1447
|
skills: {
|
|
1595
1448
|
version: localVersion,
|
|
1596
|
-
capability:
|
|
1449
|
+
capability: _chunkRG644LJUjs.SDK_RELEASE.packageCapabilities.skillsGuidance
|
|
1597
1450
|
}
|
|
1598
1451
|
}),
|
|
1599
1452
|
signal: controller.signal
|
|
1600
1453
|
});
|
|
1601
1454
|
if (!response.ok) return null;
|
|
1602
1455
|
const data = await response.json().catch(() => null);
|
|
1603
|
-
const skills = _optionalChain([data, 'optionalAccess',
|
|
1456
|
+
const skills = _optionalChain([data, 'optionalAccess', _84 => _84.skills]);
|
|
1604
1457
|
if (!skills) return null;
|
|
1605
1458
|
return {
|
|
1606
1459
|
needsUpdate: skills.needs_update === true,
|
|
1607
|
-
remoteVersion: typeof _optionalChain([skills, 'access',
|
|
1460
|
+
remoteVersion: typeof _optionalChain([skills, 'access', _85 => _85.remote, 'optionalAccess', _86 => _86.version]) === "string" ? skills.remote.version.trim() : ""
|
|
1608
1461
|
};
|
|
1609
1462
|
} catch (e24) {
|
|
1610
1463
|
return null;
|
|
@@ -1632,7 +1485,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1632
1485
|
}
|
|
1633
1486
|
function noInstallerProbePath(baseUrl) {
|
|
1634
1487
|
return _path.join.call(void 0,
|
|
1635
|
-
|
|
1488
|
+
_chunkRTR2KUU6js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1636
1489
|
"skills-sync-no-installer-unknown.json"
|
|
1637
1490
|
);
|
|
1638
1491
|
}
|
|
@@ -1640,7 +1493,7 @@ function cachedUnavailableInstallerProbes(baseUrl, remoteVersion, allowBoundedFa
|
|
|
1640
1493
|
const path = noInstallerProbePath(baseUrl);
|
|
1641
1494
|
try {
|
|
1642
1495
|
const cached = JSON.parse(_fs.readFileSync.call(void 0, path, "utf-8"));
|
|
1643
|
-
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',
|
|
1496
|
+
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', _87 => _87.probes, 'optionalAccess', _88 => _88.bunx]) === "missing" || _optionalChain([cached, 'access', _89 => _89.probes, 'optionalAccess', _90 => _90.bunx]) === "failed") && (_optionalChain([cached, 'access', _91 => _91.probes, 'optionalAccess', _92 => _92.npx]) === "missing" || _optionalChain([cached, 'access', _93 => _93.probes, 'optionalAccess', _94 => _94.npx]) === "failed") && // A terminal timeout is not evidence that the unbounded child probe
|
|
1644
1497
|
// will fail. Older caches without probe provenance are ambiguous too.
|
|
1645
1498
|
(allowBoundedFailures || cached.probeTimeoutMs === null || cached.probes.bunx === "missing" && cached.probes.npx === "missing")) {
|
|
1646
1499
|
return cached.probes;
|
|
@@ -1694,7 +1547,7 @@ function probeCommand(command, timeoutMs) {
|
|
|
1694
1547
|
timeout: timeoutMs
|
|
1695
1548
|
});
|
|
1696
1549
|
if (result.status === 0) return "available";
|
|
1697
|
-
return _optionalChain([result, 'access',
|
|
1550
|
+
return _optionalChain([result, 'access', _95 => _95.error, 'optionalAccess', _96 => _96.code]) === "ENOENT" ? "missing" : "failed";
|
|
1698
1551
|
}
|
|
1699
1552
|
function hasCommand(command) {
|
|
1700
1553
|
return probeCommand(command) === "available";
|
|
@@ -1711,7 +1564,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1711
1564
|
function resolveSkillsInstallSpawn(install, platform2 = process.platform) {
|
|
1712
1565
|
return resolveShellSpawn(install.command, install.args, platform2);
|
|
1713
1566
|
}
|
|
1714
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1567
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkRTR2KUU6js.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1715
1568
|
const commands = [];
|
|
1716
1569
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1717
1570
|
if (probes.bunx === "available") {
|
|
@@ -1853,7 +1706,7 @@ function runLegacySkillsCleanup(agents) {
|
|
|
1853
1706
|
}
|
|
1854
1707
|
}
|
|
1855
1708
|
function writeSdkSkillsStatusLine(line) {
|
|
1856
|
-
const progress = getActiveCliProgress();
|
|
1709
|
+
const progress = _chunkNOHA3SZJjs.getActiveCliProgress.call(void 0, );
|
|
1857
1710
|
if (progress) {
|
|
1858
1711
|
progress.writeLine(line);
|
|
1859
1712
|
return;
|
|
@@ -1863,11 +1716,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1863
1716
|
}
|
|
1864
1717
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1865
1718
|
if (shouldSkipSkillsSync()) return;
|
|
1866
|
-
const usingPluginSkills =
|
|
1719
|
+
const usingPluginSkills = _chunkRTR2KUU6js.hasActivePluginSkills.call(void 0, );
|
|
1867
1720
|
if (usingPluginSkills) {
|
|
1868
1721
|
return;
|
|
1869
1722
|
}
|
|
1870
|
-
const agents =
|
|
1723
|
+
const agents = _chunkRTR2KUU6js.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1871
1724
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1872
1725
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1873
1726
|
}
|
|
@@ -1895,12 +1748,12 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1895
1748
|
return;
|
|
1896
1749
|
}
|
|
1897
1750
|
try {
|
|
1898
|
-
const localVersion =
|
|
1751
|
+
const localVersion = _chunkRTR2KUU6js.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1899
1752
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1900
1753
|
needsUpdate: options.update.needs_update,
|
|
1901
1754
|
remoteVersion: options.update.remote.version
|
|
1902
1755
|
} : null;
|
|
1903
|
-
if (!_optionalChain([update, 'optionalAccess',
|
|
1756
|
+
if (!_optionalChain([update, 'optionalAccess', _97 => _97.needsUpdate]) || !update.remoteVersion) {
|
|
1904
1757
|
return;
|
|
1905
1758
|
}
|
|
1906
1759
|
if (agents.length > 0 && hasFailedSkillsSync(baseUrl, update.remoteVersion, agents)) {
|
|
@@ -2061,7 +1914,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
2061
1914
|
}
|
|
2062
1915
|
}
|
|
2063
1916
|
runLegacySkillsCleanup(agents);
|
|
2064
|
-
if (!
|
|
1917
|
+
if (!_chunkRTR2KUU6js.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
2065
1918
|
notice(
|
|
2066
1919
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
2067
1920
|
);
|
|
@@ -2100,6 +1953,4 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
2100
1953
|
|
|
2101
1954
|
|
|
2102
1955
|
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
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.getActiveCliProgress = getActiveCliProgress; exports.createCliProgress = createCliProgress; exports.resolveShellSpawn = resolveShellSpawn; exports.isFailureReportingDisabled = isFailureReportingDisabled; exports.redactFailureText = redactFailureText; exports.sanitizeCommand = sanitizeCommand; exports.failureReportHeaders = failureReportHeaders; exports.resolveSdkCliFailureExitCode = resolveSdkCliFailureExitCode; exports.maybeReportSdkCliFailure = maybeReportSdkCliFailure; 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;
|
|
1956
|
+
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.isFailureReportingDisabled = isFailureReportingDisabled; exports.redactFailureText = redactFailureText; exports.sanitizeCommand = sanitizeCommand; exports.failureReportHeaders = failureReportHeaders; exports.resolveSdkCliFailureExitCode = resolveSdkCliFailureExitCode; exports.maybeReportSdkCliFailure = maybeReportSdkCliFailure; 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;
|