@quolu/lattice 0.1.0 → 0.12.2

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 (370) hide show
  1. package/README.md +87 -4
  2. package/bin/lattice-bridge.mjs +87 -0
  3. package/bin/lattice-dashboard.mjs +70 -0
  4. package/bin/lattice-mcp.mjs +9 -9
  5. package/bin/lattice.mjs +61 -8
  6. package/docs/bridge-setup.md +87 -0
  7. package/docs/schemas/lattice.plan_create_input.v1.schema.json +56 -0
  8. package/docs/schemas/lattice.plan_create_input.v2.schema.json +72 -0
  9. package/docs/schemas/lattice.plan_create_input.v3.schema.json +81 -0
  10. package/package.json +19 -7
  11. package/sensor/dist/bin/command-supervision.d.ts +1 -1
  12. package/sensor/dist/bin/command-supervision.js +4 -4
  13. package/sensor/dist/bin/command-supervision.js.map +1 -1
  14. package/sensor/dist/bin/fatal-handler.js +2 -2
  15. package/sensor/dist/bin/fatal-handler.js.map +1 -1
  16. package/sensor/dist/bin/{codegraph.js → lattice-sensor.js} +207 -328
  17. package/sensor/dist/bin/node-version-check.d.ts +7 -5
  18. package/sensor/dist/bin/node-version-check.d.ts.map +1 -1
  19. package/sensor/dist/bin/node-version-check.js +19 -14
  20. package/sensor/dist/bin/node-version-check.js.map +1 -1
  21. package/sensor/dist/context/index.d.ts +1 -1
  22. package/sensor/dist/context/index.js +6 -6
  23. package/sensor/dist/context/index.js.map +1 -1
  24. package/sensor/dist/db/index.d.ts +5 -5
  25. package/sensor/dist/db/index.d.ts.map +1 -1
  26. package/sensor/dist/db/index.js +7 -7
  27. package/sensor/dist/db/index.js.map +1 -1
  28. package/sensor/dist/db/migrations.js +1 -1
  29. package/sensor/dist/db/migrations.js.map +1 -1
  30. package/sensor/dist/db/queries.d.ts +1 -1
  31. package/sensor/dist/db/queries.js +5 -5
  32. package/sensor/dist/db/queries.js.map +1 -1
  33. package/sensor/dist/db/schema.sql +2 -2
  34. package/sensor/dist/db/sqlite-adapter.d.ts +2 -2
  35. package/sensor/dist/db/sqlite-adapter.js +3 -3
  36. package/sensor/dist/db/sqlite-adapter.js.map +1 -1
  37. package/sensor/dist/db/wal-valve.d.ts +1 -1
  38. package/sensor/dist/db/wal-valve.d.ts.map +1 -1
  39. package/sensor/dist/db/wal-valve.js +2 -2
  40. package/sensor/dist/db/wal-valve.js.map +1 -1
  41. package/sensor/dist/directory.d.ts +27 -63
  42. package/sensor/dist/directory.d.ts.map +1 -1
  43. package/sensor/dist/directory.js +78 -134
  44. package/sensor/dist/directory.js.map +1 -1
  45. package/sensor/dist/errors.d.ts +15 -15
  46. package/sensor/dist/errors.d.ts.map +1 -1
  47. package/sensor/dist/errors.js +21 -21
  48. package/sensor/dist/errors.js.map +1 -1
  49. package/sensor/dist/extraction/dynamic-import.d.ts +1 -1
  50. package/sensor/dist/extraction/dynamic-import.js +1 -1
  51. package/sensor/dist/extraction/extraction-version.d.ts +1 -1
  52. package/sensor/dist/extraction/extraction-version.js +1 -1
  53. package/sensor/dist/extraction/generated-detection.d.ts +1 -1
  54. package/sensor/dist/extraction/generated-detection.js +1 -1
  55. package/sensor/dist/extraction/grammars.d.ts +3 -3
  56. package/sensor/dist/extraction/grammars.js +5 -5
  57. package/sensor/dist/extraction/grammars.js.map +1 -1
  58. package/sensor/dist/extraction/index.d.ts +6 -6
  59. package/sensor/dist/extraction/index.js +50 -50
  60. package/sensor/dist/extraction/index.js.map +1 -1
  61. package/sensor/dist/extraction/kernel/decode.d.ts +1 -1
  62. package/sensor/dist/extraction/kernel/decode.js +1 -1
  63. package/sensor/dist/extraction/kernel/index.d.ts +3 -3
  64. package/sensor/dist/extraction/kernel/index.js +6 -6
  65. package/sensor/dist/extraction/kernel/index.js.map +1 -1
  66. package/sensor/dist/extraction/kernel/layout.d.ts +1 -1
  67. package/sensor/dist/extraction/kernel/layout.js +1 -1
  68. package/sensor/dist/extraction/kernel/loader.d.ts +6 -6
  69. package/sensor/dist/extraction/kernel/loader.js +13 -13
  70. package/sensor/dist/extraction/kernel/loader.js.map +1 -1
  71. package/sensor/dist/extraction/languages/cfquery.d.ts +1 -1
  72. package/sensor/dist/extraction/languages/cfquery.js +1 -1
  73. package/sensor/dist/extraction/languages/lua.d.ts +11 -0
  74. package/sensor/dist/extraction/languages/lua.d.ts.map +1 -1
  75. package/sensor/dist/extraction/languages/lua.js +1 -0
  76. package/sensor/dist/extraction/languages/lua.js.map +1 -1
  77. package/sensor/dist/extraction/parse-pool.d.ts +5 -5
  78. package/sensor/dist/extraction/parse-pool.d.ts.map +1 -1
  79. package/sensor/dist/extraction/parse-pool.js +4 -4
  80. package/sensor/dist/extraction/parse-worker.js +1 -1
  81. package/sensor/dist/extraction/parse-worker.js.map +1 -1
  82. package/sensor/dist/extraction/store-writer.d.ts +1 -1
  83. package/sensor/dist/extraction/store-writer.js +1 -1
  84. package/sensor/dist/extraction/svelte-extractor.d.ts +1 -1
  85. package/sensor/dist/extraction/svelte-extractor.js +1 -1
  86. package/sensor/dist/extraction/tree-sitter-helpers.js +1 -1
  87. package/sensor/dist/extraction/tree-sitter.d.ts +2 -2
  88. package/sensor/dist/extraction/tree-sitter.d.ts.map +1 -1
  89. package/sensor/dist/extraction/tree-sitter.js +71 -4
  90. package/sensor/dist/extraction/tree-sitter.js.map +1 -1
  91. package/sensor/dist/extraction/wasm-runtime-flags.d.ts +2 -2
  92. package/sensor/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
  93. package/sensor/dist/extraction/wasm-runtime-flags.js +5 -5
  94. package/sensor/dist/extraction/wasm-runtime-flags.js.map +1 -1
  95. package/sensor/dist/index.d.ts +36 -36
  96. package/sensor/dist/index.d.ts.map +1 -1
  97. package/sensor/dist/index.js +71 -71
  98. package/sensor/dist/index.js.map +1 -1
  99. package/sensor/dist/mcp/daemon-manager.js +1 -1
  100. package/sensor/dist/mcp/daemon-paths.d.ts +3 -3
  101. package/sensor/dist/mcp/daemon-paths.js +7 -7
  102. package/sensor/dist/mcp/daemon-paths.js.map +1 -1
  103. package/sensor/dist/mcp/daemon-registry.d.ts +2 -2
  104. package/sensor/dist/mcp/daemon-registry.js +5 -5
  105. package/sensor/dist/mcp/daemon.d.ts +7 -7
  106. package/sensor/dist/mcp/daemon.d.ts.map +1 -1
  107. package/sensor/dist/mcp/daemon.js +21 -21
  108. package/sensor/dist/mcp/daemon.js.map +1 -1
  109. package/sensor/dist/mcp/dynamic-boundaries.js +1 -1
  110. package/sensor/dist/mcp/engine.d.ts +9 -9
  111. package/sensor/dist/mcp/engine.d.ts.map +1 -1
  112. package/sensor/dist/mcp/engine.js +44 -44
  113. package/sensor/dist/mcp/engine.js.map +1 -1
  114. package/sensor/dist/mcp/index.d.ts +14 -14
  115. package/sensor/dist/mcp/index.d.ts.map +1 -1
  116. package/sensor/dist/mcp/index.js +41 -41
  117. package/sensor/dist/mcp/index.js.map +1 -1
  118. package/sensor/dist/mcp/liveness-watchdog.js +7 -7
  119. package/sensor/dist/mcp/liveness-watchdog.js.map +1 -1
  120. package/sensor/dist/mcp/ppid-watchdog.d.ts +3 -3
  121. package/sensor/dist/mcp/ppid-watchdog.js +2 -2
  122. package/sensor/dist/mcp/proxy.d.ts.map +1 -1
  123. package/sensor/dist/mcp/proxy.js +37 -37
  124. package/sensor/dist/mcp/proxy.js.map +1 -1
  125. package/sensor/dist/mcp/query-pool.d.ts +3 -3
  126. package/sensor/dist/mcp/query-pool.js +7 -7
  127. package/sensor/dist/mcp/query-pool.js.map +1 -1
  128. package/sensor/dist/mcp/query-worker.d.ts +2 -2
  129. package/sensor/dist/mcp/query-worker.js +7 -7
  130. package/sensor/dist/mcp/query-worker.js.map +1 -1
  131. package/sensor/dist/mcp/server-instructions.d.ts +10 -12
  132. package/sensor/dist/mcp/server-instructions.d.ts.map +1 -1
  133. package/sensor/dist/mcp/server-instructions.js +39 -37
  134. package/sensor/dist/mcp/server-instructions.js.map +1 -1
  135. package/sensor/dist/mcp/session.d.ts +2 -2
  136. package/sensor/dist/mcp/session.js +18 -18
  137. package/sensor/dist/mcp/session.js.map +1 -1
  138. package/sensor/dist/mcp/startup-handshake.d.ts +3 -3
  139. package/sensor/dist/mcp/startup-handshake.d.ts.map +1 -1
  140. package/sensor/dist/mcp/startup-handshake.js +3 -3
  141. package/sensor/dist/mcp/startup-handshake.js.map +1 -1
  142. package/sensor/dist/mcp/tools.d.ts +53 -53
  143. package/sensor/dist/mcp/tools.d.ts.map +1 -1
  144. package/sensor/dist/mcp/tools.js +180 -216
  145. package/sensor/dist/mcp/tools.js.map +1 -1
  146. package/sensor/dist/mcp/transport.d.ts +1 -1
  147. package/sensor/dist/mcp/transport.js +6 -6
  148. package/sensor/dist/mcp/transport.js.map +1 -1
  149. package/sensor/dist/mcp/version.d.ts +2 -2
  150. package/sensor/dist/mcp/version.d.ts.map +1 -1
  151. package/sensor/dist/mcp/version.js +3 -3
  152. package/sensor/dist/mcp/version.js.map +1 -1
  153. package/sensor/dist/project-config.d.ts +6 -6
  154. package/sensor/dist/project-config.d.ts.map +1 -1
  155. package/sensor/dist/project-config.js +10 -10
  156. package/sensor/dist/project-config.js.map +1 -1
  157. package/sensor/dist/resolution/callback-synthesizer.js +4 -4
  158. package/sensor/dist/resolution/callback-synthesizer.js.map +1 -1
  159. package/sensor/dist/resolution/frameworks/drupal.d.ts +3 -3
  160. package/sensor/dist/resolution/frameworks/drupal.js +3 -3
  161. package/sensor/dist/resolution/frameworks/fabric.js +1 -1
  162. package/sensor/dist/resolution/frameworks/fabric.js.map +1 -1
  163. package/sensor/dist/resolution/frameworks/java.js +1 -1
  164. package/sensor/dist/resolution/frameworks/java.js.map +1 -1
  165. package/sensor/dist/resolution/frameworks/svelte.js +1 -1
  166. package/sensor/dist/resolution/frameworks/svelte.js.map +1 -1
  167. package/sensor/dist/resolution/goframe-synthesizer.d.ts +1 -1
  168. package/sensor/dist/resolution/goframe-synthesizer.js +1 -1
  169. package/sensor/dist/resolution/index.d.ts +1 -1
  170. package/sensor/dist/resolution/index.js +9 -9
  171. package/sensor/dist/resolution/index.js.map +1 -1
  172. package/sensor/dist/resolution/name-matcher.js +2 -2
  173. package/sensor/dist/resolution/name-matcher.js.map +1 -1
  174. package/sensor/dist/resolution/resolver-pool.d.ts +2 -2
  175. package/sensor/dist/resolution/resolver-pool.js +4 -4
  176. package/sensor/dist/resolution/resolver-pool.js.map +1 -1
  177. package/sensor/dist/resolution/resolver-worker.js +2 -2
  178. package/sensor/dist/resolution/resolver-worker.js.map +1 -1
  179. package/sensor/dist/resolution/workspace-packages.js +1 -1
  180. package/sensor/dist/resolution/workspace-packages.js.map +1 -1
  181. package/sensor/dist/search/identifier-segments.d.ts +1 -1
  182. package/sensor/dist/search/identifier-segments.js +1 -1
  183. package/sensor/dist/search/query-utils.d.ts +1 -0
  184. package/sensor/dist/search/query-utils.d.ts.map +1 -1
  185. package/sensor/dist/search/query-utils.js +10 -3
  186. package/sensor/dist/search/query-utils.js.map +1 -1
  187. package/sensor/dist/sync/git-hooks.d.ts +9 -9
  188. package/sensor/dist/sync/git-hooks.d.ts.map +1 -1
  189. package/sensor/dist/sync/git-hooks.js +15 -15
  190. package/sensor/dist/sync/git-hooks.js.map +1 -1
  191. package/sensor/dist/sync/watch-policy.d.ts +2 -2
  192. package/sensor/dist/sync/watch-policy.js +5 -5
  193. package/sensor/dist/sync/watch-policy.js.map +1 -1
  194. package/sensor/dist/sync/watcher.d.ts +2 -2
  195. package/sensor/dist/sync/watcher.d.ts.map +1 -1
  196. package/sensor/dist/sync/watcher.js +16 -16
  197. package/sensor/dist/sync/watcher.js.map +1 -1
  198. package/sensor/dist/sync/worktree.d.ts +5 -5
  199. package/sensor/dist/sync/worktree.d.ts.map +1 -1
  200. package/sensor/dist/sync/worktree.js +9 -9
  201. package/sensor/dist/sync/worktree.js.map +1 -1
  202. package/sensor/dist/telemetry/index.d.ts +8 -8
  203. package/sensor/dist/telemetry/index.d.ts.map +1 -1
  204. package/sensor/dist/telemetry/index.js +16 -16
  205. package/sensor/dist/telemetry/index.js.map +1 -1
  206. package/sensor/dist/types.d.ts +2 -2
  207. package/sensor/dist/types.js +1 -1
  208. package/sensor/dist/ui/color.d.ts +2 -2
  209. package/sensor/dist/ui/color.js +2 -2
  210. package/sensor/dist/ui/glyphs.d.ts +3 -3
  211. package/sensor/dist/ui/glyphs.js +7 -7
  212. package/sensor/dist/ui/glyphs.js.map +1 -1
  213. package/sensor/dist/utils.d.ts +4 -4
  214. package/sensor/dist/utils.js +8 -8
  215. package/sensor/dist/utils.js.map +1 -1
  216. package/sensor/package.json +8 -13
  217. package/src/artifact-contracts.mjs +2 -2
  218. package/src/boundary-compiler.mjs +28 -28
  219. package/src/boundary-observation-compiler-v2.mjs +10 -10
  220. package/src/bounded-seam.mjs +144 -0
  221. package/src/bridge-cli.mjs +227 -0
  222. package/src/bridge-config.mjs +346 -0
  223. package/src/bridge-daemon.mjs +328 -0
  224. package/src/bridge-launch-agent.mjs +311 -0
  225. package/src/bridge-server.mjs +309 -0
  226. package/src/cli-help.mjs +163 -0
  227. package/src/control-compiler.mjs +30 -30
  228. package/src/dag-chain.mjs +261 -0
  229. package/src/factory-diagnostics.mjs +8 -7
  230. package/src/hash-chain.mjs +76 -0
  231. package/src/node-version-guard.mjs +5 -4
  232. package/src/project-cli.mjs +392 -0
  233. package/src/project-identity.mjs +71 -0
  234. package/src/rc1-evidence-bundle.mjs +16 -16
  235. package/src/rc1-v4-campaign.mjs +15 -14
  236. package/src/rc1-v5-artifact-set.mjs +2 -2
  237. package/src/rc1-v5-campaign.mjs +15 -14
  238. package/src/rc1-v6-artifact-set.mjs +18 -18
  239. package/src/rc1-v6-campaign.mjs +16 -16
  240. package/src/rc1-v6-causal-binding.mjs +16 -14
  241. package/src/rc1-v6-measurement.mjs +20 -38
  242. package/src/rc2-artifact-set.mjs +45 -40
  243. package/src/rc2-campaign.mjs +48 -66
  244. package/src/rc2-delivery-policy-front-end.mjs +30 -30
  245. package/src/rc2-rc1-transfer-front-end.mjs +5 -5
  246. package/src/rc3-actual-dogfood.mjs +6 -6
  247. package/src/rc3-dogfood-scaffold.mjs +12 -7
  248. package/src/rc3-scripted-campaign.mjs +75 -21
  249. package/src/rc4-stage1-dogfood.mjs +24 -7
  250. package/src/runtime-cli.mjs +2424 -45
  251. package/src/runtime-contracts.mjs +7 -7
  252. package/src/runtime-control-store.mjs +547 -0
  253. package/src/runtime-controller-protocol.mjs +517 -0
  254. package/src/runtime-direct-os-observer.mjs +284 -0
  255. package/src/runtime-engine.mjs +2 -2
  256. package/src/runtime-errors.mjs +1 -1
  257. package/src/runtime-event-store.mjs +15 -43
  258. package/src/runtime-front-end.mjs +26 -26
  259. package/src/runtime-gate-store.mjs +477 -0
  260. package/src/runtime-hold-recompile.mjs +214 -23
  261. package/src/runtime-lifecycle-lock.mjs +290 -0
  262. package/src/runtime-managed-supervisor.mjs +1276 -0
  263. package/src/runtime-multi-epoch-store.mjs +761 -0
  264. package/src/runtime-projection.mjs +62 -0
  265. package/src/seam-transform.mjs +38 -38
  266. package/src/{codegraph-adapter.mjs → sensor-adapter.mjs} +7 -7
  267. package/src/sensor-cli.mjs +107 -0
  268. package/src/sensor-runtime.mjs +48 -0
  269. package/src/timestamp-contract.mjs +8 -0
  270. package/src/todo-chain.mjs +178 -0
  271. package/src/todo-cli.mjs +1032 -0
  272. package/src/todo-contracts.mjs +501 -0
  273. package/src/todo-dashboard-registry.mjs +318 -0
  274. package/src/todo-gantt-html.mjs +416 -0
  275. package/src/todo-gantt-layout.mjs +603 -0
  276. package/src/todo-gantt-live.mjs +269 -0
  277. package/src/todo-gantt-presentation.mjs +217 -0
  278. package/src/todo-gantt-svg.mjs +249 -0
  279. package/src/todo-markdown-renderer.mjs +260 -0
  280. package/src/todo-migration.mjs +260 -0
  281. package/src/todo-narrative-anchor.mjs +130 -0
  282. package/src/todo-revision.mjs +425 -0
  283. package/src/todo-status.mjs +340 -0
  284. package/src/todo-store.mjs +3451 -0
  285. package/src/treatment-compiler.mjs +28 -28
  286. package/src/treatment-runner.mjs +42 -44
  287. package/sensor/dist/bin/codegraph.d.ts +0 -26
  288. package/sensor/dist/bin/codegraph.d.ts.map +0 -1
  289. package/sensor/dist/bin/codegraph.js.map +0 -1
  290. package/sensor/dist/bin/uninstall.d.ts +0 -14
  291. package/sensor/dist/bin/uninstall.d.ts.map +0 -1
  292. package/sensor/dist/bin/uninstall.js +0 -36
  293. package/sensor/dist/bin/uninstall.js.map +0 -1
  294. package/sensor/dist/installer/beta-signup.d.ts +0 -54
  295. package/sensor/dist/installer/beta-signup.d.ts.map +0 -1
  296. package/sensor/dist/installer/beta-signup.js +0 -178
  297. package/sensor/dist/installer/beta-signup.js.map +0 -1
  298. package/sensor/dist/installer/config-writer.d.ts +0 -28
  299. package/sensor/dist/installer/config-writer.d.ts.map +0 -1
  300. package/sensor/dist/installer/config-writer.js +0 -91
  301. package/sensor/dist/installer/config-writer.js.map +0 -1
  302. package/sensor/dist/installer/index.d.ts +0 -142
  303. package/sensor/dist/installer/index.d.ts.map +0 -1
  304. package/sensor/dist/installer/index.js +0 -622
  305. package/sensor/dist/installer/index.js.map +0 -1
  306. package/sensor/dist/installer/instructions-template.d.ts +0 -41
  307. package/sensor/dist/installer/instructions-template.d.ts.map +0 -1
  308. package/sensor/dist/installer/instructions-template.js +0 -53
  309. package/sensor/dist/installer/instructions-template.js.map +0 -1
  310. package/sensor/dist/installer/targets/antigravity.d.ts +0 -57
  311. package/sensor/dist/installer/targets/antigravity.d.ts.map +0 -1
  312. package/sensor/dist/installer/targets/antigravity.js +0 -308
  313. package/sensor/dist/installer/targets/antigravity.js.map +0 -1
  314. package/sensor/dist/installer/targets/claude.d.ts +0 -62
  315. package/sensor/dist/installer/targets/claude.d.ts.map +0 -1
  316. package/sensor/dist/installer/targets/claude.js +0 -454
  317. package/sensor/dist/installer/targets/claude.js.map +0 -1
  318. package/sensor/dist/installer/targets/codex.d.ts +0 -18
  319. package/sensor/dist/installer/targets/codex.d.ts.map +0 -1
  320. package/sensor/dist/installer/targets/codex.js +0 -185
  321. package/sensor/dist/installer/targets/codex.js.map +0 -1
  322. package/sensor/dist/installer/targets/cursor.d.ts +0 -35
  323. package/sensor/dist/installer/targets/cursor.d.ts.map +0 -1
  324. package/sensor/dist/installer/targets/cursor.js +0 -254
  325. package/sensor/dist/installer/targets/cursor.js.map +0 -1
  326. package/sensor/dist/installer/targets/gemini.d.ts +0 -26
  327. package/sensor/dist/installer/targets/gemini.d.ts.map +0 -1
  328. package/sensor/dist/installer/targets/gemini.js +0 -165
  329. package/sensor/dist/installer/targets/gemini.js.map +0 -1
  330. package/sensor/dist/installer/targets/hermes.d.ts +0 -18
  331. package/sensor/dist/installer/targets/hermes.d.ts.map +0 -1
  332. package/sensor/dist/installer/targets/hermes.js +0 -359
  333. package/sensor/dist/installer/targets/hermes.js.map +0 -1
  334. package/sensor/dist/installer/targets/kiro.d.ts +0 -27
  335. package/sensor/dist/installer/targets/kiro.d.ts.map +0 -1
  336. package/sensor/dist/installer/targets/kiro.js +0 -178
  337. package/sensor/dist/installer/targets/kiro.js.map +0 -1
  338. package/sensor/dist/installer/targets/opencode.d.ts +0 -38
  339. package/sensor/dist/installer/targets/opencode.d.ts.map +0 -1
  340. package/sensor/dist/installer/targets/opencode.js +0 -288
  341. package/sensor/dist/installer/targets/opencode.js.map +0 -1
  342. package/sensor/dist/installer/targets/registry.d.ts +0 -35
  343. package/sensor/dist/installer/targets/registry.d.ts.map +0 -1
  344. package/sensor/dist/installer/targets/registry.js +0 -91
  345. package/sensor/dist/installer/targets/registry.js.map +0 -1
  346. package/sensor/dist/installer/targets/shared.d.ts +0 -101
  347. package/sensor/dist/installer/targets/shared.d.ts.map +0 -1
  348. package/sensor/dist/installer/targets/shared.js +0 -264
  349. package/sensor/dist/installer/targets/shared.js.map +0 -1
  350. package/sensor/dist/installer/targets/toml.d.ts +0 -52
  351. package/sensor/dist/installer/targets/toml.d.ts.map +0 -1
  352. package/sensor/dist/installer/targets/toml.js +0 -147
  353. package/sensor/dist/installer/targets/toml.js.map +0 -1
  354. package/sensor/dist/installer/targets/types.d.ts +0 -108
  355. package/sensor/dist/installer/targets/types.d.ts.map +0 -1
  356. package/sensor/dist/installer/targets/types.js +0 -16
  357. package/sensor/dist/installer/targets/types.js.map +0 -1
  358. package/sensor/dist/upgrade/index.d.ts +0 -171
  359. package/sensor/dist/upgrade/index.d.ts.map +0 -1
  360. package/sensor/dist/upgrade/index.js +0 -659
  361. package/sensor/dist/upgrade/index.js.map +0 -1
  362. package/sensor/dist/upgrade/remove-binary.d.ts +0 -87
  363. package/sensor/dist/upgrade/remove-binary.d.ts.map +0 -1
  364. package/sensor/dist/upgrade/remove-binary.js +0 -289
  365. package/sensor/dist/upgrade/remove-binary.js.map +0 -1
  366. package/sensor/dist/upgrade/update-check.d.ts +0 -92
  367. package/sensor/dist/upgrade/update-check.d.ts.map +0 -1
  368. package/sensor/dist/upgrade/update-check.js +0 -258
  369. package/sensor/dist/upgrade/update-check.js.map +0 -1
  370. package/src/bootstrap.mjs +0 -88
@@ -1,36 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- /**
4
- * CodeGraph preuninstall cleanup script
5
- *
6
- * Runs automatically when `npm uninstall -g @colbymchenry/codegraph`
7
- * is called. Loops over every known agent target's `uninstall(loc)`
8
- * for the global location only — local-location entries live inside
9
- * project working trees and aren't ours to nuke at npm-uninstall
10
- * time.
11
- *
12
- * This script must never throw — a failed cleanup must not block
13
- * uninstall.
14
- */
15
- try {
16
- // Lazy require so any module-level error in the registry can't
17
- // bubble out and abort the npm uninstall.
18
- // eslint-disable-next-line @typescript-eslint/no-require-imports
19
- const { ALL_TARGETS } = require('../installer/targets/registry');
20
- for (const target of ALL_TARGETS) {
21
- if (!target.supportsLocation('global'))
22
- continue;
23
- try {
24
- target.uninstall('global');
25
- }
26
- catch {
27
- // Each target is independently safe-to-skip; per-target failure
28
- // must not stop the loop.
29
- }
30
- }
31
- }
32
- catch {
33
- // If the registry itself can't be loaded (e.g. partial install),
34
- // we silently skip cleanup. Uninstall still completes.
35
- }
36
- //# sourceMappingURL=uninstall.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../src/bin/uninstall.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;GAWG;AAEH,IAAI,CAAC;IACH,+DAA+D;IAC/D,0CAA0C;IAC1C,iEAAiE;IACjE,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,+BAA+B,CACf,CAAC;IAEjD,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC;YAAE,SAAS;QACjD,IAAI,CAAC;YACH,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAC7B,CAAC;QAAC,MAAM,CAAC;YACP,gEAAgE;YAChE,0BAA0B;QAC5B,CAAC;IACH,CAAC;AACH,CAAC;AAAC,MAAM,CAAC;IACP,iEAAiE;IACjE,uDAAuD;AACzD,CAAC"}
@@ -1,54 +0,0 @@
1
- /**
2
- * CodeGraph Pro beta opt-in — the installer's one-time offer to join the
3
- * beta-access waitlist (the same list the getcodegraph.com homepage form
4
- * feeds). Strictly opt-in: the user must answer yes AND type their email;
5
- * nothing is ever sent otherwise, and `--yes` / non-interactive runs never
6
- * see the prompt.
7
- *
8
- * The choice (subscribed or declined) is stored once in the user-level
9
- * state dir (~/.codegraph) so re-installs and upgrades never re-ask —
10
- * mirroring the telemetry consent pattern. A failed submit stores nothing,
11
- * so a later install can offer again.
12
- */
13
- /** JSON waitlist endpoint on the landing page (see its /api/waitlist route). */
14
- export declare const BETA_SIGNUP_ENDPOINT = "https://getcodegraph.com/api/waitlist";
15
- export declare const BETA_SIGNUP_URL = "https://getcodegraph.com";
16
- /** Same shape the landing-page form validates against. */
17
- export declare const EMAIL_RE: RegExp;
18
- export interface BetaSignupDeps {
19
- /** Global state dir; defaults to ~/.codegraph. Tests inject a temp dir. */
20
- dir?: string;
21
- fetchImpl?: typeof fetch;
22
- now?: () => Date;
23
- /** Where the signup came from, recorded with the email. */
24
- source?: 'cli-install' | 'cli-upgrade';
25
- /** TTY probes; default to the real process streams. Tests inject. */
26
- stdinIsTTY?: boolean;
27
- stdoutIsTTY?: boolean;
28
- }
29
- /** True once the user has answered (either way) on this machine. */
30
- export declare function hasBetaSignupChoice(deps?: BetaSignupDeps): boolean;
31
- /** Persist the answer so no future install re-asks. Fail silent. */
32
- export declare function recordBetaSignupChoice(subscribed: boolean, deps?: BetaSignupDeps): void;
33
- /**
34
- * Submit one email to the beta waitlist. Returns true on success, false on
35
- * any failure (bad response, offline, timeout) — never throws, never retries.
36
- */
37
- export declare function submitBetaSignup(email: string, deps?: BetaSignupDeps): Promise<boolean>;
38
- /**
39
- * The one gate every ask site shares: offer only on a real terminal, and
40
- * never once ANY prior ask (install or upgrade) has been answered on this
41
- * machine. Exported separately so the no-spam rule is unit-testable.
42
- */
43
- export declare function shouldOfferBetaSignup(deps?: BetaSignupDeps): boolean;
44
- /**
45
- * The full interactive offer: confirm → email → submit → remember. Shared by
46
- * `codegraph install` (end of a successful install) and `codegraph upgrade`
47
- * (after a successful binary update). Silently does nothing when the gate
48
- * says no; never throws — a marketing question must not fail the command
49
- * that hosts it. Cancel (Ctrl-C) and a failed submit store nothing, so a
50
- * later install/upgrade may offer again; an explicit yes or no is stored
51
- * forever.
52
- */
53
- export declare function maybeOfferBetaSignup(deps?: BetaSignupDeps): Promise<void>;
54
- //# sourceMappingURL=beta-signup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"beta-signup.d.ts","sourceRoot":"","sources":["../../src/installer/beta-signup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,0CAA0C,CAAC;AAC5E,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAE1D,0DAA0D;AAC1D,eAAO,MAAM,QAAQ,QAA+B,CAAC;AASrD,MAAM,WAAW,cAAc;IAC7B,2EAA2E;IAC3E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;IACjB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,aAAa,GAAG,aAAa,CAAC;IACvC,qEAAqE;IACrE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAMD,oEAAoE;AACpE,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,cAAmB,GAAG,OAAO,CAOtE;AAED,oEAAoE;AACpE,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,OAAO,EACnB,IAAI,GAAE,cAAmB,GACxB,IAAI,CAYN;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,cAAmB,GACxB,OAAO,CAAC,OAAO,CAAC,CAalB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,GAAE,cAAmB,GAAG,OAAO,CAKxE;AAQD;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4CnF"}
@@ -1,178 +0,0 @@
1
- "use strict";
2
- /**
3
- * CodeGraph Pro beta opt-in — the installer's one-time offer to join the
4
- * beta-access waitlist (the same list the getcodegraph.com homepage form
5
- * feeds). Strictly opt-in: the user must answer yes AND type their email;
6
- * nothing is ever sent otherwise, and `--yes` / non-interactive runs never
7
- * see the prompt.
8
- *
9
- * The choice (subscribed or declined) is stored once in the user-level
10
- * state dir (~/.codegraph) so re-installs and upgrades never re-ask —
11
- * mirroring the telemetry consent pattern. A failed submit stores nothing,
12
- * so a later install can offer again.
13
- */
14
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
- if (k2 === undefined) k2 = k;
16
- var desc = Object.getOwnPropertyDescriptor(m, k);
17
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
18
- desc = { enumerable: true, get: function() { return m[k]; } };
19
- }
20
- Object.defineProperty(o, k2, desc);
21
- }) : (function(o, m, k, k2) {
22
- if (k2 === undefined) k2 = k;
23
- o[k2] = m[k];
24
- }));
25
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
26
- Object.defineProperty(o, "default", { enumerable: true, value: v });
27
- }) : function(o, v) {
28
- o["default"] = v;
29
- });
30
- var __importStar = (this && this.__importStar) || (function () {
31
- var ownKeys = function(o) {
32
- ownKeys = Object.getOwnPropertyNames || function (o) {
33
- var ar = [];
34
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
35
- return ar;
36
- };
37
- return ownKeys(o);
38
- };
39
- return function (mod) {
40
- if (mod && mod.__esModule) return mod;
41
- var result = {};
42
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
43
- __setModuleDefault(result, mod);
44
- return result;
45
- };
46
- })();
47
- Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.EMAIL_RE = exports.BETA_SIGNUP_URL = exports.BETA_SIGNUP_ENDPOINT = void 0;
49
- exports.hasBetaSignupChoice = hasBetaSignupChoice;
50
- exports.recordBetaSignupChoice = recordBetaSignupChoice;
51
- exports.submitBetaSignup = submitBetaSignup;
52
- exports.shouldOfferBetaSignup = shouldOfferBetaSignup;
53
- exports.maybeOfferBetaSignup = maybeOfferBetaSignup;
54
- const fs = __importStar(require("fs"));
55
- const path = __importStar(require("path"));
56
- const os = __importStar(require("os"));
57
- /** JSON waitlist endpoint on the landing page (see its /api/waitlist route). */
58
- exports.BETA_SIGNUP_ENDPOINT = 'https://getcodegraph.com/api/waitlist';
59
- exports.BETA_SIGNUP_URL = 'https://getcodegraph.com';
60
- /** Same shape the landing-page form validates against. */
61
- exports.EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
62
- const SUBMIT_TIMEOUT_MS = 8_000;
63
- function choicePath(deps = {}) {
64
- return path.join(deps.dir ?? path.join(os.homedir(), '.codegraph'), 'beta-signup.json');
65
- }
66
- /** True once the user has answered (either way) on this machine. */
67
- function hasBetaSignupChoice(deps = {}) {
68
- try {
69
- const raw = JSON.parse(fs.readFileSync(choicePath(deps), 'utf8'));
70
- return raw.status === 'subscribed' || raw.status === 'declined';
71
- }
72
- catch {
73
- return false;
74
- }
75
- }
76
- /** Persist the answer so no future install re-asks. Fail silent. */
77
- function recordBetaSignupChoice(subscribed, deps = {}) {
78
- try {
79
- const file = choicePath(deps);
80
- fs.mkdirSync(path.dirname(file), { recursive: true });
81
- const choice = {
82
- status: subscribed ? 'subscribed' : 'declined',
83
- updated_at: (deps.now?.() ?? new Date()).toISOString(),
84
- };
85
- fs.writeFileSync(file, JSON.stringify(choice, null, 2) + '\n');
86
- }
87
- catch {
88
- /* a full disk must not break the installer */
89
- }
90
- }
91
- /**
92
- * Submit one email to the beta waitlist. Returns true on success, false on
93
- * any failure (bad response, offline, timeout) — never throws, never retries.
94
- */
95
- async function submitBetaSignup(email, deps = {}) {
96
- const fetchImpl = deps.fetchImpl ?? globalThis.fetch;
97
- try {
98
- const res = await fetchImpl(exports.BETA_SIGNUP_ENDPOINT, {
99
- method: 'POST',
100
- headers: { 'Content-Type': 'application/json' },
101
- body: JSON.stringify({ email, source: deps.source ?? 'cli-install' }),
102
- signal: AbortSignal.timeout(SUBMIT_TIMEOUT_MS),
103
- });
104
- return res.ok;
105
- }
106
- catch {
107
- return false;
108
- }
109
- }
110
- /**
111
- * The one gate every ask site shares: offer only on a real terminal, and
112
- * never once ANY prior ask (install or upgrade) has been answered on this
113
- * machine. Exported separately so the no-spam rule is unit-testable.
114
- */
115
- function shouldOfferBetaSignup(deps = {}) {
116
- const stdinTTY = deps.stdinIsTTY ?? process.stdin.isTTY;
117
- const stdoutTTY = deps.stdoutIsTTY ?? process.stdout.isTTY;
118
- if (!stdinTTY || !stdoutTTY)
119
- return false;
120
- return !hasBetaSignupChoice(deps);
121
- }
122
- // Dynamic import helper — tsc compiles import() to require() in CJS mode,
123
- // which fails for ESM-only packages (same trick as installer/index.ts).
124
- // eslint-disable-next-line @typescript-eslint/no-implied-eval
125
- const importESM = new Function('specifier', 'return import(specifier)');
126
- /**
127
- * The full interactive offer: confirm → email → submit → remember. Shared by
128
- * `codegraph install` (end of a successful install) and `codegraph upgrade`
129
- * (after a successful binary update). Silently does nothing when the gate
130
- * says no; never throws — a marketing question must not fail the command
131
- * that hosts it. Cancel (Ctrl-C) and a failed submit store nothing, so a
132
- * later install/upgrade may offer again; an explicit yes or no is stored
133
- * forever.
134
- */
135
- async function maybeOfferBetaSignup(deps = {}) {
136
- try {
137
- if (!shouldOfferBetaSignup(deps))
138
- return;
139
- const clack = await importESM('@clack/prompts');
140
- const wantsBeta = await clack.confirm({
141
- message: 'Want early access to CodeGraph Pro? Join the beta waitlist — we’ll only email you about CodeGraph, never share your address.',
142
- initialValue: true,
143
- });
144
- if (clack.isCancel(wantsBeta)) {
145
- clack.log.info(`Skipped — you can join anytime at ${exports.BETA_SIGNUP_URL}.`);
146
- return;
147
- }
148
- if (!wantsBeta) {
149
- recordBetaSignupChoice(false, deps);
150
- clack.log.info(`No problem — you can join anytime at ${exports.BETA_SIGNUP_URL}.`);
151
- return;
152
- }
153
- const email = await clack.text({
154
- message: 'What email should we send beta access to?',
155
- placeholder: 'you@company.com',
156
- validate: (value) => exports.EMAIL_RE.test((value ?? '').trim()) ? undefined : 'That email address doesn’t look right.',
157
- });
158
- if (clack.isCancel(email)) {
159
- clack.log.info(`Skipped — you can join anytime at ${exports.BETA_SIGNUP_URL}.`);
160
- return;
161
- }
162
- const s = clack.spinner();
163
- s.start('Joining the beta waitlist...');
164
- const ok = await submitBetaSignup(email.trim(), deps);
165
- if (ok) {
166
- s.stop('You’re on the list — we’ll email you when beta access opens.');
167
- recordBetaSignupChoice(true, deps);
168
- }
169
- else {
170
- s.stop('Couldn’t reach the waitlist right now.');
171
- clack.log.warn(`No worries — you can join anytime at ${exports.BETA_SIGNUP_URL}.`);
172
- }
173
- }
174
- catch {
175
- /* never let the beta question break an install or upgrade */
176
- }
177
- }
178
- //# sourceMappingURL=beta-signup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"beta-signup.js","sourceRoot":"","sources":["../../src/installer/beta-signup.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCH,kDAOC;AAGD,wDAeC;AAMD,4CAgBC;AAOD,sDAKC;AAiBD,oDA4CC;AA3JD,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAEzB,gFAAgF;AACnE,QAAA,oBAAoB,GAAG,uCAAuC,CAAC;AAC/D,QAAA,eAAe,GAAG,0BAA0B,CAAC;AAE1D,0DAA0D;AAC7C,QAAA,QAAQ,GAAG,4BAA4B,CAAC;AAErD,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAmBhC,SAAS,UAAU,CAAC,OAAuB,EAAE;IAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,EAAE,kBAAkB,CAAC,CAAC;AAC1F,CAAC;AAED,oEAAoE;AACpE,SAAgB,mBAAmB,CAAC,OAAuB,EAAE;IAC3D,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAyB,CAAC;QAC1F,OAAO,GAAG,CAAC,MAAM,KAAK,YAAY,IAAI,GAAG,CAAC,MAAM,KAAK,UAAU,CAAC;IAClE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,oEAAoE;AACpE,SAAgB,sBAAsB,CACpC,UAA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AAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAClB,gBAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,wCAAwC;SAC7F,CAAC,CAAC;QACH,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,qCAAqC,uBAAe,GAAG,CAAC,CAAC;YACxE,OAAO;QACT,CAAC;QAED,MAAM,CAAC,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;QAC1B,CAAC,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACxC,MAAM,EAAE,GAAG,MAAM,gBAAgB,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;QACtD,IAAI,EAAE,EAAE,CAAC;YACP,CAAC,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;YACvE,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,CAAC,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;YACjD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,wCAAwC,uBAAe,GAAG,CAAC,CAAC;QAC7E,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,6DAA6D;IAC/D,CAAC;AACH,CAAC"}
@@ -1,28 +0,0 @@
1
- /**
2
- * Backwards-compat shim — original Claude-only writer functions.
3
- *
4
- * The installer now uses the multi-target architecture in
5
- * `./targets/`. This file is preserved so existing imports (the test
6
- * suite, downstream tooling) keep working unchanged. Each function
7
- * delegates to the Claude target. New code should import the target
8
- * registry from `./targets/registry` directly.
9
- *
10
- * @deprecated Use `targets/registry.ts` and the `AgentTarget`
11
- * abstraction instead.
12
- */
13
- export type InstallLocation = 'global' | 'local';
14
- /**
15
- * Each shim calls ONLY the named per-file helper — writeMcpConfig
16
- * writes only the MCP JSON, writePermissions only settings.json. The
17
- * full multi-file install lives in `claudeTarget.install()` which the
18
- * new orchestrator uses.
19
- *
20
- * There is no `writeClaudeMd` shim anymore: codegraph stopped writing a
21
- * CLAUDE.md instructions block (issue #529) now that the MCP server's
22
- * `initialize` instructions are the single source of truth.
23
- */
24
- export declare function writeMcpConfig(location: InstallLocation): void;
25
- export declare function writePermissions(location: InstallLocation): void;
26
- export declare function hasMcpConfig(location: InstallLocation): boolean;
27
- export declare function hasPermissions(location: InstallLocation): boolean;
28
- //# sourceMappingURL=config-writer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-writer.d.ts","sourceRoot":"","sources":["../../src/installer/config-writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEjD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAE9D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAEhE;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAQ/D;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAQjE"}
@@ -1,91 +0,0 @@
1
- "use strict";
2
- /**
3
- * Backwards-compat shim — original Claude-only writer functions.
4
- *
5
- * The installer now uses the multi-target architecture in
6
- * `./targets/`. This file is preserved so existing imports (the test
7
- * suite, downstream tooling) keep working unchanged. Each function
8
- * delegates to the Claude target. New code should import the target
9
- * registry from `./targets/registry` directly.
10
- *
11
- * @deprecated Use `targets/registry.ts` and the `AgentTarget`
12
- * abstraction instead.
13
- */
14
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
- if (k2 === undefined) k2 = k;
16
- var desc = Object.getOwnPropertyDescriptor(m, k);
17
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
18
- desc = { enumerable: true, get: function() { return m[k]; } };
19
- }
20
- Object.defineProperty(o, k2, desc);
21
- }) : (function(o, m, k, k2) {
22
- if (k2 === undefined) k2 = k;
23
- o[k2] = m[k];
24
- }));
25
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
26
- Object.defineProperty(o, "default", { enumerable: true, value: v });
27
- }) : function(o, v) {
28
- o["default"] = v;
29
- });
30
- var __importStar = (this && this.__importStar) || (function () {
31
- var ownKeys = function(o) {
32
- ownKeys = Object.getOwnPropertyNames || function (o) {
33
- var ar = [];
34
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
35
- return ar;
36
- };
37
- return ownKeys(o);
38
- };
39
- return function (mod) {
40
- if (mod && mod.__esModule) return mod;
41
- var result = {};
42
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
43
- __setModuleDefault(result, mod);
44
- return result;
45
- };
46
- })();
47
- Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.writeMcpConfig = writeMcpConfig;
49
- exports.writePermissions = writePermissions;
50
- exports.hasMcpConfig = hasMcpConfig;
51
- exports.hasPermissions = hasPermissions;
52
- const path = __importStar(require("path"));
53
- const os = __importStar(require("os"));
54
- const claude_1 = require("./targets/claude");
55
- const shared_1 = require("./targets/shared");
56
- /**
57
- * Each shim calls ONLY the named per-file helper — writeMcpConfig
58
- * writes only the MCP JSON, writePermissions only settings.json. The
59
- * full multi-file install lives in `claudeTarget.install()` which the
60
- * new orchestrator uses.
61
- *
62
- * There is no `writeClaudeMd` shim anymore: codegraph stopped writing a
63
- * CLAUDE.md instructions block (issue #529) now that the MCP server's
64
- * `initialize` instructions are the single source of truth.
65
- */
66
- function writeMcpConfig(location) {
67
- (0, claude_1.writeMcpEntry)(location);
68
- }
69
- function writePermissions(location) {
70
- (0, claude_1.writePermissionsEntry)(location);
71
- }
72
- function hasMcpConfig(location) {
73
- // local scope lives in ./.mcp.json (project scope); global is the
74
- // user-scope ~/.claude.json. Mirrors the Claude target's paths.
75
- const file = location === 'global'
76
- ? path.join(os.homedir(), '.claude.json')
77
- : path.join(process.cwd(), '.mcp.json');
78
- const config = (0, shared_1.readJsonFile)(file);
79
- return !!config.mcpServers?.codegraph;
80
- }
81
- function hasPermissions(location) {
82
- const file = location === 'global'
83
- ? path.join(os.homedir(), '.claude', 'settings.json')
84
- : path.join(process.cwd(), '.claude', 'settings.json');
85
- const settings = (0, shared_1.readJsonFile)(file);
86
- const allow = settings.permissions?.allow;
87
- if (!Array.isArray(allow))
88
- return false;
89
- return allow.some((p) => p.startsWith('mcp__codegraph__'));
90
- }
91
- //# sourceMappingURL=config-writer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-writer.js","sourceRoot":"","sources":["../../src/installer/config-writer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBH,wCAEC;AAED,4CAEC;AAED,oCAQC;AAED,wCAQC;AA9CD,2CAA6B;AAC7B,uCAAyB;AACzB,6CAG0B;AAC1B,6CAAgD;AAIhD;;;;;;;;;GASG;AACH,SAAgB,cAAc,CAAC,QAAyB;IACtD,IAAA,sBAAa,EAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AAED,SAAgB,gBAAgB,CAAC,QAAyB;IACxD,IAAA,8BAAqB,EAAC,QAAQ,CAAC,CAAC;AAClC,CAAC;AAED,SAAgB,YAAY,CAAC,QAAyB;IACpD,kEAAkE;IAClE,gEAAgE;IAChE,MAAM,IAAI,GAAG,QAAQ,KAAK,QAAQ;QAChC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,cAAc,CAAC;QACzC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,IAAI,CAAC,CAAC;IAClC,OAAO,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC;AACxC,CAAC;AAED,SAAgB,cAAc,CAAC,QAAyB;IACtD,MAAM,IAAI,GAAG,QAAQ,KAAK,QAAQ;QAChC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,eAAe,CAAC;QACrD,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;IACzD,MAAM,QAAQ,GAAG,IAAA,qBAAY,EAAC,IAAI,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC;IAC1C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACxC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC;AACrE,CAAC"}
@@ -1,142 +0,0 @@
1
- /**
2
- * CodeGraph Interactive Installer
3
- *
4
- * Multi-target: writes MCP server config + instructions for the
5
- * agents the user picks (Claude Code, Cursor, Codex CLI, opencode,
6
- * Hermes Agent, Gemini CLI, Antigravity IDE).
7
- * Defaults to the Claude-only behavior for backwards compatibility
8
- * when no targets are explicitly chosen and nothing else is detected.
9
- *
10
- * Uses @clack/prompts for the interactive UI; `runInstallerWithOptions`
11
- * is the non-interactive entry point used by the `--target` /
12
- * `--print-config` CLI flags.
13
- */
14
- import type { AgentTarget, Location, TargetId } from './targets/types';
15
- export { writeMcpConfig, writePermissions, hasMcpConfig, hasPermissions, } from './config-writer';
16
- export type { InstallLocation } from './config-writer';
17
- export interface RunInstallerOptions {
18
- /** Comma-separated target list, or `auto` / `all` / `none`. */
19
- target?: string;
20
- /** Skip the location prompt; use this value directly. */
21
- location?: Location;
22
- /** Skip the auto-allow prompt; use this value directly. */
23
- autoAllow?: boolean;
24
- /**
25
- * Skip every confirm and use defaults: location=global,
26
- * autoAllow=true, target=auto. For scripting / CI.
27
- */
28
- yes?: boolean;
29
- }
30
- /**
31
- * Interactive entry point — preserves the historical UX (`codegraph
32
- * install` with no args goes through the prompts), but now starts
33
- * the targets multi-select pre-populated with detected agents.
34
- */
35
- export declare function runInstaller(): Promise<void>;
36
- export declare function runInstallerWithOptions(opts: RunInstallerOptions): Promise<void>;
37
- export interface RunUninstallerOptions {
38
- /**
39
- * Comma-separated target list, or `auto` / `all` / `none`. Defaults
40
- * to `all` — uninstall sweeps every known agent and reports which
41
- * ones it actually touched, so the user doesn't have to know where
42
- * they configured it.
43
- */
44
- target?: string;
45
- /** Skip the location prompt; use this value directly. */
46
- location?: Location;
47
- /** Non-interactive: location=global, target=all, no prompts. */
48
- yes?: boolean;
49
- /** Remove agent configs only — leave the CLI binary installed. */
50
- keepCli?: boolean;
51
- /**
52
- * `__filename` of the CLI entry (dist/bin/codegraph.js) — install-method
53
- * detection is keyed off the running binary's real location.
54
- */
55
- cliFilename?: string;
56
- }
57
- export type UninstallStatus = 'removed' | 'not-configured' | 'unsupported';
58
- /**
59
- * Per-target outcome of an uninstall sweep. `removed` means we deleted
60
- * at least one thing; `not-configured` means the agent had no codegraph
61
- * config at this location (nothing to do); `unsupported` means the
62
- * agent has no config concept for this location (e.g. Codex is
63
- * global-only, so a `local` uninstall skips it).
64
- */
65
- export interface UninstallReport {
66
- id: TargetId;
67
- displayName: string;
68
- status: UninstallStatus;
69
- /** Absolute paths we actually edited/removed (action === 'removed'). */
70
- removedPaths: string[];
71
- /** Verbatim notes from the target (rare for uninstall). */
72
- notes: string[];
73
- }
74
- /**
75
- * Pure uninstall sweep — no prompts, no I/O beyond the targets' own
76
- * file edits. Exposed (and unit-tested) separately from the clack UI in
77
- * `runUninstaller` so the aggregation logic can be asserted directly.
78
- *
79
- * Each target's `uninstall()` is already safe to call when nothing was
80
- * installed (it returns `not-found` actions), so this is safe to run
81
- * across every target unconditionally.
82
- */
83
- export declare function uninstallTargets(targets: readonly AgentTarget[], location: Location): UninstallReport[];
84
- export type RefreshStatus = 'refreshed' | 'unchanged' | 'not-configured' | 'unsupported';
85
- /**
86
- * Per-target outcome of a refresh sweep. `refreshed` means at least one
87
- * filesystem entry was created, updated, or removed; `unchanged` means the target was
88
- * already current (every write reported byte-identical); the other two
89
- * mirror `UninstallStatus`.
90
- */
91
- export interface RefreshReport {
92
- id: TargetId;
93
- displayName: string;
94
- location: Location;
95
- status: RefreshStatus;
96
- /** Absolute paths created, updated, or removed by the refresh. */
97
- changedPaths: string[];
98
- }
99
- /**
100
- * Pure refresh sweep — re-runs `install()` for every target that is
101
- * ALREADY configured at `location`, so the surfaces a previous version
102
- * wrote (the marker-fenced instructions section, the MCP server entry,
103
- * the legacy-hook cleanups) match the binary that will serve them.
104
- * Without this, those files keep the wording — and the tool names — of
105
- * whatever version first wrote them, no matter how many upgrades later.
106
- *
107
- * Strictly a refresh, never a first install:
108
- * - targets that aren't `alreadyConfigured` are skipped untouched;
109
- * - permissions are not written (`autoAllow: false`) and the prompt
110
- * hook is left as-is (`promptHook: undefined`), so choices the user
111
- * made at install time — or by hand since — are preserved.
112
- *
113
- * Every write underneath is the targets' own idempotent upsert, so a
114
- * re-run on an already-current machine reports `unchanged` everywhere.
115
- * Exposed (and unit-tested) separately from the CLI wiring, same as
116
- * `uninstallTargets`.
117
- */
118
- export declare function refreshTargets(targets: readonly AgentTarget[], location: Location): RefreshReport[];
119
- /**
120
- * Interactive uninstaller — the inverse of `runInstallerWithOptions`.
121
- * Asks global-vs-local first (unless `--location`/`--yes` is given),
122
- * then sweeps every agent target (or the `--target` subset) and prints
123
- * one block per agent so the user sees exactly which providers it hit.
124
- *
125
- * Removes only what install wrote (MCP server entry, instructions
126
- * block, permissions) — never the `.codegraph/` index, which `codegraph
127
- * uninit` owns.
128
- */
129
- export declare function runUninstaller(opts: RunUninstallerOptions): Promise<void>;
130
- /**
131
- * When the live file watcher will be disabled for this project (e.g. WSL2
132
- * /mnt drives, or CODEGRAPH_NO_WATCH), the index would silently go stale.
133
- * Explain that, and offer to keep it fresh automatically via git hooks
134
- * (commit / pull / checkout) instead of manual `codegraph sync`.
135
- *
136
- * No-op on environments where the watcher runs normally, so it's safe to
137
- * call unconditionally after init.
138
- */
139
- export declare function offerWatchFallback(clack: typeof import('@clack/prompts'), projectPath: string, opts?: {
140
- yes?: boolean;
141
- }): Promise<void>;
142
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/installer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAWH,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAYvE,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAmBvD,MAAM,WAAW,mBAAmB;IAClC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAElD;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiNtF;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACz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