"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.doHelp = doHelp;
exports.doVersion = doVersion;
exports.doMcpConfig = doMcpConfig;
const utils_1 = require("../utils");
const pkg = require('../../../../../package.json');
const O = utils_1.C.primary;
const D = utils_1.C.dim;
const B = utils_1.C.bold;
const G = utils_1.C.success;
function doHelp() {
    const L = [];
    // ═══════════════════════════ HEADER ═══════════════════════════
    L.push('');
    L.push('  ' + O('╭') + '─'.repeat(56) + O('╮'));
    L.push('  ' + O('│') + '  ' + B('FivoCell') + ' ' + D('v' + pkg.version) + '  ·  ' + D('Developer Memory Intelligence') + ' '.repeat(7) + O('│'));
    L.push('  ' + O('│') + '  ' + D('AI tools write code.  Cell remembers everything else.') + ' '.repeat(4) + O('│'));
    L.push('  ' + O('╰') + '─'.repeat(56) + O('╯'));
    L.push('');
    // ═══════════════════════════ STATUS ═══════════════════════════
    L.push('  ' + G('✓') + '  daemon  ' + G('active') + '     ' + G('✓') + '  watcher  ' + G('running') + '     ' + G('✓') + '  mcp  ' + G(':9876'));
    L.push('');
    // ═══════════════════════════ CARDS ═══════════════════════════
    // Each card: thin border, command column, description column
    const card = (title, rows) => {
        L.push('  ' + D(title.toUpperCase()));
        for (const [cmd, desc] of rows) {
            L.push('    ' + O(cmd) + ' '.repeat(22 - cmd.length) + D(desc));
        }
        L.push('');
    };
    card('core', [
        ['run', 'quick start: setup + scan + daemon'],
        ['start', 'start daemon + mcp server'],
        ['stop', 'stop daemon'],
        ['setup', 'one-time project setup'],
        ['scan', 'scan codebase + build intelligence'],
        ['status', 'show project status'],
        ['doctor', '12-point health check'],
        ['verify', 'data integrity check'],
        ['mcp-config', 'auto-register mcp in 5 ides'],
    ]);
    card('context & session', [
        ['context', 'view @cell context block'],
        ['continue', 'continue last session'],
        ['session', 'session history'],
        ['decisions', 'decision history'],
        ['handoff', 'view or create handoff'],
        ['replay', 'replay memory timeline'],
    ]);
    card('memory', [
        ['memory', 'memory statistics'],
        ['memory search', 'search project memory'],
        ['blindspots', 'code quality report'],
        ['blindspots --top', 'top 10 fixes only'],
        ['why <topic>', 'search decisions by topic'],
    ]);
    card('profile & vibe', [
        ['teach', 'tell cell about yourself'],
        ['profile', 'view developer profile'],
        ['vibe', 'see your learned personality'],
        ['vibe show', 'full vibe analysis'],
        ['profile export', 'export profile as json'],
    ]);
    card('watch & sync', [
        ['watch start', 'start file watcher'],
        ['watch stop', 'stop file watcher'],
        ['watch events', 'recent file changes'],
        ['install-hook', 'auto-learn on git commits'],
        ['branches', 'list branch snapshots'],
        ['sync export', 'encrypted memory export'],
        ['sync import', 'encrypted memory import'],
    ]);
    card('cloud', [
        ['cloud login', 'connect to cell cloud'],
        ['cloud sync', 'push intelligence + pull packs'],
        ['cloud status', 'connection health'],
        ['community list', 'view downloaded packs'],
        ['cloud logout', 'disconnect from cloud'],
    ]);
    // ═══════════════════════════ FOOTER ═══════════════════════════
    L.push('  ' + D('$') + ' ' + O('cell') + ' ' + D('<command>') + '  ──  ' + D('docs:') + ' ' + O('github.com/itsvinsoni/cell'));
    L.push('');
    console.log(L.join('\n'));
}
function doVersion() { console.log(`fivocell v${pkg.version}`); }
function doMcpConfig() {
    console.log('');
    console.log(B('  cell mcp config'));
    console.log('');
    try {
        const { writeMcpConfig } = require('../../../../core/mcp-config');
        const r = writeMcpConfig();
        console.log(G('  ✓  configured ' + r.written.length + ' ides'));
        for (const ide of r.written || [])
            console.log(D('     ' + ide));
    }
    catch (e) {
        console.log(utils_1.C.warn('  failed: ' + String(e)));
    }
    console.log('');
}
//# sourceMappingURL=help.js.map