@reticlehq/server 2.12.0 → 2.13.1
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.
- package/SKILL.md +67 -109
- package/dist/bridge/auth-failure-reason.d.ts +6 -2
- package/dist/bridge/auth-failure-reason.js +15 -8
- package/dist/bridge/bridge.d.ts +18 -1
- package/dist/bridge/bridge.js +247 -164
- package/dist/bridge/pairing-token.d.ts +5 -0
- package/dist/bridge/pairing-token.js +28 -0
- package/dist/bridge/protocol-skew.d.ts +37 -0
- package/dist/bridge/protocol-skew.js +45 -0
- package/dist/capsule/capsule-store.d.ts +6 -6
- package/dist/capsule/causal-summary.js +7 -2
- package/dist/cli/cli-doctor.js +31 -1
- package/dist/cli/cli-launch.d.ts +11 -1
- package/dist/cli/cli-launch.js +59 -10
- package/dist/cli/cli-parse.d.ts +15 -1
- package/dist/cli/cli-parse.js +212 -8
- package/dist/cli/cli-verify.d.ts +1 -0
- package/dist/cli/cli-verify.js +3 -2
- package/dist/cli/cloud-cli.js +428 -259
- package/dist/cli/cloud-keystore.d.ts +37 -0
- package/dist/cli/cloud-keystore.js +97 -0
- package/dist/cli/cloud-kit.d.ts +37 -0
- package/dist/cli/cloud-kit.js +121 -0
- package/dist/cli/cloud-login.d.ts +17 -0
- package/dist/cli/cloud-login.js +183 -0
- package/dist/cli/cloud-session.d.ts +48 -0
- package/dist/cli/cloud-session.js +53 -0
- package/dist/cli/config-discovery.js +1 -0
- package/dist/cli/daemon-start-options.d.ts +32 -0
- package/dist/cli/daemon-start-options.js +38 -0
- package/dist/cli/device-flow.d.ts +76 -0
- package/dist/cli/device-flow.js +56 -0
- package/dist/cli/doctor-rows.d.ts +9 -0
- package/dist/cli/doctor-rows.js +9 -0
- package/dist/cli/drive-attach.d.ts +13 -0
- package/dist/cli/drive-attach.js +18 -0
- package/dist/cli/drive-command.js +7 -3
- package/dist/cli/mcp-command.js +51 -20
- package/dist/cli/project-name.d.ts +30 -0
- package/dist/cli/project-name.js +44 -0
- package/dist/cli/status-next-action.d.ts +14 -0
- package/dist/cli/status-next-action.js +4 -4
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +134 -80
- package/dist/cloud/cloud-config.d.ts +22 -1
- package/dist/cloud/cloud-config.js +64 -5
- package/dist/cloud/cloud-sync.d.ts +5 -5
- package/dist/cloud/cloud-sync.js +33 -2
- package/dist/cloud/sync-cycle.d.ts +110 -0
- package/dist/cloud/sync-cycle.js +270 -0
- package/dist/cloud/sync-daemon.d.ts +69 -0
- package/dist/cloud/sync-daemon.js +260 -0
- package/dist/cloud/sync-disk.d.ts +9 -0
- package/dist/cloud/sync-disk.js +191 -0
- package/dist/cloud/sync-hash.d.ts +2 -0
- package/dist/cloud/sync-hash.js +35 -0
- package/dist/crawl/crawl-tools.js +5 -3
- package/dist/crawl/crawl.d.ts +3 -0
- package/dist/crawl/crawl.js +5 -0
- package/dist/daemon/daemon-resolve.d.ts +43 -0
- package/dist/daemon/daemon-resolve.js +69 -0
- package/dist/daemon/dev-servers.d.ts +15 -0
- package/dist/daemon/dev-servers.js +68 -0
- package/dist/daemon/wake-decision.d.ts +32 -0
- package/dist/daemon/wake-decision.js +38 -0
- package/dist/domain/domain-tools.js +2 -2
- package/dist/events/contradictions.d.ts +18 -0
- package/dist/events/contradictions.js +134 -21
- package/dist/events/declared.d.ts +7 -4
- package/dist/events/declared.js +15 -6
- package/dist/events/echo-mismatch.js +64 -14
- package/dist/events/event-filters.d.ts +8 -0
- package/dist/events/event-filters.js +19 -2
- package/dist/events/predicate-eval.js +53 -5
- package/dist/events/predicate-precheck.d.ts +8 -0
- package/dist/events/predicate-precheck.js +41 -0
- package/dist/events/predicate-route.d.ts +14 -0
- package/dist/events/predicate-route.js +36 -8
- package/dist/events/predicate.d.ts +5 -0
- package/dist/events/predicate.js +37 -5
- package/dist/events/split-text-miss.d.ts +30 -0
- package/dist/events/split-text-miss.js +44 -0
- package/dist/flows/flake.d.ts +6 -6
- package/dist/flows/flow-memory-consult.d.ts +55 -0
- package/dist/flows/flow-memory-consult.js +38 -0
- package/dist/flows/flow-replay-run.d.ts +18 -7
- package/dist/flows/flow-replay-run.js +239 -22
- package/dist/flows/flow-replay.js +11 -2
- package/dist/flows/flow-step-runners.d.ts +8 -0
- package/dist/flows/flow-step-runners.js +8 -2
- package/dist/flows/flow-store-for-session.d.ts +31 -0
- package/dist/flows/flow-store-for-session.js +33 -0
- package/dist/flows/flow-tools.js +58 -32
- package/dist/flows/flows.d.ts +8 -0
- package/dist/flows/flows.js +468 -2
- package/dist/flows/heal-run.js +5 -2
- package/dist/flows/predicate-to-expect.d.ts +17 -12
- package/dist/flows/predicate-to-expect.js +30 -12
- package/dist/flows/recordings.d.ts +13 -1
- package/dist/flows/recordings.js +17 -2
- package/dist/flows/replay.d.ts +22 -2
- package/dist/flows/replay.js +28 -2
- package/dist/flows/verify-change-tools.js +5 -2
- package/dist/honesty/blind-spots.d.ts +55 -2
- package/dist/honesty/blind-spots.js +63 -3
- package/dist/honesty/honesty.d.ts +24 -0
- package/dist/honesty/honesty.js +25 -1
- package/dist/honesty/instrumentation-gaps.d.ts +9 -0
- package/dist/honesty/instrumentation-gaps.js +29 -2
- package/dist/honesty/verified.d.ts +2 -1
- package/dist/honesty/verified.js +16 -1
- package/dist/http-server.js +12 -0
- package/dist/impact/impact-recorder.d.ts +31 -8
- package/dist/impact/impact-recorder.js +104 -21
- package/dist/impact/impact-store.d.ts +15 -1
- package/dist/impact/impact-store.js +43 -2
- package/dist/index.js +113 -7
- package/dist/init/agent-rules.d.ts +13 -6
- package/dist/init/agent-rules.js +23 -12
- package/dist/init/astro-patch.d.ts +16 -0
- package/dist/init/astro-patch.js +28 -0
- package/dist/init/capabilities.d.ts +4 -1
- package/dist/init/capabilities.js +22 -2
- package/dist/init/confirm.d.ts +31 -7
- package/dist/init/confirm.js +48 -8
- package/dist/init/cra.d.ts +20 -4
- package/dist/init/cra.js +57 -17
- package/dist/init/csp-check.js +17 -2
- package/dist/init/csp-doctor.d.ts +8 -1
- package/dist/init/csp-doctor.js +8 -3
- package/dist/init/dev-script.d.ts +3 -1
- package/dist/init/dev-script.js +8 -5
- package/dist/init/format-generated.d.ts +18 -0
- package/dist/init/format-generated.js +39 -0
- package/dist/init/install-hint.d.ts +9 -0
- package/dist/init/install-hint.js +29 -0
- package/dist/init/mcp-clients.d.ts +7 -0
- package/dist/init/mcp-clients.js +7 -0
- package/dist/init/mcp.d.ts +1 -1
- package/dist/init/mcp.js +1 -1
- package/dist/init/node-io.js +11 -1
- package/dist/init/plan-framework.js +81 -45
- package/dist/init/plan.d.ts +20 -7
- package/dist/init/plan.js +20 -45
- package/dist/init/preflight.d.ts +28 -0
- package/dist/init/preflight.js +38 -0
- package/dist/init/run.d.ts +32 -9
- package/dist/init/run.js +141 -119
- package/dist/init/slash-command.d.ts +1 -1
- package/dist/init/snippets.js +41 -25
- package/dist/init/vite-config.d.ts +1 -1
- package/dist/init/vite-config.js +39 -25
- package/dist/init/workspace-apps.d.ts +17 -10
- package/dist/init/workspace-apps.js +110 -0
- package/dist/input/network-mock-tools.js +3 -6
- package/dist/input/real-input.js +25 -5
- package/dist/input/scroll-tools.js +4 -6
- package/dist/input/viewport-tools.js +5 -4
- package/dist/intent/inline-intent.d.ts +10 -19
- package/dist/intent/inline-intent.js +91 -1
- package/dist/intent/intent-shard-store.d.ts +72 -0
- package/dist/intent/intent-shard-store.js +203 -0
- package/dist/intent/intent-shard.d.ts +411 -0
- package/dist/intent/intent-shard.js +176 -0
- package/dist/intent/intent-store.d.ts +12 -0
- package/dist/intent/intent-store.js +21 -0
- package/dist/intent/intent-subject.d.ts +45 -0
- package/dist/intent/intent-subject.js +177 -0
- package/dist/intent/intent-tools.js +65 -2
- package/dist/intent/open-intents.d.ts +21 -0
- package/dist/intent/open-intents.js +15 -0
- package/dist/license/license-env.d.ts +29 -0
- package/dist/license/license-env.js +148 -0
- package/dist/loopback-agent.d.ts +31 -0
- package/dist/loopback-agent.js +57 -0
- package/dist/mcp/attach-memory.d.ts +18 -2
- package/dist/mcp/attach-memory.js +50 -7
- package/dist/mcp/client-identity.d.ts +31 -0
- package/dist/mcp/client-identity.js +51 -0
- package/dist/mcp/mcp-post-transport.d.ts +26 -0
- package/dist/mcp/mcp-post-transport.js +109 -0
- package/dist/mcp/mcp-proxy.d.ts +2 -1
- package/dist/mcp/mcp-proxy.js +52 -62
- package/dist/mcp/mcp.js +7 -1
- package/dist/mcp/proxy-backoff.d.ts +11 -0
- package/dist/mcp/proxy-backoff.js +13 -0
- package/dist/mcp/proxy-daemon-probe.d.ts +1 -0
- package/dist/mcp/proxy-daemon-probe.js +7 -1
- package/dist/mcp/proxy-handshake.d.ts +23 -0
- package/dist/mcp/proxy-handshake.js +31 -0
- package/dist/mcp/tool-catalog-cache.d.ts +8 -0
- package/dist/mcp/tool-catalog-cache.js +12 -0
- package/dist/memory/memory-tools.d.ts +2 -0
- package/dist/memory/memory-tools.js +82 -0
- package/dist/memory/project-memory.d.ts +34 -0
- package/dist/memory/project-memory.js +96 -0
- package/dist/oracles/propose-consequences.js +12 -3
- package/dist/pool/browser-pool.d.ts +63 -4
- package/dist/pool/browser-pool.js +113 -4
- package/dist/pool/playwright-launcher.js +9 -0
- package/dist/project/project-tools.js +3 -3
- package/dist/project/reticle-dir.d.ts +15 -2
- package/dist/project/reticle-dir.js +21 -4
- package/dist/runs/run-store.d.ts +10 -0
- package/dist/runs/run-store.js +10 -0
- package/dist/runs/verification-sync.d.ts +0 -11
- package/dist/runs/verification-sync.js +22 -1
- package/dist/runs/verify-server.d.ts +8 -1
- package/dist/runs/verify-server.js +14 -2
- package/dist/session/command-timeout.d.ts +5 -2
- package/dist/session/command-timeout.js +5 -4
- package/dist/session/lease-visibility.d.ts +67 -0
- package/dist/session/lease-visibility.js +76 -0
- package/dist/session/no-session-diagnosis.d.ts +23 -0
- package/dist/session/no-session-diagnosis.js +58 -17
- package/dist/session/no-session-next-action.d.ts +7 -0
- package/dist/session/no-session-next-action.js +42 -3
- package/dist/session/no-session-watch.d.ts +10 -6
- package/dist/session/no-session-watch.js +51 -19
- package/dist/session/pending-commands.d.ts +11 -1
- package/dist/session/pending-commands.js +12 -2
- package/dist/session/resolve-within.d.ts +34 -0
- package/dist/session/resolve-within.js +53 -0
- package/dist/session/session-info.d.ts +18 -0
- package/dist/session/session-info.js +11 -0
- package/dist/session/session-manager.d.ts +14 -0
- package/dist/session/session-manager.js +61 -3
- package/dist/session/session-mirror.d.ts +16 -0
- package/dist/session/session-mirror.js +22 -0
- package/dist/session/session-recommendation.d.ts +19 -5
- package/dist/session/session-recommendation.js +25 -9
- package/dist/session/session-successor.js +36 -1
- package/dist/session/session-tools.js +2 -2
- package/dist/session/session.d.ts +22 -2
- package/dist/session/session.js +87 -7
- package/dist/session/wall-clock.d.ts +12 -0
- package/dist/session/wall-clock.js +14 -0
- package/dist/setup/agent-configs.d.ts +96 -0
- package/dist/setup/agent-configs.js +333 -0
- package/dist/setup/agent-io.d.ts +9 -0
- package/dist/setup/agent-io.js +16 -0
- package/dist/setup/agent-writer.d.ts +51 -0
- package/dist/setup/agent-writer.js +115 -0
- package/dist/setup/approval-migration.d.ts +47 -0
- package/dist/setup/approval-migration.js +68 -0
- package/dist/setup/auto-approve.d.ts +85 -0
- package/dist/setup/auto-approve.js +150 -0
- package/dist/setup/bridge-port.d.ts +15 -0
- package/dist/setup/bridge-port.js +24 -0
- package/dist/setup/desktop-shape.d.ts +57 -0
- package/dist/setup/desktop-shape.js +63 -0
- package/dist/setup/dev-server-wait.d.ts +68 -0
- package/dist/setup/dev-server-wait.js +67 -0
- package/dist/setup/drive-agent.d.ts +71 -0
- package/dist/setup/drive-agent.js +171 -0
- package/dist/setup/drive-plan.d.ts +68 -0
- package/dist/setup/drive-plan.js +130 -0
- package/dist/setup/ensure-daemon.d.ts +29 -0
- package/dist/setup/ensure-daemon.js +58 -0
- package/dist/setup/init-runtime.d.ts +47 -0
- package/dist/setup/init-runtime.js +160 -0
- package/dist/setup/interrupt.d.ts +25 -0
- package/dist/setup/interrupt.js +40 -0
- package/dist/setup/license-key.d.ts +39 -0
- package/dist/setup/license-key.js +72 -0
- package/dist/setup/listeners.d.ts +37 -0
- package/dist/setup/listeners.js +85 -0
- package/dist/setup/node-effects.d.ts +60 -0
- package/dist/setup/node-effects.js +210 -0
- package/dist/setup/page-probe.d.ts +39 -0
- package/dist/setup/page-probe.js +49 -0
- package/dist/setup/relaunch.d.ts +36 -0
- package/dist/setup/relaunch.js +57 -0
- package/dist/setup/remaining-steps.d.ts +19 -0
- package/dist/setup/remaining-steps.js +31 -0
- package/dist/setup/run-setup.d.ts +99 -0
- package/dist/setup/run-setup.js +203 -0
- package/dist/setup/session-pick.d.ts +47 -0
- package/dist/setup/session-pick.js +51 -0
- package/dist/setup/setup-command.d.ts +45 -0
- package/dist/setup/setup-command.js +199 -0
- package/dist/setup/setup-options.d.ts +74 -0
- package/dist/setup/setup-options.js +67 -0
- package/dist/setup/transcripts.d.ts +16 -0
- package/dist/setup/transcripts.js +43 -0
- package/dist/status-payload.d.ts +14 -1
- package/dist/status-payload.js +23 -1
- package/dist/telemetry/daemon-telemetry.d.ts +8 -1
- package/dist/telemetry/daemon-telemetry.js +52 -5
- package/dist/telemetry/error-class.js +1 -1
- package/dist/telemetry/feedback-context.d.ts +9 -1
- package/dist/telemetry/feedback-context.js +60 -29
- package/dist/telemetry/feedback-local.d.ts +15 -0
- package/dist/telemetry/feedback-local.js +56 -0
- package/dist/telemetry/feedback.d.ts +11 -0
- package/dist/telemetry/feedback.js +19 -6
- package/dist/telemetry/init-telemetry.d.ts +2 -0
- package/dist/telemetry/init-telemetry.js +2 -0
- package/dist/telemetry/install-source.d.ts +14 -0
- package/dist/telemetry/install-source.js +30 -0
- package/dist/telemetry/license-activation.d.ts +7 -1
- package/dist/telemetry/license-activation.js +9 -5
- package/dist/telemetry/mcp-connection.js +7 -0
- package/dist/telemetry/project-profile.d.ts +12 -1
- package/dist/telemetry/project-profile.js +11 -6
- package/dist/telemetry/proxy-telemetry.d.ts +3 -0
- package/dist/telemetry/proxy-telemetry.js +21 -0
- package/dist/telemetry/session-metrics.d.ts +12 -0
- package/dist/telemetry/session-metrics.js +35 -1
- package/dist/telemetry/telemetry.js +17 -2
- package/dist/telemetry/tool-refused.d.ts +3 -1
- package/dist/telemetry/tool-refused.js +34 -2
- package/dist/tools/act-capsule.d.ts +10 -0
- package/dist/tools/act-capsule.js +8 -2
- package/dist/tools/act-danger.d.ts +2 -1
- package/dist/tools/act-danger.js +11 -3
- package/dist/tools/act-observation.d.ts +41 -0
- package/dist/tools/act-observation.js +36 -0
- package/dist/tools/act-preflight.d.ts +20 -0
- package/dist/tools/act-preflight.js +98 -0
- package/dist/tools/act-sequence-retry.d.ts +45 -0
- package/dist/tools/act-sequence-retry.js +58 -0
- package/dist/tools/act-sequence-tool.d.ts +13 -0
- package/dist/tools/act-sequence-tool.js +135 -0
- package/dist/tools/act-target.d.ts +14 -0
- package/dist/tools/act-target.js +47 -0
- package/dist/tools/act-tools.d.ts +21 -1
- package/dist/tools/act-tools.js +100 -213
- package/dist/tools/assert-verdict.js +22 -16
- package/dist/tools/browser-tools.js +6 -2
- package/dist/tools/dynamic-tools.js +24 -5
- package/dist/tools/error-recovery.d.ts +1 -0
- package/dist/tools/error-recovery.js +8 -0
- package/dist/tools/invoke-tool.js +59 -9
- package/dist/tools/lease-tools.d.ts +30 -4
- package/dist/tools/lease-tools.js +169 -5
- package/dist/tools/merged-name-redirect.d.ts +13 -0
- package/dist/tools/merged-name-redirect.js +22 -0
- package/dist/tools/numeric-bounds.d.ts +100 -0
- package/dist/tools/numeric-bounds.js +125 -0
- package/dist/tools/observe-tools.js +47 -40
- package/dist/tools/read-tools.js +28 -7
- package/dist/tools/real-input-attempt.d.ts +10 -0
- package/dist/tools/real-input-attempt.js +59 -1
- package/dist/tools/reconcile-tools.js +4 -4
- package/dist/tools/tool-kit.d.ts +12 -0
- package/dist/tools/tool-kit.js +6 -1
- package/dist/tools/tool-names.d.ts +2 -0
- package/dist/tools/tool-names.js +2 -0
- package/dist/tools/tools-helpers.d.ts +19 -0
- package/dist/tools/tools-helpers.js +46 -0
- package/dist/tools/tools.d.ts +2 -0
- package/dist/tools/tools.js +56 -8
- package/dist/update/reticle-deps.d.ts +9 -0
- package/dist/update/reticle-deps.js +27 -0
- package/dist/update/sdk-sync.d.ts +1 -2
- package/dist/update/sdk-sync.js +1 -21
- package/dist/update/update-nudge.d.ts +18 -0
- package/dist/update/update-nudge.js +20 -0
- package/dist/version/peer-announce.js +4 -2
- package/dist/version/sdk-fix.d.ts +47 -0
- package/dist/version/sdk-fix.js +127 -0
- package/dist/version/version-nudge.d.ts +14 -0
- package/dist/version/version-nudge.js +21 -0
- package/dist/version/version-skew.d.ts +38 -3
- package/dist/version/version-skew.js +83 -7
- package/dist/visual/visual-store.d.ts +6 -6
- package/dist/visual/visual-store.js +18 -16
- package/dist/visual/visual-tools.js +57 -12
- package/docs/cli/doctor.mdx +1 -0
- package/docs/cli/serve.mdx +4 -2
- package/docs/cli.mdx +7 -3
- package/docs/desktop.mdx +1 -1
- package/docs/docs.json +1 -1
- package/docs/getting-started.md +19 -3
- package/docs/index.mdx +9 -6
- package/docs/install-agentic.mdx +38 -12
- package/docs/install-manual.mdx +1 -1
- package/docs/packages.mdx +1 -1
- package/docs/skill-file.mdx +3 -3
- package/docs/telemetry-contract.md +108 -4
- package/docs/tools-act-sequence.mdx +16 -0
- package/docs/usage.md +1 -1
- package/package.json +4 -3
- package/dist/init/cursor.d.ts +0 -24
- package/dist/init/cursor.js +0 -80
package/SKILL.md
CHANGED
|
@@ -4,6 +4,18 @@ Reticle embeds a dev-only SDK in the user's running app and exposes it to you as
|
|
|
4
4
|
|
|
5
5
|
This file is the whole critical path and nothing else. Everything it leaves out is at `https://docs.reticle.sh`, one page at a time.
|
|
6
6
|
|
|
7
|
+
## Your first action, before you read the rest
|
|
8
|
+
|
|
9
|
+
Do not spend a turn working out which path you are on. The command knows.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
RETICLE_INSTALL_SOURCE=skill_file npx @reticlehq/server@latest init --flow "<the journey worth proving>"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
It is idempotent: on a project that is already wired it reports `·` for what is already there and goes straight to proving the app still works. Run it now, then read **SETUP** below for what to pass it and what to do with what it returns.
|
|
16
|
+
|
|
17
|
+
Everything between here and there is a rule the steps assume. Read it as you go, not before you act.
|
|
18
|
+
|
|
7
19
|
## Installed means a verdict was produced
|
|
8
20
|
|
|
9
21
|
**Setup is not complete until you have driven one real flow in the user's app and produced a verdict.** Writing config files is not installed. Every earlier point looks like success and is not:
|
|
@@ -12,7 +24,7 @@ This file is the whole critical path and nothing else. Everything it leaves out
|
|
|
12
24
|
- The `reticle_*` tools appeared. Your client can reach a daemon. The app is very likely still uninstrumented.
|
|
13
25
|
- A session is listed. The app dialled in. The user has still seen nothing happen.
|
|
14
26
|
|
|
15
|
-
**Do not tell the user Reticle is set up until
|
|
27
|
+
**Do not tell the user Reticle is set up until a verdict exists.** The most common failure in the field is an agent that writes the config, reports success, and leaves somebody with an uninstrumented page. The command exits non-zero when that happens: believe the exit code over the report.
|
|
16
28
|
|
|
17
29
|
## Setup runs to the end without you
|
|
18
30
|
|
|
@@ -23,10 +35,10 @@ Questions you must not ask, because the repo you are sitting in already answers
|
|
|
23
35
|
There are exactly three places you may stop, and none is a question about a preference:
|
|
24
36
|
|
|
25
37
|
1. **No recognisable dev script in `package.json`.** Say so; do not invent one.
|
|
26
|
-
2. **Your host asks the human to approve a command.** That prompt belongs to the host. Never bypass or suppress it, and take a refusal as the answer.
|
|
27
|
-
3. **
|
|
38
|
+
2. **Your host asks the human to approve a command.** That prompt belongs to the host. Never bypass or suppress it, and take a refusal as the answer. `init` writing a pre-approval rule for the `reticle` server is not that: it is a scoped, announced config change the human asked for by running the command, and it covers only Reticle's own tools.
|
|
39
|
+
3. **Only if no agent CLI exists on the machine at all**, the client restart that loads the MCP tools (step 2). If `claude`, `codex`, `cursor-agent` or `gemini` is installed, you do NOT stop. Step 2 shows you how to drive from a child process instead, and that path is measured to be the difference between a verdict and a dead end.
|
|
28
40
|
|
|
29
|
-
|
|
41
|
+
If you do have to stop, the restart ends your turn. This file was fetched into the context that just ended, so nothing carries it across unless you make it. **Before you trigger the restart, write the remaining steps into `RETICLE-SETUP.md` at the repo root**, one line each, with the step you stopped at marked. That file is what you re-read afterwards. Delete it once step 5 has produced a verdict.
|
|
30
42
|
|
|
31
43
|
Better still, install the on-disk copy first. It survives the restart on its own, and it is the same content:
|
|
32
44
|
|
|
@@ -69,150 +81,94 @@ Every page arrives with the rules that matter prepended, so a single fetch orien
|
|
|
69
81
|
|
|
70
82
|
## Which path am I on
|
|
71
83
|
|
|
72
|
-
|
|
73
|
-
cat .reticle.json 2>/dev/null || echo NOT_FOUND
|
|
74
|
-
```
|
|
84
|
+
You do not have to decide. `init` is idempotent and reports what is already wired, so running it is the cheapest way to find out, and on an installed project it goes straight to proving the app still works.
|
|
75
85
|
|
|
76
|
-
|
|
77
|
-
- File exists → **VERIFY** below. If `reticle_sessions` then returns an empty list, fetch `https://docs.reticle.sh/troubleshooting.md`; do not restart setup.
|
|
86
|
+
Read **VERIFY** below when the question is "does this still work?" rather than "is this set up?". If `reticle_sessions` returns an empty list on a project that is already wired, fetch `https://docs.reticle.sh/troubleshooting.md`; do not restart setup.
|
|
78
87
|
|
|
79
88
|
---
|
|
80
89
|
|
|
81
90
|
# SETUP
|
|
82
91
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
## 1. Run init. Ask the user nothing.
|
|
92
|
+
**One command. It does all of it, and it ends with a verdict.**
|
|
86
93
|
|
|
87
94
|
```bash
|
|
88
|
-
RETICLE_INSTALL_SOURCE=skill_file npx @reticlehq/server@latest init
|
|
95
|
+
RETICLE_INSTALL_SOURCE=skill_file npx @reticlehq/server@latest init --flow "<the journey worth proving>"
|
|
89
96
|
```
|
|
90
97
|
|
|
91
98
|
`@latest` is deliberate: `npx` caches, and a stale cached CLI is the most common silent setup failure. Never pin a version here.
|
|
92
99
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
**Ask nothing:** not the framework, package manager, port, editor, or MCP client. Every one is answerable from the repo you are sitting in. In a monorepo run it at the root anyway. With one app under `apps/*` or `packages/*` it wires that app silently. With several it wires nothing, lists them, and names the flag: re-run with `--app <dir>` for the one the user is working in, the one their request named, or the one whose `package.json` has the dev script. **Pick it yourself and re-run.** Asking which app they meant is the most likely place this whole install stops, and the answer is almost always in the request you were already given.
|
|
96
|
-
|
|
97
|
-
**Never ask about the port.** There are two, and conflating them is a top setup failure. The dev-server port (3000, 5173) belongs to the project's own dev script and the daemon never binds it. The bridge port (**4400**) is the daemon-to-SDK channel and defaults correctly.
|
|
100
|
+
That single command detects the framework and package manager, wires the build config, installs the SDK, registers the MCP server, starts the dev server, opens the app, waits for a session to connect from inside it, drives one flow, and saves it so every later check is one call with no model in the loop. It exits non-zero if it did not produce a verdict, and prints exactly what is left to do.
|
|
98
101
|
|
|
99
|
-
|
|
102
|
+
## What YOU decide, and pass in
|
|
100
103
|
|
|
101
|
-
|
|
104
|
+
The command reads the repository. It cannot read the request, and three things live only there. Decide them before you run it; do not walk any of them by hand.
|
|
102
105
|
|
|
103
|
-
|
|
106
|
+
| flag | what only you know |
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| `--flow "<what>"` | which journey proves the thing the user asked for. Code can list the buttons; it cannot know checkout matters and the theme toggle does not. Naming it took one real app from a ten-minute timeout to 138 seconds, because the turns go into FINDING a flow. |
|
|
109
|
+
| `--env KEY=VALUE` | what the app needs to reach a usable state: the key from `.env.example`, the mock backend in the README, the variable that skips an auth wall. Repeatable. Without it a real app sits on a login screen and there is no flow to drive at all. |
|
|
110
|
+
| `--app <dir>` | which app in a monorepo. It can list the ones that are servable; only the request says which one is being worked on. |
|
|
104
111
|
|
|
105
|
-
|
|
112
|
+
**Ask the user nothing.** Not the framework, package manager, port, editor or MCP client: every one is answerable from the repo you are sitting in. Read `.env.example`, the README and `package.json`, decide, and say what you decided in one line.
|
|
106
113
|
|
|
107
|
-
|
|
114
|
+
**Never ask about the port.** There are two, and conflating them is a top setup failure. The dev-server port (3000, 5173) belongs to the project's own dev script. The bridge port (**4400**) is the daemon-to-SDK channel and defaults correctly.
|
|
108
115
|
|
|
109
|
-
|
|
116
|
+
## Then read what it gives you back
|
|
110
117
|
|
|
111
|
-
|
|
118
|
+
`⚠` lines and a non-zero exit are a to-do list, not a failed install. The command names the cause and prints the REMAINING steps from wherever it stopped, and it will not tell you to redo a phase that already worked. Do those, and re-run; re-running is safe.
|
|
112
119
|
|
|
113
|
-
|
|
120
|
+
**It is not finished until a verdict exists.** Writing files is not an install, and neither is a connected session. If it exits non-zero, the app is wired and something is still outstanding; say so plainly rather than reporting success.
|
|
114
121
|
|
|
115
|
-
|
|
122
|
+
**If the user gave you a license key**, see [License key](#license-key) below.
|
|
116
123
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
## 3. Wire the SDK into the app, and start the dev server.
|
|
120
|
-
|
|
121
|
-
This is the step the funnel dies on. The daemon runs, the MCP server registers, and then the SDK never loads in a running page, so there is nothing to verify.
|
|
122
|
-
|
|
123
|
-
`init` handles this automatically for a normal Vite or Next.js app. Your job is to confirm it by reading the files, rather than trusting the report:
|
|
124
|
-
|
|
125
|
-
- **Vite + React**: `reticle()` is in the `plugins` array of `vite.config.*`.
|
|
126
|
-
- **Next.js**: `withReticle` wraps the export in `next.config.*`, `reticle-dev.tsx` exists, and it is mounted in the root layout or `_app`.
|
|
127
|
-
- **Remix**, **Astro**: wired by `init`, each with an app in this repo that a gate drives.
|
|
128
|
-
- **Anything else**: nothing is wired. Do it by hand: fetch `https://docs.reticle.sh/frameworks.md`.
|
|
129
|
-
|
|
130
|
-
Those four are the frameworks with an app and a CI gate behind them. The SDK is framework-agnostic and usually connects elsewhere, but say so honestly rather than reporting a proven install.
|
|
131
|
-
|
|
132
|
-
Two rules that cause silent failures if broken:
|
|
124
|
+
---
|
|
133
125
|
|
|
134
|
-
|
|
135
|
-
- **A config change needs a dev server restart.** An already-running dev server does not pick up an edited `vite.config.ts` or a newly created plugin file. Restart it, then hard-reload the tab.
|
|
126
|
+
# If that command could not run it
|
|
136
127
|
|
|
137
|
-
|
|
128
|
+
**Do not choose this path.** It is not the thorough version of the one above; it is what you fall back to when the command physically could not do the work, and taking it by preference is how an install costs 176 turns instead of one. That is a measured figure, not a way of speaking.
|
|
138
129
|
|
|
139
|
-
|
|
130
|
+
Use it only when ONE of these is true, and you can say which:
|
|
140
131
|
|
|
141
|
-
|
|
132
|
+
- `init` exited without ever printing `starting:` or `▸ WATCH`, which means the CLI on this machine predates the runtime phases and stopped after writing files.
|
|
133
|
+
- `init` printed a to-do list, you did those things, re-ran it, and it stopped in the same place twice.
|
|
134
|
+
- There is no Node 18 or newer on this machine, so nothing can run.
|
|
142
135
|
|
|
143
|
-
|
|
136
|
+
Anything else is not a reason: not a `⚠` in the report, not a step you would rather do yourself, not a feeling that you should check its work. Re-run the command. It is idempotent, it reports what is already wired, and it names what is still outstanding.
|
|
144
137
|
|
|
145
|
-
|
|
146
|
-
2. **Never guess the command.** It comes from `package.json` scripts. No recognisable dev script means say so and stop, not invent one.
|
|
147
|
-
3. **Never kill anything.** Not a dev server, not a daemon, not a port holder, including one you started.
|
|
148
|
-
4. **Background it, and say so.** A dev server the human does not know about is the same failure one step later.
|
|
149
|
-
5. **The permission prompt belongs to your host.** Never bypass, suppress or auto-approve it, and take a refusal as the answer.
|
|
150
|
-
|
|
151
|
-
Then open the app yourself. Do not ask the user to do it. A setup turn that ends on "now open your browser" ends with nothing verified:
|
|
138
|
+
When one of those three IS true, the whole manual procedure is one page:
|
|
152
139
|
|
|
153
140
|
```bash
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
That reuses an already-connected tab or opens a new one, and waits for the page to register. On a headless machine with no browser to open, take a tab Reticle owns instead, once the tools are reachable:
|
|
158
|
-
|
|
159
|
-
```
|
|
160
|
-
reticle_run({ tool: "reticle_lease", args: { action: "acquire", url: "<the same url>" } })
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
## 4. Prove a page is connected. This is a gate.
|
|
164
|
-
|
|
141
|
+
curl https://docs.reticle.sh/install-manual.md # register the MCP, wire the SDK, prove it
|
|
142
|
+
curl https://docs.reticle.sh/troubleshooting.md # nothing connected, click did nothing, verdict unknown
|
|
165
143
|
```
|
|
166
|
-
reticle_sessions()
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
You need a session whose URL matches the app's localhost address. **Nothing below this line is meaningful until you have one, and you may not report setup complete without one.**
|
|
170
|
-
|
|
171
|
-
**Empty list?** Read `next_action` first, then `why`. `next_action` is the machine-readable half: it names which of the four cases this is and, when there is one, the literal command to run and the port, sourced from this project's own scripts, never guessed. `why` is the same thing in prose for the human. The daemon can see whether a session was ever here and whether a dev server is listening. Then, in order: is the SDK imported and called in the app entry, is the dev server actually serving that entry, is the connect guarded on `hostname === 'localhost'`, and is the bridge port the same number on both sides. **Nothing listening at all? That one is yours: start it, per step 3.** If something IS listening, do not tell the user to start what they are already running; the fault is the SDK not loading in the page. Full checklist: `https://docs.reticle.sh/troubleshooting.md`.
|
|
172
144
|
|
|
173
|
-
|
|
145
|
+
**Vite + React**, **Next.js**, **Remix** and **Astro** are the frameworks with an app and a CI gate behind them, so their wiring is proven rather than assumed. The SDK is framework-agnostic and usually connects elsewhere, but say that honestly rather than reporting a proven install.
|
|
174
146
|
|
|
175
|
-
|
|
147
|
+
Do not reconstruct it from memory. Three things decide whether it works, and all three get skipped:
|
|
176
148
|
|
|
177
|
-
**
|
|
149
|
+
1. **The SDK must load in a RUNNING page.** Not wired in a config file: loaded, in a page a browser has open. This is the step the funnel dies on.
|
|
150
|
+
2. **A session must appear** on that app's own url. `reticle_sessions` returning an empty list has four causes with four different fixes, and its `next_action` names which one this is.
|
|
151
|
+
3. **A verdict must exist.** `reticle_act_and_wait` or `reticle_assert`, and nothing else. A drive that ends without one has no result however many tools it used.
|
|
178
152
|
|
|
179
|
-
|
|
153
|
+
## The dev server, whoever starts it
|
|
180
154
|
|
|
181
|
-
|
|
155
|
+
**A dev server already running when `init` ran does not have Reticle in its bundle.** It read `vite.config.ts` / `next.config.js` at boot; `init` edited that file afterwards. The process keeps serving the old bundle, the page loads without the SDK, no session appears, and every symptom points at the wiring you just correctly did. This is a 100% failure, not an intermittent one, and it is the single largest cause of an install that gets to step 4 and finds an empty list.
|
|
182
156
|
|
|
183
|
-
|
|
184
|
-
2. `reticle_act_sequence` for the setup: every fill and every intermediate click in ONE call.
|
|
185
|
-
3. `reticle_act_and_wait({ ref, action, until })` for the final step only. This is the call that produces the verdict, and `until` names the expected consequence before the action fires.
|
|
186
|
-
4. `reticle_state()` once at the end.
|
|
157
|
+
So, in this order:
|
|
187
158
|
|
|
188
|
-
|
|
159
|
+
1. **A dev server was already running?** Restart it, then hard-reload the tab. "Something is listening" does not mean the right bundle is served.
|
|
160
|
+
2. **Nothing was running?** Start it in the BACKGROUND and say so in one line. `reticle_sessions` gives you this project's own dev command in `next_action`; use that, never compose one. Started after `init`, it needs no restart. **`reticle init` may start it for you, and stops it again if setup fails**: a command somebody ran is attributable and stoppable where a daemon is not.
|
|
189
161
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
```
|
|
193
|
-
reticle_run({ tool: "reticle_record", args: { action: "start", recordingName: "<flow>" } })
|
|
194
|
-
... the four calls above ...
|
|
195
|
-
reticle_run({ tool: "reticle_record", args: { action: "stop", recordingName: "<flow>" } })
|
|
196
|
-
reticle_run({ tool: "reticle_flow_save", args: { flowName: "<flow>" } })
|
|
197
|
-
```
|
|
162
|
+
Stopping here to ask is how a setup turn ends with nothing verified.
|
|
198
163
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
Tell the user plainly: that flow is now saved to `.reticle/flows/`, and re-verifying it after any future change is one call with no model in the loop.
|
|
202
|
-
|
|
203
|
-
## 6. Confirm the rule that makes this stick.
|
|
204
|
-
|
|
205
|
-
`init` writes a managed block into the project's `CLAUDE.md` and `AGENTS.md` (and `.cursor/rules/reticle.mdc` where it applies), plus a `RETICLE.md` reference file and the `/reticle` command. That block is what makes the next agent verify its own work instead of guessing.
|
|
206
|
-
|
|
207
|
-
Confirm the block is present, between `<!-- reticle:begin ... -->` and `<!-- reticle:end -->`. **Do not hand-write your own copy.** The markers are how a re-run stays idempotent, and a second unmarked copy will never be updated again. If it is missing, re-run `init`.
|
|
208
|
-
|
|
209
|
-
**Only after step 5 has produced a verdict**, report what you drove and what it produced, then:
|
|
210
|
-
|
|
211
|
-
> "Reticle is set up, and you just watched it drive <flow>. Type `/reticle` any time to verify a flow after a change."
|
|
164
|
+
The daemon deliberately will not do this for you. A build process started by a long-lived background daemon is invisible to the person whose machine it runs on and orphans when the daemon exits; a dev server YOU start is in the transcript, attributable, and stoppable.
|
|
212
165
|
|
|
213
|
-
|
|
166
|
+
Four guards, none optional:
|
|
214
167
|
|
|
215
|
-
|
|
168
|
+
1. **Never run two at once.** One dev server on the app's port. Restarting a stale one means stopping it first, not starting a second alongside it.
|
|
169
|
+
2. **Never guess the command.** It comes from `package.json` scripts. No recognisable dev script means say so and stop, not invent one.
|
|
170
|
+
3. **Never kill anything you did not start**, and never a daemon or a port holder. The one exception is the restart above, and say in one line that you did it.
|
|
171
|
+
4. **The permission prompt belongs to your host.** Never bypass, suppress or auto-approve it, and take a refusal as the answer. You have no business editing a permissions file yourself. `init` writes one rule, for the `reticle` server alone, and prints that it did.
|
|
216
172
|
|
|
217
173
|
---
|
|
218
174
|
|
|
@@ -220,9 +176,11 @@ Stop here. Do not continue into VERIFY.
|
|
|
220
176
|
|
|
221
177
|
Enterprise features are unlocked by a signed key, verified locally with Ed25519 and **no network call**. If the user hands you one, during setup or at any later point:
|
|
222
178
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
179
|
+
```bash
|
|
180
|
+
npx @reticlehq/server@latest init --license <key>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
That writes `RETICLE_LICENSE_KEY` to the project's `.env` and adds `.env` to `.gitignore` if nothing there covers it. Do not do those two by hand: a key committed to git is a leaked credential, and it stays leaked after the file is removed. Confirm with `npx @reticlehq/server license`, which prints `active`, `eval`, `missing` or `expired`.
|
|
226
184
|
|
|
227
185
|
Never echo the key back in your reply, and never put it in a commit, a code comment, or a feedback report. The rest: `curl https://docs.reticle.sh/enterprise.md`.
|
|
228
186
|
|
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
* accepted a session from; if it has served X and a HELLO arrives for Y, it demonstrably belongs to
|
|
14
14
|
* someone else.
|
|
15
15
|
*
|
|
16
|
+
* A HELLO with no token at all is a third case, and a reload cannot fix it: the CDN snippet and a
|
|
17
|
+
* Next config evaluated before any token existed froze an empty credential into the page. Naming
|
|
18
|
+
* that is what stops the close reason from prescribing a recovery that cannot work.
|
|
19
|
+
*
|
|
16
20
|
* With no evidence — a fresh daemon, or a HELLO naming no project — nothing is inferred and the
|
|
17
|
-
* plain reason stands.
|
|
21
|
+
* plain reason stands, unless the page sent no token.
|
|
18
22
|
*/
|
|
19
|
-
export declare function authFailureReason(servedProjects: ReadonlySet<string>, helloProject: string | undefined): string;
|
|
23
|
+
export declare function authFailureReason(servedProjects: ReadonlySet<string>, helloProject: string | undefined, helloToken?: string): string;
|
|
@@ -13,17 +13,24 @@
|
|
|
13
13
|
* accepted a session from; if it has served X and a HELLO arrives for Y, it demonstrably belongs to
|
|
14
14
|
* someone else.
|
|
15
15
|
*
|
|
16
|
+
* A HELLO with no token at all is a third case, and a reload cannot fix it: the CDN snippet and a
|
|
17
|
+
* Next config evaluated before any token existed froze an empty credential into the page. Naming
|
|
18
|
+
* that is what stops the close reason from prescribing a recovery that cannot work.
|
|
19
|
+
*
|
|
16
20
|
* With no evidence — a fresh daemon, or a HELLO naming no project — nothing is inferred and the
|
|
17
|
-
* plain reason stands.
|
|
21
|
+
* plain reason stands, unless the page sent no token.
|
|
18
22
|
*/
|
|
19
23
|
const PLAIN = 'authentication failed';
|
|
24
|
+
/** A paste-in snippet or a Next config that never saw a token. Reload cannot mint one. */
|
|
25
|
+
const NO_TOKEN = 'authentication failed: no pairing token on the page';
|
|
20
26
|
/** WebSocket close reasons are capped at 123 bytes; a longer one throws and closes with nothing. */
|
|
21
27
|
const MAX_REASON_BYTES = 123;
|
|
22
|
-
export function authFailureReason(servedProjects, helloProject) {
|
|
23
|
-
if (helloProject
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
export function authFailureReason(servedProjects, helloProject, helloToken) {
|
|
29
|
+
if (helloProject !== undefined && 0 < servedProjects.size && !servedProjects.has(helloProject)) {
|
|
30
|
+
const reason = `this daemon serves a different project — run \`reticle stop\` and retry`;
|
|
31
|
+
return Buffer.byteLength(reason, 'utf8') <= MAX_REASON_BYTES ? reason : PLAIN;
|
|
32
|
+
}
|
|
33
|
+
if (helloToken === undefined || 0 === helloToken.length)
|
|
34
|
+
return NO_TOKEN;
|
|
35
|
+
return PLAIN;
|
|
29
36
|
}
|
package/dist/bridge/bridge.d.ts
CHANGED
|
@@ -13,8 +13,19 @@ type SessionReadyHandler = (session: Session) => void;
|
|
|
13
13
|
* surfacing them is strictly better than the generic answer.
|
|
14
14
|
*/
|
|
15
15
|
export declare const WS_CLOSE_REASON: {
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The generic form. The live path picks a DIRECTION-aware reason instead (see protocol-skew.ts);
|
|
18
|
+
* this stays as the close-code table's label and as the fallback when the skew cannot be read.
|
|
19
|
+
*/
|
|
20
|
+
readonly PROTOCOL_MISMATCH: "protocol version mismatch — @reticlehq/browser and server disagree";
|
|
17
21
|
readonly AUTH_FAILED: "authentication failed — reload the page to pick up the current pairing token";
|
|
22
|
+
/**
|
|
23
|
+
* The daemon threw while handling a message. Closing is deliberate: an exception leaves the
|
|
24
|
+
* session in a state neither side can describe, and a socket left OPEN and unresponsive is the
|
|
25
|
+
* worst of the outcomes — the agent's next tool call reports "no browser session connected",
|
|
26
|
+
* which reads as an app nobody started. Closing at least makes the SDK reconnect and say so.
|
|
27
|
+
*/
|
|
28
|
+
readonly HANDLER_FAILED: "the Reticle daemon failed handling a message — reload the page to reconnect";
|
|
18
29
|
/**
|
|
19
30
|
* The pool of half-open handshakes was full, so this dial was turned away before it could say
|
|
20
31
|
* anything. Every other refusal here records why and this one did not — it closed the socket and
|
|
@@ -42,6 +53,11 @@ interface BridgeOptions {
|
|
|
42
53
|
* `port` and `host` are ignored for binding when this is provided.
|
|
43
54
|
*/
|
|
44
55
|
server?: http.Server;
|
|
56
|
+
/**
|
|
57
|
+
* The SDK-upgrade sentence to attach when a HELLO is skewed. Injected so the daemon can name
|
|
58
|
+
* this project's packages and package manager; tests that omit it get the no-project fallback.
|
|
59
|
+
*/
|
|
60
|
+
sdkFix?: () => string;
|
|
45
61
|
}
|
|
46
62
|
/**
|
|
47
63
|
* The browser-facing half of the relay: a localhost WebSocket server. Each connection
|
|
@@ -69,6 +85,7 @@ export declare class Bridge {
|
|
|
69
85
|
* batched tail (< one flush batch) never reaches disk and the learned ambient map is discarded.
|
|
70
86
|
*/
|
|
71
87
|
attachSessionEnd(handler: (session: Session) => Promise<void>): void;
|
|
88
|
+
/** Register a handler to run when a session connects. Additive — every handler runs. */
|
|
72
89
|
attachSessionCreate(handler: (session: Session) => void): void;
|
|
73
90
|
close(): Promise<void>;
|
|
74
91
|
}
|