trail-code 0.0.0-stage → 0.28.0-semantic.3
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/LICENSE +21 -0
- package/README.md +567 -2
- package/dist/ai/crux.d.ts +88 -0
- package/dist/ai/crux.d.ts.map +1 -0
- package/dist/ai/crux.js +219 -0
- package/dist/ai/crux.js.map +1 -0
- package/dist/ai/failure.d.ts +60 -0
- package/dist/ai/failure.d.ts.map +1 -0
- package/dist/ai/failure.js +86 -0
- package/dist/ai/failure.js.map +1 -0
- package/dist/ai/llm/anthropic.d.ts +37 -0
- package/dist/ai/llm/anthropic.d.ts.map +1 -0
- package/dist/ai/llm/anthropic.js +144 -0
- package/dist/ai/llm/anthropic.js.map +1 -0
- package/dist/ai/llm/factory.d.ts +28 -0
- package/dist/ai/llm/factory.d.ts.map +1 -0
- package/dist/ai/llm/factory.js +36 -0
- package/dist/ai/llm/factory.js.map +1 -0
- package/dist/ai/llm/litellm.d.ts +34 -0
- package/dist/ai/llm/litellm.d.ts.map +1 -0
- package/dist/ai/llm/litellm.js +45 -0
- package/dist/ai/llm/litellm.js.map +1 -0
- package/dist/ai/llm/openai.d.ts +145 -0
- package/dist/ai/llm/openai.d.ts.map +1 -0
- package/dist/ai/llm/openai.js +629 -0
- package/dist/ai/llm/openai.js.map +1 -0
- package/dist/ai/llm/orcarouter.d.ts +34 -0
- package/dist/ai/llm/orcarouter.d.ts.map +1 -0
- package/dist/ai/llm/orcarouter.js +45 -0
- package/dist/ai/llm/orcarouter.js.map +1 -0
- package/dist/ai/llm/recover-tool.d.ts +21 -0
- package/dist/ai/llm/recover-tool.d.ts.map +1 -0
- package/dist/ai/llm/recover-tool.js +109 -0
- package/dist/ai/llm/recover-tool.js.map +1 -0
- package/dist/ai/llm/types.d.ts +122 -0
- package/dist/ai/llm/types.d.ts.map +1 -0
- package/dist/ai/llm/types.js +33 -0
- package/dist/ai/llm/types.js.map +1 -0
- package/dist/ai/providers.d.ts +59 -0
- package/dist/ai/providers.d.ts.map +1 -0
- package/dist/ai/providers.js +54 -0
- package/dist/ai/providers.js.map +1 -0
- package/dist/ai/summarize.d.ts +25 -0
- package/dist/ai/summarize.d.ts.map +1 -0
- package/dist/ai/summarize.js +34 -0
- package/dist/ai/summarize.js.map +1 -0
- package/dist/ai/synthesize.d.ts +40 -0
- package/dist/ai/synthesize.d.ts.map +1 -0
- package/dist/ai/synthesize.js +230 -0
- package/dist/ai/synthesize.js.map +1 -0
- package/dist/ask/ask.d.ts +199 -0
- package/dist/ask/ask.d.ts.map +1 -0
- package/dist/ask/ask.js +1291 -0
- package/dist/ask/ask.js.map +1 -0
- package/dist/ask/file-rank.d.ts +72 -0
- package/dist/ask/file-rank.d.ts.map +1 -0
- package/dist/ask/file-rank.js +160 -0
- package/dist/ask/file-rank.js.map +1 -0
- package/dist/ask/file-selection.d.ts +22 -0
- package/dist/ask/file-selection.d.ts.map +1 -0
- package/dist/ask/file-selection.js +66 -0
- package/dist/ask/file-selection.js.map +1 -0
- package/dist/ask/fuse.d.ts +195 -0
- package/dist/ask/fuse.d.ts.map +1 -0
- package/dist/ask/fuse.js +344 -0
- package/dist/ask/fuse.js.map +1 -0
- package/dist/ask/graphrank.d.ts +61 -0
- package/dist/ask/graphrank.d.ts.map +1 -0
- package/dist/ask/graphrank.js +130 -0
- package/dist/ask/graphrank.js.map +1 -0
- package/dist/ask/index-file.d.ts +44 -0
- package/dist/ask/index-file.d.ts.map +1 -0
- package/dist/ask/index-file.js +128 -0
- package/dist/ask/index-file.js.map +1 -0
- package/dist/ask/semantic.d.ts +42 -0
- package/dist/ask/semantic.d.ts.map +1 -0
- package/dist/ask/semantic.js +293 -0
- package/dist/ask/semantic.js.map +1 -0
- package/dist/bin/graft.d.ts +3 -0
- package/dist/bin/graft.d.ts.map +1 -0
- package/dist/bin/graft.js +14 -0
- package/dist/bin/graft.js.map +1 -0
- package/dist/bin/trail.d.ts +3 -0
- package/dist/bin/trail.d.ts.map +1 -0
- package/dist/bin/trail.js +13 -0
- package/dist/bin/trail.js.map +1 -0
- package/dist/blast/blast-cli.d.ts +35 -0
- package/dist/blast/blast-cli.d.ts.map +1 -0
- package/dist/blast/blast-cli.js +155 -0
- package/dist/blast/blast-cli.js.map +1 -0
- package/dist/blast/blast.d.ts +128 -0
- package/dist/blast/blast.d.ts.map +1 -0
- package/dist/blast/blast.js +383 -0
- package/dist/blast/blast.js.map +1 -0
- package/dist/blast/diff.d.ts +53 -0
- package/dist/blast/diff.d.ts.map +1 -0
- package/dist/blast/diff.js +193 -0
- package/dist/blast/diff.js.map +1 -0
- package/dist/blast/evidence.d.ts +51 -0
- package/dist/blast/evidence.d.ts.map +1 -0
- package/dist/blast/evidence.js +162 -0
- package/dist/blast/evidence.js.map +1 -0
- package/dist/blast/modules.d.ts +33 -0
- package/dist/blast/modules.d.ts.map +1 -0
- package/dist/blast/modules.js +83 -0
- package/dist/blast/modules.js.map +1 -0
- package/dist/blast/name.d.ts +74 -0
- package/dist/blast/name.d.ts.map +1 -0
- package/dist/blast/name.js +269 -0
- package/dist/blast/name.js.map +1 -0
- package/dist/blast/owners.d.ts +85 -0
- package/dist/blast/owners.d.ts.map +1 -0
- package/dist/blast/owners.js +272 -0
- package/dist/blast/owners.js.map +1 -0
- package/dist/blast/render.d.ts +46 -0
- package/dist/blast/render.d.ts.map +1 -0
- package/dist/blast/render.js +422 -0
- package/dist/blast/render.js.map +1 -0
- package/dist/blast/viz.d.ts +37 -0
- package/dist/blast/viz.d.ts.map +1 -0
- package/dist/blast/viz.js +180 -0
- package/dist/blast/viz.js.map +1 -0
- package/dist/brand.d.ts +111 -0
- package/dist/brand.d.ts.map +1 -0
- package/dist/brand.js +282 -0
- package/dist/brand.js.map +1 -0
- package/dist/claude/build-progress.d.ts +30 -0
- package/dist/claude/build-progress.d.ts.map +1 -0
- package/dist/claude/build-progress.js +81 -0
- package/dist/claude/build-progress.js.map +1 -0
- package/dist/claude/hermes-skill-template.d.ts +16 -0
- package/dist/claude/hermes-skill-template.d.ts.map +1 -0
- package/dist/claude/hermes-skill-template.js +154 -0
- package/dist/claude/hermes-skill-template.js.map +1 -0
- package/dist/claude/init.d.ts +65 -0
- package/dist/claude/init.d.ts.map +1 -0
- package/dist/claude/init.js +258 -0
- package/dist/claude/init.js.map +1 -0
- package/dist/claude/paths.d.ts +9 -0
- package/dist/claude/paths.d.ts.map +1 -0
- package/dist/claude/paths.js +22 -0
- package/dist/claude/paths.js.map +1 -0
- package/dist/claude/session-metrics.d.ts +73 -0
- package/dist/claude/session-metrics.d.ts.map +1 -0
- package/dist/claude/session-metrics.js +209 -0
- package/dist/claude/session-metrics.js.map +1 -0
- package/dist/claude/settings-merge.d.ts +76 -0
- package/dist/claude/settings-merge.d.ts.map +1 -0
- package/dist/claude/settings-merge.js +283 -0
- package/dist/claude/settings-merge.js.map +1 -0
- package/dist/claude/skill-template.d.ts +13 -0
- package/dist/claude/skill-template.d.ts.map +1 -0
- package/dist/claude/skill-template.js +290 -0
- package/dist/claude/skill-template.js.map +1 -0
- package/dist/claude/state.d.ts +85 -0
- package/dist/claude/state.d.ts.map +1 -0
- package/dist/claude/state.js +88 -0
- package/dist/claude/state.js.map +1 -0
- package/dist/claude/stats.d.ts +5 -0
- package/dist/claude/stats.d.ts.map +1 -0
- package/dist/claude/stats.js +24 -0
- package/dist/claude/stats.js.map +1 -0
- package/dist/cli-epilogue.d.ts +12 -0
- package/dist/cli-epilogue.d.ts.map +1 -0
- package/dist/cli-epilogue.js +72 -0
- package/dist/cli-epilogue.js.map +1 -0
- package/dist/cli-meta.d.ts +82 -0
- package/dist/cli-meta.d.ts.map +1 -0
- package/dist/cli-meta.js +238 -0
- package/dist/cli-meta.js.map +1 -0
- package/dist/cli-picker.d.ts +139 -0
- package/dist/cli-picker.d.ts.map +1 -0
- package/dist/cli-picker.js +439 -0
- package/dist/cli-picker.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +1638 -0
- package/dist/cli.js.map +1 -0
- package/dist/context/batches.d.ts +29 -0
- package/dist/context/batches.d.ts.map +1 -0
- package/dist/context/batches.js +130 -0
- package/dist/context/batches.js.map +1 -0
- package/dist/context/build.d.ts +57 -0
- package/dist/context/build.d.ts.map +1 -0
- package/dist/context/build.js +396 -0
- package/dist/context/build.js.map +1 -0
- package/dist/context/check.d.ts +42 -0
- package/dist/context/check.d.ts.map +1 -0
- package/dist/context/check.js +162 -0
- package/dist/context/check.js.map +1 -0
- package/dist/context/map-dir.d.ts +13 -0
- package/dist/context/map-dir.d.ts.map +1 -0
- package/dist/context/map-dir.js +81 -0
- package/dist/context/map-dir.js.map +1 -0
- package/dist/context/node-file.d.ts +109 -0
- package/dist/context/node-file.d.ts.map +1 -0
- package/dist/context/node-file.js +390 -0
- package/dist/context/node-file.js.map +1 -0
- package/dist/context/price.d.ts +49 -0
- package/dist/context/price.d.ts.map +1 -0
- package/dist/context/price.js +83 -0
- package/dist/context/price.js.map +1 -0
- package/dist/context/savings.d.ts +67 -0
- package/dist/context/savings.d.ts.map +1 -0
- package/dist/context/savings.js +125 -0
- package/dist/context/savings.js.map +1 -0
- package/dist/engine.d.ts +85 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +122 -0
- package/dist/engine.js.map +1 -0
- package/dist/graph/bindings.d.ts +64 -0
- package/dist/graph/bindings.d.ts.map +1 -0
- package/dist/graph/bindings.js +713 -0
- package/dist/graph/bindings.js.map +1 -0
- package/dist/graph/build-run.d.ts +25 -0
- package/dist/graph/build-run.d.ts.map +1 -0
- package/dist/graph/build-run.js +121 -0
- package/dist/graph/build-run.js.map +1 -0
- package/dist/graph/build.d.ts +88 -0
- package/dist/graph/build.d.ts.map +1 -0
- package/dist/graph/build.js +386 -0
- package/dist/graph/build.js.map +1 -0
- package/dist/graph/cards.d.ts +46 -0
- package/dist/graph/cards.d.ts.map +1 -0
- package/dist/graph/cards.js +280 -0
- package/dist/graph/cards.js.map +1 -0
- package/dist/graph/check.d.ts +25 -0
- package/dist/graph/check.d.ts.map +1 -0
- package/dist/graph/check.js +192 -0
- package/dist/graph/check.js.map +1 -0
- package/dist/graph/container.d.ts +63 -0
- package/dist/graph/container.d.ts.map +1 -0
- package/dist/graph/container.js +191 -0
- package/dist/graph/container.js.map +1 -0
- package/dist/graph/depth-parser.d.ts +61 -0
- package/dist/graph/depth-parser.d.ts.map +1 -0
- package/dist/graph/depth-parser.js +153 -0
- package/dist/graph/depth-parser.js.map +1 -0
- package/dist/graph/enrich.d.ts +62 -0
- package/dist/graph/enrich.d.ts.map +1 -0
- package/dist/graph/enrich.js +258 -0
- package/dist/graph/enrich.js.map +1 -0
- package/dist/graph/extract-cache.d.ts +101 -0
- package/dist/graph/extract-cache.d.ts.map +1 -0
- package/dist/graph/extract-cache.js +199 -0
- package/dist/graph/extract-cache.js.map +1 -0
- package/dist/graph/extract.d.ts +85 -0
- package/dist/graph/extract.d.ts.map +1 -0
- package/dist/graph/extract.js +2377 -0
- package/dist/graph/extract.js.map +1 -0
- package/dist/graph/fingerprint.d.ts +76 -0
- package/dist/graph/fingerprint.d.ts.map +1 -0
- package/dist/graph/fingerprint.js +160 -0
- package/dist/graph/fingerprint.js.map +1 -0
- package/dist/graph/generic.d.ts +74 -0
- package/dist/graph/generic.d.ts.map +1 -0
- package/dist/graph/generic.js +773 -0
- package/dist/graph/generic.js.map +1 -0
- package/dist/graph/invariants.d.ts +33 -0
- package/dist/graph/invariants.d.ts.map +1 -0
- package/dist/graph/invariants.js +52 -0
- package/dist/graph/invariants.js.map +1 -0
- package/dist/graph/load.d.ts +29 -0
- package/dist/graph/load.d.ts.map +1 -0
- package/dist/graph/load.js +97 -0
- package/dist/graph/load.js.map +1 -0
- package/dist/graph/lsp/client.d.ts +61 -0
- package/dist/graph/lsp/client.d.ts.map +1 -0
- package/dist/graph/lsp/client.js +217 -0
- package/dist/graph/lsp/client.js.map +1 -0
- package/dist/graph/lsp/enrich.d.ts +11 -0
- package/dist/graph/lsp/enrich.d.ts.map +1 -0
- package/dist/graph/lsp/enrich.js +163 -0
- package/dist/graph/lsp/enrich.js.map +1 -0
- package/dist/graph/lsp/registry.d.ts +22 -0
- package/dist/graph/lsp/registry.d.ts.map +1 -0
- package/dist/graph/lsp/registry.js +71 -0
- package/dist/graph/lsp/registry.js.map +1 -0
- package/dist/graph/map.d.ts +107 -0
- package/dist/graph/map.d.ts.map +1 -0
- package/dist/graph/map.js +239 -0
- package/dist/graph/map.js.map +1 -0
- package/dist/graph/markdown.d.ts +22 -0
- package/dist/graph/markdown.d.ts.map +1 -0
- package/dist/graph/markdown.js +143 -0
- package/dist/graph/markdown.js.map +1 -0
- package/dist/graph/native.d.ts +46 -0
- package/dist/graph/native.d.ts.map +1 -0
- package/dist/graph/native.js +169 -0
- package/dist/graph/native.js.map +1 -0
- package/dist/graph/queries/c.scm +13 -0
- package/dist/graph/queries/c_sharp.scm +19 -0
- package/dist/graph/queries/clojure.scm +58 -0
- package/dist/graph/queries/cpp.scm +23 -0
- package/dist/graph/queries/dart.scm +42 -0
- package/dist/graph/queries/elixir.scm +54 -0
- package/dist/graph/queries/gleam.scm +51 -0
- package/dist/graph/queries/java.scm +20 -0
- package/dist/graph/queries/kotlin.scm +43 -0
- package/dist/graph/queries/lua.scm +36 -0
- package/dist/graph/queries/nix.scm +32 -0
- package/dist/graph/queries/php.scm +40 -0
- package/dist/graph/queries/ruby.scm +65 -0
- package/dist/graph/queries/rust.scm +41 -0
- package/dist/graph/queries/scala.scm +66 -0
- package/dist/graph/queries/solidity.scm +43 -0
- package/dist/graph/queries/swift.scm +51 -0
- package/dist/graph/refresh.d.ts +106 -0
- package/dist/graph/refresh.d.ts.map +1 -0
- package/dist/graph/refresh.js +430 -0
- package/dist/graph/refresh.js.map +1 -0
- package/dist/graph/relations.d.ts +14 -0
- package/dist/graph/relations.d.ts.map +1 -0
- package/dist/graph/relations.js +8 -0
- package/dist/graph/relations.js.map +1 -0
- package/dist/graph/resolve.d.ts +17 -0
- package/dist/graph/resolve.d.ts.map +1 -0
- package/dist/graph/resolve.js +716 -0
- package/dist/graph/resolve.js.map +1 -0
- package/dist/graph/root.d.ts +11 -0
- package/dist/graph/root.d.ts.map +1 -0
- package/dist/graph/root.js +40 -0
- package/dist/graph/root.js.map +1 -0
- package/dist/graph/scopes.d.ts +40 -0
- package/dist/graph/scopes.d.ts.map +1 -0
- package/dist/graph/scopes.js +383 -0
- package/dist/graph/scopes.js.map +1 -0
- package/dist/graph/seed.d.ts +38 -0
- package/dist/graph/seed.d.ts.map +1 -0
- package/dist/graph/seed.js +229 -0
- package/dist/graph/seed.js.map +1 -0
- package/dist/graph/source-files.d.ts +46 -0
- package/dist/graph/source-files.d.ts.map +1 -0
- package/dist/graph/source-files.js +118 -0
- package/dist/graph/source-files.js.map +1 -0
- package/dist/graph/traverse-cli.d.ts +55 -0
- package/dist/graph/traverse-cli.d.ts.map +1 -0
- package/dist/graph/traverse-cli.js +189 -0
- package/dist/graph/traverse-cli.js.map +1 -0
- package/dist/graph/traverse.d.ts +112 -0
- package/dist/graph/traverse.d.ts.map +1 -0
- package/dist/graph/traverse.js +192 -0
- package/dist/graph/traverse.js.map +1 -0
- package/dist/graph/types.d.ts +78 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +14 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/graph/wasm-runtime.d.ts +19 -0
- package/dist/graph/wasm-runtime.d.ts.map +1 -0
- package/dist/graph/wasm-runtime.js +38 -0
- package/dist/graph/wasm-runtime.js.map +1 -0
- package/dist/graph/workspace-cli.d.ts +56 -0
- package/dist/graph/workspace-cli.d.ts.map +1 -0
- package/dist/graph/workspace-cli.js +111 -0
- package/dist/graph/workspace-cli.js.map +1 -0
- package/dist/graph/workspace.d.ts +172 -0
- package/dist/graph/workspace.d.ts.map +1 -0
- package/dist/graph/workspace.js +714 -0
- package/dist/graph/workspace.js.map +1 -0
- package/dist/graph/write.d.ts +13 -0
- package/dist/graph/write.d.ts.map +1 -0
- package/dist/graph/write.js +86 -0
- package/dist/graph/write.js.map +1 -0
- package/dist/hosts/antigravity.d.ts +14 -0
- package/dist/hosts/antigravity.d.ts.map +1 -0
- package/dist/hosts/antigravity.js +59 -0
- package/dist/hosts/antigravity.js.map +1 -0
- package/dist/hosts/auto.d.ts +37 -0
- package/dist/hosts/auto.d.ts.map +1 -0
- package/dist/hosts/auto.js +141 -0
- package/dist/hosts/auto.js.map +1 -0
- package/dist/hosts/claude-global.d.ts +72 -0
- package/dist/hosts/claude-global.d.ts.map +1 -0
- package/dist/hosts/claude-global.js +230 -0
- package/dist/hosts/claude-global.js.map +1 -0
- package/dist/hosts/config-write.d.ts +36 -0
- package/dist/hosts/config-write.d.ts.map +1 -0
- package/dist/hosts/config-write.js +64 -0
- package/dist/hosts/config-write.js.map +1 -0
- package/dist/hosts/init.d.ts +28 -0
- package/dist/hosts/init.d.ts.map +1 -0
- package/dist/hosts/init.js +89 -0
- package/dist/hosts/init.js.map +1 -0
- package/dist/hosts/instructions.d.ts +14 -0
- package/dist/hosts/instructions.d.ts.map +1 -0
- package/dist/hosts/instructions.js +95 -0
- package/dist/hosts/instructions.js.map +1 -0
- package/dist/hosts/mcp-config.d.ts +78 -0
- package/dist/hosts/mcp-config.d.ts.map +1 -0
- package/dist/hosts/mcp-config.js +251 -0
- package/dist/hosts/mcp-config.js.map +1 -0
- package/dist/hosts/plan.d.ts +32 -0
- package/dist/hosts/plan.d.ts.map +1 -0
- package/dist/hosts/plan.js +73 -0
- package/dist/hosts/plan.js.map +1 -0
- package/dist/hosts/registry.d.ts +41 -0
- package/dist/hosts/registry.d.ts.map +1 -0
- package/dist/hosts/registry.js +164 -0
- package/dist/hosts/registry.js.map +1 -0
- package/dist/hosts/retract.d.ts +47 -0
- package/dist/hosts/retract.d.ts.map +1 -0
- package/dist/hosts/retract.js +520 -0
- package/dist/hosts/retract.js.map +1 -0
- package/dist/hosts/sections.d.ts +47 -0
- package/dist/hosts/sections.d.ts.map +1 -0
- package/dist/hosts/sections.js +127 -0
- package/dist/hosts/sections.js.map +1 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/ingest/fs.d.ts +79 -0
- package/dist/ingest/fs.d.ts.map +1 -0
- package/dist/ingest/fs.js +306 -0
- package/dist/ingest/fs.js.map +1 -0
- package/dist/init-guard.d.ts +16 -0
- package/dist/init-guard.d.ts.map +1 -0
- package/dist/init-guard.js +27 -0
- package/dist/init-guard.js.map +1 -0
- package/dist/mcp/instructions.d.ts +5 -0
- package/dist/mcp/instructions.d.ts.map +1 -0
- package/dist/mcp/instructions.js +64 -0
- package/dist/mcp/instructions.js.map +1 -0
- package/dist/mcp/kept-listing.d.ts +27 -0
- package/dist/mcp/kept-listing.d.ts.map +1 -0
- package/dist/mcp/kept-listing.js +63 -0
- package/dist/mcp/kept-listing.js.map +1 -0
- package/dist/mcp/server.d.ts +4 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +147 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tool-names.d.ts +27 -0
- package/dist/mcp/tool-names.d.ts.map +1 -0
- package/dist/mcp/tool-names.js +47 -0
- package/dist/mcp/tool-names.js.map +1 -0
- package/dist/mcp/tools.d.ts +22 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +440 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/node-version.d.ts +15 -0
- package/dist/node-version.d.ts.map +1 -0
- package/dist/node-version.js +23 -0
- package/dist/node-version.js.map +1 -0
- package/dist/search/grep-cli.d.ts +35 -0
- package/dist/search/grep-cli.d.ts.map +1 -0
- package/dist/search/grep-cli.js +115 -0
- package/dist/search/grep-cli.js.map +1 -0
- package/dist/search/grep.d.ts +60 -0
- package/dist/search/grep.d.ts.map +1 -0
- package/dist/search/grep.js +143 -0
- package/dist/search/grep.js.map +1 -0
- package/dist/search/ignored-code.d.ts +9 -0
- package/dist/search/ignored-code.d.ts.map +1 -0
- package/dist/search/ignored-code.js +73 -0
- package/dist/search/ignored-code.js.map +1 -0
- package/dist/search/user-regexp.d.ts +26 -0
- package/dist/search/user-regexp.d.ts.map +1 -0
- package/dist/search/user-regexp.js +150 -0
- package/dist/search/user-regexp.js.map +1 -0
- package/dist/telemetry/contract.d.ts +117 -0
- package/dist/telemetry/contract.d.ts.map +1 -0
- package/dist/telemetry/contract.js +341 -0
- package/dist/telemetry/contract.js.map +1 -0
- package/dist/telemetry/flush.d.ts +21 -0
- package/dist/telemetry/flush.d.ts.map +1 -0
- package/dist/telemetry/flush.js +85 -0
- package/dist/telemetry/flush.js.map +1 -0
- package/dist/telemetry/gate.d.ts +30 -0
- package/dist/telemetry/gate.d.ts.map +1 -0
- package/dist/telemetry/gate.js +81 -0
- package/dist/telemetry/gate.js.map +1 -0
- package/dist/telemetry/identity.d.ts +40 -0
- package/dist/telemetry/identity.d.ts.map +1 -0
- package/dist/telemetry/identity.js +80 -0
- package/dist/telemetry/identity.js.map +1 -0
- package/dist/telemetry/index.d.ts +18 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +16 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/key.d.ts +21 -0
- package/dist/telemetry/key.d.ts.map +1 -0
- package/dist/telemetry/key.js +49 -0
- package/dist/telemetry/key.js.map +1 -0
- package/dist/telemetry/notice.d.ts +19 -0
- package/dist/telemetry/notice.d.ts.map +1 -0
- package/dist/telemetry/notice.js +93 -0
- package/dist/telemetry/notice.js.map +1 -0
- package/dist/telemetry/queue.d.ts +35 -0
- package/dist/telemetry/queue.d.ts.map +1 -0
- package/dist/telemetry/queue.js +162 -0
- package/dist/telemetry/queue.js.map +1 -0
- package/dist/telemetry/send.d.ts +19 -0
- package/dist/telemetry/send.d.ts.map +1 -0
- package/dist/telemetry/send.js +84 -0
- package/dist/telemetry/send.js.map +1 -0
- package/dist/telemetry/sessions.d.ts +25 -0
- package/dist/telemetry/sessions.d.ts.map +1 -0
- package/dist/telemetry/sessions.js +104 -0
- package/dist/telemetry/sessions.js.map +1 -0
- package/dist/telemetry/track.d.ts +62 -0
- package/dist/telemetry/track.d.ts.map +1 -0
- package/dist/telemetry/track.js +143 -0
- package/dist/telemetry/track.js.map +1 -0
- package/dist/upkeep-run.d.ts +22 -0
- package/dist/upkeep-run.d.ts.map +1 -0
- package/dist/upkeep-run.js +85 -0
- package/dist/upkeep-run.js.map +1 -0
- package/dist/upkeep.d.ts +127 -0
- package/dist/upkeep.d.ts.map +1 -0
- package/dist/upkeep.js +252 -0
- package/dist/upkeep.js.map +1 -0
- package/dist/util/actions-folder.d.ts +2 -0
- package/dist/util/actions-folder.d.ts.map +1 -0
- package/dist/util/actions-folder.js +9 -0
- package/dist/util/actions-folder.js.map +1 -0
- package/dist/util/browser.d.ts +3 -0
- package/dist/util/browser.d.ts.map +1 -0
- package/dist/util/browser.js +14 -0
- package/dist/util/browser.js.map +1 -0
- package/dist/util/child-process.d.ts +15 -0
- package/dist/util/child-process.d.ts.map +1 -0
- package/dist/util/child-process.js +15 -0
- package/dist/util/child-process.js.map +1 -0
- package/dist/util/front-matter.d.ts +46 -0
- package/dist/util/front-matter.d.ts.map +1 -0
- package/dist/util/front-matter.js +113 -0
- package/dist/util/front-matter.js.map +1 -0
- package/dist/util/id.d.ts +7 -0
- package/dist/util/id.d.ts.map +1 -0
- package/dist/util/id.js +14 -0
- package/dist/util/id.js.map +1 -0
- package/dist/util/paths.d.ts +29 -0
- package/dist/util/paths.d.ts.map +1 -0
- package/dist/util/paths.js +71 -0
- package/dist/util/paths.js.map +1 -0
- package/dist/util/private-file.d.ts +14 -0
- package/dist/util/private-file.d.ts.map +1 -0
- package/dist/util/private-file.js +82 -0
- package/dist/util/private-file.js.map +1 -0
- package/dist/util/source.d.ts +4 -0
- package/dist/util/source.d.ts.map +1 -0
- package/dist/util/source.js +12 -0
- package/dist/util/source.js.map +1 -0
- package/dist/util/spinner.d.ts +15 -0
- package/dist/util/spinner.d.ts.map +1 -0
- package/dist/util/spinner.js +52 -0
- package/dist/util/spinner.js.map +1 -0
- package/dist/util/state.d.ts +120 -0
- package/dist/util/state.d.ts.map +1 -0
- package/dist/util/state.js +264 -0
- package/dist/util/state.js.map +1 -0
- package/dist/vendor/grammars/tree-sitter-go.LICENSE +21 -0
- package/dist/vendor/grammars/tree-sitter-go.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-java.LICENSE +21 -0
- package/dist/vendor/grammars/tree-sitter-java.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-kotlin.LICENSE +9 -0
- package/dist/vendor/grammars/tree-sitter-kotlin.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-php.LICENSE +22 -0
- package/dist/vendor/grammars/tree-sitter-php.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-python.LICENSE +21 -0
- package/dist/vendor/grammars/tree-sitter-python.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-r.LICENSE +9 -0
- package/dist/vendor/grammars/tree-sitter-r.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-swift.LICENSE +21 -0
- package/dist/vendor/grammars/tree-sitter-swift.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-tsx.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-typescript.LICENSE +21 -0
- package/dist/vendor/grammars/tree-sitter-typescript.wasm +0 -0
- package/dist/viewer/app.js +2 -0
- package/dist/viewer/index.html +49 -0
- package/dist/viewer/style.css +154 -0
- package/dist/viz/assemble.d.ts +83 -0
- package/dist/viz/assemble.d.ts.map +1 -0
- package/dist/viz/assemble.js +101 -0
- package/dist/viz/assemble.js.map +1 -0
- package/dist/viz/export.d.ts +39 -0
- package/dist/viz/export.d.ts.map +1 -0
- package/dist/viz/export.js +98 -0
- package/dist/viz/export.js.map +1 -0
- package/dist/viz/serve.d.ts +13 -0
- package/dist/viz/serve.d.ts.map +1 -0
- package/dist/viz/serve.js +130 -0
- package/dist/viz/serve.js.map +1 -0
- package/package.json +115 -4
- package/scripts/build-grammar-wasm.mjs +112 -0
- package/scripts/build-viewer.mjs +44 -0
- package/scripts/graph-quality.mjs +117 -0
- package/scripts/pack-trail.mjs +53 -0
- package/scripts/postinstall.mjs +65 -0
- package/scripts/run-tests.mjs +72 -0
- package/scripts/stamp-telemetry-key.mjs +56 -0
- package/scripts/tally-audit.mjs +140 -0
- package/scripts/vendor-grammars.mjs +53 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderers for a {@link BlastReport}: the Mermaid+markdown comment body a CI job
|
|
3
|
+
* posts, and a plain-text report for a terminal.
|
|
4
|
+
*
|
|
5
|
+
* The diagram is the product here — a reviewer should see which areas a change
|
|
6
|
+
* reaches, and whether its tests moved, before reading a single path — so the
|
|
7
|
+
* markdown leads with it and keeps every per-symbol list collapsed underneath.
|
|
8
|
+
* GitHub renders Mermaid natively in comments, so there is nothing to host.
|
|
9
|
+
*
|
|
10
|
+
* Both sides of the diagram are drawn at the same grain: areas, not files. The
|
|
11
|
+
* first version drew one box per changed file, which cannot fit a real PR (24 files
|
|
12
|
+
* against a cap of ten) and told a reviewer nothing per box — `src/graph/write.ts`
|
|
13
|
+
* on its own is not a unit anyone reasons about.
|
|
14
|
+
*/
|
|
15
|
+
import type { BlastReport } from "./blast.js";
|
|
16
|
+
/**
|
|
17
|
+
* The diagram: one circle per area that can be affected, and nothing else.
|
|
18
|
+
*
|
|
19
|
+
* Everything about the changed side is gone on purpose. Drawing which of your edits
|
|
20
|
+
* reaches which area is a many-to-many relation, so it can only ever render as a
|
|
21
|
+
* mesh — nine arrows over eleven circles at its tidiest — and the reviewer has to
|
|
22
|
+
* trace lines to read it. That relation still exists in the table's "Reached from"
|
|
23
|
+
* column, where a reader can look it up when they want it, so the picture is free
|
|
24
|
+
* to answer the only question it is asked at a glance: what can break?
|
|
25
|
+
*
|
|
26
|
+
* `TB`, not `LR`: with no edges, top-bottom is what lays unconnected nodes out as a
|
|
27
|
+
* row instead of a tall column.
|
|
28
|
+
*
|
|
29
|
+
* Returns null when there is nothing to draw — an empty diagram frame reads as a
|
|
30
|
+
* broken renderer, and the caller has a sentence for "no dependents found".
|
|
31
|
+
*/
|
|
32
|
+
export declare function mermaidDiagram(r: BlastReport): string | null;
|
|
33
|
+
/**
|
|
34
|
+
* The PR-comment body: diagram, then one table, then everything else collapsed.
|
|
35
|
+
*
|
|
36
|
+
* `root` is the repository the report was taken in. With it, the collapsed symbol
|
|
37
|
+
* list quotes the line that reaches the diff — the same line the hosted page shows,
|
|
38
|
+
* from the same helper. Without it the list is unchanged, so a caller that has no
|
|
39
|
+
* checkout (a test, a piped report) loses nothing but the snippet.
|
|
40
|
+
*/
|
|
41
|
+
export declare function markdownReport(r: BlastReport, opts?: {
|
|
42
|
+
root?: string;
|
|
43
|
+
}): string;
|
|
44
|
+
/** Terminal report: same content, no markdown scaffolding. */
|
|
45
|
+
export declare function textReport(r: BlastReport): string;
|
|
46
|
+
//# sourceMappingURL=render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/blast/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,WAAW,EAAqD,MAAM,YAAY,CAAC;AAqDjG;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAsB5D;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,CA6CnF;AA0PD,8DAA8D;AAC9D,wBAAgB,UAAU,CAAC,CAAC,EAAE,WAAW,GAAG,MAAM,CAuCjD"}
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import { fileReader, impactedEvidence, reachTerms } from "./evidence.js";
|
|
2
|
+
import { MAX_REVIEWERS, mention, sinceLabel } from "./owners.js";
|
|
3
|
+
import { brand, cmd } from "../brand.js";
|
|
4
|
+
/** Diagram cap. Everything past it folds into one aggregate circle carrying the
|
|
5
|
+
* dropped counts, so the picture shrinks but never lies. */
|
|
6
|
+
const MAX_MODULE_BOXES = 5;
|
|
7
|
+
/** Rows in the table under the diagram. */
|
|
8
|
+
const MAX_TABLE_ROWS = 6;
|
|
9
|
+
/** Symbols listed in the one collapsed list of everything. */
|
|
10
|
+
const MAX_SYMBOLS_LISTED = 60;
|
|
11
|
+
/** Rows in the collapsed ownership table. Past this it is a `git shortlog`, not a
|
|
12
|
+
* hint about who to ask. */
|
|
13
|
+
const MAX_OWNER_ROWS = 8;
|
|
14
|
+
/**
|
|
15
|
+
* A quoted Mermaid label. Every line is escaped on its own and only then joined
|
|
16
|
+
* with `<br/>` — escaping the joined string would eat the tag's own angle brackets
|
|
17
|
+
* and render the literal text "br/" inside the node.
|
|
18
|
+
*/
|
|
19
|
+
function label(...lines) {
|
|
20
|
+
return `"${lines.map(escapeLabel).join("<br/>")}"`;
|
|
21
|
+
}
|
|
22
|
+
/** Quotes end a Mermaid label, and angle brackets would inject markup into it. */
|
|
23
|
+
function escapeLabel(text) {
|
|
24
|
+
return text.replace(/"/g, "#quot;").replace(/</g, "<").replace(/>/g, ">");
|
|
25
|
+
}
|
|
26
|
+
const plural = (n, one, many = `${one}s`) => `${n} ${n === 1 ? one : many}`;
|
|
27
|
+
function depthLabel(depth) {
|
|
28
|
+
return Number.isFinite(depth) ? `depth ${depth}` : "full closure";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Node colours, taken from `graft viz`'s own palette (viewer/style.css) so the two
|
|
32
|
+
* pictures of the same graph read as one thing: teal is "depends on your change"
|
|
33
|
+
* (`--k-method`), grey is the overflow circle (`--edge`). One hue for one kind of
|
|
34
|
+
* thing, now that the diff itself is not drawn. Fill AND text colour are set
|
|
35
|
+
* explicitly, because a GitHub comment renders in either theme and a node that
|
|
36
|
+
* inherits one of them is illegible in the other.
|
|
37
|
+
*/
|
|
38
|
+
const VIZ = {
|
|
39
|
+
reachedFill: "#D9EDF3", reachedStroke: "#3AA7C9", reachedInk: "#0E313C",
|
|
40
|
+
tailFill: "#EEF2F3", tailStroke: "#9AA4A9", tailInk: "#3A4247",
|
|
41
|
+
};
|
|
42
|
+
/** The glyph carried on a changed circle. Meaning lives in the diagram's key. */
|
|
43
|
+
const TEST_GLYPH = { changed: "✓", stale: "⚠", none: "✗", na: "–" };
|
|
44
|
+
/**
|
|
45
|
+
* The diagram: one circle per area that can be affected, and nothing else.
|
|
46
|
+
*
|
|
47
|
+
* Everything about the changed side is gone on purpose. Drawing which of your edits
|
|
48
|
+
* reaches which area is a many-to-many relation, so it can only ever render as a
|
|
49
|
+
* mesh — nine arrows over eleven circles at its tidiest — and the reviewer has to
|
|
50
|
+
* trace lines to read it. That relation still exists in the table's "Reached from"
|
|
51
|
+
* column, where a reader can look it up when they want it, so the picture is free
|
|
52
|
+
* to answer the only question it is asked at a glance: what can break?
|
|
53
|
+
*
|
|
54
|
+
* `TB`, not `LR`: with no edges, top-bottom is what lays unconnected nodes out as a
|
|
55
|
+
* row instead of a tall column.
|
|
56
|
+
*
|
|
57
|
+
* Returns null when there is nothing to draw — an empty diagram frame reads as a
|
|
58
|
+
* broken renderer, and the caller has a sentence for "no dependents found".
|
|
59
|
+
*/
|
|
60
|
+
export function mermaidDiagram(r) {
|
|
61
|
+
const shown = r.modules.slice(0, MAX_MODULE_BOXES);
|
|
62
|
+
if (shown.length === 0)
|
|
63
|
+
return null;
|
|
64
|
+
const hidden = r.modules.slice(MAX_MODULE_BOXES);
|
|
65
|
+
const lines = ["flowchart TB"];
|
|
66
|
+
shown.forEach((m, i) => {
|
|
67
|
+
lines.push(` A${i}((${label(m.label, plural(m.symbols.length, "symbol"))}))`);
|
|
68
|
+
});
|
|
69
|
+
const TAIL = "AX";
|
|
70
|
+
if (hidden.length > 0) {
|
|
71
|
+
const symbols = hidden.reduce((n, m) => n + m.symbols.length, 0);
|
|
72
|
+
lines.push(` ${TAIL}((${label(plural(hidden.length, "smaller area"), plural(symbols, "symbol"))}))`);
|
|
73
|
+
}
|
|
74
|
+
lines.push(` classDef reached fill:${VIZ.reachedFill},stroke:${VIZ.reachedStroke},stroke-width:1.5px,color:${VIZ.reachedInk};`);
|
|
75
|
+
lines.push(` class ${shown.map((_, i) => `A${i}`).join(",")} reached;`);
|
|
76
|
+
if (hidden.length > 0) {
|
|
77
|
+
lines.push(` classDef tail fill:${VIZ.tailFill},stroke:${VIZ.tailStroke},stroke-width:1px,color:${VIZ.tailInk};`);
|
|
78
|
+
lines.push(` class ${TAIL} tail;`);
|
|
79
|
+
}
|
|
80
|
+
return lines.join("\n");
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The PR-comment body: diagram, then one table, then everything else collapsed.
|
|
84
|
+
*
|
|
85
|
+
* `root` is the repository the report was taken in. With it, the collapsed symbol
|
|
86
|
+
* list quotes the line that reaches the diff — the same line the hosted page shows,
|
|
87
|
+
* from the same helper. Without it the list is unchanged, so a caller that has no
|
|
88
|
+
* checkout (a test, a piped report) loses nothing but the snippet.
|
|
89
|
+
*/
|
|
90
|
+
export function markdownReport(r, opts = {}) {
|
|
91
|
+
const out = [];
|
|
92
|
+
const symbols = r.modules.reduce((n, m) => n + m.symbols.length, 0);
|
|
93
|
+
out.push(`### 🌱 ${brand()} blast radius`);
|
|
94
|
+
out.push("");
|
|
95
|
+
out.push(headline(r, symbols));
|
|
96
|
+
const testLine = testHeadline(r);
|
|
97
|
+
if (testLine)
|
|
98
|
+
out.push(testLine);
|
|
99
|
+
// Above the diagram on purpose: it is the one line in this comment the author
|
|
100
|
+
// ACTS on rather than reads, and it costs a single row before the picture.
|
|
101
|
+
const tag = tagLine(r);
|
|
102
|
+
if (tag)
|
|
103
|
+
out.push(tag);
|
|
104
|
+
if (symbols > 0) {
|
|
105
|
+
const diagram = mermaidDiagram(r);
|
|
106
|
+
if (diagram) {
|
|
107
|
+
out.push("");
|
|
108
|
+
out.push("```mermaid");
|
|
109
|
+
out.push(diagram);
|
|
110
|
+
out.push("```");
|
|
111
|
+
}
|
|
112
|
+
out.push("");
|
|
113
|
+
out.push(...impactTable(r));
|
|
114
|
+
}
|
|
115
|
+
const owners = ownerSection(r);
|
|
116
|
+
if (owners.length > 0) {
|
|
117
|
+
out.push("");
|
|
118
|
+
out.push(...owners);
|
|
119
|
+
}
|
|
120
|
+
out.push("");
|
|
121
|
+
const reach = reachTerms(r.seeds, r.changed);
|
|
122
|
+
const read = fileReader(opts.root);
|
|
123
|
+
out.push(...detailSections(r, symbols, (s) => impactedEvidence(s, reach, read)));
|
|
124
|
+
const caveats = caveatLines(r);
|
|
125
|
+
if (caveats.length > 0) {
|
|
126
|
+
out.push("");
|
|
127
|
+
for (const line of caveats)
|
|
128
|
+
out.push(line);
|
|
129
|
+
}
|
|
130
|
+
out.push("");
|
|
131
|
+
out.push(`<sub>\`${cmd("graft blast")}\` · ${r.basis} · ${depthLabel(r.depth)} · ${plural(r.changed.length, "changed file")}</sub>`);
|
|
132
|
+
return out.join("\n") + "\n";
|
|
133
|
+
}
|
|
134
|
+
function headline(r, symbols) {
|
|
135
|
+
const areas = plural(r.areas.length, "area");
|
|
136
|
+
if (symbols === 0) {
|
|
137
|
+
return `**Nothing outside this diff depends on it.** ${areas} changed; no indexed dependents at ${depthLabel(r.depth)}.`;
|
|
138
|
+
}
|
|
139
|
+
return `**${areas} changed → ${plural(r.modules.length, "area")} can be affected.** ${plural(symbols, "dependent symbol")}, ${depthLabel(r.depth)}.`;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* One sentence on whether the diff brought its tests. Leads with the areas that
|
|
143
|
+
* have no tests at all, since that is the only state worth a reviewer's comment.
|
|
144
|
+
*/
|
|
145
|
+
function testHeadline(r) {
|
|
146
|
+
if (r.areas.length === 0)
|
|
147
|
+
return null;
|
|
148
|
+
const none = r.areas.filter((a) => a.tests === "none");
|
|
149
|
+
const stale = r.areas.filter((a) => a.tests === "stale");
|
|
150
|
+
const changed = r.areas.filter((a) => a.tests === "changed");
|
|
151
|
+
const parts = [];
|
|
152
|
+
if (none.length > 0)
|
|
153
|
+
parts.push(`**no test reaches ${none.map((a) => a.label).join(", ")}**`);
|
|
154
|
+
if (stale.length > 0)
|
|
155
|
+
parts.push(`${stale.map((a) => a.label).join(", ")} ${stale.length === 1 ? "has tests" : "have tests"} the diff did not touch`);
|
|
156
|
+
if (changed.length > 0)
|
|
157
|
+
parts.push(`${plural(changed.length, "area")} updated ${changed.length === 1 ? "its" : "their"} tests`);
|
|
158
|
+
if (parts.length === 0)
|
|
159
|
+
return null;
|
|
160
|
+
return `Tests: ${parts.join("; ")}.`;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* The table replaces 31 collapsed sections that held one bullet each. One row per
|
|
164
|
+
* affected area, with the nearest symbol to start reading at — a reviewer wants a
|
|
165
|
+
* place to look, not an inventory.
|
|
166
|
+
*/
|
|
167
|
+
function impactTable(r) {
|
|
168
|
+
const shown = r.modules.slice(0, MAX_TABLE_ROWS);
|
|
169
|
+
const hidden = r.modules.slice(MAX_TABLE_ROWS);
|
|
170
|
+
const areaOf = new Map();
|
|
171
|
+
for (const a of r.areas)
|
|
172
|
+
for (const f of a.files)
|
|
173
|
+
areaOf.set(f, a.label);
|
|
174
|
+
const rows = ["| Can be affected | Symbols | Nearest hop | Reached from |", "| --- | --: | --- | --- |"];
|
|
175
|
+
for (const mod of shown) {
|
|
176
|
+
const nearest = mod.symbols[0];
|
|
177
|
+
const hop = nearest ? `\`${nearest.path}:${nearest.span}\` ${nearest.name} — ${nearest.relation}, depth ${nearest.depth}` : "—";
|
|
178
|
+
// Two names, then a count. Six area names in one cell is what turned this
|
|
179
|
+
// column into a wall wider than the rest of the table put together.
|
|
180
|
+
const names = [...new Set(mod.from.map((f) => areaOf.get(f) ?? f))];
|
|
181
|
+
const from = names.length === 0 ? "—"
|
|
182
|
+
: names.length <= 2 ? names.join(", ")
|
|
183
|
+
: `${names.slice(0, 2).join(", ")} +${names.length - 2}`;
|
|
184
|
+
rows.push(`| ${mod.label} | ${mod.symbols.length} | ${hop} | ${from} |`);
|
|
185
|
+
}
|
|
186
|
+
if (hidden.length > 0) {
|
|
187
|
+
const symbols = hidden.reduce((n, m) => n + m.symbols.length, 0);
|
|
188
|
+
rows.push(`| _${plural(hidden.length, "smaller area")}_ | ${symbols} | ${hidden.slice(0, 3).map((m) => m.label).join(", ")}${hidden.length > 3 ? ", …" : ""} | see below |`);
|
|
189
|
+
}
|
|
190
|
+
return rows;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* The tag line: who to ask, and why them.
|
|
194
|
+
*
|
|
195
|
+
* A handle is printed only where git carried one — `mention` never invents an
|
|
196
|
+
* `@`, because a guessed mention pings a stranger who has nothing to do with the
|
|
197
|
+
* change. A bare name is bolded instead, so it still reads as a person.
|
|
198
|
+
*
|
|
199
|
+
* Null on a repository where the author is the only name in the history: an
|
|
200
|
+
* empty "Tag:" is worse than no line, and every solo project would carry one.
|
|
201
|
+
*/
|
|
202
|
+
function tagLine(r) {
|
|
203
|
+
const people = r.reviewers ?? [];
|
|
204
|
+
if (people.length === 0)
|
|
205
|
+
return null;
|
|
206
|
+
const total = r.areas.length + r.modules.length;
|
|
207
|
+
const bits = people.map((p) => {
|
|
208
|
+
const who = p.handle !== undefined ? `@${p.handle}` : `**${p.name}**`;
|
|
209
|
+
// Three or more areas is a count, not a list: naming eleven of them turns the
|
|
210
|
+
// one actionable line in the comment into the longest paragraph in it.
|
|
211
|
+
const why = p.areas.length >= 3 ? `${p.areas.length} of ${total} areas` : p.areas.join(", ");
|
|
212
|
+
return `${who} — ${why}`;
|
|
213
|
+
});
|
|
214
|
+
return `Tag: ${bits.join(" · ")}`;
|
|
215
|
+
}
|
|
216
|
+
/** `Dana Reyes — 57 commits, last 9d ago`, for one cell of the table. */
|
|
217
|
+
function ownerCell(owners, now) {
|
|
218
|
+
if (owners === undefined || owners.length === 0) {
|
|
219
|
+
// Said in words rather than left blank: "nobody else" is a real answer, and an
|
|
220
|
+
// empty cell reads as a renderer that failed.
|
|
221
|
+
return "_only you — nobody else has touched these files_";
|
|
222
|
+
}
|
|
223
|
+
return owners
|
|
224
|
+
.map((o) => `${mention(o)} — ${plural(o.commits, "commit")}, last ${sinceLabel(o.last, now)}`)
|
|
225
|
+
.join(" · ");
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* The collapsed evidence behind the tag line: one row per area, both sides.
|
|
229
|
+
*
|
|
230
|
+
* Kept collapsed and kept below the impact table because it justifies a decision
|
|
231
|
+
* the author has already been handed at the top. Nothing here is a gate — the
|
|
232
|
+
* caveat says so, since a table of names next to a diff invites being read as
|
|
233
|
+
* CODEOWNERS.
|
|
234
|
+
*/
|
|
235
|
+
function ownerSection(r) {
|
|
236
|
+
if (r.reviewers === undefined)
|
|
237
|
+
return []; // taken outside a git repository
|
|
238
|
+
const rows = [
|
|
239
|
+
...r.areas.map((a) => ({ label: a.label, side: "changed", owners: a.owners })),
|
|
240
|
+
...r.modules.map((m) => ({ label: m.label, side: "affected", owners: m.owners })),
|
|
241
|
+
];
|
|
242
|
+
const named = rows.filter((row) => (row.owners?.length ?? 0) > 0);
|
|
243
|
+
if (named.length === 0)
|
|
244
|
+
return [];
|
|
245
|
+
const now = Date.now();
|
|
246
|
+
const people = new Set();
|
|
247
|
+
for (const row of rows)
|
|
248
|
+
for (const o of row.owners ?? [])
|
|
249
|
+
people.add(o.handle ?? o.name);
|
|
250
|
+
const out = ["<details>"];
|
|
251
|
+
out.push(`<summary><strong>Who knows this code</strong> — ${plural(people.size, "person", "people")} ` +
|
|
252
|
+
`across ${plural(rows.length, "area")}</summary>`);
|
|
253
|
+
out.push("");
|
|
254
|
+
out.push("| Area | Who knows it |");
|
|
255
|
+
out.push("| --- | --- |");
|
|
256
|
+
// Areas with names first: a row saying "only you" is context, not an answer, so
|
|
257
|
+
// it must never be what the cap spends its budget on.
|
|
258
|
+
const ordered = [...named, ...rows.filter((row) => !named.includes(row))];
|
|
259
|
+
for (const row of ordered.slice(0, MAX_OWNER_ROWS)) {
|
|
260
|
+
out.push(`| **${row.label}** · ${row.side} | ${ownerCell(row.owners, now)} |`);
|
|
261
|
+
}
|
|
262
|
+
if (ordered.length > MAX_OWNER_ROWS) {
|
|
263
|
+
out.push(`| _…${plural(ordered.length - MAX_OWNER_ROWS, "further area")}_ | |`);
|
|
264
|
+
}
|
|
265
|
+
out.push("");
|
|
266
|
+
out.push("_Ownership is git history over each area's own files, weighted towards recent work " +
|
|
267
|
+
"(120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. " +
|
|
268
|
+
"A name with no `@` has no GitHub handle in its commit email — tag them by hand, or add a " +
|
|
269
|
+
"`.mailmap` entry. A suggestion from history, not a CODEOWNERS rule._");
|
|
270
|
+
out.push("");
|
|
271
|
+
out.push("</details>");
|
|
272
|
+
return out;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Everything a reviewer might want and nobody reads by default, in three sections.
|
|
276
|
+
*
|
|
277
|
+
* The blank line after each `</summary>` is required: GitHub renders no markdown
|
|
278
|
+
* inside a details block without it, and `<strong>` rather than `**` because it
|
|
279
|
+
* processes no emphasis inside `<summary>` either.
|
|
280
|
+
*/
|
|
281
|
+
function detailSections(r, symbols, evidence) {
|
|
282
|
+
const out = [];
|
|
283
|
+
if (symbols > 0) {
|
|
284
|
+
out.push("<details>");
|
|
285
|
+
out.push(`<summary><strong>All ${plural(symbols, "dependent symbol")}</strong>, grouped by area</summary>`);
|
|
286
|
+
out.push("");
|
|
287
|
+
let listed = 0;
|
|
288
|
+
for (const mod of r.modules) {
|
|
289
|
+
out.push(`**${mod.label}** — ${plural(mod.symbols.length, "symbol")} in ${plural(mod.files.length, "file")}`);
|
|
290
|
+
out.push("");
|
|
291
|
+
for (const s of mod.symbols) {
|
|
292
|
+
if (listed++ >= MAX_SYMBOLS_LISTED)
|
|
293
|
+
break;
|
|
294
|
+
out.push(`- \`${s.path}:${s.span}\` — ${s.name} (${s.relation}, depth ${s.depth})`);
|
|
295
|
+
// The line that reaches the diff, quoted from the same helper the hosted
|
|
296
|
+
// panel uses — a comment that disagreed with the page it links to would be
|
|
297
|
+
// worse than one that said less. Collapsed, so the comment stays short.
|
|
298
|
+
const [line] = evidence?.(s)?.lines ?? [];
|
|
299
|
+
if (line)
|
|
300
|
+
out.push(` \`\`\`${line.n}: ${line.text.trim()}\`\`\``);
|
|
301
|
+
}
|
|
302
|
+
out.push("");
|
|
303
|
+
if (listed >= MAX_SYMBOLS_LISTED) {
|
|
304
|
+
out.push(`…${plural(symbols - listed, "further symbol")} not listed.`);
|
|
305
|
+
out.push("");
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
out.push("</details>");
|
|
310
|
+
}
|
|
311
|
+
if (r.areas.length > 0) {
|
|
312
|
+
const by = (s) => r.areas.filter((a) => a.tests === s).length;
|
|
313
|
+
const states = [
|
|
314
|
+
by("changed") > 0 ? `${by("changed")} ✓` : "",
|
|
315
|
+
by("stale") > 0 ? `${by("stale")} ⚠` : "",
|
|
316
|
+
by("none") > 0 ? `${by("none")} ✗` : "",
|
|
317
|
+
by("na") > 0 ? `${by("na")} –` : "",
|
|
318
|
+
].filter(Boolean).join(" · ");
|
|
319
|
+
out.push("<details>");
|
|
320
|
+
out.push(`<summary><strong>Test signal</strong> per changed area — ${states}</summary>`);
|
|
321
|
+
out.push("");
|
|
322
|
+
// The caveat leads, because the ratios below invite being read as coverage: a
|
|
323
|
+
// test that drives the CLI in a subprocess produces no edge at all, so a
|
|
324
|
+
// well-tested area can honestly report 1 of 25.
|
|
325
|
+
out.push("_Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate._");
|
|
326
|
+
out.push("");
|
|
327
|
+
for (const a of r.areas) {
|
|
328
|
+
const bits = a.behavioural > 0 ? [`${a.reached} of ${a.behavioural} reached`] : [];
|
|
329
|
+
if (a.changedTestFiles.length > 0)
|
|
330
|
+
bits.push(`${plural(a.changedTestFiles.length, "test file")} changed here: ${a.changedTestFiles.map((f) => `\`${f}\``).join(", ")}`);
|
|
331
|
+
else if (a.testFiles.length > 0)
|
|
332
|
+
bits.push(`${plural(a.testFiles.length, "test file")} ${a.testFiles.length === 1 ? "reaches" : "reach"} it, none changed here`);
|
|
333
|
+
else if (a.behavioural > 0)
|
|
334
|
+
bits.push("no test file reaches it");
|
|
335
|
+
else
|
|
336
|
+
bits.push("no function, method or class changed here");
|
|
337
|
+
out.push(`- ${TEST_GLYPH[a.tests]} **${a.label}** — ${bits.join(" · ")}`);
|
|
338
|
+
if (a.unreached.length > 0) {
|
|
339
|
+
out.push(` - not reached: ${a.unreached.slice(0, 8).map((n) => `\`${n}\``).join(", ")}${a.unreached.length > 8 ? `, …${a.unreached.length - 8} more` : ""}`);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
out.push("");
|
|
343
|
+
out.push("</details>");
|
|
344
|
+
}
|
|
345
|
+
if (r.testModules.length > 0) {
|
|
346
|
+
const symbolCount = r.testModules.reduce((n, m) => n + m.symbols.length, 0);
|
|
347
|
+
const files = new Set(r.testModules.flatMap((m) => m.files));
|
|
348
|
+
out.push("<details>");
|
|
349
|
+
out.push(`<summary>${plural(files.size, "test suite")} also ${files.size === 1 ? "references" : "reference"} this code</summary>`);
|
|
350
|
+
out.push("");
|
|
351
|
+
out.push(`${plural(symbolCount, "symbol")}, kept out of the diagram and the table so they cannot crowd out the areas a reviewer has to look at.`);
|
|
352
|
+
out.push("");
|
|
353
|
+
for (const f of [...files].sort().slice(0, 20))
|
|
354
|
+
out.push(`- \`${f}\``);
|
|
355
|
+
if (files.size > 20)
|
|
356
|
+
out.push(`- …${files.size - 20} more`);
|
|
357
|
+
out.push("");
|
|
358
|
+
out.push("</details>");
|
|
359
|
+
}
|
|
360
|
+
return out;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* What the report cannot see. These are the lines that keep a diagram honest: a
|
|
364
|
+
* reader who is not told that four changed files are unindexed will read "no
|
|
365
|
+
* dependents" as "safe".
|
|
366
|
+
*/
|
|
367
|
+
function caveatLines(r) {
|
|
368
|
+
const out = [];
|
|
369
|
+
if (r.deleted.length > 0) {
|
|
370
|
+
out.push(`⚠️ ${plural(r.deleted.length, "deleted file")} (${r.deleted.slice(0, 5).join(", ")}) — ` +
|
|
371
|
+
"their dependents cannot be computed from a graph built at this commit, since the files are gone from it.");
|
|
372
|
+
}
|
|
373
|
+
if (r.unindexed.length > 0) {
|
|
374
|
+
out.push(`⚠️ ${plural(r.unindexed.length, "changed file")} not in the graph (${r.unindexed.slice(0, 5).join(", ")}) — ` +
|
|
375
|
+
"no parser claims the extension, or the index predates the file.");
|
|
376
|
+
}
|
|
377
|
+
return out;
|
|
378
|
+
}
|
|
379
|
+
/** Terminal report: same content, no markdown scaffolding. */
|
|
380
|
+
export function textReport(r) {
|
|
381
|
+
const symbols = r.modules.reduce((n, m) => n + m.symbols.length, 0);
|
|
382
|
+
const lines = [
|
|
383
|
+
`blast radius — ${r.basis} (${depthLabel(r.depth)})`,
|
|
384
|
+
` changed: ${plural(r.changed.length, "file")} in ${plural(r.areas.length, "area")}, ${plural(r.seeds.length, "seed symbol")}`,
|
|
385
|
+
` impacted: ${plural(symbols, "symbol")} in ${plural(r.modules.length, "area")}`,
|
|
386
|
+
"",
|
|
387
|
+
];
|
|
388
|
+
for (const a of r.areas) {
|
|
389
|
+
lines.push(`${TEST_GLYPH[a.tests]} ${a.label} — ${plural(a.files.length, "changed file")}, ${a.reached}/${a.behavioural} reached by a test`);
|
|
390
|
+
}
|
|
391
|
+
if (r.areas.length > 0)
|
|
392
|
+
lines.push("");
|
|
393
|
+
for (const mod of r.modules) {
|
|
394
|
+
lines.push(`${mod.label} — ${plural(mod.symbols.length, "symbol")} in ${plural(mod.files.length, "file")}`);
|
|
395
|
+
for (const s of mod.symbols.slice(0, 25)) {
|
|
396
|
+
lines.push(` ${s.relation} ← ${s.name} (${s.path}:${s.span}) [depth ${s.depth}]`);
|
|
397
|
+
}
|
|
398
|
+
const hidden = mod.symbols.length - 25;
|
|
399
|
+
if (hidden > 0)
|
|
400
|
+
lines.push(` …${plural(hidden, "more symbol")}`);
|
|
401
|
+
lines.push("");
|
|
402
|
+
}
|
|
403
|
+
if (symbols === 0)
|
|
404
|
+
lines.push("no indexed dependents outside the changed files themselves", "");
|
|
405
|
+
if (r.testModules.length > 0) {
|
|
406
|
+
const files = new Set(r.testModules.flatMap((m) => m.files));
|
|
407
|
+
lines.push(`${plural(files.size, "test suite")} also ${files.size === 1 ? "references" : "reference"} this code (not listed)`, "");
|
|
408
|
+
}
|
|
409
|
+
if (r.reviewers !== undefined && r.reviewers.length > 0) {
|
|
410
|
+
const now = Date.now();
|
|
411
|
+
lines.push("who to tag");
|
|
412
|
+
for (const p of r.reviewers.slice(0, MAX_REVIEWERS)) {
|
|
413
|
+
const why = p.areas.length >= 3 ? `${p.areas.length} areas` : p.areas.join(", ");
|
|
414
|
+
lines.push(` ${mention(p)} — ${why} · ${plural(p.commits, "commit")}, last ${sinceLabel(p.last, now)}`);
|
|
415
|
+
}
|
|
416
|
+
lines.push("");
|
|
417
|
+
}
|
|
418
|
+
for (const line of caveatLines(r))
|
|
419
|
+
lines.push(line.replace(/⚠️ /, "⚠ "), "");
|
|
420
|
+
return lines.join("\n").replace(/\n+$/, "\n");
|
|
421
|
+
}
|
|
422
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/blast/render.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,OA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C,IAAI,CAAC,YAAY,CAAC,CAAC;QACzB,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC;YACpD,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjF,KAAK,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,MAAM,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,UAAU,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QAC3G,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,CAAC,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7E,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The blast radius as a graph the viewer can draw — the hosted half of the PR
|
|
3
|
+
* comment.
|
|
4
|
+
*
|
|
5
|
+
* The comment can hold about five circles before it stops being readable, and it
|
|
6
|
+
* can never answer the reviewer's next question: which symbols, at which lines,
|
|
7
|
+
* and what did they actually become. `graft viz --export` already produces a
|
|
8
|
+
* self-contained page, but its Context tab is assembled from the deep tier's
|
|
9
|
+
* concept files, which the PR path deliberately no longer builds — so on a
|
|
10
|
+
* structural build that tab held a single INDEX dot.
|
|
11
|
+
*
|
|
12
|
+
* This closes that gap with no new data and no LLM pass: `blast` has already
|
|
13
|
+
* clustered both sides of the diff and named them (cached, one call), so the same
|
|
14
|
+
* report is emitted here as {@link VizGraph} — amber node per changed area, blue
|
|
15
|
+
* node per affected area, one edge per attribution the walk actually recorded.
|
|
16
|
+
*
|
|
17
|
+
* Each node also carries {@link Evidence}: the changed side shows its hunks, the
|
|
18
|
+
* affected side shows the line that reaches the diff. Both come from data already
|
|
19
|
+
* on hand — git's patch, and the file on disk — so the panel costs nothing.
|
|
20
|
+
*/
|
|
21
|
+
import type { VizGraph } from "../viz/assemble.js";
|
|
22
|
+
import type { BlastReport } from "./blast.js";
|
|
23
|
+
/**
|
|
24
|
+
* Build the viewer graph for a report.
|
|
25
|
+
*
|
|
26
|
+
* `root` is the repository the report was taken in; without it the affected side
|
|
27
|
+
* loses its snippets — there is nothing to read — but keeps everything else, which
|
|
28
|
+
* is what a unit test wants.
|
|
29
|
+
*
|
|
30
|
+
* Nothing is capped at the graph level. The caps in the markdown renderer exist
|
|
31
|
+
* because a Mermaid diagram inside a comment cannot lay out more than a handful of
|
|
32
|
+
* circles; this page is force-directed and pannable, which is why it exists.
|
|
33
|
+
*/
|
|
34
|
+
export declare function blastVizGraph(r: BlastReport, opts?: {
|
|
35
|
+
root?: string;
|
|
36
|
+
}): VizGraph;
|
|
37
|
+
//# sourceMappingURL=viz.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viz.d.ts","sourceRoot":"","sources":["../../src/blast/viz.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAgC,QAAQ,EAAW,MAAM,oBAAoB,CAAC;AAC1F,OAAO,KAAK,EAAE,WAAW,EAAiD,MAAM,YAAY,CAAC;AAyI7F;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,QAAQ,CAoDpF"}
|