chore: add ion package, codesight wiki, work plans, ascli config
New @boocode/ion package (v0.0.1) for inference optimization network. .codesight/ wiki artifacts for codebase documentation. .omo/ work plans for openspec cleanup and enhanced file panel.
This commit is contained in:
59
packages/ion/src/cli/commands/list.ts
Normal file
59
packages/ion/src/cli/commands/list.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* `workflow list` — List all available workflows.
|
||||
*
|
||||
* Discovers workflows from both bundled and project sources and displays
|
||||
* them in a formatted table (or JSON with --json).
|
||||
*
|
||||
* @example
|
||||
* workflow list
|
||||
* workflow list --json
|
||||
*/
|
||||
|
||||
import type { CliOptions } from '../utils.js';
|
||||
import { printTable, printJson } from '../utils.js';
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Stub: engine integration (not implemented yet)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
interface WorkflowEntry {
|
||||
name: string;
|
||||
description: string;
|
||||
source: 'bundled' | 'project';
|
||||
}
|
||||
|
||||
async function discoverWorkflows(_cwd?: string): Promise<WorkflowEntry[]> {
|
||||
throw new Error('not implemented yet: discoverWorkflows');
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Command handler
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export async function listCommand(
|
||||
_args: string[],
|
||||
options: CliOptions,
|
||||
): Promise<void> {
|
||||
const workflows = await discoverWorkflows(options.cwd);
|
||||
|
||||
if (options.json) {
|
||||
printJson(workflows);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Available workflows:');
|
||||
console.log('');
|
||||
|
||||
printTable(
|
||||
workflows.map((w) => ({
|
||||
name: w.name,
|
||||
description: w.description,
|
||||
source: w.source,
|
||||
})),
|
||||
[
|
||||
{ header: 'Name', field: 'name', minWidth: 20 },
|
||||
{ header: 'Description', field: 'description', minWidth: 30 },
|
||||
{ header: 'Source', field: 'source', minWidth: 10 },
|
||||
],
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user