Files
mcpctl/.taskmaster/tasks/task_089.md

54 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

# Task ID: 89
**Title:** Implement mcpctl get proxymodels Command
**Status:** cancelled
**Dependencies:** 78 ✓, 79 ✓
**Priority:** medium
**Description:** Add CLI command to list all available proxymodels (built-in + local) with source, stages, and requirements.
**Details:**
Create `src/cli/src/commands/get-proxymodels.ts`:
```typescript
import { Command } from 'commander';
import { loadProxyModels } from 'mcplocal/proxymodel/loader';
import { listStages } from 'mcplocal/proxymodel/stage-registry';
import Table from 'cli-table3';
export function registerGetProxymodels(program: Command): void {
program
.command('get proxymodels')
.description('List all available proxymodels')
.action(async () => {
const models = await loadProxyModels();
const stageInfo = new Map(listStages().map(s => [s.name, s]));
const table = new Table({
head: ['NAME', 'SOURCE', 'STAGES', 'REQUIRES-LLM', 'CACHEABLE'],
});
for (const [name, model] of models) {
const source = isBuiltIn(name) ? 'built-in' : 'local';
const stages = model.spec.stages.map(s => s.type).join(',');
const requiresLlm = model.spec.stages.some(s => stageRequiresLlm(s.type));
const cacheable = model.spec.cacheable ? 'yes' : 'no';
table.push([name, source, stages, requiresLlm ? 'yes' : 'no', cacheable]);
}
console.log(table.toString());
});
}
```
Register in `src/cli/src/commands/get.ts` as a subcommand.
**Test Strategy:**
CLI test: `mcpctl get proxymodels` outputs table with expected columns. Test with only built-ins, test with local overrides, verify correct source detection.