deepline 0.3.493 → 0.3.494
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/release.ts +2 -2
- package/dist/bundling-sources/sdk/src/types.ts +5 -4
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +15 -0
- package/dist/bundling-sources/shared_libs/plays/field-catalog.ts +101 -3
- package/dist/cli/{auth-3NAY3AST.mjs → auth-6X5YXMFN.mjs} +5 -5
- package/dist/cli/auth-RWLCLMDY.js +43 -0
- package/dist/cli/{billing-FSB4BBBO.js → billing-5F5PZB77.js} +79 -79
- package/dist/cli/{billing-SBWQCC7B.mjs → billing-IN74SDSC.mjs} +6 -6
- package/dist/cli/{chunk-3RGWTKK3.mjs → chunk-2GEYN3H4.mjs} +89 -3
- package/dist/cli/{chunk-MLEUOTEQ.js → chunk-3KVFOKPR.js} +53 -53
- package/dist/cli/{chunk-IOBPR2VO.js → chunk-4A5WXQJK.js} +16 -16
- package/dist/cli/{chunk-NALJJTPS.mjs → chunk-4RWH4LRQ.mjs} +5 -5
- package/dist/cli/{chunk-UCMY2SO2.js → chunk-4ZKZS43N.js} +3 -3
- package/dist/cli/{chunk-IJOHWGPF.js → chunk-5WYH2LAP.js} +6 -6
- package/dist/cli/{chunk-2BRTYIAH.mjs → chunk-65NMOP4T.mjs} +3 -3
- package/dist/cli/{chunk-VFHIYWMC.mjs → chunk-6DMLWM7L.mjs} +2 -2
- package/dist/cli/{chunk-3QGUWB6E.mjs → chunk-6XZR2642.mjs} +8 -7
- package/dist/cli/{chunk-XQX476QK.js → chunk-7B7A36XZ.js} +9 -9
- package/dist/cli/{chunk-DWJ4RXSA.js → chunk-AARXOBVD.js} +1 -0
- package/dist/cli/{chunk-ZVW7EWTC.mjs → chunk-BLHQRETG.mjs} +184 -184
- package/dist/cli/{chunk-NPZBE64X.js → chunk-BLMB4N63.js} +89 -3
- package/dist/cli/{chunk-LGTZYI5B.js → chunk-BNI653WN.js} +21 -21
- package/dist/cli/{chunk-2H4OFVR5.js → chunk-BU5Y7HOD.js} +5 -5
- package/dist/cli/{chunk-KGDDQMI7.mjs → chunk-C5R3UH5V.mjs} +28 -1
- package/dist/cli/{chunk-NPNAEPY4.js → chunk-CAWOSHEC.js} +26 -26
- package/dist/cli/{chunk-HTUSTPP4.js → chunk-CK5MA6S6.js} +7 -7
- package/dist/cli/{chunk-EBAS3UT2.mjs → chunk-DKKAJ3U2.mjs} +5 -5
- package/dist/cli/{chunk-4IJFQV3O.mjs → chunk-EG3OSUBO.mjs} +1 -1
- package/dist/cli/{chunk-TNQOR6XQ.mjs → chunk-FAT6CUZK.mjs} +1 -1
- package/dist/cli/{chunk-TIFRRLZT.js → chunk-GBICEYUA.js} +6 -6
- package/dist/cli/{chunk-XLE7KXE7.js → chunk-GDNQXLBM.js} +2 -2
- package/dist/cli/{chunk-AWMCZAUR.js → chunk-GLDBMKTV.js} +3 -3
- package/dist/cli/{chunk-GSC35TPZ.mjs → chunk-GNSGDIA4.mjs} +2 -2
- package/dist/cli/{chunk-7HABWOMB.js → chunk-GSCCDGGT.js} +259 -259
- package/dist/cli/{chunk-IRDYBMA7.mjs → chunk-H46X7YDU.mjs} +1 -0
- package/dist/cli/{chunk-NWIDPT7H.js → chunk-HINVMRGQ.js} +4 -4
- package/dist/cli/{chunk-C2MRDPA5.js → chunk-I42EOZKQ.js} +32 -5
- package/dist/cli/{chunk-HLM2UFQ5.mjs → chunk-IPWYDANJ.mjs} +1 -1
- package/dist/cli/{chunk-5DIZ2G74.mjs → chunk-IZJSX3SZ.mjs} +2 -2
- package/dist/cli/{chunk-WTFI7BVH.mjs → chunk-J2HOVZOE.mjs} +1 -1
- package/dist/cli/{chunk-IOMEJKGK.js → chunk-J3UHNUWI.js} +2 -2
- package/dist/cli/{chunk-4NIGNT7X.mjs → chunk-KR2XEI5T.mjs} +1 -1
- package/dist/cli/{chunk-5WOPBX3H.mjs → chunk-KSHAFYYG.mjs} +1 -1
- package/dist/cli/{chunk-DYP27IWC.mjs → chunk-KVCQL6SP.mjs} +4 -4
- package/dist/cli/{chunk-SXD2EYAH.mjs → chunk-L2P2XRPO.mjs} +37 -5
- package/dist/cli/{chunk-67ZG7XZV.mjs → chunk-L4QPBQUX.mjs} +2 -2
- package/dist/cli/{chunk-QTPS5RLG.js → chunk-L6KA4ENU.js} +45 -13
- package/dist/cli/{chunk-ZQH4TXM2.mjs → chunk-L6L57RSG.mjs} +2 -2
- package/dist/cli/{chunk-Y3NN2UAF.mjs → chunk-MWZNMWR2.mjs} +2 -2
- package/dist/cli/{chunk-2IHGVAGT.mjs → chunk-ODWTFVE4.mjs} +2 -2
- package/dist/cli/{chunk-KKSKYZO4.mjs → chunk-QOEI42IU.mjs} +2 -2
- package/dist/cli/{chunk-WCZFCOMZ.js → chunk-QSRWBOPV.js} +11 -10
- package/dist/cli/{chunk-E5ILCMKQ.mjs → chunk-RPFNIMUO.mjs} +1 -1
- package/dist/cli/{chunk-EFO5GVYS.js → chunk-S3XQH7DW.js} +2 -2
- package/dist/cli/{chunk-IJJ6D5WL.mjs → chunk-TLQXN4ZZ.mjs} +11 -11
- package/dist/cli/{chunk-KCDZWS2B.js → chunk-USWLB4KV.js} +231 -231
- package/dist/cli/{chunk-2NGIBJM2.js → chunk-VMPM2FKT.js} +8 -8
- package/dist/cli/{chunk-ZVXB7OU7.mjs → chunk-WCZBIE5L.mjs} +1 -1
- package/dist/cli/{chunk-EYG336YV.js → chunk-WP45PUPW.js} +41 -41
- package/dist/cli/{chunk-AGTXL6LZ.js → chunk-X6HIIHQO.js} +5 -5
- package/dist/cli/{chunk-JO2JZUBR.js → chunk-Y4GRL533.js} +3 -3
- package/dist/cli/{chunk-2I7VN65H.js → chunk-ZZD245Z2.js} +7 -7
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-DKYZE2KM.js → csv-QD7JJGSP.js} +13 -13
- package/dist/cli/{csv-XR22YQXT.mjs → csv-UBW4ID5D.mjs} +4 -4
- package/dist/cli/{db-RNYRTCMV.js → db-AARR3WYD.js} +27 -27
- package/dist/cli/{db-EOKG36YN.mjs → db-QFDXKIVD.mjs} +6 -6
- package/dist/cli/{describe-ICFXOQBW.mjs → describe-OBVIAC2H.mjs} +20 -20
- package/dist/cli/describe-RYJ6HDYD.js +50 -0
- package/dist/cli/describe-core.d.mts +5 -11
- package/dist/cli/describe-core.d.ts +5 -11
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-3RAOACNS.mjs → executions-IZYUDYTZ.mjs} +6 -6
- package/dist/cli/{executions-OBWPSWH7.js → executions-KXY7KMZY.js} +8 -8
- package/dist/cli/{feedback-6GPEUBLF.js → feedback-3334HBPD.js} +8 -8
- package/dist/cli/{feedback-6EQRVBKF.mjs → feedback-IVCVBERN.mjs} +4 -4
- package/dist/cli/git-4VLYFHNU.js +25 -0
- package/dist/cli/{git-CVQ24DTR.mjs → git-JHNVET5A.mjs} +5 -5
- package/dist/cli/index.js +141 -141
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-XPOATG5V.js → legacy-noops-DBA32JCV.js} +8 -8
- package/dist/cli/{legacy-noops-QULJZYNH.mjs → legacy-noops-WGVBUOCC.mjs} +5 -5
- package/dist/cli/{monitors-OJ4CMREE.js → monitors-GHWZ5AZS.js} +91 -91
- package/dist/cli/{monitors-AFT5YJPZ.mjs → monitors-ZGANC7JY.mjs} +7 -7
- package/dist/cli/{org-WHKNXANG.mjs → org-CUS42N2T.mjs} +6 -6
- package/dist/cli/{org-RKT52CSL.js → org-S7JWP264.js} +72 -72
- package/dist/cli/{pages-EEAQFGVD.mjs → pages-IH56T6L6.mjs} +6 -6
- package/dist/cli/{pages-SOE3R667.js → pages-QXRZDEJW.js} +17 -17
- package/dist/cli/{play-OTJJ4E4T.js → play-4C5PYS62.js} +314 -314
- package/dist/cli/{play-LXFWHUBP.mjs → play-Z65ZFOQH.mjs} +17 -17
- package/dist/cli/{providers-U3CPKTMM.mjs → providers-FSZSJX4Z.mjs} +6 -6
- package/dist/cli/{providers-RU4HIAT3.js → providers-XYQGYF3O.js} +9 -9
- package/dist/cli/{quickstart-75AO2AJC.mjs → quickstart-DHWVE32I.mjs} +4 -4
- package/dist/cli/{quickstart-N72IVA2Y.js → quickstart-ZA25RJT3.js} +6 -6
- package/dist/cli/{run-MMYES3IW.js → run-5MP6LEHM.js} +40 -40
- package/dist/cli/{run-IGWFL6WH.mjs → run-WRPPEPLG.mjs} +25 -25
- package/dist/cli/search-4SQFVNTB.js +32 -0
- package/dist/cli/{search-FIYESBLZ.mjs → search-A6NVJPKX.mjs} +7 -7
- package/dist/cli/{search-output-3I5KSW36.mjs → search-output-PAOUMVXY.mjs} +4 -4
- package/dist/cli/{search-output-2FXN4ZWD.js → search-output-YA6TXWGO.js} +6 -6
- package/dist/cli/{secrets-HCZQ6JNP.js → secrets-AZYOGH3I.js} +15 -15
- package/dist/cli/{secrets-O7IUQ3VT.mjs → secrets-ZGF7JOBI.mjs} +6 -6
- package/dist/cli/{sessions-5AYTT4IW.js → sessions-GCIN5VXT.js} +6 -6
- package/dist/cli/{sessions-KY7A3EZO.mjs → sessions-RNEAXZPV.mjs} +5 -5
- package/dist/cli/{settings-P4VFYWJK.js → settings-LMEZNLBB.js} +78 -78
- package/dist/cli/{settings-WSMRR2GS.mjs → settings-NO5KXQJF.mjs} +11 -11
- package/dist/cli/{setup-YTVKVQC7.mjs → setup-GCYB4IFS.mjs} +9 -9
- package/dist/cli/{setup-J7CA3EJL.js → setup-XKTZPYYH.js} +49 -49
- package/dist/cli/{skills-W5WY764N.mjs → skills-TY4HHIKH.mjs} +7 -7
- package/dist/cli/skills-V4APQA2I.js +36 -0
- package/dist/cli/tools-HKQLQ7HT.js +57 -0
- package/dist/cli/{tools-YECI6N3N.mjs → tools-RDTHHYJ3.mjs} +18 -18
- package/dist/cli/{update-BIFBIEII.mjs → update-BRLLTTCS.mjs} +9 -9
- package/dist/cli/update-Z4MUAHWM.js +34 -0
- package/dist/cli/{workflow-XZVDNARC.mjs → workflow-F72EVZWM.mjs} +7 -7
- package/dist/cli/{workflow-D2TUFFH6.js → workflow-YHA4WE3K.js} +17 -17
- package/dist/{client-BDB_VbE4.d.ts → client-97yTcdLl.d.ts} +1 -1
- package/dist/{client-CNzJ1LTF.d.mts → client-CFo9qalW.d.mts} +1 -1
- package/dist/{client-core-xEa9x3pl.d.ts → client-core-BRZrY13B.d.ts} +5 -5
- package/dist/{client-core-CSv3DlPD.d.mts → client-core-Dl6xgfLq.d.mts} +5 -5
- package/dist/{compiler-manifest-BFTwq1HI.d.ts → compiler-manifest-CPEF48NM.d.mts} +91 -0
- package/dist/{compiler-manifest-BFTwq1HI.d.mts → compiler-manifest-CPEF48NM.d.ts} +91 -0
- package/dist/{errors-c3pMsylw.d.ts → errors-B-PJXveg.d.ts} +1 -1
- package/dist/{errors-w31ybrQM.d.mts → errors-BWbPzqwo.d.mts} +1 -1
- package/dist/{index-DvNtxucX.d.mts → index-BJ8AA1F9.d.mts} +1 -1
- package/dist/{index-CQ-15-QL.d.ts → index-CvVxPpE8.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +26 -18
- package/dist/index.mjs +15 -7
- package/dist/install-integrity.json +116 -116
- 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 +2 -2
- package/dist/release.d.ts +2 -2
- 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-KYQLDI6V.js +0 -43
- package/dist/cli/describe-RS75I33X.js +0 -50
- package/dist/cli/git-DEFE4SSB.js +0 -25
- package/dist/cli/search-EQURI7SZ.js +0 -32
- package/dist/cli/skills-KKPEGLAR.js +0 -36
- package/dist/cli/tools-65Y4QTW6.js +0 -57
- package/dist/cli/update-WDG7VFOW.js +0 -34
|
@@ -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 _chunkGLDBMKTVjs = require('./chunk-GLDBMKTV.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ var _chunkAWMCZAURjs = require('./chunk-AWMCZAUR.js');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkY4GRL533js = require('./chunk-Y4GRL533.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -20,13 +20,13 @@ var _chunkJO2JZUBRjs = require('./chunk-JO2JZUBR.js');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkHINVMRGQjs = require('./chunk-HINVMRGQ.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkS3XQH7DWjs = require('./chunk-S3XQH7DW.js');
|
|
30
30
|
|
|
31
31
|
// src/compat.ts
|
|
32
32
|
var _crypto = require('crypto');
|
|
@@ -61,7 +61,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
61
61
|
return value === "1" || value === "true" || value === "yes";
|
|
62
62
|
}
|
|
63
63
|
function sdkCompatibilityCachePath(baseUrl, homeDir = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.HOME, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]) || _os.homedir.call(void 0, )) {
|
|
64
|
-
return _path.join.call(void 0,
|
|
64
|
+
return _path.join.call(void 0, _chunkY4GRL533js.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
65
65
|
}
|
|
66
66
|
function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'access', _11 => _11.env, 'access', _12 => _12.HOME, 'optionalAccess', _13 => _13.trim, 'call', _14 => _14()]) || _os.homedir.call(void 0, )) {
|
|
67
67
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -69,9 +69,9 @@ function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'acc
|
|
|
69
69
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
70
70
|
return JSON.stringify({
|
|
71
71
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
72
|
-
version:
|
|
73
|
-
apiContract:
|
|
74
|
-
apiMajor:
|
|
72
|
+
version: _chunkHINVMRGQjs.SDK_VERSION,
|
|
73
|
+
apiContract: _chunkHINVMRGQjs.SDK_API_CONTRACT,
|
|
74
|
+
apiMajor: _chunkHINVMRGQjs.SDK_API_MAJOR,
|
|
75
75
|
command: _optionalChain([command, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()]) || null,
|
|
76
76
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
77
77
|
});
|
|
@@ -79,8 +79,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
79
79
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
80
80
|
return JSON.stringify({
|
|
81
81
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
82
|
-
version:
|
|
83
|
-
apiContract:
|
|
82
|
+
version: _chunkHINVMRGQjs.SDK_VERSION,
|
|
83
|
+
apiContract: _chunkHINVMRGQjs.SDK_API_CONTRACT,
|
|
84
84
|
command: _optionalChain([command, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]) || null
|
|
85
85
|
});
|
|
86
86
|
}
|
|
@@ -105,7 +105,7 @@ function isSavedWithin(savedAt, windowMs, now) {
|
|
|
105
105
|
}
|
|
106
106
|
var UPDATE_ADVISORY_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
107
107
|
function claimUpdateAdvisory(baseUrl, now = Date.now()) {
|
|
108
|
-
const path = _path.join.call(void 0,
|
|
108
|
+
const path = _path.join.call(void 0, _chunkY4GRL533js.sdkCliStateDirPath.call(void 0, baseUrl), "update-advisory.json");
|
|
109
109
|
try {
|
|
110
110
|
const { shownAt } = JSON.parse(_fs.readFileSync.call(void 0, path, "utf8"));
|
|
111
111
|
if (isSavedWithin(shownAt, UPDATE_ADVISORY_INTERVAL_MS, now)) return false;
|
|
@@ -192,7 +192,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
192
192
|
);
|
|
193
193
|
try {
|
|
194
194
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
195
|
-
url.searchParams.set("version",
|
|
195
|
+
url.searchParams.set("version", _chunkHINVMRGQjs.SDK_VERSION);
|
|
196
196
|
if (_optionalChain([options, 'access', _34 => _34.command, 'optionalAccess', _35 => _35.trim, 'call', _36 => _36()])) {
|
|
197
197
|
url.searchParams.set("command", options.command.trim());
|
|
198
198
|
}
|
|
@@ -200,7 +200,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
200
200
|
url.searchParams.set("skills_version", _nullishCoalesce(options.skillsVersion, () => ( "")));
|
|
201
201
|
url.searchParams.set(
|
|
202
202
|
"skills_cli_capability",
|
|
203
|
-
String(
|
|
203
|
+
String(_chunkS3XQH7DWjs.SDK_RELEASE.packageCapabilities.skillsGuidance)
|
|
204
204
|
);
|
|
205
205
|
}
|
|
206
206
|
if (options.catalog) {
|
|
@@ -212,14 +212,14 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
212
212
|
const response = await fetch(url, {
|
|
213
213
|
method: "GET",
|
|
214
214
|
headers: {
|
|
215
|
-
...
|
|
216
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
217
|
-
"X-Deepline-SDK-Version":
|
|
218
|
-
"X-Deepline-API-Major": String(
|
|
219
|
-
"X-Deepline-API-Contract":
|
|
215
|
+
..._chunkHINVMRGQjs.deploymentProtectionHeaders.call(void 0, ),
|
|
216
|
+
"User-Agent": `deepline-ts-sdk/${_chunkHINVMRGQjs.SDK_VERSION}`,
|
|
217
|
+
"X-Deepline-SDK-Version": _chunkHINVMRGQjs.SDK_VERSION,
|
|
218
|
+
"X-Deepline-API-Major": String(_chunkHINVMRGQjs.SDK_API_MAJOR),
|
|
219
|
+
"X-Deepline-API-Contract": _chunkHINVMRGQjs.SDK_API_CONTRACT,
|
|
220
220
|
"X-Deepline-CLI-Update-Preferences": "1",
|
|
221
221
|
"X-Deepline-CLI-Auto-Update-Capability": SDK_CLI_AUTO_UPDATE_CAPABILITY,
|
|
222
|
-
...options.catalog ? { Authorization: `Bearer ${
|
|
222
|
+
...options.catalog ? { Authorization: `Bearer ${_chunkY4GRL533js.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {},
|
|
223
223
|
..._optionalChain([options, 'access', _37 => _37.catalog, 'optionalAccess', _38 => _38.cliInvocationId]) ? { "X-Deepline-CLI-Invocation-ID": options.catalog.cliInvocationId } : {}
|
|
224
224
|
},
|
|
225
225
|
signal: controller.signal
|
|
@@ -294,181 +294,6 @@ function enforceSdkCompatibilityResponse(response, options = {}) {
|
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
// contracts/install-commands.json
|
|
298
|
-
var install_commands_default = {
|
|
299
|
-
skills: {
|
|
300
|
-
index_path: "/.well-known/skills/index.json",
|
|
301
|
-
default_agents: [
|
|
302
|
-
"codex",
|
|
303
|
-
"claude-code",
|
|
304
|
-
"cursor",
|
|
305
|
-
"gemini-cli",
|
|
306
|
-
"antigravity"
|
|
307
|
-
],
|
|
308
|
-
npx_binary: "npx",
|
|
309
|
-
npx_add_args_template: [
|
|
310
|
-
"--yes",
|
|
311
|
-
"skills@1.5.15",
|
|
312
|
-
"add",
|
|
313
|
-
"{skills_source_url}",
|
|
314
|
-
"--agent",
|
|
315
|
-
"{agents}",
|
|
316
|
-
"--global",
|
|
317
|
-
"--yes",
|
|
318
|
-
"--skill",
|
|
319
|
-
"{skill_name}",
|
|
320
|
-
"--full-depth"
|
|
321
|
-
]
|
|
322
|
-
},
|
|
323
|
-
cli: {
|
|
324
|
-
sdk_npm_global: "npm install -g deepline@latest"
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
// src/cli/install-commands.ts
|
|
329
|
-
var INSTALL_COMMANDS = install_commands_default;
|
|
330
|
-
var skillsNpxPackage = INSTALL_COMMANDS.skills.npx_add_args_template.find(
|
|
331
|
-
(arg) => /^skills@\d+\.\d+\.\d+$/.test(arg)
|
|
332
|
-
);
|
|
333
|
-
if (!skillsNpxPackage) {
|
|
334
|
-
throw new Error(
|
|
335
|
-
"shared_libs/cli/install-commands.json must pin an exact skills package version."
|
|
336
|
-
);
|
|
337
|
-
}
|
|
338
|
-
var SKILLS_NPX_PACKAGE = skillsNpxPackage;
|
|
339
|
-
var DEFAULT_V1_SKILL_NAMES = [
|
|
340
|
-
"deepline-org-chart",
|
|
341
|
-
"build-tam",
|
|
342
|
-
"clay-to-deepline",
|
|
343
|
-
"deepline-analytics",
|
|
344
|
-
"deepline-engine",
|
|
345
|
-
// Retired: its guidance lives in `feedback send --help` and `sessions send
|
|
346
|
-
// --help`. Kept as a stub because installed CLIs list it and refuse to
|
|
347
|
-
// sync any skill when the published index lacks a listed name. Move to
|
|
348
|
-
// LEGACY_SKILL_NAMES_TO_REMOVE once those CLIs are out of the field.
|
|
349
|
-
"deepline-feedback",
|
|
350
|
-
"deepline-gtm",
|
|
351
|
-
"deepline-start",
|
|
352
|
-
"deepline-plays",
|
|
353
|
-
"deepline-quickstart",
|
|
354
|
-
"deepline-research",
|
|
355
|
-
"deepline-scoring",
|
|
356
|
-
"find-qualified-titles",
|
|
357
|
-
// Retired recipe shortcut: lookup guidance is now one rule in `deepline-gtm`.
|
|
358
|
-
// Kept as a stub because installed CLIs list it and refuse to sync any skill
|
|
359
|
-
// when the published index lacks a listed name. Move to
|
|
360
|
-
// LEGACY_SKILL_NAMES_TO_REMOVE once those CLIs are out of the field.
|
|
361
|
-
"linkedin-url-lookup",
|
|
362
|
-
// Deprecated alias for `deepline-scoring`, kept installable so saved prompts
|
|
363
|
-
// and scripts using `/niche-signal-discovery` keep routing to the renamed
|
|
364
|
-
// skill. Move to LEGACY_SKILL_NAMES_TO_REMOVE once the window closes.
|
|
365
|
-
"niche-signal-discovery",
|
|
366
|
-
"portfolio-prospecting"
|
|
367
|
-
];
|
|
368
|
-
var DEFAULT_SDK_SKILL_NAMES = [...DEFAULT_V1_SKILL_NAMES];
|
|
369
|
-
var LEGACY_SKILL_NAMES_TO_REMOVE = [
|
|
370
|
-
"deepline-plays-feedback",
|
|
371
|
-
"deepline-plays-quickstart",
|
|
372
|
-
"workflow-hello-world"
|
|
373
|
-
];
|
|
374
|
-
function normalizeBaseUrl(baseUrl) {
|
|
375
|
-
return baseUrl.replace(/\/$/, "");
|
|
376
|
-
}
|
|
377
|
-
function renderTemplate(template, values) {
|
|
378
|
-
return template.replace(/\{([a-z_]+)\}/g, (match, key) => {
|
|
379
|
-
return _nullishCoalesce(values[key], () => ( match));
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
function skillsIndexUrl(baseUrl) {
|
|
383
|
-
return `${normalizeBaseUrl(baseUrl)}${INSTALL_COMMANDS.skills.index_path}`;
|
|
384
|
-
}
|
|
385
|
-
function skillsSourceUrl(baseUrl) {
|
|
386
|
-
return normalizeBaseUrl(baseUrl);
|
|
387
|
-
}
|
|
388
|
-
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
389
|
-
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
390
|
-
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
391
|
-
const agents = _nullishCoalesce(options.agents, () => ( _chunkJO2JZUBRjs.DEFAULT_SKILL_AGENTS));
|
|
392
|
-
const values = {
|
|
393
|
-
skills_index_url: skillsIndexUrl(baseUrl),
|
|
394
|
-
skills_source_url: skillsSourceUrl(baseUrl),
|
|
395
|
-
agents: agents.join(" "),
|
|
396
|
-
skill_name: _nullishCoalesce(firstSkillName, () => ( ""))
|
|
397
|
-
};
|
|
398
|
-
const rendered = INSTALL_COMMANDS.skills.npx_add_args_template.flatMap(
|
|
399
|
-
(arg, index) => {
|
|
400
|
-
const next = index === 0 && options.firstArg ? options.firstArg : arg;
|
|
401
|
-
const value = renderTemplate(next, values);
|
|
402
|
-
if (arg === "{agents}") {
|
|
403
|
-
return agents;
|
|
404
|
-
}
|
|
405
|
-
if (arg === "{skill_name}") {
|
|
406
|
-
return [
|
|
407
|
-
value,
|
|
408
|
-
...extraSkillNames.flatMap((name) => ["--skill", name])
|
|
409
|
-
];
|
|
410
|
-
}
|
|
411
|
-
return value;
|
|
412
|
-
}
|
|
413
|
-
);
|
|
414
|
-
return rendered;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
// src/cli/windows-arg-escape.ts
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
var CMD_META_CHARS = /([()\][%!^"`<>&|;, *?])/g;
|
|
421
|
-
function escapeCmdArgument(arg, forBatchFile = true) {
|
|
422
|
-
let escaped = arg.replace(/(\\*)"/g, '$1$1\\"');
|
|
423
|
-
escaped = escaped.replace(/(\\*)$/, "$1$1");
|
|
424
|
-
escaped = `"${escaped}"`;
|
|
425
|
-
escaped = escaped.replace(CMD_META_CHARS, "^$1");
|
|
426
|
-
return forBatchFile ? escaped.replace(CMD_META_CHARS, "^$1") : escaped;
|
|
427
|
-
}
|
|
428
|
-
function escapeCmdCommand(command) {
|
|
429
|
-
return command.replace(CMD_META_CHARS, "^$1");
|
|
430
|
-
}
|
|
431
|
-
function resolveShellSpawn(command, args, platform2 = process.platform, env = process.env, cwd = process.cwd()) {
|
|
432
|
-
if (platform2 !== "win32") {
|
|
433
|
-
return { command, args: [...args], shell: false };
|
|
434
|
-
}
|
|
435
|
-
const resolved = resolveWindowsExecutable(command, env, cwd);
|
|
436
|
-
const executable = _nullishCoalesce(resolved, () => ( command));
|
|
437
|
-
const batchFile = /\.(cmd|bat)$/i.test(executable) || !resolved && /^(npm|npx|pnpm)$/i.test(command);
|
|
438
|
-
if (!batchFile) {
|
|
439
|
-
if (/^bunx(?:\.exe)?$/i.test(_path.win32.basename(executable))) {
|
|
440
|
-
const bun = resolveWindowsExecutable("bun", env, cwd);
|
|
441
|
-
if (bun && /\.exe$/i.test(bun)) {
|
|
442
|
-
return { command: bun, args: ["x", ...args], shell: false };
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
return { command: executable, args: [...args], shell: false };
|
|
446
|
-
}
|
|
447
|
-
return {
|
|
448
|
-
command: escapeCmdCommand(executable),
|
|
449
|
-
args: args.map((arg) => escapeCmdArgument(arg)),
|
|
450
|
-
shell: true
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
function resolveWindowsExecutable(command, env, cwd) {
|
|
454
|
-
const extensions = _path.win32.extname(command) ? [""] : (_nullishCoalesce(env.PATHEXT, () => ( ".COM;.EXE;.BAT;.CMD"))).split(";").filter(Boolean);
|
|
455
|
-
const directories = /[\\/]/.test(command) ? [""] : [cwd, ...(_nullishCoalesce(env.PATH, () => ( ""))).split(";")];
|
|
456
|
-
for (const directory of directories) {
|
|
457
|
-
for (const extension of extensions) {
|
|
458
|
-
const candidate = directory ? _path.win32.resolve(
|
|
459
|
-
cwd,
|
|
460
|
-
directory.replace(/^"|"$/g, ""),
|
|
461
|
-
command + extension
|
|
462
|
-
) : _path.win32.resolve(cwd, command + extension);
|
|
463
|
-
try {
|
|
464
|
-
if (_fs.statSync.call(void 0, candidate).isFile()) return candidate;
|
|
465
|
-
} catch (e7) {
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
return void 0;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
297
|
// src/cli/failure-reporting.ts
|
|
473
298
|
|
|
474
299
|
var FAILURE_REPORT_DISABLE_ENV = "DEEPLINE_DISABLE_FAILURE_REPORTING";
|
|
@@ -607,7 +432,7 @@ function buildEnvironmentContext() {
|
|
|
607
432
|
node_version: process.version,
|
|
608
433
|
runtime: "Node.js",
|
|
609
434
|
hostname: _os.hostname.call(void 0, ),
|
|
610
|
-
agent_runtime:
|
|
435
|
+
agent_runtime: _chunkHINVMRGQjs.detectAgentRuntime.call(void 0, )
|
|
611
436
|
};
|
|
612
437
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
613
438
|
const normalized = _optionalChain([process, 'access', _57 => _57.env, 'access', _58 => _58[key], 'optionalAccess', _59 => _59.trim, 'call', _60 => _60()]);
|
|
@@ -628,18 +453,18 @@ function buildEnvironmentContext() {
|
|
|
628
453
|
return context;
|
|
629
454
|
}
|
|
630
455
|
function failureReportHeaders(apiKey) {
|
|
631
|
-
const agentSessionId =
|
|
456
|
+
const agentSessionId = _chunkHINVMRGQjs.agentSessionIdFromEnvironment.call(void 0, );
|
|
632
457
|
return {
|
|
633
|
-
...
|
|
458
|
+
..._chunkHINVMRGQjs.deploymentProtectionHeaders.call(void 0, ),
|
|
634
459
|
...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {},
|
|
635
460
|
Authorization: `Bearer ${apiKey}`,
|
|
636
461
|
"Content-Type": "application/json",
|
|
637
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
462
|
+
"User-Agent": `deepline-ts-sdk/${_chunkHINVMRGQjs.SDK_VERSION}`,
|
|
638
463
|
"X-Deepline-Client-Family": "sdk",
|
|
639
464
|
"X-Deepline-CLI-Family": "sdk",
|
|
640
|
-
"X-Deepline-Agent-Runtime":
|
|
641
|
-
"X-Deepline-CLI-Version":
|
|
642
|
-
"X-Deepline-SDK-Version":
|
|
465
|
+
"X-Deepline-Agent-Runtime": _chunkHINVMRGQjs.detectAgentRuntime.call(void 0, ),
|
|
466
|
+
"X-Deepline-CLI-Version": _chunkHINVMRGQjs.SDK_VERSION,
|
|
467
|
+
"X-Deepline-SDK-Version": _chunkHINVMRGQjs.SDK_VERSION
|
|
643
468
|
};
|
|
644
469
|
}
|
|
645
470
|
async function postFailureReport(input) {
|
|
@@ -654,7 +479,7 @@ async function postFailureReport(input) {
|
|
|
654
479
|
signal: controller.signal
|
|
655
480
|
});
|
|
656
481
|
return true;
|
|
657
|
-
} catch (
|
|
482
|
+
} catch (e7) {
|
|
658
483
|
return false;
|
|
659
484
|
} finally {
|
|
660
485
|
clearTimeout(timeout);
|
|
@@ -667,8 +492,8 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
667
492
|
if (isFailureReportingDisabled()) return false;
|
|
668
493
|
let apiKey = "";
|
|
669
494
|
try {
|
|
670
|
-
apiKey =
|
|
671
|
-
} catch (
|
|
495
|
+
apiKey = _chunkY4GRL533js.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
496
|
+
} catch (e8) {
|
|
672
497
|
return false;
|
|
673
498
|
}
|
|
674
499
|
if (!apiKey) return false;
|
|
@@ -694,7 +519,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
694
519
|
failure_code: failureCode2,
|
|
695
520
|
failure_stage: failureStage,
|
|
696
521
|
error_body: "Automatic Deepline skills installation failed.",
|
|
697
|
-
cli_version:
|
|
522
|
+
cli_version: _chunkHINVMRGQjs.SDK_VERSION,
|
|
698
523
|
context: {
|
|
699
524
|
environment: buildEnvironmentContext(),
|
|
700
525
|
skills_sync: {
|
|
@@ -779,7 +604,7 @@ function safeRequestDiagnostics(error) {
|
|
|
779
604
|
if (url.protocol === "https:" || url.protocol === "http:") {
|
|
780
605
|
result.url = redactFailureText(`${url.origin}${url.pathname}`, 1e3);
|
|
781
606
|
}
|
|
782
|
-
} catch (
|
|
607
|
+
} catch (e9) {
|
|
783
608
|
}
|
|
784
609
|
}
|
|
785
610
|
if (typeof value.failedAtUtc === "string" && Number.isFinite(Date.parse(value.failedAtUtc))) {
|
|
@@ -814,7 +639,7 @@ function buildFailureReport(input) {
|
|
|
814
639
|
failure_kind: failureKind,
|
|
815
640
|
failure_code: code,
|
|
816
641
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
817
|
-
cli_version:
|
|
642
|
+
cli_version: _chunkHINVMRGQjs.SDK_VERSION,
|
|
818
643
|
context: {
|
|
819
644
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
820
645
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -834,8 +659,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
834
659
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
835
660
|
const exitCode = resolvedExitCode(input);
|
|
836
661
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
837
|
-
const baseUrl =
|
|
838
|
-
const apiKey =
|
|
662
|
+
const baseUrl = _chunkY4GRL533js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
663
|
+
const apiKey = _chunkY4GRL533js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
839
664
|
if (!apiKey) return false;
|
|
840
665
|
return postFailureReport({
|
|
841
666
|
baseUrl,
|
|
@@ -851,6 +676,181 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
851
676
|
});
|
|
852
677
|
}
|
|
853
678
|
|
|
679
|
+
// contracts/install-commands.json
|
|
680
|
+
var install_commands_default = {
|
|
681
|
+
skills: {
|
|
682
|
+
index_path: "/.well-known/skills/index.json",
|
|
683
|
+
default_agents: [
|
|
684
|
+
"codex",
|
|
685
|
+
"claude-code",
|
|
686
|
+
"cursor",
|
|
687
|
+
"gemini-cli",
|
|
688
|
+
"antigravity"
|
|
689
|
+
],
|
|
690
|
+
npx_binary: "npx",
|
|
691
|
+
npx_add_args_template: [
|
|
692
|
+
"--yes",
|
|
693
|
+
"skills@1.5.15",
|
|
694
|
+
"add",
|
|
695
|
+
"{skills_source_url}",
|
|
696
|
+
"--agent",
|
|
697
|
+
"{agents}",
|
|
698
|
+
"--global",
|
|
699
|
+
"--yes",
|
|
700
|
+
"--skill",
|
|
701
|
+
"{skill_name}",
|
|
702
|
+
"--full-depth"
|
|
703
|
+
]
|
|
704
|
+
},
|
|
705
|
+
cli: {
|
|
706
|
+
sdk_npm_global: "npm install -g deepline@latest"
|
|
707
|
+
}
|
|
708
|
+
};
|
|
709
|
+
|
|
710
|
+
// src/cli/install-commands.ts
|
|
711
|
+
var INSTALL_COMMANDS = install_commands_default;
|
|
712
|
+
var skillsNpxPackage = INSTALL_COMMANDS.skills.npx_add_args_template.find(
|
|
713
|
+
(arg) => /^skills@\d+\.\d+\.\d+$/.test(arg)
|
|
714
|
+
);
|
|
715
|
+
if (!skillsNpxPackage) {
|
|
716
|
+
throw new Error(
|
|
717
|
+
"shared_libs/cli/install-commands.json must pin an exact skills package version."
|
|
718
|
+
);
|
|
719
|
+
}
|
|
720
|
+
var SKILLS_NPX_PACKAGE = skillsNpxPackage;
|
|
721
|
+
var DEFAULT_V1_SKILL_NAMES = [
|
|
722
|
+
"deepline-org-chart",
|
|
723
|
+
"build-tam",
|
|
724
|
+
"clay-to-deepline",
|
|
725
|
+
"deepline-analytics",
|
|
726
|
+
"deepline-engine",
|
|
727
|
+
// Retired: its guidance lives in `feedback send --help` and `sessions send
|
|
728
|
+
// --help`. Kept as a stub because installed CLIs list it and refuse to
|
|
729
|
+
// sync any skill when the published index lacks a listed name. Move to
|
|
730
|
+
// LEGACY_SKILL_NAMES_TO_REMOVE once those CLIs are out of the field.
|
|
731
|
+
"deepline-feedback",
|
|
732
|
+
"deepline-gtm",
|
|
733
|
+
"deepline-start",
|
|
734
|
+
"deepline-plays",
|
|
735
|
+
"deepline-quickstart",
|
|
736
|
+
"deepline-research",
|
|
737
|
+
"deepline-scoring",
|
|
738
|
+
"find-qualified-titles",
|
|
739
|
+
// Retired recipe shortcut: lookup guidance is now one rule in `deepline-gtm`.
|
|
740
|
+
// Kept as a stub because installed CLIs list it and refuse to sync any skill
|
|
741
|
+
// when the published index lacks a listed name. Move to
|
|
742
|
+
// LEGACY_SKILL_NAMES_TO_REMOVE once those CLIs are out of the field.
|
|
743
|
+
"linkedin-url-lookup",
|
|
744
|
+
// Deprecated alias for `deepline-scoring`, kept installable so saved prompts
|
|
745
|
+
// and scripts using `/niche-signal-discovery` keep routing to the renamed
|
|
746
|
+
// skill. Move to LEGACY_SKILL_NAMES_TO_REMOVE once the window closes.
|
|
747
|
+
"niche-signal-discovery",
|
|
748
|
+
"portfolio-prospecting"
|
|
749
|
+
];
|
|
750
|
+
var DEFAULT_SDK_SKILL_NAMES = [...DEFAULT_V1_SKILL_NAMES];
|
|
751
|
+
var LEGACY_SKILL_NAMES_TO_REMOVE = [
|
|
752
|
+
"deepline-plays-feedback",
|
|
753
|
+
"deepline-plays-quickstart",
|
|
754
|
+
"workflow-hello-world"
|
|
755
|
+
];
|
|
756
|
+
function normalizeBaseUrl(baseUrl) {
|
|
757
|
+
return baseUrl.replace(/\/$/, "");
|
|
758
|
+
}
|
|
759
|
+
function renderTemplate(template, values) {
|
|
760
|
+
return template.replace(/\{([a-z_]+)\}/g, (match, key) => {
|
|
761
|
+
return _nullishCoalesce(values[key], () => ( match));
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
function skillsIndexUrl(baseUrl) {
|
|
765
|
+
return `${normalizeBaseUrl(baseUrl)}${INSTALL_COMMANDS.skills.index_path}`;
|
|
766
|
+
}
|
|
767
|
+
function skillsSourceUrl(baseUrl) {
|
|
768
|
+
return normalizeBaseUrl(baseUrl);
|
|
769
|
+
}
|
|
770
|
+
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
771
|
+
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
772
|
+
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
773
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunkY4GRL533js.DEFAULT_SKILL_AGENTS));
|
|
774
|
+
const values = {
|
|
775
|
+
skills_index_url: skillsIndexUrl(baseUrl),
|
|
776
|
+
skills_source_url: skillsSourceUrl(baseUrl),
|
|
777
|
+
agents: agents.join(" "),
|
|
778
|
+
skill_name: _nullishCoalesce(firstSkillName, () => ( ""))
|
|
779
|
+
};
|
|
780
|
+
const rendered = INSTALL_COMMANDS.skills.npx_add_args_template.flatMap(
|
|
781
|
+
(arg, index) => {
|
|
782
|
+
const next = index === 0 && options.firstArg ? options.firstArg : arg;
|
|
783
|
+
const value = renderTemplate(next, values);
|
|
784
|
+
if (arg === "{agents}") {
|
|
785
|
+
return agents;
|
|
786
|
+
}
|
|
787
|
+
if (arg === "{skill_name}") {
|
|
788
|
+
return [
|
|
789
|
+
value,
|
|
790
|
+
...extraSkillNames.flatMap((name) => ["--skill", name])
|
|
791
|
+
];
|
|
792
|
+
}
|
|
793
|
+
return value;
|
|
794
|
+
}
|
|
795
|
+
);
|
|
796
|
+
return rendered;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
// src/cli/windows-arg-escape.ts
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
var CMD_META_CHARS = /([()\][%!^"`<>&|;, *?])/g;
|
|
803
|
+
function escapeCmdArgument(arg, forBatchFile = true) {
|
|
804
|
+
let escaped = arg.replace(/(\\*)"/g, '$1$1\\"');
|
|
805
|
+
escaped = escaped.replace(/(\\*)$/, "$1$1");
|
|
806
|
+
escaped = `"${escaped}"`;
|
|
807
|
+
escaped = escaped.replace(CMD_META_CHARS, "^$1");
|
|
808
|
+
return forBatchFile ? escaped.replace(CMD_META_CHARS, "^$1") : escaped;
|
|
809
|
+
}
|
|
810
|
+
function escapeCmdCommand(command) {
|
|
811
|
+
return command.replace(CMD_META_CHARS, "^$1");
|
|
812
|
+
}
|
|
813
|
+
function resolveShellSpawn(command, args, platform2 = process.platform, env = process.env, cwd = process.cwd()) {
|
|
814
|
+
if (platform2 !== "win32") {
|
|
815
|
+
return { command, args: [...args], shell: false };
|
|
816
|
+
}
|
|
817
|
+
const resolved = resolveWindowsExecutable(command, env, cwd);
|
|
818
|
+
const executable = _nullishCoalesce(resolved, () => ( command));
|
|
819
|
+
const batchFile = /\.(cmd|bat)$/i.test(executable) || !resolved && /^(npm|npx|pnpm)$/i.test(command);
|
|
820
|
+
if (!batchFile) {
|
|
821
|
+
if (/^bunx(?:\.exe)?$/i.test(_path.win32.basename(executable))) {
|
|
822
|
+
const bun = resolveWindowsExecutable("bun", env, cwd);
|
|
823
|
+
if (bun && /\.exe$/i.test(bun)) {
|
|
824
|
+
return { command: bun, args: ["x", ...args], shell: false };
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
return { command: executable, args: [...args], shell: false };
|
|
828
|
+
}
|
|
829
|
+
return {
|
|
830
|
+
command: escapeCmdCommand(executable),
|
|
831
|
+
args: args.map((arg) => escapeCmdArgument(arg)),
|
|
832
|
+
shell: true
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
function resolveWindowsExecutable(command, env, cwd) {
|
|
836
|
+
const extensions = _path.win32.extname(command) ? [""] : (_nullishCoalesce(env.PATHEXT, () => ( ".COM;.EXE;.BAT;.CMD"))).split(";").filter(Boolean);
|
|
837
|
+
const directories = /[\\/]/.test(command) ? [""] : [cwd, ...(_nullishCoalesce(env.PATH, () => ( ""))).split(";")];
|
|
838
|
+
for (const directory of directories) {
|
|
839
|
+
for (const extension of extensions) {
|
|
840
|
+
const candidate = directory ? _path.win32.resolve(
|
|
841
|
+
cwd,
|
|
842
|
+
directory.replace(/^"|"$/g, ""),
|
|
843
|
+
command + extension
|
|
844
|
+
) : _path.win32.resolve(cwd, command + extension);
|
|
845
|
+
try {
|
|
846
|
+
if (_fs.statSync.call(void 0, candidate).isFile()) return candidate;
|
|
847
|
+
} catch (e10) {
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
return void 0;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
854
|
// src/cli/skills-sync.ts
|
|
855
855
|
var _child_process = require('child_process');
|
|
856
856
|
|
|
@@ -872,25 +872,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
872
872
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
873
873
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
874
874
|
function shouldSkipSkillsSync() {
|
|
875
|
-
if (
|
|
875
|
+
if (_chunkHINVMRGQjs.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
876
876
|
return true;
|
|
877
877
|
}
|
|
878
878
|
const value = _optionalChain([process, 'access', _81 => _81.env, 'access', _82 => _82.DEEPLINE_SKIP_SKILLS_SYNC, 'optionalAccess', _83 => _83.trim, 'call', _84 => _84(), 'access', _85 => _85.toLowerCase, 'call', _86 => _86()]);
|
|
879
879
|
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
880
880
|
}
|
|
881
881
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
882
|
-
return _path.join.call(void 0,
|
|
882
|
+
return _path.join.call(void 0, _chunkY4GRL533js.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
883
883
|
}
|
|
884
884
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
885
885
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
886
|
-
var agentLeaseSegment =
|
|
886
|
+
var agentLeaseSegment = _chunkY4GRL533js.skillsAgentPathSegment;
|
|
887
887
|
function sortedLeaseAgents(agents) {
|
|
888
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
888
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkY4GRL533js.KNOWN_SKILL_AGENTS] : agents;
|
|
889
889
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
890
890
|
}
|
|
891
891
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
892
892
|
return _path.join.call(void 0,
|
|
893
|
-
|
|
893
|
+
_chunkY4GRL533js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
894
894
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
895
895
|
);
|
|
896
896
|
}
|
|
@@ -1049,7 +1049,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
1049
1049
|
constructor(baseUrl, error) {
|
|
1050
1050
|
const detail = error instanceof Error ? error.message : String(error);
|
|
1051
1051
|
super(
|
|
1052
|
-
`Could not save skills state in ${
|
|
1052
|
+
`Could not save skills state in ${_chunkY4GRL533js.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
1053
1053
|
);
|
|
1054
1054
|
this.name = "SkillsStateUnavailableError";
|
|
1055
1055
|
}
|
|
@@ -1134,7 +1134,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
1136
1136
|
return _path.join.call(void 0,
|
|
1137
|
-
|
|
1137
|
+
_chunkY4GRL533js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1138
1138
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
1139
1139
|
);
|
|
1140
1140
|
}
|
|
@@ -1168,8 +1168,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
1168
1168
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
1169
1169
|
}
|
|
1170
1170
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
1171
|
-
if (shouldSkipSkillsSync() ||
|
|
1172
|
-
const agents =
|
|
1171
|
+
if (shouldSkipSkillsSync() || _chunkY4GRL533js.hasActivePluginSkills.call(void 0, )) return;
|
|
1172
|
+
const agents = _chunkY4GRL533js.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1173
1173
|
if (agents.length === 0) return;
|
|
1174
1174
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1175
1175
|
}
|
|
@@ -1185,7 +1185,7 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
|
1185
1185
|
}
|
|
1186
1186
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
1187
1187
|
return _path.join.call(void 0,
|
|
1188
|
-
|
|
1188
|
+
_chunkY4GRL533js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1189
1189
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
1190
1190
|
);
|
|
1191
1191
|
}
|
|
@@ -1214,7 +1214,7 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
1214
1214
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
1215
1215
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
1216
1216
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
1217
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess', _90 => _90.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames,
|
|
1217
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _90 => _90.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkY4GRL533js.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
1218
1218
|
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess', _91 => _91.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.`;
|
|
1219
1219
|
notice(
|
|
1220
1220
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
@@ -1302,7 +1302,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
1302
1302
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
1303
1303
|
}
|
|
1304
1304
|
function isDefaultAgentSet(agents) {
|
|
1305
|
-
return agents.length ===
|
|
1305
|
+
return agents.length === _chunkY4GRL533js.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkY4GRL533js.DEFAULT_SKILL_AGENTS[index]);
|
|
1306
1306
|
}
|
|
1307
1307
|
function safeSkillFilePath(value) {
|
|
1308
1308
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1459,10 +1459,10 @@ async function fetchSkillsUpdate(baseUrl, localVersion) {
|
|
|
1459
1459
|
method: "POST",
|
|
1460
1460
|
headers: { "Content-Type": "application/json" },
|
|
1461
1461
|
body: JSON.stringify({
|
|
1462
|
-
sdk_cli: { version:
|
|
1462
|
+
sdk_cli: { version: _chunkHINVMRGQjs.SDK_VERSION },
|
|
1463
1463
|
skills: {
|
|
1464
1464
|
version: localVersion,
|
|
1465
|
-
capability:
|
|
1465
|
+
capability: _chunkS3XQH7DWjs.SDK_RELEASE.packageCapabilities.skillsGuidance
|
|
1466
1466
|
}
|
|
1467
1467
|
}),
|
|
1468
1468
|
signal: controller.signal
|
|
@@ -1501,7 +1501,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1501
1501
|
}
|
|
1502
1502
|
function noInstallerProbePath(baseUrl) {
|
|
1503
1503
|
return _path.join.call(void 0,
|
|
1504
|
-
|
|
1504
|
+
_chunkY4GRL533js.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1505
1505
|
"skills-sync-no-installer-unknown.json"
|
|
1506
1506
|
);
|
|
1507
1507
|
}
|
|
@@ -1580,7 +1580,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1580
1580
|
function resolveSkillsInstallSpawn(install, platform2 = process.platform) {
|
|
1581
1581
|
return resolveShellSpawn(install.command, install.args, platform2);
|
|
1582
1582
|
}
|
|
1583
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1583
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkY4GRL533js.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1584
1584
|
const commands = [];
|
|
1585
1585
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1586
1586
|
if (probes.bunx === "available") {
|
|
@@ -1722,7 +1722,7 @@ function runLegacySkillsCleanup(agents) {
|
|
|
1722
1722
|
}
|
|
1723
1723
|
}
|
|
1724
1724
|
function writeSdkSkillsStatusLine(line) {
|
|
1725
|
-
const progress =
|
|
1725
|
+
const progress = _chunkGLDBMKTVjs.getActiveCliProgress.call(void 0, );
|
|
1726
1726
|
if (progress) {
|
|
1727
1727
|
progress.writeLine(line);
|
|
1728
1728
|
return;
|
|
@@ -1732,11 +1732,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1734
1734
|
if (shouldSkipSkillsSync()) return;
|
|
1735
|
-
const usingPluginSkills =
|
|
1735
|
+
const usingPluginSkills = _chunkY4GRL533js.hasActivePluginSkills.call(void 0, );
|
|
1736
1736
|
if (usingPluginSkills) {
|
|
1737
1737
|
return;
|
|
1738
1738
|
}
|
|
1739
|
-
const agents =
|
|
1739
|
+
const agents = _chunkY4GRL533js.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1740
1740
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1741
1741
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1742
1742
|
}
|
|
@@ -1764,7 +1764,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1764
1764
|
return;
|
|
1765
1765
|
}
|
|
1766
1766
|
try {
|
|
1767
|
-
const localVersion =
|
|
1767
|
+
const localVersion = _chunkY4GRL533js.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1768
1768
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1769
1769
|
needsUpdate: options.update.needs_update,
|
|
1770
1770
|
remoteVersion: options.update.remote.version
|
|
@@ -1930,7 +1930,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1930
1930
|
}
|
|
1931
1931
|
}
|
|
1932
1932
|
runLegacySkillsCleanup(agents);
|
|
1933
|
-
if (!
|
|
1933
|
+
if (!_chunkY4GRL533js.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
1934
1934
|
notice(
|
|
1935
1935
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
1936
1936
|
);
|
|
@@ -1969,4 +1969,4 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1969
1969
|
|
|
1970
1970
|
|
|
1971
1971
|
|
|
1972
|
-
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.
|
|
1972
|
+
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.isFailureReportingDisabled = isFailureReportingDisabled; exports.redactFailureText = redactFailureText; exports.sanitizeCommand = sanitizeCommand; exports.failureReportHeaders = failureReportHeaders; exports.resolveSdkCliFailureExitCode = resolveSdkCliFailureExitCode; exports.maybeReportSdkCliFailure = maybeReportSdkCliFailure; 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.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;
|