@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/dist/flows/flake.d.ts
CHANGED
|
@@ -55,4 +55,3 @@ export declare function recordOutcome(record: FlakeRecord, passed: boolean): Fla
|
|
|
55
55
|
export declare function isFlaky(record: FlakeRecord, minRuns?: number): boolean;
|
|
56
56
|
/** Observed intermittent-failure rate (0 when too few runs to judge). */
|
|
57
57
|
export declare function flakeRate(record: FlakeRecord): number;
|
|
58
|
-
//# sourceMappingURL=flake.d.ts.map
|
package/dist/flows/flake.js
CHANGED
|
@@ -30,4 +30,3 @@ export declare function replayNamedFlow(deps: ToolDeps, args: Record<string, unk
|
|
|
30
30
|
* documented to work headless), so a missing/unknown session degrades to the global/legacy store.
|
|
31
31
|
*/
|
|
32
32
|
export declare function sessionProjectId(deps: ToolDeps, sessionId: string | undefined): string | undefined;
|
|
33
|
-
//# sourceMappingURL=flow-replay-run.d.ts.map
|
|
@@ -30,11 +30,11 @@ export function flowErrorMessage(code) {
|
|
|
30
30
|
case FlowErrorCode.INVALID_NAME:
|
|
31
31
|
return 'invalid flow name — use a single safe segment (letters/digits/-/_), no path separators';
|
|
32
32
|
case FlowErrorCode.NOT_FOUND:
|
|
33
|
-
return 'no such flow on disk — run
|
|
33
|
+
return 'no such flow on disk — run reticle_flow{action:"list"} to see saved flows';
|
|
34
34
|
case FlowErrorCode.PARSE_FAILED:
|
|
35
35
|
return 'flow file is malformed — fix or regenerate it with reticle_flow_save';
|
|
36
36
|
case FlowErrorCode.NO_RECORDING:
|
|
37
|
-
return 'no compiled recording by that name — record one (
|
|
37
|
+
return 'no compiled recording by that name — record one (reticle_record{action:"start"|"stop"}) first';
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
/** Map the wire ReplayStatus onto the persisted RunStatus (ok→pass). */
|
|
@@ -216,4 +216,3 @@ export function sessionProjectId(deps, sessionId) {
|
|
|
216
216
|
return undefined;
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
//# sourceMappingURL=flow-replay-run.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CommandResult, type FlowFile, type FlowStepResult, type ReticleEvent } from '@reticlehq/core';
|
|
1
|
+
import { AnchorKind, type CommandResult, type FlowAnchor, type FlowFile, type FlowStepResult, type ReticleEvent, type QueryEmptyHint } from '@reticlehq/core';
|
|
2
2
|
import type { EvalResult, Predicate } from '../events/predicate.js';
|
|
3
3
|
/**
|
|
4
4
|
* The session surface flow-replay needs: QUERY to re-resolve a testid anchor against the live
|
|
@@ -40,13 +40,31 @@ export declare function editDistance(a: string, b: string): number;
|
|
|
40
40
|
*/
|
|
41
41
|
export declare function nearestTestid(missing: string, present: string[]): string | null;
|
|
42
42
|
/** Injected sleeper so tests drive replay with a no-op clock; production waits on a real timer. */
|
|
43
|
-
type Sleep = (ms: number) => Promise<void>;
|
|
43
|
+
export type Sleep = (ms: number) => Promise<void>;
|
|
44
44
|
/**
|
|
45
45
|
* True when ≥2 present testids tie at the minimum edit distance to the missing one — `nearest` is
|
|
46
46
|
* then an arbitrary lexical-tiebreak pick, so auto-healing would be a coin-flip between candidates.
|
|
47
47
|
* Such a drift is surfaced (with a nearest) but never auto-healed.
|
|
48
48
|
*/
|
|
49
49
|
export declare function nearestIsAmbiguous(missing: string, present: string[]): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Re-resolve any QUERY against the live DOM, tolerating an in-flight render: QUERY, and while it
|
|
52
|
+
* returns zero refs, sleep and retry up to ANCHOR_SETTLE_ATTEMPTS. Returns as soon as refs appear,
|
|
53
|
+
* so a present anchor costs one query; a genuinely missing one costs the full (bounded) settle and
|
|
54
|
+
* then drifts. The last result's near-miss hint is returned for the drift record.
|
|
55
|
+
*/
|
|
56
|
+
export declare function resolveQuery(session: FlowReplaySession, queryArgs: Record<string, unknown>, sleep: Sleep): Promise<{
|
|
57
|
+
refs: string[];
|
|
58
|
+
hint?: QueryEmptyHint;
|
|
59
|
+
}>;
|
|
60
|
+
/** A compact, legible label for a component auto-anchor (component@file:line, or its best part). */
|
|
61
|
+
export declare function componentLabel(anchor: Extract<FlowAnchor, {
|
|
62
|
+
kind: typeof AnchorKind.COMPONENT;
|
|
63
|
+
}>): string;
|
|
64
|
+
/** QUERY args for a component auto-anchor — source (precise) + component name (coarse) as given. */
|
|
65
|
+
export declare function componentQueryArgs(anchor: Extract<FlowAnchor, {
|
|
66
|
+
kind: typeof AnchorKind.COMPONENT;
|
|
67
|
+
}>): Record<string, unknown>;
|
|
50
68
|
/**
|
|
51
69
|
* Replay a loaded flow by RE-RESOLVING every step's semantic anchor against the live DOM — never
|
|
52
70
|
* a stale ref. A testid anchor is re-found by reticle_query; a signal anchor waits on a predicate.
|
|
@@ -54,5 +72,3 @@ export declare function nearestIsAmbiguous(missing: string, present: string[]):
|
|
|
54
72
|
* results. This is the "whose fault is it" contract, not a blind "command failed".
|
|
55
73
|
*/
|
|
56
74
|
export declare function replayFlow(session: FlowReplaySession, flow: FlowFile, waitForSignal: WaitForSignal, signalTimeoutMs: number, confirmDangerous?: boolean, sleep?: Sleep): Promise<FlowStepResult[]>;
|
|
57
|
-
export {};
|
|
58
|
-
//# sourceMappingURL=flow-replay.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnchorKind, DriftReason, EventType, ReticleCommand, QueryBy, } from '@reticlehq/core';
|
|
2
2
|
import { asRecord, asString } from '../tools/tools-helpers.js';
|
|
3
3
|
import { replayActionArgs, ambiguousTestidNote, queryRefs } from './replay.js';
|
|
4
|
+
import { runRoleStep, runComponentStep } from './flow-step-runners.js';
|
|
4
5
|
import { ReticleTool } from '../tools/tool-names.js';
|
|
5
6
|
/**
|
|
6
7
|
* A single ASCII-ish edit distance (case-insensitive). Small inputs (testids), so O(n*m) is fine.
|
|
@@ -124,7 +125,7 @@ function testidDrift(value, hint) {
|
|
|
124
125
|
* so a present anchor costs one query; a genuinely missing one costs the full (bounded) settle and
|
|
125
126
|
* then drifts. The last result's near-miss hint is returned for the drift record.
|
|
126
127
|
*/
|
|
127
|
-
async function resolveQuery(session, queryArgs, sleep) {
|
|
128
|
+
export async function resolveQuery(session, queryArgs, sleep) {
|
|
128
129
|
let last = readQuery(await session.command(ReticleCommand.QUERY, queryArgs));
|
|
129
130
|
for (let attempt = 1; last.refs.length === 0 && attempt < ANCHOR_SETTLE_ATTEMPTS; attempt += 1) {
|
|
130
131
|
await sleep(ANCHOR_SETTLE_DELAY_MS);
|
|
@@ -196,7 +197,7 @@ function summarizeConsequence(events) {
|
|
|
196
197
|
return parts.length > 0 ? parts.join('; ') : undefined;
|
|
197
198
|
}
|
|
198
199
|
/** A compact, legible label for a component auto-anchor (component@file:line, or its best part). */
|
|
199
|
-
function componentLabel(anchor) {
|
|
200
|
+
export function componentLabel(anchor) {
|
|
200
201
|
if (anchor.source !== undefined) {
|
|
201
202
|
const base = anchor.source.file.split('/').pop() ?? anchor.source.file;
|
|
202
203
|
const loc = `${base}:${anchor.source.line}`;
|
|
@@ -215,7 +216,7 @@ function anchorLabel(anchor) {
|
|
|
215
216
|
return anchor.name ?? anchor.role;
|
|
216
217
|
}
|
|
217
218
|
/** QUERY args for a component auto-anchor — source (precise) + component name (coarse) as given. */
|
|
218
|
-
function componentQueryArgs(anchor) {
|
|
219
|
+
export function componentQueryArgs(anchor) {
|
|
219
220
|
const args = { by: QueryBy.COMPONENT };
|
|
220
221
|
if (anchor.component !== undefined)
|
|
221
222
|
args['component'] = anchor.component;
|
|
@@ -223,45 +224,6 @@ function componentQueryArgs(anchor) {
|
|
|
223
224
|
args['source'] = anchor.source;
|
|
224
225
|
return args;
|
|
225
226
|
}
|
|
226
|
-
/** Run one component-anchored step: re-resolve via QUERY by:'component', ACT on the live ref, else drift. */
|
|
227
|
-
async function runComponentStep(session, step, index, anchor, confirmDangerous, sleep) {
|
|
228
|
-
const label = componentLabel(anchor);
|
|
229
|
-
const { refs } = await resolveQuery(session, componentQueryArgs(anchor), sleep);
|
|
230
|
-
if (refs.length === 0) {
|
|
231
|
-
return {
|
|
232
|
-
step: index,
|
|
233
|
-
tool: step.tool,
|
|
234
|
-
anchor: label,
|
|
235
|
-
ok: false,
|
|
236
|
-
drift: {
|
|
237
|
-
reasonKind: DriftReason.COMPONENT_NOT_FOUND,
|
|
238
|
-
reason: `component anchor "${label}" not found`,
|
|
239
|
-
anchor: label,
|
|
240
|
-
nearest: null,
|
|
241
|
-
},
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
const ref = refs[0] ?? '';
|
|
245
|
-
// Attribute the step's effects to the step. Without this window they arrive with no actionId and are
|
|
246
|
-
// learned as ambient churn on the very regions the flow exercises.
|
|
247
|
-
session.beginAction?.(ReticleTool.FLOW_REPLAY, { ref, action: step.action ?? '' });
|
|
248
|
-
let act;
|
|
249
|
-
try {
|
|
250
|
-
act = await session.command(ReticleCommand.ACT, {
|
|
251
|
-
ref,
|
|
252
|
-
action: step.action ?? '',
|
|
253
|
-
args: replayActionArgs(step.args, confirmDangerous),
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
finally {
|
|
257
|
-
// Close on every exit so a throwing step cannot leak the window onto the next step's events.
|
|
258
|
-
session.finishAction?.();
|
|
259
|
-
}
|
|
260
|
-
const result = { step: index, tool: step.tool, anchor: label, ok: act.ok };
|
|
261
|
-
if (!act.ok)
|
|
262
|
-
result.error = act.error ?? 'command failed';
|
|
263
|
-
return result;
|
|
264
|
-
}
|
|
265
227
|
/** Run one testid-anchored step: re-resolve via QUERY, then ACT on the live ref, else drift. */
|
|
266
228
|
async function runTestidStep(session, step, index, value, dynamic, confirmDangerous, sleep) {
|
|
267
229
|
const { refs, hint } = await resolveTestid(session, value, sleep);
|
|
@@ -393,6 +355,11 @@ export async function replayFlow(session, flow, waitForSignal, signalTimeoutMs,
|
|
|
393
355
|
else if (step.anchor.kind === AnchorKind.COMPONENT) {
|
|
394
356
|
result = await runComponentStep(session, step, index, step.anchor, confirmDangerous, sleep);
|
|
395
357
|
}
|
|
358
|
+
else if (step.anchor.kind === AnchorKind.ROLE && step.anchor.name !== undefined) {
|
|
359
|
+
// A NAMED role anchor addresses one element. The nameless one is the degraded placeholder and
|
|
360
|
+
// keeps its old path, where it fails legibly rather than querying a role as if it were a testid.
|
|
361
|
+
result = await runRoleStep(session, step, index, step.anchor, confirmDangerous, sleep);
|
|
362
|
+
}
|
|
396
363
|
else {
|
|
397
364
|
result = await runTestidStep(session, step, index, label, dynamic, confirmDangerous, sleep);
|
|
398
365
|
}
|
|
@@ -422,4 +389,3 @@ export async function replayFlow(session, flow, waitForSignal, signalTimeoutMs,
|
|
|
422
389
|
}
|
|
423
390
|
return results;
|
|
424
391
|
}
|
|
425
|
-
//# sourceMappingURL=flow-replay.js.map
|
|
@@ -22,4 +22,3 @@ export declare function flowInProjectScope(flowProjectId: string | undefined, se
|
|
|
22
22
|
* flows starting from a non-testid anchor get a chip with no `start` (shown on every page).
|
|
23
23
|
*/
|
|
24
24
|
export declare function buildFlowChips(flows: readonly FlowFile[], sessionProjectId: string | undefined): FlowChip[];
|
|
25
|
-
//# sourceMappingURL=flow-scope.d.ts.map
|
package/dist/flows/flow-scope.js
CHANGED
|
@@ -17,4 +17,3 @@ export interface NamedFlow {
|
|
|
17
17
|
export declare function toFlowSources(flows: readonly NamedFlow[]): FlowSources[];
|
|
18
18
|
/** Which saved flows a set of changed files affects — the derivation + index in one call. */
|
|
19
19
|
export declare function affectedSavedFlows(flows: readonly NamedFlow[], changedFiles: readonly string[]): AffectedResult;
|
|
20
|
-
//# sourceMappingURL=flow-sources.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How one anchored step is turned into a live action.
|
|
3
|
+
*
|
|
4
|
+
* Split out of flow-replay.ts when adding the role+name runner pushed that file past the size cap.
|
|
5
|
+
* These three share one shape — resolve an anchor to a ref, then dispatch — and the sharing is the
|
|
6
|
+
* point: the action window must open and close identically no matter which anchor found the element,
|
|
7
|
+
* or a step's events land in the wrong window depending on how it was addressed.
|
|
8
|
+
*/
|
|
9
|
+
import { AnchorKind, type FlowAnchor, type FlowStep, type FlowStepResult } from '@reticlehq/core';
|
|
10
|
+
import type { FlowReplaySession, Sleep } from './flow-replay.js';
|
|
11
|
+
/** Run one role+name-anchored step: re-resolve via QUERY by:'role', ACT on the live ref, else drift. */
|
|
12
|
+
export declare function runRoleStep(session: FlowReplaySession, step: FlowStep, index: number, anchor: Extract<FlowAnchor, {
|
|
13
|
+
kind: typeof AnchorKind.ROLE;
|
|
14
|
+
}>, confirmDangerous: boolean, sleep: Sleep): Promise<FlowStepResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Dispatch one already-resolved step. Shared so every anchor kind runs the action the same way —
|
|
17
|
+
* including the action window, whose open/close must not depend on which anchor found the element.
|
|
18
|
+
*/
|
|
19
|
+
export declare function actOnResolvedRef(session: FlowReplaySession, step: FlowStep, index: number, label: string, ref: string, confirmDangerous: boolean): Promise<FlowStepResult>;
|
|
20
|
+
/** Run one component-anchored step: re-resolve via QUERY by:'component', ACT on the live ref, else drift. */
|
|
21
|
+
export declare function runComponentStep(session: FlowReplaySession, step: FlowStep, index: number, anchor: Extract<FlowAnchor, {
|
|
22
|
+
kind: typeof AnchorKind.COMPONENT;
|
|
23
|
+
}>, confirmDangerous: boolean, sleep: Sleep): Promise<FlowStepResult>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How one anchored step is turned into a live action.
|
|
3
|
+
*
|
|
4
|
+
* Split out of flow-replay.ts when adding the role+name runner pushed that file past the size cap.
|
|
5
|
+
* These three share one shape — resolve an anchor to a ref, then dispatch — and the sharing is the
|
|
6
|
+
* point: the action window must open and close identically no matter which anchor found the element,
|
|
7
|
+
* or a step's events land in the wrong window depending on how it was addressed.
|
|
8
|
+
*/
|
|
9
|
+
import { AnchorKind, DriftReason, QueryBy, ReticleCommand, } from '@reticlehq/core';
|
|
10
|
+
import { ReticleTool } from '../tools/tool-names.js';
|
|
11
|
+
import { replayActionArgs } from './replay.js';
|
|
12
|
+
import { componentLabel, componentQueryArgs, resolveQuery } from './flow-replay.js';
|
|
13
|
+
/** Query args for a NAMED role anchor — the handle that identifies an instance, not a JSX site. */
|
|
14
|
+
function roleQueryArgs(anchor) {
|
|
15
|
+
return {
|
|
16
|
+
by: QueryBy.ROLE,
|
|
17
|
+
value: anchor.role,
|
|
18
|
+
...(anchor.name === undefined ? {} : { name: anchor.name }),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** Run one role+name-anchored step: re-resolve via QUERY by:'role', ACT on the live ref, else drift. */
|
|
22
|
+
export async function runRoleStep(session, step, index, anchor, confirmDangerous, sleep) {
|
|
23
|
+
const label = `${anchor.role} "${String(anchor.name)}"`;
|
|
24
|
+
const { refs } = await resolveQuery(session, roleQueryArgs(anchor), sleep);
|
|
25
|
+
const ref = refs[0];
|
|
26
|
+
if (ref === undefined) {
|
|
27
|
+
return {
|
|
28
|
+
step: index,
|
|
29
|
+
tool: step.tool,
|
|
30
|
+
anchor: label,
|
|
31
|
+
ok: false,
|
|
32
|
+
drift: {
|
|
33
|
+
reasonKind: DriftReason.COMPONENT_NOT_FOUND,
|
|
34
|
+
reason: `role anchor ${label} not found`,
|
|
35
|
+
anchor: label,
|
|
36
|
+
nearest: null,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return await actOnResolvedRef(session, step, index, label, ref, confirmDangerous);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Dispatch one already-resolved step. Shared so every anchor kind runs the action the same way —
|
|
44
|
+
* including the action window, whose open/close must not depend on which anchor found the element.
|
|
45
|
+
*/
|
|
46
|
+
export async function actOnResolvedRef(session, step, index, label, ref, confirmDangerous) {
|
|
47
|
+
session.beginAction?.(ReticleTool.FLOW_REPLAY, { ref, action: step.action ?? '' });
|
|
48
|
+
let act;
|
|
49
|
+
try {
|
|
50
|
+
act = await session.command(ReticleCommand.ACT, {
|
|
51
|
+
ref,
|
|
52
|
+
action: step.action ?? '',
|
|
53
|
+
args: replayActionArgs(step.args, confirmDangerous),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
finally {
|
|
57
|
+
session.finishAction?.();
|
|
58
|
+
}
|
|
59
|
+
const result = { step: index, tool: step.tool, anchor: label, ok: act.ok };
|
|
60
|
+
if (!act.ok)
|
|
61
|
+
result.error = act.error ?? 'command failed';
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
/** Run one component-anchored step: re-resolve via QUERY by:'component', ACT on the live ref, else drift. */
|
|
65
|
+
export async function runComponentStep(session, step, index, anchor, confirmDangerous, sleep) {
|
|
66
|
+
const label = componentLabel(anchor);
|
|
67
|
+
const { refs } = await resolveQuery(session, componentQueryArgs(anchor), sleep);
|
|
68
|
+
if (refs.length === 0) {
|
|
69
|
+
return {
|
|
70
|
+
step: index,
|
|
71
|
+
tool: step.tool,
|
|
72
|
+
anchor: label,
|
|
73
|
+
ok: false,
|
|
74
|
+
drift: {
|
|
75
|
+
reasonKind: DriftReason.COMPONENT_NOT_FOUND,
|
|
76
|
+
reason: `component anchor "${label}" not found`,
|
|
77
|
+
anchor: label,
|
|
78
|
+
nearest: null,
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
const ref = refs[0] ?? '';
|
|
83
|
+
// Attribute the step's effects to the step. Without this window they arrive with no actionId and are
|
|
84
|
+
// learned as ambient churn on the very regions the flow exercises.
|
|
85
|
+
session.beginAction?.(ReticleTool.FLOW_REPLAY, { ref, action: step.action ?? '' });
|
|
86
|
+
let act;
|
|
87
|
+
try {
|
|
88
|
+
act = await session.command(ReticleCommand.ACT, {
|
|
89
|
+
ref,
|
|
90
|
+
action: step.action ?? '',
|
|
91
|
+
args: replayActionArgs(step.args, confirmDangerous),
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
finally {
|
|
95
|
+
// Close on every exit so a throwing step cannot leak the window onto the next step's events.
|
|
96
|
+
session.finishAction?.();
|
|
97
|
+
}
|
|
98
|
+
const result = { step: index, tool: step.tool, anchor: label, ok: act.ok };
|
|
99
|
+
if (!act.ok)
|
|
100
|
+
result.error = act.error ?? 'command failed';
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
@@ -30,4 +30,3 @@ export declare function successToPredicate(success: FlowExpect, dynamic: Readonl
|
|
|
30
30
|
* the injected timeout. Never reads the wall clock.
|
|
31
31
|
*/
|
|
32
32
|
export declare function assertSuccess(session: FlowReplaySession, success: FlowExpect | undefined, dynamic: ReadonlySet<string>, waitForSignal: WaitForSignal, timeoutMs: number, since?: number): Promise<EvalResult>;
|
|
33
|
-
//# sourceMappingURL=flow-success.d.ts.map
|
|
@@ -128,4 +128,3 @@ export async function assertSuccess(session, success, dynamic, waitForSignal, ti
|
|
|
128
128
|
// a prior replay/run (or, in heal, by the pre-heal drift replay) cannot fake a pass.
|
|
129
129
|
return waitForSignal(session, predicate, timeoutMs, since);
|
|
130
130
|
}
|
|
131
|
-
//# sourceMappingURL=flow-success.js.map
|
|
@@ -13,4 +13,3 @@ export declare function leasableAppUrl(deps: ToolDeps, sessionId: string | undef
|
|
|
13
13
|
/** A flow whose leased context never came up is a suite ERROR, never a silent pass. */
|
|
14
14
|
export declare function leaseFailureReplay(name: string, error: string | undefined): FlowReplayResult;
|
|
15
15
|
export declare const FLOW_TOOLS: ToolDef[];
|
|
16
|
-
//# sourceMappingURL=flow-tools.d.ts.map
|
package/dist/flows/flow-tools.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { FlowErrorCode, RecordedSaveError, ReplayStatus, } from '@reticlehq/core';
|
|
3
|
+
import { FlakeStore } from './flake-store.js';
|
|
3
4
|
import { ReticleTool } from '../tools/tool-names.js';
|
|
4
5
|
import { asNumber, asString } from '../tools/tools-helpers.js';
|
|
5
6
|
import { log } from '../log.js';
|
|
@@ -71,7 +72,7 @@ export const FLOW_TOOLS = [
|
|
|
71
72
|
inputSchema: {
|
|
72
73
|
flowName: z
|
|
73
74
|
.string()
|
|
74
|
-
.describe('Name for the flow file (saved to .reticle/flows/<flowName>.json). Use again in
|
|
75
|
+
.describe('Name for the flow file (saved to .reticle/flows/<flowName>.json). Use again in reticle_flow{action:"load"} / reticle_flow_replay.'),
|
|
75
76
|
sessionId: z
|
|
76
77
|
.string()
|
|
77
78
|
.optional()
|
|
@@ -171,7 +172,7 @@ export const FLOW_TOOLS = [
|
|
|
171
172
|
inputSchema: {
|
|
172
173
|
flowName: z
|
|
173
174
|
.string()
|
|
174
|
-
.describe('Flow file name (without .json extension) from
|
|
175
|
+
.describe('Flow file name (without .json extension) from reticle_flow{action:"list"}.'),
|
|
175
176
|
sessionId: z
|
|
176
177
|
.string()
|
|
177
178
|
.optional()
|
|
@@ -200,7 +201,7 @@ export const FLOW_TOOLS = [
|
|
|
200
201
|
inputSchema: {
|
|
201
202
|
flowName: z
|
|
202
203
|
.string()
|
|
203
|
-
.describe('Flow file name (without .json extension) from
|
|
204
|
+
.describe('Flow file name (without .json extension) from reticle_flow{action:"list"}.'),
|
|
204
205
|
sessionId: z
|
|
205
206
|
.string()
|
|
206
207
|
.optional()
|
|
@@ -231,7 +232,7 @@ export const FLOW_TOOLS = [
|
|
|
231
232
|
inputSchema: {
|
|
232
233
|
flowName: z
|
|
233
234
|
.string()
|
|
234
|
-
.describe('Flow file name (without .json extension) from
|
|
235
|
+
.describe('Flow file name (without .json extension) from reticle_flow{action:"list"}.'),
|
|
235
236
|
confirmDangerous: z
|
|
236
237
|
.boolean()
|
|
237
238
|
.optional()
|
|
@@ -274,7 +275,7 @@ export const FLOW_TOOLS = [
|
|
|
274
275
|
description: 'Replay EVERY saved flow (or a given subset) and return ONE consolidated suite verdict — the ' +
|
|
275
276
|
'autonomous regression check to run after a build/change. Deterministic (no LLM per flow). ' +
|
|
276
277
|
'Returns { status: pass|fail, total, passed, failed, summary, failures:[{ flow, verdict, ' +
|
|
277
|
-
'whatChanged, whereInSource, nextAction }] } — passing flows are counted, only failures carry ' +
|
|
278
|
+
'whatChanged, whereInSource, nextAction }] } plus `flaky` (flows seen to pass AND fail on unchanged code) — passing flows are counted, only failures carry ' +
|
|
278
279
|
'detail (the actionable fix). One call replaces N hand-driven replays.',
|
|
279
280
|
inputSchema: {
|
|
280
281
|
names: z
|
|
@@ -297,6 +298,13 @@ export const FLOW_TOOLS = [
|
|
|
297
298
|
failed: z.number(),
|
|
298
299
|
summary: z.string(),
|
|
299
300
|
failures: z.array(z.unknown()),
|
|
301
|
+
flaky: z
|
|
302
|
+
.array(z.string())
|
|
303
|
+
.optional()
|
|
304
|
+
.describe('Flows that have both passed and failed on UNCHANGED code — intermittent, not regressions. Omitted when none are known.'),
|
|
305
|
+
// Session-EXEMPT, so it does not inherit `sessionEnvelopeShape` — declare the one-shot human
|
|
306
|
+
// feedback ask here or a validating profile strips it off the suite verdict.
|
|
307
|
+
feedback_prompt: z.unknown().optional(),
|
|
300
308
|
},
|
|
301
309
|
handler: async (deps, args) => {
|
|
302
310
|
const sessionId = asString(args['sessionId']);
|
|
@@ -337,24 +345,47 @@ export const FLOW_TOOLS = [
|
|
|
337
345
|
await lease.release().catch(() => undefined);
|
|
338
346
|
}
|
|
339
347
|
});
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
348
|
+
const parallelRuns = await Promise.all(outcomes.map(async (o, i) => {
|
|
349
|
+
const name = requested[i] ?? '';
|
|
350
|
+
const replay = o.ok && o.value !== undefined ? o.value : leaseFailureReplay(name, o.error);
|
|
351
|
+
const loaded = await deps.flows.load(name, projectId).catch(() => null);
|
|
352
|
+
const flow = loaded !== null && loaded.ok ? loaded.value : undefined;
|
|
353
|
+
return flow === undefined ? { replay } : { replay, flow };
|
|
354
|
+
}));
|
|
355
|
+
return buildSuiteVerdict(parallelRuns);
|
|
345
356
|
}
|
|
357
|
+
// The flow FILE travels with each replay so the verdict can tell a green that verified
|
|
358
|
+
// something from a green that could never have gone red. Without it the suite reported "all 1
|
|
359
|
+
// flow pass" for a flow with no steps at all.
|
|
346
360
|
const runs = [];
|
|
347
361
|
const timed = [];
|
|
362
|
+
// The flake ledger the CLI gate already keeps — see FlakeStore. It was only ever written by
|
|
363
|
+
// `reticle flow` on the command line, so an AGENT running this tool a hundred times learned
|
|
364
|
+
// nothing about which flows are intermittent. Same product, same ledger, two surfaces, and the
|
|
365
|
+
// one an agent uses was the blind half.
|
|
366
|
+
const flakes = new FlakeStore(deps.fs, deps.reticleRoot);
|
|
348
367
|
// Sequential default: every flow replays against the same live session, so they must not overlap.
|
|
349
368
|
for (const flowName of requested) {
|
|
350
369
|
const start = deps.now();
|
|
351
370
|
const replay = await replayNamedFlow(deps, { flowName, sessionId });
|
|
352
|
-
|
|
371
|
+
const loaded = await deps.flows.load(flowName, projectId).catch(() => null);
|
|
372
|
+
const flow = loaded !== null && loaded.ok ? loaded.value : undefined;
|
|
373
|
+
runs.push(flow === undefined ? { replay } : { replay, flow });
|
|
353
374
|
timed.push({ replay, durationMs: deps.now() - start });
|
|
354
375
|
}
|
|
376
|
+
// Accrue this run's outcomes, then report what the ledger knows. Best-effort on both halves: a
|
|
377
|
+
// flake ledger is memory, not a gate, and it must never turn a working verify into an error.
|
|
378
|
+
for (const { replay } of runs) {
|
|
379
|
+
await flakes.record(replay.name, replay.status === ReplayStatus.OK).catch(() => undefined);
|
|
380
|
+
}
|
|
381
|
+
const flaky = await flakes.flakyFlows().catch(() => []);
|
|
355
382
|
// Emit the consolidated run artifact (Runs tab) + best-effort cloud push. Never blocks the verdict.
|
|
356
383
|
await persistAndSyncVerificationRun(deps, timed, projectId);
|
|
357
|
-
|
|
384
|
+
const verdict = buildSuiteVerdict(runs);
|
|
385
|
+
// A flow that has both passed and failed on UNCHANGED code is a different thing from a
|
|
386
|
+
// regression, and an agent that cannot tell them apart either chases a ghost or ignores a real
|
|
387
|
+
// break. Present only when the ledger has seen enough runs to say so.
|
|
388
|
+
return flaky.length > 0 ? { ...verdict, flaky } : verdict;
|
|
358
389
|
},
|
|
359
390
|
},
|
|
360
391
|
{
|
|
@@ -423,7 +454,7 @@ export const FLOW_TOOLS = [
|
|
|
423
454
|
'untouched). Returns { name, status: healed|drift|unhealable|consequence_broken|' +
|
|
424
455
|
'nothing_to_heal|error, applied, proposals[], changed[], message }.',
|
|
425
456
|
inputSchema: {
|
|
426
|
-
flowName: z.string().describe('Flow file name to heal (from
|
|
457
|
+
flowName: z.string().describe('Flow file name to heal (from reticle_flow{action:"list"}).'),
|
|
427
458
|
apply: z.boolean().optional(),
|
|
428
459
|
confirmDangerous: z
|
|
429
460
|
.boolean()
|
|
@@ -446,4 +477,3 @@ export const FLOW_TOOLS = [
|
|
|
446
477
|
handler: (deps, args) => healFlow(deps, args).then(({ name, ...rest }) => ({ flowName: name, ...rest })),
|
|
447
478
|
},
|
|
448
479
|
];
|
|
449
|
-
//# sourceMappingURL=flow-tools.js.map
|
package/dist/flows/flows.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FlowErrorCode } from '@reticlehq/core';
|
|
2
|
-
import type { FlowExpect, FlowFile, FlowStep, HealChange } from '@reticlehq/core';
|
|
2
|
+
import type { FlowAnchor, FlowExpect, FlowFile, FlowStep, HealChange } from '@reticlehq/core';
|
|
3
3
|
import type { CompiledProgram, RecordedStep } from './recordings.js';
|
|
4
4
|
import type { FileSystemPort } from '../project/fs-port.js';
|
|
5
5
|
/** A monotonic clock injected for createdAt — never call Date.now inside the store (rule 7). */
|
|
@@ -14,6 +14,11 @@ export type FlowResult<T> = {
|
|
|
14
14
|
ok: false;
|
|
15
15
|
code: FlowErrorCode;
|
|
16
16
|
};
|
|
17
|
+
/** Pick the on-disk anchor for a normalized step: testid > component(auto) > degraded role. */
|
|
18
|
+
export declare function anchorForStep(args: Record<string, unknown>): {
|
|
19
|
+
anchor: FlowAnchor;
|
|
20
|
+
degraded: boolean;
|
|
21
|
+
};
|
|
17
22
|
/**
|
|
18
23
|
* Pure: map one normalized RecordedStep → FlowStep with a semantic anchor (+ degraded marker).
|
|
19
24
|
* A ref-only (stable:false) step is recorded with a best-effort anchor and degraded:true —
|
|
@@ -95,4 +100,3 @@ export declare class FlowStore {
|
|
|
95
100
|
remove(name: string, projectId?: string): Promise<FlowResult<void>>;
|
|
96
101
|
}
|
|
97
102
|
export {};
|
|
98
|
-
//# sourceMappingURL=flows.d.ts.map
|
package/dist/flows/flows.js
CHANGED
|
@@ -50,7 +50,7 @@ function componentAnchor(src) {
|
|
|
50
50
|
return anchor;
|
|
51
51
|
}
|
|
52
52
|
/** Pick the on-disk anchor for a normalized step: testid > component(auto) > degraded role. */
|
|
53
|
-
function anchorForStep(args) {
|
|
53
|
+
export function anchorForStep(args) {
|
|
54
54
|
const by = asString(args['by']);
|
|
55
55
|
const value = asString(args['value']);
|
|
56
56
|
if (by === QueryBy.TESTID && value !== undefined) {
|
|
@@ -63,6 +63,20 @@ function anchorForStep(args) {
|
|
|
63
63
|
anchor.source = source;
|
|
64
64
|
return { anchor, degraded: false };
|
|
65
65
|
}
|
|
66
|
+
// Role + NAME is a real anchor, not a degraded placeholder.
|
|
67
|
+
//
|
|
68
|
+
// The vocabulary has always described `{ kind:'role', role, name }` as an addressable anchor, and
|
|
69
|
+
// nothing ever produced one — the only ROLE anchor written to disk was the degraded placeholder
|
|
70
|
+
// that means "add a data-testid". So a step the recorder anchored by accessible name arrived here
|
|
71
|
+
// and had that name thrown away, which is precisely the anchor that distinguishes one row's
|
|
72
|
+
// control from another's when a shared JSX source location cannot.
|
|
73
|
+
if (by === QueryBy.ROLE && value !== undefined) {
|
|
74
|
+
const name = asString(args['name']);
|
|
75
|
+
if (name !== undefined && name.length > 0) {
|
|
76
|
+
// The schema carries role + name only; provenance lives on the step, not the anchor.
|
|
77
|
+
return { anchor: { kind: AnchorKind.ROLE, role: value, name }, degraded: false };
|
|
78
|
+
}
|
|
79
|
+
}
|
|
66
80
|
if (by === QueryBy.COMPONENT) {
|
|
67
81
|
const anchor = componentAnchor(args);
|
|
68
82
|
if (anchor !== null)
|
|
@@ -369,4 +383,3 @@ export class FlowStore {
|
|
|
369
383
|
return { ok: true, value: undefined };
|
|
370
384
|
}
|
|
371
385
|
}
|
|
372
|
-
//# sourceMappingURL=flows.js.map
|
package/dist/flows/gate.d.ts
CHANGED
package/dist/flows/gate.js
CHANGED
|
@@ -6,4 +6,3 @@ export declare function parseGitFiles(output: string): string[];
|
|
|
6
6
|
* than throwing — the caller degrades to "no changes" and the gate simply passes, never crashes CI.
|
|
7
7
|
*/
|
|
8
8
|
export declare function changedFilesSince(ref: string, cwd: string): Promise<string[]>;
|
|
9
|
-
//# sourceMappingURL=git-changed.d.ts.map
|
package/dist/flows/heal-run.d.ts
CHANGED
|
@@ -16,4 +16,3 @@ export declare const HEAL_MESSAGES: {
|
|
|
16
16
|
readonly CONSEQUENCE_BROKEN: "rebind resolves the drifted locator to a surviving element, but the healed flow no longer satisfies its success consequence — refusing to write (a heal that loses the intent would ship a green-but-dead test). Fix by hand and verify";
|
|
17
17
|
};
|
|
18
18
|
export declare function healFlow(deps: ToolDeps, args: Record<string, unknown>): Promise<FlowHealResult>;
|
|
19
|
-
//# sourceMappingURL=heal-run.d.ts.map
|
package/dist/flows/heal-run.js
CHANGED
package/dist/flows/heal.d.ts
CHANGED
|
@@ -40,4 +40,3 @@ export declare function proposeRebind(drift: Drift, step: number): HealProposal
|
|
|
40
40
|
* the floor. Defaults to HEAL_CONFIDENCE_MIN (0.5) for backwards compatibility.
|
|
41
41
|
*/
|
|
42
42
|
export declare function collectProposals(steps: FlowStepResult[], minConfidence?: number): HealProposal[];
|
|
43
|
-
//# sourceMappingURL=heal.d.ts.map
|
package/dist/flows/heal.js
CHANGED
|
@@ -24,4 +24,3 @@ export declare function mapWithConcurrency<I, T>(items: readonly I[], limit: num
|
|
|
24
24
|
* and never below 1. Explicit `requested` (the tool's `parallel` arg) wins when it is a sane number.
|
|
25
25
|
*/
|
|
26
26
|
export declare function resolveConcurrency(flowCount: number, poolCapacity: number, requested?: number): number;
|
|
27
|
-
//# sourceMappingURL=parallel-suite.d.ts.map
|