@descryy/mcp 0.11.4 → 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 +7 -7
- 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 -591
- 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 -1518
- 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 -151
- 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 -39
- package/dist/capped.d.ts.map +0 -1
- package/dist/capped.js +0 -43
- 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 -327
- package/dist/registry.js.map +0 -1
- package/dist/render.d.ts +0 -623
- package/dist/render.d.ts.map +0 -1
- package/dist/render.js +0 -968
- 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 -651
- package/dist/server.js.map +0 -1
- package/dist/session.d.ts +0 -356
- package/dist/session.d.ts.map +0 -1
- package/dist/session.js +0 -779
- 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 -225
- 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 -640
- 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 -444
- 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 -370
- 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 -307
- 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 -385
- 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 -106
- 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 -262
- package/dist/tools/observe-runtime.d.ts.map +0 -1
- package/dist/tools/observe-runtime.js +0 -1901
- 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 -374
- 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 -123
- 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 -217
- 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 -203
- 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 -520
- 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,286 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `prove_reach` — closes RG-10's loop. "Rename that column and these screens go blank" is
|
|
3
|
-
* three claims, made in order, each on evidence the last one didn't have:
|
|
4
|
-
*
|
|
5
|
-
* 1. **Predict** — from a node (typically a `DATABASE_COLUMN`), walk `reachablePages`
|
|
6
|
-
* (`@descryy/core`) to whatever `PAGE`/`COMPONENT` nodes the data reaches, and propose a
|
|
7
|
-
* navigate-only journey to them, exactly as `predict_reach` already does — this tool calls
|
|
8
|
-
* the identical pure planner (`../planner/predict-then-propose.ts#predictThenPropose`), never
|
|
9
|
-
* a second implementation. Nothing runs yet: a caller who has not yet approved the drive gets
|
|
10
|
-
* back the prediction, the proposal and a confirmation token, and this tool's `describeAction`
|
|
11
|
-
* is what mints that token — the dispatcher (`../action-handshake.ts`) never calls `run` at
|
|
12
|
-
* all until the second call arrives, so "nothing runs" is structural, not a promise this file
|
|
13
|
-
* keeps by convention.
|
|
14
|
-
* 2. **Approve and drive** — a second call, `confirmToken` in hand, drives the exact proposed
|
|
15
|
-
* scenario for real via `../browser/scenario-runner.ts#replayScenario`, in a browser session
|
|
16
|
-
* the caller already started and consented (`browser({ verb: "start_session" })`). Never boots an app,
|
|
17
|
-
* never widens the journey beyond what was proposed: the scenario driven is the one frozen at
|
|
18
|
-
* mint time, byte for byte.
|
|
19
|
-
* 3. **Prove** — correlates which of the predicted pages the drive's own step results actually
|
|
20
|
-
* reached (`../planner/predict-then-propose.ts#visitedPageIds` + `#proveOrDisprove`) — a page
|
|
21
|
-
* counts as visited only when the exact navigate URL built from its own route name replayed
|
|
22
|
-
* as `"ran"`, never a guess from proximity.
|
|
23
|
-
* 4. **Conclude** — routes the real, walked graph path (`#combinedGraphPath`, never a synthesised
|
|
24
|
-
* one) and the runtime evidence the drive actually observed (console errors, failed requests)
|
|
25
|
-
* through the same finding funnel `draw_conclusion` uses — `reportCategory`, `@descryy/ir`,
|
|
26
|
-
* `packages/ir/src/finding.ts` — so the reply carries a governed category, not a raw tally the
|
|
27
|
-
* caller has to interpret. A drive that reached every predicted page cleanly, with nothing
|
|
28
|
-
* wrong observed, reports so honestly: `hasRuntimeEvidence` is false and the category is
|
|
29
|
-
* `unconfirmed` by G3's own precondition, not "confirmed" because the pages loaded.
|
|
30
|
-
*
|
|
31
|
-
* **class: "action"**, gated only when there is something to drive: a node that reaches nothing,
|
|
32
|
-
* or reaches only non-path-shaped pages/components with no navigate step to propose, has nothing
|
|
33
|
-
* to approve, so `describeAction` returns `undefined` and this reports the prediction immediately
|
|
34
|
-
* — same discipline as `predict_reach`'s own empty case, never a gate for its own sake.
|
|
35
|
-
*/
|
|
36
|
-
import { directMechanismEvidence, evidencePrecondition, humanAssertedOnPath, independentSignalTypes, minimumResolution, reportCategory, } from "@descryy/ir";
|
|
37
|
-
import { combinedGraphPath, predictThenPropose, proveOrDisprove, visitedPageIds, } from "../planner/predict-then-propose.js";
|
|
38
|
-
import { browserAnswer, mutationRefusal, useSession, withinConsent } from "../browser/tool-support.js";
|
|
39
|
-
import { mutates, replayScenario } from "../browser/scenario-runner.js";
|
|
40
|
-
import { answer, briefNode, requiredString, optionalString, ToolInputError, } from "./kit.js";
|
|
41
|
-
import { resolveOneNode } from "./lookup.js";
|
|
42
|
-
const SCHEMA = {
|
|
43
|
-
type: "object",
|
|
44
|
-
properties: {
|
|
45
|
-
nodeId: { type: "string", description: "Graph node id to predict reach from — typically a DATABASE_COLUMN." },
|
|
46
|
-
symbol: {
|
|
47
|
-
type: "string",
|
|
48
|
-
description: "Symbol name to start from, when you do not have a node id. Ambiguity is reported rather than guessed at — narrow it with \"file\".",
|
|
49
|
-
},
|
|
50
|
-
file: { type: "string", description: "Repository-relative path, to disambiguate \"symbol\" or to start from a file." },
|
|
51
|
-
targetUrl: {
|
|
52
|
-
type: "string",
|
|
53
|
-
description: "REQUIRED. The running application's base URL — the same origin the browser session named in \"sessionId\" was consented for.",
|
|
54
|
-
},
|
|
55
|
-
sessionId: {
|
|
56
|
-
type: "string",
|
|
57
|
-
description: "REQUIRED. A browser session id from browser({ verb: \"start_session\" }), already consented for targetUrl's origin. " +
|
|
58
|
-
"This tool never starts a browser itself and never widens consent beyond that session's own.",
|
|
59
|
-
},
|
|
60
|
-
name: { type: "string", description: "What to call the proposed scenario. Defaults to \"predicted-journey\"." },
|
|
61
|
-
confirmToken: {
|
|
62
|
-
type: "string",
|
|
63
|
-
description: "The token returned by a previous call. The first call predicts and proposes but drives nothing; call " +
|
|
64
|
-
"again with \"confirmToken\" to actually drive the proposed journey and correlate the result — with " +
|
|
65
|
-
"the arguments frozen when the token was minted, never whatever the confirming call supplies, so " +
|
|
66
|
-
"changing nodeId, targetUrl, sessionId or any other field on the confirming call is discarded rather " +
|
|
67
|
-
"than applied, and the reply discloses that it was; call again without confirmToken for a fresh token " +
|
|
68
|
-
"if something needs to change. A token is single-use, expires, and is only valid for this tool.",
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
required: ["targetUrl", "sessionId"],
|
|
72
|
-
additionalProperties: false,
|
|
73
|
-
};
|
|
74
|
-
/** Resolves the start node and computes the identical prediction `predict_reach` would, from the
|
|
75
|
-
* same pure planner. Shared by `describeAction` and `run` so the two can never compute two
|
|
76
|
-
* different predictions for what a caller reads as one call. */
|
|
77
|
-
function prepare(args, ctx) {
|
|
78
|
-
const nodeIdArg = optionalString(args, "nodeId");
|
|
79
|
-
const symbol = optionalString(args, "symbol");
|
|
80
|
-
const file = optionalString(args, "file");
|
|
81
|
-
const targetUrl = requiredString(args, "targetUrl");
|
|
82
|
-
const sessionId = requiredString(args, "sessionId");
|
|
83
|
-
const name = optionalString(args, "name") ?? "predicted-journey";
|
|
84
|
-
if (nodeIdArg === undefined && symbol === undefined && file === undefined) {
|
|
85
|
-
throw new ToolInputError('give one of "nodeId", "symbol" or "file"');
|
|
86
|
-
}
|
|
87
|
-
const found = resolveOneNode(ctx.session, { nodeId: nodeIdArg, symbol, file });
|
|
88
|
-
if (found.node === null) {
|
|
89
|
-
return { ok: false, candidates: found.candidates.map(briefNode), headline: found.headline, notes: found.notes };
|
|
90
|
-
}
|
|
91
|
-
const provider = ctx.session.provider();
|
|
92
|
-
const base = provider.baseStamp();
|
|
93
|
-
const predicted = predictThenPropose(provider, found.node.id, { targetUrl, name, savedAtCommit: base.commitSha ?? "" });
|
|
94
|
-
return { ok: true, value: { node: found.node, predicted, targetUrl, sessionId } };
|
|
95
|
-
}
|
|
96
|
-
function drivable(predicted) {
|
|
97
|
-
return predicted.proposal !== null && predicted.proposal.scenario.steps.length > 0;
|
|
98
|
-
}
|
|
99
|
-
function emptyReport(node, predicted) {
|
|
100
|
-
return {
|
|
101
|
-
from: node === null ? { id: "", type: "", name: "", resolution: 0 } : briefNode(node),
|
|
102
|
-
reachedPages: predicted === null ? [] : predicted.reachedPages.map((n) => ({ id: n.id, type: n.type, name: n.name, resolution: 0 })),
|
|
103
|
-
proposal: predicted?.proposal === null || predicted === null
|
|
104
|
-
? null
|
|
105
|
-
: { scenario: predicted.proposal.scenario, reachedNotProposed: predicted.proposal.reachedNotProposed },
|
|
106
|
-
drive: null,
|
|
107
|
-
proof: null,
|
|
108
|
-
conclusion: null,
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
async function describeAction(args, ctx) {
|
|
112
|
-
const prep = prepare(args, ctx);
|
|
113
|
-
if (!prep.ok)
|
|
114
|
-
return undefined; // nothing resolvable — run() reports the refusal immediately, no gate
|
|
115
|
-
const { node, predicted, sessionId } = prep.value;
|
|
116
|
-
if (!drivable(predicted))
|
|
117
|
-
return undefined; // nothing to drive — run() reports the prediction alone
|
|
118
|
-
const steps = predicted.proposal.scenario.steps.length;
|
|
119
|
-
const pageNames = predicted.reachedPages.map((p) => p.name);
|
|
120
|
-
return (`drive ${steps} navigate step(s) in browser session "${sessionId}", toward ${predicted.reachedPages.length} ` +
|
|
121
|
-
`predicted page/component reached from ${node.name} (${pageNames.slice(0, 5).join(", ")}${pageNames.length > 5 ? ", …" : ""}), ` +
|
|
122
|
-
"then correlate what the drive actually reached — and any console error or failed request observed while " +
|
|
123
|
-
"it ran — into a governed finding via the same gate draw_conclusion uses.");
|
|
124
|
-
}
|
|
125
|
-
async function run(args, ctx) {
|
|
126
|
-
const prep = prepare(args, ctx);
|
|
127
|
-
const base = ctx.session.provider().baseStamp();
|
|
128
|
-
if (!prep.ok) {
|
|
129
|
-
return {
|
|
130
|
-
result: { data: { candidates: prep.candidates }, stamp: { ...base, resolutionFloor: 0 }, truncated: false, notes: prep.notes },
|
|
131
|
-
nameLevel: true,
|
|
132
|
-
state: "refused",
|
|
133
|
-
headline: prep.headline,
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
const { node, predicted, targetUrl, sessionId } = prep.value;
|
|
137
|
-
const notes = [...predicted.notes];
|
|
138
|
-
if (!drivable(predicted)) {
|
|
139
|
-
return answer({
|
|
140
|
-
headline: predicted.proposal === null
|
|
141
|
-
? `${node.name} reaches no PAGE or COMPONENT this graph can walk to. Not a claim it reaches none in the running application — see notes.`
|
|
142
|
-
: `${node.name} reaches ${predicted.reachedPages.length} page/component, but none has a path-shaped route name — nothing to drive or prove.`,
|
|
143
|
-
state: "empty",
|
|
144
|
-
nameLevel: true,
|
|
145
|
-
resolutionFloor: 0,
|
|
146
|
-
commitSha: base.commitSha,
|
|
147
|
-
graphBuiltAt: base.graphBuiltAt,
|
|
148
|
-
irSchemaVersion: base.irSchemaVersion,
|
|
149
|
-
commitSpread: base.commitSpread,
|
|
150
|
-
repoCount: base.repoCount,
|
|
151
|
-
notes,
|
|
152
|
-
data: emptyReport(node, predicted),
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
// A non-empty proposal only reaches this line once the two-call handshake has already
|
|
156
|
-
// approved it — `describeAction` above gates every other case. Drive it, exactly as proposed.
|
|
157
|
-
const scenario = predicted.proposal.scenario;
|
|
158
|
-
const found = await useSession(ctx.session.browserSessions(), sessionId);
|
|
159
|
-
if (!found.ok) {
|
|
160
|
-
return browserAnswer({
|
|
161
|
-
ctx,
|
|
162
|
-
state: found.dead.state,
|
|
163
|
-
headline: found.dead.headline,
|
|
164
|
-
notes: [...notes, ...found.dead.notes],
|
|
165
|
-
data: emptyReport(node, predicted),
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
const { entry } = found;
|
|
169
|
-
if (!withinConsent(entry, targetUrl)) {
|
|
170
|
-
return browserAnswer({
|
|
171
|
-
ctx,
|
|
172
|
-
state: "refused",
|
|
173
|
-
headline: `The predicted journey targets ${targetUrl}, outside this session's consent.`,
|
|
174
|
-
notes: [
|
|
175
|
-
...notes,
|
|
176
|
-
`This session was consented for ${entry.consentedOrigin} only. Start a session against that origin to drive this prediction.`,
|
|
177
|
-
],
|
|
178
|
-
data: emptyReport(node, predicted),
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
const refusedForSafety = mutationRefusal(entry);
|
|
182
|
-
if (refusedForSafety !== null && mutates(scenario)) {
|
|
183
|
-
// Dead in practice — proposeJourney only ever emits navigate steps — kept for the day a
|
|
184
|
-
// future planner proposes more, so a readOnly profile still refuses rather than driving.
|
|
185
|
-
return browserAnswer({
|
|
186
|
-
ctx,
|
|
187
|
-
state: "refused",
|
|
188
|
-
headline: `${entry.profile?.name ?? "This environment"} is read-only.`,
|
|
189
|
-
notes: [...notes, refusedForSafety],
|
|
190
|
-
data: emptyReport(node, predicted),
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
if (entry.page.currentUrl() !== scenario.targetUrl) {
|
|
194
|
-
await entry.page.navigate(scenario.targetUrl);
|
|
195
|
-
}
|
|
196
|
-
ctx.progress(`Driving the predicted journey from ${node.name}`);
|
|
197
|
-
const replay = await replayScenario(ctx, ctx.session.browserSessions(), sessionId, scenario, process.env, ctx.session.credentialStore);
|
|
198
|
-
const visited = visitedPageIds(predicted, targetUrl, replay.steps.map((s) => ({ url: s.url, status: s.status })));
|
|
199
|
-
const proof = proveOrDisprove(predicted, { visitedNodeIds: visited });
|
|
200
|
-
// The hypothesis's own structural mechanism — every page the walk predicted, not only the ones
|
|
201
|
-
// this one drive happened to confirm — so the finding's graphPath describes what the graph
|
|
202
|
-
// claims propagates, and the runtime evidence below is what says whether it broke anything.
|
|
203
|
-
const graphPath = combinedGraphPath(predicted, predicted.reachedPages.map((p) => p.id));
|
|
204
|
-
const runtimeEvidence = [
|
|
205
|
-
...replay.evidence.consoleErrors.map((e) => ({ signal: "browser-console", detail: e.text, directMechanism: false })),
|
|
206
|
-
...replay.evidence.failedRequests.map((r) => {
|
|
207
|
-
const reached = replay.graph.reached.find((n) => n.via.method === r.method && n.via.url === r.url);
|
|
208
|
-
return {
|
|
209
|
-
signal: "network",
|
|
210
|
-
detail: `${r.method} ${r.url} failed${r.status === null ? "" : ` (status ${r.status})`}`,
|
|
211
|
-
...(reached === undefined ? {} : { nodeId: reached.nodeId, directMechanism: reached.nodeId === node.id }),
|
|
212
|
-
};
|
|
213
|
-
}),
|
|
214
|
-
];
|
|
215
|
-
const hasRuntimeEvidence = evidencePrecondition(runtimeEvidence);
|
|
216
|
-
const resolution = minimumResolution(graphPath);
|
|
217
|
-
const humanAsserted = humanAssertedOnPath(graphPath);
|
|
218
|
-
const eSignals = independentSignalTypes(runtimeEvidence);
|
|
219
|
-
const mMechanism = directMechanismEvidence(runtimeEvidence, node.id);
|
|
220
|
-
const gated = reportCategory({
|
|
221
|
-
hasRuntimeEvidence,
|
|
222
|
-
independentSignalTypes: eSignals,
|
|
223
|
-
directMechanismEvidence: mMechanism,
|
|
224
|
-
resolution,
|
|
225
|
-
// Name-level throughout — a route path is read off a node's qualified name, same as
|
|
226
|
-
// predict_reach's own cap, never a type-checked shape.
|
|
227
|
-
nameLevel: true,
|
|
228
|
-
humanAsserted,
|
|
229
|
-
});
|
|
230
|
-
const proofNotes = [
|
|
231
|
-
`Drove the proposed journey for real: ${proof.proven.length} of ${predicted.reachedPages.length} predicted ` +
|
|
232
|
-
`page(s)/component(s) confirmed reached, ${proof.disproven.length} not reached by this drive.`,
|
|
233
|
-
hasRuntimeEvidence
|
|
234
|
-
? `${runtimeEvidence.length} runtime observation(s) fed the gate — ${replay.evidence.consoleErrors.length} console error(s), ` +
|
|
235
|
-
`${replay.evidence.failedRequests.length} failed request(s).`
|
|
236
|
-
: "No console error or failed request was observed during this drive, so G3's evidence precondition fails " +
|
|
237
|
-
"and this reports unconfirmed regardless of the graph path — reaching a page cleanly is not evidence it broke.",
|
|
238
|
-
];
|
|
239
|
-
return browserAnswer({
|
|
240
|
-
ctx,
|
|
241
|
-
headline: `"${node.name}": ${gated.category} (reliability ${gated.reliabilityClass}). Drove ${scenario.steps.length} step(s), ` +
|
|
242
|
-
`${proof.proven.length} predicted page(s) confirmed reached, ${proof.disproven.length} not.`,
|
|
243
|
-
notes: [...notes, ...proofNotes, ...replay.notes],
|
|
244
|
-
data: {
|
|
245
|
-
from: briefNode(node),
|
|
246
|
-
reachedPages: predicted.reachedPages.map((n) => ({ id: n.id, type: n.type, name: n.name, resolution: 0 })),
|
|
247
|
-
proposal: { scenario: predicted.proposal.scenario, reachedNotProposed: predicted.proposal.reachedNotProposed },
|
|
248
|
-
drive: {
|
|
249
|
-
outcome: replay.outcome,
|
|
250
|
-
steps: replay.steps.map((s) => ({ url: s.url, status: s.status })),
|
|
251
|
-
consoleErrorCount: replay.evidence.consoleErrors.length,
|
|
252
|
-
failedRequestCount: replay.evidence.failedRequests.length,
|
|
253
|
-
},
|
|
254
|
-
proof,
|
|
255
|
-
conclusion: {
|
|
256
|
-
failurePoint: node.id,
|
|
257
|
-
category: gated.category,
|
|
258
|
-
reliabilityClass: gated.reliabilityClass,
|
|
259
|
-
resolution,
|
|
260
|
-
independentSignalTypes: eSignals,
|
|
261
|
-
directMechanismEvidence: mMechanism,
|
|
262
|
-
hasRuntimeEvidence,
|
|
263
|
-
},
|
|
264
|
-
},
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
export const proveReachTool = {
|
|
268
|
-
name: "prove_reach",
|
|
269
|
-
class: "action",
|
|
270
|
-
tier: "conclusion",
|
|
271
|
-
version: "1.0.0",
|
|
272
|
-
title: "Predict which pages a data change reaches, then drive a real browser to prove or disprove it",
|
|
273
|
-
description: "RG-10's full loop: predicts which PAGE/COMPONENT nodes a node (typically a DATABASE_COLUMN) reaches, " +
|
|
274
|
-
"exactly as predict_reach does, and proposes a navigate-only journey. The first call performs nothing " +
|
|
275
|
-
"and returns a confirmation token; call again with confirmToken to drive that exact proposed journey for " +
|
|
276
|
-
"real, in an already-consented browser session (sessionId, from browser({ verb: \"start_session\" })), then correlate " +
|
|
277
|
-
"which predicted pages the drive actually reached and route the graph path plus whatever the drive " +
|
|
278
|
-
"observed (console errors, failed requests) through the same governed gate draw_conclusion uses. Never " +
|
|
279
|
-
"boots an app, never clicks or types beyond the navigate-only proposal, and never widens the journey the " +
|
|
280
|
-
"first call showed you. A drive that reaches every predicted page with nothing wrong observed reports " +
|
|
281
|
-
"unconfirmed, honestly — a clean page load is not evidence of breakage.",
|
|
282
|
-
inputSchema: SCHEMA,
|
|
283
|
-
run,
|
|
284
|
-
describeAction,
|
|
285
|
-
};
|
|
286
|
-
//# sourceMappingURL=prove-reach.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prove-reach.js","sourceRoot":"","sources":["../../src/tools/prove-reach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,GAKf,MAAM,aAA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AC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;gBAClE,iBAAiB,EAAE,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM;gBACvD,kBAAkB,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM;aAC1D;YACD,KAAK;YACL,UAAU,EAAE;gBACV,YAAY,EAAE,IAAI,CAAC,EAAE;gBACrB,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;gBACxC,UAAU;gBACV,sBAAsB,EAAE,QAAQ;gBAChC,uBAAuB,EAAE,UAAU;gBACnC,kBAAkB;aACnB;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,8FAA8F;IACrG,WAAW,EACT,uGAAuG;QACvG,uGAAuG;QACvG,0GAA0G;QAC1G,uHAAuH;QACvH,oGAAoG;QACpG,wGAAwG;QACxG,0GAA0G;QAC1G,uGAAuG;QACvG,wEAAwE;IAC1E,WAAW,EAAE,MAA4C;IACzD,GAAG;IACH,cAAc;CACf,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `questions` — lets a human answer an open refusal question in this conversation.
|
|
3
|
-
* DEC-242: a refusal carries `attrs.blockedBy`+`refusalClass`. DEC-243: grouped into
|
|
4
|
-
* one question per pair; a dedicated read+write tool, not folded into `link_workspace`.
|
|
5
|
-
* DEC-223: a recorded answer caps at reliability class B regardless of anything else. */
|
|
6
|
-
import type { RefusalDropCounts, RefusalQuestion } from "@descryy/core";
|
|
7
|
-
import type { ConfirmedFact } from "@descryy/ir";
|
|
8
|
-
import { type ToolDefinition } from "./kit.ts";
|
|
9
|
-
/** Both halves of one conversation: the queue, and the answer that just shrank it.
|
|
10
|
-
* Read and write together so a caller doesn't need two calls. */
|
|
11
|
-
export interface QuestionsData {
|
|
12
|
-
/** The `ConfirmedFact` written by this call, or null when none given. A human
|
|
13
|
-
* assertion, not a graph fact — capped at reliability class B (DEC-223) when
|
|
14
|
-
* later used to mint an edge. */
|
|
15
|
-
readonly recorded: ConfirmedFact | null;
|
|
16
|
-
/** Rows a human could resolve, grouped by `blockedBy` — DEC-242's `value-unknown`
|
|
17
|
-
* class only. A reader-capability gap or per-call value never appears here. */
|
|
18
|
-
readonly questions: readonly RefusalQuestion[];
|
|
19
|
-
/** Every refusal-ledger row, classified or not. The outer denominator. */
|
|
20
|
-
readonly totalRefusalRows: number;
|
|
21
|
-
/** Of those, how many carry `attrs.blockedBy`/`refusalClass` at all. The gap vs
|
|
22
|
-
* `totalRefusalRows` is unclassified rows — never askable, not "still open". */
|
|
23
|
-
readonly classifiedRows: number;
|
|
24
|
-
/** Rows a stored confirmed fact already answers, so they are not listed as questions. */
|
|
25
|
-
readonly alreadyAnswered: number;
|
|
26
|
-
/** Rows dropped by refusal class, per DEC-242's own rule. */
|
|
27
|
-
readonly dropped: RefusalDropCounts;
|
|
28
|
-
}
|
|
29
|
-
export declare const questionsTool: ToolDefinition;
|
|
30
|
-
//# sourceMappingURL=questions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"questions.d.ts","sourceRoot":"","sources":["../../src/tools/questions.ts"],"names":[],"mappings":"AAAA;;;;yFAIyF;AAGzF,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAGlB;kEACkE;AAClE,MAAM,WAAW,aAAa;IAC5B;;sCAEkC;IAClC,QAAQ,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IACxC;oFACgF;IAChF,QAAQ,CAAC,SAAS,EAAE,SAAS,eAAe,EAAE,CAAC;IAC/C,0EAA0E;IAC1E,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC;qFACiF;IACjF,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,yFAAyF;IACzF,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;CACrC;AA0PD,eAAO,MAAM,aAAa,EAAE,cAoB3B,CAAC"}
|
package/dist/tools/questions.js
DELETED
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `questions` — lets a human answer an open refusal question in this conversation.
|
|
3
|
-
* DEC-242: a refusal carries `attrs.blockedBy`+`refusalClass`. DEC-243: grouped into
|
|
4
|
-
* one question per pair; a dedicated read+write tool, not folded into `link_workspace`.
|
|
5
|
-
* DEC-223: a recorded answer caps at reliability class B regardless of anything else. */
|
|
6
|
-
import { applyConfirmedFacts, counts, groupRefusalsIntoQuestions } from "@descryy/core";
|
|
7
|
-
import { writeConfirmedFact } from "../session.js";
|
|
8
|
-
import { answer, optionalEnum, optionalString, requiredString, ToolInputError, } from "./kit.js";
|
|
9
|
-
const SCHEMA = {
|
|
10
|
-
type: "object",
|
|
11
|
-
properties: {
|
|
12
|
-
answer: {
|
|
13
|
-
type: "object",
|
|
14
|
-
description: "Record a confirmed value for one question, keyed on the exact blockedBy string a question " +
|
|
15
|
-
"reports. Omit to only list what is still open.",
|
|
16
|
-
properties: {
|
|
17
|
-
blockedBy: {
|
|
18
|
-
type: "string",
|
|
19
|
-
description: "Must equal a question's own \"blockedBy\" field, byte for byte — no fuzzy match.",
|
|
20
|
-
},
|
|
21
|
-
value: { type: "string", description: "The confirmed literal value." },
|
|
22
|
-
environment: {
|
|
23
|
-
type: "string",
|
|
24
|
-
description: "Optional. Omit for an unscoped answer (the common case) — never infer one from the value " +
|
|
25
|
-
"itself (a hostname naming \"staging\" is not evidence the caller may read). A second answer " +
|
|
26
|
-
"with a different environment for the same blockedBy is a second fact, not a replacement.",
|
|
27
|
-
},
|
|
28
|
-
confirmedBy: {
|
|
29
|
-
type: "string",
|
|
30
|
-
description: "Free text — who or what is asserting this. Defaults to \"user\".",
|
|
31
|
-
},
|
|
32
|
-
scope: {
|
|
33
|
-
type: "string",
|
|
34
|
-
enum: ["repo", "workspace"],
|
|
35
|
-
description: "How far this answer reaches. \"repo\" (the default) answers rows in this repository " +
|
|
36
|
-
"only. \"workspace\" also answers rows in every repository linked into the same " +
|
|
37
|
-
"workspace by \"link_workspace\", and requires one to be configured. Choose " +
|
|
38
|
-
"\"workspace\" only when the value is genuinely the same everywhere in the workspace " +
|
|
39
|
-
"— two services can each read an environment variable of the same name and mean " +
|
|
40
|
-
"different things by it, and this tool has no way to tell.",
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
required: ["blockedBy", "value"],
|
|
44
|
-
additionalProperties: false,
|
|
45
|
-
},
|
|
46
|
-
// Declared here, not only in the prose — `tool-schema-prose.test.ts` holds the
|
|
47
|
-
// registry to keeping documented and declared params in sync (a documented-but-
|
|
48
|
-
// undeclared param was once silently rejected under additionalProperties:false).
|
|
49
|
-
confirmToken: {
|
|
50
|
-
type: "string",
|
|
51
|
-
description: "The token returned by a previous call that carried \"answer\". Recording a confirmed value " +
|
|
52
|
-
"takes two calls: the first returns a token and writes nothing, the second redeems it — with the " +
|
|
53
|
-
"arguments frozen when the token was minted, never whatever the second call supplies, so a " +
|
|
54
|
-
"different \"answer\" on the confirming call is discarded rather than applied, and the reply " +
|
|
55
|
-
"discloses that it was; call again without confirmToken for a fresh token if the answer needs to change. A token is single-use, expires, and is only valid for " +
|
|
56
|
-
"this tool. Omit it on a pure read of the open-question queue — that path performs nothing and " +
|
|
57
|
-
"needs no handshake.",
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
additionalProperties: false,
|
|
61
|
-
};
|
|
62
|
-
/** The `answer` arg, read+validated once — shared by `describeAction` so mint and run
|
|
63
|
-
* refuse identically (DEC-387: a `scope:"workspace"` answer was once described as
|
|
64
|
-
* workspace-wide then refused on redemption). Reads only `config.workspace`, writes nothing. */
|
|
65
|
-
function readAnswer(answerArg, session) {
|
|
66
|
-
if (typeof answerArg !== "object" || answerArg === null) {
|
|
67
|
-
throw new ToolInputError('"answer" must be an object');
|
|
68
|
-
}
|
|
69
|
-
const a = answerArg;
|
|
70
|
-
const blockedBy = requiredString(a, "blockedBy");
|
|
71
|
-
const value = requiredString(a, "value");
|
|
72
|
-
const environment = optionalString(a, "environment");
|
|
73
|
-
const confirmedBy = optionalString(a, "confirmedBy") ?? "user";
|
|
74
|
-
const scope = optionalEnum(a, "scope", ["repo", "workspace"]) ?? "repo";
|
|
75
|
-
if (scope === "workspace" && session.config.workspace === undefined) {
|
|
76
|
-
throw new ToolInputError('scope "workspace" needs a configured workspace, and this repository has none. Call ' +
|
|
77
|
-
'"link_workspace" first, or record this answer with scope "repo".');
|
|
78
|
-
}
|
|
79
|
-
return { blockedBy, value, environment, confirmedBy, scope };
|
|
80
|
-
}
|
|
81
|
-
async function run(args, ctx) {
|
|
82
|
-
const { session } = ctx;
|
|
83
|
-
const notes = [];
|
|
84
|
-
// `confirmedFacts` is readonly and loaded once at session start; merged locally below instead of a mid-call disk reload.
|
|
85
|
-
let facts = session.config.confirmedFacts;
|
|
86
|
-
let recorded = null;
|
|
87
|
-
const answerArg = args["answer"];
|
|
88
|
-
if (answerArg !== undefined) {
|
|
89
|
-
if (typeof answerArg !== "object" || answerArg === null) {
|
|
90
|
-
throw new ToolInputError('"answer" must be an object');
|
|
91
|
-
}
|
|
92
|
-
const { blockedBy, value, environment, confirmedBy, scope } = readAnswer(answerArg, session);
|
|
93
|
-
// `confirmedAtCommit`: repo's commit at answer time, so a later mint can tell if
|
|
94
|
-
// code moved since. Best-effort — no git history means no value, an absence not
|
|
95
|
-
// a guess; must never fail the recording because the disclosure couldn't.
|
|
96
|
-
const confirmedAtCommit = await session
|
|
97
|
-
.root()
|
|
98
|
-
.then((r) => r.commitSha)
|
|
99
|
-
.catch(() => undefined);
|
|
100
|
-
recorded = {
|
|
101
|
-
repo: session.config.repo,
|
|
102
|
-
blockedBy,
|
|
103
|
-
value,
|
|
104
|
-
...(environment === undefined ? {} : { environment }),
|
|
105
|
-
confirmedBy,
|
|
106
|
-
confirmedAt: new Date().toISOString(),
|
|
107
|
-
...(confirmedAtCommit === undefined ? {} : { confirmedAtCommit }),
|
|
108
|
-
scope,
|
|
109
|
-
// Stamped on the fact, not looked up at read time — a fact must not reach
|
|
110
|
-
// further because its repo was later re-linked into a different workspace.
|
|
111
|
-
...(scope === "workspace" && session.config.workspace !== undefined
|
|
112
|
-
? { workspace: session.config.workspace }
|
|
113
|
-
: {}),
|
|
114
|
-
};
|
|
115
|
-
ctx.progress(`Recording an answer for ${blockedBy}${environment === undefined ? "" : ` (${environment})`}`);
|
|
116
|
-
const written = await writeConfirmedFact(session.repoPath, recorded);
|
|
117
|
-
const sameKey = (f) => f.repo === recorded?.repo && f.blockedBy === recorded.blockedBy && f.environment === recorded.environment;
|
|
118
|
-
facts = [...facts.filter((f) => !sameKey(f)), recorded];
|
|
119
|
-
notes.push(written.replaced === null
|
|
120
|
-
? `Recorded a new answer for "${blockedBy}"${environment === undefined ? "" : ` in "${environment}"`}.`
|
|
121
|
-
: `Replaced the previous answer for "${blockedBy}"` +
|
|
122
|
-
`${environment === undefined ? "" : ` in "${environment}"`} (was "${written.replaced.value}", ` +
|
|
123
|
-
`confirmed ${written.replaced.confirmedAt}).`);
|
|
124
|
-
}
|
|
125
|
-
ctx.progress("Reading the refusal ledger");
|
|
126
|
-
const provider = session.provider();
|
|
127
|
-
const { refs, truncated } = provider.unresolvedRefs();
|
|
128
|
-
const total = counts(session.store().driver).unresolvedRefs;
|
|
129
|
-
// Plus workspace-scoped facts from `link_workspace` siblings. `applyConfirmedFacts`
|
|
130
|
-
// decides which actually reach this repo — this call only supplies candidates.
|
|
131
|
-
const { answered, stillOpen } = applyConfirmedFacts(refs, [...facts, ...(session.config.linkedFacts ?? [])], session.config.repo, session.config.workspace);
|
|
132
|
-
const grouped = groupRefusalsIntoQuestions(session.config.repo, stillOpen);
|
|
133
|
-
if (truncated) {
|
|
134
|
-
notes.push("The classified-refusal read was capped and some rows were not examined — this list may be " +
|
|
135
|
-
"incomplete. Re-run with a narrower scope, or treat this as a lower bound.");
|
|
136
|
-
}
|
|
137
|
-
if (total > refs.length) {
|
|
138
|
-
notes.push(`${total - refs.length} of ${total} refusal-ledger row(s) carry no classification at all yet ` +
|
|
139
|
-
"(no adapter has set attrs.blockedBy/refusalClass for them) — never askable, not counted " +
|
|
140
|
-
"above, and not the same population as \"still open\".");
|
|
141
|
-
}
|
|
142
|
-
if (answered.length > 0) {
|
|
143
|
-
notes.push(`${answered.length} previously-open row(s) are already answered by a stored confirmed fact and ` +
|
|
144
|
-
"are not listed as questions.");
|
|
145
|
-
// Named, never folded in — "answered here" vs "answered elsewhere as workspace-wide"
|
|
146
|
-
// are different facts, and only the second carries the risk `scope` makes deliberate.
|
|
147
|
-
const elsewhere = answered.filter((a) => a.fromAnotherRepo);
|
|
148
|
-
if (elsewhere.length > 0) {
|
|
149
|
-
const repos = [...new Set(elsewhere.flatMap((a) => a.facts.map((f) => f.repo)))].sort();
|
|
150
|
-
notes.push(`${elsewhere.length} of those are answered only by workspace-scoped fact(s) recorded in ` +
|
|
151
|
-
`${repos.join(", ")}, not in ${session.config.repo}. They apply here because whoever ` +
|
|
152
|
-
`recorded them declared scope "workspace", not because this tool matched on the name.`);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
for (const [cls, count] of Object.entries(grouped.dropped)) {
|
|
156
|
-
if (cls === "value-unknown")
|
|
157
|
-
continue; // never dropped under its own class name
|
|
158
|
-
notes.push(`${count} row(s) are "${cls}" — DEC-242's own rule: not askable, never surfaced here.`);
|
|
159
|
-
}
|
|
160
|
-
const headline = grouped.questions.length === 0
|
|
161
|
-
? recorded !== null
|
|
162
|
-
? `Answer recorded. No open questions remain in ${session.config.repo}.`
|
|
163
|
-
: `No open questions in ${session.config.repo}. ${refs.length} classified refusal row(s) examined.`
|
|
164
|
-
: `${grouped.questions.length} open question(s) in ${session.config.repo}, covering ` +
|
|
165
|
-
`${grouped.questions.reduce((n, q) => n + q.sites.length, 0)} call site(s).`;
|
|
166
|
-
return answer({
|
|
167
|
-
headline,
|
|
168
|
-
// Name-level fact (expression present or not, same class as a missing env var).
|
|
169
|
-
// `UnresolvedRef` carries no resolution level (refusals aren't edges, DEC-223),
|
|
170
|
-
// so R0 is the honest floor — same choice `link_workspace` makes, same reason.
|
|
171
|
-
nameLevel: true,
|
|
172
|
-
resolutionFloor: 0,
|
|
173
|
-
commitSha: provider.baseStamp().commitSha,
|
|
174
|
-
graphBuiltAt: provider.baseStamp().graphBuiltAt,
|
|
175
|
-
irSchemaVersion: provider.baseStamp().irSchemaVersion,
|
|
176
|
-
commitSpread: provider.baseStamp().commitSpread,
|
|
177
|
-
repoCount: provider.baseStamp().repoCount,
|
|
178
|
-
// Empty only for a pure read finding nothing open (`classifiedRows` is real).
|
|
179
|
-
// An answer that happens to empty the queue is a write, not an empty search.
|
|
180
|
-
...(recorded === null && grouped.questions.length === 0 ? { state: "empty" } : {}),
|
|
181
|
-
notes,
|
|
182
|
-
data: {
|
|
183
|
-
recorded,
|
|
184
|
-
questions: grouped.questions,
|
|
185
|
-
totalRefusalRows: total,
|
|
186
|
-
classifiedRows: refs.length,
|
|
187
|
-
alreadyAnswered: answered.length,
|
|
188
|
-
dropped: grouped.dropped,
|
|
189
|
-
},
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
/** §7's handshake gate. `undefined` = nothing to confirm (pure read must stay
|
|
193
|
-
* answerable on the first call). Only a write-bound call describes itself, so
|
|
194
|
-
* `resolveActionDispatch` mints a token for that call alone. */
|
|
195
|
-
function describeAction(args, ctx) {
|
|
196
|
-
const answerArg = args["answer"];
|
|
197
|
-
// No `answer` = pure read, nothing to confirm — gating it would block the first
|
|
198
|
-
// question ever asked. Other shapes reuse `readAnswer`, so an invalid call is
|
|
199
|
-
// refused here rather than described and minted.
|
|
200
|
-
if (answerArg === undefined)
|
|
201
|
-
return undefined;
|
|
202
|
-
const { blockedBy, value, environment, scope } = readAnswer(answerArg, ctx.session);
|
|
203
|
-
return (`record a ConfirmedFact: "${blockedBy}" = "${value}"` +
|
|
204
|
-
(typeof environment === "string" ? ` (environment: ${environment})` : "") +
|
|
205
|
-
// Reach is part of what's approved — a workspace answer affects repos the
|
|
206
|
-
// approver isn't looking at; §7's handshake exists so nothing runs undescribed.
|
|
207
|
-
(scope === "workspace"
|
|
208
|
-
? " — reaching EVERY repository in this workspace, not just this one,"
|
|
209
|
-
: " — in this repository only,") +
|
|
210
|
-
" capped at reliability class B (DEC-223) once used.");
|
|
211
|
-
}
|
|
212
|
-
export const questionsTool = {
|
|
213
|
-
name: "questions",
|
|
214
|
-
class: "action",
|
|
215
|
-
tier: "evidence",
|
|
216
|
-
version: "1.0.0",
|
|
217
|
-
title: "See and answer open refusal-ledger questions",
|
|
218
|
-
description: "List every refusal-ledger row a human could actually resolve (DEC-242's \"value-unknown\" " +
|
|
219
|
-
"class only — a reader-capability gap or a per-call value is never surfaced here, because no " +
|
|
220
|
-
"sentence answers those). Pass \"answer\" to record a confirmed value for one question, keyed " +
|
|
221
|
-
"on its exact \"blockedBy\" string within this repository; the answer is capped at reliability " +
|
|
222
|
-
"class B when later used, regardless of anything else about the edge it resolves (DEC-223). " +
|
|
223
|
-
"An answer reaches this repository alone unless it is recorded with scope \"workspace\", which " +
|
|
224
|
-
"extends it to every repository linked into the same workspace; a row answered that way is " +
|
|
225
|
-
"always reported as having been answered elsewhere. " +
|
|
226
|
-
"Recording an answer takes a two-call confirmation: the first call with \"answer\" performs " +
|
|
227
|
-
"nothing and returns a token; call again with \"confirmToken\" to actually record it.",
|
|
228
|
-
inputSchema: SCHEMA,
|
|
229
|
-
run,
|
|
230
|
-
describeAction,
|
|
231
|
-
};
|
|
232
|
-
//# sourceMappingURL=questions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"questions.js","sourceRoot":"","sources":["../../src/tools/questions.ts"],"names":[],"mappings":"AAAA;;;;yFAIyF;AAEzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAIxF,OAAO,EAAE,kBAAkB,EAAgB,MAAM,eAAe,CAAC;AACjE,OAAO,EACL,MAAM,EACN,YAAY,EACZ,cAAc,EACd,cAAc,EACd,cAAc,GAGf,MAAM,UAAU,CAAC;AAwBlB,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,4FAA4F;gBAC5F,gDAAgD;YAClD,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kFAAkF;iBAChG;gBACD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8BAA8B,EAAE;gBACtE,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,2FAA2F;wBAC3F,8FAA8F;wBAC9F,0FAA0F;iBAC7F;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kEAAkE;iBAChF;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC;oBAC3B,WAAW,EACT,sFAAsF;wBACtF,iFAAiF;wBACjF,6EAA6E;wBAC7E,sFAAsF;wBACtF,iFAAiF;wBACjF,2DAA2D;iBAC9D;aACF;YACD,QAAQ,EAAE,CAA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;IACpF,OAAO,CACL,4BAA4B,SAAS,QAAQ,KAAK,GAAG;QACrD,CAAC,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,kBAAkB,WAAW,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACzE,0EAA0E;QAC1E,gFAAgF;QAChF,CAAC,KAAK,KAAK,WAAW;YACpB,CAAC,CAAC,oEAAoE;YACtE,CAAC,CAAC,6BAA6B,CAAC;QAClC,qDAAqD,CACtD,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC3C,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,8CAA8C;IACrD,WAAW,EACT,4FAA4F;QAC5F,8FAA8F;QAC9F,+FAA+F;QAC/F,gGAAgG;QAChG,6FAA6F;QAC7F,gGAAgG;QAChG,4FAA4F;QAC5F,qDAAqD;QACrD,6FAA6F;QAC7F,sFAAsF;IACxF,WAAW,EAAE,MAA4C;IACzD,GAAG;IACH,cAAc;CACf,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `refusal_fetch` — §4 technique 4: summarise, never enumerate (count, exemplar,
|
|
3
|
-
* handle). No `handle` → fresh summary; `handle` → redeem a page (mirrors
|
|
4
|
-
* `questions.ts`). Always reads `{classified: false}` — the default `true` would
|
|
5
|
-
* silently drop unclassified rows (DEC-243). No `limit`: the population must stay stable. */
|
|
6
|
-
import { type ToolDefinition } from "./kit.ts";
|
|
7
|
-
export interface RefusalFetchSummaryItem {
|
|
8
|
-
readonly fromNodeId: string;
|
|
9
|
-
readonly edgeType: string;
|
|
10
|
-
readonly rawTarget: string;
|
|
11
|
-
readonly file: string | null;
|
|
12
|
-
readonly line: number | null;
|
|
13
|
-
readonly producedBy: string;
|
|
14
|
-
readonly reason: string;
|
|
15
|
-
}
|
|
16
|
-
export interface RefusalFetchSummaryData {
|
|
17
|
-
readonly kind: "summary";
|
|
18
|
-
/** The honest denominator — every unresolved row in the graph, classified and unclassified alike. */
|
|
19
|
-
readonly count: number;
|
|
20
|
-
/** One row's `reason`, verbatim — never re-worded (§4 technique 4). `null` only when `count === 0`. */
|
|
21
|
-
readonly exemplar: string | null;
|
|
22
|
-
/** Redeem with a follow-up call passing this as `handle`. `null` only when `count === 0`. */
|
|
23
|
-
readonly handle: string | null;
|
|
24
|
-
}
|
|
25
|
-
export interface RefusalFetchPageData {
|
|
26
|
-
readonly kind: "page";
|
|
27
|
-
readonly items: readonly RefusalFetchSummaryItem[];
|
|
28
|
-
/** Restated on every page — the truncation rule pointed the other way (§5.5). */
|
|
29
|
-
readonly total: number;
|
|
30
|
-
/** Redeem for the next page. `null` on the last page. */
|
|
31
|
-
readonly nextHandle: string | null;
|
|
32
|
-
}
|
|
33
|
-
export type RefusalFetchData = RefusalFetchSummaryData | RefusalFetchPageData;
|
|
34
|
-
export declare const refusalFetchTool: ToolDefinition;
|
|
35
|
-
//# sourceMappingURL=refusal-fetch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refusal-fetch.d.ts","sourceRoot":"","sources":["../../src/tools/refusal-fetch.ts"],"names":[],"mappings":"AAAA;;;;6FAI6F;AAI7F,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAsBlB,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACz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