daedalus-cli 1.69.0 → 1.71.0

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +6 -4
  3. package/dist/__tests__/gitAwareTest.test.d.ts +2 -0
  4. package/dist/__tests__/gitAwareTest.test.d.ts.map +1 -0
  5. package/dist/__tests__/gitAwareTest.test.js +15 -0
  6. package/dist/__tests__/gitAwareTest.test.js.map +1 -0
  7. package/dist/__tests__/mcpExplore.test.d.ts +2 -0
  8. package/dist/__tests__/mcpExplore.test.d.ts.map +1 -0
  9. package/dist/__tests__/mcpExplore.test.js +10 -0
  10. package/dist/__tests__/mcpExplore.test.js.map +1 -0
  11. package/dist/__tests__/stats.test.d.ts +2 -0
  12. package/dist/__tests__/stats.test.d.ts.map +1 -0
  13. package/dist/__tests__/stats.test.js +13 -0
  14. package/dist/__tests__/stats.test.js.map +1 -0
  15. package/dist/__tests__/watchCommand.test.d.ts +2 -0
  16. package/dist/__tests__/watchCommand.test.d.ts.map +1 -0
  17. package/dist/__tests__/watchCommand.test.js +10 -0
  18. package/dist/__tests__/watchCommand.test.js.map +1 -0
  19. package/dist/commands.d.ts.map +1 -1
  20. package/dist/commands.js +66 -4
  21. package/dist/commands.js.map +1 -1
  22. package/dist/router/fallback.test.d.ts +2 -0
  23. package/dist/router/fallback.test.d.ts.map +1 -0
  24. package/dist/router/fallback.test.js +77 -0
  25. package/dist/router/fallback.test.js.map +1 -0
  26. package/dist/router/index.d.ts +1 -1
  27. package/dist/router/index.d.ts.map +1 -1
  28. package/dist/router/index.js +61 -38
  29. package/dist/router/index.js.map +1 -1
  30. package/dist/utils/gitAwareTest.d.ts +10 -0
  31. package/dist/utils/gitAwareTest.d.ts.map +1 -0
  32. package/dist/utils/gitAwareTest.js +56 -0
  33. package/dist/utils/gitAwareTest.js.map +1 -0
  34. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ # [1.71.0](https://github.com/bgill55/daedalus/compare/v1.70.0...v1.71.0) (2026-07-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **ci:** replace .releaserc.json with release.config.cjs to fix JSON parse error ([0af68fe](https://github.com/bgill55/daedalus/commit/0af68fec94dcb9b706c39714d36d088a09be0a02))
7
+ * **ci:** trigger Discord release announcements directly from semantic-release via @semantic-release/exec ([1562ecd](https://github.com/bgill55/daedalus/commit/1562ecdc04a35a1bacfd0605c36c851770da09bb))
8
+
9
+
10
+ ### Features
11
+
12
+ * **commands:** implement Sprint 2 /test --git-aware smart test selection ([72dec56](https://github.com/bgill55/daedalus/commit/72dec567a87c28d7bb8633d09439fa042f02a621))
13
+ * **indexing:** implement Sprint 3 /watch command for live background re-indexing ([33bb2bd](https://github.com/bgill55/daedalus/commit/33bb2bd023c5c7454759aa6e322f42bc5b11a0c4))
14
+ * **mcp:** implement Sprint 4 /mcp explore marketplace subcommand ([cfc560d](https://github.com/bgill55/daedalus/commit/cfc560d87ea68974b6822bf0bbe21eb878518ac6))
15
+ * **router:** implement Sprint 1 multi-model fallback chain for zero-interruption sessions ([91d79ce](https://github.com/bgill55/daedalus/commit/91d79ceb4b8229a39b903e6a2d7e228e27a34e30))
16
+
17
+ # [1.70.0](https://github.com/bgill55/daedalus/compare/v1.69.0...v1.70.0) (2026-07-25)
18
+
19
+
20
+ ### Features
21
+
22
+ * **bot:** add bgill55.art to creator recognition check ([0d1021a](https://github.com/bgill55/daedalus/commit/0d1021ad8347546c2d7a5def0bd52261afed7106))
23
+
1
24
  # [1.69.0](https://github.com/bgill55/daedalus/compare/v1.68.0...v1.69.0) (2026-07-25)
2
25
 
3
26
 
package/README.md CHANGED
@@ -86,12 +86,13 @@ AI assistance without:
86
86
  ### Core
87
87
  - **Interactive Terminal Dashboard (TUI)** — premium side-by-side dashboard with real-time CPU/RAM monitor gauges, model selection overrides, and an interactive file tree to toggle prompt context dynamically.
88
88
  - **Local-first** — works entirely on your machine with local LLMs
89
- - **Embedded model router** — priority, round-robin, or fastest-response routing across multiple models with real-time tokens-per-second (`tok/s`) stream telemetry
89
+ - **Embedded model router** — priority, round-robin, or fastest-response routing across multiple models with real-time tokens-per-second (`tok/s`) stream telemetry, plus **Multi-Model Fallback** for zero-interruption auto-failover on rate limits (429) or 5xx errors.
90
90
  - **Smart model tier routing** — routes planning, reviews, and context summarization calls to your configured `intelligence` tier model
91
91
  - **Multi-agent orchestration** — spawns planner, coder, reviewer, debugger, and researcher sub-agents
92
92
  - **Autonomous Finn Loop** — interactive requirements gathering (`/spec`), GitHub Issues tracking, background daemon execution (`daedalus --loop`), and Discord PR review webhook embeds.
93
- - **Loop Engineering & Self-Repair** — automatic stack-aware compile/build verification checks (e.g., `npx tsc --noEmit`, `cargo check`, `go build`) with dynamic stdout/stderr feedback loops for self-repair, and **Automated Workspace Rollback** to revert patches and keep files clean upon task failure.
94
- - **Codebase indexing** — FTS5-powered symbol search, definitions, and call-graph references across 10+ languages (TS/JS, Python, Go, Rust, Java, C/C++, C#, PHP, Ruby, Elixir)
93
+ - **Loop Engineering & Self-Repair** — automatic stack-aware compile/build verification checks (e.g., `npx tsc --noEmit`, `cargo check`, `go build`) with dynamic stdout/stderr feedback loops for self-repair, **Automated Workspace Rollback** to revert patches upon task failure, and **Git-Aware Smart Testing (`/test -g`)** to run only affected unit tests in < 200ms.
94
+ - **Codebase indexing & Live Watcher** — FTS5-powered symbol search, definitions, and call-graph references across 10+ languages with background **Live File-Watcher (`/watch`)** for automatic re-indexing on save.
95
+ - **MCP Marketplace & Explorer (`/mcp explore`)** — Model Context Protocol server marketplace with one-click installation (`/mcp install <name>`) via stdio and HTTP/SSE.
95
96
  - **Stack-aware prompting** — automatically scans your project tech stack on startup to prevent library and platform boundary hallucinations
96
97
  - **Dynamic task checklist** — injects the active todo list into each prompt turn to maintain execution context
97
98
  - **Session management** — SQLite-backed history with save, load, JSONL export
@@ -139,7 +140,8 @@ AI assistance without:
139
140
  | `/commit [msg]` | Stage and commit changes |
140
141
  | `/project [set <key> = <val>]` | View or set project config settings (.daedalusrc) |
141
142
  | `/session [name]` | Manage chat sessions — /session new to start, /session load <id> to restore, /session export [path] to save transcript |
142
- | `/test [n]` | Run test loop and fix failures |
143
+ | `/test [n]` / `test` | Run test loop and fix failures (supports --git-aware / -g for smart test selection) |
144
+ | `/watch` / `watch` | Start or stop background codebase file-watcher for automatic FTS5 symbol re-indexing |
143
145
  | `/index` | Index codebase for symbol search |
144
146
  | `/find <query>` | Search indexed symbols |
145
147
  | `/refs <symbol>` | Find symbol references (callers) |
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=gitAwareTest.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitAwareTest.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/gitAwareTest.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { getGitAwareTestCommand } from '../utils/gitAwareTest.js';
3
+ describe('getGitAwareTestCommand (Sprint 2)', () => {
4
+ it('returns default command if no git changes or error', () => {
5
+ const result = getGitAwareTestCommand(process.cwd(), 'npm test');
6
+ expect(result.command).toBeDefined();
7
+ expect(typeof result.command).toBe('string');
8
+ });
9
+ it('maps modified files and returns targeted vitest command if tests exist', () => {
10
+ const result = getGitAwareTestCommand(process.cwd());
11
+ expect(Array.isArray(result.modifiedFiles)).toBe(true);
12
+ expect(Array.isArray(result.testFiles)).toBe(true);
13
+ });
14
+ });
15
+ //# sourceMappingURL=gitAwareTest.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitAwareTest.test.js","sourceRoot":"","sources":["../../src/__tests__/gitAwareTest.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IACjD,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC5D,MAAM,MAAM,GAAG,sBAAsB,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;QACjE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;QACrC,MAAM,CAAC,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wEAAwE,EAAE,GAAG,EAAE;QAChF,MAAM,MAAM,GAAG,sBAAsB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QACrD,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=mcpExplore.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcpExplore.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/mcpExplore.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { commandsList } from '../commands.js';
3
+ describe('/mcp explore (Sprint 4)', () => {
4
+ it('registers /mcp in commandsList with explore help text', () => {
5
+ const mcpCmd = commandsList.find(c => c.name === '/mcp');
6
+ expect(mcpCmd).toBeDefined();
7
+ expect(mcpCmd?.helpText).toContain('explore');
8
+ });
9
+ });
10
+ //# sourceMappingURL=mcpExplore.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcpExplore.test.js","sourceRoot":"","sources":["../../src/__tests__/mcpExplore.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;QAC/D,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;QACzD,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;QAC7B,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=stats.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/stats.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { handleStatsCommand } from '../commands/stats.js';
3
+ describe('handleStatsCommand', () => {
4
+ it('returns a formatted statistics report containing expected session metrics', () => {
5
+ const result = handleStatsCommand();
6
+ expect(result).toContain('Session & System Statistics');
7
+ expect(result).toContain('Uptime:');
8
+ expect(result).toContain('Interactions:');
9
+ expect(result).toContain('Total Tokens:');
10
+ expect(result).toContain('Error Count:');
11
+ });
12
+ });
13
+ //# sourceMappingURL=stats.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats.test.js","sourceRoot":"","sources":["../../src/__tests__/stats.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,2EAA2E,EAAE,GAAG,EAAE;QACnF,MAAM,MAAM,GAAG,kBAAkB,EAAE,CAAC;QACpC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,6BAA6B,CAAC,CAAC;QACxD,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACpC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QAC1C,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QAC1C,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=watchCommand.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watchCommand.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/watchCommand.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { commandsList } from '../commands.js';
3
+ describe('/watch Command (Sprint 3)', () => {
4
+ it('registers /watch in commandsList', () => {
5
+ const watchCmd = commandsList.find(c => c.name === '/watch');
6
+ expect(watchCmd).toBeDefined();
7
+ expect(watchCmd?.description).toContain('file-watcher');
8
+ });
9
+ });
10
+ //# sourceMappingURL=watchCommand.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watchCommand.test.js","sourceRoot":"","sources":["../../src/__tests__/watchCommand.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AA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,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,WAAW,EAAE,CAAC;QAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,KAAK,EAAE,UAAU,EAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7I,gBAAgB,EAAE,MAAM,MAAM,CAAC;IAC/B,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACpD,cAAc,EAAE,MAAM,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;CACzE;AAED,eAAO,MAAM,YAAY,EAAE,OAAO,EAsuEjC,CAAC;AAEF,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAqCzF"}
package/dist/commands.js CHANGED
@@ -1179,13 +1179,30 @@ Once you have finished making changes, I will automatically re-run the command t
1179
1179
  },
1180
1180
  {
1181
1181
  name: '/test',
1182
- description: 'Run test loop and fix failures',
1182
+ aliases: ['test'],
1183
+ description: 'Run test loop and fix failures (supports --git-aware / -g for smart test selection)',
1184
+ usage: '/test [--git-aware | -g] [maxLoops]',
1185
+ helpText: 'Runs your test suite and automatically invokes Daedalus tools to fix failing assertions. Use --git-aware or -g to focus only on tests affected by recent git changes.',
1183
1186
  execute: async (args, ctx) => {
1184
- const maxLoops = args.trim() ? parseInt(args.trim(), 10) || 3 : 3;
1187
+ const isGitAware = args.includes('--git-aware') || args.includes('-g');
1188
+ const cleanArgs = args.replace('--git-aware', '').replace('-g', '').trim();
1189
+ const maxLoops = cleanArgs ? parseInt(cleanArgs, 10) || 3 : 3;
1185
1190
  const { loadProjectConfig } = await import('./tools/builtin/project-config.js');
1186
1191
  const { execute: termExec } = await import('./tools/builtin/terminal.js');
1192
+ const { getGitAwareTestCommand } = await import('./utils/gitAwareTest.js');
1187
1193
  const cfg = loadProjectConfig(process.cwd());
1188
- const testCmd = cfg.testCommand || 'npm test';
1194
+ let testCmd = cfg.testCommand || 'npm test';
1195
+ if (isGitAware) {
1196
+ const gitAware = getGitAwareTestCommand(process.cwd(), testCmd);
1197
+ if (gitAware.testFiles.length > 0) {
1198
+ console.log(pc.cyan(`\n⚡ Git-Aware Mode: Detected ${gitAware.modifiedFiles.length} modified files → running ${gitAware.testFiles.length} target test suites:`));
1199
+ console.log(pc.gray(gitAware.testFiles.map(f => ` • ${f}`).join('\n')));
1200
+ testCmd = gitAware.command;
1201
+ }
1202
+ else {
1203
+ console.log(pc.yellow(`\n⚡ Git-Aware Mode: No specific matching test files found for modified files. Running full test suite.`));
1204
+ }
1205
+ }
1189
1206
  console.log(pc.bold(`\nTest-Run-Fix Loop (max ${maxLoops} iterations)`));
1190
1207
  console.log(pc.gray(`Test command: ${testCmd}\n`));
1191
1208
  for (let i = 0; i < maxLoops; i++) {
@@ -1206,6 +1223,51 @@ Once you have finished making changes, I will automatically re-run the command t
1206
1223
  }
1207
1224
  }
1208
1225
  },
1226
+ {
1227
+ name: '/watch',
1228
+ aliases: ['watch'],
1229
+ description: 'Start or stop background codebase file-watcher for automatic FTS5 symbol re-indexing',
1230
+ usage: '/watch [start | stop | status]',
1231
+ helpText: 'Watches project files for changes and automatically updates the codebase symbol index in real time as you save files.',
1232
+ execute: async (args) => {
1233
+ const { initIndexDb } = await import('./indexing/fts.js');
1234
+ const { watchCodebase } = await import('./indexing/watcher.js');
1235
+ const path = await import('path');
1236
+ const action = args.trim().toLowerCase() || 'start';
1237
+ if (action === 'stop') {
1238
+ if (globalThis.__daedalusWatcher) {
1239
+ globalThis.__daedalusWatcher.close();
1240
+ delete globalThis.__daedalusWatcher;
1241
+ console.log(pc.green('\n[OK] Codebase file watcher stopped.'));
1242
+ }
1243
+ else {
1244
+ console.log(pc.yellow('\n[INFO] File watcher is not currently running.'));
1245
+ }
1246
+ return;
1247
+ }
1248
+ if (action === 'status') {
1249
+ const isRunning = !!globalThis.__daedalusWatcher;
1250
+ console.log(pc.cyan(`\n⚡ File Watcher Status: ${isRunning ? pc.bold(pc.green('ACTIVE')) : pc.dim('INACTIVE')}`));
1251
+ return;
1252
+ }
1253
+ if (globalThis.__daedalusWatcher) {
1254
+ console.log(pc.yellow('\n[INFO] File watcher is already running in background.'));
1255
+ return;
1256
+ }
1257
+ try {
1258
+ const cwd = process.cwd();
1259
+ const dbPath = path.join(cwd, '.daedalus', 'index.db');
1260
+ const db = initIndexDb(dbPath);
1261
+ const projectHash = 'local';
1262
+ const instance = watchCodebase(db, cwd, projectHash);
1263
+ globalThis.__daedalusWatcher = instance;
1264
+ console.log(pc.green('\n[OK] Started background codebase watcher! Symbol index will auto-update on file save.'));
1265
+ }
1266
+ catch (err) {
1267
+ console.log(pc.red(`\n[ERROR] Failed to start file watcher: ${err.message}`));
1268
+ }
1269
+ }
1270
+ },
1209
1271
  {
1210
1272
  name: '/index',
1211
1273
  description: 'Index codebase for symbol search',
@@ -1671,7 +1733,7 @@ Once you have finished making changes, I will automatically re-run the command t
1671
1733
  name: '/mcp',
1672
1734
  description: 'Manage MCP servers: explore, search, install, list, remove, info',
1673
1735
  usage: '/mcp <subcommand> [args]',
1674
- helpText: 'Configure and interact with Model Context Protocol (MCP) servers.\n\nSubcommands:\n list, l List all installed MCP servers and their active state\n search, s <query> Search the public MCP Registry for available servers\n install, i <name> Install an MCP server from the registry\n remove, rm <name> Uninstall an MCP server\n info <name> Display metadata and information for a registry server\n enable <name> Enable a configured server\n disable <name> Disable a configured server without removing it',
1736
+ helpText: 'Configure and interact with Model Context Protocol (MCP) servers.\n\nSubcommands:\n explore, ex Browse curated featured community MCP servers\n list, l List all installed MCP servers and their active state\n search, s <query> Search the public MCP Registry for available servers\n install, i <name> Install an MCP server from the registry\n remove, rm <name> Uninstall an MCP server\n info <name> Display metadata and information for a registry server\n enable <name> Enable a configured server\n disable <name> Disable a configured server without removing it',
1675
1737
  execute: async (args, _ctx) => {
1676
1738
  const parts = args.trim().split(/\s+/);
1677
1739
  const sub = parts[0]?.toLowerCase();