@reticlehq/server 2.2.1 → 2.4.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/README.md +1 -1
- package/dist/bridge-security.d.ts +0 -1
- package/dist/bridge-security.js +0 -1
- package/dist/bridge.d.ts +0 -1
- package/dist/bridge.js +102 -12
- package/dist/bridge.test-harness.d.ts +5 -1
- package/dist/bridge.test-harness.js +12 -1
- package/dist/capsule/capsule-store.d.ts +2 -3
- package/dist/capsule/capsule-store.js +0 -1
- package/dist/capsule/capsule.d.ts +0 -1
- package/dist/capsule/capsule.js +0 -1
- package/dist/capsule/causal-summary.d.ts +21 -1
- package/dist/capsule/causal-summary.js +20 -2
- package/dist/capsule/divergence.d.ts +0 -1
- package/dist/capsule/divergence.js +0 -1
- package/dist/capsule/minimize.d.ts +0 -1
- package/dist/capsule/minimize.js +0 -1
- package/dist/capsule/predicate-to-links.d.ts +0 -1
- package/dist/capsule/predicate-to-links.js +0 -1
- package/dist/cli-doctor.d.ts +6 -0
- package/dist/cli-doctor.js +60 -0
- package/dist/cli-flow-commands.d.ts +0 -1
- package/dist/cli-flow-commands.js +0 -1
- package/dist/cli-launch.d.ts +0 -1
- package/dist/cli-launch.js +7 -3
- package/dist/cli-parse.d.ts +47 -3
- package/dist/cli-parse.js +147 -13
- package/dist/cli-port.d.ts +3 -1
- package/dist/cli-port.js +21 -1
- package/dist/cli-verify.d.ts +0 -1
- package/dist/cli-verify.js +1 -2
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +88 -69
- package/dist/cloud/cloud-config.d.ts +0 -1
- package/dist/cloud/cloud-config.js +0 -1
- package/dist/cloud/cloud-sync.d.ts +4 -5
- package/dist/cloud/cloud-sync.js +0 -1
- package/dist/cloud-cli.d.ts +0 -1
- package/dist/cloud-cli.js +9 -2
- package/dist/crawl/crawl-tools.d.ts +0 -1
- package/dist/crawl/crawl-tools.js +1 -2
- package/dist/crawl/crawl.d.ts +17 -3
- package/dist/crawl/crawl.js +43 -4
- package/dist/daemon-resilience.d.ts +6 -1
- package/dist/daemon-resilience.js +63 -1
- package/dist/daemon.d.ts +23 -3
- package/dist/daemon.js +36 -24
- package/dist/domain/domain-model.d.ts +0 -1
- package/dist/domain/domain-model.js +1 -2
- package/dist/domain/domain-tools.d.ts +0 -7
- package/dist/domain/domain-tools.js +21 -4
- package/dist/domain/flow-risk.d.ts +0 -1
- package/dist/domain/flow-risk.js +0 -1
- package/dist/ee/audit-log.d.ts +0 -1
- package/dist/ee/audit-log.js +0 -1
- package/dist/events/body-failures.d.ts +4 -0
- package/dist/events/body-failures.js +113 -0
- package/dist/events/contradictions.d.ts +53 -0
- package/dist/events/contradictions.js +282 -0
- package/dist/events/echo-mismatch.d.ts +4 -0
- package/dist/events/echo-mismatch.js +138 -0
- package/dist/events/event-filters.d.ts +17 -3
- package/dist/events/event-filters.js +13 -3
- package/dist/events/json-salvage.d.ts +32 -0
- package/dist/events/json-salvage.js +96 -0
- package/dist/events/predicate-eval.d.ts +2 -1
- package/dist/events/predicate-eval.js +56 -9
- package/dist/events/predicate.d.ts +0 -1
- package/dist/events/predicate.js +56 -2
- package/dist/events/reaction.d.ts +0 -1
- package/dist/events/reaction.js +0 -1
- package/dist/events/reconcile.d.ts +39 -0
- package/dist/events/reconcile.js +211 -0
- package/dist/events/ring-buffer.d.ts +0 -1
- package/dist/events/ring-buffer.js +0 -1
- package/dist/events/stale-response.d.ts +4 -0
- package/dist/events/stale-response.js +139 -0
- package/dist/events/unit-mismatch.d.ts +16 -0
- package/dist/events/unit-mismatch.js +167 -0
- package/dist/flows/affected-tools.d.ts +18 -0
- package/dist/flows/affected-tools.js +52 -0
- package/dist/flows/affected.d.ts +0 -1
- package/dist/flows/affected.js +0 -1
- package/dist/flows/annotate-tools.d.ts +0 -1
- package/dist/flows/annotate-tools.js +21 -3
- package/dist/flows/annotate.d.ts +0 -1
- package/dist/flows/annotate.js +0 -1
- package/dist/flows/annotation-store.d.ts +0 -1
- package/dist/flows/annotation-store.js +0 -1
- package/dist/flows/assertion-integrity.d.ts +0 -1
- package/dist/flows/assertion-integrity.js +0 -1
- package/dist/flows/assertion-tiers-store.d.ts +0 -1
- package/dist/flows/assertion-tiers-store.js +0 -1
- package/dist/flows/buddy-status.d.ts +0 -1
- package/dist/flows/buddy-status.js +0 -1
- package/dist/flows/coverage.d.ts +0 -1
- package/dist/flows/coverage.js +0 -1
- package/dist/flows/decision.d.ts +0 -7
- package/dist/flows/decision.js +47 -7
- package/dist/flows/flake-store.d.ts +0 -1
- package/dist/flows/flake-store.js +0 -1
- package/dist/flows/flake.d.ts +0 -1
- package/dist/flows/flake.js +0 -1
- package/dist/flows/flow-classify.d.ts +0 -1
- package/dist/flows/flow-classify.js +0 -1
- package/dist/flows/flow-replay-run.d.ts +0 -1
- package/dist/flows/flow-replay-run.js +2 -3
- package/dist/flows/flow-replay.d.ts +20 -4
- package/dist/flows/flow-replay.js +9 -43
- package/dist/flows/flow-report.d.ts +0 -1
- package/dist/flows/flow-report.js +0 -1
- package/dist/flows/flow-scope.d.ts +0 -1
- package/dist/flows/flow-scope.js +0 -1
- package/dist/flows/flow-sources.d.ts +0 -1
- package/dist/flows/flow-sources.js +0 -1
- package/dist/flows/flow-step-runners.d.ts +23 -0
- package/dist/flows/flow-step-runners.js +102 -0
- package/dist/flows/flow-success.d.ts +0 -1
- package/dist/flows/flow-success.js +0 -1
- package/dist/flows/flow-tools.d.ts +0 -1
- package/dist/flows/flow-tools.js +44 -14
- package/dist/flows/flows.d.ts +6 -2
- package/dist/flows/flows.js +15 -2
- package/dist/flows/gate.d.ts +0 -1
- package/dist/flows/gate.js +0 -1
- package/dist/flows/git-changed.d.ts +0 -1
- package/dist/flows/git-changed.js +0 -1
- package/dist/flows/heal-run.d.ts +0 -1
- package/dist/flows/heal-run.js +0 -1
- package/dist/flows/heal.d.ts +0 -1
- package/dist/flows/heal.js +0 -1
- package/dist/flows/parallel-suite.d.ts +0 -1
- package/dist/flows/parallel-suite.js +0 -1
- package/dist/flows/recordings.d.ts +0 -1
- package/dist/flows/recordings.js +0 -1
- package/dist/flows/replay.d.ts +0 -1
- package/dist/flows/replay.js +71 -4
- package/dist/flows/server-verify.d.ts +0 -1
- package/dist/flows/server-verify.js +0 -1
- package/dist/flows/verify-change-tools.d.ts +2 -0
- package/dist/flows/verify-change-tools.js +187 -0
- package/dist/flows/watch-batcher.d.ts +0 -1
- package/dist/flows/watch-batcher.js +0 -1
- package/dist/honesty/accepted-write.d.ts +14 -0
- package/dist/honesty/accepted-write.js +17 -0
- package/dist/honesty/blind-spots.d.ts +18 -1
- package/dist/honesty/blind-spots.js +47 -5
- package/dist/honesty/honesty.d.ts +0 -1
- package/dist/honesty/honesty.js +0 -1
- package/dist/honesty/uncaptured-bodies.d.ts +19 -0
- package/dist/honesty/uncaptured-bodies.js +30 -0
- package/dist/honesty/unread-outcome.d.ts +2 -0
- package/dist/honesty/unread-outcome.js +50 -0
- package/dist/honesty/verified.d.ts +40 -0
- package/dist/honesty/verified.js +86 -0
- package/dist/http-server.d.ts +0 -1
- package/dist/http-server.js +5 -1
- package/dist/hunt/hunt-report.d.ts +50 -0
- package/dist/hunt/hunt-report.js +84 -0
- package/dist/idle-shutdown.d.ts +0 -1
- package/dist/idle-shutdown.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/init/agent-rules.d.ts +0 -1
- package/dist/init/agent-rules.js +4 -2
- package/dist/init/capabilities.d.ts +17 -0
- package/dist/init/capabilities.js +51 -0
- package/dist/init/cursor.d.ts +0 -1
- package/dist/init/cursor.js +0 -1
- package/dist/init/desktop-doctor.d.ts +40 -0
- package/dist/init/desktop-doctor.js +198 -0
- package/dist/init/detect.d.ts +25 -1
- package/dist/init/detect.js +65 -4
- package/dist/init/mcp.d.ts +0 -1
- package/dist/init/mcp.js +0 -1
- package/dist/init/next-patch.d.ts +41 -0
- package/dist/init/next-patch.js +106 -0
- package/dist/init/node-io.d.ts +0 -1
- package/dist/init/node-io.js +25 -1
- package/dist/init/patch-kind.d.ts +20 -0
- package/dist/init/patch-kind.js +10 -0
- package/dist/init/plan-framework.d.ts +35 -0
- package/dist/init/plan-framework.js +217 -0
- package/dist/init/plan.d.ts +55 -4
- package/dist/init/plan.js +130 -112
- package/dist/init/project-id.d.ts +0 -1
- package/dist/init/project-id.js +0 -1
- package/dist/init/run.d.ts +17 -1
- package/dist/init/run.js +237 -18
- package/dist/init/slash-command.d.ts +18 -0
- package/dist/init/slash-command.js +52 -0
- package/dist/init/snippets.d.ts +48 -3
- package/dist/init/snippets.js +156 -6
- package/dist/init/vite-config.d.ts +4 -11
- package/dist/init/vite-config.js +15 -8
- package/dist/input/driven-redaction.d.ts +15 -0
- package/dist/input/driven-redaction.js +76 -0
- package/dist/input/network-detail.d.ts +9 -4
- package/dist/input/network-detail.js +35 -16
- package/dist/input/network-mock-tools.d.ts +0 -1
- package/dist/input/network-mock-tools.js +3 -4
- package/dist/input/network-mock.d.ts +0 -1
- package/dist/input/network-mock.js +0 -1
- package/dist/input/real-input.d.ts +14 -1
- package/dist/input/real-input.js +45 -3
- package/dist/input/scroll-find.d.ts +0 -1
- package/dist/input/scroll-find.js +0 -1
- package/dist/input/scroll-tools.d.ts +0 -1
- package/dist/input/scroll-tools.js +0 -1
- package/dist/input/viewport-tools.d.ts +0 -1
- package/dist/input/viewport-tools.js +3 -4
- package/dist/journal/ambient-store.d.ts +0 -1
- package/dist/journal/ambient-store.js +0 -1
- package/dist/journal/ambient.d.ts +0 -1
- package/dist/journal/ambient.js +0 -1
- package/dist/journal/attach-journal.d.ts +0 -1
- package/dist/journal/attach-journal.js +0 -1
- package/dist/journal/deviation-report.d.ts +0 -1
- package/dist/journal/deviation-report.js +0 -1
- package/dist/journal/deviation-service.d.ts +0 -1
- package/dist/journal/deviation-service.js +0 -1
- package/dist/journal/envelope-store.d.ts +0 -1
- package/dist/journal/envelope-store.js +0 -1
- package/dist/journal/envelope.d.ts +8 -9
- package/dist/journal/envelope.js +0 -1
- package/dist/journal/journal-query.d.ts +0 -1
- package/dist/journal/journal-query.js +0 -1
- package/dist/journal/journal-recorder.d.ts +0 -1
- package/dist/journal/journal-recorder.js +0 -1
- package/dist/journal/retention.d.ts +0 -1
- package/dist/journal/retention.js +0 -1
- package/dist/journal/rollups.d.ts +0 -1
- package/dist/journal/rollups.js +0 -1
- package/dist/journal/session-end.d.ts +0 -1
- package/dist/journal/session-end.js +0 -1
- package/dist/journal/session-journal.d.ts +0 -1
- package/dist/journal/session-journal.js +0 -1
- package/dist/license/license.d.ts +0 -1
- package/dist/license/license.js +0 -1
- package/dist/log.d.ts +0 -1
- package/dist/log.js +0 -1
- package/dist/mcp-proxy.d.ts +35 -4
- package/dist/mcp-proxy.js +174 -28
- package/dist/mcp.d.ts +15 -1
- package/dist/mcp.js +145 -17
- package/dist/oracles/flow-instrument-gaps.d.ts +0 -1
- package/dist/oracles/flow-instrument-gaps.js +0 -1
- package/dist/oracles/propose-consequences.d.ts +0 -1
- package/dist/oracles/propose-consequences.js +0 -1
- package/dist/oracles/self-instrument.d.ts +0 -1
- package/dist/oracles/self-instrument.js +0 -1
- package/dist/pairing-token.d.ts +0 -1
- package/dist/pairing-token.js +0 -1
- package/dist/phenomena/phenomena.d.ts +0 -1
- package/dist/phenomena/phenomena.js +0 -1
- package/dist/pool/browser-pool.d.ts +0 -1
- package/dist/pool/browser-pool.js +0 -1
- package/dist/pool/lease-reaper.d.ts +0 -1
- package/dist/pool/lease-reaper.js +0 -1
- package/dist/pool/playwright-launcher.d.ts +0 -1
- package/dist/pool/playwright-launcher.js +10 -2
- package/dist/project/baselines.d.ts +0 -1
- package/dist/project/baselines.js +0 -1
- package/dist/project/file-lock.d.ts +2 -1
- package/dist/project/file-lock.js +12 -2
- package/dist/project/fs-port.d.ts +0 -1
- package/dist/project/fs-port.js +0 -1
- package/dist/project/project-store.d.ts +0 -1
- package/dist/project/project-store.js +0 -1
- package/dist/project/project-tools.d.ts +0 -1
- package/dist/project/project-tools.js +29 -4
- package/dist/project/reticle-dir.d.ts +0 -1
- package/dist/project/reticle-dir.js +0 -1
- package/dist/runs/build-verification-run.d.ts +0 -1
- package/dist/runs/build-verification-run.js +0 -1
- package/dist/runs/profile-redact.d.ts +0 -1
- package/dist/runs/profile-redact.js +0 -1
- package/dist/runs/render-report.d.ts +0 -1
- package/dist/runs/render-report.js +0 -1
- package/dist/runs/repair-prompt.d.ts +0 -1
- package/dist/runs/repair-prompt.js +0 -1
- package/dist/runs/replay-mapping.d.ts +0 -1
- package/dist/runs/replay-mapping.js +0 -1
- package/dist/runs/reticle-runner.d.ts +0 -1
- package/dist/runs/reticle-runner.js +4 -2
- package/dist/runs/risk-classify.d.ts +0 -1
- package/dist/runs/risk-classify.js +0 -1
- package/dist/runs/run-diff.d.ts +0 -1
- package/dist/runs/run-diff.js +0 -1
- package/dist/runs/run-store.d.ts +0 -1
- package/dist/runs/run-store.js +0 -1
- package/dist/runs/run-tools.d.ts +0 -1
- package/dist/runs/run-tools.js +0 -1
- package/dist/runs/runner-port.d.ts +0 -1
- package/dist/runs/runner-port.js +0 -1
- package/dist/runs/verification-sync.d.ts +0 -1
- package/dist/runs/verification-sync.js +0 -1
- package/dist/runs/verify-http.d.ts +0 -1
- package/dist/runs/verify-http.js +0 -1
- package/dist/runs/verify-server.d.ts +0 -1
- package/dist/runs/verify-server.js +0 -1
- package/dist/server-version.d.ts +0 -1
- package/dist/server-version.js +0 -1
- package/dist/session/command-timeout.d.ts +35 -0
- package/dist/session/command-timeout.js +41 -0
- package/dist/session/control-envelope.d.ts +2 -3
- package/dist/session/control-envelope.js +2 -3
- package/dist/session/last-act.d.ts +31 -0
- package/dist/session/last-act.js +24 -0
- package/dist/session/live-control-tools.d.ts +0 -1
- package/dist/session/live-control-tools.js +3 -4
- package/dist/session/live-control.d.ts +0 -1
- package/dist/session/live-control.js +0 -1
- package/dist/session/observed-state.d.ts +12 -2
- package/dist/session/observed-state.js +29 -2
- package/dist/session/output-budget.d.ts +0 -1
- package/dist/session/output-budget.js +0 -1
- package/dist/session/pending-commands.d.ts +12 -0
- package/dist/session/pending-commands.js +36 -0
- package/dist/session/presenter-args.d.ts +0 -1
- package/dist/session/presenter-args.js +0 -1
- package/dist/session/review-store.d.ts +0 -1
- package/dist/session/review-store.js +0 -1
- package/dist/session/session-health.d.ts +26 -2
- package/dist/session/session-health.js +13 -1
- package/dist/session/session-info.d.ts +29 -0
- package/dist/session/session-info.js +1 -0
- package/dist/session/session-lease.d.ts +25 -0
- package/dist/session/session-lease.js +14 -0
- package/dist/session/session-manager.d.ts +7 -19
- package/dist/session/session-manager.js +35 -2
- package/dist/session/session-readiness.d.ts +0 -1
- package/dist/session/session-readiness.js +3 -4
- package/dist/session/session-reaper.d.ts +0 -1
- package/dist/session/session-reaper.js +0 -1
- package/dist/session/session-recommendation.d.ts +0 -1
- package/dist/session/session-recommendation.js +0 -1
- package/dist/session/session-tools.d.ts +0 -1
- package/dist/session/session-tools.js +2 -3
- package/dist/session/session.d.ts +33 -53
- package/dist/session/session.js +102 -66
- package/dist/session/state-select.d.ts +0 -1
- package/dist/session/state-select.js +0 -1
- package/dist/telemetry/argument-shape.d.ts +41 -0
- package/dist/telemetry/argument-shape.js +87 -0
- package/dist/telemetry/bug-found.d.ts +33 -0
- package/dist/telemetry/bug-found.js +95 -0
- package/dist/telemetry/cli-telemetry.d.ts +13 -0
- package/dist/telemetry/cli-telemetry.js +43 -0
- package/dist/telemetry/connect-failure.d.ts +16 -0
- package/dist/telemetry/connect-failure.js +44 -0
- package/dist/telemetry/daemon-telemetry.d.ts +19 -0
- package/dist/telemetry/daemon-telemetry.js +76 -0
- package/dist/telemetry/dev-repo.d.ts +10 -0
- package/dist/telemetry/dev-repo.js +80 -0
- package/dist/telemetry/error-fingerprint.d.ts +24 -0
- package/dist/telemetry/error-fingerprint.js +88 -0
- package/dist/telemetry/feedback-cli.d.ts +31 -0
- package/dist/telemetry/feedback-cli.js +102 -0
- package/dist/telemetry/feedback-context.d.ts +32 -0
- package/dist/telemetry/feedback-context.js +143 -0
- package/dist/telemetry/feedback.d.ts +66 -0
- package/dist/telemetry/feedback.js +175 -0
- package/dist/telemetry/git-facts.d.ts +21 -0
- package/dist/telemetry/git-facts.js +109 -0
- package/dist/telemetry/identify.d.ts +22 -0
- package/dist/telemetry/identify.js +73 -0
- package/dist/telemetry/init-telemetry.d.ts +26 -0
- package/dist/telemetry/init-telemetry.js +33 -0
- package/dist/telemetry/machine-snapshot.d.ts +6 -0
- package/dist/telemetry/machine-snapshot.js +39 -0
- package/dist/telemetry/mcp-connection.d.ts +5 -0
- package/dist/telemetry/mcp-connection.js +44 -0
- package/dist/telemetry/project-profile.d.ts +44 -0
- package/dist/telemetry/project-profile.js +205 -0
- package/dist/telemetry/run-telemetry.d.ts +21 -0
- package/dist/telemetry/run-telemetry.js +62 -0
- package/dist/telemetry/session-metrics.d.ts +103 -0
- package/dist/telemetry/session-metrics.js +329 -0
- package/dist/telemetry/telemetry.d.ts +35 -8
- package/dist/telemetry/telemetry.js +105 -12
- package/dist/token-auth.d.ts +0 -1
- package/dist/token-auth.js +0 -1
- package/dist/tools/act-capsule.d.ts +23 -0
- package/dist/tools/act-capsule.js +47 -0
- package/dist/tools/act-danger.d.ts +7 -0
- package/dist/tools/act-danger.js +44 -0
- package/dist/tools/act-helpers.d.ts +17 -0
- package/dist/tools/act-helpers.js +40 -0
- package/dist/tools/act-tools.d.ts +8 -1
- package/dist/tools/act-tools.js +96 -98
- package/dist/tools/act-view.d.ts +7 -1
- package/dist/tools/act-view.js +13 -1
- package/dist/tools/assert-grade.d.ts +22 -1
- package/dist/tools/assert-grade.js +46 -1
- package/dist/tools/assert-verdict.d.ts +21 -0
- package/dist/tools/assert-verdict.js +62 -0
- package/dist/tools/browser-tools.d.ts +0 -1
- package/dist/tools/browser-tools.js +2 -2
- package/dist/tools/contract-tools.d.ts +0 -1
- package/dist/tools/contract-tools.js +0 -1
- package/dist/tools/coverage-tools.d.ts +9 -0
- package/dist/tools/coverage-tools.js +92 -0
- package/dist/tools/dynamic-tools.d.ts +0 -1
- package/dist/tools/dynamic-tools.js +21 -2
- package/dist/tools/error-recovery.d.ts +18 -2
- package/dist/tools/error-recovery.js +42 -7
- package/dist/tools/feedback-tools.d.ts +24 -0
- package/dist/tools/feedback-tools.js +180 -0
- package/dist/tools/invoke-tool.d.ts +0 -1
- package/dist/tools/invoke-tool.js +115 -5
- package/dist/tools/lease-tools.d.ts +0 -1
- package/dist/tools/lease-tools.js +6 -5
- package/dist/tools/merge-tools.d.ts +0 -1
- package/dist/tools/merge-tools.js +0 -1
- package/dist/tools/observe-tools.d.ts +0 -1
- package/dist/tools/observe-tools.js +91 -39
- package/dist/tools/profiles.d.ts +1 -2
- package/dist/tools/profiles.js +43 -16
- package/dist/tools/query-paginate.d.ts +0 -1
- package/dist/tools/query-paginate.js +0 -1
- package/dist/tools/read-tools.d.ts +0 -1
- package/dist/tools/read-tools.js +14 -8
- package/dist/tools/reconcile-tools.d.ts +2 -0
- package/dist/tools/reconcile-tools.js +111 -0
- package/dist/tools/snapshot-delta.d.ts +0 -1
- package/dist/tools/snapshot-delta.js +0 -0
- package/dist/tools/tool-invoker.d.ts +0 -1
- package/dist/tools/tool-invoker.js +0 -1
- package/dist/tools/tool-kit.d.ts +16 -1
- package/dist/tools/tool-kit.js +8 -2
- package/dist/tools/tool-names.d.ts +6 -1
- package/dist/tools/tool-names.js +6 -1
- package/dist/tools/tools-helpers.d.ts +0 -1
- package/dist/tools/tools-helpers.js +0 -1
- package/dist/tools/tools.d.ts +0 -1
- package/dist/tools/tools.js +24 -4
- package/dist/update/update-checker.d.ts +0 -1
- package/dist/update/update-checker.js +0 -1
- package/dist/update/update-nudge.d.ts +20 -0
- package/dist/update/update-nudge.js +72 -0
- package/dist/update/updater.d.ts +14 -1
- package/dist/update/updater.js +33 -2
- package/dist/visual/visual-diff.d.ts +0 -1
- package/dist/visual/visual-diff.js +0 -1
- package/dist/visual/visual-store.d.ts +0 -1
- package/dist/visual/visual-store.js +0 -1
- package/dist/visual/visual-tools.d.ts +0 -1
- package/dist/visual/visual-tools.js +103 -16
- package/package.json +2 -2
- package/dist/bridge-security.d.ts.map +0 -1
- package/dist/bridge-security.js.map +0 -1
- package/dist/bridge.d.ts.map +0 -1
- package/dist/bridge.js.map +0 -1
- package/dist/bridge.test-harness.d.ts.map +0 -1
- package/dist/bridge.test-harness.js.map +0 -1
- package/dist/capsule/capsule-store.d.ts.map +0 -1
- package/dist/capsule/capsule-store.js.map +0 -1
- package/dist/capsule/capsule.d.ts.map +0 -1
- package/dist/capsule/capsule.js.map +0 -1
- package/dist/capsule/causal-summary.d.ts.map +0 -1
- package/dist/capsule/causal-summary.js.map +0 -1
- package/dist/capsule/divergence.d.ts.map +0 -1
- package/dist/capsule/divergence.js.map +0 -1
- package/dist/capsule/minimize.d.ts.map +0 -1
- package/dist/capsule/minimize.js.map +0 -1
- package/dist/capsule/predicate-to-links.d.ts.map +0 -1
- package/dist/capsule/predicate-to-links.js.map +0 -1
- package/dist/cli-flow-commands.d.ts.map +0 -1
- package/dist/cli-flow-commands.js.map +0 -1
- package/dist/cli-launch.d.ts.map +0 -1
- package/dist/cli-launch.js.map +0 -1
- package/dist/cli-parse.d.ts.map +0 -1
- package/dist/cli-parse.js.map +0 -1
- package/dist/cli-port.d.ts.map +0 -1
- package/dist/cli-port.js.map +0 -1
- package/dist/cli-verify.d.ts.map +0 -1
- package/dist/cli-verify.js.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/cloud/cloud-config.d.ts.map +0 -1
- package/dist/cloud/cloud-config.js.map +0 -1
- package/dist/cloud/cloud-sync.d.ts.map +0 -1
- package/dist/cloud/cloud-sync.js.map +0 -1
- package/dist/cloud-cli.d.ts.map +0 -1
- package/dist/cloud-cli.js.map +0 -1
- package/dist/crawl/crawl-tools.d.ts.map +0 -1
- package/dist/crawl/crawl-tools.js.map +0 -1
- package/dist/crawl/crawl.d.ts.map +0 -1
- package/dist/crawl/crawl.js.map +0 -1
- package/dist/daemon-resilience.d.ts.map +0 -1
- package/dist/daemon-resilience.js.map +0 -1
- package/dist/daemon.d.ts.map +0 -1
- package/dist/daemon.js.map +0 -1
- package/dist/domain/domain-model.d.ts.map +0 -1
- package/dist/domain/domain-model.js.map +0 -1
- package/dist/domain/domain-tools.d.ts.map +0 -1
- package/dist/domain/domain-tools.js.map +0 -1
- package/dist/domain/flow-risk.d.ts.map +0 -1
- package/dist/domain/flow-risk.js.map +0 -1
- package/dist/ee/audit-log.d.ts.map +0 -1
- package/dist/ee/audit-log.js.map +0 -1
- package/dist/events/event-filters.d.ts.map +0 -1
- package/dist/events/event-filters.js.map +0 -1
- package/dist/events/predicate-eval.d.ts.map +0 -1
- package/dist/events/predicate-eval.js.map +0 -1
- package/dist/events/predicate.d.ts.map +0 -1
- package/dist/events/predicate.js.map +0 -1
- package/dist/events/reaction.d.ts.map +0 -1
- package/dist/events/reaction.js.map +0 -1
- package/dist/events/ring-buffer.d.ts.map +0 -1
- package/dist/events/ring-buffer.js.map +0 -1
- package/dist/flows/affected.d.ts.map +0 -1
- package/dist/flows/affected.js.map +0 -1
- package/dist/flows/annotate-tools.d.ts.map +0 -1
- package/dist/flows/annotate-tools.js.map +0 -1
- package/dist/flows/annotate.d.ts.map +0 -1
- package/dist/flows/annotate.js.map +0 -1
- package/dist/flows/annotation-store.d.ts.map +0 -1
- package/dist/flows/annotation-store.js.map +0 -1
- package/dist/flows/assertion-integrity.d.ts.map +0 -1
- package/dist/flows/assertion-integrity.js.map +0 -1
- package/dist/flows/assertion-tiers-store.d.ts.map +0 -1
- package/dist/flows/assertion-tiers-store.js.map +0 -1
- package/dist/flows/buddy-status.d.ts.map +0 -1
- package/dist/flows/buddy-status.js.map +0 -1
- package/dist/flows/coverage.d.ts.map +0 -1
- package/dist/flows/coverage.js.map +0 -1
- package/dist/flows/decision.d.ts.map +0 -1
- package/dist/flows/decision.js.map +0 -1
- package/dist/flows/flake-store.d.ts.map +0 -1
- package/dist/flows/flake-store.js.map +0 -1
- package/dist/flows/flake.d.ts.map +0 -1
- package/dist/flows/flake.js.map +0 -1
- package/dist/flows/flow-classify.d.ts.map +0 -1
- package/dist/flows/flow-classify.js.map +0 -1
- package/dist/flows/flow-replay-run.d.ts.map +0 -1
- package/dist/flows/flow-replay-run.js.map +0 -1
- package/dist/flows/flow-replay.d.ts.map +0 -1
- package/dist/flows/flow-replay.js.map +0 -1
- package/dist/flows/flow-report.d.ts.map +0 -1
- package/dist/flows/flow-report.js.map +0 -1
- package/dist/flows/flow-scope.d.ts.map +0 -1
- package/dist/flows/flow-scope.js.map +0 -1
- package/dist/flows/flow-sources.d.ts.map +0 -1
- package/dist/flows/flow-sources.js.map +0 -1
- package/dist/flows/flow-success.d.ts.map +0 -1
- package/dist/flows/flow-success.js.map +0 -1
- package/dist/flows/flow-tools.d.ts.map +0 -1
- package/dist/flows/flow-tools.js.map +0 -1
- package/dist/flows/flows.d.ts.map +0 -1
- package/dist/flows/flows.js.map +0 -1
- package/dist/flows/gate.d.ts.map +0 -1
- package/dist/flows/gate.js.map +0 -1
- package/dist/flows/git-changed.d.ts.map +0 -1
- package/dist/flows/git-changed.js.map +0 -1
- package/dist/flows/heal-run.d.ts.map +0 -1
- package/dist/flows/heal-run.js.map +0 -1
- package/dist/flows/heal.d.ts.map +0 -1
- package/dist/flows/heal.js.map +0 -1
- package/dist/flows/parallel-suite.d.ts.map +0 -1
- package/dist/flows/parallel-suite.js.map +0 -1
- package/dist/flows/recordings.d.ts.map +0 -1
- package/dist/flows/recordings.js.map +0 -1
- package/dist/flows/replay.d.ts.map +0 -1
- package/dist/flows/replay.js.map +0 -1
- package/dist/flows/server-verify.d.ts.map +0 -1
- package/dist/flows/server-verify.js.map +0 -1
- package/dist/flows/watch-batcher.d.ts.map +0 -1
- package/dist/flows/watch-batcher.js.map +0 -1
- package/dist/honesty/blind-spots.d.ts.map +0 -1
- package/dist/honesty/blind-spots.js.map +0 -1
- package/dist/honesty/honesty.d.ts.map +0 -1
- package/dist/honesty/honesty.js.map +0 -1
- package/dist/http-server.d.ts.map +0 -1
- package/dist/http-server.js.map +0 -1
- package/dist/idle-shutdown.d.ts.map +0 -1
- package/dist/idle-shutdown.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/init/agent-rules.d.ts.map +0 -1
- package/dist/init/agent-rules.js.map +0 -1
- package/dist/init/cursor.d.ts.map +0 -1
- package/dist/init/cursor.js.map +0 -1
- package/dist/init/detect.d.ts.map +0 -1
- package/dist/init/detect.js.map +0 -1
- package/dist/init/mcp.d.ts.map +0 -1
- package/dist/init/mcp.js.map +0 -1
- package/dist/init/node-io.d.ts.map +0 -1
- package/dist/init/node-io.js.map +0 -1
- package/dist/init/plan.d.ts.map +0 -1
- package/dist/init/plan.js.map +0 -1
- package/dist/init/project-id.d.ts.map +0 -1
- package/dist/init/project-id.js.map +0 -1
- package/dist/init/run.d.ts.map +0 -1
- package/dist/init/run.js.map +0 -1
- package/dist/init/snippets.d.ts.map +0 -1
- package/dist/init/snippets.js.map +0 -1
- package/dist/init/vite-config.d.ts.map +0 -1
- package/dist/init/vite-config.js.map +0 -1
- package/dist/input/network-detail.d.ts.map +0 -1
- package/dist/input/network-detail.js.map +0 -1
- package/dist/input/network-mock-tools.d.ts.map +0 -1
- package/dist/input/network-mock-tools.js.map +0 -1
- package/dist/input/network-mock.d.ts.map +0 -1
- package/dist/input/network-mock.js.map +0 -1
- package/dist/input/real-input.d.ts.map +0 -1
- package/dist/input/real-input.js.map +0 -1
- package/dist/input/scroll-find.d.ts.map +0 -1
- package/dist/input/scroll-find.js.map +0 -1
- package/dist/input/scroll-tools.d.ts.map +0 -1
- package/dist/input/scroll-tools.js.map +0 -1
- package/dist/input/viewport-tools.d.ts.map +0 -1
- package/dist/input/viewport-tools.js.map +0 -1
- package/dist/journal/ambient-store.d.ts.map +0 -1
- package/dist/journal/ambient-store.js.map +0 -1
- package/dist/journal/ambient.d.ts.map +0 -1
- package/dist/journal/ambient.js.map +0 -1
- package/dist/journal/attach-journal.d.ts.map +0 -1
- package/dist/journal/attach-journal.js.map +0 -1
- package/dist/journal/deviation-report.d.ts.map +0 -1
- package/dist/journal/deviation-report.js.map +0 -1
- package/dist/journal/deviation-service.d.ts.map +0 -1
- package/dist/journal/deviation-service.js.map +0 -1
- package/dist/journal/envelope-store.d.ts.map +0 -1
- package/dist/journal/envelope-store.js.map +0 -1
- package/dist/journal/envelope.d.ts.map +0 -1
- package/dist/journal/envelope.js.map +0 -1
- package/dist/journal/journal-query.d.ts.map +0 -1
- package/dist/journal/journal-query.js.map +0 -1
- package/dist/journal/journal-recorder.d.ts.map +0 -1
- package/dist/journal/journal-recorder.js.map +0 -1
- package/dist/journal/retention.d.ts.map +0 -1
- package/dist/journal/retention.js.map +0 -1
- package/dist/journal/rollups.d.ts.map +0 -1
- package/dist/journal/rollups.js.map +0 -1
- package/dist/journal/session-end.d.ts.map +0 -1
- package/dist/journal/session-end.js.map +0 -1
- package/dist/journal/session-journal.d.ts.map +0 -1
- package/dist/journal/session-journal.js.map +0 -1
- package/dist/license/license.d.ts.map +0 -1
- package/dist/license/license.js.map +0 -1
- package/dist/log.d.ts.map +0 -1
- package/dist/log.js.map +0 -1
- package/dist/mcp-proxy.d.ts.map +0 -1
- package/dist/mcp-proxy.js.map +0 -1
- package/dist/mcp.d.ts.map +0 -1
- package/dist/mcp.js.map +0 -1
- package/dist/oracles/flow-instrument-gaps.d.ts.map +0 -1
- package/dist/oracles/flow-instrument-gaps.js.map +0 -1
- package/dist/oracles/propose-consequences.d.ts.map +0 -1
- package/dist/oracles/propose-consequences.js.map +0 -1
- package/dist/oracles/self-instrument.d.ts.map +0 -1
- package/dist/oracles/self-instrument.js.map +0 -1
- package/dist/pairing-token.d.ts.map +0 -1
- package/dist/pairing-token.js.map +0 -1
- package/dist/phenomena/phenomena.d.ts.map +0 -1
- package/dist/phenomena/phenomena.js.map +0 -1
- package/dist/pool/browser-pool.d.ts.map +0 -1
- package/dist/pool/browser-pool.js.map +0 -1
- package/dist/pool/lease-reaper.d.ts.map +0 -1
- package/dist/pool/lease-reaper.js.map +0 -1
- package/dist/pool/playwright-launcher.d.ts.map +0 -1
- package/dist/pool/playwright-launcher.js.map +0 -1
- package/dist/project/baselines.d.ts.map +0 -1
- package/dist/project/baselines.js.map +0 -1
- package/dist/project/file-lock.d.ts.map +0 -1
- package/dist/project/file-lock.js.map +0 -1
- package/dist/project/fs-port.d.ts.map +0 -1
- package/dist/project/fs-port.js.map +0 -1
- package/dist/project/project-store.d.ts.map +0 -1
- package/dist/project/project-store.js.map +0 -1
- package/dist/project/project-tools.d.ts.map +0 -1
- package/dist/project/project-tools.js.map +0 -1
- package/dist/project/reticle-dir.d.ts.map +0 -1
- package/dist/project/reticle-dir.js.map +0 -1
- package/dist/runs/build-verification-run.d.ts.map +0 -1
- package/dist/runs/build-verification-run.js.map +0 -1
- package/dist/runs/profile-redact.d.ts.map +0 -1
- package/dist/runs/profile-redact.js.map +0 -1
- package/dist/runs/render-report.d.ts.map +0 -1
- package/dist/runs/render-report.js.map +0 -1
- package/dist/runs/repair-prompt.d.ts.map +0 -1
- package/dist/runs/repair-prompt.js.map +0 -1
- package/dist/runs/replay-mapping.d.ts.map +0 -1
- package/dist/runs/replay-mapping.js.map +0 -1
- package/dist/runs/reticle-runner.d.ts.map +0 -1
- package/dist/runs/reticle-runner.js.map +0 -1
- package/dist/runs/risk-classify.d.ts.map +0 -1
- package/dist/runs/risk-classify.js.map +0 -1
- package/dist/runs/run-diff.d.ts.map +0 -1
- package/dist/runs/run-diff.js.map +0 -1
- package/dist/runs/run-store.d.ts.map +0 -1
- package/dist/runs/run-store.js.map +0 -1
- package/dist/runs/run-tools.d.ts.map +0 -1
- package/dist/runs/run-tools.js.map +0 -1
- package/dist/runs/runner-port.d.ts.map +0 -1
- package/dist/runs/runner-port.js.map +0 -1
- package/dist/runs/verification-sync.d.ts.map +0 -1
- package/dist/runs/verification-sync.js.map +0 -1
- package/dist/runs/verify-http.d.ts.map +0 -1
- package/dist/runs/verify-http.js.map +0 -1
- package/dist/runs/verify-server.d.ts.map +0 -1
- package/dist/runs/verify-server.js.map +0 -1
- package/dist/server-version.d.ts.map +0 -1
- package/dist/server-version.js.map +0 -1
- package/dist/session/control-envelope.d.ts.map +0 -1
- package/dist/session/control-envelope.js.map +0 -1
- package/dist/session/live-control-tools.d.ts.map +0 -1
- package/dist/session/live-control-tools.js.map +0 -1
- package/dist/session/live-control.d.ts.map +0 -1
- package/dist/session/live-control.js.map +0 -1
- package/dist/session/observed-state.d.ts.map +0 -1
- package/dist/session/observed-state.js.map +0 -1
- package/dist/session/output-budget.d.ts.map +0 -1
- package/dist/session/output-budget.js.map +0 -1
- package/dist/session/presenter-args.d.ts.map +0 -1
- package/dist/session/presenter-args.js.map +0 -1
- package/dist/session/review-store.d.ts.map +0 -1
- package/dist/session/review-store.js.map +0 -1
- package/dist/session/session-health.d.ts.map +0 -1
- package/dist/session/session-health.js.map +0 -1
- package/dist/session/session-manager.d.ts.map +0 -1
- package/dist/session/session-manager.js.map +0 -1
- package/dist/session/session-readiness.d.ts.map +0 -1
- package/dist/session/session-readiness.js.map +0 -1
- package/dist/session/session-reaper.d.ts.map +0 -1
- package/dist/session/session-reaper.js.map +0 -1
- package/dist/session/session-recommendation.d.ts.map +0 -1
- package/dist/session/session-recommendation.js.map +0 -1
- package/dist/session/session-tools.d.ts.map +0 -1
- package/dist/session/session-tools.js.map +0 -1
- package/dist/session/session.d.ts.map +0 -1
- package/dist/session/session.js.map +0 -1
- package/dist/session/state-select.d.ts.map +0 -1
- package/dist/session/state-select.js.map +0 -1
- package/dist/telemetry/telemetry.d.ts.map +0 -1
- package/dist/telemetry/telemetry.js.map +0 -1
- package/dist/token-auth.d.ts.map +0 -1
- package/dist/token-auth.js.map +0 -1
- package/dist/tools/act-tools.d.ts.map +0 -1
- package/dist/tools/act-tools.js.map +0 -1
- package/dist/tools/act-view.d.ts.map +0 -1
- package/dist/tools/act-view.js.map +0 -1
- package/dist/tools/assert-grade.d.ts.map +0 -1
- package/dist/tools/assert-grade.js.map +0 -1
- package/dist/tools/browser-tools.d.ts.map +0 -1
- package/dist/tools/browser-tools.js.map +0 -1
- package/dist/tools/contract-tools.d.ts.map +0 -1
- package/dist/tools/contract-tools.js.map +0 -1
- package/dist/tools/dynamic-tools.d.ts.map +0 -1
- package/dist/tools/dynamic-tools.js.map +0 -1
- package/dist/tools/error-recovery.d.ts.map +0 -1
- package/dist/tools/error-recovery.js.map +0 -1
- package/dist/tools/invoke-tool.d.ts.map +0 -1
- package/dist/tools/invoke-tool.js.map +0 -1
- package/dist/tools/lease-tools.d.ts.map +0 -1
- package/dist/tools/lease-tools.js.map +0 -1
- package/dist/tools/merge-tools.d.ts.map +0 -1
- package/dist/tools/merge-tools.js.map +0 -1
- package/dist/tools/observe-tools.d.ts.map +0 -1
- package/dist/tools/observe-tools.js.map +0 -1
- package/dist/tools/profiles.d.ts.map +0 -1
- package/dist/tools/profiles.js.map +0 -1
- package/dist/tools/query-paginate.d.ts.map +0 -1
- package/dist/tools/query-paginate.js.map +0 -1
- package/dist/tools/read-tools.d.ts.map +0 -1
- package/dist/tools/read-tools.js.map +0 -1
- package/dist/tools/snapshot-delta.d.ts.map +0 -1
- package/dist/tools/snapshot-delta.js.map +0 -1
- package/dist/tools/tool-invoker.d.ts.map +0 -1
- package/dist/tools/tool-invoker.js.map +0 -1
- package/dist/tools/tool-kit.d.ts.map +0 -1
- package/dist/tools/tool-kit.js.map +0 -1
- package/dist/tools/tool-names.d.ts.map +0 -1
- package/dist/tools/tool-names.js.map +0 -1
- package/dist/tools/tools-helpers.d.ts.map +0 -1
- package/dist/tools/tools-helpers.js.map +0 -1
- package/dist/tools/tools.d.ts.map +0 -1
- package/dist/tools/tools.js.map +0 -1
- package/dist/update/update-checker.d.ts.map +0 -1
- package/dist/update/update-checker.js.map +0 -1
- package/dist/update/updater.d.ts.map +0 -1
- package/dist/update/updater.js.map +0 -1
- package/dist/visual/visual-diff.d.ts.map +0 -1
- package/dist/visual/visual-diff.js.map +0 -1
- package/dist/visual/visual-store.d.ts.map +0 -1
- package/dist/visual/visual-store.js.map +0 -1
- package/dist/visual/visual-tools.d.ts.map +0 -1
- package/dist/visual/visual-tools.js.map +0 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Point your agent at it (e.g. Claude Code `.mcp.json`):
|
|
|
12
12
|
{ "mcpServers": { "reticle": { "command": "npx", "args": ["@reticlehq/server", "mcp"] } } }
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Tools: `reticle_snapshot`, `reticle_query`, `reticle_inspect`, `reticle_act`, `reticle_act_sequence`, `reticle_observe`, `reticle_wait_for`, `reticle_assert`, `reticle_network`, `reticle_console`, `reticle_animations`, `
|
|
15
|
+
Tools: `reticle_snapshot`, `reticle_query`, `reticle_inspect`, `reticle_act`, `reticle_act_sequence`, `reticle_act_and_wait`, `reticle_observe`, `reticle_wait_for`, `reticle_assert`, `reticle_network`, `reticle_console`, `reticle_animations`, `reticle_baseline`, `reticle_visual_diff`, `reticle_record`, `reticle_flow`, `reticle_explore`, `reticle_sessions`.
|
|
16
16
|
|
|
17
17
|
See the [main README](https://github.com/reticlehq/reticle).
|
|
18
18
|
|
package/dist/bridge-security.js
CHANGED
package/dist/bridge.d.ts
CHANGED
package/dist/bridge.js
CHANGED
|
@@ -1,20 +1,44 @@
|
|
|
1
1
|
import * as http from 'node:http';
|
|
2
2
|
import { WebSocketServer } from 'ws';
|
|
3
|
-
import { EventType, HumanControlKind, RETICLE_WS_PATH, ReticleMessageSchema, LOOPBACK_HOST, MessageKind, ReticleEnv, RETICLE_PROTOCOL_VERSION, TRANSPORT_LIMITS, isLoopbackHostname, } from '@reticlehq/core';
|
|
3
|
+
import { EventType, HumanControlKind, RETICLE_WS_PATH, ReticleMessageSchema, LOOPBACK_HOST, MessageKind, ReticleEnv, RETICLE_PROTOCOL_VERSION, TRANSPORT_LIMITS, isLocalPage, isLoopbackHostname, isOpaqueOrigin, OPAQUE_ORIGIN, isHighValueEvent, RATE_CAP_HIGH_VALUE_RESERVE_RATIO, } from '@reticlehq/core';
|
|
4
4
|
import { Session, SessionManager } from './session/session.js';
|
|
5
5
|
import { tokensMatch } from './token-auth.js';
|
|
6
6
|
import { log } from './log.js';
|
|
7
|
+
/**
|
|
8
|
+
* Take the mutable half of a session's identity from a repeat HELLO.
|
|
9
|
+
*
|
|
10
|
+
* Lives here rather than on Session because this is where the protocol decision is made — the caller
|
|
11
|
+
* has already established that the hello belongs to this same session — and because these fields are
|
|
12
|
+
* the session's public surface, read by the tools on every listing.
|
|
13
|
+
*
|
|
14
|
+
* `hasCapabilities` is the one that matters: it is announced in the hello, which the SDK sends at
|
|
15
|
+
* connect(), while capabilities are registered AFTER connect by design (registerStore needs a live
|
|
16
|
+
* SDK to subscribe through). Without this refresh, an app that declared its entire testable surface
|
|
17
|
+
* reported `hasCapabilities: false` forever.
|
|
18
|
+
*/
|
|
19
|
+
function refreshIdentity(session, hello) {
|
|
20
|
+
session.url = hello.url;
|
|
21
|
+
session.title = hello.title;
|
|
22
|
+
session.adapters = hello.adapters;
|
|
23
|
+
session.hasCapabilities = hello.hasCapabilities ?? false;
|
|
24
|
+
}
|
|
7
25
|
/** WS close codes + reasons the bridge sends to the SDK (1008 = policy violation, 1013 = try again later). */
|
|
8
26
|
const WS_CLOSE = {
|
|
9
27
|
TOO_MANY_HANDSHAKES: [1013, 'too many pending handshakes'],
|
|
10
28
|
HELLO_TIMEOUT: [1008, 'hello timeout'],
|
|
11
|
-
RATE_EXCEEDED: [1008, 'message rate exceeded'],
|
|
12
29
|
INVALID_MESSAGE: [1008, 'invalid message'],
|
|
13
30
|
HELLO_DUPLICATE: [1008, 'hello already received'],
|
|
14
31
|
AUTH_FAILED: [1008, 'authentication failed'],
|
|
15
32
|
SESSION_LIMIT: [1013, 'session limit reached'],
|
|
16
33
|
PROTOCOL_MISMATCH: [1008, 'protocol version mismatch — upgrade @reticlehq/browser'],
|
|
17
34
|
};
|
|
35
|
+
/** Parse a positive integer env override; anything else (unset, zero, junk) falls through to the default. */
|
|
36
|
+
function positiveIntFromEnv(raw) {
|
|
37
|
+
if (raw === undefined)
|
|
38
|
+
return undefined;
|
|
39
|
+
const parsed = Number.parseInt(raw, 10);
|
|
40
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : undefined;
|
|
41
|
+
}
|
|
18
42
|
/** The flow name if this event is a panel ▶ replay request, else undefined. Pure boundary narrowing. */
|
|
19
43
|
function replayRequest(event) {
|
|
20
44
|
if (event.type !== EventType.HUMAN_CONTROL)
|
|
@@ -24,9 +48,19 @@ function replayRequest(event) {
|
|
|
24
48
|
const name = event.data['text'];
|
|
25
49
|
return typeof name === 'string' && name.length > 0 ? name : undefined;
|
|
26
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Canonical comparable form of a WS `Origin`. Web origins collapse to scheme://host[:port]. An
|
|
53
|
+
* OPAQUE origin — a desktop webview (`tauri://localhost`, `app://.`) or `file://`, whose `URL.origin`
|
|
54
|
+
* is the string "null" — is kept VERBATIM instead, so it survives into the allow-list and can be
|
|
55
|
+
* compared. Collapsing those to "null" would both merge every desktop scheme into one bucket and
|
|
56
|
+
* feed an unparseable string to `new URL`. Returns null only for a header that is not an origin.
|
|
57
|
+
*/
|
|
27
58
|
function normalizeOrigin(origin) {
|
|
59
|
+
if (origin === OPAQUE_ORIGIN)
|
|
60
|
+
return OPAQUE_ORIGIN;
|
|
28
61
|
try {
|
|
29
|
-
|
|
62
|
+
const web = new URL(origin).origin;
|
|
63
|
+
return web === OPAQUE_ORIGIN ? origin : web;
|
|
30
64
|
}
|
|
31
65
|
catch {
|
|
32
66
|
return null;
|
|
@@ -107,8 +141,13 @@ export class Bridge {
|
|
|
107
141
|
'beyond localhost — otherwise every non-loopback browser is rejected at the WebSocket ' +
|
|
108
142
|
'origin check and no connection can be established.');
|
|
109
143
|
}
|
|
144
|
+
// Explicit option wins; then the env override, so a genuinely busy app can raise the ceiling
|
|
145
|
+
// instead of accepting sampled coverage. Free and local — the daemon runs on the same machine,
|
|
146
|
+
// so a higher cap costs nobody anything, which is also why this is not a paid knob.
|
|
110
147
|
this.#maxMessagesPerSecond =
|
|
111
|
-
options.maxMessagesPerSecond ??
|
|
148
|
+
options.maxMessagesPerSecond ??
|
|
149
|
+
positiveIntFromEnv(process.env[ReticleEnv.MAX_MESSAGES_PER_SECOND]) ??
|
|
150
|
+
TRANSPORT_LIMITS.MAX_MESSAGES_PER_SECOND;
|
|
112
151
|
this.#maxSessions = options.maxSessions ?? TRANSPORT_LIMITS.MAX_SESSIONS;
|
|
113
152
|
this.#maxPendingConnections =
|
|
114
153
|
options.maxPendingConnections ?? TRANSPORT_LIMITS.MAX_PENDING_CONNECTIONS;
|
|
@@ -182,6 +221,8 @@ export class Bridge {
|
|
|
182
221
|
let session;
|
|
183
222
|
let messageWindowStartedAt = this.#clock();
|
|
184
223
|
let messagesInWindow = 0;
|
|
224
|
+
let highValueInWindow = 0;
|
|
225
|
+
const highValueReserve = Math.ceil(this.#maxMessagesPerSecond * RATE_CAP_HIGH_VALUE_RESERVE_RATIO);
|
|
185
226
|
const releasePending = () => {
|
|
186
227
|
if (!awaitingHello)
|
|
187
228
|
return;
|
|
@@ -194,18 +235,16 @@ export class Bridge {
|
|
|
194
235
|
releasePending();
|
|
195
236
|
socket.close(...WS_CLOSE.HELLO_TIMEOUT);
|
|
196
237
|
}, this.#helloTimeoutMs);
|
|
238
|
+
let droppedByRate = 0;
|
|
197
239
|
socket.on('message', (raw) => {
|
|
198
240
|
const now = this.#clock();
|
|
199
241
|
if (now - messageWindowStartedAt >= 1000) {
|
|
200
242
|
messageWindowStartedAt = now;
|
|
201
243
|
messagesInWindow = 0;
|
|
244
|
+
highValueInWindow = 0;
|
|
202
245
|
}
|
|
203
246
|
messagesInWindow += 1;
|
|
204
|
-
|
|
205
|
-
log('message_rate_exceeded', {});
|
|
206
|
-
socket.close(...WS_CLOSE.RATE_EXCEEDED);
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
247
|
+
const overRate = messagesInWindow > this.#maxMessagesPerSecond;
|
|
209
248
|
const text = rawToString(raw);
|
|
210
249
|
const parsed = this.#parse(text);
|
|
211
250
|
if (parsed === null) {
|
|
@@ -218,9 +257,43 @@ export class Bridge {
|
|
|
218
257
|
socket.close(...WS_CLOSE.INVALID_MESSAGE);
|
|
219
258
|
return;
|
|
220
259
|
}
|
|
260
|
+
// Over the cap we SAMPLE — we never disconnect. Going blind is the one thing an observability
|
|
261
|
+
// layer must not do when it sees too much, and the close was a policy code the SDK correctly
|
|
262
|
+
// never retries: the app kept running and Reticle was blind from that instant, on exactly the
|
|
263
|
+
// busiest apps. Measured: each request emits two messages (pending + settled), so the cap binds
|
|
264
|
+
// at ~500 requests/second — a dashboard burst reaches it, a streaming app lives above it.
|
|
265
|
+
//
|
|
266
|
+
// Only EVENTS are dropped. A dropped hello would strand the session and a dropped
|
|
267
|
+
// command_result would hang the agent's in-flight call, so control traffic is always processed
|
|
268
|
+
// however fast it arrives — the cap exists to bound observation, not to break the protocol.
|
|
269
|
+
// Over the cap we drop by VALUE, not by arrival order. Volume is inversely correlated with
|
|
270
|
+
// value — a render-commit storm is thousands/second while the network call an assertion turns
|
|
271
|
+
// on is one — so first-come-first-dropped spends the budget on churn and loses the signal.
|
|
272
|
+
// High-value kinds get a bounded reserve on top of the cap; see event-priority.ts.
|
|
273
|
+
if (overRate && parsed.kind === MessageKind.EVENT) {
|
|
274
|
+
const withinReserve = isHighValueEvent(parsed.event.type) && highValueInWindow < highValueReserve;
|
|
275
|
+
if (withinReserve) {
|
|
276
|
+
highValueInWindow += 1;
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
droppedByRate += 1;
|
|
280
|
+
if (session !== undefined)
|
|
281
|
+
session.noteRateLimited(droppedByRate);
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
221
285
|
if (parsed.kind === MessageKind.HELLO) {
|
|
222
286
|
if (session !== undefined) {
|
|
223
|
-
socket
|
|
287
|
+
// A repeat hello on the SAME socket for the SAME session is an identity refresh, not a
|
|
288
|
+
// violation: the SDK re-announces when the app registers capabilities, which happens after
|
|
289
|
+
// connect by design. Closing the socket on it made `hasCapabilities` permanently false for
|
|
290
|
+
// every app that declared anything. A hello bearing a DIFFERENT session id is still a
|
|
291
|
+
// protocol violation — that is the case this guard exists for.
|
|
292
|
+
if (parsed.sessionId !== session.id) {
|
|
293
|
+
socket.close(...WS_CLOSE.HELLO_DUPLICATE);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
refreshIdentity(session, parsed);
|
|
224
297
|
return;
|
|
225
298
|
}
|
|
226
299
|
if (this.#token !== undefined && !tokensMatch(this.#token, parsed.token)) {
|
|
@@ -288,7 +361,25 @@ export class Bridge {
|
|
|
288
361
|
return false;
|
|
289
362
|
if (this.#allowedOrigins.has(normalized))
|
|
290
363
|
return true;
|
|
291
|
-
|
|
364
|
+
// A desktop webview (Electron, Tauri) or a file:// document sends an opaque Origin: no host to
|
|
365
|
+
// check, so it is exactly as attributable as a missing Origin — defer to the token, as above.
|
|
366
|
+
// Without this branch `new URL` throws INSIDE the WS upgrade handler, crashing the process.
|
|
367
|
+
if (isOpaqueOrigin(normalized))
|
|
368
|
+
return this.#token !== undefined;
|
|
369
|
+
// `isLocalPage`, not `isLoopbackHostname` — the SAME rule the SDK applies on the page side.
|
|
370
|
+
//
|
|
371
|
+
// They had drifted, and the drift made a whole platform unreachable. Tauri v2 uses an opaque
|
|
372
|
+
// `tauri://localhost` on macOS/Linux, but on WINDOWS the webview needs a real http origin and
|
|
373
|
+
// Tauri serves `http://tauri.localhost`. `isLocalPage` was taught that hostname; this check was
|
|
374
|
+
// not. So a Windows Tauri app passed its own gate, dialed the bridge, and every handshake came
|
|
375
|
+
// back 403 — Reticle could not connect to a Tauri app on Windows at all, which is precisely the
|
|
376
|
+
// platform the release notes admitted had never been executed.
|
|
377
|
+
//
|
|
378
|
+
// No weaker than before: `.localhost` is reserved for loopback by RFC 6761, so the name cannot
|
|
379
|
+
// resolve to a remote host, and this is the argument core already made when it accepted the same
|
|
380
|
+
// hostname for the page.
|
|
381
|
+
const url = new URL(normalized);
|
|
382
|
+
return isLocalPage(url.protocol, url.hostname);
|
|
292
383
|
}
|
|
293
384
|
#parse(text) {
|
|
294
385
|
let json;
|
|
@@ -334,4 +425,3 @@ export class Bridge {
|
|
|
334
425
|
});
|
|
335
426
|
}
|
|
336
427
|
}
|
|
337
|
-
//# sourceMappingURL=bridge.js.map
|
|
@@ -37,6 +37,11 @@ export declare class FakeBrowser {
|
|
|
37
37
|
}[];
|
|
38
38
|
constructor(port: number, sessionId: string, hasCapabilities?: boolean);
|
|
39
39
|
open(): Promise<void>;
|
|
40
|
+
/** Re-send the HELLO on the live socket, the way the SDK does when capabilities register late. */
|
|
41
|
+
reannounce(overrides?: {
|
|
42
|
+
sessionId?: string;
|
|
43
|
+
hasCapabilities?: boolean;
|
|
44
|
+
}): void;
|
|
40
45
|
emit(type: string, data: Record<string, unknown>, ref?: string): void;
|
|
41
46
|
close(): void;
|
|
42
47
|
}
|
|
@@ -44,4 +49,3 @@ export declare function waitUntil(cond: () => boolean, timeoutMs?: number): Prom
|
|
|
44
49
|
export declare const callTool: (deps: ToolDeps, name: string, args?: Record<string, unknown>) => Promise<unknown>;
|
|
45
50
|
/** Builds the ToolDeps wired to a running bridge, with a frozen clock for deterministic tests. */
|
|
46
51
|
export declare function makeDeps(bridge: Bridge): ToolDeps;
|
|
47
|
-
//# sourceMappingURL=bridge.test-harness.d.ts.map
|
|
@@ -59,6 +59,18 @@ export class FakeBrowser {
|
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
+
/** Re-send the HELLO on the live socket, the way the SDK does when capabilities register late. */
|
|
63
|
+
reannounce(overrides = {}) {
|
|
64
|
+
this.#send({
|
|
65
|
+
kind: MessageKind.HELLO,
|
|
66
|
+
protocolVersion: 1,
|
|
67
|
+
sessionId: overrides.sessionId ?? this.sessionId,
|
|
68
|
+
url: 'http://localhost:3000/checkout',
|
|
69
|
+
title: 'Checkout',
|
|
70
|
+
adapters: [],
|
|
71
|
+
hasCapabilities: overrides.hasCapabilities ?? this.hasCapabilities,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
62
74
|
emit(type, data, ref) {
|
|
63
75
|
this.#send({
|
|
64
76
|
kind: MessageKind.EVENT,
|
|
@@ -193,4 +205,3 @@ export function makeDeps(bridge) {
|
|
|
193
205
|
now: () => 0,
|
|
194
206
|
};
|
|
195
207
|
}
|
|
196
|
-
//# sourceMappingURL=bridge.test-harness.js.map
|
|
@@ -25,19 +25,19 @@ export declare const CapsuleSchema: z.ZodObject<{
|
|
|
25
25
|
/** Minimal steps to reproduce (prefix-trimmed). */
|
|
26
26
|
steps: z.ZodArray<z.ZodType<FlowStep, z.ZodTypeDef, FlowStep>, "many">;
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
origin: string;
|
|
28
29
|
version: 1;
|
|
29
30
|
id: string;
|
|
30
31
|
expected: string;
|
|
31
|
-
origin: string;
|
|
32
32
|
steps: FlowStep[];
|
|
33
33
|
observed: string;
|
|
34
34
|
createdAt: number;
|
|
35
35
|
flow?: string | undefined;
|
|
36
36
|
}, {
|
|
37
|
+
origin: string;
|
|
37
38
|
version: 1;
|
|
38
39
|
id: string;
|
|
39
40
|
expected: string;
|
|
40
|
-
origin: string;
|
|
41
41
|
steps: FlowStep[];
|
|
42
42
|
observed: string;
|
|
43
43
|
createdAt: number;
|
|
@@ -63,4 +63,3 @@ export declare class CapsuleStore {
|
|
|
63
63
|
export declare function capsuleId(now: number, label: string): string;
|
|
64
64
|
/** The minimal reproduction: the steps up to and including the one that failed (prefix trim). */
|
|
65
65
|
export declare function minimalSteps(steps: readonly FlowStep[], failedIndex: number): FlowStep[];
|
|
66
|
-
//# sourceMappingURL=capsule-store.d.ts.map
|
|
@@ -16,4 +16,3 @@ export interface DivergenceCapsule {
|
|
|
16
16
|
}
|
|
17
17
|
/** Compose the full capsule from the declared chain and the observed (attributed) event window. */
|
|
18
18
|
export declare function buildDivergenceCapsule(expected: readonly ExpectedLink[], observed: readonly ReticleEvent[]): DivergenceCapsule;
|
|
19
|
-
//# sourceMappingURL=capsule.d.ts.map
|
package/dist/capsule/capsule.js
CHANGED
|
@@ -8,6 +8,17 @@ export interface StateDiff {
|
|
|
8
8
|
path: string;
|
|
9
9
|
from: unknown;
|
|
10
10
|
to: unknown;
|
|
11
|
+
/**
|
|
12
|
+
* WHEN this path moved, in the session's elapsed ms.
|
|
13
|
+
*
|
|
14
|
+
* The whole reason a transient was invisible. A store that ends internally consistent can have been
|
|
15
|
+
* inconsistent on the way there, and a from→to pair cannot express that — measured on a real
|
|
16
|
+
* merchant dashboard, an account switch moved `accountId` immediately and `payments` 160 ms later,
|
|
17
|
+
* so for 160 ms the header named one tenant while the rows belonged to another. Both diffs were
|
|
18
|
+
* reported; nothing said they were 160 ms apart, and waiting for the page to settle is by
|
|
19
|
+
* construction waiting for the evidence to disappear. The timestamp was on the event all along.
|
|
20
|
+
*/
|
|
21
|
+
atMs: number;
|
|
11
22
|
}
|
|
12
23
|
export interface StorageDiff {
|
|
13
24
|
key: string;
|
|
@@ -25,6 +36,16 @@ export interface CausalSummary {
|
|
|
25
36
|
storageKeysChanged: string[];
|
|
26
37
|
/** Before→after for each changed store path — the diffs, not just the names. Values capped. */
|
|
27
38
|
stateDiffs: StateDiff[];
|
|
39
|
+
/**
|
|
40
|
+
* How long the store took to stop moving: last state change − first, in ms. Present only when more
|
|
41
|
+
* than one path changed, because with a single change there is no interval to describe.
|
|
42
|
+
*
|
|
43
|
+
* A FACT, not a verdict. Many apps update progressively and that is fine; calling every stagger a
|
|
44
|
+
* defect would make this a noise generator. But a non-zero value is the exact window in which the
|
|
45
|
+
* UI showed a MIXTURE of old and new, and that window is where the tenant-mismatch class of bug
|
|
46
|
+
* lives — so it is stated once, cheaply, and the agent decides.
|
|
47
|
+
*/
|
|
48
|
+
stateSettleMs?: number;
|
|
28
49
|
/** Before→after for each changed storage key. Values capped. */
|
|
29
50
|
storageDiffs: StorageDiff[];
|
|
30
51
|
route?: string;
|
|
@@ -33,4 +54,3 @@ export interface CausalSummary {
|
|
|
33
54
|
longTasks: number;
|
|
34
55
|
}
|
|
35
56
|
export declare function causalSummary(events: readonly ReticleEvent[]): CausalSummary;
|
|
36
|
-
//# sourceMappingURL=causal-summary.d.ts.map
|
|
@@ -24,6 +24,19 @@ function capValue(value) {
|
|
|
24
24
|
return '[unserializable]';
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The span over which the store was still moving — and therefore possibly self-inconsistent.
|
|
29
|
+
*
|
|
30
|
+
* Omitted for 0 or 1 diffs (no interval) and for a spread of 0 (everything landed in one tick), so a
|
|
31
|
+
* store that updates atomically pays nothing and the field's PRESENCE is what carries the meaning.
|
|
32
|
+
*/
|
|
33
|
+
function stateSettle(diffs) {
|
|
34
|
+
if (diffs.length < 2)
|
|
35
|
+
return {};
|
|
36
|
+
const times = diffs.map((d) => d.atMs);
|
|
37
|
+
const spread = Math.max(...times) - Math.min(...times);
|
|
38
|
+
return spread > 0 ? { stateSettleMs: spread } : {};
|
|
39
|
+
}
|
|
27
40
|
export function causalSummary(events) {
|
|
28
41
|
let netTotal = 0;
|
|
29
42
|
let netErrors = 0;
|
|
@@ -64,7 +77,12 @@ export function causalSummary(events) {
|
|
|
64
77
|
const hasAfter = 'value' in data || 'new' in data;
|
|
65
78
|
if (typeof path === 'string' && path.length > 0 && ('old' in data || hasAfter)) {
|
|
66
79
|
const after = 'value' in data ? data['value'] : data['new'];
|
|
67
|
-
stateDiffs.push({
|
|
80
|
+
stateDiffs.push({
|
|
81
|
+
path,
|
|
82
|
+
from: capValue(data['old']),
|
|
83
|
+
to: capValue(after),
|
|
84
|
+
atMs: event.t,
|
|
85
|
+
});
|
|
68
86
|
}
|
|
69
87
|
break;
|
|
70
88
|
}
|
|
@@ -101,6 +119,7 @@ export function causalSummary(events) {
|
|
|
101
119
|
statePathsChanged,
|
|
102
120
|
storageKeysChanged,
|
|
103
121
|
stateDiffs,
|
|
122
|
+
...stateSettle(stateDiffs),
|
|
104
123
|
storageDiffs,
|
|
105
124
|
...(route === undefined ? {} : { route }),
|
|
106
125
|
signals,
|
|
@@ -108,4 +127,3 @@ export function causalSummary(events) {
|
|
|
108
127
|
longTasks,
|
|
109
128
|
};
|
|
110
129
|
}
|
|
111
|
-
//# sourceMappingURL=causal-summary.js.map
|
|
@@ -28,4 +28,3 @@ export interface Divergence {
|
|
|
28
28
|
* side-by-side of what happened instead), or null when the whole chain held.
|
|
29
29
|
*/
|
|
30
30
|
export declare function firstDivergence(expected: readonly ExpectedLink[], observed: readonly ReticleEvent[]): Divergence | null;
|
|
31
|
-
//# sourceMappingURL=divergence.d.ts.map
|
|
@@ -10,4 +10,3 @@
|
|
|
10
10
|
* `stillFails` holds. Never trims below one step. Deterministic given a deterministic predicate.
|
|
11
11
|
*/
|
|
12
12
|
export declare function prefixTrim<T>(steps: readonly T[], stillFails: (candidate: readonly T[]) => Promise<boolean>): Promise<T[]>;
|
|
13
|
-
//# sourceMappingURL=minimize.d.ts.map
|
package/dist/capsule/minimize.js
CHANGED
|
@@ -6,4 +6,3 @@ import type { ExpectedLink } from './divergence.js';
|
|
|
6
6
|
* dataflow sense. allOf/anyOf flatten in order; other kinds are skipped. Pure; feeds the capsule on red.
|
|
7
7
|
*/
|
|
8
8
|
export declare function predicateToExpectedLinks(predicate: Predicate): ExpectedLink[];
|
|
9
|
-
//# sourceMappingURL=predicate-to-links.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `reticle doctor` — collapse the ~6 independent first-run failure modes into one command. Checks the
|
|
3
|
+
* Chromium install (the #1 silent failure), whether a daemon is up on the resolved bridge port, and
|
|
4
|
+
* reminds the user which port the app must dial. Human-readable to stdout (not the JSON log).
|
|
5
|
+
*/
|
|
6
|
+
export declare function handleDoctor(port: number): Promise<void>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { readPid, isAlive } from './daemon.js';
|
|
4
|
+
import { diagnoseDesktop, isDesktopProject } from './init/desktop-doctor.js';
|
|
5
|
+
/**
|
|
6
|
+
* `reticle doctor` — collapse the ~6 independent first-run failure modes into one command. Checks the
|
|
7
|
+
* Chromium install (the #1 silent failure), whether a daemon is up on the resolved bridge port, and
|
|
8
|
+
* reminds the user which port the app must dial. Human-readable to stdout (not the JSON log).
|
|
9
|
+
*/
|
|
10
|
+
export async function handleDoctor(port) {
|
|
11
|
+
const line = (s) => {
|
|
12
|
+
process.stdout.write(`${s}\n`);
|
|
13
|
+
};
|
|
14
|
+
line('reticle doctor');
|
|
15
|
+
line(` node ${process.version}`);
|
|
16
|
+
try {
|
|
17
|
+
const { chromium } = await import('playwright');
|
|
18
|
+
const path = chromium.executablePath();
|
|
19
|
+
line(existsSync(path)
|
|
20
|
+
? ' chromium ✓ installed'
|
|
21
|
+
: ' chromium ✗ missing — run: npx playwright install chromium');
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
line(' chromium ✗ missing — run: npx playwright install chromium');
|
|
25
|
+
}
|
|
26
|
+
const pid = readPid(port);
|
|
27
|
+
if (pid !== null && isAlive(pid)) {
|
|
28
|
+
line(` daemon ✓ running on :${port} (pid ${pid})`);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
line(` daemon ✗ not running on :${port} — your agent runs \`reticle mcp\` (or \`reticle serve\`)`);
|
|
32
|
+
}
|
|
33
|
+
line(` bridge port ${port} (your app must dial THIS port — not your dev-server port)`);
|
|
34
|
+
// Desktop setup RCA. Every one of these fails SILENTLY — a Tauri app with the default CSP runs
|
|
35
|
+
// perfectly and never connects; an Electron app without the preload line reports zero network
|
|
36
|
+
// activity forever, which reads as "makes no backend calls" rather than "you are blind to them".
|
|
37
|
+
const readProjectFile = (relative) => {
|
|
38
|
+
try {
|
|
39
|
+
return readFileSync(join(process.cwd(), relative), 'utf8');
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const desktop = diagnoseDesktop(readProjectFile, port);
|
|
46
|
+
if (desktop.length > 0) {
|
|
47
|
+
line('');
|
|
48
|
+
line(` desktop ✗ ${String(desktop.length)} issue(s) — the app will look fine and not work:`);
|
|
49
|
+
for (const finding of desktop) {
|
|
50
|
+
line(` ${finding.file}`);
|
|
51
|
+
line(` ${finding.problem}`);
|
|
52
|
+
line(` fix: ${finding.fix}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else if (isDesktopProject(readProjectFile)) {
|
|
56
|
+
// Say so explicitly. Silence would read as "not checked", which is the same ambiguity the
|
|
57
|
+
// findings above exist to remove.
|
|
58
|
+
line(' desktop ✓ desktop wiring looks right');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -28,4 +28,3 @@ export declare function handleCapsules(): Promise<void>;
|
|
|
28
28
|
* that makes verification unavoidable. Never throws; a fault fails closed (exit 1).
|
|
29
29
|
*/
|
|
30
30
|
export declare function handleGate(files: string[], since: string | undefined): Promise<void>;
|
|
31
|
-
//# sourceMappingURL=cli-flow-commands.d.ts.map
|
package/dist/cli-launch.d.ts
CHANGED
|
@@ -50,4 +50,3 @@ export declare function openCommand(url: string, platform: NodeJS.Platform): {
|
|
|
50
50
|
/** Launch the default browser at `url` (detached). The spawn is injected so tests stay hermetic. */
|
|
51
51
|
export declare function openInBrowser(url: string, platform?: NodeJS.Platform, run?: (cmd: string, args: string[]) => void): void;
|
|
52
52
|
export {};
|
|
53
|
-
//# sourceMappingURL=cli-launch.d.ts.map
|
package/dist/cli-launch.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as http from 'node:http';
|
|
2
2
|
import { spawn } from 'node:child_process';
|
|
3
|
-
import { LOOPBACK_HOST, STATUS_PATH } from '@reticlehq/core';
|
|
3
|
+
import { isOpaqueOrigin, LOOPBACK_HOST, STATUS_PATH } from '@reticlehq/core';
|
|
4
4
|
/**
|
|
5
5
|
* Reduce the daemon's /status JSON to the compact view `reticle status` prints. Pure: narrows the
|
|
6
6
|
* untrusted wire payload (never `any`) and tolerates a missing/partial body so a malformed response
|
|
@@ -58,7 +58,12 @@ export function fetchStatus(port) {
|
|
|
58
58
|
}
|
|
59
59
|
function sameOrigin(a, b) {
|
|
60
60
|
try {
|
|
61
|
-
|
|
61
|
+
const origin = new URL(a).origin;
|
|
62
|
+
// Two opaque origins (desktop webviews, file:// docs) BOTH stringify to "null", so comparing them
|
|
63
|
+
// would call every desktop app the same app and reuse the wrong session. Never match on opaque.
|
|
64
|
+
if (isOpaqueOrigin(origin))
|
|
65
|
+
return false;
|
|
66
|
+
return origin === new URL(b).origin;
|
|
62
67
|
}
|
|
63
68
|
catch {
|
|
64
69
|
return false;
|
|
@@ -105,4 +110,3 @@ function defaultRun(cmd, args) {
|
|
|
105
110
|
const child = spawn(cmd, args, { detached: true, stdio: 'ignore' });
|
|
106
111
|
child.unref();
|
|
107
112
|
}
|
|
108
|
-
//# sourceMappingURL=cli-launch.js.map
|
package/dist/cli-parse.d.ts
CHANGED
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
* file-size cap and keep the parser pure + unit-testable. Re-exported from cli.ts so existing
|
|
5
5
|
* imports are unchanged.
|
|
6
6
|
*/
|
|
7
|
-
export declare const CLI_USAGE = "usage:\n reticle init [--dry-run] [--port N] [--no-mcp] [--no-install] (wire Reticle into the project in this directory)\n reticle serve [--port N] [--drive <url>] [--
|
|
7
|
+
export declare const CLI_USAGE = "usage:\n reticle init [--dry-run] [--port N] [--no-mcp] [--no-install] (wire Reticle into the project in this directory)\n reticle serve [--port N] [--drive <url>] [--headless] [--http] [--http-port N] [--http-token T]\n reticle stop [--port N] [--quiet]\n reticle status [--port N]\n reticle doctor [--port N] (diagnose setup: Chromium, daemon, port \u2014 one command)\n reticle open [url] [--port N] (show the app: reuse the connected tab, else open one)\n reticle verify <url> [--headed] [--timeout N] [--storage-state <file>] (one-shot: drive the URL, verify saved flows, exit 0=pass)\n reticle affected [--since <ref>] [file...] (which saved flows must re-verify for the changed files)\n reticle gate [--since <ref>] [file...] (exit non-zero unless passing artifacts cover the affected flows)\n reticle watch [url] (on save, report which saved flows must re-verify)\n reticle drive <url> [--headless] (foreground mode \u2014 for debugging)\n reticle mcp [--port N] [--drive <url>] [--headless] (MCP stdio proxy \u2014 auto-starts daemon if needed)\n reticle update (install the latest server version and restart)\n reticle rollback (restore the previous server version and restart)\n reticle license (show enterprise license status: active | eval | missing)\n reticle telemetry [status|enable|disable] (anonymous usage metrics \u2014 status shows what's sent + the policy)\n reticle feedback [--rating 1-5] [--bug] \"message\" (tell us what worked and what didn't \u2014 prints exactly what it sends)\n reticle identify --context company|side_project|open_source|learning [--company N] [--email E] [--forget]\n (OPT-IN: tell us who you are, e.g. for support or an enterprise trial)\n\nCloud (link this project to Reticle Cloud \u2014 runs/flows recorded on the dashboard):\n reticle login --email <e> [--code <c>] [--org <n>] (sign in: mails a code, then exchanges it)\n reticle link [--project <name|id>] (bind this repo: mints a scoped key, writes .reticle/cloud.json)\n reticle whoami (who am I signed in as, and is this repo attached?)\n reticle project <ls|create <name>> (list or create cloud projects)\n reticle config [--runs on|off] [--memory on|off] [--flows on|off] [--verify local|server]\n reticle push (send local run artifacts to the dashboard)\n reticle runs | regression | share <runId> (read cloud state; regression exits 3 if any flow broke)\n\n'drive' shows the browser; everything else is hidden (serve/mcp own the pool behind leases, replay\nand the spec runner \u2014 batch work). --headed opts any of them in, --headless hides drive, CI hides it.";
|
|
8
|
+
export declare const COMPANY_FLAG = "--company";
|
|
9
|
+
export declare const EMAIL_FLAG = "--email";
|
|
10
|
+
export declare const CONTEXT_FLAG = "--context";
|
|
11
|
+
export declare const FORGET_FLAG = "--forget";
|
|
12
|
+
/** `reticle feedback --rating 4 "the words"` — the human half of the channel. */
|
|
13
|
+
export declare const RATING_FLAG = "--rating";
|
|
14
|
+
export declare const BUG_FLAG = "--bug";
|
|
8
15
|
/** The `reticle telemetry` sub-actions. Bare `reticle telemetry` means `status`. */
|
|
9
16
|
export declare const TelemetryAction: {
|
|
10
17
|
readonly STATUS: "status";
|
|
@@ -13,7 +20,25 @@ export declare const TelemetryAction: {
|
|
|
13
20
|
};
|
|
14
21
|
export type TelemetryAction = (typeof TelemetryAction)[keyof typeof TelemetryAction];
|
|
15
22
|
export declare const DAEMON_INNER_COMMAND = "_daemon";
|
|
23
|
+
/**
|
|
24
|
+
* Every subcommand a person can type, as one closed vocabulary. Telemetry reports which one ran, and
|
|
25
|
+
* this is what keeps that property low-cardinality and non-identifying: an argument we do not
|
|
26
|
+
* recognize reports as `unknown` rather than being echoed, so a typo — which may be a path, a URL, or
|
|
27
|
+
* a flow name — can never reach the wire just because someone misspelled `status`.
|
|
28
|
+
*
|
|
29
|
+
* Lives here rather than in the telemetry module because this is where the command names are already
|
|
30
|
+
* defined; a second list somewhere else would drift the first time a command is added.
|
|
31
|
+
*/
|
|
32
|
+
export declare const UNKNOWN_COMMAND = "unknown";
|
|
33
|
+
/** The subcommand name if we recognize it, else `unknown`. Bare `reticle` reports `help`. */
|
|
34
|
+
export declare function knownCommand(arg: string | undefined): string;
|
|
16
35
|
export declare const HEADED_FLAG = "--headed";
|
|
36
|
+
/**
|
|
37
|
+
* Force a hidden browser. The default is now HEADED: a run nobody can see is a run nobody trusts,
|
|
38
|
+
* and every "did it actually do anything?" question cost a round-trip. CI passes this (or just sets
|
|
39
|
+
* CI, which flips the default) because there is no display there to be headed on.
|
|
40
|
+
*/
|
|
41
|
+
export declare const HEADLESS_FLAG = "--headless";
|
|
17
42
|
export declare const PORT_FLAG = "--port";
|
|
18
43
|
export declare const DRIVE_FLAG = "--drive";
|
|
19
44
|
export declare const HTTP_FLAG = "--http";
|
|
@@ -45,6 +70,17 @@ export type CliResult = {
|
|
|
45
70
|
} | {
|
|
46
71
|
kind: 'telemetry';
|
|
47
72
|
action: TelemetryAction;
|
|
73
|
+
} | {
|
|
74
|
+
kind: 'feedback';
|
|
75
|
+
text: string;
|
|
76
|
+
rating?: number;
|
|
77
|
+
bug: boolean;
|
|
78
|
+
} | {
|
|
79
|
+
kind: 'identify';
|
|
80
|
+
context?: string;
|
|
81
|
+
company?: string;
|
|
82
|
+
email?: string;
|
|
83
|
+
forget: boolean;
|
|
48
84
|
} | {
|
|
49
85
|
kind: 'version';
|
|
50
86
|
} | {
|
|
@@ -79,6 +115,9 @@ export type CliResult = {
|
|
|
79
115
|
kind: 'affected';
|
|
80
116
|
files: string[];
|
|
81
117
|
since?: string;
|
|
118
|
+
} | {
|
|
119
|
+
kind: 'hunt';
|
|
120
|
+
dir: string;
|
|
82
121
|
} | {
|
|
83
122
|
kind: 'capsules';
|
|
84
123
|
} | {
|
|
@@ -104,5 +143,10 @@ export type CliResult = {
|
|
|
104
143
|
kind: 'error';
|
|
105
144
|
message: string;
|
|
106
145
|
};
|
|
107
|
-
|
|
108
|
-
|
|
146
|
+
/**
|
|
147
|
+
* @param defaultHeadless Whether a browser Reticle launches should be hidden when no flag says
|
|
148
|
+
* otherwise. Injected rather than read from the environment here, because this module is pure —
|
|
149
|
+
* `cli.ts` decides it from `CI`. The product default is FALSE: showing the run is what makes it
|
|
150
|
+
* trustworthy, and asking people to opt into seeing their own app was backwards.
|
|
151
|
+
*/
|
|
152
|
+
export declare function parseCliArgs(argv: string[], defaultPort: number, defaultHeadless?: boolean): CliResult;
|