@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
|
@@ -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,15 +1,20 @@
|
|
|
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';
|
|
6
|
-
import {
|
|
7
|
+
import { syncFlowToCloud, SyncOutcome } from '../cloud/cloud-sync.js';
|
|
7
8
|
import { mapWithConcurrency, resolveConcurrency } from './parallel-suite.js';
|
|
8
9
|
import { acquireLeasedSession } from '../tools/lease-tools.js';
|
|
10
|
+
import { homedir } from 'node:os';
|
|
11
|
+
import { resolveProjectCloud } from '../cloud/cloud-config.js';
|
|
9
12
|
import { buildSuiteVerdict } from './decision.js';
|
|
10
13
|
import { classifyFlowAssertions } from './flow-classify.js';
|
|
11
14
|
import { isValidFlowName, flowPath } from '../project/reticle-dir.js';
|
|
12
15
|
import { replayNamedFlow, flowErrorMessage, latestRecordedFlow, sessionProjectId, } from './flow-replay-run.js';
|
|
16
|
+
import { persistAndSyncVerificationRun } from '../runs/verification-sync.js';
|
|
17
|
+
import { runServerVerify } from './server-verify.js';
|
|
13
18
|
import { healFlow } from './heal-run.js';
|
|
14
19
|
export { replayNamedFlow } from './flow-replay-run.js';
|
|
15
20
|
/**
|
|
@@ -17,11 +22,12 @@ export { replayNamedFlow } from './flow-replay-run.js';
|
|
|
17
22
|
* set). Fire-and-forget: resolves the config, POSTs via the platform fetch, and logs the outcome. Any
|
|
18
23
|
* failure is swallowed so a network hiccup never affects the local save.
|
|
19
24
|
*/
|
|
20
|
-
async function syncSavedFlowToCloud(flow, projectId) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
async function syncSavedFlowToCloud(deps, flow, projectId) {
|
|
26
|
+
// Per-project cloud: sync a saved flow only when cloud is attached AND flow sync is enabled.
|
|
27
|
+
const cloud = await resolveProjectCloud(deps.fs, deps.reticleRoot, homedir(), process.env);
|
|
28
|
+
if (cloud.config === null || !cloud.policy.flows)
|
|
29
|
+
return; // not attached / flows disabled → local only
|
|
30
|
+
const result = await syncFlowToCloud(flow, cloud.config, projectId, (url, init) => fetch(url, init));
|
|
25
31
|
if (result.outcome !== SyncOutcome.SYNCED) {
|
|
26
32
|
log('cloud-flow-sync-failed', { flow: flow.name, status: result.status, error: result.error });
|
|
27
33
|
}
|
|
@@ -66,7 +72,7 @@ export const FLOW_TOOLS = [
|
|
|
66
72
|
inputSchema: {
|
|
67
73
|
flowName: z
|
|
68
74
|
.string()
|
|
69
|
-
.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.'),
|
|
70
76
|
sessionId: z
|
|
71
77
|
.string()
|
|
72
78
|
.optional()
|
|
@@ -166,7 +172,7 @@ export const FLOW_TOOLS = [
|
|
|
166
172
|
inputSchema: {
|
|
167
173
|
flowName: z
|
|
168
174
|
.string()
|
|
169
|
-
.describe('Flow file name (without .json extension) from
|
|
175
|
+
.describe('Flow file name (without .json extension) from reticle_flow{action:"list"}.'),
|
|
170
176
|
sessionId: z
|
|
171
177
|
.string()
|
|
172
178
|
.optional()
|
|
@@ -195,7 +201,7 @@ export const FLOW_TOOLS = [
|
|
|
195
201
|
inputSchema: {
|
|
196
202
|
flowName: z
|
|
197
203
|
.string()
|
|
198
|
-
.describe('Flow file name (without .json extension) from
|
|
204
|
+
.describe('Flow file name (without .json extension) from reticle_flow{action:"list"}.'),
|
|
199
205
|
sessionId: z
|
|
200
206
|
.string()
|
|
201
207
|
.optional()
|
|
@@ -226,7 +232,7 @@ export const FLOW_TOOLS = [
|
|
|
226
232
|
inputSchema: {
|
|
227
233
|
flowName: z
|
|
228
234
|
.string()
|
|
229
|
-
.describe('Flow file name (without .json extension) from
|
|
235
|
+
.describe('Flow file name (without .json extension) from reticle_flow{action:"list"}.'),
|
|
230
236
|
confirmDangerous: z
|
|
231
237
|
.boolean()
|
|
232
238
|
.optional()
|
|
@@ -269,7 +275,7 @@ export const FLOW_TOOLS = [
|
|
|
269
275
|
description: 'Replay EVERY saved flow (or a given subset) and return ONE consolidated suite verdict — the ' +
|
|
270
276
|
'autonomous regression check to run after a build/change. Deterministic (no LLM per flow). ' +
|
|
271
277
|
'Returns { status: pass|fail, total, passed, failed, summary, failures:[{ flow, verdict, ' +
|
|
272
|
-
'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 ' +
|
|
273
279
|
'detail (the actionable fix). One call replaces N hand-driven replays.',
|
|
274
280
|
inputSchema: {
|
|
275
281
|
names: z
|
|
@@ -292,13 +298,26 @@ export const FLOW_TOOLS = [
|
|
|
292
298
|
failed: z.number(),
|
|
293
299
|
summary: z.string(),
|
|
294
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(),
|
|
295
308
|
},
|
|
296
309
|
handler: async (deps, args) => {
|
|
297
310
|
const sessionId = asString(args['sessionId']);
|
|
298
311
|
// "Replay all" means all of THIS app's flows (+ legacy), not every project's on a shared daemon.
|
|
312
|
+
const projectId = sessionProjectId(deps, sessionId);
|
|
299
313
|
const requested = Array.isArray(args['names'])
|
|
300
314
|
? args['names'].filter((n) => typeof n === 'string')
|
|
301
|
-
: await deps.flows.list(
|
|
315
|
+
: await deps.flows.list(projectId);
|
|
316
|
+
// verify:server — hand the whole suite to the hosted runner; it records the verification itself.
|
|
317
|
+
const cloud = await resolveProjectCloud(deps.fs, deps.reticleRoot, homedir(), process.env);
|
|
318
|
+
const server = await runServerVerify(deps, cloud, sessionId, requested);
|
|
319
|
+
if (server !== null)
|
|
320
|
+
return server;
|
|
302
321
|
// PARALLEL: flows race the DOM only when they share ONE tab. Given the lease pool, each
|
|
303
322
|
// flow gets its own isolated context, so a large suite finishes in interactive time. Opt-in via
|
|
304
323
|
// `parallel`; a missing prerequisite (no pool, unknown app URL) falls back to the sequential path
|
|
@@ -333,12 +352,32 @@ export const FLOW_TOOLS = [
|
|
|
333
352
|
})));
|
|
334
353
|
}
|
|
335
354
|
const runs = [];
|
|
355
|
+
const timed = [];
|
|
356
|
+
// The flake ledger the CLI gate already keeps — see FlakeStore. It was only ever written by
|
|
357
|
+
// `reticle flow` on the command line, so an AGENT running this tool a hundred times learned
|
|
358
|
+
// nothing about which flows are intermittent. Same product, same ledger, two surfaces, and the
|
|
359
|
+
// one an agent uses was the blind half.
|
|
360
|
+
const flakes = new FlakeStore(deps.fs, deps.reticleRoot);
|
|
336
361
|
// Sequential default: every flow replays against the same live session, so they must not overlap.
|
|
337
362
|
for (const flowName of requested) {
|
|
363
|
+
const start = deps.now();
|
|
338
364
|
const replay = await replayNamedFlow(deps, { flowName, sessionId });
|
|
339
365
|
runs.push({ replay });
|
|
366
|
+
timed.push({ replay, durationMs: deps.now() - start });
|
|
367
|
+
}
|
|
368
|
+
// Accrue this run's outcomes, then report what the ledger knows. Best-effort on both halves: a
|
|
369
|
+
// flake ledger is memory, not a gate, and it must never turn a working verify into an error.
|
|
370
|
+
for (const { replay } of runs) {
|
|
371
|
+
await flakes.record(replay.name, replay.status === ReplayStatus.OK).catch(() => undefined);
|
|
340
372
|
}
|
|
341
|
-
|
|
373
|
+
const flaky = await flakes.flakyFlows().catch(() => []);
|
|
374
|
+
// Emit the consolidated run artifact (Runs tab) + best-effort cloud push. Never blocks the verdict.
|
|
375
|
+
await persistAndSyncVerificationRun(deps, timed, projectId);
|
|
376
|
+
const verdict = buildSuiteVerdict(runs);
|
|
377
|
+
// A flow that has both passed and failed on UNCHANGED code is a different thing from a
|
|
378
|
+
// regression, and an agent that cannot tell them apart either chases a ghost or ignores a real
|
|
379
|
+
// break. Present only when the ledger has seen enough runs to say so.
|
|
380
|
+
return flaky.length > 0 ? { ...verdict, flaky } : verdict;
|
|
342
381
|
},
|
|
343
382
|
},
|
|
344
383
|
{
|
|
@@ -389,7 +428,7 @@ export const FLOW_TOOLS = [
|
|
|
389
428
|
return { error: flowErrorMessage(res.code), code: res.code };
|
|
390
429
|
// If logged into Reticle Cloud, mirror the saved flow to the team's regression suite. Best-effort
|
|
391
430
|
// and non-blocking: the flow is already on disk, so a sync failure never fails the save.
|
|
392
|
-
void syncSavedFlowToCloud(flow, session.projectId);
|
|
431
|
+
void syncSavedFlowToCloud(deps, flow, session.projectId);
|
|
393
432
|
// Return the SaveSummary as-is ({ name, stepCount, degraded, empty }) — the outputSchema
|
|
394
433
|
// declares `name`, so the old `flowName` key was silently stripped by schema-strict clients.
|
|
395
434
|
return res.value;
|
|
@@ -407,7 +446,7 @@ export const FLOW_TOOLS = [
|
|
|
407
446
|
'untouched). Returns { name, status: healed|drift|unhealable|consequence_broken|' +
|
|
408
447
|
'nothing_to_heal|error, applied, proposals[], changed[], message }.',
|
|
409
448
|
inputSchema: {
|
|
410
|
-
flowName: z.string().describe('Flow file name to heal (from
|
|
449
|
+
flowName: z.string().describe('Flow file name to heal (from reticle_flow{action:"list"}).'),
|
|
411
450
|
apply: z.boolean().optional(),
|
|
412
451
|
confirmDangerous: z
|
|
413
452
|
.boolean()
|
|
@@ -430,4 +469,3 @@ export const FLOW_TOOLS = [
|
|
|
430
469
|
handler: (deps, args) => healFlow(deps, args).then(({ name, ...rest }) => ({ flowName: name, ...rest })),
|
|
431
470
|
},
|
|
432
471
|
];
|
|
433
|
-
//# 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
|
package/dist/flows/recordings.js
CHANGED
package/dist/flows/replay.d.ts
CHANGED
|
@@ -33,4 +33,3 @@ interface ReplayStepResult {
|
|
|
33
33
|
/** Re-execute every step of a compiled program in order, stopping at the first failure. */
|
|
34
34
|
export declare function replayProgram(session: Session, program: CompiledProgram, confirmDangerous?: boolean): Promise<ReplayStepResult[]>;
|
|
35
35
|
export {};
|
|
36
|
-
//# sourceMappingURL=replay.d.ts.map
|