@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,326 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `browser` — the merged action-class browser tool. §4/§7 step 5 of
|
|
3
|
+
* `documents/plans/mcp-surface-consolidation.md`.
|
|
4
|
+
*
|
|
5
|
+
* Absorbs the eight consent-gated browser verbs — `start_session` `click`
|
|
6
|
+
* `type` `fill` `select` `submit` `save_scenario` `run_scenario` — behind one
|
|
7
|
+
* `verb` argument. The four stateful-read tools (`snapshot`, `navigate`,
|
|
8
|
+
* `wait_for`, `close_session`) are a different class and are not touched
|
|
9
|
+
* here.
|
|
10
|
+
*
|
|
11
|
+
* ## This is the surface merge only
|
|
12
|
+
*
|
|
13
|
+
* §4 names the real design problem: an element ref is issued per snapshot and
|
|
14
|
+
* a stale one refuses rather than resolving elsewhere, so a caller cannot
|
|
15
|
+
* author a multi-step batch up front — step 2's ref does not exist until step
|
|
16
|
+
* 1 has run. The eventual fix is a server-side step loop that takes its own
|
|
17
|
+
* snapshot between steps and resolves targets by role + accessible name, so a
|
|
18
|
+
* ref never leaves the server and an ambiguous target refuses rather than
|
|
19
|
+
* guessing. That is a design change, not a merge, and it is **not** done
|
|
20
|
+
* here. This tool still takes one ref, for one step, per call — exactly
|
|
21
|
+
* today's semantics, including the refusal on a superseded ref — and only
|
|
22
|
+
* changes how the eight verbs are named and dispatched.
|
|
23
|
+
*
|
|
24
|
+
* ## Reuse, not reimplementation
|
|
25
|
+
*
|
|
26
|
+
* Every verb's `run` and `describeAction` is the same function object the
|
|
27
|
+
* standalone tool exported before this file existed — `VERB_TOOLS` below is
|
|
28
|
+
* a dispatch table over those objects, never a rewrite of what they do. The
|
|
29
|
+
* one thing genuinely new is `selectVerb`: with eight verbs' properties
|
|
30
|
+
* unioned into one schema, `additionalProperties: false` can no longer catch
|
|
31
|
+
* `browser({ verb: "click", text: "hi" })` silently ignoring `text` — that is
|
|
32
|
+
* exactly the defect `browser_start_session({ profile })` silently reading
|
|
33
|
+
* `environment` was (UAT phase 5 F12), one level further down. `selectVerb`
|
|
34
|
+
* re-establishes per-verb argument discrimination at runtime; see
|
|
35
|
+
* `verb.ts`'s own header for the full reasoning.
|
|
36
|
+
*
|
|
37
|
+
* ## Consent
|
|
38
|
+
*
|
|
39
|
+
* Only `start_session` mints anything — it is the one call that opens a
|
|
40
|
+
* browser and grants consent for the rest of the session's life
|
|
41
|
+
* (`browser-start-session.ts`, DEC-380). The other seven verbs already
|
|
42
|
+
* declare `describeAction: () => undefined` (nothing left to confirm; a verb
|
|
43
|
+
* cannot mint its own consent), and that is preserved by delegating to each
|
|
44
|
+
* verb's own `describeAction` rather than writing a new one — the one
|
|
45
|
+
* consent sentence this tool produces is `browser_start_session`'s own,
|
|
46
|
+
* unchanged, so it cannot drift from what `start_session` alone still
|
|
47
|
+
* enforces.
|
|
48
|
+
*/
|
|
49
|
+
import { browserClickTool } from "./browser-click.js";
|
|
50
|
+
import { browserTypeTool } from "./browser-type.js";
|
|
51
|
+
import { browserFillTool } from "./browser-fill.js";
|
|
52
|
+
import { browserSelectTool } from "./browser-select.js";
|
|
53
|
+
import { browserSubmitTool } from "./browser-submit.js";
|
|
54
|
+
import { browserStartSessionTool } from "./browser-start-session.js";
|
|
55
|
+
import { browserSaveScenarioTool } from "./browser-save-scenario.js";
|
|
56
|
+
import { browserRunScenarioTool } from "./browser-run-scenario.js";
|
|
57
|
+
import { selectVerb } from "./verb.js";
|
|
58
|
+
const VERB_TOOLS = {
|
|
59
|
+
start_session: browserStartSessionTool,
|
|
60
|
+
click: browserClickTool,
|
|
61
|
+
type: browserTypeTool,
|
|
62
|
+
fill: browserFillTool,
|
|
63
|
+
select: browserSelectTool,
|
|
64
|
+
submit: browserSubmitTool,
|
|
65
|
+
save_scenario: browserSaveScenarioTool,
|
|
66
|
+
run_scenario: browserRunScenarioTool,
|
|
67
|
+
};
|
|
68
|
+
/** Every verb's own exclusive properties, beyond `verb` and the shared ones below — the table
|
|
69
|
+
* `selectVerb` needs to say "that belongs to a different verb" instead of just "unknown". Kept
|
|
70
|
+
* as data, next to `VERB_TOOLS`, so the two cannot silently drift apart: a verb added to one
|
|
71
|
+
* and not the other fails loudly (`browser-verb-dispatch.test.ts` asserts the two agree). */
|
|
72
|
+
const SPECS = [
|
|
73
|
+
{
|
|
74
|
+
verb: "start_session",
|
|
75
|
+
accepts: [
|
|
76
|
+
"targetUrl",
|
|
77
|
+
"headless",
|
|
78
|
+
"stackParser",
|
|
79
|
+
"documentRoot",
|
|
80
|
+
"environment",
|
|
81
|
+
"storageState",
|
|
82
|
+
"storageStatePath",
|
|
83
|
+
"storageStateCredential",
|
|
84
|
+
"extraHttpHeaders",
|
|
85
|
+
"saveStorageStateTo",
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
{ verb: "click", accepts: ["sessionId", "ref"] },
|
|
89
|
+
{ verb: "type", accepts: ["sessionId", "ref", "text"] },
|
|
90
|
+
{ verb: "fill", accepts: ["sessionId", "ref", "text"] },
|
|
91
|
+
{ verb: "select", accepts: ["sessionId", "ref", "value"] },
|
|
92
|
+
{ verb: "submit", accepts: ["sessionId", "ref"] },
|
|
93
|
+
{ verb: "save_scenario", accepts: ["sessionId", "name", "description", "targetUrl", "steps", "assertions"] },
|
|
94
|
+
{ verb: "run_scenario", accepts: ["sessionId", "name"] },
|
|
95
|
+
];
|
|
96
|
+
/** Accepted by every verb, `start_session` included — the handshake reads it for any
|
|
97
|
+
* action-class tool whether or not that verb ever mints. */
|
|
98
|
+
const SHARED = ["confirmToken"];
|
|
99
|
+
function resolveVerb(args) {
|
|
100
|
+
return selectVerb(args, "verb", SPECS, SHARED);
|
|
101
|
+
}
|
|
102
|
+
async function run(args, ctx) {
|
|
103
|
+
const verb = resolveVerb(args);
|
|
104
|
+
// `ToolDefinition` erases its answer's type parameter — it has to, the
|
|
105
|
+
// registry is one array of many shapes — so the delegated call comes back as
|
|
106
|
+
// an erased answer type. The verb table is what makes the union true: every
|
|
107
|
+
// entry's own `run` is declared against one of BrowserData's members, and a verb
|
|
108
|
+
// added without its shape stops compiling at the union. The assertion
|
|
109
|
+
// re-applies what the table already guarantees rather than asserting
|
|
110
|
+
// something unchecked.
|
|
111
|
+
return (await VERB_TOOLS[verb].run(args, ctx));
|
|
112
|
+
}
|
|
113
|
+
/** Delegates to the resolved verb's own `describeAction` — never writes a new consent sentence.
|
|
114
|
+
* Only `start_session`'s returns a string; every other verb's is `() => undefined` today, and
|
|
115
|
+
* reading that through the same dispatch table means this tool cannot describe the wrong verb
|
|
116
|
+
* without the underlying tool describing it wrong too, which is exactly the bar §7's "one
|
|
117
|
+
* describeAction, tested against all eight verbs" sets. */
|
|
118
|
+
async function describeAction(args, ctx) {
|
|
119
|
+
const verb = resolveVerb(args);
|
|
120
|
+
return VERB_TOOLS[verb].describeAction?.(args, ctx);
|
|
121
|
+
}
|
|
122
|
+
/** Only `start_session`'s arguments can carry a credential (`storageState`, `extraHttpHeaders`).
|
|
123
|
+
* Dispatched on the raw `verb` value rather than through `selectVerb`/`resolveVerb`: this runs
|
|
124
|
+
* over whatever was actually recorded, including a call that never validated — a malformed or
|
|
125
|
+
* unconfirmed call is exactly the one a redactor must not throw on. */
|
|
126
|
+
function redactArgs(args) {
|
|
127
|
+
const verb = args["verb"];
|
|
128
|
+
const tool = typeof verb === "string" ? VERB_TOOLS[verb] : undefined;
|
|
129
|
+
return tool?.redactArgs?.(args) ?? args;
|
|
130
|
+
}
|
|
131
|
+
const REF_NOTE = "Ref from a browser_read snapshot; stale refs are refused, not re-resolved.";
|
|
132
|
+
const TARGET_SCHEMA = {
|
|
133
|
+
type: "object",
|
|
134
|
+
description: "Element by role+name+selector, from a snapshot. All three must match at replay.",
|
|
135
|
+
properties: {
|
|
136
|
+
role: { type: "string" },
|
|
137
|
+
name: { type: "string" },
|
|
138
|
+
selector: { type: ["string", "null"] },
|
|
139
|
+
},
|
|
140
|
+
required: ["role", "name", "selector"],
|
|
141
|
+
additionalProperties: false,
|
|
142
|
+
};
|
|
143
|
+
const SCHEMA = {
|
|
144
|
+
type: "object",
|
|
145
|
+
properties: {
|
|
146
|
+
verb: {
|
|
147
|
+
type: "string",
|
|
148
|
+
enum: ["start_session", "click", "type", "fill", "select", "submit", "save_scenario", "run_scenario"],
|
|
149
|
+
description: "REQUIRED. Which action to run. Only that verb's own arguments are accepted.",
|
|
150
|
+
},
|
|
151
|
+
// --- start_session only ---
|
|
152
|
+
targetUrl: {
|
|
153
|
+
type: "string",
|
|
154
|
+
description: "start_session (REQUIRED): URL to open, consent scope. save_scenario: replay start URL.",
|
|
155
|
+
},
|
|
156
|
+
headless: {
|
|
157
|
+
type: "boolean",
|
|
158
|
+
description: "Run without a visible window. Default true.",
|
|
159
|
+
},
|
|
160
|
+
stackParser: {
|
|
161
|
+
type: "object",
|
|
162
|
+
description: "start_session: module parsing stack traces, for a caller edge. Package " +
|
|
163
|
+
'"@descryy/runtime-adapter-<language>", factory "create<Name>StackTraceParser".',
|
|
164
|
+
properties: {
|
|
165
|
+
module: { type: "string", description: "Module specifier." },
|
|
166
|
+
export: { type: "string", description: "Defaults to the sole factory." },
|
|
167
|
+
},
|
|
168
|
+
required: ["module"],
|
|
169
|
+
additionalProperties: false,
|
|
170
|
+
},
|
|
171
|
+
documentRoot: {
|
|
172
|
+
type: "string",
|
|
173
|
+
description: "start_session: static file root if not repo root. Default: repo root.",
|
|
174
|
+
},
|
|
175
|
+
environment: {
|
|
176
|
+
type: "object",
|
|
177
|
+
description: "start_session: environment profile. readOnly blocks mutating verbs (navigate/snapshot ok).",
|
|
178
|
+
properties: {
|
|
179
|
+
name: { type: "string", description: "Profile name." },
|
|
180
|
+
safetyLevel: {
|
|
181
|
+
type: "string",
|
|
182
|
+
enum: ["readOnly", "write", "destructiveWithApproval"],
|
|
183
|
+
description: "readOnly blocks every mutating verb.",
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
required: ["name", "safetyLevel"],
|
|
187
|
+
additionalProperties: true,
|
|
188
|
+
},
|
|
189
|
+
storageState: {
|
|
190
|
+
type: "object",
|
|
191
|
+
description: "start_session: pre-authenticated state to seed before first navigation.",
|
|
192
|
+
properties: {
|
|
193
|
+
cookies: {
|
|
194
|
+
type: "array",
|
|
195
|
+
description: "Cookies to set before navigating.",
|
|
196
|
+
items: {
|
|
197
|
+
type: "object",
|
|
198
|
+
properties: {
|
|
199
|
+
name: { type: "string" },
|
|
200
|
+
value: { type: "string" },
|
|
201
|
+
path: { type: "string", description: 'Default "/".' },
|
|
202
|
+
httpOnly: { type: "boolean" },
|
|
203
|
+
secure: { type: "boolean" },
|
|
204
|
+
sameSite: { type: "string", enum: ["Strict", "Lax", "None"] },
|
|
205
|
+
},
|
|
206
|
+
required: ["name", "value"],
|
|
207
|
+
additionalProperties: false,
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
localStorage: {
|
|
211
|
+
type: "object",
|
|
212
|
+
description: "localStorage entries (string values).",
|
|
213
|
+
additionalProperties: { type: "string" },
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
additionalProperties: false,
|
|
217
|
+
},
|
|
218
|
+
storageStatePath: {
|
|
219
|
+
type: "string",
|
|
220
|
+
description: "start_session: FILE with saved storage state, instead of inline cookies.",
|
|
221
|
+
},
|
|
222
|
+
storageStateCredential: {
|
|
223
|
+
type: "string",
|
|
224
|
+
description: "start_session: NAME of a stored credential with saved state. Exclusive with storageState/Path.",
|
|
225
|
+
},
|
|
226
|
+
extraHttpHeaders: {
|
|
227
|
+
type: "object",
|
|
228
|
+
description: "start_session: headers added to requests to the consented origin only.",
|
|
229
|
+
additionalProperties: { type: "string" },
|
|
230
|
+
},
|
|
231
|
+
saveStorageStateTo: {
|
|
232
|
+
type: "string",
|
|
233
|
+
description: "start_session: path OUTSIDE the repo to save session state on close (a credential).",
|
|
234
|
+
},
|
|
235
|
+
// --- click / type / fill / select / submit / save_scenario / run_scenario ---
|
|
236
|
+
sessionId: {
|
|
237
|
+
type: "string",
|
|
238
|
+
description: "REQUIRED except start_session. From a prior start_session call.",
|
|
239
|
+
},
|
|
240
|
+
ref: {
|
|
241
|
+
type: "string",
|
|
242
|
+
description: `REQUIRED for click, type, fill, select, submit. ${REF_NOTE}`,
|
|
243
|
+
},
|
|
244
|
+
text: {
|
|
245
|
+
type: "string",
|
|
246
|
+
description: "REQUIRED for type/fill. type: keystrokes, appends. fill: sets value, replaces, no key events.",
|
|
247
|
+
},
|
|
248
|
+
value: {
|
|
249
|
+
type: "string",
|
|
250
|
+
description: "REQUIRED for select. Exact value or label; refused with the offered options if unmatched.",
|
|
251
|
+
},
|
|
252
|
+
// --- save_scenario / run_scenario ---
|
|
253
|
+
name: {
|
|
254
|
+
type: "string",
|
|
255
|
+
description: "REQUIRED. Name to save as (save_scenario) or replay (run_scenario).",
|
|
256
|
+
},
|
|
257
|
+
// --- save_scenario only ---
|
|
258
|
+
description: { type: "string", description: "Free text note for the file. Optional." },
|
|
259
|
+
steps: {
|
|
260
|
+
type: "array",
|
|
261
|
+
description: "REQUIRED, at least one. Steps to replay; each re-resolved at replay time.",
|
|
262
|
+
items: {
|
|
263
|
+
type: "object",
|
|
264
|
+
properties: {
|
|
265
|
+
action: {
|
|
266
|
+
type: "string",
|
|
267
|
+
enum: ["navigate", "click", "type", "fill"],
|
|
268
|
+
description: "navigate acts on the page; click/type/fill need a target.",
|
|
269
|
+
},
|
|
270
|
+
target: TARGET_SCHEMA,
|
|
271
|
+
url: { type: "string", description: "Where to go. navigate only." },
|
|
272
|
+
text: {
|
|
273
|
+
type: "string",
|
|
274
|
+
description: "What to enter. type/fill only.",
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
required: ["action"],
|
|
278
|
+
additionalProperties: false,
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
assertions: {
|
|
282
|
+
type: "array",
|
|
283
|
+
description: "REQUIRED, may be empty. Empty replays as unverified, never passed.",
|
|
284
|
+
items: {
|
|
285
|
+
type: "object",
|
|
286
|
+
properties: {
|
|
287
|
+
kind: {
|
|
288
|
+
type: "string",
|
|
289
|
+
enum: ["elementVisible", "textEquals", "urlEquals", "noConsoleErrors", "noFailedRequests"],
|
|
290
|
+
description: "Which check; textEquals/urlEquals compare against \"expected\".",
|
|
291
|
+
},
|
|
292
|
+
afterStep: {
|
|
293
|
+
type: "integer",
|
|
294
|
+
description: "Step index this runs after. Omit for end-of-scenario.",
|
|
295
|
+
},
|
|
296
|
+
target: TARGET_SCHEMA,
|
|
297
|
+
expected: { type: "string", description: "Value to compare against." },
|
|
298
|
+
},
|
|
299
|
+
required: ["kind"],
|
|
300
|
+
additionalProperties: false,
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
confirmToken: {
|
|
304
|
+
type: "string",
|
|
305
|
+
description: "Only start_session confirms. Arguments frozen when the token was minted; a changed one " +
|
|
306
|
+
"is discarded and disclosed.",
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
required: ["verb"],
|
|
310
|
+
additionalProperties: false,
|
|
311
|
+
};
|
|
312
|
+
export const browserTool = {
|
|
313
|
+
name: "browser",
|
|
314
|
+
title: "Drive a real browser",
|
|
315
|
+
description: "Drive a real browser, one verb per call. start_session opens it (needs confirmation); " +
|
|
316
|
+
"click/type/fill/select/submit act on an element ref; save_scenario/run_scenario save and " +
|
|
317
|
+
"replay a session. Returns page output (console, network), untriaged. Acts on the running app.",
|
|
318
|
+
class: "action",
|
|
319
|
+
tier: "evidence",
|
|
320
|
+
version: "1.0.0",
|
|
321
|
+
inputSchema: SCHEMA,
|
|
322
|
+
run,
|
|
323
|
+
describeAction,
|
|
324
|
+
redactArgs,
|
|
325
|
+
};
|
|
326
|
+
//# sourceMappingURL=browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/tools/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAiB,MAAM,WAAW,CAAC;AAwCtD,MAAM,UAAU,GAAkD;IAChE,aAAa,EAAE,uBAAuB;IACtC,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,iBAAiB;IACzB,MAAM,EAAE,iBAAiB;IACzB,aAAa,EAAE,uBAAuB;IACtC,YAAY,EAAE,sBAAsB;CACrC,CAAC;AAEF;;;8FAG8F;AAC9F,MAAM,KAAK,GAAqC;IAC9C;QACE,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE;YACP,WAAW;YACX,UAAU;YACV,aAAa;YACb,cAAc;YACd,aAAa;YACb,cAAc;YACd,kBAAkB;YAClB,wBAAwB;YACxB,kBAAkB;YAClB,oBAAoB;SACrB;KACF;IACD,EAAE,IAAI,EAA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AAE,KAAK;aAC5B;SACF;QAED,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,yFAAyF;gBACzF,6BAA6B;SAChC;KACF;IACD,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,oBAAoB,EAAE,KAAK;CACnB,CAAC;AAEX,MAAM,CAAC,MAAM,WAAW,GAAmB;IACzC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EACT,wFAAwF;QACxF,2FAA2F;QAC3F,+FAA+F;IACjG,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,MAAM;IACnB,GAAG;IACH,cAAc;IACd,UAAU;CACX,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chain` — RG-9's five-hop user chain (click → request → endpoint → route →
|
|
3
|
+
* handler → line) as one MCP call. `impact`/`propagation` each answer one
|
|
4
|
+
* hop's worth of question; nothing before this walked all five in one call
|
|
5
|
+
* with a computed completeness verdict, so "chain complete" was a mockup
|
|
6
|
+
* string rather than a field.
|
|
7
|
+
*
|
|
8
|
+
* Two disclosed degradations carried through from `traceUserChain`
|
|
9
|
+
* (`@descryy/core`): the browser→endpoint hop only exists when the browser
|
|
10
|
+
* session that produced it was started with a `stackParser`
|
|
11
|
+
* (`browser_start_session`); and the route→handler hop ships for
|
|
12
|
+
* express/koa-router/fastify/hono/the Next.js App Router today, TypeScript
|
|
13
|
+
* only. Neither is a language check here — this tool walks whatever edges
|
|
14
|
+
* the graph holds and reports what it finds.
|
|
15
|
+
*/
|
|
16
|
+
import { type ChainStageName } from "@descryy/core";
|
|
17
|
+
import { type BriefNode, type NodeCandidates, type ToolDefinition } from "./kit.ts";
|
|
18
|
+
/** One named point in the chain, as reported to a caller. */
|
|
19
|
+
export interface ChainStageReport {
|
|
20
|
+
readonly name: ChainStageName;
|
|
21
|
+
readonly present: boolean;
|
|
22
|
+
/** Omitted, not null, wherever the stage carries no node of its own
|
|
23
|
+
* ("request" — no node type for an HTTP request; "line" — a location on
|
|
24
|
+
* the handler, not a separate node) or is missing. */
|
|
25
|
+
readonly node?: BriefNode;
|
|
26
|
+
/** Set iff `!present`. */
|
|
27
|
+
readonly reason?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ChainReport {
|
|
30
|
+
readonly origin: BriefNode;
|
|
31
|
+
readonly stages: readonly ChainStageReport[];
|
|
32
|
+
readonly verdict: "complete" | "partial";
|
|
33
|
+
readonly missingStage: ChainStageName | null;
|
|
34
|
+
readonly location: {
|
|
35
|
+
readonly file: string;
|
|
36
|
+
readonly startLine: number;
|
|
37
|
+
} | null;
|
|
38
|
+
}
|
|
39
|
+
export type ChainData = ChainReport | NodeCandidates;
|
|
40
|
+
export declare const chainTool: ToolDefinition;
|
|
41
|
+
//# sourceMappingURL=chain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../src/tools/chain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAmC,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAErF,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,cAAc,EAEnB,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAIlB,6DAA6D;AAC7D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B;;2DAEuD;IACvD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B,0BAA0B;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,YAAY,EAAE,cAAc,GAAG,IAAI,CAAC;IAC7C,QAAQ,CAAC,QAAQ,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACjF;AAED,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,cAAc,CAAC;AAiFrD,eAAO,MAAM,SAAS,EAAE,cAYvB,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chain` — RG-9's five-hop user chain (click → request → endpoint → route →
|
|
3
|
+
* handler → line) as one MCP call. `impact`/`propagation` each answer one
|
|
4
|
+
* hop's worth of question; nothing before this walked all five in one call
|
|
5
|
+
* with a computed completeness verdict, so "chain complete" was a mockup
|
|
6
|
+
* string rather than a field.
|
|
7
|
+
*
|
|
8
|
+
* Two disclosed degradations carried through from `traceUserChain`
|
|
9
|
+
* (`@descryy/core`): the browser→endpoint hop only exists when the browser
|
|
10
|
+
* session that produced it was started with a `stackParser`
|
|
11
|
+
* (`browser_start_session`); and the route→handler hop ships for
|
|
12
|
+
* express/koa-router/fastify/hono/the Next.js App Router today, TypeScript
|
|
13
|
+
* only. Neither is a language check here — this tool walks whatever edges
|
|
14
|
+
* the graph holds and reports what it finds.
|
|
15
|
+
*/
|
|
16
|
+
import { traceUserChain } from "@descryy/core";
|
|
17
|
+
import { briefNode, optionalString, ToolInputError, } from "./kit.js";
|
|
18
|
+
import { resolveOneNode } from "./lookup.js";
|
|
19
|
+
function reportStage(stage) {
|
|
20
|
+
return {
|
|
21
|
+
name: stage.name,
|
|
22
|
+
present: stage.present,
|
|
23
|
+
...(stage.node === null ? {} : { node: briefNode(stage.node) }),
|
|
24
|
+
...(stage.reason === null ? {} : { reason: stage.reason }),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const SCHEMA = {
|
|
28
|
+
type: "object",
|
|
29
|
+
properties: {
|
|
30
|
+
nodeId: { type: "string", description: "Start node — the click's origin." },
|
|
31
|
+
symbol: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "Start symbol if no node id. Ambiguous matches are refused, not guessed.",
|
|
34
|
+
},
|
|
35
|
+
file: {
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "Path, to disambiguate \"symbol\" or start from a file.",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
additionalProperties: false,
|
|
41
|
+
};
|
|
42
|
+
async function run(args, ctx) {
|
|
43
|
+
const nodeId = optionalString(args, "nodeId");
|
|
44
|
+
const symbol = optionalString(args, "symbol");
|
|
45
|
+
const file = optionalString(args, "file");
|
|
46
|
+
if (nodeId === undefined && symbol === undefined && file === undefined) {
|
|
47
|
+
throw new ToolInputError('give one of "nodeId", "symbol" or "file"');
|
|
48
|
+
}
|
|
49
|
+
const provider = ctx.session.provider();
|
|
50
|
+
const found = resolveOneNode(ctx.session, { nodeId, symbol, file });
|
|
51
|
+
if (found.node === null) {
|
|
52
|
+
const base = provider.baseStamp();
|
|
53
|
+
return {
|
|
54
|
+
result: {
|
|
55
|
+
data: { candidates: found.candidates.map(briefNode) },
|
|
56
|
+
stamp: { ...base, resolutionFloor: 0 },
|
|
57
|
+
truncated: false,
|
|
58
|
+
notes: found.notes,
|
|
59
|
+
},
|
|
60
|
+
nameLevel: true,
|
|
61
|
+
state: "refused",
|
|
62
|
+
headline: found.headline,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
ctx.progress(`Walking the chain from ${found.node.name}`);
|
|
66
|
+
const chain = traceUserChain(provider, found.node.id);
|
|
67
|
+
const notes = [...found.notes, ...chain.notes];
|
|
68
|
+
return {
|
|
69
|
+
result: {
|
|
70
|
+
data: {
|
|
71
|
+
origin: briefNode(chain.data.origin),
|
|
72
|
+
stages: chain.data.stages.map(reportStage),
|
|
73
|
+
verdict: chain.data.verdict,
|
|
74
|
+
missingStage: chain.data.missingStage,
|
|
75
|
+
location: chain.data.location,
|
|
76
|
+
},
|
|
77
|
+
stamp: chain.stamp,
|
|
78
|
+
truncated: chain.truncated,
|
|
79
|
+
notes,
|
|
80
|
+
},
|
|
81
|
+
nameLevel: true,
|
|
82
|
+
...(chain.data.verdict === "partial" ? { state: "refused" } : {}),
|
|
83
|
+
headline: chain.data.verdict === "complete"
|
|
84
|
+
? `Chain complete: ${found.node.name} reaches ${chain.data.location?.file ?? "its handler"}` +
|
|
85
|
+
`${chain.data.location === null ? "" : `:${chain.data.location.startLine}`}.`
|
|
86
|
+
: `Chain incomplete at "${chain.data.missingStage}" — see stages for what is missing and why.`,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export const chainTool = {
|
|
90
|
+
name: "chain",
|
|
91
|
+
class: "read",
|
|
92
|
+
tier: "evidence",
|
|
93
|
+
version: "1.0.0",
|
|
94
|
+
title: "The click-to-line chain: click, request, endpoint, route, handler, line",
|
|
95
|
+
description: "Walks click → request → endpoint → route → handler → line in one traversal, and reports " +
|
|
96
|
+
"complete or partial (naming which hop is missing and why). Needs a stackParser for the " +
|
|
97
|
+
"browser→endpoint hop and adapter support for route→handler; missing either just shows as a gap.",
|
|
98
|
+
inputSchema: SCHEMA,
|
|
99
|
+
run,
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=chain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../src/tools/chain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAwC,MAAM,eAAe,CAAC;AAErF,OAAO,EACL,SAAS,EACT,cAAc,EACd,cAAc,GAKf,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAwB7C,SAAS,WAAW,CAAC,KAAiB;IACpC,OAAO;QACL,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AK,CAAC,SAAS;YAC1B,KAAK;SACN;QACD,SAAS,EAAE,IAAI;QACf,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,SAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1E,QAAQ,EACN,KAAK,CAAC,IAAI,CAAC,OAAO,KAAK,UAAU;YAC/B,CAAC,CAAC,mBAAmB,KAAK,CAAC,IAAI,CAAC,IAAI,YAAY,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,aAAa,EAAE;gBAC1F,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,GAAG;YAC/E,CAAC,CAAC,wBAAwB,KAAK,CAAC,IAAI,CAAC,YAAY,6CAA6C;KACnG,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAmB;IACvC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,yEAAyE;IAChF,WAAW,EACT,0FAA0F;QAC1F,yFAAyF;QACzF,iGAAiG;IACnG,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `change_scope` — merges `scope` and `pre_push` behind one `verb`
|
|
3
|
+
* (documents/plans/mcp-surface-consolidation.md §2, group 2). Both are
|
|
4
|
+
* `read`/`evidence`, so the merge crosses neither boundary.
|
|
5
|
+
*
|
|
6
|
+
* Dispatch only. Each verb's own `run()` body is untouched and stays in its
|
|
7
|
+
* own module (`scope.ts` / `pre-push.ts`) — `pre-push.ts` itself already
|
|
8
|
+
* composes `scope`, `pr_analysis`, `contracts` and `validate` internally, and
|
|
9
|
+
* that composition is unaffected by this merge: it still calls `scopeTool.run`
|
|
10
|
+
* directly, not through this dispatcher.
|
|
11
|
+
*/
|
|
12
|
+
import type { ToolDefinition } from "./kit.ts";
|
|
13
|
+
import type { ScopeData } from "./scope.ts";
|
|
14
|
+
import type { PrePushData } from "./pre-push.ts";
|
|
15
|
+
/**
|
|
16
|
+
* What this tool answers with: one verb's shape, never a merged one.
|
|
17
|
+
*
|
|
18
|
+
* The merge cost this its single concrete output type, and `unknown` would have
|
|
19
|
+
* silently retired `output-shapes.test.ts`'s check that a declared shape is tied
|
|
20
|
+
* to the code producing it. A union keeps that tie: a verb added without its
|
|
21
|
+
* shape here stops compiling.
|
|
22
|
+
*/
|
|
23
|
+
export type ChangeScopeData = ScopeData | PrePushData;
|
|
24
|
+
export declare const changeScopeTool: ToolDefinition;
|
|
25
|
+
//# sourceMappingURL=change-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-scope.d.ts","sourceRoot":"","sources":["../../src/tools/change-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,UAAU,CAAC;AAK5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,WAAW,CAAC;AAsFhB,eAAO,MAAM,eAAe,EAAE,cAW7B,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `change_scope` — merges `scope` and `pre_push` behind one `verb`
|
|
3
|
+
* (documents/plans/mcp-surface-consolidation.md §2, group 2). Both are
|
|
4
|
+
* `read`/`evidence`, so the merge crosses neither boundary.
|
|
5
|
+
*
|
|
6
|
+
* Dispatch only. Each verb's own `run()` body is untouched and stays in its
|
|
7
|
+
* own module (`scope.ts` / `pre-push.ts`) — `pre-push.ts` itself already
|
|
8
|
+
* composes `scope`, `pr_analysis`, `contracts` and `validate` internally, and
|
|
9
|
+
* that composition is unaffected by this merge: it still calls `scopeTool.run`
|
|
10
|
+
* directly, not through this dispatcher.
|
|
11
|
+
*/
|
|
12
|
+
import { selectVerb } from "./verb.js";
|
|
13
|
+
import { scopeTool } from "./scope.js";
|
|
14
|
+
import { prePushTool } from "./pre-push.js";
|
|
15
|
+
const VERBS = ["diff", "pre_push"];
|
|
16
|
+
const TRIGGERS = ["pre-push", "pr", "nightly"];
|
|
17
|
+
const WORKING_TREE_SCOPES = ["unstaged", "staged", "all"];
|
|
18
|
+
const VERB_SPECS = [
|
|
19
|
+
{ verb: "diff", accepts: ["files", "nodeIds", "trigger", "budget", "limit"] },
|
|
20
|
+
{ verb: "pre_push", accepts: ["files", "base", "workingTree", "includeUntracked", "perSource"] },
|
|
21
|
+
];
|
|
22
|
+
const SCHEMA = {
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: {
|
|
25
|
+
verb: {
|
|
26
|
+
type: "string",
|
|
27
|
+
enum: [...VERBS],
|
|
28
|
+
description: "diff: blast radius, ranked. pre_push: diff+pr_analysis+contracts+validate, one envelope.",
|
|
29
|
+
},
|
|
30
|
+
files: {
|
|
31
|
+
type: "array",
|
|
32
|
+
items: { type: "string" },
|
|
33
|
+
description: "diff: seeds the blast radius. pre_push: REQUIRED, the files about to be pushed.",
|
|
34
|
+
},
|
|
35
|
+
nodeIds: {
|
|
36
|
+
type: "array",
|
|
37
|
+
items: { type: "string" },
|
|
38
|
+
description: "diff only. Node ids to seed with, instead of or with files.",
|
|
39
|
+
},
|
|
40
|
+
trigger: {
|
|
41
|
+
type: "string",
|
|
42
|
+
enum: [...TRIGGERS],
|
|
43
|
+
description: "diff only. Node budget: pre-push 200, pr 1000, nightly 5000. Default pr.",
|
|
44
|
+
},
|
|
45
|
+
budget: {
|
|
46
|
+
type: "integer",
|
|
47
|
+
minimum: 1,
|
|
48
|
+
description: "diff only. Override the trigger's node budget.",
|
|
49
|
+
},
|
|
50
|
+
limit: {
|
|
51
|
+
type: "integer",
|
|
52
|
+
minimum: 1,
|
|
53
|
+
description: "diff only. Cap on affected nodes returned. Default 25.",
|
|
54
|
+
},
|
|
55
|
+
base: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "pre_push only. Ref to diff against. Exclusive with workingTree.",
|
|
58
|
+
},
|
|
59
|
+
workingTree: {
|
|
60
|
+
type: "string",
|
|
61
|
+
enum: [...WORKING_TREE_SCOPES],
|
|
62
|
+
description: "pre_push only. Working tree instead of a ref range. Exclusive with base.",
|
|
63
|
+
},
|
|
64
|
+
includeUntracked: {
|
|
65
|
+
type: "boolean",
|
|
66
|
+
description: "pre_push only, with workingTree: include never-seen files. Default true.",
|
|
67
|
+
},
|
|
68
|
+
perSource: {
|
|
69
|
+
type: "integer",
|
|
70
|
+
minimum: 1,
|
|
71
|
+
description: "pre_push only. Items per source. Default 3.",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
required: ["verb"],
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
};
|
|
77
|
+
const DISPATCH = {
|
|
78
|
+
diff: scopeTool,
|
|
79
|
+
pre_push: prePushTool,
|
|
80
|
+
};
|
|
81
|
+
async function run(args, ctx) {
|
|
82
|
+
const verb = selectVerb(args, "verb", VERB_SPECS);
|
|
83
|
+
// `ToolDefinition` erases its answer's type parameter — it has to, the
|
|
84
|
+
// registry is one array of many shapes — so the delegated call comes back as
|
|
85
|
+
// an erased answer type. The verb table is what makes the union true: every
|
|
86
|
+
// entry's own `run` is declared against one of ChangeScopeData's members, and a verb
|
|
87
|
+
// added without its shape stops compiling at the union. The assertion
|
|
88
|
+
// re-applies what the table already guarantees rather than asserting
|
|
89
|
+
// something unchecked.
|
|
90
|
+
return (await DISPATCH[verb].run(args, ctx));
|
|
91
|
+
}
|
|
92
|
+
export const changeScopeTool = {
|
|
93
|
+
name: "change_scope",
|
|
94
|
+
class: "read",
|
|
95
|
+
tier: "evidence",
|
|
96
|
+
version: "1.0.0",
|
|
97
|
+
title: "Blast radius of a change, or everything worth knowing before a push",
|
|
98
|
+
description: "diff: blast radius of given files/symbols, ranked and tiered. pre_push: diff + " +
|
|
99
|
+
"pr_analysis + contracts + validate together, one envelope.",
|
|
100
|
+
inputSchema: SCHEMA,
|
|
101
|
+
run,
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=change-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-scope.js","sourceRoot":"","sources":["../../src/tools/change-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAiB,MAAM,WAAW,CAAC;AAItD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAgB5C,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,UAAU,CAAU,CAAC;AAG5C,MAAM,QAAQ,GAAG,CAAC,UAAU,EAAE,IAAI,EAAE,SAAS,CAAU,CAAC;AACxD,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAC;AAEnE,MAAM,UAAU,GAA8B;IAC5C,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE;IAC7E,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,WAAW,CAAC,EAAE;CACjG,CAAC;AAEF,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC;Y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