allagents 0.20.0 → 0.20.1
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/index.js +28 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25749,7 +25749,7 @@ async function addPluginToUserConfig(plugin, configPath, autoRegistered) {
|
|
|
25749
25749
|
}
|
|
25750
25750
|
config.plugins.push(plugin);
|
|
25751
25751
|
await writeFile2(configPath, dump(config, { lineWidth: -1 }), "utf-8");
|
|
25752
|
-
return { success: true, ...autoRegistered && { autoRegistered } };
|
|
25752
|
+
return { success: true, ...autoRegistered && { autoRegistered }, normalizedPlugin: plugin };
|
|
25753
25753
|
} catch (error) {
|
|
25754
25754
|
return {
|
|
25755
25755
|
success: false,
|
|
@@ -26350,6 +26350,7 @@ async function resolvePluginSpecWithAutoRegister(spec, options2 = {}) {
|
|
|
26350
26350
|
const { plugin: pluginName, marketplaceName, owner, repo, subpath } = parsed;
|
|
26351
26351
|
const sourceLocation = owner && repo ? `${owner}/${repo}` : undefined;
|
|
26352
26352
|
let marketplace = await findMarketplace(marketplaceName, sourceLocation);
|
|
26353
|
+
let didAutoRegister = false;
|
|
26353
26354
|
if (!marketplace) {
|
|
26354
26355
|
const sourceToRegister = owner && repo ? `${owner}/${repo}` : marketplaceName;
|
|
26355
26356
|
const autoRegResult = await autoRegisterMarketplace(sourceToRegister);
|
|
@@ -26360,6 +26361,7 @@ async function resolvePluginSpecWithAutoRegister(spec, options2 = {}) {
|
|
|
26360
26361
|
};
|
|
26361
26362
|
}
|
|
26362
26363
|
marketplace = await getMarketplace(autoRegResult.name ?? marketplaceName);
|
|
26364
|
+
didAutoRegister = true;
|
|
26363
26365
|
}
|
|
26364
26366
|
if (!marketplace) {
|
|
26365
26367
|
return {
|
|
@@ -26392,11 +26394,12 @@ async function resolvePluginSpecWithAutoRegister(spec, options2 = {}) {
|
|
|
26392
26394
|
Expected at: ${join9(marketplace.path, expectedSubpath, pluginName)}`
|
|
26393
26395
|
};
|
|
26394
26396
|
}
|
|
26397
|
+
const shouldReturnRegisteredAs = didAutoRegister || marketplace.name !== marketplaceName;
|
|
26395
26398
|
return {
|
|
26396
26399
|
success: true,
|
|
26397
26400
|
path: resolved.path,
|
|
26398
26401
|
pluginName: resolved.plugin,
|
|
26399
|
-
...
|
|
26402
|
+
...shouldReturnRegisteredAs && { registeredAs: marketplace.name }
|
|
26400
26403
|
};
|
|
26401
26404
|
}
|
|
26402
26405
|
async function autoRegisterMarketplace(source) {
|
|
@@ -26567,7 +26570,8 @@ async function addPluginToConfig(plugin, configPath, autoRegistered) {
|
|
|
26567
26570
|
await writeFile4(configPath, newContent, "utf-8");
|
|
26568
26571
|
return {
|
|
26569
26572
|
success: true,
|
|
26570
|
-
...autoRegistered && { autoRegistered }
|
|
26573
|
+
...autoRegistered && { autoRegistered },
|
|
26574
|
+
normalizedPlugin: plugin
|
|
26571
26575
|
};
|
|
26572
26576
|
} catch (error) {
|
|
26573
26577
|
return {
|
|
@@ -30302,7 +30306,7 @@ var package_default;
|
|
|
30302
30306
|
var init_package = __esm(() => {
|
|
30303
30307
|
package_default = {
|
|
30304
30308
|
name: "allagents",
|
|
30305
|
-
version: "0.20.
|
|
30309
|
+
version: "0.20.1",
|
|
30306
30310
|
description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
|
|
30307
30311
|
type: "module",
|
|
30308
30312
|
bin: {
|
|
@@ -34798,11 +34802,25 @@ var pluginListCmd = import_cmd_ts4.command({
|
|
|
34798
34802
|
const userPlugins = await getInstalledUserPlugins();
|
|
34799
34803
|
const projectPlugins = await getInstalledProjectPlugins(process.cwd());
|
|
34800
34804
|
const installedMap = new Map;
|
|
34805
|
+
const repoToMarketplace = new Map;
|
|
34806
|
+
for (const mp of marketplaces) {
|
|
34807
|
+
if (mp.source.type === "github") {
|
|
34808
|
+
const parts = mp.source.location.split("/");
|
|
34809
|
+
if (parts.length >= 2 && parts[1]) {
|
|
34810
|
+
repoToMarketplace.set(parts[1], mp.name);
|
|
34811
|
+
}
|
|
34812
|
+
}
|
|
34813
|
+
}
|
|
34814
|
+
const resolveMarketplaceName = (name) => {
|
|
34815
|
+
return repoToMarketplace.get(name) ?? name;
|
|
34816
|
+
};
|
|
34801
34817
|
for (const p of userPlugins) {
|
|
34802
|
-
|
|
34818
|
+
const mpName = resolveMarketplaceName(p.marketplace);
|
|
34819
|
+
installedMap.set(`${p.name}@${mpName}`, p);
|
|
34803
34820
|
}
|
|
34804
34821
|
for (const p of projectPlugins) {
|
|
34805
|
-
|
|
34822
|
+
const mpName = resolveMarketplaceName(p.marketplace);
|
|
34823
|
+
installedMap.set(`${p.name}@${mpName}`, p);
|
|
34806
34824
|
}
|
|
34807
34825
|
const versionMap = new Map;
|
|
34808
34826
|
for (const mp of toList) {
|
|
@@ -34942,11 +34960,12 @@ var pluginInstallCmd = import_cmd_ts4.command({
|
|
|
34942
34960
|
}
|
|
34943
34961
|
if (isJsonMode()) {
|
|
34944
34962
|
const { ok, syncData } = isUser ? await runUserSyncAndPrint() : await runSyncAndPrint();
|
|
34963
|
+
const displayPlugin2 = result.normalizedPlugin ?? plugin;
|
|
34945
34964
|
jsonOutput({
|
|
34946
34965
|
success: ok,
|
|
34947
34966
|
command: "plugin install",
|
|
34948
34967
|
data: {
|
|
34949
|
-
plugin,
|
|
34968
|
+
plugin: displayPlugin2,
|
|
34950
34969
|
scope: isUser ? "user" : "project",
|
|
34951
34970
|
autoRegistered: result.autoRegistered ?? null,
|
|
34952
34971
|
syncResult: syncData
|
|
@@ -34958,10 +34977,11 @@ var pluginInstallCmd = import_cmd_ts4.command({
|
|
|
34958
34977
|
}
|
|
34959
34978
|
return;
|
|
34960
34979
|
}
|
|
34980
|
+
const displayPlugin = result.normalizedPlugin ?? plugin;
|
|
34961
34981
|
if (result.autoRegistered) {
|
|
34962
34982
|
console.log(`✓ Auto-registered marketplace: ${result.autoRegistered}`);
|
|
34963
34983
|
}
|
|
34964
|
-
console.log(`✓ Installed plugin (${isUser ? "user" : "project"} scope): ${
|
|
34984
|
+
console.log(`✓ Installed plugin (${isUser ? "user" : "project"} scope): ${displayPlugin}`);
|
|
34965
34985
|
const { ok: syncOk } = isUser ? await runUserSyncAndPrint() : await runSyncAndPrint();
|
|
34966
34986
|
if (!syncOk) {
|
|
34967
34987
|
process.exit(1);
|