@descryy/mcp 0.11.3 → 0.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +20 -20
- package/dist/action-handshake.d.ts +0 -38
- package/dist/action-handshake.d.ts.map +0 -1
- package/dist/action-handshake.js +0 -127
- package/dist/action-handshake.js.map +0 -1
- package/dist/bin/descry-mcp.d.ts +0 -7
- package/dist/bin/descry-mcp.d.ts.map +0 -1
- package/dist/bin/descry-mcp.js +0 -72
- package/dist/bin/descry-mcp.js.map +0 -1
- package/dist/browser/auth.d.ts +0 -84
- package/dist/browser/auth.d.ts.map +0 -1
- package/dist/browser/auth.js +0 -233
- package/dist/browser/auth.js.map +0 -1
- package/dist/browser/capability-probe.d.ts +0 -109
- package/dist/browser/capability-probe.d.ts.map +0 -1
- package/dist/browser/capability-probe.js +0 -201
- package/dist/browser/capability-probe.js.map +0 -1
- package/dist/browser/driver.d.ts +0 -570
- package/dist/browser/driver.d.ts.map +0 -1
- package/dist/browser/driver.js +0 -116
- package/dist/browser/driver.js.map +0 -1
- package/dist/browser/evidence.d.ts +0 -28
- package/dist/browser/evidence.d.ts.map +0 -1
- package/dist/browser/evidence.js +0 -82
- package/dist/browser/evidence.js.map +0 -1
- package/dist/browser/fake-driver.d.ts +0 -116
- package/dist/browser/fake-driver.d.ts.map +0 -1
- package/dist/browser/fake-driver.js +0 -416
- package/dist/browser/fake-driver.js.map +0 -1
- package/dist/browser/fault-attribution.d.ts +0 -178
- package/dist/browser/fault-attribution.d.ts.map +0 -1
- package/dist/browser/fault-attribution.js +0 -266
- package/dist/browser/fault-attribution.js.map +0 -1
- package/dist/browser/graph-write.d.ts +0 -45
- package/dist/browser/graph-write.d.ts.map +0 -1
- package/dist/browser/graph-write.js +0 -103
- package/dist/browser/graph-write.js.map +0 -1
- package/dist/browser/identity-graph-write.d.ts +0 -55
- package/dist/browser/identity-graph-write.d.ts.map +0 -1
- package/dist/browser/identity-graph-write.js +0 -45
- package/dist/browser/identity-graph-write.js.map +0 -1
- package/dist/browser/page-probe.d.ts +0 -81
- package/dist/browser/page-probe.d.ts.map +0 -1
- package/dist/browser/page-probe.js +0 -202
- package/dist/browser/page-probe.js.map +0 -1
- package/dist/browser/playwright-driver.d.ts +0 -114
- package/dist/browser/playwright-driver.d.ts.map +0 -1
- package/dist/browser/playwright-driver.js +0 -1479
- package/dist/browser/playwright-driver.js.map +0 -1
- package/dist/browser/provider.d.ts +0 -26
- package/dist/browser/provider.d.ts.map +0 -1
- package/dist/browser/provider.js +0 -14
- package/dist/browser/provider.js.map +0 -1
- package/dist/browser/reach-recording-session.d.ts +0 -44
- package/dist/browser/reach-recording-session.d.ts.map +0 -1
- package/dist/browser/reach-recording-session.js +0 -143
- package/dist/browser/reach-recording-session.js.map +0 -1
- package/dist/browser/reachability.d.ts +0 -168
- package/dist/browser/reachability.d.ts.map +0 -1
- package/dist/browser/reachability.js +0 -294
- package/dist/browser/reachability.js.map +0 -1
- package/dist/browser/registry.d.ts +0 -126
- package/dist/browser/registry.d.ts.map +0 -1
- package/dist/browser/registry.js +0 -177
- package/dist/browser/registry.js.map +0 -1
- package/dist/browser/scenario-provenance.d.ts +0 -23
- package/dist/browser/scenario-provenance.d.ts.map +0 -1
- package/dist/browser/scenario-provenance.js +0 -73
- package/dist/browser/scenario-provenance.js.map +0 -1
- package/dist/browser/scenario-resolve.d.ts +0 -28
- package/dist/browser/scenario-resolve.d.ts.map +0 -1
- package/dist/browser/scenario-resolve.js +0 -96
- package/dist/browser/scenario-resolve.js.map +0 -1
- package/dist/browser/scenario-runner.d.ts +0 -72
- package/dist/browser/scenario-runner.d.ts.map +0 -1
- package/dist/browser/scenario-runner.js +0 -353
- package/dist/browser/scenario-runner.js.map +0 -1
- package/dist/browser/stack-parser.d.ts +0 -19
- package/dist/browser/stack-parser.d.ts.map +0 -1
- package/dist/browser/stack-parser.js +0 -85
- package/dist/browser/stack-parser.js.map +0 -1
- package/dist/browser/tool-support.d.ts +0 -71
- package/dist/browser/tool-support.d.ts.map +0 -1
- package/dist/browser/tool-support.js +0 -216
- package/dist/browser/tool-support.js.map +0 -1
- package/dist/browser/url-scheme.d.ts +0 -14
- package/dist/browser/url-scheme.d.ts.map +0 -1
- package/dist/browser/url-scheme.js +0 -38
- package/dist/browser/url-scheme.js.map +0 -1
- package/dist/browser/wait-target.d.ts +0 -37
- package/dist/browser/wait-target.d.ts.map +0 -1
- package/dist/browser/wait-target.js +0 -54
- package/dist/browser/wait-target.js.map +0 -1
- package/dist/cancellation.d.ts +0 -20
- package/dist/cancellation.d.ts.map +0 -1
- package/dist/cancellation.js +0 -41
- package/dist/cancellation.js.map +0 -1
- package/dist/capped.d.ts +0 -17
- package/dist/capped.d.ts.map +0 -1
- package/dist/capped.js +0 -15
- package/dist/capped.js.map +0 -1
- package/dist/credential-store.d.ts +0 -22
- package/dist/credential-store.d.ts.map +0 -1
- package/dist/credential-store.js +0 -33
- package/dist/credential-store.js.map +0 -1
- package/dist/disclosure-ledger.d.ts +0 -14
- package/dist/disclosure-ledger.d.ts.map +0 -1
- package/dist/disclosure-ledger.js +0 -18
- package/dist/disclosure-ledger.js.map +0 -1
- package/dist/evidence/observed-route-evidence.d.ts +0 -25
- package/dist/evidence/observed-route-evidence.d.ts.map +0 -1
- package/dist/evidence/observed-route-evidence.js +0 -76
- package/dist/evidence/observed-route-evidence.js.map +0 -1
- package/dist/heap.d.ts +0 -61
- package/dist/heap.d.ts.map +0 -1
- package/dist/heap.js +0 -82
- package/dist/heap.js.map +0 -1
- package/dist/heartbeat.d.ts +0 -46
- package/dist/heartbeat.d.ts.map +0 -1
- package/dist/heartbeat.js +0 -66
- package/dist/heartbeat.js.map +0 -1
- package/dist/index.d.ts +0 -32
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -19
- package/dist/index.js.map +0 -1
- package/dist/module-trust.d.ts +0 -37
- package/dist/module-trust.d.ts.map +0 -1
- package/dist/module-trust.js +0 -77
- package/dist/module-trust.js.map +0 -1
- package/dist/path-confinement.d.ts +0 -31
- package/dist/path-confinement.d.ts.map +0 -1
- package/dist/path-confinement.js +0 -44
- package/dist/path-confinement.js.map +0 -1
- package/dist/planner/predict-then-propose.d.ts +0 -134
- package/dist/planner/predict-then-propose.d.ts.map +0 -1
- package/dist/planner/predict-then-propose.js +0 -138
- package/dist/planner/predict-then-propose.js.map +0 -1
- package/dist/planner/propose-journey.d.ts +0 -75
- package/dist/planner/propose-journey.d.ts.map +0 -1
- package/dist/planner/propose-journey.js +0 -96
- package/dist/planner/propose-journey.js.map +0 -1
- package/dist/protocol.d.ts +0 -57
- package/dist/protocol.d.ts.map +0 -1
- package/dist/protocol.js +0 -90
- package/dist/protocol.js.map +0 -1
- package/dist/registry.d.ts +0 -103
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -319
- package/dist/registry.js.map +0 -1
- package/dist/render.d.ts +0 -580
- package/dist/render.d.ts.map +0 -1
- package/dist/render.js +0 -867
- package/dist/render.js.map +0 -1
- package/dist/runtime-registry.d.ts +0 -22
- package/dist/runtime-registry.d.ts.map +0 -1
- package/dist/runtime-registry.js +0 -142
- package/dist/runtime-registry.js.map +0 -1
- package/dist/sandbox-defaults.d.ts +0 -41
- package/dist/sandbox-defaults.d.ts.map +0 -1
- package/dist/sandbox-defaults.js +0 -14
- package/dist/sandbox-defaults.js.map +0 -1
- package/dist/scenarios/browser-run-plan-projection.d.ts +0 -161
- package/dist/scenarios/browser-run-plan-projection.d.ts.map +0 -1
- package/dist/scenarios/browser-run-plan-projection.js +0 -264
- package/dist/scenarios/browser-run-plan-projection.js.map +0 -1
- package/dist/scenarios/credential-ref.d.ts +0 -102
- package/dist/scenarios/credential-ref.d.ts.map +0 -1
- package/dist/scenarios/credential-ref.js +0 -148
- package/dist/scenarios/credential-ref.js.map +0 -1
- package/dist/scenarios/index.d.ts +0 -7
- package/dist/scenarios/index.d.ts.map +0 -1
- package/dist/scenarios/index.js +0 -7
- package/dist/scenarios/index.js.map +0 -1
- package/dist/scenarios/parse.d.ts +0 -18
- package/dist/scenarios/parse.d.ts.map +0 -1
- package/dist/scenarios/parse.js +0 -212
- package/dist/scenarios/parse.js.map +0 -1
- package/dist/scenarios/scenario.d.ts +0 -93
- package/dist/scenarios/scenario.d.ts.map +0 -1
- package/dist/scenarios/scenario.js +0 -27
- package/dist/scenarios/scenario.js.map +0 -1
- package/dist/scenarios/secret-ref.d.ts +0 -86
- package/dist/scenarios/secret-ref.d.ts.map +0 -1
- package/dist/scenarios/secret-ref.js +0 -125
- package/dist/scenarios/secret-ref.js.map +0 -1
- package/dist/scenarios/storage.d.ts +0 -21
- package/dist/scenarios/storage.d.ts.map +0 -1
- package/dist/scenarios/storage.js +0 -103
- package/dist/scenarios/storage.js.map +0 -1
- package/dist/server.d.ts +0 -61
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js +0 -541
- package/dist/server.js.map +0 -1
- package/dist/session.d.ts +0 -243
- package/dist/session.d.ts.map +0 -1
- package/dist/session.js +0 -602
- package/dist/session.js.map +0 -1
- package/dist/tools/alias-kit.d.ts +0 -29
- package/dist/tools/alias-kit.d.ts.map +0 -1
- package/dist/tools/alias-kit.js +0 -21
- package/dist/tools/alias-kit.js.map +0 -1
- package/dist/tools/aliases.d.ts +0 -42
- package/dist/tools/aliases.d.ts.map +0 -1
- package/dist/tools/aliases.js +0 -52
- package/dist/tools/aliases.js.map +0 -1
- package/dist/tools/analyze-workspace.d.ts +0 -52
- package/dist/tools/analyze-workspace.d.ts.map +0 -1
- package/dist/tools/analyze-workspace.js +0 -207
- package/dist/tools/analyze-workspace.js.map +0 -1
- package/dist/tools/analyze.d.ts +0 -163
- package/dist/tools/analyze.d.ts.map +0 -1
- package/dist/tools/analyze.js +0 -724
- package/dist/tools/analyze.js.map +0 -1
- package/dist/tools/browser-click.d.ts +0 -18
- package/dist/tools/browser-click.d.ts.map +0 -1
- package/dist/tools/browser-click.js +0 -110
- package/dist/tools/browser-click.js.map +0 -1
- package/dist/tools/browser-close-session.d.ts +0 -39
- package/dist/tools/browser-close-session.d.ts.map +0 -1
- package/dist/tools/browser-close-session.js +0 -120
- package/dist/tools/browser-close-session.js.map +0 -1
- package/dist/tools/browser-fill.d.ts +0 -18
- package/dist/tools/browser-fill.d.ts.map +0 -1
- package/dist/tools/browser-fill.js +0 -117
- package/dist/tools/browser-fill.js.map +0 -1
- package/dist/tools/browser-navigate.d.ts +0 -15
- package/dist/tools/browser-navigate.d.ts.map +0 -1
- package/dist/tools/browser-navigate.js +0 -104
- package/dist/tools/browser-navigate.js.map +0 -1
- package/dist/tools/browser-read.d.ts +0 -33
- package/dist/tools/browser-read.d.ts.map +0 -1
- package/dist/tools/browser-read.js +0 -113
- package/dist/tools/browser-read.js.map +0 -1
- package/dist/tools/browser-run-scenario.d.ts +0 -28
- package/dist/tools/browser-run-scenario.d.ts.map +0 -1
- package/dist/tools/browser-run-scenario.js +0 -206
- package/dist/tools/browser-run-scenario.js.map +0 -1
- package/dist/tools/browser-save-scenario.d.ts +0 -19
- package/dist/tools/browser-save-scenario.d.ts.map +0 -1
- package/dist/tools/browser-save-scenario.js +0 -447
- package/dist/tools/browser-save-scenario.js.map +0 -1
- package/dist/tools/browser-select.d.ts +0 -20
- package/dist/tools/browser-select.d.ts.map +0 -1
- package/dist/tools/browser-select.js +0 -120
- package/dist/tools/browser-select.js.map +0 -1
- package/dist/tools/browser-snapshot.d.ts +0 -46
- package/dist/tools/browser-snapshot.d.ts.map +0 -1
- package/dist/tools/browser-snapshot.js +0 -127
- package/dist/tools/browser-snapshot.js.map +0 -1
- package/dist/tools/browser-start-session.d.ts +0 -24
- package/dist/tools/browser-start-session.d.ts.map +0 -1
- package/dist/tools/browser-start-session.js +0 -622
- package/dist/tools/browser-start-session.js.map +0 -1
- package/dist/tools/browser-submit.d.ts +0 -18
- package/dist/tools/browser-submit.d.ts.map +0 -1
- package/dist/tools/browser-submit.js +0 -106
- package/dist/tools/browser-submit.js.map +0 -1
- package/dist/tools/browser-type.d.ts +0 -18
- package/dist/tools/browser-type.d.ts.map +0 -1
- package/dist/tools/browser-type.js +0 -115
- package/dist/tools/browser-type.js.map +0 -1
- package/dist/tools/browser-wait-for.d.ts +0 -45
- package/dist/tools/browser-wait-for.d.ts.map +0 -1
- package/dist/tools/browser-wait-for.js +0 -150
- package/dist/tools/browser-wait-for.js.map +0 -1
- package/dist/tools/browser.d.ts +0 -69
- package/dist/tools/browser.d.ts.map +0 -1
- package/dist/tools/browser.js +0 -386
- package/dist/tools/browser.js.map +0 -1
- package/dist/tools/chain.d.ts +0 -41
- package/dist/tools/chain.d.ts.map +0 -1
- package/dist/tools/chain.js +0 -105
- package/dist/tools/chain.js.map +0 -1
- package/dist/tools/change-scope.d.ts +0 -25
- package/dist/tools/change-scope.d.ts.map +0 -1
- package/dist/tools/change-scope.js +0 -110
- package/dist/tools/change-scope.js.map +0 -1
- package/dist/tools/code-context.d.ts +0 -83
- package/dist/tools/code-context.d.ts.map +0 -1
- package/dist/tools/code-context.js +0 -416
- package/dist/tools/code-context.js.map +0 -1
- package/dist/tools/contracts.d.ts +0 -74
- package/dist/tools/contracts.d.ts.map +0 -1
- package/dist/tools/contracts.js +0 -196
- package/dist/tools/contracts.js.map +0 -1
- package/dist/tools/cross-pr.d.ts +0 -178
- package/dist/tools/cross-pr.d.ts.map +0 -1
- package/dist/tools/cross-pr.js +0 -321
- package/dist/tools/cross-pr.js.map +0 -1
- package/dist/tools/disclosure.d.ts +0 -75
- package/dist/tools/disclosure.d.ts.map +0 -1
- package/dist/tools/disclosure.js +0 -288
- package/dist/tools/disclosure.js.map +0 -1
- package/dist/tools/draw-conclusion.d.ts +0 -55
- package/dist/tools/draw-conclusion.d.ts.map +0 -1
- package/dist/tools/draw-conclusion.js +0 -259
- package/dist/tools/draw-conclusion.js.map +0 -1
- package/dist/tools/git-context.d.ts +0 -39
- package/dist/tools/git-context.d.ts.map +0 -1
- package/dist/tools/git-context.js +0 -364
- package/dist/tools/git-context.js.map +0 -1
- package/dist/tools/git-diff.d.ts +0 -45
- package/dist/tools/git-diff.d.ts.map +0 -1
- package/dist/tools/git-diff.js +0 -338
- package/dist/tools/git-diff.js.map +0 -1
- package/dist/tools/git-history.d.ts +0 -16
- package/dist/tools/git-history.d.ts.map +0 -1
- package/dist/tools/git-history.js +0 -86
- package/dist/tools/git-history.js.map +0 -1
- package/dist/tools/history.d.ts +0 -34
- package/dist/tools/history.d.ts.map +0 -1
- package/dist/tools/history.js +0 -121
- package/dist/tools/history.js.map +0 -1
- package/dist/tools/impact.d.ts +0 -46
- package/dist/tools/impact.d.ts.map +0 -1
- package/dist/tools/impact.js +0 -225
- package/dist/tools/impact.js.map +0 -1
- package/dist/tools/index.d.ts +0 -59
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -70
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/kit.d.ts +0 -165
- package/dist/tools/kit.d.ts.map +0 -1
- package/dist/tools/kit.js +0 -153
- package/dist/tools/kit.js.map +0 -1
- package/dist/tools/link-workspace.d.ts +0 -24
- package/dist/tools/link-workspace.d.ts.map +0 -1
- package/dist/tools/link-workspace.js +0 -131
- package/dist/tools/link-workspace.js.map +0 -1
- package/dist/tools/lookup.d.ts +0 -19
- package/dist/tools/lookup.d.ts.map +0 -1
- package/dist/tools/lookup.js +0 -63
- package/dist/tools/lookup.js.map +0 -1
- package/dist/tools/mark-incident.d.ts +0 -28
- package/dist/tools/mark-incident.d.ts.map +0 -1
- package/dist/tools/mark-incident.js +0 -188
- package/dist/tools/mark-incident.js.map +0 -1
- package/dist/tools/merged-browser.d.ts +0 -11
- package/dist/tools/merged-browser.d.ts.map +0 -1
- package/dist/tools/merged-browser.js +0 -20
- package/dist/tools/merged-browser.js.map +0 -1
- package/dist/tools/merged-context.d.ts +0 -11
- package/dist/tools/merged-context.d.ts.map +0 -1
- package/dist/tools/merged-context.js +0 -21
- package/dist/tools/merged-context.js.map +0 -1
- package/dist/tools/merged-observe.d.ts +0 -13
- package/dist/tools/merged-observe.d.ts.map +0 -1
- package/dist/tools/merged-observe.js +0 -21
- package/dist/tools/merged-observe.js.map +0 -1
- package/dist/tools/merged-workspace.d.ts +0 -14
- package/dist/tools/merged-workspace.d.ts.map +0 -1
- package/dist/tools/merged-workspace.js +0 -21
- package/dist/tools/merged-workspace.js.map +0 -1
- package/dist/tools/observe-runtime.d.ts +0 -250
- package/dist/tools/observe-runtime.d.ts.map +0 -1
- package/dist/tools/observe-runtime.js +0 -1753
- package/dist/tools/observe-runtime.js.map +0 -1
- package/dist/tools/observe-tests.d.ts +0 -57
- package/dist/tools/observe-tests.d.ts.map +0 -1
- package/dist/tools/observe-tests.js +0 -368
- package/dist/tools/observe-tests.js.map +0 -1
- package/dist/tools/observe.d.ts +0 -28
- package/dist/tools/observe.d.ts.map +0 -1
- package/dist/tools/observe.js +0 -330
- package/dist/tools/observe.js.map +0 -1
- package/dist/tools/pr-analysis.d.ts +0 -189
- package/dist/tools/pr-analysis.d.ts.map +0 -1
- package/dist/tools/pr-analysis.js +0 -299
- package/dist/tools/pr-analysis.js.map +0 -1
- package/dist/tools/pre-push.d.ts +0 -168
- package/dist/tools/pre-push.d.ts.map +0 -1
- package/dist/tools/pre-push.js +0 -416
- package/dist/tools/pre-push.js.map +0 -1
- package/dist/tools/predict-reach.d.ts +0 -57
- package/dist/tools/predict-reach.d.ts.map +0 -1
- package/dist/tools/predict-reach.js +0 -159
- package/dist/tools/predict-reach.js.map +0 -1
- package/dist/tools/propagation.d.ts +0 -37
- package/dist/tools/propagation.d.ts.map +0 -1
- package/dist/tools/propagation.js +0 -162
- package/dist/tools/propagation.js.map +0 -1
- package/dist/tools/propose-journey.d.ts +0 -16
- package/dist/tools/propose-journey.d.ts.map +0 -1
- package/dist/tools/propose-journey.js +0 -121
- package/dist/tools/propose-journey.js.map +0 -1
- package/dist/tools/prove-reach.d.ts +0 -74
- package/dist/tools/prove-reach.d.ts.map +0 -1
- package/dist/tools/prove-reach.js +0 -286
- package/dist/tools/prove-reach.js.map +0 -1
- package/dist/tools/questions.d.ts +0 -30
- package/dist/tools/questions.d.ts.map +0 -1
- package/dist/tools/questions.js +0 -232
- package/dist/tools/questions.js.map +0 -1
- package/dist/tools/refusal-fetch.d.ts +0 -35
- package/dist/tools/refusal-fetch.d.ts.map +0 -1
- package/dist/tools/refusal-fetch.js +0 -103
- package/dist/tools/refusal-fetch.js.map +0 -1
- package/dist/tools/runtime-incident.d.ts +0 -33
- package/dist/tools/runtime-incident.d.ts.map +0 -1
- package/dist/tools/runtime-incident.js +0 -67
- package/dist/tools/runtime-incident.js.map +0 -1
- package/dist/tools/runtime-journey-drive.d.ts +0 -102
- package/dist/tools/runtime-journey-drive.d.ts.map +0 -1
- package/dist/tools/runtime-journey-drive.js +0 -247
- package/dist/tools/runtime-journey-drive.js.map +0 -1
- package/dist/tools/scope.d.ts +0 -45
- package/dist/tools/scope.d.ts.map +0 -1
- package/dist/tools/scope.js +0 -186
- package/dist/tools/scope.js.map +0 -1
- package/dist/tools/similar-incidents.d.ts +0 -43
- package/dist/tools/similar-incidents.d.ts.map +0 -1
- package/dist/tools/similar-incidents.js +0 -179
- package/dist/tools/similar-incidents.js.map +0 -1
- package/dist/tools/validate.d.ts +0 -133
- package/dist/tools/validate.d.ts.map +0 -1
- package/dist/tools/validate.js +0 -442
- package/dist/tools/validate.js.map +0 -1
- package/dist/tools/verb.d.ts +0 -46
- package/dist/tools/verb.d.ts.map +0 -1
- package/dist/tools/verb.js +0 -78
- package/dist/tools/verb.js.map +0 -1
- package/dist/tools/verification-status.d.ts +0 -38
- package/dist/tools/verification-status.d.ts.map +0 -1
- package/dist/tools/verification-status.js +0 -203
- package/dist/tools/verification-status.js.map +0 -1
- package/dist/tools/verify-claim.d.ts +0 -29
- package/dist/tools/verify-claim.d.ts.map +0 -1
- package/dist/tools/verify-claim.js +0 -220
- package/dist/tools/verify-claim.js.map +0 -1
- package/dist/tools/workspace.d.ts +0 -28
- package/dist/tools/workspace.d.ts.map +0 -1
- package/dist/tools/workspace.js +0 -101
- package/dist/tools/workspace.js.map +0 -1
- package/dist/transport.d.ts +0 -32
- package/dist/transport.d.ts.map +0 -1
- package/dist/transport.js +0 -85
- package/dist/transport.js.map +0 -1
- package/dist/workspace-index.d.ts +0 -164
- package/dist/workspace-index.d.ts.map +0 -1
- package/dist/workspace-index.js +0 -381
- package/dist/workspace-index.js.map +0 -1
package/dist/tools/pre-push.js
DELETED
|
@@ -1,416 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `pre_push` — one call where a developer about to push would otherwise make four.
|
|
3
|
-
*
|
|
4
|
-
* The UAT's own verdict was that in agentic use the gap is composition, not
|
|
5
|
-
* correctness: `scope`, `pr_analysis`, `contracts` and `validate` each answer
|
|
6
|
-
* well, and nothing puts them together at the moment someone actually wants
|
|
7
|
-
* them together. This is that composition, under the tightest budget the
|
|
8
|
-
* scoping tiers define.
|
|
9
|
-
*
|
|
10
|
-
* ## What "under the pre-push tier" actually means, per constituent
|
|
11
|
-
*
|
|
12
|
-
* The plan this comes from said the tier was "honoured by `scope`, `pr_analysis`
|
|
13
|
-
* and `contracts`". Two of those are true and the third is not, and the
|
|
14
|
-
* difference decides what this tool can pass down:
|
|
15
|
-
*
|
|
16
|
-
* - `scope` and `pr_analysis` take a `trigger`, and apply
|
|
17
|
-
* `NODE_BUDGETS["pre-push"]` (200 nodes) to their traversal. Passed straight
|
|
18
|
-
* through.
|
|
19
|
-
* - `contracts` has **no `trigger` and no node budget**, because it does not
|
|
20
|
-
* traverse — it compares every endpoint in the graph. Its expensive half is
|
|
21
|
-
* the shape comparison, and its own schema already names the answer:
|
|
22
|
-
* `pathsOnly` is "the honest choice for a pre-push run". So that is what the
|
|
23
|
-
* tier means here, and this tool sets it.
|
|
24
|
-
* - `validate` has no traversal budget either; it is bounded by `maxFindings`,
|
|
25
|
-
* which this tool tightens rather than leaving at its default 25.
|
|
26
|
-
*
|
|
27
|
-
* ## Why findings are grouped by source and not merged into one ranking
|
|
28
|
-
*
|
|
29
|
-
* A single global ranking would need to say that a contract mismatch outranks
|
|
30
|
-
* an unset environment variable, or the reverse. Descry has no model that
|
|
31
|
-
* supports either claim, and inventing one would be a judgement presented as a
|
|
32
|
-
* measurement — the same reason `contracts` ranks by evidence strength rather
|
|
33
|
-
* than severity. So each source contributes its own top few, and the envelope
|
|
34
|
-
* says plainly that the sources are not ranked against each other.
|
|
35
|
-
*
|
|
36
|
-
* That is still one call, one envelope, and a short read. It just does not
|
|
37
|
-
* pretend to a comparison nobody has made.
|
|
38
|
-
*
|
|
39
|
-
* ## Blocking versus informational
|
|
40
|
-
*
|
|
41
|
-
* `blockingTotal` counts `contracts` and `validate` findings only, and — since
|
|
42
|
-
* UAT round 3, Suggestion 6 — only the ones each tool's own `claim` field
|
|
43
|
-
* marks a `defect`. `scope` and `pr_analysis` answer "what does this change
|
|
44
|
-
* touch" — real, useful, and not a defect, so counting them would make every
|
|
45
|
-
* change with a blast radius look like a failure. A `lead` (`ROUTE_NOT_CALLED`,
|
|
46
|
-
* `SET_BUT_UNDOCUMENTED`) is worth a look but is not provable from the graph
|
|
47
|
-
* alone, so it is counted separately in `leadTotal` rather than folded into
|
|
48
|
-
* the number a git hook branches on. `descry check` exits non-zero on
|
|
49
|
-
* `blockingTotal`, which is why the line has to be drawn here rather than
|
|
50
|
-
* left to the caller.
|
|
51
|
-
*
|
|
52
|
-
* ## Scoped to what you are pushing
|
|
53
|
-
*
|
|
54
|
-
* UAT round 3, B11. `contracts` did not receive the `files` this tool was
|
|
55
|
-
* called with, so `blockingTotal` counted the repository's entire standing
|
|
56
|
-
* backlog rather than the change being pushed — 15 pre-existing
|
|
57
|
-
* `ROUTE_NOT_CALLED` findings for unrelated paths, on a push touching three
|
|
58
|
-
* unrelated files. `contracts` now takes the same `files` this tool was
|
|
59
|
-
* given (it already accepted `paths`, a different axis — a URL template
|
|
60
|
-
* substring, not a source file), so both blocking sources answer about the
|
|
61
|
-
* files in front of the developer. `validate` already took `files`; only the
|
|
62
|
-
* threading into `contracts` was missing.
|
|
63
|
-
*
|
|
64
|
-
* ## Class and tier
|
|
65
|
-
*
|
|
66
|
-
* `read` — it runs four read tools and writes nothing. `evidence` — it reports
|
|
67
|
-
* what those four found and draws no conclusion of its own.
|
|
68
|
-
*/
|
|
69
|
-
import { NODE_BUDGETS, uncommittedAmong } from "@descryy/core";
|
|
70
|
-
import { contractsTool } from "./contracts.js";
|
|
71
|
-
import { answer, optionalBoolean, optionalEnum, optionalInteger, optionalString, optionalStringArray, ToolInputError, } from "./kit.js";
|
|
72
|
-
import { prAnalysisTool } from "./pr-analysis.js";
|
|
73
|
-
import { scopeTool } from "./scope.js";
|
|
74
|
-
import { collectValidateFindings, validateTool } from "./validate.js";
|
|
75
|
-
/** How many items each source contributes to the envelope. Matches `PROMINENCE_CUTOFFS.top`. */
|
|
76
|
-
const PER_SOURCE = 3;
|
|
77
|
-
/** `validate`'s own default is 25; a blocked developer reads far fewer. */
|
|
78
|
-
const VALIDATE_MAX_FINDINGS = 10;
|
|
79
|
-
const WORKING_TREE_SCOPES = ["unstaged", "staged", "all"];
|
|
80
|
-
const SCHEMA = {
|
|
81
|
-
type: "object",
|
|
82
|
-
properties: {
|
|
83
|
-
files: {
|
|
84
|
-
type: "array",
|
|
85
|
-
items: { type: "string" },
|
|
86
|
-
description: "Repository-relative paths you are about to push. These seed the blast radius and scope " +
|
|
87
|
-
"the environment check. Required — without them there is nothing to be pre-push about.",
|
|
88
|
-
},
|
|
89
|
-
base: {
|
|
90
|
-
type: "string",
|
|
91
|
-
description: "Git ref to compare against, three-dot, for the pr_analysis section. Mutually exclusive " +
|
|
92
|
-
"with \"workingTree\" — pass one or neither, never both. Without either, pr_analysis has no " +
|
|
93
|
-
"defensible default and is reported as refused; the other three sections still run.",
|
|
94
|
-
},
|
|
95
|
-
workingTree: {
|
|
96
|
-
type: "string",
|
|
97
|
-
enum: [...WORKING_TREE_SCOPES],
|
|
98
|
-
description: "Forwarded to the pr_analysis section: review it against the working tree as it stands, " +
|
|
99
|
-
"uncommitted, rather than a ref range — precisely the change set a pre-push gate exists to " +
|
|
100
|
-
"check. \"all\" is staged and unstaged together. Mutually exclusive with \"base\" — pass one " +
|
|
101
|
-
"or neither, never both. Unlike \"base\", this is never guessed on your behalf either: with " +
|
|
102
|
-
"neither given, pr_analysis is reported as refused, same as before.",
|
|
103
|
-
},
|
|
104
|
-
includeUntracked: {
|
|
105
|
-
type: "boolean",
|
|
106
|
-
description: "With \"workingTree\", forwarded to the pr_analysis section to include files git has never " +
|
|
107
|
-
"seen. On by default, matching pr_analysis's own default. Ignored without \"workingTree\".",
|
|
108
|
-
},
|
|
109
|
-
perSource: {
|
|
110
|
-
type: "integer",
|
|
111
|
-
minimum: 1,
|
|
112
|
-
description: `How many items each source contributes. Default ${PER_SOURCE}.`,
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
required: ["files"],
|
|
116
|
-
additionalProperties: false,
|
|
117
|
-
};
|
|
118
|
-
function unwrap(reply) {
|
|
119
|
-
return {
|
|
120
|
-
state: reply.state ?? "ok",
|
|
121
|
-
headline: reply.headline,
|
|
122
|
-
notes: reply.result.notes,
|
|
123
|
-
data: (reply.result.data ?? {}),
|
|
124
|
-
resolutionFloor: reply.result.stamp.resolutionFloor,
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
function listOf(data, key) {
|
|
128
|
-
const value = data[key];
|
|
129
|
-
return Array.isArray(value) ? value : [];
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* A finding's own claim, defaulting to `defect` when it carries none.
|
|
133
|
-
*
|
|
134
|
-
* The default is deliberate and it is the safe direction: a source that has not
|
|
135
|
-
* yet been taught the distinction has its findings counted as fault claims, so
|
|
136
|
-
* adding a check can never silently stop blocking a push. The opposite default
|
|
137
|
-
* would turn every un-migrated source into a source of leads overnight.
|
|
138
|
-
*/
|
|
139
|
-
function claimOf(item) {
|
|
140
|
-
return typeof item === "object" &&
|
|
141
|
-
item !== null &&
|
|
142
|
-
item["claim"] === "lead"
|
|
143
|
-
? "lead"
|
|
144
|
-
: "defect";
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* The leading clause, when the coverage section is about a different change set.
|
|
148
|
-
*
|
|
149
|
-
* **First, not in a footnote.** This mismatch has always been disclosed, and
|
|
150
|
-
* the disclosure sat underneath a headline and a section total that both read
|
|
151
|
-
* as if they described the files passed. A reader who stops at the headline —
|
|
152
|
-
* which is what a headline is for — got a confident sentence about the wrong
|
|
153
|
-
* work. Ordering is the whole fix.
|
|
154
|
-
*
|
|
155
|
-
* Empty when it does not apply, because a caveat printed on every run is one a
|
|
156
|
-
* reader learns to skip past on the run where it matters.
|
|
157
|
-
*/
|
|
158
|
-
function coverageWarning(files, coverage) {
|
|
159
|
-
if (coverage === null || coverage.uncommitted.length === 0)
|
|
160
|
-
return "";
|
|
161
|
-
const n = coverage.uncommitted.length;
|
|
162
|
-
return (`${n} of ${files.length} file(s) are uncommitted, so the pr_analysis section (${coverage.describes}) ` +
|
|
163
|
-
"does not describe them. " +
|
|
164
|
-
"The other three sections describe the files you passed. ");
|
|
165
|
-
}
|
|
166
|
-
async function run(args, ctx) {
|
|
167
|
-
const files = optionalStringArray(args, "files") ?? [];
|
|
168
|
-
let coverage = null;
|
|
169
|
-
const perSource = optionalInteger(args, "perSource", 1) ?? PER_SOURCE;
|
|
170
|
-
const baseRef = optionalString(args, "base");
|
|
171
|
-
const workingTreeArg = optionalEnum(args, "workingTree", WORKING_TREE_SCOPES);
|
|
172
|
-
const includeUntracked = optionalBoolean(args, "includeUntracked");
|
|
173
|
-
// Validated at this tool's own boundary, before any section is dispatched.
|
|
174
|
-
// pr_analysis enforces the identical rule, but letting it throw from inside
|
|
175
|
-
// a section call would turn one bad argument combination into a "failed"
|
|
176
|
-
// envelope over all four constituents, when the actual problem is nothing
|
|
177
|
-
// any of scope/contracts/validate had a chance to answer about — it never
|
|
178
|
-
// got that far.
|
|
179
|
-
if (baseRef !== undefined && workingTreeArg !== undefined) {
|
|
180
|
-
throw new ToolInputError('"base" and "workingTree" are mutually exclusive, for pr_analysis just as much as here — pass ' +
|
|
181
|
-
"one or neither, never both.");
|
|
182
|
-
}
|
|
183
|
-
const base = ctx.session.provider().baseStamp();
|
|
184
|
-
const nodeBudget = NODE_BUDGETS["pre-push"];
|
|
185
|
-
const notes = [
|
|
186
|
-
"Four tools in one call: scope, pr_analysis, contracts and validate, under the pre-push node " +
|
|
187
|
-
`budget (${nodeBudget}). Each still answers on its own; this composes them for the moment ` +
|
|
188
|
-
"someone is about to push.",
|
|
189
|
-
"Sources are NOT ranked against each other. Whether a contract mismatch outranks an unset " +
|
|
190
|
-
"environment variable is a judgement Descry has no model for, so each source contributes its " +
|
|
191
|
-
"own top few and the totals say what they were selected from.",
|
|
192
|
-
"blockingTotal counts contracts and validate findings claimed as defects only — see claim on " +
|
|
193
|
-
"each finding. scope and pr_analysis answer what a change touches, which is not a defect, and " +
|
|
194
|
-
"a lead (worth a look, not provable from the graph alone) is counted separately in leadTotal " +
|
|
195
|
-
"rather than folded into the number a hook branches on.",
|
|
196
|
-
];
|
|
197
|
-
if (files.length === 0) {
|
|
198
|
-
return answer({
|
|
199
|
-
headline: "No files were named, so there is nothing to check before a push.",
|
|
200
|
-
state: "refused",
|
|
201
|
-
nameLevel: true,
|
|
202
|
-
resolutionFloor: 0,
|
|
203
|
-
commitSha: base.commitSha,
|
|
204
|
-
graphBuiltAt: base.graphBuiltAt,
|
|
205
|
-
irSchemaVersion: base.irSchemaVersion,
|
|
206
|
-
commitSpread: base.commitSpread,
|
|
207
|
-
repoCount: base.repoCount,
|
|
208
|
-
notes,
|
|
209
|
-
data: { files: [], sections: [], blockingTotal: 0, leadTotal: 0, nodeBudget, coverage: null },
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
// Sequential rather than concurrent, deliberately: these share one SQLite
|
|
213
|
-
// connection through the session, and the driver is synchronous. Racing them
|
|
214
|
-
// would buy nothing and interleave progress messages into nonsense.
|
|
215
|
-
const sections = [];
|
|
216
|
-
const collectedNotes = [];
|
|
217
|
-
// The composite's floor is the weakest of whatever actually ran. Reporting
|
|
218
|
-
// the strongest, or a default, would let one well-resolved section vouch for
|
|
219
|
-
// three that were not -- the same leaked-default failure this repository's
|
|
220
|
-
// own UAT caught on a refusal path.
|
|
221
|
-
const floors = [];
|
|
222
|
-
const runOne = async (source, tool, toolArgs, pick, claimsFaults, claimOf = () => "defect") => {
|
|
223
|
-
ctx.progress(`Running ${source}`);
|
|
224
|
-
let sub;
|
|
225
|
-
try {
|
|
226
|
-
sub = unwrap(await tool.run(toolArgs, ctx));
|
|
227
|
-
}
|
|
228
|
-
catch (error) {
|
|
229
|
-
// One constituent failing must not take the other three with it: a
|
|
230
|
-
// developer mid-push is better served by three answers and a named gap
|
|
231
|
-
// than by nothing at all.
|
|
232
|
-
sections.push({
|
|
233
|
-
source,
|
|
234
|
-
state: "failed",
|
|
235
|
-
total: 0,
|
|
236
|
-
shown: [],
|
|
237
|
-
claimsFaults,
|
|
238
|
-
defects: 0,
|
|
239
|
-
leads: 0,
|
|
240
|
-
headline: `${source} failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
241
|
-
});
|
|
242
|
-
return null;
|
|
243
|
-
}
|
|
244
|
-
floors.push(sub.resolutionFloor);
|
|
245
|
-
const items = pick(sub.data);
|
|
246
|
-
// A source that does not claim anything is wrong contributes to neither
|
|
247
|
-
// count, whatever it found — the split is about fault claims, and `scope`
|
|
248
|
-
// makes none.
|
|
249
|
-
const leads = claimsFaults ? items.filter((item) => claimOf(item) === "lead").length : 0;
|
|
250
|
-
const defects = claimsFaults ? items.length - leads : 0;
|
|
251
|
-
// A fault-claiming source's headline is regenerated from what this section
|
|
252
|
-
// actually kept, never borrowed from the sub-call's own reply. `validate`
|
|
253
|
-
// publishes five separate finding arrays behind one headline; a picker
|
|
254
|
-
// that folds in fewer than five while keeping that headline verbatim ends
|
|
255
|
-
// up with a section total that contradicts the sentence sitting next to
|
|
256
|
-
// it — UAT phase 5 §4. A source that claims no faults (`scope`,
|
|
257
|
-
// `pr_analysis`) has no such count to contradict, so its own headline
|
|
258
|
-
// (blast radius, diff summary) is still the right one to show.
|
|
259
|
-
const headline = claimsFaults
|
|
260
|
-
? `${defects} defect(s), ${leads} lead(s) among ${items.length} finding(s) this section examined.`
|
|
261
|
-
: sub.headline;
|
|
262
|
-
sections.push({
|
|
263
|
-
source,
|
|
264
|
-
state: sub.state,
|
|
265
|
-
total: items.length,
|
|
266
|
-
shown: items.slice(0, perSource),
|
|
267
|
-
claimsFaults,
|
|
268
|
-
defects,
|
|
269
|
-
leads,
|
|
270
|
-
headline,
|
|
271
|
-
});
|
|
272
|
-
for (const note of sub.notes)
|
|
273
|
-
collectedNotes.push(`${source}: ${note}`);
|
|
274
|
-
return sub;
|
|
275
|
-
};
|
|
276
|
-
await runOne("scope", scopeTool, { files, trigger: "pre-push" }, (data) => listOf(data, "affected"), false);
|
|
277
|
-
if (baseRef === undefined && workingTreeArg === undefined) {
|
|
278
|
-
// Reported, not skipped silently, and not as a failure either: pr_analysis
|
|
279
|
-
// requires one of the two and deliberately refuses to invent either ("there
|
|
280
|
-
// is no defensible default base"). Borrowing this tool's own working-tree
|
|
281
|
-
// default would manufacture exactly the guess that tool declines to make —
|
|
282
|
-
// which is why "workingTree" unblocks this section only when the caller
|
|
283
|
-
// passes it explicitly, never as a fallback picked on their behalf.
|
|
284
|
-
sections.push({
|
|
285
|
-
source: "pr_analysis",
|
|
286
|
-
state: "refused",
|
|
287
|
-
total: 0,
|
|
288
|
-
shown: [],
|
|
289
|
-
claimsFaults: false,
|
|
290
|
-
defects: 0,
|
|
291
|
-
leads: 0,
|
|
292
|
-
headline: 'pr_analysis needs either "base" or "workingTree" to know what to diff, and has no default ' +
|
|
293
|
-
'for either. Pass one to include this section.',
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
else {
|
|
297
|
-
const subject = baseRef !== undefined ? `${baseRef}...HEAD` : `the working tree (${workingTreeArg})`;
|
|
298
|
-
// Stated because it is not obvious and it was not obvious in a real run:
|
|
299
|
-
// called with two files and a three-commit base, the envelope said "across
|
|
300
|
-
// 2 changed file(s)" while this section said "across 25". Both are right --
|
|
301
|
-
// pr_analysis takes no file list, by design, and derives its own from the
|
|
302
|
-
// diff (a ref range, or the working tree) -- but two sections describing
|
|
303
|
-
// different change sets side by side read as one answer about one change
|
|
304
|
-
// unless the reply says otherwise.
|
|
305
|
-
notes.push(`pr_analysis scopes itself from ${baseRef !== undefined ? "the base diff" : "the working tree"} ` +
|
|
306
|
-
`(${subject}), not from the files given here: it takes no file list, deliberately, because ` +
|
|
307
|
-
"the diff is what defines a change to review. So its section may describe a wider or " +
|
|
308
|
-
"narrower set of files than the other three, which use the list you passed.");
|
|
309
|
-
const pr = await runOne("pr_analysis", prAnalysisTool, baseRef !== undefined
|
|
310
|
-
? { base: baseRef, trigger: "pre-push" }
|
|
311
|
-
: {
|
|
312
|
-
workingTree: workingTreeArg,
|
|
313
|
-
trigger: "pre-push",
|
|
314
|
-
...(includeUntracked === undefined ? {} : { includeUntracked }),
|
|
315
|
-
}, (data) => listOf(data, "untested"), false);
|
|
316
|
-
if (pr !== null) {
|
|
317
|
-
// The comparison is against the list `pr_analysis` itself reports, not a
|
|
318
|
-
// second diff computed here. Two git calls answering the same question
|
|
319
|
-
// is how they come to disagree.
|
|
320
|
-
const inDiff = new Set(listOf(pr.data, "files").filter((f) => typeof f === "string"));
|
|
321
|
-
const outside = files.filter((file) => !inDiff.has(file));
|
|
322
|
-
// A failure here must not take the other three constituents with it —
|
|
323
|
-
// the rule this file already states for a constituent, applied to the
|
|
324
|
-
// caveat about one. Without the classification the reply still reports
|
|
325
|
-
// which files the coverage section did not describe; it just cannot say
|
|
326
|
-
// that the reason was timing.
|
|
327
|
-
let uncommitted = [];
|
|
328
|
-
try {
|
|
329
|
-
uncommitted = await uncommittedAmong(ctx.session.repoPath, outside);
|
|
330
|
-
}
|
|
331
|
-
catch (error) {
|
|
332
|
-
if (outside.length > 0) {
|
|
333
|
-
notes.push(`${outside.length} file(s) you passed are not in ${subject}, and git could ` +
|
|
334
|
-
`not be asked whether that is because they are uncommitted: ` +
|
|
335
|
-
`${error.message.trim()}. They are listed in coverage.filesOutsideDiff.`);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
coverage = {
|
|
339
|
-
describes: subject,
|
|
340
|
-
filesOutsideDiff: outside,
|
|
341
|
-
uncommitted,
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
await runOne("contracts", contractsTool,
|
|
346
|
-
// budget — see the module header. `files` is UAT round 3, B11: without it,
|
|
347
|
-
// contracts compared the whole graph and this section's total was the
|
|
348
|
-
// repository's standing backlog, not the change being pushed.
|
|
349
|
-
{ pathsOnly: true, files },
|
|
350
|
-
// shapeMismatches is always empty under pathsOnly, but folded in anyway
|
|
351
|
-
// rather than assumed empty — a future call that drops pathsOnly should
|
|
352
|
-
// not silently under-count defects here.
|
|
353
|
-
(data) => [...listOf(data, "findings"), ...listOf(data, "shapeMismatches")], true, claimOf);
|
|
354
|
-
await runOne("validate", validateTool, { files, maxFindings: VALIDATE_MAX_FINDINGS },
|
|
355
|
-
// `validate` publishes five finding arrays across its own payload — the
|
|
356
|
-
// top-level env array plus `rollback`, `attributeExistence`,
|
|
357
|
-
// `migrationIntegrity` and `ormRegistration` — because each check
|
|
358
|
-
// examines different evidence. Reading only `findings` here silently
|
|
359
|
-
// dropped the other four, including the two highest-confidence checks in
|
|
360
|
-
// the product (UAT phase 5 §4). `collectValidateFindings` is `validate`'s
|
|
361
|
-
// own enumeration of the five, so a sixth sub-check added there is
|
|
362
|
-
// inherited here automatically instead of requiring a second edit.
|
|
363
|
-
(data) => collectValidateFindings(data), true, claimOf);
|
|
364
|
-
// Each section already reports 0/0 for both when it does not claim faults
|
|
365
|
-
// (`claimsFaults: false`), so summing `defects`/`leads` across every section
|
|
366
|
-
// needs no separate filter — the split already happened when the section was
|
|
367
|
-
// built.
|
|
368
|
-
const blockingTotal = sections.reduce((sum, section) => sum + section.defects, 0);
|
|
369
|
-
const leadTotal = sections.reduce((sum, section) => sum + section.leads, 0);
|
|
370
|
-
const failed = sections.filter((section) => section.state === "failed");
|
|
371
|
-
if (failed.length > 0) {
|
|
372
|
-
notes.push(`${failed.length} of 4 constituent(s) failed and contributed nothing: ` +
|
|
373
|
-
`${failed.map((f) => f.source).join(", ")}. The remaining sections are complete; this ` +
|
|
374
|
-
"reply is not.");
|
|
375
|
-
}
|
|
376
|
-
return answer({
|
|
377
|
-
headline: coverageWarning(files, coverage) +
|
|
378
|
-
(blockingTotal === 0 && leadTotal === 0
|
|
379
|
-
? `No contract or environment findings across ${files.length} changed file(s).`
|
|
380
|
-
: `${blockingTotal} defect(s) and ${leadTotal} lead(s) across ${files.length} changed ` +
|
|
381
|
-
"file(s) — only the defects assert that something is wrong. See the contracts and " +
|
|
382
|
-
"validate sections."),
|
|
383
|
-
// `empty` is earned here: all four ran against a real graph and found
|
|
384
|
-
// nothing at all, blocking or not. A constituent that refused makes that
|
|
385
|
-
// untrue, so the state follows the weakest link rather than the happy
|
|
386
|
-
// path — and a lead is still something found, so it is `ok`, not `empty`.
|
|
387
|
-
state: failed.length > 0 ? "failed" : blockingTotal + leadTotal > 0 ? "ok" : "empty",
|
|
388
|
-
data: { files, sections, blockingTotal, leadTotal, nodeBudget, coverage },
|
|
389
|
-
resolutionFloor: (floors.length === 0 ? 0 : Math.min(...floors)),
|
|
390
|
-
nameLevel: true,
|
|
391
|
-
commitSha: base.commitSha,
|
|
392
|
-
graphBuiltAt: base.graphBuiltAt,
|
|
393
|
-
irSchemaVersion: base.irSchemaVersion,
|
|
394
|
-
commitSpread: base.commitSpread,
|
|
395
|
-
repoCount: base.repoCount,
|
|
396
|
-
notes: [...notes, ...collectedNotes],
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
export const prePushTool = {
|
|
400
|
-
name: "pre_push",
|
|
401
|
-
class: "read",
|
|
402
|
-
tier: "evidence",
|
|
403
|
-
version: "1.0.0",
|
|
404
|
-
title: "Everything worth knowing before you push, in one call",
|
|
405
|
-
description: "Runs scope, pr_analysis, contracts and validate together under the pre-push node budget and " +
|
|
406
|
-
"returns one short envelope: what your change touches, what it touches that has no test, which " +
|
|
407
|
-
"API contracts break, and which environment claims do not hold. Each source contributes its own " +
|
|
408
|
-
"top few — they are deliberately not ranked against each other, because Descry has no model for " +
|
|
409
|
-
"whether a contract mismatch outranks an unset variable. Both are scoped to the files you pass, " +
|
|
410
|
-
"not the repository's whole backlog. blockingTotal counts only defects (provable from the graph " +
|
|
411
|
-
"alone) from the two sources that report them, and is what a git hook should branch on; leads " +
|
|
412
|
-
"(worth a look, not provable alone) are counted separately in leadTotal.",
|
|
413
|
-
inputSchema: SCHEMA,
|
|
414
|
-
run,
|
|
415
|
-
};
|
|
416
|
-
//# sourceMappingURL=pre-push.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pre-push.js","sourceRoot":"","sources":["../../src/tools/pre-push.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAEH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,MAAM,EACN,eAAe,EACf,YAAY,EACZ,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,cAAc,GAGf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAqB,MAAM,eAAe,CAAC;AAGzF,gGAAgG;AAChG,MAAM,UAAU,GAAG,CAAC,CAAC;AAErB,2EAA2E;AAC3E,MAAM,qBAA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;CACJ,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `predict_reach` — RG-10's predict-then-propose, exposed. Given a node
|
|
3
|
-
* (typically a `DATABASE_COLUMN` a change touches, but any node
|
|
4
|
-
* `reachablePages` can walk from), asks the graph which `PAGE`/`COMPONENT`
|
|
5
|
-
* nodes the data can reach — `@descryy/core`'s `reachablePages`, a walk
|
|
6
|
-
* over `PROPAGATES_TO`/`READS`/`ASSIGNS`/`RETURNS`, crossing `USES_API`
|
|
7
|
-
* backward at an `API_ENDPOINT` — and, when it reaches at least one page,
|
|
8
|
-
* proposes a navigate-only journey via the same planner `propose_journey`
|
|
9
|
-
* uses (`../planner/propose-journey.ts`, unmodified, called through
|
|
10
|
-
* `../planner/predict-then-propose.ts`).
|
|
11
|
-
*
|
|
12
|
-
* **Never drives anything and never writes to a Finding.** The proposal
|
|
13
|
-
* this returns is a value in this reply, not an action: proving or
|
|
14
|
-
* disproving what it predicts is a human (or an agent acting on a human's
|
|
15
|
-
* behalf) driving the application for real — `browser_start_session`, the
|
|
16
|
-
* browser primitives, `browser_save_scenario` to commit what actually
|
|
17
|
-
* happened — and then recording the outcome against the finding that
|
|
18
|
-
* predicted it. That last step needs `packages/ir/src/finding.ts` and the
|
|
19
|
-
* finding funnel, both outside this lane's owned files, and is not
|
|
20
|
-
* performed here; see this tool's own `description` for the same
|
|
21
|
-
* disclosure surfaced to a caller.
|
|
22
|
-
*
|
|
23
|
-
* **`observedNodeIds` — RG-10's join, added by the pipeline-joins lane.**
|
|
24
|
-
* Optional, and still never a drive: when a caller supplies the graph node
|
|
25
|
-
* ids a REAL, already-accepted journey actually reached (read straight off
|
|
26
|
-
* `browser_run_scenario`'s own reply after that scenario was driven — the
|
|
27
|
-
* acceptance gate is `browser_run_scenario`'s own, unchanged and untouched
|
|
28
|
-
* here), this tool additionally reports which predicted pages that real
|
|
29
|
-
* drive proved and which it disproved
|
|
30
|
-
* (`../planner/predict-then-propose.ts#proveOrDisprove`). Omitted (the
|
|
31
|
-
* default), the reply is byte-for-byte what it was before this parameter
|
|
32
|
-
* existed.
|
|
33
|
-
*/
|
|
34
|
-
import { type ProvenReach } from "../planner/predict-then-propose.ts";
|
|
35
|
-
import type { JourneyCandidateNode } from "../planner/propose-journey.ts";
|
|
36
|
-
import type { Scenario } from "../scenarios/index.ts";
|
|
37
|
-
import { type BriefNode, type NodeCandidates, type ToolDefinition } from "./kit.ts";
|
|
38
|
-
export interface PredictReachReport {
|
|
39
|
-
readonly from: BriefNode;
|
|
40
|
-
/** Every PAGE/COMPONENT node the walk reached. Empty means nothing was predicted — not that nothing depends on this node (see `notes`). */
|
|
41
|
-
readonly reachedPages: readonly BriefNode[];
|
|
42
|
-
/** Null iff `reachedPages` is empty. A value here is a proposal only — never driven, never saved, never written to a Finding by this tool. */
|
|
43
|
-
readonly proposal: {
|
|
44
|
-
readonly scenario: Scenario;
|
|
45
|
-
readonly reachedNotProposed: readonly JourneyCandidateNode[];
|
|
46
|
-
} | null;
|
|
47
|
-
/**
|
|
48
|
-
* RG-10's join — present only when the caller supplied `observedNodeIds`,
|
|
49
|
-
* i.e. evidence from a journey that was ALREADY driven for real and
|
|
50
|
-
* accepted. `null` when omitted: "not checked", never a silent false
|
|
51
|
-
* disproof of every predicted page.
|
|
52
|
-
*/
|
|
53
|
-
readonly proof: ProvenReach | null;
|
|
54
|
-
}
|
|
55
|
-
export type PredictReachData = PredictReachReport | NodeCandidates;
|
|
56
|
-
export declare const predictReachTool: ToolDefinition;
|
|
57
|
-
//# sourceMappingURL=predict-reach.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"predict-reach.d.ts","sourceRoot":"","sources":["../../src/tools/predict-reach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAuC,KAAK,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAC3G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAOL,KAAK,SAAS,EACd,KAAK,cAAc,EAEnB,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAIlB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,2IAA2I;IAC3I,QAAQ,CAAC,YAAY,EAAE,SAAS,SAAS,EAAE,CAAC;IAC5C,8IAA8I;IAC9I,QAAQ,CAAC,QAAQ,EAAE;QACjB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAC5B,QAAQ,CAAC,kBAAkB,EAAE,SAAS,oBAAoB,EAAE,CAAC;KAC9D,GAAG,IAAI,CAAC;IACT;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAsHnE,eAAO,MAAM,gBAAgB,EAAE,cAmB9B,CAAC"}
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `predict_reach` — RG-10's predict-then-propose, exposed. Given a node
|
|
3
|
-
* (typically a `DATABASE_COLUMN` a change touches, but any node
|
|
4
|
-
* `reachablePages` can walk from), asks the graph which `PAGE`/`COMPONENT`
|
|
5
|
-
* nodes the data can reach — `@descryy/core`'s `reachablePages`, a walk
|
|
6
|
-
* over `PROPAGATES_TO`/`READS`/`ASSIGNS`/`RETURNS`, crossing `USES_API`
|
|
7
|
-
* backward at an `API_ENDPOINT` — and, when it reaches at least one page,
|
|
8
|
-
* proposes a navigate-only journey via the same planner `propose_journey`
|
|
9
|
-
* uses (`../planner/propose-journey.ts`, unmodified, called through
|
|
10
|
-
* `../planner/predict-then-propose.ts`).
|
|
11
|
-
*
|
|
12
|
-
* **Never drives anything and never writes to a Finding.** The proposal
|
|
13
|
-
* this returns is a value in this reply, not an action: proving or
|
|
14
|
-
* disproving what it predicts is a human (or an agent acting on a human's
|
|
15
|
-
* behalf) driving the application for real — `browser_start_session`, the
|
|
16
|
-
* browser primitives, `browser_save_scenario` to commit what actually
|
|
17
|
-
* happened — and then recording the outcome against the finding that
|
|
18
|
-
* predicted it. That last step needs `packages/ir/src/finding.ts` and the
|
|
19
|
-
* finding funnel, both outside this lane's owned files, and is not
|
|
20
|
-
* performed here; see this tool's own `description` for the same
|
|
21
|
-
* disclosure surfaced to a caller.
|
|
22
|
-
*
|
|
23
|
-
* **`observedNodeIds` — RG-10's join, added by the pipeline-joins lane.**
|
|
24
|
-
* Optional, and still never a drive: when a caller supplies the graph node
|
|
25
|
-
* ids a REAL, already-accepted journey actually reached (read straight off
|
|
26
|
-
* `browser_run_scenario`'s own reply after that scenario was driven — the
|
|
27
|
-
* acceptance gate is `browser_run_scenario`'s own, unchanged and untouched
|
|
28
|
-
* here), this tool additionally reports which predicted pages that real
|
|
29
|
-
* drive proved and which it disproved
|
|
30
|
-
* (`../planner/predict-then-propose.ts#proveOrDisprove`). Omitted (the
|
|
31
|
-
* default), the reply is byte-for-byte what it was before this parameter
|
|
32
|
-
* existed.
|
|
33
|
-
*/
|
|
34
|
-
import { predictThenPropose, proveOrDisprove } from "../planner/predict-then-propose.js";
|
|
35
|
-
import { answer, briefNode, requiredString, optionalString, optionalStringArray, ToolInputError, } from "./kit.js";
|
|
36
|
-
import { resolveOneNode } from "./lookup.js";
|
|
37
|
-
const SCHEMA = {
|
|
38
|
-
type: "object",
|
|
39
|
-
properties: {
|
|
40
|
-
nodeId: { type: "string", description: "Graph node id to predict reach from — typically a DATABASE_COLUMN." },
|
|
41
|
-
symbol: {
|
|
42
|
-
type: "string",
|
|
43
|
-
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\".",
|
|
44
|
-
},
|
|
45
|
-
file: { type: "string", description: "Repository-relative path, to disambiguate \"symbol\" or to start from a file." },
|
|
46
|
-
targetUrl: {
|
|
47
|
-
type: "string",
|
|
48
|
-
description: "REQUIRED. The running application's base URL, exactly as propose_journey takes it. Never inferred " +
|
|
49
|
-
"— the graph has no notion of where an application is currently serving.",
|
|
50
|
-
},
|
|
51
|
-
name: { type: "string", description: "What to call the proposed scenario if it is accepted. Defaults to \"predicted-journey\"." },
|
|
52
|
-
observedNodeIds: {
|
|
53
|
-
type: "array",
|
|
54
|
-
items: { type: "string" },
|
|
55
|
-
description: "Optional. Graph node ids a REAL, already-driven, already-accepted journey actually reached — e.g. " +
|
|
56
|
-
"read off browser_run_scenario's own reply after driving the accepted scenario for real. When given, " +
|
|
57
|
-
"this call additionally reports which predicted pages that real drive proved and which it disproved. " +
|
|
58
|
-
"This tool still never drives anything itself: supplying this argument only compares evidence you " +
|
|
59
|
-
"already collected against what was predicted.",
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
required: ["targetUrl"],
|
|
63
|
-
additionalProperties: false,
|
|
64
|
-
};
|
|
65
|
-
async function run(args, ctx) {
|
|
66
|
-
const nodeIdArg = optionalString(args, "nodeId");
|
|
67
|
-
const symbol = optionalString(args, "symbol");
|
|
68
|
-
const file = optionalString(args, "file");
|
|
69
|
-
const targetUrl = requiredString(args, "targetUrl");
|
|
70
|
-
const name = optionalString(args, "name") ?? "predicted-journey";
|
|
71
|
-
const observedNodeIds = optionalStringArray(args, "observedNodeIds");
|
|
72
|
-
if (nodeIdArg === undefined && symbol === undefined && file === undefined) {
|
|
73
|
-
throw new ToolInputError('give one of "nodeId", "symbol" or "file"');
|
|
74
|
-
}
|
|
75
|
-
const provider = ctx.session.provider();
|
|
76
|
-
const found = resolveOneNode(ctx.session, { nodeId: nodeIdArg, symbol, file });
|
|
77
|
-
const base = provider.baseStamp();
|
|
78
|
-
if (found.node === null) {
|
|
79
|
-
return {
|
|
80
|
-
result: {
|
|
81
|
-
data: { candidates: found.candidates.map(briefNode) },
|
|
82
|
-
stamp: { ...base, resolutionFloor: 0 },
|
|
83
|
-
truncated: false,
|
|
84
|
-
notes: found.notes,
|
|
85
|
-
},
|
|
86
|
-
nameLevel: true,
|
|
87
|
-
state: "refused",
|
|
88
|
-
headline: found.headline,
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
ctx.progress(`Predicting which pages ${found.node.name} can reach`);
|
|
92
|
-
const predicted = predictThenPropose(provider, found.node.id, {
|
|
93
|
-
targetUrl,
|
|
94
|
-
name,
|
|
95
|
-
savedAtCommit: base.commitSha ?? "",
|
|
96
|
-
});
|
|
97
|
-
const empty = { from: briefNode(found.node), reachedPages: [], proposal: null, proof: null };
|
|
98
|
-
const notes = [...found.notes, ...predicted.notes];
|
|
99
|
-
if (predicted.proposal === null) {
|
|
100
|
-
return answer({
|
|
101
|
-
headline: `${found.node.name} reaches no PAGE or COMPONENT this graph can walk to. Not a claim it reaches none in the running application — see notes.`,
|
|
102
|
-
state: "empty",
|
|
103
|
-
nameLevel: true,
|
|
104
|
-
resolutionFloor: 0,
|
|
105
|
-
commitSha: base.commitSha,
|
|
106
|
-
graphBuiltAt: base.graphBuiltAt,
|
|
107
|
-
irSchemaVersion: base.irSchemaVersion,
|
|
108
|
-
commitSpread: base.commitSpread,
|
|
109
|
-
repoCount: base.repoCount,
|
|
110
|
-
notes,
|
|
111
|
-
data: empty,
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
const proof = observedNodeIds === undefined ? null : proveOrDisprove(predicted, { visitedNodeIds: observedNodeIds });
|
|
115
|
-
return answer({
|
|
116
|
-
headline: `Predicted ${predicted.reachedPages.length} page/component reached from ${found.node.name}. Proposed ` +
|
|
117
|
-
`${predicted.proposal.scenario.steps.length} navigate step(s) — unaccepted, unsaved, undriven. Proving or ` +
|
|
118
|
-
"disproving this prediction is a human act: drive the app for real and save what happened." +
|
|
119
|
-
(proof === null
|
|
120
|
-
? ""
|
|
121
|
-
: ` Against the observed evidence supplied: ${proof.proven.length} proven, ${proof.disproven.length} disproven.`),
|
|
122
|
-
// Name-level throughout: a route path is read off a node's qualified name (propose_journey's own cap),
|
|
123
|
-
// never off a type-checked shape.
|
|
124
|
-
resolutionFloor: 0,
|
|
125
|
-
nameLevel: true,
|
|
126
|
-
commitSha: base.commitSha,
|
|
127
|
-
graphBuiltAt: base.graphBuiltAt,
|
|
128
|
-
irSchemaVersion: base.irSchemaVersion,
|
|
129
|
-
commitSpread: base.commitSpread,
|
|
130
|
-
repoCount: base.repoCount,
|
|
131
|
-
notes,
|
|
132
|
-
data: {
|
|
133
|
-
from: briefNode(found.node),
|
|
134
|
-
reachedPages: predicted.reachedPages.map((n) => ({ id: n.id, type: n.type, name: n.name, resolution: 0 })),
|
|
135
|
-
proposal: { scenario: predicted.proposal.scenario, reachedNotProposed: predicted.proposal.reachedNotProposed },
|
|
136
|
-
proof,
|
|
137
|
-
},
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
export const predictReachTool = {
|
|
141
|
-
name: "predict_reach",
|
|
142
|
-
class: "read",
|
|
143
|
-
tier: "evidence",
|
|
144
|
-
version: "1.0.0",
|
|
145
|
-
title: "Predict which pages a data change reaches, and propose a journey to review it",
|
|
146
|
-
description: "RG-10: given a node — typically a DATABASE_COLUMN — walks PROPAGATES_TO/READS/ASSIGNS/RETURNS, crossing " +
|
|
147
|
-
"USES_API backward at an API_ENDPOINT, to whatever PAGE/COMPONENT nodes the data can reach (the existing " +
|
|
148
|
-
"reachablePages traversal), and proposes a navigate-only journey to them via the same planner " +
|
|
149
|
-
"propose_journey uses. This tool never drives a browser and never writes to a Finding: the proposal is a " +
|
|
150
|
-
"value in this reply, not an action. Proving or disproving the prediction is a human (or an agent acting " +
|
|
151
|
-
"on a human's behalf) driving the application for real and saving what happened with " +
|
|
152
|
-
"browser_save_scenario. Once that real drive has happened, pass its evidence back in as " +
|
|
153
|
-
"observedNodeIds and this same call reports which predicted pages it proved and which it disproved — " +
|
|
154
|
-
"still never driving anything itself. Recording that outcome against the finding that predicted it is a " +
|
|
155
|
-
"further step this tool does not take.",
|
|
156
|
-
inputSchema: SCHEMA,
|
|
157
|
-
run,
|
|
158
|
-
};
|
|
159
|
-
//# sourceMappingURL=predict-reach.js.map
|