@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
package/dist/tools/kit.d.ts
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
/** What every tool is handed and returns. A tool produces a `ToolAnswer`, never content —
|
|
2
|
-
* `render.ts` alone turns it into a reply, attaching the staleness stamp, reliability cap and
|
|
3
|
-
* disclosures. A tool cannot ship a result with the caveats stripped off. */
|
|
4
|
-
import type { ResolutionLevel, ResultState, ToolClass } from "@descryy/ir";
|
|
5
|
-
import type { ReplyFit, ToolAnswer, ToolTier, TruncationDetail, WitnessedEvidence } from "../render.ts";
|
|
6
|
-
import type { Session } from "../session.ts";
|
|
7
|
-
/** Streaming narration, §22.2. A no-op when the client sent no progress token; tools call it
|
|
8
|
-
* unconditionally and leave "is anyone listening" to the caller. */
|
|
9
|
-
export type Progress = (message: string, current?: number, total?: number) => void;
|
|
10
|
-
export interface ToolContext {
|
|
11
|
-
readonly session: Session;
|
|
12
|
-
readonly progress: Progress;
|
|
13
|
-
readonly signal: AbortSignal;
|
|
14
|
-
}
|
|
15
|
-
export interface ToolDefinition {
|
|
16
|
-
readonly name: string;
|
|
17
|
-
readonly title: string;
|
|
18
|
-
readonly description: string;
|
|
19
|
-
/** DEC-278's three classes (`ai-tool-contract.md` §8). Not "does it write bytes" but "can this
|
|
20
|
-
* change a later finding unannounced" — twelve of the registry's 34 tools are `action`, gated
|
|
21
|
-
* by §4's handshake, capped at reliability B by DEC-223. No default: unset silently treats
|
|
22
|
-
* writes as pure. */
|
|
23
|
-
readonly class: ToolClass;
|
|
24
|
-
/** MK-5 — does the output state a conclusion, or just a graph fact? Required, undefaulted, same
|
|
25
|
-
* reasoning as `class`. See `ToolTier` in `../render.ts` for why the type lives there. */
|
|
26
|
-
readonly tier: ToolTier;
|
|
27
|
-
/** Contract §6 rule 8. Starts at `"1.0.0"`; a future bump invalidates golden investigations
|
|
28
|
-
* that depended on the old behaviour (`ai-layer-plan.md` §9 layer 4). */
|
|
29
|
-
readonly version: string;
|
|
30
|
-
readonly inputSchema: Record<string, unknown>;
|
|
31
|
-
run(args: Record<string, unknown>, ctx: ToolContext): Promise<ToolAnswer<unknown>>;
|
|
32
|
-
/** Required iff `class === "action"` (enforced in `action-handshake.ts` and
|
|
33
|
-
* `tool-classes.test.ts`, not by the type). Returns the "willDo" text, or `undefined` when this
|
|
34
|
-
* call has nothing to confirm (e.g. `questions` with no `answer`). */
|
|
35
|
-
describeAction?(args: Record<string, unknown>, ctx: ToolContext): string | undefined | Promise<string | undefined>;
|
|
36
|
-
/**
|
|
37
|
-
* The form of this call's arguments that may be kept — B1.
|
|
38
|
-
*
|
|
39
|
-
* `server.ts` records every completed call's arguments on the `Session` so
|
|
40
|
-
* `verify_claim` can check a citation against what a tool actually
|
|
41
|
-
* returned. That record lives for the life of the connection, and
|
|
42
|
-
* `browser_start_session` is the first tool whose arguments can carry a
|
|
43
|
-
* credential. A tool that takes one implements this and hands back a copy
|
|
44
|
-
* with the values replaced; every other tool leaves it undefined and is
|
|
45
|
-
* recorded verbatim, exactly as before.
|
|
46
|
-
*
|
|
47
|
-
* The tool's job rather than a generic pass in the server, deliberately:
|
|
48
|
-
* only the tool knows which of its arguments is a secret, and a
|
|
49
|
-
* server-side "looks sensitive" heuristic is the pattern-guessing this
|
|
50
|
-
* repo's own redactor already refuses to be.
|
|
51
|
-
*/
|
|
52
|
-
redactArgs?(args: Record<string, unknown>): Record<string, unknown>;
|
|
53
|
-
}
|
|
54
|
-
/** An argument the caller can fix — distinct from a thrown `Error` (a bug here). This becomes an
|
|
55
|
-
* `isError` result the agent can read and retry from; a bug becomes an unreadable JSON-RPC error. */
|
|
56
|
-
export declare class ToolInputError extends Error {
|
|
57
|
-
constructor(message: string);
|
|
58
|
-
}
|
|
59
|
-
export declare function optionalString(args: Record<string, unknown>, key: string): string | undefined;
|
|
60
|
-
export declare function requiredString(args: Record<string, unknown>, key: string): string;
|
|
61
|
-
export declare function optionalStringArray(args: Record<string, unknown>, key: string): readonly string[] | undefined;
|
|
62
|
-
export declare function optionalInteger(args: Record<string, unknown>, key: string, min: number): number | undefined;
|
|
63
|
-
export declare function optionalEnum<T extends string>(args: Record<string, unknown>, key: string, allowed: readonly T[]): T | undefined;
|
|
64
|
-
export declare function optionalBoolean(args: Record<string, unknown>, key: string): boolean | undefined;
|
|
65
|
-
/** Wraps data that did not come from the query layer in the same envelope — e.g. `analyze`, which
|
|
66
|
-
* writes rather than reads and has no `QueryResult`, so its reply still carries the same stamp. */
|
|
67
|
-
export declare function answer<T>(options: {
|
|
68
|
-
readonly headline: string;
|
|
69
|
-
readonly data: T;
|
|
70
|
-
readonly resolutionFloor: ResolutionLevel;
|
|
71
|
-
readonly commitSha: string | null;
|
|
72
|
-
readonly graphBuiltAt: number | null;
|
|
73
|
-
readonly irSchemaVersion: number;
|
|
74
|
-
readonly commitSpread: number;
|
|
75
|
-
readonly repoCount: number;
|
|
76
|
-
readonly notes: readonly string[];
|
|
77
|
-
readonly truncated?: boolean;
|
|
78
|
-
readonly truncatedDetail?: TruncationDetail;
|
|
79
|
-
readonly nameLevel: boolean;
|
|
80
|
-
/** One of the five result states (`ai-tool-contract.md` §1). Omitted means `"ok"`. */
|
|
81
|
-
readonly state?: ResultState;
|
|
82
|
-
/** §5.4 — see `render.ts`'s `ToolAnswer.refusalSummary` doc for which callers have one. */
|
|
83
|
-
readonly refusalSummary?: {
|
|
84
|
-
readonly count: number;
|
|
85
|
-
readonly exemplar: string;
|
|
86
|
-
readonly handle: string;
|
|
87
|
-
};
|
|
88
|
-
/** See `render.ts`'s `ToolAnswer.fitToBudget` — how this tool shrinks to the reply ceiling. */
|
|
89
|
-
readonly fitToBudget?: (budgetBytes: number) => ReplyFit<T>;
|
|
90
|
-
/** See `render.ts`'s `ToolAnswer.runtimeEvidence`. Set only by a tool that actually watched a
|
|
91
|
-
* running app; omitted everywhere else, including every refusal. */
|
|
92
|
-
readonly runtimeEvidence?: WitnessedEvidence;
|
|
93
|
-
}): ToolAnswer<T>;
|
|
94
|
-
/** An IR node as it appears in a reply. Optional fields are omitted, not `null`, keeping a
|
|
95
|
-
* 1,000-node reply affordable — callers test for presence. `language` passes through verbatim;
|
|
96
|
-
* nothing here reads or branches on it (rule 1 — no language name above the IR boundary). */
|
|
97
|
-
export interface BriefNode {
|
|
98
|
-
readonly id: string;
|
|
99
|
-
readonly type: string;
|
|
100
|
-
readonly name: string;
|
|
101
|
-
readonly file?: string;
|
|
102
|
-
/** Start line only — a reply carries where to look, not how much to read. */
|
|
103
|
-
readonly line?: number;
|
|
104
|
-
readonly language?: string;
|
|
105
|
-
readonly resolution: number;
|
|
106
|
-
}
|
|
107
|
-
/** Returned when a symbol/path/id resolved to nothing or to more than one thing (shared by
|
|
108
|
-
* `impact` and `propagation` via `resolveOneNode`): empty `candidates` means no match, two or
|
|
109
|
-
* more means ambiguous — one is impossible, that case resolves. */
|
|
110
|
-
export interface NodeCandidates {
|
|
111
|
-
readonly candidates: readonly BriefNode[];
|
|
112
|
-
}
|
|
113
|
-
/** Trim an IR node down to what an agent needs, so a 1,000-node reply stays readable. */
|
|
114
|
-
export declare function briefNode(node: {
|
|
115
|
-
id: string;
|
|
116
|
-
type: string;
|
|
117
|
-
name: string;
|
|
118
|
-
file: string | null;
|
|
119
|
-
range: {
|
|
120
|
-
startLine: number;
|
|
121
|
-
endLine: number;
|
|
122
|
-
} | null;
|
|
123
|
-
language: string | null;
|
|
124
|
-
resolution: number;
|
|
125
|
-
}): BriefNode;
|
|
126
|
-
/**
|
|
127
|
-
* Descry's own state inside this repository, which is not the developer's
|
|
128
|
-
* uncommitted change.
|
|
129
|
-
*
|
|
130
|
-
* ## Two paths, not one, and the second is the one that bit
|
|
131
|
-
*
|
|
132
|
-
* The first version derived this from the configured graph path alone. That is
|
|
133
|
-
* right for a single repository, where the graph sits in this repo's own
|
|
134
|
-
* `.descry/` — and wrong the moment two repositories share one graph, which is
|
|
135
|
-
* exactly what `link_workspace` produces:
|
|
136
|
-
*
|
|
137
|
-
* ```json
|
|
138
|
-
* // sherpa-backend/.descry/config.json
|
|
139
|
-
* "graph": "/home/…/sherpa-frontend/.descry/graph.db"
|
|
140
|
-
* ```
|
|
141
|
-
*
|
|
142
|
-
* The derived exclusion then pointed into the *other* repository, and this
|
|
143
|
-
* repository's own `.descry/config.json` was excluded by nothing. Measured on a
|
|
144
|
-
* real workspace: it was reported as the developer's uncommitted work. Not an
|
|
145
|
-
* edge case — every shared-graph workspace has it.
|
|
146
|
-
*
|
|
147
|
-
* `.descry/evidence.db` escaped only because that repository's `.gitignore`
|
|
148
|
-
* happened to carry `*.db`. **The exclusion must not depend on the user having
|
|
149
|
-
* gitignored anything**, which is what that near-miss shows: a tool's own state
|
|
150
|
-
* is excluded because it is the tool's, not because someone tidied up.
|
|
151
|
-
*
|
|
152
|
-
* ## Why the graph path is still consulted
|
|
153
|
-
*
|
|
154
|
-
* It is configurable, so it can be moved out of `.descry/` and stay inside the
|
|
155
|
-
* repository. A path outside the repository costs nothing to list — it is not
|
|
156
|
-
* in this working tree — and is kept rather than special-cased, because the
|
|
157
|
-
* test for "is this path inside this repo" is the kind that is subtly wrong on
|
|
158
|
-
* symlinks and relative paths.
|
|
159
|
-
*
|
|
160
|
-
* Returned as directory prefixes matched at a segment boundary by the git
|
|
161
|
-
* helpers, so `.descry` excludes `.descry/config.json` and leaves
|
|
162
|
-
* `src/.descryfile.py` alone.
|
|
163
|
-
*/
|
|
164
|
-
export declare function descryOwnState(graphPath: string): readonly string[];
|
|
165
|
-
//# sourceMappingURL=kit.d.ts.map
|
package/dist/tools/kit.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kit.d.ts","sourceRoot":"","sources":["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tB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;oEAEoE;AACpE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;CAC3C;AAED,yFAAyF;AACzF,wBAAgB,SAAS,CAAC,IAAI,EAAE;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACrD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,SAAS,CAUZ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAWnE"}
|
package/dist/tools/kit.js
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/** What every tool is handed and returns. A tool produces a `ToolAnswer`, never content —
|
|
2
|
-
* `render.ts` alone turns it into a reply, attaching the staleness stamp, reliability cap and
|
|
3
|
-
* disclosures. A tool cannot ship a result with the caveats stripped off. */
|
|
4
|
-
import { dirname } from "node:path";
|
|
5
|
-
import { CONFIG_RELATIVE_PATH } from "../session.js";
|
|
6
|
-
/** An argument the caller can fix — distinct from a thrown `Error` (a bug here). This becomes an
|
|
7
|
-
* `isError` result the agent can read and retry from; a bug becomes an unreadable JSON-RPC error. */
|
|
8
|
-
export class ToolInputError extends Error {
|
|
9
|
-
constructor(message) {
|
|
10
|
-
super(message);
|
|
11
|
-
this.name = "ToolInputError";
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
// Hand-written, not schema-validated: a validator would be a second source of truth for the
|
|
15
|
-
// schemas already declared to the client.
|
|
16
|
-
export function optionalString(args, key) {
|
|
17
|
-
const value = args[key];
|
|
18
|
-
if (value === undefined || value === null)
|
|
19
|
-
return undefined;
|
|
20
|
-
if (typeof value !== "string")
|
|
21
|
-
throw new ToolInputError(`"${key}" must be a string`);
|
|
22
|
-
return value;
|
|
23
|
-
}
|
|
24
|
-
export function requiredString(args, key) {
|
|
25
|
-
const value = optionalString(args, key);
|
|
26
|
-
if (value === undefined || value === "")
|
|
27
|
-
throw new ToolInputError(`"${key}" is required`);
|
|
28
|
-
return value;
|
|
29
|
-
}
|
|
30
|
-
export function optionalStringArray(args, key) {
|
|
31
|
-
const value = args[key];
|
|
32
|
-
if (value === undefined || value === null)
|
|
33
|
-
return undefined;
|
|
34
|
-
if (!Array.isArray(value) || value.some((v) => typeof v !== "string")) {
|
|
35
|
-
throw new ToolInputError(`"${key}" must be an array of strings`);
|
|
36
|
-
}
|
|
37
|
-
return value;
|
|
38
|
-
}
|
|
39
|
-
export function optionalInteger(args, key, min) {
|
|
40
|
-
const value = args[key];
|
|
41
|
-
if (value === undefined || value === null)
|
|
42
|
-
return undefined;
|
|
43
|
-
if (typeof value !== "number" || !Number.isInteger(value) || value < min) {
|
|
44
|
-
throw new ToolInputError(`"${key}" must be an integer of at least ${min}`);
|
|
45
|
-
}
|
|
46
|
-
return value;
|
|
47
|
-
}
|
|
48
|
-
export function optionalEnum(args, key, allowed) {
|
|
49
|
-
const value = optionalString(args, key);
|
|
50
|
-
if (value === undefined)
|
|
51
|
-
return undefined;
|
|
52
|
-
if (!allowed.includes(value)) {
|
|
53
|
-
throw new ToolInputError(`"${key}" must be one of: ${allowed.join(", ")}`);
|
|
54
|
-
}
|
|
55
|
-
return value;
|
|
56
|
-
}
|
|
57
|
-
export function optionalBoolean(args, key) {
|
|
58
|
-
const value = args[key];
|
|
59
|
-
if (value === undefined || value === null)
|
|
60
|
-
return undefined;
|
|
61
|
-
if (typeof value !== "boolean")
|
|
62
|
-
throw new ToolInputError(`"${key}" must be a boolean`);
|
|
63
|
-
return value;
|
|
64
|
-
}
|
|
65
|
-
/** Wraps data that did not come from the query layer in the same envelope — e.g. `analyze`, which
|
|
66
|
-
* writes rather than reads and has no `QueryResult`, so its reply still carries the same stamp. */
|
|
67
|
-
export function answer(options) {
|
|
68
|
-
const result = {
|
|
69
|
-
data: options.data,
|
|
70
|
-
stamp: {
|
|
71
|
-
commitSha: options.commitSha,
|
|
72
|
-
graphBuiltAt: options.graphBuiltAt,
|
|
73
|
-
irSchemaVersion: options.irSchemaVersion,
|
|
74
|
-
commitSpread: options.commitSpread,
|
|
75
|
-
repoCount: options.repoCount,
|
|
76
|
-
resolutionFloor: options.resolutionFloor,
|
|
77
|
-
},
|
|
78
|
-
truncated: options.truncated ?? false,
|
|
79
|
-
notes: options.notes,
|
|
80
|
-
};
|
|
81
|
-
return {
|
|
82
|
-
result,
|
|
83
|
-
nameLevel: options.nameLevel,
|
|
84
|
-
headline: options.headline,
|
|
85
|
-
...(options.state === undefined ? {} : { state: options.state }),
|
|
86
|
-
...(options.truncatedDetail === undefined ? {} : { truncatedDetail: options.truncatedDetail }),
|
|
87
|
-
...(options.refusalSummary === undefined ? {} : { refusalSummary: options.refusalSummary }),
|
|
88
|
-
...(options.fitToBudget === undefined ? {} : { fitToBudget: options.fitToBudget }),
|
|
89
|
-
...(options.runtimeEvidence === undefined ? {} : { runtimeEvidence: options.runtimeEvidence }),
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
/** Trim an IR node down to what an agent needs, so a 1,000-node reply stays readable. */
|
|
93
|
-
export function briefNode(node) {
|
|
94
|
-
return {
|
|
95
|
-
id: node.id,
|
|
96
|
-
type: node.type,
|
|
97
|
-
name: node.name,
|
|
98
|
-
...(node.file === null ? {} : { file: node.file }),
|
|
99
|
-
...(node.range === null ? {} : { line: node.range.startLine }),
|
|
100
|
-
...(node.language === null ? {} : { language: node.language }),
|
|
101
|
-
resolution: node.resolution,
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Descry's own state inside this repository, which is not the developer's
|
|
106
|
-
* uncommitted change.
|
|
107
|
-
*
|
|
108
|
-
* ## Two paths, not one, and the second is the one that bit
|
|
109
|
-
*
|
|
110
|
-
* The first version derived this from the configured graph path alone. That is
|
|
111
|
-
* right for a single repository, where the graph sits in this repo's own
|
|
112
|
-
* `.descry/` — and wrong the moment two repositories share one graph, which is
|
|
113
|
-
* exactly what `link_workspace` produces:
|
|
114
|
-
*
|
|
115
|
-
* ```json
|
|
116
|
-
* // sherpa-backend/.descry/config.json
|
|
117
|
-
* "graph": "/home/…/sherpa-frontend/.descry/graph.db"
|
|
118
|
-
* ```
|
|
119
|
-
*
|
|
120
|
-
* The derived exclusion then pointed into the *other* repository, and this
|
|
121
|
-
* repository's own `.descry/config.json` was excluded by nothing. Measured on a
|
|
122
|
-
* real workspace: it was reported as the developer's uncommitted work. Not an
|
|
123
|
-
* edge case — every shared-graph workspace has it.
|
|
124
|
-
*
|
|
125
|
-
* `.descry/evidence.db` escaped only because that repository's `.gitignore`
|
|
126
|
-
* happened to carry `*.db`. **The exclusion must not depend on the user having
|
|
127
|
-
* gitignored anything**, which is what that near-miss shows: a tool's own state
|
|
128
|
-
* is excluded because it is the tool's, not because someone tidied up.
|
|
129
|
-
*
|
|
130
|
-
* ## Why the graph path is still consulted
|
|
131
|
-
*
|
|
132
|
-
* It is configurable, so it can be moved out of `.descry/` and stay inside the
|
|
133
|
-
* repository. A path outside the repository costs nothing to list — it is not
|
|
134
|
-
* in this working tree — and is kept rather than special-cased, because the
|
|
135
|
-
* test for "is this path inside this repo" is the kind that is subtly wrong on
|
|
136
|
-
* symlinks and relative paths.
|
|
137
|
-
*
|
|
138
|
-
* Returned as directory prefixes matched at a segment boundary by the git
|
|
139
|
-
* helpers, so `.descry` excludes `.descry/config.json` and leaves
|
|
140
|
-
* `src/.descryfile.py` alone.
|
|
141
|
-
*/
|
|
142
|
-
export function descryOwnState(graphPath) {
|
|
143
|
-
// This repository's own state directory, always — whatever the graph does.
|
|
144
|
-
const out = new Set([dirname(CONFIG_RELATIVE_PATH)]);
|
|
145
|
-
if (graphPath !== ":memory:" && graphPath !== "") {
|
|
146
|
-
const normalised = graphPath.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
147
|
-
const slash = normalised.lastIndexOf("/");
|
|
148
|
-
// The directory, not the file: SQLite writes `-wal` and `-shm` beside it.
|
|
149
|
-
out.add(slash === -1 ? normalised : normalised.slice(0, slash));
|
|
150
|
-
}
|
|
151
|
-
return [...out];
|
|
152
|
-
}
|
|
153
|
-
//# sourceMappingURL=kit.js.map
|
package/dist/tools/kit.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kit.js","sourceRoot":"","sources":["../../src/tools/kit.ts"],"names":[],"mappings":"AAAA;;8EAE8E;AAE9E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AA0DrD;sGACsG;AACtG,MAAM,OAAO,cAAe,SAAQ,KAAK;IACvC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAED,4FAA4F;AAC5F,0CAA0C;AAE1C,MAAM,UAAU,cAAc,CAAC,IAA6B,EAAE,GAAW;IACvE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5D,IA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AAK,CAAC,SAAS,EAAE,CAAC;QAC9D,GAAG,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC9D,UAAU,EAAE,IAAI,CAAC,UAAU;KAC5B,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB;IAC9C,2EAA2E;IAC3E,MAAM,GAAG,GAAG,IAAI,GAAG,CAAS,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAE7D,IAAI,SAAS,KAAK,UAAU,IAAI,SAAS,KAAK,EAAE,EAAE,CAAC;QACjD,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACtE,MAAM,KAAK,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAC1C,0EAA0E;QAC1E,GAAG,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/** `link_workspace` — the agent-mediated door onto what `descry init` writes from the CLI
|
|
2
|
-
* (shared `writeConfig`). Closes `analyze`'s "no workspace configured" disclosure (DEC-054),
|
|
3
|
-
* previously a dead end. Never infers pairing — `repos` must come from the user's explicit
|
|
4
|
-
* confirmation, not the caller's guess (workspace.ts's rule: never infer, always declare).
|
|
5
|
-
* The only tool writing outside its session root; a path that fails to exist is disclosed, never silently skipped. */
|
|
6
|
-
import { type ToolDefinition } from "./kit.ts";
|
|
7
|
-
/** A repository the workspace id was actually written into. */
|
|
8
|
-
export interface LinkedRepo {
|
|
9
|
-
/** Resolved to absolute. */
|
|
10
|
-
readonly path: string;
|
|
11
|
-
readonly repo: string;
|
|
12
|
-
/** The `.descry/config.json` that was written. */
|
|
13
|
-
readonly configPath: string;
|
|
14
|
-
}
|
|
15
|
-
export interface LinkWorkspaceData {
|
|
16
|
-
readonly workspace: string;
|
|
17
|
-
/** Only the repositories actually written. A path that didn't exist is absent from this
|
|
18
|
-
* list and disclosed — a partial link that looks complete is the failure this exists to catch. */
|
|
19
|
-
readonly written: readonly LinkedRepo[];
|
|
20
|
-
/** How many were asked for. Compare against `written.length`. */
|
|
21
|
-
readonly requested: number;
|
|
22
|
-
}
|
|
23
|
-
export declare const linkWorkspaceTool: ToolDefinition;
|
|
24
|
-
//# sourceMappingURL=link-workspace.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-workspace.d.ts","sourceRoot":"","sources":["../../src/tools/link-workspace.ts"],"names":[],"mappings":"AAAA;;;;uHAIuH;AAMvH,OAAO,EAA4D,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAGzG,+DAA+D;AAC/D,MAAM,WAAW,UAAU;IACzB,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;uGACmG;IACnG,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC,iEAAiE;IACjE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAsID,eAAO,MAAM,iBAAiB,EAAE,cAe/B,CAAC"}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
/** `link_workspace` — the agent-mediated door onto what `descry init` writes from the CLI
|
|
2
|
-
* (shared `writeConfig`). Closes `analyze`'s "no workspace configured" disclosure (DEC-054),
|
|
3
|
-
* previously a dead end. Never infers pairing — `repos` must come from the user's explicit
|
|
4
|
-
* confirmation, not the caller's guess (workspace.ts's rule: never infer, always declare).
|
|
5
|
-
* The only tool writing outside its session root; a path that fails to exist is disclosed, never silently skipped. */
|
|
6
|
-
import { existsSync, statSync } from "node:fs";
|
|
7
|
-
import { resolve } from "node:path";
|
|
8
|
-
import { writeConfig, writeWorkspaceRepos } from "../session.js";
|
|
9
|
-
import { answer, requiredString, ToolInputError } from "./kit.js";
|
|
10
|
-
const SCHEMA = {
|
|
11
|
-
type: "object",
|
|
12
|
-
properties: {
|
|
13
|
-
workspace: {
|
|
14
|
-
type: "string",
|
|
15
|
-
description: "The workspace id to write into every repository listed in `repos`, byte-identical. " +
|
|
16
|
-
"Choose a short, stable name — it becomes part of every workspace-scoped node id.",
|
|
17
|
-
},
|
|
18
|
-
repos: {
|
|
19
|
-
type: "array",
|
|
20
|
-
minItems: 2,
|
|
21
|
-
items: {
|
|
22
|
-
type: "object",
|
|
23
|
-
properties: {
|
|
24
|
-
path: { type: "string", description: "Absolute path to the repository on disk." },
|
|
25
|
-
repo: {
|
|
26
|
-
type: "string",
|
|
27
|
-
description: "This repository's identity, written explicitly rather than defaulted.",
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
required: ["path", "repo"],
|
|
31
|
-
additionalProperties: false,
|
|
32
|
-
},
|
|
33
|
-
description: "Every repository that should share this workspace, INCLUDING the current one if it should " +
|
|
34
|
-
"join. Only call this with repositories the user has explicitly confirmed belong together " +
|
|
35
|
-
"— a directory sitting next to another is a suggestion to put in front of the user, never " +
|
|
36
|
-
"a decision this tool or the caller makes on its own (workspace.ts's pairing rule, one " +
|
|
37
|
-
"level up: never infer, always declare).",
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
required: ["workspace", "repos"],
|
|
41
|
-
additionalProperties: false,
|
|
42
|
-
};
|
|
43
|
-
function parseRepos(value) {
|
|
44
|
-
if (!Array.isArray(value) || value.length < 2) {
|
|
45
|
-
throw new ToolInputError('"repos" must be an array of at least two {path, repo} entries — a workspace of one ' +
|
|
46
|
-
"repository joins nothing, so linking one is never the right call.");
|
|
47
|
-
}
|
|
48
|
-
return value.map((entry, index) => {
|
|
49
|
-
if (typeof entry !== "object" || entry === null) {
|
|
50
|
-
throw new ToolInputError(`repos[${index}] must be an object`);
|
|
51
|
-
}
|
|
52
|
-
const path = requiredString(entry, "path");
|
|
53
|
-
const repo = requiredString(entry, "repo");
|
|
54
|
-
return { path, repo };
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
async function run(args, ctx) {
|
|
58
|
-
const workspace = requiredString(args, "workspace");
|
|
59
|
-
const repos = parseRepos(args["repos"]);
|
|
60
|
-
const seen = new Set();
|
|
61
|
-
for (const entry of repos) {
|
|
62
|
-
const absolute = resolve(entry.path);
|
|
63
|
-
if (seen.has(absolute)) {
|
|
64
|
-
throw new ToolInputError(`"${entry.path}" is listed more than once`);
|
|
65
|
-
}
|
|
66
|
-
seen.add(absolute);
|
|
67
|
-
}
|
|
68
|
-
const written = [];
|
|
69
|
-
const notes = [];
|
|
70
|
-
for (const entry of repos) {
|
|
71
|
-
const absolute = resolve(entry.path);
|
|
72
|
-
if (!existsSync(absolute) || !statSync(absolute).isDirectory()) {
|
|
73
|
-
notes.push(`"${entry.path}" does not exist or is not a directory — nothing was written there.`);
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
ctx.progress(`Writing .descry/config.json in ${entry.repo}`, written.length, repos.length);
|
|
77
|
-
const result = await writeConfig(absolute, { repo: entry.repo, workspace });
|
|
78
|
-
written.push({ path: absolute, repo: entry.repo, configPath: result.path });
|
|
79
|
-
if (result.previousWorkspace !== undefined && result.previousWorkspace !== workspace) {
|
|
80
|
-
notes.push(`${entry.repo}: replaced previous workspace "${result.previousWorkspace}" with "${workspace}".`);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
// Membership list, written after the loop so it names repos the link actually reached, not
|
|
84
|
-
// what it was asked about. A workspace name alone doesn't say where siblings live on disk
|
|
85
|
-
// (DEC-NEXT-workspace-scoped-confirmed-facts). Still the caller's own list — nothing inferred.
|
|
86
|
-
const members = written.map((w) => ({ path: w.path, repo: w.repo }));
|
|
87
|
-
for (const member of members) {
|
|
88
|
-
await writeWorkspaceRepos(member.path, members);
|
|
89
|
-
}
|
|
90
|
-
if (written.length < repos.length) {
|
|
91
|
-
notes.push(`${repos.length - written.length} of ${repos.length} repositories were skipped. The workspace ` +
|
|
92
|
-
"id is only byte-identical where it was actually written — re-run for the skipped paths " +
|
|
93
|
-
"once they are correct.");
|
|
94
|
-
}
|
|
95
|
-
notes.push(`Run "analyze" again in each linked repository so its graph is rebuilt under the "${workspace}" ` +
|
|
96
|
-
"workspace — writing the config here does not itself rebuild anything.");
|
|
97
|
-
return answer({
|
|
98
|
-
headline: written.length === 0
|
|
99
|
-
? `No repository was linked — every path in "repos" failed to resolve.`
|
|
100
|
-
: `Linked ${written.length} of ${repos.length} repositor${repos.length === 1 ? "y" : "ies"} ` +
|
|
101
|
-
`to workspace "${workspace}".`,
|
|
102
|
-
state: written.length === 0 ? "refused" : "ok",
|
|
103
|
-
nameLevel: true,
|
|
104
|
-
// Writing a config file is not evidence about code — R0, the same choice `analyze`
|
|
105
|
-
// makes when no code-reading source ran.
|
|
106
|
-
resolutionFloor: 0,
|
|
107
|
-
commitSha: null,
|
|
108
|
-
graphBuiltAt: null,
|
|
109
|
-
irSchemaVersion: ctx.session.provider().baseStamp().irSchemaVersion,
|
|
110
|
-
commitSpread: ctx.session.provider().baseStamp().commitSpread,
|
|
111
|
-
repoCount: ctx.session.provider().baseStamp().repoCount,
|
|
112
|
-
notes,
|
|
113
|
-
data: { workspace, written, requested: repos.length },
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
export const linkWorkspaceTool = {
|
|
117
|
-
name: "link_workspace",
|
|
118
|
-
class: "stateful-read",
|
|
119
|
-
tier: "evidence",
|
|
120
|
-
version: "1.0.0",
|
|
121
|
-
title: "Declare which repositories share a workspace",
|
|
122
|
-
description: "Write the workspace id that lets multiple repositories' graphs join (DEC-054) into each " +
|
|
123
|
-
"repository's .descry/config.json. Call this ONLY after the user has explicitly confirmed " +
|
|
124
|
-
"which repositories belong together — you may point out sibling directories you can see as a " +
|
|
125
|
-
"suggestion, but you must never decide on your own that they are related and call this " +
|
|
126
|
-
"unprompted. The same file `descry init` writes from the command line; this is the " +
|
|
127
|
-
"conversational door onto it.",
|
|
128
|
-
inputSchema: SCHEMA,
|
|
129
|
-
run,
|
|
130
|
-
};
|
|
131
|
-
//# sourceMappingURL=link-workspace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-workspace.js","sourceRoot":"","sources":["../../src/tools/link-workspace.ts"],"names":[],"mappings":"AAAA;;;;uHAIuH;AAEvH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,EAAyC,MAAM,UAAU,CAAC;AA0BzG,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,qFAAqF;gBACrF,kFAAkF;SACrF;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE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,yCAAyC;QACzC,eAAe,EAAE,CAAC;QAClB,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,eAAe;QACnE,YAAY,EAAE,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,YAAY;QAC7D,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,SAAS;QACvD,KAAK;QACL,IAAI,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE;KACtD,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAmB;IAC/C,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,8CAA8C;IACrD,WAAW,EACT,0FAA0F;QAC1F,2FAA2F;QAC3F,8FAA8F;QAC9F,wFAAwF;QACxF,oFAAoF;QACpF,8BAA8B;IAChC,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
|
package/dist/tools/lookup.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/** Turns what a developer typed into exactly one node, or refuses to. With no signal to pick
|
|
2
|
-
* between two nodes plausibly named `charge`, picking would be inventing evidence — so ambiguity
|
|
3
|
-
* returns with candidates and how to narrow, the same discipline the graph builder applies to an
|
|
4
|
-
* unresolvable edge (never stub a node) and adapters apply to an unreadable receiver. */
|
|
5
|
-
import type { IRNode } from "@descryy/ir";
|
|
6
|
-
import type { Session } from "../session.ts";
|
|
7
|
-
export interface Lookup {
|
|
8
|
-
/** Null when nothing matched, or when more than one thing did. */
|
|
9
|
-
readonly node: IRNode | null;
|
|
10
|
-
readonly candidates: readonly IRNode[];
|
|
11
|
-
readonly headline: string;
|
|
12
|
-
readonly notes: readonly string[];
|
|
13
|
-
}
|
|
14
|
-
export declare function resolveOneNode(session: Session, criteria: {
|
|
15
|
-
readonly nodeId?: string | undefined;
|
|
16
|
-
readonly symbol?: string | undefined;
|
|
17
|
-
readonly file?: string | undefined;
|
|
18
|
-
}): Lookup;
|
|
19
|
-
//# sourceMappingURL=lookup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../src/tools/lookup.ts"],"names":[],"mappings":"AAAA;;;0FAG0F;AAG1F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,WAAW,MAAM;IACrB,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE;IACR,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,GACA,MAAM,CA+DR"}
|
package/dist/tools/lookup.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/** Turns what a developer typed into exactly one node, or refuses to. With no signal to pick
|
|
2
|
-
* between two nodes plausibly named `charge`, picking would be inventing evidence — so ambiguity
|
|
3
|
-
* returns with candidates and how to narrow, the same discipline the graph builder applies to an
|
|
4
|
-
* unresolvable edge (never stub a node) and adapters apply to an unreadable receiver. */
|
|
5
|
-
import { findNodes, getNode } from "@descryy/core";
|
|
6
|
-
export function resolveOneNode(session, criteria) {
|
|
7
|
-
const driver = session.store().driver;
|
|
8
|
-
if (criteria.nodeId !== undefined) {
|
|
9
|
-
const node = getNode(driver, criteria.nodeId);
|
|
10
|
-
return node === undefined
|
|
11
|
-
? {
|
|
12
|
-
node: null,
|
|
13
|
-
candidates: [],
|
|
14
|
-
headline: `No node with id ${criteria.nodeId} is in the graph.`,
|
|
15
|
-
notes: [
|
|
16
|
-
"The id may be from an older graph. Node ids are hashes over the repository scope, " +
|
|
17
|
-
"kind and qualified symbol path, so they survive file moves but not a change to the " +
|
|
18
|
-
"configured repository name. Run analyze and use an id from its output.",
|
|
19
|
-
],
|
|
20
|
-
}
|
|
21
|
-
: { node, candidates: [node], headline: node.name, notes: [] };
|
|
22
|
-
}
|
|
23
|
-
const matches = findNodes(driver, {
|
|
24
|
-
...(criteria.symbol === undefined ? {} : { name: criteria.symbol }),
|
|
25
|
-
...(criteria.file === undefined ? {} : { file: criteria.file }),
|
|
26
|
-
});
|
|
27
|
-
const named = criteria.symbol ?? criteria.file ?? "";
|
|
28
|
-
if (matches.length === 0) {
|
|
29
|
-
return {
|
|
30
|
-
node: null,
|
|
31
|
-
candidates: [],
|
|
32
|
-
headline: `Nothing named "${named}" is in the graph.`,
|
|
33
|
-
notes: [
|
|
34
|
-
"This does not mean it does not exist. It means no configured adapter read it, or the " +
|
|
35
|
-
"graph predates it. Run analyze, and check its disclosures for languages that were not " +
|
|
36
|
-
"analysable.",
|
|
37
|
-
],
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
if (matches.length === 1) {
|
|
41
|
-
return { node: matches[0], candidates: matches, headline: matches[0].name, notes: [] };
|
|
42
|
-
}
|
|
43
|
-
// More than one. Only a file narrows it, and only if the caller did not already
|
|
44
|
-
// give one — in which case the file genuinely declares two things of that name.
|
|
45
|
-
const where = matches
|
|
46
|
-
.slice(0, 8)
|
|
47
|
-
.map((m) => `${m.type} ${m.name}${m.file === null ? "" : ` (${m.file})`}`)
|
|
48
|
-
.join(", ");
|
|
49
|
-
return {
|
|
50
|
-
node: null,
|
|
51
|
-
candidates: matches,
|
|
52
|
-
headline: `"${named}" is ambiguous — ${matches.length} nodes match.`,
|
|
53
|
-
notes: [
|
|
54
|
-
`Candidates: ${where}${matches.length > 8 ? ", …" : ""}. ` +
|
|
55
|
-
(criteria.file === undefined
|
|
56
|
-
? 'Narrow it with "file", or pass "nodeId" directly.'
|
|
57
|
-
: "They are in the same file, so pass \"nodeId\" directly."),
|
|
58
|
-
"No answer was computed. Choosing one of these by a heuristic would produce a confident " +
|
|
59
|
-
"answer about a symbol you did not ask about.",
|
|
60
|
-
],
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=lookup.js.map
|
package/dist/tools/lookup.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lookup.js","sourceRoot":"","sources":["../../src/tools/lookup.ts"],"names":[],"mappings":"AAAA;;;0FAG0F;AAE1F,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAanD,MAAM,UAAU,cAAc,CAC5B,OAAgB,EAChB,QAIC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC;IAEtC,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAClC,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC9C,OAAO,IAAI,KAAK,SAAS;YACvB,CAAC,CAAC;gBACE,IAAI,EAAE,IAAI;gBACV,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE,mBAAmB,QAAQ,CAAC,MAAM,mBAAmB;gBAC/D,KAAK,EAAE;oBACL,oFAAoF;wBAClF,qFAAqF;wBACrF,wEAAwE;iBAC3E;aACF;YACH,CAA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AAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;SACzE,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;QACL,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,OAAO;QACnB,QAAQ,EAAE,IAAI,KAAK,oBAAoB,OAAO,CAAC,MAAM,eAAe;QACpE,KAAK,EAAE;YACL,eAAe,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI;gBACxD,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS;oBAC1B,CAAC,CAAC,mDAAmD;oBACrD,CAAC,CAAC,yDAAyD,CAAC;YAChE,yFAAyF;gBACvF,8CAA8C;SACjD;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/** `mark_incident` — "that was a bug, I fixed it": the only incident-minting path with
|
|
2
|
-
* precision 1.0 (a person asserts it). Needed because automatic detection (reverts,
|
|
3
|
-
* `Fixes #123`) found zero incidents in 3 repos, and a fix-forward heuristic scored 25%
|
|
4
|
-
* against a 90% threshold and was refused. Stored in `.descry/config.json` (DEC-223,
|
|
5
|
-
* DEC-017 — derived tables don't survive rebuilds) and capped at class B; `action` class per DEC-278, gated by the `confirmToken` handshake. */
|
|
6
|
-
import type { ConfirmedIncident } from "@descryy/ir";
|
|
7
|
-
import { type ToolDefinition } from "./kit.ts";
|
|
8
|
-
export interface MarkIncidentData {
|
|
9
|
-
/** The record as written. Read it back to see exactly what was stored. */
|
|
10
|
-
readonly recorded: ConfirmedIncident;
|
|
11
|
-
/** The `INCIDENT` node id, so a caller can query it immediately. */
|
|
12
|
-
readonly incidentNodeId: string;
|
|
13
|
-
/** Where the durable record lives — a file a person can read and correct. */
|
|
14
|
-
readonly configPath: string;
|
|
15
|
-
/** How many confirmed incidents this repository now has on record. */
|
|
16
|
-
readonly totalConfirmed: number;
|
|
17
|
-
/** Paths named that the graph has no node for. Still recorded and correlated — a
|
|
18
|
-
* developer naming a file Descry can't read is a gap in Descry, not a mistake. */
|
|
19
|
-
readonly filesNotInGraph: readonly string[];
|
|
20
|
-
/** True when this call's content (same summary and error text) matched a record
|
|
21
|
-
* already on file — merged into it rather than minting a second `INCIDENT` node
|
|
22
|
-
* (UAT phase 5, F9). */
|
|
23
|
-
readonly merged: boolean;
|
|
24
|
-
/** How many times this exact content has now been reported, this call included. */
|
|
25
|
-
readonly occurrences: number;
|
|
26
|
-
}
|
|
27
|
-
export declare const markIncidentTool: ToolDefinition;
|
|
28
|
-
//# sourceMappingURL=mark-incident.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mark-incident.d.ts","sourceRoot":"","sources":["../../src/tools/mark-incident.ts"],"names":[],"mappings":"AAAA;;;;iJAIiJ;AAUjJ,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAGlB,MAAM,WAAW,gBAAgB;IAC/B,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,oEAAoE;IACpE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;uFACmF;IACnF,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C;;6BAEyB;IACzB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,mFAAmF;IACnF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAkMD,eAAO,MAAM,gBAAgB,EAAE,cAkB9B,CAAC"}
|