UNPKG

aiwg

Version:

Cognitive architecture for AI-augmented software development with structured memory, ensemble validation, and closed-loop correction. FAIR-aligned artifacts, 84% cost reduction via human-in-the-loop, standards adopted by 100+ organizations.

46 lines (39 loc) 1.23 kB
/** * Version Command Handler * * Displays version and channel information for the AIWG installation. * * @implements @.aiwg/architecture/decisions/ADR-001-unified-extension-system.md * @source @src/cli/router.ts * @issue #33 */ import type { CommandHandler, HandlerContext, HandlerResult } from './types.js'; import { getVersionInfo } from '../../channel/manager.mjs'; /** * Version command handler */ export const versionHandler: CommandHandler = { id: 'version', name: 'Version', description: 'Show version and channel info', category: 'maintenance', aliases: ['-version', '--version'], async execute(_ctx: HandlerContext): Promise<HandlerResult> { await displayVersion(); return { exitCode: 0 }; }, }; /** * Display version information including channel and git details */ async function displayVersion(): Promise<void> { const info = await getVersionInfo(); console.log(`aiwg version: ${info.version}`); console.log(`Channel: ${info.channel}`); if (info.channel === 'edge' && info.gitHash) { console.log(`Git: ${info.gitHash} (${info.gitBranch})`); console.log(`Edge path: ${info.edgePath}`); } else { console.log(`Package root: ${info.packageRoot}`); } }