deepline 0.3.457 → 0.3.458
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 +0 -23
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/cli/auth-4CBIXFOR.js +40 -0
- package/dist/cli/{auth-MZG5NF5U.mjs → auth-APD43NYT.mjs} +4 -4
- package/dist/cli/{billing-DWKZIL66.mjs → billing-QW4K272E.mjs} +4 -4
- package/dist/cli/{billing-RG3LF5OU.js → billing-TI4YOWAJ.js} +73 -73
- package/dist/cli/{chunk-KKPKLLNB.js → chunk-2A63IJ2J.js} +6 -6
- package/dist/cli/{chunk-QGLFBQ43.mjs → chunk-4TWDW7PI.mjs} +5 -5
- package/dist/cli/{chunk-YVQVS7SF.mjs → chunk-5KO62ZXQ.mjs} +4 -4
- package/dist/cli/{chunk-KTAVYWYI.js → chunk-6FLTFNAY.js} +8 -8
- package/dist/cli/{chunk-W3IZ55XS.mjs → chunk-6UJJZWT2.mjs} +3 -3
- package/dist/cli/{chunk-JL5DCH37.js → chunk-7M6C4STX.js} +16 -16
- package/dist/cli/{chunk-7IIRZXCO.mjs → chunk-7MZQ64FI.mjs} +1 -1
- package/dist/cli/{chunk-US3SZ7VQ.js → chunk-AA2DMXBN.js} +50 -50
- package/dist/cli/{chunk-EHEBXARN.js → chunk-AJQUFGTJ.js} +1 -1
- package/dist/cli/{chunk-CTWD4ZHP.js → chunk-CF2GXP2O.js} +2 -2
- package/dist/cli/{chunk-TTBQOHG4.js → chunk-DHERSOIG.js} +4 -4
- package/dist/cli/{chunk-CHBYYJ7Q.mjs → chunk-ECS3KXM7.mjs} +1 -1
- package/dist/cli/{chunk-KVXBMYRY.js → chunk-ECVZUWRR.js} +2 -2
- package/dist/cli/{chunk-LVGCJZ5S.mjs → chunk-EMIR3EXE.mjs} +1 -12
- package/dist/cli/{chunk-MU4ZDVQK.mjs → chunk-EO7WQN5X.mjs} +8 -8
- package/dist/cli/{chunk-LHHJATXY.mjs → chunk-GFGBHE43.mjs} +2 -2
- package/dist/cli/{chunk-L7WE7Q63.mjs → chunk-HJ5WE6S5.mjs} +1 -1
- package/dist/cli/{chunk-5TIASNUT.js → chunk-JIDT3SCM.js} +20 -20
- package/dist/cli/{chunk-VLL6RRIA.js → chunk-K6IHE6R5.js} +8 -8
- package/dist/cli/{chunk-SFCNYJ4B.js → chunk-L27PA5GT.js} +10 -21
- package/dist/cli/{chunk-J2ZS4PEC.js → chunk-LJDJ5GPR.js} +51 -51
- package/dist/cli/{chunk-NMVLO3JM.mjs → chunk-LZUXLXL3.mjs} +3 -3
- package/dist/cli/{chunk-F64XBZ3A.mjs → chunk-MNEN3RYE.mjs} +2 -2
- package/dist/cli/{chunk-JCWEQQGE.js → chunk-NDODDIEC.js} +35 -35
- package/dist/cli/{chunk-AQFHU3DW.js → chunk-NMJ4D2WO.js} +0 -21
- package/dist/cli/{chunk-LKAITV2M.js → chunk-NXVHTBBS.js} +26 -26
- package/dist/cli/{chunk-E5BGIERY.mjs → chunk-OTN6GV74.mjs} +1 -1
- package/dist/cli/{chunk-77Z5BO7D.mjs → chunk-R2GLGLDR.mjs} +0 -21
- package/dist/cli/{chunk-CQHTN3RY.mjs → chunk-U5O5TZC2.mjs} +1 -1
- package/dist/cli/{chunk-EXOCQILY.mjs → chunk-V6BEYE35.mjs} +2 -2
- package/dist/cli/{chunk-X4XNGIPL.mjs → chunk-VYLWKTDQ.mjs} +3 -3
- package/dist/cli/{chunk-MWRPRDHW.js → chunk-W3OAT72T.js} +6 -6
- package/dist/cli/{chunk-JANCYPKP.mjs → chunk-X3ZRKA3V.mjs} +1 -1
- package/dist/cli/{chunk-7JW4WIWU.js → chunk-XBVZ35XJ.js} +81 -81
- package/dist/cli/{chunk-GLXYOSEL.js → chunk-XI6AZJPO.js} +3 -3
- package/dist/cli/{chunk-BD5A242C.mjs → chunk-ZLL345RP.mjs} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-QSAAPCYE.js → csv-NIKB3RQX.js} +12 -12
- package/dist/cli/{csv-27M4PREP.mjs → csv-VOX5XXBB.mjs} +3 -3
- package/dist/cli/{db-H73PJID6.mjs → db-GETE5AIV.mjs} +4 -4
- package/dist/cli/{db-LYPTNAPX.js → db-ZH2NUZ3F.js} +25 -25
- package/dist/cli/{describe-KYLGQSMO.js → describe-JZ6QOTPY.js} +17 -17
- package/dist/cli/{describe-Y5BHLZLH.mjs → describe-LWGEU6IE.mjs} +13 -13
- package/dist/cli/describe-core.d.mts +1 -1
- package/dist/cli/describe-core.d.ts +1 -1
- package/dist/cli/{executions-DHGYCPFO.js → executions-CEVMJ4QY.js} +6 -6
- package/dist/cli/{executions-ZGQEWS2X.mjs → executions-DUMCTK4E.mjs} +4 -4
- package/dist/cli/{feedback-EBXU4ANA.mjs → feedback-UEYC3V3O.mjs} +3 -3
- package/dist/cli/{feedback-3YQPYCMT.js → feedback-VI4N44TJ.js} +7 -7
- package/dist/cli/{git-CFPU33DJ.mjs → git-BOMW65V5.mjs} +4 -4
- package/dist/cli/git-QISWQQM3.js +24 -0
- package/dist/cli/index.js +136 -136
- package/dist/cli/index.mjs +38 -38
- package/dist/cli/{legacy-noops-TFGIWA5C.mjs → legacy-noops-33X26VLN.mjs} +4 -4
- package/dist/cli/{legacy-noops-CDKZ7RYT.js → legacy-noops-SWPSUKTD.js} +7 -7
- package/dist/cli/{monitors-6ED5RJYG.mjs → monitors-465GCZ73.mjs} +5 -5
- package/dist/cli/{monitors-PCMAB7NP.js → monitors-6HMDLDKU.js} +89 -89
- package/dist/cli/{org-V4QYXLOL.mjs → org-CAAOHGTM.mjs} +4 -4
- package/dist/cli/{org-KAARC2XN.js → org-JFQ4QBHQ.js} +66 -66
- package/dist/cli/{play-OTTJ6S2G.mjs → play-NJP6HIQD.mjs} +11 -11
- package/dist/cli/{play-PPWCRYME.js → play-UKD4KR4K.js} +284 -284
- package/dist/cli/{providers-ULL5EJHY.mjs → providers-UVHTTSKV.mjs} +4 -46
- package/dist/cli/{providers-ICY74FM5.js → providers-YTRBZARB.js} +8 -50
- package/dist/cli/{quickstart-YOUCGJQP.js → quickstart-3GXVHJRL.js} +5 -5
- package/dist/cli/{quickstart-QLVS53TD.mjs → quickstart-CB3TQ5L2.mjs} +3 -3
- package/dist/cli/{search-AGYQR6YQ.mjs → search-NXA6526R.mjs} +5 -5
- package/dist/cli/search-YM4ATHTV.js +30 -0
- package/dist/cli/{secrets-OA3HHNHP.js → secrets-E3Y6YDKR.js} +13 -13
- package/dist/cli/{secrets-PJFO3RZW.mjs → secrets-JFJK2X2N.mjs} +4 -4
- package/dist/cli/{sessions-WNRZQEBL.mjs → sessions-HAZJLQQL.mjs} +4 -4
- package/dist/cli/{sessions-OYTROOOG.js → sessions-NKLP6TVY.js} +5 -5
- package/dist/cli/{settings-JIYDWBPM.mjs → settings-BSD4DW4O.mjs} +10 -10
- package/dist/cli/{settings-RXGOZAZI.js → settings-D4LEZOEW.js} +77 -77
- package/dist/cli/{setup-VXNSUQYT.js → setup-KMZ4EFDK.js} +43 -43
- package/dist/cli/{setup-YAYE7KQM.mjs → setup-QO64H6YO.mjs} +8 -8
- package/dist/cli/skills-T5VTI2LZ.js +30 -0
- package/dist/cli/{skills-XYDBLLRK.mjs → skills-YLAH2YNN.mjs} +6 -6
- package/dist/cli/{tools-TRDYMDPL.mjs → tools-KGQ76YQE.mjs} +13 -13
- package/dist/cli/tools-M574OF4H.js +45 -0
- package/dist/cli/{update-KH36JGLK.mjs → update-JXUSVBH7.mjs} +8 -8
- package/dist/cli/update-WNG5DNNO.js +32 -0
- package/dist/cli/{workflow-EYWCMD4D.mjs → workflow-NYWZWN5Z.mjs} +5 -5
- package/dist/cli/{workflow-CQZBGIQ2.js → workflow-YTXY76FN.js} +15 -15
- package/dist/{client-BX2EVlPo.d.mts → client-BbU5_j7n.d.mts} +0 -14
- package/dist/{client-CRz2laoR.d.ts → client-CYqG23K1.d.ts} +0 -14
- 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 +84 -84
- 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-O3XJDECG.js +0 -40
- package/dist/cli/git-4ACVGA4W.js +0 -24
- package/dist/cli/search-XNU6FOOH.js +0 -30
- package/dist/cli/skills-5UCGZVCN.js +0 -30
- package/dist/cli/tools-UMSFNX5B.js +0 -45
- package/dist/cli/update-K5AOROYI.js +0 -32
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkXI6AZJPOjs = require('./chunk-XI6AZJPO.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -17,13 +17,13 @@ var _chunkGLXYOSELjs = require('./chunk-GLXYOSEL.js');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkDHERSOIGjs = require('./chunk-DHERSOIG.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkAJQUFGTJjs = require('./chunk-AJQUFGTJ.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, _chunkDHERSOIGjs.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: _chunkDHERSOIGjs.SDK_VERSION,
|
|
70
|
+
apiContract: _chunkDHERSOIGjs.SDK_API_CONTRACT,
|
|
71
|
+
apiMajor: _chunkDHERSOIGjs.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: _chunkDHERSOIGjs.SDK_VERSION,
|
|
80
|
+
apiContract: _chunkDHERSOIGjs.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, _chunkDHERSOIGjs.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", _chunkDHERSOIGjs.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(_chunkAJQUFGTJjs.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
|
+
..._chunkDHERSOIGjs.deploymentProtectionHeaders.call(void 0, ),
|
|
210
|
+
"User-Agent": `deepline-ts-sdk/${_chunkDHERSOIGjs.SDK_VERSION}`,
|
|
211
|
+
"X-Deepline-SDK-Version": _chunkDHERSOIGjs.SDK_VERSION,
|
|
212
|
+
"X-Deepline-API-Major": String(_chunkDHERSOIGjs.SDK_API_MAJOR),
|
|
213
|
+
"X-Deepline-API-Contract": _chunkDHERSOIGjs.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 ${_chunkDHERSOIGjs.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, () => ( _chunkDHERSOIGjs.DEFAULT_SKILL_AGENTS));
|
|
378
378
|
const values = {
|
|
379
379
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
380
380
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -593,7 +593,7 @@ function buildEnvironmentContext() {
|
|
|
593
593
|
node_version: process.version,
|
|
594
594
|
runtime: "Node.js",
|
|
595
595
|
hostname: _os.hostname.call(void 0, ),
|
|
596
|
-
agent_runtime:
|
|
596
|
+
agent_runtime: _chunkDHERSOIGjs.detectAgentRuntime.call(void 0, )
|
|
597
597
|
};
|
|
598
598
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
599
599
|
const normalized = _optionalChain([process, 'access', _42 => _42.env, 'access', _43 => _43[key], 'optionalAccess', _44 => _44.trim, 'call', _45 => _45()]);
|
|
@@ -615,15 +615,15 @@ function buildEnvironmentContext() {
|
|
|
615
615
|
}
|
|
616
616
|
function failureReportHeaders(apiKey) {
|
|
617
617
|
return {
|
|
618
|
-
...
|
|
618
|
+
..._chunkDHERSOIGjs.deploymentProtectionHeaders.call(void 0, ),
|
|
619
619
|
Authorization: `Bearer ${apiKey}`,
|
|
620
620
|
"Content-Type": "application/json",
|
|
621
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
621
|
+
"User-Agent": `deepline-ts-sdk/${_chunkDHERSOIGjs.SDK_VERSION}`,
|
|
622
622
|
"X-Deepline-Client-Family": "sdk",
|
|
623
623
|
"X-Deepline-CLI-Family": "sdk",
|
|
624
|
-
"X-Deepline-Agent-Runtime":
|
|
625
|
-
"X-Deepline-CLI-Version":
|
|
626
|
-
"X-Deepline-SDK-Version":
|
|
624
|
+
"X-Deepline-Agent-Runtime": _chunkDHERSOIGjs.detectAgentRuntime.call(void 0, ),
|
|
625
|
+
"X-Deepline-CLI-Version": _chunkDHERSOIGjs.SDK_VERSION,
|
|
626
|
+
"X-Deepline-SDK-Version": _chunkDHERSOIGjs.SDK_VERSION
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
629
|
async function postFailureReport(input) {
|
|
@@ -651,7 +651,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
651
651
|
if (isFailureReportingDisabled()) return false;
|
|
652
652
|
let apiKey = "";
|
|
653
653
|
try {
|
|
654
|
-
apiKey =
|
|
654
|
+
apiKey = _chunkDHERSOIGjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
655
655
|
} catch (e9) {
|
|
656
656
|
return false;
|
|
657
657
|
}
|
|
@@ -678,7 +678,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
678
678
|
failure_code: failureCode2,
|
|
679
679
|
failure_stage: failureStage,
|
|
680
680
|
error_body: "Automatic Deepline skills installation failed.",
|
|
681
|
-
cli_version:
|
|
681
|
+
cli_version: _chunkDHERSOIGjs.SDK_VERSION,
|
|
682
682
|
context: {
|
|
683
683
|
environment: buildEnvironmentContext(),
|
|
684
684
|
skills_sync: {
|
|
@@ -798,7 +798,7 @@ function buildFailureReport(input) {
|
|
|
798
798
|
failure_kind: failureKind,
|
|
799
799
|
failure_code: code,
|
|
800
800
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
801
|
-
cli_version:
|
|
801
|
+
cli_version: _chunkDHERSOIGjs.SDK_VERSION,
|
|
802
802
|
context: {
|
|
803
803
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
804
804
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -818,8 +818,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
818
818
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
819
819
|
const exitCode = resolvedExitCode(input);
|
|
820
820
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
821
|
-
const baseUrl =
|
|
822
|
-
const apiKey =
|
|
821
|
+
const baseUrl = _chunkDHERSOIGjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
822
|
+
const apiKey = _chunkDHERSOIGjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
823
823
|
if (!apiKey) return false;
|
|
824
824
|
return postFailureReport({
|
|
825
825
|
baseUrl,
|
|
@@ -856,25 +856,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
856
856
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
857
857
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
858
858
|
function shouldSkipSkillsSync() {
|
|
859
|
-
if (
|
|
859
|
+
if (_chunkDHERSOIGjs.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
860
860
|
return true;
|
|
861
861
|
}
|
|
862
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()]);
|
|
863
863
|
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
864
864
|
}
|
|
865
865
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
866
|
-
return _path.join.call(void 0,
|
|
866
|
+
return _path.join.call(void 0, _chunkDHERSOIGjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
867
867
|
}
|
|
868
868
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
869
869
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
870
|
-
var agentLeaseSegment =
|
|
870
|
+
var agentLeaseSegment = _chunkDHERSOIGjs.skillsAgentPathSegment;
|
|
871
871
|
function sortedLeaseAgents(agents) {
|
|
872
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
872
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkDHERSOIGjs.KNOWN_SKILL_AGENTS] : agents;
|
|
873
873
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
874
874
|
}
|
|
875
875
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
876
876
|
return _path.join.call(void 0,
|
|
877
|
-
|
|
877
|
+
_chunkDHERSOIGjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
878
878
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
879
879
|
);
|
|
880
880
|
}
|
|
@@ -1033,7 +1033,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
1033
1033
|
constructor(baseUrl, error) {
|
|
1034
1034
|
const detail = error instanceof Error ? error.message : String(error);
|
|
1035
1035
|
super(
|
|
1036
|
-
`Could not save skills state in ${
|
|
1036
|
+
`Could not save skills state in ${_chunkDHERSOIGjs.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
1037
1037
|
);
|
|
1038
1038
|
this.name = "SkillsStateUnavailableError";
|
|
1039
1039
|
}
|
|
@@ -1118,7 +1118,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
1120
1120
|
return _path.join.call(void 0,
|
|
1121
|
-
|
|
1121
|
+
_chunkDHERSOIGjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1122
1122
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
1123
1123
|
);
|
|
1124
1124
|
}
|
|
@@ -1152,8 +1152,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
1152
1152
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
1153
1153
|
}
|
|
1154
1154
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
1155
|
-
if (shouldSkipSkillsSync() ||
|
|
1156
|
-
const agents =
|
|
1155
|
+
if (shouldSkipSkillsSync() || _chunkDHERSOIGjs.hasActivePluginSkills.call(void 0, )) return;
|
|
1156
|
+
const agents = _chunkDHERSOIGjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1157
1157
|
if (agents.length === 0) return;
|
|
1158
1158
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1159
1159
|
}
|
|
@@ -1169,7 +1169,7 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
|
1169
1169
|
}
|
|
1170
1170
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
1171
1171
|
return _path.join.call(void 0,
|
|
1172
|
-
|
|
1172
|
+
_chunkDHERSOIGjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1173
1173
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
1174
1174
|
);
|
|
1175
1175
|
}
|
|
@@ -1198,7 +1198,7 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
1198
1198
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
1199
1199
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
1200
1200
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
1201
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess', _75 => _75.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames,
|
|
1201
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _75 => _75.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkDHERSOIGjs.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
1202
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.`;
|
|
1203
1203
|
notice(
|
|
1204
1204
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
@@ -1286,7 +1286,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
1286
1286
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
1287
1287
|
}
|
|
1288
1288
|
function isDefaultAgentSet(agents) {
|
|
1289
|
-
return agents.length ===
|
|
1289
|
+
return agents.length === _chunkDHERSOIGjs.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkDHERSOIGjs.DEFAULT_SKILL_AGENTS[index]);
|
|
1290
1290
|
}
|
|
1291
1291
|
function safeSkillFilePath(value) {
|
|
1292
1292
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1443,10 +1443,10 @@ async function fetchSkillsUpdate(baseUrl, localVersion) {
|
|
|
1443
1443
|
method: "POST",
|
|
1444
1444
|
headers: { "Content-Type": "application/json" },
|
|
1445
1445
|
body: JSON.stringify({
|
|
1446
|
-
sdk_cli: { version:
|
|
1446
|
+
sdk_cli: { version: _chunkDHERSOIGjs.SDK_VERSION },
|
|
1447
1447
|
skills: {
|
|
1448
1448
|
version: localVersion,
|
|
1449
|
-
capability:
|
|
1449
|
+
capability: _chunkAJQUFGTJjs.SDK_RELEASE.packageCapabilities.skillsGuidance
|
|
1450
1450
|
}
|
|
1451
1451
|
}),
|
|
1452
1452
|
signal: controller.signal
|
|
@@ -1485,7 +1485,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1485
1485
|
}
|
|
1486
1486
|
function noInstallerProbePath(baseUrl) {
|
|
1487
1487
|
return _path.join.call(void 0,
|
|
1488
|
-
|
|
1488
|
+
_chunkDHERSOIGjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1489
1489
|
"skills-sync-no-installer-unknown.json"
|
|
1490
1490
|
);
|
|
1491
1491
|
}
|
|
@@ -1564,7 +1564,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1564
1564
|
function resolveSkillsInstallSpawn(install, platform2 = process.platform) {
|
|
1565
1565
|
return resolveShellSpawn(install.command, install.args, platform2);
|
|
1566
1566
|
}
|
|
1567
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1567
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkDHERSOIGjs.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1568
1568
|
const commands = [];
|
|
1569
1569
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1570
1570
|
if (probes.bunx === "available") {
|
|
@@ -1706,7 +1706,7 @@ function runLegacySkillsCleanup(agents) {
|
|
|
1706
1706
|
}
|
|
1707
1707
|
}
|
|
1708
1708
|
function writeSdkSkillsStatusLine(line) {
|
|
1709
|
-
const progress =
|
|
1709
|
+
const progress = _chunkXI6AZJPOjs.getActiveCliProgress.call(void 0, );
|
|
1710
1710
|
if (progress) {
|
|
1711
1711
|
progress.writeLine(line);
|
|
1712
1712
|
return;
|
|
@@ -1716,11 +1716,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1716
1716
|
}
|
|
1717
1717
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1718
1718
|
if (shouldSkipSkillsSync()) return;
|
|
1719
|
-
const usingPluginSkills =
|
|
1719
|
+
const usingPluginSkills = _chunkDHERSOIGjs.hasActivePluginSkills.call(void 0, );
|
|
1720
1720
|
if (usingPluginSkills) {
|
|
1721
1721
|
return;
|
|
1722
1722
|
}
|
|
1723
|
-
const agents =
|
|
1723
|
+
const agents = _chunkDHERSOIGjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1724
1724
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1725
1725
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1726
1726
|
}
|
|
@@ -1748,7 +1748,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1748
1748
|
return;
|
|
1749
1749
|
}
|
|
1750
1750
|
try {
|
|
1751
|
-
const localVersion =
|
|
1751
|
+
const localVersion = _chunkDHERSOIGjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1752
1752
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1753
1753
|
needsUpdate: options.update.needs_update,
|
|
1754
1754
|
remoteVersion: options.update.remote.version
|
|
@@ -1914,7 +1914,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1914
1914
|
}
|
|
1915
1915
|
}
|
|
1916
1916
|
runLegacySkillsCleanup(agents);
|
|
1917
|
-
if (!
|
|
1917
|
+
if (!_chunkDHERSOIGjs.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
1918
1918
|
notice(
|
|
1919
1919
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
1920
1920
|
);
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
} from "./chunk-LJ5747UC.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DeeplineClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EMIR3EXE.mjs";
|
|
7
7
|
import {
|
|
8
8
|
printCommandEnvelope,
|
|
9
9
|
renderCommandEnvelopeText
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7MZQ64FI.mjs";
|
|
11
11
|
import {
|
|
12
12
|
resolveConfig,
|
|
13
13
|
sdkCliStateDirPath
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-U5O5TZC2.mjs";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__toESM
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
printCommandEnvelope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7MZQ64FI.mjs";
|
|
5
5
|
import {
|
|
6
6
|
agentSessionIdFromEnvironment
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-U5O5TZC2.mjs";
|
|
8
8
|
|
|
9
9
|
// src/cli/commands/sessions.ts
|
|
10
10
|
import {
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkLJDJ5GPRjs = require('./chunk-LJDJ5GPR.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunk2A63IJ2Jjs = require('./chunk-2A63IJ2J.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ var _chunkKKPKLLNBjs = require('./chunk-KKPKLLNB.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkDHERSOIGjs = require('./chunk-DHERSOIG.js');
|
|
26
26
|
|
|
27
27
|
// src/cli/commands/skills.ts
|
|
28
28
|
var _child_process = require('child_process');
|
|
@@ -75,7 +75,7 @@ function inferActiveSkillsScope(entrypoint = _nullishCoalesce(process.argv[1], (
|
|
|
75
75
|
return /[\\/]\.deepline[\\/]runtime[\\/]/.test(entrypoint) ? "local" : "global";
|
|
76
76
|
}
|
|
77
77
|
function resolveLocalRoot() {
|
|
78
|
-
const target =
|
|
78
|
+
const target = _chunkDHERSOIGjs.resolveProjectPinTarget.call(void 0, );
|
|
79
79
|
if (!target.ok) {
|
|
80
80
|
throw new Error(
|
|
81
81
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -86,7 +86,7 @@ function resolveLocalRoot() {
|
|
|
86
86
|
return target.dir;
|
|
87
87
|
}
|
|
88
88
|
function detectSkillsAgents(input) {
|
|
89
|
-
const runtime = _nullishCoalesce(input.runtime, () => (
|
|
89
|
+
const runtime = _nullishCoalesce(input.runtime, () => ( _chunkDHERSOIGjs.detectAgentRuntime.call(void 0, )));
|
|
90
90
|
const knownAgent = RUNTIME_TO_SKILLS_AGENT[runtime];
|
|
91
91
|
if (knownAgent) return [knownAgent];
|
|
92
92
|
const roots = [
|
|
@@ -101,11 +101,11 @@ function detectSkillsAgents(input) {
|
|
|
101
101
|
return detected.length > 0 ? detected : ["*"];
|
|
102
102
|
}
|
|
103
103
|
function skillsStatePathForScope(baseUrl, scope, root) {
|
|
104
|
-
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0,
|
|
104
|
+
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0, _chunkDHERSOIGjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-install.json");
|
|
105
105
|
}
|
|
106
106
|
function buildSkillsPlan(input) {
|
|
107
107
|
const scopeArgs = input.scope === "global" ? ["--global"] : [];
|
|
108
|
-
const legacyNames = [...
|
|
108
|
+
const legacyNames = [..._chunkLJDJ5GPRjs.LEGACY_SKILL_NAMES_TO_REMOVE].sort(
|
|
109
109
|
(a, b) => a.localeCompare(b)
|
|
110
110
|
);
|
|
111
111
|
return {
|
|
@@ -119,7 +119,7 @@ function buildSkillsPlan(input) {
|
|
|
119
119
|
args: [
|
|
120
120
|
"exec",
|
|
121
121
|
"--yes",
|
|
122
|
-
`--package=${
|
|
122
|
+
`--package=${_chunkLJDJ5GPRjs.SKILLS_NPX_PACKAGE}`,
|
|
123
123
|
"--",
|
|
124
124
|
"skills",
|
|
125
125
|
"remove",
|
|
@@ -135,11 +135,11 @@ function buildSkillsPlan(input) {
|
|
|
135
135
|
args: [
|
|
136
136
|
"exec",
|
|
137
137
|
"--yes",
|
|
138
|
-
`--package=${
|
|
138
|
+
`--package=${_chunkLJDJ5GPRjs.SKILLS_NPX_PACKAGE}`,
|
|
139
139
|
"--",
|
|
140
140
|
"skills",
|
|
141
141
|
"add",
|
|
142
|
-
|
|
142
|
+
_chunkLJDJ5GPRjs.skillsSourceUrl.call(void 0, input.baseUrl),
|
|
143
143
|
"--agent",
|
|
144
144
|
...input.agents,
|
|
145
145
|
...scopeArgs,
|
|
@@ -176,7 +176,7 @@ function readSkillsInstallState(path) {
|
|
|
176
176
|
}
|
|
177
177
|
function runProcess(command, args, cwd) {
|
|
178
178
|
return new Promise((resolve, reject) => {
|
|
179
|
-
const plan =
|
|
179
|
+
const plan = _chunkLJDJ5GPRjs.resolveShellSpawn.call(void 0,
|
|
180
180
|
command,
|
|
181
181
|
args,
|
|
182
182
|
process.platform,
|
|
@@ -198,7 +198,7 @@ function runProcess(command, args, cwd) {
|
|
|
198
198
|
child.kill("SIGTERM");
|
|
199
199
|
reject(
|
|
200
200
|
new Error(
|
|
201
|
-
`${
|
|
201
|
+
`${_chunkLJDJ5GPRjs.SKILLS_NPX_PACKAGE} timed out after ${SKILLS_PROCESS_TIMEOUT_MS}ms.`
|
|
202
202
|
)
|
|
203
203
|
);
|
|
204
204
|
}, SKILLS_PROCESS_TIMEOUT_MS);
|
|
@@ -209,7 +209,7 @@ function runProcess(command, args, cwd) {
|
|
|
209
209
|
child.once("close", (code) => {
|
|
210
210
|
clearTimeout(timeout);
|
|
211
211
|
if (code && stderr.trim()) {
|
|
212
|
-
process.stderr.write(`${
|
|
212
|
+
process.stderr.write(`${_chunkLJDJ5GPRjs.SKILLS_NPX_PACKAGE} exited ${code}.
|
|
213
213
|
`);
|
|
214
214
|
}
|
|
215
215
|
resolve(_nullishCoalesce(code, () => ( 1)));
|
|
@@ -223,7 +223,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
223
223
|
scope = normalizeScope(options.scope);
|
|
224
224
|
root = scope === "local" ? resolveLocalRoot() : null;
|
|
225
225
|
} catch (error) {
|
|
226
|
-
|
|
226
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
227
227
|
{
|
|
228
228
|
ok: false,
|
|
229
229
|
status: "failed",
|
|
@@ -235,22 +235,22 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
235
235
|
);
|
|
236
236
|
return 2;
|
|
237
237
|
}
|
|
238
|
-
const baseUrl =
|
|
238
|
+
const baseUrl = _chunkDHERSOIGjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
239
239
|
const catalog = {
|
|
240
|
-
skillNames: [...
|
|
241
|
-
version:
|
|
240
|
+
skillNames: [..._chunkLJDJ5GPRjs.DEFAULT_SDK_SKILL_NAMES],
|
|
241
|
+
version: _chunkDHERSOIGjs.SDK_VERSION
|
|
242
242
|
};
|
|
243
243
|
const agents = options.agent ? [options.agent] : detectSkillsAgents({ scope, root });
|
|
244
244
|
const plan = buildSkillsPlan({ baseUrl, scope, root, agents, ...catalog });
|
|
245
245
|
if (options.dryRun) {
|
|
246
|
-
|
|
246
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
247
247
|
{ ok: true, status: "planned", dryRun: true, ...plan },
|
|
248
248
|
{ json: options.json }
|
|
249
249
|
);
|
|
250
250
|
return 0;
|
|
251
251
|
}
|
|
252
|
-
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !
|
|
253
|
-
|
|
252
|
+
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !_chunkLJDJ5GPRjs.hasFailedAutomaticSkillsSync.call(void 0, baseUrl, agents)) {
|
|
253
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
254
254
|
{
|
|
255
255
|
ok: true,
|
|
256
256
|
status: "current",
|
|
@@ -282,10 +282,10 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
282
282
|
}
|
|
283
283
|
if (scope === "local" && root) {
|
|
284
284
|
const managedNames = [
|
|
285
|
-
.../* @__PURE__ */ new Set([...plan.skillNames, ...
|
|
285
|
+
.../* @__PURE__ */ new Set([...plan.skillNames, ..._chunkLJDJ5GPRjs.LEGACY_SKILL_NAMES_TO_REMOVE])
|
|
286
286
|
];
|
|
287
287
|
const agentRoots = workspaceSkillRootsForAgents(plan.agents);
|
|
288
|
-
|
|
288
|
+
_chunkDHERSOIGjs.ensureProjectPrivatePathsIgnored.call(void 0, root, [
|
|
289
289
|
".deepline/",
|
|
290
290
|
...agentRoots.flatMap(
|
|
291
291
|
(agentRoot) => managedNames.map((name) => `${agentRoot}/skills/${name}/`)
|
|
@@ -294,7 +294,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
294
294
|
}
|
|
295
295
|
let lease;
|
|
296
296
|
try {
|
|
297
|
-
lease = scope === "global" ? await
|
|
297
|
+
lease = scope === "global" ? await _chunkLJDJ5GPRjs.acquireSkillsInstallLease.call(void 0, baseUrl, agents, plan.version, {
|
|
298
298
|
waitMs: _nullishCoalesce(dependencies.installLeaseWaitMs, () => ( SKILLS_INSTALL_LEASE_WAIT_MS)),
|
|
299
299
|
onWait: () => process.stderr.write(
|
|
300
300
|
"Waiting for a background Deepline skills refresh to finish...\n"
|
|
@@ -302,8 +302,8 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
302
302
|
}) : { release: () => {
|
|
303
303
|
} };
|
|
304
304
|
} catch (error) {
|
|
305
|
-
if (!(error instanceof
|
|
306
|
-
|
|
305
|
+
if (!(error instanceof _chunkLJDJ5GPRjs.SkillsStateUnavailableError)) throw error;
|
|
306
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
307
307
|
{
|
|
308
308
|
ok: false,
|
|
309
309
|
status: "failed",
|
|
@@ -319,7 +319,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
319
319
|
return 5;
|
|
320
320
|
}
|
|
321
321
|
if (!lease) {
|
|
322
|
-
|
|
322
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
323
323
|
{
|
|
324
324
|
ok: false,
|
|
325
325
|
status: "failed",
|
|
@@ -328,7 +328,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
328
328
|
scope,
|
|
329
329
|
agents,
|
|
330
330
|
message: "A background Deepline skills refresh is still running for these agents.",
|
|
331
|
-
next: `Retry in a moment: deepline skills --scope ${scope}. If no refresh is running, remove ${
|
|
331
|
+
next: `Retry in a moment: deepline skills --scope ${scope}. If no refresh is running, remove ${_chunkLJDJ5GPRjs.skillsInstallLeasePath.call(void 0, baseUrl, agents)}`
|
|
332
332
|
},
|
|
333
333
|
{ json: options.json }
|
|
334
334
|
);
|
|
@@ -365,7 +365,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
365
365
|
throw new Error("Could not install the current Deepline skills.");
|
|
366
366
|
}
|
|
367
367
|
} catch (error) {
|
|
368
|
-
|
|
368
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
369
369
|
{
|
|
370
370
|
ok: false,
|
|
371
371
|
status: "failed",
|
|
@@ -404,7 +404,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
404
404
|
{
|
|
405
405
|
schemaVersion: 1,
|
|
406
406
|
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
407
|
-
cliVersion:
|
|
407
|
+
cliVersion: _chunkDHERSOIGjs.SDK_VERSION,
|
|
408
408
|
scope,
|
|
409
409
|
agents,
|
|
410
410
|
skillsVersion: plan.version,
|
|
@@ -417,9 +417,9 @@ async function runSkillsInstallWithLease(input) {
|
|
|
417
417
|
"utf8"
|
|
418
418
|
);
|
|
419
419
|
if (scope === "global") {
|
|
420
|
-
|
|
420
|
+
_chunkLJDJ5GPRjs.clearFailedAutomaticSkillsSync.call(void 0, baseUrl, agents);
|
|
421
421
|
}
|
|
422
|
-
|
|
422
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
423
423
|
{
|
|
424
424
|
ok: true,
|
|
425
425
|
status: "complete",
|
|
@@ -450,7 +450,7 @@ function registerSkillsCommand(program) {
|
|
|
450
450
|
"after",
|
|
451
451
|
`
|
|
452
452
|
Notes:
|
|
453
|
-
This command reinstalls current Deepline-managed skills using ${
|
|
453
|
+
This command reinstalls current Deepline-managed skills using ${_chunkLJDJ5GPRjs.SKILLS_NPX_PACKAGE},
|
|
454
454
|
then removes legacy Deepline skill names. Local scope writes into the resolved
|
|
455
455
|
persistent project.
|
|
456
456
|
|
|
@@ -462,13 +462,13 @@ Examples:
|
|
|
462
462
|
).action(async (options) => {
|
|
463
463
|
process.exitCode = await runSkillsCommand(options);
|
|
464
464
|
});
|
|
465
|
-
program.command(
|
|
465
|
+
program.command(_chunkLJDJ5GPRjs.SKILLS_AUTO_SYNC_COMMAND, { hidden: true }).description("Refresh Deepline agent skills in the background.").option(
|
|
466
466
|
"--claim <token>",
|
|
467
467
|
"Owner token of the leases this child was started for."
|
|
468
468
|
).action(async (options) => {
|
|
469
469
|
const claim = _optionalChain([options, 'access', _ => _.claim, 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]);
|
|
470
470
|
if (!claim) {
|
|
471
|
-
|
|
471
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
472
472
|
{
|
|
473
473
|
ok: false,
|
|
474
474
|
status: "failed",
|
|
@@ -481,7 +481,7 @@ Examples:
|
|
|
481
481
|
process.exitCode = 2;
|
|
482
482
|
return;
|
|
483
483
|
}
|
|
484
|
-
await
|
|
484
|
+
await _chunkLJDJ5GPRjs.syncSdkSkillsIfNeeded.call(void 0, _chunkDHERSOIGjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, ""), {
|
|
485
485
|
mode: "inline",
|
|
486
486
|
notices: "defer",
|
|
487
487
|
claim
|
|
@@ -40,27 +40,6 @@ Conventions (apply to every tool):
|
|
|
40
40
|
]]
|
|
41
41
|
`;
|
|
42
42
|
var COMMAND_DOCS = {
|
|
43
|
-
"providers connect": {
|
|
44
|
-
core: `Purpose: Start OAuth authorization for an integration.
|
|
45
|
-
Input: Pass its provider ID,
|
|
46
|
-
for example: deepline providers connect apollo. The response contains ok and
|
|
47
|
-
redirect_url. Open redirect_url in a browser signed into the intended Deepline
|
|
48
|
-
workspace, then sign into the provider and approve access. Returning a URL does
|
|
49
|
-
not mean authorization is complete. --scopes accepts a quoted space-separated
|
|
50
|
-
list; omit it for the provider's default permissions. This stores an account
|
|
51
|
-
connection after approval and does not execute provider tools.
|
|
52
|
-
Cost: Does not spend Deepline credits.`
|
|
53
|
-
},
|
|
54
|
-
"providers test": {
|
|
55
|
-
core: `Purpose: Verify a connected OAuth integration, for example:
|
|
56
|
-
deepline providers test apollo --json. Input: Pass a provider ID with an OAuth test
|
|
57
|
-
endpoint. The result includes provider, status, hasAccessToken, hasRefreshToken,
|
|
58
|
-
expiresAt and apiCheck; tokens are never returned. Expired credentials refresh
|
|
59
|
-
through the normal lifecycle before a read-only provider probe. This does not
|
|
60
|
-
prove every tool's permissions. Run tools describe and a bounded read tool to
|
|
61
|
-
verify data access. Provider errors fail the command.
|
|
62
|
-
Cost: The connection probe does not spend Deepline credits.`
|
|
63
|
-
},
|
|
64
43
|
"": {
|
|
65
44
|
core: `
|
|
66
45
|
[[cli:
|