@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
package/src/index.ts
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* `untangle` — der Einstiegspunkt (WP-124).
|
|
4
|
+
*
|
|
5
|
+
* Dieses Modul tut vier Dinge und sonst nichts:
|
|
6
|
+
* 1. es waehlt den Unterbefehl,
|
|
7
|
+
* 2. es zerlegt die Argumente gegen dessen Spezifikation,
|
|
8
|
+
* 3. es reicht ein Abbruchsignal durch (SIGINT/SIGTERM),
|
|
9
|
+
* 4. es uebersetzt Fehler in Exit-Codes und Meldungen auf stderr.
|
|
10
|
+
*
|
|
11
|
+
* NUTZDATEN GEHEN NACH STDOUT, ALLES ANDERE NACH STDERR — auch die
|
|
12
|
+
* Hilfetexte zu Fehlern. Das ist die Regel, die `untangle query
|
|
13
|
+
* --format=jsonl | jq` benutzbar haelt.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { compareCodepoints } from "@untangle-code/domain";
|
|
17
|
+
|
|
18
|
+
import { parseArgs } from "./cli/args.js";
|
|
19
|
+
import { renderCommandHelp, wrap, type Command, type CommandContext } from "./cli/command.js";
|
|
20
|
+
import { CliError, EXIT, UsageError } from "./cli/exit.js";
|
|
21
|
+
import { line, note, processIo, type Io } from "./cli/io.js";
|
|
22
|
+
import { CLI_VERSION } from "./cli/version.js";
|
|
23
|
+
import { complexityCommand } from "./commands/complexity.js";
|
|
24
|
+
import { doctorCommand } from "./commands/doctor.js";
|
|
25
|
+
import { extensionsCommand } from "./commands/extensions.js";
|
|
26
|
+
// WP-229: `graph` und `flow` sind GEBAUT und kommen deshalb nicht mehr aus
|
|
27
|
+
// `unavailable.ts` — sie lesen den Graphen zurueck, den `untangle index`
|
|
28
|
+
// ablegt. Siehe `commands/graph/index.ts` und `commands/flow/index.ts`.
|
|
29
|
+
import { flowCommand } from "./commands/flow/index.js";
|
|
30
|
+
import { graphCommand } from "./commands/graph/index.js";
|
|
31
|
+
// WP-218: die VOLLSTAENDIGE init-Implementierung liegt unter
|
|
32
|
+
// `commands/init/`. Bis WP-218 zeigte dieser Import auf einen gleichnamigen
|
|
33
|
+
// Stub `commands/init.ts` daneben — gebaut, getestet, aber nie verdrahtet.
|
|
34
|
+
// `command-wiring.test.ts` laesst diesen Fehler nicht wiederkehren.
|
|
35
|
+
import { indexCommand } from "./commands/index/index.js";
|
|
36
|
+
import { initCommand } from "./commands/init/index.js";
|
|
37
|
+
import { mcpCommand } from "./commands/mcp.js";
|
|
38
|
+
import { productCommand } from "./commands/product.js";
|
|
39
|
+
import { queryCommand } from "./commands/query.js";
|
|
40
|
+
import { scanCommand } from "./commands/scan.js";
|
|
41
|
+
// WP-128: `watch` ist gebaut und wird deshalb NICHT mehr aus
|
|
42
|
+
// `unavailable.ts` bezogen. Siehe `commands/watch-command.ts`.
|
|
43
|
+
import { watchCommand } from "./commands/watch-command.js";
|
|
44
|
+
import { isEntryPoint } from "./entry-point.js";
|
|
45
|
+
|
|
46
|
+
/** Version des Binaers. Bewusst hier und nicht aus package.json gelesen: der
|
|
47
|
+
* gebaute `dist/` liegt eine Ebene tiefer als das Manifest, und ein Lesefehler
|
|
48
|
+
* beim Start waere ein absurder Grund, an `--version` zu scheitern. */
|
|
49
|
+
export { CLI_VERSION } from "./cli/version.js";
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Die Reihenfolge ist die des Nutzerwegs, nicht das Alphabet: einrichten,
|
|
53
|
+
* indizieren, suchen, messen, verstehen, beobachten, diagnostizieren,
|
|
54
|
+
* erweitern.
|
|
55
|
+
*/
|
|
56
|
+
export const COMMANDS: readonly Command[] = [
|
|
57
|
+
initCommand,
|
|
58
|
+
indexCommand,
|
|
59
|
+
queryCommand,
|
|
60
|
+
complexityCommand,
|
|
61
|
+
productCommand,
|
|
62
|
+
scanCommand,
|
|
63
|
+
graphCommand,
|
|
64
|
+
flowCommand,
|
|
65
|
+
mcpCommand,
|
|
66
|
+
watchCommand,
|
|
67
|
+
doctorCommand,
|
|
68
|
+
extensionsCommand,
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
const BY_NAME = new Map(COMMANDS.map((command) => [command.spec.name, command]));
|
|
72
|
+
|
|
73
|
+
function renderRootHelp(): string {
|
|
74
|
+
const lines: string[] = [];
|
|
75
|
+
lines.push("untangle — local code intelligence: search, complexity and graphs.", "");
|
|
76
|
+
lines.push("USAGE", " untangle <command> [options]", " untangle <command> --help", "");
|
|
77
|
+
lines.push("COMMANDS");
|
|
78
|
+
const width = Math.max(...COMMANDS.map((command) => command.spec.name.length));
|
|
79
|
+
for (const command of COMMANDS) {
|
|
80
|
+
const name = command.spec.name.padEnd(width);
|
|
81
|
+
lines.push(` ${name} ${command.spec.summary}`);
|
|
82
|
+
}
|
|
83
|
+
lines.push("");
|
|
84
|
+
lines.push("GLOBAL OPTIONS");
|
|
85
|
+
lines.push(" -h, --help Show this help or help for a command.");
|
|
86
|
+
lines.push(" -V, --version Print the version.");
|
|
87
|
+
lines.push("");
|
|
88
|
+
lines.push("EXIT-CODES");
|
|
89
|
+
lines.push(" 0 Success.");
|
|
90
|
+
lines.push(" 1 Operational error.");
|
|
91
|
+
lines.push(" 2 Invalid arguments.");
|
|
92
|
+
lines.push(" 3 Capability not yet implemented.");
|
|
93
|
+
lines.push(" 4 Environment not ready (Ollama/Qdrant/index).");
|
|
94
|
+
lines.push(" 5 Quality gate failed.");
|
|
95
|
+
lines.push(" 130 Cancelled.");
|
|
96
|
+
lines.push("");
|
|
97
|
+
const pending = COMMANDS.filter((command) => command.spec.notYetBuilt === true).map(
|
|
98
|
+
(command) => command.spec.name,
|
|
99
|
+
);
|
|
100
|
+
if (pending.length > 0) {
|
|
101
|
+
lines.push("IMPLEMENTATION STATUS");
|
|
102
|
+
for (const wrapped of wrap(
|
|
103
|
+
`The commands ${pending.join(", ")} are registered, but their capabilities are not yet ` +
|
|
104
|
+
"implemented. They report this explicitly and exit with code 3. " +
|
|
105
|
+
"Use `untangle <command> --help` to inspect the missing capability.",
|
|
106
|
+
76,
|
|
107
|
+
)) {
|
|
108
|
+
lines.push(` ${wrapped}`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return `${lines.join("\n")}\n`;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** Nennt den aehnlichsten Befehl, wenn sich jemand vertippt hat. */
|
|
115
|
+
function suggest(name: string): string | undefined {
|
|
116
|
+
const candidates = [...BY_NAME.keys()]
|
|
117
|
+
.map((candidate) => ({ candidate, distance: editDistance(name, candidate) }))
|
|
118
|
+
.filter((entry) => entry.distance <= 3)
|
|
119
|
+
.sort((a, b) => a.distance - b.distance || compareCodepoints(a.candidate, b.candidate));
|
|
120
|
+
return candidates[0]?.candidate;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function editDistance(a: string, b: string): number {
|
|
124
|
+
const rows: number[][] = [];
|
|
125
|
+
for (let i = 0; i <= a.length; i++) rows.push(new Array<number>(b.length + 1).fill(0));
|
|
126
|
+
for (let i = 0; i <= a.length; i++) (rows[i] as number[])[0] = i;
|
|
127
|
+
for (let j = 0; j <= b.length; j++) (rows[0] as number[])[j] = j;
|
|
128
|
+
for (let i = 1; i <= a.length; i++) {
|
|
129
|
+
for (let j = 1; j <= b.length; j++) {
|
|
130
|
+
const cost = a[i - 1] === b[j - 1] ? 0 : 1;
|
|
131
|
+
(rows[i] as number[])[j] = Math.min(
|
|
132
|
+
((rows[i - 1] as number[])[j] as number) + 1,
|
|
133
|
+
((rows[i] as number[])[j - 1] as number) + 1,
|
|
134
|
+
((rows[i - 1] as number[])[j - 1] as number) + cost,
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return (rows[a.length] as number[])[b.length] as number;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface RunOptions {
|
|
142
|
+
readonly io?: Io;
|
|
143
|
+
readonly cwd?: string;
|
|
144
|
+
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
145
|
+
readonly signal?: AbortSignal;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Der ganze Ablauf als Funktion — testbar, ohne einen Prozess zu starten.
|
|
150
|
+
* `main()` unten ist nur die duenne Huelle darum.
|
|
151
|
+
*/
|
|
152
|
+
export async function run(argv: readonly string[], options: RunOptions = {}): Promise<number> {
|
|
153
|
+
const io = options.io ?? processIo;
|
|
154
|
+
const ctx: CommandContext = {
|
|
155
|
+
io,
|
|
156
|
+
cwd: options.cwd ?? process.cwd(),
|
|
157
|
+
env: options.env ?? process.env,
|
|
158
|
+
signal: options.signal ?? new AbortController().signal,
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const first = argv[0];
|
|
162
|
+
|
|
163
|
+
if (first === undefined || first === "--help" || first === "-h" || first === "help") {
|
|
164
|
+
io.out(renderRootHelp());
|
|
165
|
+
return EXIT.ok;
|
|
166
|
+
}
|
|
167
|
+
if (first === "--version" || first === "-V") {
|
|
168
|
+
line(io, CLI_VERSION);
|
|
169
|
+
return EXIT.ok;
|
|
170
|
+
}
|
|
171
|
+
if (first.startsWith("-")) {
|
|
172
|
+
return fail(
|
|
173
|
+
io,
|
|
174
|
+
new UsageError(
|
|
175
|
+
`Expected a command, received the option "${first}".`,
|
|
176
|
+
"Run `untangle --help`; the global options are --help and --version.",
|
|
177
|
+
),
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const command = BY_NAME.get(first);
|
|
182
|
+
if (command === undefined) {
|
|
183
|
+
const hint = suggest(first);
|
|
184
|
+
return fail(
|
|
185
|
+
io,
|
|
186
|
+
new UsageError(
|
|
187
|
+
`Unknown command "${first}".`,
|
|
188
|
+
hint === undefined
|
|
189
|
+
? "Run `untangle --help` to list all commands."
|
|
190
|
+
: `Did you mean \`untangle ${hint}\`? \`untangle --help\` lists all commands.`,
|
|
191
|
+
),
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const rest = argv.slice(1);
|
|
196
|
+
if (rest.includes("--help") || rest.includes("-h")) {
|
|
197
|
+
io.out(renderCommandHelp(command.spec));
|
|
198
|
+
return EXIT.ok;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
try {
|
|
202
|
+
const args = parseArgs(rest, command.spec.flags);
|
|
203
|
+
return await command.run(ctx, args);
|
|
204
|
+
} catch (error) {
|
|
205
|
+
return fail(io, error);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Ein Fehler wird zu genau drei Zeilen auf stderr: was war, was zu tun ist,
|
|
211
|
+
* und — nur wenn es eine Ursache gibt — woran es lag.
|
|
212
|
+
*/
|
|
213
|
+
function fail(io: Io, error: unknown): number {
|
|
214
|
+
if (error instanceof CliError) {
|
|
215
|
+
note(io, `Error: ${error.message}`);
|
|
216
|
+
if (error.nextStep !== undefined) {
|
|
217
|
+
note(io, `Next step: ${error.nextStep}`);
|
|
218
|
+
}
|
|
219
|
+
return error.exitCode;
|
|
220
|
+
}
|
|
221
|
+
if (error instanceof Error && error.name === "AbortError") {
|
|
222
|
+
note(io, "Cancelled.");
|
|
223
|
+
return EXIT.cancelled;
|
|
224
|
+
}
|
|
225
|
+
note(io, `Unexpected error: ${error instanceof Error ? error.message : String(error)}`);
|
|
226
|
+
if (
|
|
227
|
+
error instanceof Error &&
|
|
228
|
+
error.stack !== undefined &&
|
|
229
|
+
process.env["UNTANGLE_DEBUG"] === "1"
|
|
230
|
+
) {
|
|
231
|
+
note(io, error.stack);
|
|
232
|
+
}
|
|
233
|
+
note(io, "Next step: set UNTANGLE_DEBUG=1 and repeat the command to include the stack trace.");
|
|
234
|
+
return EXIT.operational;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Wartet, bis alles Geschriebene wirklich draussen ist.
|
|
239
|
+
*
|
|
240
|
+
* Noetig, weil {@link main} den Prozess ausdruecklich beendet (siehe dort) —
|
|
241
|
+
* ohne dieses Leeren koennte die letzte Zeile einer Pipe verloren gehen.
|
|
242
|
+
*/
|
|
243
|
+
function flush(stream: NodeJS.WriteStream): Promise<void> {
|
|
244
|
+
return new Promise<void>((resolve) => {
|
|
245
|
+
stream.write("", () => {
|
|
246
|
+
resolve();
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Die Prozesshuelle. Nur sie kennt `process`.
|
|
253
|
+
*
|
|
254
|
+
* SIE BEENDET DEN PROZESS AUSDRUECKLICH — und das ist eine Entscheidung, kein
|
|
255
|
+
* Versehen. Ein Adapter darf im Hintergrund noch an einer Anfrage haengen:
|
|
256
|
+
* der Embedding-Adapter etwa wiederholt einen Zeitueberlauf mit Backoff und
|
|
257
|
+
* haelt damit die Ereignisschleife ueber Minuten am Leben, obwohl `doctor`
|
|
258
|
+
* sein Urteil laengst gefaellt und ausgegeben hat (gemessen: Bericht nach
|
|
259
|
+
* 15 s, Prozessende erst nach ueber 3 min). Ein Diagnosewerkzeug, das nach
|
|
260
|
+
* dem Bericht noch minutenlang steht, ist kaputt.
|
|
261
|
+
*
|
|
262
|
+
* Also: Ergebnis ausgeben, Stroeme leeren, beenden. Verschwiegen wird dabei
|
|
263
|
+
* nichts — der abgebrochene Test steht als FEHLSCHLAG im Bericht, nicht als
|
|
264
|
+
* bestanden.
|
|
265
|
+
*/
|
|
266
|
+
async function main(): Promise<void> {
|
|
267
|
+
const controller = new AbortController();
|
|
268
|
+
const onSignal = (): void => {
|
|
269
|
+
controller.abort();
|
|
270
|
+
};
|
|
271
|
+
process.on("SIGINT", onSignal);
|
|
272
|
+
process.on("SIGTERM", onSignal);
|
|
273
|
+
|
|
274
|
+
const code = await run(process.argv.slice(2), { signal: controller.signal });
|
|
275
|
+
|
|
276
|
+
process.off("SIGINT", onSignal);
|
|
277
|
+
process.off("SIGTERM", onSignal);
|
|
278
|
+
|
|
279
|
+
await flush(process.stdout);
|
|
280
|
+
await flush(process.stderr);
|
|
281
|
+
process.exit(code);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Nur ausfuehren, wenn dieses Modul das Programm IST — nicht, wenn ein Test es
|
|
285
|
+
// importiert. Der Vergleich loest Symlinks auf: `npm install --global` legt das
|
|
286
|
+
// Binaer als SYMLINK im globalen bin-Verzeichnis an, und ohne Aufloesung haelte
|
|
287
|
+
// sich das global installierte `untangle` faelschlich fuer importiert und taete
|
|
288
|
+
// schweigend nichts (siehe entry-point.ts).
|
|
289
|
+
if (isEntryPoint(import.meta.url, process.argv[1])) {
|
|
290
|
+
await main();
|
|
291
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
|
|
3
|
+
import { httpServiceBindingSchema } from "../commands/graph/boundaries-input.js";
|
|
4
|
+
|
|
5
|
+
const text = z.string();
|
|
6
|
+
const nonempty = text.min(1);
|
|
7
|
+
const count = z.number().int().nonnegative();
|
|
8
|
+
const hash = text.regex(/^[0-9a-f]{64}$/u);
|
|
9
|
+
const range = z
|
|
10
|
+
.object({
|
|
11
|
+
startLine: z.number().int().positive(),
|
|
12
|
+
endLine: z.number().int().positive(),
|
|
13
|
+
startByte: count,
|
|
14
|
+
endByte: count,
|
|
15
|
+
})
|
|
16
|
+
.strict();
|
|
17
|
+
const issue = z.object({ path: text, reason: text }).strict();
|
|
18
|
+
const evidence = z
|
|
19
|
+
.object({
|
|
20
|
+
path: text,
|
|
21
|
+
contentHash: hash,
|
|
22
|
+
range,
|
|
23
|
+
kind: z.enum(["request", "transport", "route", "router", "include"]),
|
|
24
|
+
name: text.optional(),
|
|
25
|
+
})
|
|
26
|
+
.strict();
|
|
27
|
+
const endpoint = z
|
|
28
|
+
.object({
|
|
29
|
+
serviceId: text.nullable(),
|
|
30
|
+
method: nonempty,
|
|
31
|
+
path: text,
|
|
32
|
+
handler: text,
|
|
33
|
+
provenance: z.array(evidence),
|
|
34
|
+
})
|
|
35
|
+
.strict();
|
|
36
|
+
const request = z
|
|
37
|
+
.object({
|
|
38
|
+
source: evidence,
|
|
39
|
+
method: text.nullable(),
|
|
40
|
+
path: text.nullable(),
|
|
41
|
+
origin: text.nullable(),
|
|
42
|
+
status: z.enum(["resolved", "ambiguous", "unresolved"]),
|
|
43
|
+
reason: text.optional(),
|
|
44
|
+
serviceIds: z.array(text),
|
|
45
|
+
targets: z.array(endpoint),
|
|
46
|
+
provenance: z.array(evidence),
|
|
47
|
+
})
|
|
48
|
+
.strict();
|
|
49
|
+
const importEdge = z
|
|
50
|
+
.object({
|
|
51
|
+
fromPath: text,
|
|
52
|
+
toPath: text,
|
|
53
|
+
rawSpecifier: text,
|
|
54
|
+
range,
|
|
55
|
+
sourceHash: hash,
|
|
56
|
+
targetHash: hash,
|
|
57
|
+
})
|
|
58
|
+
.strict();
|
|
59
|
+
|
|
60
|
+
/** Every relationship is typed separately from synchronous import/call graph contracts. */
|
|
61
|
+
export const frontendBoundaryReportSchema = z
|
|
62
|
+
.object({
|
|
63
|
+
schemaVersion: z.literal(1),
|
|
64
|
+
kind: z.literal("frontend-boundaries"),
|
|
65
|
+
root: nonempty,
|
|
66
|
+
status: z.enum(["complete", "incomplete", "stale"]),
|
|
67
|
+
sourceTreeDigest: hash,
|
|
68
|
+
freshness: z
|
|
69
|
+
.object({
|
|
70
|
+
status: z.enum(["fresh", "stale"]),
|
|
71
|
+
sourceTreeBefore: hash,
|
|
72
|
+
sourceTreeAfter: hash,
|
|
73
|
+
changedPaths: z.array(text),
|
|
74
|
+
})
|
|
75
|
+
.strict(),
|
|
76
|
+
inventory: z
|
|
77
|
+
.object({
|
|
78
|
+
files: count,
|
|
79
|
+
excluded: count,
|
|
80
|
+
truncated: z.boolean(),
|
|
81
|
+
analyzed: count,
|
|
82
|
+
unsupported: count,
|
|
83
|
+
failed: count,
|
|
84
|
+
})
|
|
85
|
+
.strict(),
|
|
86
|
+
selection: z
|
|
87
|
+
.object({ path: text, inInventory: z.boolean(), matchingRequests: count })
|
|
88
|
+
.strict()
|
|
89
|
+
.optional(),
|
|
90
|
+
http: z
|
|
91
|
+
.object({
|
|
92
|
+
schemaVersion: z.literal(1),
|
|
93
|
+
kind: z.literal("http-boundaries"),
|
|
94
|
+
services: z.array(httpServiceBindingSchema),
|
|
95
|
+
endpoints: z.array(endpoint),
|
|
96
|
+
requests: z.array(request),
|
|
97
|
+
limitations: z.array(issue),
|
|
98
|
+
summary: z
|
|
99
|
+
.object({
|
|
100
|
+
files: count,
|
|
101
|
+
endpoints: count,
|
|
102
|
+
requests: count,
|
|
103
|
+
resolved: count,
|
|
104
|
+
ambiguous: count,
|
|
105
|
+
unresolved: count,
|
|
106
|
+
})
|
|
107
|
+
.strict(),
|
|
108
|
+
})
|
|
109
|
+
.strict(),
|
|
110
|
+
importContext: z
|
|
111
|
+
.object({
|
|
112
|
+
kind: z.literal("file-imports-not-function-calls"),
|
|
113
|
+
edges: z.array(importEdge),
|
|
114
|
+
requestImporters: z.array(
|
|
115
|
+
z
|
|
116
|
+
.object({
|
|
117
|
+
requestPath: text,
|
|
118
|
+
path: text,
|
|
119
|
+
contentHash: hash,
|
|
120
|
+
distance: count,
|
|
121
|
+
via: z.array(importEdge),
|
|
122
|
+
})
|
|
123
|
+
.strict(),
|
|
124
|
+
),
|
|
125
|
+
unresolved: z.array(issue),
|
|
126
|
+
summary: z.object({ edges: count, unresolved: count, requestImporters: count }).strict(),
|
|
127
|
+
truncated: z.boolean(),
|
|
128
|
+
})
|
|
129
|
+
.strict(),
|
|
130
|
+
features: z
|
|
131
|
+
.object({
|
|
132
|
+
manifest: z
|
|
133
|
+
.object({
|
|
134
|
+
path: text,
|
|
135
|
+
status: z.enum([
|
|
136
|
+
"loaded",
|
|
137
|
+
"missing",
|
|
138
|
+
"invalid",
|
|
139
|
+
"changed",
|
|
140
|
+
"unreadable",
|
|
141
|
+
"not_in_scan",
|
|
142
|
+
]),
|
|
143
|
+
contentHash: hash.optional(),
|
|
144
|
+
})
|
|
145
|
+
.strict(),
|
|
146
|
+
associations: z.array(
|
|
147
|
+
z
|
|
148
|
+
.object({
|
|
149
|
+
path: text,
|
|
150
|
+
matches: z.array(
|
|
151
|
+
z
|
|
152
|
+
.object({
|
|
153
|
+
featureId: text,
|
|
154
|
+
title: text,
|
|
155
|
+
role: z.enum(["code", "test"]),
|
|
156
|
+
review: z.enum(["proposed", "confirmed"]),
|
|
157
|
+
ownership: z.array(
|
|
158
|
+
z
|
|
159
|
+
.object({
|
|
160
|
+
id: text,
|
|
161
|
+
label: text.optional(),
|
|
162
|
+
status: z.enum(["declared", "confirmed", "missing"]),
|
|
163
|
+
})
|
|
164
|
+
.strict(),
|
|
165
|
+
),
|
|
166
|
+
declaredDependsOn: z.array(text),
|
|
167
|
+
})
|
|
168
|
+
.strict(),
|
|
169
|
+
),
|
|
170
|
+
})
|
|
171
|
+
.strict(),
|
|
172
|
+
),
|
|
173
|
+
associationCount: count,
|
|
174
|
+
dependencySemantics: z.literal("declared_dependencies_unchanged"),
|
|
175
|
+
})
|
|
176
|
+
.strict(),
|
|
177
|
+
truncation: z
|
|
178
|
+
.object({
|
|
179
|
+
truncated: z.boolean(),
|
|
180
|
+
limit: count,
|
|
181
|
+
omittedRequests: count,
|
|
182
|
+
omittedEndpoints: count,
|
|
183
|
+
omittedIssues: count,
|
|
184
|
+
omittedFeatureAssociations: count,
|
|
185
|
+
})
|
|
186
|
+
.strict(),
|
|
187
|
+
issues: z.array(issue),
|
|
188
|
+
limitations: z.array(text),
|
|
189
|
+
servicesManifest: z
|
|
190
|
+
.object({ path: text, status: z.enum(["loaded", "missing"]), contentHash: hash.optional() })
|
|
191
|
+
.strict(),
|
|
192
|
+
})
|
|
193
|
+
.strict();
|