@descryy/mcp 0.11.5 → 0.11.7
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/dist/action-handshake.d.ts +38 -0
- package/dist/action-handshake.d.ts.map +1 -0
- package/dist/action-handshake.js +127 -0
- package/dist/action-handshake.js.map +1 -0
- package/dist/bin/descry-mcp.d.ts +7 -0
- package/dist/bin/descry-mcp.d.ts.map +1 -0
- package/dist/bin/descry-mcp.js +73 -0
- package/dist/bin/descry-mcp.js.map +1 -0
- package/dist/browser/auth.d.ts +84 -0
- package/dist/browser/auth.d.ts.map +1 -0
- package/dist/browser/auth.js +233 -0
- package/dist/browser/auth.js.map +1 -0
- package/dist/browser/capability-probe.d.ts +109 -0
- package/dist/browser/capability-probe.d.ts.map +1 -0
- package/dist/browser/capability-probe.js +201 -0
- package/dist/browser/capability-probe.js.map +1 -0
- package/dist/browser/driver.d.ts +591 -0
- package/dist/browser/driver.d.ts.map +1 -0
- package/dist/browser/driver.js +116 -0
- package/dist/browser/driver.js.map +1 -0
- package/dist/browser/evidence.d.ts +28 -0
- package/dist/browser/evidence.d.ts.map +1 -0
- package/dist/browser/evidence.js +82 -0
- package/dist/browser/evidence.js.map +1 -0
- package/dist/browser/fake-driver.d.ts +116 -0
- package/dist/browser/fake-driver.d.ts.map +1 -0
- package/dist/browser/fake-driver.js +416 -0
- package/dist/browser/fake-driver.js.map +1 -0
- package/dist/browser/fault-attribution.d.ts +178 -0
- package/dist/browser/fault-attribution.d.ts.map +1 -0
- package/dist/browser/fault-attribution.js +266 -0
- package/dist/browser/fault-attribution.js.map +1 -0
- package/dist/browser/graph-write.d.ts +45 -0
- package/dist/browser/graph-write.d.ts.map +1 -0
- package/dist/browser/graph-write.js +103 -0
- package/dist/browser/graph-write.js.map +1 -0
- package/dist/browser/identity-graph-write.d.ts +55 -0
- package/dist/browser/identity-graph-write.d.ts.map +1 -0
- package/dist/browser/identity-graph-write.js +45 -0
- package/dist/browser/identity-graph-write.js.map +1 -0
- package/dist/browser/page-probe.d.ts +81 -0
- package/dist/browser/page-probe.d.ts.map +1 -0
- package/dist/browser/page-probe.js +202 -0
- package/dist/browser/page-probe.js.map +1 -0
- package/dist/browser/playwright-driver.d.ts +115 -0
- package/dist/browser/playwright-driver.d.ts.map +1 -0
- package/dist/browser/playwright-driver.js +1545 -0
- package/dist/browser/playwright-driver.js.map +1 -0
- package/dist/browser/provider.d.ts +26 -0
- package/dist/browser/provider.d.ts.map +1 -0
- package/dist/browser/provider.js +14 -0
- package/dist/browser/provider.js.map +1 -0
- package/dist/browser/reach-recording-session.d.ts +44 -0
- package/dist/browser/reach-recording-session.d.ts.map +1 -0
- package/dist/browser/reach-recording-session.js +151 -0
- package/dist/browser/reach-recording-session.js.map +1 -0
- package/dist/browser/reachability.d.ts +168 -0
- package/dist/browser/reachability.d.ts.map +1 -0
- package/dist/browser/reachability.js +294 -0
- package/dist/browser/reachability.js.map +1 -0
- package/dist/browser/registry.d.ts +126 -0
- package/dist/browser/registry.d.ts.map +1 -0
- package/dist/browser/registry.js +177 -0
- package/dist/browser/registry.js.map +1 -0
- package/dist/browser/scenario-provenance.d.ts +23 -0
- package/dist/browser/scenario-provenance.d.ts.map +1 -0
- package/dist/browser/scenario-provenance.js +73 -0
- package/dist/browser/scenario-provenance.js.map +1 -0
- package/dist/browser/scenario-resolve.d.ts +28 -0
- package/dist/browser/scenario-resolve.d.ts.map +1 -0
- package/dist/browser/scenario-resolve.js +96 -0
- package/dist/browser/scenario-resolve.js.map +1 -0
- package/dist/browser/scenario-runner.d.ts +72 -0
- package/dist/browser/scenario-runner.d.ts.map +1 -0
- package/dist/browser/scenario-runner.js +353 -0
- package/dist/browser/scenario-runner.js.map +1 -0
- package/dist/browser/stack-parser.d.ts +19 -0
- package/dist/browser/stack-parser.d.ts.map +1 -0
- package/dist/browser/stack-parser.js +85 -0
- package/dist/browser/stack-parser.js.map +1 -0
- package/dist/browser/tool-support.d.ts +71 -0
- package/dist/browser/tool-support.d.ts.map +1 -0
- package/dist/browser/tool-support.js +216 -0
- package/dist/browser/tool-support.js.map +1 -0
- package/dist/browser/url-scheme.d.ts +14 -0
- package/dist/browser/url-scheme.d.ts.map +1 -0
- package/dist/browser/url-scheme.js +38 -0
- package/dist/browser/url-scheme.js.map +1 -0
- package/dist/browser/wait-target.d.ts +37 -0
- package/dist/browser/wait-target.d.ts.map +1 -0
- package/dist/browser/wait-target.js +54 -0
- package/dist/browser/wait-target.js.map +1 -0
- package/dist/cancellation.d.ts +20 -0
- package/dist/cancellation.d.ts.map +1 -0
- package/dist/cancellation.js +41 -0
- package/dist/cancellation.js.map +1 -0
- package/dist/capped.d.ts +39 -0
- package/dist/capped.d.ts.map +1 -0
- package/dist/capped.js +43 -0
- package/dist/capped.js.map +1 -0
- package/dist/credential-store.d.ts +22 -0
- package/dist/credential-store.d.ts.map +1 -0
- package/dist/credential-store.js +33 -0
- package/dist/credential-store.js.map +1 -0
- package/dist/disclosure-ledger.d.ts +14 -0
- package/dist/disclosure-ledger.d.ts.map +1 -0
- package/dist/disclosure-ledger.js +18 -0
- package/dist/disclosure-ledger.js.map +1 -0
- package/dist/evidence/observed-route-evidence.d.ts +25 -0
- package/dist/evidence/observed-route-evidence.d.ts.map +1 -0
- package/dist/evidence/observed-route-evidence.js +76 -0
- package/dist/evidence/observed-route-evidence.js.map +1 -0
- package/dist/heap.d.ts +61 -0
- package/dist/heap.d.ts.map +1 -0
- package/dist/heap.js +82 -0
- package/dist/heap.js.map +1 -0
- package/dist/heartbeat.d.ts +46 -0
- package/dist/heartbeat.d.ts.map +1 -0
- package/dist/heartbeat.js +66 -0
- package/dist/heartbeat.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/module-trust.d.ts +37 -0
- package/dist/module-trust.d.ts.map +1 -0
- package/dist/module-trust.js +77 -0
- package/dist/module-trust.js.map +1 -0
- package/dist/path-confinement.d.ts +31 -0
- package/dist/path-confinement.d.ts.map +1 -0
- package/dist/path-confinement.js +44 -0
- package/dist/path-confinement.js.map +1 -0
- package/dist/planner/predict-then-propose.d.ts +134 -0
- package/dist/planner/predict-then-propose.d.ts.map +1 -0
- package/dist/planner/predict-then-propose.js +138 -0
- package/dist/planner/predict-then-propose.js.map +1 -0
- package/dist/planner/propose-journey.d.ts +75 -0
- package/dist/planner/propose-journey.d.ts.map +1 -0
- package/dist/planner/propose-journey.js +96 -0
- package/dist/planner/propose-journey.js.map +1 -0
- package/dist/protocol.d.ts +57 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +90 -0
- package/dist/protocol.js.map +1 -0
- package/dist/ready-checks.d.ts +12 -0
- package/dist/ready-checks.d.ts.map +1 -0
- package/dist/ready-checks.js +43 -0
- package/dist/ready-checks.js.map +1 -0
- package/dist/registry.d.ts +103 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +327 -0
- package/dist/registry.js.map +1 -0
- package/dist/render.d.ts +623 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +968 -0
- package/dist/render.js.map +1 -0
- package/dist/runtime-registry.d.ts +22 -0
- package/dist/runtime-registry.d.ts.map +1 -0
- package/dist/runtime-registry.js +142 -0
- package/dist/runtime-registry.js.map +1 -0
- package/dist/sandbox-defaults.d.ts +41 -0
- package/dist/sandbox-defaults.d.ts.map +1 -0
- package/dist/sandbox-defaults.js +14 -0
- package/dist/sandbox-defaults.js.map +1 -0
- package/dist/scenarios/browser-run-plan-projection.d.ts +161 -0
- package/dist/scenarios/browser-run-plan-projection.d.ts.map +1 -0
- package/dist/scenarios/browser-run-plan-projection.js +264 -0
- package/dist/scenarios/browser-run-plan-projection.js.map +1 -0
- package/dist/scenarios/credential-ref.d.ts +102 -0
- package/dist/scenarios/credential-ref.d.ts.map +1 -0
- package/dist/scenarios/credential-ref.js +148 -0
- package/dist/scenarios/credential-ref.js.map +1 -0
- package/dist/scenarios/index.d.ts +7 -0
- package/dist/scenarios/index.d.ts.map +1 -0
- package/dist/scenarios/index.js +7 -0
- package/dist/scenarios/index.js.map +1 -0
- package/dist/scenarios/parse.d.ts +18 -0
- package/dist/scenarios/parse.d.ts.map +1 -0
- package/dist/scenarios/parse.js +212 -0
- package/dist/scenarios/parse.js.map +1 -0
- package/dist/scenarios/scenario.d.ts +93 -0
- package/dist/scenarios/scenario.d.ts.map +1 -0
- package/dist/scenarios/scenario.js +27 -0
- package/dist/scenarios/scenario.js.map +1 -0
- package/dist/scenarios/secret-ref.d.ts +86 -0
- package/dist/scenarios/secret-ref.d.ts.map +1 -0
- package/dist/scenarios/secret-ref.js +125 -0
- package/dist/scenarios/secret-ref.js.map +1 -0
- package/dist/scenarios/storage.d.ts +21 -0
- package/dist/scenarios/storage.d.ts.map +1 -0
- package/dist/scenarios/storage.js +103 -0
- package/dist/scenarios/storage.js.map +1 -0
- package/dist/server.d.ts +61 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +642 -0
- package/dist/server.js.map +1 -0
- package/dist/session.d.ts +356 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +779 -0
- package/dist/session.js.map +1 -0
- package/dist/tools/alias-kit.d.ts +29 -0
- package/dist/tools/alias-kit.d.ts.map +1 -0
- package/dist/tools/alias-kit.js +21 -0
- package/dist/tools/alias-kit.js.map +1 -0
- package/dist/tools/aliases.d.ts +42 -0
- package/dist/tools/aliases.d.ts.map +1 -0
- package/dist/tools/aliases.js +52 -0
- package/dist/tools/aliases.js.map +1 -0
- package/dist/tools/analyze-workspace.d.ts +52 -0
- package/dist/tools/analyze-workspace.d.ts.map +1 -0
- package/dist/tools/analyze-workspace.js +207 -0
- package/dist/tools/analyze-workspace.js.map +1 -0
- package/dist/tools/analyze.d.ts +163 -0
- package/dist/tools/analyze.d.ts.map +1 -0
- package/dist/tools/analyze.js +724 -0
- package/dist/tools/analyze.js.map +1 -0
- package/dist/tools/browser-click.d.ts +18 -0
- package/dist/tools/browser-click.d.ts.map +1 -0
- package/dist/tools/browser-click.js +110 -0
- package/dist/tools/browser-click.js.map +1 -0
- package/dist/tools/browser-close-session.d.ts +39 -0
- package/dist/tools/browser-close-session.d.ts.map +1 -0
- package/dist/tools/browser-close-session.js +120 -0
- package/dist/tools/browser-close-session.js.map +1 -0
- package/dist/tools/browser-fill.d.ts +18 -0
- package/dist/tools/browser-fill.d.ts.map +1 -0
- package/dist/tools/browser-fill.js +117 -0
- package/dist/tools/browser-fill.js.map +1 -0
- package/dist/tools/browser-navigate.d.ts +15 -0
- package/dist/tools/browser-navigate.d.ts.map +1 -0
- package/dist/tools/browser-navigate.js +106 -0
- package/dist/tools/browser-navigate.js.map +1 -0
- package/dist/tools/browser-read.d.ts +33 -0
- package/dist/tools/browser-read.d.ts.map +1 -0
- package/dist/tools/browser-read.js +105 -0
- package/dist/tools/browser-read.js.map +1 -0
- package/dist/tools/browser-run-scenario.d.ts +28 -0
- package/dist/tools/browser-run-scenario.d.ts.map +1 -0
- package/dist/tools/browser-run-scenario.js +238 -0
- package/dist/tools/browser-run-scenario.js.map +1 -0
- package/dist/tools/browser-save-scenario.d.ts +19 -0
- package/dist/tools/browser-save-scenario.d.ts.map +1 -0
- package/dist/tools/browser-save-scenario.js +447 -0
- package/dist/tools/browser-save-scenario.js.map +1 -0
- package/dist/tools/browser-select.d.ts +20 -0
- package/dist/tools/browser-select.d.ts.map +1 -0
- package/dist/tools/browser-select.js +120 -0
- package/dist/tools/browser-select.js.map +1 -0
- package/dist/tools/browser-snapshot.d.ts +46 -0
- package/dist/tools/browser-snapshot.d.ts.map +1 -0
- package/dist/tools/browser-snapshot.js +127 -0
- package/dist/tools/browser-snapshot.js.map +1 -0
- package/dist/tools/browser-start-session.d.ts +24 -0
- package/dist/tools/browser-start-session.d.ts.map +1 -0
- package/dist/tools/browser-start-session.js +653 -0
- package/dist/tools/browser-start-session.js.map +1 -0
- package/dist/tools/browser-submit.d.ts +18 -0
- package/dist/tools/browser-submit.d.ts.map +1 -0
- package/dist/tools/browser-submit.js +106 -0
- package/dist/tools/browser-submit.js.map +1 -0
- package/dist/tools/browser-type.d.ts +18 -0
- package/dist/tools/browser-type.d.ts.map +1 -0
- package/dist/tools/browser-type.js +115 -0
- package/dist/tools/browser-type.js.map +1 -0
- package/dist/tools/browser-wait-for.d.ts +45 -0
- package/dist/tools/browser-wait-for.d.ts.map +1 -0
- package/dist/tools/browser-wait-for.js +164 -0
- package/dist/tools/browser-wait-for.js.map +1 -0
- package/dist/tools/browser.d.ts +69 -0
- package/dist/tools/browser.d.ts.map +1 -0
- package/dist/tools/browser.js +326 -0
- package/dist/tools/browser.js.map +1 -0
- package/dist/tools/chain.d.ts +41 -0
- package/dist/tools/chain.d.ts.map +1 -0
- package/dist/tools/chain.js +101 -0
- package/dist/tools/chain.js.map +1 -0
- package/dist/tools/change-scope.d.ts +25 -0
- package/dist/tools/change-scope.d.ts.map +1 -0
- package/dist/tools/change-scope.js +103 -0
- package/dist/tools/change-scope.js.map +1 -0
- package/dist/tools/code-context.d.ts +83 -0
- package/dist/tools/code-context.d.ts.map +1 -0
- package/dist/tools/code-context.js +432 -0
- package/dist/tools/code-context.js.map +1 -0
- package/dist/tools/contracts.d.ts +74 -0
- package/dist/tools/contracts.d.ts.map +1 -0
- package/dist/tools/contracts.js +214 -0
- package/dist/tools/contracts.js.map +1 -0
- package/dist/tools/cross-pr.d.ts +178 -0
- package/dist/tools/cross-pr.d.ts.map +1 -0
- package/dist/tools/cross-pr.js +362 -0
- package/dist/tools/cross-pr.js.map +1 -0
- package/dist/tools/disclosure.d.ts +75 -0
- package/dist/tools/disclosure.d.ts.map +1 -0
- package/dist/tools/disclosure.js +325 -0
- package/dist/tools/disclosure.js.map +1 -0
- package/dist/tools/draw-conclusion.d.ts +55 -0
- package/dist/tools/draw-conclusion.d.ts.map +1 -0
- package/dist/tools/draw-conclusion.js +243 -0
- package/dist/tools/draw-conclusion.js.map +1 -0
- package/dist/tools/git-context.d.ts +39 -0
- package/dist/tools/git-context.d.ts.map +1 -0
- package/dist/tools/git-context.js +374 -0
- package/dist/tools/git-context.js.map +1 -0
- package/dist/tools/git-diff.d.ts +45 -0
- package/dist/tools/git-diff.d.ts.map +1 -0
- package/dist/tools/git-diff.js +338 -0
- package/dist/tools/git-diff.js.map +1 -0
- package/dist/tools/git-history.d.ts +16 -0
- package/dist/tools/git-history.d.ts.map +1 -0
- package/dist/tools/git-history.js +106 -0
- package/dist/tools/git-history.js.map +1 -0
- package/dist/tools/history.d.ts +34 -0
- package/dist/tools/history.d.ts.map +1 -0
- package/dist/tools/history.js +121 -0
- package/dist/tools/history.js.map +1 -0
- package/dist/tools/impact.d.ts +46 -0
- package/dist/tools/impact.d.ts.map +1 -0
- package/dist/tools/impact.js +225 -0
- package/dist/tools/impact.js.map +1 -0
- package/dist/tools/index.d.ts +59 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +70 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/kit.d.ts +165 -0
- package/dist/tools/kit.d.ts.map +1 -0
- package/dist/tools/kit.js +153 -0
- package/dist/tools/kit.js.map +1 -0
- package/dist/tools/link-workspace.d.ts +24 -0
- package/dist/tools/link-workspace.d.ts.map +1 -0
- package/dist/tools/link-workspace.js +131 -0
- package/dist/tools/link-workspace.js.map +1 -0
- package/dist/tools/lookup.d.ts +19 -0
- package/dist/tools/lookup.d.ts.map +1 -0
- package/dist/tools/lookup.js +63 -0
- package/dist/tools/lookup.js.map +1 -0
- package/dist/tools/mark-incident.d.ts +28 -0
- package/dist/tools/mark-incident.d.ts.map +1 -0
- package/dist/tools/mark-incident.js +171 -0
- package/dist/tools/mark-incident.js.map +1 -0
- package/dist/tools/merged-browser.d.ts +11 -0
- package/dist/tools/merged-browser.d.ts.map +1 -0
- package/dist/tools/merged-browser.js +20 -0
- package/dist/tools/merged-browser.js.map +1 -0
- package/dist/tools/merged-context.d.ts +11 -0
- package/dist/tools/merged-context.d.ts.map +1 -0
- package/dist/tools/merged-context.js +21 -0
- package/dist/tools/merged-context.js.map +1 -0
- package/dist/tools/merged-observe.d.ts +13 -0
- package/dist/tools/merged-observe.d.ts.map +1 -0
- package/dist/tools/merged-observe.js +21 -0
- package/dist/tools/merged-observe.js.map +1 -0
- package/dist/tools/merged-workspace.d.ts +14 -0
- package/dist/tools/merged-workspace.d.ts.map +1 -0
- package/dist/tools/merged-workspace.js +21 -0
- package/dist/tools/merged-workspace.js.map +1 -0
- package/dist/tools/observe-runtime.d.ts +262 -0
- package/dist/tools/observe-runtime.d.ts.map +1 -0
- package/dist/tools/observe-runtime.js +1966 -0
- package/dist/tools/observe-runtime.js.map +1 -0
- package/dist/tools/observe-tests.d.ts +57 -0
- package/dist/tools/observe-tests.d.ts.map +1 -0
- package/dist/tools/observe-tests.js +391 -0
- package/dist/tools/observe-tests.js.map +1 -0
- package/dist/tools/observe.d.ts +28 -0
- package/dist/tools/observe.d.ts.map +1 -0
- package/dist/tools/observe.js +291 -0
- package/dist/tools/observe.js.map +1 -0
- package/dist/tools/pr-analysis.d.ts +189 -0
- package/dist/tools/pr-analysis.d.ts.map +1 -0
- package/dist/tools/pr-analysis.js +365 -0
- package/dist/tools/pr-analysis.js.map +1 -0
- package/dist/tools/pre-push.d.ts +168 -0
- package/dist/tools/pre-push.d.ts.map +1 -0
- package/dist/tools/pre-push.js +416 -0
- package/dist/tools/pre-push.js.map +1 -0
- package/dist/tools/predict-reach.d.ts +57 -0
- package/dist/tools/predict-reach.d.ts.map +1 -0
- package/dist/tools/predict-reach.js +183 -0
- package/dist/tools/predict-reach.js.map +1 -0
- package/dist/tools/propagation.d.ts +37 -0
- package/dist/tools/propagation.d.ts.map +1 -0
- package/dist/tools/propagation.js +162 -0
- package/dist/tools/propagation.js.map +1 -0
- package/dist/tools/propose-journey.d.ts +16 -0
- package/dist/tools/propose-journey.d.ts.map +1 -0
- package/dist/tools/propose-journey.js +132 -0
- package/dist/tools/propose-journey.js.map +1 -0
- package/dist/tools/prove-reach.d.ts +74 -0
- package/dist/tools/prove-reach.d.ts.map +1 -0
- package/dist/tools/prove-reach.js +274 -0
- package/dist/tools/prove-reach.js.map +1 -0
- package/dist/tools/questions.d.ts +30 -0
- package/dist/tools/questions.d.ts.map +1 -0
- package/dist/tools/questions.js +230 -0
- package/dist/tools/questions.js.map +1 -0
- package/dist/tools/refusal-fetch.d.ts +35 -0
- package/dist/tools/refusal-fetch.d.ts.map +1 -0
- package/dist/tools/refusal-fetch.js +123 -0
- package/dist/tools/refusal-fetch.js.map +1 -0
- package/dist/tools/runtime-incident.d.ts +33 -0
- package/dist/tools/runtime-incident.d.ts.map +1 -0
- package/dist/tools/runtime-incident.js +67 -0
- package/dist/tools/runtime-incident.js.map +1 -0
- package/dist/tools/runtime-journey-drive.d.ts +102 -0
- package/dist/tools/runtime-journey-drive.d.ts.map +1 -0
- package/dist/tools/runtime-journey-drive.js +247 -0
- package/dist/tools/runtime-journey-drive.js.map +1 -0
- package/dist/tools/scope.d.ts +45 -0
- package/dist/tools/scope.d.ts.map +1 -0
- package/dist/tools/scope.js +217 -0
- package/dist/tools/scope.js.map +1 -0
- package/dist/tools/similar-incidents.d.ts +43 -0
- package/dist/tools/similar-incidents.d.ts.map +1 -0
- package/dist/tools/similar-incidents.js +190 -0
- package/dist/tools/similar-incidents.js.map +1 -0
- package/dist/tools/validate.d.ts +133 -0
- package/dist/tools/validate.d.ts.map +1 -0
- package/dist/tools/validate.js +488 -0
- package/dist/tools/validate.js.map +1 -0
- package/dist/tools/verb.d.ts +46 -0
- package/dist/tools/verb.d.ts.map +1 -0
- package/dist/tools/verb.js +78 -0
- package/dist/tools/verb.js.map +1 -0
- package/dist/tools/verification-status.d.ts +38 -0
- package/dist/tools/verification-status.d.ts.map +1 -0
- package/dist/tools/verification-status.js +203 -0
- package/dist/tools/verification-status.js.map +1 -0
- package/dist/tools/verify-claim.d.ts +29 -0
- package/dist/tools/verify-claim.d.ts.map +1 -0
- package/dist/tools/verify-claim.js +218 -0
- package/dist/tools/verify-claim.js.map +1 -0
- package/dist/tools/workspace.d.ts +28 -0
- package/dist/tools/workspace.d.ts.map +1 -0
- package/dist/tools/workspace.js +94 -0
- package/dist/tools/workspace.js.map +1 -0
- package/dist/transport.d.ts +32 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +85 -0
- package/dist/transport.js.map +1 -0
- package/dist/workspace-index.d.ts +164 -0
- package/dist/workspace-index.d.ts.map +1 -0
- package/dist/workspace-index.js +381 -0
- package/dist/workspace-index.js.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `prove_reach` — closes RG-10's loop. "Rename that column and these screens go blank" is
|
|
3
|
+
* three claims, made in order, each on evidence the last one didn't have:
|
|
4
|
+
*
|
|
5
|
+
* 1. **Predict** — from a node (typically a `DATABASE_COLUMN`), walk `reachablePages`
|
|
6
|
+
* (`@descryy/core`) to whatever `PAGE`/`COMPONENT` nodes the data reaches, and propose a
|
|
7
|
+
* navigate-only journey to them, exactly as `predict_reach` already does — this tool calls
|
|
8
|
+
* the identical pure planner (`../planner/predict-then-propose.ts#predictThenPropose`), never
|
|
9
|
+
* a second implementation. Nothing runs yet: a caller who has not yet approved the drive gets
|
|
10
|
+
* back the prediction, the proposal and a confirmation token, and this tool's `describeAction`
|
|
11
|
+
* is what mints that token — the dispatcher (`../action-handshake.ts`) never calls `run` at
|
|
12
|
+
* all until the second call arrives, so "nothing runs" is structural, not a promise this file
|
|
13
|
+
* keeps by convention.
|
|
14
|
+
* 2. **Approve and drive** — a second call, `confirmToken` in hand, drives the exact proposed
|
|
15
|
+
* scenario for real via `../browser/scenario-runner.ts#replayScenario`, in a browser session
|
|
16
|
+
* the caller already started and consented (`browser({ verb: "start_session" })`). Never boots an app,
|
|
17
|
+
* never widens the journey beyond what was proposed: the scenario driven is the one frozen at
|
|
18
|
+
* mint time, byte for byte.
|
|
19
|
+
* 3. **Prove** — correlates which of the predicted pages the drive's own step results actually
|
|
20
|
+
* reached (`../planner/predict-then-propose.ts#visitedPageIds` + `#proveOrDisprove`) — a page
|
|
21
|
+
* counts as visited only when the exact navigate URL built from its own route name replayed
|
|
22
|
+
* as `"ran"`, never a guess from proximity.
|
|
23
|
+
* 4. **Conclude** — routes the real, walked graph path (`#combinedGraphPath`, never a synthesised
|
|
24
|
+
* one) and the runtime evidence the drive actually observed (console errors, failed requests)
|
|
25
|
+
* through the same finding funnel `draw_conclusion` uses — `reportCategory`, `@descryy/ir`,
|
|
26
|
+
* `packages/ir/src/finding.ts` — so the reply carries a governed category, not a raw tally the
|
|
27
|
+
* caller has to interpret. A drive that reached every predicted page cleanly, with nothing
|
|
28
|
+
* wrong observed, reports so honestly: `hasRuntimeEvidence` is false and the category is
|
|
29
|
+
* `unconfirmed` by G3's own precondition, not "confirmed" because the pages loaded.
|
|
30
|
+
*
|
|
31
|
+
* **class: "action"**, gated only when there is something to drive: a node that reaches nothing,
|
|
32
|
+
* or reaches only non-path-shaped pages/components with no navigate step to propose, has nothing
|
|
33
|
+
* to approve, so `describeAction` returns `undefined` and this reports the prediction immediately
|
|
34
|
+
* — same discipline as `predict_reach`'s own empty case, never a gate for its own sake.
|
|
35
|
+
*/
|
|
36
|
+
import { type ProvenReach } from "../planner/predict-then-propose.ts";
|
|
37
|
+
import type { JourneyCandidateNode } from "../planner/propose-journey.ts";
|
|
38
|
+
import type { Scenario } from "../scenarios/index.ts";
|
|
39
|
+
import { type BriefNode, type NodeCandidates, type ToolDefinition } from "./kit.ts";
|
|
40
|
+
export interface DriveResult {
|
|
41
|
+
readonly outcome: "passed" | "failed" | "unresolved" | "unverified";
|
|
42
|
+
readonly steps: readonly {
|
|
43
|
+
readonly url: string;
|
|
44
|
+
readonly status: string;
|
|
45
|
+
}[];
|
|
46
|
+
readonly consoleErrorCount: number;
|
|
47
|
+
readonly failedRequestCount: number;
|
|
48
|
+
}
|
|
49
|
+
export interface ProveReachReport {
|
|
50
|
+
readonly from: BriefNode;
|
|
51
|
+
readonly reachedPages: readonly BriefNode[];
|
|
52
|
+
readonly proposal: {
|
|
53
|
+
readonly scenario: Scenario;
|
|
54
|
+
readonly reachedNotProposed: readonly JourneyCandidateNode[];
|
|
55
|
+
} | null;
|
|
56
|
+
/** Null until a real drive ran — this call's own drive, never a caller-supplied one (that join
|
|
57
|
+
* is `predict_reach`'s `observedNodeIds`, a different, evidence-already-in-hand path). */
|
|
58
|
+
readonly drive: DriveResult | null;
|
|
59
|
+
readonly proof: ProvenReach | null;
|
|
60
|
+
/** The governed finding — null only when nothing was driven, because a category about a drive
|
|
61
|
+
* that never happened would be a claim this tool has no evidence for. */
|
|
62
|
+
readonly conclusion: {
|
|
63
|
+
readonly failurePoint: string;
|
|
64
|
+
readonly category: string;
|
|
65
|
+
readonly reliabilityClass: string;
|
|
66
|
+
readonly resolution: number;
|
|
67
|
+
readonly independentSignalTypes: number;
|
|
68
|
+
readonly directMechanismEvidence: boolean;
|
|
69
|
+
readonly hasRuntimeEvidence: boolean;
|
|
70
|
+
} | null;
|
|
71
|
+
}
|
|
72
|
+
export type ProveReachData = ProveReachReport | NodeCandidates;
|
|
73
|
+
export declare const proveReachTool: ToolDefinition;
|
|
74
|
+
//# sourceMappingURL=prove-reach.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prove-reach.d.ts","sourceRoot":"","sources":["../../src/tools/prove-reach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAeH,OAAO,EAML,KAAK,WAAW,EACjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAG1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAML,KAAK,SAAS,EACd,KAAK,cAAc,EAEnB,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAIlB,MAAM,WAAW,WAAW;IAC1B,QAAQ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@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `prove_reach` — closes RG-10's loop. "Rename that column and these screens go blank" is
|
|
3
|
+
* three claims, made in order, each on evidence the last one didn't have:
|
|
4
|
+
*
|
|
5
|
+
* 1. **Predict** — from a node (typically a `DATABASE_COLUMN`), walk `reachablePages`
|
|
6
|
+
* (`@descryy/core`) to whatever `PAGE`/`COMPONENT` nodes the data reaches, and propose a
|
|
7
|
+
* navigate-only journey to them, exactly as `predict_reach` already does — this tool calls
|
|
8
|
+
* the identical pure planner (`../planner/predict-then-propose.ts#predictThenPropose`), never
|
|
9
|
+
* a second implementation. Nothing runs yet: a caller who has not yet approved the drive gets
|
|
10
|
+
* back the prediction, the proposal and a confirmation token, and this tool's `describeAction`
|
|
11
|
+
* is what mints that token — the dispatcher (`../action-handshake.ts`) never calls `run` at
|
|
12
|
+
* all until the second call arrives, so "nothing runs" is structural, not a promise this file
|
|
13
|
+
* keeps by convention.
|
|
14
|
+
* 2. **Approve and drive** — a second call, `confirmToken` in hand, drives the exact proposed
|
|
15
|
+
* scenario for real via `../browser/scenario-runner.ts#replayScenario`, in a browser session
|
|
16
|
+
* the caller already started and consented (`browser({ verb: "start_session" })`). Never boots an app,
|
|
17
|
+
* never widens the journey beyond what was proposed: the scenario driven is the one frozen at
|
|
18
|
+
* mint time, byte for byte.
|
|
19
|
+
* 3. **Prove** — correlates which of the predicted pages the drive's own step results actually
|
|
20
|
+
* reached (`../planner/predict-then-propose.ts#visitedPageIds` + `#proveOrDisprove`) — a page
|
|
21
|
+
* counts as visited only when the exact navigate URL built from its own route name replayed
|
|
22
|
+
* as `"ran"`, never a guess from proximity.
|
|
23
|
+
* 4. **Conclude** — routes the real, walked graph path (`#combinedGraphPath`, never a synthesised
|
|
24
|
+
* one) and the runtime evidence the drive actually observed (console errors, failed requests)
|
|
25
|
+
* through the same finding funnel `draw_conclusion` uses — `reportCategory`, `@descryy/ir`,
|
|
26
|
+
* `packages/ir/src/finding.ts` — so the reply carries a governed category, not a raw tally the
|
|
27
|
+
* caller has to interpret. A drive that reached every predicted page cleanly, with nothing
|
|
28
|
+
* wrong observed, reports so honestly: `hasRuntimeEvidence` is false and the category is
|
|
29
|
+
* `unconfirmed` by G3's own precondition, not "confirmed" because the pages loaded.
|
|
30
|
+
*
|
|
31
|
+
* **class: "action"**, gated only when there is something to drive: a node that reaches nothing,
|
|
32
|
+
* or reaches only non-path-shaped pages/components with no navigate step to propose, has nothing
|
|
33
|
+
* to approve, so `describeAction` returns `undefined` and this reports the prediction immediately
|
|
34
|
+
* — same discipline as `predict_reach`'s own empty case, never a gate for its own sake.
|
|
35
|
+
*/
|
|
36
|
+
import { directMechanismEvidence, evidencePrecondition, humanAssertedOnPath, independentSignalTypes, minimumResolution, reportCategory, } from "@descryy/ir";
|
|
37
|
+
import { combinedGraphPath, predictThenPropose, proveOrDisprove, visitedPageIds, } from "../planner/predict-then-propose.js";
|
|
38
|
+
import { browserAnswer, mutationRefusal, useSession, withinConsent } from "../browser/tool-support.js";
|
|
39
|
+
import { mutates, replayScenario } from "../browser/scenario-runner.js";
|
|
40
|
+
import { answer, briefNode, requiredString, optionalString, ToolInputError, } from "./kit.js";
|
|
41
|
+
import { resolveOneNode } from "./lookup.js";
|
|
42
|
+
const SCHEMA = {
|
|
43
|
+
type: "object",
|
|
44
|
+
properties: {
|
|
45
|
+
nodeId: { type: "string", description: "Node to predict reach from — typically a data column." },
|
|
46
|
+
symbol: {
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "Start symbol if no node id. Ambiguous matches are refused.",
|
|
49
|
+
},
|
|
50
|
+
file: { type: "string", description: "Path, to disambiguate \"symbol\"." },
|
|
51
|
+
targetUrl: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "REQUIRED. Base URL — origin sessionId was consented for.",
|
|
54
|
+
},
|
|
55
|
+
sessionId: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "REQUIRED. Session id from browser's start_session. Never widens consent beyond it.",
|
|
58
|
+
},
|
|
59
|
+
name: { type: "string", description: "Name for the proposed scenario. Default \"predicted-journey\"." },
|
|
60
|
+
confirmToken: {
|
|
61
|
+
type: "string",
|
|
62
|
+
description: "First call predicts only. Arguments frozen when the token was minted; a changed field is discarded and disclosed.",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
required: ["targetUrl", "sessionId"],
|
|
66
|
+
additionalProperties: false,
|
|
67
|
+
};
|
|
68
|
+
/** Resolves the start node and computes the identical prediction `predict_reach` would, from the
|
|
69
|
+
* same pure planner. Shared by `describeAction` and `run` so the two can never compute two
|
|
70
|
+
* different predictions for what a caller reads as one call. */
|
|
71
|
+
function prepare(args, ctx) {
|
|
72
|
+
const nodeIdArg = optionalString(args, "nodeId");
|
|
73
|
+
const symbol = optionalString(args, "symbol");
|
|
74
|
+
const file = optionalString(args, "file");
|
|
75
|
+
const targetUrl = requiredString(args, "targetUrl");
|
|
76
|
+
const sessionId = requiredString(args, "sessionId");
|
|
77
|
+
const name = optionalString(args, "name") ?? "predicted-journey";
|
|
78
|
+
if (nodeIdArg === undefined && symbol === undefined && file === undefined) {
|
|
79
|
+
throw new ToolInputError('give one of "nodeId", "symbol" or "file"');
|
|
80
|
+
}
|
|
81
|
+
const found = resolveOneNode(ctx.session, { nodeId: nodeIdArg, symbol, file });
|
|
82
|
+
if (found.node === null) {
|
|
83
|
+
return { ok: false, candidates: found.candidates.map(briefNode), headline: found.headline, notes: found.notes };
|
|
84
|
+
}
|
|
85
|
+
const provider = ctx.session.provider();
|
|
86
|
+
const base = provider.baseStamp();
|
|
87
|
+
const predicted = predictThenPropose(provider, found.node.id, { targetUrl, name, savedAtCommit: base.commitSha ?? "" });
|
|
88
|
+
return { ok: true, value: { node: found.node, predicted, targetUrl, sessionId } };
|
|
89
|
+
}
|
|
90
|
+
function drivable(predicted) {
|
|
91
|
+
return predicted.proposal !== null && predicted.proposal.scenario.steps.length > 0;
|
|
92
|
+
}
|
|
93
|
+
function emptyReport(node, predicted) {
|
|
94
|
+
return {
|
|
95
|
+
from: node === null ? { id: "", type: "", name: "", resolution: 0 } : briefNode(node),
|
|
96
|
+
reachedPages: predicted === null ? [] : predicted.reachedPages.map((n) => ({ id: n.id, type: n.type, name: n.name, resolution: 0 })),
|
|
97
|
+
proposal: predicted?.proposal === null || predicted === null
|
|
98
|
+
? null
|
|
99
|
+
: { scenario: predicted.proposal.scenario, reachedNotProposed: predicted.proposal.reachedNotProposed },
|
|
100
|
+
drive: null,
|
|
101
|
+
proof: null,
|
|
102
|
+
conclusion: null,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
async function describeAction(args, ctx) {
|
|
106
|
+
const prep = prepare(args, ctx);
|
|
107
|
+
if (!prep.ok)
|
|
108
|
+
return undefined; // nothing resolvable — run() reports the refusal immediately, no gate
|
|
109
|
+
const { node, predicted, sessionId } = prep.value;
|
|
110
|
+
if (!drivable(predicted))
|
|
111
|
+
return undefined; // nothing to drive — run() reports the prediction alone
|
|
112
|
+
const steps = predicted.proposal.scenario.steps.length;
|
|
113
|
+
const pageNames = predicted.reachedPages.map((p) => p.name);
|
|
114
|
+
return (`drive ${steps} navigate step(s) in browser session "${sessionId}", toward ${predicted.reachedPages.length} ` +
|
|
115
|
+
`predicted page/component reached from ${node.name} (${pageNames.slice(0, 5).join(", ")}${pageNames.length > 5 ? ", …" : ""}), ` +
|
|
116
|
+
"then correlate what the drive actually reached — and any console error or failed request observed while " +
|
|
117
|
+
"it ran — into a governed finding via the same gate draw_conclusion uses.");
|
|
118
|
+
}
|
|
119
|
+
async function run(args, ctx) {
|
|
120
|
+
const prep = prepare(args, ctx);
|
|
121
|
+
const base = ctx.session.provider().baseStamp();
|
|
122
|
+
if (!prep.ok) {
|
|
123
|
+
return {
|
|
124
|
+
result: { data: { candidates: prep.candidates }, stamp: { ...base, resolutionFloor: 0 }, truncated: false, notes: prep.notes },
|
|
125
|
+
nameLevel: true,
|
|
126
|
+
state: "refused",
|
|
127
|
+
headline: prep.headline,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
const { node, predicted, targetUrl, sessionId } = prep.value;
|
|
131
|
+
const notes = [...predicted.notes];
|
|
132
|
+
if (!drivable(predicted)) {
|
|
133
|
+
return answer({
|
|
134
|
+
headline: predicted.proposal === null
|
|
135
|
+
? `${node.name} reaches no PAGE or COMPONENT this graph can walk to. Not a claim it reaches none in the running application — see notes.`
|
|
136
|
+
: `${node.name} reaches ${predicted.reachedPages.length} page/component, but none has a path-shaped route name — nothing to drive or prove.`,
|
|
137
|
+
state: "empty",
|
|
138
|
+
nameLevel: true,
|
|
139
|
+
resolutionFloor: 0,
|
|
140
|
+
commitSha: base.commitSha,
|
|
141
|
+
graphBuiltAt: base.graphBuiltAt,
|
|
142
|
+
irSchemaVersion: base.irSchemaVersion,
|
|
143
|
+
commitSpread: base.commitSpread,
|
|
144
|
+
repoCount: base.repoCount,
|
|
145
|
+
notes,
|
|
146
|
+
data: emptyReport(node, predicted),
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
// A non-empty proposal only reaches this line once the two-call handshake has already
|
|
150
|
+
// approved it — `describeAction` above gates every other case. Drive it, exactly as proposed.
|
|
151
|
+
const scenario = predicted.proposal.scenario;
|
|
152
|
+
const found = await useSession(ctx.session.browserSessions(), sessionId);
|
|
153
|
+
if (!found.ok) {
|
|
154
|
+
return browserAnswer({
|
|
155
|
+
ctx,
|
|
156
|
+
state: found.dead.state,
|
|
157
|
+
headline: found.dead.headline,
|
|
158
|
+
notes: [...notes, ...found.dead.notes],
|
|
159
|
+
data: emptyReport(node, predicted),
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
const { entry } = found;
|
|
163
|
+
if (!withinConsent(entry, targetUrl)) {
|
|
164
|
+
return browserAnswer({
|
|
165
|
+
ctx,
|
|
166
|
+
state: "refused",
|
|
167
|
+
headline: `The predicted journey targets ${targetUrl}, outside this session's consent.`,
|
|
168
|
+
notes: [
|
|
169
|
+
...notes,
|
|
170
|
+
`This session was consented for ${entry.consentedOrigin} only. Start a session against that origin to drive this prediction.`,
|
|
171
|
+
],
|
|
172
|
+
data: emptyReport(node, predicted),
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
const refusedForSafety = mutationRefusal(entry);
|
|
176
|
+
if (refusedForSafety !== null && mutates(scenario)) {
|
|
177
|
+
// Dead in practice — proposeJourney only ever emits navigate steps — kept for the day a
|
|
178
|
+
// future planner proposes more, so a readOnly profile still refuses rather than driving.
|
|
179
|
+
return browserAnswer({
|
|
180
|
+
ctx,
|
|
181
|
+
state: "refused",
|
|
182
|
+
headline: `${entry.profile?.name ?? "This environment"} is read-only.`,
|
|
183
|
+
notes: [...notes, refusedForSafety],
|
|
184
|
+
data: emptyReport(node, predicted),
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
if (entry.page.currentUrl() !== scenario.targetUrl) {
|
|
188
|
+
await entry.page.navigate(scenario.targetUrl);
|
|
189
|
+
}
|
|
190
|
+
ctx.progress(`Driving the predicted journey from ${node.name}`);
|
|
191
|
+
const replay = await replayScenario(ctx, ctx.session.browserSessions(), sessionId, scenario, process.env, ctx.session.credentialStore);
|
|
192
|
+
const visited = visitedPageIds(predicted, targetUrl, replay.steps.map((s) => ({ url: s.url, status: s.status })));
|
|
193
|
+
const proof = proveOrDisprove(predicted, { visitedNodeIds: visited });
|
|
194
|
+
// The hypothesis's own structural mechanism — every page the walk predicted, not only the ones
|
|
195
|
+
// this one drive happened to confirm — so the finding's graphPath describes what the graph
|
|
196
|
+
// claims propagates, and the runtime evidence below is what says whether it broke anything.
|
|
197
|
+
const graphPath = combinedGraphPath(predicted, predicted.reachedPages.map((p) => p.id));
|
|
198
|
+
const runtimeEvidence = [
|
|
199
|
+
...replay.evidence.consoleErrors.map((e) => ({ signal: "browser-console", detail: e.text, directMechanism: false })),
|
|
200
|
+
...replay.evidence.failedRequests.map((r) => {
|
|
201
|
+
const reached = replay.graph.reached.find((n) => n.via.method === r.method && n.via.url === r.url);
|
|
202
|
+
return {
|
|
203
|
+
signal: "network",
|
|
204
|
+
detail: `${r.method} ${r.url} failed${r.status === null ? "" : ` (status ${r.status})`}`,
|
|
205
|
+
...(reached === undefined ? {} : { nodeId: reached.nodeId, directMechanism: reached.nodeId === node.id }),
|
|
206
|
+
};
|
|
207
|
+
}),
|
|
208
|
+
];
|
|
209
|
+
const hasRuntimeEvidence = evidencePrecondition(runtimeEvidence);
|
|
210
|
+
const resolution = minimumResolution(graphPath);
|
|
211
|
+
const humanAsserted = humanAssertedOnPath(graphPath);
|
|
212
|
+
const eSignals = independentSignalTypes(runtimeEvidence);
|
|
213
|
+
const mMechanism = directMechanismEvidence(runtimeEvidence, node.id);
|
|
214
|
+
const gated = reportCategory({
|
|
215
|
+
hasRuntimeEvidence,
|
|
216
|
+
independentSignalTypes: eSignals,
|
|
217
|
+
directMechanismEvidence: mMechanism,
|
|
218
|
+
resolution,
|
|
219
|
+
// Name-level throughout — a route path is read off a node's qualified name, same as
|
|
220
|
+
// predict_reach's own cap, never a type-checked shape.
|
|
221
|
+
nameLevel: true,
|
|
222
|
+
humanAsserted,
|
|
223
|
+
});
|
|
224
|
+
const proofNotes = [
|
|
225
|
+
`Drove the proposed journey for real: ${proof.proven.length} of ${predicted.reachedPages.length} predicted ` +
|
|
226
|
+
`page(s)/component(s) confirmed reached, ${proof.disproven.length} not reached by this drive.`,
|
|
227
|
+
hasRuntimeEvidence
|
|
228
|
+
? `${runtimeEvidence.length} runtime observation(s) fed the gate — ${replay.evidence.consoleErrors.length} console error(s), ` +
|
|
229
|
+
`${replay.evidence.failedRequests.length} failed request(s).`
|
|
230
|
+
: "No console error or failed request was observed during this drive, so G3's evidence precondition fails " +
|
|
231
|
+
"and this reports unconfirmed regardless of the graph path — reaching a page cleanly is not evidence it broke.",
|
|
232
|
+
];
|
|
233
|
+
return browserAnswer({
|
|
234
|
+
ctx,
|
|
235
|
+
headline: `"${node.name}": ${gated.category} (reliability ${gated.reliabilityClass}). Drove ${scenario.steps.length} step(s), ` +
|
|
236
|
+
`${proof.proven.length} predicted page(s) confirmed reached, ${proof.disproven.length} not.`,
|
|
237
|
+
notes: [...notes, ...proofNotes, ...replay.notes],
|
|
238
|
+
data: {
|
|
239
|
+
from: briefNode(node),
|
|
240
|
+
reachedPages: predicted.reachedPages.map((n) => ({ id: n.id, type: n.type, name: n.name, resolution: 0 })),
|
|
241
|
+
proposal: { scenario: predicted.proposal.scenario, reachedNotProposed: predicted.proposal.reachedNotProposed },
|
|
242
|
+
drive: {
|
|
243
|
+
outcome: replay.outcome,
|
|
244
|
+
steps: replay.steps.map((s) => ({ url: s.url, status: s.status })),
|
|
245
|
+
consoleErrorCount: replay.evidence.consoleErrors.length,
|
|
246
|
+
failedRequestCount: replay.evidence.failedRequests.length,
|
|
247
|
+
},
|
|
248
|
+
proof,
|
|
249
|
+
conclusion: {
|
|
250
|
+
failurePoint: node.id,
|
|
251
|
+
category: gated.category,
|
|
252
|
+
reliabilityClass: gated.reliabilityClass,
|
|
253
|
+
resolution,
|
|
254
|
+
independentSignalTypes: eSignals,
|
|
255
|
+
directMechanismEvidence: mMechanism,
|
|
256
|
+
hasRuntimeEvidence,
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
export const proveReachTool = {
|
|
262
|
+
name: "prove_reach",
|
|
263
|
+
class: "action",
|
|
264
|
+
tier: "conclusion",
|
|
265
|
+
version: "1.0.0",
|
|
266
|
+
title: "Predict which pages a data change reaches, then drive a real browser to prove or disprove it",
|
|
267
|
+
description: "Predicts which pages a data change reaches, then on a confirming call drives that journey " +
|
|
268
|
+
"for real and gates the result. Gated; acts on the running app. A clean page load reports " +
|
|
269
|
+
"unconfirmed, not proof of no bug.",
|
|
270
|
+
inputSchema: SCHEMA,
|
|
271
|
+
run,
|
|
272
|
+
describeAction,
|
|
273
|
+
};
|
|
274
|
+
//# sourceMappingURL=prove-reach.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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C,kBAAkB,EAAE;YAChH,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;gBAClE,iBAAiB,EAAE,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM;gBACvD,kBAAkB,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM;aAC1D;YACD,KAAK;YACL,UAAU,EAAE;gBACV,YAAY,EAAE,IAAI,CAAC,EAAE;gBACrB,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;gBACxC,UAAU;gBACV,sBAAsB,EAAE,QAAQ;gBAChC,uBAAuB,EAAE,UAAU;gBACnC,kBAAkB;aACnB;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,8FAA8F;IACrG,WAAW,EACT,4FAA4F;QAC5F,2FAA2F;QAC3F,mCAAmC;IACrC,WAAW,EAAE,MAA4C;IACzD,GAAG;IACH,cAAc;CACf,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `questions` — lets a human answer an open refusal question in this conversation.
|
|
3
|
+
* DEC-242: a refusal carries `attrs.blockedBy`+`refusalClass`. DEC-243: grouped into
|
|
4
|
+
* one question per pair; a dedicated read+write tool, not folded into `link_workspace`.
|
|
5
|
+
* DEC-223: a recorded answer caps at reliability class B regardless of anything else. */
|
|
6
|
+
import type { RefusalDropCounts, RefusalQuestion } from "@descryy/core";
|
|
7
|
+
import type { ConfirmedFact } from "@descryy/ir";
|
|
8
|
+
import { type ToolDefinition } from "./kit.ts";
|
|
9
|
+
/** Both halves of one conversation: the queue, and the answer that just shrank it.
|
|
10
|
+
* Read and write together so a caller doesn't need two calls. */
|
|
11
|
+
export interface QuestionsData {
|
|
12
|
+
/** The `ConfirmedFact` written by this call, or null when none given. A human
|
|
13
|
+
* assertion, not a graph fact — capped at reliability class B (DEC-223) when
|
|
14
|
+
* later used to mint an edge. */
|
|
15
|
+
readonly recorded: ConfirmedFact | null;
|
|
16
|
+
/** Rows a human could resolve, grouped by `blockedBy` — DEC-242's `value-unknown`
|
|
17
|
+
* class only. A reader-capability gap or per-call value never appears here. */
|
|
18
|
+
readonly questions: readonly RefusalQuestion[];
|
|
19
|
+
/** Every refusal-ledger row, classified or not. The outer denominator. */
|
|
20
|
+
readonly totalRefusalRows: number;
|
|
21
|
+
/** Of those, how many carry `attrs.blockedBy`/`refusalClass` at all. The gap vs
|
|
22
|
+
* `totalRefusalRows` is unclassified rows — never askable, not "still open". */
|
|
23
|
+
readonly classifiedRows: number;
|
|
24
|
+
/** Rows a stored confirmed fact already answers, so they are not listed as questions. */
|
|
25
|
+
readonly alreadyAnswered: number;
|
|
26
|
+
/** Rows dropped by refusal class, per DEC-242's own rule. */
|
|
27
|
+
readonly dropped: RefusalDropCounts;
|
|
28
|
+
}
|
|
29
|
+
export declare const questionsTool: ToolDefinition;
|
|
30
|
+
//# sourceMappingURL=questions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"questions.d.ts","sourceRoot":"","sources":["../../src/tools/questions.ts"],"names":[],"mappings":"AAAA;;;;yFAIyF;AAGzF,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAIlB;kEACkE;AAClE,MAAM,WAAW,aAAa;IAC5B;;sCAEkC;IAClC,QAAQ,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IACxC;oFACgF;IAChF,QAAQ,CAAC,SAAS,EAAE,SAAS,eAAe,EAAE,CAAC;IAC/C,0EAA0E;IAC1E,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC;qFACiF;IACjF,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,yFAAyF;IACzF,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;CACrC;AAqQD,eAAO,MAAM,aAAa,EAAE,cAY3B,CAAC"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `questions` — lets a human answer an open refusal question in this conversation.
|
|
3
|
+
* DEC-242: a refusal carries `attrs.blockedBy`+`refusalClass`. DEC-243: grouped into
|
|
4
|
+
* one question per pair; a dedicated read+write tool, not folded into `link_workspace`.
|
|
5
|
+
* DEC-223: a recorded answer caps at reliability class B regardless of anything else. */
|
|
6
|
+
import { applyConfirmedFacts, counts, groupRefusalsIntoQuestions } from "@descryy/core";
|
|
7
|
+
import { writeConfirmedFact } from "../session.js";
|
|
8
|
+
import { answer, optionalEnum, optionalString, requiredString, ToolInputError, } from "./kit.js";
|
|
9
|
+
import { capBySize, sizeCapNote } from "../capped.js";
|
|
10
|
+
const SCHEMA = {
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
answer: {
|
|
14
|
+
type: "object",
|
|
15
|
+
description: "Record a value for one question. Omit to just list what's open.",
|
|
16
|
+
properties: {
|
|
17
|
+
blockedBy: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "Must equal a question's own \"blockedBy\" field exactly.",
|
|
20
|
+
},
|
|
21
|
+
value: { type: "string" },
|
|
22
|
+
environment: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Optional. A different environment is a new fact, not a replacement.",
|
|
25
|
+
},
|
|
26
|
+
confirmedBy: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Default \"user\".",
|
|
29
|
+
},
|
|
30
|
+
scope: {
|
|
31
|
+
type: "string",
|
|
32
|
+
enum: ["repo", "workspace"],
|
|
33
|
+
description: "repo (default) or every linked repository, if the value is the same everywhere.",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
required: ["blockedBy", "value"],
|
|
37
|
+
additionalProperties: false,
|
|
38
|
+
},
|
|
39
|
+
// Declared here, not only in the prose — `tool-schema-prose.test.ts` holds the
|
|
40
|
+
// registry to keeping documented and declared params in sync (a documented-but-
|
|
41
|
+
// undeclared param was once silently rejected under additionalProperties:false).
|
|
42
|
+
confirmToken: {
|
|
43
|
+
type: "string",
|
|
44
|
+
description: "Arguments frozen when the token was minted; a different \"answer\" is discarded and disclosed.",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
additionalProperties: false,
|
|
48
|
+
};
|
|
49
|
+
/** The `answer` arg, read+validated once — shared by `describeAction` so mint and run
|
|
50
|
+
* refuse identically (DEC-387: a `scope:"workspace"` answer was once described as
|
|
51
|
+
* workspace-wide then refused on redemption). Reads only `config.workspace`, writes nothing. */
|
|
52
|
+
function readAnswer(answerArg, session) {
|
|
53
|
+
if (typeof answerArg !== "object" || answerArg === null) {
|
|
54
|
+
throw new ToolInputError('"answer" must be an object');
|
|
55
|
+
}
|
|
56
|
+
const a = answerArg;
|
|
57
|
+
const blockedBy = requiredString(a, "blockedBy");
|
|
58
|
+
const value = requiredString(a, "value");
|
|
59
|
+
const environment = optionalString(a, "environment");
|
|
60
|
+
const confirmedBy = optionalString(a, "confirmedBy") ?? "user";
|
|
61
|
+
const scope = optionalEnum(a, "scope", ["repo", "workspace"]) ?? "repo";
|
|
62
|
+
if (scope === "workspace" && session.config.workspace === undefined) {
|
|
63
|
+
throw new ToolInputError('scope "workspace" needs a configured workspace, and this repository has none. Call ' +
|
|
64
|
+
'"link_workspace" first, or record this answer with scope "repo".');
|
|
65
|
+
}
|
|
66
|
+
return { blockedBy, value, environment, confirmedBy, scope };
|
|
67
|
+
}
|
|
68
|
+
function fitQuestions(rest, questions, budgetBytes) {
|
|
69
|
+
const scaffoldBytes = Buffer.byteLength(JSON.stringify({ ...rest, questions: [] }), "utf8");
|
|
70
|
+
const fit = capBySize(questions, budgetBytes, scaffoldBytes);
|
|
71
|
+
const notes = fit.droppedForSize === 0 ? [] : [sizeCapNote("open question", fit.shown.length, questions.length, fit.droppedForSize)];
|
|
72
|
+
return {
|
|
73
|
+
data: { ...rest, questions: fit.shown },
|
|
74
|
+
notes,
|
|
75
|
+
...(fit.droppedForSize === 0
|
|
76
|
+
? {}
|
|
77
|
+
: { truncatedDetail: { shown: fit.shown.length, total: questions.length, more: null } }),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
async function run(args, ctx) {
|
|
81
|
+
const { session } = ctx;
|
|
82
|
+
const notes = [];
|
|
83
|
+
// `confirmedFacts` is readonly and loaded once at session start; merged locally below instead of a mid-call disk reload.
|
|
84
|
+
let facts = session.config.confirmedFacts;
|
|
85
|
+
let recorded = null;
|
|
86
|
+
const answerArg = args["answer"];
|
|
87
|
+
if (answerArg !== undefined) {
|
|
88
|
+
if (typeof answerArg !== "object" || answerArg === null) {
|
|
89
|
+
throw new ToolInputError('"answer" must be an object');
|
|
90
|
+
}
|
|
91
|
+
const { blockedBy, value, environment, confirmedBy, scope } = readAnswer(answerArg, session);
|
|
92
|
+
// `confirmedAtCommit`: repo's commit at answer time, so a later mint can tell if
|
|
93
|
+
// code moved since. Best-effort — no git history means no value, an absence not
|
|
94
|
+
// a guess; must never fail the recording because the disclosure couldn't.
|
|
95
|
+
const confirmedAtCommit = await session
|
|
96
|
+
.root()
|
|
97
|
+
.then((r) => r.commitSha)
|
|
98
|
+
.catch(() => undefined);
|
|
99
|
+
recorded = {
|
|
100
|
+
repo: session.config.repo,
|
|
101
|
+
blockedBy,
|
|
102
|
+
value,
|
|
103
|
+
...(environment === undefined ? {} : { environment }),
|
|
104
|
+
confirmedBy,
|
|
105
|
+
confirmedAt: new Date().toISOString(),
|
|
106
|
+
...(confirmedAtCommit === undefined ? {} : { confirmedAtCommit }),
|
|
107
|
+
scope,
|
|
108
|
+
// Stamped on the fact, not looked up at read time — a fact must not reach
|
|
109
|
+
// further because its repo was later re-linked into a different workspace.
|
|
110
|
+
...(scope === "workspace" && session.config.workspace !== undefined
|
|
111
|
+
? { workspace: session.config.workspace }
|
|
112
|
+
: {}),
|
|
113
|
+
};
|
|
114
|
+
ctx.progress(`Recording an answer for ${blockedBy}${environment === undefined ? "" : ` (${environment})`}`);
|
|
115
|
+
const written = await writeConfirmedFact(session.repoPath, recorded);
|
|
116
|
+
const sameKey = (f) => f.repo === recorded?.repo && f.blockedBy === recorded.blockedBy && f.environment === recorded.environment;
|
|
117
|
+
facts = [...facts.filter((f) => !sameKey(f)), recorded];
|
|
118
|
+
notes.push(written.replaced === null
|
|
119
|
+
? `Recorded a new answer for "${blockedBy}"${environment === undefined ? "" : ` in "${environment}"`}.`
|
|
120
|
+
: `Replaced the previous answer for "${blockedBy}"` +
|
|
121
|
+
`${environment === undefined ? "" : ` in "${environment}"`} (was "${written.replaced.value}", ` +
|
|
122
|
+
`confirmed ${written.replaced.confirmedAt}).`);
|
|
123
|
+
}
|
|
124
|
+
ctx.progress("Reading the refusal ledger");
|
|
125
|
+
const provider = session.provider();
|
|
126
|
+
const { refs, truncated } = provider.unresolvedRefs();
|
|
127
|
+
const total = counts(session.store().driver).unresolvedRefs;
|
|
128
|
+
// Plus workspace-scoped facts from `link_workspace` siblings. `applyConfirmedFacts`
|
|
129
|
+
// decides which actually reach this repo — this call only supplies candidates.
|
|
130
|
+
const { answered, stillOpen } = applyConfirmedFacts(refs, [...facts, ...(session.config.linkedFacts ?? [])], session.config.repo, session.config.workspace);
|
|
131
|
+
const grouped = groupRefusalsIntoQuestions(session.config.repo, stillOpen);
|
|
132
|
+
if (truncated) {
|
|
133
|
+
notes.push("The classified-refusal read was capped and some rows were not examined — this list may be " +
|
|
134
|
+
"incomplete. Re-run with a narrower scope, or treat this as a lower bound.");
|
|
135
|
+
}
|
|
136
|
+
if (total > refs.length) {
|
|
137
|
+
notes.push(`${total - refs.length} of ${total} refusal-ledger row(s) carry no classification at all yet ` +
|
|
138
|
+
"(no adapter has set attrs.blockedBy/refusalClass for them) — never askable, not counted " +
|
|
139
|
+
"above, and not the same population as \"still open\".");
|
|
140
|
+
}
|
|
141
|
+
if (answered.length > 0) {
|
|
142
|
+
notes.push(`${answered.length} previously-open row(s) are already answered by a stored confirmed fact and ` +
|
|
143
|
+
"are not listed as questions.");
|
|
144
|
+
// Named, never folded in — "answered here" vs "answered elsewhere as workspace-wide"
|
|
145
|
+
// are different facts, and only the second carries the risk `scope` makes deliberate.
|
|
146
|
+
const elsewhere = answered.filter((a) => a.fromAnotherRepo);
|
|
147
|
+
if (elsewhere.length > 0) {
|
|
148
|
+
const repos = [...new Set(elsewhere.flatMap((a) => a.facts.map((f) => f.repo)))].sort();
|
|
149
|
+
notes.push(`${elsewhere.length} of those are answered only by workspace-scoped fact(s) recorded in ` +
|
|
150
|
+
`${repos.join(", ")}, not in ${session.config.repo}. They apply here because whoever ` +
|
|
151
|
+
`recorded them declared scope "workspace", not because this tool matched on the name.`);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
for (const [cls, count] of Object.entries(grouped.dropped)) {
|
|
155
|
+
if (cls === "value-unknown")
|
|
156
|
+
continue; // never dropped under its own class name
|
|
157
|
+
notes.push(`${count} row(s) are "${cls}" — DEC-242's own rule: not askable, never surfaced here.`);
|
|
158
|
+
}
|
|
159
|
+
const headline = grouped.questions.length === 0
|
|
160
|
+
? recorded !== null
|
|
161
|
+
? `Answer recorded. No open questions remain in ${session.config.repo}.`
|
|
162
|
+
: `No open questions in ${session.config.repo}. ${refs.length} classified refusal row(s) examined.`
|
|
163
|
+
: `${grouped.questions.length} open question(s) in ${session.config.repo}, covering ` +
|
|
164
|
+
`${grouped.questions.reduce((n, q) => n + q.sites.length, 0)} call site(s).`;
|
|
165
|
+
return answer({
|
|
166
|
+
headline,
|
|
167
|
+
// Name-level fact (expression present or not, same class as a missing env var).
|
|
168
|
+
// `UnresolvedRef` carries no resolution level (refusals aren't edges, DEC-223),
|
|
169
|
+
// so R0 is the honest floor — same choice `link_workspace` makes, same reason.
|
|
170
|
+
nameLevel: true,
|
|
171
|
+
resolutionFloor: 0,
|
|
172
|
+
commitSha: provider.baseStamp().commitSha,
|
|
173
|
+
graphBuiltAt: provider.baseStamp().graphBuiltAt,
|
|
174
|
+
irSchemaVersion: provider.baseStamp().irSchemaVersion,
|
|
175
|
+
commitSpread: provider.baseStamp().commitSpread,
|
|
176
|
+
repoCount: provider.baseStamp().repoCount,
|
|
177
|
+
// Empty only for a pure read finding nothing open (`classifiedRows` is real).
|
|
178
|
+
// An answer that happens to empty the queue is a write, not an empty search.
|
|
179
|
+
...(recorded === null && grouped.questions.length === 0 ? { state: "empty" } : {}),
|
|
180
|
+
notes,
|
|
181
|
+
data: {
|
|
182
|
+
recorded,
|
|
183
|
+
questions: grouped.questions,
|
|
184
|
+
totalRefusalRows: total,
|
|
185
|
+
classifiedRows: refs.length,
|
|
186
|
+
alreadyAnswered: answered.length,
|
|
187
|
+
dropped: grouped.dropped,
|
|
188
|
+
},
|
|
189
|
+
fitToBudget: (budgetBytes) => fitQuestions({
|
|
190
|
+
recorded,
|
|
191
|
+
totalRefusalRows: total,
|
|
192
|
+
classifiedRows: refs.length,
|
|
193
|
+
alreadyAnswered: answered.length,
|
|
194
|
+
dropped: grouped.dropped,
|
|
195
|
+
}, grouped.questions, budgetBytes),
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
/** §7's handshake gate. `undefined` = nothing to confirm (pure read must stay
|
|
199
|
+
* answerable on the first call). Only a write-bound call describes itself, so
|
|
200
|
+
* `resolveActionDispatch` mints a token for that call alone. */
|
|
201
|
+
function describeAction(args, ctx) {
|
|
202
|
+
const answerArg = args["answer"];
|
|
203
|
+
// No `answer` = pure read, nothing to confirm — gating it would block the first
|
|
204
|
+
// question ever asked. Other shapes reuse `readAnswer`, so an invalid call is
|
|
205
|
+
// refused here rather than described and minted.
|
|
206
|
+
if (answerArg === undefined)
|
|
207
|
+
return undefined;
|
|
208
|
+
const { blockedBy, value, environment, scope } = readAnswer(answerArg, ctx.session);
|
|
209
|
+
return (`record a ConfirmedFact: "${blockedBy}" = "${value}"` +
|
|
210
|
+
(typeof environment === "string" ? ` (environment: ${environment})` : "") +
|
|
211
|
+
// Reach is part of what's approved — a workspace answer affects repos the
|
|
212
|
+
// approver isn't looking at; §7's handshake exists so nothing runs undescribed.
|
|
213
|
+
(scope === "workspace"
|
|
214
|
+
? " — reaching EVERY repository in this workspace, not just this one,"
|
|
215
|
+
: " — in this repository only,") +
|
|
216
|
+
" capped at reliability class B (DEC-223) once used.");
|
|
217
|
+
}
|
|
218
|
+
export const questionsTool = {
|
|
219
|
+
name: "questions",
|
|
220
|
+
class: "action",
|
|
221
|
+
tier: "evidence",
|
|
222
|
+
version: "1.0.0",
|
|
223
|
+
title: "See and answer open refusal-ledger questions",
|
|
224
|
+
description: "List open questions a human can resolve. \"answer\" records a value, capped at reliability " +
|
|
225
|
+
"B. Gated: first call returns a token; confirmToken records it.",
|
|
226
|
+
inputSchema: SCHEMA,
|
|
227
|
+
run,
|
|
228
|
+
describeAction,
|
|
229
|
+
};
|
|
230
|
+
//# sourceMappingURL=questions.js.map
|