kairo-mcp 1.3.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 (384) hide show
  1. package/CHANGELOG.md +1122 -0
  2. package/LICENSE +21 -0
  3. package/README.md +662 -0
  4. package/dist/cli/cli.d.ts +3 -0
  5. package/dist/cli/cli.d.ts.map +1 -0
  6. package/dist/cli/cli.js +226 -0
  7. package/dist/cli/cli.js.map +1 -0
  8. package/dist/cli/commands.d.ts +10 -0
  9. package/dist/cli/commands.d.ts.map +1 -0
  10. package/dist/cli/commands.js +938 -0
  11. package/dist/cli/commands.js.map +1 -0
  12. package/dist/cli/flags.d.ts +30 -0
  13. package/dist/cli/flags.d.ts.map +1 -0
  14. package/dist/cli/flags.js +90 -0
  15. package/dist/cli/flags.js.map +1 -0
  16. package/dist/cli/output.d.ts +69 -0
  17. package/dist/cli/output.d.ts.map +1 -0
  18. package/dist/cli/output.js +166 -0
  19. package/dist/cli/output.js.map +1 -0
  20. package/dist/cli/types.d.ts +34 -0
  21. package/dist/cli/types.d.ts.map +1 -0
  22. package/dist/cli/types.js +2 -0
  23. package/dist/cli/types.js.map +1 -0
  24. package/dist/contracts/migrations.d.ts +31 -0
  25. package/dist/contracts/migrations.d.ts.map +1 -0
  26. package/dist/contracts/migrations.js +71 -0
  27. package/dist/contracts/migrations.js.map +1 -0
  28. package/dist/contracts/schemas.d.ts +53 -0
  29. package/dist/contracts/schemas.d.ts.map +1 -0
  30. package/dist/contracts/schemas.js +27 -0
  31. package/dist/contracts/schemas.js.map +1 -0
  32. package/dist/contracts/stability.d.ts +32 -0
  33. package/dist/contracts/stability.d.ts.map +1 -0
  34. package/dist/contracts/stability.js +140 -0
  35. package/dist/contracts/stability.js.map +1 -0
  36. package/dist/contracts/zodSchemas.d.ts +811 -0
  37. package/dist/contracts/zodSchemas.d.ts.map +1 -0
  38. package/dist/contracts/zodSchemas.js +139 -0
  39. package/dist/contracts/zodSchemas.js.map +1 -0
  40. package/dist/core/brief/budget.d.ts +21 -0
  41. package/dist/core/brief/budget.d.ts.map +1 -0
  42. package/dist/core/brief/budget.js +42 -0
  43. package/dist/core/brief/budget.js.map +1 -0
  44. package/dist/core/checkpoint/checkpointManager.d.ts +29 -0
  45. package/dist/core/checkpoint/checkpointManager.d.ts.map +1 -0
  46. package/dist/core/checkpoint/checkpointManager.js +49 -0
  47. package/dist/core/checkpoint/checkpointManager.js.map +1 -0
  48. package/dist/core/compaction/compactor.d.ts +40 -0
  49. package/dist/core/compaction/compactor.d.ts.map +1 -0
  50. package/dist/core/compaction/compactor.js +168 -0
  51. package/dist/core/compaction/compactor.js.map +1 -0
  52. package/dist/core/continuation/continuationBuilder.d.ts +19 -0
  53. package/dist/core/continuation/continuationBuilder.d.ts.map +1 -0
  54. package/dist/core/continuation/continuationBuilder.js +184 -0
  55. package/dist/core/continuation/continuationBuilder.js.map +1 -0
  56. package/dist/core/coordination/coordinationManager.d.ts +34 -0
  57. package/dist/core/coordination/coordinationManager.d.ts.map +1 -0
  58. package/dist/core/coordination/coordinationManager.js +253 -0
  59. package/dist/core/coordination/coordinationManager.js.map +1 -0
  60. package/dist/core/coordination/types.d.ts +52 -0
  61. package/dist/core/coordination/types.d.ts.map +1 -0
  62. package/dist/core/coordination/types.js +6 -0
  63. package/dist/core/coordination/types.js.map +1 -0
  64. package/dist/core/github/changelog.d.ts +9 -0
  65. package/dist/core/github/changelog.d.ts.map +1 -0
  66. package/dist/core/github/changelog.js +41 -0
  67. package/dist/core/github/changelog.js.map +1 -0
  68. package/dist/core/github/commitMessage.d.ts +4 -0
  69. package/dist/core/github/commitMessage.d.ts.map +1 -0
  70. package/dist/core/github/commitMessage.js +125 -0
  71. package/dist/core/github/commitMessage.js.map +1 -0
  72. package/dist/core/github/gitContext.d.ts +3 -0
  73. package/dist/core/github/gitContext.d.ts.map +1 -0
  74. package/dist/core/github/gitContext.js +67 -0
  75. package/dist/core/github/gitContext.js.map +1 -0
  76. package/dist/core/github/releasePlan.d.ts +8 -0
  77. package/dist/core/github/releasePlan.d.ts.map +1 -0
  78. package/dist/core/github/releasePlan.js +56 -0
  79. package/dist/core/github/releasePlan.js.map +1 -0
  80. package/dist/core/github/semver.d.ts +11 -0
  81. package/dist/core/github/semver.d.ts.map +1 -0
  82. package/dist/core/github/semver.js +23 -0
  83. package/dist/core/github/semver.js.map +1 -0
  84. package/dist/core/github/types.d.ts +36 -0
  85. package/dist/core/github/types.d.ts.map +1 -0
  86. package/dist/core/github/types.js +2 -0
  87. package/dist/core/github/types.js.map +1 -0
  88. package/dist/core/graph/derived.d.ts +6 -0
  89. package/dist/core/graph/derived.d.ts.map +1 -0
  90. package/dist/core/graph/derived.js +133 -0
  91. package/dist/core/graph/derived.js.map +1 -0
  92. package/dist/core/graph/graphEngine.d.ts +11 -0
  93. package/dist/core/graph/graphEngine.d.ts.map +1 -0
  94. package/dist/core/graph/graphEngine.js +28 -0
  95. package/dist/core/graph/graphEngine.js.map +1 -0
  96. package/dist/core/graph/imports.d.ts +19 -0
  97. package/dist/core/graph/imports.d.ts.map +1 -0
  98. package/dist/core/graph/imports.js +0 -0
  99. package/dist/core/graph/imports.js.map +1 -0
  100. package/dist/core/graph/mermaid.d.ts +6 -0
  101. package/dist/core/graph/mermaid.d.ts.map +1 -0
  102. package/dist/core/graph/mermaid.js +40 -0
  103. package/dist/core/graph/mermaid.js.map +1 -0
  104. package/dist/core/graph/moduleGraph.d.ts +27 -0
  105. package/dist/core/graph/moduleGraph.d.ts.map +1 -0
  106. package/dist/core/graph/moduleGraph.js +186 -0
  107. package/dist/core/graph/moduleGraph.js.map +1 -0
  108. package/dist/core/graph/types.d.ts +32 -0
  109. package/dist/core/graph/types.d.ts.map +1 -0
  110. package/dist/core/graph/types.js +2 -0
  111. package/dist/core/graph/types.js.map +1 -0
  112. package/dist/core/query/queryEngine.d.ts +26 -0
  113. package/dist/core/query/queryEngine.d.ts.map +1 -0
  114. package/dist/core/query/queryEngine.js +258 -0
  115. package/dist/core/query/queryEngine.js.map +1 -0
  116. package/dist/core/query/types.d.ts +70 -0
  117. package/dist/core/query/types.d.ts.map +1 -0
  118. package/dist/core/query/types.js +6 -0
  119. package/dist/core/query/types.js.map +1 -0
  120. package/dist/core/repo/fingerprint.d.ts +0 -0
  121. package/dist/core/repo/fingerprint.d.ts.map +1 -0
  122. package/dist/core/repo/fingerprint.js +17 -0
  123. package/dist/core/repo/fingerprint.js.map +1 -0
  124. package/dist/core/repo/frameworkDetectors.d.ts +14 -0
  125. package/dist/core/repo/frameworkDetectors.d.ts.map +1 -0
  126. package/dist/core/repo/frameworkDetectors.js +151 -0
  127. package/dist/core/repo/frameworkDetectors.js.map +1 -0
  128. package/dist/core/repo/repoScanner.d.ts +20 -0
  129. package/dist/core/repo/repoScanner.d.ts.map +1 -0
  130. package/dist/core/repo/repoScanner.js +290 -0
  131. package/dist/core/repo/repoScanner.js.map +1 -0
  132. package/dist/core/repo/summary.d.ts +7 -0
  133. package/dist/core/repo/summary.d.ts.map +1 -0
  134. package/dist/core/repo/summary.js +34 -0
  135. package/dist/core/repo/summary.js.map +1 -0
  136. package/dist/core/repo/types.d.ts +62 -0
  137. package/dist/core/repo/types.d.ts.map +1 -0
  138. package/dist/core/repo/types.js +10 -0
  139. package/dist/core/repo/types.js.map +1 -0
  140. package/dist/core/risk/guardrail.d.ts +3 -0
  141. package/dist/core/risk/guardrail.d.ts.map +1 -0
  142. package/dist/core/risk/guardrail.js +47 -0
  143. package/dist/core/risk/guardrail.js.map +1 -0
  144. package/dist/core/risk/riskEngine.d.ts +8 -0
  145. package/dist/core/risk/riskEngine.d.ts.map +1 -0
  146. package/dist/core/risk/riskEngine.js +112 -0
  147. package/dist/core/risk/riskEngine.js.map +1 -0
  148. package/dist/core/risk/riskHeuristics.d.ts +4 -0
  149. package/dist/core/risk/riskHeuristics.d.ts.map +1 -0
  150. package/dist/core/risk/riskHeuristics.js +36 -0
  151. package/dist/core/risk/riskHeuristics.js.map +1 -0
  152. package/dist/core/salience/config.d.ts +14 -0
  153. package/dist/core/salience/config.d.ts.map +1 -0
  154. package/dist/core/salience/config.js +87 -0
  155. package/dist/core/salience/config.js.map +1 -0
  156. package/dist/core/salience/salienceEngine.d.ts +16 -0
  157. package/dist/core/salience/salienceEngine.d.ts.map +1 -0
  158. package/dist/core/salience/salienceEngine.js +64 -0
  159. package/dist/core/salience/salienceEngine.js.map +1 -0
  160. package/dist/core/salience/signals.d.ts +4 -0
  161. package/dist/core/salience/signals.d.ts.map +1 -0
  162. package/dist/core/salience/signals.js +143 -0
  163. package/dist/core/salience/signals.js.map +1 -0
  164. package/dist/core/salience/types.d.ts +69 -0
  165. package/dist/core/salience/types.d.ts.map +1 -0
  166. package/dist/core/salience/types.js +7 -0
  167. package/dist/core/salience/types.js.map +1 -0
  168. package/dist/core/session/eventPayloads.d.ts +92 -0
  169. package/dist/core/session/eventPayloads.d.ts.map +1 -0
  170. package/dist/core/session/eventPayloads.js +2 -0
  171. package/dist/core/session/eventPayloads.js.map +1 -0
  172. package/dist/core/session/reducer.d.ts +14 -0
  173. package/dist/core/session/reducer.d.ts.map +1 -0
  174. package/dist/core/session/reducer.js +181 -0
  175. package/dist/core/session/reducer.js.map +1 -0
  176. package/dist/core/session/sessionManager.d.ts +252 -0
  177. package/dist/core/session/sessionManager.d.ts.map +1 -0
  178. package/dist/core/session/sessionManager.js +655 -0
  179. package/dist/core/session/sessionManager.js.map +1 -0
  180. package/dist/core/telemetry/analytics.d.ts +24 -0
  181. package/dist/core/telemetry/analytics.d.ts.map +1 -0
  182. package/dist/core/telemetry/analytics.js +167 -0
  183. package/dist/core/telemetry/analytics.js.map +1 -0
  184. package/dist/core/telemetry/exporter.d.ts +17 -0
  185. package/dist/core/telemetry/exporter.d.ts.map +1 -0
  186. package/dist/core/telemetry/exporter.js +31 -0
  187. package/dist/core/telemetry/exporter.js.map +1 -0
  188. package/dist/core/telemetry/recorder.d.ts +19 -0
  189. package/dist/core/telemetry/recorder.d.ts.map +1 -0
  190. package/dist/core/telemetry/recorder.js +43 -0
  191. package/dist/core/telemetry/recorder.js.map +1 -0
  192. package/dist/core/telemetry/reports.d.ts +6 -0
  193. package/dist/core/telemetry/reports.d.ts.map +1 -0
  194. package/dist/core/telemetry/reports.js +84 -0
  195. package/dist/core/telemetry/reports.js.map +1 -0
  196. package/dist/core/telemetry/types.d.ts +82 -0
  197. package/dist/core/telemetry/types.d.ts.map +1 -0
  198. package/dist/core/telemetry/types.js +9 -0
  199. package/dist/core/telemetry/types.js.map +1 -0
  200. package/dist/core/vector/chunking/memoryChunker.d.ts +10 -0
  201. package/dist/core/vector/chunking/memoryChunker.d.ts.map +1 -0
  202. package/dist/core/vector/chunking/memoryChunker.js +202 -0
  203. package/dist/core/vector/chunking/memoryChunker.js.map +1 -0
  204. package/dist/core/vector/compression/architectureDigest.d.ts +12 -0
  205. package/dist/core/vector/compression/architectureDigest.d.ts.map +1 -0
  206. package/dist/core/vector/compression/architectureDigest.js +37 -0
  207. package/dist/core/vector/compression/architectureDigest.js.map +1 -0
  208. package/dist/core/vector/embedding/deterministicEmbedder.d.ts +10 -0
  209. package/dist/core/vector/embedding/deterministicEmbedder.d.ts.map +1 -0
  210. package/dist/core/vector/embedding/deterministicEmbedder.js +84 -0
  211. package/dist/core/vector/embedding/deterministicEmbedder.js.map +1 -0
  212. package/dist/core/vector/memory/memoryEngine.d.ts +56 -0
  213. package/dist/core/vector/memory/memoryEngine.d.ts.map +1 -0
  214. package/dist/core/vector/memory/memoryEngine.js +204 -0
  215. package/dist/core/vector/memory/memoryEngine.js.map +1 -0
  216. package/dist/core/vector/memory/memoryFingerprint.d.ts +12 -0
  217. package/dist/core/vector/memory/memoryFingerprint.d.ts.map +1 -0
  218. package/dist/core/vector/memory/memoryFingerprint.js +33 -0
  219. package/dist/core/vector/memory/memoryFingerprint.js.map +1 -0
  220. package/dist/core/vector/providers/deterministicProvider.d.ts +14 -0
  221. package/dist/core/vector/providers/deterministicProvider.d.ts.map +1 -0
  222. package/dist/core/vector/providers/deterministicProvider.js +22 -0
  223. package/dist/core/vector/providers/deterministicProvider.js.map +1 -0
  224. package/dist/core/vector/providers/httpEmbeddingProvider.d.ts +32 -0
  225. package/dist/core/vector/providers/httpEmbeddingProvider.d.ts.map +1 -0
  226. package/dist/core/vector/providers/httpEmbeddingProvider.js +93 -0
  227. package/dist/core/vector/providers/httpEmbeddingProvider.js.map +1 -0
  228. package/dist/core/vector/providers/registry.d.ts +9 -0
  229. package/dist/core/vector/providers/registry.d.ts.map +1 -0
  230. package/dist/core/vector/providers/registry.js +79 -0
  231. package/dist/core/vector/providers/registry.js.map +1 -0
  232. package/dist/core/vector/providers/types.d.ts +23 -0
  233. package/dist/core/vector/providers/types.d.ts.map +1 -0
  234. package/dist/core/vector/providers/types.js +2 -0
  235. package/dist/core/vector/providers/types.js.map +1 -0
  236. package/dist/core/vector/retrieval/hybridRetriever.d.ts +37 -0
  237. package/dist/core/vector/retrieval/hybridRetriever.d.ts.map +1 -0
  238. package/dist/core/vector/retrieval/hybridRetriever.js +131 -0
  239. package/dist/core/vector/retrieval/hybridRetriever.js.map +1 -0
  240. package/dist/core/vector/types.d.ts +87 -0
  241. package/dist/core/vector/types.d.ts.map +1 -0
  242. package/dist/core/vector/types.js +6 -0
  243. package/dist/core/vector/types.js.map +1 -0
  244. package/dist/index.d.ts +3 -0
  245. package/dist/index.d.ts.map +1 -0
  246. package/dist/index.js +30 -0
  247. package/dist/index.js.map +1 -0
  248. package/dist/inspect/cli.d.ts +3 -0
  249. package/dist/inspect/cli.d.ts.map +1 -0
  250. package/dist/inspect/cli.js +40 -0
  251. package/dist/inspect/cli.js.map +1 -0
  252. package/dist/inspect/projections.d.ts +141 -0
  253. package/dist/inspect/projections.d.ts.map +1 -0
  254. package/dist/inspect/projections.js +311 -0
  255. package/dist/inspect/projections.js.map +1 -0
  256. package/dist/inspect/render.d.ts +27 -0
  257. package/dist/inspect/render.d.ts.map +1 -0
  258. package/dist/inspect/render.js +325 -0
  259. package/dist/inspect/render.js.map +1 -0
  260. package/dist/inspect/server.d.ts +18 -0
  261. package/dist/inspect/server.d.ts.map +1 -0
  262. package/dist/inspect/server.js +112 -0
  263. package/dist/inspect/server.js.map +1 -0
  264. package/dist/perf/index.d.ts +24 -0
  265. package/dist/perf/index.d.ts.map +1 -0
  266. package/dist/perf/index.js +38 -0
  267. package/dist/perf/index.js.map +1 -0
  268. package/dist/perf/report.d.ts +8 -0
  269. package/dist/perf/report.d.ts.map +1 -0
  270. package/dist/perf/report.js +52 -0
  271. package/dist/perf/report.js.map +1 -0
  272. package/dist/perf/runner.d.ts +29 -0
  273. package/dist/perf/runner.d.ts.map +1 -0
  274. package/dist/perf/runner.js +74 -0
  275. package/dist/perf/runner.js.map +1 -0
  276. package/dist/perf/scenarios.d.ts +8 -0
  277. package/dist/perf/scenarios.d.ts.map +1 -0
  278. package/dist/perf/scenarios.js +119 -0
  279. package/dist/perf/scenarios.js.map +1 -0
  280. package/dist/perf/types.d.ts +32 -0
  281. package/dist/perf/types.d.ts.map +1 -0
  282. package/dist/perf/types.js +6 -0
  283. package/dist/perf/types.js.map +1 -0
  284. package/dist/plugins/loader.d.ts +78 -0
  285. package/dist/plugins/loader.d.ts.map +1 -0
  286. package/dist/plugins/loader.js +193 -0
  287. package/dist/plugins/loader.js.map +1 -0
  288. package/dist/plugins/types.d.ts +38 -0
  289. package/dist/plugins/types.d.ts.map +1 -0
  290. package/dist/plugins/types.js +10 -0
  291. package/dist/plugins/types.js.map +1 -0
  292. package/dist/pressure/pressureModel.d.ts +6 -0
  293. package/dist/pressure/pressureModel.d.ts.map +1 -0
  294. package/dist/pressure/pressureModel.js +102 -0
  295. package/dist/pressure/pressureModel.js.map +1 -0
  296. package/dist/prompts/continuityPrompt.d.ts +7 -0
  297. package/dist/prompts/continuityPrompt.d.ts.map +1 -0
  298. package/dist/prompts/continuityPrompt.js +43 -0
  299. package/dist/prompts/continuityPrompt.js.map +1 -0
  300. package/dist/sdk/index.d.ts +53 -0
  301. package/dist/sdk/index.d.ts.map +1 -0
  302. package/dist/sdk/index.js +130 -0
  303. package/dist/sdk/index.js.map +1 -0
  304. package/dist/security/patterns.d.ts +16 -0
  305. package/dist/security/patterns.d.ts.map +1 -0
  306. package/dist/security/patterns.js +61 -0
  307. package/dist/security/patterns.js.map +1 -0
  308. package/dist/security/redactor.d.ts +20 -0
  309. package/dist/security/redactor.d.ts.map +1 -0
  310. package/dist/security/redactor.js +58 -0
  311. package/dist/security/redactor.js.map +1 -0
  312. package/dist/server/createServer.d.ts +10 -0
  313. package/dist/server/createServer.d.ts.map +1 -0
  314. package/dist/server/createServer.js +60 -0
  315. package/dist/server/createServer.js.map +1 -0
  316. package/dist/server/registerTools.d.ts +4 -0
  317. package/dist/server/registerTools.d.ts.map +1 -0
  318. package/dist/server/registerTools.js +1086 -0
  319. package/dist/server/registerTools.js.map +1 -0
  320. package/dist/server/responses.d.ts +17 -0
  321. package/dist/server/responses.d.ts.map +1 -0
  322. package/dist/server/responses.js +21 -0
  323. package/dist/server/responses.js.map +1 -0
  324. package/dist/snapshot/export.d.ts +26 -0
  325. package/dist/snapshot/export.d.ts.map +1 -0
  326. package/dist/snapshot/export.js +164 -0
  327. package/dist/snapshot/export.js.map +1 -0
  328. package/dist/snapshot/import.d.ts +34 -0
  329. package/dist/snapshot/import.d.ts.map +1 -0
  330. package/dist/snapshot/import.js +114 -0
  331. package/dist/snapshot/import.js.map +1 -0
  332. package/dist/snapshot/types.d.ts +63 -0
  333. package/dist/snapshot/types.d.ts.map +1 -0
  334. package/dist/snapshot/types.js +2 -0
  335. package/dist/snapshot/types.js.map +1 -0
  336. package/dist/storage/faultAdapter.d.ts +64 -0
  337. package/dist/storage/faultAdapter.d.ts.map +1 -0
  338. package/dist/storage/faultAdapter.js +134 -0
  339. package/dist/storage/faultAdapter.js.map +1 -0
  340. package/dist/storage/fileStorageAdapter.d.ts +55 -0
  341. package/dist/storage/fileStorageAdapter.d.ts.map +1 -0
  342. package/dist/storage/fileStorageAdapter.js +219 -0
  343. package/dist/storage/fileStorageAdapter.js.map +1 -0
  344. package/dist/storage/paths.d.ts +30 -0
  345. package/dist/storage/paths.d.ts.map +1 -0
  346. package/dist/storage/paths.js +32 -0
  347. package/dist/storage/paths.js.map +1 -0
  348. package/dist/storage/quarantine.d.ts +36 -0
  349. package/dist/storage/quarantine.d.ts.map +1 -0
  350. package/dist/storage/quarantine.js +26 -0
  351. package/dist/storage/quarantine.js.map +1 -0
  352. package/dist/storage/redactingAdapter.d.ts +13 -0
  353. package/dist/storage/redactingAdapter.d.ts.map +1 -0
  354. package/dist/storage/redactingAdapter.js +91 -0
  355. package/dist/storage/redactingAdapter.js.map +1 -0
  356. package/dist/storage/storageAdapter.d.ts +46 -0
  357. package/dist/storage/storageAdapter.d.ts.map +1 -0
  358. package/dist/storage/storageAdapter.js +2 -0
  359. package/dist/storage/storageAdapter.js.map +1 -0
  360. package/dist/types/domain.d.ts +139 -0
  361. package/dist/types/domain.d.ts.map +1 -0
  362. package/dist/types/domain.js +9 -0
  363. package/dist/types/domain.js.map +1 -0
  364. package/dist/types/events.d.ts +28 -0
  365. package/dist/types/events.d.ts.map +1 -0
  366. package/dist/types/events.js +7 -0
  367. package/dist/types/events.js.map +1 -0
  368. package/dist/utils/errors.d.ts +6 -0
  369. package/dist/utils/errors.d.ts.map +1 -0
  370. package/dist/utils/errors.js +10 -0
  371. package/dist/utils/errors.js.map +1 -0
  372. package/dist/utils/ids.d.ts +7 -0
  373. package/dist/utils/ids.d.ts.map +1 -0
  374. package/dist/utils/ids.js +22 -0
  375. package/dist/utils/ids.js.map +1 -0
  376. package/dist/utils/logger.d.ts +7 -0
  377. package/dist/utils/logger.d.ts.map +1 -0
  378. package/dist/utils/logger.js +26 -0
  379. package/dist/utils/logger.js.map +1 -0
  380. package/dist/utils/time.d.ts +8 -0
  381. package/dist/utils/time.d.ts.map +1 -0
  382. package/dist/utils/time.js +11 -0
  383. package/dist/utils/time.js.map +1 -0
  384. package/package.json +79 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kairo maintainers
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,662 @@
1
+ # Kairo
2
+
3
+ > Persistent engineering memory and session-continuity for AI coding agents.
4
+ > Local-first. Deterministic. Replay-safe.
5
+
6
+ [![ci](https://github.com/sandy001-kki/Kairo/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/sandy001-kki/Kairo/actions/workflows/ci.yml)
7
+ [![Latest release](https://img.shields.io/github/v/release/sandy001-kki/Kairo?display_name=tag&sort=semver&color=blue)](https://github.com/sandy001-kki/Kairo/releases)
8
+ [![Tests](https://img.shields.io/badge/tests-193%20passing-brightgreen)](tests)
9
+ [![ADRs](https://img.shields.io/badge/ADRs-17-informational)](docs/adr)
10
+ [![MCP tools](https://img.shields.io/badge/MCP%20tools-41-blueviolet)](docs/API_STABILITY.md)
11
+ [![Stable surface](https://img.shields.io/badge/stable-33%20tools%20%2B%2014%20routes-success)](docs/API_STABILITY.md)
12
+ [![Node](https://img.shields.io/badge/node-%E2%89%A520-339933?logo=node.js&logoColor=white)](package.json)
13
+ [![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6?logo=typescript&logoColor=white)](tsconfig.json)
14
+ [![Local-first](https://img.shields.io/badge/local--first-no%20network-555)](docs/ARCHITECTURE.md)
15
+ [![Deterministic](https://img.shields.io/badge/deterministic-replay--safe-555)](docs/adr/0001-event-sourced-storage.md)
16
+ [![License](https://img.shields.io/badge/license-MIT-lightgrey)](LICENSE)
17
+
18
+ Kairo sits between AI coding agents — Claude Code, Cursor, Codex, Gemini CLI —
19
+ and your repository. It is the layer that _remembers_: a senior engineer's
20
+ notebook the agent reads at the start of every session and writes to throughout.
21
+
22
+ It does not run agents. It does not call a model. It runs **next to** the
23
+ agent, on your machine, and gives it the durable memory a model cannot keep
24
+ on its own.
25
+
26
+ ```
27
+ your repo ──▶ AI agent ──▶ Kairo (MCP) ──▶ .kairo/ on local disk
28
+ ▲ │
29
+ └──── continuation brief ◀─┘
30
+ (resume, don't rescan)
31
+ ```
32
+
33
+ ---
34
+
35
+ ## 10-second pitch
36
+
37
+ AI coding agents forget. Kairo remembers — durably, deterministically, locally.
38
+
39
+ ## 1-minute pitch
40
+
41
+ Every new agent session starts by re-deriving the repo: which files exist,
42
+ which framework, what the entry points are. That's wasteful, slow, and
43
+ context-window-hostile. Mid-task the agent runs out of context and stops
44
+ without a clean handoff. The next agent starts from zero.
45
+
46
+ Kairo records what happens during a session (file changes, decisions, errors,
47
+ risk assessments), writes durable checkpoints, and hands the next session an
48
+ exact continuation brief — _"here's what was being done, here's where it
49
+ stopped, here are the files to look at first"_. Same project, next agent,
50
+ no rescan.
51
+
52
+ ## 5-minute pitch — how it works
53
+
54
+ | Layer | What it does | Where it lives |
55
+ | ----------------------- | -------------------------------------------------------------- | ------------------------------------- |
56
+ | **MCP server** | 41 tools the agent calls during work. | stdio, launched by your MCP host. |
57
+ | **Session ledger** | Append-only log of events, decisions, errors. | `.kairo/events.jsonl` |
58
+ | **Checkpoints** | Durable, sanitized, resumable snapshots. | `.kairo/checkpoints/*.json` |
59
+ | **Continuation briefs** | Markdown handoffs in three size modes. | `.kairo/continuations/*.md` |
60
+ | **Repo intelligence** | Cached fingerprint + framework/language/entry-point detection. | `.kairo/intelligence/latest.json` |
61
+ | **Vector memory** | Architecture-aware hybrid recall (deterministic by default). | `.kairo/vector/index.json` |
62
+ | **Graphs** | Mermaid module / service / architecture diagrams. | `.kairo/graphs/*.md` |
63
+ | **Inspect surfaces** | Read-only HTTP + VS Code views. | `kairo inspect`, `extensions/vscode/` |
64
+
65
+ Every persisted artefact carries a schema version. Reads validate at the
66
+ storage seam; corrupt lines go to `.kairo/quarantine/`; migrations are pure
67
+ functions. The full architecture sits in
68
+ [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md).
69
+
70
+ ---
71
+
72
+ ## Why AI coding breaks at scale (the honest version)
73
+
74
+ | Failure mode | Why it happens | What Kairo does about it |
75
+ | --------------------------------------- | --------------------------------------------- | ----------------------------------------------------------------------------------- |
76
+ | **Rescan every session** | Agents have no durable scratch space. | `kairo_session_start` returns cached `RepoIntelligence` + prior continuation brief. |
77
+ | **Hit context window mid-task** | Long sessions exceed any model's window. | Pressure model + `CHECKPOINT_NOW` directive → safe handoff before crash. |
78
+ | **Repeat past mistakes** | Agents don't remember last week's decisions. | Decisions, errors, risk assessments persisted to event log. |
79
+ | **Lose architectural understanding** | Agent re-derives layout from scratch. | Pre-computed module + service + architecture graphs available on read. |
80
+ | **No-context handoff between agents** | Switching from Claude to Cursor = start over. | Continuation brief works for any MCP-speaking agent. |
81
+ | **Cross-worker conflicts** | Two devs/agents touching the same module. | Cooperative file leases (`kairo_lease`) — explainable, no consensus needed. |
82
+ | **Token cost of "remember everything"** | Naive memory layers bloat every prompt. | Brief modes: `tiny` (1500 chars), `normal` (4000), `deep` (20000). |
83
+
84
+ Kairo is **cooperative**, not omniscient. It cannot force an agent to stop.
85
+ It makes losing context expensive and safe handoff cheap. That is achievable
86
+ and genuinely valuable — and we would rather document the limit than oversell.
87
+
88
+ ---
89
+
90
+ ## What Kairo is NOT
91
+
92
+ Five boundaries on the front page so they aren't buried in an ADR:
93
+
94
+ 1. **Not distributed consensus.** Coordination is cooperative-on-shared-storage
95
+ (file leases over `.kairo/`), not Paxos/Raft.
96
+ 2. **Not SaaS.** No accounts, no hosted backend, no remote telemetry. `.kairo/`
97
+ lives on the local filesystem.
98
+ 3. **Not autonomous AGI orchestration.** Kairo is memory + continuity. The
99
+ agent decides; Kairo records and advises.
100
+ 4. **Not guaranteed semantic truth.** Vector recall is hybrid + salience-ranked;
101
+ the deterministic default is honestly lexical/structural.
102
+ 5. **Not real-time collaborative editing.** No streams, no push, no live
103
+ cursors. Historical inspection + cooperative coordination.
104
+
105
+ Out of scope **by design**, not deferred.
106
+
107
+ ---
108
+
109
+ ## Quick start (60 seconds)
110
+
111
+ In any project:
112
+
113
+ ```bash
114
+ # 1. Install (globally, so the `kairo` binary lands on PATH)
115
+ npm install -g kairo-mcp
116
+
117
+ # 2. Wire it into your MCP host (Claude Code, Cursor, etc.)
118
+ cd your-project
119
+ kairo init
120
+
121
+ # 3. Verify
122
+ kairo doctor
123
+ ```
124
+
125
+ > **Don't want a global install?** Use `npx -p kairo-mcp kairo init`. The
126
+ > `-p kairo-mcp` flag tells npx "fetch the `kairo-mcp` package and run the
127
+ > `kairo` bin from it" — needed because npm packages can have multiple bins
128
+ > and `npx <pkg>` defaults to the bin matching the package name (which here
129
+ > is the MCP server, not the CLI). Once you've used npx once it's cached;
130
+ > subsequent calls are instant.
131
+
132
+ > **Want the pre-release / dev tip?** `npm install -g github:sandy001-kki/Kairo`
133
+ > builds from the latest commit on `main` instead of the published npm
134
+ > version. Same `kairo` CLI; identical behaviour.
135
+
136
+ `kairo init` detects your MCP host (Claude Code, Cursor, …) and prints a
137
+ 3-step "next steps" block. Output looks like:
138
+
139
+ ```
140
+ Initialised
141
+ .mcp.json: written
142
+ .gitignore: appended
143
+ mcp host: claude
144
+
145
+ Next steps
146
+ 1. Open Claude Code in this project: claude
147
+ 2. Inside the session, run: /mcp
148
+ → you should see kairo · connected · 41 tools
149
+ 3. If anything looks off, run: kairo doctor
150
+ ```
151
+
152
+ `kairo doctor` is your one-stop check:
153
+
154
+ ```
155
+ Doctor
156
+ ok project root /your/project
157
+ ok kairo-mcp installed ./node_modules/kairo-mcp/dist/index.js
158
+ ok .mcp.json wires kairo ./.mcp.json
159
+ !! .kairo/ present (none yet — first MCP session creates it)
160
+ ok quarantine empty clean
161
+ ok version match installed=1.2.0 cli=1.2.0
162
+
163
+ next: 1 check(s) need attention.
164
+ ```
165
+
166
+ (The `.kairo/` warning is expected — the first agent session creates it.)
167
+
168
+ Open Claude Code in the project, run `/mcp`, you'll see `kairo · connected`.
169
+ Then say _"start a Kairo session and help me with X."_
170
+
171
+ ---
172
+
173
+ ## Real workflow
174
+
175
+ ```bash
176
+ $ cd flexdee-monorepo
177
+ $ npx kairo init
178
+ Initialised
179
+ .mcp.json: written
180
+ .gitignore: appended
181
+ mcp host: claude
182
+
183
+ Next steps
184
+ 1. Open Claude Code in this project: claude
185
+ 2. Inside the session, run: /mcp
186
+ → you should see kairo · connected · 41 tools
187
+ 3. If anything looks off, run: kairo doctor
188
+
189
+ # ── Day 1: open Claude Code, work for an hour, end the session ────────
190
+ $ npx kairo status
191
+ Project
192
+ root S:\projects\flexdee-monorepo
193
+ events 47
194
+ telemetry 12
195
+ sessions 1
196
+ checkpoints 2
197
+ quarantine 0
198
+ latest session 01JD8VK7HQM…
199
+ latest checkpoint 01JD8WPCXNE…
200
+
201
+ Intelligence
202
+ schema v4
203
+ files 842
204
+ frameworks express, nextjs, prisma
205
+ languages TypeScript, JavaScript, SQL
206
+
207
+ # ── Day 2: see exactly what the next agent will resume from ───────────
208
+ $ npx kairo brief --tiny
209
+ # Kairo Continuation Brief (tiny)
210
+
211
+ - **Task:** wire idempotent payment retries
212
+ - **Stop point:** session-end · risk HIGH · pressure CONTINUE
213
+ - **Files changed:** 3 — top: src/payment/charge.ts, src/payment/retry.ts
214
+ - **Next:**
215
+ 1. Resolve the 1 unresolved error(s) before new feature work.
216
+ 1. Re-validate high-risk changes before proceeding: src/payment/charge.ts.
217
+ - **Critical warnings:**
218
+ - ⚠️ integration test flakes on retry path
219
+
220
+ # ── Inspect everything in your browser ────────────────────────────────
221
+ $ npx kairo inspect
222
+ ready http://127.0.0.1:4173
223
+ project: S:\projects\flexdee-monorepo
224
+ read-only · no network · Ctrl+C to stop
225
+ ```
226
+
227
+ ---
228
+
229
+ ## Token reduction example
230
+
231
+ Same checkpoint, three modes — measured on Kairo's own repo:
232
+
233
+ | Mode | Chars | % of `deep` | Use when |
234
+ | ------------------ | ----: | ----------: | ---------------------------------- |
235
+ | `tiny` | 632 | 15% | Pre-empt rescans on cheap startup. |
236
+ | `normal` (default) | 2,946 | 71% | Resumes / checkpoints. |
237
+ | `deep` | 4,146 | 100% | Explicit historical review. |
238
+
239
+ ```bash
240
+ $ npx kairo brief --tiny # 632 chars
241
+ $ npx kairo brief # 2946 chars (normal)
242
+ $ npx kairo brief --deep # 4146 chars
243
+ $ npx kairo brief --max-chars 1000 # exactly 1000 chars, truncated cleanly
244
+ ```
245
+
246
+ Truncation is preservation-aware: critical sections (task, stop point, top
247
+ changed files, next actions, warnings) are front-loaded so tail clipping
248
+ keeps the load-bearing content.
249
+
250
+ ---
251
+
252
+ ## Continuation example
253
+
254
+ After a session ends, Kairo writes a markdown brief. The next agent reads it
255
+ on `kairo_session_start` instead of re-deriving the repo:
256
+
257
+ ```markdown
258
+ # Kairo Continuation Brief
259
+
260
+ > Resume from this brief. Do **not** rescan the whole repository —
261
+ > inspect only the files listed below unless they prove insufficient.
262
+
263
+ - **Generated:** 2026-05-21T14:30:00.000Z
264
+ - **Checkpoint:** `01JD8WPCXNEPC0G7N4DXKDKMG6` (manual)
265
+ - **Context-loss pressure:** 0.21 → CONTINUE
266
+
267
+ ## Task
268
+
269
+ wire idempotent payment retries
270
+
271
+ ## Engineering risk at checkpoint
272
+
273
+ **HIGH** (score 0.6875).
274
+
275
+ - [HIGH] src/payment/charge.ts (modified) is in a high-risk area
276
+
277
+ ## Files changed this session — inspect these first
278
+
279
+ | File | Change | Risk | Touches |
280
+ | ----------------------- | -------- | ---- | ------- |
281
+ | `src/payment/charge.ts` | modified | HIGH | 3 |
282
+ | `src/payment/retry.ts` | created | HIGH | 1 |
283
+
284
+ ## Key decisions
285
+
286
+ - **Idempotency via request UUID** — prevents double-charges on retry.
287
+
288
+ ## Recommended next actions
289
+
290
+ 1. Resolve the 1 unresolved error(s) before new feature work.
291
+ 1. Re-validate high-risk changes before proceeding: src/payment/charge.ts.
292
+
293
+ ## Semantic architecture recall
294
+
295
+ - **checkpoint 01JD8WPCXN…** (session, score 3.119) — salience 0.86, similarity 0.59
296
+ - **src/payment** (structural, score 1.71) — runtimeLayer 1, dependencyProximity 0.83
297
+ ```
298
+
299
+ ---
300
+
301
+ ## Graph example
302
+
303
+ ```bash
304
+ $ npx kairo graph module
305
+ ```
306
+
307
+ ```mermaid
308
+ flowchart TD
309
+ api[src/api] --> payment[src/payment]
310
+ api --> auth[src/auth]
311
+ payment --> shared[src/shared]
312
+ auth --> shared
313
+ payment --> db[(prisma)]
314
+ ```
315
+
316
+ The same file lives at `.kairo/graphs/module.md` — `kairo inspect` renders it
317
+ in the browser via its Mermaid source.
318
+
319
+ ---
320
+
321
+ ## Snapshot / recovery example
322
+
323
+ ```bash
324
+ # Archive the current state as one portable JSON file:
325
+ $ npx kairo snapshot export
326
+ path: S:\...\flexdee\.kairo\snapshots\snapshot-2026-05-21....json
327
+ bytes: 187,206
328
+ sha256: df54fa6c84b2a91f3...
329
+ events: 47
330
+ checkpoints: 2
331
+ sessions: 1
332
+
333
+ # Move it to another machine, then:
334
+ $ npx kairo snapshot import ./snapshot.json
335
+ target: /new/machine/path
336
+ events: 47
337
+ sessions: 1
338
+ checkpoints: 2
339
+ continuations: 2
340
+ ```
341
+
342
+ Snapshots are content-hashed: two exports of the same `.kairo/` produce
343
+ byte-identical files. Use for backups, sharing with teammates for triage,
344
+ or moving engineering memory between machines.
345
+
346
+ ---
347
+
348
+ ## Multi-agent coordination example
349
+
350
+ When two agents share a `.kairo/`, cooperative leases keep them from
351
+ stepping on each other:
352
+
353
+ ```jsonc
354
+ // agent A
355
+ { "name": "kairo_lease", "arguments": {
356
+ "action": "acquire", "scopeKind": "path", "scope": "src/payment"
357
+ }}
358
+ // → { "granted": true, "reason": "Lease granted on path:\"src/payment\"" }
359
+
360
+ // agent B (1 minute later)
361
+ { "name": "kairo_lease", "arguments": {
362
+ "action": "acquire", "scopeKind": "path", "scope": "src/payment"
363
+ }}
364
+ // → { "granted": false, "conflict": {...}, "reason":
365
+ // "Scope path:\"src/payment\" is leased by worker \"agent-A\" until …
366
+ // Coordinate or wait — Kairo advises, it does not preempt." }
367
+ ```
368
+
369
+ This is **cooperative**, not consensus. Two agents on a shared filesystem
370
+ observe the same event log and agree to back off. No network protocol, no
371
+ master. The same model also keeps cross-worker semantic memory namespace-
372
+ isolated (one agent's private chunks don't leak to another).
373
+
374
+ ---
375
+
376
+ ## VS Code integration
377
+
378
+ A separate publishable extension under
379
+ [`extensions/vscode/`](extensions/vscode/). Activity-bar tree views for:
380
+
381
+ - Overview (counts)
382
+ - Sessions (newest first)
383
+ - Checkpoints (click → opens the continuation brief)
384
+ - Active leases
385
+ - Risk escalations
386
+
387
+ Reads `.kairo/` directly via `fs` — does **not** spawn the MCP server.
388
+ Auto-refreshes on changes via `vscode.workspace.createFileSystemWatcher`.
389
+
390
+ ```bash
391
+ # Build the extension locally
392
+ cd extensions/vscode
393
+ npm install && npm run build
394
+ # then F5 in VS Code to "Run Extension"
395
+ ```
396
+
397
+ > _(Cursor: same extension works — Cursor is a VS Code fork.)_
398
+
399
+ ---
400
+
401
+ ## Inspect surface
402
+
403
+ Browser-based read-only inspector. Zero JS, no remote assets, CSP
404
+ `default-src 'none'`. Useful for triage, debugging, demos.
405
+
406
+ ```bash
407
+ $ npx kairo inspect
408
+ ready http://127.0.0.1:4173
409
+ ```
410
+
411
+ Routes: `/`, `/sessions`, `/sessions/:id`, `/checkpoints`,
412
+ `/checkpoints/:id`, `/continuations/:name`, `/timeline`, `/graphs`,
413
+ `/graphs/:kind`, `/memory`, `/coordination`, `/risk`, `/events`,
414
+ `/retrieval/:id`.
415
+
416
+ Bind defaults to `127.0.0.1` — loopback only. `--host 0.0.0.0` is allowed
417
+ but **not** recommended.
418
+
419
+ ---
420
+
421
+ ## Architecture (overview)
422
+
423
+ ```
424
+ ┌─────────────────────────────────────────────┐
425
+ │ AI coding agent │
426
+ │ (Claude Code · Cursor · Codex · …) │
427
+ └──────────────────┬───────────────────────────┘
428
+ │ MCP (stdio)
429
+ ┌──────────────────▼───────────────────────────┐
430
+ │ Kairo MCP server │
431
+ │ 41 tools · prompts · resources │
432
+ └──────────────────┬───────────────────────────┘
433
+
434
+ ┌──────────────────▼───────────────────────────┐
435
+ │ Session / risk / pressure / memory │
436
+ │ · Reducer (events → state) │
437
+ │ · Risk engine │
438
+ │ · Pressure model │
439
+ │ · Vector memory (hybrid recall) │
440
+ │ · Coordination (cooperative leases) │
441
+ └──────────────────┬───────────────────────────┘
442
+
443
+ ┌──────────────────▼───────────────────────────┐
444
+ │ Redaction boundary (write-side) │
445
+ │ Validation + migration (read-side) │
446
+ └──────────────────┬───────────────────────────┘
447
+
448
+ ┌──────────────────▼───────────────────────────┐
449
+ │ `.kairo/` (local, append-only, durable) │
450
+ │ events · sessions · checkpoints · │
451
+ │ continuations · intelligence · graphs · │
452
+ │ vector · reports · audit · telemetry │
453
+ └──────────────────────────────────────────────┘
454
+ ```
455
+
456
+ 10 core design principles (see [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md)):
457
+
458
+ 1. Cooperative, not omniscient.
459
+ 2. Event-sourced truth.
460
+ 3. Redaction is a boundary.
461
+ 4. Local-first.
462
+ 5. Seams over implementations.
463
+ 6. Token efficiency.
464
+ 7. Surfaces are projections.
465
+ 8. Schemas are versioned; migrations are pure.
466
+ 9. Scale is measured, not assumed.
467
+ 10. Integration boundaries are explicit.
468
+
469
+ ---
470
+
471
+ ## CLI reference
472
+
473
+ ```
474
+ kairo init Wire Kairo into the current project (.mcp.json + .gitignore).
475
+ kairo status One-screen overview of the project's .kairo/ state.
476
+ kairo brief Print the latest continuation brief. [--tiny|--normal|--deep|--max-chars N]
477
+ kairo continue Alias for `brief --normal`.
478
+ kairo sessions [id] List sessions, or show one.
479
+ kairo checkpoints [id] List checkpoints, or show one with lineage.
480
+ kairo graph [kind] List graphs, or print one (Mermaid).
481
+ kairo search "..." Semantic memory search.
482
+ kairo inspect Launch the local web inspector on 127.0.0.1:4173.
483
+ kairo serve Run the MCP server on stdio.
484
+ kairo snapshot export [path] Export .kairo/ → single JSON.
485
+ kairo snapshot import <path> Import a snapshot into the current project.
486
+ kairo compact [--dry-run] [--days N] Archive stale events.
487
+ kairo benchmark [--iterations N] Run the deterministic benchmark suite.
488
+ kairo doctor Health-check the project's Kairo install.
489
+ kairo stability [id] Lookup the stability tier of any documented surface.
490
+ kairo plugins List plugin manifests under .kairo/plugins/.
491
+ kairo completion bash|zsh|pwsh Print a shell-completion script.
492
+ kairo version Print kairo version.
493
+ ```
494
+
495
+ Every command honours `--json`, `--quiet`, `--verbose`, `--no-color`,
496
+ `--project PATH`, and `--help`.
497
+
498
+ ---
499
+
500
+ ## MCP surface (v1.2.0)
501
+
502
+ 41 tools total — 33 stable + 6 experimental. The full list:
503
+
504
+ | Group | Tools |
505
+ | ------------------------------------------ | ----------------------------------------------------------------------------------------------- |
506
+ | **Continuity loop** (stable, v0.1) | `session_start` `session_status` `record` `heartbeat` `checkpoint` `continuation` `session_end` |
507
+ | **Repository intelligence** (stable, v0.2) | `repo_scan` `repo_intel` |
508
+ | **Risk** (stable, v0.3) | `assess` |
509
+ | **GitHub-flavoured** (stable, v0.4) | `git_status` `commit_message` `changelog` `release_plan` |
510
+ | **Graphs** (stable, v0.5) | `graph` |
511
+ | **Memory** (stable, v0.6+) | `memory_search` `memory_index` `memory_digest` `memory_refresh` |
512
+ | **Coordination** (stable, v0.7) | `lease` `coordination_status` `timeline` |
513
+ | **Telemetry / analytics** (stable, v0.8) | `telemetry_status` `analytics_summary` `team_activity` `risk_report` `module_activity` |
514
+ | **Query** (stable, v0.8.1) | `query_events` `timeline_query` `checkpoint_lineage` `conflict_history` `retrieval_trace` |
515
+ | **Briefs** (stable, v0.8.2) | `brief` |
516
+ | **Snapshots** (stable, v0.9.2) | `snapshot_export` `snapshot_import` |
517
+ | **Experimental** (v0.9.3 / v0.9.4) | `benchmark` `perf_report` `compact_memory` `index_status` `plugins_list` `stability_of` |
518
+
519
+ All tools are prefixed `kairo_` over the wire. See
520
+ [`docs/API_STABILITY.md`](docs/API_STABILITY.md) for the policy and
521
+ [`src/contracts/stability.ts`](src/contracts/stability.ts) for the registry.
522
+
523
+ ---
524
+
525
+ ## Stability guarantees
526
+
527
+ Anything tagged `stable` in
528
+ [`src/contracts/stability.ts`](src/contracts/stability.ts) stays callable
529
+ with the same shape on every v1.x release. Patch versions never bump a
530
+ schema. Minor versions may add tools (back-compat) but not remove or
531
+ rename stable ones without a one-minor deprecation cycle.
532
+
533
+ Programmatic access:
534
+
535
+ ```ts
536
+ // SDK
537
+ import { KairoClient } from 'kairo-mcp/sdk';
538
+ const k = new KairoClient();
539
+ k.stabilityOf('kairo_session_start'); // → { tier: 'stable', since: '0.1.0', ... }
540
+ ```
541
+
542
+ ```bash
543
+ # CLI
544
+ $ kairo stability kairo_session_start
545
+ id: kairo_session_start
546
+ surface: mcp-tool
547
+ tier: stable
548
+ since: 0.1.0
549
+ ```
550
+
551
+ ---
552
+
553
+ ## FAQ
554
+
555
+ **Q: Where does my data live?**
556
+ `/path/to/your/project/.kairo/`. Nothing leaves the machine. No network
557
+ egress in core paths.
558
+
559
+ **Q: Do I need to run a server?**
560
+ No. The MCP host (Claude Code, Cursor) launches `kairo-mcp` per session
561
+ over stdio. Idle = no process.
562
+
563
+ **Q: Should I commit `.kairo/`?**
564
+ Default: no — `kairo init` gitignores it. If your team wants shared
565
+ engineering memory, leave it tracked; cooperative leases handle conflicts.
566
+ For lighter sharing, use `kairo snapshot export` to ship a single JSON.
567
+
568
+ **Q: How do I share state with a teammate?**
569
+
570
+ ```bash
571
+ $ kairo snapshot export ./for-alice.json
572
+ $ # send for-alice.json
573
+ $ # on Alice's machine:
574
+ $ kairo snapshot import ./for-alice.json --force
575
+ ```
576
+
577
+ Records pass through redaction on the way in.
578
+
579
+ **Q: How do I reset?**
580
+
581
+ ```bash
582
+ rm -rf .kairo/
583
+ ```
584
+
585
+ No external state to clean.
586
+
587
+ **Q: Will it slow down my agent?**
588
+ No. Every MCP tool is O(milliseconds) on a typical project. Cold scan is
589
+ ~6 ms on a small repo, warm scan is sub-millisecond.
590
+ `kairo benchmark` measures it.
591
+
592
+ **Q: What if the event log gets corrupted?**
593
+ `readValidatedJsonl` quarantines the bad line to `.kairo/quarantine/`
594
+ and continues. Healthy events still load. `kairo doctor` surfaces
595
+ quarantine count.
596
+
597
+ **Q: What models work with Kairo?**
598
+ Any MCP-speaking agent. Claude Code, Cursor, Claude Desktop, Codex (via
599
+ its MCP support), Gemini CLI (where supported). The MCP server itself
600
+ calls no LLM.
601
+
602
+ **Q: What's the licence?**
603
+ MIT. See [`LICENSE`](LICENSE).
604
+
605
+ ---
606
+
607
+ ## Roadmap (post-v1.2.0)
608
+
609
+ Honest list — no marketing, no AGI:
610
+
611
+ - **v1.x minors:** HTTP/SSE transport (the seam is in place via
612
+ `createServer()`); promotion of validated experimental tools to stable;
613
+ Cursor-specific integration docs if the field needs them.
614
+ - **v1.x patches:** bug fixes, ergonomic polish, doc improvements.
615
+ - **v2.0.0 (no timeline):** if and only if a stable surface needs to
616
+ change shape. We expect months between major versions.
617
+
618
+ Explicitly **not on the roadmap**:
619
+
620
+ - A SaaS / hosted version. Out of scope by design (ADR-0011).
621
+ - Autonomous-agent orchestration. The agent decides; Kairo records.
622
+ - Real-time collaborative editing.
623
+
624
+ ---
625
+
626
+ ## Contributing
627
+
628
+ 1. Fork, branch, work in small slices.
629
+ 2. Every PR must pass `npm run typecheck`, `npm run lint`,
630
+ `npm run format:check`, `npm test`, `npm run build`.
631
+ 3. Adding a stable surface? Add it to
632
+ [`src/contracts/stability.ts`](src/contracts/stability.ts).
633
+ 4. Schema bumps require a migration in the same PR (ADR-0012).
634
+ 5. New ADRs go under `docs/adr/`; numbering is sequential.
635
+ 6. Honest scope and replay-safety are non-negotiable. If a change cannot
636
+ be made deterministic, it requires an ADR.
637
+
638
+ ---
639
+
640
+ ## Documentation
641
+
642
+ | Document | Purpose |
643
+ | ---------------------------------------------------------------------- | ------------------------------------------------------ |
644
+ | [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) | Design + 10 core principles + roadmap. |
645
+ | [`docs/API_STABILITY.md`](docs/API_STABILITY.md) | Stability tiers + deprecation policy. |
646
+ | [`docs/SCHEMA.md`](docs/SCHEMA.md) | Persisted-artefact schemas + migrations. |
647
+ | [`docs/SDK.md`](docs/SDK.md) | Local read-only client. |
648
+ | [`docs/PLUGIN_API.md`](docs/PLUGIN_API.md) | Plugin manifest contract. |
649
+ | [`docs/MCP_COMPATIBILITY.md`](docs/MCP_COMPATIBILITY.md) | What Kairo promises about MCP. |
650
+ | [`docs/SURFACES.md`](docs/SURFACES.md) | Inspect + VS Code + Cursor. |
651
+ | [`docs/TOKEN_EFFICIENCY.md`](docs/TOKEN_EFFICIENCY.md) | Brief budgets + compact responses. |
652
+ | [`docs/PERFORMANCE.md`](docs/PERFORMANCE.md) | Benchmark harness + incremental indexing + compaction. |
653
+ | [`docs/V1_READINESS.md`](docs/V1_READINESS.md) | v1.0.0 entry criteria + compatibility matrix. |
654
+ | [`docs/RELEASE_AUDIT_v1.0.0-rc1.md`](docs/RELEASE_AUDIT_v1.0.0-rc1.md) | Final pre-v1 audit. |
655
+ | [`docs/DOGFOOD_v1.0.0-rc1.md`](docs/DOGFOOD_v1.0.0-rc1.md) | The operational dogfood cycle. |
656
+ | `docs/adr/*.md` | 16 architecture decision records. |
657
+
658
+ ---
659
+
660
+ ## Licence
661
+
662
+ [MIT](LICENSE).
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli/cli.ts"],"names":[],"mappings":""}