@descryy/mcp 0.11.3 → 0.11.5
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/package.json +20 -20
- package/dist/action-handshake.d.ts +0 -38
- package/dist/action-handshake.d.ts.map +0 -1
- package/dist/action-handshake.js +0 -127
- package/dist/action-handshake.js.map +0 -1
- package/dist/bin/descry-mcp.d.ts +0 -7
- package/dist/bin/descry-mcp.d.ts.map +0 -1
- package/dist/bin/descry-mcp.js +0 -72
- package/dist/bin/descry-mcp.js.map +0 -1
- package/dist/browser/auth.d.ts +0 -84
- package/dist/browser/auth.d.ts.map +0 -1
- package/dist/browser/auth.js +0 -233
- package/dist/browser/auth.js.map +0 -1
- package/dist/browser/capability-probe.d.ts +0 -109
- package/dist/browser/capability-probe.d.ts.map +0 -1
- package/dist/browser/capability-probe.js +0 -201
- package/dist/browser/capability-probe.js.map +0 -1
- package/dist/browser/driver.d.ts +0 -570
- package/dist/browser/driver.d.ts.map +0 -1
- package/dist/browser/driver.js +0 -116
- package/dist/browser/driver.js.map +0 -1
- package/dist/browser/evidence.d.ts +0 -28
- package/dist/browser/evidence.d.ts.map +0 -1
- package/dist/browser/evidence.js +0 -82
- package/dist/browser/evidence.js.map +0 -1
- package/dist/browser/fake-driver.d.ts +0 -116
- package/dist/browser/fake-driver.d.ts.map +0 -1
- package/dist/browser/fake-driver.js +0 -416
- package/dist/browser/fake-driver.js.map +0 -1
- package/dist/browser/fault-attribution.d.ts +0 -178
- package/dist/browser/fault-attribution.d.ts.map +0 -1
- package/dist/browser/fault-attribution.js +0 -266
- package/dist/browser/fault-attribution.js.map +0 -1
- package/dist/browser/graph-write.d.ts +0 -45
- package/dist/browser/graph-write.d.ts.map +0 -1
- package/dist/browser/graph-write.js +0 -103
- package/dist/browser/graph-write.js.map +0 -1
- package/dist/browser/identity-graph-write.d.ts +0 -55
- package/dist/browser/identity-graph-write.d.ts.map +0 -1
- package/dist/browser/identity-graph-write.js +0 -45
- package/dist/browser/identity-graph-write.js.map +0 -1
- package/dist/browser/page-probe.d.ts +0 -81
- package/dist/browser/page-probe.d.ts.map +0 -1
- package/dist/browser/page-probe.js +0 -202
- package/dist/browser/page-probe.js.map +0 -1
- package/dist/browser/playwright-driver.d.ts +0 -114
- package/dist/browser/playwright-driver.d.ts.map +0 -1
- package/dist/browser/playwright-driver.js +0 -1479
- package/dist/browser/playwright-driver.js.map +0 -1
- package/dist/browser/provider.d.ts +0 -26
- package/dist/browser/provider.d.ts.map +0 -1
- package/dist/browser/provider.js +0 -14
- package/dist/browser/provider.js.map +0 -1
- package/dist/browser/reach-recording-session.d.ts +0 -44
- package/dist/browser/reach-recording-session.d.ts.map +0 -1
- package/dist/browser/reach-recording-session.js +0 -143
- package/dist/browser/reach-recording-session.js.map +0 -1
- package/dist/browser/reachability.d.ts +0 -168
- package/dist/browser/reachability.d.ts.map +0 -1
- package/dist/browser/reachability.js +0 -294
- package/dist/browser/reachability.js.map +0 -1
- package/dist/browser/registry.d.ts +0 -126
- package/dist/browser/registry.d.ts.map +0 -1
- package/dist/browser/registry.js +0 -177
- package/dist/browser/registry.js.map +0 -1
- package/dist/browser/scenario-provenance.d.ts +0 -23
- package/dist/browser/scenario-provenance.d.ts.map +0 -1
- package/dist/browser/scenario-provenance.js +0 -73
- package/dist/browser/scenario-provenance.js.map +0 -1
- package/dist/browser/scenario-resolve.d.ts +0 -28
- package/dist/browser/scenario-resolve.d.ts.map +0 -1
- package/dist/browser/scenario-resolve.js +0 -96
- package/dist/browser/scenario-resolve.js.map +0 -1
- package/dist/browser/scenario-runner.d.ts +0 -72
- package/dist/browser/scenario-runner.d.ts.map +0 -1
- package/dist/browser/scenario-runner.js +0 -353
- package/dist/browser/scenario-runner.js.map +0 -1
- package/dist/browser/stack-parser.d.ts +0 -19
- package/dist/browser/stack-parser.d.ts.map +0 -1
- package/dist/browser/stack-parser.js +0 -85
- package/dist/browser/stack-parser.js.map +0 -1
- package/dist/browser/tool-support.d.ts +0 -71
- package/dist/browser/tool-support.d.ts.map +0 -1
- package/dist/browser/tool-support.js +0 -216
- package/dist/browser/tool-support.js.map +0 -1
- package/dist/browser/url-scheme.d.ts +0 -14
- package/dist/browser/url-scheme.d.ts.map +0 -1
- package/dist/browser/url-scheme.js +0 -38
- package/dist/browser/url-scheme.js.map +0 -1
- package/dist/browser/wait-target.d.ts +0 -37
- package/dist/browser/wait-target.d.ts.map +0 -1
- package/dist/browser/wait-target.js +0 -54
- package/dist/browser/wait-target.js.map +0 -1
- package/dist/cancellation.d.ts +0 -20
- package/dist/cancellation.d.ts.map +0 -1
- package/dist/cancellation.js +0 -41
- package/dist/cancellation.js.map +0 -1
- package/dist/capped.d.ts +0 -17
- package/dist/capped.d.ts.map +0 -1
- package/dist/capped.js +0 -15
- package/dist/capped.js.map +0 -1
- package/dist/credential-store.d.ts +0 -22
- package/dist/credential-store.d.ts.map +0 -1
- package/dist/credential-store.js +0 -33
- package/dist/credential-store.js.map +0 -1
- package/dist/disclosure-ledger.d.ts +0 -14
- package/dist/disclosure-ledger.d.ts.map +0 -1
- package/dist/disclosure-ledger.js +0 -18
- package/dist/disclosure-ledger.js.map +0 -1
- package/dist/evidence/observed-route-evidence.d.ts +0 -25
- package/dist/evidence/observed-route-evidence.d.ts.map +0 -1
- package/dist/evidence/observed-route-evidence.js +0 -76
- package/dist/evidence/observed-route-evidence.js.map +0 -1
- package/dist/heap.d.ts +0 -61
- package/dist/heap.d.ts.map +0 -1
- package/dist/heap.js +0 -82
- package/dist/heap.js.map +0 -1
- package/dist/heartbeat.d.ts +0 -46
- package/dist/heartbeat.d.ts.map +0 -1
- package/dist/heartbeat.js +0 -66
- package/dist/heartbeat.js.map +0 -1
- package/dist/index.d.ts +0 -32
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -19
- package/dist/index.js.map +0 -1
- package/dist/module-trust.d.ts +0 -37
- package/dist/module-trust.d.ts.map +0 -1
- package/dist/module-trust.js +0 -77
- package/dist/module-trust.js.map +0 -1
- package/dist/path-confinement.d.ts +0 -31
- package/dist/path-confinement.d.ts.map +0 -1
- package/dist/path-confinement.js +0 -44
- package/dist/path-confinement.js.map +0 -1
- package/dist/planner/predict-then-propose.d.ts +0 -134
- package/dist/planner/predict-then-propose.d.ts.map +0 -1
- package/dist/planner/predict-then-propose.js +0 -138
- package/dist/planner/predict-then-propose.js.map +0 -1
- package/dist/planner/propose-journey.d.ts +0 -75
- package/dist/planner/propose-journey.d.ts.map +0 -1
- package/dist/planner/propose-journey.js +0 -96
- package/dist/planner/propose-journey.js.map +0 -1
- package/dist/protocol.d.ts +0 -57
- package/dist/protocol.d.ts.map +0 -1
- package/dist/protocol.js +0 -90
- package/dist/protocol.js.map +0 -1
- package/dist/registry.d.ts +0 -103
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -319
- package/dist/registry.js.map +0 -1
- package/dist/render.d.ts +0 -580
- package/dist/render.d.ts.map +0 -1
- package/dist/render.js +0 -867
- package/dist/render.js.map +0 -1
- package/dist/runtime-registry.d.ts +0 -22
- package/dist/runtime-registry.d.ts.map +0 -1
- package/dist/runtime-registry.js +0 -142
- package/dist/runtime-registry.js.map +0 -1
- package/dist/sandbox-defaults.d.ts +0 -41
- package/dist/sandbox-defaults.d.ts.map +0 -1
- package/dist/sandbox-defaults.js +0 -14
- package/dist/sandbox-defaults.js.map +0 -1
- package/dist/scenarios/browser-run-plan-projection.d.ts +0 -161
- package/dist/scenarios/browser-run-plan-projection.d.ts.map +0 -1
- package/dist/scenarios/browser-run-plan-projection.js +0 -264
- package/dist/scenarios/browser-run-plan-projection.js.map +0 -1
- package/dist/scenarios/credential-ref.d.ts +0 -102
- package/dist/scenarios/credential-ref.d.ts.map +0 -1
- package/dist/scenarios/credential-ref.js +0 -148
- package/dist/scenarios/credential-ref.js.map +0 -1
- package/dist/scenarios/index.d.ts +0 -7
- package/dist/scenarios/index.d.ts.map +0 -1
- package/dist/scenarios/index.js +0 -7
- package/dist/scenarios/index.js.map +0 -1
- package/dist/scenarios/parse.d.ts +0 -18
- package/dist/scenarios/parse.d.ts.map +0 -1
- package/dist/scenarios/parse.js +0 -212
- package/dist/scenarios/parse.js.map +0 -1
- package/dist/scenarios/scenario.d.ts +0 -93
- package/dist/scenarios/scenario.d.ts.map +0 -1
- package/dist/scenarios/scenario.js +0 -27
- package/dist/scenarios/scenario.js.map +0 -1
- package/dist/scenarios/secret-ref.d.ts +0 -86
- package/dist/scenarios/secret-ref.d.ts.map +0 -1
- package/dist/scenarios/secret-ref.js +0 -125
- package/dist/scenarios/secret-ref.js.map +0 -1
- package/dist/scenarios/storage.d.ts +0 -21
- package/dist/scenarios/storage.d.ts.map +0 -1
- package/dist/scenarios/storage.js +0 -103
- package/dist/scenarios/storage.js.map +0 -1
- package/dist/server.d.ts +0 -61
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js +0 -541
- package/dist/server.js.map +0 -1
- package/dist/session.d.ts +0 -243
- package/dist/session.d.ts.map +0 -1
- package/dist/session.js +0 -602
- package/dist/session.js.map +0 -1
- package/dist/tools/alias-kit.d.ts +0 -29
- package/dist/tools/alias-kit.d.ts.map +0 -1
- package/dist/tools/alias-kit.js +0 -21
- package/dist/tools/alias-kit.js.map +0 -1
- package/dist/tools/aliases.d.ts +0 -42
- package/dist/tools/aliases.d.ts.map +0 -1
- package/dist/tools/aliases.js +0 -52
- package/dist/tools/aliases.js.map +0 -1
- package/dist/tools/analyze-workspace.d.ts +0 -52
- package/dist/tools/analyze-workspace.d.ts.map +0 -1
- package/dist/tools/analyze-workspace.js +0 -207
- package/dist/tools/analyze-workspace.js.map +0 -1
- package/dist/tools/analyze.d.ts +0 -163
- package/dist/tools/analyze.d.ts.map +0 -1
- package/dist/tools/analyze.js +0 -724
- package/dist/tools/analyze.js.map +0 -1
- package/dist/tools/browser-click.d.ts +0 -18
- package/dist/tools/browser-click.d.ts.map +0 -1
- package/dist/tools/browser-click.js +0 -110
- package/dist/tools/browser-click.js.map +0 -1
- package/dist/tools/browser-close-session.d.ts +0 -39
- package/dist/tools/browser-close-session.d.ts.map +0 -1
- package/dist/tools/browser-close-session.js +0 -120
- package/dist/tools/browser-close-session.js.map +0 -1
- package/dist/tools/browser-fill.d.ts +0 -18
- package/dist/tools/browser-fill.d.ts.map +0 -1
- package/dist/tools/browser-fill.js +0 -117
- package/dist/tools/browser-fill.js.map +0 -1
- package/dist/tools/browser-navigate.d.ts +0 -15
- package/dist/tools/browser-navigate.d.ts.map +0 -1
- package/dist/tools/browser-navigate.js +0 -104
- package/dist/tools/browser-navigate.js.map +0 -1
- package/dist/tools/browser-read.d.ts +0 -33
- package/dist/tools/browser-read.d.ts.map +0 -1
- package/dist/tools/browser-read.js +0 -113
- package/dist/tools/browser-read.js.map +0 -1
- package/dist/tools/browser-run-scenario.d.ts +0 -28
- package/dist/tools/browser-run-scenario.d.ts.map +0 -1
- package/dist/tools/browser-run-scenario.js +0 -206
- package/dist/tools/browser-run-scenario.js.map +0 -1
- package/dist/tools/browser-save-scenario.d.ts +0 -19
- package/dist/tools/browser-save-scenario.d.ts.map +0 -1
- package/dist/tools/browser-save-scenario.js +0 -447
- package/dist/tools/browser-save-scenario.js.map +0 -1
- package/dist/tools/browser-select.d.ts +0 -20
- package/dist/tools/browser-select.d.ts.map +0 -1
- package/dist/tools/browser-select.js +0 -120
- package/dist/tools/browser-select.js.map +0 -1
- package/dist/tools/browser-snapshot.d.ts +0 -46
- package/dist/tools/browser-snapshot.d.ts.map +0 -1
- package/dist/tools/browser-snapshot.js +0 -127
- package/dist/tools/browser-snapshot.js.map +0 -1
- package/dist/tools/browser-start-session.d.ts +0 -24
- package/dist/tools/browser-start-session.d.ts.map +0 -1
- package/dist/tools/browser-start-session.js +0 -622
- package/dist/tools/browser-start-session.js.map +0 -1
- package/dist/tools/browser-submit.d.ts +0 -18
- package/dist/tools/browser-submit.d.ts.map +0 -1
- package/dist/tools/browser-submit.js +0 -106
- package/dist/tools/browser-submit.js.map +0 -1
- package/dist/tools/browser-type.d.ts +0 -18
- package/dist/tools/browser-type.d.ts.map +0 -1
- package/dist/tools/browser-type.js +0 -115
- package/dist/tools/browser-type.js.map +0 -1
- package/dist/tools/browser-wait-for.d.ts +0 -45
- package/dist/tools/browser-wait-for.d.ts.map +0 -1
- package/dist/tools/browser-wait-for.js +0 -150
- package/dist/tools/browser-wait-for.js.map +0 -1
- package/dist/tools/browser.d.ts +0 -69
- package/dist/tools/browser.d.ts.map +0 -1
- package/dist/tools/browser.js +0 -386
- package/dist/tools/browser.js.map +0 -1
- package/dist/tools/chain.d.ts +0 -41
- package/dist/tools/chain.d.ts.map +0 -1
- package/dist/tools/chain.js +0 -105
- package/dist/tools/chain.js.map +0 -1
- package/dist/tools/change-scope.d.ts +0 -25
- package/dist/tools/change-scope.d.ts.map +0 -1
- package/dist/tools/change-scope.js +0 -110
- package/dist/tools/change-scope.js.map +0 -1
- package/dist/tools/code-context.d.ts +0 -83
- package/dist/tools/code-context.d.ts.map +0 -1
- package/dist/tools/code-context.js +0 -416
- package/dist/tools/code-context.js.map +0 -1
- package/dist/tools/contracts.d.ts +0 -74
- package/dist/tools/contracts.d.ts.map +0 -1
- package/dist/tools/contracts.js +0 -196
- package/dist/tools/contracts.js.map +0 -1
- package/dist/tools/cross-pr.d.ts +0 -178
- package/dist/tools/cross-pr.d.ts.map +0 -1
- package/dist/tools/cross-pr.js +0 -321
- package/dist/tools/cross-pr.js.map +0 -1
- package/dist/tools/disclosure.d.ts +0 -75
- package/dist/tools/disclosure.d.ts.map +0 -1
- package/dist/tools/disclosure.js +0 -288
- package/dist/tools/disclosure.js.map +0 -1
- package/dist/tools/draw-conclusion.d.ts +0 -55
- package/dist/tools/draw-conclusion.d.ts.map +0 -1
- package/dist/tools/draw-conclusion.js +0 -259
- package/dist/tools/draw-conclusion.js.map +0 -1
- package/dist/tools/git-context.d.ts +0 -39
- package/dist/tools/git-context.d.ts.map +0 -1
- package/dist/tools/git-context.js +0 -364
- package/dist/tools/git-context.js.map +0 -1
- package/dist/tools/git-diff.d.ts +0 -45
- package/dist/tools/git-diff.d.ts.map +0 -1
- package/dist/tools/git-diff.js +0 -338
- package/dist/tools/git-diff.js.map +0 -1
- package/dist/tools/git-history.d.ts +0 -16
- package/dist/tools/git-history.d.ts.map +0 -1
- package/dist/tools/git-history.js +0 -86
- package/dist/tools/git-history.js.map +0 -1
- package/dist/tools/history.d.ts +0 -34
- package/dist/tools/history.d.ts.map +0 -1
- package/dist/tools/history.js +0 -121
- package/dist/tools/history.js.map +0 -1
- package/dist/tools/impact.d.ts +0 -46
- package/dist/tools/impact.d.ts.map +0 -1
- package/dist/tools/impact.js +0 -225
- package/dist/tools/impact.js.map +0 -1
- package/dist/tools/index.d.ts +0 -59
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -70
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/kit.d.ts +0 -165
- package/dist/tools/kit.d.ts.map +0 -1
- package/dist/tools/kit.js +0 -153
- package/dist/tools/kit.js.map +0 -1
- package/dist/tools/link-workspace.d.ts +0 -24
- package/dist/tools/link-workspace.d.ts.map +0 -1
- package/dist/tools/link-workspace.js +0 -131
- package/dist/tools/link-workspace.js.map +0 -1
- package/dist/tools/lookup.d.ts +0 -19
- package/dist/tools/lookup.d.ts.map +0 -1
- package/dist/tools/lookup.js +0 -63
- package/dist/tools/lookup.js.map +0 -1
- package/dist/tools/mark-incident.d.ts +0 -28
- package/dist/tools/mark-incident.d.ts.map +0 -1
- package/dist/tools/mark-incident.js +0 -188
- package/dist/tools/mark-incident.js.map +0 -1
- package/dist/tools/merged-browser.d.ts +0 -11
- package/dist/tools/merged-browser.d.ts.map +0 -1
- package/dist/tools/merged-browser.js +0 -20
- package/dist/tools/merged-browser.js.map +0 -1
- package/dist/tools/merged-context.d.ts +0 -11
- package/dist/tools/merged-context.d.ts.map +0 -1
- package/dist/tools/merged-context.js +0 -21
- package/dist/tools/merged-context.js.map +0 -1
- package/dist/tools/merged-observe.d.ts +0 -13
- package/dist/tools/merged-observe.d.ts.map +0 -1
- package/dist/tools/merged-observe.js +0 -21
- package/dist/tools/merged-observe.js.map +0 -1
- package/dist/tools/merged-workspace.d.ts +0 -14
- package/dist/tools/merged-workspace.d.ts.map +0 -1
- package/dist/tools/merged-workspace.js +0 -21
- package/dist/tools/merged-workspace.js.map +0 -1
- package/dist/tools/observe-runtime.d.ts +0 -250
- package/dist/tools/observe-runtime.d.ts.map +0 -1
- package/dist/tools/observe-runtime.js +0 -1753
- package/dist/tools/observe-runtime.js.map +0 -1
- package/dist/tools/observe-tests.d.ts +0 -57
- package/dist/tools/observe-tests.d.ts.map +0 -1
- package/dist/tools/observe-tests.js +0 -368
- package/dist/tools/observe-tests.js.map +0 -1
- package/dist/tools/observe.d.ts +0 -28
- package/dist/tools/observe.d.ts.map +0 -1
- package/dist/tools/observe.js +0 -330
- package/dist/tools/observe.js.map +0 -1
- package/dist/tools/pr-analysis.d.ts +0 -189
- package/dist/tools/pr-analysis.d.ts.map +0 -1
- package/dist/tools/pr-analysis.js +0 -299
- package/dist/tools/pr-analysis.js.map +0 -1
- package/dist/tools/pre-push.d.ts +0 -168
- package/dist/tools/pre-push.d.ts.map +0 -1
- package/dist/tools/pre-push.js +0 -416
- package/dist/tools/pre-push.js.map +0 -1
- package/dist/tools/predict-reach.d.ts +0 -57
- package/dist/tools/predict-reach.d.ts.map +0 -1
- package/dist/tools/predict-reach.js +0 -159
- package/dist/tools/predict-reach.js.map +0 -1
- package/dist/tools/propagation.d.ts +0 -37
- package/dist/tools/propagation.d.ts.map +0 -1
- package/dist/tools/propagation.js +0 -162
- package/dist/tools/propagation.js.map +0 -1
- package/dist/tools/propose-journey.d.ts +0 -16
- package/dist/tools/propose-journey.d.ts.map +0 -1
- package/dist/tools/propose-journey.js +0 -121
- package/dist/tools/propose-journey.js.map +0 -1
- package/dist/tools/prove-reach.d.ts +0 -74
- package/dist/tools/prove-reach.d.ts.map +0 -1
- package/dist/tools/prove-reach.js +0 -286
- package/dist/tools/prove-reach.js.map +0 -1
- package/dist/tools/questions.d.ts +0 -30
- package/dist/tools/questions.d.ts.map +0 -1
- package/dist/tools/questions.js +0 -232
- package/dist/tools/questions.js.map +0 -1
- package/dist/tools/refusal-fetch.d.ts +0 -35
- package/dist/tools/refusal-fetch.d.ts.map +0 -1
- package/dist/tools/refusal-fetch.js +0 -103
- package/dist/tools/refusal-fetch.js.map +0 -1
- package/dist/tools/runtime-incident.d.ts +0 -33
- package/dist/tools/runtime-incident.d.ts.map +0 -1
- package/dist/tools/runtime-incident.js +0 -67
- package/dist/tools/runtime-incident.js.map +0 -1
- package/dist/tools/runtime-journey-drive.d.ts +0 -102
- package/dist/tools/runtime-journey-drive.d.ts.map +0 -1
- package/dist/tools/runtime-journey-drive.js +0 -247
- package/dist/tools/runtime-journey-drive.js.map +0 -1
- package/dist/tools/scope.d.ts +0 -45
- package/dist/tools/scope.d.ts.map +0 -1
- package/dist/tools/scope.js +0 -186
- package/dist/tools/scope.js.map +0 -1
- package/dist/tools/similar-incidents.d.ts +0 -43
- package/dist/tools/similar-incidents.d.ts.map +0 -1
- package/dist/tools/similar-incidents.js +0 -179
- package/dist/tools/similar-incidents.js.map +0 -1
- package/dist/tools/validate.d.ts +0 -133
- package/dist/tools/validate.d.ts.map +0 -1
- package/dist/tools/validate.js +0 -442
- package/dist/tools/validate.js.map +0 -1
- package/dist/tools/verb.d.ts +0 -46
- package/dist/tools/verb.d.ts.map +0 -1
- package/dist/tools/verb.js +0 -78
- package/dist/tools/verb.js.map +0 -1
- package/dist/tools/verification-status.d.ts +0 -38
- package/dist/tools/verification-status.d.ts.map +0 -1
- package/dist/tools/verification-status.js +0 -203
- package/dist/tools/verification-status.js.map +0 -1
- package/dist/tools/verify-claim.d.ts +0 -29
- package/dist/tools/verify-claim.d.ts.map +0 -1
- package/dist/tools/verify-claim.js +0 -220
- package/dist/tools/verify-claim.js.map +0 -1
- package/dist/tools/workspace.d.ts +0 -28
- package/dist/tools/workspace.d.ts.map +0 -1
- package/dist/tools/workspace.js +0 -101
- package/dist/tools/workspace.js.map +0 -1
- package/dist/transport.d.ts +0 -32
- package/dist/transport.d.ts.map +0 -1
- package/dist/transport.js +0 -85
- package/dist/transport.js.map +0 -1
- package/dist/workspace-index.d.ts +0 -164
- package/dist/workspace-index.d.ts.map +0 -1
- package/dist/workspace-index.js +0 -381
- package/dist/workspace-index.js.map +0 -1
package/dist/path-confinement.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Confines a caller-named path to a set of roots, with a disclosed, operator-set
|
|
3
|
-
* escape hatch (A-F6). Generalizes two `observe-runtime.ts` call sites with no such
|
|
4
|
-
* check: `evidencePath` (relative joined onto repo root with no re-check — `..`
|
|
5
|
-
* escaped it) and `attach.logFilePath` (read in full every poll, unchecked). */
|
|
6
|
-
import { resolve, sep } from "node:path";
|
|
7
|
-
function isWithin(resolvedCandidate, root) {
|
|
8
|
-
const resolvedRoot = resolve(root);
|
|
9
|
-
return resolvedCandidate === resolvedRoot || resolvedCandidate.startsWith(resolvedRoot + sep);
|
|
10
|
-
}
|
|
11
|
-
export function checkPathConfinement(options) {
|
|
12
|
-
const resolved = resolve(options.candidate);
|
|
13
|
-
if (options.allowedRoots.some((root) => isWithin(resolved, root))) {
|
|
14
|
-
return { allowed: true, resolved };
|
|
15
|
-
}
|
|
16
|
-
if (process.env[options.envVar] === "1" || process.env[options.envVar] === "true") {
|
|
17
|
-
return { allowed: true, resolved };
|
|
18
|
-
}
|
|
19
|
-
return {
|
|
20
|
-
allowed: false,
|
|
21
|
-
reason: `"${options.candidate}" (${options.what}) resolves to ${resolved}, outside ` +
|
|
22
|
-
`${options.allowedRoots.length === 1 ? "" : "every one of "}${options.allowedRoots.join(", ")}. ` +
|
|
23
|
-
`Refused by default; set ${options.envVar}=1 in this server's own environment to allow it.`,
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
/** Name-based blocklist for logFilePath (can't root-confine — logs live anywhere),
|
|
27
|
-
* narrowed to the exploit's shape (`~/.ssh/id_rsa`). NOT primary defence: `redact()`
|
|
28
|
-
* unconditionally scans every byte first — this only stops the read itself. */
|
|
29
|
-
const SENSITIVE_PATH_SEGMENT = /(^|[/\\])(\.ssh|\.aws|\.gnupg|\.kube|\.netrc|\.npmrc|\.git-credentials|\.pgpass|shadow|id_rsa|id_dsa|id_ecdsa|id_ed25519|\.env(\..+)?|[^/\\]+\.pem|[^/\\]+\.key)($|[/\\])/i;
|
|
30
|
-
export function checkNotSensitivePath(candidate, envVar) {
|
|
31
|
-
const resolved = resolve(candidate);
|
|
32
|
-
if (!SENSITIVE_PATH_SEGMENT.test(resolved))
|
|
33
|
-
return { sensitive: false };
|
|
34
|
-
if (process.env[envVar] === "1" || process.env[envVar] === "true")
|
|
35
|
-
return { sensitive: false };
|
|
36
|
-
return {
|
|
37
|
-
sensitive: true,
|
|
38
|
-
reason: `"${candidate}" names a file shape that is never an application log (an SSH/cloud/credential ` +
|
|
39
|
-
`location) — refusing to read it as one. This is a narrow, name-based check, not a guarantee that ` +
|
|
40
|
-
`every sensitive path is caught; set ${envVar}=1 in this server's own environment if this path ` +
|
|
41
|
-
"genuinely is your application's log.",
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=path-confinement.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path-confinement.js","sourceRoot":"","sources":["../src/path-confinement.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAMzC,SAAS,QAAQ,CAAC,iBAAyB,EAAE,IAAY;IACvD,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,OAAO,iBAAiB,KAAK,YAAY,IAAI,iBAAiB,CAAC,UAAU,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC;AAChG,CAAC;AAaD,MAAM,UAAU,oBAAoB,CAAC,OAA+B;IAClE,MA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OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IAC/F,OAAO;QACL,SAAS,EAAE,IAAI;QACf,MAAM,EACJ,IAAI,SAAS,iFAAiF;YAC9F,mGAAmG;YACnG,uCAAuC,MAAM,mDAAmD;YAChG,sCAAsC;KACzC,CAAC;AACJ,CAAC"}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RG-10's second half, joined to its first: predict, then propose — never
|
|
3
|
-
* predict, then drive. `documents/plans/runtime-gap-closure.md`'s Lane C3.
|
|
4
|
-
*
|
|
5
|
-
* The predict half is `reachablePages` (`@descryy/core`): a one-sided
|
|
6
|
-
* forward walk from any node — typically a `DATABASE_COLUMN` a diff touches
|
|
7
|
-
* — over `PROPAGATES_TO`/`READS`/`ASSIGNS`/`RETURNS`, crossing `USES_API`
|
|
8
|
-
* backward at an `API_ENDPOINT`, to whatever `PAGE`/`COMPONENT` the data can
|
|
9
|
-
* reach. That traversal already existed (Gap 8 step 3) and is untouched
|
|
10
|
-
* here.
|
|
11
|
-
*
|
|
12
|
-
* The propose half reuses lane journey's planner (`./propose-journey.ts`)
|
|
13
|
-
* exactly as `propose_journey` itself does — same function, same "propose,
|
|
14
|
-
* never invent" discipline, same navigate-only limitation (the graph has no
|
|
15
|
-
* selector, so a `PAGE` reached through the walk becomes a navigate step
|
|
16
|
-
* only when its own qualified name looks like a route path; everything
|
|
17
|
-
* else is `reachedNotProposed`, not guessed into a click). This module
|
|
18
|
-
* builds no second planner and no second projection — it is the join, not
|
|
19
|
-
* a third implementation.
|
|
20
|
-
*
|
|
21
|
-
* **This module never drives anything and never writes to a `Finding`.**
|
|
22
|
-
* Proving or disproving what it predicts is: a human (or an agent acting on
|
|
23
|
-
* a human's behalf) reviews the proposal, drives the application for real
|
|
24
|
-
* (`browser_start_session`, the browser primitives, `browser_save_scenario`
|
|
25
|
-
* to commit what actually happened), and records the outcome against the
|
|
26
|
-
* finding that predicted it — a step this module does not take, because
|
|
27
|
-
* `packages/ir/src/finding.ts` and the finding funnel are outside this
|
|
28
|
-
* lane's owned files. See the `predict_reach` tool's own description for
|
|
29
|
-
* where that handoff is named to a caller.
|
|
30
|
-
*
|
|
31
|
-
* ## `proveOrDisprove` — the join, added by the pipeline-joins lane (RG-10, §5 Lane C3)
|
|
32
|
-
*
|
|
33
|
-
* Still never drives anything. It takes evidence a caller *already*
|
|
34
|
-
* collected by driving an accepted scenario for real — `browser_run_scenario`'s
|
|
35
|
-
* own `graph: BrowserGraphWrite` (or, in a live pipeline run, the same
|
|
36
|
-
* `graphNodeId`-correlated evidence `descry-desktop`'s runtime execution
|
|
37
|
-
* already produces) — and compares it against what {@link predictThenPropose}
|
|
38
|
-
* predicted. `ObservedReach` is declared structurally, not imported from
|
|
39
|
-
* `../browser/*`, so this module (and every caller of it, including
|
|
40
|
-
* `descry-desktop`'s pipeline) takes no dependency on the browser package;
|
|
41
|
-
* a real `BrowserGraphWrite`'s resolved node ids structurally satisfy it
|
|
42
|
-
* without a cast.
|
|
43
|
-
*
|
|
44
|
-
* **Both directions are real answers, not just the confirming one.** A
|
|
45
|
-
* predicted page absent from `observed.visitedNodeIds` after the declared
|
|
46
|
-
* journey ran to completion is a disproof — the propagation this module
|
|
47
|
-
* predicted did not show up where the graph said it would — and rule 6/7
|
|
48
|
-
* require that to be as visible as a proof, never silently dropped in favour
|
|
49
|
-
* of the cases that confirmed the prediction.
|
|
50
|
-
*/
|
|
51
|
-
import { type AdjacencyProvider } from "@descryy/core";
|
|
52
|
-
import { type JourneyCandidateNode, type JourneyPathHop, type ProposedJourney } from "./propose-journey.ts";
|
|
53
|
-
export interface PredictThenProposeOptions {
|
|
54
|
-
readonly targetUrl: string;
|
|
55
|
-
readonly name: string;
|
|
56
|
-
readonly savedAtCommit: string;
|
|
57
|
-
}
|
|
58
|
-
export interface PredictedReach {
|
|
59
|
-
/** Every PAGE/COMPONENT node the walk reached, in the order it found them. */
|
|
60
|
-
readonly reachedPages: readonly JourneyCandidateNode[];
|
|
61
|
-
/** Null iff `reachedPages` is empty — nothing to propose a journey toward. */
|
|
62
|
-
readonly proposal: ProposedJourney | null;
|
|
63
|
-
readonly notes: readonly string[];
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Walks from `startNodeId` to whatever pages the data can reach, and — when
|
|
67
|
-
* it reaches at least one — proposes a navigate-only journey to them via
|
|
68
|
-
* the shared planner. Pure over `provider`: no browser, no write, no I/O.
|
|
69
|
-
*/
|
|
70
|
-
export declare function predictThenPropose(provider: AdjacencyProvider, startNodeId: string, options: PredictThenProposeOptions): PredictedReach;
|
|
71
|
-
/**
|
|
72
|
-
* What a caller already observed by driving an accepted journey for real —
|
|
73
|
-
* never produced by this module. Structural: a real `BrowserGraphWrite`
|
|
74
|
-
* (`browser_run_scenario`'s own reply) or a live run's `graphNodeId`-
|
|
75
|
-
* correlated evidence both satisfy this without a cast; see this module's
|
|
76
|
-
* header.
|
|
77
|
-
*/
|
|
78
|
-
export interface ObservedReach {
|
|
79
|
-
/** Graph node ids the real, already-driven journey's evidence actually correlated to. */
|
|
80
|
-
readonly visitedNodeIds: readonly string[];
|
|
81
|
-
}
|
|
82
|
-
/** One predicted page, resolved against what really happened. */
|
|
83
|
-
export interface ProvenReach {
|
|
84
|
-
/** Predicted pages the real drive's own evidence shows were actually reached. */
|
|
85
|
-
readonly proven: readonly JourneyCandidateNode[];
|
|
86
|
-
/**
|
|
87
|
-
* Predicted pages the declared journey ran to completion without ever
|
|
88
|
-
* reaching. A real disproof — not "not yet checked" (that's simply the
|
|
89
|
-
* absence of an `ObservedReach` at all) — see this module's header for why
|
|
90
|
-
* this is recorded with the same weight as `proven`.
|
|
91
|
-
*/
|
|
92
|
-
readonly disproven: readonly JourneyCandidateNode[];
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* The join itself: never drives, only compares. `predicted.reachedPages`
|
|
96
|
-
* partitions cleanly into `proven`/`disproven` against `observed.visitedNodeIds`
|
|
97
|
-
* — every predicted page lands in exactly one, so a caller can never read a
|
|
98
|
-
* prediction as "not checked" once it has a real `ObservedReach` in hand.
|
|
99
|
-
*/
|
|
100
|
-
export declare function proveOrDisprove(predicted: PredictedReach, observed: ObservedReach): ProvenReach;
|
|
101
|
-
/** One real edge, in the shape `@descryy/ir`'s `GraphPathHop` needs — never invented, only
|
|
102
|
-
* ever a copy of a hop `reachablePages` actually walked (see `queries.ts`'s `ReachPathHop`). */
|
|
103
|
-
export type PredictedPathHop = JourneyPathHop;
|
|
104
|
-
/**
|
|
105
|
-
* `prove_reach`'s join into the finding funnel: the real path from `startNodeId` to whichever
|
|
106
|
-
* predicted pages a caller names (typically the ones a real drive proved), deduplicated by
|
|
107
|
-
* (from, to, edgeType) and ordered by first appearance. Pure — no I/O, no re-traversal; it only
|
|
108
|
-
* reassembles the `path` each `JourneyCandidateNode` already carries from `predictThenPropose`.
|
|
109
|
-
*
|
|
110
|
-
* Union, not intersection or average: rule 2 says omit an edge you are unsure of, not omit one
|
|
111
|
-
* two pages happen to share — every hop named here is a real edge on at least one named page's
|
|
112
|
-
* real path, and `minimumResolution` (the caller's next step) already takes the conservative
|
|
113
|
-
* floor across all of them.
|
|
114
|
-
*/
|
|
115
|
-
export declare function combinedGraphPath(predicted: PredictedReach, pageIds: readonly string[]): readonly PredictedPathHop[];
|
|
116
|
-
/** One proposed navigate step, resolved against how it actually replayed — structural, the same
|
|
117
|
-
* reasoning as `ObservedReach`: a real `ScenarioStepResult` (`browser/scenario-runner.ts`)
|
|
118
|
-
* already satisfies this without a cast, so this module still takes no dependency on the
|
|
119
|
-
* browser package (see this module's header). */
|
|
120
|
-
export interface ReplayedStep {
|
|
121
|
-
readonly url: string;
|
|
122
|
-
readonly status: "ran" | "unresolved" | "skipped";
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Which predicted pages a real drive of the proposed scenario actually navigated to —
|
|
126
|
-
* `prove_reach`'s own `ObservedReach.visitedNodeIds`, built without guessing: a page counts as
|
|
127
|
-
* visited only when a step whose `url` is byte-identical to the exact navigate URL
|
|
128
|
-
* `proposeJourney` built FROM that page's own route name came back `"ran"`. A step that never
|
|
129
|
-
* resolved (the app was down, the route 404'd before the browser could navigate) does not count
|
|
130
|
-
* — reaching a URL and having the navigation actually run are the same fact here, and this
|
|
131
|
-
* never inflates "predicted" into "visited" for a step that did not.
|
|
132
|
-
*/
|
|
133
|
-
export declare function visitedPageIds(predicted: PredictedReach, targetUrl: string, steps: readonly ReplayedStep[]): readonly string[];
|
|
134
|
-
//# sourceMappingURL=predict-then-propose.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"predict-then-propose.d.ts","sourceRoot":"","sources":["../../src/planner/predict-then-propose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAkB,KAAK,oBAAoB,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5H,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,QAAQ,CAAC,YAAY,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACvD,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,iBAAiB,EAC3B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,yBAAyB,GACjC,cAAc,CAmBhB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,yFAAyF;IACzF,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED,iEAAiE;AACjE,MAAM,WAAW,WAAW;IAC1B,iFAAiF;IACjF,QAAQ,CAAC,MAAM,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACjD;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACrD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,GAAG,WAAW,CAQ/F;AAED;iGACiG;AACjG,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAE9C;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,gBAAgB,EAAE,CAcpH;AAED;;;kDAGkD;AAClD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,YAAY,GAAG,SAAS,CAAC;CACnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,MAAM,EAAE,CAQ9H"}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RG-10's second half, joined to its first: predict, then propose — never
|
|
3
|
-
* predict, then drive. `documents/plans/runtime-gap-closure.md`'s Lane C3.
|
|
4
|
-
*
|
|
5
|
-
* The predict half is `reachablePages` (`@descryy/core`): a one-sided
|
|
6
|
-
* forward walk from any node — typically a `DATABASE_COLUMN` a diff touches
|
|
7
|
-
* — over `PROPAGATES_TO`/`READS`/`ASSIGNS`/`RETURNS`, crossing `USES_API`
|
|
8
|
-
* backward at an `API_ENDPOINT`, to whatever `PAGE`/`COMPONENT` the data can
|
|
9
|
-
* reach. That traversal already existed (Gap 8 step 3) and is untouched
|
|
10
|
-
* here.
|
|
11
|
-
*
|
|
12
|
-
* The propose half reuses lane journey's planner (`./propose-journey.ts`)
|
|
13
|
-
* exactly as `propose_journey` itself does — same function, same "propose,
|
|
14
|
-
* never invent" discipline, same navigate-only limitation (the graph has no
|
|
15
|
-
* selector, so a `PAGE` reached through the walk becomes a navigate step
|
|
16
|
-
* only when its own qualified name looks like a route path; everything
|
|
17
|
-
* else is `reachedNotProposed`, not guessed into a click). This module
|
|
18
|
-
* builds no second planner and no second projection — it is the join, not
|
|
19
|
-
* a third implementation.
|
|
20
|
-
*
|
|
21
|
-
* **This module never drives anything and never writes to a `Finding`.**
|
|
22
|
-
* Proving or disproving what it predicts is: a human (or an agent acting on
|
|
23
|
-
* a human's behalf) reviews the proposal, drives the application for real
|
|
24
|
-
* (`browser_start_session`, the browser primitives, `browser_save_scenario`
|
|
25
|
-
* to commit what actually happened), and records the outcome against the
|
|
26
|
-
* finding that predicted it — a step this module does not take, because
|
|
27
|
-
* `packages/ir/src/finding.ts` and the finding funnel are outside this
|
|
28
|
-
* lane's owned files. See the `predict_reach` tool's own description for
|
|
29
|
-
* where that handoff is named to a caller.
|
|
30
|
-
*
|
|
31
|
-
* ## `proveOrDisprove` — the join, added by the pipeline-joins lane (RG-10, §5 Lane C3)
|
|
32
|
-
*
|
|
33
|
-
* Still never drives anything. It takes evidence a caller *already*
|
|
34
|
-
* collected by driving an accepted scenario for real — `browser_run_scenario`'s
|
|
35
|
-
* own `graph: BrowserGraphWrite` (or, in a live pipeline run, the same
|
|
36
|
-
* `graphNodeId`-correlated evidence `descry-desktop`'s runtime execution
|
|
37
|
-
* already produces) — and compares it against what {@link predictThenPropose}
|
|
38
|
-
* predicted. `ObservedReach` is declared structurally, not imported from
|
|
39
|
-
* `../browser/*`, so this module (and every caller of it, including
|
|
40
|
-
* `descry-desktop`'s pipeline) takes no dependency on the browser package;
|
|
41
|
-
* a real `BrowserGraphWrite`'s resolved node ids structurally satisfy it
|
|
42
|
-
* without a cast.
|
|
43
|
-
*
|
|
44
|
-
* **Both directions are real answers, not just the confirming one.** A
|
|
45
|
-
* predicted page absent from `observed.visitedNodeIds` after the declared
|
|
46
|
-
* journey ran to completion is a disproof — the propagation this module
|
|
47
|
-
* predicted did not show up where the graph said it would — and rule 6/7
|
|
48
|
-
* require that to be as visible as a proof, never silently dropped in favour
|
|
49
|
-
* of the cases that confirmed the prediction.
|
|
50
|
-
*/
|
|
51
|
-
import { reachablePages } from "@descryy/core";
|
|
52
|
-
import { proposeJourney } from "./propose-journey.js";
|
|
53
|
-
/**
|
|
54
|
-
* Walks from `startNodeId` to whatever pages the data can reach, and — when
|
|
55
|
-
* it reaches at least one — proposes a navigate-only journey to them via
|
|
56
|
-
* the shared planner. Pure over `provider`: no browser, no write, no I/O.
|
|
57
|
-
*/
|
|
58
|
-
export function predictThenPropose(provider, startNodeId, options) {
|
|
59
|
-
const reach = reachablePages(provider, startNodeId);
|
|
60
|
-
// `reachablePages` already restricts itself to PAGE/COMPONENT nodes (see
|
|
61
|
-
// its own doc); no re-filtering needed here. `path` — the real edge chain
|
|
62
|
-
// this walk used to reach this node — is carried through so a later caller
|
|
63
|
-
// (`prove_reach`) can build a real `graphPath` from it, never a guessed one.
|
|
64
|
-
const reachedPages = reach.data.map((r) => ({
|
|
65
|
-
id: r.node.id,
|
|
66
|
-
type: r.node.type,
|
|
67
|
-
name: r.node.name,
|
|
68
|
-
path: r.path,
|
|
69
|
-
}));
|
|
70
|
-
if (reachedPages.length === 0) {
|
|
71
|
-
return { reachedPages: [], proposal: null, notes: reach.notes };
|
|
72
|
-
}
|
|
73
|
-
const proposal = proposeJourney(reachedPages, options);
|
|
74
|
-
return { reachedPages, proposal, notes: [...reach.notes, ...proposal.notes] };
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* The join itself: never drives, only compares. `predicted.reachedPages`
|
|
78
|
-
* partitions cleanly into `proven`/`disproven` against `observed.visitedNodeIds`
|
|
79
|
-
* — every predicted page lands in exactly one, so a caller can never read a
|
|
80
|
-
* prediction as "not checked" once it has a real `ObservedReach` in hand.
|
|
81
|
-
*/
|
|
82
|
-
export function proveOrDisprove(predicted, observed) {
|
|
83
|
-
const visited = new Set(observed.visitedNodeIds);
|
|
84
|
-
const proven = [];
|
|
85
|
-
const disproven = [];
|
|
86
|
-
for (const page of predicted.reachedPages) {
|
|
87
|
-
(visited.has(page.id) ? proven : disproven).push(page);
|
|
88
|
-
}
|
|
89
|
-
return { proven, disproven };
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* `prove_reach`'s join into the finding funnel: the real path from `startNodeId` to whichever
|
|
93
|
-
* predicted pages a caller names (typically the ones a real drive proved), deduplicated by
|
|
94
|
-
* (from, to, edgeType) and ordered by first appearance. Pure — no I/O, no re-traversal; it only
|
|
95
|
-
* reassembles the `path` each `JourneyCandidateNode` already carries from `predictThenPropose`.
|
|
96
|
-
*
|
|
97
|
-
* Union, not intersection or average: rule 2 says omit an edge you are unsure of, not omit one
|
|
98
|
-
* two pages happen to share — every hop named here is a real edge on at least one named page's
|
|
99
|
-
* real path, and `minimumResolution` (the caller's next step) already takes the conservative
|
|
100
|
-
* floor across all of them.
|
|
101
|
-
*/
|
|
102
|
-
export function combinedGraphPath(predicted, pageIds) {
|
|
103
|
-
const wanted = new Set(pageIds);
|
|
104
|
-
const seen = new Set();
|
|
105
|
-
const hops = [];
|
|
106
|
-
for (const page of predicted.reachedPages) {
|
|
107
|
-
if (!wanted.has(page.id) || page.path === undefined)
|
|
108
|
-
continue;
|
|
109
|
-
for (const hop of page.path) {
|
|
110
|
-
const key = `${hop.from}::${hop.to}::${hop.edgeType}`;
|
|
111
|
-
if (seen.has(key))
|
|
112
|
-
continue;
|
|
113
|
-
seen.add(key);
|
|
114
|
-
hops.push(hop);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return hops;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Which predicted pages a real drive of the proposed scenario actually navigated to —
|
|
121
|
-
* `prove_reach`'s own `ObservedReach.visitedNodeIds`, built without guessing: a page counts as
|
|
122
|
-
* visited only when a step whose `url` is byte-identical to the exact navigate URL
|
|
123
|
-
* `proposeJourney` built FROM that page's own route name came back `"ran"`. A step that never
|
|
124
|
-
* resolved (the app was down, the route 404'd before the browser could navigate) does not count
|
|
125
|
-
* — reaching a URL and having the navigation actually run are the same fact here, and this
|
|
126
|
-
* never inflates "predicted" into "visited" for a step that did not.
|
|
127
|
-
*/
|
|
128
|
-
export function visitedPageIds(predicted, targetUrl, steps) {
|
|
129
|
-
const base = targetUrl.endsWith("/") ? targetUrl.slice(0, -1) : targetUrl;
|
|
130
|
-
const ranUrls = new Set(steps.filter((s) => s.status === "ran").map((s) => s.url));
|
|
131
|
-
const visited = [];
|
|
132
|
-
for (const page of predicted.reachedPages) {
|
|
133
|
-
if (ranUrls.has(`${base}${page.name}`))
|
|
134
|
-
visited.push(page.id);
|
|
135
|
-
}
|
|
136
|
-
return visited;
|
|
137
|
-
}
|
|
138
|
-
//# sourceMappingURL=predict-then-propose.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"predict-then-propose.js","sourceRoot":"","sources":["../../src/planner/predict-then-propose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,EAAE,cAAc,EAA0B,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAwE,MAAM,sBAAsB,CAAC;AAgB5H;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAChC,QAA2B,EAC3B,WAAmB,EACnB,OAAkC;IAElC,MAAM,KAAK,GAAG,cAAc,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACpD,yEAAyE;IACzE,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AAC,CAAC,CAAC;IACnF,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,YAAY,EAAE,CAAC;QAC1C,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The planner — proposes, never invents. Lane A1, item 5 of
|
|
3
|
-
* `documents/plans/runtime-gap-closure.md`, closing the rest of RG-1.
|
|
4
|
-
*
|
|
5
|
-
* ## What this is and is not
|
|
6
|
-
*
|
|
7
|
-
* Takes the `PAGE`/`COMPONENT` nodes a diff-scope traversal already found
|
|
8
|
-
* (the same `scopeChange` the `scope` tool calls — this module receives its
|
|
9
|
-
* output, it does not recompute it) and turns them into a **proposed**
|
|
10
|
-
* `Scenario` — a value returned to the caller, never written to disk. Rule 1
|
|
11
|
-
* ("never fabricate input") is the whole shape of this module: the code
|
|
12
|
-
* graph has no DOM. It can name a route a `PAGE` node's own qualified path
|
|
13
|
-
* spells out; it has no selector, no accessible name, no evidence a button
|
|
14
|
-
* exists at all. So the proposal is **navigate-only** — one step per
|
|
15
|
-
* page-shaped route the scope touched — and every `COMPONENT` node (and
|
|
16
|
-
* every `PAGE` node with no path-shaped name to navigate to) is listed as
|
|
17
|
-
* *reached but not exercised*, disclosed rather than guessed into a `click`
|
|
18
|
-
* step this module cannot back with a real selector.
|
|
19
|
-
*
|
|
20
|
-
* ## Why this can never execute anything
|
|
21
|
-
*
|
|
22
|
-
* The only way a `Scenario` becomes replayable is `writeScenario`
|
|
23
|
-
* (`scenarios/storage.ts`), and the only caller in this codebase that calls
|
|
24
|
-
* it is `browser_save_scenario` — which requires a **live, already-driven
|
|
25
|
-
* browser session** and independently verifies every step actually
|
|
26
|
-
* resolves before it writes anything (`collectUnresolvedTargets`). This
|
|
27
|
-
* module never imports `writeScenario` and never touches a browser session.
|
|
28
|
-
* A proposal from here is data in a tool reply; nothing runs until a human
|
|
29
|
-
* (or an agent acting on a human's behalf) drives the app for real and
|
|
30
|
-
* calls `browser_save_scenario` — the acceptance act — which is what
|
|
31
|
-
* produces the one artifact (`descry/scenarios/*.scenario.json`) that
|
|
32
|
-
* `browser_run_scenario` can replay. See `propose-journey.test.ts`'s
|
|
33
|
-
* "nothing executes without an acceptance record" case.
|
|
34
|
-
*/
|
|
35
|
-
import type { EdgeType, ResolutionLevel } from "@descryy/ir";
|
|
36
|
-
import { type Scenario } from "../scenarios/index.ts";
|
|
37
|
-
/** One real, stored edge — see `@descryy/core`'s `ReachPathHop` (same shape, this planner takes
|
|
38
|
-
* no dependency on that package's query layer to declare it). Field-compatible with
|
|
39
|
-
* `@descryy/ir`'s `GraphPathHop` too, so a real array of these already satisfies it without a cast. */
|
|
40
|
-
export interface JourneyPathHop {
|
|
41
|
-
readonly from: string;
|
|
42
|
-
readonly to: string;
|
|
43
|
-
readonly edgeType: EdgeType;
|
|
44
|
-
readonly resolution: ResolutionLevel;
|
|
45
|
-
}
|
|
46
|
-
export interface JourneyCandidateNode {
|
|
47
|
-
readonly id: string;
|
|
48
|
-
readonly type: string;
|
|
49
|
-
readonly name: string;
|
|
50
|
-
/** The real edge chain `reachablePages` walked to reach this node, when the caller has one
|
|
51
|
-
* (`predictThenPropose` sets it; a plain diff-scope caller of this planner does not). Optional
|
|
52
|
-
* so this planner's own, unrelated callers are unaffected — it is never read here, only
|
|
53
|
-
* carried through for `prove_reach`'s join into the finding funnel. */
|
|
54
|
-
readonly path?: readonly JourneyPathHop[];
|
|
55
|
-
}
|
|
56
|
-
export interface ProposedJourney {
|
|
57
|
-
/** A `Scenario`-shaped proposal. `assertions` is always empty: this module has no evidence to assert against, and inventing one would be a confident false claim about a page it never observed. */
|
|
58
|
-
readonly scenario: Scenario;
|
|
59
|
-
/** `PAGE` nodes in scope whose name did not look like a navigable path, and every `COMPONENT` node — real graph hits, listed rather than guessed into a step. */
|
|
60
|
-
readonly reachedNotProposed: readonly JourneyCandidateNode[];
|
|
61
|
-
readonly notes: readonly string[];
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Builds a proposed journey from the `PAGE`/`COMPONENT` nodes a diff scope
|
|
65
|
-
* already found. `nodes` is typically `[...scoped.changed, ...scoped.affected]`
|
|
66
|
-
* mapped to their graph node — the caller (the MCP tool) owns fetching that;
|
|
67
|
-
* this function is pure over the result so it is exhaustively testable
|
|
68
|
-
* without a graph.
|
|
69
|
-
*/
|
|
70
|
-
export declare function proposeJourney(nodes: readonly JourneyCandidateNode[], options: {
|
|
71
|
-
readonly targetUrl: string;
|
|
72
|
-
readonly name: string;
|
|
73
|
-
readonly savedAtCommit: string;
|
|
74
|
-
}): ProposedJourney;
|
|
75
|
-
//# sourceMappingURL=propose-journey.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"propose-journey.d.ts","sourceRoot":"","sources":["../../src/planner/propose-journey.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE7D,OAAO,EAA2B,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE/E;;wGAEwG;AACxG,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;CACtC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;4EAGwE;IACxE,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,eAAe;IAC9B,oMAAoM;IACpM,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,iKAAiK;IACjK,QAAQ,CAAC,kBAAkB,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC7D,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAOD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS,oBAAoB,EAAE,EACtC,OAAO,EAAE;IACP,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC,GACA,eAAe,CAwDjB"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The planner — proposes, never invents. Lane A1, item 5 of
|
|
3
|
-
* `documents/plans/runtime-gap-closure.md`, closing the rest of RG-1.
|
|
4
|
-
*
|
|
5
|
-
* ## What this is and is not
|
|
6
|
-
*
|
|
7
|
-
* Takes the `PAGE`/`COMPONENT` nodes a diff-scope traversal already found
|
|
8
|
-
* (the same `scopeChange` the `scope` tool calls — this module receives its
|
|
9
|
-
* output, it does not recompute it) and turns them into a **proposed**
|
|
10
|
-
* `Scenario` — a value returned to the caller, never written to disk. Rule 1
|
|
11
|
-
* ("never fabricate input") is the whole shape of this module: the code
|
|
12
|
-
* graph has no DOM. It can name a route a `PAGE` node's own qualified path
|
|
13
|
-
* spells out; it has no selector, no accessible name, no evidence a button
|
|
14
|
-
* exists at all. So the proposal is **navigate-only** — one step per
|
|
15
|
-
* page-shaped route the scope touched — and every `COMPONENT` node (and
|
|
16
|
-
* every `PAGE` node with no path-shaped name to navigate to) is listed as
|
|
17
|
-
* *reached but not exercised*, disclosed rather than guessed into a `click`
|
|
18
|
-
* step this module cannot back with a real selector.
|
|
19
|
-
*
|
|
20
|
-
* ## Why this can never execute anything
|
|
21
|
-
*
|
|
22
|
-
* The only way a `Scenario` becomes replayable is `writeScenario`
|
|
23
|
-
* (`scenarios/storage.ts`), and the only caller in this codebase that calls
|
|
24
|
-
* it is `browser_save_scenario` — which requires a **live, already-driven
|
|
25
|
-
* browser session** and independently verifies every step actually
|
|
26
|
-
* resolves before it writes anything (`collectUnresolvedTargets`). This
|
|
27
|
-
* module never imports `writeScenario` and never touches a browser session.
|
|
28
|
-
* A proposal from here is data in a tool reply; nothing runs until a human
|
|
29
|
-
* (or an agent acting on a human's behalf) drives the app for real and
|
|
30
|
-
* calls `browser_save_scenario` — the acceptance act — which is what
|
|
31
|
-
* produces the one artifact (`descry/scenarios/*.scenario.json`) that
|
|
32
|
-
* `browser_run_scenario` can replay. See `propose-journey.test.ts`'s
|
|
33
|
-
* "nothing executes without an acceptance record" case.
|
|
34
|
-
*/
|
|
35
|
-
import { SCENARIO_SCHEMA_VERSION } from "../scenarios/index.js";
|
|
36
|
-
/** A qualified symbol name that looks like a route path: starts with `/`, single line, no whitespace. Deliberately conservative — false negatives (a real route this misses) fall through to `reachedNotProposed`, which is the safe direction (rule 2: when in doubt, omit). */
|
|
37
|
-
function looksLikeRoutePath(name) {
|
|
38
|
-
return name.startsWith("/") && !/\s/.test(name) && !name.includes("\n");
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Builds a proposed journey from the `PAGE`/`COMPONENT` nodes a diff scope
|
|
42
|
-
* already found. `nodes` is typically `[...scoped.changed, ...scoped.affected]`
|
|
43
|
-
* mapped to their graph node — the caller (the MCP tool) owns fetching that;
|
|
44
|
-
* this function is pure over the result so it is exhaustively testable
|
|
45
|
-
* without a graph.
|
|
46
|
-
*/
|
|
47
|
-
export function proposeJourney(nodes, options) {
|
|
48
|
-
const pages = nodes.filter((n) => n.type === "PAGE");
|
|
49
|
-
const components = nodes.filter((n) => n.type === "COMPONENT");
|
|
50
|
-
const routable = [];
|
|
51
|
-
const unroutable = [];
|
|
52
|
-
for (const page of pages)
|
|
53
|
-
(looksLikeRoutePath(page.name) ? routable : unroutable).push(page);
|
|
54
|
-
const base = options.targetUrl.endsWith("/") ? options.targetUrl.slice(0, -1) : options.targetUrl;
|
|
55
|
-
// Deduplicated and ordered — two PAGE nodes for the same route (a layout
|
|
56
|
-
// and a leaf, say) must not become two identical navigate steps.
|
|
57
|
-
const seenPaths = new Set();
|
|
58
|
-
const steps = [];
|
|
59
|
-
for (const page of routable) {
|
|
60
|
-
if (seenPaths.has(page.name))
|
|
61
|
-
continue;
|
|
62
|
-
seenPaths.add(page.name);
|
|
63
|
-
steps.push({ action: "navigate", url: `${base}${page.name}`, target: null, text: null });
|
|
64
|
-
}
|
|
65
|
-
const notes = [];
|
|
66
|
-
if (steps.length === 0) {
|
|
67
|
-
notes.push("No node in scope named a path-shaped route, so this proposal has no steps to offer. This is not a " +
|
|
68
|
-
"claim that nothing changed — it is a claim that nothing in scope looked like a navigable page from " +
|
|
69
|
-
"the graph alone. A human exploring the application directly (browser_start_session, then " +
|
|
70
|
-
"browser_save_scenario) is how a real journey gets declared from here.");
|
|
71
|
-
}
|
|
72
|
-
notes.push("Every step here is navigate-only: the code graph has no selector, no accessible name and no evidence " +
|
|
73
|
-
"an element exists, so this proposal never invents a click, a type or a submit. A human who accepts " +
|
|
74
|
-
"this proposal drives the rest of the journey for real and saves it with browser_save_scenario — that " +
|
|
75
|
-
"save is what turns a proposal into something replayable, and this module never calls it itself.");
|
|
76
|
-
if (unroutable.length + components.length > 0) {
|
|
77
|
-
notes.push(`${unroutable.length + components.length} node(s) in scope (${unroutable.length} page(s) with no ` +
|
|
78
|
-
`path-shaped name, ${components.length} component(s)) are reached but not proposed as a step — listed ` +
|
|
79
|
-
"in reachedNotProposed rather than guessed into one.");
|
|
80
|
-
}
|
|
81
|
-
return {
|
|
82
|
-
scenario: {
|
|
83
|
-
schemaVersion: SCENARIO_SCHEMA_VERSION,
|
|
84
|
-
name: options.name,
|
|
85
|
-
description: "Proposed by the planner from a diff scope's PAGE nodes — not accepted, not saved, not runnable until a human reviews it.",
|
|
86
|
-
targetUrl: steps[0]?.url ?? options.targetUrl,
|
|
87
|
-
savedAt: new Date().toISOString(),
|
|
88
|
-
savedAtCommit: options.savedAtCommit,
|
|
89
|
-
steps,
|
|
90
|
-
assertions: [],
|
|
91
|
-
},
|
|
92
|
-
reachedNotProposed: [...unroutable, ...components],
|
|
93
|
-
notes,
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=propose-journey.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"propose-journey.js","sourceRoot":"","sources":["../../src/planner/propose-journey.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAIH,OAAO,EAAE,uBAAuB,EAAiB,MAAM,uBAAuB,CAAC;AA+B/E,iRAAiR;AACjR,SAAS,kBAAkB,CAAC,IAAY;IACtC,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC1E,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAsC,EACtC,OAIC;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC;IAE/D,MAAM,QAAQ,GAA2B,EAAE,CAAC;IAC5C,MAAM,UA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AAM,GAAG,CAAC,EAAE,CAAC;QAC9C,KAAK,CAAC,IAAI,CACR,GAAG,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,sBAAsB,UAAU,CAAC,MAAM,mBAAmB;YAChG,qBAAqB,UAAU,CAAC,MAAM,iEAAiE;YACvG,qDAAqD,CACxD,CAAC;IACJ,CAAC;IAED,OAAO;QACL,QAAQ,EAAE;YACR,aAAa,EAAE,uBAAuB;YACtC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,0HAA0H;YACvI,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,OAAO,CAAC,SAAS;YAC7C,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACjC,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,KAAK;YACL,UAAU,EAAE,EAAE;SACf;QACD,kBAAkB,EAAE,CAAC,GAAG,UAAU,EAAE,GAAG,UAAU,CAAC;QAClD,KAAK;KACN,CAAC;AACJ,CAAC"}
|
package/dist/protocol.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* JSON-RPC 2.0 + the MCP slice this server speaks — hand-written, not the SDK:
|
|
3
|
-
* v1.30.0 pulls 17 deps, nearly all for HTTP/OAuth transports this stdio-only
|
|
4
|
-
* server never opens (same call as `node:sqlite`, `node --test`, `tsc` elsewhere).
|
|
5
|
-
* Spec-drift risk is mitigated by a pinned `PROTOCOL_VERSION` and exact-frame tests. */
|
|
6
|
-
/** JSON-RPC 2.0 ids: string or number, never null in a request. */
|
|
7
|
-
export type RpcId = string | number;
|
|
8
|
-
export interface RpcRequest {
|
|
9
|
-
readonly jsonrpc: "2.0";
|
|
10
|
-
readonly id: RpcId;
|
|
11
|
-
readonly method: string;
|
|
12
|
-
readonly params?: Record<string, unknown>;
|
|
13
|
-
}
|
|
14
|
-
export interface RpcNotification {
|
|
15
|
-
readonly jsonrpc: "2.0";
|
|
16
|
-
readonly method: string;
|
|
17
|
-
readonly params?: Record<string, unknown>;
|
|
18
|
-
}
|
|
19
|
-
export interface RpcError {
|
|
20
|
-
readonly code: number;
|
|
21
|
-
readonly message: string;
|
|
22
|
-
readonly data?: unknown;
|
|
23
|
-
}
|
|
24
|
-
export interface RpcResponse {
|
|
25
|
-
readonly jsonrpc: "2.0";
|
|
26
|
-
readonly id: RpcId;
|
|
27
|
-
readonly result?: unknown;
|
|
28
|
-
readonly error?: RpcError;
|
|
29
|
-
}
|
|
30
|
-
export type RpcMessage = RpcRequest | RpcNotification;
|
|
31
|
-
/** Standard JSON-RPC codes. MCP adds none of its own at this layer. */
|
|
32
|
-
export declare const RPC_PARSE_ERROR = -32700;
|
|
33
|
-
export declare const RPC_INVALID_REQUEST = -32600;
|
|
34
|
-
export declare const RPC_METHOD_NOT_FOUND = -32601;
|
|
35
|
-
export declare const RPC_INVALID_PARAMS = -32602;
|
|
36
|
-
export declare const RPC_INTERNAL_ERROR = -32603;
|
|
37
|
-
/** The version this server implements. Negotiation echoes the client's version if
|
|
38
|
-
* it's on `SUPPORTED_PROTOCOL_VERSIONS`, else answers with this — never claims
|
|
39
|
-
* compatibility with an unchecked client version. */
|
|
40
|
-
export declare const PROTOCOL_VERSION = "2025-06-18";
|
|
41
|
-
export declare const SUPPORTED_PROTOCOL_VERSIONS: readonly string[];
|
|
42
|
-
export declare function negotiateVersion(requested: unknown): string;
|
|
43
|
-
/** A frame that couldn't be understood well enough to answer. Distinct from a
|
|
44
|
-
* merely-wrong request — JSON-RPC says a message with no usable id gets no
|
|
45
|
-
* response; replying with a fabricated id would be uncorrelatable. */
|
|
46
|
-
export declare class ProtocolError extends Error {
|
|
47
|
-
readonly code: number;
|
|
48
|
-
/** Null when the frame carried no usable id and must therefore go unanswered. */
|
|
49
|
-
readonly id: RpcId | null;
|
|
50
|
-
constructor(code: number, message: string, id: RpcId | null);
|
|
51
|
-
}
|
|
52
|
-
/** Parse one line into a request or notification, or throw `ProtocolError`. */
|
|
53
|
-
export declare function parseMessage(line: string): RpcMessage;
|
|
54
|
-
export declare function isRequest(message: RpcMessage): message is RpcRequest;
|
|
55
|
-
export declare function ok(id: RpcId, result: unknown): RpcResponse;
|
|
56
|
-
export declare function fail(id: RpcId, code: number, message: string, data?: unknown): RpcResponse;
|
|
57
|
-
//# sourceMappingURL=protocol.d.ts.map
|
package/dist/protocol.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;wFAIwF;AAExF,mEAAmE;AACnE,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IACxB,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IACxB,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KA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