@reticlehq/server 2.2.0 → 2.3.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 +60 -10
- package/dist/bridge.test-harness.d.ts +0 -1
- package/dist/bridge.test-harness.js +0 -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 +52 -2
- package/dist/cli-parse.js +147 -3
- package/dist/cli-port.d.ts +0 -1
- package/dist/cli-port.js +0 -1
- package/dist/cli-verify.d.ts +2 -1
- package/dist/cli-verify.js +24 -3
- package/dist/cli.d.ts +2 -4
- package/dist/cli.js +109 -10
- package/dist/cloud/cloud-config.d.ts +36 -0
- package/dist/cloud/cloud-config.js +86 -0
- package/dist/cloud/cloud-sync.d.ts +96 -4
- package/dist/cloud/cloud-sync.js +131 -3
- package/dist/cloud-cli.d.ts +3 -0
- package/dist/cloud-cli.js +514 -0
- 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 +78 -21
- 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 -1
- package/dist/flows/decision.js +0 -1
- 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 +24 -8
- 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 +54 -16
- 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 +15 -0
- package/dist/flows/server-verify.js +42 -0
- 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/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 +0 -1
- package/dist/init/detect.js +0 -1
- package/dist/init/mcp.d.ts +0 -1
- package/dist/init/mcp.js +0 -1
- package/dist/init/node-io.d.ts +0 -1
- package/dist/init/node-io.js +0 -1
- package/dist/init/plan.d.ts +4 -1
- package/dist/init/plan.js +23 -5
- package/dist/init/project-id.d.ts +0 -1
- package/dist/init/project-id.js +0 -1
- package/dist/init/run.d.ts +0 -1
- package/dist/init/run.js +31 -3
- package/dist/init/snippets.d.ts +5 -1
- package/dist/init/snippets.js +5 -1
- package/dist/init/vite-config.d.ts +0 -1
- package/dist/init/vite-config.js +0 -1
- package/dist/input/network-detail.d.ts +0 -1
- package/dist/input/network-detail.js +0 -1
- 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 +0 -1
- package/dist/mcp-proxy.js +0 -1
- 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 +2 -1
- package/dist/pool/playwright-launcher.js +22 -2
- package/dist/project/baselines.d.ts +0 -1
- package/dist/project/baselines.js +5 -4
- 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 +20 -9
- package/dist/project/project-tools.d.ts +0 -1
- package/dist/project/project-tools.js +57 -9
- 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 +23 -0
- package/dist/runs/verification-sync.js +66 -0
- 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 +29 -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 +27 -53
- package/dist/session/session.js +95 -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 +68 -0
- package/dist/telemetry/telemetry.js +313 -0
- 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 +116 -2
- 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 +10 -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 +26 -2
- 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-sync.d.ts.map +0 -1
- package/dist/cloud/cloud-sync.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/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/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/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
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ProjectSize, type ProjectProfile } from '@reticlehq/core';
|
|
2
|
+
/**
|
|
3
|
+
* The feature FAMILIES, and the on-disk evidence that a project has adopted each. Named rather than
|
|
4
|
+
* counted so the vocabulary stays stable as tools are added, renamed, or merged into action-dispatched
|
|
5
|
+
* families — a count would silently change meaning the next time the tool surface is reorganized.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FeatureFamily: {
|
|
8
|
+
readonly DETERMINISTIC_REPLAY: "deterministic_replay";
|
|
9
|
+
readonly VISUAL_BASELINE: "visual_baseline";
|
|
10
|
+
readonly TEXT_BASELINE: "text_baseline";
|
|
11
|
+
readonly CAPABILITY_CONTRACT: "capability_contract";
|
|
12
|
+
readonly RUN_ARTIFACTS: "run_artifacts";
|
|
13
|
+
readonly BUG_CAPSULES: "bug_capsules";
|
|
14
|
+
readonly CROSS_RUN_HISTORY: "cross_run_history";
|
|
15
|
+
};
|
|
16
|
+
export type FeatureFamily = (typeof FeatureFamily)[keyof typeof FeatureFamily];
|
|
17
|
+
/** Count source files, stopping at the cap (the cap itself lands in the largest bucket, correctly). */
|
|
18
|
+
export declare function countSourceFiles(root: string, readDir?: DirReader): number;
|
|
19
|
+
export declare function sizeBucket(sourceFiles: number): ProjectSize;
|
|
20
|
+
/**
|
|
21
|
+
* Project age in whole WEEKS, from the repo's first commit.
|
|
22
|
+
*
|
|
23
|
+
* Weeks rather than a date, deliberately: an exact creation timestamp combined with a framework and a
|
|
24
|
+
* size bucket starts to narrow toward a specific repository, and the question being asked — "is
|
|
25
|
+
* Reticle being adopted on greenfield spikes or on mature codebases?" — does not need that precision.
|
|
26
|
+
*
|
|
27
|
+
* Read from git's own reflog tail rather than by shelling out, for the same reason the origin lookup
|
|
28
|
+
* does: this runs on a startup path and must not cost a subprocess or require a `git` binary.
|
|
29
|
+
*/
|
|
30
|
+
export declare function projectAgeWeeks(root: string, now: number, read?: FileReader): number | undefined;
|
|
31
|
+
/** True when package.json declares workspaces — monorepos exercise very different code paths. */
|
|
32
|
+
export declare function isMonorepo(root: string, read?: FileReader): boolean;
|
|
33
|
+
interface DirEntry {
|
|
34
|
+
name: string;
|
|
35
|
+
isDirectory: boolean;
|
|
36
|
+
}
|
|
37
|
+
type DirReader = (dir: string) => DirEntry[];
|
|
38
|
+
type FileReader = (path: string) => string;
|
|
39
|
+
/**
|
|
40
|
+
* Build the full profile. Best-effort throughout: an unreadable project yields a profile of zeroes
|
|
41
|
+
* rather than an exception, because a telemetry snapshot must never be able to fail a daemon start.
|
|
42
|
+
*/
|
|
43
|
+
export declare function profileProject(cwd: string, now: number): ProjectProfile;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What kind of project is this, and how much of Reticle does it actually use?
|
|
3
|
+
*
|
|
4
|
+
* A DAU chart cannot tell apart someone running forty saved flows with visual baselines and a
|
|
5
|
+
* checked-in contract from someone who called `reticle_snapshot` twice and never came back. Both are
|
|
6
|
+
* one active user. Only one of them is retained, and only one of them is a company. `featureDepth`
|
|
7
|
+
* is the number that separates them, and it is the closest thing here to an activation metric.
|
|
8
|
+
*
|
|
9
|
+
* Everything is derived from files already on disk in the project, and everything is reduced before
|
|
10
|
+
* it leaves: sizes become buckets, ages become whole weeks, feature use becomes a fixed vocabulary of
|
|
11
|
+
* family names we define ourselves. No file names, no paths, no flow names, no dependency inventory.
|
|
12
|
+
*/
|
|
13
|
+
import { readdirSync, readFileSync, statSync } from 'node:fs';
|
|
14
|
+
import { join } from 'node:path';
|
|
15
|
+
import { ProjectSize, ReticleDir } from '@reticlehq/core';
|
|
16
|
+
import { gitFacts } from './git-facts.js';
|
|
17
|
+
import { detectStack } from './feedback-context.js';
|
|
18
|
+
/**
|
|
19
|
+
* The feature FAMILIES, and the on-disk evidence that a project has adopted each. Named rather than
|
|
20
|
+
* counted so the vocabulary stays stable as tools are added, renamed, or merged into action-dispatched
|
|
21
|
+
* families — a count would silently change meaning the next time the tool surface is reorganized.
|
|
22
|
+
*/
|
|
23
|
+
export const FeatureFamily = {
|
|
24
|
+
DETERMINISTIC_REPLAY: 'deterministic_replay',
|
|
25
|
+
VISUAL_BASELINE: 'visual_baseline',
|
|
26
|
+
TEXT_BASELINE: 'text_baseline',
|
|
27
|
+
CAPABILITY_CONTRACT: 'capability_contract',
|
|
28
|
+
RUN_ARTIFACTS: 'run_artifacts',
|
|
29
|
+
BUG_CAPSULES: 'bug_capsules',
|
|
30
|
+
CROSS_RUN_HISTORY: 'cross_run_history',
|
|
31
|
+
};
|
|
32
|
+
const ALL_FAMILIES = Object.values(FeatureFamily);
|
|
33
|
+
/** Source-file thresholds for each bucket. A bucket answers "toy or real codebase"; a count fingerprints. */
|
|
34
|
+
const SIZE_THRESHOLDS = [
|
|
35
|
+
[50, ProjectSize.TINY],
|
|
36
|
+
[250, ProjectSize.SMALL],
|
|
37
|
+
[1000, ProjectSize.MEDIUM],
|
|
38
|
+
[5000, ProjectSize.LARGE],
|
|
39
|
+
];
|
|
40
|
+
const SOURCE_EXTENSIONS = /\.(?:tsx?|jsx?|mjs|cjs|vue|svelte|astro)$/;
|
|
41
|
+
/** Never walked: cost, and nothing in them describes the project the team actually wrote. */
|
|
42
|
+
const SKIP_DIRS = new Set(['node_modules', '.git', 'dist', 'build', '.next', '.turbo', 'coverage']);
|
|
43
|
+
/** Bound the walk — a huge monorepo must not turn a telemetry snapshot into a filesystem crawl. */
|
|
44
|
+
const MAX_FILES_SCANNED = 6000;
|
|
45
|
+
const MAX_WALK_DEPTH = 8;
|
|
46
|
+
const MS_PER_WEEK = 7 * 24 * 60 * 60 * 1000;
|
|
47
|
+
/** Count source files, stopping at the cap (the cap itself lands in the largest bucket, correctly). */
|
|
48
|
+
export function countSourceFiles(root, readDir = defaultReadDir) {
|
|
49
|
+
let count = 0;
|
|
50
|
+
const walk = (dir, depth) => {
|
|
51
|
+
if (depth > MAX_WALK_DEPTH || count >= MAX_FILES_SCANNED)
|
|
52
|
+
return;
|
|
53
|
+
for (const entry of readDir(dir)) {
|
|
54
|
+
if (count >= MAX_FILES_SCANNED)
|
|
55
|
+
return;
|
|
56
|
+
if (entry.isDirectory) {
|
|
57
|
+
if (!SKIP_DIRS.has(entry.name) && !entry.name.startsWith('.')) {
|
|
58
|
+
walk(join(dir, entry.name), depth + 1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else if (SOURCE_EXTENSIONS.test(entry.name)) {
|
|
62
|
+
count += 1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
walk(root, 0);
|
|
67
|
+
return count;
|
|
68
|
+
}
|
|
69
|
+
export function sizeBucket(sourceFiles) {
|
|
70
|
+
for (const [threshold, bucket] of SIZE_THRESHOLDS) {
|
|
71
|
+
if (sourceFiles < threshold)
|
|
72
|
+
return bucket;
|
|
73
|
+
}
|
|
74
|
+
return ProjectSize.HUGE;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Project age in whole WEEKS, from the repo's first commit.
|
|
78
|
+
*
|
|
79
|
+
* Weeks rather than a date, deliberately: an exact creation timestamp combined with a framework and a
|
|
80
|
+
* size bucket starts to narrow toward a specific repository, and the question being asked — "is
|
|
81
|
+
* Reticle being adopted on greenfield spikes or on mature codebases?" — does not need that precision.
|
|
82
|
+
*
|
|
83
|
+
* Read from git's own reflog tail rather than by shelling out, for the same reason the origin lookup
|
|
84
|
+
* does: this runs on a startup path and must not cost a subprocess or require a `git` binary.
|
|
85
|
+
*/
|
|
86
|
+
export function projectAgeWeeks(root, now, read = defaultRead) {
|
|
87
|
+
for (const path of [join(root, '.git', 'logs', 'HEAD')]) {
|
|
88
|
+
try {
|
|
89
|
+
const first = read(path).split('\n')[0];
|
|
90
|
+
// reflog line: `<old> <new> <name> <email> <unix-ts> <tz>\t<message>`
|
|
91
|
+
const seconds = first?.match(/\s(\d{9,11})\s[+-]\d{4}/)?.[1];
|
|
92
|
+
if (seconds === undefined)
|
|
93
|
+
continue;
|
|
94
|
+
const ageMs = now - parseInt(seconds, 10) * 1000;
|
|
95
|
+
if (ageMs < 0)
|
|
96
|
+
continue;
|
|
97
|
+
return Math.floor(ageMs / MS_PER_WEEK);
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
/** True when package.json declares workspaces — monorepos exercise very different code paths. */
|
|
106
|
+
export function isMonorepo(root, read = defaultRead) {
|
|
107
|
+
try {
|
|
108
|
+
const pkg = JSON.parse(read(join(root, 'package.json')));
|
|
109
|
+
if (pkg.workspaces !== undefined)
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
/* no package.json — fall through to the pnpm check */
|
|
114
|
+
}
|
|
115
|
+
try {
|
|
116
|
+
read(join(root, 'pnpm-workspace.yaml'));
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const defaultReadDir = (dir) => {
|
|
124
|
+
try {
|
|
125
|
+
return readdirSync(dir, { withFileTypes: true }).map((e) => ({
|
|
126
|
+
name: e.name,
|
|
127
|
+
isDirectory: e.isDirectory(),
|
|
128
|
+
}));
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
return [];
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const defaultRead = (path) => readFileSync(path, 'utf8');
|
|
135
|
+
/** How many entries a `.reticle` subdirectory holds, matching an optional extension. 0 when absent. */
|
|
136
|
+
function countIn(reticleRoot, subdir, extension) {
|
|
137
|
+
try {
|
|
138
|
+
const names = readdirSync(join(reticleRoot, subdir));
|
|
139
|
+
return extension === undefined ? names.length : names.filter((n) => extension.test(n)).length;
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
return 0;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function exists(path) {
|
|
146
|
+
try {
|
|
147
|
+
statSync(path);
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Build the full profile. Best-effort throughout: an unreadable project yields a profile of zeroes
|
|
156
|
+
* rather than an exception, because a telemetry snapshot must never be able to fail a daemon start.
|
|
157
|
+
*/
|
|
158
|
+
export function profileProject(cwd, now) {
|
|
159
|
+
const reticleRoot = join(cwd, ReticleDir.ROOT);
|
|
160
|
+
const flowCount = countIn(reticleRoot, ReticleDir.FLOWS_SUBDIR, /\.json$/);
|
|
161
|
+
const baselineCount = countIn(reticleRoot, ReticleDir.BASELINES_SUBDIR);
|
|
162
|
+
// `.diff.png` files are diff OUTPUT, not baselines — counting them would double every visual user.
|
|
163
|
+
const visualBaselineCount = countIn(reticleRoot, ReticleDir.VISUAL_SUBDIR, /(?<!\.diff)\.png$/);
|
|
164
|
+
const runCount = countIn(reticleRoot, ReticleDir.RUNS_SUBDIR, /\.json$/);
|
|
165
|
+
const capsuleCount = countIn(reticleRoot, ReticleDir.CAPSULES_SUBDIR, /\.json$/);
|
|
166
|
+
const hasContract = exists(join(reticleRoot, ReticleDir.CONTRACT_FILE));
|
|
167
|
+
const hasHistory = exists(join(reticleRoot, ReticleDir.PROJECT_FILE));
|
|
168
|
+
const featuresUsed = [];
|
|
169
|
+
if (flowCount > 0)
|
|
170
|
+
featuresUsed.push(FeatureFamily.DETERMINISTIC_REPLAY);
|
|
171
|
+
if (visualBaselineCount > 0)
|
|
172
|
+
featuresUsed.push(FeatureFamily.VISUAL_BASELINE);
|
|
173
|
+
if (baselineCount > 0)
|
|
174
|
+
featuresUsed.push(FeatureFamily.TEXT_BASELINE);
|
|
175
|
+
if (hasContract)
|
|
176
|
+
featuresUsed.push(FeatureFamily.CAPABILITY_CONTRACT);
|
|
177
|
+
if (runCount > 0)
|
|
178
|
+
featuresUsed.push(FeatureFamily.RUN_ARTIFACTS);
|
|
179
|
+
if (capsuleCount > 0)
|
|
180
|
+
featuresUsed.push(FeatureFamily.BUG_CAPSULES);
|
|
181
|
+
if (hasHistory)
|
|
182
|
+
featuresUsed.push(FeatureFamily.CROSS_RUN_HISTORY);
|
|
183
|
+
const { stack, stackMajor } = detectStack(cwd);
|
|
184
|
+
const ageWeeks = projectAgeWeeks(cwd, now);
|
|
185
|
+
const git = gitFacts(cwd);
|
|
186
|
+
return {
|
|
187
|
+
git: git.state,
|
|
188
|
+
...(git.forge !== undefined ? { forge: git.forge } : {}),
|
|
189
|
+
...(stack !== undefined ? { stack } : {}),
|
|
190
|
+
...(stackMajor !== undefined ? { stackMajor } : {}),
|
|
191
|
+
size: sizeBucket(countSourceFiles(cwd)),
|
|
192
|
+
monorepo: isMonorepo(cwd),
|
|
193
|
+
...(ageWeeks !== undefined ? { ageWeeks } : {}),
|
|
194
|
+
flowCount,
|
|
195
|
+
baselineCount,
|
|
196
|
+
visualBaselineCount,
|
|
197
|
+
runCount,
|
|
198
|
+
hasContract,
|
|
199
|
+
capsuleCount,
|
|
200
|
+
featuresUsed,
|
|
201
|
+
// Rounded to 2dp: the exact ratio is a function of the counts above, and an unrounded float would
|
|
202
|
+
// just be a higher-cardinality restatement of them.
|
|
203
|
+
featureDepth: Math.round((featuresUsed.length / ALL_FAMILIES.length) * 100) / 100,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telemetry for the verification RUNNER — the path `reticle verify` and the HTTP verify surface take.
|
|
3
|
+
*
|
|
4
|
+
* This path does not go through `runTool`, so for a while it produced nothing at all: no timing, no
|
|
5
|
+
* `verification_completed`, and — worst — no `bug_found`. Which meant every defect Reticle caught in
|
|
6
|
+
* CI was invisible to the one number we intend to publish, on precisely the surface most likely to
|
|
7
|
+
* run at scale and unattended. A metric that is blind to CI is not measuring the product.
|
|
8
|
+
*
|
|
9
|
+
* Reported from the assembled run rather than from inside the replay loop: the run artifact is the
|
|
10
|
+
* finished, already-classified verdict, so this cannot double-count and does not need to understand
|
|
11
|
+
* how a replay works.
|
|
12
|
+
*/
|
|
13
|
+
import { type ReticleVerificationRun } from '@reticlehq/core';
|
|
14
|
+
/** The tool name reported for this path, so CI runs are distinguishable from agent-driven ones. */
|
|
15
|
+
export declare const VERIFY_SURFACE = "reticle_verify";
|
|
16
|
+
/**
|
|
17
|
+
* Report one completed verification run: the verdict, and one bug per failing flow.
|
|
18
|
+
*
|
|
19
|
+
* Best-effort and wrapped — a verification's exit code must never depend on whether a metric sent.
|
|
20
|
+
*/
|
|
21
|
+
export declare function reportRunTelemetry(run: ReticleVerificationRun): void;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telemetry for the verification RUNNER — the path `reticle verify` and the HTTP verify surface take.
|
|
3
|
+
*
|
|
4
|
+
* This path does not go through `runTool`, so for a while it produced nothing at all: no timing, no
|
|
5
|
+
* `verification_completed`, and — worst — no `bug_found`. Which meant every defect Reticle caught in
|
|
6
|
+
* CI was invisible to the one number we intend to publish, on precisely the surface most likely to
|
|
7
|
+
* run at scale and unattended. A metric that is blind to CI is not measuring the product.
|
|
8
|
+
*
|
|
9
|
+
* Reported from the assembled run rather than from inside the replay loop: the run artifact is the
|
|
10
|
+
* finished, already-classified verdict, so this cannot double-count and does not need to understand
|
|
11
|
+
* how a replay works.
|
|
12
|
+
*/
|
|
13
|
+
import { BugSource, RunFlowStatus, TelemetryActor, TelemetryEventKind, VerdictStatus, } from '@reticlehq/core';
|
|
14
|
+
import { getSessionMetrics } from './session-metrics.js';
|
|
15
|
+
import { getTelemetry } from './telemetry.js';
|
|
16
|
+
/** The tool name reported for this path, so CI runs are distinguishable from agent-driven ones. */
|
|
17
|
+
export const VERIFY_SURFACE = 'reticle_verify';
|
|
18
|
+
/**
|
|
19
|
+
* Report one completed verification run: the verdict, and one bug per failing flow.
|
|
20
|
+
*
|
|
21
|
+
* Best-effort and wrapped — a verification's exit code must never depend on whether a metric sent.
|
|
22
|
+
*/
|
|
23
|
+
export function reportRunTelemetry(run) {
|
|
24
|
+
try {
|
|
25
|
+
const failed = run.flows.filter((flow) => flow.status === RunFlowStatus.FAIL);
|
|
26
|
+
const metrics = getSessionMetrics();
|
|
27
|
+
metrics.recordVerification();
|
|
28
|
+
void getTelemetry().emit(TelemetryEventKind.VERIFICATION_COMPLETED, {
|
|
29
|
+
// A `reticle verify` was typed by a person or scheduled by their CI — either way it is not the
|
|
30
|
+
// agent's own loop, which is the distinction `actor` exists to draw.
|
|
31
|
+
actor: TelemetryActor.HUMAN,
|
|
32
|
+
verification: {
|
|
33
|
+
via: VERIFY_SURFACE,
|
|
34
|
+
verified: run.verdict.status === VerdictStatus.PASS ? 'yes' : 'no',
|
|
35
|
+
passed: run.verdict.status === VerdictStatus.PASS,
|
|
36
|
+
// The runner replays saved flows; it does not evaluate a fresh assertion that could pass over
|
|
37
|
+
// a contradiction, so this path cannot produce a false green and must not claim one.
|
|
38
|
+
falseGreenCaught: false,
|
|
39
|
+
durationMs: run.durationMs,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
for (const _flow of failed) {
|
|
43
|
+
// Every failing flow in one run is a separate regression instance, but they share a kind — so
|
|
44
|
+
// only the first is a distinct defect. A 40-flow suite failing wholesale is one regression to
|
|
45
|
+
// fix far more often than it is forty.
|
|
46
|
+
const first = metrics.recordBug('flow-regression');
|
|
47
|
+
void getTelemetry().emit(TelemetryEventKind.BUG_FOUND, {
|
|
48
|
+
actor: TelemetryActor.HUMAN,
|
|
49
|
+
bug: {
|
|
50
|
+
source: BugSource.REPLAY,
|
|
51
|
+
kind: 'flow-regression',
|
|
52
|
+
falseGreen: false,
|
|
53
|
+
tool: VERIFY_SURFACE,
|
|
54
|
+
repeat: !first,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
/* a verdict must never depend on a metric */
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The in-process session accumulator — the reason Reticle's telemetry bill does not scale with how
|
|
3
|
+
* hard people use it.
|
|
4
|
+
*
|
|
5
|
+
* The old design emitted one event per MCP tool call. That reads as harmless until you multiply it
|
|
6
|
+
* out: a single agent verification loop is 50–200 tool calls, so a thousand daily users would push
|
|
7
|
+
* millions of events a day, and PostHog bills per ingested event. Worse, it was millions of events
|
|
8
|
+
* answering a question that ONE property answers better — `{reticle_act: 40, reticle_assert: 12}`
|
|
9
|
+
* tells you the session was a real verification loop, where 52 separate rows tell you only that 52
|
|
10
|
+
* things happened, with the shape scattered across them.
|
|
11
|
+
*
|
|
12
|
+
* So counts live here, in memory, and leave as a single `daemon_stopped` event.
|
|
13
|
+
*
|
|
14
|
+
* Everything recorded is a COUNT or a fingerprint. No tool arguments, no results, no selectors, no
|
|
15
|
+
* URLs, no error messages — the accumulator has no way to hold them, which is a stronger guarantee
|
|
16
|
+
* than a rule saying it shouldn't.
|
|
17
|
+
*/
|
|
18
|
+
import { BrowserLaunchKind, type ConnectFailure, type SessionSummary } from '@reticlehq/core';
|
|
19
|
+
/**
|
|
20
|
+
* Mutable counters for one daemon lifetime. A plain class, not a store: it is process-local, it never
|
|
21
|
+
* persists, and it dies with the daemon.
|
|
22
|
+
*/
|
|
23
|
+
export declare class SessionMetrics {
|
|
24
|
+
#private;
|
|
25
|
+
/** Clock injected — this file must stay testable without a real one, per the repo's clock rule. */
|
|
26
|
+
constructor(now: () => number);
|
|
27
|
+
/**
|
|
28
|
+
* Record a call starting. Returns a function to call when it finishes — that closure is what makes
|
|
29
|
+
* timing correct under CONCURRENCY: several agents can be inside `runTool` at once, so a single
|
|
30
|
+
* "last start time" field would attribute one tool's duration to another. Each call carries its own.
|
|
31
|
+
*/
|
|
32
|
+
startToolCall(tool: string, args?: Record<string, unknown>): (durationMs: number) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Time spent waiting on the BROWSER, across all commands.
|
|
35
|
+
*
|
|
36
|
+
* Compared against `busyMs` this answers the question a single total cannot: of the time an agent
|
|
37
|
+
* spends inside Reticle, how much is us and how much is the app under test? Without the split a
|
|
38
|
+
* 4-second `reticle_act` is unattributable — it could be our overhead or the app taking 4 seconds
|
|
39
|
+
* to settle, and those have opposite fixes. A high ratio here is a finding about their app; a low
|
|
40
|
+
* one alongside a high `busyMs` is a performance bug of ours.
|
|
41
|
+
*/
|
|
42
|
+
recordBrowserLatency(ms: number): void;
|
|
43
|
+
/** A call for a tool that does not exist. Non-zero means our surface is confusing the agent. */
|
|
44
|
+
recordUnknownTool(): void;
|
|
45
|
+
recordToolCall(tool: string, args?: Record<string, unknown>): void;
|
|
46
|
+
/**
|
|
47
|
+
* One failed tool call. Grouped by fingerprint, but stored WITH its skeleton message and the tool
|
|
48
|
+
* that produced it — a bare fingerprint could be ranked and never diagnosed, which made the top
|
|
49
|
+
* error in the dashboard a number nobody could act on.
|
|
50
|
+
*/
|
|
51
|
+
recordToolError(message: string, tool?: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* A failure reported by the IN-PAGE half of Reticle, over the bridge.
|
|
54
|
+
*
|
|
55
|
+
* Kept in its own bucket rather than mixed into tool errors: a broken observer and a failing tool
|
|
56
|
+
* call are different defects with different owners, and merging them would hide the browser-side
|
|
57
|
+
* one inside a much larger pile. Same treatment otherwise — fingerprinted, variables stripped.
|
|
58
|
+
*/
|
|
59
|
+
recordSdkFailure(site: string, message: string): void;
|
|
60
|
+
/** The agent's recent approach run + the call in flight — context for a crash report. */
|
|
61
|
+
get trail(): {
|
|
62
|
+
breadcrumb: string[];
|
|
63
|
+
inFlight: string | undefined;
|
|
64
|
+
};
|
|
65
|
+
recordVerification(): void;
|
|
66
|
+
/**
|
|
67
|
+
* One defect found in the app under test — the outcome number, kept broken down by kind.
|
|
68
|
+
*
|
|
69
|
+
* Returns TRUE when this kind is new to the session. Every occurrence is still counted; the flag
|
|
70
|
+
* only lets a reader separate "how many distinct defects" from "how often they were hit", which
|
|
71
|
+
* are different claims and were previously indistinguishable in the data.
|
|
72
|
+
*/
|
|
73
|
+
recordBug(kind: string): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* One connection ATTEMPT. Call before the attempt; settle it with the outcome.
|
|
76
|
+
*
|
|
77
|
+
* The previous version counted only successes, and counted them inconsistently — incrementing
|
|
78
|
+
* before the await on the CDP path and after it on the launch path — so one number meant attempts,
|
|
79
|
+
* the others meant successes, and nothing in the data said which. A connection metric that cannot
|
|
80
|
+
* express failure misses the only question worth asking: how often can people not get a browser?
|
|
81
|
+
*/
|
|
82
|
+
recordConnectAttempt(kind: BrowserLaunchKind): (failure?: ConnectFailure) => void;
|
|
83
|
+
recordClient(name: string): void;
|
|
84
|
+
/**
|
|
85
|
+
* Roll the counters into the event payload. `final` marks a clean shutdown; a periodic flush passes
|
|
86
|
+
* false so a session killed before it can exit is not lost entirely (see the flush note in cli.ts).
|
|
87
|
+
*/
|
|
88
|
+
summarize(final: boolean): SessionSummary;
|
|
89
|
+
/** True when nothing at all happened — a flush of an idle daemon is not worth an event. */
|
|
90
|
+
get empty(): boolean;
|
|
91
|
+
/** Zero the counters after a non-final flush so the next flush reports the NEXT window, not a total. */
|
|
92
|
+
reset(): void;
|
|
93
|
+
}
|
|
94
|
+
export declare const getSessionMetrics: (now?: () => number) => SessionMetrics;
|
|
95
|
+
/** Record one browser round-trip. Free-function form so the session hot path is a single call. */
|
|
96
|
+
export declare const recordBrowserLatency: (ms: number) => void;
|
|
97
|
+
/** Narrow-and-record one in-page failure. Keeps the session hot path to a single call. */
|
|
98
|
+
export declare const recordSdkFailure: (failure: {
|
|
99
|
+
site: string;
|
|
100
|
+
message: string;
|
|
101
|
+
}) => void;
|
|
102
|
+
/** Tests only — drop the singleton so each case starts from zero. */
|
|
103
|
+
export declare const resetSessionMetrics: () => void;
|