Skip to content

Commit 46a2414

Browse files
committed
1.3.4: Extend plugin system to read and display agents alongside skills and commands
1 parent c97504d commit 46a2414

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lenne.tech/cli",
3-
"version": "1.3.3",
3+
"version": "1.3.4",
44
"description": "lenne.Tech CLI: lt",
55
"keywords": [
66
"lenne.Tech",

src/commands/claude/plugins.ts

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,12 @@ function printPluginSummary(
262262
contents: ReturnType<typeof readPluginContents>,
263263
info: (msg: string) => void,
264264
): void {
265-
if (contents.skills.length > 0 || contents.commands.length > 0) {
265+
if (contents.skills.length > 0 || contents.commands.length > 0 || contents.agents.length > 0) {
266266
info('');
267267
info(`${pluginName}:`);
268-
if (contents.skills.length > 0) {
269-
info(` Skills (${contents.skills.length}): ${contents.skills.join(', ')}`);
268+
// Alphabetical order: Agents, Commands, Hooks, MCP Servers, Skills
269+
if (contents.agents.length > 0) {
270+
info(` Agents (${contents.agents.length}): ${contents.agents.join(', ')}`);
270271
}
271272
if (contents.commands.length > 0) {
272273
const maxShow = 5;
@@ -283,13 +284,17 @@ function printPluginSummary(
283284
if (contents.mcpServers.length > 0) {
284285
info(` MCP Servers (${contents.mcpServers.length}): ${contents.mcpServers.join(', ')}`);
285286
}
287+
if (contents.skills.length > 0) {
288+
info(` Skills (${contents.skills.length}): ${contents.skills.join(', ')}`);
289+
}
286290
}
287291
}
288292

289293
/**
290-
* Read plugin contents (skills, commands, hooks, permissions, mcpServers)
294+
* Read plugin contents (skills, commands, hooks, agents, permissions, mcpServers)
291295
*/
292296
function readPluginContents(marketplaceName: string, pluginName: string): {
297+
agents: string[];
293298
commands: string[];
294299
hooks: number;
295300
mcpServers: string[];
@@ -307,6 +312,7 @@ function readPluginContents(marketplaceName: string, pluginName: string): {
307312
);
308313

309314
const result = {
315+
agents: [] as string[],
310316
commands: [] as string[],
311317
hooks: 0,
312318
mcpServers: [] as string[],
@@ -326,6 +332,18 @@ function readPluginContents(marketplaceName: string, pluginName: string): {
326332
}
327333
}
328334

335+
// Read agents
336+
const agentsDir = join(pluginDir, 'agents');
337+
if (existsSync(agentsDir)) {
338+
try {
339+
result.agents = readdirSync(agentsDir, { withFileTypes: true })
340+
.filter(dirent => dirent.isFile() && dirent.name.endsWith('.md'))
341+
.map(dirent => dirent.name.replace(/\.md$/, ''));
342+
} catch {
343+
// Ignore
344+
}
345+
}
346+
329347
// Read commands
330348
const commandsDir = join(pluginDir, 'commands');
331349
result.commands = findMarkdownFiles(commandsDir);

0 commit comments

Comments
 (0)