deepline 0.3.325 → 0.3.327
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 +23 -25
- package/dist/bundling-sources/sdk/src/compat.ts +11 -6
- package/dist/bundling-sources/sdk/src/db/query.ts +172 -0
- package/dist/bundling-sources/sdk/src/errors.ts +35 -0
- package/dist/bundling-sources/sdk/src/index.ts +13 -0
- package/dist/bundling-sources/sdk/src/play.ts +34 -31
- package/dist/bundling-sources/sdk/src/plays/authoring-graph-path.ts +13 -0
- package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +2 -1
- package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +189 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/projection.ts +11 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +98 -11
- package/dist/cli/auth-67YOPQ6M.js +31 -0
- package/dist/cli/{auth-PIZESRPC.mjs → auth-EBBDOKNV.mjs} +4 -4
- package/dist/cli/{billing-DQKFCQV5.js → billing-6AAB7WPJ.js} +70 -70
- package/dist/cli/{billing-HSL6VTCM.mjs → billing-IM2QUFX4.mjs} +4 -4
- package/dist/cli/{chunk-WW4XZIVM.mjs → chunk-3ITDKXNC.mjs} +12 -9
- package/dist/cli/{chunk-K7FC5IUU.js → chunk-3MXRNPBN.js} +1 -1
- package/dist/cli/{chunk-DLW7X2UK.js → chunk-4TO56P22.js} +5928 -5730
- package/dist/cli/{chunk-MNKDSR2J.js → chunk-4ZARCCPT.js} +344 -254
- package/dist/cli/{chunk-PBNZXZCW.js → chunk-77RAV5XX.js} +48 -48
- package/dist/cli/{chunk-HUKWYHBG.js → chunk-7RCJDAJX.js} +2 -2
- package/dist/cli/{chunk-5TYU3UIS.mjs → chunk-A5SKM3GL.mjs} +1 -1
- package/dist/cli/{chunk-XNL3SEMC.js → chunk-AFNEQ43J.js} +8 -3
- package/dist/cli/{chunk-XSEMQ4II.js → chunk-AGH6YP2T.js} +2 -1
- package/dist/cli/chunk-AID3OYVJ.js +8 -0
- package/dist/cli/{chunk-YE3O2UHM.mjs → chunk-CCRQ2VGJ.mjs} +24 -1
- package/dist/cli/{chunk-HPTQEWCF.js → chunk-CISKBOXD.js} +70 -67
- package/dist/cli/{chunk-OPERWJR6.mjs → chunk-D6GD5AVN.mjs} +3 -3
- package/dist/cli/{chunk-6RMKHN7S.mjs → chunk-DCAU6PND.mjs} +4 -20
- package/dist/cli/{chunk-PVDQ55PS.js → chunk-DM3SHV6U.js} +29 -6
- package/dist/cli/{chunk-CV5GDCKN.js → chunk-DSDX6EUW.js} +29 -45
- package/dist/cli/{chunk-5FHU7TV4.mjs → chunk-DVV4FPS7.mjs} +2 -2
- package/dist/cli/{chunk-AQUNQJ5Y.mjs → chunk-F45425TB.mjs} +1 -1
- package/dist/cli/{chunk-NWBARG3F.mjs → chunk-G5774EFF.mjs} +1 -1
- package/dist/cli/chunk-GVESPYSY.mjs +234 -0
- package/dist/cli/{chunk-H5TJBRSC.mjs → chunk-HOWQKN6J.mjs} +98 -113
- package/dist/cli/{chunk-UYFWTIKF.js → chunk-HZZJR2GV.js} +26 -26
- package/dist/cli/{chunk-76VKBPOC.mjs → chunk-JOA6IKDE.mjs} +7 -2
- package/dist/cli/chunk-LVEDPCLJ.js +234 -0
- package/dist/cli/{chunk-KZNFYOHX.js → chunk-MOP6D7Z5.js} +6 -6
- package/dist/cli/{chunk-YXRPWMGN.js → chunk-NWIJLTRL.js} +147 -162
- package/dist/cli/chunk-OVDNJAJN.mjs +8 -0
- package/dist/cli/{chunk-XIVUB36F.mjs → chunk-QZAP5VOS.mjs} +104 -14
- package/dist/cli/{chunk-6VZDSBK6.mjs → chunk-REP2MYBI.mjs} +2 -2
- package/dist/cli/{chunk-PWV2M4LW.mjs → chunk-RSEVBSFE.mjs} +1 -1
- package/dist/cli/{chunk-OOPSX57I.js → chunk-TAGHNT5P.js} +6 -6
- package/dist/cli/{chunk-QQ2FG5W3.js → chunk-UROXKPND.js} +6 -6
- package/dist/cli/{chunk-7PZFGB7L.mjs → chunk-YIY74KUF.mjs} +2 -1
- package/dist/cli/{chunk-7MD453WV.mjs → chunk-ZOFARJWH.mjs} +5674 -5476
- package/dist/cli/client-7LZCG4VD.js +20 -0
- package/dist/cli/{client-57SR4KVM.mjs → client-JCMSACT4.mjs} +3 -3
- package/dist/cli/{csv-G2FRMOXL.mjs → csv-NPMWVM5D.mjs} +3 -3
- package/dist/cli/{csv-5DJSC6BD.js → csv-OILKDKUX.js} +12 -12
- package/dist/cli/{db-WWZEXM3N.mjs → db-AZUAOWPQ.mjs} +214 -137
- package/dist/cli/{db-NVO7P4VO.js → db-MNDRYYEX.js} +226 -149
- package/dist/cli/{describe-26OMF3A4.mjs → describe-KJWOHMKC.mjs} +12 -11
- package/dist/cli/{describe-M26LHDBQ.js → describe-QENLDLM2.js} +28 -27
- package/dist/cli/{executions-KI47LPKE.js → executions-P36UHBPG.js} +6 -6
- package/dist/cli/{executions-2LLHY3IL.mjs → executions-QZNQWF6F.mjs} +4 -4
- package/dist/cli/{feedback-2Y26C2BZ.js → feedback-K4UGTLFD.js} +6 -6
- package/dist/cli/{feedback-O26VL2OF.mjs → feedback-RQ6HSZSG.mjs} +3 -3
- package/dist/cli/{git-UVPGZN3K.mjs → git-PBRMCBMI.mjs} +4 -4
- package/dist/cli/git-RPFH3NJ2.js +23 -0
- package/dist/cli/index.js +105 -87
- package/dist/cli/index.mjs +65 -47
- package/dist/cli/{legacy-noops-IK5CH72U.mjs → legacy-noops-G7GWJ5UC.mjs} +4 -4
- package/dist/cli/{legacy-noops-H6Y3SEVB.js → legacy-noops-X74FM35Q.js} +7 -7
- package/dist/cli/{monitors-SFVVMAJT.mjs → monitors-KL2MCR57.mjs} +4 -4
- package/dist/cli/{monitors-JL6TTQCI.js → monitors-VKURX3YM.js} +85 -85
- package/dist/cli/{org-SSDONL57.mjs → org-DT53KTNW.mjs} +4 -4
- package/dist/cli/{org-OVMAZCQS.js → org-ZYXJDC44.js} +60 -60
- package/dist/cli/play-BUQV47E2.js +153 -0
- package/dist/cli/{play-X6NPACUO.mjs → play-WIJGQYTB.mjs} +11 -10
- package/dist/cli/{providers-E24JDWSR.js → providers-GRTW4TXX.js} +7 -7
- package/dist/cli/{providers-ONUBYYY4.mjs → providers-GYGKGS2J.mjs} +4 -4
- package/dist/cli/{quickstart-TB7C3DLG.js → quickstart-WB26543C.js} +5 -5
- package/dist/cli/{quickstart-B7NIXACV.mjs → quickstart-XF3M2M2S.mjs} +3 -3
- package/dist/cli/{search-N3QUIATW.mjs → search-ANJLTOF2.mjs} +5 -5
- package/dist/cli/search-CR2GZLCM.js +26 -0
- package/dist/cli/{secrets-CPCVFDYB.js → secrets-5KBUGMTK.js} +13 -13
- package/dist/cli/{secrets-V7Z4M67T.mjs → secrets-D6UR5CTW.mjs} +4 -4
- package/dist/cli/{sessions-E4FIZLQP.js → sessions-46PXFULL.js} +5 -5
- package/dist/cli/{sessions-PDOBKAKO.mjs → sessions-S7N4JEWK.mjs} +4 -4
- package/dist/cli/{settings-UVM2WDE4.js → settings-KMNBITSU.js} +74 -74
- package/dist/cli/{settings-QYHYHZDI.mjs → settings-V6U3SRTH.mjs} +7 -7
- package/dist/cli/{setup-3JFAXQLJ.js → setup-4K5FY6AU.js} +41 -41
- package/dist/cli/{setup-4RLAETDW.mjs → setup-OGITSLTN.mjs} +6 -6
- package/dist/cli/skills-4FP2MZKL.js +28 -0
- package/dist/cli/{skills-ZX2JSWOZ.mjs → skills-AXWAYPBY.mjs} +4 -4
- package/dist/cli/tools-7YZPH6WC.js +39 -0
- package/dist/cli/{tools-EGXCVIPJ.mjs → tools-LJCY6B23.mjs} +8 -7
- package/dist/cli/update-3VUOW6AP.js +28 -0
- package/dist/cli/{update-7FEKRQFE.mjs → update-DDR5XIUB.mjs} +6 -6
- package/dist/cli/{workflow-54VCKIG2.js → workflow-7CTCDWL3.js} +15 -15
- package/dist/cli/{workflow-7V7TTTKK.mjs → workflow-PRNCVANQ.mjs} +5 -5
- package/dist/{client-Bb4Jjzmj.d.ts → client-DHq8dJ56.d.ts} +39 -11
- package/dist/{client-COa-3GHK.d.mts → client-wiWPZhnI.d.mts} +39 -11
- package/dist/{compiler-manifest-CsnWj-AK.d.mts → compiler-manifest-9TkZ_ykI.d.mts} +711 -711
- package/dist/{compiler-manifest-CsnWj-AK.d.ts → compiler-manifest-9TkZ_ykI.d.ts} +711 -711
- package/dist/index-B-5_Xhud.d.mts +75 -0
- package/dist/index-ykksoEyR.d.ts +75 -0
- package/dist/index.d.mts +52 -13
- package/dist/index.d.ts +52 -13
- package/dist/index.js +142 -68
- package/dist/index.mjs +102 -28
- package/dist/install-integrity.json +91 -84
- package/dist/plays/bundle-play-file.d.mts +7 -75
- package/dist/plays/bundle-play-file.d.ts +7 -75
- package/dist/plays/bundle-play-file.mjs +1 -1
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-RXCD4GOV.js +0 -31
- package/dist/cli/chunk-OWJZUE3Y.mjs +0 -103
- package/dist/cli/chunk-SDK3ZA2C.js +0 -103
- package/dist/cli/client-562MULXK.js +0 -20
- package/dist/cli/git-KGPX5YPD.js +0 -23
- package/dist/cli/play-3DB4MSHN.js +0 -152
- package/dist/cli/search-NJ637YGQ.js +0 -26
- package/dist/cli/skills-BYRYG64R.js +0 -28
- package/dist/cli/tools-TAWOAY5X.js +0 -38
- package/dist/cli/update-H24GEBXM.js +0 -28
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkUROXKPNDjs = require('./chunk-UROXKPND.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -22,7 +22,7 @@ var _chunkQQ2FG5W3js = require('./chunk-QQ2FG5W3.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkDM3SHV6Ujs = require('./chunk-DM3SHV6U.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
@@ -76,6 +76,7 @@ if (!skillsNpxPackage) {
|
|
|
76
76
|
}
|
|
77
77
|
var SKILLS_NPX_PACKAGE = skillsNpxPackage;
|
|
78
78
|
var DEFAULT_V1_SKILL_NAMES = [
|
|
79
|
+
"deepline-org-chart",
|
|
79
80
|
"build-tam",
|
|
80
81
|
"clay-to-deepline",
|
|
81
82
|
"deepline-analytics",
|
|
@@ -116,7 +117,7 @@ function skillsSourceUrl(baseUrl) {
|
|
|
116
117
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
117
118
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
118
119
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
119
|
-
const agents = _nullishCoalesce(options.agents, () => (
|
|
120
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunkDM3SHV6Ujs.DEFAULT_SKILL_AGENTS));
|
|
120
121
|
const values = {
|
|
121
122
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
122
123
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -192,7 +193,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
192
193
|
return value === "1" || value === "true" || value === "yes";
|
|
193
194
|
}
|
|
194
195
|
function sdkCompatibilityCachePath(baseUrl, homeDir = _os.homedir.call(void 0, )) {
|
|
195
|
-
return _path.join.call(void 0,
|
|
196
|
+
return _path.join.call(void 0, _chunkDM3SHV6Ujs.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
196
197
|
}
|
|
197
198
|
function legacySdkCompatibilityCachePath(homeDir = _os.homedir.call(void 0, )) {
|
|
198
199
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -200,9 +201,9 @@ function legacySdkCompatibilityCachePath(homeDir = _os.homedir.call(void 0, )) {
|
|
|
200
201
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
201
202
|
return JSON.stringify({
|
|
202
203
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
203
|
-
version:
|
|
204
|
-
apiContract:
|
|
205
|
-
apiMajor:
|
|
204
|
+
version: _chunkDM3SHV6Ujs.SDK_VERSION,
|
|
205
|
+
apiContract: _chunkDM3SHV6Ujs.SDK_API_CONTRACT,
|
|
206
|
+
apiMajor: _chunkDM3SHV6Ujs.SDK_API_MAJOR,
|
|
206
207
|
command: _optionalChain([command, 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]) || null,
|
|
207
208
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
208
209
|
});
|
|
@@ -210,8 +211,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
210
211
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
211
212
|
return JSON.stringify({
|
|
212
213
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
213
|
-
version:
|
|
214
|
-
apiContract:
|
|
214
|
+
version: _chunkDM3SHV6Ujs.SDK_VERSION,
|
|
215
|
+
apiContract: _chunkDM3SHV6Ujs.SDK_API_CONTRACT,
|
|
215
216
|
command: _optionalChain([command, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]) || null
|
|
216
217
|
});
|
|
217
218
|
}
|
|
@@ -304,7 +305,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
304
305
|
);
|
|
305
306
|
try {
|
|
306
307
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
307
|
-
url.searchParams.set("version",
|
|
308
|
+
url.searchParams.set("version", _chunkDM3SHV6Ujs.SDK_VERSION);
|
|
308
309
|
if (_optionalChain([options, 'access', _19 => _19.command, 'optionalAccess', _20 => _20.trim, 'call', _21 => _21()])) {
|
|
309
310
|
url.searchParams.set("command", options.command.trim());
|
|
310
311
|
}
|
|
@@ -317,13 +318,13 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
317
318
|
const response = await fetch(url, {
|
|
318
319
|
method: "GET",
|
|
319
320
|
headers: {
|
|
320
|
-
...
|
|
321
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
322
|
-
"X-Deepline-SDK-Version":
|
|
323
|
-
"X-Deepline-API-Major": String(
|
|
324
|
-
"X-Deepline-API-Contract":
|
|
321
|
+
..._chunkDM3SHV6Ujs.deploymentProtectionHeaders.call(void 0, ),
|
|
322
|
+
"User-Agent": `deepline-ts-sdk/${_chunkDM3SHV6Ujs.SDK_VERSION}`,
|
|
323
|
+
"X-Deepline-SDK-Version": _chunkDM3SHV6Ujs.SDK_VERSION,
|
|
324
|
+
"X-Deepline-API-Major": String(_chunkDM3SHV6Ujs.SDK_API_MAJOR),
|
|
325
|
+
"X-Deepline-API-Contract": _chunkDM3SHV6Ujs.SDK_API_CONTRACT,
|
|
325
326
|
"X-Deepline-CLI-Update-Preferences": "1",
|
|
326
|
-
...options.catalog ? { Authorization: `Bearer ${
|
|
327
|
+
...options.catalog ? { Authorization: `Bearer ${_chunkDM3SHV6Ujs.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {}
|
|
327
328
|
},
|
|
328
329
|
signal: controller.signal
|
|
329
330
|
});
|
|
@@ -334,12 +335,14 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
334
335
|
);
|
|
335
336
|
}
|
|
336
337
|
const { catalog_metadata: catalogMetadata, ...data } = raw;
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
338
|
+
if (options.persistCache !== false) {
|
|
339
|
+
writeCachedCompatibility(
|
|
340
|
+
baseUrl,
|
|
341
|
+
options.command,
|
|
342
|
+
options.skillsVersion,
|
|
343
|
+
data
|
|
344
|
+
);
|
|
345
|
+
}
|
|
343
346
|
if (options.catalog && catalogMetadata && typeof catalogMetadata === "object" && "toolId" in catalogMetadata && catalogMetadata.toolId === options.catalog.toolId) {
|
|
344
347
|
options.catalog.acceptMetadata(catalogMetadata);
|
|
345
348
|
}
|
|
@@ -351,7 +354,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
351
354
|
options.skillsVersion
|
|
352
355
|
);
|
|
353
356
|
if (cached) {
|
|
354
|
-
if (options.timeoutMs !== void 0 && options.timeoutMs < CHECK_TIMEOUT_MS) {
|
|
357
|
+
if (options.persistCache !== false && options.timeoutMs !== void 0 && options.timeoutMs < CHECK_TIMEOUT_MS) {
|
|
355
358
|
invalidateCachedCompatibility(
|
|
356
359
|
baseUrl,
|
|
357
360
|
options.command,
|
|
@@ -574,7 +577,7 @@ function buildEnvironmentContext() {
|
|
|
574
577
|
node_version: process.version,
|
|
575
578
|
runtime: "Node.js",
|
|
576
579
|
hostname: _os.hostname.call(void 0, ),
|
|
577
|
-
agent_runtime:
|
|
580
|
+
agent_runtime: _chunkDM3SHV6Ujs.detectAgentRuntime.call(void 0, )
|
|
578
581
|
};
|
|
579
582
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
580
583
|
const normalized = _optionalChain([process, 'access', _32 => _32.env, 'access', _33 => _33[key], 'optionalAccess', _34 => _34.trim, 'call', _35 => _35()]);
|
|
@@ -598,12 +601,12 @@ function failureReportHeaders(apiKey) {
|
|
|
598
601
|
return {
|
|
599
602
|
Authorization: `Bearer ${apiKey}`,
|
|
600
603
|
"Content-Type": "application/json",
|
|
601
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
604
|
+
"User-Agent": `deepline-ts-sdk/${_chunkDM3SHV6Ujs.SDK_VERSION}`,
|
|
602
605
|
"X-Deepline-Client-Family": "sdk",
|
|
603
606
|
"X-Deepline-CLI-Family": "sdk",
|
|
604
|
-
"X-Deepline-Agent-Runtime":
|
|
605
|
-
"X-Deepline-CLI-Version":
|
|
606
|
-
"X-Deepline-SDK-Version":
|
|
607
|
+
"X-Deepline-Agent-Runtime": _chunkDM3SHV6Ujs.detectAgentRuntime.call(void 0, ),
|
|
608
|
+
"X-Deepline-CLI-Version": _chunkDM3SHV6Ujs.SDK_VERSION,
|
|
609
|
+
"X-Deepline-SDK-Version": _chunkDM3SHV6Ujs.SDK_VERSION
|
|
607
610
|
};
|
|
608
611
|
}
|
|
609
612
|
async function postFailureReport(input) {
|
|
@@ -631,7 +634,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
631
634
|
if (isFailureReportingDisabled()) return false;
|
|
632
635
|
let apiKey = "";
|
|
633
636
|
try {
|
|
634
|
-
apiKey =
|
|
637
|
+
apiKey = _chunkDM3SHV6Ujs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
635
638
|
} catch (e7) {
|
|
636
639
|
return false;
|
|
637
640
|
}
|
|
@@ -658,7 +661,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
658
661
|
failure_code: failureCode2,
|
|
659
662
|
failure_stage: failureStage,
|
|
660
663
|
error_body: "Automatic Deepline skills installation failed.",
|
|
661
|
-
cli_version:
|
|
664
|
+
cli_version: _chunkDM3SHV6Ujs.SDK_VERSION,
|
|
662
665
|
context: {
|
|
663
666
|
environment: buildEnvironmentContext(),
|
|
664
667
|
skills_sync: {
|
|
@@ -778,7 +781,7 @@ function buildFailureReport(input) {
|
|
|
778
781
|
failure_kind: failureKind,
|
|
779
782
|
failure_code: code,
|
|
780
783
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
781
|
-
cli_version:
|
|
784
|
+
cli_version: _chunkDM3SHV6Ujs.SDK_VERSION,
|
|
782
785
|
context: {
|
|
783
786
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
784
787
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -798,8 +801,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
798
801
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
799
802
|
const exitCode = resolvedExitCode(input);
|
|
800
803
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
801
|
-
const baseUrl =
|
|
802
|
-
const apiKey =
|
|
804
|
+
const baseUrl = _chunkDM3SHV6Ujs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
805
|
+
const apiKey = _chunkDM3SHV6Ujs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
803
806
|
if (!apiKey) return false;
|
|
804
807
|
return postFailureReport({
|
|
805
808
|
baseUrl,
|
|
@@ -820,25 +823,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
820
823
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
821
824
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
822
825
|
function shouldSkipSkillsSync() {
|
|
823
|
-
if (
|
|
826
|
+
if (_chunkDM3SHV6Ujs.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
824
827
|
return true;
|
|
825
828
|
}
|
|
826
829
|
const value = _optionalChain([process, 'access', _56 => _56.env, 'access', _57 => _57.DEEPLINE_SKIP_SKILLS_SYNC, 'optionalAccess', _58 => _58.trim, 'call', _59 => _59(), 'access', _60 => _60.toLowerCase, 'call', _61 => _61()]);
|
|
827
830
|
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
828
831
|
}
|
|
829
832
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
830
|
-
return _path.join.call(void 0,
|
|
833
|
+
return _path.join.call(void 0, _chunkDM3SHV6Ujs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
831
834
|
}
|
|
832
835
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
833
836
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
834
|
-
var agentLeaseSegment =
|
|
837
|
+
var agentLeaseSegment = _chunkDM3SHV6Ujs.skillsAgentPathSegment;
|
|
835
838
|
function sortedLeaseAgents(agents) {
|
|
836
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
839
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkDM3SHV6Ujs.KNOWN_SKILL_AGENTS] : agents;
|
|
837
840
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
838
841
|
}
|
|
839
842
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
840
843
|
return _path.join.call(void 0,
|
|
841
|
-
|
|
844
|
+
_chunkDM3SHV6Ujs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
842
845
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
843
846
|
);
|
|
844
847
|
}
|
|
@@ -997,7 +1000,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
997
1000
|
constructor(baseUrl, error) {
|
|
998
1001
|
const detail = error instanceof Error ? error.message : String(error);
|
|
999
1002
|
super(
|
|
1000
|
-
`Could not save skills state in ${
|
|
1003
|
+
`Could not save skills state in ${_chunkDM3SHV6Ujs.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
1001
1004
|
);
|
|
1002
1005
|
this.name = "SkillsStateUnavailableError";
|
|
1003
1006
|
}
|
|
@@ -1082,7 +1085,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
1082
1085
|
}
|
|
1083
1086
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
1084
1087
|
return _path.join.call(void 0,
|
|
1085
|
-
|
|
1088
|
+
_chunkDM3SHV6Ujs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1086
1089
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
1087
1090
|
);
|
|
1088
1091
|
}
|
|
@@ -1116,8 +1119,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
1116
1119
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
1117
1120
|
}
|
|
1118
1121
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
1119
|
-
if (shouldSkipSkillsSync() ||
|
|
1120
|
-
const agents =
|
|
1122
|
+
if (shouldSkipSkillsSync() || _chunkDM3SHV6Ujs.hasActivePluginSkills.call(void 0, )) return;
|
|
1123
|
+
const agents = _chunkDM3SHV6Ujs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1121
1124
|
if (agents.length === 0) return;
|
|
1122
1125
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1123
1126
|
}
|
|
@@ -1133,7 +1136,7 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
|
1133
1136
|
}
|
|
1134
1137
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
1135
1138
|
return _path.join.call(void 0,
|
|
1136
|
-
|
|
1139
|
+
_chunkDM3SHV6Ujs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1137
1140
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
1138
1141
|
);
|
|
1139
1142
|
}
|
|
@@ -1162,7 +1165,7 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
1162
1165
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
1163
1166
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
1164
1167
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
1165
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess', _65 => _65.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames,
|
|
1168
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _65 => _65.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkDM3SHV6Ujs.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
1166
1169
|
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess', _66 => _66.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.`;
|
|
1167
1170
|
notice(
|
|
1168
1171
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
@@ -1250,7 +1253,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
1250
1253
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
1251
1254
|
}
|
|
1252
1255
|
function isDefaultAgentSet(agents) {
|
|
1253
|
-
return agents.length ===
|
|
1256
|
+
return agents.length === _chunkDM3SHV6Ujs.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkDM3SHV6Ujs.DEFAULT_SKILL_AGENTS[index]);
|
|
1254
1257
|
}
|
|
1255
1258
|
function safeSkillFilePath(value) {
|
|
1256
1259
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1447,7 +1450,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1447
1450
|
}
|
|
1448
1451
|
function noInstallerProbePath(baseUrl) {
|
|
1449
1452
|
return _path.join.call(void 0,
|
|
1450
|
-
|
|
1453
|
+
_chunkDM3SHV6Ujs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1451
1454
|
"skills-sync-no-installer-unknown.json"
|
|
1452
1455
|
);
|
|
1453
1456
|
}
|
|
@@ -1526,7 +1529,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1526
1529
|
function resolveSkillsInstallSpawn(install, platform2 = process.platform) {
|
|
1527
1530
|
return resolveShellSpawn(install.command, install.args, platform2);
|
|
1528
1531
|
}
|
|
1529
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1532
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkDM3SHV6Ujs.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1530
1533
|
const commands = [];
|
|
1531
1534
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1532
1535
|
if (probes.bunx === "available") {
|
|
@@ -1678,11 +1681,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1678
1681
|
}
|
|
1679
1682
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1680
1683
|
if (shouldSkipSkillsSync()) return;
|
|
1681
|
-
const usingPluginSkills =
|
|
1684
|
+
const usingPluginSkills = _chunkDM3SHV6Ujs.hasActivePluginSkills.call(void 0, );
|
|
1682
1685
|
if (usingPluginSkills) {
|
|
1683
1686
|
return;
|
|
1684
1687
|
}
|
|
1685
|
-
const agents =
|
|
1688
|
+
const agents = _chunkDM3SHV6Ujs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1686
1689
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1687
1690
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1688
1691
|
}
|
|
@@ -1710,7 +1713,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1710
1713
|
return;
|
|
1711
1714
|
}
|
|
1712
1715
|
try {
|
|
1713
|
-
const localVersion =
|
|
1716
|
+
const localVersion = _chunkDM3SHV6Ujs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1714
1717
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1715
1718
|
needsUpdate: options.update.needs_update,
|
|
1716
1719
|
remoteVersion: options.update.remote.version
|
|
@@ -1876,7 +1879,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1876
1879
|
}
|
|
1877
1880
|
}
|
|
1878
1881
|
runLegacySkillsCleanup(agents);
|
|
1879
|
-
if (!
|
|
1882
|
+
if (!_chunkDM3SHV6Ujs.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
1880
1883
|
notice(
|
|
1881
1884
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
1882
1885
|
);
|
|
@@ -1935,7 +1938,7 @@ function inferActiveSkillsScope(entrypoint = _nullishCoalesce(process.argv[1], (
|
|
|
1935
1938
|
return /[\\/]\.deepline[\\/]runtime[\\/]/.test(entrypoint) ? "local" : "global";
|
|
1936
1939
|
}
|
|
1937
1940
|
function resolveLocalRoot() {
|
|
1938
|
-
const target =
|
|
1941
|
+
const target = _chunkDM3SHV6Ujs.resolveProjectPinTarget.call(void 0, );
|
|
1939
1942
|
if (!target.ok) {
|
|
1940
1943
|
throw new Error(
|
|
1941
1944
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -1946,7 +1949,7 @@ function resolveLocalRoot() {
|
|
|
1946
1949
|
return target.dir;
|
|
1947
1950
|
}
|
|
1948
1951
|
function detectSkillsAgents(input) {
|
|
1949
|
-
const runtime = _nullishCoalesce(input.runtime, () => (
|
|
1952
|
+
const runtime = _nullishCoalesce(input.runtime, () => ( _chunkDM3SHV6Ujs.detectAgentRuntime.call(void 0, )));
|
|
1950
1953
|
const knownAgent = RUNTIME_TO_SKILLS_AGENT[runtime];
|
|
1951
1954
|
if (knownAgent) return [knownAgent];
|
|
1952
1955
|
const roots = [
|
|
@@ -1961,7 +1964,7 @@ function detectSkillsAgents(input) {
|
|
|
1961
1964
|
return detected.length > 0 ? detected : ["*"];
|
|
1962
1965
|
}
|
|
1963
1966
|
function skillsStatePathForScope(baseUrl, scope, root) {
|
|
1964
|
-
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0,
|
|
1967
|
+
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0, _chunkDM3SHV6Ujs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-install.json");
|
|
1965
1968
|
}
|
|
1966
1969
|
function buildSkillsPlan(input) {
|
|
1967
1970
|
const scopeArgs = input.scope === "global" ? ["--global"] : [];
|
|
@@ -2083,7 +2086,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2083
2086
|
scope = normalizeScope(options.scope);
|
|
2084
2087
|
root = scope === "local" ? resolveLocalRoot() : null;
|
|
2085
2088
|
} catch (error) {
|
|
2086
|
-
|
|
2089
|
+
_chunkUROXKPNDjs.printCommandEnvelope.call(void 0,
|
|
2087
2090
|
{
|
|
2088
2091
|
ok: false,
|
|
2089
2092
|
status: "failed",
|
|
@@ -2095,22 +2098,22 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2095
2098
|
);
|
|
2096
2099
|
return 2;
|
|
2097
2100
|
}
|
|
2098
|
-
const baseUrl =
|
|
2101
|
+
const baseUrl = _chunkDM3SHV6Ujs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
2099
2102
|
const catalog = {
|
|
2100
2103
|
skillNames: [...DEFAULT_SDK_SKILL_NAMES],
|
|
2101
|
-
version:
|
|
2104
|
+
version: _chunkDM3SHV6Ujs.SDK_VERSION
|
|
2102
2105
|
};
|
|
2103
2106
|
const agents = options.agent ? [options.agent] : detectSkillsAgents({ scope, root });
|
|
2104
2107
|
const plan = buildSkillsPlan({ baseUrl, scope, root, agents, ...catalog });
|
|
2105
2108
|
if (options.dryRun) {
|
|
2106
|
-
|
|
2109
|
+
_chunkUROXKPNDjs.printCommandEnvelope.call(void 0,
|
|
2107
2110
|
{ ok: true, status: "planned", dryRun: true, ...plan },
|
|
2108
2111
|
{ json: options.json }
|
|
2109
2112
|
);
|
|
2110
2113
|
return 0;
|
|
2111
2114
|
}
|
|
2112
2115
|
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !hasFailedAutomaticSkillsSync(baseUrl, agents)) {
|
|
2113
|
-
|
|
2116
|
+
_chunkUROXKPNDjs.printCommandEnvelope.call(void 0,
|
|
2114
2117
|
{
|
|
2115
2118
|
ok: true,
|
|
2116
2119
|
status: "current",
|
|
@@ -2145,7 +2148,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2145
2148
|
.../* @__PURE__ */ new Set([...plan.skillNames, ...LEGACY_SKILL_NAMES_TO_REMOVE])
|
|
2146
2149
|
];
|
|
2147
2150
|
const agentRoots = workspaceSkillRootsForAgents(plan.agents);
|
|
2148
|
-
|
|
2151
|
+
_chunkDM3SHV6Ujs.ensureProjectPrivatePathsIgnored.call(void 0, root, [
|
|
2149
2152
|
".deepline/",
|
|
2150
2153
|
...agentRoots.flatMap(
|
|
2151
2154
|
(agentRoot) => managedNames.map((name) => `${agentRoot}/skills/${name}/`)
|
|
@@ -2163,7 +2166,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2163
2166
|
} };
|
|
2164
2167
|
} catch (error) {
|
|
2165
2168
|
if (!(error instanceof SkillsStateUnavailableError)) throw error;
|
|
2166
|
-
|
|
2169
|
+
_chunkUROXKPNDjs.printCommandEnvelope.call(void 0,
|
|
2167
2170
|
{
|
|
2168
2171
|
ok: false,
|
|
2169
2172
|
status: "failed",
|
|
@@ -2179,7 +2182,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2179
2182
|
return 5;
|
|
2180
2183
|
}
|
|
2181
2184
|
if (!lease) {
|
|
2182
|
-
|
|
2185
|
+
_chunkUROXKPNDjs.printCommandEnvelope.call(void 0,
|
|
2183
2186
|
{
|
|
2184
2187
|
ok: false,
|
|
2185
2188
|
status: "failed",
|
|
@@ -2225,7 +2228,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2225
2228
|
throw new Error("Could not install the current Deepline skills.");
|
|
2226
2229
|
}
|
|
2227
2230
|
} catch (error) {
|
|
2228
|
-
|
|
2231
|
+
_chunkUROXKPNDjs.printCommandEnvelope.call(void 0,
|
|
2229
2232
|
{
|
|
2230
2233
|
ok: false,
|
|
2231
2234
|
status: "failed",
|
|
@@ -2264,7 +2267,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2264
2267
|
{
|
|
2265
2268
|
schemaVersion: 1,
|
|
2266
2269
|
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2267
|
-
cliVersion:
|
|
2270
|
+
cliVersion: _chunkDM3SHV6Ujs.SDK_VERSION,
|
|
2268
2271
|
scope,
|
|
2269
2272
|
agents,
|
|
2270
2273
|
skillsVersion: plan.version,
|
|
@@ -2279,7 +2282,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2279
2282
|
if (scope === "global") {
|
|
2280
2283
|
clearFailedAutomaticSkillsSync(baseUrl, agents);
|
|
2281
2284
|
}
|
|
2282
|
-
|
|
2285
|
+
_chunkUROXKPNDjs.printCommandEnvelope.call(void 0,
|
|
2283
2286
|
{
|
|
2284
2287
|
ok: true,
|
|
2285
2288
|
status: "complete",
|
|
@@ -2328,7 +2331,7 @@ Examples:
|
|
|
2328
2331
|
).action(async (options) => {
|
|
2329
2332
|
const claim = _optionalChain([options, 'access', _88 => _88.claim, 'optionalAccess', _89 => _89.trim, 'call', _90 => _90()]);
|
|
2330
2333
|
if (!claim) {
|
|
2331
|
-
|
|
2334
|
+
_chunkUROXKPNDjs.printCommandEnvelope.call(void 0,
|
|
2332
2335
|
{
|
|
2333
2336
|
ok: false,
|
|
2334
2337
|
status: "failed",
|
|
@@ -2341,7 +2344,7 @@ Examples:
|
|
|
2341
2344
|
process.exitCode = 2;
|
|
2342
2345
|
return;
|
|
2343
2346
|
}
|
|
2344
|
-
await syncSdkSkillsIfNeeded(
|
|
2347
|
+
await syncSdkSkillsIfNeeded(_chunkDM3SHV6Ujs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, ""), {
|
|
2345
2348
|
mode: "inline",
|
|
2346
2349
|
notices: "defer",
|
|
2347
2350
|
claim
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QZAP5VOS.mjs";
|
|
4
4
|
import {
|
|
5
5
|
printCommandEnvelope
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-F45425TB.mjs";
|
|
7
7
|
import {
|
|
8
8
|
resolveConfig,
|
|
9
9
|
sdkCliStateDirPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CCRQ2VGJ.mjs";
|
|
11
11
|
|
|
12
12
|
// src/cli/search-ref.ts
|
|
13
13
|
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
npmSupportsAllowScripts,
|
|
3
3
|
readNpmVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RSEVBSFE.mjs";
|
|
5
5
|
import {
|
|
6
6
|
resolveShellSpawn,
|
|
7
7
|
runSkillsCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3ITDKXNC.mjs";
|
|
9
9
|
import {
|
|
10
10
|
printCommandEnvelope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-F45425TB.mjs";
|
|
12
12
|
import {
|
|
13
13
|
autoDetectBaseUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CCRQ2VGJ.mjs";
|
|
15
15
|
|
|
16
16
|
// src/cli/commands/update.ts
|
|
17
17
|
import { spawn, spawnSync } from "child_process";
|
|
@@ -306,21 +306,6 @@ function shouldRunCliAutoUpdate(homeDir = homedir()) {
|
|
|
306
306
|
const preferences = readCliUpdatePreferences(homeDir);
|
|
307
307
|
return preferences.autoUpdateEnabled && preferences.pinnedVersion === null;
|
|
308
308
|
}
|
|
309
|
-
function consumePendingCliUpdateMessages(homeDir = homedir()) {
|
|
310
|
-
const preferences = readCliUpdatePreferences(homeDir);
|
|
311
|
-
const acknowledged = new Set(preferences.acknowledgedMessages);
|
|
312
|
-
const pending = CLI_UPDATE_MESSAGES.filter(({ id }) => !acknowledged.has(id));
|
|
313
|
-
if (pending.length === 0) return [];
|
|
314
|
-
for (const { id } of pending) acknowledged.add(id);
|
|
315
|
-
try {
|
|
316
|
-
writeCliUpdatePreferences(
|
|
317
|
-
{ ...preferences, acknowledgedMessages: [...acknowledged] },
|
|
318
|
-
homeDir
|
|
319
|
-
);
|
|
320
|
-
} catch {
|
|
321
|
-
}
|
|
322
|
-
return pending.map(({ message }) => message);
|
|
323
|
-
}
|
|
324
309
|
|
|
325
310
|
// src/cli/commands/update.ts
|
|
326
311
|
function canAutomaticallyApplyUpdatePlan(plan) {
|
|
@@ -1258,7 +1243,6 @@ export {
|
|
|
1258
1243
|
readCliUpdatePreferences,
|
|
1259
1244
|
setCliAutoUpdateEnabled,
|
|
1260
1245
|
shouldRunCliAutoUpdate,
|
|
1261
|
-
consumePendingCliUpdateMessages,
|
|
1262
1246
|
canAutomaticallyApplyUpdatePlan,
|
|
1263
1247
|
resolveUpdatePlan,
|
|
1264
1248
|
runAutomaticUpdatePlan,
|
|
@@ -1,10 +1,10 @@
|
|
|
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; } var _class;
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk3MXRNPBNjs = require('./chunk-3MXRNPBN.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -17,6 +17,28 @@ var _chunkK7FC5IUUjs = require('./chunk-K7FC5IUU.js');
|
|
|
17
17
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
18
18
|
|
|
19
19
|
// src/errors.ts
|
|
20
|
+
var CustomerDbQueryOutcomeUnknownError = (_class = class extends _chunk7P5AA3SNjs.DeeplineError {
|
|
21
|
+
__init() {this.outcome = "unknown"}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
constructor(cause, operationKey, options = {}) {
|
|
25
|
+
const recoveryAvailable = operationKey !== void 0 && options.recoveryAvailable !== false;
|
|
26
|
+
super(
|
|
27
|
+
operationKey === void 0 ? "SQL outcome is unknown. The unkeyed request was attempted once; inspect the database before issuing another write. An operation key added afterwards cannot recover this request." : recoveryAvailable ? "SQL outcome is unknown. Recover by submitting the same SQL and options with the original operation key; do not use a new key." : "SQL outcome is unknown. The server did not confirm atomic recovery support. Do not resubmit this write; inspect the database and confirm reader support before recovering with the original operation key.",
|
|
28
|
+
cause.statusCode,
|
|
29
|
+
"CUSTOMER_DB_QUERY_OUTCOME_UNKNOWN",
|
|
30
|
+
{
|
|
31
|
+
outcome: "unknown",
|
|
32
|
+
recovery: recoveryAvailable ? "original_operation_key" : "unavailable",
|
|
33
|
+
causeCode: cause.code
|
|
34
|
+
}
|
|
35
|
+
);_class.prototype.__init.call(this);;
|
|
36
|
+
this.name = "CustomerDbQueryOutcomeUnknownError";
|
|
37
|
+
this.operationKey = operationKey;
|
|
38
|
+
this.retryable = recoveryAvailable;
|
|
39
|
+
Object.defineProperty(this, "cause", { value: cause, configurable: true });
|
|
40
|
+
}
|
|
41
|
+
}, _class);
|
|
20
42
|
var AuthError = class extends _chunk7P5AA3SNjs.DeeplineError {
|
|
21
43
|
/** Constructed by the SDK when Deepline rejects the caller's credentials. */
|
|
22
44
|
constructor(message = "Authentication failed. Check your DEEPLINE_API_KEY.") {
|
|
@@ -721,9 +743,9 @@ function resolveCliCommandContext(inputConfig, requestedScope) {
|
|
|
721
743
|
}
|
|
722
744
|
|
|
723
745
|
// src/version.ts
|
|
724
|
-
var SDK_VERSION =
|
|
725
|
-
var SDK_API_MAJOR =
|
|
726
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
746
|
+
var SDK_VERSION = _chunk3MXRNPBNjs.SDK_RELEASE.version;
|
|
747
|
+
var SDK_API_MAJOR = _chunk3MXRNPBNjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
748
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunk3MXRNPBNjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
727
749
|
|
|
728
750
|
// src/agent-runtime.ts
|
|
729
751
|
|
|
@@ -1998,4 +2020,5 @@ ${COWORK_NETWORK_HINT}`;
|
|
|
1998
2020
|
|
|
1999
2021
|
|
|
2000
2022
|
|
|
2001
|
-
|
|
2023
|
+
|
|
2024
|
+
exports.CustomerDbQueryOutcomeUnknownError = CustomerDbQueryOutcomeUnknownError; exports.AuthError = AuthError; exports.RateLimitError = RateLimitError; exports.ToolRateLimitError = ToolRateLimitError; exports.ConfigError = ConfigError; exports.HOST_URL_ENV = HOST_URL_ENV; exports.API_KEY_ENV = API_KEY_ENV; exports.ACTIVE_ORG_ID_ENV = ACTIVE_ORG_ID_ENV; exports.ACTIVE_ORG_NAME_ENV = ACTIVE_ORG_NAME_ENV; exports.FEATURES_ENV = FEATURES_ENV; exports.PROD_URL = PROD_URL; exports.featureEnvValues = featureEnvValues; exports.storedHostApiKey = storedHostApiKey; exports.storedHostFeatures = storedHostFeatures; exports.baseUrlSlug = baseUrlSlug; exports.sdkCliStateDirPath = sdkCliStateDirPath; exports.hostConfigDirPath = hostConfigDirPath; exports.hostEnvFilePath = hostEnvFilePath; exports.saveHostEnvValues = saveHostEnvValues; exports.autoDetectBaseUrl = autoDetectBaseUrl; exports.resolveApiKeyForBaseUrl = resolveApiKeyForBaseUrl; exports.resolveProjectApiKeyForBaseUrl = resolveProjectApiKeyForBaseUrl; exports.resolveGlobalApiKeyForBaseUrl = resolveGlobalApiKeyForBaseUrl; exports.getResolvedProjectAuthSource = getResolvedProjectAuthSource; exports.resolveBaseUrlOnly = resolveBaseUrlOnly; exports.resolveConfig = resolveConfig; exports.ensureProjectPrivatePathsIgnored = ensureProjectPrivatePathsIgnored; exports.saveProjectDeeplineEnvValues = saveProjectDeeplineEnvValues; exports.resolveProjectPinTarget = resolveProjectPinTarget; exports.getActiveProjectAuthSource = getActiveProjectAuthSource; exports.resolveCliAuthProvenance = resolveCliAuthProvenance; exports.resolveCliCommandContext = resolveCliCommandContext; exports.SDK_VERSION = SDK_VERSION; exports.SDK_API_MAJOR = SDK_API_MAJOR; exports.SDK_API_CONTRACT = SDK_API_CONTRACT; exports.detectAgentRuntime = detectAgentRuntime; exports.hasActivePluginSkills = hasActivePluginSkills; exports.KNOWN_SKILL_AGENTS = KNOWN_SKILL_AGENTS; exports.DEFAULT_SKILL_AGENTS = DEFAULT_SKILL_AGENTS; exports.skillsAgentPathSegment = skillsAgentPathSegment; exports.resolveAutoSyncSkillAgents = resolveAutoSyncSkillAgents; exports.readSdkSkillsLocalVersion = readSdkSkillsLocalVersion; exports.writeSdkSkillsLocalVersion = writeSdkSkillsLocalVersion; exports.deploymentProtectionHeaders = deploymentProtectionHeaders; exports.fetchWithDeploymentProtection = fetchWithDeploymentProtection; exports.COORDINATOR_INTERNAL_TOKEN_HEADER = COORDINATOR_INTERNAL_TOKEN_HEADER; exports.RUNTIME_ENVIRONMENT_TOKEN_HEADER = RUNTIME_ENVIRONMENT_TOKEN_HEADER; exports.RETAINED_PIPELINE_RECEIVERS_HEADER = RETAINED_PIPELINE_RECEIVERS_HEADER; exports.HttpClient = HttpClient;
|