@untangle-code/cli 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/NOTICE +90 -0
- package/README.md +424 -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,402 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `untangle flow` — der Symbolgraph als Oberflaeche: wer ruft wen, auf
|
|
3
|
+
* welchem Weg, und wie sicher ist das.
|
|
4
|
+
*
|
|
5
|
+
* Er baut nichts. Er liest den Shard `symbol-graph`, den `untangle index`
|
|
6
|
+
* abgelegt hat, und beantwortet vier Fragen:
|
|
7
|
+
*
|
|
8
|
+
* 1. WEG: Welche Aufrufpfade fuehren von einem Symbol zu einem anderen —
|
|
9
|
+
* der kuerzeste, und alle bis Tiefe N.
|
|
10
|
+
* 2. ANFANG: Welche Symbole sind Einstiegspunkte (WP-88: verwaiste Symbole,
|
|
11
|
+
* konventionelle Namen, Testdateien, Routenverzeichnisse)?
|
|
12
|
+
* 3. SICHERHEIT: Jede Kante auf jedem Weg traegt ihre Aufloesungsart
|
|
13
|
+
* (exact/heuristic/ambiguous/unresolved) und ihre Confidence mit Basis
|
|
14
|
+
* und Signalen. Eine MEHRDEUTIGE Kante zeigt ALLE Kandidaten — es wird
|
|
15
|
+
* keiner ausgewaehlt.
|
|
16
|
+
* 4. WIRKUNG: Welche Symbole sind von einer Aenderung an X betroffen, und
|
|
17
|
+
* wie sicher ist diese Aussage (`--impact`)?
|
|
18
|
+
*
|
|
19
|
+
* DETERMINISMUS: Dieser Befehl gibt den Traversierungen bewusst KEINE
|
|
20
|
+
* Zeitquelle mit. Das Zeitbudget waere die einzige Groesse, die zwei Laeufe
|
|
21
|
+
* ueber denselben Index verschieden ausgehen liesse; Tiefe, Knoten- und
|
|
22
|
+
* Kantenbudget begrenzen die Arbeit ohnehin. Zwei Aufrufe liefern damit
|
|
23
|
+
* dieselbe Ausgabe.
|
|
24
|
+
*/
|
|
25
|
+
import path from "node:path";
|
|
26
|
+
|
|
27
|
+
import type { SymbolNodeV1, TraversalLimitsV1 } from "@untangle-code/domain";
|
|
28
|
+
import { DEFAULT_TRAVERSAL_LIMITS } from "@untangle-code/file-graph";
|
|
29
|
+
import {
|
|
30
|
+
analyzeImpact,
|
|
31
|
+
createSymbolGraphIndex,
|
|
32
|
+
detectEntryPoints,
|
|
33
|
+
findAllCallPaths,
|
|
34
|
+
findShortestCallPath,
|
|
35
|
+
type SymbolGraphIndex,
|
|
36
|
+
} from "@untangle-code/symbol-graph";
|
|
37
|
+
|
|
38
|
+
import {
|
|
39
|
+
boolFlag,
|
|
40
|
+
enumFlag,
|
|
41
|
+
integerFlag,
|
|
42
|
+
numberFlag,
|
|
43
|
+
stringFlag,
|
|
44
|
+
type FlagSpecs,
|
|
45
|
+
type ParsedArgs,
|
|
46
|
+
} from "../../cli/args.js";
|
|
47
|
+
import type { Command, CommandContext } from "../../cli/command.js";
|
|
48
|
+
import { EXIT, EnvironmentError, OperationalError, UsageError } from "../../cli/exit.js";
|
|
49
|
+
import { loadGraphs, type LoadedGraphsV1 } from "../../cli/graphs.js";
|
|
50
|
+
import { line, note } from "../../cli/io.js";
|
|
51
|
+
import { renderIssues } from "../graph/render.js";
|
|
52
|
+
|
|
53
|
+
import {
|
|
54
|
+
DEFAULT_FLOW_DEPTH,
|
|
55
|
+
DEFAULT_FLOW_RESULT_LIMIT,
|
|
56
|
+
MAX_FLOW_DEPTH,
|
|
57
|
+
MAX_FLOW_EDGES,
|
|
58
|
+
MAX_FLOW_NODES,
|
|
59
|
+
MAX_FLOW_RESULT_LIMIT,
|
|
60
|
+
} from "./limits.js";
|
|
61
|
+
import { limitItems } from "./output.js";
|
|
62
|
+
import {
|
|
63
|
+
renderAllPaths,
|
|
64
|
+
renderEntryPoints,
|
|
65
|
+
renderImpact,
|
|
66
|
+
renderShortest,
|
|
67
|
+
renderSymbolGraphHeader,
|
|
68
|
+
renderSymbolOverview,
|
|
69
|
+
} from "./render.js";
|
|
70
|
+
import { describeSymbol, selectSymbolNode } from "./select.js";
|
|
71
|
+
|
|
72
|
+
const FLAGS: FlagSpecs = {
|
|
73
|
+
root: {
|
|
74
|
+
kind: "string",
|
|
75
|
+
placeholder: "PATH",
|
|
76
|
+
describe: "Project directory; configuration is discovered from here.",
|
|
77
|
+
defaultLabel: "current directory",
|
|
78
|
+
},
|
|
79
|
+
depth: {
|
|
80
|
+
kind: "number",
|
|
81
|
+
placeholder: "N",
|
|
82
|
+
describe: "Maximum path length or impact-analysis depth.",
|
|
83
|
+
defaultLabel: String(DEFAULT_FLOW_DEPTH),
|
|
84
|
+
},
|
|
85
|
+
limit: {
|
|
86
|
+
kind: "number",
|
|
87
|
+
alias: "n",
|
|
88
|
+
placeholder: "N",
|
|
89
|
+
describe: "Maximum number of displayed paths, entry points or affected symbols.",
|
|
90
|
+
defaultLabel: String(DEFAULT_FLOW_RESULT_LIMIT),
|
|
91
|
+
},
|
|
92
|
+
"entry-points": {
|
|
93
|
+
kind: "boolean",
|
|
94
|
+
describe: "List entry points instead of searching paths (heuristic, with evidence).",
|
|
95
|
+
},
|
|
96
|
+
impact: {
|
|
97
|
+
kind: "boolean",
|
|
98
|
+
describe: "Impact analysis: which symbols depend on the selected symbol.",
|
|
99
|
+
},
|
|
100
|
+
"min-confidence": {
|
|
101
|
+
kind: "number",
|
|
102
|
+
placeholder: "X",
|
|
103
|
+
describe: "Minimum path confidence for --impact; excluded paths remain reported.",
|
|
104
|
+
defaultLabel: "0",
|
|
105
|
+
},
|
|
106
|
+
"max-nodes": {
|
|
107
|
+
kind: "number",
|
|
108
|
+
placeholder: "N",
|
|
109
|
+
describe: "Traversal node budget.",
|
|
110
|
+
defaultLabel: String(DEFAULT_TRAVERSAL_LIMITS.maxNodes),
|
|
111
|
+
},
|
|
112
|
+
"max-edges": {
|
|
113
|
+
kind: "number",
|
|
114
|
+
placeholder: "N",
|
|
115
|
+
describe: "Traversal edge budget.",
|
|
116
|
+
defaultLabel: String(DEFAULT_TRAVERSAL_LIMITS.maxEdges),
|
|
117
|
+
},
|
|
118
|
+
format: {
|
|
119
|
+
kind: "string",
|
|
120
|
+
placeholder: "text|json",
|
|
121
|
+
describe: "Output format. json contains the same information in machine-readable form.",
|
|
122
|
+
defaultLabel: "text",
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export const flowCommand: Command = {
|
|
127
|
+
spec: {
|
|
128
|
+
name: "flow",
|
|
129
|
+
implementedBy: "commands/flow/index.js",
|
|
130
|
+
summary: "Show call paths between symbols",
|
|
131
|
+
usage:
|
|
132
|
+
"untangle flow <from> [<to>] | untangle flow --entry-points | untangle flow <symbol> --impact",
|
|
133
|
+
details: [
|
|
134
|
+
"Three forms: `flow <from> <to>` finds call paths, including the shortest and all paths up to depth N. `flow <symbol>` shows its callers and callees. `flow <symbol> --impact` identifies dependent symbols and the confidence of each relationship.",
|
|
135
|
+
"`--entry-points` lists detected entry points: orphan symbols, conventional start names, test symbols and symbols in route directories. Detection is heuristic; each entry includes its evidence and individual weights.",
|
|
136
|
+
"Every edge includes its resolution and confidence: exact (proven), heuristic (plausible), ambiguous (multiple candidates), unresolved (no target, with a reason). Ambiguous edges show all weighted candidates without selecting one.",
|
|
137
|
+
"A name matching multiple symbols is never guessed: candidates are shown with file and line, and the command exits with code 2. Use `path/file.ts:name` or a qualified name to select one.",
|
|
138
|
+
"Reads the stored graph. A missing graph produces exit code 4 and points to `untangle index`; it never claims there are no calls.",
|
|
139
|
+
],
|
|
140
|
+
flags: FLAGS,
|
|
141
|
+
examples: [
|
|
142
|
+
"untangle flow --entry-points",
|
|
143
|
+
"untangle flow main calculateDiscount",
|
|
144
|
+
"untangle flow services/api/src/orders.ts:calculateDiscount --impact",
|
|
145
|
+
"untangle flow calculateDiscount --format=json",
|
|
146
|
+
],
|
|
147
|
+
exitCodes: [
|
|
148
|
+
[EXIT.ok, "The symbol graph was read and displayed."],
|
|
149
|
+
[EXIT.operational, "Operational error, or the selected symbol is absent from the graph."],
|
|
150
|
+
[EXIT.usage, "Usage error, or an ambiguous symbol name."],
|
|
151
|
+
[EXIT.environment, "No symbol graph is available; run `untangle index`."],
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
async run(ctx: CommandContext, args: ParsedArgs): Promise<number> {
|
|
156
|
+
const format = enumFlag(args, "format", ["text", "json"] as const, "text");
|
|
157
|
+
const depth = integerFlag(args, "depth", DEFAULT_FLOW_DEPTH);
|
|
158
|
+
if (depth < 1 || depth > MAX_FLOW_DEPTH) {
|
|
159
|
+
throw new UsageError(
|
|
160
|
+
`Option "--depth" requires 1 to ${String(MAX_FLOW_DEPTH)}; received "${String(depth)}".`,
|
|
161
|
+
"Example: --depth=6",
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
const limit = integerFlag(args, "limit", DEFAULT_FLOW_RESULT_LIMIT);
|
|
165
|
+
if (limit < 1 || limit > MAX_FLOW_RESULT_LIMIT) {
|
|
166
|
+
throw new UsageError(
|
|
167
|
+
`Option "--limit" requires 1 to ${String(MAX_FLOW_RESULT_LIMIT)}; received "${String(limit)}".`,
|
|
168
|
+
"Example: --limit=20",
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
const maxNodes = integerFlag(args, "max-nodes", DEFAULT_TRAVERSAL_LIMITS.maxNodes);
|
|
172
|
+
if (maxNodes < 1 || maxNodes > MAX_FLOW_NODES) {
|
|
173
|
+
throw new UsageError(
|
|
174
|
+
`Option "--max-nodes" requires 1 to ${String(MAX_FLOW_NODES)}; received "${String(maxNodes)}".`,
|
|
175
|
+
`Example: --max-nodes=${String(DEFAULT_TRAVERSAL_LIMITS.maxNodes)}`,
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
const maxEdges = integerFlag(args, "max-edges", DEFAULT_TRAVERSAL_LIMITS.maxEdges);
|
|
179
|
+
if (maxEdges < 1 || maxEdges > MAX_FLOW_EDGES) {
|
|
180
|
+
throw new UsageError(
|
|
181
|
+
`Option "--max-edges" requires 1 to ${String(MAX_FLOW_EDGES)}; received "${String(maxEdges)}".`,
|
|
182
|
+
`Example: --max-edges=${String(DEFAULT_TRAVERSAL_LIMITS.maxEdges)}`,
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
const wantEntryPoints = boolFlag(args, "entry-points");
|
|
186
|
+
const wantImpact = boolFlag(args, "impact");
|
|
187
|
+
const minConfidence = numberFlag(args, "min-confidence") ?? 0;
|
|
188
|
+
if (minConfidence < 0 || minConfidence > 1) {
|
|
189
|
+
throw new UsageError(
|
|
190
|
+
`Option "--min-confidence" requires a value in [0, 1]; received "${String(minConfidence)}".`,
|
|
191
|
+
"Example: --min-confidence=0.5",
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
const rootFlag = stringFlag(args, "root");
|
|
195
|
+
|
|
196
|
+
const positionals = args.positionals;
|
|
197
|
+
if (!wantEntryPoints && positionals.length === 0) {
|
|
198
|
+
throw new UsageError(
|
|
199
|
+
"A symbol is required.",
|
|
200
|
+
"Use `untangle flow <from> <to>`, `untangle flow <symbol> [--impact]`, or `untangle flow --entry-points`.",
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
if (wantEntryPoints && positionals.length > 0) {
|
|
204
|
+
throw new UsageError(
|
|
205
|
+
"`--entry-points` lists the entire graph and does not accept a symbol.",
|
|
206
|
+
"Omit the argument, or query a symbol without --entry-points.",
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
if (positionals.length > 2) {
|
|
210
|
+
throw new UsageError(
|
|
211
|
+
`Expected at most two symbols; received ${String(positionals.length)}.`,
|
|
212
|
+
"Use `untangle flow <from> <to>`.",
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
if (wantImpact && positionals.length === 2) {
|
|
216
|
+
throw new UsageError(
|
|
217
|
+
"`--impact` examines the impact of one symbol, not a path between two symbols.",
|
|
218
|
+
"Omit the second symbol, or query the path without --impact.",
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
const loaded = await loadGraphs({
|
|
223
|
+
cwd: ctx.cwd,
|
|
224
|
+
env: ctx.env,
|
|
225
|
+
signal: ctx.signal,
|
|
226
|
+
...(rootFlag === undefined ? {} : { root: path.resolve(ctx.cwd, rootFlag) }),
|
|
227
|
+
});
|
|
228
|
+
for (const issue of renderIssues(loaded.issues)) note(ctx.io, issue);
|
|
229
|
+
|
|
230
|
+
const symbolGraph = requireSymbolGraph(loaded);
|
|
231
|
+
const index = createSymbolGraphIndex(symbolGraph.graph);
|
|
232
|
+
const limits: TraversalLimitsV1 = {
|
|
233
|
+
maxDepth: depth,
|
|
234
|
+
maxNodes,
|
|
235
|
+
maxEdges,
|
|
236
|
+
maxWallTimeMs: DEFAULT_TRAVERSAL_LIMITS.maxWallTimeMs,
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
const header = renderSymbolGraphHeader(index, loaded.generationId, symbolGraph.ledgerInShard);
|
|
240
|
+
|
|
241
|
+
/* --------------------------- Einstiegspunkte ---------------------- */
|
|
242
|
+
|
|
243
|
+
if (wantEntryPoints) {
|
|
244
|
+
const set = detectEntryPoints(index);
|
|
245
|
+
if (format === "json") {
|
|
246
|
+
line(
|
|
247
|
+
ctx.io,
|
|
248
|
+
JSON.stringify({ generationId: loaded.generationId, entryPoints: set }, null, 2),
|
|
249
|
+
);
|
|
250
|
+
return EXIT.ok;
|
|
251
|
+
}
|
|
252
|
+
for (const text of [...header, "", ...renderEntryPoints(set, limit)]) line(ctx.io, text);
|
|
253
|
+
return EXIT.ok;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
const from = resolveSymbol(index, positionals[0] as string);
|
|
257
|
+
|
|
258
|
+
/* ------------------------------ Wirkung --------------------------- */
|
|
259
|
+
|
|
260
|
+
if (wantImpact) {
|
|
261
|
+
const result = analyzeImpact(index, {
|
|
262
|
+
rootSymbolIds: [from.id],
|
|
263
|
+
limits,
|
|
264
|
+
minConfidence,
|
|
265
|
+
});
|
|
266
|
+
if (format === "json") {
|
|
267
|
+
const affected = limitItems(result.affected, limit);
|
|
268
|
+
line(
|
|
269
|
+
ctx.io,
|
|
270
|
+
JSON.stringify(
|
|
271
|
+
{
|
|
272
|
+
generationId: loaded.generationId,
|
|
273
|
+
root: from,
|
|
274
|
+
impact: { ...result, affected: affected.items },
|
|
275
|
+
truncated: affected.truncated,
|
|
276
|
+
omittedCount: affected.omittedCount,
|
|
277
|
+
},
|
|
278
|
+
null,
|
|
279
|
+
2,
|
|
280
|
+
),
|
|
281
|
+
);
|
|
282
|
+
return EXIT.ok;
|
|
283
|
+
}
|
|
284
|
+
for (const text of [
|
|
285
|
+
...header,
|
|
286
|
+
"",
|
|
287
|
+
`IMPACT OF A CHANGE TO ${describeSymbol(from)}`,
|
|
288
|
+
"",
|
|
289
|
+
...renderImpact(index, result, limit),
|
|
290
|
+
]) {
|
|
291
|
+
line(ctx.io, text);
|
|
292
|
+
}
|
|
293
|
+
return EXIT.ok;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* --------------------------- Einzelnes Symbol --------------------- */
|
|
297
|
+
|
|
298
|
+
if (positionals.length === 1) {
|
|
299
|
+
if (format === "json") {
|
|
300
|
+
const outgoing = limitItems(index.outgoingEdges(from.id), limit);
|
|
301
|
+
const callers = limitItems(index.callers(from.id), limit);
|
|
302
|
+
const omittedCount = outgoing.omittedCount + callers.omittedCount;
|
|
303
|
+
line(
|
|
304
|
+
ctx.io,
|
|
305
|
+
JSON.stringify(
|
|
306
|
+
{
|
|
307
|
+
generationId: loaded.generationId,
|
|
308
|
+
symbol: from,
|
|
309
|
+
outgoing: outgoing.items,
|
|
310
|
+
callers: callers.items,
|
|
311
|
+
truncated: omittedCount > 0,
|
|
312
|
+
omittedCount,
|
|
313
|
+
},
|
|
314
|
+
null,
|
|
315
|
+
2,
|
|
316
|
+
),
|
|
317
|
+
);
|
|
318
|
+
return EXIT.ok;
|
|
319
|
+
}
|
|
320
|
+
for (const text of [...header, "", ...renderSymbolOverview(index, from)]) line(ctx.io, text);
|
|
321
|
+
return EXIT.ok;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/* ------------------------------- Pfade ---------------------------- */
|
|
325
|
+
|
|
326
|
+
const to = resolveSymbol(index, positionals[1] as string);
|
|
327
|
+
const shortest = findShortestCallPath(index, {
|
|
328
|
+
fromSymbolId: from.id,
|
|
329
|
+
toSymbolId: to.id,
|
|
330
|
+
limits,
|
|
331
|
+
});
|
|
332
|
+
const all = findAllCallPaths(index, {
|
|
333
|
+
fromSymbolId: from.id,
|
|
334
|
+
toSymbolId: to.id,
|
|
335
|
+
maxDepth: depth,
|
|
336
|
+
maxPaths: limit,
|
|
337
|
+
maxNodes,
|
|
338
|
+
maxEdges,
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
if (format === "json") {
|
|
342
|
+
line(
|
|
343
|
+
ctx.io,
|
|
344
|
+
JSON.stringify({ generationId: loaded.generationId, from, to, shortest, all }, null, 2),
|
|
345
|
+
);
|
|
346
|
+
return EXIT.ok;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
for (const text of [
|
|
350
|
+
...header,
|
|
351
|
+
"",
|
|
352
|
+
`VON ${describeSymbol(from)}`,
|
|
353
|
+
`TO ${describeSymbol(to)}`,
|
|
354
|
+
"",
|
|
355
|
+
// `false`: siehe Kopfkommentar — dieser Befehl gibt der Suche keine
|
|
356
|
+
// Zeitquelle, das Zeitbudget ist also nicht durchgesetzt und sagt das.
|
|
357
|
+
...renderShortest(index, shortest, false),
|
|
358
|
+
"",
|
|
359
|
+
...renderAllPaths(index, all),
|
|
360
|
+
]) {
|
|
361
|
+
line(ctx.io, text);
|
|
362
|
+
}
|
|
363
|
+
return EXIT.ok;
|
|
364
|
+
},
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
/* ------------------------------------------------------------------ */
|
|
368
|
+
|
|
369
|
+
function requireSymbolGraph(loaded: LoadedGraphsV1): NonNullable<LoadedGraphsV1["symbolGraph"]> {
|
|
370
|
+
if (loaded.symbolGraph !== null) return loaded.symbolGraph;
|
|
371
|
+
throw new EnvironmentError(
|
|
372
|
+
`No symbol graph is available: ${loaded.symbolGraphMissingReason ?? "no reason given"} ` +
|
|
373
|
+
"Nothing was searched; this does not mean there are no calls.",
|
|
374
|
+
"Run `untangle index` to store the symbol-graph shard.",
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Das Symbol zur Nutzereingabe — oder ein Abbruch, der die Kandidaten nennt.
|
|
380
|
+
* Geraten wird nie (architecture.md §17.2 gilt auch fuer die Oberflaeche).
|
|
381
|
+
*/
|
|
382
|
+
function resolveSymbol(index: SymbolGraphIndex, query: string): SymbolNodeV1 {
|
|
383
|
+
const selection = selectSymbolNode(index.nodes(), query);
|
|
384
|
+
if (selection.status === "found") return selection.node;
|
|
385
|
+
if (selection.status === "ambiguous") {
|
|
386
|
+
const list = selection.candidates.map((node) => `\n ${describeSymbol(node)}`).join("");
|
|
387
|
+
throw new UsageError(
|
|
388
|
+
`"${query}" matches ${String(selection.candidates.length)} symbols (${selection.matchedBy}) — ` +
|
|
389
|
+
`no candidate is selected:${list}`,
|
|
390
|
+
"Select one using `path/file.ts:name` or the qualified name.",
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
const near =
|
|
394
|
+
selection.near.length === 0
|
|
395
|
+
? ""
|
|
396
|
+
: ` Similar names: ${selection.near.map((node) => node.qualifiedName).join(", ")}.`;
|
|
397
|
+
throw new OperationalError(
|
|
398
|
+
`Symbol "${query}" is absent from the symbol graph. Nothing was evaluated; ` +
|
|
399
|
+
`this does not mean there are no calls.${near}`,
|
|
400
|
+
"Check the name or run `untangle index` again. `untangle flow --entry-points` lists known symbols.",
|
|
401
|
+
);
|
|
402
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DEFAULT_TRAVERSAL_LIMITS } from "@untangle-code/file-graph";
|
|
2
|
+
|
|
3
|
+
/** Public CLI/MCP resource ceilings for symbol-graph reads. */
|
|
4
|
+
export const DEFAULT_FLOW_DEPTH = 6;
|
|
5
|
+
export const MAX_FLOW_DEPTH = 64;
|
|
6
|
+
export const DEFAULT_FLOW_RESULT_LIMIT = 20;
|
|
7
|
+
export const MAX_FLOW_RESULT_LIMIT = 1_000;
|
|
8
|
+
export const MAX_FLOW_NODES = DEFAULT_TRAVERSAL_LIMITS.maxNodes;
|
|
9
|
+
export const MAX_FLOW_EDGES = DEFAULT_TRAVERSAL_LIMITS.maxEdges;
|
|
10
|
+
|
|
11
|
+
/** MCP graph queries deliberately expose the bounded neighborhood form only. */
|
|
12
|
+
export const MAX_GRAPH_QUERY_DEPTH = DEFAULT_TRAVERSAL_LIMITS.maxDepth;
|
|
13
|
+
export const MAX_GRAPH_QUERY_NODES = DEFAULT_TRAVERSAL_LIMITS.maxNodes;
|
|
14
|
+
export const MAX_GRAPH_QUERY_EDGES = DEFAULT_TRAVERSAL_LIMITS.maxEdges;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface LimitedItems<T> {
|
|
2
|
+
items: T[];
|
|
3
|
+
truncated: boolean;
|
|
4
|
+
omittedCount: number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/** Bounded presentation helper shared by text-independent JSON surfaces. */
|
|
8
|
+
export function limitItems<T>(items: readonly T[], limit: number): LimitedItems<T> {
|
|
9
|
+
const boundedLimit = Math.max(0, Math.floor(limit));
|
|
10
|
+
const omittedCount = Math.max(0, items.length - boundedLimit);
|
|
11
|
+
return {
|
|
12
|
+
items: items.slice(0, boundedLimit),
|
|
13
|
+
truncated: omittedCount > 0,
|
|
14
|
+
omittedCount,
|
|
15
|
+
};
|
|
16
|
+
}
|