@reticlehq/server 2.11.0 → 2.13.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.
- package/SKILL.md +93 -111
- 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 -14
- package/dist/bridge/bridge.js +248 -165
- package/dist/bridge/bridge.test-harness.d.ts +2 -0
- package/dist/bridge/bridge.test-harness.js +8 -1
- 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 +8 -7
- package/dist/capsule/capsule-store.js +1 -1
- package/dist/capsule/causal-summary.d.ts +2 -2
- package/dist/capsule/causal-summary.js +7 -2
- package/dist/chromium-launch-options.d.ts +28 -0
- package/dist/chromium-launch-options.js +29 -0
- package/dist/cli/cli-doctor.js +39 -1
- package/dist/cli/cli-flow-commands.d.ts +3 -1
- package/dist/cli/cli-flow-commands.js +34 -4
- package/dist/cli/cli-kill.d.ts +2 -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 +17 -1
- package/dist/cli/cli-parse.js +238 -12
- package/dist/cli/cli-update-commands.js +20 -1
- package/dist/cli/cli-verify.d.ts +2 -1
- package/dist/cli/cli-verify.js +5 -4
- package/dist/cli/cloud-cli.js +428 -253
- 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.d.ts +2 -1
- 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 +12 -1
- package/dist/cli/doctor-rows.js +12 -1
- 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/gate-exit.d.ts +21 -0
- package/dist/cli/gate-exit.js +21 -0
- package/dist/cli/gate-hook-message.d.ts +33 -0
- package/dist/cli/gate-hook-message.js +46 -0
- package/dist/cli/mcp-command.d.ts +25 -0
- package/dist/cli/mcp-command.js +174 -0
- package/dist/cli/project-name.d.ts +30 -0
- package/dist/cli/project-name.js +44 -0
- package/dist/cli/sibling-ports.d.ts +37 -0
- package/dist/cli/sibling-ports.js +56 -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 +167 -186
- package/dist/cloud/cloud-config.d.ts +24 -2
- package/dist/cloud/cloud-config.js +64 -5
- package/dist/cloud/cloud-sync.d.ts +16 -5
- package/dist/cloud/cloud-sync.js +64 -1
- 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 +12 -13
- package/dist/crawl/crawl.js +25 -3
- package/dist/daemon/daemon-resolve.d.ts +122 -0
- package/dist/daemon/daemon-resolve.js +187 -0
- package/dist/daemon/dev-servers.d.ts +15 -0
- package/dist/daemon/dev-servers.js +68 -0
- package/dist/daemon/free-port.d.ts +29 -0
- package/dist/daemon/free-port.js +55 -0
- package/dist/daemon/heartbeat.d.ts +0 -4
- package/dist/daemon/heartbeat.js +2 -2
- package/dist/daemon/wake-decision.d.ts +32 -0
- package/dist/daemon/wake-decision.js +38 -0
- package/dist/dev/stale-issue-guard.d.ts +0 -2
- package/dist/dev/stale-issue-guard.js +1 -1
- package/dist/domain/domain-tools.js +2 -2
- package/dist/events/contradictions.d.ts +59 -0
- package/dist/events/contradictions.js +253 -27
- package/dist/events/declared.d.ts +17 -0
- package/dist/events/declared.js +43 -1
- package/dist/events/echo-mismatch.js +65 -1
- package/dist/events/event-filters.d.ts +8 -0
- package/dist/events/event-filters.js +19 -2
- package/dist/events/observed-in-window.d.ts +12 -0
- package/dist/events/observed-in-window.js +17 -0
- package/dist/events/predicate-asks.d.ts +13 -0
- package/dist/events/predicate-asks.js +22 -0
- package/dist/events/predicate-eval.js +117 -27
- package/dist/events/predicate-parse.d.ts +0 -6
- package/dist/events/predicate-parse.js +43 -3
- 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-schema.d.ts +44 -0
- package/dist/events/predicate-schema.js +126 -23
- package/dist/events/predicate.d.ts +20 -0
- package/dist/events/predicate.js +77 -6
- package/dist/events/split-text-miss.d.ts +30 -0
- package/dist/events/split-text-miss.js +44 -0
- package/dist/flows/coverage.d.ts +0 -8
- package/dist/flows/coverage.js +1 -1
- package/dist/flows/decision.d.ts +5 -1
- package/dist/flows/decision.js +33 -7
- package/dist/flows/flake.d.ts +6 -8
- package/dist/flows/flake.js +1 -1
- package/dist/flows/flow-intent.d.ts +52 -0
- package/dist/flows/flow-intent.js +123 -0
- 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 +263 -23
- 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-success.js +15 -3
- package/dist/flows/flow-tools.js +87 -33
- package/dist/flows/flows.d.ts +14 -1
- package/dist/flows/flows.js +502 -24
- 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 +36 -15
- 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/server-verify.js +16 -2
- package/dist/flows/verify-change-tools.js +9 -3
- package/dist/honesty/blind-spots.d.ts +51 -15
- package/dist/honesty/blind-spots.js +64 -4
- package/dist/honesty/feature-capture.d.ts +150 -0
- package/dist/honesty/feature-capture.js +233 -0
- package/dist/honesty/honesty.d.ts +24 -0
- package/dist/honesty/honesty.js +25 -1
- package/dist/honesty/instrumentation-gaps.d.ts +39 -6
- package/dist/honesty/instrumentation-gaps.js +88 -5
- package/dist/honesty/tool-hit-rate.d.ts +86 -0
- package/dist/honesty/tool-hit-rate.js +90 -0
- package/dist/honesty/undeclared-change.d.ts +51 -0
- package/dist/honesty/undeclared-change.js +56 -0
- package/dist/honesty/verified.d.ts +16 -0
- package/dist/honesty/verified.js +84 -5
- package/dist/http-server.d.ts +0 -1
- package/dist/http-server.js +13 -1
- package/dist/hunt/hunt-report.d.ts +0 -2
- package/dist/hunt/hunt-report.js +1 -1
- package/dist/impact/impact-recorder.d.ts +31 -8
- package/dist/impact/impact-recorder.js +104 -21
- package/dist/impact/impact-store.d.ts +13 -4
- package/dist/impact/impact-store.js +44 -3
- package/dist/index.d.ts +4 -1
- package/dist/index.js +113 -7
- package/dist/init/agent-rules.d.ts +30 -6
- package/dist/init/agent-rules.js +54 -13
- package/dist/init/astro-patch.d.ts +16 -0
- package/dist/init/astro-patch.js +28 -0
- package/dist/init/capabilities.d.ts +4 -3
- package/dist/init/capabilities.js +23 -3
- package/dist/init/closing-hint.d.ts +36 -0
- package/dist/init/closing-hint.js +120 -0
- package/dist/init/confirm.d.ts +27 -28
- package/dist/init/confirm.js +51 -11
- package/dist/init/cra.d.ts +34 -5
- package/dist/init/cra.js +96 -25
- 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 +50 -0
- package/dist/init/dev-script.js +66 -0
- 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 +17 -6
- package/dist/init/mcp.js +27 -11
- package/dist/init/node-io.js +11 -1
- package/dist/init/plan-framework.d.ts +0 -5
- package/dist/init/plan-framework.js +147 -37
- package/dist/init/plan.d.ts +30 -37
- package/dist/init/plan.js +50 -60
- package/dist/init/preflight.d.ts +28 -0
- package/dist/init/preflight.js +38 -0
- package/dist/init/refresh-rules.d.ts +39 -0
- package/dist/init/refresh-rules.js +51 -0
- package/dist/init/run.d.ts +32 -35
- package/dist/init/run.js +151 -202
- package/dist/init/slash-command.d.ts +1 -1
- package/dist/init/snippets.js +90 -31
- 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.d.ts +2 -0
- package/dist/input/real-input.js +28 -7
- package/dist/input/scroll-find.d.ts +7 -4
- package/dist/input/scroll-find.js +63 -25
- package/dist/input/scroll-tools.js +4 -6
- package/dist/input/viewport-tools.js +5 -4
- package/dist/intent/inline-intent.d.ts +37 -0
- package/dist/intent/inline-intent.js +193 -0
- 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 +49 -0
- package/dist/intent/intent-store.js +133 -0
- package/dist/intent/intent-subject.d.ts +45 -0
- package/dist/intent/intent-subject.js +177 -0
- package/dist/intent/intent-tools.d.ts +2 -0
- package/dist/intent/intent-tools.js +143 -0
- package/dist/intent/open-intents.d.ts +42 -0
- package/dist/intent/open-intents.js +40 -0
- package/dist/journal/envelope.d.ts +26 -26
- package/dist/journal/journal-recorder.d.ts +23 -0
- package/dist/journal/journal-recorder.js +35 -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 +83 -0
- package/dist/mcp/attach-memory.js +185 -0
- 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 -8
- package/dist/mcp/mcp-proxy.js +64 -62
- package/dist/mcp/mcp.d.ts +2 -0
- package/dist/mcp/mcp.js +52 -24
- 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/server-instructions.js +45 -3
- package/dist/mcp/tool-catalog-cache.d.ts +16 -0
- package/dist/mcp/tool-catalog-cache.js +22 -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/flow-instrument-gaps.d.ts +4 -4
- package/dist/oracles/flow-instrument-gaps.js +4 -5
- package/dist/oracles/propose-consequences.js +12 -3
- package/dist/oracles/self-instrument.d.ts +9 -9
- package/dist/oracles/self-instrument.js +19 -13
- package/dist/pool/browser-pool.d.ts +75 -5
- package/dist/pool/browser-pool.js +144 -5
- package/dist/pool/playwright-launcher.js +12 -1
- package/dist/project/fs-port.d.ts +3 -0
- package/dist/project/fs-port.js +3 -2
- package/dist/project/memory-fs.js +6 -1
- package/dist/project/project-tools.js +6 -35
- package/dist/project/reticle-dir.d.ts +17 -2
- package/dist/project/reticle-dir.js +22 -4
- package/dist/runs/context-tools.d.ts +2 -0
- package/dist/runs/context-tools.js +89 -0
- package/dist/runs/run-context.d.ts +40 -0
- package/dist/runs/run-context.js +158 -0
- package/dist/runs/run-diff.d.ts +2 -1
- 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 +24 -3
- 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/dev-server-probe.d.ts +0 -8
- package/dist/session/dev-server-probe.js +1 -1
- package/dist/session/last-act.d.ts +7 -1
- package/dist/session/last-act.js +2 -2
- package/dist/session/lease-visibility.d.ts +67 -0
- package/dist/session/lease-visibility.js +76 -0
- package/dist/session/live-control-tools.js +1 -42
- package/dist/session/no-session-diagnosis.d.ts +33 -0
- package/dist/session/no-session-diagnosis.js +82 -24
- package/dist/session/no-session-next-action.d.ts +12 -0
- package/dist/session/no-session-next-action.js +77 -6
- package/dist/session/no-session-watch.d.ts +18 -6
- package/dist/session/no-session-watch.js +125 -75
- package/dist/session/output-budget.js +4 -1
- 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-health.d.ts +9 -0
- package/dist/session/session-health.js +23 -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 +111 -4
- 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.d.ts +37 -0
- package/dist/session/session-successor.js +113 -0
- package/dist/session/session-tools.js +2 -2
- package/dist/session/session.d.ts +53 -3
- package/dist/session/session.js +162 -9
- 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 +60 -0
- package/dist/setup/dev-server-wait.js +65 -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 +187 -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/automation-hint.d.ts +2 -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-outbox.d.ts +2 -1
- 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 -9
- package/dist/telemetry/project-profile.js +12 -7
- package/dist/telemetry/proxy-telemetry.d.ts +3 -0
- package/dist/telemetry/proxy-telemetry.js +21 -0
- package/dist/telemetry/run-telemetry.d.ts +0 -2
- package/dist/telemetry/run-telemetry.js +1 -1
- 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/telemetry/verification-of.js +2 -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 +196 -204
- package/dist/tools/assert-source.d.ts +22 -0
- package/dist/tools/assert-source.js +53 -0
- package/dist/tools/assert-verdict.d.ts +20 -3
- package/dist/tools/assert-verdict.js +58 -20
- package/dist/tools/browser-tools.js +6 -22
- package/dist/tools/complete-snapshot.d.ts +48 -0
- package/dist/tools/complete-snapshot.js +75 -0
- package/dist/tools/coverage-tools.d.ts +10 -1
- package/dist/tools/coverage-tools.js +123 -69
- package/dist/tools/dynamic-tools.js +53 -13
- package/dist/tools/error-recovery.d.ts +25 -14
- package/dist/tools/error-recovery.js +78 -9
- package/dist/tools/feedback-tools.d.ts +1 -1
- package/dist/tools/feedback-tools.js +2 -2
- package/dist/tools/invoke-tool.js +121 -11
- package/dist/tools/lease-hint.d.ts +10 -0
- package/dist/tools/lease-hint.js +53 -4
- package/dist/tools/lease-tools.d.ts +35 -5
- package/dist/tools/lease-tools.js +191 -13
- package/dist/tools/merged-name-redirect.d.ts +13 -0
- package/dist/tools/merged-name-redirect.js +22 -0
- package/dist/tools/navigate-arrival.d.ts +0 -2
- package/dist/tools/navigate-arrival.js +1 -1
- package/dist/tools/numeric-bounds.d.ts +100 -0
- package/dist/tools/numeric-bounds.js +125 -0
- package/dist/tools/observe-tools.js +109 -65
- package/dist/tools/read-tools.js +31 -8
- package/dist/tools/real-input-attempt.d.ts +32 -0
- package/dist/tools/real-input-attempt.js +212 -2
- package/dist/tools/reconcile-tools.js +22 -8
- package/dist/tools/resolve-target.d.ts +0 -7
- package/dist/tools/sdk-marker-probe.d.ts +29 -0
- package/dist/tools/sdk-marker-probe.js +57 -0
- package/dist/tools/snapshot-delta.d.ts +1 -1
- package/dist/tools/tool-kit.d.ts +24 -0
- package/dist/tools/tool-kit.js +21 -0
- package/dist/tools/tool-names.d.ts +5 -0
- package/dist/tools/tool-names.js +5 -0
- package/dist/tools/tool-surface.d.ts +85 -6
- package/dist/tools/tool-surface.js +122 -2
- 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 +78 -12
- package/dist/tools/unadvertised-help.js +4 -4
- package/dist/tools/verify-next-baton.d.ts +53 -0
- package/dist/tools/verify-next-baton.js +52 -0
- 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 +25 -10
- package/dist/update/update-nudge.js +32 -3
- package/dist/update/updater.d.ts +1 -1
- 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/README.md +2 -1
- package/docs/cli/cloud.mdx +1 -1
- package/docs/cli/doctor.mdx +2 -0
- package/docs/cli/serve.mdx +4 -2
- package/docs/cli/verify.mdx +4 -5
- package/docs/cli.mdx +7 -3
- package/docs/desktop.mdx +1 -1
- package/docs/docs.json +2 -2
- package/docs/gates.md +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/browser.mdx +2 -2
- package/docs/packages/server.mdx +1 -1
- package/docs/packages.mdx +8 -6
- package/docs/platform-integration.md +17 -0
- package/docs/predicates.mdx +8 -0
- package/docs/reticle-manual.md +106 -0
- package/docs/skill-file.mdx +3 -3
- package/docs/telemetry-contract.md +108 -4
- package/docs/tools-act-sequence.mdx +16 -0
- package/docs/tools-tools-and-run.mdx +2 -4
- package/docs/troubleshooting.mdx +9 -0
- package/docs/usage.md +4 -3
- package/package.json +4 -3
- package/dist/init/cursor.d.ts +0 -24
- package/dist/init/cursor.js +0 -80
- package/dist/session/session-readiness.d.ts +0 -34
- package/dist/session/session-readiness.js +0 -36
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.
|
|
98
|
-
|
|
99
|
-
Read the report: `✓` applied, `·` already wired, `–` skipped, `ℹ` done but incomplete in a way that matters, `⚠` needs your edit. **`⚠` and `ℹ` both need you.** `ℹ` is the one people skim past: the step ran, and something about the result still stops a session appearing. Each line carries the exact snippet. A non-zero exit is a to-do list, not a failed install. Fix every `⚠` before moving on. Per-framework wiring is at `https://docs.reticle.sh/install-manual.md`.
|
|
100
|
-
|
|
101
|
-
**If the user gave you a license key**, along with the install request or at any later point, see [License key](#license-key) below and do it before moving on.
|
|
102
|
-
|
|
103
|
-
## 2. Check for the tools. Do not stop for them.
|
|
104
|
-
|
|
105
|
-
Call `reticle_sessions`. If the tool exists, go to step 3 and never mention a restart.
|
|
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.
|
|
106
101
|
|
|
107
|
-
|
|
102
|
+
## What YOU decide, and pass in
|
|
108
103
|
|
|
109
|
-
|
|
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.
|
|
110
105
|
|
|
111
|
-
|
|
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. |
|
|
112
111
|
|
|
113
|
-
|
|
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.
|
|
114
113
|
|
|
115
|
-
|
|
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.
|
|
116
115
|
|
|
117
|
-
|
|
116
|
+
## Then read what it gives you back
|
|
118
117
|
|
|
119
|
-
|
|
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.
|
|
120
119
|
|
|
121
|
-
|
|
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.
|
|
122
121
|
|
|
123
|
-
|
|
122
|
+
**If the user gave you a license key**, see [License key](#license-key) below.
|
|
124
123
|
|
|
125
|
-
|
|
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:
|
|
133
|
-
|
|
134
|
-
- **Never guard the connect on `window.location.hostname === 'localhost'`.** It is false on every non-localhost dev host, and `window` does not exist during SSR. Use the framework's dev flag plus a client-only boundary.
|
|
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.
|
|
124
|
+
---
|
|
136
125
|
|
|
137
|
-
|
|
126
|
+
# If that command could not run it
|
|
138
127
|
|
|
139
|
-
**
|
|
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.
|
|
140
129
|
|
|
141
|
-
|
|
130
|
+
Use it only when ONE of these is true, and you can say which:
|
|
142
131
|
|
|
143
|
-
|
|
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.
|
|
144
135
|
|
|
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.
|
|
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.
|
|
150
137
|
|
|
151
|
-
|
|
138
|
+
When one of those three IS true, the whole manual procedure is one page:
|
|
152
139
|
|
|
153
140
|
```bash
|
|
154
|
-
|
|
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
|
|
155
143
|
```
|
|
156
144
|
|
|
157
|
-
|
|
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
|
-
|
|
165
|
-
```
|
|
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`.
|
|
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.
|
|
172
146
|
|
|
173
|
-
|
|
147
|
+
Do not reconstruct it from memory. Three things decide whether it works, and all three get skipped:
|
|
174
148
|
|
|
175
|
-
|
|
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.
|
|
176
152
|
|
|
177
|
-
|
|
153
|
+
## The dev server, whoever starts it
|
|
178
154
|
|
|
179
|
-
|
|
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.
|
|
180
156
|
|
|
181
|
-
|
|
157
|
+
So, in this order:
|
|
182
158
|
|
|
183
|
-
1.
|
|
184
|
-
2. `
|
|
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.
|
|
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.
|
|
187
161
|
|
|
188
|
-
|
|
162
|
+
Stopping here to ask is how a setup turn ends with nothing verified.
|
|
189
163
|
|
|
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
|
-
```
|
|
198
|
-
|
|
199
|
-
`reticle_flow_save` returns `assertions.grade`. If it is not `asserted`, the flow only clicks: it will pass even when the feature is broken. Say that in one line rather than presenting it as a regression check.
|
|
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
|
|
|
@@ -249,6 +207,30 @@ Work down this list and stop at the first row that fits. Do not hand-drive a flo
|
|
|
249
207
|
|
|
250
208
|
`reticle_verify {action:"change"}` answers `unknown` when no saved flow covers the files you changed. That is the honest answer and not a failure. Nothing ran, so nothing was proved. It is also the signal to record one. Never read it as a pass.
|
|
251
209
|
|
|
210
|
+
## Two more you have to be told about
|
|
211
|
+
|
|
212
|
+
Same story as `reticle_verify`: extended surface, so they are not in the tool list you were handed, and reached through `reticle_run`.
|
|
213
|
+
|
|
214
|
+
**Context compacted, a turn starting, or a sub-agent taking over?** Ask what this run already established, instead of re-snapshotting to rediscover what you already knew:
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
reticle_run({ tool: "reticle_context", args: {} })
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**About to change something?** Declare what the change is SUPPOSED to make true, in prose, while you still know. A verdict with nothing declared can only be checked against itself:
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
reticle_run({ tool: "reticle_intent", args: { action: "declare", intents: [{ id: "checkin", statement: "clicking Send check-in makes the badge read 'checked in'" }] } })
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Or say it on the verdict itself and skip the round trip. `reticle_act_and_wait` and `reticle_assert` both take an optional `intent`, writing the same ledger:
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
reticle_act_and_wait({ ref: "e42", action: "click", until: { kind: "signal", name: "checkin:sent" }, intent: "clicking Send check-in makes the badge read 'checked in'" })
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
The verdict that passes is the one that proves it. Already declared it? Pass the intent's **id** there instead of the prose, and several verdicts can answer to one statement.
|
|
233
|
+
|
|
252
234
|
## Record once, replay cheaply
|
|
253
235
|
|
|
254
236
|
The first drive of a journey is expensive. The rest should not be. After you drive something worth keeping:
|
|
@@ -270,7 +252,7 @@ Five calls, and the last one is the only one that counts:
|
|
|
270
252
|
|
|
271
253
|
```
|
|
272
254
|
reticle_sessions() // connected? if empty, read `why` — it names the fix
|
|
273
|
-
|
|
255
|
+
reticle_run({ tool: "reticle_capabilities", args: { sessionId } }) // the app's whole testable surface, ~1 KB
|
|
274
256
|
reticle_snapshot({ sessionId, mode: "interactive" }) // just the controls, with refs
|
|
275
257
|
reticle_act_and_wait({ sessionId, ref, action: "click", until: { kind: "allOf", predicates: [
|
|
276
258
|
{ kind: "net", urlContains: "/api/...", status: 200 },
|
|
@@ -285,7 +267,7 @@ A verdict of `verified: "unknown"` is not a pass. It means Reticle drove the app
|
|
|
285
267
|
|
|
286
268
|
Then report what you drove, what it produced, and the `file:line` for anything broken.
|
|
287
269
|
|
|
288
|
-
The surface is deliberately small: `default` 18, `all`
|
|
270
|
+
The surface is deliberately small: `default` 18, `all` 30. Editors budget tools across every MCP server you have connected (Cursor allows 40 in total), so the count is capped rather than allowed to grow. `reticle_tools` loads the argument grammar for the rest on demand, and `reticle_run` invokes any of them by name. Nothing is unreachable; the cold tail just costs one discovery hop.
|
|
289
271
|
|
|
290
272
|
- Batching, regression suites, reading a verdict: `https://docs.reticle.sh/agent-cheatsheet.md`
|
|
291
273
|
- Every predicate and action: `https://docs.reticle.sh/predicates.md`, `https://docs.reticle.sh/actions.md`
|
|
@@ -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
|
|
@@ -26,19 +37,6 @@ export declare const WS_CLOSE_REASON: {
|
|
|
26
37
|
*/
|
|
27
38
|
readonly HANDSHAKE_POOL_FULL: string;
|
|
28
39
|
};
|
|
29
|
-
/**
|
|
30
|
-
* A dial turned away at the ORIGIN gate, in words the reader can act on.
|
|
31
|
-
*
|
|
32
|
-
* This is the refusal that used to leave no trace anywhere. It happens before any HELLO, so it
|
|
33
|
-
* produced no `noteClosure`, no `session_disconnected`, nothing but an `origin_rejected` log line —
|
|
34
|
-
* and the daemon log is the file nobody opens until they have already lost the afternoon. Reported
|
|
35
|
-
* from a multi-tenant app resolving its tenant from the `Host` header: on a hosts-file alias every
|
|
36
|
-
* dial was refused here, `doctor` reported every check green, and the lease hint blamed the port.
|
|
37
|
-
*
|
|
38
|
-
* The origin is IN the message because it is the fix: it is either the alias to allow-list, or the
|
|
39
|
-
* proof that the page is not being served from where the developer thinks it is.
|
|
40
|
-
*/
|
|
41
|
-
export declare function originRejectedReason(origin: string | undefined): string;
|
|
42
40
|
interface BridgeOptions {
|
|
43
41
|
port: number;
|
|
44
42
|
host?: string;
|
|
@@ -55,6 +53,11 @@ interface BridgeOptions {
|
|
|
55
53
|
* `port` and `host` are ignored for binding when this is provided.
|
|
56
54
|
*/
|
|
57
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;
|
|
58
61
|
}
|
|
59
62
|
/**
|
|
60
63
|
* The browser-facing half of the relay: a localhost WebSocket server. Each connection
|
|
@@ -82,6 +85,7 @@ export declare class Bridge {
|
|
|
82
85
|
* batched tail (< one flush batch) never reaches disk and the learned ambient map is discarded.
|
|
83
86
|
*/
|
|
84
87
|
attachSessionEnd(handler: (session: Session) => Promise<void>): void;
|
|
88
|
+
/** Register a handler to run when a session connects. Additive — every handler runs. */
|
|
85
89
|
attachSessionCreate(handler: (session: Session) => void): void;
|
|
86
90
|
close(): Promise<void>;
|
|
87
91
|
}
|