@untangle-code/cli 0.0.0-stage → 0.1.1
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 +661 -0
- package/NOTICE +90 -0
- package/README.md +451 -2
- package/THIRD_PARTY_LICENSES.md +152 -0
- package/dist/cli/args.d.ts +48 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +167 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/command.d.ts +69 -0
- package/dist/cli/command.d.ts.map +1 -0
- package/dist/cli/command.js +82 -0
- package/dist/cli/command.js.map +1 -0
- package/dist/cli/deadline.d.ts +33 -0
- package/dist/cli/deadline.d.ts.map +1 -0
- package/dist/cli/deadline.js +49 -0
- package/dist/cli/deadline.js.map +1 -0
- package/dist/cli/embedder-deadline.d.ts +72 -0
- package/dist/cli/embedder-deadline.d.ts.map +1 -0
- package/dist/cli/embedder-deadline.js +117 -0
- package/dist/cli/embedder-deadline.js.map +1 -0
- package/dist/cli/exit.d.ts +71 -0
- package/dist/cli/exit.d.ts.map +1 -0
- package/dist/cli/exit.js +81 -0
- package/dist/cli/exit.js.map +1 -0
- package/dist/cli/graphs.d.ts +65 -0
- package/dist/cli/graphs.d.ts.map +1 -0
- package/dist/cli/graphs.js +108 -0
- package/dist/cli/graphs.js.map +1 -0
- package/dist/cli/index-freshness.d.ts +13 -0
- package/dist/cli/index-freshness.d.ts.map +1 -0
- package/dist/cli/index-freshness.js +226 -0
- package/dist/cli/index-freshness.js.map +1 -0
- package/dist/cli/index-refresh.d.ts +10 -0
- package/dist/cli/index-refresh.d.ts.map +1 -0
- package/dist/cli/index-refresh.js +76 -0
- package/dist/cli/index-refresh.js.map +1 -0
- package/dist/cli/index-state.d.ts +184 -0
- package/dist/cli/index-state.d.ts.map +1 -0
- package/dist/cli/index-state.js +852 -0
- package/dist/cli/index-state.js.map +1 -0
- package/dist/cli/io.d.ts +29 -0
- package/dist/cli/io.d.ts.map +1 -0
- package/dist/cli/io.js +42 -0
- package/dist/cli/io.js.map +1 -0
- package/dist/cli/language-support.d.ts +77 -0
- package/dist/cli/language-support.d.ts.map +1 -0
- package/dist/cli/language-support.js +152 -0
- package/dist/cli/language-support.js.map +1 -0
- package/dist/cli/renewing-lease.d.ts +26 -0
- package/dist/cli/renewing-lease.d.ts.map +1 -0
- package/dist/cli/renewing-lease.js +102 -0
- package/dist/cli/renewing-lease.js.map +1 -0
- package/dist/cli/search-graph-enrichment.d.ts +16 -0
- package/dist/cli/search-graph-enrichment.d.ts.map +1 -0
- package/dist/cli/search-graph-enrichment.js +428 -0
- package/dist/cli/search-graph-enrichment.js.map +1 -0
- package/dist/cli/system.d.ts +34 -0
- package/dist/cli/system.d.ts.map +1 -0
- package/dist/cli/system.js +89 -0
- package/dist/cli/system.js.map +1 -0
- package/dist/cli/vector-store-policy.d.ts +116 -0
- package/dist/cli/vector-store-policy.d.ts.map +1 -0
- package/dist/cli/vector-store-policy.js +160 -0
- package/dist/cli/vector-store-policy.js.map +1 -0
- package/dist/cli/version.d.ts +3 -0
- package/dist/cli/version.d.ts.map +1 -0
- package/dist/cli/version.js +3 -0
- package/dist/cli/version.js.map +1 -0
- package/dist/cli/workspace.d.ts +105 -0
- package/dist/cli/workspace.d.ts.map +1 -0
- package/dist/cli/workspace.js +215 -0
- package/dist/cli/workspace.js.map +1 -0
- package/dist/commands/complexity.d.ts +72 -0
- package/dist/commands/complexity.d.ts.map +1 -0
- package/dist/commands/complexity.js +580 -0
- package/dist/commands/complexity.js.map +1 -0
- package/dist/commands/doctor.d.ts +66 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +764 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/doctor.languages.d.ts +37 -0
- package/dist/commands/doctor.languages.d.ts.map +1 -0
- package/dist/commands/doctor.languages.js +143 -0
- package/dist/commands/doctor.languages.js.map +1 -0
- package/dist/commands/doctor.storage.d.ts +17 -0
- package/dist/commands/doctor.storage.d.ts.map +1 -0
- package/dist/commands/doctor.storage.js +91 -0
- package/dist/commands/doctor.storage.js.map +1 -0
- package/dist/commands/extensions/add.d.ts +10 -0
- package/dist/commands/extensions/add.d.ts.map +1 -0
- package/dist/commands/extensions/add.js +213 -0
- package/dist/commands/extensions/add.js.map +1 -0
- package/dist/commands/extensions/configure.d.ts +5 -0
- package/dist/commands/extensions/configure.d.ts.map +1 -0
- package/dist/commands/extensions/configure.js +58 -0
- package/dist/commands/extensions/configure.js.map +1 -0
- package/dist/commands/extensions/container.d.ts +15 -0
- package/dist/commands/extensions/container.d.ts.map +1 -0
- package/dist/commands/extensions/container.js +135 -0
- package/dist/commands/extensions/container.js.map +1 -0
- package/dist/commands/extensions/context.d.ts +37 -0
- package/dist/commands/extensions/context.d.ts.map +1 -0
- package/dist/commands/extensions/context.js +72 -0
- package/dist/commands/extensions/context.js.map +1 -0
- package/dist/commands/extensions/enable.d.ts +6 -0
- package/dist/commands/extensions/enable.d.ts.map +1 -0
- package/dist/commands/extensions/enable.js +180 -0
- package/dist/commands/extensions/enable.js.map +1 -0
- package/dist/commands/extensions/environment.d.ts +74 -0
- package/dist/commands/extensions/environment.d.ts.map +1 -0
- package/dist/commands/extensions/environment.js +168 -0
- package/dist/commands/extensions/environment.js.map +1 -0
- package/dist/commands/extensions/feature-scan.d.ts +48 -0
- package/dist/commands/extensions/feature-scan.d.ts.map +1 -0
- package/dist/commands/extensions/feature-scan.js +156 -0
- package/dist/commands/extensions/feature-scan.js.map +1 -0
- package/dist/commands/extensions/invoke.d.ts +60 -0
- package/dist/commands/extensions/invoke.d.ts.map +1 -0
- package/dist/commands/extensions/invoke.js +275 -0
- package/dist/commands/extensions/invoke.js.map +1 -0
- package/dist/commands/extensions/list.d.ts +5 -0
- package/dist/commands/extensions/list.d.ts.map +1 -0
- package/dist/commands/extensions/list.js +125 -0
- package/dist/commands/extensions/list.js.map +1 -0
- package/dist/commands/extensions/logs.d.ts +5 -0
- package/dist/commands/extensions/logs.d.ts.map +1 -0
- package/dist/commands/extensions/logs.js +74 -0
- package/dist/commands/extensions/logs.js.map +1 -0
- package/dist/commands/extensions/provision.d.ts +36 -0
- package/dist/commands/extensions/provision.d.ts.map +1 -0
- package/dist/commands/extensions/provision.js +137 -0
- package/dist/commands/extensions/provision.js.map +1 -0
- package/dist/commands/extensions/remove.d.ts +5 -0
- package/dist/commands/extensions/remove.d.ts.map +1 -0
- package/dist/commands/extensions/remove.js +77 -0
- package/dist/commands/extensions/remove.js.map +1 -0
- package/dist/commands/extensions/render.d.ts +16 -0
- package/dist/commands/extensions/render.d.ts.map +1 -0
- package/dist/commands/extensions/render.js +25 -0
- package/dist/commands/extensions/render.js.map +1 -0
- package/dist/commands/extensions/run.d.ts +30 -0
- package/dist/commands/extensions/run.d.ts.map +1 -0
- package/dist/commands/extensions/run.js +292 -0
- package/dist/commands/extensions/run.js.map +1 -0
- package/dist/commands/extensions/secret-store.d.ts +15 -0
- package/dist/commands/extensions/secret-store.d.ts.map +1 -0
- package/dist/commands/extensions/secret-store.js +164 -0
- package/dist/commands/extensions/secret-store.js.map +1 -0
- package/dist/commands/extensions/setup.d.ts +17 -0
- package/dist/commands/extensions/setup.d.ts.map +1 -0
- package/dist/commands/extensions/setup.js +94 -0
- package/dist/commands/extensions/setup.js.map +1 -0
- package/dist/commands/extensions/source.d.ts +47 -0
- package/dist/commands/extensions/source.d.ts.map +1 -0
- package/dist/commands/extensions/source.js +142 -0
- package/dist/commands/extensions/source.js.map +1 -0
- package/dist/commands/extensions/state.d.ts +62 -0
- package/dist/commands/extensions/state.d.ts.map +1 -0
- package/dist/commands/extensions/state.js +177 -0
- package/dist/commands/extensions/state.js.map +1 -0
- package/dist/commands/extensions/status.d.ts +9 -0
- package/dist/commands/extensions/status.d.ts.map +1 -0
- package/dist/commands/extensions/status.js +239 -0
- package/dist/commands/extensions/status.js.map +1 -0
- package/dist/commands/extensions.d.ts +3 -0
- package/dist/commands/extensions.d.ts.map +1 -0
- package/dist/commands/extensions.js +223 -0
- package/dist/commands/extensions.js.map +1 -0
- package/dist/commands/flow/index.d.ts +3 -0
- package/dist/commands/flow/index.d.ts.map +1 -0
- package/dist/commands/flow/index.js +295 -0
- package/dist/commands/flow/index.js.map +1 -0
- package/dist/commands/flow/limits.d.ts +12 -0
- package/dist/commands/flow/limits.d.ts.map +1 -0
- package/dist/commands/flow/limits.js +13 -0
- package/dist/commands/flow/limits.js.map +1 -0
- package/dist/commands/flow/output.d.ts +8 -0
- package/dist/commands/flow/output.d.ts.map +1 -0
- package/dist/commands/flow/output.js +11 -0
- package/dist/commands/flow/output.js.map +1 -0
- package/dist/commands/flow/render.d.ts +51 -0
- package/dist/commands/flow/render.d.ts.map +1 -0
- package/dist/commands/flow/render.js +220 -0
- package/dist/commands/flow/render.js.map +1 -0
- package/dist/commands/flow/select.d.ts +31 -0
- package/dist/commands/flow/select.d.ts.map +1 -0
- package/dist/commands/flow/select.js +62 -0
- package/dist/commands/flow/select.js.map +1 -0
- package/dist/commands/graph/boundaries-input.d.ts +26 -0
- package/dist/commands/graph/boundaries-input.d.ts.map +1 -0
- package/dist/commands/graph/boundaries-input.js +54 -0
- package/dist/commands/graph/boundaries-input.js.map +1 -0
- package/dist/commands/graph/boundaries.d.ts +4 -0
- package/dist/commands/graph/boundaries.d.ts.map +1 -0
- package/dist/commands/graph/boundaries.js +141 -0
- package/dist/commands/graph/boundaries.js.map +1 -0
- package/dist/commands/graph/bounds.d.ts +16 -0
- package/dist/commands/graph/bounds.d.ts.map +1 -0
- package/dist/commands/graph/bounds.js +22 -0
- package/dist/commands/graph/bounds.js.map +1 -0
- package/dist/commands/graph/category-clusters.d.ts +20 -0
- package/dist/commands/graph/category-clusters.d.ts.map +1 -0
- package/dist/commands/graph/category-clusters.js +158 -0
- package/dist/commands/graph/category-clusters.js.map +1 -0
- package/dist/commands/graph/feature-3d.d.ts +22 -0
- package/dist/commands/graph/feature-3d.d.ts.map +1 -0
- package/dist/commands/graph/feature-3d.js +114 -0
- package/dist/commands/graph/feature-3d.js.map +1 -0
- package/dist/commands/graph/feature-clusters.d.ts +17 -0
- package/dist/commands/graph/feature-clusters.d.ts.map +1 -0
- package/dist/commands/graph/feature-clusters.js +94 -0
- package/dist/commands/graph/feature-clusters.js.map +1 -0
- package/dist/commands/graph/feature-html.d.ts +26 -0
- package/dist/commands/graph/feature-html.d.ts.map +1 -0
- package/dist/commands/graph/feature-html.js +314 -0
- package/dist/commands/graph/feature-html.js.map +1 -0
- package/dist/commands/graph/feature-map.d.ts +31 -0
- package/dist/commands/graph/feature-map.d.ts.map +1 -0
- package/dist/commands/graph/feature-map.js +217 -0
- package/dist/commands/graph/feature-map.js.map +1 -0
- package/dist/commands/graph/feature-model.d.ts +55 -0
- package/dist/commands/graph/feature-model.d.ts.map +1 -0
- package/dist/commands/graph/feature-model.js +167 -0
- package/dist/commands/graph/feature-model.js.map +1 -0
- package/dist/commands/graph/feature-untangle-motion.d.ts +33 -0
- package/dist/commands/graph/feature-untangle-motion.d.ts.map +1 -0
- package/dist/commands/graph/feature-untangle-motion.js +155 -0
- package/dist/commands/graph/feature-untangle-motion.js.map +1 -0
- package/dist/commands/graph/index.d.ts +3 -0
- package/dist/commands/graph/index.d.ts.map +1 -0
- package/dist/commands/graph/index.js +414 -0
- package/dist/commands/graph/index.js.map +1 -0
- package/dist/commands/graph/render.d.ts +63 -0
- package/dist/commands/graph/render.d.ts.map +1 -0
- package/dist/commands/graph/render.js +352 -0
- package/dist/commands/graph/render.js.map +1 -0
- package/dist/commands/graph/select.d.ts +34 -0
- package/dist/commands/graph/select.d.ts.map +1 -0
- package/dist/commands/graph/select.js +55 -0
- package/dist/commands/graph/select.js.map +1 -0
- package/dist/commands/index/index.d.ts +6 -0
- package/dist/commands/index/index.d.ts.map +1 -0
- package/dist/commands/index/index.js +461 -0
- package/dist/commands/index/index.js.map +1 -0
- package/dist/commands/index/render.d.ts +53 -0
- package/dist/commands/index/render.d.ts.map +1 -0
- package/dist/commands/index/render.js +205 -0
- package/dist/commands/index/render.js.map +1 -0
- package/dist/commands/index/target.d.ts +34 -0
- package/dist/commands/index/target.d.ts.map +1 -0
- package/dist/commands/index/target.js +97 -0
- package/dist/commands/index/target.js.map +1 -0
- package/dist/commands/index-watch.d.ts +30 -0
- package/dist/commands/index-watch.d.ts.map +1 -0
- package/dist/commands/index-watch.js +138 -0
- package/dist/commands/index-watch.js.map +1 -0
- package/dist/commands/init/command.d.ts +25 -0
- package/dist/commands/init/command.d.ts.map +1 -0
- package/dist/commands/init/command.js +198 -0
- package/dist/commands/init/command.js.map +1 -0
- package/dist/commands/init/config-draft.d.ts +48 -0
- package/dist/commands/init/config-draft.d.ts.map +1 -0
- package/dist/commands/init/config-draft.js +201 -0
- package/dist/commands/init/config-draft.js.map +1 -0
- package/dist/commands/init/diff.d.ts +33 -0
- package/dist/commands/init/diff.d.ts.map +1 -0
- package/dist/commands/init/diff.js +109 -0
- package/dist/commands/init/diff.js.map +1 -0
- package/dist/commands/init/http-probe.d.ts +26 -0
- package/dist/commands/init/http-probe.d.ts.map +1 -0
- package/dist/commands/init/http-probe.js +144 -0
- package/dist/commands/init/http-probe.js.map +1 -0
- package/dist/commands/init/ignore-rules.d.ts +70 -0
- package/dist/commands/init/ignore-rules.d.ts.map +1 -0
- package/dist/commands/init/ignore-rules.js +146 -0
- package/dist/commands/init/ignore-rules.js.map +1 -0
- package/dist/commands/init/index.d.ts +33 -0
- package/dist/commands/init/index.d.ts.map +1 -0
- package/dist/commands/init/index.js +32 -0
- package/dist/commands/init/index.js.map +1 -0
- package/dist/commands/init/integrations-apply.d.ts +50 -0
- package/dist/commands/init/integrations-apply.d.ts.map +1 -0
- package/dist/commands/init/integrations-apply.js +452 -0
- package/dist/commands/init/integrations-apply.js.map +1 -0
- package/dist/commands/init/integrations-plan.d.ts +68 -0
- package/dist/commands/init/integrations-plan.d.ts.map +1 -0
- package/dist/commands/init/integrations-plan.js +515 -0
- package/dist/commands/init/integrations-plan.js.map +1 -0
- package/dist/commands/init/integrations.d.ts +5 -0
- package/dist/commands/init/integrations.d.ts.map +1 -0
- package/dist/commands/init/integrations.js +4 -0
- package/dist/commands/init/integrations.js.map +1 -0
- package/dist/commands/init/languages.d.ts +55 -0
- package/dist/commands/init/languages.d.ts.map +1 -0
- package/dist/commands/init/languages.js +245 -0
- package/dist/commands/init/languages.js.map +1 -0
- package/dist/commands/init/product-context.d.ts +63 -0
- package/dist/commands/init/product-context.d.ts.map +1 -0
- package/dist/commands/init/product-context.js +390 -0
- package/dist/commands/init/product-context.js.map +1 -0
- package/dist/commands/init/render.d.ts +38 -0
- package/dist/commands/init/render.d.ts.map +1 -0
- package/dist/commands/init/render.js +501 -0
- package/dist/commands/init/render.js.map +1 -0
- package/dist/commands/init/report.d.ts +24 -0
- package/dist/commands/init/report.d.ts.map +1 -0
- package/dist/commands/init/report.js +163 -0
- package/dist/commands/init/report.js.map +1 -0
- package/dist/commands/init/run.d.ts +71 -0
- package/dist/commands/init/run.d.ts.map +1 -0
- package/dist/commands/init/run.js +253 -0
- package/dist/commands/init/run.js.map +1 -0
- package/dist/commands/init/services.d.ts +82 -0
- package/dist/commands/init/services.d.ts.map +1 -0
- package/dist/commands/init/services.js +209 -0
- package/dist/commands/init/services.js.map +1 -0
- package/dist/commands/init/storage.d.ts +8 -0
- package/dist/commands/init/storage.d.ts.map +1 -0
- package/dist/commands/init/storage.js +102 -0
- package/dist/commands/init/storage.js.map +1 -0
- package/dist/commands/init/toml.d.ts +65 -0
- package/dist/commands/init/toml.d.ts.map +1 -0
- package/dist/commands/init/toml.js +159 -0
- package/dist/commands/init/toml.js.map +1 -0
- package/dist/commands/init/topology.d.ts +54 -0
- package/dist/commands/init/topology.d.ts.map +1 -0
- package/dist/commands/init/topology.js +146 -0
- package/dist/commands/init/topology.js.map +1 -0
- package/dist/commands/init/types.d.ts +334 -0
- package/dist/commands/init/types.d.ts.map +1 -0
- package/dist/commands/init/types.js +31 -0
- package/dist/commands/init/types.js.map +1 -0
- package/dist/commands/init/wizard-terminal.d.ts +36 -0
- package/dist/commands/init/wizard-terminal.d.ts.map +1 -0
- package/dist/commands/init/wizard-terminal.js +163 -0
- package/dist/commands/init/wizard-terminal.js.map +1 -0
- package/dist/commands/init/wizard.d.ts +25 -0
- package/dist/commands/init/wizard.d.ts.map +1 -0
- package/dist/commands/init/wizard.js +358 -0
- package/dist/commands/init/wizard.js.map +1 -0
- package/dist/commands/mcp.d.ts +4 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +111 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/product-test-runner.d.ts +4 -0
- package/dist/commands/product-test-runner.d.ts.map +1 -0
- package/dist/commands/product-test-runner.js +85 -0
- package/dist/commands/product-test-runner.js.map +1 -0
- package/dist/commands/product.d.ts +16 -0
- package/dist/commands/product.d.ts.map +1 -0
- package/dist/commands/product.js +262 -0
- package/dist/commands/product.js.map +1 -0
- package/dist/commands/query.d.ts +114 -0
- package/dist/commands/query.d.ts.map +1 -0
- package/dist/commands/query.js +783 -0
- package/dist/commands/query.js.map +1 -0
- package/dist/commands/scan.d.ts +10 -0
- package/dist/commands/scan.d.ts.map +1 -0
- package/dist/commands/scan.js +302 -0
- package/dist/commands/scan.js.map +1 -0
- package/dist/commands/sdd.d.ts +24 -0
- package/dist/commands/sdd.d.ts.map +1 -0
- package/dist/commands/sdd.js +195 -0
- package/dist/commands/sdd.js.map +1 -0
- package/dist/commands/unavailable.d.ts +40 -0
- package/dist/commands/unavailable.d.ts.map +1 -0
- package/dist/commands/unavailable.js +73 -0
- package/dist/commands/unavailable.js.map +1 -0
- package/dist/commands/watch/analyze.d.ts +69 -0
- package/dist/commands/watch/analyze.d.ts.map +1 -0
- package/dist/commands/watch/analyze.js +402 -0
- package/dist/commands/watch/analyze.js.map +1 -0
- package/dist/commands/watch/cli.d.ts +8 -0
- package/dist/commands/watch/cli.d.ts.map +1 -0
- package/dist/commands/watch/cli.js +97 -0
- package/dist/commands/watch/cli.js.map +1 -0
- package/dist/commands/watch/delta.d.ts +46 -0
- package/dist/commands/watch/delta.d.ts.map +1 -0
- package/dist/commands/watch/delta.js +170 -0
- package/dist/commands/watch/delta.js.map +1 -0
- package/dist/commands/watch/events.d.ts +214 -0
- package/dist/commands/watch/events.d.ts.map +1 -0
- package/dist/commands/watch/events.js +13 -0
- package/dist/commands/watch/events.js.map +1 -0
- package/dist/commands/watch/index.d.ts +19 -0
- package/dist/commands/watch/index.d.ts.map +1 -0
- package/dist/commands/watch/index.js +15 -0
- package/dist/commands/watch/index.js.map +1 -0
- package/dist/commands/watch/options.d.ts +43 -0
- package/dist/commands/watch/options.d.ts.map +1 -0
- package/dist/commands/watch/options.js +193 -0
- package/dist/commands/watch/options.js.map +1 -0
- package/dist/commands/watch/render.d.ts +26 -0
- package/dist/commands/watch/render.d.ts.map +1 -0
- package/dist/commands/watch/render.js +175 -0
- package/dist/commands/watch/render.js.map +1 -0
- package/dist/commands/watch/run.d.ts +14 -0
- package/dist/commands/watch/run.d.ts.map +1 -0
- package/dist/commands/watch/run.js +460 -0
- package/dist/commands/watch/run.js.map +1 -0
- package/dist/commands/watch/runtime.d.ts +67 -0
- package/dist/commands/watch/runtime.d.ts.map +1 -0
- package/dist/commands/watch/runtime.js +149 -0
- package/dist/commands/watch/runtime.js.map +1 -0
- package/dist/commands/watch-command.d.ts +3 -0
- package/dist/commands/watch-command.d.ts.map +1 -0
- package/dist/commands/watch-command.js +273 -0
- package/dist/commands/watch-command.js.map +1 -0
- package/dist/entry-point.d.ts +11 -0
- package/dist/entry-point.d.ts.map +1 -0
- package/dist/entry-point.js +65 -0
- package/dist/entry-point.js.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +245 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/boundaries-schema.d.ts +262 -0
- package/dist/mcp/boundaries-schema.d.ts.map +1 -0
- package/dist/mcp/boundaries-schema.js +183 -0
- package/dist/mcp/boundaries-schema.js.map +1 -0
- package/dist/mcp/default-runtime.d.ts +16 -0
- package/dist/mcp/default-runtime.d.ts.map +1 -0
- package/dist/mcp/default-runtime.js +718 -0
- package/dist/mcp/default-runtime.js.map +1 -0
- package/dist/mcp/envelope.d.ts +13 -0
- package/dist/mcp/envelope.d.ts.map +1 -0
- package/dist/mcp/envelope.js +29 -0
- package/dist/mcp/envelope.js.map +1 -0
- package/dist/mcp/index.d.ts +8 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +8 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/output-schemas.d.ts +5928 -0
- package/dist/mcp/output-schemas.d.ts.map +1 -0
- package/dist/mcp/output-schemas.js +2814 -0
- package/dist/mcp/output-schemas.js.map +1 -0
- package/dist/mcp/path-sandbox.d.ts +35 -0
- package/dist/mcp/path-sandbox.d.ts.map +1 -0
- package/dist/mcp/path-sandbox.js +128 -0
- package/dist/mcp/path-sandbox.js.map +1 -0
- package/dist/mcp/server.d.ts +155 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +257 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/stdio.d.ts +20 -0
- package/dist/mcp/stdio.d.ts.map +1 -0
- package/dist/mcp/stdio.js +71 -0
- package/dist/mcp/stdio.js.map +1 -0
- package/dist/mcp/tools.d.ts +355 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +319 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp/types.d.ts +15 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/mcp/types.js +45 -0
- package/dist/mcp/types.js.map +1 -0
- package/package.json +99 -3
- package/src/cli/args.ts +231 -0
- package/src/cli/command.ts +146 -0
- package/src/cli/deadline.ts +56 -0
- package/src/cli/embedder-deadline.ts +187 -0
- package/src/cli/exit.ts +94 -0
- package/src/cli/graphs.ts +191 -0
- package/src/cli/index-freshness.ts +303 -0
- package/src/cli/index-refresh.ts +125 -0
- package/src/cli/index-state.ts +1217 -0
- package/src/cli/io.ts +56 -0
- package/src/cli/language-support.ts +203 -0
- package/src/cli/renewing-lease.ts +121 -0
- package/src/cli/search-graph-enrichment.ts +639 -0
- package/src/cli/system.ts +94 -0
- package/src/cli/vector-store-policy.ts +213 -0
- package/src/cli/version.ts +2 -0
- package/src/cli/workspace.ts +324 -0
- package/src/commands/complexity.ts +776 -0
- package/src/commands/doctor.languages.ts +187 -0
- package/src/commands/doctor.storage.ts +124 -0
- package/src/commands/doctor.ts +946 -0
- package/src/commands/extensions/add.ts +312 -0
- package/src/commands/extensions/configure.ts +82 -0
- package/src/commands/extensions/container.ts +209 -0
- package/src/commands/extensions/context.ts +109 -0
- package/src/commands/extensions/enable.ts +237 -0
- package/src/commands/extensions/environment.ts +218 -0
- package/src/commands/extensions/feature-scan.ts +232 -0
- package/src/commands/extensions/invoke.ts +368 -0
- package/src/commands/extensions/list.ts +158 -0
- package/src/commands/extensions/logs.ts +104 -0
- package/src/commands/extensions/provision.ts +206 -0
- package/src/commands/extensions/remove.ts +110 -0
- package/src/commands/extensions/render.ts +32 -0
- package/src/commands/extensions/run.ts +386 -0
- package/src/commands/extensions/secret-store.ts +223 -0
- package/src/commands/extensions/setup.ts +140 -0
- package/src/commands/extensions/source.ts +189 -0
- package/src/commands/extensions/state.ts +252 -0
- package/src/commands/extensions/status.ts +320 -0
- package/src/commands/extensions.ts +280 -0
- package/src/commands/flow/index.ts +402 -0
- package/src/commands/flow/limits.ts +14 -0
- package/src/commands/flow/output.ts +16 -0
- package/src/commands/flow/render.ts +318 -0
- package/src/commands/flow/select.ts +101 -0
- package/src/commands/graph/boundaries-input.ts +63 -0
- package/src/commands/graph/boundaries.ts +182 -0
- package/src/commands/graph/bounds.ts +25 -0
- package/src/commands/graph/category-clusters.ts +194 -0
- package/src/commands/graph/feature-3d.ts +141 -0
- package/src/commands/graph/feature-clusters.ts +125 -0
- package/src/commands/graph/feature-html.ts +336 -0
- package/src/commands/graph/feature-map.ts +270 -0
- package/src/commands/graph/feature-model.ts +234 -0
- package/src/commands/graph/feature-untangle-motion.ts +192 -0
- package/src/commands/graph/index.ts +562 -0
- package/src/commands/graph/render.ts +503 -0
- package/src/commands/graph/select.ts +77 -0
- package/src/commands/index/index.ts +595 -0
- package/src/commands/index/render.ts +325 -0
- package/src/commands/index/target.ts +136 -0
- package/src/commands/index-watch.ts +206 -0
- package/src/commands/init/command.ts +238 -0
- package/src/commands/init/config-draft.ts +235 -0
- package/src/commands/init/diff.ts +117 -0
- package/src/commands/init/http-probe.ts +150 -0
- package/src/commands/init/ignore-rules.ts +170 -0
- package/src/commands/init/index.ts +63 -0
- package/src/commands/init/integrations-apply.ts +618 -0
- package/src/commands/init/integrations-plan.ts +634 -0
- package/src/commands/init/integrations.ts +8 -0
- package/src/commands/init/languages.ts +320 -0
- package/src/commands/init/product-context.ts +576 -0
- package/src/commands/init/render.ts +598 -0
- package/src/commands/init/report.ts +204 -0
- package/src/commands/init/run.ts +349 -0
- package/src/commands/init/services.ts +271 -0
- package/src/commands/init/storage.ts +136 -0
- package/src/commands/init/toml.ts +174 -0
- package/src/commands/init/topology.ts +192 -0
- package/src/commands/init/types.ts +366 -0
- package/src/commands/init/wizard-terminal.ts +206 -0
- package/src/commands/init/wizard.ts +450 -0
- package/src/commands/mcp.ts +123 -0
- package/src/commands/product-test-runner.ts +80 -0
- package/src/commands/product.ts +331 -0
- package/src/commands/query.ts +1032 -0
- package/src/commands/scan.ts +360 -0
- package/src/commands/sdd.ts +243 -0
- package/src/commands/unavailable.ts +92 -0
- package/src/commands/watch/README.md +160 -0
- package/src/commands/watch/analyze.ts +600 -0
- package/src/commands/watch/cli.ts +108 -0
- package/src/commands/watch/delta.ts +186 -0
- package/src/commands/watch/events.ts +235 -0
- package/src/commands/watch/index.ts +53 -0
- package/src/commands/watch/options.ts +234 -0
- package/src/commands/watch/render.ts +240 -0
- package/src/commands/watch/run.ts +553 -0
- package/src/commands/watch/runtime.ts +167 -0
- package/src/commands/watch-command.ts +294 -0
- package/src/entry-point.ts +67 -0
- package/src/index.ts +291 -0
- package/src/mcp/boundaries-schema.ts +193 -0
- package/src/mcp/default-runtime.ts +1034 -0
- package/src/mcp/envelope.ts +57 -0
- package/src/mcp/index.ts +28 -0
- package/src/mcp/output-schemas.ts +3071 -0
- package/src/mcp/path-sandbox.ts +156 -0
- package/src/mcp/server.ts +358 -0
- package/src/mcp/stdio.ts +92 -0
- package/src/mcp/tools.ts +563 -0
- package/src/mcp/types.ts +66 -0
|
@@ -0,0 +1,639 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persistierte File-/Symbolgraphen -> schmaler Search-Anreicherungsport.
|
|
3
|
+
*
|
|
4
|
+
* Hier (und nicht in `@untangle-code/search`) duerfen die konkreten
|
|
5
|
+
* Graphpakete bekannt sein. Gelesen wird immer mit Workspace UND Generation;
|
|
6
|
+
* ein ungescoptes `latest` kommt auf diesem Pfad nicht vor.
|
|
7
|
+
*/
|
|
8
|
+
import type {
|
|
9
|
+
FileEdgeV1,
|
|
10
|
+
FileNodeV1,
|
|
11
|
+
GraphStore,
|
|
12
|
+
PortCallOptions,
|
|
13
|
+
SearchGraphOmissionV1,
|
|
14
|
+
SearchGraphRelationV1,
|
|
15
|
+
SymbolEdgeV1,
|
|
16
|
+
SymbolNodeV1,
|
|
17
|
+
ToolWarningV1,
|
|
18
|
+
} from "@untangle-code/domain";
|
|
19
|
+
import { compareCodepoints } from "@untangle-code/domain";
|
|
20
|
+
import {
|
|
21
|
+
readGraphSnapshot,
|
|
22
|
+
type FileGraphSnapshotV1,
|
|
23
|
+
type SnapshotReadIssue,
|
|
24
|
+
} from "@untangle-code/file-graph";
|
|
25
|
+
import {
|
|
26
|
+
SEARCH_GRAPH_RELATION_LIMIT,
|
|
27
|
+
boundSearchGraphDetail,
|
|
28
|
+
createSearchGraphRelations,
|
|
29
|
+
unavailableSearchGraphRelations,
|
|
30
|
+
type SearchGraphEnrichmentEntryV1,
|
|
31
|
+
type SearchGraphEnrichmentPort,
|
|
32
|
+
type SearchGraphEnrichmentRequestV1,
|
|
33
|
+
type SearchGraphEnrichmentTargetV1,
|
|
34
|
+
} from "@untangle-code/search";
|
|
35
|
+
import {
|
|
36
|
+
readSymbolGraphSnapshot,
|
|
37
|
+
type SymbolGraphSnapshotReadIssue,
|
|
38
|
+
type SymbolGraphV1,
|
|
39
|
+
} from "@untangle-code/symbol-graph";
|
|
40
|
+
|
|
41
|
+
interface EnrichmentScope {
|
|
42
|
+
workspaceId: string;
|
|
43
|
+
generationId: string;
|
|
44
|
+
targets: SearchGraphEnrichmentTargetV1[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface FileGraphLookup {
|
|
48
|
+
nodes: ReadonlyMap<string, FileNodeV1>;
|
|
49
|
+
outgoing: ReadonlyMap<string, readonly FileEdgeV1[]>;
|
|
50
|
+
incoming: ReadonlyMap<string, readonly FileEdgeV1[]>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface SymbolGraphLookup {
|
|
54
|
+
nodes: ReadonlyMap<string, SymbolNodeV1>;
|
|
55
|
+
outgoing: ReadonlyMap<string, readonly SymbolEdgeV1[]>;
|
|
56
|
+
incoming: ReadonlyMap<string, readonly SymbolEdgeV1[]>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** Warnungsdetails bleiben auch bei tausenden fehlenden Shards endlich. */
|
|
60
|
+
export const SEARCH_GRAPH_WARNING_ISSUE_LIMIT = 16;
|
|
61
|
+
|
|
62
|
+
/** Baut den graph-backed Adapter; der Konstruktor selbst fuehrt keinerlei I/O aus. */
|
|
63
|
+
export function createSearchGraphEnrichment(graphStore: GraphStore): SearchGraphEnrichmentPort {
|
|
64
|
+
return {
|
|
65
|
+
enrich(request, options) {
|
|
66
|
+
return enrichFromPersistedGraphs(graphStore, request, options);
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function enrichFromPersistedGraphs(
|
|
72
|
+
graphStore: GraphStore,
|
|
73
|
+
request: SearchGraphEnrichmentRequestV1,
|
|
74
|
+
options?: PortCallOptions,
|
|
75
|
+
): Promise<{ entries: SearchGraphEnrichmentEntryV1[]; warnings: ToolWarningV1[] }> {
|
|
76
|
+
if (!Number.isInteger(request.relationLimit) || request.relationLimit <= 0) {
|
|
77
|
+
throw new TypeError("search graph relationLimit must be a positive integer");
|
|
78
|
+
}
|
|
79
|
+
options?.signal?.throwIfAborted();
|
|
80
|
+
|
|
81
|
+
const entries = new Map<string, SearchGraphEnrichmentEntryV1>();
|
|
82
|
+
for (const target of request.targets) entries.set(target.targetId, { targetId: target.targetId });
|
|
83
|
+
const warnings: ToolWarningV1[] = [];
|
|
84
|
+
|
|
85
|
+
for (const scope of scopesOf(request.targets)) {
|
|
86
|
+
options?.signal?.throwIfAborted();
|
|
87
|
+
const readOptions = options?.signal === undefined ? {} : { signal: options.signal };
|
|
88
|
+
|
|
89
|
+
if (request.includeContext) {
|
|
90
|
+
try {
|
|
91
|
+
const loaded = await readGraphSnapshot(
|
|
92
|
+
graphStore,
|
|
93
|
+
{ workspaceId: scope.workspaceId, generationId: scope.generationId },
|
|
94
|
+
readOptions,
|
|
95
|
+
);
|
|
96
|
+
if (loaded.snapshot === null) {
|
|
97
|
+
const detail = unavailableDetail("file graph", scope, loaded.issues);
|
|
98
|
+
warnings.push(
|
|
99
|
+
unavailableWarning("GRAPH_CONTEXT_UNAVAILABLE", detail, scope, loaded.issues),
|
|
100
|
+
);
|
|
101
|
+
for (const target of scope.targets) {
|
|
102
|
+
setContext(
|
|
103
|
+
entries,
|
|
104
|
+
target.targetId,
|
|
105
|
+
unavailableSearchGraphRelations("graph_unavailable", detail, request.relationLimit),
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
} else {
|
|
109
|
+
const lookup = indexFileGraph(loaded.snapshot);
|
|
110
|
+
if (loaded.issues.length > 0) {
|
|
111
|
+
warnings.push(
|
|
112
|
+
partialWarning("GRAPH_CONTEXT_PARTIAL", "file graph", scope, loaded.issues),
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
for (const target of scope.targets) {
|
|
116
|
+
setContext(
|
|
117
|
+
entries,
|
|
118
|
+
target.targetId,
|
|
119
|
+
fileRelations(lookup, target, loaded.issues, request.relationLimit),
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
} catch (error) {
|
|
124
|
+
options?.signal?.throwIfAborted();
|
|
125
|
+
const detail = readFailureDetail("file graph", scope, error);
|
|
126
|
+
warnings.push(unavailableWarning("GRAPH_CONTEXT_UNAVAILABLE", detail, scope, []));
|
|
127
|
+
for (const target of scope.targets) {
|
|
128
|
+
setContext(
|
|
129
|
+
entries,
|
|
130
|
+
target.targetId,
|
|
131
|
+
unavailableSearchGraphRelations("graph_unavailable", detail, request.relationLimit),
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (request.includeLinked) {
|
|
138
|
+
try {
|
|
139
|
+
const loaded = await readSymbolGraphSnapshot(
|
|
140
|
+
graphStore,
|
|
141
|
+
{ workspaceId: scope.workspaceId, generationId: scope.generationId },
|
|
142
|
+
readOptions,
|
|
143
|
+
);
|
|
144
|
+
if (loaded.snapshot === null) {
|
|
145
|
+
const detail = unavailableDetail("symbol graph", scope, loaded.issues);
|
|
146
|
+
warnings.push(
|
|
147
|
+
unavailableWarning("LINKED_ARTIFACTS_UNAVAILABLE", detail, scope, loaded.issues),
|
|
148
|
+
);
|
|
149
|
+
for (const target of scope.targets) {
|
|
150
|
+
setLinked(
|
|
151
|
+
entries,
|
|
152
|
+
target.targetId,
|
|
153
|
+
unavailableSearchGraphRelations("graph_unavailable", detail, request.relationLimit),
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
} else {
|
|
157
|
+
const lookup = indexSymbolGraph(loaded.snapshot);
|
|
158
|
+
if (loaded.issues.length > 0) {
|
|
159
|
+
warnings.push(
|
|
160
|
+
partialWarning("LINKED_ARTIFACTS_PARTIAL", "symbol graph", scope, loaded.issues),
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
for (const target of scope.targets) {
|
|
164
|
+
setLinked(
|
|
165
|
+
entries,
|
|
166
|
+
target.targetId,
|
|
167
|
+
symbolRelations(lookup, target, loaded.issues, request.relationLimit),
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
} catch (error) {
|
|
172
|
+
options?.signal?.throwIfAborted();
|
|
173
|
+
const detail = readFailureDetail("symbol graph", scope, error);
|
|
174
|
+
warnings.push(unavailableWarning("LINKED_ARTIFACTS_UNAVAILABLE", detail, scope, []));
|
|
175
|
+
for (const target of scope.targets) {
|
|
176
|
+
setLinked(
|
|
177
|
+
entries,
|
|
178
|
+
target.targetId,
|
|
179
|
+
unavailableSearchGraphRelations("graph_unavailable", detail, request.relationLimit),
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return {
|
|
187
|
+
entries: request.targets.map(
|
|
188
|
+
(target) => entries.get(target.targetId) as SearchGraphEnrichmentEntryV1,
|
|
189
|
+
),
|
|
190
|
+
warnings: warnings.sort(compareWarnings),
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function scopesOf(targets: readonly SearchGraphEnrichmentTargetV1[]): EnrichmentScope[] {
|
|
195
|
+
const byScope = new Map<string, EnrichmentScope>();
|
|
196
|
+
for (const target of targets) {
|
|
197
|
+
const key = `${String(target.workspaceId.length)}:${target.workspaceId}${String(target.generationId.length)}:${target.generationId}`;
|
|
198
|
+
const scope = byScope.get(key) ?? {
|
|
199
|
+
workspaceId: target.workspaceId,
|
|
200
|
+
generationId: target.generationId,
|
|
201
|
+
targets: [],
|
|
202
|
+
};
|
|
203
|
+
scope.targets.push(target);
|
|
204
|
+
byScope.set(key, scope);
|
|
205
|
+
}
|
|
206
|
+
return [...byScope.values()].sort((left, right) => {
|
|
207
|
+
const byWorkspace = compareCodepoints(left.workspaceId, right.workspaceId);
|
|
208
|
+
return byWorkspace !== 0
|
|
209
|
+
? byWorkspace
|
|
210
|
+
: compareCodepoints(left.generationId, right.generationId);
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function fileRelations(
|
|
215
|
+
graph: FileGraphLookup,
|
|
216
|
+
target: SearchGraphEnrichmentTargetV1,
|
|
217
|
+
readIssues: readonly SnapshotReadIssue[],
|
|
218
|
+
relationLimit: number,
|
|
219
|
+
) {
|
|
220
|
+
const root = graph.nodes.get(target.fileId);
|
|
221
|
+
const omissions = partialOmissions("file graph", readIssues);
|
|
222
|
+
const relations: SearchGraphRelationV1[] = [];
|
|
223
|
+
if (root === undefined || !sameFile(root, target)) {
|
|
224
|
+
omissions.push({
|
|
225
|
+
reason: "source_not_in_graph",
|
|
226
|
+
count: 1,
|
|
227
|
+
detail: `file "${target.fileId}" at ${target.repoId}/${target.refId}/${target.filePath} is absent from the persisted file graph`,
|
|
228
|
+
});
|
|
229
|
+
return createSearchGraphRelations(relations, omissions, relationLimit);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
for (const edge of graph.outgoing.get(target.fileId) ?? []) {
|
|
233
|
+
if (!matchesFileSource(root, edge)) {
|
|
234
|
+
omissions.push(missingEndpoint("outgoing", edge.edgeId));
|
|
235
|
+
} else if (edge.resolution.status !== "resolved") {
|
|
236
|
+
omissions.push({
|
|
237
|
+
reason: "unresolved_endpoint",
|
|
238
|
+
count: 1,
|
|
239
|
+
detail: `outgoing file edge "${edge.edgeId}" has persisted resolution "${edge.resolution.status}" and therefore no indexed file endpoint`,
|
|
240
|
+
});
|
|
241
|
+
} else {
|
|
242
|
+
const endpoint = graph.nodes.get(edge.resolution.targetFileId);
|
|
243
|
+
if (endpoint === undefined || !matchesResolvedTarget(endpoint, edge)) {
|
|
244
|
+
omissions.push(missingEndpoint("outgoing", edge.edgeId));
|
|
245
|
+
} else {
|
|
246
|
+
relations.push(fileRelation(edge, endpoint, "outgoing"));
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
for (const edge of graph.incoming.get(target.fileId) ?? []) {
|
|
251
|
+
const endpoint = graph.nodes.get(edge.fromFileId);
|
|
252
|
+
if (
|
|
253
|
+
!matchesResolvedTarget(root, edge) ||
|
|
254
|
+
endpoint === undefined ||
|
|
255
|
+
!matchesFileSource(endpoint, edge)
|
|
256
|
+
) {
|
|
257
|
+
omissions.push(missingEndpoint("incoming", edge.edgeId));
|
|
258
|
+
} else {
|
|
259
|
+
relations.push(fileRelation(edge, endpoint, "incoming"));
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return createSearchGraphRelations(relations, omissions, relationLimit);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
function symbolRelations(
|
|
266
|
+
graph: SymbolGraphLookup,
|
|
267
|
+
target: SearchGraphEnrichmentTargetV1,
|
|
268
|
+
readIssues: readonly SymbolGraphSnapshotReadIssue[],
|
|
269
|
+
relationLimit: number,
|
|
270
|
+
) {
|
|
271
|
+
const omissions = partialOmissions("symbol graph", readIssues);
|
|
272
|
+
const relations: SearchGraphRelationV1[] = [];
|
|
273
|
+
if (target.symbolId === undefined) {
|
|
274
|
+
omissions.push({
|
|
275
|
+
reason: "symbol_id_missing",
|
|
276
|
+
count: 1,
|
|
277
|
+
detail: `final hit at ${target.repoId}/${target.refId}/${target.filePath} has no persisted symbolId; linked symbols were not guessed by name`,
|
|
278
|
+
});
|
|
279
|
+
return createSearchGraphRelations(relations, omissions, relationLimit);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
const root = graph.nodes.get(target.symbolId);
|
|
283
|
+
if (root === undefined || !sameSymbol(root, target)) {
|
|
284
|
+
omissions.push({
|
|
285
|
+
reason: "source_not_in_graph",
|
|
286
|
+
count: 1,
|
|
287
|
+
detail: `symbol "${target.symbolId}" is absent from the persisted symbol graph at the hit's file/ref; linked symbols were not guessed by name`,
|
|
288
|
+
});
|
|
289
|
+
return createSearchGraphRelations(relations, omissions, relationLimit);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
for (const edge of graph.outgoing.get(target.symbolId) ?? []) {
|
|
293
|
+
if (edge.repoId !== root.repoId || edge.refId !== root.refId) {
|
|
294
|
+
omissions.push(missingEndpoint("outgoing", edge.edgeId));
|
|
295
|
+
} else {
|
|
296
|
+
appendOutgoingSymbolRelation(relations, omissions, graph.nodes, edge);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
for (const edge of graph.incoming.get(target.symbolId) ?? []) {
|
|
300
|
+
appendIncomingSymbolRelation(relations, omissions, graph.nodes, edge, target.symbolId);
|
|
301
|
+
}
|
|
302
|
+
return createSearchGraphRelations(relations, omissions, relationLimit);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
function indexFileGraph(graph: FileGraphSnapshotV1): FileGraphLookup {
|
|
306
|
+
const outgoing = new Map<string, FileEdgeV1[]>();
|
|
307
|
+
const incoming = new Map<string, FileEdgeV1[]>();
|
|
308
|
+
for (const edge of graph.edges) {
|
|
309
|
+
pushEdge(outgoing, edge.fromFileId, edge);
|
|
310
|
+
if (edge.resolution.status === "resolved") {
|
|
311
|
+
pushEdge(incoming, edge.resolution.targetFileId, edge);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return {
|
|
315
|
+
nodes: new Map(graph.nodes.map((node) => [node.fileId, node] as const)),
|
|
316
|
+
outgoing,
|
|
317
|
+
incoming,
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function indexSymbolGraph(graph: SymbolGraphV1): SymbolGraphLookup {
|
|
322
|
+
const outgoing = new Map<string, SymbolEdgeV1[]>();
|
|
323
|
+
const incoming = new Map<string, SymbolEdgeV1[]>();
|
|
324
|
+
for (const edge of graph.edges) {
|
|
325
|
+
pushEdge(outgoing, edge.fromSymbolId, edge);
|
|
326
|
+
const endpointIds = new Set([
|
|
327
|
+
...(edge.target === undefined ? [] : [edge.target.symbolId]),
|
|
328
|
+
...(edge.candidates ?? []).map((candidate) => candidate.symbolId),
|
|
329
|
+
]);
|
|
330
|
+
for (const endpointId of endpointIds) pushEdge(incoming, endpointId, edge);
|
|
331
|
+
}
|
|
332
|
+
return {
|
|
333
|
+
nodes: new Map(graph.nodes.map((node) => [node.id, node] as const)),
|
|
334
|
+
outgoing,
|
|
335
|
+
incoming,
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
function pushEdge<T>(map: Map<string, T[]>, key: string, edge: T): void {
|
|
340
|
+
const bucket = map.get(key) ?? [];
|
|
341
|
+
bucket.push(edge);
|
|
342
|
+
map.set(key, bucket);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
function appendOutgoingSymbolRelation(
|
|
346
|
+
relations: SearchGraphRelationV1[],
|
|
347
|
+
omissions: SearchGraphOmissionV1[],
|
|
348
|
+
nodes: ReadonlyMap<string, SymbolNodeV1>,
|
|
349
|
+
edge: SymbolEdgeV1,
|
|
350
|
+
): void {
|
|
351
|
+
if (edge.resolution !== "exact" || edge.target === undefined) {
|
|
352
|
+
omissions.push(symbolResolutionOmission("outgoing", edge));
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
const endpoint = nodes.get(edge.target.symbolId);
|
|
356
|
+
if (endpoint === undefined || !matchesSymbolTarget(endpoint, edge)) {
|
|
357
|
+
omissions.push(missingEndpoint("outgoing", edge.edgeId));
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
relations.push(symbolRelation(edge, endpoint, "outgoing"));
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function appendIncomingSymbolRelation(
|
|
364
|
+
relations: SearchGraphRelationV1[],
|
|
365
|
+
omissions: SearchGraphOmissionV1[],
|
|
366
|
+
nodes: ReadonlyMap<string, SymbolNodeV1>,
|
|
367
|
+
edge: SymbolEdgeV1,
|
|
368
|
+
symbolId: string,
|
|
369
|
+
): void {
|
|
370
|
+
const pointsToRoot = edge.target?.symbolId === symbolId;
|
|
371
|
+
const namesRootAsCandidate =
|
|
372
|
+
edge.candidates?.some((candidate) => candidate.symbolId === symbolId) === true;
|
|
373
|
+
if (!pointsToRoot && !namesRootAsCandidate) return;
|
|
374
|
+
if (edge.resolution !== "exact" || !pointsToRoot) {
|
|
375
|
+
omissions.push(symbolResolutionOmission("incoming", edge));
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
const root = nodes.get(symbolId);
|
|
379
|
+
if (root === undefined || !matchesSymbolTarget(root, edge)) {
|
|
380
|
+
omissions.push(missingEndpoint("incoming", edge.edgeId));
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
const endpoint = nodes.get(edge.fromSymbolId);
|
|
384
|
+
if (endpoint === undefined || !matchesSymbolSource(endpoint, edge)) {
|
|
385
|
+
omissions.push(missingEndpoint("incoming", edge.edgeId));
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
relations.push(symbolRelation(edge, endpoint, "incoming"));
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
function fileRelation(
|
|
392
|
+
edge: FileEdgeV1,
|
|
393
|
+
endpoint: FileNodeV1,
|
|
394
|
+
direction: "incoming" | "outgoing",
|
|
395
|
+
): SearchGraphRelationV1 {
|
|
396
|
+
return {
|
|
397
|
+
schemaVersion: 1,
|
|
398
|
+
source: "file_graph",
|
|
399
|
+
edgeId: edge.edgeId,
|
|
400
|
+
direction,
|
|
401
|
+
edgeKind: edge.kind,
|
|
402
|
+
repoId: endpoint.repoId,
|
|
403
|
+
refId: endpoint.refId,
|
|
404
|
+
fileId: endpoint.fileId,
|
|
405
|
+
path: endpoint.filePath,
|
|
406
|
+
crossRepository: edge.boundary.crossRepo,
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
function symbolRelation(
|
|
411
|
+
edge: SymbolEdgeV1,
|
|
412
|
+
endpoint: SymbolNodeV1,
|
|
413
|
+
direction: "incoming" | "outgoing",
|
|
414
|
+
): SearchGraphRelationV1 {
|
|
415
|
+
return {
|
|
416
|
+
schemaVersion: 1,
|
|
417
|
+
source: "symbol_graph",
|
|
418
|
+
edgeId: edge.edgeId,
|
|
419
|
+
direction,
|
|
420
|
+
edgeKind: edge.kind,
|
|
421
|
+
repoId: endpoint.repoId,
|
|
422
|
+
refId: endpoint.refId,
|
|
423
|
+
fileId: endpoint.fileId,
|
|
424
|
+
path: endpoint.filePath,
|
|
425
|
+
crossRepository: edge.crossRepo,
|
|
426
|
+
symbol: {
|
|
427
|
+
id: endpoint.id,
|
|
428
|
+
name: endpoint.name,
|
|
429
|
+
qualifiedName: endpoint.qualifiedName,
|
|
430
|
+
kind: endpoint.kind,
|
|
431
|
+
},
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
function symbolResolutionOmission(
|
|
436
|
+
direction: "incoming" | "outgoing",
|
|
437
|
+
edge: SymbolEdgeV1,
|
|
438
|
+
): SearchGraphOmissionV1 {
|
|
439
|
+
const reason =
|
|
440
|
+
edge.resolution === "ambiguous"
|
|
441
|
+
? "ambiguous_endpoint"
|
|
442
|
+
: edge.resolution === "heuristic"
|
|
443
|
+
? "heuristic_endpoint"
|
|
444
|
+
: edge.resolution === "unresolved"
|
|
445
|
+
? "unresolved_endpoint"
|
|
446
|
+
: "endpoint_missing";
|
|
447
|
+
return {
|
|
448
|
+
reason,
|
|
449
|
+
count: 1,
|
|
450
|
+
detail: `${direction} symbol edge "${edge.edgeId}" has persisted resolution "${edge.resolution}"; no endpoint was guessed`,
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
function missingEndpoint(
|
|
455
|
+
direction: "incoming" | "outgoing",
|
|
456
|
+
edgeId: string,
|
|
457
|
+
): SearchGraphOmissionV1 {
|
|
458
|
+
return {
|
|
459
|
+
reason: "endpoint_missing",
|
|
460
|
+
count: 1,
|
|
461
|
+
detail: `${direction} edge "${edgeId}" names an endpoint that is absent or inconsistent in the persisted graph snapshot`,
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
function sameFile(node: FileNodeV1, target: SearchGraphEnrichmentTargetV1): boolean {
|
|
466
|
+
return (
|
|
467
|
+
node.repoId === target.repoId &&
|
|
468
|
+
node.refId === target.refId &&
|
|
469
|
+
node.fileId === target.fileId &&
|
|
470
|
+
node.filePath === target.filePath
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
function sameSymbol(node: SymbolNodeV1, target: SearchGraphEnrichmentTargetV1): boolean {
|
|
475
|
+
return (
|
|
476
|
+
node.repoId === target.repoId &&
|
|
477
|
+
node.refId === target.refId &&
|
|
478
|
+
node.fileId === target.fileId &&
|
|
479
|
+
node.filePath === target.filePath &&
|
|
480
|
+
node.id === target.symbolId
|
|
481
|
+
);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
function matchesResolvedTarget(node: FileNodeV1, edge: FileEdgeV1): boolean {
|
|
485
|
+
return (
|
|
486
|
+
edge.resolution.status === "resolved" &&
|
|
487
|
+
node.fileId === edge.resolution.targetFileId &&
|
|
488
|
+
node.repoId === edge.resolution.targetRepoId &&
|
|
489
|
+
node.refId === edge.resolution.targetRefId &&
|
|
490
|
+
node.filePath === edge.resolution.targetPath
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
function matchesFileSource(node: FileNodeV1, edge: FileEdgeV1): boolean {
|
|
495
|
+
return (
|
|
496
|
+
node.fileId === edge.fromFileId &&
|
|
497
|
+
node.repoId === edge.repoId &&
|
|
498
|
+
node.refId === edge.refId &&
|
|
499
|
+
node.filePath === edge.fromPath
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
function matchesSymbolTarget(node: SymbolNodeV1, edge: SymbolEdgeV1): boolean {
|
|
504
|
+
return (
|
|
505
|
+
edge.target !== undefined &&
|
|
506
|
+
node.id === edge.target.symbolId &&
|
|
507
|
+
node.qualifiedName === edge.target.qualifiedName &&
|
|
508
|
+
node.repoId === edge.target.repoId &&
|
|
509
|
+
node.refId === edge.target.refId &&
|
|
510
|
+
node.filePath === edge.target.filePath
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
function matchesSymbolSource(node: SymbolNodeV1, edge: SymbolEdgeV1): boolean {
|
|
515
|
+
return node.id === edge.fromSymbolId && node.repoId === edge.repoId && node.refId === edge.refId;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
function partialOmissions(
|
|
519
|
+
graphName: string,
|
|
520
|
+
issues: readonly { kind: string; message: string }[],
|
|
521
|
+
): SearchGraphOmissionV1[] {
|
|
522
|
+
if (issues.length === 0) return [];
|
|
523
|
+
return [
|
|
524
|
+
{
|
|
525
|
+
reason: "graph_partial",
|
|
526
|
+
count: issues.length,
|
|
527
|
+
detail: `${graphName} loaded with ${String(issues.length)} persisted snapshot issue(s)`,
|
|
528
|
+
},
|
|
529
|
+
];
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
function setContext(
|
|
533
|
+
entries: Map<string, SearchGraphEnrichmentEntryV1>,
|
|
534
|
+
targetId: string,
|
|
535
|
+
graphContext: NonNullable<SearchGraphEnrichmentEntryV1["graphContext"]>,
|
|
536
|
+
): void {
|
|
537
|
+
const entry = entries.get(targetId);
|
|
538
|
+
if (entry !== undefined) entries.set(targetId, { ...entry, graphContext });
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
function setLinked(
|
|
542
|
+
entries: Map<string, SearchGraphEnrichmentEntryV1>,
|
|
543
|
+
targetId: string,
|
|
544
|
+
linkedSymbols: NonNullable<SearchGraphEnrichmentEntryV1["linkedSymbols"]>,
|
|
545
|
+
): void {
|
|
546
|
+
const entry = entries.get(targetId);
|
|
547
|
+
if (entry !== undefined) entries.set(targetId, { ...entry, linkedSymbols });
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
function unavailableDetail(
|
|
551
|
+
graphName: string,
|
|
552
|
+
scope: Pick<EnrichmentScope, "workspaceId" | "generationId">,
|
|
553
|
+
issues: readonly { kind: string; message: string }[],
|
|
554
|
+
): string {
|
|
555
|
+
const bounded = boundedIssueDetails(issues);
|
|
556
|
+
const suffix =
|
|
557
|
+
issues.length === 0
|
|
558
|
+
? "no persisted snapshot was returned"
|
|
559
|
+
: `${bounded.issues.join("; ")}${bounded.omittedIssueCount === 0 ? "" : `; +${String(bounded.omittedIssueCount)} further issue(s) omitted from this warning`}`;
|
|
560
|
+
return boundSearchGraphDetail(
|
|
561
|
+
`${graphName} unavailable for workspace "${scope.workspaceId}" generation "${scope.generationId}": ${suffix}`,
|
|
562
|
+
);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
function readFailureDetail(
|
|
566
|
+
graphName: string,
|
|
567
|
+
scope: Pick<EnrichmentScope, "workspaceId" | "generationId">,
|
|
568
|
+
error: unknown,
|
|
569
|
+
): string {
|
|
570
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
571
|
+
return boundSearchGraphDetail(
|
|
572
|
+
`${graphName} read failed for workspace "${scope.workspaceId}" generation "${scope.generationId}": ${message}`,
|
|
573
|
+
);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
function unavailableWarning(
|
|
577
|
+
code: string,
|
|
578
|
+
message: string,
|
|
579
|
+
scope: Pick<EnrichmentScope, "workspaceId" | "generationId">,
|
|
580
|
+
issues: readonly { kind: string; message: string }[],
|
|
581
|
+
): ToolWarningV1 {
|
|
582
|
+
const bounded = boundedIssueDetails(issues);
|
|
583
|
+
return {
|
|
584
|
+
code,
|
|
585
|
+
message,
|
|
586
|
+
details: {
|
|
587
|
+
workspaceId: boundSearchGraphDetail(scope.workspaceId),
|
|
588
|
+
generationId: boundSearchGraphDetail(scope.generationId),
|
|
589
|
+
issues: bounded.issues,
|
|
590
|
+
omittedIssueCount: bounded.omittedIssueCount,
|
|
591
|
+
},
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
function partialWarning(
|
|
596
|
+
code: string,
|
|
597
|
+
graphName: string,
|
|
598
|
+
scope: Pick<EnrichmentScope, "workspaceId" | "generationId">,
|
|
599
|
+
issues: readonly { kind: string; message: string }[],
|
|
600
|
+
): ToolWarningV1 {
|
|
601
|
+
const bounded = boundedIssueDetails(issues);
|
|
602
|
+
return {
|
|
603
|
+
code,
|
|
604
|
+
message: boundSearchGraphDetail(
|
|
605
|
+
`${graphName} for workspace "${scope.workspaceId}" generation "${scope.generationId}" is partial; usable direct relations were retained and omissions are explicit`,
|
|
606
|
+
),
|
|
607
|
+
details: {
|
|
608
|
+
workspaceId: boundSearchGraphDetail(scope.workspaceId),
|
|
609
|
+
generationId: boundSearchGraphDetail(scope.generationId),
|
|
610
|
+
issues: bounded.issues,
|
|
611
|
+
omittedIssueCount: bounded.omittedIssueCount,
|
|
612
|
+
},
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
function issueDetails(issues: readonly { kind: string; message: string }[]): string[] {
|
|
617
|
+
return issues
|
|
618
|
+
.map((issue) => boundSearchGraphDetail(`${issue.kind}: ${issue.message}`))
|
|
619
|
+
.sort(compareCodepoints);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
function boundedIssueDetails(issues: readonly { kind: string; message: string }[]): {
|
|
623
|
+
issues: string[];
|
|
624
|
+
omittedIssueCount: number;
|
|
625
|
+
} {
|
|
626
|
+
const sorted = issueDetails(issues);
|
|
627
|
+
return {
|
|
628
|
+
issues: sorted.slice(0, SEARCH_GRAPH_WARNING_ISSUE_LIMIT),
|
|
629
|
+
omittedIssueCount: Math.max(0, sorted.length - SEARCH_GRAPH_WARNING_ISSUE_LIMIT),
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
function compareWarnings(left: ToolWarningV1, right: ToolWarningV1): number {
|
|
634
|
+
const byCode = compareCodepoints(left.code, right.code);
|
|
635
|
+
return byCode !== 0 ? byCode : compareCodepoints(left.message, right.message);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/** Die effektive Defaultgrenze als Teil der Adapter-API sichtbar halten. */
|
|
639
|
+
export { SEARCH_GRAPH_RELATION_LIMIT };
|