@descryy/mcp 0.11.3 → 0.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +20 -20
- package/dist/action-handshake.d.ts +0 -38
- package/dist/action-handshake.d.ts.map +0 -1
- package/dist/action-handshake.js +0 -127
- package/dist/action-handshake.js.map +0 -1
- package/dist/bin/descry-mcp.d.ts +0 -7
- package/dist/bin/descry-mcp.d.ts.map +0 -1
- package/dist/bin/descry-mcp.js +0 -72
- package/dist/bin/descry-mcp.js.map +0 -1
- package/dist/browser/auth.d.ts +0 -84
- package/dist/browser/auth.d.ts.map +0 -1
- package/dist/browser/auth.js +0 -233
- package/dist/browser/auth.js.map +0 -1
- package/dist/browser/capability-probe.d.ts +0 -109
- package/dist/browser/capability-probe.d.ts.map +0 -1
- package/dist/browser/capability-probe.js +0 -201
- package/dist/browser/capability-probe.js.map +0 -1
- package/dist/browser/driver.d.ts +0 -570
- package/dist/browser/driver.d.ts.map +0 -1
- package/dist/browser/driver.js +0 -116
- package/dist/browser/driver.js.map +0 -1
- package/dist/browser/evidence.d.ts +0 -28
- package/dist/browser/evidence.d.ts.map +0 -1
- package/dist/browser/evidence.js +0 -82
- package/dist/browser/evidence.js.map +0 -1
- package/dist/browser/fake-driver.d.ts +0 -116
- package/dist/browser/fake-driver.d.ts.map +0 -1
- package/dist/browser/fake-driver.js +0 -416
- package/dist/browser/fake-driver.js.map +0 -1
- package/dist/browser/fault-attribution.d.ts +0 -178
- package/dist/browser/fault-attribution.d.ts.map +0 -1
- package/dist/browser/fault-attribution.js +0 -266
- package/dist/browser/fault-attribution.js.map +0 -1
- package/dist/browser/graph-write.d.ts +0 -45
- package/dist/browser/graph-write.d.ts.map +0 -1
- package/dist/browser/graph-write.js +0 -103
- package/dist/browser/graph-write.js.map +0 -1
- package/dist/browser/identity-graph-write.d.ts +0 -55
- package/dist/browser/identity-graph-write.d.ts.map +0 -1
- package/dist/browser/identity-graph-write.js +0 -45
- package/dist/browser/identity-graph-write.js.map +0 -1
- package/dist/browser/page-probe.d.ts +0 -81
- package/dist/browser/page-probe.d.ts.map +0 -1
- package/dist/browser/page-probe.js +0 -202
- package/dist/browser/page-probe.js.map +0 -1
- package/dist/browser/playwright-driver.d.ts +0 -114
- package/dist/browser/playwright-driver.d.ts.map +0 -1
- package/dist/browser/playwright-driver.js +0 -1479
- package/dist/browser/playwright-driver.js.map +0 -1
- package/dist/browser/provider.d.ts +0 -26
- package/dist/browser/provider.d.ts.map +0 -1
- package/dist/browser/provider.js +0 -14
- package/dist/browser/provider.js.map +0 -1
- package/dist/browser/reach-recording-session.d.ts +0 -44
- package/dist/browser/reach-recording-session.d.ts.map +0 -1
- package/dist/browser/reach-recording-session.js +0 -143
- package/dist/browser/reach-recording-session.js.map +0 -1
- package/dist/browser/reachability.d.ts +0 -168
- package/dist/browser/reachability.d.ts.map +0 -1
- package/dist/browser/reachability.js +0 -294
- package/dist/browser/reachability.js.map +0 -1
- package/dist/browser/registry.d.ts +0 -126
- package/dist/browser/registry.d.ts.map +0 -1
- package/dist/browser/registry.js +0 -177
- package/dist/browser/registry.js.map +0 -1
- package/dist/browser/scenario-provenance.d.ts +0 -23
- package/dist/browser/scenario-provenance.d.ts.map +0 -1
- package/dist/browser/scenario-provenance.js +0 -73
- package/dist/browser/scenario-provenance.js.map +0 -1
- package/dist/browser/scenario-resolve.d.ts +0 -28
- package/dist/browser/scenario-resolve.d.ts.map +0 -1
- package/dist/browser/scenario-resolve.js +0 -96
- package/dist/browser/scenario-resolve.js.map +0 -1
- package/dist/browser/scenario-runner.d.ts +0 -72
- package/dist/browser/scenario-runner.d.ts.map +0 -1
- package/dist/browser/scenario-runner.js +0 -353
- package/dist/browser/scenario-runner.js.map +0 -1
- package/dist/browser/stack-parser.d.ts +0 -19
- package/dist/browser/stack-parser.d.ts.map +0 -1
- package/dist/browser/stack-parser.js +0 -85
- package/dist/browser/stack-parser.js.map +0 -1
- package/dist/browser/tool-support.d.ts +0 -71
- package/dist/browser/tool-support.d.ts.map +0 -1
- package/dist/browser/tool-support.js +0 -216
- package/dist/browser/tool-support.js.map +0 -1
- package/dist/browser/url-scheme.d.ts +0 -14
- package/dist/browser/url-scheme.d.ts.map +0 -1
- package/dist/browser/url-scheme.js +0 -38
- package/dist/browser/url-scheme.js.map +0 -1
- package/dist/browser/wait-target.d.ts +0 -37
- package/dist/browser/wait-target.d.ts.map +0 -1
- package/dist/browser/wait-target.js +0 -54
- package/dist/browser/wait-target.js.map +0 -1
- package/dist/cancellation.d.ts +0 -20
- package/dist/cancellation.d.ts.map +0 -1
- package/dist/cancellation.js +0 -41
- package/dist/cancellation.js.map +0 -1
- package/dist/capped.d.ts +0 -17
- package/dist/capped.d.ts.map +0 -1
- package/dist/capped.js +0 -15
- package/dist/capped.js.map +0 -1
- package/dist/credential-store.d.ts +0 -22
- package/dist/credential-store.d.ts.map +0 -1
- package/dist/credential-store.js +0 -33
- package/dist/credential-store.js.map +0 -1
- package/dist/disclosure-ledger.d.ts +0 -14
- package/dist/disclosure-ledger.d.ts.map +0 -1
- package/dist/disclosure-ledger.js +0 -18
- package/dist/disclosure-ledger.js.map +0 -1
- package/dist/evidence/observed-route-evidence.d.ts +0 -25
- package/dist/evidence/observed-route-evidence.d.ts.map +0 -1
- package/dist/evidence/observed-route-evidence.js +0 -76
- package/dist/evidence/observed-route-evidence.js.map +0 -1
- package/dist/heap.d.ts +0 -61
- package/dist/heap.d.ts.map +0 -1
- package/dist/heap.js +0 -82
- package/dist/heap.js.map +0 -1
- package/dist/heartbeat.d.ts +0 -46
- package/dist/heartbeat.d.ts.map +0 -1
- package/dist/heartbeat.js +0 -66
- package/dist/heartbeat.js.map +0 -1
- package/dist/index.d.ts +0 -32
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -19
- package/dist/index.js.map +0 -1
- package/dist/module-trust.d.ts +0 -37
- package/dist/module-trust.d.ts.map +0 -1
- package/dist/module-trust.js +0 -77
- package/dist/module-trust.js.map +0 -1
- package/dist/path-confinement.d.ts +0 -31
- package/dist/path-confinement.d.ts.map +0 -1
- package/dist/path-confinement.js +0 -44
- package/dist/path-confinement.js.map +0 -1
- package/dist/planner/predict-then-propose.d.ts +0 -134
- package/dist/planner/predict-then-propose.d.ts.map +0 -1
- package/dist/planner/predict-then-propose.js +0 -138
- package/dist/planner/predict-then-propose.js.map +0 -1
- package/dist/planner/propose-journey.d.ts +0 -75
- package/dist/planner/propose-journey.d.ts.map +0 -1
- package/dist/planner/propose-journey.js +0 -96
- package/dist/planner/propose-journey.js.map +0 -1
- package/dist/protocol.d.ts +0 -57
- package/dist/protocol.d.ts.map +0 -1
- package/dist/protocol.js +0 -90
- package/dist/protocol.js.map +0 -1
- package/dist/registry.d.ts +0 -103
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -319
- package/dist/registry.js.map +0 -1
- package/dist/render.d.ts +0 -580
- package/dist/render.d.ts.map +0 -1
- package/dist/render.js +0 -867
- package/dist/render.js.map +0 -1
- package/dist/runtime-registry.d.ts +0 -22
- package/dist/runtime-registry.d.ts.map +0 -1
- package/dist/runtime-registry.js +0 -142
- package/dist/runtime-registry.js.map +0 -1
- package/dist/sandbox-defaults.d.ts +0 -41
- package/dist/sandbox-defaults.d.ts.map +0 -1
- package/dist/sandbox-defaults.js +0 -14
- package/dist/sandbox-defaults.js.map +0 -1
- package/dist/scenarios/browser-run-plan-projection.d.ts +0 -161
- package/dist/scenarios/browser-run-plan-projection.d.ts.map +0 -1
- package/dist/scenarios/browser-run-plan-projection.js +0 -264
- package/dist/scenarios/browser-run-plan-projection.js.map +0 -1
- package/dist/scenarios/credential-ref.d.ts +0 -102
- package/dist/scenarios/credential-ref.d.ts.map +0 -1
- package/dist/scenarios/credential-ref.js +0 -148
- package/dist/scenarios/credential-ref.js.map +0 -1
- package/dist/scenarios/index.d.ts +0 -7
- package/dist/scenarios/index.d.ts.map +0 -1
- package/dist/scenarios/index.js +0 -7
- package/dist/scenarios/index.js.map +0 -1
- package/dist/scenarios/parse.d.ts +0 -18
- package/dist/scenarios/parse.d.ts.map +0 -1
- package/dist/scenarios/parse.js +0 -212
- package/dist/scenarios/parse.js.map +0 -1
- package/dist/scenarios/scenario.d.ts +0 -93
- package/dist/scenarios/scenario.d.ts.map +0 -1
- package/dist/scenarios/scenario.js +0 -27
- package/dist/scenarios/scenario.js.map +0 -1
- package/dist/scenarios/secret-ref.d.ts +0 -86
- package/dist/scenarios/secret-ref.d.ts.map +0 -1
- package/dist/scenarios/secret-ref.js +0 -125
- package/dist/scenarios/secret-ref.js.map +0 -1
- package/dist/scenarios/storage.d.ts +0 -21
- package/dist/scenarios/storage.d.ts.map +0 -1
- package/dist/scenarios/storage.js +0 -103
- package/dist/scenarios/storage.js.map +0 -1
- package/dist/server.d.ts +0 -61
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js +0 -541
- package/dist/server.js.map +0 -1
- package/dist/session.d.ts +0 -243
- package/dist/session.d.ts.map +0 -1
- package/dist/session.js +0 -602
- package/dist/session.js.map +0 -1
- package/dist/tools/alias-kit.d.ts +0 -29
- package/dist/tools/alias-kit.d.ts.map +0 -1
- package/dist/tools/alias-kit.js +0 -21
- package/dist/tools/alias-kit.js.map +0 -1
- package/dist/tools/aliases.d.ts +0 -42
- package/dist/tools/aliases.d.ts.map +0 -1
- package/dist/tools/aliases.js +0 -52
- package/dist/tools/aliases.js.map +0 -1
- package/dist/tools/analyze-workspace.d.ts +0 -52
- package/dist/tools/analyze-workspace.d.ts.map +0 -1
- package/dist/tools/analyze-workspace.js +0 -207
- package/dist/tools/analyze-workspace.js.map +0 -1
- package/dist/tools/analyze.d.ts +0 -163
- package/dist/tools/analyze.d.ts.map +0 -1
- package/dist/tools/analyze.js +0 -724
- package/dist/tools/analyze.js.map +0 -1
- package/dist/tools/browser-click.d.ts +0 -18
- package/dist/tools/browser-click.d.ts.map +0 -1
- package/dist/tools/browser-click.js +0 -110
- package/dist/tools/browser-click.js.map +0 -1
- package/dist/tools/browser-close-session.d.ts +0 -39
- package/dist/tools/browser-close-session.d.ts.map +0 -1
- package/dist/tools/browser-close-session.js +0 -120
- package/dist/tools/browser-close-session.js.map +0 -1
- package/dist/tools/browser-fill.d.ts +0 -18
- package/dist/tools/browser-fill.d.ts.map +0 -1
- package/dist/tools/browser-fill.js +0 -117
- package/dist/tools/browser-fill.js.map +0 -1
- package/dist/tools/browser-navigate.d.ts +0 -15
- package/dist/tools/browser-navigate.d.ts.map +0 -1
- package/dist/tools/browser-navigate.js +0 -104
- package/dist/tools/browser-navigate.js.map +0 -1
- package/dist/tools/browser-read.d.ts +0 -33
- package/dist/tools/browser-read.d.ts.map +0 -1
- package/dist/tools/browser-read.js +0 -113
- package/dist/tools/browser-read.js.map +0 -1
- package/dist/tools/browser-run-scenario.d.ts +0 -28
- package/dist/tools/browser-run-scenario.d.ts.map +0 -1
- package/dist/tools/browser-run-scenario.js +0 -206
- package/dist/tools/browser-run-scenario.js.map +0 -1
- package/dist/tools/browser-save-scenario.d.ts +0 -19
- package/dist/tools/browser-save-scenario.d.ts.map +0 -1
- package/dist/tools/browser-save-scenario.js +0 -447
- package/dist/tools/browser-save-scenario.js.map +0 -1
- package/dist/tools/browser-select.d.ts +0 -20
- package/dist/tools/browser-select.d.ts.map +0 -1
- package/dist/tools/browser-select.js +0 -120
- package/dist/tools/browser-select.js.map +0 -1
- package/dist/tools/browser-snapshot.d.ts +0 -46
- package/dist/tools/browser-snapshot.d.ts.map +0 -1
- package/dist/tools/browser-snapshot.js +0 -127
- package/dist/tools/browser-snapshot.js.map +0 -1
- package/dist/tools/browser-start-session.d.ts +0 -24
- package/dist/tools/browser-start-session.d.ts.map +0 -1
- package/dist/tools/browser-start-session.js +0 -622
- package/dist/tools/browser-start-session.js.map +0 -1
- package/dist/tools/browser-submit.d.ts +0 -18
- package/dist/tools/browser-submit.d.ts.map +0 -1
- package/dist/tools/browser-submit.js +0 -106
- package/dist/tools/browser-submit.js.map +0 -1
- package/dist/tools/browser-type.d.ts +0 -18
- package/dist/tools/browser-type.d.ts.map +0 -1
- package/dist/tools/browser-type.js +0 -115
- package/dist/tools/browser-type.js.map +0 -1
- package/dist/tools/browser-wait-for.d.ts +0 -45
- package/dist/tools/browser-wait-for.d.ts.map +0 -1
- package/dist/tools/browser-wait-for.js +0 -150
- package/dist/tools/browser-wait-for.js.map +0 -1
- package/dist/tools/browser.d.ts +0 -69
- package/dist/tools/browser.d.ts.map +0 -1
- package/dist/tools/browser.js +0 -386
- package/dist/tools/browser.js.map +0 -1
- package/dist/tools/chain.d.ts +0 -41
- package/dist/tools/chain.d.ts.map +0 -1
- package/dist/tools/chain.js +0 -105
- package/dist/tools/chain.js.map +0 -1
- package/dist/tools/change-scope.d.ts +0 -25
- package/dist/tools/change-scope.d.ts.map +0 -1
- package/dist/tools/change-scope.js +0 -110
- package/dist/tools/change-scope.js.map +0 -1
- package/dist/tools/code-context.d.ts +0 -83
- package/dist/tools/code-context.d.ts.map +0 -1
- package/dist/tools/code-context.js +0 -416
- package/dist/tools/code-context.js.map +0 -1
- package/dist/tools/contracts.d.ts +0 -74
- package/dist/tools/contracts.d.ts.map +0 -1
- package/dist/tools/contracts.js +0 -196
- package/dist/tools/contracts.js.map +0 -1
- package/dist/tools/cross-pr.d.ts +0 -178
- package/dist/tools/cross-pr.d.ts.map +0 -1
- package/dist/tools/cross-pr.js +0 -321
- package/dist/tools/cross-pr.js.map +0 -1
- package/dist/tools/disclosure.d.ts +0 -75
- package/dist/tools/disclosure.d.ts.map +0 -1
- package/dist/tools/disclosure.js +0 -288
- package/dist/tools/disclosure.js.map +0 -1
- package/dist/tools/draw-conclusion.d.ts +0 -55
- package/dist/tools/draw-conclusion.d.ts.map +0 -1
- package/dist/tools/draw-conclusion.js +0 -259
- package/dist/tools/draw-conclusion.js.map +0 -1
- package/dist/tools/git-context.d.ts +0 -39
- package/dist/tools/git-context.d.ts.map +0 -1
- package/dist/tools/git-context.js +0 -364
- package/dist/tools/git-context.js.map +0 -1
- package/dist/tools/git-diff.d.ts +0 -45
- package/dist/tools/git-diff.d.ts.map +0 -1
- package/dist/tools/git-diff.js +0 -338
- package/dist/tools/git-diff.js.map +0 -1
- package/dist/tools/git-history.d.ts +0 -16
- package/dist/tools/git-history.d.ts.map +0 -1
- package/dist/tools/git-history.js +0 -86
- package/dist/tools/git-history.js.map +0 -1
- package/dist/tools/history.d.ts +0 -34
- package/dist/tools/history.d.ts.map +0 -1
- package/dist/tools/history.js +0 -121
- package/dist/tools/history.js.map +0 -1
- package/dist/tools/impact.d.ts +0 -46
- package/dist/tools/impact.d.ts.map +0 -1
- package/dist/tools/impact.js +0 -225
- package/dist/tools/impact.js.map +0 -1
- package/dist/tools/index.d.ts +0 -59
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -70
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/kit.d.ts +0 -165
- package/dist/tools/kit.d.ts.map +0 -1
- package/dist/tools/kit.js +0 -153
- package/dist/tools/kit.js.map +0 -1
- package/dist/tools/link-workspace.d.ts +0 -24
- package/dist/tools/link-workspace.d.ts.map +0 -1
- package/dist/tools/link-workspace.js +0 -131
- package/dist/tools/link-workspace.js.map +0 -1
- package/dist/tools/lookup.d.ts +0 -19
- package/dist/tools/lookup.d.ts.map +0 -1
- package/dist/tools/lookup.js +0 -63
- package/dist/tools/lookup.js.map +0 -1
- package/dist/tools/mark-incident.d.ts +0 -28
- package/dist/tools/mark-incident.d.ts.map +0 -1
- package/dist/tools/mark-incident.js +0 -188
- package/dist/tools/mark-incident.js.map +0 -1
- package/dist/tools/merged-browser.d.ts +0 -11
- package/dist/tools/merged-browser.d.ts.map +0 -1
- package/dist/tools/merged-browser.js +0 -20
- package/dist/tools/merged-browser.js.map +0 -1
- package/dist/tools/merged-context.d.ts +0 -11
- package/dist/tools/merged-context.d.ts.map +0 -1
- package/dist/tools/merged-context.js +0 -21
- package/dist/tools/merged-context.js.map +0 -1
- package/dist/tools/merged-observe.d.ts +0 -13
- package/dist/tools/merged-observe.d.ts.map +0 -1
- package/dist/tools/merged-observe.js +0 -21
- package/dist/tools/merged-observe.js.map +0 -1
- package/dist/tools/merged-workspace.d.ts +0 -14
- package/dist/tools/merged-workspace.d.ts.map +0 -1
- package/dist/tools/merged-workspace.js +0 -21
- package/dist/tools/merged-workspace.js.map +0 -1
- package/dist/tools/observe-runtime.d.ts +0 -250
- package/dist/tools/observe-runtime.d.ts.map +0 -1
- package/dist/tools/observe-runtime.js +0 -1753
- package/dist/tools/observe-runtime.js.map +0 -1
- package/dist/tools/observe-tests.d.ts +0 -57
- package/dist/tools/observe-tests.d.ts.map +0 -1
- package/dist/tools/observe-tests.js +0 -368
- package/dist/tools/observe-tests.js.map +0 -1
- package/dist/tools/observe.d.ts +0 -28
- package/dist/tools/observe.d.ts.map +0 -1
- package/dist/tools/observe.js +0 -330
- package/dist/tools/observe.js.map +0 -1
- package/dist/tools/pr-analysis.d.ts +0 -189
- package/dist/tools/pr-analysis.d.ts.map +0 -1
- package/dist/tools/pr-analysis.js +0 -299
- package/dist/tools/pr-analysis.js.map +0 -1
- package/dist/tools/pre-push.d.ts +0 -168
- package/dist/tools/pre-push.d.ts.map +0 -1
- package/dist/tools/pre-push.js +0 -416
- package/dist/tools/pre-push.js.map +0 -1
- package/dist/tools/predict-reach.d.ts +0 -57
- package/dist/tools/predict-reach.d.ts.map +0 -1
- package/dist/tools/predict-reach.js +0 -159
- package/dist/tools/predict-reach.js.map +0 -1
- package/dist/tools/propagation.d.ts +0 -37
- package/dist/tools/propagation.d.ts.map +0 -1
- package/dist/tools/propagation.js +0 -162
- package/dist/tools/propagation.js.map +0 -1
- package/dist/tools/propose-journey.d.ts +0 -16
- package/dist/tools/propose-journey.d.ts.map +0 -1
- package/dist/tools/propose-journey.js +0 -121
- package/dist/tools/propose-journey.js.map +0 -1
- package/dist/tools/prove-reach.d.ts +0 -74
- package/dist/tools/prove-reach.d.ts.map +0 -1
- package/dist/tools/prove-reach.js +0 -286
- package/dist/tools/prove-reach.js.map +0 -1
- package/dist/tools/questions.d.ts +0 -30
- package/dist/tools/questions.d.ts.map +0 -1
- package/dist/tools/questions.js +0 -232
- package/dist/tools/questions.js.map +0 -1
- package/dist/tools/refusal-fetch.d.ts +0 -35
- package/dist/tools/refusal-fetch.d.ts.map +0 -1
- package/dist/tools/refusal-fetch.js +0 -103
- package/dist/tools/refusal-fetch.js.map +0 -1
- package/dist/tools/runtime-incident.d.ts +0 -33
- package/dist/tools/runtime-incident.d.ts.map +0 -1
- package/dist/tools/runtime-incident.js +0 -67
- package/dist/tools/runtime-incident.js.map +0 -1
- package/dist/tools/runtime-journey-drive.d.ts +0 -102
- package/dist/tools/runtime-journey-drive.d.ts.map +0 -1
- package/dist/tools/runtime-journey-drive.js +0 -247
- package/dist/tools/runtime-journey-drive.js.map +0 -1
- package/dist/tools/scope.d.ts +0 -45
- package/dist/tools/scope.d.ts.map +0 -1
- package/dist/tools/scope.js +0 -186
- package/dist/tools/scope.js.map +0 -1
- package/dist/tools/similar-incidents.d.ts +0 -43
- package/dist/tools/similar-incidents.d.ts.map +0 -1
- package/dist/tools/similar-incidents.js +0 -179
- package/dist/tools/similar-incidents.js.map +0 -1
- package/dist/tools/validate.d.ts +0 -133
- package/dist/tools/validate.d.ts.map +0 -1
- package/dist/tools/validate.js +0 -442
- package/dist/tools/validate.js.map +0 -1
- package/dist/tools/verb.d.ts +0 -46
- package/dist/tools/verb.d.ts.map +0 -1
- package/dist/tools/verb.js +0 -78
- package/dist/tools/verb.js.map +0 -1
- package/dist/tools/verification-status.d.ts +0 -38
- package/dist/tools/verification-status.d.ts.map +0 -1
- package/dist/tools/verification-status.js +0 -203
- package/dist/tools/verification-status.js.map +0 -1
- package/dist/tools/verify-claim.d.ts +0 -29
- package/dist/tools/verify-claim.d.ts.map +0 -1
- package/dist/tools/verify-claim.js +0 -220
- package/dist/tools/verify-claim.js.map +0 -1
- package/dist/tools/workspace.d.ts +0 -28
- package/dist/tools/workspace.d.ts.map +0 -1
- package/dist/tools/workspace.js +0 -101
- package/dist/tools/workspace.js.map +0 -1
- package/dist/transport.d.ts +0 -32
- package/dist/transport.d.ts.map +0 -1
- package/dist/transport.js +0 -85
- package/dist/transport.js.map +0 -1
- package/dist/workspace-index.d.ts +0 -164
- package/dist/workspace-index.d.ts.map +0 -1
- package/dist/workspace-index.js +0 -381
- package/dist/workspace-index.js.map +0 -1
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The alias vocabulary, split from the alias *table*.
|
|
3
|
-
*
|
|
4
|
-
* `aliases.ts` holds the table, which is assembled from the per-group modules
|
|
5
|
-
* — and those modules need `withVerb` to build their own entries. Keeping both
|
|
6
|
-
* in one file makes that a cycle: `aliases.ts` imports `merged-browser.ts`,
|
|
7
|
-
* which imports `aliases.ts`, and the table is read at module scope before the
|
|
8
|
-
* groups have initialised. The type and the helper live here so the dependency
|
|
9
|
-
* runs one way: groups depend on this, the table depends on the groups.
|
|
10
|
-
*/
|
|
11
|
-
/** One retired tool name. */
|
|
12
|
-
export interface ToolAlias {
|
|
13
|
-
/** The registered tool that answers for it. */
|
|
14
|
-
readonly to: string;
|
|
15
|
-
/**
|
|
16
|
-
* Translate the old call shape into the new one. Omitted when the arguments
|
|
17
|
-
* are unchanged and only the name moved.
|
|
18
|
-
*/
|
|
19
|
-
readonly args?: (args: Record<string, unknown>) => Record<string, unknown>;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Add one verb to an otherwise unchanged argument object.
|
|
23
|
-
*
|
|
24
|
-
* Every merge needs it — a retired name carried no verb and its replacement
|
|
25
|
-
* requires one — and an inline closure per entry makes the tables unreadable
|
|
26
|
-
* at the size they reach.
|
|
27
|
-
*/
|
|
28
|
-
export declare function withVerb(verb: string, key?: string): (args: Record<string, unknown>) => Record<string, unknown>;
|
|
29
|
-
//# sourceMappingURL=alias-kit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alias-kit.d.ts","sourceRoot":"","sources":["../../src/tools/alias-kit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,6BAA6B;AAC7B,MAAM,WAAW,SAAS;IACxB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5E;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,GAAG,SAAS,GACX,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE5D"}
|
package/dist/tools/alias-kit.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The alias vocabulary, split from the alias *table*.
|
|
3
|
-
*
|
|
4
|
-
* `aliases.ts` holds the table, which is assembled from the per-group modules
|
|
5
|
-
* — and those modules need `withVerb` to build their own entries. Keeping both
|
|
6
|
-
* in one file makes that a cycle: `aliases.ts` imports `merged-browser.ts`,
|
|
7
|
-
* which imports `aliases.ts`, and the table is read at module scope before the
|
|
8
|
-
* groups have initialised. The type and the helper live here so the dependency
|
|
9
|
-
* runs one way: groups depend on this, the table depends on the groups.
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Add one verb to an otherwise unchanged argument object.
|
|
13
|
-
*
|
|
14
|
-
* Every merge needs it — a retired name carried no verb and its replacement
|
|
15
|
-
* requires one — and an inline closure per entry makes the tables unreadable
|
|
16
|
-
* at the size they reach.
|
|
17
|
-
*/
|
|
18
|
-
export function withVerb(verb, key = "verb") {
|
|
19
|
-
return (args) => ({ ...args, [key]: verb });
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=alias-kit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alias-kit.js","sourceRoot":"","sources":["../../src/tools/alias-kit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAaH;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CACtB,IAAY,EACZ,GAAG,GAAG,MAAM;IAEZ,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9C,CAAC"}
|
package/dist/tools/aliases.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retired tool names, and what now answers for them.
|
|
3
|
-
*
|
|
4
|
-
* ## The two halves of a rename, split deliberately
|
|
5
|
-
*
|
|
6
|
-
* A tool name is part of the wire contract, and things outside this repository
|
|
7
|
-
* hold it: `.mcp.json` files, skill frontmatter's `allowed-tools`, scripts, the
|
|
8
|
-
* five `descry-sherpa-*` server configurations. Breaking those in silence is
|
|
9
|
-
* the failure this project's whole posture is against — a call that used to
|
|
10
|
-
* work returning "no such tool" is a fact about *Descry*, and it should say so
|
|
11
|
-
* in the same sentence that says what to do instead.
|
|
12
|
-
*
|
|
13
|
-
* But an alias that is *advertised* defeats the reason for the rename. The
|
|
14
|
-
* consolidation exists so the agent chooses between fewer tools; a `tools/list`
|
|
15
|
-
* carrying 34 retired names alongside 16 real ones is a worse surface than the
|
|
16
|
-
* one the work started from, for as long as the deprecation window lasts.
|
|
17
|
-
*
|
|
18
|
-
* So: **not in `tools/list`, still in the dispatch table.** The agent is
|
|
19
|
-
* offered the merged surface and nothing else. A caller that already knows an
|
|
20
|
-
* old name gets its answer, plus a disclosure naming the replacement. The map
|
|
21
|
-
* is deleted at the next minor version, at which point the old names refuse
|
|
22
|
-
* like any other unknown tool.
|
|
23
|
-
*
|
|
24
|
-
* ## Why `args` is a rewrite rather than a pass-through
|
|
25
|
-
*
|
|
26
|
-
* Most retirements are a merge, and a merge introduces a verb: `impact` did not
|
|
27
|
-
* take one, `code_context({ verb: "impact" })` does. The rewrite is where that
|
|
28
|
-
* translation lives, so neither the merged tool nor the dispatch loop needs a
|
|
29
|
-
* branch for "was this call made under an old name".
|
|
30
|
-
*/
|
|
31
|
-
import type { ToolAlias } from "./alias-kit.ts";
|
|
32
|
-
export { withVerb } from "./alias-kit.ts";
|
|
33
|
-
export type { ToolAlias } from "./alias-kit.ts";
|
|
34
|
-
/**
|
|
35
|
-
* Retired name → replacement. Empty until the first merge lands; the invariants
|
|
36
|
-
* that guard it (`tool-aliases.test.ts`) are asserted over whatever it holds,
|
|
37
|
-
* so they are in force before the first entry rather than after it.
|
|
38
|
-
*/
|
|
39
|
-
export declare const TOOL_ALIASES: ReadonlyMap<string, ToolAlias>;
|
|
40
|
-
/** The sentence a reply carries when it was reached under a retired name. */
|
|
41
|
-
export declare function aliasDisclosure(from: string, to: string): string;
|
|
42
|
-
//# sourceMappingURL=aliases.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../src/tools/aliases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAOhD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,CAKtD,CAAC;AAEH,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAKhE"}
|
package/dist/tools/aliases.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retired tool names, and what now answers for them.
|
|
3
|
-
*
|
|
4
|
-
* ## The two halves of a rename, split deliberately
|
|
5
|
-
*
|
|
6
|
-
* A tool name is part of the wire contract, and things outside this repository
|
|
7
|
-
* hold it: `.mcp.json` files, skill frontmatter's `allowed-tools`, scripts, the
|
|
8
|
-
* five `descry-sherpa-*` server configurations. Breaking those in silence is
|
|
9
|
-
* the failure this project's whole posture is against — a call that used to
|
|
10
|
-
* work returning "no such tool" is a fact about *Descry*, and it should say so
|
|
11
|
-
* in the same sentence that says what to do instead.
|
|
12
|
-
*
|
|
13
|
-
* But an alias that is *advertised* defeats the reason for the rename. The
|
|
14
|
-
* consolidation exists so the agent chooses between fewer tools; a `tools/list`
|
|
15
|
-
* carrying 34 retired names alongside 16 real ones is a worse surface than the
|
|
16
|
-
* one the work started from, for as long as the deprecation window lasts.
|
|
17
|
-
*
|
|
18
|
-
* So: **not in `tools/list`, still in the dispatch table.** The agent is
|
|
19
|
-
* offered the merged surface and nothing else. A caller that already knows an
|
|
20
|
-
* old name gets its answer, plus a disclosure naming the replacement. The map
|
|
21
|
-
* is deleted at the next minor version, at which point the old names refuse
|
|
22
|
-
* like any other unknown tool.
|
|
23
|
-
*
|
|
24
|
-
* ## Why `args` is a rewrite rather than a pass-through
|
|
25
|
-
*
|
|
26
|
-
* Most retirements are a merge, and a merge introduces a verb: `impact` did not
|
|
27
|
-
* take one, `code_context({ verb: "impact" })` does. The rewrite is where that
|
|
28
|
-
* translation lives, so neither the merged tool nor the dispatch loop needs a
|
|
29
|
-
* branch for "was this call made under an old name".
|
|
30
|
-
*/
|
|
31
|
-
export { withVerb } from "./alias-kit.js";
|
|
32
|
-
import { WORKSPACE_GROUP_ALIASES } from "./merged-workspace.js";
|
|
33
|
-
import { CONTEXT_GROUP_ALIASES } from "./merged-context.js";
|
|
34
|
-
import { OBSERVE_GROUP_ALIASES } from "./merged-observe.js";
|
|
35
|
-
import { BROWSER_GROUP_ALIASES } from "./merged-browser.js";
|
|
36
|
-
/**
|
|
37
|
-
* Retired name → replacement. Empty until the first merge lands; the invariants
|
|
38
|
-
* that guard it (`tool-aliases.test.ts`) are asserted over whatever it holds,
|
|
39
|
-
* so they are in force before the first entry rather than after it.
|
|
40
|
-
*/
|
|
41
|
-
export const TOOL_ALIASES = new Map([
|
|
42
|
-
...WORKSPACE_GROUP_ALIASES,
|
|
43
|
-
...CONTEXT_GROUP_ALIASES,
|
|
44
|
-
...OBSERVE_GROUP_ALIASES,
|
|
45
|
-
...BROWSER_GROUP_ALIASES,
|
|
46
|
-
]);
|
|
47
|
-
/** The sentence a reply carries when it was reached under a retired name. */
|
|
48
|
-
export function aliasDisclosure(from, to) {
|
|
49
|
-
return (`"${from}" has been retired and this reply came from "${to}", which replaces it. ` +
|
|
50
|
-
`The old name still works in this version and will stop working in the next; update the caller to "${to}".`);
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=aliases.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aliases.js","sourceRoot":"","sources":["../../src/tools/aliases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAmC,IAAI,GAAG,CAAoB;IACrF,GAAG,uBAAuB;IAC1B,GAAG,qBAAqB;IACxB,GAAG,qBAAqB;IACxB,GAAG,qBAAqB;CACzB,CAAC,CAAC;AAEH,6EAA6E;AAC7E,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,EAAU;IACtD,OAAO,CACL,IAAI,IAAI,gDAAgD,EAAE,wBAAwB;QAClF,qGAAqG,EAAE,IAAI,CAC5G,CAAC;AACJ,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `analyze_workspace` — Gap 1 of
|
|
3
|
-
* `documents/plans/site-claims-closure-production-plan.md`: the cross-repo
|
|
4
|
-
* counterpart of `analyze`. Resolves the repository list from
|
|
5
|
-
* `session.config.workspaceRepos` (written by `link_workspace`, never
|
|
6
|
-
* inferred — same rule `link_workspace`'s own header states), migrates any
|
|
7
|
-
* existing per-repository graph aside per `migrateToWorkspaceGraph`
|
|
8
|
-
* (`@descryy/core`), and calls `indexWorkspace` to read every repository into
|
|
9
|
-
* one shared store.
|
|
10
|
-
*
|
|
11
|
-
* Deliberately a **new** tool rather than a mode on `analyze` — `analyze`'s
|
|
12
|
-
* contract is "read this one repository" and every one of its callers reads
|
|
13
|
-
* its reply as describing `session.repoPath` alone; overloading it would
|
|
14
|
-
* change that contract for all of them. `analyze_workspace` instead composes
|
|
15
|
-
* `analyze`'s own building blocks (via `indexWorkspace`) without touching
|
|
16
|
-
* `analyze.ts` at all.
|
|
17
|
-
*
|
|
18
|
-
* The shared graph's location is a disclosed design choice, not an inferred
|
|
19
|
-
* one — see `workspaceGraphPath`'s own doc in `@descryy/core` for why it
|
|
20
|
-
* lives under the *invoking* repository's `.descry/` directory rather than
|
|
21
|
-
* some central, app-wide location this package (unlike `descry-desktop`) has
|
|
22
|
-
* no concept of.
|
|
23
|
-
*/
|
|
24
|
-
import { type IndexWorkspaceRepoResult } from "../workspace-index.ts";
|
|
25
|
-
import { type ToolDefinition } from "./kit.ts";
|
|
26
|
-
export interface AnalyzeWorkspaceData {
|
|
27
|
-
readonly workspace: string;
|
|
28
|
-
readonly graphPath: string;
|
|
29
|
-
readonly repos: readonly IndexWorkspaceRepoResult[];
|
|
30
|
-
readonly stored: {
|
|
31
|
-
readonly nodes: number;
|
|
32
|
-
readonly edges: number;
|
|
33
|
-
readonly unresolvedRefs: number;
|
|
34
|
-
};
|
|
35
|
-
readonly merge: {
|
|
36
|
-
readonly mergedNodes: number;
|
|
37
|
-
readonly mergedEdges: number;
|
|
38
|
-
readonly collisions: number;
|
|
39
|
-
readonly droppedEdges: number;
|
|
40
|
-
readonly rejections: number;
|
|
41
|
-
};
|
|
42
|
-
readonly migration: {
|
|
43
|
-
readonly migrated: boolean;
|
|
44
|
-
readonly movedDatabases: readonly {
|
|
45
|
-
readonly repo: string;
|
|
46
|
-
readonly from: string;
|
|
47
|
-
readonly to: string;
|
|
48
|
-
}[];
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
export declare const analyzeWorkspaceTool: ToolDefinition;
|
|
52
|
-
//# sourceMappingURL=analyze-workspace.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-workspace.d.ts","sourceRoot":"","sources":["../../src/tools/analyze-workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAWH,OAAO,EAAkB,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,EAA8D,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAG3G,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACpD,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;KACjC,CAAC;IACF,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B,CAAC;IACF,QAAQ,CAAC,SAAS,EAAE;QAClB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;QAC3B,QAAQ,CAAC,cAAc,EAAE,SAAS;YAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KAC3G,CAAC;CACH;AAkLD,eAAO,MAAM,oBAAoB,EAAE,cAelC,CAAC"}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `analyze_workspace` — Gap 1 of
|
|
3
|
-
* `documents/plans/site-claims-closure-production-plan.md`: the cross-repo
|
|
4
|
-
* counterpart of `analyze`. Resolves the repository list from
|
|
5
|
-
* `session.config.workspaceRepos` (written by `link_workspace`, never
|
|
6
|
-
* inferred — same rule `link_workspace`'s own header states), migrates any
|
|
7
|
-
* existing per-repository graph aside per `migrateToWorkspaceGraph`
|
|
8
|
-
* (`@descryy/core`), and calls `indexWorkspace` to read every repository into
|
|
9
|
-
* one shared store.
|
|
10
|
-
*
|
|
11
|
-
* Deliberately a **new** tool rather than a mode on `analyze` — `analyze`'s
|
|
12
|
-
* contract is "read this one repository" and every one of its callers reads
|
|
13
|
-
* its reply as describing `session.repoPath` alone; overloading it would
|
|
14
|
-
* change that contract for all of them. `analyze_workspace` instead composes
|
|
15
|
-
* `analyze`'s own building blocks (via `indexWorkspace`) without touching
|
|
16
|
-
* `analyze.ts` at all.
|
|
17
|
-
*
|
|
18
|
-
* The shared graph's location is a disclosed design choice, not an inferred
|
|
19
|
-
* one — see `workspaceGraphPath`'s own doc in `@descryy/core` for why it
|
|
20
|
-
* lives under the *invoking* repository's `.descry/` directory rather than
|
|
21
|
-
* some central, app-wide location this package (unlike `descry-desktop`) has
|
|
22
|
-
* no concept of.
|
|
23
|
-
*/
|
|
24
|
-
import { join, resolve } from "node:path";
|
|
25
|
-
import { isGitRepository, migrateToWorkspaceGraph, workspaceGraphPath, } from "@descryy/core";
|
|
26
|
-
import { indexWorkspace } from "../workspace-index.js";
|
|
27
|
-
import { loadConfig } from "../session.js";
|
|
28
|
-
import { answer, optionalBoolean, optionalInteger } from "./kit.js";
|
|
29
|
-
const SCHEMA = {
|
|
30
|
-
type: "object",
|
|
31
|
-
properties: {
|
|
32
|
-
includeHistory: {
|
|
33
|
-
type: "boolean",
|
|
34
|
-
description: "Read each repository's git history for co-change coupling. Default true.",
|
|
35
|
-
},
|
|
36
|
-
maxCommits: {
|
|
37
|
-
type: "integer",
|
|
38
|
-
minimum: 1,
|
|
39
|
-
description: "Cap on commits read from each repository's history. Default 2000.",
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
additionalProperties: false,
|
|
43
|
-
};
|
|
44
|
-
/** Where `repository`'s own pre-workspace graph lives today, per its own config — `null` when that cannot be determined (config unreadable), which `migrateToWorkspaceGraph` treats as nothing to move for it. */
|
|
45
|
-
async function ownGraphPath(repository) {
|
|
46
|
-
try {
|
|
47
|
-
const config = await loadConfig(repository.path);
|
|
48
|
-
const graphPath = config.graph.startsWith("/") || /^[a-zA-Z]:[\\/]/.test(config.graph)
|
|
49
|
-
? config.graph
|
|
50
|
-
: join(repository.path, config.graph);
|
|
51
|
-
return { repo: repository.repo, graphPath };
|
|
52
|
-
}
|
|
53
|
-
catch {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
async function run(args, ctx) {
|
|
58
|
-
const { session } = ctx;
|
|
59
|
-
const includeHistory = optionalBoolean(args, "includeHistory") ?? true;
|
|
60
|
-
const maxCommits = optionalInteger(args, "maxCommits", 1);
|
|
61
|
-
const workspace = session.config.workspace;
|
|
62
|
-
if (workspace === undefined) {
|
|
63
|
-
return answer({
|
|
64
|
-
headline: "No workspace is configured for this repository.",
|
|
65
|
-
state: "refused",
|
|
66
|
-
nameLevel: true,
|
|
67
|
-
resolutionFloor: 0,
|
|
68
|
-
commitSha: null,
|
|
69
|
-
graphBuiltAt: null,
|
|
70
|
-
irSchemaVersion: session.provider().baseStamp().irSchemaVersion,
|
|
71
|
-
commitSpread: session.provider().baseStamp().commitSpread,
|
|
72
|
-
repoCount: session.provider().baseStamp().repoCount,
|
|
73
|
-
notes: [
|
|
74
|
-
'Call "link_workspace" first, with the repositories the user has explicitly confirmed ' +
|
|
75
|
-
"belong together, then run analyze_workspace again.",
|
|
76
|
-
],
|
|
77
|
-
data: {
|
|
78
|
-
workspace: "",
|
|
79
|
-
graphPath: "",
|
|
80
|
-
repos: [],
|
|
81
|
-
stored: { nodes: 0, edges: 0, unresolvedRefs: 0 },
|
|
82
|
-
merge: { mergedNodes: 0, mergedEdges: 0, collisions: 0, droppedEdges: 0, rejections: 0 },
|
|
83
|
-
migration: { migrated: false, movedDatabases: [] },
|
|
84
|
-
},
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
const declaredRepos = session.config.workspaceRepos ?? [];
|
|
88
|
-
if (declaredRepos.length < 2) {
|
|
89
|
-
return answer({
|
|
90
|
-
headline: `Workspace "${workspace}" has fewer than two declared repositories — nothing to join.`,
|
|
91
|
-
state: "refused",
|
|
92
|
-
nameLevel: true,
|
|
93
|
-
resolutionFloor: 0,
|
|
94
|
-
commitSha: null,
|
|
95
|
-
graphBuiltAt: null,
|
|
96
|
-
irSchemaVersion: session.provider().baseStamp().irSchemaVersion,
|
|
97
|
-
commitSpread: session.provider().baseStamp().commitSpread,
|
|
98
|
-
repoCount: session.provider().baseStamp().repoCount,
|
|
99
|
-
notes: [
|
|
100
|
-
`session.config.workspaceRepos has ${declaredRepos.length} entr${declaredRepos.length === 1 ? "y" : "ies"}. ` +
|
|
101
|
-
'Re-run "link_workspace" naming every repository that belongs to this workspace, including ' +
|
|
102
|
-
"this one, then run analyze_workspace again.",
|
|
103
|
-
],
|
|
104
|
-
data: {
|
|
105
|
-
workspace,
|
|
106
|
-
graphPath: "",
|
|
107
|
-
repos: [],
|
|
108
|
-
stored: { nodes: 0, edges: 0, unresolvedRefs: 0 },
|
|
109
|
-
merge: { mergedNodes: 0, mergedEdges: 0, collisions: 0, droppedEdges: 0, rejections: 0 },
|
|
110
|
-
migration: { migrated: false, movedDatabases: [] },
|
|
111
|
-
},
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
// The shared graph lives under the *invoking* repository's own `.descry/`
|
|
115
|
-
// directory — a disclosed design choice, not an inferred one; see this
|
|
116
|
-
// module's own header and `workspaceGraphPath`'s doc in `@descryy/core`.
|
|
117
|
-
const rootDir = join(session.repoPath, ".descry");
|
|
118
|
-
const graphDbPath = workspaceGraphPath(rootDir, workspace);
|
|
119
|
-
const notes = [];
|
|
120
|
-
const locations = (await Promise.all(declaredRepos.map(ownGraphPath))).filter((location) => location !== null && location.graphPath !== graphDbPath);
|
|
121
|
-
const migration = migrateToWorkspaceGraph({ rootDir, workspaceId: workspace, repositories: locations });
|
|
122
|
-
if (migration.disclosure !== null)
|
|
123
|
-
notes.push(migration.disclosure);
|
|
124
|
-
const missingRepos = [];
|
|
125
|
-
const repoInputs = [];
|
|
126
|
-
for (const declared of declaredRepos) {
|
|
127
|
-
const absolute = resolve(declared.path);
|
|
128
|
-
if (!(await isGitRepository(absolute).catch(() => false))) {
|
|
129
|
-
// `indexWorkspace` itself would also refuse this repository and say so
|
|
130
|
-
// in its own per-repo notes — checked here too only so a repository
|
|
131
|
-
// that cannot even be reached at all is named before the run starts,
|
|
132
|
-
// not discovered only in a per-repo note buried in the reply.
|
|
133
|
-
missingRepos.push(declared.path);
|
|
134
|
-
}
|
|
135
|
-
repoInputs.push({ repoPath: absolute, repo: declared.repo });
|
|
136
|
-
}
|
|
137
|
-
if (missingRepos.length > 0) {
|
|
138
|
-
notes.push(`${missingRepos.length} declared repositor${missingRepos.length === 1 ? "y is" : "ies are"} not a ` +
|
|
139
|
-
`git repository at the declared path (${missingRepos.join(", ")}) — each will be reported as not ` +
|
|
140
|
-
"indexed rather than skipped silently.");
|
|
141
|
-
}
|
|
142
|
-
const result = await indexWorkspace({
|
|
143
|
-
workspaceId: workspace,
|
|
144
|
-
repos: repoInputs,
|
|
145
|
-
graphDbPath,
|
|
146
|
-
includeHistory,
|
|
147
|
-
...(maxCommits === undefined ? {} : { maxCommits }),
|
|
148
|
-
onProgress: (progress) => ctx.progress(`${progress.repo}: ${progress.phase}`, progress.completed, progress.total),
|
|
149
|
-
signal: ctx.signal,
|
|
150
|
-
});
|
|
151
|
-
for (const note of result.notes)
|
|
152
|
-
notes.push(note);
|
|
153
|
-
for (const repo of result.repos)
|
|
154
|
-
for (const note of repo.notes)
|
|
155
|
-
notes.push(`${repo.repo}: ${note}`);
|
|
156
|
-
const readRepos = result.repos.filter((r) => r.commitSha !== null).length;
|
|
157
|
-
const headline = readRepos === 0
|
|
158
|
-
? `Nothing was read for workspace "${workspace}" — none of its ${result.repos.length} declared ` +
|
|
159
|
-
"repositories could be indexed."
|
|
160
|
-
: `Analysed workspace "${workspace}": ${readRepos} of ${result.repos.length} repositories indexed ` +
|
|
161
|
-
`into one shared graph, which now holds ${result.stored.nodes} nodes, ${result.stored.edges} edges.`;
|
|
162
|
-
return answer({
|
|
163
|
-
headline,
|
|
164
|
-
state: readRepos === 0 ? "refused" : "ok",
|
|
165
|
-
nameLevel: true,
|
|
166
|
-
resolutionFloor: result.stamp.resolutionFloor,
|
|
167
|
-
// No single commit describes a workspace spanning several repositories —
|
|
168
|
-
// each repository's own commit is in `data.repos[].commitSha` instead.
|
|
169
|
-
commitSha: null,
|
|
170
|
-
graphBuiltAt: Date.now(),
|
|
171
|
-
irSchemaVersion: result.stamp.irSchemaVersion,
|
|
172
|
-
commitSpread: result.stamp.commitSpread,
|
|
173
|
-
repoCount: result.stamp.repoCount,
|
|
174
|
-
notes,
|
|
175
|
-
data: {
|
|
176
|
-
workspace,
|
|
177
|
-
graphPath: graphDbPath,
|
|
178
|
-
repos: result.repos,
|
|
179
|
-
stored: {
|
|
180
|
-
nodes: result.stored.nodes,
|
|
181
|
-
edges: result.stored.edges,
|
|
182
|
-
unresolvedRefs: result.stored.unresolvedRefs,
|
|
183
|
-
},
|
|
184
|
-
merge: result.merge,
|
|
185
|
-
migration: {
|
|
186
|
-
migrated: migration.migrated,
|
|
187
|
-
movedDatabases: migration.movedDatabases.map((m) => ({ repo: m.repo, from: m.from, to: m.to })),
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
export const analyzeWorkspaceTool = {
|
|
193
|
-
name: "analyze_workspace",
|
|
194
|
-
class: "stateful-read",
|
|
195
|
-
tier: "evidence",
|
|
196
|
-
version: "1.0.0",
|
|
197
|
-
title: "Analyse every repository in a workspace into one shared code graph",
|
|
198
|
-
description: 'Read every repository declared by "link_workspace" with its own configured adapters, and ' +
|
|
199
|
-
"store the merged result as one shared code graph — so a frontend's USES_API and a backend's " +
|
|
200
|
-
"SERVES_API can join on the same API_ENDPOINT id (DEC-054). Requires a workspace to already be " +
|
|
201
|
-
'linked; call "link_workspace" first if it is not. Moves any existing per-repository graph ' +
|
|
202
|
-
"aside (never deletes it) the first time a repository joins a shared graph, and re-indexes it " +
|
|
203
|
-
"into the shared store in the same call.",
|
|
204
|
-
inputSchema: SCHEMA,
|
|
205
|
-
run,
|
|
206
|
-
};
|
|
207
|
-
//# sourceMappingURL=analyze-workspace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-workspace.js","sourceRoot":"","sources":["../../src/tools/analyze-workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,kBAAkB,GAEnB,MAAM,eAAe,CAAC;AAEvB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G;QAChG,4FAA4F;QAC5F,+FAA+F;QAC/F,yCAAyC;IAC3C,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
|
package/dist/tools/analyze.d.ts
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/** `analyze` — the only tool that writes to the graph. Disclosures matter most: a
|
|
2
|
-
* query can't report a gap it wasn't told about. Discloses: sources that failed or
|
|
3
|
-
* didn't claim the repo (§20.2 — not-analysable ≠ clean), each source's resolution
|
|
4
|
-
* reached (caps reliability, rule 3), id collisions (DEC-024), evicted files, and the
|
|
5
|
-
* cross-repo join count. No config → `repo` defaults to dir name, hashed into every id (DEC-004). */
|
|
6
|
-
import type { IRBatch, UnresolvedRef } from "@descryy/ir";
|
|
7
|
-
import { getCachedFiles } from "@descryy/core";
|
|
8
|
-
import type { BuildResult, JoinMetric, StoreCounts } from "@descryy/core";
|
|
9
|
-
import { type ToolDefinition } from "./kit.ts";
|
|
10
|
-
import { type DetectionEvidence, type LoadedSource } from "../registry.ts";
|
|
11
|
-
export { configDriftNote } from "../session.ts";
|
|
12
|
-
/** What one source read, and how well. `reachedResolution` is what rule 3 caps everything
|
|
13
|
-
* above it by — a run degraded to R0 looks identical to a healthy one until this is read. */
|
|
14
|
-
export interface SourceRun {
|
|
15
|
-
readonly source: string;
|
|
16
|
-
/** The *installed artifact's* version, read from its own nearest `package.json`
|
|
17
|
-
* (`LoadedSource.packageVersion`) — distinct from `source` above, which is the
|
|
18
|
-
* adapter's self-declared `producedBy` string and can drift from what actually
|
|
19
|
-
* shipped. `null` when no `package.json` encloses the resolved module (a bare
|
|
20
|
-
* path-specifier source with no package boundary). Previously this real value
|
|
21
|
-
* only ever reached a human via `sourceProvenanceNote`'s prose `notes` string —
|
|
22
|
-
* never as a field a caller could parse programmatically. */
|
|
23
|
-
readonly installedVersion: string | null;
|
|
24
|
-
readonly files: number;
|
|
25
|
-
readonly nodes: number;
|
|
26
|
-
readonly edges: number;
|
|
27
|
-
/** Refusal-ledger rows: gaps this source disclosed rather than guessed at. */
|
|
28
|
-
readonly unresolved: number;
|
|
29
|
-
/** Files attempted but not parsed — absent from the graph, not confirmed clean. Never
|
|
30
|
-
* counted in `files`; see `IRBatch.skippedFiles`. */
|
|
31
|
-
readonly skippedFiles: number;
|
|
32
|
-
readonly reachedResolution: number;
|
|
33
|
-
/** Wall-clock time this source took, including the git-history reader. */
|
|
34
|
-
readonly ms: number;
|
|
35
|
-
}
|
|
36
|
-
/** `skippedFiles`/`unresolved`: absent means an adapter compiled against an older
|
|
37
|
-
* `@descryy/ir`, not malformed — a real adapter once crashed here on `.length` of
|
|
38
|
-
* undefined despite returning 1000+ good nodes. Absent ⇒ old producer; wrong type ⇒ broken, never defaulted away. */
|
|
39
|
-
export declare function optionalBatchLists(batch: IRBatch): {
|
|
40
|
-
readonly skippedFiles: IRBatch["skippedFiles"];
|
|
41
|
-
readonly unresolved: IRBatch["unresolved"];
|
|
42
|
-
};
|
|
43
|
-
/** Distinguishes "the adapter failed" from "Descry's own code broke handling its
|
|
44
|
-
* output" — before this, a `TypeError` thrown in this file was reported as the
|
|
45
|
-
* adapter failing, sending users to debug working code instead of reporting our bug. */
|
|
46
|
-
/**
|
|
47
|
-
* F2 (UAT phase 4 F3 / Part 13 §13.3.2): which build actually ran. A bare
|
|
48
|
-
* specifier can resolve to more than one installed copy with the same
|
|
49
|
-
* name — CJS resolution walks upward through `node_modules`, so a stray
|
|
50
|
-
* install above the repository silently wins over the intended one, and
|
|
51
|
-
* `producedBy` alone cannot tell them apart (it carries the module's own
|
|
52
|
-
* self-declared version, which can drift from what actually shipped).
|
|
53
|
-
* This is the disclosure that makes "why are my results different from
|
|
54
|
-
* yours" answerable instead of a debugging session.
|
|
55
|
-
*/
|
|
56
|
-
export declare function sourceProvenanceNote(entry: LoadedSource): string;
|
|
57
|
-
export declare function sourceFailureNote(sourceId: string, error: unknown, phase: "emit" | "engine"): string;
|
|
58
|
-
export interface AnalyzeData {
|
|
59
|
-
readonly repo: string;
|
|
60
|
-
readonly workspace: string | null;
|
|
61
|
-
readonly commitSha: string;
|
|
62
|
-
readonly graphPath: string;
|
|
63
|
-
/** One entry per source that ran. An empty array is the not-analysable case. */
|
|
64
|
-
readonly sources: readonly SourceRun[];
|
|
65
|
-
/** Configured sources whose module would not import. Not clean — unread. */
|
|
66
|
-
readonly sourcesFailed: readonly {
|
|
67
|
-
readonly module: string;
|
|
68
|
-
readonly reason: string;
|
|
69
|
-
}[];
|
|
70
|
-
/** Sources that loaded and did not claim this repository, with why. */
|
|
71
|
-
readonly sourcesSkipped: readonly {
|
|
72
|
-
readonly source: string;
|
|
73
|
-
readonly reason: string;
|
|
74
|
-
}[];
|
|
75
|
-
/** Row counts in the store after this run. */
|
|
76
|
-
readonly stored: StoreCounts;
|
|
77
|
-
readonly merge: {
|
|
78
|
-
/** Node ids more than one source supplied — this is the cross-language join, not an error. */
|
|
79
|
-
readonly mergedNodes: number;
|
|
80
|
-
readonly mergedEdges: number;
|
|
81
|
-
/** Two different things under one id. There is no correct merge, so they are reported (DEC-024). */
|
|
82
|
-
readonly collisions: number;
|
|
83
|
-
/** Edges dropped because an endpoint resolved to nothing. Never stubbed. */
|
|
84
|
-
readonly droppedEdges: number;
|
|
85
|
-
readonly rejections: number;
|
|
86
|
-
};
|
|
87
|
-
/** Per workspace-scoped node type: how many exist and how many two repositories both supplied. */
|
|
88
|
-
readonly crossRepoJoins: BuildResult["crossRepoJoins"];
|
|
89
|
-
readonly written: {
|
|
90
|
-
readonly nodes: number;
|
|
91
|
-
readonly edges: number;
|
|
92
|
-
readonly unresolved: number;
|
|
93
|
-
readonly orphanedEdges: number;
|
|
94
|
-
/** Files a previous run owned and this one did not re-supply. Their rows are gone. */
|
|
95
|
-
readonly evictedFiles: number;
|
|
96
|
-
};
|
|
97
|
-
/** Edges minted from human-confirmed answers, capped at reliability class B by DEC-223. */
|
|
98
|
-
readonly minted: {
|
|
99
|
-
readonly edges: number;
|
|
100
|
-
readonly orphaned: number;
|
|
101
|
-
readonly unjoinable: number;
|
|
102
|
-
readonly evictedFiles: number;
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* P6-B1 — the run stopped at the heap fence, before the phase that would have
|
|
107
|
-
* aborted the process.
|
|
108
|
-
*
|
|
109
|
-
* A distinct shape rather than a zeroed `AnalyzeData`, for the same reason
|
|
110
|
-
* `scope` has `ScopeNotSeeded`: a halted run has no source table, no merge
|
|
111
|
-
* counts and no stored totals, and reporting zeros for them would say the
|
|
112
|
-
* repository is empty rather than that Descry stopped looking. Narrow on
|
|
113
|
-
* `"halted" in data`.
|
|
114
|
-
*/
|
|
115
|
-
export interface AnalyzeHalted {
|
|
116
|
-
readonly halted: "heap";
|
|
117
|
-
/** The phase that was refused — what would have run next, not what failed. */
|
|
118
|
-
readonly phase: string;
|
|
119
|
-
readonly heapUsedMib: number;
|
|
120
|
-
readonly heapLimitMib: number;
|
|
121
|
-
/** Sources that had already emitted when the fence tripped. Read, then discarded unwritten. */
|
|
122
|
-
readonly sourcesRead: readonly SourceRun[];
|
|
123
|
-
}
|
|
124
|
-
export type AnalyzeResult = AnalyzeData | AnalyzeHalted;
|
|
125
|
-
/** Gap 6 step 3: attempts whole-producer cache reuse for one `LanguageAdapter`
|
|
126
|
-
* source, so a repeat `analyze` run can skip `emit()` (and the re-parse inside
|
|
127
|
-
* it) entirely when nothing this producer read has changed. Every failure path
|
|
128
|
-
* here returns `{ reused: false }` rather than throwing — declining to reuse is
|
|
129
|
-
* always safe, and the caller's normal `emit()` path is the fallback. See
|
|
130
|
-
* `planIncrementalReuse`'s doc (`@descryy/core`) for why this is whole-producer,
|
|
131
|
-
* never per-file. */
|
|
132
|
-
export declare function attemptIncrementalReuse(params: {
|
|
133
|
-
readonly driver: Parameters<typeof getCachedFiles>[0];
|
|
134
|
-
readonly producedBy: string;
|
|
135
|
-
readonly repo: string;
|
|
136
|
-
readonly repoPath: string;
|
|
137
|
-
readonly repoFileListing: readonly string[] | null;
|
|
138
|
-
readonly commitSha: string;
|
|
139
|
-
readonly workspace: string | undefined;
|
|
140
|
-
}): Promise<{
|
|
141
|
-
readonly reused: true;
|
|
142
|
-
readonly batch: IRBatch;
|
|
143
|
-
} | {
|
|
144
|
-
readonly reused: false;
|
|
145
|
-
readonly reason: string;
|
|
146
|
-
}>;
|
|
147
|
-
export declare function refusalSummaryField(unresolved: readonly UnresolvedRef[]): {
|
|
148
|
-
readonly count: number;
|
|
149
|
-
readonly exemplar: string;
|
|
150
|
-
readonly handle: string;
|
|
151
|
-
} | undefined;
|
|
152
|
-
/** Single-repo half of the joins disclosure. In the ordinary case — one repo in scope —
|
|
153
|
-
* every join metric's `suppliedByTwoOrMoreRepos: 0` looks like `NO_CROSS_REPO_JOIN`'s
|
|
154
|
-
* failure case; this states outright it's just scope, not a failed join. */
|
|
155
|
-
export declare function crossRepoJoinNote(joins: readonly JoinMetric[]): string | undefined;
|
|
156
|
-
/** Turns one adapter's `DetectionResult.evidence` into the same kind of disclosed note the
|
|
157
|
-
* `skippedFiles` rollup below builds — grouped by `reason` where an entry is a
|
|
158
|
-
* `StructuredSkipEntry`, left under an "other" bucket, verbatim, where it is still the
|
|
159
|
-
* legacy plain-string shape (`isStructuredSkipEntry`, `@descryy/ir`). `null` on an empty
|
|
160
|
-
* list — nothing to disclose, not a note saying so. */
|
|
161
|
-
export declare function summariseDetectionEvidence(evidence: DetectionEvidence): string | null;
|
|
162
|
-
export declare const analyzeTool: ToolDefinition;
|
|
163
|
-
//# sourceMappingURL=analyze.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../src/tools/analyze.ts"],"names":[],"mappings":"AAAA;;;;sGAIsG;AAMtG,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAUL,cAAc,EASf,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,WAAW,EAAmB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