agentinit 1.17.0 → 1.17.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/CHANGELOG.md +7 -0
- package/README.md +4 -0
- package/dist/cli.js +236 -33
- package/dist/commands/plugins.d.ts.map +1 -1
- package/dist/commands/plugins.js +131 -8
- package/dist/commands/plugins.js.map +1 -1
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/skills.js +69 -5
- package/dist/commands/skills.js.map +1 -1
- package/dist/core/pluginManager.d.ts +19 -3
- package/dist/core/pluginManager.d.ts.map +1 -1
- package/dist/core/pluginManager.js +17 -2
- package/dist/core/pluginManager.js.map +1 -1
- package/dist/core/skillsManager.d.ts +2 -0
- package/dist/core/skillsManager.d.ts.map +1 -1
- package/dist/core/skillsManager.js +7 -2
- package/dist/core/skillsManager.js.map +1 -1
- package/dist/types/skills.d.ts +1 -0
- package/dist/types/skills.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.17.1](https://github.com/agentinit/agentinit/compare/v1.17.0...v1.17.1) (2026-04-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* preserve multi-plugin bundle selection ([08e17d3](https://github.com/agentinit/agentinit/commit/08e17d3fd91049d22d846ffb54375f751f43b8b9))
|
|
7
|
+
|
|
1
8
|
# [1.17.0](https://github.com/agentinit/agentinit/compare/v1.16.2...v1.17.0) (2026-04-02)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -214,6 +214,8 @@ agentinit skills list --agent agents
|
|
|
214
214
|
agentinit skills remove openai-docs
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
+
If a GitHub or local Claude bundle contains multiple plugins, `agentinit skills add` prompts you to choose which bundled plugin to inspect or install. In non-interactive `--yes` mode, ambiguous multi-plugin bundles fail instead of prompting.
|
|
218
|
+
|
|
217
219
|
Skills are installed into a canonical store by default (`.agents/skills/` for project, `~/.agents/skills/` for global), with agent-specific paths symlinked automatically. Bare skill names resolve from your configured default marketplace, falling back to the public catalog at `vercel-labs/agent-skills`. Use `./name` for local paths, `owner/repo` for GitHub repos, or `--from <marketplace>` for explicit marketplace sources.
|
|
218
220
|
|
|
219
221
|
### `agentinit plugins`
|
|
@@ -250,6 +252,8 @@ agentinit plugins remove code-review
|
|
|
250
252
|
|
|
251
253
|
Bare plugin names resolve through your configured default marketplace. Built-in marketplaces include `claude` and `openai`; add custom ones with `agentinit config marketplaces add`. For Claude-format plugins, native bundles are installed into `~/.claude/plugins` alongside portable skill and MCP installs.
|
|
252
254
|
|
|
255
|
+
If a GitHub or local Claude bundle contains multiple plugins, `agentinit plugins install` prompts you to choose which bundled plugin to inspect or install. In non-interactive `--yes` mode, ambiguous multi-plugin bundles fail instead of prompting.
|
|
256
|
+
|
|
253
257
|
### `agentinit config`
|
|
254
258
|
|
|
255
259
|
Manage user-level marketplace and trust settings in `~/.agentinit/config.json`.
|
package/dist/cli.js
CHANGED
|
@@ -17055,6 +17055,11 @@ __export(exports_pluginManager, {
|
|
|
17055
17055
|
return PluginManager;
|
|
17056
17056
|
}
|
|
17057
17057
|
},
|
|
17058
|
+
MultipleBundlePluginsError: () => {
|
|
17059
|
+
{
|
|
17060
|
+
return MultipleBundlePluginsError;
|
|
17061
|
+
}
|
|
17062
|
+
},
|
|
17058
17063
|
MarketplacePluginNotFoundError: () => {
|
|
17059
17064
|
{
|
|
17060
17065
|
return MarketplacePluginNotFoundError;
|
|
@@ -17065,6 +17070,16 @@ import {resolve as resolve7, join as join4, basename as basename2, relative as r
|
|
|
17065
17070
|
import {promises as fs22} from "fs";
|
|
17066
17071
|
import {homedir as homedir4} from "os";
|
|
17067
17072
|
|
|
17073
|
+
class MultipleBundlePluginsError extends Error {
|
|
17074
|
+
entries;
|
|
17075
|
+
constructor(pluginDir, entries) {
|
|
17076
|
+
const names = entries.map((e) => e.name).join(", ");
|
|
17077
|
+
super(`Repository "${pluginDir}" is a Claude marketplace bundle with multiple plugins. Select one of: ${names}.`);
|
|
17078
|
+
this.name = "MultipleBundlePluginsError";
|
|
17079
|
+
this.entries = entries;
|
|
17080
|
+
}
|
|
17081
|
+
}
|
|
17082
|
+
|
|
17068
17083
|
class MarketplacePluginNotFoundError extends Error {
|
|
17069
17084
|
pluginName;
|
|
17070
17085
|
marketplaceId;
|
|
@@ -17202,7 +17217,7 @@ class PluginManager {
|
|
|
17202
17217
|
const candidates = new Set([source.pluginName, source.repo].filter((value) => !!value).flatMap((value) => [value, basename2(value)]));
|
|
17203
17218
|
const matched = entries.find((entry) => candidates.has(entry.name) || candidates.has(basename2(entry.source)));
|
|
17204
17219
|
if (!matched) {
|
|
17205
|
-
throw new
|
|
17220
|
+
throw new MultipleBundlePluginsError(pluginDir, entries);
|
|
17206
17221
|
}
|
|
17207
17222
|
selectedEntry = matched;
|
|
17208
17223
|
}
|
|
@@ -17279,6 +17294,9 @@ class PluginManager {
|
|
|
17279
17294
|
throw new Error(`Local path not found: ${pluginDir}`);
|
|
17280
17295
|
}
|
|
17281
17296
|
}
|
|
17297
|
+
if (options2.pluginName) {
|
|
17298
|
+
effectiveSource = { ...effectiveSource, pluginName: options2.pluginName };
|
|
17299
|
+
}
|
|
17282
17300
|
return {
|
|
17283
17301
|
plugin: await this.loadPluginFromDirectory(pluginDir, effectiveSource, resolutionWarnings),
|
|
17284
17302
|
effectiveSource,
|
|
@@ -18118,7 +18136,10 @@ ${body.trim()}
|
|
|
18118
18136
|
};
|
|
18119
18137
|
}
|
|
18120
18138
|
async installPlugin(source, projectPath, options2 = {}) {
|
|
18121
|
-
const context = this.takePreparedInstallContext(source, options2.from) || await this.loadPluginContext(source, {
|
|
18139
|
+
const context = this.takePreparedInstallContext(source, options2.from) || await this.loadPluginContext(source, {
|
|
18140
|
+
from: options2.from,
|
|
18141
|
+
...options2.pluginName ? { pluginName: options2.pluginName } : {}
|
|
18142
|
+
});
|
|
18122
18143
|
try {
|
|
18123
18144
|
const plugin = context.plugin;
|
|
18124
18145
|
if (options2.list) {
|
|
@@ -18748,12 +18769,13 @@ class SkillsManager {
|
|
|
18748
18769
|
const marketplaceHints = marketplaces.length > 0 ? ` If you meant a marketplace skill, use "${marketplaces[0]}/${normalizedSource}" or "--from ${marketplaces[0]}".` : "";
|
|
18749
18770
|
return new Error(`Local path not found: ${resolvedPath}. If you meant a local path, prefix it with "./".${marketplaceHints}`);
|
|
18750
18771
|
}
|
|
18751
|
-
async discoverMarketplaceSkills(source, projectPath) {
|
|
18772
|
+
async discoverMarketplaceSkills(source, projectPath, pluginName) {
|
|
18752
18773
|
const { PluginManager: PluginManager2 } = await Promise.resolve().then(() => (init_pluginManager(), exports_pluginManager));
|
|
18753
18774
|
const pluginManager = new PluginManager2(this.agentManager);
|
|
18754
18775
|
const result = await pluginManager.installPlugin(source.pluginName || this.getMarketplaceSourceId(source), projectPath, {
|
|
18755
18776
|
from: source.marketplace,
|
|
18756
|
-
list: true
|
|
18777
|
+
list: true,
|
|
18778
|
+
...pluginName ? { pluginName } : {}
|
|
18757
18779
|
});
|
|
18758
18780
|
const warnings = [...result.warnings];
|
|
18759
18781
|
if (result.plugin.mcpServers.length > 0) {
|
|
@@ -18817,6 +18839,9 @@ class SkillsManager {
|
|
|
18817
18839
|
async loadDiscoveredSkillsContext(source, projectPath, options2 = {}) {
|
|
18818
18840
|
const request = this.resolveSourceRequest(source, options2);
|
|
18819
18841
|
const resolved = request.source;
|
|
18842
|
+
if (options2.pluginName && resolved.type !== "marketplace") {
|
|
18843
|
+
resolved.pluginName = options2.pluginName;
|
|
18844
|
+
}
|
|
18820
18845
|
let tempDir = null;
|
|
18821
18846
|
const cleanup = async () => {
|
|
18822
18847
|
await this.cleanupTempDir(tempDir);
|
|
@@ -18824,7 +18849,7 @@ class SkillsManager {
|
|
|
18824
18849
|
};
|
|
18825
18850
|
try {
|
|
18826
18851
|
if (resolved.type === "marketplace") {
|
|
18827
|
-
const discovered = await this.discoverMarketplaceSkills(resolved, projectPath);
|
|
18852
|
+
const discovered = await this.discoverMarketplaceSkills(resolved, projectPath, options2.pluginName);
|
|
18828
18853
|
return {
|
|
18829
18854
|
...discovered,
|
|
18830
18855
|
cleanup
|
|
@@ -19093,7 +19118,8 @@ class SkillsManager {
|
|
|
19093
19118
|
}
|
|
19094
19119
|
async addFromSource(source, projectPath, options2 = {}) {
|
|
19095
19120
|
const context = this.takePreparedSourceContext(source, projectPath, options2.from) || await this.loadDiscoveredSkillsContext(source, projectPath, {
|
|
19096
|
-
...options2.from !== undefined ? { from: options2.from } : {}
|
|
19121
|
+
...options2.from !== undefined ? { from: options2.from } : {},
|
|
19122
|
+
...options2.pluginName !== undefined ? { pluginName: options2.pluginName } : {}
|
|
19097
19123
|
});
|
|
19098
19124
|
try {
|
|
19099
19125
|
let skills2 = context.skills;
|
|
@@ -41199,6 +41225,7 @@ var import_prompts2 = __toESM(require_prompts3(), 1);
|
|
|
41199
41225
|
import {homedir as homedir6} from "os";
|
|
41200
41226
|
import {relative as relative7, resolve as resolve12} from "path";
|
|
41201
41227
|
init_skillsManager();
|
|
41228
|
+
init_pluginManager();
|
|
41202
41229
|
init_marketplaceRegistry();
|
|
41203
41230
|
init_agentManager();
|
|
41204
41231
|
init_skills();
|
|
@@ -41218,21 +41245,63 @@ function registerSkillsCommand(program2) {
|
|
|
41218
41245
|
spinner2.stop();
|
|
41219
41246
|
displayDiscoveredSkills(result.skills, result.warnings);
|
|
41220
41247
|
} catch (error) {
|
|
41221
|
-
|
|
41222
|
-
|
|
41248
|
+
if (error instanceof MultipleBundlePluginsError) {
|
|
41249
|
+
spinner2.stop();
|
|
41250
|
+
const selected = await selectBundlePlugin(error, "list");
|
|
41251
|
+
if (!selected) {
|
|
41252
|
+
return;
|
|
41253
|
+
}
|
|
41254
|
+
const retrySpinner = ora("Discovering skills...").start();
|
|
41255
|
+
try {
|
|
41256
|
+
const result = await skillsManager5.discoverFromSource(source, process.cwd(), {
|
|
41257
|
+
from: options2.from,
|
|
41258
|
+
pluginName: selected
|
|
41259
|
+
});
|
|
41260
|
+
retrySpinner.stop();
|
|
41261
|
+
displayDiscoveredSkills(result.skills, result.warnings);
|
|
41262
|
+
} catch (retryError) {
|
|
41263
|
+
retrySpinner.fail("Failed to discover skills");
|
|
41264
|
+
logger.error(`Error: ${retryError instanceof Error ? retryError.message : "Unknown error"}`);
|
|
41265
|
+
}
|
|
41266
|
+
} else {
|
|
41267
|
+
spinner2.fail("Failed to discover skills");
|
|
41268
|
+
logger.error(`Error: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
41269
|
+
}
|
|
41223
41270
|
}
|
|
41224
41271
|
return;
|
|
41225
41272
|
}
|
|
41226
41273
|
const verifySpinner = ora("Verifying skill source...").start();
|
|
41274
|
+
let selectedPluginName;
|
|
41227
41275
|
try {
|
|
41228
41276
|
await skillsManager5.prepareSource(source, process.cwd(), {
|
|
41229
41277
|
from: options2.from
|
|
41230
41278
|
});
|
|
41231
41279
|
verifySpinner.stop();
|
|
41232
41280
|
} catch (error) {
|
|
41233
|
-
|
|
41234
|
-
|
|
41235
|
-
|
|
41281
|
+
if (error instanceof MultipleBundlePluginsError && !options2.yes) {
|
|
41282
|
+
verifySpinner.stop();
|
|
41283
|
+
const selected = await selectBundlePlugin(error, "install");
|
|
41284
|
+
if (!selected) {
|
|
41285
|
+
return;
|
|
41286
|
+
}
|
|
41287
|
+
selectedPluginName = selected;
|
|
41288
|
+
const retrySpinner = ora("Verifying skill source...").start();
|
|
41289
|
+
try {
|
|
41290
|
+
await skillsManager5.prepareSource(source, process.cwd(), {
|
|
41291
|
+
from: options2.from,
|
|
41292
|
+
pluginName: selectedPluginName
|
|
41293
|
+
});
|
|
41294
|
+
retrySpinner.stop();
|
|
41295
|
+
} catch (retryError) {
|
|
41296
|
+
retrySpinner.fail("Failed to verify skill source");
|
|
41297
|
+
logger.error(`Error: ${retryError instanceof Error ? retryError.message : "Unknown error"}`);
|
|
41298
|
+
return;
|
|
41299
|
+
}
|
|
41300
|
+
} else {
|
|
41301
|
+
verifySpinner.fail("Failed to verify skill source");
|
|
41302
|
+
logger.error(`Error: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
41303
|
+
return;
|
|
41304
|
+
}
|
|
41236
41305
|
}
|
|
41237
41306
|
let targetAgents = options2.agent;
|
|
41238
41307
|
let targetGlobal = options2.global;
|
|
@@ -41258,6 +41327,7 @@ function registerSkillsCommand(program2) {
|
|
|
41258
41327
|
...targetAgents !== undefined ? { agents: targetAgents } : {},
|
|
41259
41328
|
...options2.skill !== undefined ? { skills: options2.skill } : {},
|
|
41260
41329
|
...options2.copy !== undefined ? { copy: options2.copy } : {},
|
|
41330
|
+
...selectedPluginName !== undefined ? { pluginName: selectedPluginName } : {},
|
|
41261
41331
|
...options2.yes !== undefined ? { yes: options2.yes } : {}
|
|
41262
41332
|
});
|
|
41263
41333
|
const spinner = ora("Installing skills...").start();
|
|
@@ -41345,6 +41415,22 @@ function registerSkillsCommand(program2) {
|
|
|
41345
41415
|
}
|
|
41346
41416
|
});
|
|
41347
41417
|
}
|
|
41418
|
+
async function selectBundlePlugin(error, actionLabel) {
|
|
41419
|
+
const response = await import_prompts2.default({
|
|
41420
|
+
type: "select",
|
|
41421
|
+
name: "plugin",
|
|
41422
|
+
message: `This repository contains multiple plugins. Select one to ${actionLabel}:`,
|
|
41423
|
+
choices: error.entries.map((entry) => ({
|
|
41424
|
+
title: entry.name,
|
|
41425
|
+
value: entry.name
|
|
41426
|
+
}))
|
|
41427
|
+
});
|
|
41428
|
+
if (!response.plugin) {
|
|
41429
|
+
logger.info("Cancelled.");
|
|
41430
|
+
return null;
|
|
41431
|
+
}
|
|
41432
|
+
return response.plugin;
|
|
41433
|
+
}
|
|
41348
41434
|
async function resolveInteractiveSkillTargets(skillsManager5, agentManager9, source, projectPath, options2) {
|
|
41349
41435
|
let installGlobal = !!options2.global;
|
|
41350
41436
|
if (!options2.global) {
|
|
@@ -42493,11 +42579,11 @@ function registerPluginsCommand(program2) {
|
|
|
42493
42579
|
plugins.command("install <source>").description("Install a plugin from <marketplace>/<name>, a GitHub repo, or a local path").option("--from <marketplace>", `Marketplace source override (available: ${marketplaceHelp})`).option("-a, --agent <agents...>", "Target specific agent(s)").option("-g, --global", "Install globally").option("--copy-skills", "Copy plugin skills instead of using canonical symlink installs").option("-l, --list", "Preview plugin contents without installing").option("-y, --yes", "Skip confirmation prompts, auto-detect project-configured agents").action(async (source, options2) => {
|
|
42494
42580
|
logger.titleBox("AgentInit Plugins");
|
|
42495
42581
|
const agentManager12 = new AgentManager;
|
|
42496
|
-
const
|
|
42582
|
+
const pluginManager3 = new PluginManager(agentManager12);
|
|
42497
42583
|
if (options2.list) {
|
|
42498
42584
|
const spinner2 = ora("Fetching plugin...").start();
|
|
42499
42585
|
try {
|
|
42500
|
-
const preview2 = await
|
|
42586
|
+
const preview2 = await pluginManager3.inspectPlugin(source, {
|
|
42501
42587
|
from: options2.from
|
|
42502
42588
|
});
|
|
42503
42589
|
spinner2.stop();
|
|
@@ -42524,8 +42610,49 @@ function registerPluginsCommand(program2) {
|
|
|
42524
42610
|
}
|
|
42525
42611
|
renderPluginWarnings(preview2, process.cwd());
|
|
42526
42612
|
} catch (error) {
|
|
42527
|
-
|
|
42528
|
-
|
|
42613
|
+
if (error instanceof MultipleBundlePluginsError) {
|
|
42614
|
+
spinner2.stop();
|
|
42615
|
+
const selected = await selectBundlePlugin2(error, "preview");
|
|
42616
|
+
if (!selected) {
|
|
42617
|
+
return;
|
|
42618
|
+
}
|
|
42619
|
+
const retrySpinner = ora("Fetching plugin...").start();
|
|
42620
|
+
try {
|
|
42621
|
+
const preview2 = await pluginManager3.inspectPlugin(source, {
|
|
42622
|
+
from: options2.from,
|
|
42623
|
+
pluginName: selected
|
|
42624
|
+
});
|
|
42625
|
+
retrySpinner.stop();
|
|
42626
|
+
const p = preview2.plugin;
|
|
42627
|
+
console.log("");
|
|
42628
|
+
logger.info(`${bold(p.name)} ${dim(`v${p.version}`)} ${dim(`[${p.format} format]`)}`);
|
|
42629
|
+
if (p.description)
|
|
42630
|
+
logger.info(` ${p.description}`);
|
|
42631
|
+
console.log("");
|
|
42632
|
+
if (p.skills.length > 0) {
|
|
42633
|
+
logger.info(` ${green("Skills")} (${p.skills.length}):`);
|
|
42634
|
+
for (const skill of p.skills) {
|
|
42635
|
+
logger.info(` ${green(skill.name)} - ${skill.description}`);
|
|
42636
|
+
}
|
|
42637
|
+
}
|
|
42638
|
+
if (p.mcpServers.length > 0) {
|
|
42639
|
+
logger.info(` ${cyan("MCP Servers")} (${p.mcpServers.length}):`);
|
|
42640
|
+
for (const mcp of p.mcpServers) {
|
|
42641
|
+
logger.info(` ${cyan(mcp.name)} [${mcp.type}]`);
|
|
42642
|
+
}
|
|
42643
|
+
}
|
|
42644
|
+
if (p.skills.length === 0 && p.mcpServers.length === 0) {
|
|
42645
|
+
logger.info(" No portable components found (no skills or MCP servers).");
|
|
42646
|
+
}
|
|
42647
|
+
renderPluginWarnings(preview2, process.cwd());
|
|
42648
|
+
} catch (retryError) {
|
|
42649
|
+
retrySpinner.fail("Failed to fetch plugin");
|
|
42650
|
+
logger.error(`Error: ${retryError instanceof Error ? retryError.message : "Unknown error"}`);
|
|
42651
|
+
}
|
|
42652
|
+
} else {
|
|
42653
|
+
spinner2.fail("Failed to fetch plugin");
|
|
42654
|
+
logger.error(`Error: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
42655
|
+
}
|
|
42529
42656
|
}
|
|
42530
42657
|
return;
|
|
42531
42658
|
}
|
|
@@ -42533,24 +42660,48 @@ function registerPluginsCommand(program2) {
|
|
|
42533
42660
|
let targetGlobal = options2.global;
|
|
42534
42661
|
let preview = null;
|
|
42535
42662
|
let previewRendered = false;
|
|
42663
|
+
let selectedPluginName;
|
|
42536
42664
|
if (!agentIds && !options2.yes) {
|
|
42537
42665
|
const previewSpinner = ora("Inspecting plugin...").start();
|
|
42538
42666
|
try {
|
|
42539
|
-
preview = await
|
|
42667
|
+
preview = await pluginManager3.preparePluginInstall(source, {
|
|
42540
42668
|
from: options2.from
|
|
42541
42669
|
});
|
|
42542
42670
|
previewSpinner.stop();
|
|
42543
42671
|
renderPluginWarnings(preview, process.cwd());
|
|
42544
42672
|
previewRendered = true;
|
|
42545
42673
|
} catch (error) {
|
|
42546
|
-
|
|
42547
|
-
|
|
42548
|
-
|
|
42674
|
+
if (error instanceof MultipleBundlePluginsError) {
|
|
42675
|
+
previewSpinner.stop();
|
|
42676
|
+
const selected = await selectBundlePlugin2(error, "install");
|
|
42677
|
+
if (!selected) {
|
|
42678
|
+
return;
|
|
42679
|
+
}
|
|
42680
|
+
selectedPluginName = selected;
|
|
42681
|
+
const retrySpinner = ora("Inspecting plugin...").start();
|
|
42682
|
+
try {
|
|
42683
|
+
preview = await pluginManager3.preparePluginInstall(source, {
|
|
42684
|
+
from: options2.from,
|
|
42685
|
+
pluginName: selectedPluginName
|
|
42686
|
+
});
|
|
42687
|
+
retrySpinner.stop();
|
|
42688
|
+
renderPluginWarnings(preview, process.cwd());
|
|
42689
|
+
previewRendered = true;
|
|
42690
|
+
} catch (retryError) {
|
|
42691
|
+
retrySpinner.fail("Failed to inspect plugin");
|
|
42692
|
+
logger.error(`Error: ${retryError instanceof Error ? retryError.message : "Unknown error"}`);
|
|
42693
|
+
return;
|
|
42694
|
+
}
|
|
42695
|
+
} else {
|
|
42696
|
+
previewSpinner.fail("Failed to inspect plugin");
|
|
42697
|
+
logger.error(`Error: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
42698
|
+
return;
|
|
42699
|
+
}
|
|
42549
42700
|
}
|
|
42550
42701
|
try {
|
|
42551
|
-
const selection = await interactiveAgentSelect(
|
|
42702
|
+
const selection = await interactiveAgentSelect(pluginManager3, agentManager12, process.cwd(), targetGlobal, preview);
|
|
42552
42703
|
if (!selection || selection.aborted || !selection.agents || selection.agents.length === 0) {
|
|
42553
|
-
await
|
|
42704
|
+
await pluginManager3.discardPreparedPlugin(source, { from: options2.from });
|
|
42554
42705
|
logger.info("No agents selected. Aborting.");
|
|
42555
42706
|
return;
|
|
42556
42707
|
}
|
|
@@ -42565,12 +42716,13 @@ function registerPluginsCommand(program2) {
|
|
|
42565
42716
|
}
|
|
42566
42717
|
const spinner = ora("Installing plugin...").start();
|
|
42567
42718
|
try {
|
|
42568
|
-
const result = await
|
|
42719
|
+
const result = await pluginManager3.installPlugin(source, process.cwd(), {
|
|
42569
42720
|
from: options2.from,
|
|
42570
42721
|
agents: agentIds,
|
|
42571
42722
|
global: targetGlobal,
|
|
42572
42723
|
copySkills: options2.copySkills,
|
|
42573
|
-
yes: options2.yes
|
|
42724
|
+
yes: options2.yes,
|
|
42725
|
+
...selectedPluginName ? { pluginName: selectedPluginName } : {}
|
|
42574
42726
|
});
|
|
42575
42727
|
const p = result.plugin;
|
|
42576
42728
|
const totalSkills = result.skills.installed.length;
|
|
@@ -42602,13 +42754,48 @@ function registerPluginsCommand(program2) {
|
|
|
42602
42754
|
}
|
|
42603
42755
|
logger.success("Plugin installation complete.");
|
|
42604
42756
|
} catch (error) {
|
|
42605
|
-
|
|
42606
|
-
|
|
42757
|
+
if (error instanceof MultipleBundlePluginsError && !options2.yes) {
|
|
42758
|
+
spinner.stop();
|
|
42759
|
+
const selected = await selectBundlePlugin2(error, "install");
|
|
42760
|
+
if (!selected) {
|
|
42761
|
+
return;
|
|
42762
|
+
}
|
|
42763
|
+
const retrySpinner = ora("Installing plugin...").start();
|
|
42764
|
+
try {
|
|
42765
|
+
const result = await pluginManager3.installPlugin(source, process.cwd(), {
|
|
42766
|
+
from: options2.from,
|
|
42767
|
+
agents: agentIds,
|
|
42768
|
+
global: targetGlobal,
|
|
42769
|
+
copySkills: options2.copySkills,
|
|
42770
|
+
yes: options2.yes,
|
|
42771
|
+
pluginName: selected
|
|
42772
|
+
});
|
|
42773
|
+
const p = result.plugin;
|
|
42774
|
+
const totalSkills = result.skills.installed.length;
|
|
42775
|
+
const totalMcp = result.mcpServers.applied.length;
|
|
42776
|
+
const totalNative = result.nativePlugins.installed.length;
|
|
42777
|
+
if (totalSkills === 0 && totalMcp === 0 && totalNative === 0) {
|
|
42778
|
+
retrySpinner.warn(`Plugin "${p.name}" has no portable components to install.`);
|
|
42779
|
+
renderPluginWarnings(result, process.cwd());
|
|
42780
|
+
return;
|
|
42781
|
+
}
|
|
42782
|
+
retrySpinner.succeed(`Installed plugin ${green(bold(p.name))} ${dim(`v${p.version}`)}`);
|
|
42783
|
+
renderInstalledComponents(result, agentManager12, process.cwd());
|
|
42784
|
+
renderPluginWarnings(result, process.cwd());
|
|
42785
|
+
logger.success("Plugin installation complete.");
|
|
42786
|
+
} catch (retryError) {
|
|
42787
|
+
retrySpinner.fail("Failed to install plugin");
|
|
42788
|
+
logger.error(`Error: ${retryError instanceof Error ? retryError.message : "Unknown error"}`);
|
|
42789
|
+
}
|
|
42790
|
+
} else {
|
|
42791
|
+
spinner.fail("Failed to install plugin");
|
|
42792
|
+
logger.error(`Error: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
42793
|
+
}
|
|
42607
42794
|
}
|
|
42608
42795
|
});
|
|
42609
42796
|
plugins.command("search [query]").description("Search marketplace plugins").option("--from <marketplace>", `Which marketplace to search (available: ${marketplaceHelp})`).option("--category <category>", `Filter by marketplace category (examples: ${marketplaceCategoryHelp})`).action(async (query, options2) => {
|
|
42610
42797
|
logger.titleBox("AgentInit Plugin Search");
|
|
42611
|
-
const
|
|
42798
|
+
const pluginManager3 = new PluginManager;
|
|
42612
42799
|
const registryId = options2.from || getConfiguredDefaultMarketplaceId();
|
|
42613
42800
|
if (!registryId) {
|
|
42614
42801
|
logger.info(`Please specify a marketplace with --from <marketplace>. Available: ${marketplaceHelp}`);
|
|
@@ -42619,7 +42806,7 @@ function registerPluginsCommand(program2) {
|
|
|
42619
42806
|
}
|
|
42620
42807
|
const spinner = ora(`Fetching ${registryId} marketplace...`).start();
|
|
42621
42808
|
try {
|
|
42622
|
-
const results = await
|
|
42809
|
+
const results = await pluginManager3.listMarketplacePlugins(registryId, query, options2.category);
|
|
42623
42810
|
spinner.stop();
|
|
42624
42811
|
if (results.length === 0) {
|
|
42625
42812
|
logger.info(query ? `No plugins matching "${query}".` : "No plugins found.");
|
|
@@ -42649,8 +42836,8 @@ function registerPluginsCommand(program2) {
|
|
|
42649
42836
|
});
|
|
42650
42837
|
plugins.command("list").alias("ls").description("List installed plugins").option("-a, --agent <agents...>", "Filter by specific agent(s)").option("-g, --global", "List global plugins").action(async (options2) => {
|
|
42651
42838
|
logger.titleBox("AgentInit Installed Plugins");
|
|
42652
|
-
const
|
|
42653
|
-
const installed = await
|
|
42839
|
+
const pluginManager3 = new PluginManager;
|
|
42840
|
+
const installed = await pluginManager3.listPlugins(process.cwd(), {
|
|
42654
42841
|
global: options2.global,
|
|
42655
42842
|
agents: options2.agent
|
|
42656
42843
|
});
|
|
@@ -42685,10 +42872,10 @@ function registerPluginsCommand(program2) {
|
|
|
42685
42872
|
});
|
|
42686
42873
|
plugins.command("remove <name>").alias("rm").description("Remove an installed plugin").option("-a, --agent <agents...>", "Target specific agent(s)").option("-g, --global", "Remove from global scope").option("-y, --yes", "Skip confirmation prompts").action(async (name, options2) => {
|
|
42687
42874
|
logger.titleBox("AgentInit Remove Plugin");
|
|
42688
|
-
const
|
|
42875
|
+
const pluginManager3 = new PluginManager;
|
|
42689
42876
|
const spinner = ora(`Removing plugin "${name}"...`).start();
|
|
42690
42877
|
try {
|
|
42691
|
-
const result = await
|
|
42878
|
+
const result = await pluginManager3.removePlugin(name, process.cwd(), {
|
|
42692
42879
|
global: options2.global,
|
|
42693
42880
|
agents: options2.agent,
|
|
42694
42881
|
yes: options2.yes
|
|
@@ -42710,6 +42897,22 @@ function registerPluginsCommand(program2) {
|
|
|
42710
42897
|
}
|
|
42711
42898
|
});
|
|
42712
42899
|
}
|
|
42900
|
+
async function selectBundlePlugin2(error, actionLabel) {
|
|
42901
|
+
const response = await import_prompts3.default({
|
|
42902
|
+
type: "select",
|
|
42903
|
+
name: "plugin",
|
|
42904
|
+
message: `This repository contains multiple plugins. Select one to ${actionLabel}:`,
|
|
42905
|
+
choices: error.entries.map((entry) => ({
|
|
42906
|
+
title: entry.name,
|
|
42907
|
+
value: entry.name
|
|
42908
|
+
}))
|
|
42909
|
+
});
|
|
42910
|
+
if (!response.plugin) {
|
|
42911
|
+
logger.info("Cancelled.");
|
|
42912
|
+
return null;
|
|
42913
|
+
}
|
|
42914
|
+
return response.plugin;
|
|
42915
|
+
}
|
|
42713
42916
|
var formatPathForDisplay = function(pathValue, projectPath) {
|
|
42714
42917
|
if (pathValue.startsWith(`${projectPath}/`)) {
|
|
42715
42918
|
return relative8(projectPath, pathValue) || ".";
|
|
@@ -42999,9 +43202,9 @@ var getPluginGroupDescription = function(group, preview, projectPath) {
|
|
|
42999
43202
|
const receiveVerb = otherAgents.length === 1 ? "receives" : "receive";
|
|
43000
43203
|
return `${portableSummary}. Full plugin support is available in Claude Code; the native plugin installs at ${installPath}. ${otherAgentsLabel} ${shareVerb} this skills directory but only ${receiveVerb} the installed skills.`;
|
|
43001
43204
|
};
|
|
43002
|
-
async function interactiveAgentSelect(
|
|
43205
|
+
async function interactiveAgentSelect(pluginManager3, agentManager12, projectPath, global3, preview) {
|
|
43003
43206
|
let installGlobal = !!global3;
|
|
43004
|
-
let groups = installGlobal ? buildGlobalPluginGroups(agentManager12, projectPath) : (await
|
|
43207
|
+
let groups = installGlobal ? buildGlobalPluginGroups(agentManager12, projectPath) : (await pluginManager3.groupAgentsBySkillsDir(projectPath, false)).map((group) => ({
|
|
43005
43208
|
...group,
|
|
43006
43209
|
displayDir: group.dir
|
|
43007
43210
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/commands/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4BpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/commands/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4BpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8Z7D"}
|