48 lines
1.3 KiB
Markdown
48 lines
1.3 KiB
Markdown
|
|
# Task ID: 90
|
||
|
|
|
||
|
|
**Title:** Implement mcpctl get stages Command
|
||
|
|
|
||
|
|
**Status:** cancelled
|
||
|
|
|
||
|
|
**Dependencies:** 79 ✓
|
||
|
|
|
||
|
|
**Priority:** medium
|
||
|
|
|
||
|
|
**Description:** Add CLI command to list all available stages (built-in + custom) with source and LLM requirements.
|
||
|
|
|
||
|
|
**Details:**
|
||
|
|
|
||
|
|
Create `src/cli/src/commands/get-stages.ts`:
|
||
|
|
|
||
|
|
```typescript
|
||
|
|
import { Command } from 'commander';
|
||
|
|
import { listStages } from 'mcplocal/proxymodel/stage-registry';
|
||
|
|
import Table from 'cli-table3';
|
||
|
|
|
||
|
|
const LLM_REQUIRING_STAGES = ['summarize', 'summarize-tree', 'enhance', 'compress'];
|
||
|
|
|
||
|
|
export function registerGetStages(program: Command): void {
|
||
|
|
program
|
||
|
|
.command('get stages')
|
||
|
|
.description('List all available stages')
|
||
|
|
.action(async () => {
|
||
|
|
const stages = listStages();
|
||
|
|
|
||
|
|
const table = new Table({
|
||
|
|
head: ['NAME', 'SOURCE', 'REQUIRES-LLM'],
|
||
|
|
});
|
||
|
|
|
||
|
|
for (const stage of stages) {
|
||
|
|
const requiresLlm = LLM_REQUIRING_STAGES.includes(stage.name);
|
||
|
|
table.push([stage.name, stage.source, requiresLlm ? 'yes' : 'no']);
|
||
|
|
}
|
||
|
|
|
||
|
|
console.log(table.toString());
|
||
|
|
});
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
**Test Strategy:**
|
||
|
|
|
||
|
|
CLI test: `mcpctl get stages` outputs table with expected columns. Test with only built-ins, test with custom stages in ~/.mcpctl/stages/, verify custom overrides show 'local' source.
|