@f5-sales-demo/xcsh 22.4.2 → 22.4.3
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5-sales-demo/xcsh",
|
|
4
|
-
"version": "22.4.
|
|
4
|
+
"version": "22.4.3",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://github.com/f5-sales-demo/xcsh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -67,13 +67,13 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
70
|
-
"@f5-sales-demo/pi-agent-core": "22.4.
|
|
71
|
-
"@f5-sales-demo/pi-ai": "22.4.
|
|
72
|
-
"@f5-sales-demo/pi-natives": "22.4.
|
|
73
|
-
"@f5-sales-demo/pi-resource-management": "22.4.
|
|
74
|
-
"@f5-sales-demo/pi-tui": "22.4.
|
|
75
|
-
"@f5-sales-demo/pi-utils": "22.4.
|
|
76
|
-
"@f5-sales-demo/xcsh-stats": "22.4.
|
|
70
|
+
"@f5-sales-demo/pi-agent-core": "22.4.3",
|
|
71
|
+
"@f5-sales-demo/pi-ai": "22.4.3",
|
|
72
|
+
"@f5-sales-demo/pi-natives": "22.4.3",
|
|
73
|
+
"@f5-sales-demo/pi-resource-management": "22.4.3",
|
|
74
|
+
"@f5-sales-demo/pi-tui": "22.4.3",
|
|
75
|
+
"@f5-sales-demo/pi-utils": "22.4.3",
|
|
76
|
+
"@f5-sales-demo/xcsh-stats": "22.4.3",
|
|
77
77
|
"@mozilla/readability": "^0.6",
|
|
78
78
|
"@resvg/resvg-wasm": "2.6.2",
|
|
79
79
|
"@sinclair/typebox": "0.34.52",
|
|
@@ -679,13 +679,32 @@ export async function discoverAndLoadExtensions(
|
|
|
679
679
|
addPaths(await logger.time("ext:pluginPaths", () => getAllPluginExtensionPaths(cwd)));
|
|
680
680
|
|
|
681
681
|
// 2b. Discover extension entry points from marketplace-cached plugins
|
|
682
|
+
const marketplaceDiagnostics: Array<{ path: string; error: string }> = [];
|
|
682
683
|
await logger.time("ext:marketplaceRoots", async () => {
|
|
683
684
|
for (const root of getPreloadedPluginRoots()) {
|
|
684
685
|
try {
|
|
685
686
|
const rootPath = await fs.realpath(root.path);
|
|
686
|
-
const
|
|
687
|
-
|
|
688
|
-
|
|
687
|
+
const canonicalPath = path.join(rootPath, ".xcsh-plugin", "plugin.json");
|
|
688
|
+
let canonical: { extensions?: unknown; lifecycle?: { integrations?: unknown } } | undefined;
|
|
689
|
+
try {
|
|
690
|
+
canonical = await Bun.file(canonicalPath).json();
|
|
691
|
+
} catch {
|
|
692
|
+
// A marketplace plugin may use package metadata only.
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
// The canonical manifest owns an explicitly declared extension list. Older marketplace
|
|
696
|
+
// plugins keep lifecycle metadata in that manifest and their extension declaration in
|
|
697
|
+
// package.json, so use the established package contract only when it is omitted.
|
|
698
|
+
let extensions = canonical?.extensions;
|
|
699
|
+
let declarationPath = canonicalPath;
|
|
700
|
+
if (extensions === undefined) {
|
|
701
|
+
const packagePath = path.join(rootPath, "package.json");
|
|
702
|
+
const pkg = await Bun.file(packagePath).json();
|
|
703
|
+
extensions = pkg?.xcsh?.extensions ?? pkg?.pi?.extensions;
|
|
704
|
+
declarationPath = packagePath;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
let loadedEntries = 0;
|
|
689
708
|
if (Array.isArray(extensions)) {
|
|
690
709
|
for (const entry of extensions) {
|
|
691
710
|
if (typeof entry !== "string") continue;
|
|
@@ -699,10 +718,22 @@ export async function discoverAndLoadExtensions(
|
|
|
699
718
|
if (!resolved.startsWith(rootPath + path.sep) && resolved !== rootPath) continue;
|
|
700
719
|
if (isDisabledName(getExtensionNameFromPath(resolved))) continue;
|
|
701
720
|
addPath(resolved);
|
|
721
|
+
loadedEntries++;
|
|
702
722
|
}
|
|
703
723
|
}
|
|
704
|
-
|
|
705
|
-
|
|
724
|
+
|
|
725
|
+
const integrations = canonical?.lifecycle?.integrations;
|
|
726
|
+
if (Array.isArray(integrations) && integrations.some(id => typeof id === "string") && loadedEntries === 0) {
|
|
727
|
+
marketplaceDiagnostics.push({
|
|
728
|
+
path: root.path,
|
|
729
|
+
error: `Marketplace plugin ${root.plugin} declares lifecycle integrations but no extension entrypoint could be loaded from ${declarationPath}`,
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
} catch (error) {
|
|
733
|
+
marketplaceDiagnostics.push({
|
|
734
|
+
path: root.path,
|
|
735
|
+
error: `Failed to read marketplace extension metadata: ${error instanceof Error ? error.message : String(error)}`,
|
|
736
|
+
});
|
|
706
737
|
}
|
|
707
738
|
}
|
|
708
739
|
});
|
|
@@ -737,6 +768,7 @@ export async function discoverAndLoadExtensions(
|
|
|
737
768
|
|
|
738
769
|
const resolvedEventBus = eventBus ?? new EventBus();
|
|
739
770
|
const result = await logger.time("ext:loadLoop", () => loadExtensions(allPaths, cwd, resolvedEventBus));
|
|
771
|
+
result.errors.push(...marketplaceDiagnostics);
|
|
740
772
|
await logger.time("ext:loadBundled", () => loadBundledExtensions(result, cwd, resolvedEventBus, isDisabledName));
|
|
741
773
|
return result;
|
|
742
774
|
}
|