@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
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
/** `verification_status`, §4 technique 6: coverage is a separate axis and call, paid once, only
|
|
2
|
-
* when asked. Wraps `computeVerificationStatus` (the static half). Never names a language (rule
|
|
3
|
-
* 1) — an earlier extension-guessing design tripped the boundary lint, so it now asks each
|
|
4
|
-
* loaded adapter's `ownsPath` instead. Resolves a ref by node id first, then file (the file's own
|
|
5
|
-
* informative `FILE` node when one carries real resolution, else the weakest-resolution member
|
|
6
|
-
* among whatever real (non-stub) evidence exists for that file — a `git-history`-produced FILE
|
|
7
|
-
* node at resolution 0 is a per-touched-file identity marker, not analysis, and must never win by
|
|
8
|
-
* merely being present; see `representativeForFile`) — neither way found means `notExercised`. */
|
|
9
|
-
import { getNode, findNodes, computeVerificationStatus, observedTestCoverage, resolutionOfExercised, } from "@descryy/core";
|
|
10
|
-
import { answer, optionalStringArray, ToolInputError, } from "./kit.js";
|
|
11
|
-
import { loadSources } from "../registry.js";
|
|
12
|
-
const SCHEMA = {
|
|
13
|
-
type: "object",
|
|
14
|
-
properties: {
|
|
15
|
-
refs: {
|
|
16
|
-
type: "array",
|
|
17
|
-
items: { type: "string" },
|
|
18
|
-
minItems: 1,
|
|
19
|
-
description: "Node ids and/or repository-relative file paths to check coverage for — typically ids " +
|
|
20
|
-
"already returned by an earlier call (impact, scope, contracts) that you now want to know " +
|
|
21
|
-
"whether the graph actually reached.",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
required: ["refs"],
|
|
25
|
-
additionalProperties: false,
|
|
26
|
-
};
|
|
27
|
-
/** `git-history` (`packages/core/src/sources/git/source.ts`) emits a `FILE` node at resolution 0,
|
|
28
|
-
* `language: null`, for *every* file it has ever seen touched — a co-change identity marker, not
|
|
29
|
-
* analysis, and it is emitted regardless of what any language adapter separately produced for that
|
|
30
|
-
* same file. `adapter-typescript` (and other language adapters) emit no `FILE`-type node at all,
|
|
31
|
-
* only `FUNCTION`/`CLASS`/etc. So once git-history is configured (the default), that R0 stub is
|
|
32
|
-
* routinely the *only* `FILE`-typed node for a file that a real adapter analysed at R3 — and this
|
|
33
|
-
* function must not let "is a FILE node" stand in for "carries real information about the file". */
|
|
34
|
-
function isInformativeFileNode(n) {
|
|
35
|
-
return n.type === "FILE" && n.resolution > 0;
|
|
36
|
-
}
|
|
37
|
-
/** True for exactly the nodes a resolution-0 `FILE` stub (see `isInformativeFileNode`) covers —
|
|
38
|
-
* used to exclude that stub from the "weakest link" pool below so it can never win by inclusion. */
|
|
39
|
-
function isResolutionZeroFileStub(n) {
|
|
40
|
-
return n.type === "FILE" && n.resolution === 0;
|
|
41
|
-
}
|
|
42
|
-
/** The file's own `FILE` node when it carries real per-file resolution (an adapter or future
|
|
43
|
-
* producer that actually analysed the file as a whole, not a git-history co-change stub) — among
|
|
44
|
-
* ties, the weakest, matching the fallback's convention below. Otherwise, the weakest-resolution
|
|
45
|
-
* node among whatever *real* (non-stub) evidence exists for the file: the same "report the weakest
|
|
46
|
-
* link" convention `resolutionFloor` uses elsewhere in this package, since a file is only as
|
|
47
|
-
* verified as its least-resolved member — but a resolution-0 `FILE` stub must never be allowed to
|
|
48
|
-
* supply that minimum merely by being present alongside real, higher-resolution nodes. Only when a
|
|
49
|
-
* file's *only* evidence is such a stub (nothing else touched it) does this fall back to reporting
|
|
50
|
-
* the stub itself — genuinely honest in that case, since there is nothing else to report. */
|
|
51
|
-
function representativeForFile(nodes) {
|
|
52
|
-
const informativeFileNodes = nodes.filter(isInformativeFileNode);
|
|
53
|
-
if (informativeFileNodes.length > 0) {
|
|
54
|
-
return informativeFileNodes.reduce((weakest, n) => (n.resolution < weakest.resolution ? n : weakest));
|
|
55
|
-
}
|
|
56
|
-
const realNodes = nodes.filter((n) => !isResolutionZeroFileStub(n));
|
|
57
|
-
const pool = realNodes.length > 0 ? realNodes : nodes;
|
|
58
|
-
return pool.reduce((weakest, n) => (n.resolution < weakest.resolution ? n : weakest));
|
|
59
|
-
}
|
|
60
|
-
function resolveRef(driver, ref) {
|
|
61
|
-
const byId = getNode(driver, ref);
|
|
62
|
-
if (byId !== undefined)
|
|
63
|
-
return { ref, language: byId.language, node: byId };
|
|
64
|
-
const inFile = findNodes(driver, { file: ref });
|
|
65
|
-
if (inFile.length > 0) {
|
|
66
|
-
const node = representativeForFile(inFile);
|
|
67
|
-
return { ref, language: node.language, node };
|
|
68
|
-
}
|
|
69
|
-
return { ref, language: null, node: null };
|
|
70
|
-
}
|
|
71
|
-
/** Real capabilities for whichever loaded adapter owns each unresolved ref, via `ownsPath` —
|
|
72
|
-
* never a language name compared here (see module header). */
|
|
73
|
-
async function capabilitiesForUnresolvedRefs(sources, unresolvedRefs, repoPath) {
|
|
74
|
-
const capabilitiesByRef = new Map();
|
|
75
|
-
const failedNotes = [];
|
|
76
|
-
if (unresolvedRefs.length === 0 || sources.length === 0)
|
|
77
|
-
return { capabilitiesByRef, failedNotes };
|
|
78
|
-
const { loaded, failed } = await loadSources(sources, repoPath);
|
|
79
|
-
try {
|
|
80
|
-
for (const ref of unresolvedRefs) {
|
|
81
|
-
const owner = loaded.find((entry) => entry.adapter?.ownsPath?.(ref) === true);
|
|
82
|
-
if (owner?.adapter !== undefined && owner?.adapter !== null) {
|
|
83
|
-
capabilitiesByRef.set(ref, owner.adapter.capabilities());
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
finally {
|
|
88
|
-
await Promise.all(loaded.map((entry) => entry.adapter?.dispose()));
|
|
89
|
-
}
|
|
90
|
-
for (const failure of failed) {
|
|
91
|
-
failedNotes.push(`A configured source (${failure.spec.module}) did not import (${failure.reason}), so it could ` +
|
|
92
|
-
"not be asked whether it owns any of this call's unresolved refs.");
|
|
93
|
-
}
|
|
94
|
-
return { capabilitiesByRef, failedNotes };
|
|
95
|
-
}
|
|
96
|
-
async function run(args, ctx) {
|
|
97
|
-
const refs = optionalStringArray(args, "refs") ?? [];
|
|
98
|
-
if (refs.length === 0) {
|
|
99
|
-
throw new ToolInputError('"refs" must name at least one node id or file path — with none, there is nothing to report ' +
|
|
100
|
-
"coverage for, and an empty answer would look like a check that ran");
|
|
101
|
-
}
|
|
102
|
-
const driver = ctx.session.store().driver;
|
|
103
|
-
const base = ctx.session.provider().baseStamp();
|
|
104
|
-
ctx.progress(`Checking coverage for ${refs.length} ref(s)`);
|
|
105
|
-
const resolved = refs.map((ref) => resolveRef(driver, ref));
|
|
106
|
-
const unresolvedRefs = resolved.filter((r) => r.node === null).map((r) => r.ref);
|
|
107
|
-
const { capabilitiesByRef, failedNotes } = await capabilitiesForUnresolvedRefs(ctx.session.config.sources, unresolvedRefs, ctx.session.repoPath);
|
|
108
|
-
const scope = resolved.map((r) => ({
|
|
109
|
-
ref: r.ref,
|
|
110
|
-
language: r.language,
|
|
111
|
-
node: r.node,
|
|
112
|
-
capabilities: r.node === null ? capabilitiesByRef.get(r.ref) : undefined,
|
|
113
|
-
}));
|
|
114
|
-
const status = computeVerificationStatus(scope);
|
|
115
|
-
const exercised = status.exercised.map((entry) => resolutionOfExercised(entry));
|
|
116
|
-
// The runtime half is composed here, not inside computeVerificationStatus (static-only by
|
|
117
|
-
// design) — same posture as observe_runtime. Only resolved refs can be looked up.
|
|
118
|
-
const lookupIds = resolved.filter((r) => r.node !== null).map((r) => r.node.id);
|
|
119
|
-
const coverage = observedTestCoverage(driver, lookupIds);
|
|
120
|
-
const verifiedByTests = resolved.flatMap((r) => {
|
|
121
|
-
if (r.node === null)
|
|
122
|
-
return [];
|
|
123
|
-
const found = coverage.get(r.node.id);
|
|
124
|
-
if (found === undefined)
|
|
125
|
-
return [];
|
|
126
|
-
return [
|
|
127
|
-
{
|
|
128
|
-
ref: r.ref,
|
|
129
|
-
// Every test reaching this ref crossed the same kind of link, so the
|
|
130
|
-
// ref is "direct" only when the caller asked about the test case itself.
|
|
131
|
-
direct: found.tests.every((t) => t.direct),
|
|
132
|
-
tests: found.tests.map((t) => ({
|
|
133
|
-
qualifiedName: t.qualifiedName,
|
|
134
|
-
outcome: t.outcome,
|
|
135
|
-
runId: t.runId,
|
|
136
|
-
})),
|
|
137
|
-
},
|
|
138
|
-
];
|
|
139
|
-
});
|
|
140
|
-
return answer({
|
|
141
|
-
headline: (exercised.length === refs.length
|
|
142
|
-
? `All ${refs.length} ref(s) were reached by the graph.`
|
|
143
|
-
: `${exercised.length} of ${refs.length} ref(s) were reached by the graph; ` +
|
|
144
|
-
`${status.notExercised.length} were not — see notExercised for why.`) +
|
|
145
|
-
(verifiedByTests.length > 0
|
|
146
|
-
? ` ${verifiedByTests.length} of them ${verifiedByTests.length === 1 ? "has" : "have"} an observed test run behind ${verifiedByTests.length === 1 ? "it" : "them"}.`
|
|
147
|
-
: ""),
|
|
148
|
-
data: { checked: refs, exercised, notExercised: status.notExercised, verifiedByTests },
|
|
149
|
-
resolutionFloor: exercised.length === 0 ? 0 : Math.min(...exercised.map((e) => e.resolution)),
|
|
150
|
-
commitSha: base.commitSha,
|
|
151
|
-
graphBuiltAt: base.graphBuiltAt,
|
|
152
|
-
irSchemaVersion: base.irSchemaVersion,
|
|
153
|
-
commitSpread: base.commitSpread,
|
|
154
|
-
repoCount: base.repoCount,
|
|
155
|
-
// A presence/coverage claim ("was this ref reached, and at what resolution")
|
|
156
|
-
// is about identity, not shape — the same class impact/history/similar_incidents
|
|
157
|
-
// already use.
|
|
158
|
-
nameLevel: true,
|
|
159
|
-
notes: [
|
|
160
|
-
...(status.notExercised.length === 0
|
|
161
|
-
? []
|
|
162
|
-
: [
|
|
163
|
-
"This tool never names a language for an absent ref — it only asks each configured, " +
|
|
164
|
-
"loaded adapter whether it owns that path. See each notExercised reason for exactly " +
|
|
165
|
-
"what was determined.",
|
|
166
|
-
]),
|
|
167
|
-
// Two different facts wear the same empty list, and reading one as the
|
|
168
|
-
// other is the whole failure this axis exists to prevent.
|
|
169
|
-
...(verifiedByTests.length === 0
|
|
170
|
-
? [
|
|
171
|
-
"No observed test run bears on any of these refs. That is not the same as \"nothing " +
|
|
172
|
-
"tests this\": it is also what you see when no suite has been run through observe_tests " +
|
|
173
|
-
"yet, and this tool cannot tell those apart from the ledger alone.",
|
|
174
|
-
]
|
|
175
|
-
: [
|
|
176
|
-
"verifiedByTests reports that a test which claims to cover a ref actually ran, and how it " +
|
|
177
|
-
"finished. Where direct is false the claim crosses a static TESTS edge: the run witnessed " +
|
|
178
|
-
"the test executing, not the test touching that ref. An outcome of failed or skipped is " +
|
|
179
|
-
"reported rather than filtered — being covered by a failing test is not being verified.",
|
|
180
|
-
]),
|
|
181
|
-
...failedNotes,
|
|
182
|
-
],
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
export const verificationStatusTool = {
|
|
186
|
-
name: "verification_status",
|
|
187
|
-
class: "read",
|
|
188
|
-
tier: "evidence",
|
|
189
|
-
version: "1.0.0",
|
|
190
|
-
title: "Was this actually checked, and at what resolution?",
|
|
191
|
-
description: "Given a list of node ids and/or file paths, report which were actually reached by the graph " +
|
|
192
|
-
"and at what resolution, and which were not — with why, where determinable. Coverage is a " +
|
|
193
|
-
"separate axis from any finding's confidence (§19/§20): use this after another call to learn " +
|
|
194
|
-
"what that call's answer does and does not actually cover, rather than trusting silence as " +
|
|
195
|
-
"coverage. When a session's configured adapters can say whether they own an unreached file, " +
|
|
196
|
-
"real declared capabilities are attached to explain the gap more precisely — see the tool's own " +
|
|
197
|
-
"notes when some refs are not exercised. When a test suite has been run through observe_tests, " +
|
|
198
|
-
"verifiedByTests additionally reports which of these refs a real run bore on and how those tests " +
|
|
199
|
-
"finished — the difference between what the graph could reach and what was actually executed.",
|
|
200
|
-
inputSchema: SCHEMA,
|
|
201
|
-
run,
|
|
202
|
-
};
|
|
203
|
-
//# sourceMappingURL=verification-status.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verification-status.js","sourceRoot":"","sources":["../../src/tools/verification-status.ts"],"names":[],"mappings":"AAAA;;;;;;;mGAOmG;AAEnG,OAAO,EACL,OAAO,EACP,SAAS,EACT,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AAIvB,OAAO,EACL,MAAM,EACN,mBAAmB,EACnB,cAAc,GAGf,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,WAAW,EAAmB,MAAM,gBAAgB,CAAC;AAE9D,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,QAAQ,EAAE,CAAC;YACX,WAAW,EACT,uFAAuF;gBACvF,2FAA2F;gBAC3F,qCAAqC;SACxC;KACF;IACD,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,oBAAoB,EAAE,KAAK;CACnB,CAAC;AA4BX;;;;;;qGAMqG;AACrG,SAAS,qBAAqB,CAAC,CAAS;IACtC,OAAO,CAAC,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC;AAC/C,CAAC;AAED;qGACqG;AACrG,SAAS,wBAAwB,CAAC,CAAS;IACzC,OAAO,CAAC,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC;AACjD,CAAC;AAED;;;;;;;;8FAQ8F;AAC9F,SAAS,qBAAqB,CAAC,KAAwB;IACrD,MAAM,oBAAoB,GAAG,KAAK,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;IACjE,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,OAAO,oBAAoB,CAAC,MAAM,CAAC,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AAC,SAAS;QACzB,6EAA6E;QAC7E,iFAAiF;QACjF,eAAe;QACf,SAAS,EAAE,IAAI;QACf,KAAK,EAAE;YACL,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC;gBAClC,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC;oBACE,qFAAqF;wBACnF,qFAAqF;wBACrF,sBAAsB;iBACzB,CAAC;YACN,uEAAuE;YACvE,0DAA0D;YAC1D,GAAG,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC;gBAC9B,CAAC,CAAC;oBACE,qFAAqF;wBACnF,yFAAyF;wBACzF,mEAAmE;iBACtE;gBACH,CAAC,CAAC;oBACE,2FAA2F;wBACzF,2FAA2F;wBAC3F,yFAAyF;wBACzF,wFAAwF;iBAC3F,CAAC;YACN,GAAG,WAAW;SACf;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAmB;IACpD,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,oDAAoD;IAC3D,WAAW,EACT,8FAA8F;QAC9F,2FAA2F;QAC3F,8FAA8F;QAC9F,4FAA4F;QAC5F,6FAA6F;QAC7F,iGAAiG;QACjG,gGAAgG;QAChG,kGAAkG;QAClG,8FAA8F;IAChG,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/** `verify_claim`, MK-12: offers G1/G2 (`ai-governance-spec.md` §2/§3) as a voluntary lookup — the
|
|
2
|
-
* full pipeline doesn't run here (MK-11). `path` checks a dot-path resolves in a recorded call's
|
|
3
|
-
* result (G1); `target` is a plain substring search (G2-shaped, disclosed as weaker — it can't
|
|
4
|
-
* see whether the string was accepted or rejected). Never returns `confirmed` (MK-11): it
|
|
5
|
-
* enforces nothing, just converts "we cannot check" into "we offered and it declined." */
|
|
6
|
-
import { type ToolDefinition } from "./kit.ts";
|
|
7
|
-
/**
|
|
8
|
-
* Three outcomes, not two (F1/F4, UAT Phase 5): "grounded" and "not grounded" are both
|
|
9
|
-
* verdicts about a claim that was actually checked. A claim with neither `path` nor
|
|
10
|
-
* `target` was never checked at all — reporting it as `notGrounded` would say "this is
|
|
11
|
-
* false" about something nobody looked at, the same `empty`-vs-`refused` confusion the
|
|
12
|
-
* envelope's own five-state contract exists to prevent, one layer further in.
|
|
13
|
-
*/
|
|
14
|
-
export type ClaimVerdict = "grounded" | "notGrounded" | "unverifiable";
|
|
15
|
-
export interface VerifyClaimResult {
|
|
16
|
-
readonly statement: string;
|
|
17
|
-
readonly callId: string;
|
|
18
|
-
readonly verdict: ClaimVerdict;
|
|
19
|
-
readonly reason: string;
|
|
20
|
-
}
|
|
21
|
-
export interface VerifyClaimData {
|
|
22
|
-
readonly checked: number;
|
|
23
|
-
readonly grounded: number;
|
|
24
|
-
readonly notGrounded: number;
|
|
25
|
-
readonly unverifiable: number;
|
|
26
|
-
readonly results: readonly VerifyClaimResult[];
|
|
27
|
-
}
|
|
28
|
-
export declare const verifyClaimTool: ToolDefinition;
|
|
29
|
-
//# sourceMappingURL=verify-claim.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verify-claim.d.ts","sourceRoot":"","sources":["../../src/tools/verify-claim.ts"],"names":[],"mappings":"AAAA;;;;2FAI2F;AAE3F,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAyClB;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,aAAa,GAAG,cAAc,CAAC;AAEvE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAChD;AAgLD,eAAO,MAAM,eAAe,EAAE,cAc7B,CAAC"}
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
/** `verify_claim`, MK-12: offers G1/G2 (`ai-governance-spec.md` §2/§3) as a voluntary lookup — the
|
|
2
|
-
* full pipeline doesn't run here (MK-11). `path` checks a dot-path resolves in a recorded call's
|
|
3
|
-
* result (G1); `target` is a plain substring search (G2-shaped, disclosed as weaker — it can't
|
|
4
|
-
* see whether the string was accepted or rejected). Never returns `confirmed` (MK-11): it
|
|
5
|
-
* enforces nothing, just converts "we cannot check" into "we offered and it declined." */
|
|
6
|
-
import { answer, requiredString, ToolInputError, } from "./kit.js";
|
|
7
|
-
const SCHEMA = {
|
|
8
|
-
type: "object",
|
|
9
|
-
properties: {
|
|
10
|
-
claims: {
|
|
11
|
-
type: "array",
|
|
12
|
-
minItems: 1,
|
|
13
|
-
items: {
|
|
14
|
-
type: "object",
|
|
15
|
-
properties: {
|
|
16
|
-
statement: {
|
|
17
|
-
type: "string",
|
|
18
|
-
description: "The claim's own text, carried through unexamined — this tool checks its citation, not its wording.",
|
|
19
|
-
},
|
|
20
|
-
callId: {
|
|
21
|
-
type: "string",
|
|
22
|
-
description: 'The recorded call id this claim rests on — the "id" field from an earlier reply this session.',
|
|
23
|
-
},
|
|
24
|
-
path: {
|
|
25
|
-
type: "string",
|
|
26
|
-
description: 'A dot-path into that call\'s structuredContent, e.g. "data.affected.0.id" — checked to actually resolve, not just be well-formed.',
|
|
27
|
-
},
|
|
28
|
-
target: {
|
|
29
|
-
type: "string",
|
|
30
|
-
description: "A literal string (typically a node id or file path) that must appear somewhere in that call's recorded result — a plain substring search, not a structural check.",
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
required: ["statement", "callId"],
|
|
34
|
-
additionalProperties: false,
|
|
35
|
-
},
|
|
36
|
-
description: "Draft claims to check. Each must give a path, a target, or both — a callId alone with neither checks nothing.",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
required: ["claims"],
|
|
40
|
-
additionalProperties: false,
|
|
41
|
-
};
|
|
42
|
-
function readClaims(args) {
|
|
43
|
-
const raw = args["claims"];
|
|
44
|
-
if (!Array.isArray(raw) || raw.length === 0) {
|
|
45
|
-
throw new ToolInputError('"claims" must be a non-empty array — with none, there is nothing to verify');
|
|
46
|
-
}
|
|
47
|
-
return raw.map((entry, index) => {
|
|
48
|
-
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
|
|
49
|
-
throw new ToolInputError(`claims[${index}] must be an object`);
|
|
50
|
-
}
|
|
51
|
-
const claim = entry;
|
|
52
|
-
const statement = requiredString(claim, "statement");
|
|
53
|
-
const callId = requiredString(claim, "callId");
|
|
54
|
-
const path = claim["path"];
|
|
55
|
-
const target = claim["target"];
|
|
56
|
-
if (path !== undefined && typeof path !== "string")
|
|
57
|
-
throw new ToolInputError(`claims[${index}].path must be a string`);
|
|
58
|
-
if (target !== undefined && typeof target !== "string")
|
|
59
|
-
throw new ToolInputError(`claims[${index}].target must be a string`);
|
|
60
|
-
return {
|
|
61
|
-
statement,
|
|
62
|
-
callId,
|
|
63
|
-
...(path === undefined ? {} : { path }),
|
|
64
|
-
...(target === undefined ? {} : { target }),
|
|
65
|
-
};
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
/** Dot-path resolution, numeric segments indexing into an array. `undefined` means "does not resolve" — never thrown. */
|
|
69
|
-
function resolvePath(root, path) {
|
|
70
|
-
let current = root;
|
|
71
|
-
for (const segment of path.split(".")) {
|
|
72
|
-
if (current === null || current === undefined)
|
|
73
|
-
return { found: false };
|
|
74
|
-
if (Array.isArray(current)) {
|
|
75
|
-
const index = Number(segment);
|
|
76
|
-
if (!Number.isInteger(index) || index < 0 || index >= current.length)
|
|
77
|
-
return { found: false };
|
|
78
|
-
current = current[index];
|
|
79
|
-
continue;
|
|
80
|
-
}
|
|
81
|
-
if (typeof current !== "object")
|
|
82
|
-
return { found: false };
|
|
83
|
-
if (!Object.hasOwn(current, segment))
|
|
84
|
-
return { found: false };
|
|
85
|
-
current = current[segment];
|
|
86
|
-
}
|
|
87
|
-
return { found: true, value: current };
|
|
88
|
-
}
|
|
89
|
-
/** A target string only ever matches a leaf value, never a key name — so a match inside
|
|
90
|
-
* a node id used as an object key does not count as the target having been "returned". */
|
|
91
|
-
function containsTargetAtValuePosition(node, target) {
|
|
92
|
-
if (node === null || node === undefined)
|
|
93
|
-
return false;
|
|
94
|
-
if (typeof node === "string")
|
|
95
|
-
return node.includes(target);
|
|
96
|
-
if (typeof node === "number" || typeof node === "boolean")
|
|
97
|
-
return String(node) === target || String(node).includes(target);
|
|
98
|
-
if (Array.isArray(node))
|
|
99
|
-
return node.some((item) => containsTargetAtValuePosition(item, target));
|
|
100
|
-
if (typeof node === "object")
|
|
101
|
-
return Object.values(node).some((v) => containsTargetAtValuePosition(v, target));
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
/** Structural comparison for the case where a claim names both a path and a target: the
|
|
105
|
-
* value actually found at that path must equal the target, not merely co-occur with it
|
|
106
|
-
* somewhere in the same serialized result (F1 — this is the join that was missing). Only
|
|
107
|
-
* scalars can match a string target; an object or array resolved at the path never does,
|
|
108
|
-
* because a single string cannot faithfully assert "this whole structure". */
|
|
109
|
-
function valueMatchesTarget(value, target) {
|
|
110
|
-
if (typeof value === "string")
|
|
111
|
-
return value === target;
|
|
112
|
-
if (typeof value === "number" || typeof value === "boolean")
|
|
113
|
-
return String(value) === target;
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
function checkClaim(call, claim) {
|
|
117
|
-
if (claim.path !== undefined && claim.target !== undefined) {
|
|
118
|
-
const resolved = resolvePath(call.result, claim.path);
|
|
119
|
-
if (!resolved.found) {
|
|
120
|
-
return { ok: false, reason: `"${claim.path}" does not resolve in ${call.tool}'s recorded result` };
|
|
121
|
-
}
|
|
122
|
-
if (!valueMatchesTarget(resolved.value, claim.target)) {
|
|
123
|
-
return {
|
|
124
|
-
ok: false,
|
|
125
|
-
reason: `"${claim.path}" resolves to ${JSON.stringify(resolved.value)} in ${call.tool}'s recorded result, not "${claim.target}"`,
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
return { ok: true, reason: `cites ${call.tool}'s recorded result, where "${claim.path}" resolves to "${claim.target}"` };
|
|
129
|
-
}
|
|
130
|
-
if (claim.path !== undefined) {
|
|
131
|
-
const resolved = resolvePath(call.result, claim.path);
|
|
132
|
-
if (!resolved.found) {
|
|
133
|
-
return { ok: false, reason: `"${claim.path}" does not resolve in ${call.tool}'s recorded result` };
|
|
134
|
-
}
|
|
135
|
-
return { ok: true, reason: `cites ${call.tool}'s recorded result, which has "${claim.path}"` };
|
|
136
|
-
}
|
|
137
|
-
// target only: a substring search, weaker than a path check, and the reason says so —
|
|
138
|
-
// this is not a structural claim about which field the value came from (F1, part 2).
|
|
139
|
-
const target = claim.target;
|
|
140
|
-
if (!containsTargetAtValuePosition(call.result, target)) {
|
|
141
|
-
return { ok: false, reason: `"${target}" does not appear anywhere in ${call.tool}'s recorded result — not part of what that call returned` };
|
|
142
|
-
}
|
|
143
|
-
return {
|
|
144
|
-
ok: true,
|
|
145
|
-
reason: `cites ${call.tool}'s recorded result, which contains "${target}" (a substring match only — no specific field was checked)`,
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
function headlineFor(checked, grounded, notGrounded, unverifiable) {
|
|
149
|
-
if (grounded === checked)
|
|
150
|
-
return `All ${checked} claim(s) cite this session's own recorded facts.`;
|
|
151
|
-
const parts = [`${grounded} of ${checked} claim(s) are grounded`];
|
|
152
|
-
if (notGrounded > 0)
|
|
153
|
-
parts.push(`${notGrounded} cite something this session never actually returned`);
|
|
154
|
-
if (unverifiable > 0)
|
|
155
|
-
parts.push(`${unverifiable} could not be checked — no path or target was given`);
|
|
156
|
-
return `${parts.join("; ")}.`;
|
|
157
|
-
}
|
|
158
|
-
async function run(args, ctx) {
|
|
159
|
-
const claims = readClaims(args);
|
|
160
|
-
ctx.progress(`Checking ${claims.length} claim(s) against this session's recorded tool calls`);
|
|
161
|
-
const results = claims.map((claim) => {
|
|
162
|
-
if (claim.path === undefined && claim.target === undefined) {
|
|
163
|
-
return {
|
|
164
|
-
statement: claim.statement,
|
|
165
|
-
callId: claim.callId,
|
|
166
|
-
verdict: "unverifiable",
|
|
167
|
-
reason: 'neither "path" nor "target" was given — a callId alone checks nothing, so this claim was never checked either way',
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
const call = ctx.session.recordedCall(claim.callId);
|
|
171
|
-
if (call === undefined) {
|
|
172
|
-
return {
|
|
173
|
-
statement: claim.statement,
|
|
174
|
-
callId: claim.callId,
|
|
175
|
-
verdict: "notGrounded",
|
|
176
|
-
reason: `no recorded tool call with id "${claim.callId}" in this session — either it was never made, or it belongs to a different session's run (G1's own negative control)`,
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
const outcome = checkClaim(call, claim);
|
|
180
|
-
return { statement: claim.statement, callId: claim.callId, verdict: outcome.ok ? "grounded" : "notGrounded", reason: outcome.reason };
|
|
181
|
-
});
|
|
182
|
-
const grounded = results.filter((r) => r.verdict === "grounded").length;
|
|
183
|
-
const notGrounded = results.filter((r) => r.verdict === "notGrounded").length;
|
|
184
|
-
const unverifiable = results.filter((r) => r.verdict === "unverifiable").length;
|
|
185
|
-
return answer({
|
|
186
|
-
headline: headlineFor(results.length, grounded, notGrounded, unverifiable),
|
|
187
|
-
data: { checked: results.length, grounded, notGrounded, unverifiable, results },
|
|
188
|
-
// Not a graph query — no resolution level, no commit, no schema version
|
|
189
|
-
// applies. `nameLevel: true` because this checks presence (did this
|
|
190
|
-
// exact text appear), the same axis `verification_status` reports on.
|
|
191
|
-
resolutionFloor: 0,
|
|
192
|
-
commitSha: null,
|
|
193
|
-
graphBuiltAt: null,
|
|
194
|
-
irSchemaVersion: 0,
|
|
195
|
-
// No graph consulted, so no commit spread — 0 says "not a graph question," not a hidden spread.
|
|
196
|
-
commitSpread: 0,
|
|
197
|
-
repoCount: 0,
|
|
198
|
-
nameLevel: true,
|
|
199
|
-
notes: [
|
|
200
|
-
"This tool checks citations against calls made earlier in this same session only — it has no " +
|
|
201
|
-
"memory across separate server processes, and it does not run the full governance pipeline " +
|
|
202
|
-
'(MK-11): "grounded" here means "cites a real, recorded fact," never "confirmed."',
|
|
203
|
-
],
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
export const verifyClaimTool = {
|
|
207
|
-
name: "verify_claim",
|
|
208
|
-
class: "read",
|
|
209
|
-
tier: "evidence",
|
|
210
|
-
version: "1.0.0",
|
|
211
|
-
title: "Does this claim actually cite something this session returned?",
|
|
212
|
-
description: "Given draft claims, each citing an earlier call in this session by its callId and a path and/or " +
|
|
213
|
-
"a target string, report which are grounded in that call's real recorded result and which are not " +
|
|
214
|
-
"— catching an invented path, a citation to a call that never happened, or a target string this " +
|
|
215
|
-
"session never actually returned. Voluntary: nothing else in this surface reads or enforces the " +
|
|
216
|
-
'result. Never returns "confirmed" — see the tool\'s own module doc for why.',
|
|
217
|
-
inputSchema: SCHEMA,
|
|
218
|
-
run,
|
|
219
|
-
};
|
|
220
|
-
//# sourceMappingURL=verify-claim.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verify-claim.js","sourceRoot":"","sources":["../../src/tools/verify-claim.ts"],"names":[],"mappings":"AAAA;;;;2FAI2F;AAE3F,OAAO,EACL,MAAM,EACN,cAAc,EACd,cAAc,GAGf,MAAM,UAAU,CAAC;AAGlB,MAAM,MAAM,GAAG;IACb,IAA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ACjG,6EAA6E;IAC/E,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `workspace` — merges `analyze`, `analyze_workspace` and `link_workspace`
|
|
3
|
-
* behind one `verb` (documents/plans/mcp-surface-consolidation.md §2, group 1).
|
|
4
|
-
* All three are `stateful-read`/`evidence`, so the merge crosses neither
|
|
5
|
-
* boundary.
|
|
6
|
-
*
|
|
7
|
-
* Dispatch only. Each verb's own `run()` body is untouched and stays in its
|
|
8
|
-
* own module (`analyze.ts` / `analyze-workspace.ts` / `link-workspace.ts`) —
|
|
9
|
-
* this file never holds a second copy of that logic, it only routes to it
|
|
10
|
-
* after `selectVerb` has re-established, per verb, the argument strength a
|
|
11
|
-
* flat union schema loses (`verb.ts`'s own header explains why that is
|
|
12
|
-
* mandatory once a schema covers more than one verb).
|
|
13
|
-
*/
|
|
14
|
-
import type { ToolDefinition } from "./kit.ts";
|
|
15
|
-
import type { AnalyzeData } from "./analyze.ts";
|
|
16
|
-
import type { AnalyzeWorkspaceData } from "./analyze-workspace.ts";
|
|
17
|
-
import type { LinkWorkspaceData } from "./link-workspace.ts";
|
|
18
|
-
/**
|
|
19
|
-
* What this tool answers with: one verb's shape, never a merged one.
|
|
20
|
-
*
|
|
21
|
-
* The merge cost this its single concrete output type, and `unknown` would have
|
|
22
|
-
* silently retired `output-shapes.test.ts`'s check that a declared shape is tied
|
|
23
|
-
* to the code producing it. A union keeps that tie: a verb added without its
|
|
24
|
-
* shape here stops compiling.
|
|
25
|
-
*/
|
|
26
|
-
export type WorkspaceData = AnalyzeData | AnalyzeWorkspaceData | LinkWorkspaceData;
|
|
27
|
-
export declare const workspaceTool: ToolDefinition;
|
|
28
|
-
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/tools/workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,UAAU,CAAC;AAM5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,oBAAoB,GACpB,iBAAiB,CAAC;AAiFtB,eAAO,MAAM,aAAa,EAAE,cAa3B,CAAC"}
|
package/dist/tools/workspace.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `workspace` — merges `analyze`, `analyze_workspace` and `link_workspace`
|
|
3
|
-
* behind one `verb` (documents/plans/mcp-surface-consolidation.md §2, group 1).
|
|
4
|
-
* All three are `stateful-read`/`evidence`, so the merge crosses neither
|
|
5
|
-
* boundary.
|
|
6
|
-
*
|
|
7
|
-
* Dispatch only. Each verb's own `run()` body is untouched and stays in its
|
|
8
|
-
* own module (`analyze.ts` / `analyze-workspace.ts` / `link-workspace.ts`) —
|
|
9
|
-
* this file never holds a second copy of that logic, it only routes to it
|
|
10
|
-
* after `selectVerb` has re-established, per verb, the argument strength a
|
|
11
|
-
* flat union schema loses (`verb.ts`'s own header explains why that is
|
|
12
|
-
* mandatory once a schema covers more than one verb).
|
|
13
|
-
*/
|
|
14
|
-
import { selectVerb } from "./verb.js";
|
|
15
|
-
import { analyzeTool } from "./analyze.js";
|
|
16
|
-
import { analyzeWorkspaceTool } from "./analyze-workspace.js";
|
|
17
|
-
import { linkWorkspaceTool } from "./link-workspace.js";
|
|
18
|
-
const VERBS = ["analyze", "index", "link"];
|
|
19
|
-
const VERB_SPECS = [
|
|
20
|
-
{ verb: "analyze", accepts: ["includeHistory", "maxCommits", "reload"] },
|
|
21
|
-
{ verb: "index", accepts: ["includeHistory", "maxCommits"] },
|
|
22
|
-
{ verb: "link", accepts: ["workspace", "repos"] },
|
|
23
|
-
];
|
|
24
|
-
const SCHEMA = {
|
|
25
|
-
type: "object",
|
|
26
|
-
properties: {
|
|
27
|
-
verb: {
|
|
28
|
-
type: "string",
|
|
29
|
-
enum: [...VERBS],
|
|
30
|
-
description: '"analyze" — read this repository into the code graph. "index" — read every repository a ' +
|
|
31
|
-
'prior "link" declared into one shared graph. "link" — declare which repositories share a ' +
|
|
32
|
-
"workspace.",
|
|
33
|
-
},
|
|
34
|
-
includeHistory: {
|
|
35
|
-
type: "boolean",
|
|
36
|
-
description: "analyze/index. Read git history for co-change coupling. Default true.",
|
|
37
|
-
},
|
|
38
|
-
maxCommits: {
|
|
39
|
-
type: "integer",
|
|
40
|
-
minimum: 1,
|
|
41
|
-
description: "analyze/index. Cap on commits read from history. Default 2000.",
|
|
42
|
-
},
|
|
43
|
-
reload: {
|
|
44
|
-
type: "boolean",
|
|
45
|
-
description: "analyze only. Re-read .descry/config.json from disk before this run, instead of the " +
|
|
46
|
-
"configuration this server started with.",
|
|
47
|
-
},
|
|
48
|
-
workspace: {
|
|
49
|
-
type: "string",
|
|
50
|
-
description: 'link only. The workspace id to write into every repository in "repos", byte-identical.',
|
|
51
|
-
},
|
|
52
|
-
repos: {
|
|
53
|
-
type: "array",
|
|
54
|
-
minItems: 2,
|
|
55
|
-
items: {
|
|
56
|
-
type: "object",
|
|
57
|
-
properties: {
|
|
58
|
-
path: { type: "string", description: "Absolute path to the repository on disk." },
|
|
59
|
-
repo: { type: "string", description: "This repository's identity, written explicitly." },
|
|
60
|
-
},
|
|
61
|
-
required: ["path", "repo"],
|
|
62
|
-
additionalProperties: false,
|
|
63
|
-
},
|
|
64
|
-
description: "link only. Every repository that should share this workspace, including the current one " +
|
|
65
|
-
"if it should join. Only ones the user has explicitly confirmed belong together — never " +
|
|
66
|
-
"inferred.",
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
required: ["verb"],
|
|
70
|
-
additionalProperties: false,
|
|
71
|
-
};
|
|
72
|
-
const DISPATCH = {
|
|
73
|
-
analyze: analyzeTool,
|
|
74
|
-
index: analyzeWorkspaceTool,
|
|
75
|
-
link: linkWorkspaceTool,
|
|
76
|
-
};
|
|
77
|
-
async function run(args, ctx) {
|
|
78
|
-
const verb = selectVerb(args, "verb", VERB_SPECS);
|
|
79
|
-
// `ToolDefinition` erases its answer's type parameter — it has to, the
|
|
80
|
-
// registry is one array of many shapes — so the delegated call comes back as
|
|
81
|
-
// an erased answer type. The verb table is what makes the union true: every
|
|
82
|
-
// entry's own `run` is declared against one of WorkspaceData's members, and a verb
|
|
83
|
-
// added without its shape stops compiling at the union. The assertion
|
|
84
|
-
// re-applies what the table already guarantees rather than asserting
|
|
85
|
-
// something unchecked.
|
|
86
|
-
return (await DISPATCH[verb].run(args, ctx));
|
|
87
|
-
}
|
|
88
|
-
export const workspaceTool = {
|
|
89
|
-
name: "workspace",
|
|
90
|
-
class: "stateful-read",
|
|
91
|
-
tier: "evidence",
|
|
92
|
-
version: "1.0.0",
|
|
93
|
-
title: "Analyse a repository or workspace into the code graph",
|
|
94
|
-
description: "Read source into the code graph, or declare which repositories share a workspace, by verb: " +
|
|
95
|
-
'"analyze" (one repository, with its configured adapters), "index" (every repository a prior ' +
|
|
96
|
-
'"link" call declared, into one shared graph), "link" (write a workspace id into each named ' +
|
|
97
|
-
"repository's config — only after the user has explicitly confirmed they belong together).",
|
|
98
|
-
inputSchema: SCHEMA,
|
|
99
|
-
run,
|
|
100
|
-
};
|
|
101
|
-
//# sourceMappingURL=workspace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/tools/workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAiB,MAAM,WAAW,CAAC;AAItD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,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