kirograph 0.26.0 → 0.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/bin/commands/uninit.ts"],
4
- "sourcesContent": ["import { Command } from 'commander';\nimport * as path from 'path';\nimport * as fs from 'fs';\nimport * as readline from 'readline';\nimport { printBanner } from '../banner';\nimport { dim, reset, violet, bold, green } from '../ui';\nimport { askToggle } from '../installer/prompts';\nimport type { InstallTarget } from '../installer/common';\nimport { getTargetInstaller } from '../installer/targets';\n\nexport const UNINIT_FAREWELLS = [\n \"Oh. So it's come to this.\",\n \"We're sorry to see you go. (Are we? Yes. We are.)\",\n \"Deleting months of carefully indexed knowledge. Bold move.\",\n \"Fine. We'll just sit here in the dark.\",\n \"You can always come back. We won't mention this.\",\n \"The graph remembers everything. Except, soon, anything.\",\n \"Somewhere a tree-sitter is crying.\",\n \"Uninstalling... and pretending it doesn't hurt.\",\n \"574 embeddings. Gone. Just like that.\",\n \"See you on the other side of `kirograph install`.\",\n];\n\nconst ALL_TARGETS: InstallTarget[] = [\n 'kiro', 'claude', 'codex', 'cursor', 'antigravity', 'opencode',\n 'windsurf', 'cline', 'copilot', 'junie', 'gemini-cli',\n 'continue', 'roo', 'warp', 'aider', 'trae',\n 'augment', 'kilo', 'amp', 'devin', 'replit', 'goose', 'openhands', 'tabnine',\n 'mistral-vibe', 'ibm-bob', 'crush', 'droid-factory', 'forgecode', 'iflow', 'qwen', 'rovo', 'qoder',\n];\n\nfunction isValidTarget(t: string): t is InstallTarget | 'all' {\n return t === 'all' || ALL_TARGETS.includes(t as InstallTarget);\n}\n\nfunction uninitKiro(projectRoot: string): void {\n // Remove .kiro hooks created by kirograph\n const kiroHooks = [\n 'kirograph-mark-dirty-on-save.kiro.hook',\n 'kirograph-mark-dirty-on-create.kiro.hook',\n 'kirograph-sync-on-delete.kiro.hook',\n 'kirograph-sync-if-dirty.kiro.hook',\n 'kirograph-compress-hint.kiro.hook',\n 'kirograph-mem-capture.kiro.hook',\n // Legacy .json filenames\n 'kirograph-mark-dirty-on-save.json',\n 'kirograph-mark-dirty-on-create.json',\n 'kirograph-sync-on-delete.json',\n 'kirograph-sync-if-dirty.json',\n 'kirograph-sync-on-save.json',\n 'kirograph-sync-on-create.json',\n 'kirograph-compress-hint.json',\n 'kirograph-mem-capture.json',\n ];\n const hooksDir = path.join(projectRoot, '.kiro', 'hooks');\n let removedHooks = 0;\n for (const hook of kiroHooks) {\n const p = path.join(hooksDir, hook);\n if (fs.existsSync(p)) { fs.unlinkSync(p); removedHooks++; }\n }\n if (removedHooks > 0) console.log(` ${green}\u2713${reset} Removed ${removedHooks} hook(s) from .kiro/hooks/`);\n\n // Remove .kiro/steering/kirograph*.md (main + all workflow files)\n const steeringDir = path.join(projectRoot, '.kiro', 'steering');\n let removedSteering = 0;\n if (fs.existsSync(steeringDir)) {\n for (const entry of fs.readdirSync(steeringDir)) {\n if (entry.startsWith('kirograph') && entry.endsWith('.md')) {\n fs.unlinkSync(path.join(steeringDir, entry));\n removedSteering++;\n }\n }\n }\n if (removedSteering > 0) {\n console.log(` ${green}\u2713${reset} Removed ${removedSteering} steering file(s) from .kiro/steering/`);\n }\n\n // Remove .kiro/agents/kirograph.json\n const agentPath = path.join(projectRoot, '.kiro', 'agents', 'kirograph.json');\n if (fs.existsSync(agentPath)) {\n fs.unlinkSync(agentPath);\n console.log(` ${green}\u2713${reset} Removed .kiro/agents/kirograph.json`);\n }\n\n // Remove kirograph server from .kiro/settings/mcp.json\n const { removeMcpServersConfig } = require('../installer/common');\n const mcpPath = path.join(projectRoot, '.kiro', 'settings', 'mcp.json');\n if (removeMcpServersConfig(mcpPath)) {\n console.log(` ${green}\u2713${reset} Removed kirograph from .kiro/settings/mcp.json`);\n }\n}\n\nasync function runUninit(projectPath: string | undefined, opts: { force?: boolean; target?: string }): Promise<void> {\n const projectRoot = path.resolve(projectPath ?? process.cwd());\n const targetName = (opts.target ?? 'kiro').toLowerCase();\n\n if (!isValidTarget(targetName)) {\n console.error(`Unknown uninit target: ${opts.target}. Choose from: ${ALL_TARGETS.join(', ')}, all`);\n process.exit(1);\n }\n\n const dir = path.join(projectRoot, '.kirograph');\n if (!fs.existsSync(dir)) { console.log('Not initialized.'); return; }\n\n let removeIntegration = true;\n let removeGraph = opts.force === true;\n\n if (!opts.force) {\n printBanner();\n const farewell = UNINIT_FAREWELLS[Math.floor(Math.random() * UNINIT_FAREWELLS.length)]!;\n console.log(` ${violet}${bold}${farewell}${reset}`);\n console.log(`\\n ${dim}This can remove ${targetName} integration files and, separately, the shared .kirograph/ data.${reset}`);\n console.log(` ${dim}Your source code is untouched.${reset}`);\n\n const rl = readline.createInterface({ input: process.stdin, output: process.stdout });\n\n removeIntegration = await askToggle(rl, `Remove ${targetName} integration files?`, 'Removes hooks, MCP config, rules, and agent instructions for this target.', false);\n removeGraph = await askToggle(rl, 'Remove shared .kirograph/ data too?', 'Deletes the graph database, snapshots, and all indexed data. Cannot be undone.', false);\n\n rl.close();\n\n if (!removeIntegration && !removeGraph) {\n console.log(`\\n ${dim}Cancelled. Nothing removed.${reset}\\n`);\n return;\n }\n console.log();\n }\n\n if (removeGraph) {\n fs.rmSync(dir, { recursive: true, force: true });\n console.log(` ${green}\u2713${reset} Removed .kirograph/`);\n }\n\n if (removeIntegration) {\n const targets: InstallTarget[] = targetName === 'all' ? [...ALL_TARGETS] : [targetName as InstallTarget];\n\n for (const t of targets) {\n if (t === 'kiro') {\n uninitKiro(projectRoot);\n } else {\n const installer = getTargetInstaller(t);\n installer.uninit?.(projectRoot);\n }\n }\n }\n\n console.log(`\\n ${dim}Done. Run ${violet}kirograph install --target ${targetName === 'all' ? 'kiro' : targetName}${reset}${dim} to come back anytime.${reset}\\n`);\n}\n\nexport function register(program: Command): void {\n program\n .command('uninit [projectPath]')\n .description('Remove KiroGraph from a project')\n .option('--force', 'Skip confirmation')\n .option('--target <target>', `Integration target to clean up (or \"all\"): ${ALL_TARGETS.slice(0, 6).join(', ')}, ...`, 'kiro')\n .action(runUninit);\n\n program\n .command('uninstall [projectPath]')\n .description('Alias for uninit. Remove KiroGraph from a project')\n .option('--force', 'Skip confirmation')\n .option('--target <target>', `Integration target to clean up (or \"all\"): ${ALL_TARGETS.slice(0, 6).join(', ')}, ...`, 'kiro')\n .action(runUninit);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,WAAsB;AACtB,SAAoB;AACpB,eAA0B;AAC1B,oBAA4B;AAC5B,gBAAgD;AAChD,qBAA0B;AAE1B,qBAAmC;AAE5B,MAAM,mBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,cAA+B;AAAA,EACnC;AAAA,EAAQ;AAAA,EAAU;AAAA,EAAS;AAAA,EAAU;AAAA,EAAe;AAAA,EACpD;AAAA,EAAY;AAAA,EAAS;AAAA,EAAW;AAAA,EAAS;AAAA,EACzC;AAAA,EAAY;AAAA,EAAO;AAAA,EAAQ;AAAA,EAAS;AAAA,EACpC;AAAA,EAAW;AAAA,EAAQ;AAAA,EAAO;AAAA,EAAS;AAAA,EAAU;AAAA,EAAS;AAAA,EAAa;AAAA,EACnE;AAAA,EAAgB;AAAA,EAAW;AAAA,EAAS;AAAA,EAAiB;AAAA,EAAa;AAAA,EAAS;AAAA,EAAQ;AAAA,EAAQ;AAC7F;AAEA,SAAS,cAAc,GAAuC;AAC5D,SAAO,MAAM,SAAS,YAAY,SAAS,CAAkB;AAC/D;AAEA,SAAS,WAAW,aAA2B;AAE7C,QAAM,YAAY;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA,IACA;AAAA,IACA;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A,EACvD;AAEA,MAAI,mBAAmB;AACrB,UAAM,UAA2B,eAAe,QAAQ,CAAC,GAAG,WAAW,IAAI,CAAC,UAA2B;AAEvG,eAAW,KAAK,SAAS;AACvB,UAAI,MAAM,QAAQ;AAChB,mBAAW,WAAW;AAAA,MACxB,OAAO;AACL,cAAM,gBAAY,mCAAmB,CAAC;AACtC,kBAAU,SAAS,WAAW;AAAA,MAChC;AAAA,IACF;AAAA,EACF;AAEA,UAAQ,IAAI;AAAA,IAAO,aAAG,aAAa,gBAAM,8BAA8B,eAAe,QAAQ,SAAS,UAAU,GAAG,eAAK,GAAG,aAAG,yBAAyB,eAAK;AAAA,CAAI;AACnK;AAEO,SAAS,SAAS,SAAwB;AAC/C,UACG,QAAQ,sBAAsB,EAC9B,YAAY,iCAAiC,EAC7C,OAAO,WAAW,mBAAmB,EACrC,OAAO,qBAAqB,8CAA8C,YAAY,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,SAAS,MAAM,EAC3H,OAAO,SAAS;AAEnB,UACG,QAAQ,yBAAyB,EACjC,YAAY,mDAAmD,EAC/D,OAAO,WAAW,mBAAmB,EACrC,OAAO,qBAAqB,8CAA8C,YAAY,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,SAAS,MAAM,EAC3H,OAAO,SAAS;AACrB;",
4
+ "sourcesContent": ["import { Command } from 'commander';\nimport * as path from 'path';\nimport * as fs from 'fs';\nimport * as readline from 'readline';\nimport { printBanner } from '../banner';\nimport { dim, reset, violet, bold, green } from '../ui';\nimport { askToggle } from '../installer/prompts';\nimport type { InstallTarget } from '../installer/common';\nimport { getTargetInstaller } from '../installer/targets';\n\nexport const UNINIT_FAREWELLS = [\n \"Oh. So it's come to this.\",\n \"We're sorry to see you go. (Are we? Yes. We are.)\",\n \"Deleting months of carefully indexed knowledge. Bold move.\",\n \"Fine. We'll just sit here in the dark.\",\n \"You can always come back. We won't mention this.\",\n \"The graph remembers everything. Except, soon, anything.\",\n \"Somewhere a tree-sitter is crying.\",\n \"Uninstalling... and pretending it doesn't hurt.\",\n \"574 embeddings. Gone. Just like that.\",\n \"See you on the other side of `kirograph install`.\",\n];\n\nconst ALL_TARGETS: InstallTarget[] = [\n 'kiro', 'claude', 'codex', 'cursor', 'antigravity', 'opencode',\n 'windsurf', 'cline', 'copilot', 'junie', 'gemini-cli',\n 'continue', 'roo', 'warp', 'aider', 'trae',\n 'augment', 'kilo', 'amp', 'devin', 'replit', 'goose', 'openhands', 'tabnine',\n 'mistral-vibe', 'ibm-bob', 'crush', 'droid-factory', 'forgecode', 'iflow', 'qwen', 'rovo', 'qoder',\n];\n\nfunction isValidTarget(t: string): t is InstallTarget | 'all' {\n return t === 'all' || ALL_TARGETS.includes(t as InstallTarget);\n}\n\nfunction uninitKiro(projectRoot: string): void {\n // Remove .kiro hooks created by kirograph (v2 .json format)\n const kiroHooks = [\n 'kirograph-sync-if-dirty.json',\n 'kirograph-compress-hint.json',\n 'kirograph-mem-capture.json',\n 'kirograph-watchmen.json',\n 'kirograph-wiki-ingest.json',\n 'kirograph-wiki-lint.json',\n // Legacy v1 .kiro.hook filenames\n 'kirograph-mark-dirty-on-save.kiro.hook',\n 'kirograph-mark-dirty-on-create.kiro.hook',\n 'kirograph-sync-on-delete.kiro.hook',\n 'kirograph-sync-if-dirty.kiro.hook',\n 'kirograph-compress-hint.kiro.hook',\n 'kirograph-mem-capture.kiro.hook',\n 'kirograph-watchmen.kiro.hook',\n 'kirograph-wiki-ingest.kiro.hook',\n 'kirograph-wiki-lint.kiro.hook',\n // Legacy pre-v1 .json filenames (different schema)\n 'kirograph-mark-dirty-on-save.json',\n 'kirograph-mark-dirty-on-create.json',\n 'kirograph-sync-on-delete.json',\n 'kirograph-sync-on-save.json',\n 'kirograph-sync-on-create.json',\n ];\n const hooksDir = path.join(projectRoot, '.kiro', 'hooks');\n let removedHooks = 0;\n for (const hook of kiroHooks) {\n const p = path.join(hooksDir, hook);\n if (fs.existsSync(p)) { fs.unlinkSync(p); removedHooks++; }\n }\n if (removedHooks > 0) console.log(` ${green}\u2713${reset} Removed ${removedHooks} hook(s) from .kiro/hooks/`);\n\n // Remove .kiro/steering/kirograph*.md (main + all workflow files)\n const steeringDir = path.join(projectRoot, '.kiro', 'steering');\n let removedSteering = 0;\n if (fs.existsSync(steeringDir)) {\n for (const entry of fs.readdirSync(steeringDir)) {\n if (entry.startsWith('kirograph') && entry.endsWith('.md')) {\n fs.unlinkSync(path.join(steeringDir, entry));\n removedSteering++;\n }\n }\n }\n if (removedSteering > 0) {\n console.log(` ${green}\u2713${reset} Removed ${removedSteering} steering file(s) from .kiro/steering/`);\n }\n\n // Remove .kiro/agents/kirograph.json\n const agentPath = path.join(projectRoot, '.kiro', 'agents', 'kirograph.json');\n if (fs.existsSync(agentPath)) {\n fs.unlinkSync(agentPath);\n console.log(` ${green}\u2713${reset} Removed .kiro/agents/kirograph.json`);\n }\n\n // Remove kirograph server from .kiro/settings/mcp.json\n const { removeMcpServersConfig } = require('../installer/common');\n const mcpPath = path.join(projectRoot, '.kiro', 'settings', 'mcp.json');\n if (removeMcpServersConfig(mcpPath)) {\n console.log(` ${green}\u2713${reset} Removed kirograph from .kiro/settings/mcp.json`);\n }\n}\n\nasync function runUninit(projectPath: string | undefined, opts: { force?: boolean; target?: string }): Promise<void> {\n const projectRoot = path.resolve(projectPath ?? process.cwd());\n const targetName = (opts.target ?? 'kiro').toLowerCase();\n\n if (!isValidTarget(targetName)) {\n console.error(`Unknown uninit target: ${opts.target}. Choose from: ${ALL_TARGETS.join(', ')}, all`);\n process.exit(1);\n }\n\n const dir = path.join(projectRoot, '.kirograph');\n if (!fs.existsSync(dir)) { console.log('Not initialized.'); return; }\n\n let removeIntegration = true;\n let removeGraph = opts.force === true;\n\n if (!opts.force) {\n printBanner();\n const farewell = UNINIT_FAREWELLS[Math.floor(Math.random() * UNINIT_FAREWELLS.length)]!;\n console.log(` ${violet}${bold}${farewell}${reset}`);\n console.log(`\\n ${dim}This can remove ${targetName} integration files and, separately, the shared .kirograph/ data.${reset}`);\n console.log(` ${dim}Your source code is untouched.${reset}`);\n\n const rl = readline.createInterface({ input: process.stdin, output: process.stdout });\n\n removeIntegration = await askToggle(rl, `Remove ${targetName} integration files?`, 'Removes hooks, MCP config, rules, and agent instructions for this target.', false);\n removeGraph = await askToggle(rl, 'Remove shared .kirograph/ data too?', 'Deletes the graph database, snapshots, and all indexed data. Cannot be undone.', false);\n\n rl.close();\n\n if (!removeIntegration && !removeGraph) {\n console.log(`\\n ${dim}Cancelled. Nothing removed.${reset}\\n`);\n return;\n }\n console.log();\n }\n\n if (removeGraph) {\n fs.rmSync(dir, { recursive: true, force: true });\n console.log(` ${green}\u2713${reset} Removed .kirograph/`);\n }\n\n if (removeIntegration) {\n const targets: InstallTarget[] = targetName === 'all' ? [...ALL_TARGETS] : [targetName as InstallTarget];\n\n for (const t of targets) {\n if (t === 'kiro') {\n uninitKiro(projectRoot);\n } else {\n const installer = getTargetInstaller(t);\n installer.uninit?.(projectRoot);\n }\n }\n }\n\n console.log(`\\n ${dim}Done. Run ${violet}kirograph install --target ${targetName === 'all' ? 'kiro' : targetName}${reset}${dim} to come back anytime.${reset}\\n`);\n}\n\nexport function register(program: Command): void {\n program\n .command('uninit [projectPath]')\n .description('Remove KiroGraph from a project')\n .option('--force', 'Skip confirmation')\n .option('--target <target>', `Integration target to clean up (or \"all\"): ${ALL_TARGETS.slice(0, 6).join(', ')}, ...`, 'kiro')\n .action(runUninit);\n\n program\n .command('uninstall [projectPath]')\n .description('Alias for uninit. Remove KiroGraph from a project')\n .option('--force', 'Skip confirmation')\n .option('--target <target>', `Integration target to clean up (or \"all\"): ${ALL_TARGETS.slice(0, 6).join(', ')}, ...`, 'kiro')\n .action(runUninit);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,WAAsB;AACtB,SAAoB;AACpB,eAA0B;AAC1B,oBAA4B;AAC5B,gBA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8BAA8B,eAAe,QAAQ,SAAS,UAAU,GAAG,eAAK,GAAG,aAAG,yBAAyB,eAAK;AAAA,CAAI;AACnK;AAEO,SAAS,SAAS,SAAwB;AAC/C,UACG,QAAQ,sBAAsB,EAC9B,YAAY,iCAAiC,EAC7C,OAAO,WAAW,mBAAmB,EACrC,OAAO,qBAAqB,8CAA8C,YAAY,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,SAAS,MAAM,EAC3H,OAAO,SAAS;AAEnB,UACG,QAAQ,yBAAyB,EACjC,YAAY,mDAAmD,EAC/D,OAAO,WAAW,mBAAmB,EACrC,OAAO,qBAAqB,8CAA8C,YAAY,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,SAAS,MAAM,EAC3H,OAAO,SAAS;AACrB;",
6
6
  "names": []
7
7
  }
@@ -23,6 +23,7 @@ __export(config_prompt_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(config_prompt_exports);
25
25
  var import_prompts = require("./prompts");
26
+ var import_import_prompt = require("../../hooks/import-prompt");
26
27
  const DEFAULT_EMBEDDING_MODEL = "nomic-ai/nomic-embed-text-v1.5";
27
28
  const PRESET_MODELS = [
28
29
  {
@@ -56,7 +57,7 @@ const PRESET_MODELS = [
56
57
  description: "Enter a custom HuggingFace model ID and embedding dimension"
57
58
  }
58
59
  ];
59
- async function promptConfigOptions(rl) {
60
+ async function promptConfigOptions(rl, opts = {}) {
60
61
  (0, import_prompts.printSection)("\u{1F50D}", "Semantic Search");
61
62
  const enableEmbeddings = await (0, import_prompts.askToggle)(
62
63
  rl,
@@ -277,6 +278,11 @@ async function promptConfigOptions(rl) {
277
278
  if (compressionChoice === "off") {
278
279
  console.log(" \u2139 kirograph_exec disabled (shell compression is off)");
279
280
  }
281
+ let hooksToImport = null;
282
+ if (opts.offerHookImport && opts.projectRoot) {
283
+ (0, import_prompts.printSection)("\u{1FA9D}", "Hooks");
284
+ hooksToImport = await (0, import_import_prompt.promptImportGlobalHookSelection)();
285
+ }
280
286
  (0, import_prompts.printSection)("\u{1F9E0}", "Memory");
281
287
  patch.enableMemory = await (0, import_prompts.askToggle)(
282
288
  rl,
@@ -415,7 +421,7 @@ async function promptConfigOptions(rl) {
415
421
  }
416
422
  }
417
423
  }
418
- return patch;
424
+ return { patch, hooksToImport };
419
425
  }
420
426
  // Annotate the CommonJS export names for ESM import in node:
421
427
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/bin/installer/config-prompt.ts"],
4
- "sourcesContent": ["/**\n * KiroGraph Installer \u2014 configuration prompting\n */\n\nimport * as readline from 'readline';\nimport { KiroGraphConfig } from '../../config';\ntype CavemanMode = 'lite' | 'full' | 'ultra';\nimport { ask, askToggle, arrowSelect, printSection, printSeparator, dim, reset, violet } from './prompts';\nexport type ConfigPatch = Pick<KiroGraphConfig, 'enableEmbeddings' | 'useVecIndex' | 'semanticEngine' | 'turboquantMemDocs' | 'turboquantBits' | 'turbovecMemDocs' | 'turbovecBits' | 'typesenseDashboard' | 'qdrantDashboard' | 'extractDocstrings' | 'trackCallSites' | 'enableArchitecture' | 'cavemanMode' | 'shellCompressionLevel' | 'enableMemory' | 'enableWatchmen' | 'watchmenThreshold' | 'watchmenSynthesisMode' | 'watchmenLocalModel' | 'enableDocs' | 'docsContextLimit' | 'enableData' | 'dataContextLimit' | 'enableSecurity' | 'enablePatterns' | 'enableWiki' | 'wikiSynthesisMode' | 'wikiLocalModel' | 'enableCodeHealth' | 'enableAdvancedAnalysis' | 'enableAgentUtils'> & { embeddingModel?: string; embeddingDim?: number };\nexport type SemanticEngine = KiroGraphConfig['semanticEngine'];\n\nexport const DEFAULT_EMBEDDING_MODEL = 'nomic-ai/nomic-embed-text-v1.5';\n\n/** Well-known embedding models with their output dimensions. */\nconst PRESET_MODELS = [\n {\n value: 'nomic-ai/nomic-embed-text-v1.5',\n label: 'nomic-embed-text-v1.5',\n dim: 768,\n description: '768-dim \u00B7 ~130MB \u00B7 Best quality for code search (recommended)',\n },\n {\n value: 'onnx-community/embeddinggemma-300m-ONNX',\n label: 'embeddinggemma-300m',\n dim: 768,\n description: '768-dim \u00B7 ~300MB \u00B7 Google Gemma-based, multilingual, 2048-token context',\n },\n {\n value: 'Xenova/all-MiniLM-L6-v2',\n label: 'all-MiniLM-L6-v2',\n dim: 384,\n description: '384-dim \u00B7 ~23MB \u00B7 Fast and lightweight, lower accuracy',\n },\n {\n value: 'BAAI/bge-base-en-v1.5',\n label: 'bge-base-en-v1.5',\n dim: 768,\n description: '768-dim \u00B7 ~110MB \u00B7 Strong general-purpose alternative to nomic',\n },\n {\n value: '__other__',\n label: 'Other',\n dim: 768,\n description: 'Enter a custom HuggingFace model ID and embedding dimension',\n },\n] as const;\n\nexport async function promptConfigOptions(rl: readline.Interface): Promise<ConfigPatch> {\n // \u2500\u2500 Semantic Search \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDD0D', 'Semantic Search');\n\n const enableEmbeddings = await askToggle(\n rl,\n 'Semantic embeddings (similarity search):',\n 'Enables natural-language code search via vector embeddings. A local model (~130MB) is downloaded on first use.',\n );\n\n const patch: ConfigPatch = { enableEmbeddings, useVecIndex: false, semanticEngine: 'cosine', turboquantMemDocs: false, turboquantBits: 3, turbovecMemDocs: false, turbovecBits: 4, typesenseDashboard: false, qdrantDashboard: false, extractDocstrings: false, trackCallSites: false, enableArchitecture: false, cavemanMode: 'off', shellCompressionLevel: 'normal', enableMemory: false, enableWatchmen: false, watchmenThreshold: 5, watchmenSynthesisMode: 'local', watchmenLocalModel: 'onnx-community/gemma-4-E4B-it-ONNX', enableDocs: false, docsContextLimit: 0, enableData: false, dataContextLimit: 0, enableSecurity: false, enablePatterns: false, enableWiki: false, wikiSynthesisMode: 'agent', wikiLocalModel: 'onnx-community/gemma-4-E4B-it-ONNX', enableCodeHealth: false, enableAdvancedAnalysis: false, enableAgentUtils: false };\n\n if (enableEmbeddings) {\n // \u2500\u2500 Model selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const modelChoice = await arrowSelect<string>(\n rl,\n 'Embedding model:',\n PRESET_MODELS.map(m => ({ value: m.value, label: m.label, description: m.description })),\n );\n\n let embeddingModel: string;\n let embeddingDim: number;\n\n if (modelChoice === '__other__') {\n console.log(`\\n ${dim}Enter a HuggingFace model ID in the format org/model-name.${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Model identifier:${reset} `)).trim();\n if (raw.includes('/')) { embeddingModel = raw; break; }\n console.log(` Expected a HuggingFace model ID in the format org/model-name (e.g. nomic-ai/nomic-embed-text-v1.5).`);\n }\n console.log(`\\n ${dim}Enter the embedding output dimension for this model (check the model card on HuggingFace).${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Embedding dimension (e.g. 768, 384):${reset} `)).trim();\n const n = parseInt(raw, 10);\n if (!isNaN(n) && n > 0) { embeddingDim = n; break; }\n console.log(` Expected a positive integer (e.g. 768, 384, 1536).`);\n }\n } else {\n const preset = PRESET_MODELS.find(m => m.value === modelChoice)!;\n embeddingModel = preset.value;\n embeddingDim = preset.dim;\n }\n\n patch.embeddingModel = embeddingModel;\n patch.embeddingDim = embeddingDim;\n\n // \u2500\u2500 Engine selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const semanticEngine = await arrowSelect<SemanticEngine>(rl, 'Vector search engine:', [\n { value: 'cosine', label: 'cosine', description: 'In-process cosine similarity. No extra deps. Best for small/medium projects.' },\n { value: 'turboquant', label: 'turboquant', description: 'ANN index, zero native deps. Compresses embeddings 20\u201330\u00D7 (Google TurboQuant). ANN without native binaries \u2014 ideal for CI, ARM, restricted envs. Optional: npm install turboquant-js.' },\n { value: 'turbovec', label: 'turbovec', description: 'ANN search via Rust/SIMD (napi-rs). Same TurboQuant algorithm but NEON on ARM and AVX-512BW on x86 \u2014 faster than turboquant-js at the cost of a one-time Rust build. Requires Rust toolchain. Build: cd native/turbovec-node && npm install && npm run build.' },\n { value: 'sqlite-vec', label: 'sqlite-vec', description: 'ANN index. Sub-linear search. Best for large codebases. Needs: better-sqlite3, sqlite-vec (native).' },\n { value: 'orama', label: 'orama', description: 'Hybrid search (full-text + vector). Pure JS. Needs: @orama/orama, @orama/plugin-data-persistence.' },\n { value: 'pglite', label: 'pglite', description: 'Hybrid search via PostgreSQL + pgvector. Exact results. Pure WASM. Needs: @electric-sql/pglite.' },\n { value: 'lancedb', label: 'lancedb', description: 'ANN search via LanceDB (Apache Lance columnar format). Pure JS. Needs: @lancedb/lancedb.' },\n { value: 'qdrant', label: 'qdrant', description: 'ANN search via Qdrant embedded binary (HNSW index, Cosine). Needs: qdrant-local.' },\n { value: 'typesense', label: 'typesense', description: 'ANN search via Typesense (auto-downloaded binary, HNSW, Cosine). Needs: typesense.' },\n ]);\n patch.semanticEngine = semanticEngine;\n patch.useVecIndex = semanticEngine === 'sqlite-vec';\n\n // TurboQuant for memory & docs: offer when cosine or turboquant is the code-node engine\n if (semanticEngine === 'cosine' || semanticEngine === 'turboquant') {\n patch.turboquantMemDocs = await askToggle(rl,\n 'TurboQuant for memory & docs search (optional):',\n 'Replaces the default linear cosine scan in memory observations and doc sections with a compressed ANN index \u2014 no native deps required. Most useful when you accumulate many observations or large doc sets (1 000+ entries).',\n false,\n );\n }\n\n // TurboVec bit width\n if (semanticEngine === 'turbovec') {\n patch.turbovecBits = await arrowSelect<number>(rl, 'TurboVec bits per coordinate:', [\n { value: 4, label: '4 bits (recommended)', description: 'Best quality, ~19\u00D7 compression vs raw Float32. Default.' },\n { value: 3, label: '3 bits', description: 'Balanced \u2014 ~25\u00D7 compression, slight quality drop.' },\n { value: 2, label: '2 bits', description: 'Highest compression (~38\u00D7), lowest accuracy.' },\n ]);\n patch.turbovecMemDocs = await askToggle(rl,\n 'TurboVec for memory & docs search (optional):',\n 'Replaces the default linear cosine scan in memory observations and doc sections with the TurboVec ANN index. Requires the addon to be built.',\n false,\n );\n }\n\n if (semanticEngine === 'typesense') {\n patch.typesenseDashboard = await askToggle(rl,\n 'Typesense dashboard:',\n 'Serves the Typesense Dashboard locally and opens it in your browser after indexing completes.',\n false,\n );\n }\n\n if (semanticEngine === 'qdrant') {\n patch.qdrantDashboard = await askToggle(rl,\n 'Qdrant dashboard:',\n 'Downloads the Qdrant Web UI (first time only) and opens it in your browser after indexing completes.',\n false,\n );\n }\n }\n\n // \u2500\u2500 Graph Features \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCCA', 'Graph Features');\n\n patch.extractDocstrings = await askToggle(rl,\n 'Docstring extraction:',\n 'Enriches symbol metadata and improves context quality. Slightly increases indexing time.',\n false,\n );\n\n patch.trackCallSites = await askToggle(rl,\n 'Call site tracking (caller/callee graph):',\n 'Enables kirograph_callers and kirograph_callees MCP tools. Increases index size.',\n false,\n );\n\n patch.enableArchitecture = await askToggle(rl,\n 'Architecture analysis (packages + layers):',\n 'Detects packages from manifests and architectural layers. Enables kirograph_architecture, kirograph_coupling, kirograph_package.',\n false,\n );\n\n if (patch.enableArchitecture) {\n patch.enableAdvancedAnalysis = await askToggle(rl,\n 'Advanced graph analysis (type hierarchies, flows, communities, refactor):',\n 'Enables kirograph_type_hierarchy, kirograph_flows, kirograph_communities, kirograph_refactor. Most useful alongside architecture analysis.',\n false,\n );\n }\n\n // \u2500\u2500 Graph Tools \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCCA', 'Graph Tools');\n\n patch.enableCodeHealth = await askToggle(rl,\n 'Code health tools (hotspots, dead code, change tracking):',\n 'Enables kirograph_hotspots, kirograph_surprising, kirograph_diff, kirograph_dead_code, kirograph_circular_deps.',\n false,\n );\n\n patch.enableAgentUtils = await askToggle(rl,\n 'Agent utilities (file caching, budget tracking):',\n 'Enables kirograph_read, kirograph_gain, kirograph_budget.',\n false,\n );\n\n // \u2500\u2500 Security \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDD12', 'Security');\n\n patch.enableSecurity = await askToggle(rl,\n 'Security analysis (vulnerability scanning + reachability):',\n 'Scans dependency manifests for known vulnerabilities and performs reachability analysis. Requires Architecture analysis (will be auto-enabled). Enables kirograph_security, kirograph_vulns, kirograph_sbom, kirograph_vex, kirograph_reachability MCP tools.',\n false,\n );\n\n if (patch.enableSecurity && !patch.enableArchitecture) {\n patch.enableArchitecture = true;\n console.log(' \u2139 Architecture analysis auto-enabled (required by Security module)');\n }\n\n // \u2500\u2500 Pattern Matching \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDD0D', 'Pattern Matching');\n\n patch.enablePatterns = await askToggle(rl,\n 'Precise SAST with ast-grep?',\n 'Runs AST structural pattern matching during indexing using @ast-grep/napi (~15MB native binding). Unlike heuristic symbol-name analysis, matches real code structure \u2014 precise SQL injection, path traversal, eval detection. Requires @ast-grep/napi (will be installed automatically if you answer yes).',\n false,\n );\n\n // \u2500\u2500 Documentation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCD6', 'Documentation');\n\n (patch as any).enableDocs = await askToggle(rl,\n 'Documentation indexing (section-level retrieval):',\n 'Indexes docs by heading structure. Enables kirograph_docs_toc, kirograph_docs_search, kirograph_docs_section, kirograph_docs_outline, kirograph_docs_refs.',\n false,\n );\n\n if ((patch as any).enableDocs) {\n const contextChoice = await arrowSelect<number>(rl, 'Include doc sections in kirograph_context results?', [\n { value: 0, label: '0 (disabled)', description: 'Docs stay separate \u2014 use kirograph_docs_* tools explicitly (recommended)' },\n { value: 3, label: '3 sections', description: 'Include up to 3 relevant doc sections in context results' },\n { value: 5, label: '5 sections', description: 'Include up to 5 relevant doc sections in context results' },\n { value: 10, label: '10 sections', description: 'Include up to 10 relevant doc sections in context results' },\n ]);\n (patch as any).docsContextLimit = contextChoice;\n }\n\n // \u2500\u2500 Data \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCCA', 'Data');\n\n (patch as any).enableData = await askToggle(rl,\n 'Tabular data indexing (CSV/TSV/JSONL/JSON/Excel/Parquet):',\n 'Indexes data files for structured querying. Enables kirograph_data_list, kirograph_data_describe, kirograph_data_query, kirograph_data_aggregate, kirograph_data_search.',\n false,\n );\n\n if ((patch as any).enableData) {\n (patch as any).dataInstallExcel = await askToggle(rl,\n 'Install Excel support (xlsx package)?',\n 'Required for .xlsx/.xls files. CSV/TSV/JSONL/JSON are always supported without extra deps.',\n false,\n );\n\n (patch as any).dataInstallParquet = await askToggle(rl,\n 'Install Parquet support (parquetjs-lite package)?',\n 'Required for .parquet files. CSV/TSV/JSONL/JSON are always supported without extra deps.',\n false,\n );\n\n (patch as any).dataInstallPdf = await askToggle(rl,\n 'Install PDF support (@firecrawl/pdf-inspector package)?',\n 'Required for .pdf files. Rust/NAPI binary \u2014 prebuilts for linux-x64 and macOS ARM64.',\n false,\n );\n\n const contextChoice = await arrowSelect<number>(rl, 'Include dataset schemas in kirograph_context results?', [\n { value: 0, label: '0 (disabled)', description: 'Data stays separate \u2014 use kirograph_data_* tools explicitly (recommended)' },\n { value: 2, label: '2 datasets', description: 'Include up to 2 relevant dataset schemas in context results' },\n { value: 5, label: '5 datasets', description: 'Include up to 5 relevant dataset schemas in context results' },\n ]);\n (patch as any).dataContextLimit = contextChoice;\n }\n\n // \u2500\u2500 Agent Behavior \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83E\uDD16', 'Agent Behavior');\n\n const cavemanChoice = await arrowSelect(rl, 'Communication style (caveman mode):', [\n { value: 'off', label: 'off', description: 'Normal responses \u2014 no compression' },\n { value: 'lite', label: 'lite', description: 'Compact, no filler, full sentences' },\n { value: 'full', label: 'full', description: 'Fragments, no articles, short synonyms' },\n { value: 'ultra', label: 'ultra', description: 'Max compression, abbreviations, \u2192 for causality' },\n ]);\n patch.cavemanMode = cavemanChoice as CavemanMode | 'off';\n\n const compressionChoice = await arrowSelect(rl, 'Shell compression (kirograph_exec):', [\n { value: 'off', label: 'off', description: 'Disables kirograph_exec entirely' },\n { value: 'normal', label: 'normal', description: 'Balanced: removes noise, keeps structure (recommended)' },\n { value: 'aggressive', label: 'aggressive', description: 'More compact: groups by category, limits output' },\n { value: 'ultra', label: 'ultra', description: 'Maximum compression: counts and summaries only' },\n ]);\n patch.shellCompressionLevel = compressionChoice as KiroGraphConfig['shellCompressionLevel'];\n if (compressionChoice === 'off') {\n console.log(' \u2139 kirograph_exec disabled (shell compression is off)');\n }\n\n // \u2500\u2500 Memory \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83E\uDDE0', 'Memory');\n\n patch.enableMemory = await askToggle(rl,\n 'Persistent memory (cross-session observations):',\n 'Stores decisions, errors, and patterns across sessions. Compressed (if caveman is on), linked to code symbols, searchable via kirograph_mem_* tools. Zero LLM tokens on write.',\n false,\n );\n\n if (patch.enableMemory) {\n patch.enableWatchmen = await askToggle(rl,\n 'Watchmen (auto-synthesize workspace briefs from memory):',\n 'When enough observations accumulate (default: 5), synthesizes them into .kiro/steering/kirograph-watchmen.md, CLAUDE.md, AGENTS.md, or the equivalent for your tool.',\n false,\n );\n\n if (patch.enableWatchmen) {\n // \u2500\u2500 Synthesis mode \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const synthesisMode = await arrowSelect<KiroGraphConfig['watchmenSynthesisMode']>(\n rl,\n 'Watchmen synthesis mode:',\n [\n {\n value: 'local',\n label: 'Local model',\n description: 'Runs a local HuggingFace model via @huggingface/transformers. Zero API cost, no data leaves your machine. Model downloaded once to ~/.kirograph/models/. Works for all tools via runCommand hook.',\n },\n {\n value: 'agent',\n label: 'Active agent',\n description: '\u26A0 Kiro only. Uses the active Kiro agent to synthesize. Consumes API tokens/credits on every synthesis. Not supported for other tools.',\n },\n ],\n );\n patch.watchmenSynthesisMode = synthesisMode;\n\n if (synthesisMode === 'local') {\n // \u2500\u2500 Local model selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const LOCAL_MODELS = [\n {\n value: 'onnx-community/gemma-4-E4B-it-ONNX',\n label: 'Gemma 4 E4B (recommended)',\n description: '~3\u20134 GB \u00B7 Google DeepMind Gemma 4 \u00B7 4.5B params \u00B7 128K context \u00B7 Best quality \u00B7 Apache 2.0',\n },\n {\n value: 'onnx-community/Qwen2.5-1.5B-Instruct',\n label: 'Qwen2.5-1.5B',\n description: '~1.5 GB \u00B7 Lighter option if RAM is limited \u00B7 Acceptable quality',\n },\n {\n value: 'HuggingFaceTB/SmolLM2-1.7B-Instruct',\n label: 'SmolLM2-1.7B',\n description: '~1.7 GB \u00B7 HuggingFace compact model \u00B7 Good at following structured formats',\n },\n {\n value: '__other__',\n label: 'Other',\n description: 'Enter a custom HuggingFace model ID (must have ONNX weights on onnx-community)',\n },\n ] as const;\n\n const modelChoice = await arrowSelect<string>(rl, 'Local synthesis model:', LOCAL_MODELS.map(m => ({ value: m.value, label: m.label, description: m.description })));\n\n if (modelChoice === '__other__') {\n console.log(`\\n ${dim}Enter a HuggingFace model ID (e.g. onnx-community/gemma-4-E4B-it-ONNX).${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Model identifier:${reset} `)).trim();\n if (raw.includes('/')) { patch.watchmenLocalModel = raw; break; }\n console.log(` Expected a HuggingFace model ID in the format org/model-name.`);\n }\n } else {\n patch.watchmenLocalModel = modelChoice;\n }\n }\n }\n }\n\n // \u2500\u2500 Wiki \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCD6', 'Wiki');\n\n patch.enableWiki = await askToggle(rl,\n 'LLM Wiki (Karpathy-style structured knowledge base):',\n 'Maintains a set of markdown pages that compound knowledge across sessions. Supports search, ingest (two-tool flow), conflict resolution, and health checks via kirograph_wiki_* tools.',\n false,\n );\n\n if (patch.enableWiki) {\n const wikiMode = await arrowSelect<KiroGraphConfig['wikiSynthesisMode']>(\n rl,\n 'Wiki synthesis mode:',\n [\n {\n value: 'agent',\n label: 'Active agent (recommended)',\n description: 'Uses the active LLM agent to generate WIKI_DIFF blocks. Works with any AI tool. Consumes API tokens on ingest.',\n },\n {\n value: 'local',\n label: 'Local model',\n description: 'Runs a local HuggingFace model to generate diffs. Zero API cost, no data leaves your machine. Same infra as Watchmen.',\n },\n ],\n );\n patch.wikiSynthesisMode = wikiMode;\n\n if (wikiMode === 'local') {\n // \u2500\u2500 Local model selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const WIKI_LOCAL_MODELS = [\n {\n value: 'onnx-community/gemma-4-E4B-it-ONNX',\n label: 'Gemma 4 E4B (recommended)',\n description: '~3\u20134 GB \u00B7 Google DeepMind Gemma 4 \u00B7 4.5B params \u00B7 128K context \u00B7 Best quality \u00B7 Apache 2.0',\n },\n {\n value: 'onnx-community/Qwen2.5-1.5B-Instruct',\n label: 'Qwen2.5-1.5B',\n description: '~1.5 GB \u00B7 Lighter option if RAM is limited \u00B7 Acceptable quality',\n },\n {\n value: 'HuggingFaceTB/SmolLM2-1.7B-Instruct',\n label: 'SmolLM2-1.7B',\n description: '~1.7 GB \u00B7 HuggingFace compact model \u00B7 Good at following structured formats',\n },\n {\n value: '__other__',\n label: 'Other',\n description: 'Enter a custom HuggingFace model ID (must have ONNX weights on onnx-community)',\n },\n ] as const;\n\n const wikiModelChoice = await arrowSelect<string>(rl, 'Local wiki synthesis model:', WIKI_LOCAL_MODELS.map(m => ({ value: m.value, label: m.label, description: m.description })));\n\n if (wikiModelChoice === '__other__') {\n console.log(`\\n ${dim}Enter a HuggingFace model ID (e.g. onnx-community/gemma-4-E4B-it-ONNX).${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Model identifier:${reset} `)).trim();\n if (raw.includes('/')) { patch.wikiLocalModel = raw; break; }\n console.log(` Expected a HuggingFace model ID in the format org/model-name.`);\n }\n } else {\n patch.wikiLocalModel = wikiModelChoice;\n }\n }\n }\n\n return patch;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA8F;AAIvF,MAAM,0BAA0B;AAGvC,MAAM,gBAAgB;AAAA,EACpB;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,I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AG;AAAE,kBAAM,iBAAiB;AAAK;AAAA,UAAO;AAC5D,kBAAQ,IAAI,iEAAiE;AAAA,QAC/E;AAAA,MACF,OAAO;AACL,cAAM,iBAAiB;AAAA,MACzB;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;",
4
+ "sourcesContent": ["/**\n * KiroGraph Installer \u2014 configuration prompting\n */\n\nimport * as readline from 'readline';\nimport { KiroGraphConfig } from '../../config';\ntype CavemanMode = 'lite' | 'full' | 'ultra';\nimport { ask, askToggle, arrowSelect, printSection, printSeparator, dim, reset, violet } from './prompts';\nimport { promptImportGlobalHookSelection } from '../../hooks/import-prompt';\n\nexport interface PromptConfigOptions {\n projectRoot?: string;\n offerHookImport?: boolean;\n}\nexport type ConfigPatch = Pick<KiroGraphConfig, 'enableEmbeddings' | 'useVecIndex' | 'semanticEngine' | 'turboquantMemDocs' | 'turboquantBits' | 'turbovecMemDocs' | 'turbovecBits' | 'typesenseDashboard' | 'qdrantDashboard' | 'extractDocstrings' | 'trackCallSites' | 'enableArchitecture' | 'cavemanMode' | 'shellCompressionLevel' | 'enableMemory' | 'enableWatchmen' | 'watchmenThreshold' | 'watchmenSynthesisMode' | 'watchmenLocalModel' | 'enableDocs' | 'docsContextLimit' | 'enableData' | 'dataContextLimit' | 'enableSecurity' | 'enablePatterns' | 'enableWiki' | 'wikiSynthesisMode' | 'wikiLocalModel' | 'enableCodeHealth' | 'enableAdvancedAnalysis' | 'enableAgentUtils'> & { embeddingModel?: string; embeddingDim?: number };\nexport type SemanticEngine = KiroGraphConfig['semanticEngine'];\n\nexport const DEFAULT_EMBEDDING_MODEL = 'nomic-ai/nomic-embed-text-v1.5';\n\n/** Well-known embedding models with their output dimensions. */\nconst PRESET_MODELS = [\n {\n value: 'nomic-ai/nomic-embed-text-v1.5',\n label: 'nomic-embed-text-v1.5',\n dim: 768,\n description: '768-dim \u00B7 ~130MB \u00B7 Best quality for code search (recommended)',\n },\n {\n value: 'onnx-community/embeddinggemma-300m-ONNX',\n label: 'embeddinggemma-300m',\n dim: 768,\n description: '768-dim \u00B7 ~300MB \u00B7 Google Gemma-based, multilingual, 2048-token context',\n },\n {\n value: 'Xenova/all-MiniLM-L6-v2',\n label: 'all-MiniLM-L6-v2',\n dim: 384,\n description: '384-dim \u00B7 ~23MB \u00B7 Fast and lightweight, lower accuracy',\n },\n {\n value: 'BAAI/bge-base-en-v1.5',\n label: 'bge-base-en-v1.5',\n dim: 768,\n description: '768-dim \u00B7 ~110MB \u00B7 Strong general-purpose alternative to nomic',\n },\n {\n value: '__other__',\n label: 'Other',\n dim: 768,\n description: 'Enter a custom HuggingFace model ID and embedding dimension',\n },\n] as const;\n\nexport async function promptConfigOptions(\n rl: readline.Interface,\n opts: PromptConfigOptions = {},\n): Promise<{ patch: ConfigPatch; hooksToImport: string[] | null }> {\n // \u2500\u2500 Semantic Search \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDD0D', 'Semantic Search');\n\n const enableEmbeddings = await askToggle(\n rl,\n 'Semantic embeddings (similarity search):',\n 'Enables natural-language code search via vector embeddings. A local model (~130MB) is downloaded on first use.',\n );\n\n const patch: ConfigPatch = { enableEmbeddings, useVecIndex: false, semanticEngine: 'cosine', turboquantMemDocs: false, turboquantBits: 3, turbovecMemDocs: false, turbovecBits: 4, typesenseDashboard: false, qdrantDashboard: false, extractDocstrings: false, trackCallSites: false, enableArchitecture: false, cavemanMode: 'off', shellCompressionLevel: 'normal', enableMemory: false, enableWatchmen: false, watchmenThreshold: 5, watchmenSynthesisMode: 'local', watchmenLocalModel: 'onnx-community/gemma-4-E4B-it-ONNX', enableDocs: false, docsContextLimit: 0, enableData: false, dataContextLimit: 0, enableSecurity: false, enablePatterns: false, enableWiki: false, wikiSynthesisMode: 'agent', wikiLocalModel: 'onnx-community/gemma-4-E4B-it-ONNX', enableCodeHealth: false, enableAdvancedAnalysis: false, enableAgentUtils: false };\n\n if (enableEmbeddings) {\n // \u2500\u2500 Model selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const modelChoice = await arrowSelect<string>(\n rl,\n 'Embedding model:',\n PRESET_MODELS.map(m => ({ value: m.value, label: m.label, description: m.description })),\n );\n\n let embeddingModel: string;\n let embeddingDim: number;\n\n if (modelChoice === '__other__') {\n console.log(`\\n ${dim}Enter a HuggingFace model ID in the format org/model-name.${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Model identifier:${reset} `)).trim();\n if (raw.includes('/')) { embeddingModel = raw; break; }\n console.log(` Expected a HuggingFace model ID in the format org/model-name (e.g. nomic-ai/nomic-embed-text-v1.5).`);\n }\n console.log(`\\n ${dim}Enter the embedding output dimension for this model (check the model card on HuggingFace).${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Embedding dimension (e.g. 768, 384):${reset} `)).trim();\n const n = parseInt(raw, 10);\n if (!isNaN(n) && n > 0) { embeddingDim = n; break; }\n console.log(` Expected a positive integer (e.g. 768, 384, 1536).`);\n }\n } else {\n const preset = PRESET_MODELS.find(m => m.value === modelChoice)!;\n embeddingModel = preset.value;\n embeddingDim = preset.dim;\n }\n\n patch.embeddingModel = embeddingModel;\n patch.embeddingDim = embeddingDim;\n\n // \u2500\u2500 Engine selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const semanticEngine = await arrowSelect<SemanticEngine>(rl, 'Vector search engine:', [\n { value: 'cosine', label: 'cosine', description: 'In-process cosine similarity. No extra deps. Best for small/medium projects.' },\n { value: 'turboquant', label: 'turboquant', description: 'ANN index, zero native deps. Compresses embeddings 20\u201330\u00D7 (Google TurboQuant). ANN without native binaries \u2014 ideal for CI, ARM, restricted envs. Optional: npm install turboquant-js.' },\n { value: 'turbovec', label: 'turbovec', description: 'ANN search via Rust/SIMD (napi-rs). Same TurboQuant algorithm but NEON on ARM and AVX-512BW on x86 \u2014 faster than turboquant-js at the cost of a one-time Rust build. Requires Rust toolchain. Build: cd native/turbovec-node && npm install && npm run build.' },\n { value: 'sqlite-vec', label: 'sqlite-vec', description: 'ANN index. Sub-linear search. Best for large codebases. Needs: better-sqlite3, sqlite-vec (native).' },\n { value: 'orama', label: 'orama', description: 'Hybrid search (full-text + vector). Pure JS. Needs: @orama/orama, @orama/plugin-data-persistence.' },\n { value: 'pglite', label: 'pglite', description: 'Hybrid search via PostgreSQL + pgvector. Exact results. Pure WASM. Needs: @electric-sql/pglite.' },\n { value: 'lancedb', label: 'lancedb', description: 'ANN search via LanceDB (Apache Lance columnar format). Pure JS. Needs: @lancedb/lancedb.' },\n { value: 'qdrant', label: 'qdrant', description: 'ANN search via Qdrant embedded binary (HNSW index, Cosine). Needs: qdrant-local.' },\n { value: 'typesense', label: 'typesense', description: 'ANN search via Typesense (auto-downloaded binary, HNSW, Cosine). Needs: typesense.' },\n ]);\n patch.semanticEngine = semanticEngine;\n patch.useVecIndex = semanticEngine === 'sqlite-vec';\n\n // TurboQuant for memory & docs: offer when cosine or turboquant is the code-node engine\n if (semanticEngine === 'cosine' || semanticEngine === 'turboquant') {\n patch.turboquantMemDocs = await askToggle(rl,\n 'TurboQuant for memory & docs search (optional):',\n 'Replaces the default linear cosine scan in memory observations and doc sections with a compressed ANN index \u2014 no native deps required. Most useful when you accumulate many observations or large doc sets (1 000+ entries).',\n false,\n );\n }\n\n // TurboVec bit width\n if (semanticEngine === 'turbovec') {\n patch.turbovecBits = await arrowSelect<number>(rl, 'TurboVec bits per coordinate:', [\n { value: 4, label: '4 bits (recommended)', description: 'Best quality, ~19\u00D7 compression vs raw Float32. Default.' },\n { value: 3, label: '3 bits', description: 'Balanced \u2014 ~25\u00D7 compression, slight quality drop.' },\n { value: 2, label: '2 bits', description: 'Highest compression (~38\u00D7), lowest accuracy.' },\n ]);\n patch.turbovecMemDocs = await askToggle(rl,\n 'TurboVec for memory & docs search (optional):',\n 'Replaces the default linear cosine scan in memory observations and doc sections with the TurboVec ANN index. Requires the addon to be built.',\n false,\n );\n }\n\n if (semanticEngine === 'typesense') {\n patch.typesenseDashboard = await askToggle(rl,\n 'Typesense dashboard:',\n 'Serves the Typesense Dashboard locally and opens it in your browser after indexing completes.',\n false,\n );\n }\n\n if (semanticEngine === 'qdrant') {\n patch.qdrantDashboard = await askToggle(rl,\n 'Qdrant dashboard:',\n 'Downloads the Qdrant Web UI (first time only) and opens it in your browser after indexing completes.',\n false,\n );\n }\n }\n\n // \u2500\u2500 Graph Features \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCCA', 'Graph Features');\n\n patch.extractDocstrings = await askToggle(rl,\n 'Docstring extraction:',\n 'Enriches symbol metadata and improves context quality. Slightly increases indexing time.',\n false,\n );\n\n patch.trackCallSites = await askToggle(rl,\n 'Call site tracking (caller/callee graph):',\n 'Enables kirograph_callers and kirograph_callees MCP tools. Increases index size.',\n false,\n );\n\n patch.enableArchitecture = await askToggle(rl,\n 'Architecture analysis (packages + layers):',\n 'Detects packages from manifests and architectural layers. Enables kirograph_architecture, kirograph_coupling, kirograph_package.',\n false,\n );\n\n if (patch.enableArchitecture) {\n patch.enableAdvancedAnalysis = await askToggle(rl,\n 'Advanced graph analysis (type hierarchies, flows, communities, refactor):',\n 'Enables kirograph_type_hierarchy, kirograph_flows, kirograph_communities, kirograph_refactor. Most useful alongside architecture analysis.',\n false,\n );\n }\n\n // \u2500\u2500 Graph Tools \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCCA', 'Graph Tools');\n\n patch.enableCodeHealth = await askToggle(rl,\n 'Code health tools (hotspots, dead code, change tracking):',\n 'Enables kirograph_hotspots, kirograph_surprising, kirograph_diff, kirograph_dead_code, kirograph_circular_deps.',\n false,\n );\n\n patch.enableAgentUtils = await askToggle(rl,\n 'Agent utilities (file caching, budget tracking):',\n 'Enables kirograph_read, kirograph_gain, kirograph_budget.',\n false,\n );\n\n // \u2500\u2500 Security \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDD12', 'Security');\n\n patch.enableSecurity = await askToggle(rl,\n 'Security analysis (vulnerability scanning + reachability):',\n 'Scans dependency manifests for known vulnerabilities and performs reachability analysis. Requires Architecture analysis (will be auto-enabled). Enables kirograph_security, kirograph_vulns, kirograph_sbom, kirograph_vex, kirograph_reachability MCP tools.',\n false,\n );\n\n if (patch.enableSecurity && !patch.enableArchitecture) {\n patch.enableArchitecture = true;\n console.log(' \u2139 Architecture analysis auto-enabled (required by Security module)');\n }\n\n // \u2500\u2500 Pattern Matching \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDD0D', 'Pattern Matching');\n\n patch.enablePatterns = await askToggle(rl,\n 'Precise SAST with ast-grep?',\n 'Runs AST structural pattern matching during indexing using @ast-grep/napi (~15MB native binding). Unlike heuristic symbol-name analysis, matches real code structure \u2014 precise SQL injection, path traversal, eval detection. Requires @ast-grep/napi (will be installed automatically if you answer yes).',\n false,\n );\n\n // \u2500\u2500 Documentation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCD6', 'Documentation');\n\n (patch as any).enableDocs = await askToggle(rl,\n 'Documentation indexing (section-level retrieval):',\n 'Indexes docs by heading structure. Enables kirograph_docs_toc, kirograph_docs_search, kirograph_docs_section, kirograph_docs_outline, kirograph_docs_refs.',\n false,\n );\n\n if ((patch as any).enableDocs) {\n const contextChoice = await arrowSelect<number>(rl, 'Include doc sections in kirograph_context results?', [\n { value: 0, label: '0 (disabled)', description: 'Docs stay separate \u2014 use kirograph_docs_* tools explicitly (recommended)' },\n { value: 3, label: '3 sections', description: 'Include up to 3 relevant doc sections in context results' },\n { value: 5, label: '5 sections', description: 'Include up to 5 relevant doc sections in context results' },\n { value: 10, label: '10 sections', description: 'Include up to 10 relevant doc sections in context results' },\n ]);\n (patch as any).docsContextLimit = contextChoice;\n }\n\n // \u2500\u2500 Data \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCCA', 'Data');\n\n (patch as any).enableData = await askToggle(rl,\n 'Tabular data indexing (CSV/TSV/JSONL/JSON/Excel/Parquet):',\n 'Indexes data files for structured querying. Enables kirograph_data_list, kirograph_data_describe, kirograph_data_query, kirograph_data_aggregate, kirograph_data_search.',\n false,\n );\n\n if ((patch as any).enableData) {\n (patch as any).dataInstallExcel = await askToggle(rl,\n 'Install Excel support (xlsx package)?',\n 'Required for .xlsx/.xls files. CSV/TSV/JSONL/JSON are always supported without extra deps.',\n false,\n );\n\n (patch as any).dataInstallParquet = await askToggle(rl,\n 'Install Parquet support (parquetjs-lite package)?',\n 'Required for .parquet files. CSV/TSV/JSONL/JSON are always supported without extra deps.',\n false,\n );\n\n (patch as any).dataInstallPdf = await askToggle(rl,\n 'Install PDF support (@firecrawl/pdf-inspector package)?',\n 'Required for .pdf files. Rust/NAPI binary \u2014 prebuilts for linux-x64 and macOS ARM64.',\n false,\n );\n\n const contextChoice = await arrowSelect<number>(rl, 'Include dataset schemas in kirograph_context results?', [\n { value: 0, label: '0 (disabled)', description: 'Data stays separate \u2014 use kirograph_data_* tools explicitly (recommended)' },\n { value: 2, label: '2 datasets', description: 'Include up to 2 relevant dataset schemas in context results' },\n { value: 5, label: '5 datasets', description: 'Include up to 5 relevant dataset schemas in context results' },\n ]);\n (patch as any).dataContextLimit = contextChoice;\n }\n\n // \u2500\u2500 Agent Behavior \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83E\uDD16', 'Agent Behavior');\n\n const cavemanChoice = await arrowSelect(rl, 'Communication style (caveman mode):', [\n { value: 'off', label: 'off', description: 'Normal responses \u2014 no compression' },\n { value: 'lite', label: 'lite', description: 'Compact, no filler, full sentences' },\n { value: 'full', label: 'full', description: 'Fragments, no articles, short synonyms' },\n { value: 'ultra', label: 'ultra', description: 'Max compression, abbreviations, \u2192 for causality' },\n ]);\n patch.cavemanMode = cavemanChoice as CavemanMode | 'off';\n\n const compressionChoice = await arrowSelect(rl, 'Shell compression (kirograph_exec):', [\n { value: 'off', label: 'off', description: 'Disables kirograph_exec entirely' },\n { value: 'normal', label: 'normal', description: 'Balanced: removes noise, keeps structure (recommended)' },\n { value: 'aggressive', label: 'aggressive', description: 'More compact: groups by category, limits output' },\n { value: 'ultra', label: 'ultra', description: 'Maximum compression: counts and summaries only' },\n ]);\n patch.shellCompressionLevel = compressionChoice as KiroGraphConfig['shellCompressionLevel'];\n if (compressionChoice === 'off') {\n console.log(' \u2139 kirograph_exec disabled (shell compression is off)');\n }\n\n let hooksToImport: string[] | null = null;\n if (opts.offerHookImport && opts.projectRoot) {\n printSection('\uD83E\uDE9D', 'Hooks');\n hooksToImport = await promptImportGlobalHookSelection();\n }\n\n // \u2500\u2500 Memory \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83E\uDDE0', 'Memory');\n\n patch.enableMemory = await askToggle(rl,\n 'Persistent memory (cross-session observations):',\n 'Stores decisions, errors, and patterns across sessions. Compressed (if caveman is on), linked to code symbols, searchable via kirograph_mem_* tools. Zero LLM tokens on write.',\n false,\n );\n\n if (patch.enableMemory) {\n patch.enableWatchmen = await askToggle(rl,\n 'Watchmen (auto-synthesize workspace briefs from memory):',\n 'When enough observations accumulate (default: 5), synthesizes them into .kiro/steering/kirograph-watchmen.md, CLAUDE.md, AGENTS.md, or the equivalent for your tool.',\n false,\n );\n\n if (patch.enableWatchmen) {\n // \u2500\u2500 Synthesis mode \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const synthesisMode = await arrowSelect<KiroGraphConfig['watchmenSynthesisMode']>(\n rl,\n 'Watchmen synthesis mode:',\n [\n {\n value: 'local',\n label: 'Local model',\n description: 'Runs a local HuggingFace model via @huggingface/transformers. Zero API cost, no data leaves your machine. Model downloaded once to ~/.kirograph/models/. Works for all tools via runCommand hook.',\n },\n {\n value: 'agent',\n label: 'Active agent',\n description: '\u26A0 Kiro only. Uses the active Kiro agent to synthesize. Consumes API tokens/credits on every synthesis. Not supported for other tools.',\n },\n ],\n );\n patch.watchmenSynthesisMode = synthesisMode;\n\n if (synthesisMode === 'local') {\n // \u2500\u2500 Local model selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const LOCAL_MODELS = [\n {\n value: 'onnx-community/gemma-4-E4B-it-ONNX',\n label: 'Gemma 4 E4B (recommended)',\n description: '~3\u20134 GB \u00B7 Google DeepMind Gemma 4 \u00B7 4.5B params \u00B7 128K context \u00B7 Best quality \u00B7 Apache 2.0',\n },\n {\n value: 'onnx-community/Qwen2.5-1.5B-Instruct',\n label: 'Qwen2.5-1.5B',\n description: '~1.5 GB \u00B7 Lighter option if RAM is limited \u00B7 Acceptable quality',\n },\n {\n value: 'HuggingFaceTB/SmolLM2-1.7B-Instruct',\n label: 'SmolLM2-1.7B',\n description: '~1.7 GB \u00B7 HuggingFace compact model \u00B7 Good at following structured formats',\n },\n {\n value: '__other__',\n label: 'Other',\n description: 'Enter a custom HuggingFace model ID (must have ONNX weights on onnx-community)',\n },\n ] as const;\n\n const modelChoice = await arrowSelect<string>(rl, 'Local synthesis model:', LOCAL_MODELS.map(m => ({ value: m.value, label: m.label, description: m.description })));\n\n if (modelChoice === '__other__') {\n console.log(`\\n ${dim}Enter a HuggingFace model ID (e.g. onnx-community/gemma-4-E4B-it-ONNX).${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Model identifier:${reset} `)).trim();\n if (raw.includes('/')) { patch.watchmenLocalModel = raw; break; }\n console.log(` Expected a HuggingFace model ID in the format org/model-name.`);\n }\n } else {\n patch.watchmenLocalModel = modelChoice;\n }\n }\n }\n }\n\n // \u2500\u2500 Wiki \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCD6', 'Wiki');\n\n patch.enableWiki = await askToggle(rl,\n 'LLM Wiki (Karpathy-style structured knowledge base):',\n 'Maintains a set of markdown pages that compound knowledge across sessions. Supports search, ingest (two-tool flow), conflict resolution, and health checks via kirograph_wiki_* tools.',\n false,\n );\n\n if (patch.enableWiki) {\n const wikiMode = await arrowSelect<KiroGraphConfig['wikiSynthesisMode']>(\n rl,\n 'Wiki synthesis mode:',\n [\n {\n value: 'agent',\n label: 'Active agent (recommended)',\n description: 'Uses the active LLM agent to generate WIKI_DIFF blocks. Works with any AI tool. Consumes API tokens on ingest.',\n },\n {\n value: 'local',\n label: 'Local model',\n description: 'Runs a local HuggingFace model to generate diffs. Zero API cost, no data leaves your machine. Same infra as Watchmen.',\n },\n ],\n );\n patch.wikiSynthesisMode = wikiMode;\n\n if (wikiMode === 'local') {\n // \u2500\u2500 Local model selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const WIKI_LOCAL_MODELS = [\n {\n value: 'onnx-community/gemma-4-E4B-it-ONNX',\n label: 'Gemma 4 E4B (recommended)',\n description: '~3\u20134 GB \u00B7 Google DeepMind Gemma 4 \u00B7 4.5B params \u00B7 128K context \u00B7 Best quality \u00B7 Apache 2.0',\n },\n {\n value: 'onnx-community/Qwen2.5-1.5B-Instruct',\n label: 'Qwen2.5-1.5B',\n description: '~1.5 GB \u00B7 Lighter option if RAM is limited \u00B7 Acceptable quality',\n },\n {\n value: 'HuggingFaceTB/SmolLM2-1.7B-Instruct',\n label: 'SmolLM2-1.7B',\n description: '~1.7 GB \u00B7 HuggingFace compact model \u00B7 Good at following structured formats',\n },\n {\n value: '__other__',\n label: 'Other',\n description: 'Enter a custom HuggingFace model ID (must have ONNX weights on onnx-community)',\n },\n ] as const;\n\n const wikiModelChoice = await arrowSelect<string>(rl, 'Local wiki synthesis model:', WIKI_LOCAL_MODELS.map(m => ({ value: m.value, label: m.label, description: m.description })));\n\n if (wikiModelChoice === '__other__') {\n console.log(`\\n ${dim}Enter a HuggingFace model ID (e.g. onnx-community/gemma-4-E4B-it-ONNX).${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Model identifier:${reset} `)).trim();\n if (raw.includes('/')) { patch.wikiLocalModel = raw; break; }\n console.log(` Expected a HuggingFace model ID in the format org/model-name.`);\n }\n } else {\n patch.wikiLocalModel = wikiModelChoice;\n }\n }\n }\n\n return { patch, hooksToImport };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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