@reticlehq/server 2.6.0 → 2.8.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 (276) hide show
  1. package/README.md +14 -5
  2. package/SKILL.md +251 -33
  3. package/dist/bridge/bridge.d.ts +6 -1
  4. package/dist/bridge/bridge.js +27 -4
  5. package/dist/capsule/causal-summary.d.ts +20 -0
  6. package/dist/capsule/causal-summary.js +31 -6
  7. package/dist/capsule/divergence.js +7 -1
  8. package/dist/cli/chromium-hint.d.ts +68 -0
  9. package/dist/cli/chromium-hint.js +145 -0
  10. package/dist/cli/cli-doctor.js +31 -36
  11. package/dist/cli/cli-kill.d.ts +58 -0
  12. package/dist/cli/cli-kill.js +162 -0
  13. package/dist/cli/cli-launch.d.ts +18 -0
  14. package/dist/cli/cli-launch.js +32 -1
  15. package/dist/cli/cli-parse.d.ts +16 -1
  16. package/dist/cli/cli-parse.js +32 -9
  17. package/dist/cli/cli-port.d.ts +8 -0
  18. package/dist/cli/cli-port.js +36 -1
  19. package/dist/cli/cli-verify.js +2 -2
  20. package/dist/cli/doctor-daemon-line.js +10 -1
  21. package/dist/cli/doctor-sessions-line.d.ts +12 -0
  22. package/dist/cli/doctor-sessions-line.js +66 -0
  23. package/dist/cli/port-holder.d.ts +10 -0
  24. package/dist/cli/port-holder.js +26 -2
  25. package/dist/cli.js +139 -23
  26. package/dist/crawl/crawl-tools.js +12 -2
  27. package/dist/crawl/crawl.d.ts +13 -0
  28. package/dist/crawl/crawl.js +50 -2
  29. package/dist/daemon/daemon-resilience.js +2 -2
  30. package/dist/daemon/loopback-alias.d.ts +32 -0
  31. package/dist/daemon/loopback-alias.js +80 -0
  32. package/dist/events/contradictions.d.ts +14 -0
  33. package/dist/events/contradictions.js +26 -17
  34. package/dist/events/predicate-eval.d.ts +26 -3
  35. package/dist/events/predicate-eval.js +284 -95
  36. package/dist/events/predicate-parse.d.ts +1 -1
  37. package/dist/events/predicate-parse.js +18 -4
  38. package/dist/events/predicate.js +170 -18
  39. package/dist/events/ring-buffer.d.ts +8 -0
  40. package/dist/events/ring-buffer.js +34 -1
  41. package/dist/flows/flow-classify.js +1 -1
  42. package/dist/flows/flow-tools.js +12 -4
  43. package/dist/flows/heal-run.js +1 -1
  44. package/dist/honesty/blind-spots.js +6 -2
  45. package/dist/honesty/honesty.d.ts +11 -0
  46. package/dist/honesty/honesty.js +9 -1
  47. package/dist/honesty/unsettled.d.ts +40 -0
  48. package/dist/honesty/unsettled.js +78 -0
  49. package/dist/honesty/verified.d.ts +7 -0
  50. package/dist/honesty/verified.js +27 -4
  51. package/dist/http-server.js +11 -1
  52. package/dist/index.js +29 -2
  53. package/dist/init/agent-rules.d.ts +16 -0
  54. package/dist/init/agent-rules.js +96 -17
  55. package/dist/init/astro-patch.d.ts +2 -1
  56. package/dist/init/astro-patch.js +11 -5
  57. package/dist/init/capabilities.d.ts +22 -0
  58. package/dist/init/capabilities.js +76 -0
  59. package/dist/init/confirm.d.ts +96 -0
  60. package/dist/init/confirm.js +138 -0
  61. package/dist/init/cra.js +3 -2
  62. package/dist/init/detect.d.ts +8 -0
  63. package/dist/init/detect.js +15 -0
  64. package/dist/init/non-js-project.d.ts +27 -0
  65. package/dist/init/non-js-project.js +84 -0
  66. package/dist/init/plan-framework.d.ts +9 -0
  67. package/dist/init/plan-framework.js +72 -16
  68. package/dist/init/plan.d.ts +40 -4
  69. package/dist/init/plan.js +183 -43
  70. package/dist/init/run.d.ts +24 -2
  71. package/dist/init/run.js +181 -46
  72. package/dist/init/slash-command.d.ts +1 -1
  73. package/dist/init/slash-command.js +46 -6
  74. package/dist/init/snippets.d.ts +64 -5
  75. package/dist/init/snippets.js +220 -31
  76. package/dist/init/vite-config.js +29 -3
  77. package/dist/input/network-mock-tools.d.ts +19 -0
  78. package/dist/input/network-mock-tools.js +29 -4
  79. package/dist/license/license.js +1 -1
  80. package/dist/mcp/mcp-proxy.d.ts +69 -3
  81. package/dist/mcp/mcp-proxy.js +215 -23
  82. package/dist/mcp/mcp.js +58 -7
  83. package/dist/mcp/proxy-lifecycle.d.ts +20 -1
  84. package/dist/mcp/proxy-lifecycle.js +22 -1
  85. package/dist/pool/browser-pool.d.ts +22 -2
  86. package/dist/pool/browser-pool.js +44 -4
  87. package/dist/pool/playwright-launcher.js +10 -2
  88. package/dist/project/learned-routes.d.ts +24 -0
  89. package/dist/project/learned-routes.js +63 -0
  90. package/dist/project/project-store.d.ts +6 -0
  91. package/dist/project/project-store.js +25 -1
  92. package/dist/session/live-control-tools.js +39 -2
  93. package/dist/session/live-control.d.ts +7 -9
  94. package/dist/session/live-control.js +34 -1
  95. package/dist/session/no-session-diagnosis.d.ts +23 -4
  96. package/dist/session/no-session-diagnosis.js +128 -44
  97. package/dist/session/no-session-watch.js +12 -0
  98. package/dist/session/ref-provenance.d.ts +54 -0
  99. package/dist/session/ref-provenance.js +61 -0
  100. package/dist/session/review-store.d.ts +19 -0
  101. package/dist/session/review-store.js +34 -5
  102. package/dist/session/session-lease.js +1 -1
  103. package/dist/session/session-manager.d.ts +9 -0
  104. package/dist/session/session-manager.js +11 -0
  105. package/dist/session/session.d.ts +8 -0
  106. package/dist/session/session.js +12 -0
  107. package/dist/status-payload.d.ts +13 -1
  108. package/dist/status-payload.js +6 -1
  109. package/dist/telemetry/app-instrumented.d.ts +37 -0
  110. package/dist/telemetry/app-instrumented.js +54 -0
  111. package/dist/telemetry/automation-hint.d.ts +17 -0
  112. package/dist/telemetry/automation-hint.js +71 -0
  113. package/dist/telemetry/bug-found.d.ts +0 -20
  114. package/dist/telemetry/bug-found.js +38 -21
  115. package/dist/telemetry/cli-telemetry.js +7 -1
  116. package/dist/telemetry/daemon-telemetry.d.ts +4 -4
  117. package/dist/telemetry/daemon-telemetry.js +8 -4
  118. package/dist/telemetry/feedback.js +1 -1
  119. package/dist/telemetry/init-telemetry.js +9 -1
  120. package/dist/telemetry/install-source.d.ts +36 -0
  121. package/dist/telemetry/install-source.js +40 -0
  122. package/dist/telemetry/run-telemetry.js +4 -1
  123. package/dist/telemetry/session-metrics.d.ts +3 -3
  124. package/dist/telemetry/session-metrics.js +9 -4
  125. package/dist/telemetry/telemetry.d.ts +7 -1
  126. package/dist/telemetry/telemetry.js +17 -2
  127. package/dist/telemetry/tool-refused.d.ts +19 -0
  128. package/dist/telemetry/tool-refused.js +55 -0
  129. package/dist/telemetry/verification-of.js +72 -8
  130. package/dist/temp-dir.d.ts +27 -0
  131. package/dist/temp-dir.js +46 -0
  132. package/dist/tools/act-tools.js +77 -11
  133. package/dist/tools/assert-grade.d.ts +1 -1
  134. package/dist/tools/assert-grade.js +27 -5
  135. package/dist/tools/assert-verdict.js +25 -1
  136. package/dist/tools/contract-tools.js +4 -0
  137. package/dist/tools/dynamic-tools.js +1 -1
  138. package/dist/tools/error-recovery.d.ts +10 -0
  139. package/dist/tools/error-recovery.js +70 -5
  140. package/dist/tools/feedback-invite.js +1 -1
  141. package/dist/tools/invoke-tool.js +149 -32
  142. package/dist/tools/lease-tools.d.ts +29 -1
  143. package/dist/tools/lease-tools.js +58 -5
  144. package/dist/tools/navigate-result.js +1 -1
  145. package/dist/tools/observe-tools.js +1 -1
  146. package/dist/tools/observed-nothing.js +1 -1
  147. package/dist/tools/react-grace.d.ts +48 -0
  148. package/dist/tools/react-grace.js +87 -0
  149. package/dist/tools/read-tools.js +20 -4
  150. package/dist/tools/settle-in-flight.d.ts +79 -0
  151. package/dist/tools/settle-in-flight.js +106 -0
  152. package/dist/tools/snapshot-delta.d.ts +7 -0
  153. package/dist/tools/snapshot-delta.js +130 -6
  154. package/dist/tools/tool-kit.d.ts +52 -5
  155. package/dist/tools/tool-kit.js +55 -24
  156. package/dist/tools/tool-surface.js +28 -9
  157. package/dist/tools/tools.js +38 -4
  158. package/dist/visual/capture-cleanup.d.ts +16 -0
  159. package/dist/visual/capture-cleanup.js +39 -0
  160. package/dist/visual/visual-tools.d.ts +18 -0
  161. package/dist/visual/visual-tools.js +24 -5
  162. package/docs/README.md +56 -11
  163. package/docs/actions.mdx +87 -0
  164. package/docs/agent-cheatsheet.md +102 -26
  165. package/docs/architecture.md +46 -35
  166. package/docs/benchmarks.md +76 -72
  167. package/docs/best-practices.mdx +211 -0
  168. package/docs/capabilities.mdx +387 -0
  169. package/docs/cli/affected.mdx +51 -0
  170. package/docs/cli/capsules.mdx +69 -0
  171. package/docs/cli/cloud.mdx +127 -0
  172. package/docs/cli/doctor.mdx +76 -0
  173. package/docs/cli/drive.mdx +55 -0
  174. package/docs/cli/feedback.mdx +67 -0
  175. package/docs/cli/gate.mdx +64 -0
  176. package/docs/cli/help.mdx +92 -0
  177. package/docs/cli/hunt.mdx +57 -0
  178. package/docs/cli/identify.mdx +62 -0
  179. package/docs/cli/init.mdx +94 -0
  180. package/docs/cli/kill.mdx +91 -0
  181. package/docs/cli/license.mdx +48 -0
  182. package/docs/cli/mcp.mdx +61 -0
  183. package/docs/cli/open.mdx +68 -0
  184. package/docs/cli/restart.mdx +60 -0
  185. package/docs/cli/rollback.mdx +35 -0
  186. package/docs/cli/serve.mdx +62 -0
  187. package/docs/cli/status.mdx +64 -0
  188. package/docs/cli/stop.mdx +56 -0
  189. package/docs/cli/telemetry.mdx +57 -0
  190. package/docs/cli/update.mdx +52 -0
  191. package/docs/cli/verify.mdx +57 -0
  192. package/docs/cli/version.mdx +39 -0
  193. package/docs/cli/watch.mdx +55 -0
  194. package/docs/cli.mdx +219 -0
  195. package/docs/debugging.md +13 -9
  196. package/docs/deploy-checks.md +15 -11
  197. package/docs/desktop-apps.md +49 -40
  198. package/docs/desktop.mdx +188 -0
  199. package/docs/docs.json +363 -0
  200. package/docs/enterprise.md +20 -16
  201. package/docs/faq.mdx +88 -0
  202. package/docs/fixtures.md +11 -7
  203. package/docs/flows.md +26 -22
  204. package/docs/for-agents.md +71 -0
  205. package/docs/frameworks.mdx +199 -0
  206. package/docs/gate-plan.md +45 -41
  207. package/docs/gates.md +23 -19
  208. package/docs/getting-started.md +76 -65
  209. package/docs/human-control.md +22 -18
  210. package/docs/index.mdx +101 -0
  211. package/docs/install-agentic.mdx +215 -0
  212. package/docs/install-manual.mdx +194 -0
  213. package/docs/instrumentation.mdx +232 -0
  214. package/docs/integration-patterns.md +38 -34
  215. package/docs/local-registry.md +16 -12
  216. package/docs/multi-agent-testing.md +16 -12
  217. package/docs/packages/babel-plugin.mdx +70 -0
  218. package/docs/packages/browser.mdx +111 -0
  219. package/docs/packages/core.mdx +106 -0
  220. package/docs/packages/electron.mdx +87 -0
  221. package/docs/packages/eslint-plugin.mdx +84 -0
  222. package/docs/packages/next.mdx +91 -0
  223. package/docs/packages/react.mdx +91 -0
  224. package/docs/packages/server.mdx +98 -0
  225. package/docs/packages/tauri.mdx +63 -0
  226. package/docs/packages/test.mdx +108 -0
  227. package/docs/packages/vite-plugin.mdx +96 -0
  228. package/docs/packages.mdx +217 -0
  229. package/docs/platform-integration.md +33 -26
  230. package/docs/predicates.mdx +179 -0
  231. package/docs/quickstart.mdx +211 -0
  232. package/docs/recipes.mdx +242 -0
  233. package/docs/skill-file.mdx +105 -0
  234. package/docs/state-management.mdx +197 -0
  235. package/docs/style.css +14 -0
  236. package/docs/system-map.md +47 -32
  237. package/docs/telemetry-contract.md +101 -46
  238. package/docs/telemetry-events.mdx +430 -0
  239. package/docs/telemetry.md +63 -50
  240. package/docs/testing.md +10 -6
  241. package/docs/token-efficiency.md +30 -26
  242. package/docs/tools-act-and-wait.mdx +123 -0
  243. package/docs/tools-act-sequence.mdx +120 -0
  244. package/docs/tools-act.mdx +82 -0
  245. package/docs/tools-assert.mdx +70 -0
  246. package/docs/tools-console.mdx +59 -0
  247. package/docs/tools-inspect.mdx +85 -0
  248. package/docs/tools-navigate.mdx +63 -0
  249. package/docs/tools-network.mdx +86 -0
  250. package/docs/tools-observe.mdx +89 -0
  251. package/docs/tools-overview.mdx +157 -0
  252. package/docs/tools-query.mdx +82 -0
  253. package/docs/tools-session-and-feedback.mdx +91 -0
  254. package/docs/tools-sessions.mdx +65 -0
  255. package/docs/tools-snapshot.mdx +75 -0
  256. package/docs/tools-state.mdx +81 -0
  257. package/docs/tools-tools-and-run.mdx +125 -0
  258. package/docs/tools-wait-for.mdx +66 -0
  259. package/docs/troubleshooting.mdx +193 -0
  260. package/docs/usage.md +175 -153
  261. package/docs/vs-chrome-devtools-mcp.mdx +82 -0
  262. package/docs/vs-playwright-mcp.mdx +85 -0
  263. package/docs/vs-screenshots.mdx +96 -0
  264. package/docs/what-is-reticle.mdx +63 -0
  265. package/docs/why-reticle.mdx +107 -0
  266. package/package.json +2 -2
  267. package/docs/matrix/2.5.0/claude-code-machine.json +0 -19
  268. package/docs/matrix/2.5.0/codex-machine.json +0 -20
  269. package/docs/matrix/2.5.0/cursor-machine.json +0 -22
  270. package/docs/matrix/2.5.0/gemini-machine.json +0 -22
  271. package/docs/matrix/2.5.0/opencode-machine.json +0 -22
  272. package/docs/matrix/2.5.0/vscode-machine.json +0 -22
  273. package/docs/matrix/2.5.0/windsurf-machine.json +0 -22
  274. package/docs/matrix/MATRIX.md +0 -26
  275. package/docs/matrix/README.md +0 -59
  276. package/docs/mint.json +0 -61
@@ -0,0 +1,55 @@
1
+ ---
2
+ title: reticle watch
3
+ description: Watch the working tree and report which saved flows must re-verify on every save.
4
+ icon: eye
5
+ ---
6
+
7
+ `reticle watch` is the buddy loop. It watches the current directory and, on every save of a source file, reports which saved flows the change puts at risk. It runs in the environment, so it costs your agent nothing per turn.
8
+
9
+ ```bash
10
+ npx @reticlehq/server watch [url]
11
+ ```
12
+
13
+ Long-running. Stop it with `Ctrl+C`.
14
+
15
+ ## Arguments
16
+
17
+ | Argument | Type | Default | What it does |
18
+ | --- | --- | --- | --- |
19
+ | `url` | string, positional, optional | unset | Accepted by the parser and reserved for the increment that replays the affected flows against a live app. The current version detects and reports only |
20
+
21
+ ## What it watches
22
+
23
+ The working directory, recursively, filtered to `.ts`, `.tsx`, `.js`, `.jsx`, `.mjs`, `.cjs`, `.vue` and `.svelte`. Changes are batched with a 200ms debounce.
24
+
25
+ ## What it prints
26
+
27
+ Real capture, the first two lines of a run in this repository:
28
+
29
+ ```json
30
+ {"t":"2026-08-14T19:39:09.196Z","event":"reticle_watch_started","cwd":"/Users/you/reticle"}
31
+ {"t":"2026-08-14T19:39:09.278Z","event":"reticle_buddy","status":"✓ 13/47 flows nominal · 9 flaky quarantined"}
32
+ ```
33
+
34
+ | Event | When |
35
+ | --- | --- |
36
+ | `reticle_watch_started` | Once, at startup, with the directory being watched |
37
+ | `reticle_buddy` | Once at startup and after every batch. One ambient line, designed to be parked in a status line |
38
+ | `reticle_watch_affected` | After a batch, when at least one flow is affected. Carries `changed` and `affected` |
39
+ | `reticle_watch_failed` | A flow load error. Never fatal |
40
+
41
+ <Note>
42
+ The buddy line is deliberately best-effort and silent on failure. A status line that throws is
43
+ worse than no status line, and it must never interfere with the watch loop it rides on.
44
+ </Note>
45
+
46
+ ## Exit codes
47
+
48
+ Runs until interrupted.
49
+
50
+ ## Worked example
51
+
52
+ ```bash
53
+ npx @reticlehq/server watch &
54
+ # edit src/components/Login.tsx, and the affected flows are named on save
55
+ ```
package/docs/cli.mdx ADDED
@@ -0,0 +1,219 @@
1
+ ---
2
+ title: CLI reference
3
+ description: Every reticle command. What it does, what it prints, and what it exits with. Captured from real runs.
4
+ icon: terminal
5
+ ---
6
+
7
+ The CLI is mostly for you, not your agent. Your agent talks MCP; you use these to set things up, work out why nothing connected, and wire verification into CI.
8
+
9
+ ```bash
10
+ npx @reticlehq/server <command>
11
+ ```
12
+
13
+ <Warning>
14
+ **Always invoke it as `npx @reticlehq/server <command>`.** The tables below name the commands as
15
+ `reticle <command>`, because `reticle` is the bin this package installs and that is what the CLI
16
+ prints about itself. It is **not** a package on npm: the bare name `reticle` belongs to an
17
+ unrelated author, so putting `npx` in front of it downloads and runs their code instead of ours.
18
+ Once
19
+ `@reticlehq/server` is a dependency of your project, `reticle <command>` works from an npm script
20
+ or with the bin on your PATH.
21
+ </Warning>
22
+
23
+ <Note>
24
+ Every output block on this page was captured by running the command. Where an exit code is quoted,
25
+ it was measured, not assumed.
26
+ </Note>
27
+
28
+ ## Setup and diagnosis
29
+
30
+ ### `reticle init`
31
+
32
+ Wires Reticle into the project in the current directory.
33
+
34
+ ```
35
+ reticle init [--dry-run] [--port N] [--no-mcp] [--no-install] [--app <dir>]
36
+ ```
37
+
38
+ <Card title="Full walkthrough with real output" icon="wand-magic-sparkles" href="/install-agentic">
39
+ What it writes, and how to read its four status marks.
40
+ </Card>
41
+
42
+ ### `reticle doctor`
43
+
44
+ The first thing to run when something is wrong. One command, the whole setup.
45
+
46
+ ```bash
47
+ npx @reticlehq/server doctor
48
+ ```
49
+
50
+ ```
51
+ reticle doctor
52
+ node v22.14.0
53
+ chromium ✓ installed
54
+ daemon ✓ running on :4400 (pid 24735, v2.8.0)
55
+ sessions ✓ 1 page connected
56
+ bridge port 4400 (your app must dial THIS port, not your dev-server port)
57
+ daemon log /Users/you/.reticle/daemon-4400.log
58
+ tracing RETICLE_TRACE=1 on the daemon for per-stage timings in that log
59
+ ```
60
+
61
+ Exits `0`. That parenthetical about the bridge port is doing a lot of work. Mixing it up with the dev-server port is the most common setup failure there is.
62
+
63
+ ### `reticle status`
64
+
65
+ Whether the daemon is up and which apps have connected.
66
+
67
+ ```json
68
+ {
69
+ "event": "reticle_status",
70
+ "port": 4400,
71
+ "running": true,
72
+ "pid": 24735,
73
+ "sessionCount": 1,
74
+ "sessions": [
75
+ {
76
+ "sessionId": "sece96901…",
77
+ "url": "http://localhost:4312/",
78
+ "throttled": true,
79
+ "stale": false
80
+ }
81
+ ]
82
+ }
83
+ ```
84
+
85
+ Exits `0`. A session in the list is the install genuinely finished. Not a tick in a checklist, a connected app.
86
+
87
+ ### `reticle telemetry [status|enable|disable]`
88
+
89
+ ```bash
90
+ npx @reticlehq/server telemetry status
91
+ ```
92
+
93
+ ```
94
+ telemetry disabled (this is a Reticle source checkout; developing it is not using it)
95
+ policy https://github.com/reticlehq/reticle/blob/main/docs/telemetry.md
96
+ ```
97
+
98
+ <Card title="Exactly what is collected" icon="chart-line" href="/telemetry">
99
+ The complete list, and how to turn it off.
100
+ </Card>
101
+
102
+ ## Running the app
103
+
104
+ | Command | What it does |
105
+ | --- | --- |
106
+ | `reticle serve` | Start the daemon in the foreground. `--drive <url>`, `--headless`, `--http` |
107
+ | `reticle stop` | Stop it |
108
+ | `reticle open [url]` | Show the app. Reuse the connected tab, or open one |
109
+ | `reticle drive <url>` | Foreground mode, for debugging |
110
+ | `reticle mcp` | The MCP stdio proxy. Auto-starts the daemon if needed. This is what your agent runs |
111
+
112
+ <Warning>
113
+ `reticle drive` will fail with an `EADDRINUSE` stack trace if a daemon is already listening on the
114
+ port. Which is the normal state once your agent has started one. `reticle mcp` reuses a running
115
+ daemon; `drive` currently does not.
116
+ </Warning>
117
+
118
+ ## Verification
119
+
120
+ ### `reticle verify <url>`
121
+
122
+ One-shot: drive the URL, replay the saved flows, exit `0` on pass. This is the command for CI when you do not want a model in the loop.
123
+
124
+ ```bash
125
+ npx @reticlehq/server verify http://localhost:5173 --timeout 60000
126
+ ```
127
+
128
+ Options: `--headed`, `--timeout N`, `--storage-state <file>`. That last one is how you verify flows behind a login without scripting the login every time.
129
+
130
+ ### `reticle affected`
131
+
132
+ Which saved flows must re-verify for a set of changed files.
133
+
134
+ ```bash
135
+ npx @reticlehq/server affected --since HEAD~1
136
+ ```
137
+
138
+ ```json
139
+ {
140
+ "event": "reticle_affected",
141
+ "changedFiles": ["docs/README.md", "packages/server/src/tools/docs-index-coverage.test.ts"],
142
+ "affected": ["deploy-journey", "verify-modal", "verify-route", "…"],
143
+ "unknownProvenance": ["deploy-journey", "verify-modal", "…"]
144
+ }
145
+ ```
146
+
147
+ <Note>
148
+ `unknownProvenance` lists flows Reticle could not map to source files, so it includes them to be
149
+ safe. A flow recorded before provenance tracking existed has no file list, and Reticle would
150
+ rather re-run it than skip it and miss a regression. A large `unknownProvenance` means your flows
151
+ predate the feature. Re-record the ones you care about to get precise selection.
152
+ </Note>
153
+
154
+ ### `reticle gate`
155
+
156
+ The CI gate. Exits non-zero unless passing artifacts cover the affected flows.
157
+
158
+ ```bash
159
+ npx @reticlehq/server gate --since HEAD~1
160
+ ```
161
+
162
+ ```json
163
+ {
164
+ "event": "reticle_gate",
165
+ "pass": false,
166
+ "uncovered": ["deploy-journey", "verify-modal", "…"],
167
+ "quarantined": ["drift-demo", "qa2-flow"],
168
+ "coverage": { "pct": 9, "covered": 4, "total": 47 }
169
+ }
170
+ ```
171
+
172
+ Measured exit code: **`1`**. That run genuinely failed, with 4 of 47 flows covered, which is what a gate is supposed to do when you have not verified anything yet.
173
+
174
+ `quarantined` flows are excluded from the pass/fail decision. Quarantine is for a flow that is known flaky and being fixed; it is not a place to hide failures, because the list is printed on every run.
175
+
176
+ ### `reticle watch [url]`
177
+
178
+ On save, report which saved flows must re-verify. The interactive companion to `affected`.
179
+
180
+ ## Maintenance
181
+
182
+ | Command | What it does |
183
+ | ------------------ | --------------------------------------------------- |
184
+ | `reticle update` | Install the latest server version and restart |
185
+ | `reticle rollback` | Restore the previous version and restart |
186
+ | `reticle license` | Enterprise license status: active, eval, or missing |
187
+ | `reticle version` | Print the version |
188
+ | `reticle help` | Usage for everything |
189
+
190
+ <Tip>
191
+ `rollback` exists because an auto-updating dev tool that cannot go back is a dev tool that can
192
+ ruin your afternoon. It restores the previous version and restarts in one step.
193
+ </Tip>
194
+
195
+ ## Feedback
196
+
197
+ ```bash
198
+ # humans
199
+ npx @reticlehq/server feedback "what worked, what didn't"
200
+
201
+ # agents, including from a setup that never finished
202
+ npx @reticlehq/server feedback --agent --kind <bug|gap|ambiguity|feature_request|improvement> "what happened"
203
+ ```
204
+
205
+ The `--agent` form matters more than it looks: the setup that failed halfway is exactly the setup worth hearing about, and in that state the MCP tools do not exist yet.
206
+
207
+ <Card title="How feedback is handled" icon="comments" href="/tools-session-and-feedback">
208
+ What each kind means, and what happens when a report cannot be delivered.
209
+ </Card>
210
+
211
+ ## `reticle identify`
212
+
213
+ Opt-in, and off by default:
214
+
215
+ ```bash
216
+ npx @reticlehq/server identify --context company|side_project|open_source|learning [--email E] [--forget]
217
+ ```
218
+
219
+ Only useful if you want support or an enterprise trial. `--forget` removes it.
package/docs/debugging.md CHANGED
@@ -1,6 +1,10 @@
1
- # Debugging Reticle itself
1
+ ---
2
+ title: Debugging Reticle
3
+ description: For people working on Reticle itself. How to work out why a flow behaved the way it did.
4
+ icon: bug
5
+ ---
2
6
 
3
- > For people working **on** Reticle — and for an agent asked to explain why a flow behaved the way it did. If you are debugging **your app** with Reticle, you want [usage.md](usage.md) instead.
7
+ > For people working **on** Reticle, and for an agent asked to explain why a flow behaved the way it did. If you are debugging **your app** with Reticle, you want [usage.md](usage.md) instead.
4
8
 
5
9
  Reticle produces four different signals and they answer four different questions. Reaching for the wrong one is why investigations here have historically started by reading source.
6
10
 
@@ -27,7 +31,7 @@ tail -f ~/.reticle/daemon-4400.log | jq .
27
31
 
28
32
  ## Verbose flow tracing
29
33
 
30
- Off by default, because a trace on every tool call is a cost on the hot path — a verification loop is 50–200 calls. Measured, so the claim is checkable: a disabled span costs **126ns** per site (against ~9ns for a bare call), which is under a microsecond per tool call and not the literal zero it is tempting to write. Turn it on **for the daemon** (the flag is read per call, but the daemon is the process doing the work, so it has to be set where the daemon starts):
34
+ Off by default, because a trace on every tool call is a cost on the hot path, and a verification loop is 50 to 200 calls. Measured, so the claim is checkable: a disabled span costs **126ns** per site (against ~9ns for a bare call), which is under a microsecond per tool call and not the literal zero it is tempting to write. Turn it on **for the daemon** (the flag is read per call, but the daemon is the process doing the work, so it has to be set where the daemon starts):
31
35
 
32
36
  ```bash
33
37
  RETICLE_TRACE=1 reticle serve --port 4400
@@ -42,10 +46,10 @@ Every instrumented stage then emits one line **when it ends**, carrying its own
42
46
 
43
47
  Read it like this:
44
48
 
45
- - **`callId`** groups every stage of one tool call, and is prefixed with the daemon's pid so two daemons (or one that restarted) can never claim the same id. Several agents can be inside the daemon at once, so lines interleave — the id is the only thing that makes the output a tree instead of a pile.
49
+ - **`callId`** groups every stage of one tool call, and is prefixed with the daemon's pid so two daemons (or one that restarted) can never claim the same id. Several agents can be inside the daemon at once, so lines interleave; the id is the only thing that makes the output a tree instead of a pile.
46
50
  - **`depth`** is the nesting level. `0` is the tool handler; anything deeper ran inside it.
47
51
  - **`ms`** is that stage's own wall-clock. A parent's `ms` includes its children's.
48
- - **`ok:false`** carries an `error` field. A stage that threw is still traced — otherwise the trace would show a call that entered a stage and never left, which reads as a hang.
52
+ - **`ok:false`** carries an `error` field. A stage that threw is still traced; otherwise the trace would show a call that entered a stage and never left, which reads as a hang.
49
53
 
50
54
  One line per stage, at the end, is deliberate: a start line as well would double the volume to say something the end line already implies.
51
55
 
@@ -61,7 +65,7 @@ The spans that ship today:
61
65
  | `crawl.step` | one control the crawl clicked, including its settle budget |
62
66
  | `init.plan` / `init.apply` / `init.exec` / `init.exec.retry` / `init.write` | the install, phase by phase |
63
67
 
64
- The first two answer _"is this slow because of us or because of the app under test?"_ —
68
+ The first two answer _"is this slow because of us or because of the app under test?"_
65
69
 
66
70
  `browser.command` close to `tool.handler` means the app is taking the time. A large gap between them is Reticle's own overhead, and that is a performance bug of ours.
67
71
 
@@ -79,7 +83,7 @@ grep '"event":"trace"' ~/.reticle/daemon-4400.log | jq -sc 'sort_by(-.ms)[:10] |
79
83
 
80
84
  ### The init flow
81
85
 
82
- `reticle init` is synchronous end to end, so it uses `spanSync` — same line, same tree:
86
+ `reticle init` is synchronous end to end, so it uses `spanSync`: same line, same tree:
83
87
 
84
88
  ```
85
89
  init.plan 2ms
@@ -89,7 +93,7 @@ init.write 1ms target=.reticle.json
89
93
  init.apply 262ms steps=5
90
94
  ```
91
95
 
92
- Two things that trace makes visible and nothing else did. Planning is ~2ms, so init's wall-clock is essentially all subprocess: the package manager, and `claude mcp add` when MCP registration is on. And when the pinned install is refused, the unpinned **retry is a second full package-manager run** — init legitimately takes about twice as long on that path. Every `--local` fixture run takes it, because the version being installed is not published yet.
96
+ Two things that trace makes visible and nothing else did. Planning is ~2ms, so init's wall-clock is essentially all subprocess: the package manager, and `claude mcp add` when MCP registration is on. And when the pinned install is refused, the unpinned **retry is a second full package-manager run**, so init legitimately takes about twice as long on that path. Every `--local` fixture run takes it, because the version being installed is not published yet.
93
97
 
94
98
  ### Adding a span
95
99
 
@@ -99,4 +103,4 @@ import { span } from '../trace.js';
99
103
  const result = await span('predicate.eval', { kind: predicate.kind }, () => evaluate(predicate));
100
104
  ```
101
105
 
102
- Wrap a stage worth a line in a bottleneck hunt — a session resolve, a browser round-trip, a predicate evaluation. Not every function: the trace earns its keep by being faster to read than the code, and that stops being true somewhere around one line per statement. Nesting needs no plumbing — the call id and depth ride in `AsyncLocalStorage`, so a span added five frames down still lands in the right tree without changing anyone's signature.
106
+ Wrap a stage worth a line in a bottleneck hunt: a session resolve, a browser round-trip, a predicate evaluation. Not every function: the trace earns its keep by being faster to read than the code, and that stops being true somewhere around one line per statement. Nesting needs no plumbing: the call id and depth ride in `AsyncLocalStorage`, so a span added five frames down still lands in the right tree without changing anyone's signature.
@@ -1,8 +1,12 @@
1
- # Verification at the deploy choke point (Vercel / Netlify)
1
+ ---
2
+ title: Deploy checks
3
+ description: 'Enforce verification at the moment code becomes a preview URL, as a Vercel or Netlify check on the PR.'
4
+ icon: circle-check
5
+ ---
2
6
 
3
- The strongest place to enforce verification is the moment code becomes a preview URL. Every deploy already produces one, and both Vercel and Netlify let a third party attach a **check** to it — pass/fail, shown on the PR, with no workflow file to write.
7
+ The strongest place to enforce verification is the moment code becomes a preview URL. Every deploy already produces one, and both Vercel and Netlify let a third party attach a **check** to it: pass/fail, shown on the PR, with no workflow file to write.
4
8
 
5
- That makes the non-developer story complete: the SDK is auto-injected by the build plugin, flows are minted from toolbar recordings with auto-proposed consequences, and verification runs at publish — **without anyone writing a test.**
9
+ That makes the non-developer story complete: the SDK is auto-injected by the build plugin, flows are minted from toolbar recordings with auto-proposed consequences, and verification runs at publish, **without anyone writing a test.**
6
10
 
7
11
  > Docs-only in v2.2.0. The pieces below all ship today (`reticle verify` exits 0/1 and persists a run artifact); what is _not_ built is a hosted Reticle app that registers itself as a provider. Wire it with the CI recipe until that exists.
8
12
 
@@ -14,11 +18,11 @@ git push → preview deploy → Reticle verifies the preview URL → check passe
14
18
 
15
19
  `reticle verify <preview-url>` is the whole integration surface:
16
20
 
17
- - exits **0** when every saved flow passes, **1** otherwise — the only contract a check needs,
21
+ - exits **0** when every saved flow passes, **1** otherwise (the only contract a check needs),
18
22
  - prints a legible ✓/✗ report for the PR log,
19
23
  - persists a `ReticleVerificationRun` artifact (`.reticle/runs/<id>.json`) so `reticle gate` and `reticle_run_export` can consume the same verdict.
20
24
 
21
- ## Recipe A — CI (works today, any provider)
25
+ ## Recipe A: CI (works today, any provider)
22
26
 
23
27
  ```yaml
24
28
  # .github/workflows/verify.yml
@@ -34,14 +38,14 @@ jobs:
34
38
  - run: pnpm install --frozen-lockfile
35
39
  - run: npx playwright install --with-deps chromium
36
40
  # Reticle drives the preview and owns its own browser + daemon.
37
- - run: npx reticle verify "${{ github.event.deployment_status.target_url }}" --timeout 60000
41
+ - run: npx @reticlehq/server verify "${{ github.event.deployment_status.target_url }}" --timeout 60000
38
42
  ```
39
43
 
40
44
  The job's own pass/fail becomes the PR check. Nothing else is required.
41
45
 
42
- **Non-loopback previews need pairing.** For a real preview URL (not `localhost`), Reticle injects `reticle.connect()` with a one-time token and allow-lists the preview origin — so the app does not need to be rebuilt per environment. Confirm the SDK actually runs on the deployed build: a production build that tree-shakes the dev-only SDK will connect to nothing, and `verify` will (correctly) fail with _"no app connected."_
46
+ **Non-loopback previews need pairing.** For a real preview URL (not `localhost`), Reticle injects `reticle.connect()` with a one-time token and allow-lists the preview origin, so the app does not need to be rebuilt per environment. Confirm the SDK actually runs on the deployed build: a production build that tree-shakes the dev-only SDK will connect to nothing, and `verify` will (correctly) fail with _"no app connected."_
43
47
 
44
- ## Recipe B — the Checks API pattern (what a hosted Reticle would do)
48
+ ## Recipe B: the Checks API pattern (what a hosted Reticle would do)
45
49
 
46
50
  Both providers expose the same shape, which is why this is one integration rather than two:
47
51
 
@@ -54,10 +58,10 @@ The flow is: receive the deploy webhook → `reticle verify <target_url>` → po
54
58
 
55
59
  ## Pair it with the local gate
56
60
 
57
- The deploy check catches what reaches a preview. `reticle gate` catches it earlier — an agent that edits a covered file cannot "finish" without re-verifying:
61
+ The deploy check catches what reaches a preview. `reticle gate` catches it earlier: an agent that edits a covered file cannot "finish" without re-verifying:
58
62
 
59
63
  ```bash
60
- reticle gate --since origin/main # exit 1 unless passing artifacts cover the affected flows
64
+ npx @reticlehq/server gate --since origin/main # exit 1 unless passing artifacts cover the affected flows
61
65
  ```
62
66
 
63
67
  Use both: `gate` in the agent's Stop hook (see `agent-cheatsheet`), `verify` at the deploy. They read the same run artifacts, so a green gate locally and a green check on the PR mean the same thing.
@@ -66,4 +70,4 @@ Use both: `gate` in the agent's Stop hook (see `agent-cheatsheet`), `verify` at
66
70
 
67
71
  - **`verify` needs one connected session.** If several tabs of the app are open against the same daemon it refuses rather than guessing which to drive.
68
72
  - **It replays flows sequentially against one tab**, so flows must not depend on each other's leftover state (a flow that logs in contaminates the next one). Author self-contained flows, or use `reticle_flow_verify { parallel }`, which gives each flow an isolated context.
69
- - **No saved flows means nothing to verify** — `verify` fails rather than reporting a vacuous pass.
73
+ - **No saved flows means nothing to verify.** `verify` fails rather than reporting a vacuous pass.