deepline 0.3.307 → 0.3.308
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/README.md +2 -1
- package/dist/bundling-sources/sdk/src/client.ts +270 -11
- package/dist/bundling-sources/sdk/src/compat.ts +27 -9
- package/dist/bundling-sources/sdk/src/index.ts +35 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/batch-runtime.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/batching-types.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +46 -16
- package/dist/bundling-sources/shared_libs/play-runtime/fullenrich-batching.ts +24 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-event-query.ts +872 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +595 -0
- package/dist/cli/auth-LWNR7TQB.js +31 -0
- package/dist/cli/{auth-AJPTFFC7.mjs → auth-ZWX4BF5K.mjs} +4 -4
- package/dist/cli/{billing-LPDYJLIL.mjs → billing-CLV5QRFQ.mjs} +4 -4
- package/dist/cli/{billing-SPBWUEOS.js → billing-H24FGAKE.js} +70 -70
- package/dist/cli/{chunk-O4OESDIN.mjs → chunk-3GIUCJAT.mjs} +1 -1
- package/dist/cli/{chunk-D55NIPGU.mjs → chunk-ABMGEW3C.mjs} +1 -1
- package/dist/cli/{chunk-RXYYANYP.mjs → chunk-ASWZTTKT.mjs} +13 -5
- package/dist/cli/{chunk-G4SSYZND.mjs → chunk-BPD7TR27.mjs} +1 -1
- package/dist/cli/{chunk-ZGICKTW7.mjs → chunk-CXU7ME5X.mjs} +2 -2
- package/dist/cli/{chunk-HWCB5MHF.js → chunk-GBFIAI4L.js} +68 -60
- package/dist/cli/{chunk-MZQP7CIL.js → chunk-GONK2N7U.js} +1 -1
- package/dist/cli/{chunk-TLTKAJ6S.mjs → chunk-HGI6RGHB.mjs} +653 -5
- package/dist/cli/{chunk-K2CQ2RBJ.js → chunk-IFIGQWHC.js} +6 -6
- package/dist/cli/{chunk-7ONALPWY.mjs → chunk-JUAVGRD7.mjs} +4 -4
- package/dist/cli/{chunk-GUIQWUCB.js → chunk-O7NNH76S.js} +6 -6
- package/dist/cli/{chunk-2IKIG333.js → chunk-QJBJZVG6.js} +15 -4
- package/dist/cli/{chunk-AKE6ZFIJ.js → chunk-QTCFSRGC.js} +4 -4
- package/dist/cli/{chunk-ZIF6JOOI.js → chunk-SRZ6XDX3.js} +26 -26
- package/dist/cli/{chunk-MPVXXDWH.mjs → chunk-T3P4NRZU.mjs} +1 -1
- package/dist/cli/{chunk-KCHBE2J3.js → chunk-TH3YBIJT.js} +852 -204
- package/dist/cli/{chunk-DF3XJ2V2.js → chunk-UGTYNMRX.js} +48 -48
- package/dist/cli/{chunk-76MFV3AC.js → chunk-WEZVPZPE.js} +2 -2
- package/dist/cli/{chunk-UABLQKTZ.mjs → chunk-WXLOW623.mjs} +11 -0
- package/dist/cli/{chunk-ILOCS73R.mjs → chunk-XFYVL7EM.mjs} +2 -2
- package/dist/cli/{chunk-BDFVIOLY.mjs → chunk-XSDL3NHZ.mjs} +3 -3
- package/dist/cli/{chunk-JNHXSZPB.js → chunk-YEJMVAD3.js} +6 -6
- package/dist/cli/{chunk-QACDLYNO.mjs → chunk-YSZSERRZ.mjs} +1 -1
- package/dist/cli/{chunk-IVXD2KA2.js → chunk-ZHHF24O5.js} +15 -15
- package/dist/cli/client-3J76AMVE.js +20 -0
- package/dist/cli/{client-7ZL4ROII.mjs → client-A5ILG5GT.mjs} +3 -3
- package/dist/cli/{csv-Y3LYCTGD.mjs → csv-NZ7KAYEF.mjs} +3 -3
- package/dist/cli/{csv-JUDFG7JV.js → csv-VSSAAXFX.js} +12 -12
- package/dist/cli/{db-5IXGEXNT.js → db-ICLEBSNO.js} +20 -20
- package/dist/cli/{db-GCOJD2BD.mjs → db-YSAJUBLD.mjs} +4 -4
- package/dist/cli/{executions-FIICTMSY.mjs → executions-MUJRAT5R.mjs} +4 -4
- package/dist/cli/{executions-LIEQKFT7.js → executions-XCAJB5TF.js} +6 -6
- package/dist/cli/{feedback-3OVAA3C7.mjs → feedback-6C7Y2SCJ.mjs} +3 -3
- package/dist/cli/{feedback-FAADYNAR.js → feedback-DBZMBHZG.js} +6 -6
- package/dist/cli/git-2NSE4WIK.js +23 -0
- package/dist/cli/{git-ESMYCYJO.mjs → git-EAH67ITA.mjs} +4 -4
- package/dist/cli/index.js +79 -77
- package/dist/cli/index.mjs +33 -31
- package/dist/cli/{legacy-noops-PKI3RFZW.js → legacy-noops-EJTOLTVO.js} +7 -7
- package/dist/cli/{legacy-noops-KP5CPZRK.mjs → legacy-noops-O5INQP6Q.mjs} +4 -4
- package/dist/cli/{monitors-KCFBLAFZ.js → monitors-5OYO2DPJ.js} +85 -85
- package/dist/cli/{monitors-A6KGGSBO.mjs → monitors-SBBBMUFY.mjs} +4 -4
- package/dist/cli/{org-WI6DEXZQ.js → org-SJRPJG42.js} +60 -60
- package/dist/cli/{org-DHI24UOK.mjs → org-Z7LTOL3H.mjs} +4 -4
- package/dist/cli/{play-2YXLQD24.mjs → play-2JTIEOZM.mjs} +472 -55
- package/dist/cli/{play-4EUUN76H.js → play-VQJ6ABZ2.js} +961 -544
- package/dist/cli/{providers-DWS3XIM6.js → providers-43MR5XOV.js} +7 -7
- package/dist/cli/{providers-2WZ6KHH2.mjs → providers-MX4CV2EH.mjs} +4 -4
- package/dist/cli/{quickstart-TDTDKM6F.js → quickstart-A6W3HEE2.js} +5 -5
- package/dist/cli/{quickstart-ZFZVG6UO.mjs → quickstart-Y4YLKRZ3.mjs} +3 -3
- package/dist/cli/{search-GMPXRQF4.js → search-AMUFSAFP.js} +6 -6
- package/dist/cli/{search-BBE2ZMCI.mjs → search-FRKDLJQG.mjs} +5 -5
- package/dist/cli/{secrets-JEJL3KIM.mjs → secrets-E4EX7O3J.mjs} +4 -4
- package/dist/cli/{secrets-SMBX4IE6.js → secrets-XITHKZW2.js} +13 -13
- package/dist/cli/{sessions-S6AWG747.js → sessions-6HJFDIR2.js} +5 -5
- package/dist/cli/{sessions-AVU353UT.mjs → sessions-6YXAUJII.mjs} +4 -4
- package/dist/cli/{settings-KBW4ROHC.js → settings-J5NRLCV2.js} +74 -74
- package/dist/cli/{settings-GY5CYRLF.mjs → settings-LBJSZIET.mjs} +7 -7
- package/dist/cli/{setup-WSVIDSEV.js → setup-2ES4CTO5.js} +41 -41
- package/dist/cli/{setup-4CW3XGGX.mjs → setup-75FENNVH.mjs} +6 -6
- package/dist/cli/skills-VLTAVA4K.js +28 -0
- package/dist/cli/{skills-U3NXFSFK.mjs → skills-XGZDUXW6.mjs} +4 -4
- package/dist/cli/{tools-XU6KLJZT.mjs → tools-2LEKXOGY.mjs} +58 -42
- package/dist/cli/{tools-KZKELW25.js → tools-ZOQOGDKI.js} +111 -95
- package/dist/cli/update-5CZOVYQT.js +28 -0
- package/dist/cli/{update-RZLH46DR.mjs → update-SNK3IN3I.mjs} +6 -6
- package/dist/cli/{workflow-ZQUKQI35.mjs → workflow-G7ZM3MAC.mjs} +5 -5
- package/dist/cli/{workflow-GDOGDGTZ.js → workflow-W3AYTB3J.js} +15 -15
- package/dist/{client-Dj8MAkDc.d.mts → client-DpnkGBn-.d.mts} +324 -11
- package/dist/{client-DsrFGXJf.d.ts → client-ypdBvf1o.d.ts} +324 -11
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -6
- package/dist/index.mjs +5 -3
- package/dist/install-integrity.json +73 -72
- 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-TUQTQIH4.js +0 -31
- package/dist/cli/client-S3MIFPM2.js +0 -20
- package/dist/cli/git-GG6LWE2R.js +0 -23
- package/dist/cli/skills-6AU3RRAD.js +0 -28
- package/dist/cli/update-LVXXQF4A.js +0 -28
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkYEJMVAD3js = require('./chunk-YEJMVAD3.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -22,7 +22,7 @@ var _chunkJNHXSZPBjs = require('./chunk-JNHXSZPB.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkQTCFSRGCjs = require('./chunk-QTCFSRGC.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
@@ -116,7 +116,7 @@ function skillsSourceUrl(baseUrl) {
|
|
|
116
116
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
117
117
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
118
118
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
119
|
-
const agents = _nullishCoalesce(options.agents, () => (
|
|
119
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunkQTCFSRGCjs.DEFAULT_SKILL_AGENTS));
|
|
120
120
|
const values = {
|
|
121
121
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
122
122
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -192,7 +192,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
192
192
|
return value === "1" || value === "true" || value === "yes";
|
|
193
193
|
}
|
|
194
194
|
function sdkCompatibilityCachePath(baseUrl, homeDir = _os.homedir.call(void 0, )) {
|
|
195
|
-
return _path.join.call(void 0,
|
|
195
|
+
return _path.join.call(void 0, _chunkQTCFSRGCjs.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
196
196
|
}
|
|
197
197
|
function legacySdkCompatibilityCachePath(homeDir = _os.homedir.call(void 0, )) {
|
|
198
198
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -200,9 +200,9 @@ function legacySdkCompatibilityCachePath(homeDir = _os.homedir.call(void 0, )) {
|
|
|
200
200
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
201
201
|
return JSON.stringify({
|
|
202
202
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
203
|
-
version:
|
|
204
|
-
apiContract:
|
|
205
|
-
apiMajor:
|
|
203
|
+
version: _chunkQTCFSRGCjs.SDK_VERSION,
|
|
204
|
+
apiContract: _chunkQTCFSRGCjs.SDK_API_CONTRACT,
|
|
205
|
+
apiMajor: _chunkQTCFSRGCjs.SDK_API_MAJOR,
|
|
206
206
|
command: _optionalChain([command, 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]) || null,
|
|
207
207
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
208
208
|
});
|
|
@@ -210,8 +210,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
210
210
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
211
211
|
return JSON.stringify({
|
|
212
212
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
213
|
-
version:
|
|
214
|
-
apiContract:
|
|
213
|
+
version: _chunkQTCFSRGCjs.SDK_VERSION,
|
|
214
|
+
apiContract: _chunkQTCFSRGCjs.SDK_API_CONTRACT,
|
|
215
215
|
command: _optionalChain([command, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]) || null
|
|
216
216
|
});
|
|
217
217
|
}
|
|
@@ -304,37 +304,45 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
304
304
|
);
|
|
305
305
|
try {
|
|
306
306
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
307
|
-
url.searchParams.set("version",
|
|
307
|
+
url.searchParams.set("version", _chunkQTCFSRGCjs.SDK_VERSION);
|
|
308
308
|
if (_optionalChain([options, 'access', _19 => _19.command, 'optionalAccess', _20 => _20.trim, 'call', _21 => _21()])) {
|
|
309
309
|
url.searchParams.set("command", options.command.trim());
|
|
310
310
|
}
|
|
311
311
|
if (options.skillsVersion !== void 0) {
|
|
312
312
|
url.searchParams.set("skills_version", _nullishCoalesce(options.skillsVersion, () => ( "")));
|
|
313
313
|
}
|
|
314
|
+
if (options.catalog) {
|
|
315
|
+
url.searchParams.set("catalog_tool_id", options.catalog.toolId);
|
|
316
|
+
}
|
|
314
317
|
const response = await fetch(url, {
|
|
315
318
|
method: "GET",
|
|
316
319
|
headers: {
|
|
317
|
-
...
|
|
318
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
319
|
-
"X-Deepline-SDK-Version":
|
|
320
|
-
"X-Deepline-API-Major": String(
|
|
321
|
-
"X-Deepline-API-Contract":
|
|
322
|
-
"X-Deepline-CLI-Update-Preferences": "1"
|
|
320
|
+
..._chunkQTCFSRGCjs.deploymentProtectionHeaders.call(void 0, ),
|
|
321
|
+
"User-Agent": `deepline-ts-sdk/${_chunkQTCFSRGCjs.SDK_VERSION}`,
|
|
322
|
+
"X-Deepline-SDK-Version": _chunkQTCFSRGCjs.SDK_VERSION,
|
|
323
|
+
"X-Deepline-API-Major": String(_chunkQTCFSRGCjs.SDK_API_MAJOR),
|
|
324
|
+
"X-Deepline-API-Contract": _chunkQTCFSRGCjs.SDK_API_CONTRACT,
|
|
325
|
+
"X-Deepline-CLI-Update-Preferences": "1",
|
|
326
|
+
...options.catalog ? { Authorization: `Bearer ${_chunkQTCFSRGCjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {}
|
|
323
327
|
},
|
|
324
328
|
signal: controller.signal
|
|
325
329
|
});
|
|
326
|
-
const
|
|
327
|
-
if (!
|
|
330
|
+
const raw = await response.json().catch(() => null);
|
|
331
|
+
if (!raw || typeof raw.ok !== "boolean" || typeof raw.status !== "string") {
|
|
328
332
|
throw new Error(
|
|
329
333
|
`SDK compatibility endpoint returned a non-policy response (HTTP ${response.status}).`
|
|
330
334
|
);
|
|
331
335
|
}
|
|
336
|
+
const { catalog_metadata: catalogMetadata, ...data } = raw;
|
|
332
337
|
writeCachedCompatibility(
|
|
333
338
|
baseUrl,
|
|
334
339
|
options.command,
|
|
335
340
|
options.skillsVersion,
|
|
336
341
|
data
|
|
337
342
|
);
|
|
343
|
+
if (options.catalog && catalogMetadata && typeof catalogMetadata === "object" && "toolId" in catalogMetadata && catalogMetadata.toolId === options.catalog.toolId) {
|
|
344
|
+
options.catalog.acceptMetadata(catalogMetadata);
|
|
345
|
+
}
|
|
338
346
|
return { response: data, error: null };
|
|
339
347
|
} catch (error) {
|
|
340
348
|
const cached = readCachedCompatibility(
|
|
@@ -534,7 +542,7 @@ function buildEnvironmentContext() {
|
|
|
534
542
|
node_version: process.version,
|
|
535
543
|
runtime: "Node.js",
|
|
536
544
|
hostname: _os.hostname.call(void 0, ),
|
|
537
|
-
agent_runtime:
|
|
545
|
+
agent_runtime: _chunkQTCFSRGCjs.detectAgentRuntime.call(void 0, )
|
|
538
546
|
};
|
|
539
547
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
540
548
|
const normalized = _optionalChain([process, 'access', _32 => _32.env, 'access', _33 => _33[key], 'optionalAccess', _34 => _34.trim, 'call', _35 => _35()]);
|
|
@@ -558,12 +566,12 @@ function failureReportHeaders(apiKey) {
|
|
|
558
566
|
return {
|
|
559
567
|
Authorization: `Bearer ${apiKey}`,
|
|
560
568
|
"Content-Type": "application/json",
|
|
561
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
569
|
+
"User-Agent": `deepline-ts-sdk/${_chunkQTCFSRGCjs.SDK_VERSION}`,
|
|
562
570
|
"X-Deepline-Client-Family": "sdk",
|
|
563
571
|
"X-Deepline-CLI-Family": "sdk",
|
|
564
|
-
"X-Deepline-Agent-Runtime":
|
|
565
|
-
"X-Deepline-CLI-Version":
|
|
566
|
-
"X-Deepline-SDK-Version":
|
|
572
|
+
"X-Deepline-Agent-Runtime": _chunkQTCFSRGCjs.detectAgentRuntime.call(void 0, ),
|
|
573
|
+
"X-Deepline-CLI-Version": _chunkQTCFSRGCjs.SDK_VERSION,
|
|
574
|
+
"X-Deepline-SDK-Version": _chunkQTCFSRGCjs.SDK_VERSION
|
|
567
575
|
};
|
|
568
576
|
}
|
|
569
577
|
async function postFailureReport(input) {
|
|
@@ -591,7 +599,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
591
599
|
if (isFailureReportingDisabled()) return false;
|
|
592
600
|
let apiKey = "";
|
|
593
601
|
try {
|
|
594
|
-
apiKey =
|
|
602
|
+
apiKey = _chunkQTCFSRGCjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
595
603
|
} catch (e6) {
|
|
596
604
|
return false;
|
|
597
605
|
}
|
|
@@ -618,7 +626,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
618
626
|
failure_code: failureCode2,
|
|
619
627
|
failure_stage: failureStage,
|
|
620
628
|
error_body: "Automatic Deepline skills installation failed.",
|
|
621
|
-
cli_version:
|
|
629
|
+
cli_version: _chunkQTCFSRGCjs.SDK_VERSION,
|
|
622
630
|
context: {
|
|
623
631
|
environment: buildEnvironmentContext(),
|
|
624
632
|
skills_sync: {
|
|
@@ -738,7 +746,7 @@ function buildFailureReport(input) {
|
|
|
738
746
|
failure_kind: failureKind,
|
|
739
747
|
failure_code: code,
|
|
740
748
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
741
|
-
cli_version:
|
|
749
|
+
cli_version: _chunkQTCFSRGCjs.SDK_VERSION,
|
|
742
750
|
context: {
|
|
743
751
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
744
752
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -758,8 +766,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
758
766
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
759
767
|
const exitCode = resolvedExitCode(input);
|
|
760
768
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
761
|
-
const baseUrl =
|
|
762
|
-
const apiKey =
|
|
769
|
+
const baseUrl = _chunkQTCFSRGCjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
770
|
+
const apiKey = _chunkQTCFSRGCjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
763
771
|
if (!apiKey) return false;
|
|
764
772
|
return postFailureReport({
|
|
765
773
|
baseUrl,
|
|
@@ -780,25 +788,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
780
788
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
781
789
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
782
790
|
function shouldSkipSkillsSync() {
|
|
783
|
-
if (
|
|
791
|
+
if (_chunkQTCFSRGCjs.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
784
792
|
return true;
|
|
785
793
|
}
|
|
786
794
|
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()]);
|
|
787
795
|
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
788
796
|
}
|
|
789
797
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
790
|
-
return _path.join.call(void 0,
|
|
798
|
+
return _path.join.call(void 0, _chunkQTCFSRGCjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
791
799
|
}
|
|
792
800
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
793
801
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
794
|
-
var agentLeaseSegment =
|
|
802
|
+
var agentLeaseSegment = _chunkQTCFSRGCjs.skillsAgentPathSegment;
|
|
795
803
|
function sortedLeaseAgents(agents) {
|
|
796
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
804
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkQTCFSRGCjs.KNOWN_SKILL_AGENTS] : agents;
|
|
797
805
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
798
806
|
}
|
|
799
807
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
800
808
|
return _path.join.call(void 0,
|
|
801
|
-
|
|
809
|
+
_chunkQTCFSRGCjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
802
810
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
803
811
|
);
|
|
804
812
|
}
|
|
@@ -1015,7 +1023,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
1015
1023
|
}
|
|
1016
1024
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
1017
1025
|
return _path.join.call(void 0,
|
|
1018
|
-
|
|
1026
|
+
_chunkQTCFSRGCjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1019
1027
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
1020
1028
|
);
|
|
1021
1029
|
}
|
|
@@ -1049,8 +1057,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
1049
1057
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
1050
1058
|
}
|
|
1051
1059
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
1052
|
-
if (shouldSkipSkillsSync() ||
|
|
1053
|
-
const agents =
|
|
1060
|
+
if (shouldSkipSkillsSync() || _chunkQTCFSRGCjs.hasActivePluginSkills.call(void 0, )) return;
|
|
1061
|
+
const agents = _chunkQTCFSRGCjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1054
1062
|
if (agents.length === 0) return;
|
|
1055
1063
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1056
1064
|
}
|
|
@@ -1066,7 +1074,7 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
|
1066
1074
|
}
|
|
1067
1075
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
1068
1076
|
return _path.join.call(void 0,
|
|
1069
|
-
|
|
1077
|
+
_chunkQTCFSRGCjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1070
1078
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
1071
1079
|
);
|
|
1072
1080
|
}
|
|
@@ -1095,7 +1103,7 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
1095
1103
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
1096
1104
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
1097
1105
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
1098
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess', _65 => _65.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames,
|
|
1106
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _65 => _65.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkQTCFSRGCjs.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
1099
1107
|
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.`;
|
|
1100
1108
|
notice(
|
|
1101
1109
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
@@ -1182,7 +1190,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
1182
1190
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
1183
1191
|
}
|
|
1184
1192
|
function isDefaultAgentSet(agents) {
|
|
1185
|
-
return agents.length ===
|
|
1193
|
+
return agents.length === _chunkQTCFSRGCjs.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkQTCFSRGCjs.DEFAULT_SKILL_AGENTS[index]);
|
|
1186
1194
|
}
|
|
1187
1195
|
function safeSkillFilePath(value) {
|
|
1188
1196
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1379,7 +1387,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1379
1387
|
}
|
|
1380
1388
|
function noInstallerProbePath(baseUrl) {
|
|
1381
1389
|
return _path.join.call(void 0,
|
|
1382
|
-
|
|
1390
|
+
_chunkQTCFSRGCjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1383
1391
|
"skills-sync-no-installer-unknown.json"
|
|
1384
1392
|
);
|
|
1385
1393
|
}
|
|
@@ -1435,7 +1443,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1435
1443
|
function resolveSkillsInstallSpawn(install, platform2 = process.platform) {
|
|
1436
1444
|
return resolveShellSpawn(install.command, install.args, platform2);
|
|
1437
1445
|
}
|
|
1438
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1446
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkQTCFSRGCjs.DEFAULT_SKILL_AGENTS) {
|
|
1439
1447
|
const commands = [];
|
|
1440
1448
|
if (hasCommand("bunx")) {
|
|
1441
1449
|
const bunxArgs = buildBunxSkillsInstallArgs(baseUrl, skillNames, agents);
|
|
@@ -1586,11 +1594,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1586
1594
|
}
|
|
1587
1595
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1588
1596
|
if (shouldSkipSkillsSync()) return;
|
|
1589
|
-
const usingPluginSkills =
|
|
1597
|
+
const usingPluginSkills = _chunkQTCFSRGCjs.hasActivePluginSkills.call(void 0, );
|
|
1590
1598
|
if (usingPluginSkills) {
|
|
1591
1599
|
return;
|
|
1592
1600
|
}
|
|
1593
|
-
const agents =
|
|
1601
|
+
const agents = _chunkQTCFSRGCjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1594
1602
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1595
1603
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1596
1604
|
}
|
|
@@ -1614,7 +1622,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1614
1622
|
return;
|
|
1615
1623
|
}
|
|
1616
1624
|
try {
|
|
1617
|
-
const localVersion =
|
|
1625
|
+
const localVersion = _chunkQTCFSRGCjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1618
1626
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1619
1627
|
needsUpdate: options.update.needs_update,
|
|
1620
1628
|
remoteVersion: options.update.remote.version
|
|
@@ -1769,7 +1777,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1769
1777
|
}
|
|
1770
1778
|
}
|
|
1771
1779
|
runLegacySkillsCleanup(agents);
|
|
1772
|
-
if (!
|
|
1780
|
+
if (!_chunkQTCFSRGCjs.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
1773
1781
|
notice(
|
|
1774
1782
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
1775
1783
|
);
|
|
@@ -1827,7 +1835,7 @@ function inferActiveSkillsScope(entrypoint = _nullishCoalesce(process.argv[1], (
|
|
|
1827
1835
|
return /[\\/]\.deepline[\\/]runtime[\\/]/.test(entrypoint) ? "local" : "global";
|
|
1828
1836
|
}
|
|
1829
1837
|
function resolveLocalRoot() {
|
|
1830
|
-
const target =
|
|
1838
|
+
const target = _chunkQTCFSRGCjs.resolveProjectPinTarget.call(void 0, );
|
|
1831
1839
|
if (!target.ok) {
|
|
1832
1840
|
throw new Error(
|
|
1833
1841
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -1838,7 +1846,7 @@ function resolveLocalRoot() {
|
|
|
1838
1846
|
return target.dir;
|
|
1839
1847
|
}
|
|
1840
1848
|
function detectSkillsAgents(input) {
|
|
1841
|
-
const runtime = _nullishCoalesce(input.runtime, () => (
|
|
1849
|
+
const runtime = _nullishCoalesce(input.runtime, () => ( _chunkQTCFSRGCjs.detectAgentRuntime.call(void 0, )));
|
|
1842
1850
|
const knownAgent = RUNTIME_TO_SKILLS_AGENT[runtime];
|
|
1843
1851
|
if (knownAgent) return [knownAgent];
|
|
1844
1852
|
const roots = [
|
|
@@ -1853,7 +1861,7 @@ function detectSkillsAgents(input) {
|
|
|
1853
1861
|
return detected.length > 0 ? detected : ["*"];
|
|
1854
1862
|
}
|
|
1855
1863
|
function skillsStatePathForScope(baseUrl, scope, root) {
|
|
1856
|
-
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0,
|
|
1864
|
+
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0, _chunkQTCFSRGCjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-install.json");
|
|
1857
1865
|
}
|
|
1858
1866
|
function buildSkillsPlan(input) {
|
|
1859
1867
|
const scopeArgs = input.scope === "global" ? ["--global"] : [];
|
|
@@ -1969,7 +1977,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
1969
1977
|
scope = normalizeScope(options.scope);
|
|
1970
1978
|
root = scope === "local" ? resolveLocalRoot() : null;
|
|
1971
1979
|
} catch (error) {
|
|
1972
|
-
|
|
1980
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
1973
1981
|
{
|
|
1974
1982
|
ok: false,
|
|
1975
1983
|
status: "failed",
|
|
@@ -1981,22 +1989,22 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
1981
1989
|
);
|
|
1982
1990
|
return 2;
|
|
1983
1991
|
}
|
|
1984
|
-
const baseUrl =
|
|
1992
|
+
const baseUrl = _chunkQTCFSRGCjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
1985
1993
|
const catalog = {
|
|
1986
1994
|
skillNames: [...DEFAULT_SDK_SKILL_NAMES],
|
|
1987
|
-
version:
|
|
1995
|
+
version: _chunkQTCFSRGCjs.SDK_VERSION
|
|
1988
1996
|
};
|
|
1989
1997
|
const agents = options.agent ? [options.agent] : detectSkillsAgents({ scope, root });
|
|
1990
1998
|
const plan = buildSkillsPlan({ baseUrl, scope, root, agents, ...catalog });
|
|
1991
1999
|
if (options.dryRun) {
|
|
1992
|
-
|
|
2000
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
1993
2001
|
{ ok: true, status: "planned", dryRun: true, ...plan },
|
|
1994
2002
|
{ json: options.json }
|
|
1995
2003
|
);
|
|
1996
2004
|
return 0;
|
|
1997
2005
|
}
|
|
1998
2006
|
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !hasFailedAutomaticSkillsSync(baseUrl, agents)) {
|
|
1999
|
-
|
|
2007
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
2000
2008
|
{
|
|
2001
2009
|
ok: true,
|
|
2002
2010
|
status: "current",
|
|
@@ -2031,7 +2039,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2031
2039
|
.../* @__PURE__ */ new Set([...plan.skillNames, ...LEGACY_SKILL_NAMES_TO_REMOVE])
|
|
2032
2040
|
];
|
|
2033
2041
|
const agentRoots = workspaceSkillRootsForAgents(plan.agents);
|
|
2034
|
-
|
|
2042
|
+
_chunkQTCFSRGCjs.ensureProjectPrivatePathsIgnored.call(void 0, root, [
|
|
2035
2043
|
".deepline/",
|
|
2036
2044
|
...agentRoots.flatMap(
|
|
2037
2045
|
(agentRoot) => managedNames.map((name) => `${agentRoot}/skills/${name}/`)
|
|
@@ -2046,7 +2054,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2046
2054
|
}) : { release: () => {
|
|
2047
2055
|
} };
|
|
2048
2056
|
if (!lease) {
|
|
2049
|
-
|
|
2057
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
2050
2058
|
{
|
|
2051
2059
|
ok: false,
|
|
2052
2060
|
status: "failed",
|
|
@@ -2092,7 +2100,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2092
2100
|
throw new Error("Could not install the current Deepline skills.");
|
|
2093
2101
|
}
|
|
2094
2102
|
} catch (error) {
|
|
2095
|
-
|
|
2103
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
2096
2104
|
{
|
|
2097
2105
|
ok: false,
|
|
2098
2106
|
status: "failed",
|
|
@@ -2131,7 +2139,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2131
2139
|
{
|
|
2132
2140
|
schemaVersion: 1,
|
|
2133
2141
|
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2134
|
-
cliVersion:
|
|
2142
|
+
cliVersion: _chunkQTCFSRGCjs.SDK_VERSION,
|
|
2135
2143
|
scope,
|
|
2136
2144
|
agents,
|
|
2137
2145
|
skillsVersion: plan.version,
|
|
@@ -2146,7 +2154,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2146
2154
|
if (scope === "global") {
|
|
2147
2155
|
clearFailedAutomaticSkillsSync(baseUrl, agents);
|
|
2148
2156
|
}
|
|
2149
|
-
|
|
2157
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
2150
2158
|
{
|
|
2151
2159
|
ok: true,
|
|
2152
2160
|
status: "complete",
|
|
@@ -2195,7 +2203,7 @@ Examples:
|
|
|
2195
2203
|
).action(async (options) => {
|
|
2196
2204
|
const claim = _optionalChain([options, 'access', _88 => _88.claim, 'optionalAccess', _89 => _89.trim, 'call', _90 => _90()]);
|
|
2197
2205
|
if (!claim) {
|
|
2198
|
-
|
|
2206
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
2199
2207
|
{
|
|
2200
2208
|
ok: false,
|
|
2201
2209
|
status: "failed",
|
|
@@ -2208,7 +2216,7 @@ Examples:
|
|
|
2208
2216
|
process.exitCode = 2;
|
|
2209
2217
|
return;
|
|
2210
2218
|
}
|
|
2211
|
-
await syncSdkSkillsIfNeeded(
|
|
2219
|
+
await syncSdkSkillsIfNeeded(_chunkQTCFSRGCjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, ""), {
|
|
2212
2220
|
mode: "inline",
|
|
2213
2221
|
notices: "defer",
|
|
2214
2222
|
claim
|
|
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
|
|
|
49
49
|
// getters keep their established compatibility behavior.
|
|
50
50
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
51
51
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
52
|
-
version: "0.3.
|
|
52
|
+
version: "0.3.308",
|
|
53
53
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
54
54
|
packageCapabilities: {
|
|
55
55
|
updatePreferences: 1
|