@flyingrobots/graft 0.7.1 → 0.9.0
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/CHANGELOG.md +202 -0
- package/GUIDE.md +8 -3
- package/README.md +128 -85
- package/dist/adapters/fake-echo-kernel-transport.d.ts +33 -0
- package/dist/adapters/fake-echo-kernel-transport.d.ts.map +1 -0
- package/dist/adapters/fake-echo-kernel-transport.js +208 -0
- package/dist/adapters/fake-echo-kernel-transport.js.map +1 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/cli/cli-error.d.ts.map +1 -1
- package/dist/cli/cli-error.js +22 -3
- package/dist/cli/cli-error.js.map +1 -1
- package/dist/cli/command-parser.d.ts.map +1 -1
- package/dist/cli/command-parser.js +62 -6
- package/dist/cli/command-parser.js.map +1 -1
- package/dist/cli/dead-symbols-render.d.ts +2 -0
- package/dist/cli/dead-symbols-render.d.ts.map +1 -0
- package/dist/cli/dead-symbols-render.js +23 -0
- package/dist/cli/dead-symbols-render.js.map +1 -0
- package/dist/cli/doctor-render.d.ts +2 -0
- package/dist/cli/doctor-render.d.ts.map +1 -0
- package/dist/cli/doctor-render.js +80 -0
- package/dist/cli/doctor-render.js.map +1 -0
- package/dist/cli/entrypoint.d.ts +1 -0
- package/dist/cli/entrypoint.d.ts.map +1 -1
- package/dist/cli/entrypoint.js +1 -0
- package/dist/cli/entrypoint.js.map +1 -1
- package/dist/cli/git-graft-enhance-model.d.ts +33 -3
- package/dist/cli/git-graft-enhance-model.d.ts.map +1 -1
- package/dist/cli/git-graft-enhance-model.js +38 -0
- package/dist/cli/git-graft-enhance-model.js.map +1 -1
- package/dist/cli/git-graft-enhance-render.d.ts.map +1 -1
- package/dist/cli/git-graft-enhance-render.js +13 -0
- package/dist/cli/git-graft-enhance-render.js.map +1 -1
- package/dist/cli/git-graft-enhance.d.ts.map +1 -1
- package/dist/cli/git-graft-enhance.js +44 -1
- package/dist/cli/git-graft-enhance.js.map +1 -1
- package/dist/cli/index-cmd.d.ts +1 -0
- package/dist/cli/index-cmd.d.ts.map +1 -1
- package/dist/cli/index-cmd.js +3 -0
- package/dist/cli/index-cmd.js.map +1 -1
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +24 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/peer-command.d.ts.map +1 -1
- package/dist/cli/peer-command.js +25 -0
- package/dist/cli/peer-command.js.map +1 -1
- package/dist/cli/review-cooldown.d.ts +15 -0
- package/dist/cli/review-cooldown.d.ts.map +1 -0
- package/dist/cli/review-cooldown.js +136 -0
- package/dist/cli/review-cooldown.js.map +1 -0
- package/dist/cli/structural-blame-render.d.ts +2 -0
- package/dist/cli/structural-blame-render.d.ts.map +1 -0
- package/dist/cli/structural-blame-render.js +42 -0
- package/dist/cli/structural-blame-render.js.map +1 -0
- package/dist/cli/structural-review-render.d.ts +2 -0
- package/dist/cli/structural-review-render.d.ts.map +1 -0
- package/dist/cli/structural-review-render.js +56 -0
- package/dist/cli/structural-review-render.js.map +1 -0
- package/dist/cli/structural-test-coverage-render.d.ts +2 -0
- package/dist/cli/structural-test-coverage-render.d.ts.map +1 -0
- package/dist/cli/structural-test-coverage-render.js +46 -0
- package/dist/cli/structural-test-coverage-render.js.map +1 -0
- package/dist/contracts/capabilities.d.ts +9 -6
- package/dist/contracts/capabilities.d.ts.map +1 -1
- package/dist/contracts/capabilities.js +54 -1
- package/dist/contracts/capabilities.js.map +1 -1
- package/dist/contracts/causal-ontology.d.ts +17 -17
- package/dist/contracts/output-schema-cli.d.ts +106 -41
- package/dist/contracts/output-schema-cli.d.ts.map +1 -1
- package/dist/contracts/output-schema-cli.js +29 -0
- package/dist/contracts/output-schema-cli.js.map +1 -1
- package/dist/contracts/output-schema-fragments.d.ts +238 -76
- package/dist/contracts/output-schema-fragments.d.ts.map +1 -1
- package/dist/contracts/output-schema-fragments.js +27 -0
- package/dist/contracts/output-schema-fragments.js.map +1 -1
- package/dist/contracts/output-schema-mcp.d.ts +171 -62
- package/dist/contracts/output-schema-mcp.d.ts.map +1 -1
- package/dist/contracts/output-schema-mcp.js +49 -22
- package/dist/contracts/output-schema-mcp.js.map +1 -1
- package/dist/contracts/output-schema-meta.d.ts +2 -2
- package/dist/contracts/output-schema-meta.d.ts.map +1 -1
- package/dist/contracts/output-schemas.d.ts +7 -7
- package/dist/contracts/output-schemas.d.ts.map +1 -1
- package/dist/contracts/output-schemas.js +101 -1
- package/dist/contracts/output-schemas.js.map +1 -1
- package/dist/echo/canonical-cbor.d.ts +10 -0
- package/dist/echo/canonical-cbor.d.ts.map +1 -0
- package/dist/echo/canonical-cbor.js +213 -0
- package/dist/echo/canonical-cbor.js.map +1 -0
- package/dist/echo/codec-runtime.d.ts +72 -0
- package/dist/echo/codec-runtime.d.ts.map +1 -0
- package/dist/echo/codec-runtime.js +259 -0
- package/dist/echo/codec-runtime.js.map +1 -0
- package/dist/echo/structural-history-client.d.ts +68 -0
- package/dist/echo/structural-history-client.d.ts.map +1 -0
- package/dist/echo/structural-history-client.js +149 -0
- package/dist/echo/structural-history-client.js.map +1 -0
- package/dist/echo/structural-history-envelope-codec.d.ts +46 -0
- package/dist/echo/structural-history-envelope-codec.d.ts.map +1 -0
- package/dist/echo/structural-history-envelope-codec.js +121 -0
- package/dist/echo/structural-history-envelope-codec.js.map +1 -0
- package/dist/echo/structural-reading-adapter.d.ts +13 -0
- package/dist/echo/structural-reading-adapter.d.ts.map +1 -0
- package/dist/echo/structural-reading-adapter.js +120 -0
- package/dist/echo/structural-reading-adapter.js.map +1 -0
- package/dist/generated/graft-structural-history.codec.generated.d.ts +135 -0
- package/dist/generated/graft-structural-history.codec.generated.d.ts.map +1 -0
- package/dist/generated/graft-structural-history.codec.generated.js +545 -0
- package/dist/generated/graft-structural-history.codec.generated.js.map +1 -0
- package/dist/generated/graft-structural-history.d.ts +331 -0
- package/dist/generated/graft-structural-history.d.ts.map +1 -0
- package/dist/generated/graft-structural-history.js +47 -0
- package/dist/generated/graft-structural-history.js.map +1 -0
- package/dist/git/version-guard.d.ts +17 -0
- package/dist/git/version-guard.d.ts.map +1 -0
- package/dist/git/version-guard.js +51 -0
- package/dist/git/version-guard.js.map +1 -0
- package/dist/hooks/posttooluse-read.js +2 -2
- package/dist/hooks/posttooluse-read.js.map +1 -1
- package/dist/mcp/burden.d.ts.map +1 -1
- package/dist/mcp/burden.js +4 -0
- package/dist/mcp/burden.js.map +1 -1
- package/dist/mcp/context.d.ts +5 -1
- package/dist/mcp/context.d.ts.map +1 -1
- package/dist/mcp/context.js +11 -1
- package/dist/mcp/context.js.map +1 -1
- package/dist/mcp/daemon-server.d.ts.map +1 -1
- package/dist/mcp/daemon-server.js +2 -0
- package/dist/mcp/daemon-server.js.map +1 -1
- package/dist/mcp/persisted-local-history-graph.d.ts.map +1 -1
- package/dist/mcp/persisted-local-history-graph.js +2 -1
- package/dist/mcp/persisted-local-history-graph.js.map +1 -1
- package/dist/mcp/persisted-local-history.d.ts +5 -5
- package/dist/mcp/repo-tool-job.d.ts.map +1 -1
- package/dist/mcp/repo-tool-job.js +2 -0
- package/dist/mcp/repo-tool-job.js.map +1 -1
- package/dist/mcp/repo-tool-worker-context.d.ts.map +1 -1
- package/dist/mcp/repo-tool-worker-context.js +19 -0
- package/dist/mcp/repo-tool-worker-context.js.map +1 -1
- package/dist/mcp/server-context.d.ts.map +1 -1
- package/dist/mcp/server-context.js +17 -0
- package/dist/mcp/server-context.js.map +1 -1
- package/dist/mcp/server-invocation.d.ts.map +1 -1
- package/dist/mcp/server-invocation.js +206 -147
- package/dist/mcp/server-invocation.js.map +1 -1
- package/dist/mcp/server-tool-access.d.ts.map +1 -1
- package/dist/mcp/server-tool-access.js +4 -0
- package/dist/mcp/server-tool-access.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +184 -116
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/stdio-server.d.ts.map +1 -1
- package/dist/mcp/stdio-server.js +2 -0
- package/dist/mcp/stdio-server.js.map +1 -1
- package/dist/mcp/tool-registry.d.ts.map +1 -1
- package/dist/mcp/tool-registry.js +9 -1
- package/dist/mcp/tool-registry.js.map +1 -1
- package/dist/mcp/tools/changed-since.d.ts.map +1 -1
- package/dist/mcp/tools/changed-since.js +10 -3
- package/dist/mcp/tools/changed-since.js.map +1 -1
- package/dist/mcp/tools/dead-symbols.d.ts +3 -0
- package/dist/mcp/tools/dead-symbols.d.ts.map +1 -0
- package/dist/mcp/tools/dead-symbols.js +32 -0
- package/dist/mcp/tools/dead-symbols.js.map +1 -0
- package/dist/mcp/tools/map.d.ts.map +1 -1
- package/dist/mcp/tools/map.js +2 -0
- package/dist/mcp/tools/map.js.map +1 -1
- package/dist/mcp/tools/precision-warp.d.ts.map +1 -1
- package/dist/mcp/tools/precision-warp.js +2 -6
- package/dist/mcp/tools/precision-warp.js.map +1 -1
- package/dist/mcp/tools/refactor-difficulty.d.ts.map +1 -1
- package/dist/mcp/tools/refactor-difficulty.js +2 -0
- package/dist/mcp/tools/refactor-difficulty.js.map +1 -1
- package/dist/mcp/tools/safe-read.d.ts.map +1 -1
- package/dist/mcp/tools/safe-read.js +10 -105
- package/dist/mcp/tools/safe-read.js.map +1 -1
- package/dist/mcp/tools/structural-blame.d.ts.map +1 -1
- package/dist/mcp/tools/structural-blame.js +3 -0
- package/dist/mcp/tools/structural-blame.js.map +1 -1
- package/dist/mcp/tools/structural-review.d.ts.map +1 -1
- package/dist/mcp/tools/structural-review.js +9 -22
- package/dist/mcp/tools/structural-review.js.map +1 -1
- package/dist/mcp/tools/structural-test-coverage.d.ts +3 -0
- package/dist/mcp/tools/structural-test-coverage.d.ts.map +1 -0
- package/dist/mcp/tools/structural-test-coverage.js +35 -0
- package/dist/mcp/tools/structural-test-coverage.js.map +1 -0
- package/dist/mcp/tools/workspace-list-opened.d.ts +3 -0
- package/dist/mcp/tools/workspace-list-opened.d.ts.map +1 -0
- package/dist/mcp/tools/workspace-list-opened.js +10 -0
- package/dist/mcp/tools/workspace-list-opened.js.map +1 -0
- package/dist/mcp/tools/workspace-open.d.ts +3 -0
- package/dist/mcp/tools/workspace-open.d.ts.map +1 -0
- package/dist/mcp/tools/workspace-open.js +34 -0
- package/dist/mcp/tools/workspace-open.js.map +1 -0
- package/dist/mcp/workspace-router-model.d.ts +27 -0
- package/dist/mcp/workspace-router-model.d.ts.map +1 -1
- package/dist/mcp/workspace-router-model.js.map +1 -1
- package/dist/mcp/workspace-router.d.ts +9 -2
- package/dist/mcp/workspace-router.d.ts.map +1 -1
- package/dist/mcp/workspace-router.js +145 -1
- package/dist/mcp/workspace-router.js.map +1 -1
- package/dist/operations/cached-file.d.ts +6 -2
- package/dist/operations/cached-file.d.ts.map +1 -1
- package/dist/operations/cached-file.js +30 -6
- package/dist/operations/cached-file.js.map +1 -1
- package/dist/operations/export-surface-diff.d.ts.map +1 -1
- package/dist/operations/export-surface-diff.js +2 -0
- package/dist/operations/export-surface-diff.js.map +1 -1
- package/dist/operations/file-outline.js +2 -2
- package/dist/operations/file-outline.js.map +1 -1
- package/dist/operations/graft-diff.d.ts.map +1 -1
- package/dist/operations/graft-diff.js +2 -0
- package/dist/operations/graft-diff.js.map +1 -1
- package/dist/operations/projection-safety.d.ts.map +1 -1
- package/dist/operations/projection-safety.js +2 -0
- package/dist/operations/projection-safety.js.map +1 -1
- package/dist/operations/repo-workspace.d.ts.map +1 -1
- package/dist/operations/repo-workspace.js +26 -8
- package/dist/operations/repo-workspace.js.map +1 -1
- package/dist/operations/review-cooldown-status.d.ts +27 -0
- package/dist/operations/review-cooldown-status.d.ts.map +1 -0
- package/dist/operations/review-cooldown-status.js +115 -0
- package/dist/operations/review-cooldown-status.js.map +1 -0
- package/dist/operations/safe-read.js +2 -2
- package/dist/operations/safe-read.js.map +1 -1
- package/dist/operations/sludge-detector.d.ts.map +1 -1
- package/dist/operations/sludge-detector.js +2 -1
- package/dist/operations/sludge-detector.js.map +1 -1
- package/dist/operations/structural-review.js +8 -8
- package/dist/operations/structural-review.js.map +1 -1
- package/dist/operations/structural-test-coverage-map.d.ts +44 -0
- package/dist/operations/structural-test-coverage-map.d.ts.map +1 -0
- package/dist/operations/structural-test-coverage-map.js +331 -0
- package/dist/operations/structural-test-coverage-map.js.map +1 -0
- package/dist/operations/structured-buffer-compare.d.ts.map +1 -1
- package/dist/operations/structured-buffer-compare.js +4 -1
- package/dist/operations/structured-buffer-compare.js.map +1 -1
- package/dist/operations/structured-buffer-model.d.ts +15 -13
- package/dist/operations/structured-buffer-model.d.ts.map +1 -1
- package/dist/operations/structured-buffer-model.js +24 -5
- package/dist/operations/structured-buffer-model.js.map +1 -1
- package/dist/operations/structured-buffer-query.d.ts.map +1 -1
- package/dist/operations/structured-buffer-query.js +21 -12
- package/dist/operations/structured-buffer-query.js.map +1 -1
- package/dist/parser/extractors/common.d.ts +16 -0
- package/dist/parser/extractors/common.d.ts.map +1 -0
- package/dist/parser/extractors/common.js +23 -0
- package/dist/parser/extractors/common.js.map +1 -0
- package/dist/parser/extractors/go.d.ts +18 -0
- package/dist/parser/extractors/go.d.ts.map +1 -0
- package/dist/parser/extractors/go.js +200 -0
- package/dist/parser/extractors/go.js.map +1 -0
- package/dist/parser/extractors/graphql.d.ts +26 -0
- package/dist/parser/extractors/graphql.d.ts.map +1 -0
- package/dist/parser/extractors/graphql.js +239 -0
- package/dist/parser/extractors/graphql.js.map +1 -0
- package/dist/parser/extractors/index.d.ts +4 -0
- package/dist/parser/extractors/index.d.ts.map +1 -0
- package/dist/parser/extractors/index.js +26 -0
- package/dist/parser/extractors/index.js.map +1 -0
- package/dist/parser/extractors/json.d.ts +10 -0
- package/dist/parser/extractors/json.d.ts.map +1 -0
- package/dist/parser/extractors/json.js +75 -0
- package/dist/parser/extractors/json.js.map +1 -0
- package/dist/parser/extractors/python.d.ts +16 -0
- package/dist/parser/extractors/python.d.ts.map +1 -0
- package/dist/parser/extractors/python.js +145 -0
- package/dist/parser/extractors/python.js.map +1 -0
- package/dist/parser/extractors/rust.d.ts +12 -0
- package/dist/parser/extractors/rust.d.ts.map +1 -0
- package/dist/parser/extractors/rust.js +122 -0
- package/dist/parser/extractors/rust.js.map +1 -0
- package/dist/parser/extractors/toml.d.ts +10 -0
- package/dist/parser/extractors/toml.d.ts.map +1 -0
- package/dist/parser/extractors/toml.js +74 -0
- package/dist/parser/extractors/toml.js.map +1 -0
- package/dist/parser/extractors/typescript.d.ts +13 -0
- package/dist/parser/extractors/typescript.d.ts.map +1 -0
- package/dist/parser/extractors/typescript.js +179 -0
- package/dist/parser/extractors/typescript.js.map +1 -0
- package/dist/parser/extractors/yaml.d.ts +13 -0
- package/dist/parser/extractors/yaml.d.ts.map +1 -0
- package/dist/parser/extractors/yaml.js +93 -0
- package/dist/parser/extractors/yaml.js.map +1 -0
- package/dist/parser/lang.d.ts +2 -2
- package/dist/parser/lang.d.ts.map +1 -1
- package/dist/parser/lang.js +19 -1
- package/dist/parser/lang.js.map +1 -1
- package/dist/parser/outline.d.ts +4 -0
- package/dist/parser/outline.d.ts.map +1 -1
- package/dist/parser/outline.js +32 -221
- package/dist/parser/outline.js.map +1 -1
- package/dist/parser/runtime.d.ts +7 -0
- package/dist/parser/runtime.d.ts.map +1 -1
- package/dist/parser/runtime.js +99 -10
- package/dist/parser/runtime.js.map +1 -1
- package/dist/parser/types.d.ts +1 -1
- package/dist/parser/types.d.ts.map +1 -1
- package/dist/parser/types.js.map +1 -1
- package/dist/ports/echo-kernel-transport.d.ts +12 -0
- package/dist/ports/echo-kernel-transport.d.ts.map +1 -0
- package/dist/ports/echo-kernel-transport.js +13 -0
- package/dist/ports/echo-kernel-transport.js.map +1 -0
- package/dist/ports/provenance-timeline.d.ts +10 -0
- package/dist/ports/provenance-timeline.d.ts.map +1 -0
- package/dist/ports/provenance-timeline.js +17 -0
- package/dist/ports/provenance-timeline.js.map +1 -0
- package/dist/ports/semantic-enrichment.d.ts +47 -0
- package/dist/ports/semantic-enrichment.d.ts.map +1 -0
- package/dist/ports/semantic-enrichment.js +2 -0
- package/dist/ports/semantic-enrichment.js.map +1 -0
- package/dist/ports/structural-reading.d.ts +100 -0
- package/dist/ports/structural-reading.d.ts.map +1 -0
- package/dist/ports/structural-reading.js +41 -0
- package/dist/ports/structural-reading.js.map +1 -0
- package/dist/warp/ast-import-resolver.d.ts.map +1 -1
- package/dist/warp/ast-import-resolver.js +2 -1
- package/dist/warp/ast-import-resolver.js.map +1 -1
- package/dist/warp/dead-symbols.d.ts.map +1 -1
- package/dist/warp/dead-symbols.js +4 -7
- package/dist/warp/dead-symbols.js.map +1 -1
- package/dist/warp/index-head.d.ts +4 -0
- package/dist/warp/index-head.d.ts.map +1 -1
- package/dist/warp/index-head.js +255 -22
- package/dist/warp/index-head.js.map +1 -1
- package/dist/warp/observers.d.ts.map +1 -1
- package/dist/warp/observers.js +3 -2
- package/dist/warp/observers.js.map +1 -1
- package/dist/warp/refactor-difficulty.d.ts.map +1 -1
- package/dist/warp/refactor-difficulty.js +4 -9
- package/dist/warp/refactor-difficulty.js.map +1 -1
- package/dist/warp/references.d.ts.map +1 -1
- package/dist/warp/references.js +2 -1
- package/dist/warp/references.js.map +1 -1
- package/dist/warp/semantic-enrichment.d.ts +14 -0
- package/dist/warp/semantic-enrichment.d.ts.map +1 -0
- package/dist/warp/semantic-enrichment.js +55 -0
- package/dist/warp/semantic-enrichment.js.map +1 -0
- package/dist/warp/structural-queries.d.ts.map +1 -1
- package/dist/warp/structural-queries.js +7 -14
- package/dist/warp/structural-queries.js.map +1 -1
- package/dist/warp/structural-reading-adapter.d.ts +28 -0
- package/dist/warp/structural-reading-adapter.d.ts.map +1 -0
- package/dist/warp/structural-reading-adapter.js +94 -0
- package/dist/warp/structural-reading-adapter.js.map +1 -0
- package/dist/warp/sym-id-codec.d.ts +14 -0
- package/dist/warp/sym-id-codec.d.ts.map +1 -0
- package/dist/warp/sym-id-codec.js +47 -0
- package/dist/warp/sym-id-codec.js.map +1 -0
- package/dist/warp/symbol-timeline.d.ts.map +1 -1
- package/dist/warp/symbol-timeline.js +6 -14
- package/dist/warp/symbol-timeline.js.map +1 -1
- package/dist/warp/warp-structural-churn.d.ts.map +1 -1
- package/dist/warp/warp-structural-churn.js +6 -10
- package/dist/warp/warp-structural-churn.js.map +1 -1
- package/dist/warp/warp-structural-log.d.ts.map +1 -1
- package/dist/warp/warp-structural-log.js +8 -10
- package/dist/warp/warp-structural-log.js.map +1 -1
- package/docs/CLI.md +63 -5
- package/docs/MCP.md +12 -6
- package/docs/SETUP.md +12 -6
- package/package.json +13 -4
package/dist/cli/peer-command.js
CHANGED
|
@@ -4,6 +4,11 @@ import { parseJsonTextObject } from "../adapters/json-text-decoder.js";
|
|
|
4
4
|
import { attachCliSchemaMeta, validateCliOutput, } from "../contracts/output-schemas.js";
|
|
5
5
|
import { createGraftServer } from "../mcp/server.js";
|
|
6
6
|
import { renderActivityView } from "./activity-render.js";
|
|
7
|
+
import { renderDeadSymbols } from "./dead-symbols-render.js";
|
|
8
|
+
import { renderDoctorPosture } from "./doctor-render.js";
|
|
9
|
+
import { renderStructuralBlame } from "./structural-blame-render.js";
|
|
10
|
+
import { renderStructuralReview } from "./structural-review-render.js";
|
|
11
|
+
import { renderStructuralTestCoverageMap } from "./structural-test-coverage-render.js";
|
|
7
12
|
const codec = new CanonicalJsonCodec();
|
|
8
13
|
function parseToolResult(result) {
|
|
9
14
|
const payload = result.content.find((item) => item.type === "text");
|
|
@@ -26,6 +31,26 @@ export function emitPeerCommand(command, data, json, writer) {
|
|
|
26
31
|
writer.write(`${renderActivityView(validated)}\n`);
|
|
27
32
|
return;
|
|
28
33
|
}
|
|
34
|
+
if (command === "diag_doctor") {
|
|
35
|
+
writer.write(`${renderDoctorPosture(validated)}\n`);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (command === "struct_review") {
|
|
39
|
+
writer.write(`${renderStructuralReview(validated)}\n`);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (command === "symbol_blame") {
|
|
43
|
+
writer.write(`${renderStructuralBlame(validated)}\n`);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (command === "struct_test_coverage") {
|
|
47
|
+
writer.write(`${renderStructuralTestCoverageMap(validated)}\n`);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (command === "struct_dead_symbols") {
|
|
51
|
+
writer.write(`${renderDeadSymbols(validated)}\n`);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
29
54
|
writer.write(`${JSON.stringify(validated, null, 2)}\n`);
|
|
30
55
|
}
|
|
31
56
|
export async function invokePeerCommand(cwd, tool, args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peer-command.js","sourceRoot":"","sources":["../../src/cli/peer-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EACL,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAsB,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"peer-command.js","sourceRoot":"","sources":["../../src/cli/peer-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EACL,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAsB,MAAM,kBAAkB,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AC;KACnC,CAAC,CAAC;IACH,OAAO,eAAe,CAAC,MAAM,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReviewCooldownStatus } from "../operations/review-cooldown-status.js";
|
|
2
|
+
import type { ProcessRunner } from "../ports/process-runner.js";
|
|
3
|
+
import type { Writer } from "./peer-command.js";
|
|
4
|
+
export interface RunReviewCooldownOptions {
|
|
5
|
+
readonly cwd: string;
|
|
6
|
+
readonly json: boolean;
|
|
7
|
+
readonly stdout?: Writer | undefined;
|
|
8
|
+
readonly pr?: string | undefined;
|
|
9
|
+
readonly commentsFile?: string | undefined;
|
|
10
|
+
readonly now?: string | undefined;
|
|
11
|
+
readonly processRunner?: ProcessRunner | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare function renderReviewCooldown(status: ReviewCooldownStatus): string;
|
|
14
|
+
export declare function runReviewCooldown(options: RunReviewCooldownOptions): void;
|
|
15
|
+
//# sourceMappingURL=review-cooldown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-cooldown.d.ts","sourceRoot":"","sources":["../../src/cli/review-cooldown.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIhD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CACpD;AAqGD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAoBzE;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAkBzE"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import { CanonicalJsonCodec } from "../adapters/canonical-json.js";
|
|
3
|
+
import { nodePathOps } from "../adapters/node-paths.js";
|
|
4
|
+
import { nodeProcessRunner } from "../adapters/node-process-runner.js";
|
|
5
|
+
import { attachCliSchemaMeta, validateCliOutput } from "../contracts/output-schemas.js";
|
|
6
|
+
import { reviewCooldownStatus, } from "../operations/review-cooldown-status.js";
|
|
7
|
+
const codec = new CanonicalJsonCodec();
|
|
8
|
+
function asRecord(value) {
|
|
9
|
+
return value !== null && typeof value === "object" && !Array.isArray(value)
|
|
10
|
+
? value
|
|
11
|
+
: null;
|
|
12
|
+
}
|
|
13
|
+
function authorName(value) {
|
|
14
|
+
if (typeof value === "string")
|
|
15
|
+
return value;
|
|
16
|
+
const record = asRecord(value);
|
|
17
|
+
if (record === null)
|
|
18
|
+
return undefined;
|
|
19
|
+
const login = record["login"];
|
|
20
|
+
if (typeof login === "string")
|
|
21
|
+
return login;
|
|
22
|
+
const name = record["name"];
|
|
23
|
+
return typeof name === "string" ? name : undefined;
|
|
24
|
+
}
|
|
25
|
+
function commentsFromJson(value) {
|
|
26
|
+
const rawComments = Array.isArray(value)
|
|
27
|
+
? value
|
|
28
|
+
: asRecord(value)?.["comments"];
|
|
29
|
+
if (!Array.isArray(rawComments)) {
|
|
30
|
+
throw new Error("Review comments JSON must be an array or an object with a comments array");
|
|
31
|
+
}
|
|
32
|
+
return rawComments.map((raw, index) => {
|
|
33
|
+
const record = asRecord(raw);
|
|
34
|
+
if (record === null || typeof record["body"] !== "string") {
|
|
35
|
+
throw new Error(`Review comment ${String(index + 1)} is missing a string body`);
|
|
36
|
+
}
|
|
37
|
+
const createdAt = record["createdAt"];
|
|
38
|
+
const updatedAt = record["updatedAt"];
|
|
39
|
+
return {
|
|
40
|
+
body: record["body"],
|
|
41
|
+
...(typeof createdAt === "string" ? { createdAt } : {}),
|
|
42
|
+
...(typeof updatedAt === "string" ? { updatedAt } : {}),
|
|
43
|
+
...(authorName(record["author"]) !== undefined ? { author: authorName(record["author"]) } : {}),
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function parseCommentsText(text, label) {
|
|
48
|
+
let parsed;
|
|
49
|
+
try {
|
|
50
|
+
parsed = JSON.parse(text);
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
throw new Error(`${label} was not valid JSON`);
|
|
54
|
+
}
|
|
55
|
+
return commentsFromJson(parsed);
|
|
56
|
+
}
|
|
57
|
+
function readCommentsFile(cwd, commentsFile) {
|
|
58
|
+
const filePath = commentsFile.startsWith("/")
|
|
59
|
+
? nodePathOps.normalize(commentsFile)
|
|
60
|
+
: nodePathOps.join(cwd, commentsFile);
|
|
61
|
+
return parseCommentsText(fs.readFileSync(filePath, "utf8"), commentsFile);
|
|
62
|
+
}
|
|
63
|
+
function readCommentsFromGh(cwd, pr, processRunner) {
|
|
64
|
+
const args = [
|
|
65
|
+
"pr",
|
|
66
|
+
"view",
|
|
67
|
+
...(pr !== undefined ? [pr] : []),
|
|
68
|
+
"--json",
|
|
69
|
+
"comments",
|
|
70
|
+
];
|
|
71
|
+
const result = processRunner.run({
|
|
72
|
+
command: "gh",
|
|
73
|
+
args,
|
|
74
|
+
cwd,
|
|
75
|
+
timeoutMs: 30_000,
|
|
76
|
+
maxBufferBytes: 1_000_000,
|
|
77
|
+
});
|
|
78
|
+
if (result.error !== undefined) {
|
|
79
|
+
throw new Error(`gh pr view failed: ${result.error.message}`);
|
|
80
|
+
}
|
|
81
|
+
if (result.status !== 0) {
|
|
82
|
+
const detail = result.stderr.trim() || result.stdout.trim() || `exit status ${String(result.status)}`;
|
|
83
|
+
throw new Error(`gh pr view failed: ${detail}`);
|
|
84
|
+
}
|
|
85
|
+
return parseCommentsText(result.stdout, "gh pr view");
|
|
86
|
+
}
|
|
87
|
+
function parseNow(raw) {
|
|
88
|
+
if (raw === undefined)
|
|
89
|
+
return undefined;
|
|
90
|
+
const parsed = new Date(raw);
|
|
91
|
+
if (Number.isNaN(parsed.getTime())) {
|
|
92
|
+
throw new Error("--now must be a valid date/time string");
|
|
93
|
+
}
|
|
94
|
+
return parsed;
|
|
95
|
+
}
|
|
96
|
+
function minutesFromMs(value) {
|
|
97
|
+
return Math.ceil(value / 60_000);
|
|
98
|
+
}
|
|
99
|
+
export function renderReviewCooldown(status) {
|
|
100
|
+
const lines = [
|
|
101
|
+
"Graft Review Cooldown",
|
|
102
|
+
`status: ${status.status}`,
|
|
103
|
+
`reviewer: ${status.reviewer}`,
|
|
104
|
+
`processed: ${status.processedAtLocal}`,
|
|
105
|
+
`marker found: ${status.markerFound ? "yes" : "no"}`,
|
|
106
|
+
];
|
|
107
|
+
if (status.cooldownExpiresAtLocal !== undefined) {
|
|
108
|
+
lines.push(`expires: ${status.cooldownExpiresAtLocal}`);
|
|
109
|
+
}
|
|
110
|
+
if (status.remainingMs !== undefined && status.remainingMs > 0) {
|
|
111
|
+
lines.push(`remaining: ${String(minutesFromMs(status.remainingMs))}m`);
|
|
112
|
+
}
|
|
113
|
+
if (status.reason !== undefined) {
|
|
114
|
+
lines.push(`reason: ${status.reason}`);
|
|
115
|
+
}
|
|
116
|
+
lines.push("", status.summary);
|
|
117
|
+
return lines.join("\n");
|
|
118
|
+
}
|
|
119
|
+
export function runReviewCooldown(options) {
|
|
120
|
+
const stdout = options.stdout ?? process.stdout;
|
|
121
|
+
const comments = options.commentsFile !== undefined
|
|
122
|
+
? readCommentsFile(options.cwd, options.commentsFile)
|
|
123
|
+
: readCommentsFromGh(options.cwd, options.pr, options.processRunner ?? nodeProcessRunner);
|
|
124
|
+
const now = parseNow(options.now);
|
|
125
|
+
const status = reviewCooldownStatus({
|
|
126
|
+
comments,
|
|
127
|
+
...(now !== undefined ? { now } : {}),
|
|
128
|
+
});
|
|
129
|
+
const validated = validateCliOutput("review_cooldown", attachCliSchemaMeta("review_cooldown", status));
|
|
130
|
+
if (options.json) {
|
|
131
|
+
stdout.write(`${codec.encode(validated)}\n`);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
stdout.write(`${renderReviewCooldown(status)}\n`);
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=review-cooldown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-cooldown.js","sourceRoot":"","sources":["../../src/cli/review-cooldown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxF,OAAO,EACL,oBAAoB,GAGrB,MAAM,yCAAyC,CAAC;AAIjD,MAAM,KAAK,GAAG,IAAI,kBAAkB,EAAE,CAAC;AAYvC,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACzE,CAAC,CAAC,KAAgC;QAClC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,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,CAAC,aAAa,IAAI,iBAAiB,CAAC,CAAC;IAC5F,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAClC,MAAM,MAAM,GAAG,oBAAoB,CAAC;QAClC,QAAQ;QACR,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtC,CAAC,CAAC;IACH,MAAM,SAAS,GAAG,iBAAiB,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC,CAAC;IAEvG,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC7C,OAAO;IACT,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,GAAG,oBAAoB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structural-blame-render.d.ts","sourceRoot":"","sources":["../../src/cli/structural-blame-render.ts"],"names":[],"mappings":"AA0BA,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAsB5E"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { mcpOutputBodySchemas } from "../contracts/output-schema-mcp.js";
|
|
3
|
+
const structuralBlameRenderSchema = mcpOutputBodySchemas.graft_blame.extend({
|
|
4
|
+
_schema: z.unknown().optional(),
|
|
5
|
+
_receipt: z.unknown().optional(),
|
|
6
|
+
tripwire: z.unknown().optional(),
|
|
7
|
+
}).strict();
|
|
8
|
+
function shortSha(sha) {
|
|
9
|
+
return sha.length > 12 ? sha.slice(0, 12) : sha;
|
|
10
|
+
}
|
|
11
|
+
function renderVersion(version) {
|
|
12
|
+
const signature = version.signature !== null && version.signature.length > 0
|
|
13
|
+
? `, ${version.signature}`
|
|
14
|
+
: "";
|
|
15
|
+
const location = version.startLine !== undefined && version.endLine !== undefined
|
|
16
|
+
? `, ${version.path}:${String(version.startLine)}-${String(version.endLine)}`
|
|
17
|
+
: `, ${version.path}`;
|
|
18
|
+
return `- ${shortSha(version.sha)} @ tick ${String(version.tick)}: ${version.changeKind}, present: ${String(version.present)}${location}${signature}`;
|
|
19
|
+
}
|
|
20
|
+
export function renderStructuralBlame(input) {
|
|
21
|
+
const model = structuralBlameRenderSchema.parse(input);
|
|
22
|
+
const lines = [
|
|
23
|
+
"Graft Symbol History",
|
|
24
|
+
`symbol: ${model.symbol}`,
|
|
25
|
+
`path: ${model.filePath}`,
|
|
26
|
+
`changes: ${String(model.changeCount)}`,
|
|
27
|
+
`references: ${String(model.referenceCount)}`,
|
|
28
|
+
`created: ${model.createdInCommit ?? "unknown"}`,
|
|
29
|
+
`last signature change: ${model.lastSignatureChange ?? "none"}`,
|
|
30
|
+
];
|
|
31
|
+
if (model.history.length > 0) {
|
|
32
|
+
lines.push("", "Timeline");
|
|
33
|
+
for (const version of model.history) {
|
|
34
|
+
lines.push(renderVersion(version));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
lines.push("", "Timeline", "- unavailable: symbol was not found in the indexed WARP graph");
|
|
39
|
+
}
|
|
40
|
+
return lines.join("\n");
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=structural-blame-render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structural-blame-render.js","sourceRoot":"","sources":["../../src/cli/structural-blame-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,MAAM,2BAA2B,GAAG,oBAAoB,CAAC,WAAW,CAAC,MAAM,CAAC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AM,KAAK,GAAG;QACZ,sBAAsB;QACtB,WAAW,KAAK,CAAC,MAAM,EAAE;QACzB,SAAS,KAAK,CAAC,QAAQ,EAAE;QACzB,YAAY,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;QACvC,eAAe,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE;QAC7C,YAAY,KAAK,CAAC,eAAe,IAAI,SAAS,EAAE;QAChD,0BAA0B,KAAK,CAAC,mBAAmB,IAAI,MAAM,EAAE;KAChE,CAAC;IAEF,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAC3B,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YACpC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,UAAU,EAAE,+DAA+D,CAAC,CAAC;IAC9F,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structural-review-render.d.ts","sourceRoot":"","sources":["../../src/cli/structural-review-render.ts"],"names":[],"mappings":"AAoCA,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CA8B7E"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { mcpOutputBodySchemas } from "../contracts/output-schema-mcp.js";
|
|
3
|
+
const structuralReviewRenderSchema = mcpOutputBodySchemas.graft_review.extend({
|
|
4
|
+
_schema: z.unknown().optional(),
|
|
5
|
+
_receipt: z.unknown().optional(),
|
|
6
|
+
tripwire: z.unknown().optional(),
|
|
7
|
+
}).strict();
|
|
8
|
+
function renderCategoryLine(label, count) {
|
|
9
|
+
return `${label}: ${String(count)}`;
|
|
10
|
+
}
|
|
11
|
+
function renderFileLine(file) {
|
|
12
|
+
if (file.category !== "structural" || file.structuralChanges === undefined) {
|
|
13
|
+
return `- ${file.path}: ${file.category}`;
|
|
14
|
+
}
|
|
15
|
+
const changes = file.structuralChanges;
|
|
16
|
+
return [
|
|
17
|
+
`- ${file.path}: structural`,
|
|
18
|
+
`(+${String(changes.added)} -${String(changes.removed)} ~${String(changes.changed)})`,
|
|
19
|
+
].join(" ");
|
|
20
|
+
}
|
|
21
|
+
function renderBreakingChangeLine(change) {
|
|
22
|
+
return [
|
|
23
|
+
`- ${change.filePath}: ${change.symbol}`,
|
|
24
|
+
`${change.changeType},`,
|
|
25
|
+
`impacted files: ${String(change.impactedFiles)}`,
|
|
26
|
+
].join(" ");
|
|
27
|
+
}
|
|
28
|
+
export function renderStructuralReview(input) {
|
|
29
|
+
const model = structuralReviewRenderSchema.parse(input);
|
|
30
|
+
const lines = [
|
|
31
|
+
"Graft Review",
|
|
32
|
+
`range: ${model.base}..${model.head}`,
|
|
33
|
+
"",
|
|
34
|
+
"Summary",
|
|
35
|
+
`files: ${String(model.totalFiles)}`,
|
|
36
|
+
renderCategoryLine("structural", model.categories.structural),
|
|
37
|
+
renderCategoryLine("formatting", model.categories.formatting),
|
|
38
|
+
renderCategoryLine("tests", model.categories.test),
|
|
39
|
+
renderCategoryLine("docs", model.categories.docs),
|
|
40
|
+
renderCategoryLine("config", model.categories.config),
|
|
41
|
+
];
|
|
42
|
+
if (model.files.length > 0) {
|
|
43
|
+
lines.push("", "Files");
|
|
44
|
+
for (const file of model.files) {
|
|
45
|
+
lines.push(renderFileLine(file));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (model.breakingChanges.length > 0) {
|
|
49
|
+
lines.push("", "Breaking changes");
|
|
50
|
+
for (const change of model.breakingChanges) {
|
|
51
|
+
lines.push(renderBreakingChangeLine(change));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return lines.join("\n");
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=structural-review-render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structural-review-render.js","sourceRoot":"","sources":["../../src/cli/structural-review-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,MAAM,4BAA4B,GAAG,oBAAoB,CAAC,YAAY,CAAC,MAAM,CAAC;IAC5E,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC,MAAM,EAAE,CAAC;AAMZ,SAAS,kBAAkB,CAAC,KAAa,EAAE,KAAa;IACtD,OAAO,GAAG,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACtC,CAAC;AAED,SAAS,cAAc,CAAC,IAAgB;IACtC,IAAI,IAAI,CAAC,QAAQ,KAAK,YAAY,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QAC3E,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC5C,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC;IACvC,OAAO;QACL,KAAK,IAAI,CAAC,IAAI,cAAc;QAC5B,KAAK,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG;KACtF,CAAC,IAAI,CAAC,GAAG,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G,CAAC,EAAE,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,CAAC;QACnC,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;YAC3C,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structural-test-coverage-render.d.ts","sourceRoot":"","sources":["../../src/cli/structural-test-coverage-render.ts"],"names":[],"mappings":"AAqBA,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAiCtF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { mcpOutputBodySchemas } from "../contracts/output-schema-mcp.js";
|
|
3
|
+
const structuralTestCoverageRenderSchema = z.strictObject({
|
|
4
|
+
...mcpOutputBodySchemas.graft_test_coverage.shape,
|
|
5
|
+
_schema: z.unknown().optional(),
|
|
6
|
+
_receipt: z.unknown().optional(),
|
|
7
|
+
tripwire: z.unknown().optional(),
|
|
8
|
+
});
|
|
9
|
+
function renderSymbolLine(filePath, symbol) {
|
|
10
|
+
const suffix = symbol.referenceCount > 0
|
|
11
|
+
? ` (refs: ${String(symbol.referenceCount)}, files: ${symbol.referencingTestFiles.join(", ")})`
|
|
12
|
+
: " (refs: 0)";
|
|
13
|
+
return `- ${filePath}: ${symbol.name} ${symbol.status}${suffix}`;
|
|
14
|
+
}
|
|
15
|
+
export function renderStructuralTestCoverageMap(input) {
|
|
16
|
+
const model = structuralTestCoverageRenderSchema.parse(input);
|
|
17
|
+
const lines = [
|
|
18
|
+
"Graft Structural Test Coverage",
|
|
19
|
+
`kind: ${model.coverageKind}`,
|
|
20
|
+
`source: ${model.sourcePath}`,
|
|
21
|
+
`tests: ${model.testPath}`,
|
|
22
|
+
"",
|
|
23
|
+
"Summary",
|
|
24
|
+
`source files: ${String(model.totals.sourceFiles)}`,
|
|
25
|
+
`test files: ${String(model.totals.testFiles)}`,
|
|
26
|
+
`exported: ${String(model.totals.exportedSymbols)}`,
|
|
27
|
+
`covered: ${String(model.totals.coveredSymbols)}`,
|
|
28
|
+
`uncovered: ${String(model.totals.uncoveredSymbols)}`,
|
|
29
|
+
];
|
|
30
|
+
if (model.limitations.length > 0) {
|
|
31
|
+
lines.push("", "Limitations");
|
|
32
|
+
for (const limitation of model.limitations) {
|
|
33
|
+
lines.push(`- ${limitation}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (model.files.length > 0) {
|
|
37
|
+
lines.push("", "Symbols");
|
|
38
|
+
for (const file of model.files) {
|
|
39
|
+
for (const symbol of file.symbols) {
|
|
40
|
+
lines.push(renderSymbolLine(file.path, symbol));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return lines.join("\n");
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=structural-test-coverage-render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structural-test-coverage-render.js","sourceRoot":"","sources":["../../src/cli/structural-test-coverage-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,MAAM,kCAAkC,GAAG,CAAC,CAAC,YAAY,CAAC;IACxD,GAAG,oBAAoB,CAAC,mBAAmB,CAAC,KAAK;IACjD,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ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I,CAAC,KAAK,UAAU,EAAE,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;IAED,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QAC1B,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAC/B,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBAClC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare const MCP_TOOL_NAMES: readonly ["safe_read", "graft_edit", "file_outline", "read_range", "changed_since", "graft_diff", "graft_since", "graft_map", "code_show", "code_find", "code_refs", "daemon_repos", "daemon_status", "daemon_sessions", "daemon_monitors", "monitor_start", "monitor_pause", "monitor_resume", "monitor_nudge", "monitor_stop", "workspace_authorize", "workspace_authorizations", "workspace_revoke", "workspace_bind", "workspace_status", "activity_view", "causal_status", "causal_attach", "workspace_rebind", "run_capture", "state_save", "state_load", "set_budget", "explain", "doctor", "stats", "graft_churn", "graft_exports", "graft_log", "graft_blame", "graft_difficulty", "graft_review", "knowledge_map"];
|
|
1
|
+
export declare const MCP_TOOL_NAMES: readonly ["safe_read", "graft_edit", "file_outline", "read_range", "changed_since", "graft_diff", "graft_since", "graft_map", "code_show", "code_find", "code_refs", "daemon_repos", "daemon_status", "daemon_sessions", "daemon_monitors", "monitor_start", "monitor_pause", "monitor_resume", "monitor_nudge", "monitor_stop", "workspace_authorize", "workspace_authorizations", "workspace_revoke", "workspace_open", "workspace_list_opened", "workspace_bind", "workspace_status", "activity_view", "causal_status", "causal_attach", "workspace_rebind", "run_capture", "state_save", "state_load", "set_budget", "explain", "doctor", "stats", "graft_churn", "graft_exports", "graft_log", "graft_blame", "graft_difficulty", "graft_review", "graft_test_coverage", "graft_dead_symbols", "knowledge_map"];
|
|
2
2
|
export type McpToolName = typeof MCP_TOOL_NAMES[number];
|
|
3
|
-
export declare const CLI_COMMAND_NAMES: readonly ["init", "index", "migrate_local_history", "read_safe", "read_outline", "read_range", "read_changed", "struct_diff", "struct_since", "struct_map", "symbol_show", "symbol_find", "diag_doctor", "diag_activity", "diag_local_history_dag", "diag_explain", "diag_stats", "diag_capture", "struct_churn", "struct_exports", "struct_log", "symbol_blame", "symbol_difficulty", "struct_review", "git_graft_enhance"];
|
|
3
|
+
export declare const CLI_COMMAND_NAMES: readonly ["init", "index", "migrate_local_history", "read_safe", "read_outline", "read_range", "read_changed", "struct_diff", "struct_since", "struct_map", "symbol_show", "symbol_find", "diag_doctor", "diag_activity", "diag_local_history_dag", "diag_explain", "diag_stats", "diag_capture", "struct_churn", "struct_exports", "struct_log", "symbol_blame", "symbol_difficulty", "struct_review", "struct_test_coverage", "struct_dead_symbols", "review_cooldown", "git_graft_enhance"];
|
|
4
4
|
export type CliCommandName = typeof CLI_COMMAND_NAMES[number];
|
|
5
5
|
export declare const ENTRYPOINT_SURFACES: readonly ["api", "cli", "mcp"];
|
|
6
6
|
export type EntrypointSurface = typeof ENTRYPOINT_SURFACES[number];
|
|
7
7
|
export type ApiExposure = "tool_bridge" | "repo_workspace" | "structured_buffer";
|
|
8
|
-
export type CliMcpParity = "peer" | "cli_only" | "mcp_only" | "not_applicable";
|
|
8
|
+
export type CliMcpParity = "peer" | "cli_only" | "composed_cli_operator" | "mcp_only" | "not_applicable";
|
|
9
9
|
export interface CapabilityMatrixRow {
|
|
10
10
|
readonly id: string;
|
|
11
11
|
readonly api: "Yes" | "No";
|
|
@@ -21,6 +21,9 @@ export interface ThreeSurfaceCapabilityBaseline {
|
|
|
21
21
|
readonly apiCliMcp: number;
|
|
22
22
|
readonly apiMcp: number;
|
|
23
23
|
readonly apiOnly: number;
|
|
24
|
+
readonly directCliMcpPeers: number;
|
|
25
|
+
readonly composedCliOperators: number;
|
|
26
|
+
readonly intentionallyApiMcpOnly: number;
|
|
24
27
|
}
|
|
25
28
|
export interface CapabilityDefinition {
|
|
26
29
|
readonly id: string;
|
|
@@ -34,9 +37,9 @@ export interface CapabilityDefinition {
|
|
|
34
37
|
}
|
|
35
38
|
export declare const CAPABILITY_REGISTRY: readonly CapabilityDefinition[];
|
|
36
39
|
export declare const API_EXPOSED_CAPABILITIES: readonly CapabilityDefinition[];
|
|
37
|
-
export declare const CLI_COMMAND_PATHS: Readonly<Record<"read_range" | "init" | "index" | "migrate_local_history" | "read_safe" | "read_outline" | "read_changed" | "struct_diff" | "struct_since" | "struct_map" | "symbol_show" | "symbol_find" | "diag_doctor" | "diag_activity" | "diag_local_history_dag" | "diag_explain" | "diag_stats" | "diag_capture" | "struct_churn" | "struct_exports" | "struct_log" | "symbol_blame" | "symbol_difficulty" | "struct_review" | "git_graft_enhance", readonly [string, ...string[]]>>;
|
|
38
|
-
export declare const CLI_COMMAND_TO_MCP_TOOL: Readonly<Partial<Record<"read_range" | "init" | "index" | "migrate_local_history" | "read_safe" | "read_outline" | "read_changed" | "struct_diff" | "struct_since" | "struct_map" | "symbol_show" | "symbol_find" | "diag_doctor" | "diag_activity" | "diag_local_history_dag" | "diag_explain" | "diag_stats" | "diag_capture" | "struct_churn" | "struct_exports" | "struct_log" | "symbol_blame" | "symbol_difficulty" | "struct_review" | "git_graft_enhance", "safe_read" | "graft_edit" | "file_outline" | "read_range" | "changed_since" | "graft_diff" | "graft_since" | "graft_map" | "code_show" | "code_find" | "code_refs" | "daemon_repos" | "daemon_status" | "daemon_sessions" | "daemon_monitors" | "monitor_start" | "monitor_pause" | "monitor_resume" | "monitor_nudge" | "monitor_stop" | "workspace_authorize" | "workspace_authorizations" | "workspace_revoke" | "workspace_bind" | "workspace_status" | "activity_view" | "causal_status" | "causal_attach" | "workspace_rebind" | "run_capture" | "state_save" | "state_load" | "set_budget" | "explain" | "doctor" | "stats" | "graft_churn" | "graft_exports" | "graft_log" | "graft_blame" | "graft_difficulty" | "graft_review" | "knowledge_map">>>;
|
|
39
|
-
export declare const CLI_ONLY_COMMANDS: readonly ("read_range" | "init" | "index" | "migrate_local_history" | "read_safe" | "read_outline" | "read_changed" | "struct_diff" | "struct_since" | "struct_map" | "symbol_show" | "symbol_find" | "diag_doctor" | "diag_activity" | "diag_local_history_dag" | "diag_explain" | "diag_stats" | "diag_capture" | "struct_churn" | "struct_exports" | "struct_log" | "symbol_blame" | "symbol_difficulty" | "struct_review" | "git_graft_enhance")[];
|
|
40
|
+
export declare const CLI_COMMAND_PATHS: Readonly<Record<"read_range" | "init" | "index" | "migrate_local_history" | "read_safe" | "read_outline" | "read_changed" | "struct_diff" | "struct_since" | "struct_map" | "symbol_show" | "symbol_find" | "diag_doctor" | "diag_activity" | "diag_local_history_dag" | "diag_explain" | "diag_stats" | "diag_capture" | "struct_churn" | "struct_exports" | "struct_log" | "symbol_blame" | "symbol_difficulty" | "struct_review" | "struct_test_coverage" | "struct_dead_symbols" | "review_cooldown" | "git_graft_enhance", readonly [string, ...string[]]>>;
|
|
41
|
+
export declare const CLI_COMMAND_TO_MCP_TOOL: Readonly<Partial<Record<"read_range" | "init" | "index" | "migrate_local_history" | "read_safe" | "read_outline" | "read_changed" | "struct_diff" | "struct_since" | "struct_map" | "symbol_show" | "symbol_find" | "diag_doctor" | "diag_activity" | "diag_local_history_dag" | "diag_explain" | "diag_stats" | "diag_capture" | "struct_churn" | "struct_exports" | "struct_log" | "symbol_blame" | "symbol_difficulty" | "struct_review" | "struct_test_coverage" | "struct_dead_symbols" | "review_cooldown" | "git_graft_enhance", "safe_read" | "graft_edit" | "file_outline" | "read_range" | "changed_since" | "graft_diff" | "graft_since" | "graft_map" | "code_show" | "code_find" | "code_refs" | "daemon_repos" | "daemon_status" | "daemon_sessions" | "daemon_monitors" | "monitor_start" | "monitor_pause" | "monitor_resume" | "monitor_nudge" | "monitor_stop" | "workspace_authorize" | "workspace_authorizations" | "workspace_revoke" | "workspace_open" | "workspace_list_opened" | "workspace_bind" | "workspace_status" | "activity_view" | "causal_status" | "causal_attach" | "workspace_rebind" | "run_capture" | "state_save" | "state_load" | "set_budget" | "explain" | "doctor" | "stats" | "graft_churn" | "graft_exports" | "graft_log" | "graft_blame" | "graft_difficulty" | "graft_review" | "graft_test_coverage" | "graft_dead_symbols" | "knowledge_map">>>;
|
|
42
|
+
export declare const CLI_ONLY_COMMANDS: readonly ("read_range" | "init" | "index" | "migrate_local_history" | "read_safe" | "read_outline" | "read_changed" | "struct_diff" | "struct_since" | "struct_map" | "symbol_show" | "symbol_find" | "diag_doctor" | "diag_activity" | "diag_local_history_dag" | "diag_explain" | "diag_stats" | "diag_capture" | "struct_churn" | "struct_exports" | "struct_log" | "symbol_blame" | "symbol_difficulty" | "struct_review" | "struct_test_coverage" | "struct_dead_symbols" | "review_cooldown" | "git_graft_enhance")[];
|
|
40
43
|
export declare function cliCommandPath(command: CliCommandName): readonly [string, ...string[]];
|
|
41
44
|
export declare function cliCommandKey(path: readonly string[]): string;
|
|
42
45
|
export declare function buildCapabilityMatrixRows(): readonly CapabilityMatrixRow[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/contracts/capabilities.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/contracts/capabilities.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,sxBAgDjB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;AAExD,eAAO,MAAM,iBAAiB,geA6BpB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAE9D,eA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AC;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;IAC9D,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAChD,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;CACrC;AAiCD,eAAO,MAAM,mBAAmB,EAAE,SAAS,oBAAoB,EA6XrD,CAAC;AAEX,eAAO,MAAM,wBAAwB,iCAEpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,kiBAI8B,CAAC;AAE7D,eAAO,MAAM,uBAAuB,o0CAIc,CAAC;AAEnD,eAAO,MAAM,iBAAiB,6fAE7B,CAAC;AAEF,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAEtF;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAE7D;AAED,wBAAgB,yBAAyB,IAAI,SAAS,mBAAmB,EAAE,CAW1E;AAED,wBAAgB,mCAAmC,IAAI,8BAA8B,CAcpF"}
|
|
@@ -22,6 +22,8 @@ export const MCP_TOOL_NAMES = [
|
|
|
22
22
|
"workspace_authorize",
|
|
23
23
|
"workspace_authorizations",
|
|
24
24
|
"workspace_revoke",
|
|
25
|
+
"workspace_open",
|
|
26
|
+
"workspace_list_opened",
|
|
25
27
|
"workspace_bind",
|
|
26
28
|
"workspace_status",
|
|
27
29
|
"activity_view",
|
|
@@ -41,6 +43,8 @@ export const MCP_TOOL_NAMES = [
|
|
|
41
43
|
"graft_blame",
|
|
42
44
|
"graft_difficulty",
|
|
43
45
|
"graft_review",
|
|
46
|
+
"graft_test_coverage",
|
|
47
|
+
"graft_dead_symbols",
|
|
44
48
|
"knowledge_map",
|
|
45
49
|
];
|
|
46
50
|
export const CLI_COMMAND_NAMES = [
|
|
@@ -68,6 +72,9 @@ export const CLI_COMMAND_NAMES = [
|
|
|
68
72
|
"symbol_blame",
|
|
69
73
|
"symbol_difficulty",
|
|
70
74
|
"struct_review",
|
|
75
|
+
"struct_test_coverage",
|
|
76
|
+
"struct_dead_symbols",
|
|
77
|
+
"review_cooldown",
|
|
71
78
|
"git_graft_enhance",
|
|
72
79
|
];
|
|
73
80
|
export const ENTRYPOINT_SURFACES = ["api", "cli", "mcp"];
|
|
@@ -80,6 +87,9 @@ function defineCapability(seed) {
|
|
|
80
87
|
if (seed.cliCommand !== undefined) {
|
|
81
88
|
surfaces.push("cli");
|
|
82
89
|
}
|
|
90
|
+
else if (seed.cliMcpParity === "composed_cli_operator") {
|
|
91
|
+
surfaces.push("cli");
|
|
92
|
+
}
|
|
83
93
|
if (seed.mcpTool !== undefined) {
|
|
84
94
|
surfaces.push("mcp");
|
|
85
95
|
}
|
|
@@ -209,7 +219,8 @@ export const CAPABILITY_REGISTRY = [
|
|
|
209
219
|
id: "daemon_status",
|
|
210
220
|
description: "Inspect daemon-wide health and control-plane posture",
|
|
211
221
|
mcpTool: "daemon_status",
|
|
212
|
-
|
|
222
|
+
cliPath: ["daemon", "status"],
|
|
223
|
+
cliMcpParity: "composed_cli_operator",
|
|
213
224
|
}),
|
|
214
225
|
defineCapability({
|
|
215
226
|
id: "daemon_sessions",
|
|
@@ -271,6 +282,18 @@ export const CAPABILITY_REGISTRY = [
|
|
|
271
282
|
mcpTool: "workspace_revoke",
|
|
272
283
|
cliMcpParity: "mcp_only",
|
|
273
284
|
}),
|
|
285
|
+
defineCapability({
|
|
286
|
+
id: "workspace_open",
|
|
287
|
+
description: "Open a git worktree path in this MCP session",
|
|
288
|
+
mcpTool: "workspace_open",
|
|
289
|
+
cliMcpParity: "mcp_only",
|
|
290
|
+
}),
|
|
291
|
+
defineCapability({
|
|
292
|
+
id: "workspace_list_opened",
|
|
293
|
+
description: "List workspaces opened in this MCP session",
|
|
294
|
+
mcpTool: "workspace_list_opened",
|
|
295
|
+
cliMcpParity: "mcp_only",
|
|
296
|
+
}),
|
|
274
297
|
defineCapability({
|
|
275
298
|
id: "workspace_bind",
|
|
276
299
|
description: "Bind a daemon session to a workspace",
|
|
@@ -414,6 +437,29 @@ export const CAPABILITY_REGISTRY = [
|
|
|
414
437
|
cliPath: ["struct", "review"],
|
|
415
438
|
cliMcpParity: "peer",
|
|
416
439
|
}),
|
|
440
|
+
defineCapability({
|
|
441
|
+
id: "graft_test_coverage",
|
|
442
|
+
description: "Structural/reference test coverage map over source and test directories",
|
|
443
|
+
mcpTool: "graft_test_coverage",
|
|
444
|
+
cliCommand: "struct_test_coverage",
|
|
445
|
+
cliPath: ["struct", "test-coverage"],
|
|
446
|
+
cliMcpParity: "peer",
|
|
447
|
+
}),
|
|
448
|
+
defineCapability({
|
|
449
|
+
id: "graft_dead_symbols",
|
|
450
|
+
description: "Dead symbol detection over indexed WARP history",
|
|
451
|
+
mcpTool: "graft_dead_symbols",
|
|
452
|
+
cliCommand: "struct_dead_symbols",
|
|
453
|
+
cliPath: ["struct", "dead-symbols"],
|
|
454
|
+
cliMcpParity: "peer",
|
|
455
|
+
}),
|
|
456
|
+
defineCapability({
|
|
457
|
+
id: "review_cooldown",
|
|
458
|
+
description: "Review bot cooldown readiness from PR comments",
|
|
459
|
+
cliCommand: "review_cooldown",
|
|
460
|
+
cliPath: ["review", "cooldown"],
|
|
461
|
+
cliMcpParity: "cli_only",
|
|
462
|
+
}),
|
|
417
463
|
defineCapability({
|
|
418
464
|
id: "git_graft_enhance",
|
|
419
465
|
description: "Git-facing structural review summary over a ref range",
|
|
@@ -466,6 +512,13 @@ export function buildThreeSurfaceCapabilityBaseline() {
|
|
|
466
512
|
apiCliMcp: CAPABILITY_REGISTRY.filter((capability) => capability.surfaces.join(",") === "api,cli,mcp").length,
|
|
467
513
|
apiMcp: CAPABILITY_REGISTRY.filter((capability) => capability.surfaces.join(",") === "api,mcp").length,
|
|
468
514
|
apiOnly: CAPABILITY_REGISTRY.filter((capability) => capability.surfaces.join(",") === "api").length,
|
|
515
|
+
directCliMcpPeers: CAPABILITY_REGISTRY.filter((capability) => capability.cliMcpParity === "peer").length,
|
|
516
|
+
composedCliOperators: CAPABILITY_REGISTRY.filter((capability) => {
|
|
517
|
+
return capability.cliMcpParity === "composed_cli_operator";
|
|
518
|
+
}).length,
|
|
519
|
+
intentionallyApiMcpOnly: CAPABILITY_REGISTRY.filter((capability) => {
|
|
520
|
+
return capability.cliMcpParity === "mcp_only";
|
|
521
|
+
}).length,
|
|
469
522
|
};
|
|
470
523
|
}
|
|
471
524
|
//# sourceMappingURL=capabilities.js.map
|