onadit 0.0.1 → 0.1.0-beta.45

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 (1085) hide show
  1. package/README.dev.md +124 -0
  2. package/README.md +194 -2
  3. package/dist/src/auth/keychain.d.ts +42 -0
  4. package/dist/src/auth/keychain.d.ts.map +1 -0
  5. package/dist/src/auth/keychain.js +177 -0
  6. package/dist/src/auth/keychain.js.map +1 -0
  7. package/dist/src/auth/middleware.d.ts +21 -0
  8. package/dist/src/auth/middleware.d.ts.map +1 -0
  9. package/dist/src/auth/middleware.js +93 -0
  10. package/dist/src/auth/middleware.js.map +1 -0
  11. package/dist/src/auth/rate-limit.d.ts +16 -0
  12. package/dist/src/auth/rate-limit.d.ts.map +1 -0
  13. package/dist/src/auth/rate-limit.js +38 -0
  14. package/dist/src/auth/rate-limit.js.map +1 -0
  15. package/dist/src/auth/rotation.d.ts +67 -0
  16. package/dist/src/auth/rotation.d.ts.map +1 -0
  17. package/dist/src/auth/rotation.js +190 -0
  18. package/dist/src/auth/rotation.js.map +1 -0
  19. package/dist/src/backfill/project-context-batch-constructor.d.ts +127 -0
  20. package/dist/src/backfill/project-context-batch-constructor.d.ts.map +1 -0
  21. package/dist/src/backfill/project-context-batch-constructor.js +210 -0
  22. package/dist/src/backfill/project-context-batch-constructor.js.map +1 -0
  23. package/dist/src/capture/assistant-text-lookup.d.ts +31 -0
  24. package/dist/src/capture/assistant-text-lookup.d.ts.map +1 -0
  25. package/dist/src/capture/assistant-text-lookup.js +222 -0
  26. package/dist/src/capture/assistant-text-lookup.js.map +1 -0
  27. package/dist/src/capture/auto-capture.d.ts +322 -0
  28. package/dist/src/capture/auto-capture.d.ts.map +1 -0
  29. package/dist/src/capture/auto-capture.js +1167 -0
  30. package/dist/src/capture/auto-capture.js.map +1 -0
  31. package/dist/src/capture/auto-repair.d.ts +125 -0
  32. package/dist/src/capture/auto-repair.d.ts.map +1 -0
  33. package/dist/src/capture/auto-repair.js +280 -0
  34. package/dist/src/capture/auto-repair.js.map +1 -0
  35. package/dist/src/capture/batch-budget.d.ts +90 -0
  36. package/dist/src/capture/batch-budget.d.ts.map +1 -0
  37. package/dist/src/capture/batch-budget.js +148 -0
  38. package/dist/src/capture/batch-budget.js.map +1 -0
  39. package/dist/src/capture/claude-cli-triage-provider.d.ts +28 -0
  40. package/dist/src/capture/claude-cli-triage-provider.d.ts.map +1 -0
  41. package/dist/src/capture/claude-cli-triage-provider.js +101 -0
  42. package/dist/src/capture/claude-cli-triage-provider.js.map +1 -0
  43. package/dist/src/capture/codex-cli-triage-provider.d.ts +17 -0
  44. package/dist/src/capture/codex-cli-triage-provider.d.ts.map +1 -0
  45. package/dist/src/capture/codex-cli-triage-provider.js +91 -0
  46. package/dist/src/capture/codex-cli-triage-provider.js.map +1 -0
  47. package/dist/src/capture/cursor-capture.d.ts +89 -0
  48. package/dist/src/capture/cursor-capture.d.ts.map +1 -0
  49. package/dist/src/capture/cursor-capture.js +121 -0
  50. package/dist/src/capture/cursor-capture.js.map +1 -0
  51. package/dist/src/capture/observability.d.ts +131 -0
  52. package/dist/src/capture/observability.d.ts.map +1 -0
  53. package/dist/src/capture/observability.js +181 -0
  54. package/dist/src/capture/observability.js.map +1 -0
  55. package/dist/src/capture/openai-triage-provider.d.ts +92 -0
  56. package/dist/src/capture/openai-triage-provider.d.ts.map +1 -0
  57. package/dist/src/capture/openai-triage-provider.js +267 -0
  58. package/dist/src/capture/openai-triage-provider.js.map +1 -0
  59. package/dist/src/capture/recover-quarantine.d.ts +273 -0
  60. package/dist/src/capture/recover-quarantine.d.ts.map +1 -0
  61. package/dist/src/capture/recover-quarantine.js +581 -0
  62. package/dist/src/capture/recover-quarantine.js.map +1 -0
  63. package/dist/src/capture/review-queue-index.d.ts +51 -0
  64. package/dist/src/capture/review-queue-index.d.ts.map +1 -0
  65. package/dist/src/capture/review-queue-index.js +204 -0
  66. package/dist/src/capture/review-queue-index.js.map +1 -0
  67. package/dist/src/capture/review-queue.d.ts +47 -0
  68. package/dist/src/capture/review-queue.d.ts.map +1 -0
  69. package/dist/src/capture/review-queue.js +116 -0
  70. package/dist/src/capture/review-queue.js.map +1 -0
  71. package/dist/src/capture/sources.d.ts +53 -0
  72. package/dist/src/capture/sources.d.ts.map +1 -0
  73. package/dist/src/capture/sources.js +55 -0
  74. package/dist/src/capture/sources.js.map +1 -0
  75. package/dist/src/capture/stored-statements.d.ts +9 -0
  76. package/dist/src/capture/stored-statements.d.ts.map +1 -0
  77. package/dist/src/capture/stored-statements.js +63 -0
  78. package/dist/src/capture/stored-statements.js.map +1 -0
  79. package/dist/src/capture/triage-classification.d.ts +92 -0
  80. package/dist/src/capture/triage-classification.d.ts.map +1 -0
  81. package/dist/src/capture/triage-classification.js +94 -0
  82. package/dist/src/capture/triage-classification.js.map +1 -0
  83. package/dist/src/capture/triage-lane.d.ts +39 -0
  84. package/dist/src/capture/triage-lane.d.ts.map +1 -0
  85. package/dist/src/capture/triage-lane.js +217 -0
  86. package/dist/src/capture/triage-lane.js.map +1 -0
  87. package/dist/src/capture/triage-provider-factory.d.ts +36 -0
  88. package/dist/src/capture/triage-provider-factory.d.ts.map +1 -0
  89. package/dist/src/capture/triage-provider-factory.js +55 -0
  90. package/dist/src/capture/triage-provider-factory.js.map +1 -0
  91. package/dist/src/capture/triage-provider.d.ts +82 -0
  92. package/dist/src/capture/triage-provider.d.ts.map +1 -0
  93. package/dist/src/capture/triage-provider.js +126 -0
  94. package/dist/src/capture/triage-provider.js.map +1 -0
  95. package/dist/src/capture/triage.d.ts +30 -0
  96. package/dist/src/capture/triage.d.ts.map +1 -0
  97. package/dist/src/capture/triage.js +50 -0
  98. package/dist/src/capture/triage.js.map +1 -0
  99. package/dist/src/capture/user-statements-recheck.d.ts +22 -0
  100. package/dist/src/capture/user-statements-recheck.d.ts.map +1 -0
  101. package/dist/src/capture/user-statements-recheck.js +181 -0
  102. package/dist/src/capture/user-statements-recheck.js.map +1 -0
  103. package/dist/src/capture/user-statements.d.ts +84 -0
  104. package/dist/src/capture/user-statements.d.ts.map +1 -0
  105. package/dist/src/capture/user-statements.js +617 -0
  106. package/dist/src/capture/user-statements.js.map +1 -0
  107. package/dist/src/cli/agent-homes.d.ts +15 -0
  108. package/dist/src/cli/agent-homes.d.ts.map +1 -0
  109. package/dist/src/cli/agent-homes.js +45 -0
  110. package/dist/src/cli/agent-homes.js.map +1 -0
  111. package/dist/src/cli/commands/backfill.d.ts +3 -0
  112. package/dist/src/cli/commands/backfill.d.ts.map +1 -0
  113. package/dist/src/cli/commands/backfill.js +1379 -0
  114. package/dist/src/cli/commands/backfill.js.map +1 -0
  115. package/dist/src/cli/commands/brief.d.ts +12 -0
  116. package/dist/src/cli/commands/brief.d.ts.map +1 -0
  117. package/dist/src/cli/commands/brief.js +131 -0
  118. package/dist/src/cli/commands/brief.js.map +1 -0
  119. package/dist/src/cli/commands/bulk-ingest.d.ts +3 -0
  120. package/dist/src/cli/commands/bulk-ingest.d.ts.map +1 -0
  121. package/dist/src/cli/commands/bulk-ingest.js +126 -0
  122. package/dist/src/cli/commands/bulk-ingest.js.map +1 -0
  123. package/dist/src/cli/commands/capture-recover.d.ts +40 -0
  124. package/dist/src/cli/commands/capture-recover.d.ts.map +1 -0
  125. package/dist/src/cli/commands/capture-recover.js +194 -0
  126. package/dist/src/cli/commands/capture-recover.js.map +1 -0
  127. package/dist/src/cli/commands/capture.d.ts +12 -0
  128. package/dist/src/cli/commands/capture.d.ts.map +1 -0
  129. package/dist/src/cli/commands/capture.js +304 -0
  130. package/dist/src/cli/commands/capture.js.map +1 -0
  131. package/dist/src/cli/commands/chunk-backfill.d.ts +13 -0
  132. package/dist/src/cli/commands/chunk-backfill.d.ts.map +1 -0
  133. package/dist/src/cli/commands/chunk-backfill.js +157 -0
  134. package/dist/src/cli/commands/chunk-backfill.js.map +1 -0
  135. package/dist/src/cli/commands/compact.d.ts +3 -0
  136. package/dist/src/cli/commands/compact.d.ts.map +1 -0
  137. package/dist/src/cli/commands/compact.js +70 -0
  138. package/dist/src/cli/commands/compact.js.map +1 -0
  139. package/dist/src/cli/commands/cursor-probe.d.ts +20 -0
  140. package/dist/src/cli/commands/cursor-probe.d.ts.map +1 -0
  141. package/dist/src/cli/commands/cursor-probe.js +162 -0
  142. package/dist/src/cli/commands/cursor-probe.js.map +1 -0
  143. package/dist/src/cli/commands/doctor.d.ts +6 -0
  144. package/dist/src/cli/commands/doctor.d.ts.map +1 -0
  145. package/dist/src/cli/commands/doctor.js +259 -0
  146. package/dist/src/cli/commands/doctor.js.map +1 -0
  147. package/dist/src/cli/commands/feedback.d.ts +34 -0
  148. package/dist/src/cli/commands/feedback.d.ts.map +1 -0
  149. package/dist/src/cli/commands/feedback.js +214 -0
  150. package/dist/src/cli/commands/feedback.js.map +1 -0
  151. package/dist/src/cli/commands/hooks-install.d.ts +66 -0
  152. package/dist/src/cli/commands/hooks-install.d.ts.map +1 -0
  153. package/dist/src/cli/commands/hooks-install.js +228 -0
  154. package/dist/src/cli/commands/hooks-install.js.map +1 -0
  155. package/dist/src/cli/commands/import.d.ts +19 -0
  156. package/dist/src/cli/commands/import.d.ts.map +1 -0
  157. package/dist/src/cli/commands/import.js +258 -0
  158. package/dist/src/cli/commands/import.js.map +1 -0
  159. package/dist/src/cli/commands/ingest.d.ts +3 -0
  160. package/dist/src/cli/commands/ingest.d.ts.map +1 -0
  161. package/dist/src/cli/commands/ingest.js +80 -0
  162. package/dist/src/cli/commands/ingest.js.map +1 -0
  163. package/dist/src/cli/commands/mcp-install.d.ts +65 -0
  164. package/dist/src/cli/commands/mcp-install.d.ts.map +1 -0
  165. package/dist/src/cli/commands/mcp-install.js +306 -0
  166. package/dist/src/cli/commands/mcp-install.js.map +1 -0
  167. package/dist/src/cli/commands/menubar.d.ts +127 -0
  168. package/dist/src/cli/commands/menubar.d.ts.map +1 -0
  169. package/dist/src/cli/commands/menubar.js +585 -0
  170. package/dist/src/cli/commands/menubar.js.map +1 -0
  171. package/dist/src/cli/commands/onboard-first-run.d.ts +5 -0
  172. package/dist/src/cli/commands/onboard-first-run.d.ts.map +1 -0
  173. package/dist/src/cli/commands/onboard-first-run.js +156 -0
  174. package/dist/src/cli/commands/onboard-first-run.js.map +1 -0
  175. package/dist/src/cli/commands/onboard.d.ts +336 -0
  176. package/dist/src/cli/commands/onboard.d.ts.map +1 -0
  177. package/dist/src/cli/commands/onboard.js +1873 -0
  178. package/dist/src/cli/commands/onboard.js.map +1 -0
  179. package/dist/src/cli/commands/rebuild.d.ts +12 -0
  180. package/dist/src/cli/commands/rebuild.d.ts.map +1 -0
  181. package/dist/src/cli/commands/rebuild.js +167 -0
  182. package/dist/src/cli/commands/rebuild.js.map +1 -0
  183. package/dist/src/cli/commands/reconcile.d.ts +3 -0
  184. package/dist/src/cli/commands/reconcile.d.ts.map +1 -0
  185. package/dist/src/cli/commands/reconcile.js +68 -0
  186. package/dist/src/cli/commands/reconcile.js.map +1 -0
  187. package/dist/src/cli/commands/reindex.d.ts +3 -0
  188. package/dist/src/cli/commands/reindex.d.ts.map +1 -0
  189. package/dist/src/cli/commands/reindex.js +66 -0
  190. package/dist/src/cli/commands/reindex.js.map +1 -0
  191. package/dist/src/cli/commands/review.d.ts +13 -0
  192. package/dist/src/cli/commands/review.d.ts.map +1 -0
  193. package/dist/src/cli/commands/review.js +401 -0
  194. package/dist/src/cli/commands/review.js.map +1 -0
  195. package/dist/src/cli/commands/save.d.ts +3 -0
  196. package/dist/src/cli/commands/save.d.ts.map +1 -0
  197. package/dist/src/cli/commands/save.js +111 -0
  198. package/dist/src/cli/commands/save.js.map +1 -0
  199. package/dist/src/cli/commands/search.d.ts +37 -0
  200. package/dist/src/cli/commands/search.d.ts.map +1 -0
  201. package/dist/src/cli/commands/search.js +118 -0
  202. package/dist/src/cli/commands/search.js.map +1 -0
  203. package/dist/src/cli/commands/setup.d.ts +30 -0
  204. package/dist/src/cli/commands/setup.d.ts.map +1 -0
  205. package/dist/src/cli/commands/setup.js +122 -0
  206. package/dist/src/cli/commands/setup.js.map +1 -0
  207. package/dist/src/cli/commands/stats.d.ts +3 -0
  208. package/dist/src/cli/commands/stats.d.ts.map +1 -0
  209. package/dist/src/cli/commands/stats.js +42 -0
  210. package/dist/src/cli/commands/stats.js.map +1 -0
  211. package/dist/src/cli/commands/status.d.ts +17 -0
  212. package/dist/src/cli/commands/status.d.ts.map +1 -0
  213. package/dist/src/cli/commands/status.js +206 -0
  214. package/dist/src/cli/commands/status.js.map +1 -0
  215. package/dist/src/cli/commands/token-issue.d.ts +3 -0
  216. package/dist/src/cli/commands/token-issue.d.ts.map +1 -0
  217. package/dist/src/cli/commands/token-issue.js +33 -0
  218. package/dist/src/cli/commands/token-issue.js.map +1 -0
  219. package/dist/src/cli/commands/triage.d.ts +3 -0
  220. package/dist/src/cli/commands/triage.d.ts.map +1 -0
  221. package/dist/src/cli/commands/triage.js +127 -0
  222. package/dist/src/cli/commands/triage.js.map +1 -0
  223. package/dist/src/cli/commands/uninstall.d.ts +85 -0
  224. package/dist/src/cli/commands/uninstall.d.ts.map +1 -0
  225. package/dist/src/cli/commands/uninstall.js +512 -0
  226. package/dist/src/cli/commands/uninstall.js.map +1 -0
  227. package/dist/src/cli/commands/update.d.ts +105 -0
  228. package/dist/src/cli/commands/update.d.ts.map +1 -0
  229. package/dist/src/cli/commands/update.js +556 -0
  230. package/dist/src/cli/commands/update.js.map +1 -0
  231. package/dist/src/cli/default-config-path.d.ts +15 -0
  232. package/dist/src/cli/default-config-path.d.ts.map +1 -0
  233. package/dist/src/cli/default-config-path.js +28 -0
  234. package/dist/src/cli/default-config-path.js.map +1 -0
  235. package/dist/src/cli/feedback/feedback-config.d.ts +67 -0
  236. package/dist/src/cli/feedback/feedback-config.d.ts.map +1 -0
  237. package/dist/src/cli/feedback/feedback-config.js +169 -0
  238. package/dist/src/cli/feedback/feedback-config.js.map +1 -0
  239. package/dist/src/cli/feedback/feedback-history.d.ts +11 -0
  240. package/dist/src/cli/feedback/feedback-history.d.ts.map +1 -0
  241. package/dist/src/cli/feedback/feedback-history.js +145 -0
  242. package/dist/src/cli/feedback/feedback-history.js.map +1 -0
  243. package/dist/src/cli/feedback/feedback-payload.d.ts +74 -0
  244. package/dist/src/cli/feedback/feedback-payload.d.ts.map +1 -0
  245. package/dist/src/cli/feedback/feedback-payload.js +10 -0
  246. package/dist/src/cli/feedback/feedback-payload.js.map +1 -0
  247. package/dist/src/cli/feedback/feedback-relay.d.ts +15 -0
  248. package/dist/src/cli/feedback/feedback-relay.d.ts.map +1 -0
  249. package/dist/src/cli/feedback/feedback-relay.js +47 -0
  250. package/dist/src/cli/feedback/feedback-relay.js.map +1 -0
  251. package/dist/src/cli/feedback/feedback-status.d.ts +11 -0
  252. package/dist/src/cli/feedback/feedback-status.d.ts.map +1 -0
  253. package/dist/src/cli/feedback/feedback-status.js +122 -0
  254. package/dist/src/cli/feedback/feedback-status.js.map +1 -0
  255. package/dist/src/cli/feedback/invite.d.ts +17 -0
  256. package/dist/src/cli/feedback/invite.d.ts.map +1 -0
  257. package/dist/src/cli/feedback/invite.js +73 -0
  258. package/dist/src/cli/feedback/invite.js.map +1 -0
  259. package/dist/src/cli/feedback/relay-secret-store.d.ts +32 -0
  260. package/dist/src/cli/feedback/relay-secret-store.d.ts.map +1 -0
  261. package/dist/src/cli/feedback/relay-secret-store.js +137 -0
  262. package/dist/src/cli/feedback/relay-secret-store.js.map +1 -0
  263. package/dist/src/cli/hooks-writers/claude-code-policy-script.d.ts +35 -0
  264. package/dist/src/cli/hooks-writers/claude-code-policy-script.d.ts.map +1 -0
  265. package/dist/src/cli/hooks-writers/claude-code-policy-script.js +122 -0
  266. package/dist/src/cli/hooks-writers/claude-code-policy-script.js.map +1 -0
  267. package/dist/src/cli/hooks-writers/claude-code.d.ts +63 -0
  268. package/dist/src/cli/hooks-writers/claude-code.d.ts.map +1 -0
  269. package/dist/src/cli/hooks-writers/claude-code.js +289 -0
  270. package/dist/src/cli/hooks-writers/claude-code.js.map +1 -0
  271. package/dist/src/cli/hooks-writers/codex.d.ts +16 -0
  272. package/dist/src/cli/hooks-writers/codex.d.ts.map +1 -0
  273. package/dist/src/cli/hooks-writers/codex.js +17 -0
  274. package/dist/src/cli/hooks-writers/codex.js.map +1 -0
  275. package/dist/src/cli/hooks-writers/errors.d.ts +16 -0
  276. package/dist/src/cli/hooks-writers/errors.d.ts.map +1 -0
  277. package/dist/src/cli/hooks-writers/errors.js +24 -0
  278. package/dist/src/cli/hooks-writers/errors.js.map +1 -0
  279. package/dist/src/cli/hooks-writers/index.d.ts +23 -0
  280. package/dist/src/cli/hooks-writers/index.d.ts.map +1 -0
  281. package/dist/src/cli/hooks-writers/index.js +34 -0
  282. package/dist/src/cli/hooks-writers/index.js.map +1 -0
  283. package/dist/src/cli/hooks-writers/state.d.ts +43 -0
  284. package/dist/src/cli/hooks-writers/state.d.ts.map +1 -0
  285. package/dist/src/cli/hooks-writers/state.js +225 -0
  286. package/dist/src/cli/hooks-writers/state.js.map +1 -0
  287. package/dist/src/cli/hooks-writers/types.d.ts +28 -0
  288. package/dist/src/cli/hooks-writers/types.d.ts.map +1 -0
  289. package/dist/src/cli/hooks-writers/types.js +8 -0
  290. package/dist/src/cli/hooks-writers/types.js.map +1 -0
  291. package/dist/src/cli/http-client.d.ts +128 -0
  292. package/dist/src/cli/http-client.d.ts.map +1 -0
  293. package/dist/src/cli/http-client.js +401 -0
  294. package/dist/src/cli/http-client.js.map +1 -0
  295. package/dist/src/cli/index.d.ts +4 -0
  296. package/dist/src/cli/index.d.ts.map +1 -0
  297. package/dist/src/cli/index.js +99 -0
  298. package/dist/src/cli/index.js.map +1 -0
  299. package/dist/src/cli/job-poller.d.ts +13 -0
  300. package/dist/src/cli/job-poller.d.ts.map +1 -0
  301. package/dist/src/cli/job-poller.js +29 -0
  302. package/dist/src/cli/job-poller.js.map +1 -0
  303. package/dist/src/cli/mcp-config-writers/codex-toml.d.ts +20 -0
  304. package/dist/src/cli/mcp-config-writers/codex-toml.d.ts.map +1 -0
  305. package/dist/src/cli/mcp-config-writers/codex-toml.js +918 -0
  306. package/dist/src/cli/mcp-config-writers/codex-toml.js.map +1 -0
  307. package/dist/src/cli/mcp-config-writers/earlier-name-restrictions.d.ts +11 -0
  308. package/dist/src/cli/mcp-config-writers/earlier-name-restrictions.d.ts.map +1 -0
  309. package/dist/src/cli/mcp-config-writers/earlier-name-restrictions.js +152 -0
  310. package/dist/src/cli/mcp-config-writers/earlier-name-restrictions.js.map +1 -0
  311. package/dist/src/cli/mcp-config-writers/errors.d.ts +17 -0
  312. package/dist/src/cli/mcp-config-writers/errors.d.ts.map +1 -0
  313. package/dist/src/cli/mcp-config-writers/errors.js +13 -0
  314. package/dist/src/cli/mcp-config-writers/errors.js.map +1 -0
  315. package/dist/src/cli/mcp-config-writers/index.d.ts +28 -0
  316. package/dist/src/cli/mcp-config-writers/index.d.ts.map +1 -0
  317. package/dist/src/cli/mcp-config-writers/index.js +70 -0
  318. package/dist/src/cli/mcp-config-writers/index.js.map +1 -0
  319. package/dist/src/cli/mcp-config-writers/json-config.d.ts +20 -0
  320. package/dist/src/cli/mcp-config-writers/json-config.d.ts.map +1 -0
  321. package/dist/src/cli/mcp-config-writers/json-config.js +301 -0
  322. package/dist/src/cli/mcp-config-writers/json-config.js.map +1 -0
  323. package/dist/src/cli/mcp-config-writers/left-in-folder.d.ts +18 -0
  324. package/dist/src/cli/mcp-config-writers/left-in-folder.d.ts.map +1 -0
  325. package/dist/src/cli/mcp-config-writers/left-in-folder.js +140 -0
  326. package/dist/src/cli/mcp-config-writers/left-in-folder.js.map +1 -0
  327. package/dist/src/cli/mcp-config-writers/redact.d.ts +28 -0
  328. package/dist/src/cli/mcp-config-writers/redact.d.ts.map +1 -0
  329. package/dist/src/cli/mcp-config-writers/redact.js +48 -0
  330. package/dist/src/cli/mcp-config-writers/redact.js.map +1 -0
  331. package/dist/src/cli/mcp-config-writers/types.d.ts +46 -0
  332. package/dist/src/cli/mcp-config-writers/types.d.ts.map +1 -0
  333. package/dist/src/cli/mcp-config-writers/types.js +5 -0
  334. package/dist/src/cli/mcp-config-writers/types.js.map +1 -0
  335. package/dist/src/cli/output.d.ts +8 -0
  336. package/dist/src/cli/output.d.ts.map +1 -0
  337. package/dist/src/cli/output.js +34 -0
  338. package/dist/src/cli/output.js.map +1 -0
  339. package/dist/src/cli/postinstall-menubar.d.ts +38 -0
  340. package/dist/src/cli/postinstall-menubar.d.ts.map +1 -0
  341. package/dist/src/cli/postinstall-menubar.js +139 -0
  342. package/dist/src/cli/postinstall-menubar.js.map +1 -0
  343. package/dist/src/cli/status/friend-header.d.ts +61 -0
  344. package/dist/src/cli/status/friend-header.d.ts.map +1 -0
  345. package/dist/src/cli/status/friend-header.js +708 -0
  346. package/dist/src/cli/status/friend-header.js.map +1 -0
  347. package/dist/src/cli/status/local-signals.d.ts +89 -0
  348. package/dist/src/cli/status/local-signals.d.ts.map +1 -0
  349. package/dist/src/cli/status/local-signals.js +194 -0
  350. package/dist/src/cli/status/local-signals.js.map +1 -0
  351. package/dist/src/cli/token.d.ts +37 -0
  352. package/dist/src/cli/token.d.ts.map +1 -0
  353. package/dist/src/cli/token.js +105 -0
  354. package/dist/src/cli/token.js.map +1 -0
  355. package/dist/src/cli/ui.d.ts +47 -0
  356. package/dist/src/cli/ui.d.ts.map +1 -0
  357. package/dist/src/cli/ui.js +166 -0
  358. package/dist/src/cli/ui.js.map +1 -0
  359. package/dist/src/cli/uninstall/mcp-uninstall.d.ts +33 -0
  360. package/dist/src/cli/uninstall/mcp-uninstall.d.ts.map +1 -0
  361. package/dist/src/cli/uninstall/mcp-uninstall.js +116 -0
  362. package/dist/src/cli/uninstall/mcp-uninstall.js.map +1 -0
  363. package/dist/src/config/loader.d.ts +9 -0
  364. package/dist/src/config/loader.d.ts.map +1 -0
  365. package/dist/src/config/loader.js +73 -0
  366. package/dist/src/config/loader.js.map +1 -0
  367. package/dist/src/config/schema.d.ts +956 -0
  368. package/dist/src/config/schema.d.ts.map +1 -0
  369. package/dist/src/config/schema.js +339 -0
  370. package/dist/src/config/schema.js.map +1 -0
  371. package/dist/src/diagnostics/claude-preflight.d.ts +35 -0
  372. package/dist/src/diagnostics/claude-preflight.d.ts.map +1 -0
  373. package/dist/src/diagnostics/claude-preflight.js +90 -0
  374. package/dist/src/diagnostics/claude-preflight.js.map +1 -0
  375. package/dist/src/diagnostics/codex-preflight.d.ts +33 -0
  376. package/dist/src/diagnostics/codex-preflight.d.ts.map +1 -0
  377. package/dist/src/diagnostics/codex-preflight.js +99 -0
  378. package/dist/src/diagnostics/codex-preflight.js.map +1 -0
  379. package/dist/src/diagnostics/doctor.d.ts +125 -0
  380. package/dist/src/diagnostics/doctor.d.ts.map +1 -0
  381. package/dist/src/diagnostics/doctor.js +450 -0
  382. package/dist/src/diagnostics/doctor.js.map +1 -0
  383. package/dist/src/diagnostics/install-layout.d.ts +40 -0
  384. package/dist/src/diagnostics/install-layout.d.ts.map +1 -0
  385. package/dist/src/diagnostics/install-layout.js +55 -0
  386. package/dist/src/diagnostics/install-layout.js.map +1 -0
  387. package/dist/src/diagnostics/memory-coverage.d.ts +54 -0
  388. package/dist/src/diagnostics/memory-coverage.d.ts.map +1 -0
  389. package/dist/src/diagnostics/memory-coverage.js +272 -0
  390. package/dist/src/diagnostics/memory-coverage.js.map +1 -0
  391. package/dist/src/diagnostics/notify.d.ts +107 -0
  392. package/dist/src/diagnostics/notify.d.ts.map +1 -0
  393. package/dist/src/diagnostics/notify.js +217 -0
  394. package/dist/src/diagnostics/notify.js.map +1 -0
  395. package/dist/src/diagnostics/repair-prompt.d.ts +49 -0
  396. package/dist/src/diagnostics/repair-prompt.d.ts.map +1 -0
  397. package/dist/src/diagnostics/repair-prompt.js +223 -0
  398. package/dist/src/diagnostics/repair-prompt.js.map +1 -0
  399. package/dist/src/ingestion/bulk-ingest.d.ts +11 -0
  400. package/dist/src/ingestion/bulk-ingest.d.ts.map +1 -0
  401. package/dist/src/ingestion/bulk-ingest.js +11 -0
  402. package/dist/src/ingestion/bulk-ingest.js.map +1 -0
  403. package/dist/src/ingestion/chunk-meta.d.ts +85 -0
  404. package/dist/src/ingestion/chunk-meta.d.ts.map +1 -0
  405. package/dist/src/ingestion/chunk-meta.js +167 -0
  406. package/dist/src/ingestion/chunk-meta.js.map +1 -0
  407. package/dist/src/ingestion/chunk-text.d.ts +39 -0
  408. package/dist/src/ingestion/chunk-text.d.ts.map +1 -0
  409. package/dist/src/ingestion/chunk-text.js +114 -0
  410. package/dist/src/ingestion/chunk-text.js.map +1 -0
  411. package/dist/src/ingestion/cursor/cursor-store.d.ts +177 -0
  412. package/dist/src/ingestion/cursor/cursor-store.d.ts.map +1 -0
  413. package/dist/src/ingestion/cursor/cursor-store.js +242 -0
  414. package/dist/src/ingestion/cursor/cursor-store.js.map +1 -0
  415. package/dist/src/ingestion/cursor/enrich-roots.d.ts +16 -0
  416. package/dist/src/ingestion/cursor/enrich-roots.d.ts.map +1 -0
  417. package/dist/src/ingestion/cursor/enrich-roots.js +22 -0
  418. package/dist/src/ingestion/cursor/enrich-roots.js.map +1 -0
  419. package/dist/src/ingestion/cursor/vscdb-reader.d.ts +32 -0
  420. package/dist/src/ingestion/cursor/vscdb-reader.d.ts.map +1 -0
  421. package/dist/src/ingestion/cursor/vscdb-reader.js +113 -0
  422. package/dist/src/ingestion/cursor/vscdb-reader.js.map +1 -0
  423. package/dist/src/ingestion/cursor/workspace-root.d.ts +96 -0
  424. package/dist/src/ingestion/cursor/workspace-root.d.ts.map +1 -0
  425. package/dist/src/ingestion/cursor/workspace-root.js +187 -0
  426. package/dist/src/ingestion/cursor/workspace-root.js.map +1 -0
  427. package/dist/src/ingestion/extractor.d.ts +16 -0
  428. package/dist/src/ingestion/extractor.d.ts.map +1 -0
  429. package/dist/src/ingestion/extractor.js +85 -0
  430. package/dist/src/ingestion/extractor.js.map +1 -0
  431. package/dist/src/ingestion/extractors/docx.d.ts +3 -0
  432. package/dist/src/ingestion/extractors/docx.d.ts.map +1 -0
  433. package/dist/src/ingestion/extractors/docx.js +20 -0
  434. package/dist/src/ingestion/extractors/docx.js.map +1 -0
  435. package/dist/src/ingestion/extractors/pdf.d.ts +3 -0
  436. package/dist/src/ingestion/extractors/pdf.d.ts.map +1 -0
  437. package/dist/src/ingestion/extractors/pdf.js +32 -0
  438. package/dist/src/ingestion/extractors/pdf.js.map +1 -0
  439. package/dist/src/ingestion/historical-campaign.d.ts +340 -0
  440. package/dist/src/ingestion/historical-campaign.d.ts.map +1 -0
  441. package/dist/src/ingestion/historical-campaign.js +1010 -0
  442. package/dist/src/ingestion/historical-campaign.js.map +1 -0
  443. package/dist/src/ingestion/ignored-paths.d.ts +20 -0
  444. package/dist/src/ingestion/ignored-paths.d.ts.map +1 -0
  445. package/dist/src/ingestion/ignored-paths.js +45 -0
  446. package/dist/src/ingestion/ignored-paths.js.map +1 -0
  447. package/dist/src/ingestion/inbox-core/conversation-fingerprint.d.ts +2 -0
  448. package/dist/src/ingestion/inbox-core/conversation-fingerprint.d.ts.map +1 -0
  449. package/dist/src/ingestion/inbox-core/conversation-fingerprint.js +27 -0
  450. package/dist/src/ingestion/inbox-core/conversation-fingerprint.js.map +1 -0
  451. package/dist/src/ingestion/inbox-core/conversation-key.d.ts +2 -0
  452. package/dist/src/ingestion/inbox-core/conversation-key.d.ts.map +1 -0
  453. package/dist/src/ingestion/inbox-core/conversation-key.js +31 -0
  454. package/dist/src/ingestion/inbox-core/conversation-key.js.map +1 -0
  455. package/dist/src/ingestion/inbox-core/extensions.d.ts +3 -0
  456. package/dist/src/ingestion/inbox-core/extensions.d.ts.map +1 -0
  457. package/dist/src/ingestion/inbox-core/extensions.js +16 -0
  458. package/dist/src/ingestion/inbox-core/extensions.js.map +1 -0
  459. package/dist/src/ingestion/inbox-core/idempotency.d.ts +2 -0
  460. package/dist/src/ingestion/inbox-core/idempotency.d.ts.map +1 -0
  461. package/dist/src/ingestion/inbox-core/idempotency.js +22 -0
  462. package/dist/src/ingestion/inbox-core/idempotency.js.map +1 -0
  463. package/dist/src/ingestion/inbox-core/index.d.ts +20 -0
  464. package/dist/src/ingestion/inbox-core/index.d.ts.map +1 -0
  465. package/dist/src/ingestion/inbox-core/index.js +20 -0
  466. package/dist/src/ingestion/inbox-core/index.js.map +1 -0
  467. package/dist/src/ingestion/inbox-core/source-detection.d.ts +2 -0
  468. package/dist/src/ingestion/inbox-core/source-detection.d.ts.map +1 -0
  469. package/dist/src/ingestion/inbox-core/source-detection.js +23 -0
  470. package/dist/src/ingestion/inbox-core/source-detection.js.map +1 -0
  471. package/dist/src/ingestion/inbox-core/source-sniffer.d.ts +11 -0
  472. package/dist/src/ingestion/inbox-core/source-sniffer.d.ts.map +1 -0
  473. package/dist/src/ingestion/inbox-core/source-sniffer.js +69 -0
  474. package/dist/src/ingestion/inbox-core/source-sniffer.js.map +1 -0
  475. package/dist/src/ingestion/inbox-core/zip-sniffer.d.ts +70 -0
  476. package/dist/src/ingestion/inbox-core/zip-sniffer.d.ts.map +1 -0
  477. package/dist/src/ingestion/inbox-core/zip-sniffer.js +161 -0
  478. package/dist/src/ingestion/inbox-core/zip-sniffer.js.map +1 -0
  479. package/dist/src/ingestion/inbox-watcher.d.ts +12 -0
  480. package/dist/src/ingestion/inbox-watcher.d.ts.map +1 -0
  481. package/dist/src/ingestion/inbox-watcher.js +83 -0
  482. package/dist/src/ingestion/inbox-watcher.js.map +1 -0
  483. package/dist/src/ingestion/indexer.d.ts +39 -0
  484. package/dist/src/ingestion/indexer.d.ts.map +1 -0
  485. package/dist/src/ingestion/indexer.js +111 -0
  486. package/dist/src/ingestion/indexer.js.map +1 -0
  487. package/dist/src/ingestion/metadata-extraction.d.ts +56 -0
  488. package/dist/src/ingestion/metadata-extraction.d.ts.map +1 -0
  489. package/dist/src/ingestion/metadata-extraction.js +151 -0
  490. package/dist/src/ingestion/metadata-extraction.js.map +1 -0
  491. package/dist/src/ingestion/parsers/chatgpt-web.d.ts +29 -0
  492. package/dist/src/ingestion/parsers/chatgpt-web.d.ts.map +1 -0
  493. package/dist/src/ingestion/parsers/chatgpt-web.js +100 -0
  494. package/dist/src/ingestion/parsers/chatgpt-web.js.map +1 -0
  495. package/dist/src/ingestion/parsers/claude-code-jsonl.d.ts +26 -0
  496. package/dist/src/ingestion/parsers/claude-code-jsonl.d.ts.map +1 -0
  497. package/dist/src/ingestion/parsers/claude-code-jsonl.js +125 -0
  498. package/dist/src/ingestion/parsers/claude-code-jsonl.js.map +1 -0
  499. package/dist/src/ingestion/parsers/claude-desktop-sessions.d.ts +17 -0
  500. package/dist/src/ingestion/parsers/claude-desktop-sessions.d.ts.map +1 -0
  501. package/dist/src/ingestion/parsers/claude-desktop-sessions.js +112 -0
  502. package/dist/src/ingestion/parsers/claude-desktop-sessions.js.map +1 -0
  503. package/dist/src/ingestion/parsers/claude-web.d.ts +24 -0
  504. package/dist/src/ingestion/parsers/claude-web.d.ts.map +1 -0
  505. package/dist/src/ingestion/parsers/claude-web.js +75 -0
  506. package/dist/src/ingestion/parsers/claude-web.js.map +1 -0
  507. package/dist/src/ingestion/parsers/codex-jsonl.d.ts +18 -0
  508. package/dist/src/ingestion/parsers/codex-jsonl.d.ts.map +1 -0
  509. package/dist/src/ingestion/parsers/codex-jsonl.js +150 -0
  510. package/dist/src/ingestion/parsers/codex-jsonl.js.map +1 -0
  511. package/dist/src/ingestion/parsers/gemini-web.d.ts +16 -0
  512. package/dist/src/ingestion/parsers/gemini-web.d.ts.map +1 -0
  513. package/dist/src/ingestion/parsers/gemini-web.js +170 -0
  514. package/dist/src/ingestion/parsers/gemini-web.js.map +1 -0
  515. package/dist/src/ingestion/parsers/grok-cli.d.ts +19 -0
  516. package/dist/src/ingestion/parsers/grok-cli.d.ts.map +1 -0
  517. package/dist/src/ingestion/parsers/grok-cli.js +126 -0
  518. package/dist/src/ingestion/parsers/grok-cli.js.map +1 -0
  519. package/dist/src/ingestion/parsers/grok-web.d.ts +40 -0
  520. package/dist/src/ingestion/parsers/grok-web.d.ts.map +1 -0
  521. package/dist/src/ingestion/parsers/grok-web.js +67 -0
  522. package/dist/src/ingestion/parsers/grok-web.js.map +1 -0
  523. package/dist/src/ingestion/parsers/turns.d.ts +36 -0
  524. package/dist/src/ingestion/parsers/turns.d.ts.map +1 -0
  525. package/dist/src/ingestion/parsers/turns.js +25 -0
  526. package/dist/src/ingestion/parsers/turns.js.map +1 -0
  527. package/dist/src/ingestion/parsers/types.d.ts +47 -0
  528. package/dist/src/ingestion/parsers/types.d.ts.map +1 -0
  529. package/dist/src/ingestion/parsers/types.js +26 -0
  530. package/dist/src/ingestion/parsers/types.js.map +1 -0
  531. package/dist/src/ingestion/report-cards.d.ts +75 -0
  532. package/dist/src/ingestion/report-cards.d.ts.map +1 -0
  533. package/dist/src/ingestion/report-cards.js +224 -0
  534. package/dist/src/ingestion/report-cards.js.map +1 -0
  535. package/dist/src/ingestion/scanner.d.ts +48 -0
  536. package/dist/src/ingestion/scanner.d.ts.map +1 -0
  537. package/dist/src/ingestion/scanner.js +131 -0
  538. package/dist/src/ingestion/scanner.js.map +1 -0
  539. package/dist/src/ingestion/skip-quarantine.d.ts +10 -0
  540. package/dist/src/ingestion/skip-quarantine.d.ts.map +1 -0
  541. package/dist/src/ingestion/skip-quarantine.js +35 -0
  542. package/dist/src/ingestion/skip-quarantine.js.map +1 -0
  543. package/dist/src/ingestion/staging.d.ts +109 -0
  544. package/dist/src/ingestion/staging.d.ts.map +1 -0
  545. package/dist/src/ingestion/staging.js +411 -0
  546. package/dist/src/ingestion/staging.js.map +1 -0
  547. package/dist/src/ingestion/watcher.d.ts +65 -0
  548. package/dist/src/ingestion/watcher.d.ts.map +1 -0
  549. package/dist/src/ingestion/watcher.js +182 -0
  550. package/dist/src/ingestion/watcher.js.map +1 -0
  551. package/dist/src/jobs/codex-override-handler.d.ts +3 -0
  552. package/dist/src/jobs/codex-override-handler.d.ts.map +1 -0
  553. package/dist/src/jobs/codex-override-handler.js +16 -0
  554. package/dist/src/jobs/codex-override-handler.js.map +1 -0
  555. package/dist/src/jobs/handlers/compact.d.ts +30 -0
  556. package/dist/src/jobs/handlers/compact.d.ts.map +1 -0
  557. package/dist/src/jobs/handlers/compact.js +360 -0
  558. package/dist/src/jobs/handlers/compact.js.map +1 -0
  559. package/dist/src/jobs/handlers/dedupe-conversations.d.ts +134 -0
  560. package/dist/src/jobs/handlers/dedupe-conversations.d.ts.map +1 -0
  561. package/dist/src/jobs/handlers/dedupe-conversations.js +371 -0
  562. package/dist/src/jobs/handlers/dedupe-conversations.js.map +1 -0
  563. package/dist/src/jobs/handlers/ingest.d.ts +13 -0
  564. package/dist/src/jobs/handlers/ingest.d.ts.map +1 -0
  565. package/dist/src/jobs/handlers/ingest.js +557 -0
  566. package/dist/src/jobs/handlers/ingest.js.map +1 -0
  567. package/dist/src/jobs/handlers/optimize.d.ts +11 -0
  568. package/dist/src/jobs/handlers/optimize.d.ts.map +1 -0
  569. package/dist/src/jobs/handlers/optimize.js +12 -0
  570. package/dist/src/jobs/handlers/optimize.js.map +1 -0
  571. package/dist/src/jobs/handlers/reconcile.d.ts +57 -0
  572. package/dist/src/jobs/handlers/reconcile.d.ts.map +1 -0
  573. package/dist/src/jobs/handlers/reconcile.js +685 -0
  574. package/dist/src/jobs/handlers/reconcile.js.map +1 -0
  575. package/dist/src/jobs/handlers/reindex.d.ts +38 -0
  576. package/dist/src/jobs/handlers/reindex.d.ts.map +1 -0
  577. package/dist/src/jobs/handlers/reindex.js +63 -0
  578. package/dist/src/jobs/handlers/reindex.js.map +1 -0
  579. package/dist/src/jobs/handlers/save.d.ts +10 -0
  580. package/dist/src/jobs/handlers/save.d.ts.map +1 -0
  581. package/dist/src/jobs/handlers/save.js +316 -0
  582. package/dist/src/jobs/handlers/save.js.map +1 -0
  583. package/dist/src/jobs/handlers/triage.d.ts +47 -0
  584. package/dist/src/jobs/handlers/triage.d.ts.map +1 -0
  585. package/dist/src/jobs/handlers/triage.js +95 -0
  586. package/dist/src/jobs/handlers/triage.js.map +1 -0
  587. package/dist/src/jobs/maintenance-scheduler.d.ts +30 -0
  588. package/dist/src/jobs/maintenance-scheduler.d.ts.map +1 -0
  589. package/dist/src/jobs/maintenance-scheduler.js +41 -0
  590. package/dist/src/jobs/maintenance-scheduler.js.map +1 -0
  591. package/dist/src/jobs/queue.d.ts +157 -0
  592. package/dist/src/jobs/queue.d.ts.map +1 -0
  593. package/dist/src/jobs/queue.js +759 -0
  594. package/dist/src/jobs/queue.js.map +1 -0
  595. package/dist/src/jobs/types.d.ts +53 -0
  596. package/dist/src/jobs/types.d.ts.map +1 -0
  597. package/dist/src/jobs/types.js +33 -0
  598. package/dist/src/jobs/types.js.map +1 -0
  599. package/dist/src/jobs/worker-entry.d.ts +10 -0
  600. package/dist/src/jobs/worker-entry.d.ts.map +1 -0
  601. package/dist/src/jobs/worker-entry.js +252 -0
  602. package/dist/src/jobs/worker-entry.js.map +1 -0
  603. package/dist/src/jobs/worker-process.d.ts +67 -0
  604. package/dist/src/jobs/worker-process.d.ts.map +1 -0
  605. package/dist/src/jobs/worker-process.js +227 -0
  606. package/dist/src/jobs/worker-process.js.map +1 -0
  607. package/dist/src/jobs/worker.d.ts +11 -0
  608. package/dist/src/jobs/worker.d.ts.map +1 -0
  609. package/dist/src/jobs/worker.js +14 -0
  610. package/dist/src/jobs/worker.js.map +1 -0
  611. package/dist/src/main.d.ts +2 -0
  612. package/dist/src/main.d.ts.map +1 -0
  613. package/dist/src/main.js +683 -0
  614. package/dist/src/main.js.map +1 -0
  615. package/dist/src/mcp/capture-diagnostics.d.ts +51 -0
  616. package/dist/src/mcp/capture-diagnostics.d.ts.map +1 -0
  617. package/dist/src/mcp/capture-diagnostics.js +127 -0
  618. package/dist/src/mcp/capture-diagnostics.js.map +1 -0
  619. package/dist/src/mcp/errors.d.ts +8 -0
  620. package/dist/src/mcp/errors.d.ts.map +1 -0
  621. package/dist/src/mcp/errors.js +69 -0
  622. package/dist/src/mcp/errors.js.map +1 -0
  623. package/dist/src/mcp/memory-diagnostics.d.ts +6 -0
  624. package/dist/src/mcp/memory-diagnostics.d.ts.map +1 -0
  625. package/dist/src/mcp/memory-diagnostics.js +51 -0
  626. package/dist/src/mcp/memory-diagnostics.js.map +1 -0
  627. package/dist/src/mcp/names.d.ts +48 -0
  628. package/dist/src/mcp/names.d.ts.map +1 -0
  629. package/dist/src/mcp/names.js +77 -0
  630. package/dist/src/mcp/names.js.map +1 -0
  631. package/dist/src/mcp/server.d.ts +19 -0
  632. package/dist/src/mcp/server.d.ts.map +1 -0
  633. package/dist/src/mcp/server.js +184 -0
  634. package/dist/src/mcp/server.js.map +1 -0
  635. package/dist/src/mcp/stdio.d.ts +2 -0
  636. package/dist/src/mcp/stdio.d.ts.map +1 -0
  637. package/dist/src/mcp/stdio.js +8 -0
  638. package/dist/src/mcp/stdio.js.map +1 -0
  639. package/dist/src/mcp/tools/context-pack.d.ts +35 -0
  640. package/dist/src/mcp/tools/context-pack.d.ts.map +1 -0
  641. package/dist/src/mcp/tools/context-pack.js +279 -0
  642. package/dist/src/mcp/tools/context-pack.js.map +1 -0
  643. package/dist/src/mcp/tools/conversations-search.d.ts +38 -0
  644. package/dist/src/mcp/tools/conversations-search.d.ts.map +1 -0
  645. package/dist/src/mcp/tools/conversations-search.js +79 -0
  646. package/dist/src/mcp/tools/conversations-search.js.map +1 -0
  647. package/dist/src/mcp/tools/evidence-feedback.d.ts +60 -0
  648. package/dist/src/mcp/tools/evidence-feedback.d.ts.map +1 -0
  649. package/dist/src/mcp/tools/evidence-feedback.js +62 -0
  650. package/dist/src/mcp/tools/evidence-feedback.js.map +1 -0
  651. package/dist/src/mcp/tools/log-outcome.d.ts +72 -0
  652. package/dist/src/mcp/tools/log-outcome.d.ts.map +1 -0
  653. package/dist/src/mcp/tools/log-outcome.js +59 -0
  654. package/dist/src/mcp/tools/log-outcome.js.map +1 -0
  655. package/dist/src/mcp/tools/open-evidence.d.ts +37 -0
  656. package/dist/src/mcp/tools/open-evidence.d.ts.map +1 -0
  657. package/dist/src/mcp/tools/open-evidence.js +72 -0
  658. package/dist/src/mcp/tools/open-evidence.js.map +1 -0
  659. package/dist/src/mcp/tools/save.d.ts +37 -0
  660. package/dist/src/mcp/tools/save.d.ts.map +1 -0
  661. package/dist/src/mcp/tools/save.js +65 -0
  662. package/dist/src/mcp/tools/save.js.map +1 -0
  663. package/dist/src/mcp/tools/search.d.ts +37 -0
  664. package/dist/src/mcp/tools/search.d.ts.map +1 -0
  665. package/dist/src/mcp/tools/search.js +95 -0
  666. package/dist/src/mcp/tools/search.js.map +1 -0
  667. package/dist/src/mcp/tools/status.d.ts +31 -0
  668. package/dist/src/mcp/tools/status.d.ts.map +1 -0
  669. package/dist/src/mcp/tools/status.js +63 -0
  670. package/dist/src/mcp/tools/status.js.map +1 -0
  671. package/dist/src/observability/coverage.d.ts +100 -0
  672. package/dist/src/observability/coverage.d.ts.map +1 -0
  673. package/dist/src/observability/coverage.js +178 -0
  674. package/dist/src/observability/coverage.js.map +1 -0
  675. package/dist/src/observability/embedding-events.d.ts +52 -0
  676. package/dist/src/observability/embedding-events.d.ts.map +1 -0
  677. package/dist/src/observability/embedding-events.js +149 -0
  678. package/dist/src/observability/embedding-events.js.map +1 -0
  679. package/dist/src/observability/index-events.d.ts +70 -0
  680. package/dist/src/observability/index-events.d.ts.map +1 -0
  681. package/dist/src/observability/index-events.js +148 -0
  682. package/dist/src/observability/index-events.js.map +1 -0
  683. package/dist/src/observability/onboarding-metric.d.ts +131 -0
  684. package/dist/src/observability/onboarding-metric.d.ts.map +1 -0
  685. package/dist/src/observability/onboarding-metric.js +352 -0
  686. package/dist/src/observability/onboarding-metric.js.map +1 -0
  687. package/dist/src/observability/retrieval-feedback.d.ts +82 -0
  688. package/dist/src/observability/retrieval-feedback.d.ts.map +1 -0
  689. package/dist/src/observability/retrieval-feedback.js +231 -0
  690. package/dist/src/observability/retrieval-feedback.js.map +1 -0
  691. package/dist/src/observability/rift-context.d.ts +53 -0
  692. package/dist/src/observability/rift-context.d.ts.map +1 -0
  693. package/dist/src/observability/rift-context.js +141 -0
  694. package/dist/src/observability/rift-context.js.map +1 -0
  695. package/dist/src/observability/staleness.d.ts +43 -0
  696. package/dist/src/observability/staleness.d.ts.map +1 -0
  697. package/dist/src/observability/staleness.js +74 -0
  698. package/dist/src/observability/staleness.js.map +1 -0
  699. package/dist/src/observability/tool-usage-stats.d.ts +139 -0
  700. package/dist/src/observability/tool-usage-stats.d.ts.map +1 -0
  701. package/dist/src/observability/tool-usage-stats.js +245 -0
  702. package/dist/src/observability/tool-usage-stats.js.map +1 -0
  703. package/dist/src/observability/tool-usage.d.ts +231 -0
  704. package/dist/src/observability/tool-usage.d.ts.map +1 -0
  705. package/dist/src/observability/tool-usage.js +489 -0
  706. package/dist/src/observability/tool-usage.js.map +1 -0
  707. package/dist/src/observability/version-check.d.ts +71 -0
  708. package/dist/src/observability/version-check.d.ts.map +1 -0
  709. package/dist/src/observability/version-check.js +198 -0
  710. package/dist/src/observability/version-check.js.map +1 -0
  711. package/dist/src/onboarding/capture-switch.d.ts +20 -0
  712. package/dist/src/onboarding/capture-switch.d.ts.map +1 -0
  713. package/dist/src/onboarding/capture-switch.js +52 -0
  714. package/dist/src/onboarding/capture-switch.js.map +1 -0
  715. package/dist/src/onboarding/daemon-control.d.ts +33 -0
  716. package/dist/src/onboarding/daemon-control.d.ts.map +1 -0
  717. package/dist/src/onboarding/daemon-control.js +92 -0
  718. package/dist/src/onboarding/daemon-control.js.map +1 -0
  719. package/dist/src/onboarding/env-file.d.ts +18 -0
  720. package/dist/src/onboarding/env-file.d.ts.map +1 -0
  721. package/dist/src/onboarding/env-file.js +89 -0
  722. package/dist/src/onboarding/env-file.js.map +1 -0
  723. package/dist/src/onboarding/search-by-meaning.d.ts +35 -0
  724. package/dist/src/onboarding/search-by-meaning.d.ts.map +1 -0
  725. package/dist/src/onboarding/search-by-meaning.js +163 -0
  726. package/dist/src/onboarding/search-by-meaning.js.map +1 -0
  727. package/dist/src/onboarding/setup-page.d.ts +7 -0
  728. package/dist/src/onboarding/setup-page.d.ts.map +1 -0
  729. package/dist/src/onboarding/setup-page.js +823 -0
  730. package/dist/src/onboarding/setup-page.js.map +1 -0
  731. package/dist/src/onboarding/setup-session.d.ts +22 -0
  732. package/dist/src/onboarding/setup-session.d.ts.map +1 -0
  733. package/dist/src/onboarding/setup-session.js +80 -0
  734. package/dist/src/onboarding/setup-session.js.map +1 -0
  735. package/dist/src/onboarding/setup-state.d.ts +117 -0
  736. package/dist/src/onboarding/setup-state.d.ts.map +1 -0
  737. package/dist/src/onboarding/setup-state.js +267 -0
  738. package/dist/src/onboarding/setup-state.js.map +1 -0
  739. package/dist/src/onboarding/voyage-validate.d.ts +22 -0
  740. package/dist/src/onboarding/voyage-validate.d.ts.map +1 -0
  741. package/dist/src/onboarding/voyage-validate.js +96 -0
  742. package/dist/src/onboarding/voyage-validate.js.map +1 -0
  743. package/dist/src/providers/anthropic-digest.d.ts +23 -0
  744. package/dist/src/providers/anthropic-digest.d.ts.map +1 -0
  745. package/dist/src/providers/anthropic-digest.js +91 -0
  746. package/dist/src/providers/anthropic-digest.js.map +1 -0
  747. package/dist/src/providers/basic-metadata-extraction.d.ts +60 -0
  748. package/dist/src/providers/basic-metadata-extraction.d.ts.map +1 -0
  749. package/dist/src/providers/basic-metadata-extraction.js +114 -0
  750. package/dist/src/providers/basic-metadata-extraction.js.map +1 -0
  751. package/dist/src/providers/claude-cli-metadata-extraction.d.ts +47 -0
  752. package/dist/src/providers/claude-cli-metadata-extraction.d.ts.map +1 -0
  753. package/dist/src/providers/claude-cli-metadata-extraction.js +130 -0
  754. package/dist/src/providers/claude-cli-metadata-extraction.js.map +1 -0
  755. package/dist/src/providers/claude-cli-runner.d.ts +92 -0
  756. package/dist/src/providers/claude-cli-runner.d.ts.map +1 -0
  757. package/dist/src/providers/claude-cli-runner.js +598 -0
  758. package/dist/src/providers/claude-cli-runner.js.map +1 -0
  759. package/dist/src/providers/claude-input-limit.d.ts +32 -0
  760. package/dist/src/providers/claude-input-limit.d.ts.map +1 -0
  761. package/dist/src/providers/claude-input-limit.js +32 -0
  762. package/dist/src/providers/claude-input-limit.js.map +1 -0
  763. package/dist/src/providers/codex-cli-digest.d.ts +12 -0
  764. package/dist/src/providers/codex-cli-digest.d.ts.map +1 -0
  765. package/dist/src/providers/codex-cli-digest.js +70 -0
  766. package/dist/src/providers/codex-cli-digest.js.map +1 -0
  767. package/dist/src/providers/codex-cli-metadata-extraction.d.ts +15 -0
  768. package/dist/src/providers/codex-cli-metadata-extraction.d.ts.map +1 -0
  769. package/dist/src/providers/codex-cli-metadata-extraction.js +78 -0
  770. package/dist/src/providers/codex-cli-metadata-extraction.js.map +1 -0
  771. package/dist/src/providers/codex-cli-model.d.ts +61 -0
  772. package/dist/src/providers/codex-cli-model.d.ts.map +1 -0
  773. package/dist/src/providers/codex-cli-model.js +194 -0
  774. package/dist/src/providers/codex-cli-model.js.map +1 -0
  775. package/dist/src/providers/codex-cli-runner.d.ts +60 -0
  776. package/dist/src/providers/codex-cli-runner.d.ts.map +1 -0
  777. package/dist/src/providers/codex-cli-runner.js +584 -0
  778. package/dist/src/providers/codex-cli-runner.js.map +1 -0
  779. package/dist/src/providers/codex-input-limit.d.ts +43 -0
  780. package/dist/src/providers/codex-input-limit.d.ts.map +1 -0
  781. package/dist/src/providers/codex-input-limit.js +70 -0
  782. package/dist/src/providers/codex-input-limit.js.map +1 -0
  783. package/dist/src/providers/conversation-generation.d.ts +21 -0
  784. package/dist/src/providers/conversation-generation.d.ts.map +1 -0
  785. package/dist/src/providers/conversation-generation.js +132 -0
  786. package/dist/src/providers/conversation-generation.js.map +1 -0
  787. package/dist/src/providers/ollama-embed.d.ts +23 -0
  788. package/dist/src/providers/ollama-embed.d.ts.map +1 -0
  789. package/dist/src/providers/ollama-embed.js +137 -0
  790. package/dist/src/providers/ollama-embed.js.map +1 -0
  791. package/dist/src/providers/ollama.d.ts +42 -0
  792. package/dist/src/providers/ollama.d.ts.map +1 -0
  793. package/dist/src/providers/ollama.js +169 -0
  794. package/dist/src/providers/ollama.js.map +1 -0
  795. package/dist/src/providers/openai-metadata-extraction.d.ts +120 -0
  796. package/dist/src/providers/openai-metadata-extraction.d.ts.map +1 -0
  797. package/dist/src/providers/openai-metadata-extraction.js +225 -0
  798. package/dist/src/providers/openai-metadata-extraction.js.map +1 -0
  799. package/dist/src/providers/operator-overrides.d.ts +24 -0
  800. package/dist/src/providers/operator-overrides.d.ts.map +1 -0
  801. package/dist/src/providers/operator-overrides.js +84 -0
  802. package/dist/src/providers/operator-overrides.js.map +1 -0
  803. package/dist/src/providers/placeholder-embed.d.ts +56 -0
  804. package/dist/src/providers/placeholder-embed.d.ts.map +1 -0
  805. package/dist/src/providers/placeholder-embed.js +64 -0
  806. package/dist/src/providers/placeholder-embed.js.map +1 -0
  807. package/dist/src/providers/shared-request.d.ts +22 -0
  808. package/dist/src/providers/shared-request.d.ts.map +1 -0
  809. package/dist/src/providers/shared-request.js +63 -0
  810. package/dist/src/providers/shared-request.js.map +1 -0
  811. package/dist/src/providers/stub.d.ts +19 -0
  812. package/dist/src/providers/stub.d.ts.map +1 -0
  813. package/dist/src/providers/stub.js +74 -0
  814. package/dist/src/providers/stub.js.map +1 -0
  815. package/dist/src/providers/types.d.ts +100 -0
  816. package/dist/src/providers/types.d.ts.map +1 -0
  817. package/dist/src/providers/types.js +63 -0
  818. package/dist/src/providers/types.js.map +1 -0
  819. package/dist/src/providers/voyage.d.ts +55 -0
  820. package/dist/src/providers/voyage.d.ts.map +1 -0
  821. package/dist/src/providers/voyage.js +179 -0
  822. package/dist/src/providers/voyage.js.map +1 -0
  823. package/dist/src/retrieval/brief.d.ts +26 -0
  824. package/dist/src/retrieval/brief.d.ts.map +1 -0
  825. package/dist/src/retrieval/brief.js +268 -0
  826. package/dist/src/retrieval/brief.js.map +1 -0
  827. package/dist/src/retrieval/canonical-files.d.ts +79 -0
  828. package/dist/src/retrieval/canonical-files.d.ts.map +1 -0
  829. package/dist/src/retrieval/canonical-files.js +432 -0
  830. package/dist/src/retrieval/canonical-files.js.map +1 -0
  831. package/dist/src/retrieval/compact.d.ts +306 -0
  832. package/dist/src/retrieval/compact.d.ts.map +1 -0
  833. package/dist/src/retrieval/compact.js +810 -0
  834. package/dist/src/retrieval/compact.js.map +1 -0
  835. package/dist/src/retrieval/context-pack.d.ts +344 -0
  836. package/dist/src/retrieval/context-pack.d.ts.map +1 -0
  837. package/dist/src/retrieval/context-pack.js +1473 -0
  838. package/dist/src/retrieval/context-pack.js.map +1 -0
  839. package/dist/src/retrieval/conversation-dedup.d.ts +54 -0
  840. package/dist/src/retrieval/conversation-dedup.d.ts.map +1 -0
  841. package/dist/src/retrieval/conversation-dedup.js +162 -0
  842. package/dist/src/retrieval/conversation-dedup.js.map +1 -0
  843. package/dist/src/retrieval/current-truth.d.ts +360 -0
  844. package/dist/src/retrieval/current-truth.d.ts.map +1 -0
  845. package/dist/src/retrieval/current-truth.js +766 -0
  846. package/dist/src/retrieval/current-truth.js.map +1 -0
  847. package/dist/src/retrieval/cwd.d.ts +25 -0
  848. package/dist/src/retrieval/cwd.d.ts.map +1 -0
  849. package/dist/src/retrieval/cwd.js +48 -0
  850. package/dist/src/retrieval/cwd.js.map +1 -0
  851. package/dist/src/retrieval/degraded.d.ts +20 -0
  852. package/dist/src/retrieval/degraded.d.ts.map +1 -0
  853. package/dist/src/retrieval/degraded.js +43 -0
  854. package/dist/src/retrieval/degraded.js.map +1 -0
  855. package/dist/src/retrieval/evidence-key.d.ts +48 -0
  856. package/dist/src/retrieval/evidence-key.d.ts.map +1 -0
  857. package/dist/src/retrieval/evidence-key.js +131 -0
  858. package/dist/src/retrieval/evidence-key.js.map +1 -0
  859. package/dist/src/retrieval/feedback-ranking.d.ts +49 -0
  860. package/dist/src/retrieval/feedback-ranking.d.ts.map +1 -0
  861. package/dist/src/retrieval/feedback-ranking.js +138 -0
  862. package/dist/src/retrieval/feedback-ranking.js.map +1 -0
  863. package/dist/src/retrieval/git-state.d.ts +62 -0
  864. package/dist/src/retrieval/git-state.d.ts.map +1 -0
  865. package/dist/src/retrieval/git-state.js +192 -0
  866. package/dist/src/retrieval/git-state.js.map +1 -0
  867. package/dist/src/retrieval/group-by-parent.d.ts +38 -0
  868. package/dist/src/retrieval/group-by-parent.d.ts.map +1 -0
  869. package/dist/src/retrieval/group-by-parent.js +40 -0
  870. package/dist/src/retrieval/group-by-parent.js.map +1 -0
  871. package/dist/src/retrieval/hybrid.d.ts +75 -0
  872. package/dist/src/retrieval/hybrid.d.ts.map +1 -0
  873. package/dist/src/retrieval/hybrid.js +151 -0
  874. package/dist/src/retrieval/hybrid.js.map +1 -0
  875. package/dist/src/retrieval/lexical.d.ts +33 -0
  876. package/dist/src/retrieval/lexical.d.ts.map +1 -0
  877. package/dist/src/retrieval/lexical.js +379 -0
  878. package/dist/src/retrieval/lexical.js.map +1 -0
  879. package/dist/src/retrieval/locator-boost.d.ts +37 -0
  880. package/dist/src/retrieval/locator-boost.d.ts.map +1 -0
  881. package/dist/src/retrieval/locator-boost.js +129 -0
  882. package/dist/src/retrieval/locator-boost.js.map +1 -0
  883. package/dist/src/retrieval/passages.d.ts +24 -0
  884. package/dist/src/retrieval/passages.d.ts.map +1 -0
  885. package/dist/src/retrieval/passages.js +160 -0
  886. package/dist/src/retrieval/passages.js.map +1 -0
  887. package/dist/src/retrieval/post-filter.d.ts +32 -0
  888. package/dist/src/retrieval/post-filter.d.ts.map +1 -0
  889. package/dist/src/retrieval/post-filter.js +57 -0
  890. package/dist/src/retrieval/post-filter.js.map +1 -0
  891. package/dist/src/retrieval/project-index.d.ts +71 -0
  892. package/dist/src/retrieval/project-index.d.ts.map +1 -0
  893. package/dist/src/retrieval/project-index.js +348 -0
  894. package/dist/src/retrieval/project-index.js.map +1 -0
  895. package/dist/src/retrieval/recall-hint.d.ts +22 -0
  896. package/dist/src/retrieval/recall-hint.d.ts.map +1 -0
  897. package/dist/src/retrieval/recall-hint.js +33 -0
  898. package/dist/src/retrieval/recall-hint.js.map +1 -0
  899. package/dist/src/retrieval/receipt.d.ts +57 -0
  900. package/dist/src/retrieval/receipt.d.ts.map +1 -0
  901. package/dist/src/retrieval/receipt.js +122 -0
  902. package/dist/src/retrieval/receipt.js.map +1 -0
  903. package/dist/src/retrieval/report-demotion.d.ts +46 -0
  904. package/dist/src/retrieval/report-demotion.d.ts.map +1 -0
  905. package/dist/src/retrieval/report-demotion.js +169 -0
  906. package/dist/src/retrieval/report-demotion.js.map +1 -0
  907. package/dist/src/retrieval/reranker.d.ts +119 -0
  908. package/dist/src/retrieval/reranker.d.ts.map +1 -0
  909. package/dist/src/retrieval/reranker.js +220 -0
  910. package/dist/src/retrieval/reranker.js.map +1 -0
  911. package/dist/src/retrieval/stitch-chunks.d.ts +76 -0
  912. package/dist/src/retrieval/stitch-chunks.d.ts.map +1 -0
  913. package/dist/src/retrieval/stitch-chunks.js +113 -0
  914. package/dist/src/retrieval/stitch-chunks.js.map +1 -0
  915. package/dist/src/retrieval/vector.d.ts +71 -0
  916. package/dist/src/retrieval/vector.d.ts.map +1 -0
  917. package/dist/src/retrieval/vector.js +147 -0
  918. package/dist/src/retrieval/vector.js.map +1 -0
  919. package/dist/src/runtime/legacy-migration.d.ts +27 -0
  920. package/dist/src/runtime/legacy-migration.d.ts.map +1 -0
  921. package/dist/src/runtime/legacy-migration.js +140 -0
  922. package/dist/src/runtime/legacy-migration.js.map +1 -0
  923. package/dist/src/runtime/legacy-name-guard.d.ts +35 -0
  924. package/dist/src/runtime/legacy-name-guard.d.ts.map +1 -0
  925. package/dist/src/runtime/legacy-name-guard.js +58 -0
  926. package/dist/src/runtime/legacy-name-guard.js.map +1 -0
  927. package/dist/src/runtime/rift-env.d.ts +14 -0
  928. package/dist/src/runtime/rift-env.d.ts.map +1 -0
  929. package/dist/src/runtime/rift-env.js +79 -0
  930. package/dist/src/runtime/rift-env.js.map +1 -0
  931. package/dist/src/runtime/voyage-key-source.d.ts +46 -0
  932. package/dist/src/runtime/voyage-key-source.d.ts.map +1 -0
  933. package/dist/src/runtime/voyage-key-source.js +97 -0
  934. package/dist/src/runtime/voyage-key-source.js.map +1 -0
  935. package/dist/src/runtime/watcher-startup.d.ts +2 -0
  936. package/dist/src/runtime/watcher-startup.d.ts.map +1 -0
  937. package/dist/src/runtime/watcher-startup.js +4 -0
  938. package/dist/src/runtime/watcher-startup.js.map +1 -0
  939. package/dist/src/security/archive.d.ts +23 -0
  940. package/dist/src/security/archive.d.ts.map +1 -0
  941. package/dist/src/security/archive.js +163 -0
  942. package/dist/src/security/archive.js.map +1 -0
  943. package/dist/src/security/paths.d.ts +21 -0
  944. package/dist/src/security/paths.d.ts.map +1 -0
  945. package/dist/src/security/paths.js +67 -0
  946. package/dist/src/security/paths.js.map +1 -0
  947. package/dist/src/server/app.d.ts +29 -0
  948. package/dist/src/server/app.d.ts.map +1 -0
  949. package/dist/src/server/app.js +356 -0
  950. package/dist/src/server/app.js.map +1 -0
  951. package/dist/src/server/build-info.d.ts +8 -0
  952. package/dist/src/server/build-info.d.ts.map +1 -0
  953. package/dist/src/server/build-info.js +61 -0
  954. package/dist/src/server/build-info.js.map +1 -0
  955. package/dist/src/server/lifecycle.d.ts +30 -0
  956. package/dist/src/server/lifecycle.d.ts.map +1 -0
  957. package/dist/src/server/lifecycle.js +59 -0
  958. package/dist/src/server/lifecycle.js.map +1 -0
  959. package/dist/src/server/middleware/multipart.d.ts +51 -0
  960. package/dist/src/server/middleware/multipart.d.ts.map +1 -0
  961. package/dist/src/server/middleware/multipart.js +86 -0
  962. package/dist/src/server/middleware/multipart.js.map +1 -0
  963. package/dist/src/server/routes/compact.d.ts +37 -0
  964. package/dist/src/server/routes/compact.d.ts.map +1 -0
  965. package/dist/src/server/routes/compact.js +80 -0
  966. package/dist/src/server/routes/compact.js.map +1 -0
  967. package/dist/src/server/routes/context.d.ts +12 -0
  968. package/dist/src/server/routes/context.d.ts.map +1 -0
  969. package/dist/src/server/routes/context.js +73 -0
  970. package/dist/src/server/routes/context.js.map +1 -0
  971. package/dist/src/server/routes/conversations-search.d.ts +4 -0
  972. package/dist/src/server/routes/conversations-search.d.ts.map +1 -0
  973. package/dist/src/server/routes/conversations-search.js +287 -0
  974. package/dist/src/server/routes/conversations-search.js.map +1 -0
  975. package/dist/src/server/routes/enqueue.d.ts +11 -0
  976. package/dist/src/server/routes/enqueue.d.ts.map +1 -0
  977. package/dist/src/server/routes/enqueue.js +17 -0
  978. package/dist/src/server/routes/enqueue.js.map +1 -0
  979. package/dist/src/server/routes/friend-status.d.ts +474 -0
  980. package/dist/src/server/routes/friend-status.d.ts.map +1 -0
  981. package/dist/src/server/routes/friend-status.js +671 -0
  982. package/dist/src/server/routes/friend-status.js.map +1 -0
  983. package/dist/src/server/routes/ingest.d.ts +15 -0
  984. package/dist/src/server/routes/ingest.d.ts.map +1 -0
  985. package/dist/src/server/routes/ingest.js +142 -0
  986. package/dist/src/server/routes/ingest.js.map +1 -0
  987. package/dist/src/server/routes/jobs.d.ts +10 -0
  988. package/dist/src/server/routes/jobs.d.ts.map +1 -0
  989. package/dist/src/server/routes/jobs.js +29 -0
  990. package/dist/src/server/routes/jobs.js.map +1 -0
  991. package/dist/src/server/routes/mcp-usage.d.ts +17 -0
  992. package/dist/src/server/routes/mcp-usage.d.ts.map +1 -0
  993. package/dist/src/server/routes/mcp-usage.js +17 -0
  994. package/dist/src/server/routes/mcp-usage.js.map +1 -0
  995. package/dist/src/server/routes/reconcile.d.ts +4 -0
  996. package/dist/src/server/routes/reconcile.d.ts.map +1 -0
  997. package/dist/src/server/routes/reconcile.js +62 -0
  998. package/dist/src/server/routes/reconcile.js.map +1 -0
  999. package/dist/src/server/routes/reindex.d.ts +4 -0
  1000. package/dist/src/server/routes/reindex.d.ts.map +1 -0
  1001. package/dist/src/server/routes/reindex.js +77 -0
  1002. package/dist/src/server/routes/reindex.js.map +1 -0
  1003. package/dist/src/server/routes/retrieval-feedback.d.ts +3 -0
  1004. package/dist/src/server/routes/retrieval-feedback.d.ts.map +1 -0
  1005. package/dist/src/server/routes/retrieval-feedback.js +290 -0
  1006. package/dist/src/server/routes/retrieval-feedback.js.map +1 -0
  1007. package/dist/src/server/routes/save.d.ts +52 -0
  1008. package/dist/src/server/routes/save.d.ts.map +1 -0
  1009. package/dist/src/server/routes/save.js +127 -0
  1010. package/dist/src/server/routes/save.js.map +1 -0
  1011. package/dist/src/server/routes/search.d.ts +5 -0
  1012. package/dist/src/server/routes/search.d.ts.map +1 -0
  1013. package/dist/src/server/routes/search.js +689 -0
  1014. package/dist/src/server/routes/search.js.map +1 -0
  1015. package/dist/src/server/routes/setup.d.ts +46 -0
  1016. package/dist/src/server/routes/setup.d.ts.map +1 -0
  1017. package/dist/src/server/routes/setup.js +322 -0
  1018. package/dist/src/server/routes/setup.js.map +1 -0
  1019. package/dist/src/server/routes/stats.d.ts +10 -0
  1020. package/dist/src/server/routes/stats.d.ts.map +1 -0
  1021. package/dist/src/server/routes/stats.js +15 -0
  1022. package/dist/src/server/routes/stats.js.map +1 -0
  1023. package/dist/src/server/routes/status.d.ts +20 -0
  1024. package/dist/src/server/routes/status.d.ts.map +1 -0
  1025. package/dist/src/server/routes/status.js +31 -0
  1026. package/dist/src/server/routes/status.js.map +1 -0
  1027. package/dist/src/server/routes/triage.d.ts +4 -0
  1028. package/dist/src/server/routes/triage.d.ts.map +1 -0
  1029. package/dist/src/server/routes/triage.js +97 -0
  1030. package/dist/src/server/routes/triage.js.map +1 -0
  1031. package/dist/src/server/save-quality.d.ts +21 -0
  1032. package/dist/src/server/save-quality.d.ts.map +1 -0
  1033. package/dist/src/server/save-quality.js +51 -0
  1034. package/dist/src/server/save-quality.js.map +1 -0
  1035. package/dist/src/server/serving-marker.d.ts +85 -0
  1036. package/dist/src/server/serving-marker.d.ts.map +1 -0
  1037. package/dist/src/server/serving-marker.js +226 -0
  1038. package/dist/src/server/serving-marker.js.map +1 -0
  1039. package/dist/src/storage/atomic.d.ts +8 -0
  1040. package/dist/src/storage/atomic.d.ts.map +1 -0
  1041. package/dist/src/storage/atomic.js +22 -0
  1042. package/dist/src/storage/atomic.js.map +1 -0
  1043. package/dist/src/storage/chunk-backfill.d.ts +39 -0
  1044. package/dist/src/storage/chunk-backfill.d.ts.map +1 -0
  1045. package/dist/src/storage/chunk-backfill.js +295 -0
  1046. package/dist/src/storage/chunk-backfill.js.map +1 -0
  1047. package/dist/src/storage/db.d.ts +15 -0
  1048. package/dist/src/storage/db.d.ts.map +1 -0
  1049. package/dist/src/storage/db.js +47 -0
  1050. package/dist/src/storage/db.js.map +1 -0
  1051. package/dist/src/storage/filter.d.ts +42 -0
  1052. package/dist/src/storage/filter.d.ts.map +1 -0
  1053. package/dist/src/storage/filter.js +70 -0
  1054. package/dist/src/storage/filter.js.map +1 -0
  1055. package/dist/src/storage/fts.d.ts +47 -0
  1056. package/dist/src/storage/fts.d.ts.map +1 -0
  1057. package/dist/src/storage/fts.js +86 -0
  1058. package/dist/src/storage/fts.js.map +1 -0
  1059. package/dist/src/storage/integrity.d.ts +11 -0
  1060. package/dist/src/storage/integrity.d.ts.map +1 -0
  1061. package/dist/src/storage/integrity.js +66 -0
  1062. package/dist/src/storage/integrity.js.map +1 -0
  1063. package/dist/src/storage/maintenance.d.ts +27 -0
  1064. package/dist/src/storage/maintenance.d.ts.map +1 -0
  1065. package/dist/src/storage/maintenance.js +66 -0
  1066. package/dist/src/storage/maintenance.js.map +1 -0
  1067. package/dist/src/storage/rebuild.d.ts +71 -0
  1068. package/dist/src/storage/rebuild.d.ts.map +1 -0
  1069. package/dist/src/storage/rebuild.js +605 -0
  1070. package/dist/src/storage/rebuild.js.map +1 -0
  1071. package/dist/src/storage/report-card-backfill.d.ts +20 -0
  1072. package/dist/src/storage/report-card-backfill.d.ts.map +1 -0
  1073. package/dist/src/storage/report-card-backfill.js +114 -0
  1074. package/dist/src/storage/report-card-backfill.js.map +1 -0
  1075. package/dist/src/storage/shadow-swap.d.ts +20 -0
  1076. package/dist/src/storage/shadow-swap.d.ts.map +1 -0
  1077. package/dist/src/storage/shadow-swap.js +163 -0
  1078. package/dist/src/storage/shadow-swap.js.map +1 -0
  1079. package/dist/src/storage/tables.d.ts +147 -0
  1080. package/dist/src/storage/tables.d.ts.map +1 -0
  1081. package/dist/src/storage/tables.js +290 -0
  1082. package/dist/src/storage/tables.js.map +1 -0
  1083. package/operator/swiftbar/render-menu.py +475 -0
  1084. package/operator/swiftbar/rift.10s.sh +201 -0
  1085. package/package.json +57 -3
@@ -0,0 +1,556 @@
1
+ /**
2
+ * `onadit update` — friend-readable in-place upgrade for the npm-installed CLI.
3
+ *
4
+ * Steps (in order, each one printed):
5
+ * 0. Detect the daemon LAYOUT before any side effect. `onadit update`'s npm
6
+ * path only upgrades the daemon when the launchd plist points at the
7
+ * npm-installed module dir. A packaged (.pkg) install launches the daemon
8
+ * from a bundled app under ~/Library/Application Support/Rift/app that npm
9
+ * never touches — so an `npm install -g` would upgrade an unused CLI copy,
10
+ * the kickstart would relaunch the SAME old bundled daemon, and a
11
+ * CLI-only verify would falsely report success. When we detect that
12
+ * layout we STOP here with NO npm-global side effect and print the exact
13
+ * .pkg recovery instead of lying. (This is the beta.20→beta.21 split-
14
+ * install false-success bug.)
15
+ * 1. Resolve the target version with FRESH registry metadata
16
+ * (`npm view --prefer-online onadit@beta version`), then
17
+ * `npm install -g --prefer-online onadit@<that exact version>`.
18
+ * Pinning the exact version (not the `@beta` tag) plus `--prefer-online`
19
+ * removes the two ways an install can be a silent no-op: a stale local
20
+ * cache resolving the tag to the already-installed version, and the
21
+ * verify step later reading that same stale cache so a no-op "matches"
22
+ * itself. Falls back to `sudo npm install -g …` exactly like
23
+ * scripts/install.sh, so friends who installed via the one-liner without
24
+ * nvm don't hit a permission wall. When we can resolve where the `rift`
25
+ * on the friend's PATH lives, we install into THAT prefix (`--prefix`)
26
+ * so the copy their terminal runs is the copy that gets upgraded.
27
+ * 2. VERIFY: run the `rift` on PATH and confirm its version now equals the
28
+ * freshly-resolved expected version. An exit-0 npm install is NOT proof
29
+ * of an upgrade — npm can install into a different prefix than the binary
30
+ * on PATH. And if we could not reach the registry to learn the expected
31
+ * version at all, we FAIL as "could not verify" rather than passing on
32
+ * "installed something". We refuse to report success until the active
33
+ * version provably equals a freshly-resolved expected version. This is
34
+ * the load-bearing fix for the beta.18→beta.19 silent no-op that shipped
35
+ * a CLI too old to read its own (valid) config.
36
+ * 3. `launchctl kickstart -k gui/$UID/com.getrift.daemon` — restarts the
37
+ * daemon so it picks up the new code on disk.
38
+ * 4. Poll `/health` until 200 (or timeout) — proves the new build can
39
+ * actually start.
40
+ * 4b. VERIFY THE DAEMON. Confirm the running daemon's GET /version equals
41
+ * the freshly-resolved expected version. /health only proves *a* daemon
42
+ * answered; this proves it is the NEW build. A healthy restart that still
43
+ * reports the old version means the code the daemon loads is not the code
44
+ * npm upgraded — the load-bearing honesty check that the original CLI-only
45
+ * verify (Step 2) structurally could not make.
46
+ * 5. Refresh the SwiftBar menu plugin — keeps the 10-second menu surface
47
+ * on the same packaged scripts as the just-installed CLI.
48
+ *
49
+ * Failure contract:
50
+ * - npm install failure (step 1): the previous install is left in place.
51
+ * `npm install -g` with the same dist-tag is atomic enough here — npm
52
+ * replaces `bin/rift` only after a successful tarball install.
53
+ * - Verification failure (step 2): npm reported success but the `rift` on
54
+ * PATH is still the old version. The transcript names both versions and
55
+ * all the paths, leads with a plain-English headline ("Onadit updated one
56
+ * copy, but your terminal still points at another copy."), and prints the
57
+ * exact command to install into the right prefix.
58
+ * - Kickstart or /health failure (steps 3–4): the new package is already
59
+ * installed on disk; only daemon recovery is needed. The transcript
60
+ * says so explicitly and points at the manual recovery action.
61
+ * In every branch the output is a friend-readable error pointing at the
62
+ * next recovery step; we never drop into "your install is broken" territory.
63
+ *
64
+ * Deliberately not in scope here:
65
+ * - No publishing.
66
+ * - No clean-Mac validation.
67
+ * - No Sparkle / background self-update.
68
+ * - No telemetry. The npm-registry probe lives in the daemon's daily
69
+ * loop (see src/observability/version-check.ts); this command does
70
+ * not write to that snapshot.
71
+ */
72
+ import { spawn, execFile } from "node:child_process";
73
+ import os from "node:os";
74
+ import path from "node:path";
75
+ import { Command } from "commander";
76
+ import { kickstartDaemon, waitForHealth, RIFT_LAUNCHD_LABEL, } from "../../onboarding/daemon-control.js";
77
+ import { installMenuBar } from "./menubar.js";
78
+ import { classifyDaemonLayout, installedAsPreviousPackage, REINSTALL_COMMAND, RIFT_DOWNLOAD_URL, } from "../../diagnostics/install-layout.js";
79
+ import { getBuildInfo } from "../../server/build-info.js";
80
+ import { printJson, printText } from "../output.js";
81
+ export { classifyDaemonLayout };
82
+ const RIFT_PACKAGE_NAME = "onadit";
83
+ const RIFT_PACKAGE_SPEC = "onadit@beta";
84
+ const RIFT_BETA_TAG = "onadit@beta";
85
+ const DAEMON_BASE_URL = "http://127.0.0.1:3577";
86
+ const HEALTH_TIMEOUT_MS = 30_000;
87
+ const defaultRunner = {
88
+ resolveDaemonProgram: defaultResolveDaemonProgram,
89
+ getDaemonVersion: defaultGetDaemonVersion,
90
+ getInstalledPackageName: () => getBuildInfo().name,
91
+ runNpmInstall: defaultNpmInstall,
92
+ resolveActiveCli: defaultResolveActiveCli,
93
+ getActiveCliVersion: defaultGetActiveCliVersion,
94
+ getExpectedVersion: defaultGetExpectedVersion,
95
+ getNpmGlobalPrefix: defaultGetNpmGlobalPrefix,
96
+ kickstart: kickstartDaemon,
97
+ waitForHealth,
98
+ installMenuBar,
99
+ };
100
+ export function makeUpdateCommand() {
101
+ return new Command("update")
102
+ .description("Reinstall the latest onadit@beta and restart the daemon")
103
+ .action(async (_opts, cmd) => {
104
+ const globalOpts = cmd.optsWithGlobals();
105
+ const result = await runUpdate(defaultRunner);
106
+ if (globalOpts.json) {
107
+ printJson(result);
108
+ }
109
+ else {
110
+ for (const line of result.transcript)
111
+ printText(line);
112
+ }
113
+ if (!result.ok)
114
+ process.exitCode = 1;
115
+ });
116
+ }
117
+ /**
118
+ * Pure orchestration so tests can inject a mock runner. The function
119
+ * always returns — exit-code mapping is the caller's job.
120
+ */
121
+ export async function runUpdate(runner) {
122
+ const transcript = [];
123
+ const say = (line) => {
124
+ transcript.push(line);
125
+ };
126
+ // --- Step 0: detect the daemon layout BEFORE any install side effect ---
127
+ // Packaged (.pkg) installs launch the daemon from a bundled app under
128
+ // ~/Library/Application Support/Rift/app that `npm install -g` never touches.
129
+ // Running the npm flow there would upgrade an unused CLI copy, kickstart the
130
+ // SAME old bundled daemon, and then "verify" the wrong copy — a false
131
+ // success. Detect it up front and STOP with no npm-global side effect.
132
+ const daemonProgram = await runner.resolveDaemonProgram();
133
+ const layout = classifyDaemonLayout(daemonProgram.mainPath);
134
+ if (layout === "packaged") {
135
+ const daemonVersion = await runner.getDaemonVersion();
136
+ const expected = await runner.getExpectedVersion();
137
+ appendPackagedRecovery(say, {
138
+ mainPath: daemonProgram.mainPath,
139
+ daemonVersion,
140
+ expected,
141
+ });
142
+ return { ok: false, step: "packaged", transcript };
143
+ }
144
+ // A copy installed under the package's earlier npm name: npm cannot move it
145
+ // to the new name, and both names own the same commands. Stop before any
146
+ // side effect and hand over to the installer, which does the move.
147
+ if (installedAsPreviousPackage(runner.getInstalledPackageName())) {
148
+ appendPreviousPackageRecovery(say);
149
+ return { ok: false, step: "previous-package", transcript };
150
+ }
151
+ // --- Step 1a: resolve the target version with FRESH registry metadata ---
152
+ // Resolve the expected version BEFORE installing, and force a registry
153
+ // round-trip (`npm view --prefer-online`). This is load-bearing: if both
154
+ // `npm install @beta` and the verification's `npm view @beta` read the same
155
+ // stale local cache, the tag can resolve to the version already installed —
156
+ // a no-op that then "verifies" against itself (beta.18 == beta.18) and the
157
+ // command lies. Pinning to the freshly-resolved EXACT version below removes
158
+ // the tag indirection from the install entirely.
159
+ const active = await runner.resolveActiveCli();
160
+ const installPrefix = active.prefix;
161
+ const expected = await runner.getExpectedVersion();
162
+ // --- Step 1b: npm install ---
163
+ // Install the exact pinned version when we know it (so a stale-cached tag
164
+ // can't redirect us), falling back to the @beta tag only when the registry
165
+ // probe failed. Install into the prefix that owns the `rift` on PATH so the
166
+ // copy the friend's shell runs is the copy that gets upgraded; when we can't
167
+ // resolve it, fall back to npm's choice and let verify (Step 2) catch a split.
168
+ const installSpec = expected ? `${RIFT_PACKAGE_NAME}@${expected}` : RIFT_PACKAGE_SPEC;
169
+ say(`==> Installing ${installSpec} via npm` +
170
+ (installPrefix ? ` (into ${installPrefix})` : ""));
171
+ let npmCode = await runner.runNpmInstall(installSpec, false, installPrefix);
172
+ if (npmCode !== 0) {
173
+ // npm exits non-zero on a permission denied error; mirror install.sh
174
+ // and retry under sudo so a non-nvm user on a system Node doesn't get
175
+ // stuck. The sudo prompt itself surfaces inline in the friend's
176
+ // terminal — we don't try to suppress it.
177
+ say(" npm install failed without sudo — retrying with sudo");
178
+ npmCode = await runner.runNpmInstall(installSpec, true, installPrefix);
179
+ }
180
+ if (npmCode !== 0) {
181
+ say("");
182
+ say("Update failed at step 1 (npm install).");
183
+ say("Your existing Onadit install is unchanged.");
184
+ say(`Try manually: npm install -g --prefer-online ${RIFT_PACKAGE_SPEC}`);
185
+ return { ok: false, step: "npm", transcript };
186
+ }
187
+ say(" npm install completed.");
188
+ // --- Step 2: verify the active CLI actually upgraded ---
189
+ // An exit-0 npm install is NOT proof. npm can install into a different
190
+ // prefix than the binary on PATH, or (when we fell back to the tag) resolve
191
+ // `@beta` to the version already installed. In both cases the friend's shell
192
+ // still runs the old build. Refuse to claim success until the `rift` on PATH
193
+ // reports the expected version — and if we never resolved the expected
194
+ // version, say so honestly rather than passing on "installed something".
195
+ say("==> Verifying the rift on your PATH is up to date");
196
+ const activeVersion = await runner.getActiveCliVersion();
197
+ const verdict = evaluateUpgrade(expected, activeVersion);
198
+ if (!verdict.ok) {
199
+ const npmPrefix = await runner.getNpmGlobalPrefix();
200
+ appendVerifyDiagnosis(say, {
201
+ expected,
202
+ activeVersion,
203
+ active,
204
+ installPrefix,
205
+ npmPrefix,
206
+ reason: verdict.reason,
207
+ });
208
+ return { ok: false, step: "verify", transcript };
209
+ }
210
+ say(` Active rift is ${activeVersion} (matches the published @beta).`);
211
+ // --- Step 3: kickstart daemon ---
212
+ say("==> Restarting the Onadit daemon");
213
+ const kick = await runner.kickstart();
214
+ if (kick.status !== "ok") {
215
+ say("");
216
+ say("Update installed, but the daemon did not restart cleanly.");
217
+ if (kick.hint)
218
+ say(` ${kick.hint}`);
219
+ say("Try: launchctl kickstart -k gui/$UID/com.getrift.daemon");
220
+ return { ok: false, step: "kickstart", transcript };
221
+ }
222
+ say(" Daemon kickstarted.");
223
+ // --- Step 4: wait for /health ---
224
+ say("==> Waiting for the daemon to answer /health");
225
+ const health = await runner.waitForHealth({
226
+ baseUrl: DAEMON_BASE_URL,
227
+ timeoutMs: HEALTH_TIMEOUT_MS,
228
+ });
229
+ if (!health.ok) {
230
+ say("");
231
+ say("Update installed and daemon kickstarted, but /health did not return 200.");
232
+ say(` ${health.reason}`);
233
+ say("Inspect with: onadit status");
234
+ return { ok: false, step: "health", transcript };
235
+ }
236
+ say(` Daemon healthy (uptime ${health.uptimeSeconds}s).`);
237
+ // --- Step 4b: verify the DAEMON now runs the new version ---
238
+ // The load-bearing honesty check. /health proves *a* daemon answered; this
239
+ // proves it is the NEW build. A healthy restart that still reports the old
240
+ // version means the daemon loads code `npm install -g` didn't upgrade (an
241
+ // undetected packaged split, or a stray responder on 3577). We refuse to
242
+ // claim success on the CLI verify (Step 2) alone — that copy is not what
243
+ // `onadit status`, MCP, and capture actually run.
244
+ say("==> Verifying the daemon is running the new version");
245
+ const daemonVersion = await runner.getDaemonVersion();
246
+ const daemonVerdict = evaluateUpgrade(expected, daemonVersion);
247
+ if (!daemonVerdict.ok) {
248
+ appendDaemonVerifyDiagnosis(say, {
249
+ expected,
250
+ activeVersion,
251
+ daemonVersion,
252
+ mainPath: daemonProgram.mainPath,
253
+ });
254
+ return { ok: false, step: "daemon-verify", transcript };
255
+ }
256
+ say(` Daemon now reports ${daemonVersion}.`);
257
+ // --- Step 5: refresh + relaunch menu bar ---
258
+ // installMenuBar now also launches/refreshes SwiftBar, so an update brings
259
+ // the icon back without a second manual step. A missing SwiftBar is NOT a
260
+ // failed update — we record the one recovery action and still report success.
261
+ say("==> Refreshing the Onadit menu bar");
262
+ try {
263
+ const menu = runner.installMenuBar();
264
+ if (menu.skipped) {
265
+ say(` Menu bar skipped: ${menu.reason ?? "not available"}`);
266
+ }
267
+ else if (menu.menuVisible) {
268
+ say(" Menu bar refreshed — the Onadit icon is in your menu bar.");
269
+ }
270
+ else if (menu.recovery) {
271
+ say(menu.swiftBarDetected
272
+ ? " Menu bar plugin refreshed, but the Onadit icon isn't showing yet."
273
+ : " Menu bar plugin refreshed, but SwiftBar is not installed to show it.");
274
+ say(` ${menu.recovery}`);
275
+ }
276
+ else {
277
+ say(" Menu bar refreshed.");
278
+ }
279
+ }
280
+ catch (err) {
281
+ say(" Menu bar refresh skipped.");
282
+ say(` ${err instanceof Error ? err.message : String(err)}`);
283
+ }
284
+ say("");
285
+ say("Onadit updated. Run `onadit status` to confirm the new version.");
286
+ return { ok: true, transcript };
287
+ }
288
+ /**
289
+ * Decide whether the active CLI actually upgraded. The contract is strict and
290
+ * biased toward honesty — "could not confirm" is a FAILURE, never a pass:
291
+ * - no active version at all → the binary is broken (`no_binary`).
292
+ * - no expected version → we couldn't reach the registry to learn the latest
293
+ * beta, so we cannot claim the update landed (`unverified`). This is the
294
+ * deliberate fix for "couldn't verify" silently becoming "updated".
295
+ * - active != expected → still the old (or wrong) build (`mismatch`).
296
+ * Only an active version that equals a freshly-resolved expected version is OK.
297
+ */
298
+ export function evaluateUpgrade(expected, activeVersion) {
299
+ if (!activeVersion)
300
+ return { ok: false, reason: "no_binary" };
301
+ if (!expected)
302
+ return { ok: false, reason: "unverified" };
303
+ if (activeVersion !== expected)
304
+ return { ok: false, reason: "mismatch" };
305
+ return { ok: true };
306
+ }
307
+ /**
308
+ * Friend-readable verification failure. Leads with a plain-English headline,
309
+ * then prints versions and paths so the detail is actionable. The branch is
310
+ * chosen from the classified `reason`, and — crucially — only calls it a
311
+ * prefix split when the install was NOT targeted at the active CLI's prefix.
312
+ * Since we install with `--prefix <active.prefix>` whenever we can resolve it,
313
+ * a failure there is a stale-cache / no-op, NOT a split; telling the friend to
314
+ * re-run the same targeted command would be misleading.
315
+ */
316
+ function appendVerifyDiagnosis(say, ctx) {
317
+ const { expected, activeVersion, active, installPrefix, npmPrefix, reason } = ctx;
318
+ // The prefix npm actually wrote to: the one we targeted, else npm's default.
319
+ const actualInstallPrefix = installPrefix ?? npmPrefix;
320
+ // A genuine split is only possible when we did NOT target the active prefix
321
+ // (installPrefix === null) AND the binary on PATH lives outside where npm
322
+ // installed. When we targeted active.prefix, npm wrote exactly there.
323
+ const prefixSplit = reason === "mismatch" &&
324
+ installPrefix === null &&
325
+ active.binPath !== null &&
326
+ npmPrefix !== null &&
327
+ !binaryLivesUnderPrefix(active.binPath, npmPrefix);
328
+ say("");
329
+ if (reason === "no_binary") {
330
+ say("Onadit installed, but `onadit --version` would not run afterward.");
331
+ }
332
+ else if (reason === "unverified") {
333
+ say("Onadit installed something, but I could not confirm it is the latest.");
334
+ }
335
+ else if (prefixSplit) {
336
+ say("Onadit updated one copy, but your terminal still points at another copy.");
337
+ }
338
+ else {
339
+ say("Onadit installed, but the rift in your PATH is still the old version.");
340
+ }
341
+ // Detail block — keep the headline understandable, put specifics below it.
342
+ say("");
343
+ if (expected)
344
+ say(` Expected (published @beta): ${expected}`);
345
+ else
346
+ say(" Expected (published @beta): unknown — npm registry probe failed");
347
+ say(` Active (your shell's rift): ${activeVersion ?? "unknown"}`);
348
+ if (active.binPath)
349
+ say(` Active rift path: ${active.binPath}`);
350
+ if (actualInstallPrefix) {
351
+ say(` Installed into prefix: ${actualInstallPrefix}`);
352
+ }
353
+ if (prefixSplit && npmPrefix) {
354
+ say(` npm global prefix: ${npmPrefix}`);
355
+ }
356
+ // Recovery.
357
+ say("");
358
+ if (reason === "unverified") {
359
+ say("This usually means npm couldn't reach the registry. Check your");
360
+ say("connection and re-run `onadit update`. To verify by hand:");
361
+ say(` npm view ${RIFT_BETA_TAG} version # the target`);
362
+ say(" onadit --version # what your shell runs");
363
+ }
364
+ else if (prefixSplit) {
365
+ const targetPrefix = active.prefix ?? deriveBinPrefix(active.binPath);
366
+ say("Fix: install into the copy your terminal actually runs:");
367
+ if (targetPrefix) {
368
+ say(` npm install -g --prefix ${targetPrefix} --prefer-online ${RIFT_BETA_TAG}`);
369
+ }
370
+ else {
371
+ say(` npm install -g --prefer-online ${RIFT_BETA_TAG}`);
372
+ }
373
+ }
374
+ else {
375
+ // no_binary or same-prefix no-op: most often a stale npm metadata cache.
376
+ say("Your npm metadata cache may be stale (the install was a no-op).");
377
+ say(`Fix: npm install -g --prefer-online ${RIFT_BETA_TAG}`);
378
+ say(" (if it repeats: npm cache clean --force, then re-run onadit update)");
379
+ }
380
+ }
381
+ /**
382
+ * Packaged (.pkg) install detected: `onadit update`'s npm path can't upgrade the
383
+ * bundled daemon, so we stopped before touching npm. Lead with the plain-English
384
+ * verdict, show what runs where, and point at the real recovery (.pkg reinstall).
385
+ */
386
+ function appendPackagedRecovery(say, ctx) {
387
+ const { mainPath, daemonVersion, expected } = ctx;
388
+ say("");
389
+ say("This is a packaged (.pkg) install — `onadit update` can't upgrade it.");
390
+ say("");
391
+ say("Your daemon runs from the bundled app the installer manages, not from");
392
+ say("the npm command-line tool that `onadit update` upgrades. Updating npm");
393
+ say("here would change nothing the daemon loads, so I stopped without");
394
+ say("touching anything.");
395
+ say("");
396
+ if (mainPath)
397
+ say(` Daemon app: ${mainPath}`);
398
+ if (daemonVersion)
399
+ say(` Daemon now: ${daemonVersion}`);
400
+ if (expected)
401
+ say(` Latest beta: ${expected}`);
402
+ say("");
403
+ say("To upgrade: reinstall with the latest Onadit .pkg (the same installer you");
404
+ say(`first used). Latest builds: ${RIFT_DOWNLOAD_URL}`);
405
+ }
406
+ /** Installed under the earlier npm name: point at the installer, which moves the copy across. */
407
+ function appendPreviousPackageRecovery(say) {
408
+ say("");
409
+ say("This copy was installed under Onadit's earlier npm name, which gets no more updates.");
410
+ say("");
411
+ say("npm cannot move an installed package to a new name, so the installer does it.");
412
+ say("Your archive and settings are kept. Run:");
413
+ say("");
414
+ say(` ${REINSTALL_COMMAND}`);
415
+ }
416
+ /**
417
+ * npm install + restart succeeded and /health is green, but the daemon still
418
+ * reports the old version — the update did not reach what actually runs. Name
419
+ * all three versions so the split is unambiguous, and point at the .pkg path
420
+ * (the usual cause: a packaged install whose plist we couldn't classify).
421
+ */
422
+ function appendDaemonVerifyDiagnosis(say, ctx) {
423
+ const { expected, activeVersion, daemonVersion, mainPath } = ctx;
424
+ say("");
425
+ say("Onadit upgraded the command-line tool, but the daemon is still running");
426
+ say("the old version after restarting.");
427
+ say("");
428
+ if (expected)
429
+ say(` Expected (published @beta): ${expected}`);
430
+ else
431
+ say(" Expected (published @beta): unknown — npm registry probe failed");
432
+ say(` CLI on your PATH: ${activeVersion ?? "unknown"}`);
433
+ say(` Daemon now reports: ${daemonVersion ?? "unreachable"}`);
434
+ if (mainPath)
435
+ say(` Daemon app: ${mainPath}`);
436
+ say("");
437
+ say("This means the daemon launches from a copy `onadit update` does not");
438
+ say("manage. If you installed Onadit via the .pkg, reinstall the latest .pkg");
439
+ say(`(${RIFT_DOWNLOAD_URL}). Otherwise inspect with: onadit status`);
440
+ }
441
+ /** True when `binPath` sits inside `<prefix>/bin` (i.e. npm's `-g` bin dir). */
442
+ function binaryLivesUnderPrefix(binPath, prefix) {
443
+ const binDir = path.join(prefix, "bin") + path.sep;
444
+ return (binPath + path.sep).startsWith(binDir);
445
+ }
446
+ /** prefix that owns a `<prefix>/bin/rift` binary, or null if not that shape. */
447
+ function deriveBinPrefix(binPath) {
448
+ if (!binPath)
449
+ return null;
450
+ const binDir = path.dirname(binPath);
451
+ return path.basename(binDir) === "bin" ? path.dirname(binDir) : null;
452
+ }
453
+ /**
454
+ * Read the daemon entrypoint (`main.js`) from the launchd plist's
455
+ * ProgramArguments. The array is [node, main.js, config]; index 1 is the app.
456
+ * PlistBuddy parses the real (possibly binary) plist reliably; any failure
457
+ * (no plist, bad index) returns null → classified as "unknown", not "npm".
458
+ */
459
+ async function defaultResolveDaemonProgram() {
460
+ const plist = path.join(os.homedir(), "Library", "LaunchAgents", `${RIFT_LAUNCHD_LABEL}.plist`);
461
+ const mainPath = await capture("/usr/libexec/PlistBuddy", [
462
+ "-c",
463
+ "Print :ProgramArguments:1",
464
+ plist,
465
+ ]);
466
+ return { mainPath };
467
+ }
468
+ /** Version the running daemon reports via GET /version (`.version`). */
469
+ async function defaultGetDaemonVersion() {
470
+ try {
471
+ const controller = new AbortController();
472
+ const timer = setTimeout(() => controller.abort(), 5_000);
473
+ let res;
474
+ try {
475
+ res = await fetch(`${DAEMON_BASE_URL}/version`, {
476
+ signal: controller.signal,
477
+ });
478
+ }
479
+ finally {
480
+ clearTimeout(timer);
481
+ }
482
+ if (!res.ok)
483
+ return null;
484
+ const body = (await res.json());
485
+ return typeof body.version === "string" ? body.version : null;
486
+ }
487
+ catch {
488
+ return null;
489
+ }
490
+ }
491
+ function defaultNpmInstall(spec, useSudo, prefix) {
492
+ return new Promise((resolve) => {
493
+ const prefixArgs = prefix ? ["--prefix", prefix] : [];
494
+ // `--prefer-online` forces npm to revalidate registry metadata instead of
495
+ // trusting a possibly-stale local cache — defense in depth on top of the
496
+ // pinned exact version, so even the tag-fallback path installs fresh.
497
+ const baseArgs = ["install", "-g", "--prefer-online", ...prefixArgs, spec];
498
+ const cmd = useSudo ? "sudo" : "npm";
499
+ const args = useSudo ? ["npm", ...baseArgs] : baseArgs;
500
+ const child = spawn(cmd, args, { stdio: "inherit" });
501
+ child.on("error", () => resolve(1));
502
+ child.on("close", (code) => resolve(code ?? 1));
503
+ });
504
+ }
505
+ /** Run a command, capture trimmed stdout, return null on any failure. */
506
+ function capture(cmd, args) {
507
+ return new Promise((resolve) => {
508
+ execFile(cmd, args, { timeout: 20_000, encoding: "utf8" }, (err, stdout) => {
509
+ if (err) {
510
+ resolve(null);
511
+ return;
512
+ }
513
+ const out = stdout.trim();
514
+ resolve(out.length > 0 ? out : null);
515
+ });
516
+ });
517
+ }
518
+ /**
519
+ * Resolve the `rift` the friend's shell runs and the prefix that owns it.
520
+ * Uses `command -v rift` (PATH lookup) rather than this process's own path —
521
+ * the running update is the OLD build, and we want the binary a fresh shell
522
+ * would launch. Prefix is the parent of the binary's `bin/` dir, which is
523
+ * exactly what `npm install -g --prefix` expects.
524
+ */
525
+ async function defaultResolveActiveCli() {
526
+ const binPath = await capture("/bin/sh", ["-c", "command -v rift"]);
527
+ if (!binPath)
528
+ return { binPath: null, prefix: null };
529
+ // /opt/homebrew/bin/rift → bin dir /opt/homebrew/bin → prefix /opt/homebrew
530
+ const binDir = path.dirname(binPath);
531
+ const prefix = path.basename(binDir) === "bin" ? path.dirname(binDir) : null;
532
+ return { binPath, prefix };
533
+ }
534
+ /** Version reported by the `rift` on PATH (`onadit --version`). */
535
+ async function defaultGetActiveCliVersion() {
536
+ const out = await capture("/bin/sh", ["-c", "onadit --version"]);
537
+ if (!out)
538
+ return null;
539
+ // commander prints a bare version line; tolerate any extra decoration.
540
+ const match = out.match(/\d+\.\d+\.\d+[^\s]*/);
541
+ return match ? match[0] : out;
542
+ }
543
+ /**
544
+ * Expected version from the published `@beta` dist-tag, with FRESH metadata.
545
+ * `--prefer-online` is load-bearing: without it this probe can read the same
546
+ * stale cache the install did, so a no-op install would "verify" against an
547
+ * equally-stale expected version and the command would lie.
548
+ */
549
+ function defaultGetExpectedVersion() {
550
+ return capture("npm", ["view", "--prefer-online", RIFT_BETA_TAG, "version"]);
551
+ }
552
+ /** npm's own global prefix (`npm prefix -g`). */
553
+ function defaultGetNpmGlobalPrefix() {
554
+ return capture("npm", ["prefix", "-g"]);
555
+ }
556
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/cli/commands/update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AAChC,CAAC;AAED;;;;;GAKG;AACH,SAAS,yBAAyB;IAChC,OAAO,OAAO,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,iDAAiD;AACjD,SAAS,yBAAyB;IAChC,OAAO,OAAO,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Canonical config path used when `--config` is not provided.
3
+ *
4
+ * Mirrors the path written by `scripts/install.sh`:
5
+ * $HOME/Library/Application Support/Rift/data/config.json
6
+ *
7
+ * Without this, the CLI default was `config.json` (relative to cwd),
8
+ * which broke every invocation made outside the data dir on a fresh
9
+ * friend install — `onadit status` from the home folder would `ENOENT`.
10
+ *
11
+ * Override with the `RIFT_CONFIG` env var (absolute path) for tests
12
+ * or operators running multiple instances side-by-side.
13
+ */
14
+ export declare function defaultConfigPath(): string;
15
+ //# sourceMappingURL=default-config-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-config-path.d.ts","sourceRoot":"","sources":["../../../src/cli/default-config-path.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAiB1C"}
@@ -0,0 +1,28 @@
1
+ import os from "node:os";
2
+ import path from "node:path";
3
+ /**
4
+ * Canonical config path used when `--config` is not provided.
5
+ *
6
+ * Mirrors the path written by `scripts/install.sh`:
7
+ * $HOME/Library/Application Support/Rift/data/config.json
8
+ *
9
+ * Without this, the CLI default was `config.json` (relative to cwd),
10
+ * which broke every invocation made outside the data dir on a fresh
11
+ * friend install — `onadit status` from the home folder would `ENOENT`.
12
+ *
13
+ * Override with the `RIFT_CONFIG` env var (absolute path) for tests
14
+ * or operators running multiple instances side-by-side.
15
+ */
16
+ export function defaultConfigPath() {
17
+ // Per A-2.1: empty or whitespace-only RIFT_CONFIG falls through to the
18
+ // default. Treating " " as set would give the user a confusing
19
+ // `Config not found at /<cwd>` message later, when they think they
20
+ // didn't set the env var at all.
21
+ const override = process.env.RIFT_CONFIG;
22
+ if (typeof override === "string" && override.trim().length > 0) {
23
+ return path.resolve(override);
24
+ }
25
+ return path.join(os.homedir(), "Library", "Application Support", "Rift", // rename:keep data folder name
26
+ "data", "config.json");
27
+ }
28
+ //# sourceMappingURL=default-config-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-config-path.js","sourceRoot":"","sources":["../../../src/cli/default-config-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB;IAC/B,uEAAuE;IACvE,iEAAiE;IACjE,mEAAmE;IACnE,iCAAiC;IACjC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IACzC,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CACd,EAAE,CAAC,OAAO,EAAE,EACZ,SAAS,EACT,qBAAqB,EACrB,MAAM,EAAE,+BAA+B;IACvC,MAAM,EACN,aAAa,CACd,CAAC;AACJ,CAAC"}