kirograph 0.16.0 → 0.17.0

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.
Files changed (64) hide show
  1. package/README.md +227 -8
  2. package/dist/bin/commands/affected.js +40 -5
  3. package/dist/bin/commands/affected.js.map +2 -2
  4. package/dist/bin/commands/data.js +665 -0
  5. package/dist/bin/commands/data.js.map +7 -0
  6. package/dist/bin/commands/help.js +5 -0
  7. package/dist/bin/commands/help.js.map +2 -2
  8. package/dist/bin/installer/config-prompt.js +28 -1
  9. package/dist/bin/installer/config-prompt.js.map +2 -2
  10. package/dist/bin/installer/index.js +28 -1
  11. package/dist/bin/installer/index.js.map +2 -2
  12. package/dist/bin/installer/steering.js +33 -0
  13. package/dist/bin/installer/steering.js.map +2 -2
  14. package/dist/bin/installer/targets/index.js.map +1 -1
  15. package/dist/bin/installer/targets/kiro.js +2 -2
  16. package/dist/bin/installer/targets/kiro.js.map +2 -2
  17. package/dist/bin/kirograph.js +3 -1
  18. package/dist/bin/kirograph.js.map +3 -3
  19. package/dist/bin/progress.js +30 -0
  20. package/dist/bin/progress.js.map +2 -2
  21. package/dist/compression/naive-cost.js +25 -0
  22. package/dist/compression/naive-cost.js.map +2 -2
  23. package/dist/compression/tracker.js +11 -2
  24. package/dist/compression/tracker.js.map +2 -2
  25. package/dist/compression/types.js.map +1 -1
  26. package/dist/config.js +37 -1
  27. package/dist/config.js.map +2 -2
  28. package/dist/core/pipeline.js +56 -2
  29. package/dist/core/pipeline.js.map +2 -2
  30. package/dist/data/filters.js +105 -0
  31. package/dist/data/filters.js.map +7 -0
  32. package/dist/data/indexer.js +225 -0
  33. package/dist/data/indexer.js.map +7 -0
  34. package/dist/data/linker.js +150 -0
  35. package/dist/data/linker.js.map +7 -0
  36. package/dist/data/lint.js +109 -0
  37. package/dist/data/lint.js.map +7 -0
  38. package/dist/data/parsers/csv.js +132 -0
  39. package/dist/data/parsers/csv.js.map +7 -0
  40. package/dist/data/parsers/excel.js +88 -0
  41. package/dist/data/parsers/excel.js.map +7 -0
  42. package/dist/data/parsers/index.js +79 -0
  43. package/dist/data/parsers/index.js.map +7 -0
  44. package/dist/data/parsers/json-array.js +89 -0
  45. package/dist/data/parsers/json-array.js.map +7 -0
  46. package/dist/data/parsers/jsonl.js +84 -0
  47. package/dist/data/parsers/jsonl.js.map +7 -0
  48. package/dist/data/parsers/parquet.js +95 -0
  49. package/dist/data/parsers/parquet.js.map +7 -0
  50. package/dist/data/profiler.js +182 -0
  51. package/dist/data/profiler.js.map +7 -0
  52. package/dist/data/queries.js +512 -0
  53. package/dist/data/queries.js.map +7 -0
  54. package/dist/data/types.js +17 -0
  55. package/dist/data/types.js.map +7 -0
  56. package/dist/db/data-schema.sql +61 -0
  57. package/dist/db/database.js +11 -0
  58. package/dist/db/database.js.map +2 -2
  59. package/dist/mcp/tool-names.js +9 -1
  60. package/dist/mcp/tool-names.js.map +2 -2
  61. package/dist/mcp/tools.js +423 -0
  62. package/dist/mcp/tools.js.map +2 -2
  63. package/dist/types.js.map +1 -1
  64. package/package.json +4 -2
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/bin/commands/data.ts"],
4
+ "sourcesContent": ["import { Command } from 'commander';\nimport { loadConfig } from '../../config';\nimport { dim, reset, violet, bold, green, value } from '../ui';\n\nexport function register(program: Command): void {\n const data = program\n .command('data')\n .description('Tabular data navigation (requires enableData: true)');\n\n // \u2500\u2500 list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 data\n .command('list')\n .description('List all indexed datasets')\n .option('--json', 'Output as JSON')\n .action(async (opts: { json?: boolean }) => {\n const cwd = process.cwd();\n const config = await loadConfig(cwd);\n if (!config.enableData) {\n console.error(` \u2716 Data indexing is not enabled. Set ${violet}${bold}enableData: true${reset} in .kirograph/config.json`);\n console.error(` ${dim}Then re-run:${reset} ${violet}${bold}kirograph index${reset}`);\n process.exit(1);\n }\n\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n if (!KiroGraph.isInitialized(cwd)) { console.error(' \u2716 KiroGraph not initialized. Run: kirograph init'); process.exit(1); }\n const cg = await KiroGraph.open(cwd);\n const db = cg.getDatabase();\n db.applyDataSchema();\n\n const { DataQueries } = await Promise.resolve().then(() => require('../../data/queries.js'));\n const dq = new DataQueries(db.getRawDb());\n const datasets = dq.listDatasets();\n\n if (datasets.length === 0) {\n console.log(` ${dim}No datasets indexed.${reset} Run ${violet}${bold}kirograph index${reset} first.`);\n cg.close(); return;\n }\n\n if (opts.json) {\n console.log(JSON.stringify(datasets, null, 2));\n } else {\n console.log(`\\n ${bold}Indexed Datasets${reset} (${datasets.length})\\n`);\n for (const ds of datasets) {\n const sizeMb = (ds.fileSize / 1024 / 1024).toFixed(2);\n console.log(` ${green}${ds.id}${reset}`);\n console.log(` ${dim}File:${reset} ${ds.filePath} ${dim}Format:${reset} ${ds.format}`);\n console.log(` ${dim}Rows:${reset} ${ds.rowCount.toLocaleString()} ${dim}Columns:${reset} ${ds.columnCount} ${dim}Size:${reset} ${sizeMb} MB`);\n console.log();\n }\n }\n cg.close();\n });\n\n // \u2500\u2500 describe \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 data\n .command('describe <dataset>')\n .description('Show schema and column profiles for a dataset')\n .option('--column <name>', 'Deep dive on a single column')\n .option('--json', 'Output as JSON')\n .action(async (dataset: string, opts: { column?: string; json?: boolean }) => {\n const cwd = process.cwd();\n const config = await loadConfig(cwd);\n if (!config.enableData) {\n console.error(` \u2716 Data indexing is not enabled. Set ${violet}${bold}enableData: true${reset} in .kirograph/config.json`);\n process.exit(1);\n }\n\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n if (!KiroGraph.isInitialized(cwd)) { console.error(' \u2716 KiroGraph not initialized.'); process.exit(1); }\n const cg = await KiroGraph.open(cwd);\n const db = cg.getDatabase();\n db.applyDataSchema();\n\n const { DataQueries } = await Promise.resolve().then(() => require('../../data/queries.js'));\n const dq = new DataQueries(db.getRawDb());\n\n if (opts.column) {\n const col = dq.describeColumn(dataset, opts.column);\n if (!col) {\n console.error(` \u2716 Column \"${opts.column}\" not found in dataset \"${dataset}\".`);\n cg.close(); process.exit(1);\n }\n if (opts.json) {\n console.log(JSON.stringify(col, null, 2));\n } else {\n console.log(`\\n ${bold}${col.name}${reset} ${dim}(${col.inferredType})${reset}`);\n console.log(` ${dim}Position:${reset} ${col.position}`);\n console.log(` ${dim}Nullable:${reset} ${col.nullable ? 'yes' : 'no'} (${col.nullPct.toFixed(1)}% null, ${col.nullCount} nulls)`);\n console.log(` ${dim}Cardinality:${reset} ${col.cardinality}`);\n if (col.minValue != null) console.log(` ${dim}Min:${reset} ${col.minValue}`);\n if (col.maxValue != null) console.log(` ${dim}Max:${reset} ${col.maxValue}`);\n if (col.meanValue != null) console.log(` ${dim}Mean:${reset} ${col.meanValue.toFixed(4)}`);\n if (col.sampleValues.length > 0) console.log(` ${dim}Samples:${reset} ${col.sampleValues.join(', ')}`);\n console.log();\n }\n cg.close(); return;\n }\n\n const info = dq.describeDataset(dataset);\n if (!info) {\n console.error(` \u2716 Dataset \"${dataset}\" not found. Run ${violet}${bold}kirograph data list${reset} to see available datasets.`);\n cg.close(); process.exit(1);\n }\n\n if (opts.json) {\n console.log(JSON.stringify(info, null, 2));\n } else {\n const ds = info.dataset;\n const sizeMb = (ds.fileSize / 1024 / 1024).toFixed(2);\n console.log(`\\n ${bold}${ds.id}${reset}`);\n console.log(` ${dim}File:${reset} ${ds.filePath} ${dim}Format:${reset} ${ds.format} ${dim}Size:${reset} ${sizeMb} MB`);\n console.log(` ${dim}Rows:${reset} ${ds.rowCount.toLocaleString()} ${dim}Columns:${reset} ${ds.columnCount}`);\n console.log(`\\n ${bold}Columns:${reset}\\n`);\n\n const maxNameLen = Math.max(...info.columns.map(c => c.name.length), 4);\n console.log(` ${'Name'.padEnd(maxNameLen)} ${'Type'.padEnd(8)} ${'Null%'.padEnd(6)} ${'Card'.padEnd(6)} Samples`);\n console.log(` ${'-'.repeat(maxNameLen)} ${'-'.repeat(8)} ${'-'.repeat(6)} ${'-'.repeat(6)} -------`);\n for (const col of info.columns) {\n const nullPct = col.nullPct > 0 ? `${col.nullPct.toFixed(1)}%` : '0%';\n const samples = col.sampleValues.slice(0, 3).join(', ');\n console.log(` ${col.name.padEnd(maxNameLen)} ${col.inferredType.padEnd(8)} ${nullPct.padEnd(6)} ${String(col.cardinality).padEnd(6)} ${dim}${samples}${reset}`);\n }\n console.log();\n }\n cg.close();\n });\n\n // \u2500\u2500 query \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 data\n .command('query <dataset>')\n .description('Query rows with filters')\n .option('--filter <expr...>', 'Filters in format column:op:value (e.g. age:gt:18)')\n .option('--columns <cols>', 'Comma-separated column names to project')\n .option('--limit <n>', 'Max rows to return', '20')\n .option('--offset <n>', 'Offset for pagination', '0')\n .option('--json', 'Output as JSON')\n .action(async (dataset: string, opts: { filter?: string[]; columns?: string; limit?: string; offset?: string; json?: boolean }) => {\n const cwd = process.cwd();\n const config = await loadConfig(cwd);\n if (!config.enableData) {\n console.error(` \u2716 Data indexing is not enabled. Set ${violet}${bold}enableData: true${reset} in .kirograph/config.json`);\n process.exit(1);\n }\n\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n if (!KiroGraph.isInitialized(cwd)) { console.error(' \u2716 KiroGraph not initialized.'); process.exit(1); }\n const cg = await KiroGraph.open(cwd);\n const db = cg.getDatabase();\n db.applyDataSchema();\n\n const { DataQueries } = await Promise.resolve().then(() => require('../../data/queries.js'));\n const dq = new DataQueries(db.getRawDb());\n\n // Parse filters\n const filters = (opts.filter ?? []).map(f => {\n const parts = f.split(':');\n if (parts.length < 3) {\n console.error(` \u2716 Invalid filter format: \"${f}\". Expected column:op:value`);\n process.exit(1);\n }\n const column = parts[0]!;\n const op = parts[1]! as any;\n const val = parts.slice(2).join(':'); // value may contain colons\n return { column, op, value: val };\n });\n\n const columns = opts.columns ? opts.columns.split(',').map(c => c.trim()) : undefined;\n const limit = parseInt(opts.limit ?? '20', 10);\n const offset = parseInt(opts.offset ?? '0', 10);\n\n const result = dq.queryRows(dataset, { filters, columns, limit, offset });\n if (!result) {\n console.error(` \u2716 Dataset \"${dataset}\" not found.`);\n cg.close(); process.exit(1);\n }\n\n if (opts.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\n ${dim}Showing ${result.rows.length} of ${result.totalMatching} matching rows${reset}\\n`);\n if (result.rows.length > 0) {\n // Simple table output\n const keys = Object.keys(result.rows[0]!).filter(k => k !== 'rowid');\n const widths = keys.map(k => Math.max(k.length, ...result.rows.map(r => String(r[k] ?? '').slice(0, 30).length)));\n // Header\n console.log(' ' + keys.map((k, i) => k.padEnd(widths[i]!)).join(' '));\n console.log(' ' + widths.map(w => '-'.repeat(w)).join(' '));\n // Rows\n for (const row of result.rows) {\n console.log(' ' + keys.map((k, i) => String(row[k] ?? '').slice(0, 30).padEnd(widths[i]!)).join(' '));\n }\n }\n console.log();\n }\n cg.close();\n });\n\n // \u2500\u2500 aggregate \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 data\n .command('aggregate <dataset>')\n .description('Server-side aggregation (GROUP BY)')\n .requiredOption('--group-by <cols>', 'Comma-separated columns to group by')\n .requiredOption('--metric <expr...>', 'Metrics in format op:column (e.g. sum:amount, avg:price)')\n .option('--filter <expr...>', 'Filters in format column:op:value')\n .option('--json', 'Output as JSON')\n .action(async (dataset: string, opts: { groupBy: string; metric: string[]; filter?: string[]; json?: boolean }) => {\n const cwd = process.cwd();\n const config = await loadConfig(cwd);\n if (!config.enableData) {\n console.error(` \u2716 Data indexing is not enabled. Set ${violet}${bold}enableData: true${reset} in .kirograph/config.json`);\n process.exit(1);\n }\n\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n if (!KiroGraph.isInitialized(cwd)) { console.error(' \u2716 KiroGraph not initialized.'); process.exit(1); }\n const cg = await KiroGraph.open(cwd);\n const db = cg.getDatabase();\n db.applyDataSchema();\n\n const { DataQueries } = await Promise.resolve().then(() => require('../../data/queries.js'));\n const dq = new DataQueries(db.getRawDb());\n\n const groupBy = opts.groupBy.split(',').map(c => c.trim());\n const metrics = opts.metric.map(m => {\n const [op, ...colParts] = m.split(':');\n const column = colParts.join(':');\n if (!op || !column) {\n console.error(` \u2716 Invalid metric format: \"${m}\". Expected op:column (e.g. sum:amount)`);\n process.exit(1);\n }\n return { op: op as any, column };\n });\n\n const filters = (opts.filter ?? []).map(f => {\n const parts = f.split(':');\n if (parts.length < 3) { console.error(` \u2716 Invalid filter: \"${f}\"`); process.exit(1); }\n return { column: parts[0]!, op: parts[1]! as any, value: parts.slice(2).join(':') };\n });\n\n const result = dq.aggregate(dataset, { groupBy, metrics, filters });\n if (!result) {\n console.error(` \u2716 Dataset \"${dataset}\" not found.`);\n cg.close(); process.exit(1);\n }\n\n if (opts.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\n ${dim}${result.rows.length} groups${reset}\\n`);\n if (result.rows.length > 0) {\n const keys = Object.keys(result.rows[0]!);\n const widths = keys.map(k => Math.max(k.length, ...result.rows.map(r => String(r[k] ?? '').slice(0, 20).length)));\n console.log(' ' + keys.map((k, i) => k.padEnd(widths[i]!)).join(' '));\n console.log(' ' + widths.map(w => '-'.repeat(w)).join(' '));\n for (const row of result.rows) {\n console.log(' ' + keys.map((k, i) => String(row[k] ?? '').slice(0, 20).padEnd(widths[i]!)).join(' '));\n }\n }\n console.log();\n }\n cg.close();\n });\n\n // \u2500\u2500 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\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n data\n .command('search <dataset> <query>')\n .description('Search column names and sample values by keyword')\n .option('--json', 'Output as JSON')\n .action(async (dataset: string, query: string, opts: { json?: boolean }) => {\n const cwd = process.cwd();\n const config = await loadConfig(cwd);\n if (!config.enableData) {\n console.error(` \u2716 Data indexing is not enabled. Set ${violet}${bold}enableData: true${reset} in .kirograph/config.json`);\n process.exit(1);\n }\n\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n if (!KiroGraph.isInitialized(cwd)) { console.error(' \u2716 KiroGraph not initialized.'); process.exit(1); }\n const cg = await KiroGraph.open(cwd);\n const db = cg.getDatabase();\n db.applyDataSchema();\n\n const { DataQueries } = await Promise.resolve().then(() => require('../../data/queries.js'));\n const dq = new DataQueries(db.getRawDb());\n const results = dq.searchColumns(dataset, query);\n\n if (results.length === 0) {\n console.log(` ${dim}No columns matching \"${query}\" in dataset \"${dataset}\".${reset}`);\n cg.close(); return;\n }\n\n if (opts.json) {\n console.log(JSON.stringify(results, null, 2));\n } else {\n console.log(`\\n ${bold}Columns matching \"${query}\"${reset} (${results.length})\\n`);\n for (const col of results) {\n const samples = col.sampleValues.slice(0, 5).join(', ');\n console.log(` ${green}${col.name}${reset} ${dim}(${col.inferredType})${reset}`);\n console.log(` ${dim}Cardinality:${reset} ${col.cardinality} ${dim}Null:${reset} ${col.nullPct.toFixed(1)}%`);\n if (samples) console.log(` ${dim}Samples:${reset} ${samples}`);\n console.log();\n }\n }\n cg.close();\n });\n\n // \u2500\u2500 index \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 data\n .command('index')\n .description('Index all data files (incremental)')\n .option('--json', 'Output as JSON')\n .action(async (opts: { json?: boolean }) => {\n const cwd = process.cwd();\n const config = await loadConfig(cwd);\n if (!config.enableData) {\n console.error(` \u2716 Data indexing is not enabled. Set ${violet}${bold}enableData: true${reset} in .kirograph/config.json`);\n console.error(` ${dim}Then re-run:${reset} ${violet}${bold}kirograph index${reset}`);\n process.exit(1);\n }\n\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n if (!KiroGraph.isInitialized(cwd)) { console.error(' \u2716 KiroGraph not initialized. Run: kirograph init'); process.exit(1); }\n const cg = await KiroGraph.open(cwd);\n const db = cg.getDatabase();\n db.applyDataSchema();\n\n const { DataIndexer } = await Promise.resolve().then(() => require('../../data/indexer.js'));\n const indexer = new DataIndexer(db.getRawDb(), config, cwd);\n const result = await indexer.indexAll({\n onProgress: (msg) => { if (!opts.json) console.log(` ${dim}${msg}${reset}`); },\n });\n\n if (opts.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\n ${green}\u2713${reset} Indexed ${bold}${result.datasetsIndexed}${reset} datasets, ${result.rowsIndexed.toLocaleString()} rows, ${result.columnsProfiled} columns (${result.duration}ms)`);\n if (result.errors.length > 0) {\n console.log(` ${dim}Errors (${result.errors.length}):${reset}`);\n for (const err of result.errors.slice(0, 5)) {\n console.log(` \u2716 ${err}`);\n }\n }\n console.log();\n }\n cg.close();\n });\n\n // \u2500\u2500 reindex \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 data\n .command('reindex')\n .description('Force re-index all data files (ignores content hashes)')\n .option('--json', 'Output as JSON')\n .action(async (opts: { json?: boolean }) => {\n const cwd = process.cwd();\n const config = await loadConfig(cwd);\n if (!config.enableData) {\n console.error(` \u2716 Data indexing is not enabled. Set ${violet}${bold}enableData: true${reset} in .kirograph/config.json`);\n process.exit(1);\n }\n\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n if (!KiroGraph.isInitialized(cwd)) { console.error(' \u2716 KiroGraph not initialized.'); process.exit(1); }\n const cg = await KiroGraph.open(cwd);\n const db = cg.getDatabase();\n db.applyDataSchema();\n\n const { DataIndexer } = await Promise.resolve().then(() => require('../../data/indexer.js'));\n const indexer = new DataIndexer(db.getRawDb(), config, cwd);\n const result = await indexer.indexAll({\n force: true,\n onProgress: (msg) => { if (!opts.json) console.log(` ${dim}${msg}${reset}`); },\n });\n\n if (opts.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\n ${green}\u2713${reset} Re-indexed ${bold}${result.datasetsIndexed}${reset} datasets, ${result.rowsIndexed.toLocaleString()} rows, ${result.columnsProfiled} columns (${result.duration}ms)`);\n if (result.errors.length > 0) {\n console.log(` ${dim}Errors (${result.errors.length}):${reset}`);\n for (const err of result.errors.slice(0, 5)) {\n console.log(` \u2716 ${err}`);\n }\n }\n console.log();\n }\n cg.close();\n });\n\n // \u2500\u2500 join \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 data\n .command('join <left> <right>')\n .description('SQL JOIN across two indexed datasets')\n .requiredOption('--left-col <col>', 'Join column from left dataset')\n .requiredOption('--right-col <col>', 'Join column from right dataset')\n .option('--type <type>', 'Join type: inner, left, right', 'inner')\n .option('--columns <cols>', 'Comma-separated column projection (prefix with dataset ID)')\n .option('--limit <n>', 'Max rows', '100')\n .option('--json', 'Output as JSON')\n .action(async (left: string, right: string, opts: { leftCol: string; rightCol: string; type?: string; columns?: string; limit?: string; json?: boolean }) => {\n const cwd = process.cwd();\n const config = await loadConfig(cwd);\n if (!config.enableData) {\n console.error(` \u2716 Data indexing is not enabled. Set ${violet}${bold}enableData: true${reset} in .kirograph/config.json`);\n process.exit(1);\n }\n\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n if (!KiroGraph.isInitialized(cwd)) { console.error(' \u2716 KiroGraph not initialized.'); process.exit(1); }\n const cg = await KiroGraph.open(cwd);\n const db = cg.getDatabase();\n db.applyDataSchema();\n\n const { DataQueries } = await Promise.resolve().then(() => require('../../data/queries.js'));\n const dq = new DataQueries(db.getRawDb());\n\n try {\n const result = dq.join({\n left,\n right,\n leftColumn: opts.leftCol,\n rightColumn: opts.rightCol,\n type: (opts.type as any) ?? 'inner',\n columns: opts.columns ? opts.columns.split(',').map(c => c.trim()) : undefined,\n limit: parseInt(opts.limit ?? '100', 10),\n });\n\n if (!result) {\n console.error(` \u2716 One or both datasets not found. Run ${violet}${bold}kirograph data list${reset} to see available datasets.`);\n cg.close(); process.exit(1);\n }\n\n if (opts.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\n ${dim}${opts.type?.toUpperCase() ?? 'INNER'} JOIN: ${left}.${opts.leftCol} = ${right}.${opts.rightCol}${reset}`);\n console.log(` ${dim}Showing ${result.rows.length} of ${result.totalMatching} matching rows${reset}\\n`);\n if (result.rows.length > 0) {\n const keys = Object.keys(result.rows[0]!);\n const widths = keys.map(k => Math.max(k.length, ...result.rows.map(r => String(r[k] ?? '').slice(0, 25).length)));\n console.log(' ' + keys.map((k, i) => k.padEnd(widths[i]!)).join(' '));\n console.log(' ' + widths.map(w => '-'.repeat(w)).join(' '));\n for (const row of result.rows) {\n console.log(' ' + keys.map((k, i) => String(row[k] ?? '').slice(0, 25).padEnd(widths[i]!)).join(' '));\n }\n }\n console.log();\n }\n } catch (err) {\n console.error(` \u2716 ${err instanceof Error ? err.message : String(err)}`);\n cg.close(); process.exit(1);\n }\n cg.close();\n });\n\n // \u2500\u2500 correlations \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 data\n .command('correlations <dataset>')\n .description('Pairwise Pearson correlations between numeric columns')\n .option('--threshold <n>', 'Min absolute correlation to include', '0.3')\n .option('--json', 'Output as JSON')\n .action(async (dataset: string, opts: { threshold?: string; json?: boolean }) => {\n const cwd = process.cwd();\n const config = await loadConfig(cwd);\n if (!config.enableData) {\n console.error(` \u2716 Data indexing is not enabled. Set ${violet}${bold}enableData: true${reset} in .kirograph/config.json`);\n process.exit(1);\n }\n\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n if (!KiroGraph.isInitialized(cwd)) { console.error(' \u2716 KiroGraph not initialized.'); process.exit(1); }\n const cg = await KiroGraph.open(cwd);\n const db = cg.getDatabase();\n db.applyDataSchema();\n\n const { DataQueries } = await Promise.resolve().then(() => require('../../data/queries.js'));\n const dq = new DataQueries(db.getRawDb());\n const threshold = parseFloat(opts.threshold ?? '0.3');\n const pairs = dq.correlations(dataset, threshold);\n\n if (pairs === null) {\n console.error(` \u2716 Dataset \"${dataset}\" not found.`);\n cg.close(); process.exit(1);\n }\n\n if (pairs.length === 0) {\n console.log(` ${dim}No correlations above threshold ${threshold}.${reset}`);\n cg.close(); return;\n }\n\n if (opts.json) {\n console.log(JSON.stringify(pairs, null, 2));\n } else {\n console.log(`\\n ${bold}Correlations${reset} (threshold: ${threshold}, ${pairs.length} pairs)\\n`);\n for (const p of pairs) {\n const sign = p.correlation > 0 ? '+' : '';\n const bar = '\u2588'.repeat(Math.round(Math.abs(p.correlation) * 10));\n const color = p.strength === 'strong' ? green : dim;\n console.log(` ${color}${bar}${reset} ${sign}${p.correlation.toFixed(4)} ${p.column1} \u2194 ${p.column2} ${dim}(${p.strength})${reset}`);\n }\n console.log();\n }\n cg.close();\n });\n\n // \u2500\u2500 quality \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 data\n .command('quality <dataset>')\n .description('Data quality triage: rank columns by risk')\n .option('--json', 'Output as JSON')\n .action(async (dataset: string, opts: { json?: boolean }) => {\n const cwd = process.cwd();\n const config = await loadConfig(cwd);\n if (!config.enableData) {\n console.error(` \u2716 Data indexing is not enabled. Set ${violet}${bold}enableData: true${reset} in .kirograph/config.json`);\n process.exit(1);\n }\n\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n if (!KiroGraph.isInitialized(cwd)) { console.error(' \u2716 KiroGraph not initialized.'); process.exit(1); }\n const cg = await KiroGraph.open(cwd);\n const db = cg.getDatabase();\n db.applyDataSchema();\n\n const { DataQueries } = await Promise.resolve().then(() => require('../../data/queries.js'));\n const dq = new DataQueries(db.getRawDb());\n const quality = dq.quality(dataset);\n\n if (quality === null) {\n console.error(` \u2716 Dataset \"${dataset}\" not found.`);\n cg.close(); process.exit(1);\n }\n\n if (quality.length === 0) {\n console.log(` ${green}\u2713${reset} No quality issues detected. All columns look healthy.`);\n cg.close(); return;\n }\n\n if (opts.json) {\n console.log(JSON.stringify(quality, null, 2));\n } else {\n console.log(`\\n ${bold}Quality Report${reset} (${quality.length} columns with issues)\\n`);\n for (const q of quality) {\n const pct = (q.riskScore * 100).toFixed(0);\n const bar = '\u2588'.repeat(Math.round(q.riskScore * 10));\n console.log(` ${bar} ${pct}% ${bold}${q.column}${reset}`);\n for (const issue of q.issues) {\n console.log(` ${dim}\u2022 ${issue}${reset}`);\n }\n }\n console.log();\n }\n cg.close();\n });\n\n // \u2500\u2500 history \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 data\n .command('history <dataset>')\n .description('Show history of schema changes for a dataset')\n .option('--limit <n>', 'Max snapshots to show', '10')\n .option('--json', 'Output as JSON')\n .action(async (dataset: string, opts: { limit?: string; json?: boolean }) => {\n const cwd = process.cwd();\n const config = await loadConfig(cwd);\n if (!config.enableData) {\n console.error(` \u2716 Data indexing is not enabled. Set ${violet}${bold}enableData: true${reset} in .kirograph/config.json`);\n process.exit(1);\n }\n\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n if (!KiroGraph.isInitialized(cwd)) { console.error(' \u2716 KiroGraph not initialized.'); process.exit(1); }\n const cg = await KiroGraph.open(cwd);\n const db = cg.getDatabase();\n db.applyDataSchema();\n\n const { DataQueries } = await Promise.resolve().then(() => require('../../data/queries.js'));\n const dq = new DataQueries(db.getRawDb());\n const limit = parseInt(opts.limit ?? '10', 10);\n const history = dq.getHistory(dataset, limit);\n\n if (history === null) {\n console.error(` \u2716 Dataset \"${dataset}\" not found.`);\n cg.close(); process.exit(1);\n }\n\n if (history.length === 0) {\n console.log(` ${dim}No history snapshots for \"${dataset}\".${reset}`);\n cg.close(); return;\n }\n\n if (opts.json) {\n console.log(JSON.stringify(history, null, 2));\n } else {\n console.log(`\\n ${bold}Schema History${reset} for ${green}${dataset}${reset} (${history.length} snapshots)\\n`);\n for (const snap of history) {\n const date = new Date(snap.snapshotAt).toISOString().replace('T', ' ').slice(0, 19);\n console.log(` ${bold}${date}${reset}`);\n console.log(` ${dim}Rows:${reset} ${snap.rowCount.toLocaleString()} ${dim}Columns:${reset} ${snap.columnCount} ${dim}Hash:${reset} ${snap.contentHash.slice(0, 12)}\u2026`);\n const colNames = snap.columns.map(c => c.name).join(', ');\n console.log(` ${dim}Schema:${reset} ${colNames}`);\n console.log();\n }\n }\n cg.close();\n });\n\n // \u2500\u2500 drift \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 data\n .command('drift <dataset>')\n .description('Show schema drift between last two indexes')\n .option('--json', 'Output as JSON')\n .action(async (dataset: string, opts: { json?: boolean }) => {\n const cwd = process.cwd();\n const config = await loadConfig(cwd);\n if (!config.enableData) {\n console.error(` \u2716 Data indexing is not enabled. Set ${violet}${bold}enableData: true${reset} in .kirograph/config.json`);\n process.exit(1);\n }\n\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n if (!KiroGraph.isInitialized(cwd)) { console.error(' \u2716 KiroGraph not initialized.'); process.exit(1); }\n const cg = await KiroGraph.open(cwd);\n const db = cg.getDatabase();\n db.applyDataSchema();\n\n const { DataQueries } = await Promise.resolve().then(() => require('../../data/queries.js'));\n const dq = new DataQueries(db.getRawDb());\n const drift = dq.detectDrift(dataset);\n\n if (drift === null) {\n console.error(` \u2716 Dataset \"${dataset}\" not found.`);\n cg.close(); process.exit(1);\n }\n\n if (opts.json) {\n console.log(JSON.stringify(drift, null, 2));\n } else {\n if (!drift.hasDrift) {\n console.log(`\\n ${green}\u2713${reset} No schema drift detected for \"${dataset}\".`);\n if (drift.rowCountDelta !== 0) {\n const sign = drift.rowCountDelta > 0 ? '+' : '';\n console.log(` ${dim}Row count change:${reset} ${sign}${drift.rowCountDelta}`);\n }\n } else {\n console.log(`\\n ${bold}Schema Drift${reset} for ${green}${dataset}${reset}\\n`);\n if (drift.addedColumns.length > 0) {\n console.log(` ${green}+ Added columns:${reset} ${drift.addedColumns.join(', ')}`);\n }\n if (drift.removedColumns.length > 0) {\n console.log(` ${value}\u2212 Removed columns:${reset} ${drift.removedColumns.join(', ')}`);\n }\n if (drift.changedColumns.length > 0) {\n console.log(` ${bold}~ Changed columns:${reset}`);\n for (const col of drift.changedColumns) {\n console.log(` ${col.name}: ${col.changes.join(', ')}`);\n }\n }\n if (drift.rowCountDelta !== 0) {\n const sign = drift.rowCountDelta > 0 ? '+' : '';\n console.log(`\\n ${dim}Row count change:${reset} ${sign}${drift.rowCountDelta}`);\n }\n }\n console.log();\n }\n cg.close();\n });\n\n // \u2500\u2500 lint \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 data\n .command('lint')\n .description('Validate data index integrity')\n .option('--json', 'Output as JSON')\n .action(async (opts: { json?: boolean }) => {\n const cwd = process.cwd();\n const config = await loadConfig(cwd);\n if (!config.enableData) {\n console.error(` \u2716 Data indexing is not enabled. Set ${violet}${bold}enableData: true${reset} in .kirograph/config.json`);\n process.exit(1);\n }\n\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n if (!KiroGraph.isInitialized(cwd)) { console.error(' \u2716 KiroGraph not initialized.'); process.exit(1); }\n const cg = await KiroGraph.open(cwd);\n const db = cg.getDatabase();\n db.applyDataSchema();\n\n const { DataLinter } = await Promise.resolve().then(() => require('../../data/lint.js'));\n const linter = new DataLinter(db.getRawDb(), cwd);\n const result = linter.lint();\n\n if (opts.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\n ${bold}Data Lint${reset} \u2014 ${result.datasetsChecked} datasets checked, ${result.healthy} healthy\\n`);\n if (result.issues.length === 0) {\n console.log(` ${green}\u2713${reset} No issues found. Index is healthy.`);\n } else {\n for (const issue of result.issues) {\n const icon = issue.severity === 'error' ? '\u2716' : issue.severity === 'warning' ? '\u26A0' : '\u2139';\n const prefix = issue.dataset ? `[${issue.dataset}] ` : '';\n console.log(` ${icon} ${prefix}${issue.message}`);\n }\n }\n console.log();\n }\n cg.close();\n });\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA2B;AAC3B,gBAAuD;AAEhD,SAAS,SAAS,SAAwB;AAC/C,QAAM,OAAO,QACV,QAAQ,MAAM,EACd,YAAY,qDAAqD;AAGpE,OACG,QAAQ,MAAM,EACd,YAAY,2BAA2B,EACvC,OAAO,UAAU,gBAAgB,EACjC,OAAO,OAAO,SAA6B;AAC1C,UAAM,MAAM,QAAQ,IAAI;AACxB,UAAM,SAAS,UAAM,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AoB,CAAC;AACvF,UAAM,SAAS,IAAI,WAAW,GAAG,SAAS,GAAG,GAAG;AAChD,UAAM,SAAS,OAAO,KAAK;AAE3B,QAAI,KAAK,MAAM;AACb,cAAQ,IAAI,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;AAAA,IAC7C,OAAO;AACL,cAAQ,IAAI;AAAA,IAAO,cAAI,YAAY,eAAK,WAAM,OAAO,eAAe,sBAAsB,OAAO,OAAO;AAAA,CAAY;AACpH,UAAI,OAAO,OAAO,WAAW,GAAG;AAC9B,gBAAQ,IAAI,KAAK,eAAK,SAAI,eAAK,qCAAqC;AAAA,MACtE,OAAO;AACL,mBAAW,SAAS,OAAO,QAAQ;AACjC,gBAAM,OAAO,MAAM,aAAa,UAAU,WAAM,MAAM,aAAa,YAAY,WAAM;AACrF,gBAAM,SAAS,MAAM,UAAU,IAAI,MAAM,OAAO,OAAO;AACvD,kBAAQ,IAAI,KAAK,IAAI,IAAI,MAAM,GAAG,MAAM,OAAO,EAAE;AAAA,QACnD;AAAA,MACF;AACA,cAAQ,IAAI;AAAA,IACd;AACA,OAAG,MAAM;AAAA,EACX,CAAC;AACL;",
6
+ "names": []
7
+ }
@@ -93,6 +93,7 @@ function printColoredHelp() {
93
93
  { name: "exec", args: "<command...>", desc: "Run a shell command with token-optimized output", opts: ["-l, --level <l> normal | aggressive | ultra", "-t, --timeout <s> Timeout in seconds (default 60)", "--raw Show raw + compressed for comparison", "--json Output as JSON"] },
94
94
  { name: "gain", desc: "Show token savings from compressed command outputs", opts: ["--graph ASCII graph (last 30 days)", "--history Recent command history", "--daily Day-by-day breakdown", "--period <p> session | today | week | all"] },
95
95
  { name: "mem", args: "<command>", desc: "Persistent memory (search, store, timeline, status, prune, lint, reembed)" },
96
+ { name: "data", args: "<command>", desc: "Tabular data navigation (list, describe, query, aggregate, search, index, reindex)" },
96
97
  { name: "serve", desc: "Start the MCP server", opts: ["--mcp Run as MCP stdio server", "--path <p> Project path"] },
97
98
  { name: "dashboard", desc: "Manage the Qdrant or Typesense dashboard server", opts: ["start [path] Start server and open dashboard", "stop [path] Stop the running server"] }
98
99
  ]
@@ -196,6 +197,10 @@ ${c.bold}${c.paleLavender}USAGE${c.reset}`);
196
197
  ["kirograph gain --graph", "Show token savings graph"],
197
198
  ['kirograph mem search "auth decision"', "Search memory for past decisions"],
198
199
  ['kirograph mem store "use idempotency keys" --kind decision', "Store a decision"],
200
+ ["kirograph data list", "List all indexed datasets"],
201
+ ["kirograph data describe tests-fixtures-users", "Show schema and column profiles"],
202
+ ["kirograph data query orders --filter status:eq:shipped --limit 10", "Query rows with filters"],
203
+ ["kirograph data aggregate orders --group-by region --metric sum:amount", "Server-side aggregation"],
199
204
  ["kirograph serve --mcp", "Start the MCP server"]
200
205
  ]
201
206
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/bin/commands/help.ts"],
4
- "sourcesContent": ["import { Command } from 'commander';\nimport { printBanner } from '../banner';\n\ntype CommandEntry = { name: string; args?: string; desc: string; opts?: string[] };\ntype Group = { title: string; commands: CommandEntry[] };\n\nexport function printColoredHelp(): void {\n const c = {\n reset: '\\x1b[0m',\n bold: '\\x1b[1m',\n dim: '\\x1b[2m',\n violet: '\\x1b[38;5;99m',\n purple: '\\x1b[38;5;135m',\n lavender: '\\x1b[38;5;141m',\n paleLavender: '\\x1b[38;5;183m',\n gray: '\\x1b[90m',\n brown: '\\x1b[38;5;130m',\n };\n\n const groups: Group[] = [\n {\n title: '\uD83D\uDD27 Workspace Setup',\n commands: [\n { name: 'install', desc: 'Wire up MCP/instructions for an agent workspace', opts: ['--target <t> kiro | claude | codex'] },\n { name: 'init', args: '[path]', desc: 'Initialize KiroGraph in a project', opts: ['-i, --index Index immediately after init'] },\n { name: 'uninit', args: '[path]', desc: 'Remove KiroGraph from a project', opts: ['--force Skip confirmation', '--target <t> kiro | claude | codex | all'] },\n { name: 'uninstall', args: '[path]', desc: 'Alias for uninit', opts: ['--force Skip confirmation', '--target <t> kiro | claude | codex | all'] },\n ],\n },\n {\n title: '\uD83D\uDCE6 Indexing',\n commands: [\n { name: 'index', args: '[path]', desc: 'Full re-index of a project', opts: ['--force Force re-index all files'] },\n { name: 'sync', args: '[path]', desc: 'Incremental sync of changed files', opts: ['--files <f> Specific files to sync'] },\n { name: 'sync-if-dirty', args: '[path]', desc: 'Sync only if a dirty marker is present', opts: ['-q, --quiet Suppress output'] },\n { name: 'mark-dirty', args: '[path]', desc: 'Write a dirty marker for deferred sync' },\n { name: 'unlock', args: '[path]', desc: 'Force-release a stale lock file' },\n ],\n },\n {\n title: '\uD83D\uDD0D Search & Exploration',\n commands: [\n { name: 'status', args: '[path]', desc: 'Show index statistics and health' },\n { name: 'query', args: '<search>', desc: 'Search for symbols by name', opts: ['--kind <k> Filter by kind', '--limit <n> Max results (default 10)'] },\n { name: 'context', args: '<task>', desc: 'Build relevant code context for a task', opts: ['--max-nodes <n> Max symbols (default 20)', '--no-code Exclude code snippets', '--format <fmt> markdown | json'] },\n { name: 'files', args: '[path]', desc: 'Show project file structure from the index', opts: ['--format <fmt> tree | flat | grouped', '--filter <path> Filter by directory prefix', '--pattern <glob> Filter by glob', '--max-depth <n> Limit tree depth', '--json Output as JSON'] },\n { name: 'path', args: '<from> <to>', desc: 'Find the shortest path between two symbols', opts: ['--format <fmt> table | json'] },\n { name: 'export build', args: '[path]', desc: 'Generate the interactive graph dashboard (.kirograph/export/)', opts: ['-o, --output <dir> Custom output directory', '--include-contains Include structural contains edges'] },\n { name: 'export start', args: '[path]', desc: 'Generate and open the dashboard in the browser', opts: ['-o, --output <dir> Custom output directory', '--include-contains Include structural contains edges'] },\n { name: 'affected', args: '[files...]', desc: 'Find test files affected by changed source files', opts: ['--stdin Read file list from stdin', '-d, --depth <n> Max traversal depth (default 5)', '-f, --filter <g> Custom test file glob', '-j, --json Output as JSON', '-q, --quiet File paths only'] },\n ],\n },\n {\n title: '\uD83D\uDCCA Graph Insights',\n commands: [\n { name: 'hotspots', args: '[path]', desc: 'Find most-connected symbols by edge degree', opts: ['--limit <n> Max results (default 20)', '--format <f> table | json'] },\n { name: 'surprising', args: '[path]', desc: 'Find non-obvious cross-file connections', opts: ['--limit <n> Max results (default 20)', '--format <f> table | json'] },\n { name: 'dead-code', args: '[path]', desc: 'Find unexported symbols with no incoming references', opts: ['--limit <n> Max results (default 50)', '--format <f> table | json'] },\n { name: 'snapshot', desc: 'Save or list graph snapshots for structural diffing', opts: ['save [label] Save current graph state', 'list List saved snapshots', 'diff [label] Diff current graph vs a snapshot --format summary|full|json'] },\n ],\n },\n {\n title: '\uD83C\uDFDB\uFE0F Architecture Analysis',\n commands: [\n { name: 'architecture', args: '[path]', desc: 'Show package graph and layer map', opts: ['--packages Show packages only', '--layers Show layers only', '--format <f> json'] },\n { name: 'coupling', args: '[path]', desc: 'Show coupling metrics per package', opts: ['--sort <s> instability | ca | ce | name', '--package <n> Detail view for one package', '--format <f> json'] },\n { name: 'package', args: '<name>', desc: 'Inspect a package: deps, files, metrics', opts: ['--no-files Omit file list', '--format <f> json'] },\n ],\n },\n {\n title: '\u2699\uFE0F Agent & Configuration',\n commands: [\n { name: 'caveman', args: '[mode]', desc: 'Set agent communication style (off | lite | full | ultra)' },\n { name: 'compression', args: '[level]', desc: 'Set shell compression level (off | normal | aggressive | ultra)' },\n { name: 'exec', args: '<command...>', desc: 'Run a shell command with token-optimized output', opts: ['-l, --level <l> normal | aggressive | ultra', '-t, --timeout <s> Timeout in seconds (default 60)', '--raw Show raw + compressed for comparison', '--json Output as JSON'] },\n { name: 'gain', desc: 'Show token savings from compressed command outputs', opts: ['--graph ASCII graph (last 30 days)', '--history Recent command history', '--daily Day-by-day breakdown', '--period <p> session | today | week | all'] },\n { name: 'mem', args: '<command>', desc: 'Persistent memory (search, store, timeline, status, prune, lint, reembed)' },\n { name: 'serve', desc: 'Start the MCP server', opts: ['--mcp Run as MCP stdio server', '--path <p> Project path'] },\n { name: 'dashboard', desc: 'Manage the Qdrant or Typesense dashboard server', opts: ['start [path] Start server and open dashboard', 'stop [path] Stop the running server'] },\n ],\n },\n ];\n\n console.log(`\\n${c.bold}${c.paleLavender}USAGE${c.reset}`);\n console.log(` ${c.lavender}kirograph${c.reset} ${c.gray}<command>${c.reset} ${c.dim}[options]${c.reset}\\n`);\n\n // Compute max name+args width across ALL groups for alignment\n const allCmds = groups.flatMap(g => g.commands);\n const nameWidth = Math.max(...allCmds.map(cmd => (cmd.name + (cmd.args ? ' ' + cmd.args : '')).length)) + 2;\n\n for (const group of groups) {\n console.log(`${c.bold}${c.paleLavender}${group.title.toUpperCase()}${c.reset}\\n`);\n for (const cmd of group.commands) {\n const signature = cmd.name + (cmd.args ? ' ' + cmd.args : '');\n const isCaveman = cmd.name === 'caveman';\n const nameColor = isCaveman ? c.brown : c.lavender;\n const prefix = isCaveman ? '\uD83E\uDEA8 ' : ' ';\n const namePart = `${nameColor}${cmd.name}${c.reset}${cmd.args ? ' ' + c.dim + cmd.args + c.reset : ''}`;\n const pad = ' '.repeat(Math.max(0, nameWidth - signature.length));\n console.log(`${prefix}${namePart}${pad}${c.gray}${cmd.desc}${c.reset}`);\n if (isCaveman) {\n // desc starts at: emoji prefix (3 display cols: \uD83E\uDEA8 + space) + nameWidth\n const inspiredPad = ' '.repeat(3 + nameWidth);\n console.log(`${inspiredPad}${c.dim}Inspired by Caveman , original idea by github.com/JuliusBrussee/caveman${c.reset}`);\n console.log();\n }\n if (cmd.opts) {\n for (const opt of cmd.opts) {\n const [flag, ...rest] = opt.split(/ +/);\n const optPad = ' '.repeat(nameWidth + 2);\n console.log(` ${optPad}${c.purple}${flag}${c.reset}${rest.length ? ' ' + c.dim + rest.join(' ') + c.reset : ''}`);\n }\n console.log();\n }\n }\n if (!groups[groups.length - 1].commands.includes(group.commands[group.commands.length - 1])) {\n // extra spacing between groups handled by opts blank line; add one if no opts\n const lastHasOpts = group.commands[group.commands.length - 1].opts;\n if (!lastHasOpts) console.log();\n }\n }\n\n console.log(`${c.bold}${c.paleLavender}GLOBAL FLAGS${c.reset}\\n`);\n console.log(` ${c.purple}-h, --help${c.reset} ${c.gray}Show this help${c.reset}`);\n console.log(` ${c.purple}-V, --version${c.reset} ${c.gray}Show version number${c.reset}\\n`);\n\n console.log(`${c.bold}${c.paleLavender}EXAMPLES${c.reset}\\n`);\n\n const exampleGroups: Array<{ title: string; examples: [string, string][] }> = [\n {\n title: '\uD83D\uDD27 Setup & indexing',\n examples: [\n ['kirograph install', 'Wire up Kiro MCP + hooks + steering for the current workspace'],\n ['kirograph install --target claude', 'Wire up Claude Code MCP + project memory'],\n ['kirograph install --target codex', 'Install Codex project instructions and print MCP config'],\n ['kirograph init --index', 'Init and immediately index the project'],\n ['kirograph sync', 'Incremental sync of changed files'],\n ],\n },\n {\n title: '\uD83D\uDD0D Search & exploration',\n examples: [\n ['kirograph query useState', 'Find all symbols named useState'],\n ['kirograph context \"add dark mode\"', 'Get relevant code context for a task'],\n ['kirograph files --format grouped', 'Show files grouped by directory'],\n ['kirograph path LoginController DatabasePool', 'Find how two symbols are connected'],\n ['kirograph affected src/auth.ts', 'Find tests affected by a change'],\n ['git diff --name-only | kirograph affected --stdin', 'Affected tests from a git diff'],\n ['kirograph export start', 'Open the interactive graph dashboard in the browser'],\n ['kirograph export build -o /tmp/graph', 'Export the dashboard to a custom directory'],\n ],\n },\n {\n title: '\uD83D\uDCCA Graph insights',\n examples: [\n ['kirograph hotspots --limit 10', 'Top 10 most-connected symbols'],\n ['kirograph surprising', 'Find unexpected cross-module connections'],\n ['kirograph dead-code', 'Find unreferenced unexported symbols'],\n ['kirograph snapshot save pre-refactor', 'Save a named snapshot before a refactor'],\n ['kirograph snapshot diff pre-refactor', 'Diff current graph vs the named snapshot'],\n ],\n },\n {\n title: '\uD83C\uDFDB\uFE0F Architecture',\n examples: [\n ['kirograph architecture --packages', 'List all detected packages'],\n ['kirograph coupling --sort instability', 'Show packages ranked by instability'],\n ['kirograph package src/auth', 'Inspect the auth package'],\n ],\n },\n {\n title: '\u2699\uFE0F Agent',\n examples: [\n ['kirograph caveman full', 'Enable full caveman mode for the agent'],\n ['kirograph caveman off', 'Disable caveman mode'],\n ['kirograph compression aggressive', 'Set compression to aggressive level'],\n ['kirograph compression off', 'Disable compression hook (tool still available)'],\n ['kirograph exec git status', 'Run git status with compression'],\n ['kirograph exec --level ultra npm test', 'Run tests with ultra compression'],\n ['kirograph exec --raw cargo build', 'Show raw vs compressed comparison'],\n ['kirograph gain --graph', 'Show token savings graph'],\n ['kirograph mem search \"auth decision\"', 'Search memory for past decisions'],\n ['kirograph mem store \"use idempotency keys\" --kind decision', 'Store a decision'],\n ['kirograph serve --mcp', 'Start the MCP server'],\n ],\n },\n ];\n\n for (const eg of exampleGroups) {\n console.log(` ${c.dim}${eg.title}${c.reset}`);\n for (const [ex, desc] of eg.examples) {\n console.log(` ${c.violet}$${c.reset} ${c.lavender}${ex}${c.reset}`);\n console.log(` ${c.dim}${desc}${c.reset}`);\n }\n console.log();\n }\n}\n\nexport function register(program: Command): void {\n program.configureHelp({ formatHelp: () => '' });\n program.addHelpText('afterAll', '');\n program.helpInformation = () => {\n printBanner();\n printColoredHelp();\n return '';\n };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA4B;AAKrB,SAAS,mBAAyB;AACvC,QAAM,IAAI;AAAA,IACR,OAAc;AAAA,IACd,MAAc;AAAA,IACd,KAAc;AAAA,IACd,QAAc;AAAA,IACd,QAAc;AAAA,IACd,UAAc;AAAA,IACd,cAAc;AAAA,IACd,MAAc;AAAA,IACd,OAAc;AAAA,EAChB;AAEA,QAAM,SAAkB;AAAA,IACtB;AAAA,MACE,OAAO;AAAA,MACP,UAAU;AAAA,QACR,EAAE,MAAM,WAAiB,MAAM,mDAAmD,MAAM,CAAC,qCAAqC,EAAE;AAAA,QAChI,EAAE,MAAM,QAAiB,MAAM,UAAU,MAAM,qCAAqC,MAAM,CAAC,2CAA2C,EA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A,MACE,OAAO;AAAA,MACP,UAAU;AAAA,QACR,CAAC,0BAAkD,wCAAwC;AAAA,QAC3F,CAAC,yBAAkD,sBAAsB;AAAA,QACzE,CAAC,oCAAiD,qCAAqC;AAAA,QACvF,CAAC,6BAAkD,iDAAiD;AAAA,QACpG,CAAC,6BAAkD,iCAAiC;AAAA,QACpF,CAAC,yCAAkD,kCAAkC;AAAA,QACrF,CAAC,oCAAkD,mCAAmC;AAAA,QACtF,CAAC,0BAAkD,0BAA0B;AAAA,QAC7E,CAAC,wCAAmD,kCAAkC;AAAA,QACtF,CAAC,8DAA8D,kBAAkB;AAAA,QACjF,CAAC,yBAAkD,sBAAsB;AAAA,MAC3E;AAAA,IACF;AAAA,EACF;AAEA,aAAW,MAAM,eAAe;AAC9B,YAAQ,IAAI,KAAK,EAAE,GAAG,GAAG,GAAG,KAAK,GAAG,EAAE,KAAK,EAAE;AAC7C,eAAW,CAAC,IAAI,IAAI,KAAK,GAAG,UAAU;AACpC,cAAQ,IAAI,KAAK,EAAE,MAAM,IAAI,EAAE,KAAK,IAAI,EAAE,QAAQ,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE;AACnE,cAAQ,IAAI,OAAO,EAAE,GAAG,GAAG,IAAI,GAAG,EAAE,KAAK,EAAE;AAAA,IAC7C;AACA,YAAQ,IAAI;AAAA,EACd;AACF;AAEO,SAAS,SAAS,SAAwB;AAC/C,UAAQ,cAAc,EAAE,YAAY,MAAM,GAAG,CAAC;AAC9C,UAAQ,YAAY,YAAY,EAAE;AAClC,UAAQ,kBAAkB,MAAM;AAC9B,mCAAY;AACZ,qBAAiB;AACjB,WAAO;AAAA,EACT;AACF;",
4
+ "sourcesContent": ["import { Command } from 'commander';\nimport { printBanner } from '../banner';\n\ntype CommandEntry = { name: string; args?: string; desc: string; opts?: string[] };\ntype Group = { title: string; commands: CommandEntry[] };\n\nexport function printColoredHelp(): void {\n const c = {\n reset: '\\x1b[0m',\n bold: '\\x1b[1m',\n dim: '\\x1b[2m',\n violet: '\\x1b[38;5;99m',\n purple: '\\x1b[38;5;135m',\n lavender: '\\x1b[38;5;141m',\n paleLavender: '\\x1b[38;5;183m',\n gray: '\\x1b[90m',\n brown: '\\x1b[38;5;130m',\n };\n\n const groups: Group[] = [\n {\n title: '\uD83D\uDD27 Workspace Setup',\n commands: [\n { name: 'install', desc: 'Wire up MCP/instructions for an agent workspace', opts: ['--target <t> kiro | claude | codex'] },\n { name: 'init', args: '[path]', desc: 'Initialize KiroGraph in a project', opts: ['-i, --index Index immediately after init'] },\n { name: 'uninit', args: '[path]', desc: 'Remove KiroGraph from a project', opts: ['--force Skip confirmation', '--target <t> kiro | claude | codex | all'] },\n { name: 'uninstall', args: '[path]', desc: 'Alias for uninit', opts: ['--force Skip confirmation', '--target <t> kiro | claude | codex | all'] },\n ],\n },\n {\n title: '\uD83D\uDCE6 Indexing',\n commands: [\n { name: 'index', args: '[path]', desc: 'Full re-index of a project', opts: ['--force Force re-index all files'] },\n { name: 'sync', args: '[path]', desc: 'Incremental sync of changed files', opts: ['--files <f> Specific files to sync'] },\n { name: 'sync-if-dirty', args: '[path]', desc: 'Sync only if a dirty marker is present', opts: ['-q, --quiet Suppress output'] },\n { name: 'mark-dirty', args: '[path]', desc: 'Write a dirty marker for deferred sync' },\n { name: 'unlock', args: '[path]', desc: 'Force-release a stale lock file' },\n ],\n },\n {\n title: '\uD83D\uDD0D Search & Exploration',\n commands: [\n { name: 'status', args: '[path]', desc: 'Show index statistics and health' },\n { name: 'query', args: '<search>', desc: 'Search for symbols by name', opts: ['--kind <k> Filter by kind', '--limit <n> Max results (default 10)'] },\n { name: 'context', args: '<task>', desc: 'Build relevant code context for a task', opts: ['--max-nodes <n> Max symbols (default 20)', '--no-code Exclude code snippets', '--format <fmt> markdown | json'] },\n { name: 'files', args: '[path]', desc: 'Show project file structure from the index', opts: ['--format <fmt> tree | flat | grouped', '--filter <path> Filter by directory prefix', '--pattern <glob> Filter by glob', '--max-depth <n> Limit tree depth', '--json Output as JSON'] },\n { name: 'path', args: '<from> <to>', desc: 'Find the shortest path between two symbols', opts: ['--format <fmt> table | json'] },\n { name: 'export build', args: '[path]', desc: 'Generate the interactive graph dashboard (.kirograph/export/)', opts: ['-o, --output <dir> Custom output directory', '--include-contains Include structural contains edges'] },\n { name: 'export start', args: '[path]', desc: 'Generate and open the dashboard in the browser', opts: ['-o, --output <dir> Custom output directory', '--include-contains Include structural contains edges'] },\n { name: 'affected', args: '[files...]', desc: 'Find test files affected by changed source files', opts: ['--stdin Read file list from stdin', '-d, --depth <n> Max traversal depth (default 5)', '-f, --filter <g> Custom test file glob', '-j, --json Output as JSON', '-q, --quiet File paths only'] },\n ],\n },\n {\n title: '\uD83D\uDCCA Graph Insights',\n commands: [\n { name: 'hotspots', args: '[path]', desc: 'Find most-connected symbols by edge degree', opts: ['--limit <n> Max results (default 20)', '--format <f> table | json'] },\n { name: 'surprising', args: '[path]', desc: 'Find non-obvious cross-file connections', opts: ['--limit <n> Max results (default 20)', '--format <f> table | json'] },\n { name: 'dead-code', args: '[path]', desc: 'Find unexported symbols with no incoming references', opts: ['--limit <n> Max results (default 50)', '--format <f> table | json'] },\n { name: 'snapshot', desc: 'Save or list graph snapshots for structural diffing', opts: ['save [label] Save current graph state', 'list List saved snapshots', 'diff [label] Diff current graph vs a snapshot --format summary|full|json'] },\n ],\n },\n {\n title: '\uD83C\uDFDB\uFE0F Architecture Analysis',\n commands: [\n { name: 'architecture', args: '[path]', desc: 'Show package graph and layer map', opts: ['--packages Show packages only', '--layers Show layers only', '--format <f> json'] },\n { name: 'coupling', args: '[path]', desc: 'Show coupling metrics per package', opts: ['--sort <s> instability | ca | ce | name', '--package <n> Detail view for one package', '--format <f> json'] },\n { name: 'package', args: '<name>', desc: 'Inspect a package: deps, files, metrics', opts: ['--no-files Omit file list', '--format <f> json'] },\n ],\n },\n {\n title: '\u2699\uFE0F Agent & Configuration',\n commands: [\n { name: 'caveman', args: '[mode]', desc: 'Set agent communication style (off | lite | full | ultra)' },\n { name: 'compression', args: '[level]', desc: 'Set shell compression level (off | normal | aggressive | ultra)' },\n { name: 'exec', args: '<command...>', desc: 'Run a shell command with token-optimized output', opts: ['-l, --level <l> normal | aggressive | ultra', '-t, --timeout <s> Timeout in seconds (default 60)', '--raw Show raw + compressed for comparison', '--json Output as JSON'] },\n { name: 'gain', desc: 'Show token savings from compressed command outputs', opts: ['--graph ASCII graph (last 30 days)', '--history Recent command history', '--daily Day-by-day breakdown', '--period <p> session | today | week | all'] },\n { name: 'mem', args: '<command>', desc: 'Persistent memory (search, store, timeline, status, prune, lint, reembed)' },\n { name: 'data', args: '<command>', desc: 'Tabular data navigation (list, describe, query, aggregate, search, index, reindex)' },\n { name: 'serve', desc: 'Start the MCP server', opts: ['--mcp Run as MCP stdio server', '--path <p> Project path'] },\n { name: 'dashboard', desc: 'Manage the Qdrant or Typesense dashboard server', opts: ['start [path] Start server and open dashboard', 'stop [path] Stop the running server'] },\n ],\n },\n ];\n\n console.log(`\\n${c.bold}${c.paleLavender}USAGE${c.reset}`);\n console.log(` ${c.lavender}kirograph${c.reset} ${c.gray}<command>${c.reset} ${c.dim}[options]${c.reset}\\n`);\n\n // Compute max name+args width across ALL groups for alignment\n const allCmds = groups.flatMap(g => g.commands);\n const nameWidth = Math.max(...allCmds.map(cmd => (cmd.name + (cmd.args ? ' ' + cmd.args : '')).length)) + 2;\n\n for (const group of groups) {\n console.log(`${c.bold}${c.paleLavender}${group.title.toUpperCase()}${c.reset}\\n`);\n for (const cmd of group.commands) {\n const signature = cmd.name + (cmd.args ? ' ' + cmd.args : '');\n const isCaveman = cmd.name === 'caveman';\n const nameColor = isCaveman ? c.brown : c.lavender;\n const prefix = isCaveman ? '\uD83E\uDEA8 ' : ' ';\n const namePart = `${nameColor}${cmd.name}${c.reset}${cmd.args ? ' ' + c.dim + cmd.args + c.reset : ''}`;\n const pad = ' '.repeat(Math.max(0, nameWidth - signature.length));\n console.log(`${prefix}${namePart}${pad}${c.gray}${cmd.desc}${c.reset}`);\n if (isCaveman) {\n // desc starts at: emoji prefix (3 display cols: \uD83E\uDEA8 + space) + nameWidth\n const inspiredPad = ' '.repeat(3 + nameWidth);\n console.log(`${inspiredPad}${c.dim}Inspired by Caveman , original idea by github.com/JuliusBrussee/caveman${c.reset}`);\n console.log();\n }\n if (cmd.opts) {\n for (const opt of cmd.opts) {\n const [flag, ...rest] = opt.split(/ +/);\n const optPad = ' '.repeat(nameWidth + 2);\n console.log(` ${optPad}${c.purple}${flag}${c.reset}${rest.length ? ' ' + c.dim + rest.join(' ') + c.reset : ''}`);\n }\n console.log();\n }\n }\n if (!groups[groups.length - 1].commands.includes(group.commands[group.commands.length - 1])) {\n // extra spacing between groups handled by opts blank line; add one if no opts\n const lastHasOpts = group.commands[group.commands.length - 1].opts;\n if (!lastHasOpts) console.log();\n }\n }\n\n console.log(`${c.bold}${c.paleLavender}GLOBAL FLAGS${c.reset}\\n`);\n console.log(` ${c.purple}-h, --help${c.reset} ${c.gray}Show this help${c.reset}`);\n console.log(` ${c.purple}-V, --version${c.reset} ${c.gray}Show version number${c.reset}\\n`);\n\n console.log(`${c.bold}${c.paleLavender}EXAMPLES${c.reset}\\n`);\n\n const exampleGroups: Array<{ title: string; examples: [string, string][] }> = [\n {\n title: '\uD83D\uDD27 Setup & indexing',\n examples: [\n ['kirograph install', 'Wire up Kiro MCP + hooks + steering for the current workspace'],\n ['kirograph install --target claude', 'Wire up Claude Code MCP + project memory'],\n ['kirograph install --target codex', 'Install Codex project instructions and print MCP config'],\n ['kirograph init --index', 'Init and immediately index the project'],\n ['kirograph sync', 'Incremental sync of changed files'],\n ],\n },\n {\n title: '\uD83D\uDD0D Search & exploration',\n examples: [\n ['kirograph query useState', 'Find all symbols named useState'],\n ['kirograph context \"add dark mode\"', 'Get relevant code context for a task'],\n ['kirograph files --format grouped', 'Show files grouped by directory'],\n ['kirograph path LoginController DatabasePool', 'Find how two symbols are connected'],\n ['kirograph affected src/auth.ts', 'Find tests affected by a change'],\n ['git diff --name-only | kirograph affected --stdin', 'Affected tests from a git diff'],\n ['kirograph export start', 'Open the interactive graph dashboard in the browser'],\n ['kirograph export build -o /tmp/graph', 'Export the dashboard to a custom directory'],\n ],\n },\n {\n title: '\uD83D\uDCCA Graph insights',\n examples: [\n ['kirograph hotspots --limit 10', 'Top 10 most-connected symbols'],\n ['kirograph surprising', 'Find unexpected cross-module connections'],\n ['kirograph dead-code', 'Find unreferenced unexported symbols'],\n ['kirograph snapshot save pre-refactor', 'Save a named snapshot before a refactor'],\n ['kirograph snapshot diff pre-refactor', 'Diff current graph vs the named snapshot'],\n ],\n },\n {\n title: '\uD83C\uDFDB\uFE0F Architecture',\n examples: [\n ['kirograph architecture --packages', 'List all detected packages'],\n ['kirograph coupling --sort instability', 'Show packages ranked by instability'],\n ['kirograph package src/auth', 'Inspect the auth package'],\n ],\n },\n {\n title: '\u2699\uFE0F Agent',\n examples: [\n ['kirograph caveman full', 'Enable full caveman mode for the agent'],\n ['kirograph caveman off', 'Disable caveman mode'],\n ['kirograph compression aggressive', 'Set compression to aggressive level'],\n ['kirograph compression off', 'Disable compression hook (tool still available)'],\n ['kirograph exec git status', 'Run git status with compression'],\n ['kirograph exec --level ultra npm test', 'Run tests with ultra compression'],\n ['kirograph exec --raw cargo build', 'Show raw vs compressed comparison'],\n ['kirograph gain --graph', 'Show token savings graph'],\n ['kirograph mem search \"auth decision\"', 'Search memory for past decisions'],\n ['kirograph mem store \"use idempotency keys\" --kind decision', 'Store a decision'],\n ['kirograph data list', 'List all indexed datasets'],\n ['kirograph data describe tests-fixtures-users', 'Show schema and column profiles'],\n ['kirograph data query orders --filter status:eq:shipped --limit 10', 'Query rows with filters'],\n ['kirograph data aggregate orders --group-by region --metric sum:amount', 'Server-side aggregation'],\n ['kirograph serve --mcp', 'Start the MCP server'],\n ],\n },\n ];\n\n for (const eg of exampleGroups) {\n console.log(` ${c.dim}${eg.title}${c.reset}`);\n for (const [ex, desc] of eg.examples) {\n console.log(` ${c.violet}$${c.reset} ${c.lavender}${ex}${c.reset}`);\n console.log(` ${c.dim}${desc}${c.reset}`);\n }\n console.log();\n }\n}\n\nexport function register(program: Command): void {\n program.configureHelp({ formatHelp: () => '' });\n program.addHelpText('afterAll', '');\n program.helpInformation = () => {\n printBanner();\n printColoredHelp();\n return '';\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA4B;AAKrB,SAAS,mBAAyB;AACvC,QAAM,IAAI;AAAA,IACR,OAAc;AAAA,IACd,MAAc;AAAA,IACd,KAAc;AAAA,IACd,QAAc;AAAA,IACd,QAAc;AAAA,IACd,UAAc;AAAA,IACd,cAAc;AAAA,IACd,MAAc;AAAA,IACd,OAAc;AAAA,EAChB;AAEA,QAAM,SAAkB;AAAA,IACtB;AAAA,MACE,OAAO;AAAA,MACP,UAAU;AAAA,QACR,EAAE,MAAM,WAAiB,MAAM,mDAAmD,MAAM,CAAC,qCAAqC,EAAE;AAAA,QAChI,EAAE,MAAM,QAAiB,MAAM,UAAU,MAAM,qCAAqC,MAAM,CAAC,2CAA2C,EAAE;AAAA,QACxI,EAAE,MAAM,UAAiB,MAAM,UAAU,MAAM,mCAAqC,MAAM,CAAC,kCAAkC,2CAA2C,EAAE;AAAA,QAC1K,EAAE,MAAM,aAAiB,MAAM,UAAU,MAAM,oBAAqC,MAAM,CAAC,kCAAkC,2CAA2C,EAAE;AAAA,MAC5K;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,UAAU;AAAA,QACR,EAAE,MAAM,SAAiB,MAAM,UAAU,MAAM,8BAA0C,MAAM,CAAC,sCAAsC,EAAE;AAAA,QACxI,EAAE,MAAM,QAAiB,MAAM,UAAU,MAAM,qCAA2C,MAAM,CAAC,oCAAoC,EAAE;AAAA,QACvI,EAAE,MAAM,iBAAiB,MAAM,UAAU,MAAM,0CAA0C,MAAM,CAAC,8BAA8B,EAAE;AAAA,QAChI,EAAE,MAAM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E,yBAAyB;AAAA,QAC/F,CAAC,yEAAyE,yBAAyB;AAAA,QACnG,CAAC,yBAAkD,sBAAsB;AAAA,MAC3E;AAAA,IACF;AAAA,EACF;AAEA,aAAW,MAAM,eAAe;AAC9B,YAAQ,IAAI,KAAK,EAAE,GAAG,GAAG,GAAG,KAAK,GAAG,EAAE,KAAK,EAAE;AAC7C,eAAW,CAAC,IAAI,IAAI,KAAK,GAAG,UAAU;AACpC,cAAQ,IAAI,KAAK,EAAE,MAAM,IAAI,EAAE,KAAK,IAAI,EAAE,QAAQ,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE;AACnE,cAAQ,IAAI,OAAO,EAAE,GAAG,GAAG,IAAI,GAAG,EAAE,KAAK,EAAE;AAAA,IAC7C;AACA,YAAQ,IAAI;AAAA,EACd;AACF;AAEO,SAAS,SAAS,SAAwB;AAC/C,UAAQ,cAAc,EAAE,YAAY,MAAM,GAAG,CAAC;AAC9C,UAAQ,YAAY,YAAY,EAAE;AAClC,UAAQ,kBAAkB,MAAM;AAC9B,mCAAY;AACZ,qBAAiB;AACjB,WAAO;AAAA,EACT;AACF;",
6
6
  "names": []
7
7
  }
@@ -63,7 +63,7 @@ async function promptConfigOptions(rl) {
63
63
  "Semantic embeddings (similarity search):",
64
64
  "Enables natural-language code search via vector embeddings. A local model (~130MB) is downloaded on first use."
65
65
  );
66
- const patch = { enableEmbeddings, useVecIndex: false, semanticEngine: "cosine", typesenseDashboard: false, qdrantDashboard: false, extractDocstrings: true, trackCallSites: true, enableArchitecture: false, cavemanMode: "off", shellCompressionLevel: "normal", enableMemory: false, enableDocs: false, docsContextLimit: 0 };
66
+ const patch = { enableEmbeddings, useVecIndex: false, semanticEngine: "cosine", typesenseDashboard: false, qdrantDashboard: false, extractDocstrings: true, trackCallSites: true, enableArchitecture: false, cavemanMode: "off", shellCompressionLevel: "normal", enableMemory: false, enableDocs: false, docsContextLimit: 0, enableData: false, dataContextLimit: 0 };
67
67
  if (enableEmbeddings) {
68
68
  const modelChoice = await (0, import_prompts.arrowSelect)(
69
69
  rl,
@@ -162,6 +162,33 @@ async function promptConfigOptions(rl) {
162
162
  ]);
163
163
  patch.docsContextLimit = contextChoice;
164
164
  }
165
+ (0, import_prompts.printSection)("\u{1F4CA}", "Data");
166
+ patch.enableData = await (0, import_prompts.askToggle)(
167
+ rl,
168
+ "Tabular data indexing (CSV/TSV/JSONL/JSON/Excel/Parquet):",
169
+ "Indexes data files for structured querying. Enables kirograph_data_list, kirograph_data_describe, kirograph_data_query, kirograph_data_aggregate, kirograph_data_search.",
170
+ false
171
+ );
172
+ if (patch.enableData) {
173
+ patch.dataInstallExcel = await (0, import_prompts.askToggle)(
174
+ rl,
175
+ "Install Excel support (xlsx package)?",
176
+ "Required for .xlsx/.xls files. CSV/TSV/JSONL/JSON are always supported without extra deps.",
177
+ false
178
+ );
179
+ patch.dataInstallParquet = await (0, import_prompts.askToggle)(
180
+ rl,
181
+ "Install Parquet support (parquetjs-lite package)?",
182
+ "Required for .parquet files. CSV/TSV/JSONL/JSON are always supported without extra deps.",
183
+ false
184
+ );
185
+ const contextChoice = await (0, import_prompts.arrowSelect)(rl, "Include dataset schemas in kirograph_context results?", [
186
+ { value: 0, label: "0 (disabled)", description: "Data stays separate \u2014 use kirograph_data_* tools explicitly (recommended)" },
187
+ { value: 2, label: "2 datasets", description: "Include up to 2 relevant dataset schemas in context results" },
188
+ { value: 5, label: "5 datasets", description: "Include up to 5 relevant dataset schemas in context results" }
189
+ ]);
190
+ patch.dataContextLimit = contextChoice;
191
+ }
165
192
  (0, import_prompts.printSection)("\u{1F916}", "Agent Behavior");
166
193
  const cavemanChoice = await (0, import_prompts.arrowSelect)(rl, "Communication style (caveman mode):", [
167
194
  { value: "off", label: "off", description: "Normal responses \u2014 no compression" },
@@ -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' | 'typesenseDashboard' | 'qdrantDashboard' | 'extractDocstrings' | 'trackCallSites' | 'enableArchitecture' | 'cavemanMode' | 'shellCompressionLevel' | 'enableMemory' | 'enableDocs' | 'docsContextLimit'> & { 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', typesenseDashboard: false, qdrantDashboard: false, extractDocstrings: true, trackCallSites: true, enableArchitecture: false, cavemanMode: 'off', shellCompressionLevel: 'normal', enableMemory: false, enableDocs: false, docsContextLimit: 0 };\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: '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 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 );\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 );\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 // \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 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 default level):', [\n { value: 'off', label: 'off', description: 'No compression hook or steering (tool still available)' },\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\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 as any).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, // Requires explicit enable\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,IACP,KAAK;AAAA,IACL,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA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2014 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' | 'typesenseDashboard' | 'qdrantDashboard' | 'extractDocstrings' | 'trackCallSites' | 'enableArchitecture' | 'cavemanMode' | 'shellCompressionLevel' | 'enableMemory' | 'enableDocs' | 'docsContextLimit' | 'enableData' | 'dataContextLimit'> & { 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', typesenseDashboard: false, qdrantDashboard: false, extractDocstrings: true, trackCallSites: true, enableArchitecture: false, cavemanMode: 'off', shellCompressionLevel: 'normal', enableMemory: false, enableDocs: false, docsContextLimit: 0, enableData: false, dataContextLimit: 0 };\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: '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 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 );\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 );\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 // \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 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 default level):', [\n { value: 'off', label: 'off', description: 'No compression hook or steering (tool still available)' },\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\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 as any).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, // Requires explicit enable\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,IACP,KAAK;AAAA,IACL,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,aAAa;AAAA,EACf;AACF;AAEA,eAAsB,oBAAoB,IAA8C;AAEtF,mCAAa,aAAM,iBAAiB;AAEpC,Q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CAAC;AACD,QAAM,cAAc;AAEpB,QAAM,oBAAoB,UAAM,4BAAY,IAAI,qDAAqD;AAAA,IACnG,EAAE,OAAO,OAAc,OAAO,OAAc,aAAa,yDAAyD;AAAA,IAClH,EAAE,OAAO,UAAc,OAAO,UAAc,aAAa,yDAAyD;AAAA,IAClH,EAAE,OAAO,cAAc,OAAO,cAAc,aAAa,kDAAkD;AAAA,IAC3G,EAAE,OAAO,SAAc,OAAO,SAAc,aAAa,iDAAiD;AAAA,EAC5G,CAAC;AACD,QAAM,wBAAwB;AAG9B,mCAAa,aAAM,QAAQ;AAE3B,EAAC,MAAc,eAAe,UAAM;AAAA,IAAU;AAAA,IAC5C;AAAA,IACA;AAAA,IACA;AAAA;AAAA,EACF;AAEA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -65,6 +65,7 @@ async function runInstaller(target = "kiro") {
65
65
  let shellCompressionLevel = "normal";
66
66
  let enableMemory = false;
67
67
  let enableDocs = false;
68
+ let enableData = false;
68
69
  let shouldOfferIndex = false;
69
70
  let typesenseDashboard = false;
70
71
  let qdrantDashboard = false;
@@ -75,6 +76,7 @@ async function runInstaller(target = "kiro") {
75
76
  shellCompressionLevel = config.shellCompressionLevel ?? "normal";
76
77
  enableMemory = config.enableMemory ?? false;
77
78
  enableDocs = config.enableDocs ?? false;
79
+ enableData = config.enableData ?? false;
78
80
  console.log(` \u2713 Reusing existing KiroGraph data in ${cwd}/.kirograph/`);
79
81
  console.log(` \u2022 semanticEngine: ${config.semanticEngine}`);
80
82
  console.log(` \u2022 enableEmbeddings: ${config.enableEmbeddings}`);
@@ -83,6 +85,7 @@ async function runInstaller(target = "kiro") {
83
85
  console.log(` \u2022 shellCompressionLevel: ${shellCompressionLevel}`);
84
86
  console.log(` \u2022 enableMemory: ${enableMemory}`);
85
87
  console.log(` \u2022 enableDocs: ${enableDocs}`);
88
+ console.log(` \u2022 enableData: ${enableData}`);
86
89
  } else {
87
90
  shouldOfferIndex = true;
88
91
  const patch = await (0, import_config_prompt.promptConfigOptions)(rl);
@@ -91,6 +94,7 @@ async function runInstaller(target = "kiro") {
91
94
  shellCompressionLevel = patch.shellCompressionLevel ?? "normal";
92
95
  enableMemory = patch.enableMemory ?? false;
93
96
  enableDocs = patch.enableDocs ?? false;
97
+ enableData = patch.enableData ?? false;
94
98
  typesenseDashboard = patch.typesenseDashboard;
95
99
  qdrantDashboard = patch.qdrantDashboard;
96
100
  console.log(`
@@ -171,8 +175,31 @@ async function runInstaller(target = "kiro") {
171
175
  console.log(` \u2022 shellCompressionLevel: ${shellCompressionLevel}`);
172
176
  console.log(` \u2022 enableMemory: ${enableMemory}`);
173
177
  console.log(` \u2022 enableDocs: ${enableDocs}`);
178
+ console.log(` \u2022 enableData: ${enableData}`);
179
+ if (enableData) {
180
+ if (patch.dataInstallExcel) {
181
+ console.log(`
182
+ Installing xlsx...`);
183
+ const xlsxResult = (0, import_child_process.spawnSync)("npm", ["install", "xlsx"], { stdio: "inherit", shell: true });
184
+ if (xlsxResult.status === 0) {
185
+ console.log(` \u2713 xlsx installed`);
186
+ } else {
187
+ console.warn(` \u2717 npm install failed. Run manually: npm install xlsx`);
188
+ }
189
+ }
190
+ if (patch.dataInstallParquet) {
191
+ console.log(`
192
+ Installing parquetjs-lite...`);
193
+ const pqResult = (0, import_child_process.spawnSync)("npm", ["install", "parquetjs-lite"], { stdio: "inherit", shell: true });
194
+ if (pqResult.status === 0) {
195
+ console.log(` \u2713 parquetjs-lite installed`);
196
+ } else {
197
+ console.warn(` \u2717 npm install failed. Run manually: npm install parquetjs-lite`);
198
+ }
199
+ }
200
+ }
174
201
  }
175
- installer.installLate(cwd, cavemanMode, shellCompressionLevel, enableMemory, enableDocs);
202
+ installer.installLate(cwd, cavemanMode, shellCompressionLevel, enableMemory, enableDocs, enableData);
176
203
  } catch (err) {
177
204
  const reason = err instanceof Error ? err.message : String(err);
178
205
  console.error(`
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/bin/installer/index.ts"],
4
- "sourcesContent": ["/**\n * KiroGraph Installer\n *\n * The default target wires up Kiro:\n * 1. .kiro/settings/mcp.json \u2014 registers the MCP server (IDE + CLI)\n * 2. .kiro/hooks/*.kiro.hook \u2014 auto-sync hooks for Kiro IDE\n * 3. .kiro/steering/kirograph.md \u2014 teaches Kiro to use the graph tools (IDE + CLI)\n * 4. .kiro/agents/kirograph.json \u2014 custom agent config for Kiro CLI\n */\n\nimport * as readline from 'readline';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { spawnSync } from 'child_process';\nimport { loadConfig, updateConfig } from '../../config';\nimport { printBanner } from '../banner';\nimport { renderIndexProgress } from '../progress';\nimport { dim, reset } from '../ui';\nimport { ask, askToggle } from './prompts';\nimport { promptConfigOptions } from './config-prompt';\nimport { openTypesenseDashboard } from './dashboard';\nimport { ensureQdrantUI, openQdrantDashboard } from './qdrant-dashboard';\nimport type { InstallTarget } from './common';\nimport { getTargetInstaller } from './targets';\nimport type { CavemanMode } from './caveman';\n\nexport async function runInstaller(target: InstallTarget = 'kiro'): Promise<void> {\n printBanner();\n\n const rl = readline.createInterface({ input: process.stdin, output: process.stdout });\n\n try {\n const cwd = process.cwd();\n const installer = getTargetInstaller(target);\n\n console.log(` Workspace: ${cwd}\\n`);\n\n const proceed = await askToggle(rl, `Install KiroGraph for ${installer.label}?`, 'Registers the MCP server and writes integration files for this workspace.');\n if (!proceed) { console.log(' Cancelled.'); rl.close(); return; }\n console.log();\n\n installer.installEarly(cwd);\n\n const alreadyInitialized = fs.existsSync(path.join(cwd, '.kirograph'));\n let cavemanMode: CavemanMode | 'off' = 'off';\n let shellCompressionLevel: 'off' | 'normal' | 'aggressive' | 'ultra' = 'normal';\n let enableMemory = false;\n let enableDocs = false;\n let shouldOfferIndex = false;\n let typesenseDashboard = false;\n let qdrantDashboard = false;\n\n try {\n if (alreadyInitialized) {\n const config = await loadConfig(cwd);\n cavemanMode = config.cavemanMode ?? 'off';\n shellCompressionLevel = config.shellCompressionLevel ?? 'normal';\n enableMemory = config.enableMemory ?? false;\n enableDocs = config.enableDocs ?? false;\n console.log(` \u2713 Reusing existing KiroGraph data in ${cwd}/.kirograph/`);\n console.log(` \u2022 semanticEngine: ${config.semanticEngine}`);\n console.log(` \u2022 enableEmbeddings: ${config.enableEmbeddings}`);\n console.log(` \u2022 enableArchitecture: ${config.enableArchitecture}`);\n console.log(` \u2022 cavemanMode: ${cavemanMode}`);\n console.log(` \u2022 shellCompressionLevel: ${shellCompressionLevel}`);\n console.log(` \u2022 enableMemory: ${enableMemory}`);\n console.log(` \u2022 enableDocs: ${enableDocs}`);\n } else {\n shouldOfferIndex = true;\n const patch = await promptConfigOptions(rl);\n await updateConfig(cwd, patch);\n cavemanMode = patch.cavemanMode ?? 'off';\n shellCompressionLevel = patch.shellCompressionLevel ?? 'normal';\n enableMemory = patch.enableMemory ?? false;\n enableDocs = patch.enableDocs ?? false;\n typesenseDashboard = patch.typesenseDashboard;\n qdrantDashboard = patch.qdrantDashboard;\n\n console.log(`\\n Configuration saved to ${cwd}/.kirograph/config.json`);\n console.log(` \u2022 enableEmbeddings: ${patch.enableEmbeddings}`);\n if ('embeddingModel' in patch) {\n console.log(` \u2022 embeddingModel: ${patch.embeddingModel} ${dim}(${patch.embeddingDim}-dim)${reset}`);\n }\n if (patch.enableEmbeddings) {\n console.log(` \u2022 semanticEngine: ${patch.semanticEngine}`);\n if (patch.semanticEngine === 'sqlite-vec') {\n console.log(`\\n Installing sqlite-vec dependencies...`);\n const result = spawnSync('npm', ['install', 'better-sqlite3', 'sqlite-vec'], { stdio: 'inherit', shell: true });\n if (result.status === 0) {\n console.log(` \u2713 better-sqlite3 and sqlite-vec installed`);\n } else {\n console.warn(` \u2717 npm install failed (exit ${result.status}). Run manually:`);\n console.warn(` npm install better-sqlite3 sqlite-vec`);\n }\n } else if (patch.semanticEngine === 'orama') {\n console.log(`\\n Installing Orama dependencies...`);\n const result = spawnSync('npm', ['install', '@orama/orama', '@orama/plugin-data-persistence'], { stdio: 'inherit', shell: true });\n if (result.status === 0) {\n console.log(` \u2713 @orama/orama and @orama/plugin-data-persistence installed`);\n } else {\n console.warn(` \u2717 npm install failed (exit ${result.status}). Run manually:`);\n console.warn(` npm install @orama/orama @orama/plugin-data-persistence`);\n }\n } else if (patch.semanticEngine === 'pglite') {\n console.log(`\\n Installing PGlite dependencies...`);\n const result = spawnSync('npm', ['install', '@electric-sql/pglite'], { stdio: 'inherit', shell: true });\n if (result.status === 0) {\n console.log(` \u2713 @electric-sql/pglite installed`);\n } else {\n console.warn(` \u2717 npm install failed (exit ${result.status}). Run manually:`);\n console.warn(` npm install @electric-sql/pglite`);\n }\n } else if (patch.semanticEngine === 'lancedb') {\n console.log(`\\n Installing LanceDB dependencies...`);\n const result = spawnSync('npm', ['install', '@lancedb/lancedb'], { stdio: 'inherit', shell: true });\n if (result.status === 0) {\n console.log(` \u2713 @lancedb/lancedb installed`);\n } else {\n console.warn(` \u2717 npm install failed (exit ${result.status}). Run manually:`);\n console.warn(` npm install @lancedb/lancedb`);\n }\n } else if (patch.semanticEngine === 'qdrant') {\n console.log(`\\n Installing Qdrant dependencies...`);\n const result = spawnSync('npm', ['install', 'qdrant-local'], { stdio: 'inherit', shell: true });\n if (result.status === 0) {\n console.log(` \u2713 qdrant-local installed`);\n } else {\n console.warn(` \u2717 npm install failed (exit ${result.status}). Run manually:`);\n console.warn(` npm install qdrant-local`);\n }\n } else if (patch.semanticEngine === 'typesense') {\n console.log(`\\n Installing Typesense dependencies...`);\n const result = spawnSync('npm', ['install', 'typesense'], { stdio: 'inherit', shell: true });\n if (result.status === 0) {\n console.log(` \u2713 typesense installed`);\n console.log(` \u2139 The Typesense binary (~37MB) will be auto-downloaded on first index run.`);\n } else {\n console.warn(` \u2717 npm install failed (exit ${result.status}). Run manually:`);\n console.warn(` npm install typesense`);\n }\n }\n }\n console.log(` \u2022 extractDocstrings: ${patch.extractDocstrings}`);\n console.log(` \u2022 trackCallSites: ${patch.trackCallSites}`);\n console.log(` \u2022 enableArchitecture: ${patch.enableArchitecture}`);\n console.log(` \u2022 cavemanMode: ${cavemanMode}`);\n console.log(` \u2022 shellCompressionLevel: ${shellCompressionLevel}`);\n console.log(` \u2022 enableMemory: ${enableMemory}`);\n console.log(` \u2022 enableDocs: ${enableDocs}`);\n }\n\n installer.installLate(cwd, cavemanMode, shellCompressionLevel, enableMemory, enableDocs);\n } catch (err) {\n const reason = err instanceof Error ? err.message : String(err);\n console.error(`\\n \u2717 Failed to write configuration: ${reason}`);\n process.exit(1);\n }\n\n // 5. Pre-download Qdrant UI before indexing so Qdrant starts with static content dir\n if (qdrantDashboard) {\n await ensureQdrantUI(cwd);\n }\n\n // 6. Optionally init + index\n if (shouldOfferIndex && await askToggle(rl, 'Initialize and index this project now?', 'Creates .kirograph/ and indexes all source files. Takes a few seconds for small projects, longer for large ones.')) {\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n\n const fileBytes = new Map<string, { loaded: number; total: number }>();\n const modelProgress = (file: string, loaded: number, total: number, done: boolean): void => {\n const entry = fileBytes.get(file) ?? { loaded: 0, total: 0 };\n if (total > 0) entry.total = total;\n entry.loaded = done ? entry.total : loaded;\n fileBytes.set(file, entry);\n\n // Only count files where we know the size (content-length was present)\n const knownFiles = Array.from(fileBytes.values()).filter(f => f.total > 0);\n const totalLoaded = knownFiles.reduce((s, f) => s + f.loaded, 0);\n const totalBytes = knownFiles.reduce((s, f) => s + f.total, 0);\n const pct = totalBytes > 0 ? Math.min((totalLoaded / totalBytes) * 100, 100) : 0;\n\n const filled = Math.round(pct / 5);\n const bar = '\u2588'.repeat(filled) + '\u2591'.repeat(20 - filled);\n const mb = (totalLoaded / 1024 / 1024).toFixed(1);\n const totalMb = (totalBytes / 1024 / 1024).toFixed(1);\n process.stdout.write(`\\r [${bar}] ${pct.toFixed(0).padStart(3)}% ${mb} / ${totalMb} MB `);\n };\n\n // Suppress noisy internal warnings from @huggingface/transformers during download\n const originalStderrWrite = process.stderr.write.bind(process.stderr);\n const stderrFilter = (chunk: unknown, ...args: unknown[]): boolean => {\n const str = typeof chunk === 'string' ? chunk : String(chunk);\n if (str.includes('content-length') || str.includes('dtype not specified')) return true;\n return (originalStderrWrite as (...a: unknown[]) => boolean)(chunk, ...args);\n };\n process.stderr.write = stderrFilter as typeof process.stderr.write;\n\n let cg;\n try {\n if (!KiroGraph.isInitialized(cwd)) {\n process.stdout.write(' Downloading embedding model\u2026\\n');\n cg = await KiroGraph.init(cwd, undefined, modelProgress);\n process.stdout.write('\\n');\n console.log(' \u2713 Created .kirograph/');\n } else {\n cg = await KiroGraph.open(cwd, modelProgress);\n if (fileBytes.size > 0) process.stdout.write('\\n');\n }\n } finally {\n process.stderr.write = originalStderrWrite;\n }\n console.log(' Indexing...');\n const result = await cg.indexAll({ onProgress: renderIndexProgress });\n process.stdout.write('\\n');\n console.log(` \u2713 Indexed ${result.filesIndexed} files, ${result.nodesCreated} symbols, ${result.edgesCreated} edges`);\n cg.close();\n\n if (typesenseDashboard) {\n const dashboardServer = await openTypesenseDashboard(cwd);\n console.log(` ${dim}Press Ctrl+C to stop the dashboard server when done.${reset}`);\n await new Promise<void>(resolve => {\n process.on('SIGINT', () => {\n if (dashboardServer) {\n dashboardServer.close(() => resolve());\n } else {\n resolve();\n }\n });\n });\n return; // rl.close() handled in finally\n }\n\n if (qdrantDashboard) {\n await openQdrantDashboard(cwd);\n }\n }\n\n installer.printNextSteps(cwd);\n } finally {\n rl.close();\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,eAA0B;AAC1B,SAAoB;AACpB,WAAsB;AACtB,2BAA0B;AAC1B,oBAAyC;AACzC,oBAA4B;AAC5B,sBAAoC;AACpC,gBAA2B;AAC3B,qBAA+B;AAC/B,2BAAoC;AACpC,uBAAuC;AACvC,8BAAoD;AAEpD,qBAAmC;AAGnC,eAAsB,aAAa,SAAwB,QAAuB;AA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AQ;AAAA,MACzB;AACA,cAAQ,IAAI,eAAe;AAC3B,YAAM,SAAS,MAAM,GAAG,SAAS,EAAE,YAAY,oCAAoB,CAAC;AACpE,cAAQ,OAAO,MAAM,IAAI;AACzB,cAAQ,IAAI,oBAAe,OAAO,YAAY,WAAW,OAAO,YAAY,aAAa,OAAO,YAAY,QAAQ;AACpH,SAAG,MAAM;AAET,UAAI,oBAAoB;AACtB,cAAM,kBAAkB,UAAM,yCAAuB,GAAG;AACxD,gBAAQ,IAAI,KAAK,aAAG,uDAAuD,eAAK,EAAE;AAClF,cAAM,IAAI,QAAc,aAAW;AACjC,kBAAQ,GAAG,UAAU,MAAM;AACzB,gBAAI,iBAAiB;AACnB,8BAAgB,MAAM,MAAM,QAAQ,CAAC;AAAA,YACvC,OAAO;AACL,sBAAQ;AAAA,YACV;AAAA,UACF,CAAC;AAAA,QACH,CAAC;AACD;AAAA,MACF;AAEA,UAAI,iBAAiB;AACnB,kBAAM,6CAAoB,GAAG;AAAA,MAC/B;AAAA,IACF;AAEA,cAAU,eAAe,GAAG;AAAA,EAC9B,UAAE;AACA,OAAG,MAAM;AAAA,EACX;AACF;",
4
+ "sourcesContent": ["/**\n * KiroGraph Installer\n *\n * The default target wires up Kiro:\n * 1. .kiro/settings/mcp.json \u2014 registers the MCP server (IDE + CLI)\n * 2. .kiro/hooks/*.kiro.hook \u2014 auto-sync hooks for Kiro IDE\n * 3. .kiro/steering/kirograph.md \u2014 teaches Kiro to use the graph tools (IDE + CLI)\n * 4. .kiro/agents/kirograph.json \u2014 custom agent config for Kiro CLI\n */\n\nimport * as readline from 'readline';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { spawnSync } from 'child_process';\nimport { loadConfig, updateConfig } from '../../config';\nimport { printBanner } from '../banner';\nimport { renderIndexProgress } from '../progress';\nimport { dim, reset } from '../ui';\nimport { ask, askToggle } from './prompts';\nimport { promptConfigOptions } from './config-prompt';\nimport { openTypesenseDashboard } from './dashboard';\nimport { ensureQdrantUI, openQdrantDashboard } from './qdrant-dashboard';\nimport type { InstallTarget } from './common';\nimport { getTargetInstaller } from './targets';\nimport type { CavemanMode } from './caveman';\n\nexport async function runInstaller(target: InstallTarget = 'kiro'): Promise<void> {\n printBanner();\n\n const rl = readline.createInterface({ input: process.stdin, output: process.stdout });\n\n try {\n const cwd = process.cwd();\n const installer = getTargetInstaller(target);\n\n console.log(` Workspace: ${cwd}\\n`);\n\n const proceed = await askToggle(rl, `Install KiroGraph for ${installer.label}?`, 'Registers the MCP server and writes integration files for this workspace.');\n if (!proceed) { console.log(' Cancelled.'); rl.close(); return; }\n console.log();\n\n installer.installEarly(cwd);\n\n const alreadyInitialized = fs.existsSync(path.join(cwd, '.kirograph'));\n let cavemanMode: CavemanMode | 'off' = 'off';\n let shellCompressionLevel: 'off' | 'normal' | 'aggressive' | 'ultra' = 'normal';\n let enableMemory = false;\n let enableDocs = false;\n let enableData = false;\n let shouldOfferIndex = false;\n let typesenseDashboard = false;\n let qdrantDashboard = false;\n\n try {\n if (alreadyInitialized) {\n const config = await loadConfig(cwd);\n cavemanMode = config.cavemanMode ?? 'off';\n shellCompressionLevel = config.shellCompressionLevel ?? 'normal';\n enableMemory = config.enableMemory ?? false;\n enableDocs = config.enableDocs ?? false;\n enableData = (config as any).enableData ?? false;\n console.log(` \u2713 Reusing existing KiroGraph data in ${cwd}/.kirograph/`);\n console.log(` \u2022 semanticEngine: ${config.semanticEngine}`);\n console.log(` \u2022 enableEmbeddings: ${config.enableEmbeddings}`);\n console.log(` \u2022 enableArchitecture: ${config.enableArchitecture}`);\n console.log(` \u2022 cavemanMode: ${cavemanMode}`);\n console.log(` \u2022 shellCompressionLevel: ${shellCompressionLevel}`);\n console.log(` \u2022 enableMemory: ${enableMemory}`);\n console.log(` \u2022 enableDocs: ${enableDocs}`);\n console.log(` \u2022 enableData: ${enableData}`);\n } else {\n shouldOfferIndex = true;\n const patch = await promptConfigOptions(rl);\n await updateConfig(cwd, patch);\n cavemanMode = patch.cavemanMode ?? 'off';\n shellCompressionLevel = patch.shellCompressionLevel ?? 'normal';\n enableMemory = patch.enableMemory ?? false;\n enableDocs = patch.enableDocs ?? false;\n enableData = patch.enableData ?? false;\n typesenseDashboard = patch.typesenseDashboard;\n qdrantDashboard = patch.qdrantDashboard;\n\n console.log(`\\n Configuration saved to ${cwd}/.kirograph/config.json`);\n console.log(` \u2022 enableEmbeddings: ${patch.enableEmbeddings}`);\n if ('embeddingModel' in patch) {\n console.log(` \u2022 embeddingModel: ${patch.embeddingModel} ${dim}(${patch.embeddingDim}-dim)${reset}`);\n }\n if (patch.enableEmbeddings) {\n console.log(` \u2022 semanticEngine: ${patch.semanticEngine}`);\n if (patch.semanticEngine === 'sqlite-vec') {\n console.log(`\\n Installing sqlite-vec dependencies...`);\n const result = spawnSync('npm', ['install', 'better-sqlite3', 'sqlite-vec'], { stdio: 'inherit', shell: true });\n if (result.status === 0) {\n console.log(` \u2713 better-sqlite3 and sqlite-vec installed`);\n } else {\n console.warn(` \u2717 npm install failed (exit ${result.status}). Run manually:`);\n console.warn(` npm install better-sqlite3 sqlite-vec`);\n }\n } else if (patch.semanticEngine === 'orama') {\n console.log(`\\n Installing Orama dependencies...`);\n const result = spawnSync('npm', ['install', '@orama/orama', '@orama/plugin-data-persistence'], { stdio: 'inherit', shell: true });\n if (result.status === 0) {\n console.log(` \u2713 @orama/orama and @orama/plugin-data-persistence installed`);\n } else {\n console.warn(` \u2717 npm install failed (exit ${result.status}). Run manually:`);\n console.warn(` npm install @orama/orama @orama/plugin-data-persistence`);\n }\n } else if (patch.semanticEngine === 'pglite') {\n console.log(`\\n Installing PGlite dependencies...`);\n const result = spawnSync('npm', ['install', '@electric-sql/pglite'], { stdio: 'inherit', shell: true });\n if (result.status === 0) {\n console.log(` \u2713 @electric-sql/pglite installed`);\n } else {\n console.warn(` \u2717 npm install failed (exit ${result.status}). Run manually:`);\n console.warn(` npm install @electric-sql/pglite`);\n }\n } else if (patch.semanticEngine === 'lancedb') {\n console.log(`\\n Installing LanceDB dependencies...`);\n const result = spawnSync('npm', ['install', '@lancedb/lancedb'], { stdio: 'inherit', shell: true });\n if (result.status === 0) {\n console.log(` \u2713 @lancedb/lancedb installed`);\n } else {\n console.warn(` \u2717 npm install failed (exit ${result.status}). Run manually:`);\n console.warn(` npm install @lancedb/lancedb`);\n }\n } else if (patch.semanticEngine === 'qdrant') {\n console.log(`\\n Installing Qdrant dependencies...`);\n const result = spawnSync('npm', ['install', 'qdrant-local'], { stdio: 'inherit', shell: true });\n if (result.status === 0) {\n console.log(` \u2713 qdrant-local installed`);\n } else {\n console.warn(` \u2717 npm install failed (exit ${result.status}). Run manually:`);\n console.warn(` npm install qdrant-local`);\n }\n } else if (patch.semanticEngine === 'typesense') {\n console.log(`\\n Installing Typesense dependencies...`);\n const result = spawnSync('npm', ['install', 'typesense'], { stdio: 'inherit', shell: true });\n if (result.status === 0) {\n console.log(` \u2713 typesense installed`);\n console.log(` \u2139 The Typesense binary (~37MB) will be auto-downloaded on first index run.`);\n } else {\n console.warn(` \u2717 npm install failed (exit ${result.status}). Run manually:`);\n console.warn(` npm install typesense`);\n }\n }\n }\n console.log(` \u2022 extractDocstrings: ${patch.extractDocstrings}`);\n console.log(` \u2022 trackCallSites: ${patch.trackCallSites}`);\n console.log(` \u2022 enableArchitecture: ${patch.enableArchitecture}`);\n console.log(` \u2022 cavemanMode: ${cavemanMode}`);\n console.log(` \u2022 shellCompressionLevel: ${shellCompressionLevel}`);\n console.log(` \u2022 enableMemory: ${enableMemory}`);\n console.log(` \u2022 enableDocs: ${enableDocs}`);\n console.log(` \u2022 enableData: ${enableData}`);\n\n // Install optional data format deps if enableData is on\n if (enableData) {\n if ((patch as any).dataInstallExcel) {\n console.log(`\\n Installing xlsx...`);\n const xlsxResult = spawnSync('npm', ['install', 'xlsx'], { stdio: 'inherit', shell: true });\n if (xlsxResult.status === 0) {\n console.log(` \u2713 xlsx installed`);\n } else {\n console.warn(` \u2717 npm install failed. Run manually: npm install xlsx`);\n }\n }\n if ((patch as any).dataInstallParquet) {\n console.log(`\\n Installing parquetjs-lite...`);\n const pqResult = spawnSync('npm', ['install', 'parquetjs-lite'], { stdio: 'inherit', shell: true });\n if (pqResult.status === 0) {\n console.log(` \u2713 parquetjs-lite installed`);\n } else {\n console.warn(` \u2717 npm install failed. Run manually: npm install parquetjs-lite`);\n }\n }\n }\n }\n\n installer.installLate(cwd, cavemanMode, shellCompressionLevel, enableMemory, enableDocs, enableData);\n } catch (err) {\n const reason = err instanceof Error ? err.message : String(err);\n console.error(`\\n \u2717 Failed to write configuration: ${reason}`);\n process.exit(1);\n }\n\n // 5. Pre-download Qdrant UI before indexing so Qdrant starts with static content dir\n if (qdrantDashboard) {\n await ensureQdrantUI(cwd);\n }\n\n // 6. Optionally init + index\n if (shouldOfferIndex && await askToggle(rl, 'Initialize and index this project now?', 'Creates .kirograph/ and indexes all source files. Takes a few seconds for small projects, longer for large ones.')) {\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n\n const fileBytes = new Map<string, { loaded: number; total: number }>();\n const modelProgress = (file: string, loaded: number, total: number, done: boolean): void => {\n const entry = fileBytes.get(file) ?? { loaded: 0, total: 0 };\n if (total > 0) entry.total = total;\n entry.loaded = done ? entry.total : loaded;\n fileBytes.set(file, entry);\n\n // Only count files where we know the size (content-length was present)\n const knownFiles = Array.from(fileBytes.values()).filter(f => f.total > 0);\n const totalLoaded = knownFiles.reduce((s, f) => s + f.loaded, 0);\n const totalBytes = knownFiles.reduce((s, f) => s + f.total, 0);\n const pct = totalBytes > 0 ? Math.min((totalLoaded / totalBytes) * 100, 100) : 0;\n\n const filled = Math.round(pct / 5);\n const bar = '\u2588'.repeat(filled) + '\u2591'.repeat(20 - filled);\n const mb = (totalLoaded / 1024 / 1024).toFixed(1);\n const totalMb = (totalBytes / 1024 / 1024).toFixed(1);\n process.stdout.write(`\\r [${bar}] ${pct.toFixed(0).padStart(3)}% ${mb} / ${totalMb} MB `);\n };\n\n // Suppress noisy internal warnings from @huggingface/transformers during download\n const originalStderrWrite = process.stderr.write.bind(process.stderr);\n const stderrFilter = (chunk: unknown, ...args: unknown[]): boolean => {\n const str = typeof chunk === 'string' ? chunk : String(chunk);\n if (str.includes('content-length') || str.includes('dtype not specified')) return true;\n return (originalStderrWrite as (...a: unknown[]) => boolean)(chunk, ...args);\n };\n process.stderr.write = stderrFilter as typeof process.stderr.write;\n\n let cg;\n try {\n if (!KiroGraph.isInitialized(cwd)) {\n process.stdout.write(' Downloading embedding model\u2026\\n');\n cg = await KiroGraph.init(cwd, undefined, modelProgress);\n process.stdout.write('\\n');\n console.log(' \u2713 Created .kirograph/');\n } else {\n cg = await KiroGraph.open(cwd, modelProgress);\n if (fileBytes.size > 0) process.stdout.write('\\n');\n }\n } finally {\n process.stderr.write = originalStderrWrite;\n }\n console.log(' Indexing...');\n const result = await cg.indexAll({ onProgress: renderIndexProgress });\n process.stdout.write('\\n');\n console.log(` \u2713 Indexed ${result.filesIndexed} files, ${result.nodesCreated} symbols, ${result.edgesCreated} edges`);\n cg.close();\n\n if (typesenseDashboard) {\n const dashboardServer = await openTypesenseDashboard(cwd);\n console.log(` ${dim}Press Ctrl+C to stop the dashboard server when done.${reset}`);\n await new Promise<void>(resolve => {\n process.on('SIGINT', () => {\n if (dashboardServer) {\n dashboardServer.close(() => resolve());\n } else {\n resolve();\n }\n });\n });\n return; // rl.close() handled in finally\n }\n\n if (qdrantDashboard) {\n await openQdrantDashboard(cwd);\n }\n }\n\n installer.printNextSteps(cwd);\n } finally {\n rl.close();\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,eAA0B;AAC1B,SAAoB;AACpB,WAAsB;AACtB,2BAA0B;AAC1B,oBAAyC;AACzC,oBAA4B;AAC5B,sBAAoC;AACpC,gBAA2B;AAC3B,qBAA+B;AAC/B,2BAAoC;AACpC,uBAAuC;AACvC,8BAAoD;AAEpD,qBAAmC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