@reticlehq/server 2.13.0 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/SKILL.md +8 -18
  2. package/bin/reticle.js +3 -0
  3. package/dist/bridge/auth-failure-reason.js +12 -1
  4. package/dist/bridge/bridge-security.d.ts +8 -0
  5. package/dist/bridge/bridge-security.js +6 -1
  6. package/dist/bridge/bridge.d.ts +3 -0
  7. package/dist/bridge/bridge.js +23 -1
  8. package/dist/bridge/bridge.test-harness.d.ts +10 -1
  9. package/dist/bridge/bridge.test-harness.js +7 -1
  10. package/dist/bridge/pairing-token.d.ts +17 -0
  11. package/dist/bridge/pairing-token.js +26 -0
  12. package/dist/bridge/token-auth.d.ts +7 -0
  13. package/dist/bridge/token-auth.js +7 -1
  14. package/dist/capsule/capsule-store.d.ts +4 -4
  15. package/dist/capsule/capsule.d.ts +1 -1
  16. package/dist/capsule/capsule.js +3 -3
  17. package/dist/capsule/causal-summary.d.ts +21 -1
  18. package/dist/capsule/causal-summary.js +8 -6
  19. package/dist/capsule/divergence.d.ts +1 -1
  20. package/dist/capsule/divergence.js +26 -10
  21. package/dist/chromium-launch-options.d.ts +2 -1
  22. package/dist/cli/adhoc-verdict.d.ts +58 -0
  23. package/dist/cli/adhoc-verdict.js +115 -0
  24. package/dist/cli/chromium-hint.d.ts +18 -4
  25. package/dist/cli/chromium-hint.js +54 -6
  26. package/dist/cli/cli-doctor.js +1 -2
  27. package/dist/cli/cli-flow-commands.d.ts +16 -2
  28. package/dist/cli/cli-flow-commands.js +28 -9
  29. package/dist/cli/cli-parse-feedback.js +1 -1
  30. package/dist/cli/cli-parse.d.ts +2 -1
  31. package/dist/cli/cli-parse.js +38 -0
  32. package/dist/cli/cli-port.d.ts +5 -13
  33. package/dist/cli/cli-port.js +5 -38
  34. package/dist/cli/cli-update-commands.js +4 -4
  35. package/dist/cli/cli-verify.d.ts +24 -7
  36. package/dist/cli/cli-verify.js +87 -13
  37. package/dist/cli/cloud-keystore.d.ts +2 -1
  38. package/dist/cli/cloud-login.d.ts +2 -1
  39. package/dist/cli/cloud-session.d.ts +2 -1
  40. package/dist/cli/cloud-session.js +1 -1
  41. package/dist/cli/daemon-start-options.d.ts +2 -1
  42. package/dist/cli/device-flow.d.ts +2 -2
  43. package/dist/cli/doctor-daemon-line.d.ts +2 -1
  44. package/dist/cli/doctor-project-line.d.ts +2 -1
  45. package/dist/cli/doctor-rows.d.ts +2 -1
  46. package/dist/cli/drive-attach.d.ts +4 -3
  47. package/dist/cli/gate-hook-message.d.ts +2 -1
  48. package/dist/cli/status-next-action.js +10 -11
  49. package/dist/cli.d.ts +1 -0
  50. package/dist/cli.js +21 -9
  51. package/dist/cloud/account-state.d.ts +20 -0
  52. package/dist/cloud/account-state.js +65 -0
  53. package/dist/cloud/cloud-sync.d.ts +46 -3
  54. package/dist/cloud/cloud-sync.js +116 -0
  55. package/dist/cloud/sync-cycle.d.ts +5 -4
  56. package/dist/cloud/sync-cycle.js +1 -1
  57. package/dist/cloud/sync-daemon.d.ts +3 -19
  58. package/dist/cloud/sync-daemon.js +2 -2
  59. package/dist/crawl/crawl-tools.js +1 -1
  60. package/dist/crawl/crawl.d.ts +5 -5
  61. package/dist/crawl/crawl.js +138 -4
  62. package/dist/daemon/daemon-resilience.d.ts +3 -2
  63. package/dist/daemon/daemon-resilience.js +43 -4
  64. package/dist/daemon/daemon-resolve.d.ts +0 -9
  65. package/dist/daemon/daemon-resolve.js +2 -2
  66. package/dist/daemon/dev-servers.d.ts +1 -1
  67. package/dist/daemon/dev-servers.js +1 -1
  68. package/dist/daemon/loopback-alias.d.ts +2 -1
  69. package/dist/daemon/startup-failure.d.ts +11 -0
  70. package/dist/daemon/startup-failure.js +46 -0
  71. package/dist/events/contradictions.d.ts +10 -16
  72. package/dist/events/contradictions.js +149 -17
  73. package/dist/events/declared.d.ts +13 -1
  74. package/dist/events/declared.js +59 -3
  75. package/dist/events/echo-mismatch.js +75 -6
  76. package/dist/events/lineage.d.ts +52 -0
  77. package/dist/events/lineage.js +122 -0
  78. package/dist/events/net-evidence.d.ts +21 -0
  79. package/dist/events/net-evidence.js +81 -0
  80. package/dist/events/predicate-console.d.ts +13 -0
  81. package/dist/events/predicate-console.js +138 -0
  82. package/dist/events/predicate-element.d.ts +13 -0
  83. package/dist/events/predicate-element.js +214 -0
  84. package/dist/events/predicate-eval.d.ts +15 -3
  85. package/dist/events/predicate-eval.js +128 -110
  86. package/dist/events/predicate-parse.js +34 -1
  87. package/dist/events/predicate-request-body.d.ts +50 -0
  88. package/dist/events/predicate-request-body.js +120 -0
  89. package/dist/events/predicate-route.d.ts +21 -1
  90. package/dist/events/predicate-route.js +149 -21
  91. package/dist/events/predicate-schema.d.ts +8 -1
  92. package/dist/events/predicate-schema.js +34 -0
  93. package/dist/events/predicate.d.ts +2 -0
  94. package/dist/events/predicate.js +52 -159
  95. package/dist/events/split-text-miss.d.ts +6 -4
  96. package/dist/events/split-text-miss.js +12 -5
  97. package/dist/flows/affected-tools.js +22 -9
  98. package/dist/flows/annotate.d.ts +2 -1
  99. package/dist/flows/annotate.js +19 -1
  100. package/dist/flows/coverage.d.ts +2 -2
  101. package/dist/flows/flake.d.ts +3 -3
  102. package/dist/flows/flow-expect-grammar.d.ts +33 -0
  103. package/dist/flows/flow-expect-grammar.js +155 -0
  104. package/dist/flows/flow-replay-run.d.ts +1 -1
  105. package/dist/flows/flow-replay-run.js +28 -15
  106. package/dist/flows/flow-replay.d.ts +10 -0
  107. package/dist/flows/flow-replay.js +57 -22
  108. package/dist/flows/flow-secret-field.d.ts +14 -0
  109. package/dist/flows/flow-secret-field.js +22 -0
  110. package/dist/flows/flow-step-runners.d.ts +1 -0
  111. package/dist/flows/flow-step-runners.js +91 -34
  112. package/dist/flows/flow-success.js +22 -0
  113. package/dist/flows/flow-tools.js +27 -8
  114. package/dist/flows/flow-upload-resolve.d.ts +23 -0
  115. package/dist/flows/flow-upload-resolve.js +46 -0
  116. package/dist/flows/flows.d.ts +15 -0
  117. package/dist/flows/flows.js +17 -14
  118. package/dist/flows/git-changed.d.ts +23 -4
  119. package/dist/flows/git-changed.js +32 -6
  120. package/dist/flows/heal-run.js +2 -2
  121. package/dist/flows/predicate-to-expect.d.ts +3 -2
  122. package/dist/flows/predicate-to-expect.js +11 -5
  123. package/dist/flows/recording-backtrack.d.ts +24 -0
  124. package/dist/flows/recording-backtrack.js +73 -0
  125. package/dist/flows/recordings.d.ts +6 -0
  126. package/dist/flows/replay-halt.d.ts +26 -0
  127. package/dist/flows/replay-halt.js +30 -0
  128. package/dist/flows/replay.d.ts +0 -8
  129. package/dist/flows/replay.js +15 -3
  130. package/dist/flows/suite-flakes.d.ts +2 -1
  131. package/dist/flows/verify-change-tools.js +16 -4
  132. package/dist/honesty/already-true.d.ts +14 -0
  133. package/dist/honesty/already-true.js +47 -4
  134. package/dist/honesty/blind-spots.d.ts +3 -1
  135. package/dist/honesty/blind-spots.js +24 -1
  136. package/dist/honesty/body-capture-remedy.d.ts +42 -0
  137. package/dist/honesty/body-capture-remedy.js +95 -0
  138. package/dist/honesty/feature-capture.d.ts +3 -2
  139. package/dist/honesty/feature-capture.js +1 -1
  140. package/dist/honesty/gap-ledger.d.ts +1 -1
  141. package/dist/honesty/gap-ledger.js +1 -1
  142. package/dist/honesty/instrumentation-gaps.d.ts +8 -1
  143. package/dist/honesty/instrumentation-gaps.js +12 -2
  144. package/dist/honesty/observability.d.ts +4 -3
  145. package/dist/honesty/tool-hit-rate.d.ts +3 -2
  146. package/dist/honesty/uncaptured-bodies.d.ts +3 -1
  147. package/dist/honesty/uncaptured-bodies.js +6 -2
  148. package/dist/honesty/unsettled.d.ts +9 -0
  149. package/dist/honesty/unsettled.js +45 -0
  150. package/dist/honesty/verified.d.ts +32 -1
  151. package/dist/honesty/verified.js +37 -10
  152. package/dist/impact/impact-store.d.ts +5 -14
  153. package/dist/impact/impact-store.js +49 -6
  154. package/dist/index.js +1 -1
  155. package/dist/input/network-detail.d.ts +26 -1
  156. package/dist/input/network-detail.js +44 -12
  157. package/dist/input/network-mock-tools.js +24 -17
  158. package/dist/input/real-input.js +1 -1
  159. package/dist/input/viewport-tools.js +25 -13
  160. package/dist/intent/inline-intent.d.ts +0 -10
  161. package/dist/intent/inline-intent.js +1 -1
  162. package/dist/intent/intent-shard-store.d.ts +3 -2
  163. package/dist/intent/intent-shard-store.js +1 -1
  164. package/dist/intent/intent-shard.d.ts +14 -14
  165. package/dist/intent/intent-shard.js +4 -4
  166. package/dist/intent/intent-store.d.ts +1 -1
  167. package/dist/intent/intent-store.js +1 -1
  168. package/dist/intent/intent-subject.d.ts +2 -1
  169. package/dist/intent/open-intents.d.ts +3 -2
  170. package/dist/license/license.d.ts +4 -4
  171. package/dist/license/license.js +1 -1
  172. package/dist/mcp/attach-memory.d.ts +2 -1
  173. package/dist/mcp/client-identity.d.ts +2 -1
  174. package/dist/mcp/mcp-outage.d.ts +1 -1
  175. package/dist/mcp/mcp-outage.js +1 -1
  176. package/dist/mcp/mcp-proxy.d.ts +3 -1
  177. package/dist/mcp/mcp-proxy.js +32 -7
  178. package/dist/mcp/mcp.js +3 -1
  179. package/dist/mcp/proxy-handshake.d.ts +2 -1
  180. package/dist/mcp/proxy-idle-exit.d.ts +45 -0
  181. package/dist/mcp/proxy-idle-exit.js +94 -0
  182. package/dist/mcp/server-instructions.d.ts +2 -1
  183. package/dist/memory/project-memory.d.ts +2 -3
  184. package/dist/memory/project-memory.js +1 -1
  185. package/dist/oracles/propose-consequences.js +5 -5
  186. package/dist/oracles/self-instrument.d.ts +2 -2
  187. package/dist/oracles/self-instrument.js +1 -1
  188. package/dist/platform.d.ts +3 -5
  189. package/dist/platform.js +3 -5
  190. package/dist/pool/browser-pool.d.ts +92 -0
  191. package/dist/pool/browser-pool.js +119 -5
  192. package/dist/pool/playwright-launcher.js +29 -2
  193. package/dist/pool/storage-seed.d.ts +23 -0
  194. package/dist/pool/storage-seed.js +198 -0
  195. package/dist/project/artifact-root.d.ts +2 -1
  196. package/dist/project/memory-fs.d.ts +2 -1
  197. package/dist/project/reticle-dir.js +1 -1
  198. package/dist/project/session-root.d.ts +8 -0
  199. package/dist/project/session-root.js +9 -2
  200. package/dist/runs/reticle-runner.d.ts +14 -1
  201. package/dist/runs/reticle-runner.js +39 -2
  202. package/dist/session/attachment-history.d.ts +2 -1
  203. package/dist/session/fake-session.d.ts +37 -0
  204. package/dist/session/fake-session.js +81 -0
  205. package/dist/session/lease-visibility.d.ts +2 -1
  206. package/dist/session/live-control-tools.js +6 -0
  207. package/dist/session/no-session-diagnosis.d.ts +17 -1
  208. package/dist/session/no-session-diagnosis.js +32 -6
  209. package/dist/session/no-session-next-action.d.ts +14 -0
  210. package/dist/session/no-session-next-action.js +18 -0
  211. package/dist/session/no-session-watch.js +46 -3
  212. package/dist/session/registered-projects.d.ts +54 -0
  213. package/dist/session/registered-projects.js +73 -0
  214. package/dist/session/review-store.d.ts +2 -1
  215. package/dist/session/session-health.d.ts +62 -1
  216. package/dist/session/session-health.js +82 -2
  217. package/dist/session/session-manager.d.ts +11 -1
  218. package/dist/session/session-manager.js +18 -3
  219. package/dist/session/session-replaced.d.ts +24 -0
  220. package/dist/session/session-replaced.js +29 -0
  221. package/dist/session/session-successor.js +20 -4
  222. package/dist/session/session.d.ts +13 -5
  223. package/dist/session/session.js +31 -23
  224. package/dist/setup/agent-configs.d.ts +3 -2
  225. package/dist/setup/agent-writer.d.ts +3 -2
  226. package/dist/setup/approval-migration.d.ts +2 -1
  227. package/dist/setup/approval-migration.js +1 -1
  228. package/dist/setup/auto-approve.d.ts +11 -19
  229. package/dist/setup/auto-approve.js +15 -12
  230. package/dist/{init → setup}/confirm.js +1 -1
  231. package/dist/setup/desktop-shape.d.ts +3 -2
  232. package/dist/setup/dev-server-wait.d.ts +8 -0
  233. package/dist/setup/dev-server-wait.js +3 -1
  234. package/dist/setup/drive-agent.d.ts +2 -3
  235. package/dist/setup/drive-agent.js +1 -1
  236. package/dist/setup/drive-plan.d.ts +3 -2
  237. package/dist/setup/ensure-daemon.d.ts +2 -1
  238. package/dist/setup/existing-app.d.ts +12 -0
  239. package/dist/setup/existing-app.js +13 -0
  240. package/dist/setup/init-host.d.ts +11 -0
  241. package/dist/setup/init-host.js +26 -0
  242. package/dist/setup/init-runtime.d.ts +4 -10
  243. package/dist/setup/init-runtime.js +23 -16
  244. package/dist/setup/license-key.d.ts +2 -1
  245. package/dist/setup/listeners.d.ts +2 -1
  246. package/dist/setup/loopback-probe-urls.d.ts +18 -0
  247. package/dist/setup/loopback-probe-urls.js +52 -0
  248. package/dist/setup/node-effects.d.ts +3 -0
  249. package/dist/setup/node-effects.js +26 -11
  250. package/dist/setup/page-probe.d.ts +5 -0
  251. package/dist/setup/relaunch.d.ts +2 -1
  252. package/dist/setup/run-setup.d.ts +5 -1
  253. package/dist/setup/run-setup.js +155 -48
  254. package/dist/setup/setup-command.d.ts +3 -2
  255. package/dist/setup/setup-command.js +8 -0
  256. package/dist/setup/setup-options.d.ts +5 -3
  257. package/dist/setup/setup-options.js +3 -2
  258. package/dist/setup/wait-progress.d.ts +28 -0
  259. package/dist/setup/wait-progress.js +43 -0
  260. package/dist/telemetry/app-instrumented.d.ts +2 -1
  261. package/dist/telemetry/app-instrumented.js +1 -1
  262. package/dist/telemetry/automation-hint.d.ts +1 -1
  263. package/dist/telemetry/automation-hint.js +1 -1
  264. package/dist/telemetry/cli-telemetry.js +1 -1
  265. package/dist/telemetry/connect-failure.d.ts +1 -1
  266. package/dist/telemetry/connect-failure.js +1 -1
  267. package/dist/telemetry/crash-cause.d.ts +3 -2
  268. package/dist/telemetry/crash-cause.js +1 -1
  269. package/dist/telemetry/daemon-telemetry.d.ts +3 -2
  270. package/dist/telemetry/daemon-telemetry.js +1 -1
  271. package/dist/telemetry/error-class.d.ts +3 -2
  272. package/dist/telemetry/error-class.js +1 -1
  273. package/dist/telemetry/feedback-cli.js +1 -1
  274. package/dist/telemetry/feedback-context.d.ts +3 -2
  275. package/dist/telemetry/feedback-context.js +5 -4
  276. package/dist/telemetry/feedback-local.d.ts +3 -2
  277. package/dist/telemetry/feedback.d.ts +4 -3
  278. package/dist/telemetry/feedback.js +1 -1
  279. package/dist/telemetry/git-facts.d.ts +2 -2
  280. package/dist/telemetry/git-facts.js +1 -1
  281. package/dist/telemetry/identify.d.ts +1 -1
  282. package/dist/telemetry/identify.js +1 -1
  283. package/dist/telemetry/init-telemetry.d.ts +2 -14
  284. package/dist/telemetry/init-telemetry.js +4 -13
  285. package/dist/telemetry/install-source.d.ts +7 -13
  286. package/dist/telemetry/install-source.js +7 -29
  287. package/dist/telemetry/license-activation.d.ts +3 -2
  288. package/dist/telemetry/license-activation.js +1 -1
  289. package/dist/telemetry/machine-snapshot.d.ts +1 -1
  290. package/dist/telemetry/mcp-connection.js +1 -1
  291. package/dist/telemetry/project-profile.d.ts +0 -14
  292. package/dist/telemetry/project-profile.js +1 -1
  293. package/dist/telemetry/proxy-telemetry.js +1 -1
  294. package/dist/telemetry/session-metrics.d.ts +1 -1
  295. package/dist/telemetry/session-metrics.js +1 -1
  296. package/dist/telemetry/telemetry.d.ts +1 -17
  297. package/dist/telemetry/telemetry.js +4 -4
  298. package/dist/telemetry/tool-refused.d.ts +1 -1
  299. package/dist/telemetry/tool-refused.js +1 -1
  300. package/dist/tools/act-observation.d.ts +3 -2
  301. package/dist/tools/act-preflight.js +8 -3
  302. package/dist/tools/act-target.d.ts +4 -0
  303. package/dist/tools/act-target.js +14 -5
  304. package/dist/tools/act-tools.d.ts +0 -2
  305. package/dist/tools/act-tools.js +45 -15
  306. package/dist/tools/assert-source.d.ts +30 -0
  307. package/dist/tools/assert-source.js +21 -0
  308. package/dist/tools/assert-verdict.d.ts +1 -1
  309. package/dist/tools/assert-verdict.js +14 -4
  310. package/dist/tools/browser-tools.js +28 -8
  311. package/dist/tools/complete-snapshot.d.ts +3 -2
  312. package/dist/tools/dynamic-tools.js +8 -0
  313. package/dist/tools/error-recovery.d.ts +10 -0
  314. package/dist/tools/error-recovery.js +23 -0
  315. package/dist/tools/feedback-tools.js +1 -1
  316. package/dist/tools/invoke-tool.js +2 -0
  317. package/dist/tools/lease-tools.d.ts +48 -20
  318. package/dist/tools/lease-tools.js +311 -76
  319. package/dist/tools/lineage-tools.d.ts +14 -0
  320. package/dist/tools/lineage-tools.js +64 -0
  321. package/dist/tools/merge-tools.js +1 -3
  322. package/dist/tools/navigate-arrival.d.ts +45 -1
  323. package/dist/tools/navigate-arrival.js +39 -6
  324. package/dist/tools/navigate-result.d.ts +8 -1
  325. package/dist/tools/navigate-result.js +14 -4
  326. package/dist/tools/numeric-bounds.d.ts +0 -11
  327. package/dist/tools/numeric-bounds.js +4 -4
  328. package/dist/tools/observe-tools.js +22 -26
  329. package/dist/tools/observed-nothing.d.ts +9 -0
  330. package/dist/tools/observed-nothing.js +2 -1
  331. package/dist/tools/read-tools.js +12 -17
  332. package/dist/tools/real-input-attempt.d.ts +14 -6
  333. package/dist/tools/real-input-attempt.js +75 -18
  334. package/dist/tools/reconcile-tools.js +2 -1
  335. package/dist/tools/reload-result.d.ts +6 -1
  336. package/dist/tools/reload-result.js +7 -2
  337. package/dist/tools/resolve-target.d.ts +7 -1
  338. package/dist/tools/resolve-target.js +72 -9
  339. package/dist/tools/settle-in-flight.d.ts +1 -1
  340. package/dist/tools/settle-in-flight.js +9 -2
  341. package/dist/tools/snapshot-delta.d.ts +24 -1
  342. package/dist/tools/snapshot-delta.js +66 -7
  343. package/dist/tools/tool-names.d.ts +1 -0
  344. package/dist/tools/tool-names.js +1 -0
  345. package/dist/tools/tool-surface.js +20 -2
  346. package/dist/tools/tools.js +120 -11
  347. package/dist/tools/verify-next-baton.d.ts +2 -1
  348. package/dist/update/sdk-sync.d.ts +1 -1
  349. package/dist/update/sdk-sync.js +1 -1
  350. package/dist/update/updater.js +1 -1
  351. package/dist/version/sdk-fix.d.ts +2 -1
  352. package/dist/version/version-skew.d.ts +0 -8
  353. package/dist/version/version-skew.js +1 -1
  354. package/docs/README.md +8 -6
  355. package/docs/actions.mdx +1 -1
  356. package/docs/agent-cheatsheet.md +4 -2
  357. package/docs/architecture.md +1 -1
  358. package/docs/cli/mcp.mdx +3 -1
  359. package/docs/cli/watch.mdx +1 -1
  360. package/docs/cli.mdx +1 -1
  361. package/docs/desktop.mdx +1 -1
  362. package/docs/docs.json +8 -3
  363. package/docs/faq.mdx +9 -0
  364. package/docs/first-drive.md +136 -0
  365. package/docs/frameworks.mdx +29 -7
  366. package/docs/gate-plan.md +2 -2
  367. package/docs/gates.md +19 -11
  368. package/docs/getting-started.md +7 -1
  369. package/docs/http-transport.md +164 -0
  370. package/docs/index.mdx +5 -3
  371. package/docs/install-manual.mdx +1 -1
  372. package/docs/packages/tauri.mdx +1 -1
  373. package/docs/packages.mdx +15 -3
  374. package/docs/platform-integration.md +1 -1
  375. package/docs/predicates.mdx +2 -0
  376. package/docs/system-map.md +2 -2
  377. package/docs/telemetry-contract.md +4 -4
  378. package/docs/telemetry-events.mdx +1 -1
  379. package/docs/telemetry.md +3 -3
  380. package/docs/tools-navigate.mdx +14 -6
  381. package/docs/usage.md +4 -4
  382. package/package.json +7 -4
  383. package/dist/init/agent-rules.d.ts +0 -116
  384. package/dist/init/agent-rules.js +0 -279
  385. package/dist/init/app-choice.d.ts +0 -20
  386. package/dist/init/app-choice.js +0 -25
  387. package/dist/init/astro-host.d.ts +0 -21
  388. package/dist/init/astro-host.js +0 -27
  389. package/dist/init/astro-patch.d.ts +0 -33
  390. package/dist/init/astro-patch.js +0 -300
  391. package/dist/init/capabilities.d.ts +0 -40
  392. package/dist/init/capabilities.js +0 -150
  393. package/dist/init/closing-hint.d.ts +0 -36
  394. package/dist/init/closing-hint.js +0 -120
  395. package/dist/init/connect-steps.d.ts +0 -2
  396. package/dist/init/connect-steps.js +0 -50
  397. package/dist/init/cra.d.ts +0 -79
  398. package/dist/init/cra.js +0 -178
  399. package/dist/init/csp-check.d.ts +0 -38
  400. package/dist/init/csp-check.js +0 -107
  401. package/dist/init/csp-doctor.d.ts +0 -32
  402. package/dist/init/csp-doctor.js +0 -54
  403. package/dist/init/desktop-doctor.d.ts +0 -41
  404. package/dist/init/desktop-doctor.js +0 -198
  405. package/dist/init/detect.d.ts +0 -96
  406. package/dist/init/detect.js +0 -209
  407. package/dist/init/dev-script.d.ts +0 -50
  408. package/dist/init/dev-script.js +0 -66
  409. package/dist/init/format-generated.d.ts +0 -18
  410. package/dist/init/format-generated.js +0 -39
  411. package/dist/init/install-hint.d.ts +0 -9
  412. package/dist/init/install-hint.js +0 -29
  413. package/dist/init/mcp-clients.d.ts +0 -89
  414. package/dist/init/mcp-clients.js +0 -299
  415. package/dist/init/mcp-registered.d.ts +0 -12
  416. package/dist/init/mcp-registered.js +0 -14
  417. package/dist/init/mcp.d.ts +0 -89
  418. package/dist/init/mcp.js +0 -129
  419. package/dist/init/next-patch.d.ts +0 -39
  420. package/dist/init/next-patch.js +0 -196
  421. package/dist/init/node-io.d.ts +0 -7
  422. package/dist/init/node-io.js +0 -117
  423. package/dist/init/non-js-project.d.ts +0 -27
  424. package/dist/init/non-js-project.js +0 -84
  425. package/dist/init/patch-kind.d.ts +0 -20
  426. package/dist/init/patch-kind.js +0 -10
  427. package/dist/init/plan-framework.d.ts +0 -64
  428. package/dist/init/plan-framework.js +0 -565
  429. package/dist/init/plan.d.ts +0 -242
  430. package/dist/init/plan.js +0 -703
  431. package/dist/init/preflight.d.ts +0 -28
  432. package/dist/init/preflight.js +0 -38
  433. package/dist/init/project-id.d.ts +0 -12
  434. package/dist/init/project-id.js +0 -25
  435. package/dist/init/refresh-rules.d.ts +0 -39
  436. package/dist/init/refresh-rules.js +0 -51
  437. package/dist/init/run.d.ts +0 -117
  438. package/dist/init/run.js +0 -806
  439. package/dist/init/slash-command.d.ts +0 -27
  440. package/dist/init/slash-command.js +0 -132
  441. package/dist/init/snippets.d.ts +0 -134
  442. package/dist/init/snippets.js +0 -572
  443. package/dist/init/vite-config.d.ts +0 -18
  444. package/dist/init/vite-config.js +0 -114
  445. package/dist/init/windows-quote.d.ts +0 -38
  446. package/dist/init/windows-quote.js +0 -70
  447. package/dist/init/workspace-apps.d.ts +0 -30
  448. package/dist/init/workspace-apps.js +0 -178
  449. package/dist/project/remember-project.d.ts +0 -24
  450. package/dist/project/remember-project.js +0 -40
  451. /package/dist/{init → setup}/confirm.d.ts +0 -0
@@ -1,39 +0,0 @@
1
- /**
2
- * Format a file `init` is about to write, using the project's own Prettier when it is installed.
3
- *
4
- * Reported from the field (#684): a clean CRA install failed the project's own lint because
5
- * `src/reticle-dev.ts` was emitted as one long line. The project already had Prettier; init never
6
- * asked it. Best-effort: resolve Prettier from the app (not from ours — we do not ship it), apply
7
- * its config, and on any failure return the original content so init never fails because of a
8
- * formatter. Sync only — `applyEffects` is sync, and Prettier 3's async `format` cannot join here.
9
- */
10
- import { createRequire } from 'node:module';
11
- import { basename, join } from 'node:path';
12
- /** Basenames of full-file generators that a project's lint will see. */
13
- const GENERATED_SOURCE_NAMES = new Set(['reticle-dev.ts', 'reticle-dev.tsx', 'hooks.client.ts']);
14
- /** True when this write is a connect/dev module lint will treat as project source. */
15
- export function isGeneratedSourcePath(relPath) {
16
- return GENERATED_SOURCE_NAMES.has(basename(relPath));
17
- }
18
- /**
19
- * Format `content` for `relPath` under `projectRoot`, or return it unchanged.
20
- *
21
- * Only the sync Prettier API is used. Prettier 3's async `format` is skipped (returns the original)
22
- * rather than holding init open on a promise `applyEffects` cannot await.
23
- */
24
- export function formatGeneratedSource(content, relPath, projectRoot) {
25
- if (!isGeneratedSourcePath(relPath))
26
- return content;
27
- try {
28
- const require = createRequire(join(projectRoot, 'package.json'));
29
- const prettier = require('prettier');
30
- const filePath = join(projectRoot, relPath);
31
- const resolved = prettier.resolveConfig.sync?.(filePath) ?? {};
32
- const formatted = prettier.format(content, { ...resolved, filepath: filePath });
33
- // Prettier 2 returns a string; Prettier 3 returns a Promise we cannot join from sync code.
34
- return 'string' === typeof formatted ? formatted : content;
35
- }
36
- catch {
37
- return content;
38
- }
39
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * What to say when the dependency install fails.
3
- *
4
- * Split out of plan.ts, which was at the 1000-line backstop. A cohesive unit rather than an
5
- * arbitrary cut: it is prose about one step's failure modes, and the only thing it needs is which
6
- * package manager was used.
7
- */
8
- import { PackageManager } from './detect.js';
9
- export declare function installFailureHint(pm: PackageManager): string;
@@ -1,29 +0,0 @@
1
- /**
2
- * What to say when the dependency install fails.
3
- *
4
- * Split out of plan.ts, which was at the 1000-line backstop. A cohesive unit rather than an
5
- * arbitrary cut: it is prose about one step's failure modes, and the only thing it needs is which
6
- * package manager was used.
7
- */
8
- import { PackageManager } from './detect.js';
9
- /**
10
- * Every package manager fetches, so every one of them can fail for a reason that is nothing to do
11
- * with the project: offline, a proxy that blocks npmjs, a corporate mirror that is down.
12
- *
13
- * The hint used to name only version pinning and pnpm's maturity window. Both are real causes, and
14
- * neither is that one — so a blocked registry sent the reader through their own dependency versions
15
- * looking for a problem that was entirely about reachability.
16
- */
17
- const REGISTRY_HINT = 'If it could not reach the registry at all (offline, a proxy, a mirror that is down), that is ' +
18
- 'about reachability and not about this project: check `npm config get registry` and whether this ' +
19
- 'machine can reach it.';
20
- export function installFailureHint(pm) {
21
- if (pm !== PackageManager.PNPM) {
22
- return `If the version was refused, install the SDK yourself. ${REGISTRY_HINT}`;
23
- }
24
- return ('If pnpm reported ERR_PNPM_NO_MATURE_MATCHING_VERSION, its minimumReleaseAge setting is holding ' +
25
- 'this release back. Either wait out the window, or allow these packages explicitly:\n' +
26
- ' pnpm config set minimumReleaseAgeExclude "@reticlehq/*"\n' +
27
- 'Do NOT drop the version pin — unpinned, pnpm installs an older SDK against a newer daemon, and ' +
28
- `that mismatch surfaces as a -32000 with nothing naming a version.\n${REGISTRY_HINT}`);
29
- }
@@ -1,89 +0,0 @@
1
- export declare const McpClient: {
2
- readonly CLAUDE_CODE: "claude-code";
3
- readonly CURSOR: "cursor";
4
- readonly WINDSURF: "windsurf";
5
- readonly OPENCODE: "opencode";
6
- readonly ANTIGRAVITY: "antigravity";
7
- readonly CODEX: "codex";
8
- readonly GEMINI: "gemini";
9
- readonly VSCODE: "vscode";
10
- };
11
- export type McpClient = (typeof McpClient)[keyof typeof McpClient];
12
- /** Where the config lives. `cli` means the client owns registration and we shell out to it. */
13
- export declare const ConfigScope: {
14
- readonly HOME: "home";
15
- readonly PROJECT: "project";
16
- readonly CLI: "cli";
17
- };
18
- export type ConfigScope = (typeof ConfigScope)[keyof typeof ConfigScope];
19
- /** How the file is written. `toml` is deliberately never auto-merged — see mergeClientConfig. */
20
- export declare const ConfigFormat: {
21
- readonly JSON: "json";
22
- readonly TOML: "toml";
23
- readonly CLI: "cli";
24
- };
25
- export type ConfigFormat = (typeof ConfigFormat)[keyof typeof ConfigFormat];
26
- export interface ClientSpec {
27
- id: McpClient;
28
- label: string;
29
- scope: ConfigScope;
30
- /** Relative to `$HOME` for `home`, to the project root for `project`. Empty for `cli`. */
31
- relPath: string;
32
- format: ConfigFormat;
33
- /** The object key holding the server map — `mcpServers`, `servers`, or `mcp`. */
34
- serversKey: string;
35
- /** Our entry, in THIS client's shape. */
36
- entry: () => unknown;
37
- /** Where the shape came from, so the next person can re-check it rather than trust this file. */
38
- docs: string;
39
- }
40
- export declare const MCP_CLIENTS: readonly ClientSpec[];
41
- export declare function clientSpec(id: McpClient): ClientSpec;
42
- export declare const ClientMergeStatus: {
43
- readonly APPLY: "apply";
44
- readonly ALREADY: "already";
45
- readonly MANUAL: "manual";
46
- };
47
- export type ClientMergeStatus = (typeof ClientMergeStatus)[keyof typeof ClientMergeStatus];
48
- export interface ClientMergeResult {
49
- status: ClientMergeStatus;
50
- /** Full file content to write. Byte-identical to `existing` when not `apply`. */
51
- content: string;
52
- }
53
- /**
54
- * Merge our server into this client's config.
55
- *
56
- * TOML is never auto-merged. Editing TOML without a parser is how a config file gets corrupted, and
57
- * a corrupted `~/.codex/config.toml` costs the user every server they had, not just ours. Printing
58
- * the exact block is honest; writing a guess is not — so Codex returns MANUAL with a snippet.
59
- */
60
- export declare function mergeClientConfig(spec: ClientSpec, existing: string | null): ClientMergeResult;
61
- /**
62
- * A block the user can paste, for a client we could not write.
63
- *
64
- * Every client gets one, including the ones we CAN write: when a merge comes back MANUAL because the
65
- * file could not be parsed, the snippet is the only actionable thing left to give.
66
- */
67
- export declare function clientSnippet(spec: ClientSpec): string;
68
- /**
69
- * The path whose existence means "this user has this client".
70
- *
71
- * Detection is deliberately conservative and one-directional: we write into a config a client
72
- * ALREADY has, and never create `~/.gemini/` or `~/.codeium/` for somebody who does not use them.
73
- * Littering a home directory to register a server nobody asked for is worse than printing a snippet.
74
- *
75
- * For a `home` client this is the directory above its config; for a `project` client it is the
76
- * config file (or its directory) inside the repo, which is unambiguous evidence somebody uses it
77
- * here. Same reasoning as Cursor's existing rule, which also accepts a project-level `.cursor/`
78
- * because a fresh Cursor profile has not written `~/.cursor` yet.
79
- */
80
- export declare function clientMarkerRelPath(spec: ClientSpec): string;
81
- /**
82
- * Project-relative directory whose presence signals Cursor is in use for this repo.
83
- *
84
- * A fresh Cursor profile has not written `~/.cursor` yet, so the home marker alone misses real
85
- * users. A project-level `.cursor/` is unambiguous evidence somebody uses Cursor here.
86
- */
87
- export declare const CURSOR_PROJECT_MARKER = ".cursor";
88
- /** Clients `init` can wire by writing a file — everything but the CLI-registered one. */
89
- export declare function fileBackedClients(): readonly ClientSpec[];
@@ -1,299 +0,0 @@
1
- /**
2
- * Where each agent keeps its MCP config, and how to write ours into it.
3
- *
4
- * `init` knew two clients: Claude Code (a CLI shell-out) and Cursor (a JSON merge). Everything else
5
- * got a printed snippet. That is the blocker under the whole release matrix — a per-client release
6
- * artifact for a client `init` cannot wire measures whether somebody pasted JSON correctly, not
7
- * whether the product works.
8
- *
9
- * Every path and shape below was read from the client's own documentation rather than recalled,
10
- * because they differ in ways that look like they should not:
11
- *
12
- * Cursor / Windsurf / Gemini `mcpServers: { name: { command, args } }` — one shape, three paths
13
- * VS Code `servers:` — a different key entirely
14
- * OpenCode `mcp: { name: { type, command: [cmd, ...args] } }` — an ARRAY
15
- * Codex TOML
16
- *
17
- * A single "write mcp.json" assuming the Cursor shape would produce a file three of these ignore:
18
- * an install that reports success and registers nothing, which is the exact failure class this
19
- * repo's install gate exists to catch.
20
- */
21
- import { NPX, MCP_SERVER_NAME, npxServerArgs, isReticleRegistration } from './mcp.js';
22
- export const McpClient = {
23
- CLAUDE_CODE: 'claude-code',
24
- CURSOR: 'cursor',
25
- WINDSURF: 'windsurf',
26
- OPENCODE: 'opencode',
27
- ANTIGRAVITY: 'antigravity',
28
- CODEX: 'codex',
29
- GEMINI: 'gemini',
30
- VSCODE: 'vscode',
31
- };
32
- /** Where the config lives. `cli` means the client owns registration and we shell out to it. */
33
- export const ConfigScope = {
34
- HOME: 'home',
35
- PROJECT: 'project',
36
- CLI: 'cli',
37
- };
38
- /** How the file is written. `toml` is deliberately never auto-merged — see mergeClientConfig. */
39
- export const ConfigFormat = {
40
- JSON: 'json',
41
- TOML: 'toml',
42
- CLI: 'cli',
43
- };
44
- /** The `{ command, args }` entry Cursor, Windsurf, Gemini and VS Code all take. */
45
- function commandArgsEntry() {
46
- return { command: NPX, args: npxServerArgs() };
47
- }
48
- /**
49
- * OpenCode's entry. `command` is a single ARRAY containing the executable and its arguments, and
50
- * `enabled` is explicit — a server registered but disabled is the quietest possible failure.
51
- */
52
- function openCodeEntry() {
53
- return { type: 'local', command: [NPX, ...npxServerArgs()], enabled: true };
54
- }
55
- export const MCP_CLIENTS = [
56
- {
57
- id: McpClient.CLAUDE_CODE,
58
- label: 'Claude Code',
59
- scope: ConfigScope.CLI,
60
- relPath: '',
61
- format: ConfigFormat.CLI,
62
- serversKey: 'mcpServers',
63
- entry: commandArgsEntry,
64
- docs: 'registered via `claude mcp add -s user` — see init/mcp.ts',
65
- },
66
- {
67
- id: McpClient.CURSOR,
68
- label: 'Cursor',
69
- scope: ConfigScope.HOME,
70
- relPath: '.cursor/mcp.json',
71
- format: ConfigFormat.JSON,
72
- serversKey: 'mcpServers',
73
- entry: commandArgsEntry,
74
- docs: 'https://docs.cursor.com — global ~/.cursor/mcp.json, or ./.cursor/mcp.json per project',
75
- },
76
- {
77
- id: McpClient.WINDSURF,
78
- label: 'Windsurf',
79
- scope: ConfigScope.HOME,
80
- relPath: '.codeium/windsurf/mcp_config.json',
81
- format: ConfigFormat.JSON,
82
- serversKey: 'mcpServers',
83
- entry: commandArgsEntry,
84
- docs: 'Windsurf docs — ~/.codeium/windsurf/mcp_config.json (same shape as Cursor, different path)',
85
- },
86
- {
87
- id: McpClient.GEMINI,
88
- label: 'Gemini CLI',
89
- scope: ConfigScope.HOME,
90
- relPath: '.gemini/settings.json',
91
- format: ConfigFormat.JSON,
92
- serversKey: 'mcpServers',
93
- entry: commandArgsEntry,
94
- docs: 'https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html',
95
- },
96
- {
97
- id: McpClient.VSCODE,
98
- label: 'VS Code (Copilot)',
99
- scope: ConfigScope.PROJECT,
100
- relPath: '.vscode/mcp.json',
101
- format: ConfigFormat.JSON,
102
- // NOT `mcpServers`. Writing that key here registers nothing and reports success.
103
- serversKey: 'servers',
104
- entry: commandArgsEntry,
105
- docs: 'VS Code MCP docs — .vscode/mcp.json, key is `servers`',
106
- },
107
- {
108
- id: McpClient.OPENCODE,
109
- label: 'OpenCode',
110
- /**
111
- * HOME, not PROJECT — OpenCode is installed globally and configured globally, like Cursor.
112
- *
113
- * It was project-scoped as `opencode.json`, and registration is gated on the marker already
114
- * existing, so a project that had never written one was skipped in SILENCE: the user has OpenCode
115
- * installed, `init` says nothing about it, and the tools never appear. In the field every OpenCode
116
- * user connected a client and produced zero tool calls and zero app connections, which is what
117
- * "you were never wired" looks like from outside.
118
- *
119
- * Path verified against a real install (OpenCode 1.3.17), not recalled. The extension is `.jsonc`,
120
- * which the old project marker could not have matched even where a project config existed. JSONC
121
- * permits comments, and a config that genuinely has them fails to parse — which `mergeClientConfig`
122
- * already answers with MANUAL and a printed block, rather than rewriting somebody's file and
123
- * dropping their comments.
124
- */
125
- scope: ConfigScope.HOME,
126
- relPath: '.config/opencode/opencode.jsonc',
127
- format: ConfigFormat.JSON,
128
- serversKey: 'mcp',
129
- entry: openCodeEntry,
130
- docs: 'https://opencode.ai/docs/config — `mcp` key, type:"local", command is an array',
131
- },
132
- {
133
- id: McpClient.ANTIGRAVITY,
134
- label: 'Antigravity',
135
- /**
136
- * Nine users connected an MCP client through Antigravity and drove nothing at all.
137
- *
138
- * `init` did not know this client, so they hand-wired a registration - the connections are in the
139
- * field data, so they got that far - and then never ran `init`, never instrumented an app, and
140
- * never called a tool. Nothing in that state tells anyone there is a second half.
141
- *
142
- * Path and shape from Google's documentation rather than recall: `mcpServers`, at
143
- * `~/.gemini/config/mcp_config.json`, and one file serves the 2.0 IDE, the CLI and the SDK. Same
144
- * `command`/`args` object Cursor, Windsurf and Gemini CLI already use.
145
- *
146
- * It shares the `~/.gemini` tree with Gemini CLI, which is why the marker matters: registration is
147
- * gated on the marker DIRECTORY, and these resolve to `.gemini/config` and `.gemini` respectively,
148
- * so having one installed cannot make `init` write a config for the other.
149
- *
150
- * NOT verified against a running install. The path is documented, the merge is the shared JSON
151
- * path that every other client here uses, and an unparseable config still degrades to a printed
152
- * block rather than a rewrite.
153
- */
154
- scope: ConfigScope.HOME,
155
- relPath: '.gemini/config/mcp_config.json',
156
- format: ConfigFormat.JSON,
157
- serversKey: 'mcpServers',
158
- entry: commandArgsEntry,
159
- docs: 'https://antigravity.google/docs/mcp — ~/.gemini/config/mcp_config.json, `mcpServers` key',
160
- },
161
- {
162
- id: McpClient.CODEX,
163
- label: 'Codex CLI',
164
- scope: ConfigScope.HOME,
165
- relPath: '.codex/config.toml',
166
- format: ConfigFormat.TOML,
167
- serversKey: 'mcp_servers',
168
- entry: commandArgsEntry,
169
- docs: 'https://developers.openai.com/codex/mcp — ~/.codex/config.toml, [mcp_servers.<name>]',
170
- },
171
- ];
172
- export function clientSpec(id) {
173
- const found = MCP_CLIENTS.find((spec) => spec.id === id);
174
- if (found === undefined)
175
- throw new Error(`no MCP client spec for '${id}'`);
176
- return found;
177
- }
178
- export const ClientMergeStatus = {
179
- APPLY: 'apply',
180
- ALREADY: 'already',
181
- MANUAL: 'manual',
182
- };
183
- function parseConfig(existing) {
184
- if (null === existing || 0 === existing.trim().length)
185
- return { ok: true, config: {} };
186
- try {
187
- const parsed = JSON.parse(existing);
188
- // Valid JSON that is not a PLAIN OBJECT — `[]`, `3`, `"x"`, `null` — must not fall through to an
189
- // empty config, because the file then gets rewritten wholesale. Unparseable JSON was always
190
- // handled conservatively; this adjacent case destroyed the file instead.
191
- if (typeof parsed !== 'object' || null === parsed || Array.isArray(parsed))
192
- return { ok: false };
193
- return { ok: true, config: parsed };
194
- }
195
- catch {
196
- return { ok: false };
197
- }
198
- }
199
- /**
200
- * Should this entry be left exactly as it is?
201
- *
202
- * Two different reasons to leave one alone, and only one is "it is correct":
203
- * - it already matches what we would write; or
204
- * - it is not an entry WE wrote. Somebody pointing `reticle` at their own local build made a
205
- * deliberate choice, and replacing it with the published npx command breaks a setup to fix a
206
- * problem they do not have.
207
- *
208
- * What IS repaired is a stale entry of our own shape — an old pin, a moved command — which
209
- * presence-only idempotency reported as "already registered" and never fixed, so an upgrade could
210
- * not repair the thing an upgrade exists to repair — and a WRONG one, naming a Reticle package that
211
- * has no MCP server in it (see isReticleRegistration).
212
- */
213
- function leaveEntryAlone(existing, spec) {
214
- if (JSON.stringify(existing) === JSON.stringify(spec.entry()))
215
- return true;
216
- if (typeof existing !== 'object' || null === existing)
217
- return true;
218
- const record = existing;
219
- // Both shapes carry the package name somewhere in a string; find it without assuming which field.
220
- const tokens = [record.command, record.args].flat().filter((v) => 'string' === typeof v);
221
- return !isReticleRegistration(tokens);
222
- }
223
- /**
224
- * Merge our server into this client's config.
225
- *
226
- * TOML is never auto-merged. Editing TOML without a parser is how a config file gets corrupted, and
227
- * a corrupted `~/.codex/config.toml` costs the user every server they had, not just ours. Printing
228
- * the exact block is honest; writing a guess is not — so Codex returns MANUAL with a snippet.
229
- */
230
- export function mergeClientConfig(spec, existing) {
231
- if (spec.format !== ConfigFormat.JSON) {
232
- return { status: ClientMergeStatus.MANUAL, content: existing ?? '' };
233
- }
234
- const parsed = parseConfig(existing);
235
- if (!parsed.ok)
236
- return { status: ClientMergeStatus.MANUAL, content: existing ?? '' };
237
- const config = parsed.config;
238
- const current = config[spec.serversKey];
239
- const servers = 'object' === typeof current && null !== current && !Array.isArray(current)
240
- ? current
241
- : {};
242
- if (Object.prototype.hasOwnProperty.call(servers, MCP_SERVER_NAME) &&
243
- leaveEntryAlone(servers[MCP_SERVER_NAME], spec)) {
244
- return { status: ClientMergeStatus.ALREADY, content: existing ?? '' };
245
- }
246
- // Only OUR key is replaced; every other server and top-level key is carried through untouched.
247
- const merged = {
248
- ...config,
249
- [spec.serversKey]: { ...servers, [MCP_SERVER_NAME]: spec.entry() },
250
- };
251
- return { status: ClientMergeStatus.APPLY, content: `${JSON.stringify(merged, null, 2)}\n` };
252
- }
253
- /**
254
- * A block the user can paste, for a client we could not write.
255
- *
256
- * Every client gets one, including the ones we CAN write: when a merge comes back MANUAL because the
257
- * file could not be parsed, the snippet is the only actionable thing left to give.
258
- */
259
- export function clientSnippet(spec) {
260
- if (spec.format === ConfigFormat.TOML) {
261
- const args = npxServerArgs()
262
- .map((a) => `"${a}"`)
263
- .join(', ');
264
- return `[mcp_servers.${MCP_SERVER_NAME}]\ncommand = "${NPX}"\nargs = [${args}]\n`;
265
- }
266
- if (spec.format === ConfigFormat.CLI) {
267
- return `claude mcp add -s user ${MCP_SERVER_NAME} -- ${NPX} ${npxServerArgs().join(' ')}\n`;
268
- }
269
- return `${JSON.stringify({ [spec.serversKey]: { [MCP_SERVER_NAME]: spec.entry() } }, null, 2)}\n`;
270
- }
271
- /**
272
- * The path whose existence means "this user has this client".
273
- *
274
- * Detection is deliberately conservative and one-directional: we write into a config a client
275
- * ALREADY has, and never create `~/.gemini/` or `~/.codeium/` for somebody who does not use them.
276
- * Littering a home directory to register a server nobody asked for is worse than printing a snippet.
277
- *
278
- * For a `home` client this is the directory above its config; for a `project` client it is the
279
- * config file (or its directory) inside the repo, which is unambiguous evidence somebody uses it
280
- * here. Same reasoning as Cursor's existing rule, which also accepts a project-level `.cursor/`
281
- * because a fresh Cursor profile has not written `~/.cursor` yet.
282
- */
283
- export function clientMarkerRelPath(spec) {
284
- if (spec.scope === ConfigScope.CLI)
285
- return '';
286
- const parts = spec.relPath.split('/');
287
- return parts.length > 1 ? parts.slice(0, -1).join('/') : spec.relPath;
288
- }
289
- /**
290
- * Project-relative directory whose presence signals Cursor is in use for this repo.
291
- *
292
- * A fresh Cursor profile has not written `~/.cursor` yet, so the home marker alone misses real
293
- * users. A project-level `.cursor/` is unambiguous evidence somebody uses Cursor here.
294
- */
295
- export const CURSOR_PROJECT_MARKER = '.cursor';
296
- /** Clients `init` can wire by writing a file — everything but the CLI-registered one. */
297
- export function fileBackedClients() {
298
- return MCP_CLIENTS.filter((spec) => spec.scope !== ConfigScope.CLI);
299
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * Did `reticle init` actually register the MCP server?
3
- *
4
- * This was `!failed.has(MCP_TARGET)` — the negation of one narrow failure set — so a step that was
5
- * SKIPPED (`--no-mcp`) or left MANUAL (the user has to run a command themselves) reported success,
6
- * because neither is a failure. Under `--no-mcp` every run claimed registration.
7
- *
8
- * It is the onboarding funnel's most important field, and it was wrong in the flattering direction
9
- * on exactly the runs least likely to have a working install.
10
- */
11
- import { StepStatus } from './plan.js';
12
- export declare function wasMcpRegistered(status: StepStatus | undefined): boolean;
@@ -1,14 +0,0 @@
1
- /**
2
- * Did `reticle init` actually register the MCP server?
3
- *
4
- * This was `!failed.has(MCP_TARGET)` — the negation of one narrow failure set — so a step that was
5
- * SKIPPED (`--no-mcp`) or left MANUAL (the user has to run a command themselves) reported success,
6
- * because neither is a failure. Under `--no-mcp` every run claimed registration.
7
- *
8
- * It is the onboarding funnel's most important field, and it was wrong in the flattering direction
9
- * on exactly the runs least likely to have a working install.
10
- */
11
- import { StepStatus } from './plan.js';
12
- export function wasMcpRegistered(status) {
13
- return status === StepStatus.APPLY || status === StepStatus.ALREADY;
14
- }
@@ -1,89 +0,0 @@
1
- /**
2
- * Global (user-scope) MCP registration for `reticle init`. The bridge + MCP server is a single
3
- * process that serves every project, so it is registered ONCE at user scope — not per-project via
4
- * a checked-in `.mcp.json`. We shell out to the official `claude mcp add -s user` CLI rather than
5
- * hand-editing `~/.claude.json` (a large stateful file). When the `claude` CLI is absent we print a
6
- * manual instruction instead.
7
- *
8
- * The registration is intentionally PORTLESS — `npx @reticlehq/server mcp`, never `--port N`. A single
9
- * global entry serves every project, so baking a port into it would pin every project to one port
10
- * and defeat per-project isolation. Instead `reticle mcp` resolves the port at runtime from the
11
- * project's `.reticle.json` in its CWD (see cli-port.ts). The port belongs to the project, not the
12
- * global agent config.
13
- */
14
- export { MCP_SERVER_NAME } from '@reticlehq/core';
15
- /**
16
- * The registered command is STILL bare `npx` on every platform, deliberately.
17
- *
18
- * Windows is most of Reticle's users and, when this was written, had no CI. There is Windows CI
19
- * now, so the `cmd /c` fallback is testable. Defaulting the majority platform to that launch
20
- * command is still the riskier change: `.cmd` has spawn caveats in some hosts, and a registration
21
- * that works on the machines we can test can still fail in the hosts we cannot. So the fallback
22
- * stays documented rather than defaulted.
23
- *
24
- * What DID change is when it is printed. `mcpManual` used to run only when the `claude` CLI was
25
- * absent. The reported Windows install had `claude mcp add` succeed, so the one paragraph that
26
- * would have unblocked zero tools never appeared. `mcpWindowsNote` is that paragraph, and init
27
- * prints it on every Windows run — including the ones that look like a clean registration.
28
- */
29
- export declare const NPX = "npx";
30
- /**
31
- * Args after `npx` that launch the bridge: `@reticlehq/server mcp`. Portless — the port comes from
32
- * the project's `.reticle.json` at runtime, so one global entry works for every project.
33
- *
34
- * DELIBERATELY UNPINNED, and the trade is worth stating. `reticle init` pins the SDK to the CLI's
35
- * exact version, so on release day the app can be on the new one while npx serves a cached older
36
- * build — a real skew, reported from the field. Pinning this entry would remove that window.
37
- *
38
- * It would also freeze the agent's MCP server at whatever version was installed the day `init` ran,
39
- * for as long as that entry survives — and `reticle update` upgrades the CLI, not a global agent
40
- * config. Reticle's biggest measured problem is fixes not reaching people (2.4.0 reached zero users
41
- * before its nudge existed), and a permanent pin makes that worse for every install, to close a
42
- * window that lasts until the next npx cache miss.
43
- *
44
- * So it stays unpinned, and the skew is handled where it actually shows up: the contract fingerprint
45
- * makes a real mismatch loud on the next tool result (see version-skew), and a stale entry of our own
46
- * shape is now repaired on re-run rather than reported "already registered" (see mcp-clients.ts).
47
- */
48
- export declare function npxServerArgs(): string[];
49
- /**
50
- * Is this existing registration one WE are responsible for?
51
- *
52
- * Deliberately the SCOPE and not the server package. An entry naming any `@reticlehq/*` package is
53
- * ours to repair — including one naming the WRONG package, which is the case this widened for:
54
- * `args: ["@reticlehq/core","mcp"]` was reported from the field, where `core` has no `mcp` bin, so
55
- * the client showed the server errored with zero tools while `init` reported it already wired and
56
- * left it alone on every re-run. Every `reticle_*` tool was blocked until a human edited that file.
57
- *
58
- * An entry that names no Reticle package at all — a local build, a wrapper script — is still someone
59
- * else's deliberate choice and is left exactly as it is.
60
- *
61
- * @param tokens every string in the entry's command + args, in any of the client shapes.
62
- */
63
- export declare function isReticleRegistration(tokens: readonly string[]): boolean;
64
- interface ClaudeAddCommand {
65
- command: string;
66
- args: string[];
67
- /** Human-readable form of the same command, for reports and manual fallback. */
68
- display: string;
69
- }
70
- /** `claude mcp add reticle -s user -- npx @reticlehq/server mcp` — registers globally for all projects (portless). */
71
- export declare function claudeAddCommand(): ClaudeAddCommand;
72
- /** Probe args that tell us whether an `reticle` server already exists in any scope (exit 0 = exists). */
73
- export declare function claudeExistsProbe(): {
74
- command: string;
75
- args: string[];
76
- };
77
- /** Probe args for whether the `claude` CLI is installed at all. */
78
- export declare function claudeAvailableProbe(): {
79
- command: string;
80
- args: string[];
81
- };
82
- /**
83
- * The Windows `cmd /c npx` registration. Printed on every Windows init, not only when the `claude`
84
- * CLI is missing — a successful `claude mcp add` of bare `npx` is exactly the failure that reported
85
- * as a clean install with zero tools.
86
- */
87
- export declare function mcpWindowsNote(): string;
88
- /** Printed when the `claude` CLI isn't available — register Reticle globally once, by hand. */
89
- export declare function mcpManual(): string;