@reticlehq/server 3.4.0 → 3.5.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 (69) hide show
  1. package/dist/command/cli/auth/cloud-session.d.ts +4 -4
  2. package/dist/command/cli/auth/device-flow.d.ts +2 -2
  3. package/dist/command/cli/cli-parse.d.ts +1 -1
  4. package/dist/command/cli/cli-parse.js +3 -1
  5. package/dist/command/cli/cloud-cli.js +59 -0
  6. package/dist/command/cli/cloud-login.d.ts +1 -1
  7. package/dist/command/cli/cloud-login.js +8 -7
  8. package/dist/command/cli/setup-mcp-cli.js +9 -1
  9. package/dist/command/cli.js +17 -1
  10. package/dist/command/setup/bringup/dev-server-wait.d.ts +2 -0
  11. package/dist/command/setup/bringup/dev-server-wait.js +1 -1
  12. package/dist/command/setup/init/init-runtime.js +53 -8
  13. package/dist/command/setup/node-effects.js +6 -1
  14. package/dist/command/setup/run-setup.d.ts +2 -0
  15. package/dist/command/setup/run-setup.js +7 -2
  16. package/dist/command/setup/setup-mcp.d.ts +2 -0
  17. package/dist/command/setup/setup-mcp.js +14 -5
  18. package/dist/command/version/peer-announce.d.ts +6 -2
  19. package/dist/command/version/peer-announce.js +8 -6
  20. package/dist/command/version/version-nudge.d.ts +17 -3
  21. package/dist/command/version/version-nudge.js +25 -4
  22. package/dist/features/harness/fill-values.d.ts +4 -0
  23. package/dist/features/harness/fill-values.js +47 -11
  24. package/dist/features/harness/openai-driver.d.ts +12 -0
  25. package/dist/features/harness/openai-driver.js +17 -5
  26. package/dist/features/license/license.d.ts +2 -2
  27. package/dist/index.js +17 -9
  28. package/dist/judgement/capsule/capsule-store.d.ts +4 -4
  29. package/dist/memory/cloud/sync-cycle.d.ts +9 -0
  30. package/dist/memory/cloud/sync-cycle.js +29 -2
  31. package/dist/memory/intent/intent-tools.js +8 -3
  32. package/dist/memory/journal/envelope.d.ts +8 -8
  33. package/dist/memory/journal/journal-query.d.ts +14 -0
  34. package/dist/memory/journal/journal-query.js +15 -0
  35. package/dist/memory/project/artifact-root-resolver.d.ts +10 -0
  36. package/dist/memory/project/artifact-root-resolver.js +46 -19
  37. package/dist/portal/bridge/bridge.d.ts +4 -3
  38. package/dist/portal/bridge/bridge.js +6 -1
  39. package/dist/portal/input/viewport-tools.js +16 -6
  40. package/dist/portal/session/session.d.ts +5 -8
  41. package/dist/portal/session/session.js +9 -13
  42. package/dist/surface/http-server.d.ts +1 -1
  43. package/dist/surface/http-server.js +4 -3
  44. package/dist/surface/mcp/mcp.js +1 -1
  45. package/dist/surface/mcp/proxy/proxy-log.js +3 -5
  46. package/dist/surface/tools/act-tools.js +2 -2
  47. package/dist/surface/tools/dynamic-tools.js +29 -2
  48. package/dist/surface/tools/error-recovery.js +1 -2
  49. package/dist/surface/tools/harness-explore.js +5 -1
  50. package/dist/surface/tools/invoke-tool.js +12 -8
  51. package/dist/surface/tools/tool-kit.d.ts +10 -0
  52. package/dist/telemetry/argument-shape.js +1 -1
  53. package/dist/telemetry/onboarding-firsts.d.ts +2 -2
  54. package/dist/telemetry/onboarding-firsts.js +2 -2
  55. package/docs/actions.mdx +1 -2
  56. package/docs/cli/cloud.mdx +6 -4
  57. package/docs/cli.mdx +13 -7
  58. package/docs/desktop.mdx +1 -1
  59. package/docs/getting-started.md +12 -2
  60. package/docs/install-agentic.mdx +1 -1
  61. package/docs/install-manual.mdx +1 -1
  62. package/docs/packages/next.mdx +3 -0
  63. package/docs/packages/tauri.mdx +1 -1
  64. package/docs/packages/vite-plugin.mdx +2 -0
  65. package/docs/packages.mdx +1 -1
  66. package/docs/quickstart.mdx +11 -9
  67. package/docs/tools/act.mdx +1 -1
  68. package/docs/usage.md +0 -1
  69. package/package.json +5 -5
@@ -4,7 +4,7 @@ description: 'Zero to your agent verifying your real app, step by step, with wor
4
4
  icon: rocket
5
5
  ---
6
6
 
7
- **To get started with Reticle: run the installer, open your coding agent, then run `npx @reticlehq/server init` in your project root.** Getting started is three stages. **Installation** is one command in a terminal, `curl -fsSL https://raw.githubusercontent.com/reticlehq/reticle/main/install/install.sh | sh` (or `irm https://raw.githubusercontent.com/reticlehq/reticle/main/install/install.ps1 | iex` on Windows): it puts the CLI on the machine and registers the MCP server with every agent it can reach, so the tools are there the next time you open your agent. **Onboarding** is `init`: it wires your project, starts your dev server, opens the app and waits for it to connect. **The first run** is what proves anything: `reticle_verify { action: "explore", persona: "<the journey worth proving>" }`, or from a terminal `npx @reticlehq/server verify <url> --explore --persona "<the journey worth proving>"`. A connected app is not a verified one. Reticle is a verification layer that embeds a dev-only SDK in your running web app so an AI coding agent can prove a change works instead of guessing. It needs Node 20 or newer, an app you run locally, and an agent that speaks MCP.
7
+ **To get started with Reticle Cloud: run the installer, then `reticle connect --project "My App"` in your app directory before opening your coding agent.** The installer puts the CLI on the machine and registers its MCP tools with supported agents. `connect` wires your app, checks that a browser session connected, opens sign-in approval if needed, links the named cloud project, and syncs existing history. The first run is what proves anything: ask your agent to verify one journey in your app, or use `reticle_verify { action: "explore", persona: "<the journey worth proving>" }`. A connected app is not a verified one. For local-only verification without an account, use `reticle init` instead. You need Node 20.11 or newer, an app you run locally, and an agent that speaks MCP.
8
8
 
9
9
  > **Looking for the fast path?** [Quickstart](/quickstart) gets you to a real verdict in five minutes, and every response on it was captured live. [Agentic install](/install-agentic) and [Manual install](/install-manual) cover setup in detail, per agent and per framework.
10
10
  >
@@ -58,7 +58,17 @@ Everything is **dev-only** and **localhost-only**. It's tree-shaken out of produ
58
58
 
59
59
  ---
60
60
 
61
- ## Fastest path: `reticle init`
61
+ ## Cloud setup: `reticle connect`
62
+
63
+ After the one-time [installer](/quickstart), run this in your app directory:
64
+
65
+ ```bash
66
+ npx @reticlehq/server connect --project "My App"
67
+ ```
68
+
69
+ Approve the short browser code if Reticle asks you to sign in. The command then links this folder and sends any history already on the machine. Open or restart your coding agent and ask it to verify one real journey. For a new project, the dashboard has no result until that first run is recorded.
70
+
71
+ ## Local-only path: `reticle init`
62
72
 
63
73
  From your project root:
64
74
 
@@ -248,7 +248,7 @@ Three of these are answers only the caller has. `init` reads your repository; it
248
248
  | `--env KEY=VALUE` | What the app needs to reach a usable state: the key from `.env.example`, the mock backend, the variable that skips an auth wall. Repeatable, and a value may contain spaces and equals signs. Without it a real app sits on a login screen and there is no flow to drive. |
249
249
  | `--app <dir>` | Monorepos. `init` can find the apps that are servable; only your request says which one you are working in. |
250
250
  | `--license <key>` | Writes `RETICLE_LICENSE_KEY` to `.env` and keeps `.env` out of git. Do not do those two by hand. |
251
- | `--json` | One object on stdout: what was wired, what connected, the verdict, and an `agentTodo` array. For agents. |
251
+ | `--json` | One result object on stdout; progress and package-manager output go to stderr. Default init reports runtime setup and connection. `--files-only` and `--dry-run` report the wiring result. Init does not drive a flow or produce a verification verdict. |
252
252
  | `--files-only` | Write the files, register the MCP server with every agent on the machine, pre-approve Reticle's tools, and stop: no dev server, no drive. What `init` did before it learned to boot the app, and the upgrade path for a machine that installed Reticle on an earlier version. |
253
253
  | `--no-open` | Do not open a browser: CI, a container, an SSH session, or a tab you already have. |
254
254
  | `--dry-run` | See the plan before anything is written. |
@@ -175,7 +175,7 @@ Screenshots and headless mode need the Rust crate, which is versioned independen
175
175
 
176
176
  ```toml
177
177
  [dependencies]
178
- reticle-tauri = "3.4"
178
+ reticle-tauri = "3.5"
179
179
  ```
180
180
 
181
181
  ```rust
@@ -44,10 +44,13 @@ Returns the config unchanged when `NODE_ENV === 'production'`. Otherwise it merg
44
44
  | --- | --- |
45
45
  | `webpack` | Pushes an `enforce: 'pre'` rule for `/\.(t\|j)sx$/`, excluding `node_modules`, using this package's loader. Your own `webpack` function still runs afterwards |
46
46
  | `turbopack` | On Next 15.3 and above only: rules for `*.tsx` and `*.jsx` pointing at `@reticlehq/next/loader` |
47
+ | `env.NEXT_PUBLIC_RETICLE_URL` | The bridge URL: a valid `RETICLE_PORT` override, otherwise project daemon discovery and `.reticle.json` |
47
48
  | `env.NEXT_PUBLIC_RETICLE_TOKEN` | The pairing token, when one exists on disk |
48
49
  | `env.NEXT_PUBLIC_RETICLE_ROOT` | `process.cwd()`, so source paths come back repository-relative |
49
50
  | `env.NEXT_PUBLIC_RETICLE_SDK_VERSION` | The version of the app's installed `@reticlehq/react` |
50
51
 
52
+ Daemon discovery reads `RETICLE_STATE_DIR` (default `~/.reticle`). Pairing tokens use `RETICLE_PAIRING_TOKEN_DIR` independently. The generated `ReticleDev` component reads `NEXT_PUBLIC_RETICLE_URL`; restart the dev server after changing these settings.
53
+
51
54
  `readPairingToken()` is also exported at runtime. It is not declared in `index.d.ts`, so TypeScript will not see it.
52
55
 
53
56
  ### `./loader`
@@ -21,7 +21,7 @@ Tauri IPC observation needs nothing on the Rust side. An `invoke('load_todos')`
21
21
 
22
22
  ```toml
23
23
  [dependencies]
24
- reticle-tauri = "3.4"
24
+ reticle-tauri = "3.5"
25
25
  ```
26
26
 
27
27
  Its own dependencies are `tauri = "2"` plus the per-platform capture backends: `objc2` and friends on macOS, `webview2-com` and `windows` on Windows, `webkit2gtk` and `cairo-rs` on Linux and the BSDs.
@@ -31,6 +31,8 @@ export default defineConfig({
31
31
  [`@reticlehq/server`](/packages/server).
32
32
  </Warning>
33
33
 
34
+ Set `RETICLE_PORT` in the dev server or desktop build environment to use the same custom bridge port as the CLI. A valid value overrides discovery and `.reticle.json`; invalid values are ignored.
35
+
34
36
  ## Why it exists
35
37
 
36
38
  `apply: 'serve'` means it never reaches a production build. That is the guarantee that lets you leave it in the config permanently: there is no way to ship Reticle to your users by forgetting to remove a line.
package/docs/packages.mdx CHANGED
@@ -239,7 +239,7 @@ A lint rule makes the signal layer self-enforcing, which is the only way a conve
239
239
 
240
240
  ```toml
241
241
  [dependencies]
242
- reticle-tauri = "3.4"
242
+ reticle-tauri = "3.5"
243
243
  ```
244
244
 
245
245
  <Warning>
@@ -5,7 +5,7 @@ description: Install Reticle, connect your coding agent, and get a real verdict
5
5
  icon: rocket
6
6
  ---
7
7
 
8
- **Run the installer in a terminal, open your coding agent, then run `init` in your project.** Reticle is a verification layer for AI coding agents: it embeds a dev-only SDK in your running web app so an agent can prove a change works instead of guessing.
8
+ **Run the installer once, then run `reticle connect --project "My App"` in your project.** Reticle embeds a dev-only SDK in your running app, signs you in through browser approval when needed, and syncs your checks to the project you name.
9
9
 
10
10
  By the end of this page your agent will click a button in your app and prove what happened: the request that fired, the state that changed, and the file to open if it didn't.
11
11
 
@@ -53,18 +53,20 @@ npm install -g @reticlehq/server
53
53
  npx @reticlehq/server setup mcp
54
54
  ```
55
55
 
56
- ## Step 2. Open your coding agent, and wire the project
56
+ ## Step 2. Connect this project
57
57
 
58
- The `reticle_*` tools are already there. In your project directory:
58
+ In your project directory, before opening your coding agent:
59
59
 
60
60
  ```bash
61
- npx @reticlehq/server init
61
+ npx @reticlehq/server connect --project "My App"
62
62
  ```
63
63
 
64
- Like `npm init` or `git init`, this is the per-project step: it installs the SDK, wires it into your app's entry point, starts your dev server and then opens your app to prove a session connected. It is idempotent. Run it twice and the second run reports what was already done rather than doing it again.
64
+ This installs the SDK, wires your app, starts the dev server, and checks that a browser session connected. It then opens browser sign-in approval if needed, links this folder to the named cloud project, and sends existing local history. Approve the short code shown in the browser and terminal; the command resumes by itself. A saved sign-in is reused after the cloud accepts it. Open your coding agent once this command finishes; if it was already open during installation, restart it to load the new tools.
65
65
 
66
66
  Step 1 is once per machine. This step is once per project.
67
67
 
68
+ Want local-only verification without an account? Run `reticle init` in this step instead. You can run `reticle connect` later to sync your history.
69
+
68
70
  Prefer to install the skill and let the agent run setup itself? On Claude Code the plugin registers the MCP server and the skill in one step:
69
71
 
70
72
  ```text
@@ -80,7 +82,7 @@ npx skills add reticlehq/reticle
80
82
 
81
83
  Then type `/reticle` and the agent runs the install from the skill.
82
84
 
83
- Useful flags, from `reticle init` itself:
85
+ Useful flags for the local-only `reticle init` path:
84
86
 
85
87
  ```
86
88
  reticle init [--dry-run] [--port N] [--no-mcp] [--no-install] [--app <dir>]
@@ -90,7 +92,7 @@ reticle init [--dry-run] [--port N] [--no-mcp] [--no-install] [--app <dir>]
90
92
  only make sense once the tools are reachable.
91
93
  ```
92
94
 
93
- Start with `--dry-run` if you want to see the plan before anything is written.
95
+ Start with `reticle init --dry-run` if you want to see the app changes before anything is written.
94
96
 
95
97
  <Tip>
96
98
  In a monorepo, `init` will find several apps and ask which one you mean. `--app packages/web`
@@ -107,9 +109,9 @@ npx @reticlehq/server doctor
107
109
 
108
110
  `doctor` diagnoses the whole setup in one command: Chromium, the daemon, the port. If something is wrong this is the page you want before you start debugging your app instead.
109
111
 
110
- ## Step 4. Start your app and open it
112
+ ## Step 4. Open your app again when you need it
111
113
 
112
- Start your dev server as usual, then:
114
+ `connect` already started the dev server and opened the app. On a later day, start your dev server as usual, then:
113
115
 
114
116
  ```bash
115
117
  npx @reticlehq/server open
@@ -59,7 +59,7 @@ Real response:
59
59
 
60
60
  ## Actions
61
61
 
62
- `click` · `dblclick` · `hover` · `focus` · `blur` · `fill` · `type` · `clear` · `select` · `check` · `uncheck` · `submit` · `press` · `upload` · `scrollIntoView` · `drag` · `webmcp`
62
+ `click` · `dblclick` · `hover` · `focus` · `blur` · `fill` · `type` · `clear` · `select` · `check` · `uncheck` · `submit` · `press` · `upload` · `scrollIntoView` · `drag`
63
63
 
64
64
  | Action | Arguments |
65
65
  | ---------------- | --------------------------------------------------------------- |
package/docs/usage.md CHANGED
@@ -419,7 +419,6 @@ A `state` assertion is graded as a **consequence** (a wrong element or stale ren
419
419
  | `scrollIntoView` | n/a | |
420
420
  | `upload` | `{ name, content?, type? }` | sets a file on `<input type=file>` |
421
421
  | `drag` | `{ toRef }` | pointer-based drag (dnd-kit / rbd) + HTML5 DnD |
422
- | `webmcp` | `{ tool, params }` | calls a `navigator.modelContext` tool if the site exposes one |
423
422
 
424
423
  ---
425
424
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reticlehq/server",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Reticle CLI, bridge and MCP server: a coding agent drives your running web app from the inside and gets a verdict with evidence, for change verification, access control, accessibility, performance and SEO checks.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,11 +23,11 @@
23
23
  "ws": "^8.21.3",
24
24
  "zod": "^3.24.1",
25
25
  "zod-to-json-schema": "^3.24.0",
26
- "@reticlehq/browser": "3.4.0",
27
- "@reticlehq/init": "3.4.0",
28
- "@reticlehq/engine": "3.4.0",
26
+ "@reticlehq/browser": "3.5.0",
27
+ "@reticlehq/engine": "3.5.0",
28
+ "@reticlehq/core": "3.5.0",
29
29
  "open-verification": "1.0.0",
30
- "@reticlehq/core": "3.4.0"
30
+ "@reticlehq/init": "3.5.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/pngjs": "^6.0.5",