@clauderecallhq/cli 0.0.1 → 0.12.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 (279) hide show
  1. package/LICENSE +33 -0
  2. package/README.md +543 -3
  3. package/README.public.md +523 -0
  4. package/dist/cli.js +362 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/commands/activate.js +69 -0
  7. package/dist/commands/activate.js.map +1 -0
  8. package/dist/commands/audit-secrets.js +103 -0
  9. package/dist/commands/audit-secrets.js.map +1 -0
  10. package/dist/commands/blame.js +35 -0
  11. package/dist/commands/blame.js.map +1 -0
  12. package/dist/commands/config-verification.js +18 -0
  13. package/dist/commands/config-verification.js.map +1 -0
  14. package/dist/commands/context.js +144 -0
  15. package/dist/commands/context.js.map +1 -0
  16. package/dist/commands/correlate.js +70 -0
  17. package/dist/commands/correlate.js.map +1 -0
  18. package/dist/commands/digest.js +78 -0
  19. package/dist/commands/digest.js.map +1 -0
  20. package/dist/commands/health.js +62 -0
  21. package/dist/commands/health.js.map +1 -0
  22. package/dist/commands/index.js +247 -0
  23. package/dist/commands/index.js.map +1 -0
  24. package/dist/commands/install-extension.js +138 -0
  25. package/dist/commands/install-extension.js.map +1 -0
  26. package/dist/commands/installs.js +128 -0
  27. package/dist/commands/installs.js.map +1 -0
  28. package/dist/commands/license.js +39 -0
  29. package/dist/commands/license.js.map +1 -0
  30. package/dist/commands/list.js +47 -0
  31. package/dist/commands/list.js.map +1 -0
  32. package/dist/commands/mcp.js +29 -0
  33. package/dist/commands/mcp.js.map +1 -0
  34. package/dist/commands/open.js +28 -0
  35. package/dist/commands/open.js.map +1 -0
  36. package/dist/commands/paste.js +154 -0
  37. package/dist/commands/paste.js.map +1 -0
  38. package/dist/commands/projects.js +36 -0
  39. package/dist/commands/projects.js.map +1 -0
  40. package/dist/commands/search.js +67 -0
  41. package/dist/commands/search.js.map +1 -0
  42. package/dist/commands/semantic.js +173 -0
  43. package/dist/commands/semantic.js.map +1 -0
  44. package/dist/commands/show.js +121 -0
  45. package/dist/commands/show.js.map +1 -0
  46. package/dist/commands/start.js +47 -0
  47. package/dist/commands/start.js.map +1 -0
  48. package/dist/commands/stats.js +133 -0
  49. package/dist/commands/stats.js.map +1 -0
  50. package/dist/commands/status.js +45 -0
  51. package/dist/commands/status.js.map +1 -0
  52. package/dist/commands/stop.js +29 -0
  53. package/dist/commands/stop.js.map +1 -0
  54. package/dist/commands/thread.js +396 -0
  55. package/dist/commands/thread.js.map +1 -0
  56. package/dist/context/formatter.js +103 -0
  57. package/dist/context/formatter.js.map +1 -0
  58. package/dist/daemon/auto-tag-config.js +103 -0
  59. package/dist/daemon/auto-tag-config.js.map +1 -0
  60. package/dist/daemon/auto-tag-config.test.js +72 -0
  61. package/dist/daemon/auto-tag-config.test.js.map +1 -0
  62. package/dist/daemon/auto-title-config.js +70 -0
  63. package/dist/daemon/auto-title-config.js.map +1 -0
  64. package/dist/daemon/bulk-title-jobs.js +170 -0
  65. package/dist/daemon/bulk-title-jobs.js.map +1 -0
  66. package/dist/daemon/correlator.js +320 -0
  67. package/dist/daemon/correlator.js.map +1 -0
  68. package/dist/daemon/discover.js +316 -0
  69. package/dist/daemon/discover.js.map +1 -0
  70. package/dist/daemon/editor-detection.js +186 -0
  71. package/dist/daemon/editor-detection.js.map +1 -0
  72. package/dist/daemon/entrypoint.js +55 -0
  73. package/dist/daemon/entrypoint.js.map +1 -0
  74. package/dist/daemon/git-correlator.js +256 -0
  75. package/dist/daemon/git-correlator.js.map +1 -0
  76. package/dist/daemon/mcp-installer.js +108 -0
  77. package/dist/daemon/mcp-installer.js.map +1 -0
  78. package/dist/daemon/onboarding-state.js +140 -0
  79. package/dist/daemon/onboarding-state.js.map +1 -0
  80. package/dist/daemon/pidfile.js +57 -0
  81. package/dist/daemon/pidfile.js.map +1 -0
  82. package/dist/daemon/ports.js +48 -0
  83. package/dist/daemon/ports.js.map +1 -0
  84. package/dist/daemon/scanProgressRegistry.js +62 -0
  85. package/dist/daemon/scanProgressRegistry.js.map +1 -0
  86. package/dist/daemon/server.js +2010 -0
  87. package/dist/daemon/server.js.map +1 -0
  88. package/dist/daemon/tag-scanner/anthropic-client.js +40 -0
  89. package/dist/daemon/tag-scanner/anthropic-client.js.map +1 -0
  90. package/dist/daemon/tag-scanner/autopilot.js +131 -0
  91. package/dist/daemon/tag-scanner/autopilot.js.map +1 -0
  92. package/dist/daemon/tag-scanner/claude-cli-driver.js +250 -0
  93. package/dist/daemon/tag-scanner/claude-cli-driver.js.map +1 -0
  94. package/dist/daemon/tag-scanner/orchestrator.js +88 -0
  95. package/dist/daemon/tag-scanner/orchestrator.js.map +1 -0
  96. package/dist/daemon/tag-scanner/prompt.js +46 -0
  97. package/dist/daemon/tag-scanner/prompt.js.map +1 -0
  98. package/dist/daemon/tag-scanner/prompt.test.js +48 -0
  99. package/dist/daemon/tag-scanner/prompt.test.js.map +1 -0
  100. package/dist/daemon/tag-scanner/scan-state.js +49 -0
  101. package/dist/daemon/tag-scanner/scan-state.js.map +1 -0
  102. package/dist/daemon/tag-scanner/session-fetcher.js +82 -0
  103. package/dist/daemon/tag-scanner/session-fetcher.js.map +1 -0
  104. package/dist/daemon/tag-scanner/session-fetcher.test.js +34 -0
  105. package/dist/daemon/tag-scanner/session-fetcher.test.js.map +1 -0
  106. package/dist/daemon/tag-scanner/validator.js +50 -0
  107. package/dist/daemon/tag-scanner/validator.js.map +1 -0
  108. package/dist/daemon/tag-scanner/validator.test.js +41 -0
  109. package/dist/daemon/tag-scanner/validator.test.js.map +1 -0
  110. package/dist/daemon/terminal-registry.js +443 -0
  111. package/dist/daemon/terminal-registry.js.map +1 -0
  112. package/dist/daemon/ui.js +64 -0
  113. package/dist/daemon/ui.js.map +1 -0
  114. package/dist/daemon/watcher.js +256 -0
  115. package/dist/daemon/watcher.js.map +1 -0
  116. package/dist/db/client.js +22 -0
  117. package/dist/db/client.js.map +1 -0
  118. package/dist/db/schema.js +496 -0
  119. package/dist/db/schema.js.map +1 -0
  120. package/dist/license/api-base.js +13 -0
  121. package/dist/license/api-base.js.map +1 -0
  122. package/dist/license/manager.js +43 -0
  123. package/dist/license/manager.js.map +1 -0
  124. package/dist/license/public-key.js +19 -0
  125. package/dist/license/public-key.js.map +1 -0
  126. package/dist/license/storage.js +27 -0
  127. package/dist/license/storage.js.map +1 -0
  128. package/dist/license/verify.js +23 -0
  129. package/dist/license/verify.js.map +1 -0
  130. package/dist/mcp/audit.js +126 -0
  131. package/dist/mcp/audit.js.map +1 -0
  132. package/dist/mcp/prompts.js +180 -0
  133. package/dist/mcp/prompts.js.map +1 -0
  134. package/dist/mcp/server.js +502 -0
  135. package/dist/mcp/server.js.map +1 -0
  136. package/dist/mcp/thread-tools.js +363 -0
  137. package/dist/mcp/thread-tools.js.map +1 -0
  138. package/dist/mcp/write-tools.js +239 -0
  139. package/dist/mcp/write-tools.js.map +1 -0
  140. package/dist/parser/jsonl.js +150 -0
  141. package/dist/parser/jsonl.js.map +1 -0
  142. package/dist/semantic/chunker.js +47 -0
  143. package/dist/semantic/chunker.js.map +1 -0
  144. package/dist/semantic/config.js +74 -0
  145. package/dist/semantic/config.js.map +1 -0
  146. package/dist/semantic/embedder.js +54 -0
  147. package/dist/semantic/embedder.js.map +1 -0
  148. package/dist/semantic/fusion.js +38 -0
  149. package/dist/semantic/fusion.js.map +1 -0
  150. package/dist/semantic/model-download.js +69 -0
  151. package/dist/semantic/model-download.js.map +1 -0
  152. package/dist/semantic/pipeline.js +375 -0
  153. package/dist/semantic/pipeline.js.map +1 -0
  154. package/dist/semantic/query.js +42 -0
  155. package/dist/semantic/query.js.map +1 -0
  156. package/dist/semantic/worker.js +78 -0
  157. package/dist/semantic/worker.js.map +1 -0
  158. package/dist/stats/backfill.js +151 -0
  159. package/dist/stats/backfill.js.map +1 -0
  160. package/dist/stats/health.js +102 -0
  161. package/dist/stats/health.js.map +1 -0
  162. package/dist/stats/query.js +385 -0
  163. package/dist/stats/query.js.map +1 -0
  164. package/dist/utils/aliases.js +107 -0
  165. package/dist/utils/aliases.js.map +1 -0
  166. package/dist/utils/autoCollections.js +635 -0
  167. package/dist/utils/autoCollections.js.map +1 -0
  168. package/dist/utils/autoTitle.js +348 -0
  169. package/dist/utils/autoTitle.js.map +1 -0
  170. package/dist/utils/collections.js +446 -0
  171. package/dist/utils/collections.js.map +1 -0
  172. package/dist/utils/format.js +46 -0
  173. package/dist/utils/format.js.map +1 -0
  174. package/dist/utils/notes.js +270 -0
  175. package/dist/utils/notes.js.map +1 -0
  176. package/dist/utils/paths.js +50 -0
  177. package/dist/utils/paths.js.map +1 -0
  178. package/dist/utils/pricing.js +257 -0
  179. package/dist/utils/pricing.js.map +1 -0
  180. package/dist/utils/secret-scanner.js +166 -0
  181. package/dist/utils/secret-scanner.js.map +1 -0
  182. package/dist/utils/sessionLabel.js +64 -0
  183. package/dist/utils/sessionLabel.js.map +1 -0
  184. package/dist/utils/tags.js +97 -0
  185. package/dist/utils/tags.js.map +1 -0
  186. package/dist/utils/thread-context.js +129 -0
  187. package/dist/utils/thread-context.js.map +1 -0
  188. package/dist/utils/threadFilter.js +18 -0
  189. package/dist/utils/threadFilter.js.map +1 -0
  190. package/dist/utils/threads-titler.js +298 -0
  191. package/dist/utils/threads-titler.js.map +1 -0
  192. package/dist/utils/threads.js +383 -0
  193. package/dist/utils/threads.js.map +1 -0
  194. package/dist/utils/usage.js +76 -0
  195. package/dist/utils/usage.js.map +1 -0
  196. package/dist/verification/compute.js +88 -0
  197. package/dist/verification/compute.js.map +1 -0
  198. package/dist/verification/config.js +34 -0
  199. package/dist/verification/config.js.map +1 -0
  200. package/dist/web/assets/index-CIr6J4Fw.js +1201 -0
  201. package/dist/web/assets/index-Ctc8g9Jw.css +1 -0
  202. package/dist/web/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
  203. package/dist/web/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
  204. package/dist/web/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
  205. package/dist/web/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
  206. package/dist/web/assets/inter-cyrillic-600-normal-4D_pXhcN.woff +0 -0
  207. package/dist/web/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
  208. package/dist/web/assets/inter-cyrillic-700-normal-CjBOestx.woff2 +0 -0
  209. package/dist/web/assets/inter-cyrillic-700-normal-DrXBdSj3.woff +0 -0
  210. package/dist/web/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
  211. package/dist/web/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
  212. package/dist/web/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
  213. package/dist/web/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
  214. package/dist/web/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff +0 -0
  215. package/dist/web/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
  216. package/dist/web/assets/inter-cyrillic-ext-700-normal-BjwYoWNd.woff2 +0 -0
  217. package/dist/web/assets/inter-cyrillic-ext-700-normal-LO58E6JB.woff +0 -0
  218. package/dist/web/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
  219. package/dist/web/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
  220. package/dist/web/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
  221. package/dist/web/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
  222. package/dist/web/assets/inter-greek-600-normal-BZpKdvQh.woff +0 -0
  223. package/dist/web/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
  224. package/dist/web/assets/inter-greek-700-normal-BUv2fZ6O.woff +0 -0
  225. package/dist/web/assets/inter-greek-700-normal-C3JjAnD8.woff2 +0 -0
  226. package/dist/web/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
  227. package/dist/web/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
  228. package/dist/web/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
  229. package/dist/web/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
  230. package/dist/web/assets/inter-greek-ext-600-normal-B8X0CLgF.woff +0 -0
  231. package/dist/web/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
  232. package/dist/web/assets/inter-greek-ext-700-normal-BoQ6DsYi.woff +0 -0
  233. package/dist/web/assets/inter-greek-ext-700-normal-qfdV9bQt.woff2 +0 -0
  234. package/dist/web/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
  235. package/dist/web/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
  236. package/dist/web/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
  237. package/dist/web/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
  238. package/dist/web/assets/inter-latin-600-normal-CiBQ2DWP.woff +0 -0
  239. package/dist/web/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
  240. package/dist/web/assets/inter-latin-700-normal-BLAVimhd.woff +0 -0
  241. package/dist/web/assets/inter-latin-700-normal-Yt3aPRUw.woff2 +0 -0
  242. package/dist/web/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
  243. package/dist/web/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
  244. package/dist/web/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
  245. package/dist/web/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
  246. package/dist/web/assets/inter-latin-ext-600-normal-CIVaiw4L.woff +0 -0
  247. package/dist/web/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
  248. package/dist/web/assets/inter-latin-ext-700-normal-Ca8adRJv.woff2 +0 -0
  249. package/dist/web/assets/inter-latin-ext-700-normal-TidjK2hL.woff +0 -0
  250. package/dist/web/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
  251. package/dist/web/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
  252. package/dist/web/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
  253. package/dist/web/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
  254. package/dist/web/assets/inter-vietnamese-600-normal-BuLX-rYi.woff +0 -0
  255. package/dist/web/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
  256. package/dist/web/assets/inter-vietnamese-700-normal-BZaoP0fm.woff +0 -0
  257. package/dist/web/assets/inter-vietnamese-700-normal-DlLaEgI2.woff2 +0 -0
  258. package/dist/web/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
  259. package/dist/web/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
  260. package/dist/web/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
  261. package/dist/web/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
  262. package/dist/web/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
  263. package/dist/web/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
  264. package/dist/web/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
  265. package/dist/web/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
  266. package/dist/web/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  267. package/dist/web/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  268. package/dist/web/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  269. package/dist/web/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
  270. package/dist/web/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  271. package/dist/web/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
  272. package/dist/web/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
  273. package/dist/web/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
  274. package/dist/web/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
  275. package/dist/web/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
  276. package/dist/web/favicon.svg +9 -0
  277. package/dist/web/index.html +15 -0
  278. package/package.json +80 -9
  279. package/bin/cli.js +0 -12
package/dist/cli.js ADDED
@@ -0,0 +1,362 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'module';
3
+ import { Command } from 'commander';
4
+ const _require = createRequire(import.meta.url);
5
+ const CLI_VERSION = _require('../package.json').version;
6
+ import { runIndex } from './commands/index.js';
7
+ import { runList } from './commands/list.js';
8
+ import { runShow } from './commands/show.js';
9
+ import { runSearch } from './commands/search.js';
10
+ import { runStatus } from './commands/status.js';
11
+ import { runProjects } from './commands/projects.js';
12
+ import { runStart } from './commands/start.js';
13
+ import { runStop } from './commands/stop.js';
14
+ import { runOpen } from './commands/open.js';
15
+ import { runContext } from './commands/context.js';
16
+ import { runMcp } from './commands/mcp.js';
17
+ import { runPaste } from './commands/paste.js';
18
+ import { runAuditSecrets } from './commands/audit-secrets.js';
19
+ import { runSemantic } from './commands/semantic.js';
20
+ import { runStats } from './commands/stats.js';
21
+ import { runCorrelate } from './commands/correlate.js';
22
+ import { runBlame } from './commands/blame.js';
23
+ import { runDigest } from './commands/digest.js';
24
+ import { runInstallExtension } from './commands/install-extension.js';
25
+ import { runHealth } from './commands/health.js';
26
+ import { runInstalls } from './commands/installs.js';
27
+ import { runConfigVerification } from './commands/config-verification.js';
28
+ import { runActivate } from './commands/activate.js';
29
+ import { runLicenseStatus, runLicenseDeactivate } from './commands/license.js';
30
+ import { runThreadArchive, runThreadClose, runThreadLink, runThreadList, runThreadMerge, runThreadNew, runThreadRename, runThreadReopen, runThreadSetParent, runThreadShow, runThreadSplit, runThreadUnlink, } from './commands/thread.js';
31
+ const program = new Command();
32
+ program
33
+ .name('recall')
34
+ .description('Never lose a Claude Code session again. Local, fast, searchable memory over every session you have ever run.')
35
+ .version(CLI_VERSION);
36
+ program
37
+ .command('index')
38
+ .description('Scan ~/.claude/projects/ and build the searchable database')
39
+ .option('-f, --force', 'reindex all files even if unchanged')
40
+ .option('-v, --verbose', 'show each file as it is processed')
41
+ .action(async (opts) => {
42
+ await runIndex(opts);
43
+ });
44
+ program
45
+ .command('list')
46
+ .description('List indexed sessions (most recent first)')
47
+ .option('-p, --project <name>', 'filter by project name substring')
48
+ .option('-n, --limit <n>', 'max rows to show', '30')
49
+ .option('-a, --all', 'include short / probing sessions (<=2 messages)')
50
+ .action((opts) => {
51
+ runList(opts);
52
+ });
53
+ program
54
+ .command('show <id>')
55
+ .description('Render a full session transcript (accepts session id or 8-char prefix)')
56
+ .option('-r, --raw', 'print raw JSONL lines instead of pretty output')
57
+ .option('-n, --limit <n>', 'max messages to show')
58
+ .option('--no-pager', 'do not auto-pipe long output through less')
59
+ .action((id, opts) => {
60
+ runShow(id, opts);
61
+ });
62
+ program
63
+ .command('search <query...>')
64
+ .description('Full-text search across every message in every session')
65
+ .option('-p, --project <name>', 'restrict results to one project')
66
+ .option('-n, --limit <n>', 'max results', '20')
67
+ .action(async (queryTerms, opts) => {
68
+ await runSearch(queryTerms.join(' '), opts);
69
+ });
70
+ program
71
+ .command('projects')
72
+ .description('List all projects with session counts')
73
+ .action(() => {
74
+ runProjects();
75
+ });
76
+ program
77
+ .command('status')
78
+ .description('Show database + daemon stats')
79
+ .action(() => {
80
+ runStatus();
81
+ });
82
+ program
83
+ .command('start')
84
+ .description('Start the background daemon (file watcher + local HTTP server)')
85
+ .action(async () => {
86
+ await runStart();
87
+ });
88
+ program
89
+ .command('stop')
90
+ .description('Stop the background daemon')
91
+ .action(async () => {
92
+ await runStop();
93
+ });
94
+ program
95
+ .command('open')
96
+ .description('Open the web UI in your browser (starts the daemon if needed)')
97
+ .action(async () => {
98
+ await runOpen();
99
+ });
100
+ program
101
+ .command('context <id>')
102
+ .description('Print a past session as markdown, ready to pipe into `claude` or `pbcopy`. Condensed by default.')
103
+ .option('-f, --full', 'include tool call JSON and tool result bodies (much longer output)')
104
+ .option('--since <when>', 'only include messages at or after this time: 2h | 30m | 1d | YYYY-MM-DD | ISO')
105
+ .option('--subagents', 'also include subagent/sidechain messages (hidden by default)')
106
+ .option('--prelude <text>', 'prepend a custom header (e.g. "I am continuing this conversation")')
107
+ .action(async (id, opts) => {
108
+ await runContext(id, opts);
109
+ });
110
+ program
111
+ .command('mcp')
112
+ .description('Run the Model Context Protocol server over stdio. Use this as the command in a Claude Desktop / Claude Code MCP config entry.')
113
+ .option('--allow-writes', 'enable bidirectional write tools (add_tag, set_alias, append_note, create_collection, …). Off by default; rate-limited and audited.')
114
+ .action(async (opts) => {
115
+ await runMcp({ allowWrites: Boolean(opts.allowWrites) });
116
+ });
117
+ program
118
+ .command('paste')
119
+ .description('Archive clipboard content (or stdin) into Recall. Opt-in. Secret patterns are blocked by default; use --force to override.')
120
+ .option('-l, --list', 'list archived pastes')
121
+ .option('--purge <id>', 'permanently delete one archived paste (by id or 8-char prefix)')
122
+ .option('-f, --force', 'skip secret-scan confirmation')
123
+ .option('--pipe', 'echo content to stdout after archiving (for use in pipelines)')
124
+ .option('--dry-run', 'preview what would be archived without writing anything')
125
+ .option('--label <text>', 'short description for `recall paste --list`')
126
+ .action(async (opts) => {
127
+ await runPaste(opts);
128
+ });
129
+ program
130
+ .command('audit-secrets')
131
+ .description('Scan the existing Recall database for any secrets that escaped ingest-time redaction. Read-only by default; pass --redact to scrub in place.')
132
+ .option('--redact', 'rewrite offending rows in place (non-destructive: source JSONLs untouched)')
133
+ .option('-v, --verbose', 'print every session/message that contains a hit')
134
+ .action(async (opts) => {
135
+ await runAuditSecrets(opts);
136
+ });
137
+ program
138
+ .command('semantic [action]')
139
+ .description('Semantic search. Actions: on | off | status | backfill | pause | resume | install | uninstall | reindex. Default: status.')
140
+ .option('-n, --limit <n>', 'max sessions to process during backfill', '1000')
141
+ .option('-f, --force', 'regenerate summaries even when one already exists')
142
+ .option('--rate <perMin>', 'rate limit when enabling (sessions/minute)')
143
+ .option('--model <name>', 'claude model to use (e.g. claude-haiku-4-5-20251001)')
144
+ .action(async (action, opts) => {
145
+ await runSemantic(action, opts);
146
+ });
147
+ program
148
+ .command('similar <session-id>')
149
+ .description('Find sessions similar to the given session (Pro, requires vector model)')
150
+ .option('-n, --limit <n>', 'max results', '10')
151
+ .action(async (sessionId, opts) => {
152
+ const { requireProOrExit } = await import('./license/manager.js');
153
+ await requireProOrExit('Similar sessions');
154
+ const { isModelInstalled } = await import('./semantic/model-download.js');
155
+ const { loadEmbedder, getEmbedderStatus } = await import('./semantic/embedder.js');
156
+ const { findSimilarSessions } = await import('./semantic/query.js');
157
+ if (!isModelInstalled()) {
158
+ console.error('Model not installed. Run `recall semantic install` first.');
159
+ process.exitCode = 1;
160
+ return;
161
+ }
162
+ if (!getEmbedderStatus().loaded)
163
+ await loadEmbedder();
164
+ const limit = Math.max(1, Math.min(50, Number(opts.limit ?? 10)));
165
+ const results = await findSimilarSessions(sessionId, limit);
166
+ if (results.length === 0) {
167
+ console.log('No similar sessions found.');
168
+ return;
169
+ }
170
+ for (const r of results) {
171
+ console.log(` ${r.sessionId} similarity=${r.similarity.toFixed(3)}`);
172
+ }
173
+ });
174
+ program
175
+ .command('stats [id]')
176
+ .description('Cost / token analytics (v0.10a). With no args: overview. With --project <name>: per-project. With a session id or prefix: per-session. Use --backfill to populate usage for already-indexed messages.')
177
+ .option('-p, --project <name>', 'show stats for a single project')
178
+ .option('-d, --days <n>', 'restrict overview to last N days (7 or 30)')
179
+ .option('--backfill', 'extract message.usage from existing raw_json (safe to rerun)')
180
+ .option('-n, --limit <n>', 'max messages to scan during backfill')
181
+ .option('--json', 'emit JSON instead of a formatted table')
182
+ .action(async (id, opts) => {
183
+ await runStats(id, opts);
184
+ });
185
+ program
186
+ .command('installs')
187
+ .description('Show install and download metrics across npm and VS Code Marketplace.')
188
+ .option('--json', 'emit JSON instead of formatted output')
189
+ .action(async (opts) => {
190
+ await runInstalls(opts);
191
+ });
192
+ program
193
+ .command('correlate [id]')
194
+ .description('Git correlation (v0.10b). Without args: correlate every session with a cwd. With a session id or prefix: correlate one. Read-only — only runs `git log` scoped to the session\'s cwd.')
195
+ .option('-n, --limit <n>', 'max sessions to process in batch mode')
196
+ .option('--json', 'emit JSON instead of formatted output')
197
+ .action(async (id, opts) => {
198
+ await runCorrelate(id, opts);
199
+ });
200
+ program
201
+ .command('blame <sha>')
202
+ .description('Reverse git correlation (v0.10b). Print the Claude Code session(s) authored during the commit\'s window.')
203
+ .option('--json', 'emit JSON instead of formatted output')
204
+ .action(async (sha, opts) => {
205
+ await runBlame(sha, opts);
206
+ });
207
+ program
208
+ .command('digest')
209
+ .description('Rediscovery surface (v0.12b). Prints today\'s "For you" picks — a rediscovered older session, the most expensive 7-day session, and the session that authored the current HEAD.')
210
+ .option('--json', 'emit JSON instead of formatted output')
211
+ .action(async (opts) => {
212
+ await runDigest(opts);
213
+ });
214
+ program
215
+ .command('install-extension')
216
+ .description('Sideload the bundled Claude Recall VS Code extension into detected editor CLIs (code, cursor, code-insiders, windsurf). Bridge until the Marketplace listing ships.')
217
+ .option('--editor <name>', 'install only into the specified editor (code | cursor | code-insiders | windsurf)')
218
+ .option('--print-path', 'print the absolute path to the bundled .vsix and exit')
219
+ .action(async (opts) => {
220
+ await runInstallExtension(opts);
221
+ });
222
+ program
223
+ .command('health [project]')
224
+ .description('Show memory health scores for all projects (worst first) or a single project breakdown.')
225
+ .option('--json', 'emit JSON instead of formatted output')
226
+ .action((project, opts) => {
227
+ runHealth(project, opts);
228
+ });
229
+ program
230
+ .command('verify [action]')
231
+ .description('Verification badges (opt-in preview). Actions: on | off | status. Default: status.')
232
+ .action((action) => {
233
+ runConfigVerification(action);
234
+ });
235
+ program
236
+ .command('activate <license-key>')
237
+ .description('Activate a Claude Recall Pro license. Run once after purchase to unlock Pro features.')
238
+ .action(async (key) => {
239
+ await runActivate(key);
240
+ });
241
+ const license = program
242
+ .command('license')
243
+ .description('Show or remove the activated Pro license on this machine.');
244
+ license
245
+ .command('status', { isDefault: true })
246
+ .description('Show the current license tier (default).')
247
+ .action(async () => {
248
+ await runLicenseStatus();
249
+ });
250
+ license
251
+ .command('deactivate')
252
+ .description('Remove the stored license from this machine. Reverses `recall activate`.')
253
+ .action(() => {
254
+ runLicenseDeactivate();
255
+ });
256
+ const thread = program
257
+ .command('thread')
258
+ .description('Manage threads — intent-grouped clusters of origin + child sessions (v0.15a).');
259
+ thread
260
+ .command('list')
261
+ .description('List threads (most recent first)')
262
+ .option('--archived', 'include archived threads')
263
+ .option('--json', 'emit JSON instead of a table')
264
+ .action((opts) => {
265
+ runThreadList(opts);
266
+ });
267
+ thread
268
+ .command('show <id-prefix>')
269
+ .description('Show thread header and session tree')
270
+ .option('--json', 'emit JSON instead of formatted output')
271
+ .action((id, opts) => {
272
+ runThreadShow(id, opts);
273
+ });
274
+ thread
275
+ .command('new <name>')
276
+ .description('Create a new thread')
277
+ .option('--origin <session-id>', 'seed with an origin session')
278
+ .option('--summary <text>', 'optional short summary')
279
+ .option('--json', 'emit JSON')
280
+ .action((name, opts) => {
281
+ runThreadNew(name, opts);
282
+ });
283
+ thread
284
+ .command('link <session-id>')
285
+ .description('Link a session into a thread')
286
+ .requiredOption('--thread <id-prefix>', 'thread id or prefix')
287
+ .option('--parent <session-id>', 'parent session within the thread')
288
+ .option('--role <role>', 'origin | child (default inferred from --parent)')
289
+ .option('--json', 'emit JSON')
290
+ .action((sid, opts) => {
291
+ runThreadLink(sid, opts);
292
+ });
293
+ thread
294
+ .command('unlink <session-id>')
295
+ .description('Remove a session from a thread')
296
+ .requiredOption('--thread <id-prefix>', 'thread id or prefix')
297
+ .option('--json', 'emit JSON')
298
+ .action((sid, opts) => {
299
+ runThreadUnlink(sid, opts);
300
+ });
301
+ thread
302
+ .command('set-parent <session-id>')
303
+ .description('Change a session\'s parent within a thread (use --parent none to promote to origin)')
304
+ .requiredOption('--thread <id-prefix>', 'thread id or prefix')
305
+ .option('--parent <session-id|none>', 'new parent, or "none" to promote to origin')
306
+ .option('--json', 'emit JSON')
307
+ .action((sid, opts) => {
308
+ runThreadSetParent(sid, opts);
309
+ });
310
+ thread
311
+ .command('rename <id-prefix> <new-name>')
312
+ .description('Rename a thread')
313
+ .option('--json', 'emit JSON')
314
+ .action((id, name, opts) => {
315
+ runThreadRename(id, name, opts);
316
+ });
317
+ thread
318
+ .command('close <id-prefix>')
319
+ .description('Mark a thread as closed (work complete)')
320
+ .option('--json', 'emit JSON')
321
+ .action((id, opts) => {
322
+ runThreadClose(id, opts);
323
+ });
324
+ thread
325
+ .command('reopen <id-prefix>')
326
+ .description('Reopen a closed thread')
327
+ .option('--json', 'emit JSON')
328
+ .action((id, opts) => {
329
+ runThreadReopen(id, opts);
330
+ });
331
+ thread
332
+ .command('archive <id-prefix>')
333
+ .description('Archive a thread (hidden from default list)')
334
+ .option('--json', 'emit JSON')
335
+ .action((id, opts) => {
336
+ runThreadArchive(id, opts);
337
+ });
338
+ thread
339
+ .command('merge <source-id-prefix>')
340
+ .description('Merge one thread into another')
341
+ .requiredOption('--into <id-prefix>', 'destination thread')
342
+ .option('--json', 'emit JSON')
343
+ .action((sid, opts) => {
344
+ runThreadMerge(sid, opts);
345
+ });
346
+ thread
347
+ .command('split <id-prefix>')
348
+ .description('Split sessions out of a thread into a new thread')
349
+ .requiredOption('--sessions <s1,s2,...>', 'comma-separated session ids or prefixes')
350
+ .requiredOption('--name <new-name>', 'name for the new thread')
351
+ .option('--json', 'emit JSON')
352
+ .action((id, opts) => {
353
+ runThreadSplit(id, opts);
354
+ });
355
+ if (process.env.CLAUDECODE) {
356
+ process.stderr.write('<claude-code-hint v="1" type="plugin" value="claude-recall@claude-plugins-official" />\n');
357
+ }
358
+ program.parseAsync(process.argv).catch((err) => {
359
+ console.error(err);
360
+ process.exit(1);
361
+ });
362
+ //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,yCAAyC,CAAC;KACnF,cAAc,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;KAC9D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC;KAC7B,MAAM,CAAC,CAAC,EAAU,EAAE,IAAI,EAAE,EAAE;IAC3B,cAAc,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEL,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;IAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,0FAA0F,CAC3F,CAAC;AACJ,CAAC;AAED,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IAC7C,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,69 @@
1
+ import { hostname } from 'node:os';
2
+ import { randomBytes } from 'node:crypto';
3
+ import { c } from '../utils/format.js';
4
+ import { apiBase } from '../license/api-base.js';
5
+ import { verifyLicenseJwt } from '../license/verify.js';
6
+ import { writeStoredLicense } from '../license/storage.js';
7
+ export async function runActivate(licenseKey) {
8
+ const trimmed = licenseKey.trim();
9
+ if (trimmed.length < 8) {
10
+ console.error(c.warn('License key looks too short. Paste the full key from your purchase email.'));
11
+ process.exit(1);
12
+ }
13
+ const instanceName = `${hostname()}-${randomBytes(4).toString('hex')}`;
14
+ const url = `${apiBase()}/api/license/activate`;
15
+ let response;
16
+ try {
17
+ response = await fetch(url, {
18
+ method: 'POST',
19
+ headers: { 'Content-Type': 'application/json' },
20
+ body: JSON.stringify({ license_key: trimmed, instance_name: instanceName }),
21
+ });
22
+ }
23
+ catch (err) {
24
+ const message = err instanceof Error ? err.message : 'unknown error';
25
+ console.error(c.warn(`Could not reach activation server at ${url}: ${message}`));
26
+ console.error(c.dim('If you are offline, try again when you have a connection.'));
27
+ process.exit(1);
28
+ }
29
+ let body;
30
+ try {
31
+ body = (await response.json());
32
+ }
33
+ catch {
34
+ console.error(c.warn(`Activation server returned invalid JSON (status ${response.status}).`));
35
+ process.exit(1);
36
+ }
37
+ if (response.status !== 200 || !body.license_jwt) {
38
+ const msg = body.error ?? `activation failed (status ${response.status})`;
39
+ console.error(c.warn(`Activation refused: ${msg}`));
40
+ process.exit(1);
41
+ }
42
+ const verified = await verifyLicenseJwt(body.license_jwt);
43
+ if (!verified.valid || !verified.claims) {
44
+ console.error(c.warn(`Server returned a JWT that fails local verification: ${verified.reason ?? 'unknown'}`));
45
+ console.error(c.dim('This usually means the CLI is older than the server, or the public key was rotated.'));
46
+ process.exit(1);
47
+ }
48
+ writeStoredLicense({
49
+ license_jwt: body.license_jwt,
50
+ license_key: trimmed,
51
+ key_short: body.key_short ?? verified.claims.key_short,
52
+ customer_email: body.customer_email ?? verified.claims.email,
53
+ activated_at: new Date().toISOString(),
54
+ tier: 'pro',
55
+ test_mode: Boolean(verified.claims.test_mode),
56
+ });
57
+ console.log();
58
+ console.log(c.bold('Activated.'));
59
+ console.log(` ${c.dim('Tier:')} Pro`);
60
+ console.log(` ${c.dim('Key:')} ${body.key_short ?? verified.claims.key_short}`);
61
+ console.log(` ${c.dim('Email:')} ${body.customer_email ?? verified.claims.email}`);
62
+ if (verified.claims.test_mode) {
63
+ console.log(` ${c.warn('Test mode:')} this license was issued in LemonSqueezy test mode.`);
64
+ }
65
+ console.log();
66
+ console.log(c.dim('Pro features (search, context, MCP, semantic, advanced UI) are now unlocked.'));
67
+ console.log();
68
+ }
69
+ //# sourceMappingURL=activate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activate.js","sourceRoot":"","sources":["../../src/commands/activate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,C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slipped through past ingest. Useful for confirming that a `--force`
4
+ * reindex actually scrubbed everything, and for seeing where the old
5
+ * cleartext currently lives before you reindex.
6
+ *
7
+ * Read-only by default. Pass --redact to rewrite the offending rows in
8
+ * place (updates content_text, raw_json, and first_user_message).
9
+ */
10
+ import { getDb } from '../db/client.js';
11
+ import { scanForSecrets, redactSecrets } from '../utils/secret-scanner.js';
12
+ import { c } from '../utils/format.js';
13
+ export async function runAuditSecrets(options) {
14
+ const db = getDb();
15
+ const stats = new Map();
16
+ let rowsScanned = 0;
17
+ let rowsWithSecrets = 0;
18
+ let rowsRedacted = 0;
19
+ const affectedSessions = new Set();
20
+ const rows = db
21
+ .prepare(`SELECT uuid, session_id, content_text, raw_json
22
+ FROM messages
23
+ WHERE content_text IS NOT NULL`)
24
+ .all();
25
+ const updateStmt = db.prepare(`UPDATE messages SET content_text = ?, raw_json = ? WHERE uuid = ?`);
26
+ const tally = (text, sessionId) => {
27
+ const matches = scanForSecrets(text);
28
+ if (matches.length === 0)
29
+ return false;
30
+ for (const m of matches) {
31
+ const s = stats.get(m.pattern) ?? {
32
+ pattern: m.pattern,
33
+ severity: m.severity,
34
+ hits: 0,
35
+ sessions: new Set(),
36
+ };
37
+ s.hits += 1;
38
+ s.sessions.add(sessionId);
39
+ stats.set(m.pattern, s);
40
+ }
41
+ return true;
42
+ };
43
+ process.stdout.write(c.dim(`Scanning ${rows.length.toLocaleString()} messages…\n`));
44
+ for (const r of rows) {
45
+ rowsScanned += 1;
46
+ const hit = tally(r.content_text ?? '', r.session_id) ||
47
+ tally(r.raw_json ?? '', r.session_id);
48
+ if (hit) {
49
+ rowsWithSecrets += 1;
50
+ affectedSessions.add(r.session_id);
51
+ if (options.verbose) {
52
+ process.stderr.write(c.dim(` hit in session ${r.session_id.slice(0, 8)} message ${r.uuid.slice(0, 8)}\n`));
53
+ }
54
+ if (options.redact) {
55
+ const safeContent = redactSecrets(r.content_text ?? '').redacted;
56
+ const safeRaw = r.raw_json ? redactSecrets(r.raw_json).redacted : null;
57
+ updateStmt.run(safeContent, safeRaw, r.uuid);
58
+ rowsRedacted += 1;
59
+ }
60
+ }
61
+ }
62
+ // Also scan first_user_message — that's what shows up in the list view.
63
+ const sessRows = db
64
+ .prepare(`SELECT id, first_user_message FROM sessions
65
+ WHERE first_user_message IS NOT NULL`)
66
+ .all();
67
+ const updateSess = db.prepare('UPDATE sessions SET first_user_message = ? WHERE id = ?');
68
+ let sessionPreviewsRedacted = 0;
69
+ for (const s of sessRows) {
70
+ if (scanForSecrets(s.first_user_message).length > 0) {
71
+ affectedSessions.add(s.id);
72
+ if (options.redact) {
73
+ updateSess.run(redactSecrets(s.first_user_message).redacted, s.id);
74
+ sessionPreviewsRedacted += 1;
75
+ }
76
+ }
77
+ }
78
+ // Report
79
+ process.stdout.write('\n');
80
+ if (stats.size === 0) {
81
+ process.stdout.write(c.ok(`✓ clean — no secrets detected across ${rowsScanned.toLocaleString()} messages.\n`));
82
+ return;
83
+ }
84
+ const sorted = [...stats.values()].sort((a, b) => b.hits - a.hits);
85
+ process.stdout.write(c.warn(`⚠ ${rowsWithSecrets.toLocaleString()} message${rowsWithSecrets === 1 ? '' : 's'} ` +
86
+ `across ${affectedSessions.size.toLocaleString()} session${affectedSessions.size === 1 ? '' : 's'} ` +
87
+ `contain detected secrets.\n\n`));
88
+ process.stdout.write(c.bold(' Pattern Hits Sessions\n'));
89
+ process.stdout.write(c.dim(' ──────────────────────────────────────────────\n'));
90
+ for (const s of sorted) {
91
+ const badge = s.severity === 'high' ? c.err('●') : c.warn('●');
92
+ process.stdout.write(` ${badge} ${s.pattern.padEnd(30)} ${String(s.hits).padStart(5)} ${String(s.sessions.size).padStart(4)}\n`);
93
+ }
94
+ process.stdout.write('\n');
95
+ if (options.redact) {
96
+ process.stdout.write(c.ok(`✓ redacted in place: ${rowsRedacted.toLocaleString()} messages, ${sessionPreviewsRedacted.toLocaleString()} session previews.\n`));
97
+ process.stdout.write(c.dim(' (The source JSONL files at ~/.claude/projects/ were not modified.)\n'));
98
+ }
99
+ else {
100
+ process.stdout.write(c.dim(' Rerun with --redact to scrub these in place, or run `recall index --force`.\n'));
101
+ }
102
+ }
103
+ //# sourceMappingURL=audit-secrets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-secrets.js","sourceRoot":"","sources":["../../src/commands/audit-secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAcvC,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAAqB;IACzD,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IACnB,MAAM,KAAK,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC7C,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,IAAI,eAAe,GAAG,CAAC,CAAC;IACxB,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAU,CAAC;IAE3C,MAAM,IAAI,GAAG,EAAE;SACZ,OAAO,CACN;;sCAEgC,CACjC;SACA,GAAG,EAKF,CAAC;IAEL,MAAM,UAAU,GAAG,EAAE,CAAC,OAAO,CAC3B,mEAAmE,CACpE,CAAC;IAEF,MAAM,KAAK,GAAG,CAAC,IAAY,EAAE,SAAiB,EAAE,EAAE;QAChD,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QACvC,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;YACxB,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI;gBAChC,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,QAAQ,EAA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CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE3B,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,CAAC,CAAC,EAAE,CACF,wBAAwB,YAAY,CAAC,cAAc,EAAE,cAAc,uBAAuB,CAAC,cAAc,EAAE,sBAAsB,CAClI,CACF,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,CAAC,CAAC,GAAG,CACH,wEAAwE,CACzE,CACF,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,CAAC,CAAC,GAAG,CAAC,iFAAiF,CAAC,CACzF,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { c } from '../utils/format.js';
2
+ import { findSessionsByCommit } from '../daemon/git-correlator.js';
3
+ export async function runBlame(sha, options) {
4
+ const trimmed = sha.trim();
5
+ if (!/^[0-9a-fA-F]{4,40}$/.test(trimmed)) {
6
+ console.error(c.err(`not a valid commit SHA: '${sha}'`));
7
+ process.exit(1);
8
+ return;
9
+ }
10
+ const rows = findSessionsByCommit(trimmed);
11
+ if (options.json) {
12
+ console.log(JSON.stringify(rows, null, 2));
13
+ return;
14
+ }
15
+ if (rows.length === 0) {
16
+ console.log('');
17
+ console.log(c.dim(`no correlated sessions for ${trimmed}`));
18
+ console.log(c.dim(` (if you haven't yet, run \`recall correlate\` to backfill)`));
19
+ console.log('');
20
+ return;
21
+ }
22
+ console.log('');
23
+ console.log(`${c.bold('commit')} ${c.accent(rows[0].commitSha.slice(0, 12))} ${c.dim(rows[0].committedAt ?? '')}`);
24
+ if (rows[0].subject)
25
+ console.log(` ${rows[0].subject}`);
26
+ console.log('');
27
+ console.log(c.dim(`authored during ${rows.length} session${rows.length === 1 ? '' : 's'}:`));
28
+ for (const r of rows) {
29
+ const label = r.alias ?? r.sessionId.slice(0, 8);
30
+ console.log(` ${c.accent(label.padEnd(24))} ${c.dim((r.project ?? '').slice(0, 24).padEnd(26))} ${c.dim(r.startedAt ?? '')}`);
31
+ console.log(` ${c.dim(`recall show ${r.sessionId}`)}`);
32
+ }
33
+ console.log('');
34
+ }
35
+ //# sourceMappingURL=blame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blame.js","sourceRoot":"","sources":["../../src/commands/blame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAMnE,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,GAAW,EACX,OAAqB;IAErB,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACzC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,4BAA4B,GAAG,GAAG,CAAC,CAAC,CAAC;QACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChB,OAAO;IACT,CAAC;IACD,MAAM,IAAI,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC3C,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC3C,OAAO;IACT,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,8BAA8B,OAAO,EAAE,CAAC,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CACT,CAAC,CAAC,GAAG,CAAC,8DAA8D,CAAC,CACtE,CAAC;QACF,OAAO,CAAC,GAAG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AAC,EAAE,CAClH,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { isVerificationEnabled, setVerificationEnabled } from '../verification/config.js';
2
+ import { c } from '../utils/format.js';
3
+ export function runConfigVerification(action) {
4
+ if (action === 'on') {
5
+ setVerificationEnabled(true);
6
+ process.stdout.write(c.ok('Verification badges enabled.') + '\n');
7
+ return;
8
+ }
9
+ if (action === 'off') {
10
+ setVerificationEnabled(false);
11
+ process.stdout.write('Verification badges disabled.\n');
12
+ return;
13
+ }
14
+ const enabled = isVerificationEnabled();
15
+ process.stdout.write(`Verification badges: ${enabled ? c.ok('ON') : 'OFF'}\n`);
16
+ process.stdout.write(`\nToggle with: recall verify on | off\n`);
17
+ }
18
+ //# sourceMappingURL=config-verification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-verification.js","sourceRoot":"","sources":["../../src/commands/config-verification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAEvC,MAAM,UAAU,qBAAqB,CAAC,MAA0B;IAC9D,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,sBAAsB,CAAC,IAAI,CAAC,CAAC;QAC7B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,8BAA8B,CAAC,GAAG,IAAI,CAAC,CAAC;QAClE,OAAO;IACT,CAAC;IAED,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QACrB,sBAAsB,CAAC,KAAK,CAAC,CAAC;QAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACxD,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,wBAAwB,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;IAC/E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;AAClE,CAAC"}