@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,194 @@
|
|
|
1
|
+
import type { FeaturePoint3D } from "./feature-3d.js";
|
|
2
|
+
import type { FeatureMapEdgeV1, FeatureMapNodeV1 } from "./feature-model.js";
|
|
3
|
+
|
|
4
|
+
export type CategoryClusterDimension = "code" | "test" | "owner" | "intent" | "unmapped";
|
|
5
|
+
export type CategoryClusterNode = Pick<FeatureMapNodeV1, "id" | "kind"> &
|
|
6
|
+
Partial<Pick<FeatureMapNodeV1, "label" | "path" | "details" | "status">>;
|
|
7
|
+
|
|
8
|
+
export interface CategoryClusterGroup {
|
|
9
|
+
id: string;
|
|
10
|
+
kind: "category" | "shared" | "unassigned";
|
|
11
|
+
label: string;
|
|
12
|
+
center: FeaturePoint3D;
|
|
13
|
+
memberIds: string[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface CategoryClusterLayout {
|
|
17
|
+
positions: Record<string, FeaturePoint3D>;
|
|
18
|
+
groups: CategoryClusterGroup[];
|
|
19
|
+
memberships: Record<string, string[]>;
|
|
20
|
+
description: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Self-contained browser geometry; context paths are declarations, never inferred ownership. */
|
|
24
|
+
export function createCategoryClusterLayout(
|
|
25
|
+
nodes: readonly CategoryClusterNode[],
|
|
26
|
+
edges: readonly Pick<FeatureMapEdgeV1, "from" | "to" | "kind">[],
|
|
27
|
+
dimension: CategoryClusterDimension,
|
|
28
|
+
): CategoryClusterLayout {
|
|
29
|
+
const compare = (a: string, b: string): number => (a < b ? -1 : a > b ? 1 : 0);
|
|
30
|
+
const descriptions: Record<CategoryClusterDimension, string> = {
|
|
31
|
+
code: "Code areas use repository-relative directories. Other nodes show declared feature context.",
|
|
32
|
+
test: "Test areas use repository-relative directories. Other nodes show declared feature context.",
|
|
33
|
+
owner:
|
|
34
|
+
"Ownership groups use declared roles and feature scopes. They do not establish file ownership.",
|
|
35
|
+
intent:
|
|
36
|
+
"Vision / Spec groups use source paths and declared feature scopes, not semantic similarity.",
|
|
37
|
+
unmapped:
|
|
38
|
+
"Unassigned files use repository-relative directories. Declared context stays separate.",
|
|
39
|
+
};
|
|
40
|
+
if (!Object.hasOwn(descriptions, dimension)) throw new RangeError("Unknown grouping category.");
|
|
41
|
+
const ordered = [...nodes].sort((a, b) => compare(a.id, b.id));
|
|
42
|
+
const byId = new Map(ordered.map((node) => [node.id, node]));
|
|
43
|
+
const features = new Set(
|
|
44
|
+
ordered.filter((node) => node.kind === "feature").map((node) => node.id),
|
|
45
|
+
);
|
|
46
|
+
const memberships: Record<string, string[]> = Object.create(null) as Record<string, string[]>;
|
|
47
|
+
const positions: Record<string, FeaturePoint3D> = Object.create(null) as Record<
|
|
48
|
+
string,
|
|
49
|
+
FeaturePoint3D
|
|
50
|
+
>;
|
|
51
|
+
const buckets = new Map<string, { label: string; sortKey: string; memberIds: string[] }>();
|
|
52
|
+
const anchorBuckets = new Map<string, string>();
|
|
53
|
+
const featureBuckets = new Map([...features].map((id) => [id, new Set<string>()]));
|
|
54
|
+
const linkedFeatures = new Map(ordered.map((node) => [node.id, new Set<string>()]));
|
|
55
|
+
const compatible: Record<FeatureMapNodeV1["kind"], readonly FeatureMapEdgeV1["kind"][]> = {
|
|
56
|
+
feature: [],
|
|
57
|
+
code: ["code", "test"],
|
|
58
|
+
test: ["code", "test"],
|
|
59
|
+
owner: ["ownership"],
|
|
60
|
+
intent: ["intent"],
|
|
61
|
+
unmapped: [],
|
|
62
|
+
};
|
|
63
|
+
const targetRelations: Record<CategoryClusterDimension, FeatureMapEdgeV1["kind"] | null> = {
|
|
64
|
+
code: "code",
|
|
65
|
+
test: "test",
|
|
66
|
+
owner: "ownership",
|
|
67
|
+
intent: "intent",
|
|
68
|
+
unmapped: null,
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
for (const node of ordered) {
|
|
72
|
+
const roles = node.details?.["roles"];
|
|
73
|
+
const hasRole = (role: string): boolean =>
|
|
74
|
+
(node.kind === "code" || node.kind === "test") &&
|
|
75
|
+
Array.isArray(roles) &&
|
|
76
|
+
roles.includes(role);
|
|
77
|
+
const anchor =
|
|
78
|
+
dimension === "code"
|
|
79
|
+
? node.kind === "code" || node.kind === "unmapped" || hasRole("code")
|
|
80
|
+
: dimension === "test"
|
|
81
|
+
? node.kind === "test" || hasRole("test")
|
|
82
|
+
: node.kind === dimension;
|
|
83
|
+
if (!anchor) continue;
|
|
84
|
+
let key: string;
|
|
85
|
+
let label: string;
|
|
86
|
+
if (dimension === "owner") {
|
|
87
|
+
key = node.id;
|
|
88
|
+
label = node.label || node.id;
|
|
89
|
+
if (node.status === "missing") label += " (missing ownership)";
|
|
90
|
+
} else if (dimension === "intent") {
|
|
91
|
+
key = node.path || "(no source path)";
|
|
92
|
+
label = node.path || "Intent without a source path";
|
|
93
|
+
} else if (!node.path) {
|
|
94
|
+
key = "(no source path)";
|
|
95
|
+
label = "Files without a source path";
|
|
96
|
+
} else {
|
|
97
|
+
const directories = node.path.replaceAll("\\", "/").split("/").slice(0, -1);
|
|
98
|
+
key = directories.slice(0, 2).join("/") || ".";
|
|
99
|
+
label = key === "." ? "Repository root" : key;
|
|
100
|
+
}
|
|
101
|
+
const id = dimension !== "owner" && !node.path ? `missing:${dimension}` : `${dimension}:${key}`;
|
|
102
|
+
if (!buckets.has(id)) buckets.set(id, { label, sortKey: key, memberIds: [] });
|
|
103
|
+
anchorBuckets.set(node.id, id);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (dimension !== "unmapped") {
|
|
107
|
+
for (const edge of edges) {
|
|
108
|
+
const fromFeature = features.has(edge.from);
|
|
109
|
+
const toFeature = features.has(edge.to);
|
|
110
|
+
if (fromFeature === toFeature) continue;
|
|
111
|
+
const feature = fromFeature ? edge.from : edge.to;
|
|
112
|
+
const member = byId.get(fromFeature ? edge.to : edge.from);
|
|
113
|
+
if (!member || !compatible[member.kind].includes(edge.kind)) continue;
|
|
114
|
+
linkedFeatures.get(member.id)!.add(feature);
|
|
115
|
+
const bucket = anchorBuckets.get(member.id);
|
|
116
|
+
if (bucket !== undefined && edge.kind === targetRelations[dimension])
|
|
117
|
+
featureBuckets.get(feature)!.add(bucket);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const shared: string[] = [];
|
|
122
|
+
const outside: string[] = [];
|
|
123
|
+
for (const node of ordered) {
|
|
124
|
+
const anchor = anchorBuckets.get(node.id);
|
|
125
|
+
const categories =
|
|
126
|
+
anchor !== undefined
|
|
127
|
+
? [anchor]
|
|
128
|
+
: [
|
|
129
|
+
...new Set(
|
|
130
|
+
(node.kind === "feature" ? [node.id] : [...linkedFeatures.get(node.id)!]).flatMap(
|
|
131
|
+
(id) => [...featureBuckets.get(id)!],
|
|
132
|
+
),
|
|
133
|
+
),
|
|
134
|
+
].sort(compare);
|
|
135
|
+
memberships[node.id] = categories;
|
|
136
|
+
if (categories.length === 1) buckets.get(categories[0]!)!.memberIds.push(node.id);
|
|
137
|
+
else if (categories.length > 1) shared.push(node.id);
|
|
138
|
+
else outside.push(node.id);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const primary = [...buckets].sort(
|
|
142
|
+
([a, first], [b, second]) => compare(first.sortKey, second.sortKey) || compare(a, b),
|
|
143
|
+
);
|
|
144
|
+
const columns = Math.max(1, Math.ceil(Math.sqrt(primary.length * 1.3)));
|
|
145
|
+
const rows = Math.ceil(primary.length / columns);
|
|
146
|
+
const stepX = Math.min(140, 700 / Math.max(1, columns - 1));
|
|
147
|
+
const stepY = Math.min(110, 400 / Math.max(1, rows - 1));
|
|
148
|
+
const radius = primary.length === 1 ? 140 : Math.min(50, Math.min(stepX, stepY) * 0.4);
|
|
149
|
+
const goldenAngle = Math.PI * (3 - Math.sqrt(5));
|
|
150
|
+
const groups: CategoryClusterGroup[] = [];
|
|
151
|
+
|
|
152
|
+
function placeMembers(ids: readonly string[], center: FeaturePoint3D, extent: number): void {
|
|
153
|
+
ids.forEach((id, index) => {
|
|
154
|
+
const orbit = extent * (0.12 + 0.88 * Math.sqrt((index + 0.5) / ids.length));
|
|
155
|
+
const kind = byId.get(id)!.kind;
|
|
156
|
+
const depth = kind === "test" ? 1 : kind === "owner" ? 0.5 : kind === "intent" ? -0.5 : -1;
|
|
157
|
+
positions[id] = {
|
|
158
|
+
x: center.x + Math.cos(index * goldenAngle) * orbit,
|
|
159
|
+
y: center.y + Math.sin(index * goldenAngle) * orbit,
|
|
160
|
+
z: center.z + extent * (depth * 0.2 + ((index % 7) - 3) * 0.035),
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
primary.forEach(([id, bucket], index) => {
|
|
166
|
+
const row = Math.floor(index / columns);
|
|
167
|
+
const rowSize = Math.min(columns, primary.length - row * columns);
|
|
168
|
+
const center = {
|
|
169
|
+
x: ((index % columns) - (rowSize - 1) / 2) * stepX,
|
|
170
|
+
y: -65 + (row - (rows - 1) / 2) * stepY,
|
|
171
|
+
z: ((index % 3) - 1) * 12,
|
|
172
|
+
};
|
|
173
|
+
placeMembers(bucket.memberIds, center, radius);
|
|
174
|
+
groups.push({ id, kind: "category", label: bucket.label, center, memberIds: bucket.memberIds });
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
function addContext(kind: "shared" | "unassigned", label: string, ids: string[], x: number) {
|
|
178
|
+
if (ids.length === 0) return;
|
|
179
|
+
const center = primary.length === 0 ? { x: 0, y: 0, z: 0 } : { x, y: 270, z: 0 };
|
|
180
|
+
const extent = primary.length === 0 ? 190 : Math.min(85, 65 + Math.sqrt(ids.length) * 0.75);
|
|
181
|
+
placeMembers(ids, center, extent);
|
|
182
|
+
groups.push({ id: `context:${dimension}:${kind}`, kind, label, center, memberIds: ids });
|
|
183
|
+
}
|
|
184
|
+
const outsideLabels: Record<CategoryClusterDimension, string> = {
|
|
185
|
+
code: "Outside declared code context",
|
|
186
|
+
test: "Outside declared test context",
|
|
187
|
+
owner: "No declared ownership context",
|
|
188
|
+
intent: "No declared vision / spec context",
|
|
189
|
+
unmapped: "Declared context",
|
|
190
|
+
};
|
|
191
|
+
addContext("shared", "Shared context", shared, -175);
|
|
192
|
+
addContext("unassigned", outsideLabels[dimension], outside, 175);
|
|
193
|
+
return { positions, groups, memberships, description: descriptions[dimension] };
|
|
194
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { FeatureMapEdgeV1, FeatureMapNodeV1 } from "./feature-model.js";
|
|
2
|
+
|
|
3
|
+
export interface FeaturePoint3D {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
z: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface FeatureCamera3D {
|
|
10
|
+
yaw: number;
|
|
11
|
+
pitch: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** Stable spatial grouping follows declared edges. Distance is a layout choice, not evidence. */
|
|
15
|
+
export function createFeatureWoolLayout(
|
|
16
|
+
nodes: readonly Pick<FeatureMapNodeV1, "id" | "kind">[],
|
|
17
|
+
edges: readonly Pick<FeatureMapEdgeV1, "from" | "to">[],
|
|
18
|
+
): Record<string, FeaturePoint3D> {
|
|
19
|
+
const positions: Record<string, FeaturePoint3D> = Object.create(null) as Record<
|
|
20
|
+
string,
|
|
21
|
+
FeaturePoint3D
|
|
22
|
+
>;
|
|
23
|
+
const ordered = [...nodes].sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0));
|
|
24
|
+
const features = ordered.filter((node) => node.kind === "feature");
|
|
25
|
+
const featureIds = new Set(features.map((node) => node.id));
|
|
26
|
+
const adjacency = new Map<string, Set<string>>();
|
|
27
|
+
for (const edge of edges) {
|
|
28
|
+
if (featureIds.has(edge.from)) {
|
|
29
|
+
if (!adjacency.has(edge.to)) adjacency.set(edge.to, new Set());
|
|
30
|
+
adjacency.get(edge.to)!.add(edge.from);
|
|
31
|
+
}
|
|
32
|
+
if (featureIds.has(edge.to)) {
|
|
33
|
+
if (!adjacency.has(edge.from)) adjacency.set(edge.from, new Set());
|
|
34
|
+
adjacency.get(edge.from)!.add(edge.to);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const goldenAngle = Math.PI * (3 - Math.sqrt(5));
|
|
38
|
+
function sphere(index: number, count: number, radius: number): FeaturePoint3D {
|
|
39
|
+
const y = 1 - (2 * (index + 0.5)) / Math.max(1, count);
|
|
40
|
+
const ring = Math.sqrt(Math.max(0, 1 - y * y));
|
|
41
|
+
return {
|
|
42
|
+
x: Math.cos(index * goldenAngle) * ring * radius,
|
|
43
|
+
y: y * radius,
|
|
44
|
+
z: Math.sin(index * goldenAngle) * ring * radius,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
features.forEach((node, index) => {
|
|
48
|
+
positions[node.id] =
|
|
49
|
+
features.length === 1 ? { x: 0, y: 0, z: 0 } : sphere(index, features.length, 200);
|
|
50
|
+
});
|
|
51
|
+
const other = ordered.filter((node) => node.kind !== "feature");
|
|
52
|
+
other.forEach((node, index) => {
|
|
53
|
+
const linked = [...(adjacency.get(node.id) ?? [])].sort();
|
|
54
|
+
if (linked.length === 0) {
|
|
55
|
+
positions[node.id] = sphere(index, other.length, 335 + (index % 7) * 5);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const center = { x: 0, y: 0, z: 0 };
|
|
59
|
+
for (const id of linked) {
|
|
60
|
+
const point = positions[id]!;
|
|
61
|
+
center.x += point.x / linked.length;
|
|
62
|
+
center.y += point.y / linked.length;
|
|
63
|
+
center.z += point.z / linked.length;
|
|
64
|
+
}
|
|
65
|
+
const radius = node.kind === "code" ? 88 : node.kind === "test" ? 118 : 150;
|
|
66
|
+
const offset = sphere(index, other.length, radius + (index % 11) * 2);
|
|
67
|
+
positions[node.id] = {
|
|
68
|
+
x: center.x + offset.x,
|
|
69
|
+
y: center.y + offset.y,
|
|
70
|
+
z: center.z + offset.z,
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
return positions;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Rotate in world space, then project with a camera outside every bounded layout point. */
|
|
77
|
+
export function projectFeaturePoint(
|
|
78
|
+
point: FeaturePoint3D,
|
|
79
|
+
camera: FeatureCamera3D,
|
|
80
|
+
): { x: number; y: number; depth: number; scale: number } {
|
|
81
|
+
const cosYaw = Math.cos(camera.yaw);
|
|
82
|
+
const sinYaw = Math.sin(camera.yaw);
|
|
83
|
+
const x = point.x * cosYaw + point.z * sinYaw;
|
|
84
|
+
const z = point.z * cosYaw - point.x * sinYaw;
|
|
85
|
+
const cosPitch = Math.cos(camera.pitch);
|
|
86
|
+
const sinPitch = Math.sin(camera.pitch);
|
|
87
|
+
const y = point.y * cosPitch - z * sinPitch;
|
|
88
|
+
const depth = point.y * sinPitch + z * cosPitch;
|
|
89
|
+
const scale = 1000 / (1000 - depth);
|
|
90
|
+
return { x: 650 + x * scale, y: 410 + y * scale, depth, scale };
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Sample a cubic thread in 3D before projection; rotation changes the whole thread. */
|
|
94
|
+
export function createFeatureThread(
|
|
95
|
+
from: FeaturePoint3D,
|
|
96
|
+
to: FeaturePoint3D,
|
|
97
|
+
camera: FeatureCamera3D,
|
|
98
|
+
winding: number,
|
|
99
|
+
grouping = 0,
|
|
100
|
+
): string {
|
|
101
|
+
const twist = Math.max(-1, Math.min(1, winding)) * 90;
|
|
102
|
+
const a = { x: from.x * 0.35 + twist, y: from.y * 0.35 - twist, z: from.z * 0.35 + twist };
|
|
103
|
+
const b = { x: to.x * 0.35 - twist, y: to.y * 0.35 + twist, z: to.z * 0.35 - twist };
|
|
104
|
+
const amount = Number.isFinite(grouping) ? Math.max(0, Math.min(1, grouping)) : 0;
|
|
105
|
+
if (amount > 0) {
|
|
106
|
+
const dx = to.x - from.x;
|
|
107
|
+
const dy = to.y - from.y;
|
|
108
|
+
const dz = to.z - from.z;
|
|
109
|
+
const length = Math.hypot(dx, dy, dz);
|
|
110
|
+
const bend = Math.max(-1, Math.min(1, winding)) * Math.min(24, length * 0.12);
|
|
111
|
+
const normal = Math.hypot(dx, dy) || 1;
|
|
112
|
+
const offset = { x: (-dy / normal) * bend, y: (dx / normal) * bend, z: bend * 0.35 };
|
|
113
|
+
const localA = {
|
|
114
|
+
x: from.x + dx / 3 + offset.x,
|
|
115
|
+
y: from.y + dy / 3 + offset.y,
|
|
116
|
+
z: from.z + dz / 3 + offset.z,
|
|
117
|
+
};
|
|
118
|
+
const localB = {
|
|
119
|
+
x: from.x + (dx * 2) / 3 + offset.x,
|
|
120
|
+
y: from.y + (dy * 2) / 3 + offset.y,
|
|
121
|
+
z: from.z + (dz * 2) / 3 + offset.z,
|
|
122
|
+
};
|
|
123
|
+
for (const coordinate of ["x", "y", "z"] as const) {
|
|
124
|
+
a[coordinate] += (localA[coordinate] - a[coordinate]) * amount;
|
|
125
|
+
b[coordinate] += (localB[coordinate] - b[coordinate]) * amount;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
const parts: string[] = [];
|
|
129
|
+
for (let i = 0; i <= 18; i += 1) {
|
|
130
|
+
const t = i / 18;
|
|
131
|
+
const s = 1 - t;
|
|
132
|
+
const point = {
|
|
133
|
+
x: s ** 3 * from.x + 3 * s ** 2 * t * a.x + 3 * s * t ** 2 * b.x + t ** 3 * to.x,
|
|
134
|
+
y: s ** 3 * from.y + 3 * s ** 2 * t * a.y + 3 * s * t ** 2 * b.y + t ** 3 * to.y,
|
|
135
|
+
z: s ** 3 * from.z + 3 * s ** 2 * t * a.z + 3 * s * t ** 2 * b.z + t ** 3 * to.z,
|
|
136
|
+
};
|
|
137
|
+
const projected = projectFeaturePoint(point, camera);
|
|
138
|
+
parts.push(`${i === 0 ? "M" : "L"}${projected.x.toFixed(2)},${projected.y.toFixed(2)}`);
|
|
139
|
+
}
|
|
140
|
+
return parts.join(" ");
|
|
141
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { FeaturePoint3D } from "./feature-3d.js";
|
|
2
|
+
import type { FeatureMapEdgeV1, FeatureMapNodeV1 } from "./feature-model.js";
|
|
3
|
+
|
|
4
|
+
export interface FeatureClusterGroup {
|
|
5
|
+
id: string;
|
|
6
|
+
kind: "feature" | "shared" | "unassigned";
|
|
7
|
+
featureId?: string;
|
|
8
|
+
center: FeaturePoint3D;
|
|
9
|
+
memberIds: string[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface FeatureClusterLayout {
|
|
13
|
+
positions: Record<string, FeaturePoint3D>;
|
|
14
|
+
groups: FeatureClusterGroup[];
|
|
15
|
+
memberships: Record<string, string[]>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Declared membership determines each island; spatial distance proves nothing beyond layout. */
|
|
19
|
+
export function createFeatureClusterLayout(
|
|
20
|
+
nodes: readonly Pick<FeatureMapNodeV1, "id" | "kind">[],
|
|
21
|
+
edges: readonly Pick<FeatureMapEdgeV1, "from" | "to" | "kind">[],
|
|
22
|
+
): FeatureClusterLayout {
|
|
23
|
+
const compare = (a: string, b: string): number => (a < b ? -1 : a > b ? 1 : 0);
|
|
24
|
+
const ordered = [...nodes].sort((a, b) => compare(a.id, b.id));
|
|
25
|
+
const byId = new Map(ordered.map((node) => [node.id, node]));
|
|
26
|
+
const features = ordered.filter((node) => node.kind === "feature");
|
|
27
|
+
const featureIds = new Set(features.map((node) => node.id));
|
|
28
|
+
const linked = new Map(ordered.map((node) => [node.id, new Set<string>()]));
|
|
29
|
+
const relations: Record<FeatureMapNodeV1["kind"], readonly FeatureMapEdgeV1["kind"][]> = {
|
|
30
|
+
feature: [],
|
|
31
|
+
code: ["code", "test"],
|
|
32
|
+
test: ["code", "test"],
|
|
33
|
+
owner: ["ownership"],
|
|
34
|
+
intent: ["intent"],
|
|
35
|
+
unmapped: [],
|
|
36
|
+
};
|
|
37
|
+
for (const edge of edges) {
|
|
38
|
+
const fromFeature = featureIds.has(edge.from);
|
|
39
|
+
const toFeature = featureIds.has(edge.to);
|
|
40
|
+
if (fromFeature === toFeature) continue;
|
|
41
|
+
const member = byId.get(fromFeature ? edge.to : edge.from);
|
|
42
|
+
if (!member || !relations[member.kind].includes(edge.kind)) continue;
|
|
43
|
+
linked.get(member.id)!.add(fromFeature ? edge.from : edge.to);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const positions: Record<string, FeaturePoint3D> = Object.create(null) as Record<
|
|
47
|
+
string,
|
|
48
|
+
FeaturePoint3D
|
|
49
|
+
>;
|
|
50
|
+
const memberships: Record<string, string[]> = Object.create(null) as Record<string, string[]>;
|
|
51
|
+
const exclusive = new Map(features.map((feature) => [feature.id, [] as string[]]));
|
|
52
|
+
const shared: string[] = [];
|
|
53
|
+
const unassigned: string[] = [];
|
|
54
|
+
for (const node of ordered) {
|
|
55
|
+
const ids = node.kind === "feature" ? [node.id] : [...linked.get(node.id)!].sort(compare);
|
|
56
|
+
memberships[node.id] = ids;
|
|
57
|
+
if (node.kind === "feature") continue;
|
|
58
|
+
if (ids.length === 1) exclusive.get(ids[0]!)!.push(node.id);
|
|
59
|
+
else if (ids.length > 1) shared.push(node.id);
|
|
60
|
+
else unassigned.push(node.id);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const columns = Math.max(1, Math.ceil(Math.sqrt(features.length * 1.3)));
|
|
64
|
+
const rows = Math.ceil(features.length / columns);
|
|
65
|
+
const stepX = Math.min(140, 700 / Math.max(1, columns - 1));
|
|
66
|
+
const stepY = Math.min(110, 400 / Math.max(1, rows - 1));
|
|
67
|
+
const featureRadius = features.length === 1 ? 140 : Math.min(50, Math.min(stepX, stepY) * 0.4);
|
|
68
|
+
const goldenAngle = Math.PI * (3 - Math.sqrt(5));
|
|
69
|
+
const groups: FeatureClusterGroup[] = [];
|
|
70
|
+
|
|
71
|
+
function placeMembers(
|
|
72
|
+
ids: readonly string[],
|
|
73
|
+
center: FeaturePoint3D,
|
|
74
|
+
radius: number,
|
|
75
|
+
anchored: boolean,
|
|
76
|
+
): void {
|
|
77
|
+
ids.forEach((id, index) => {
|
|
78
|
+
const fraction = Math.sqrt((index + 0.5) / ids.length);
|
|
79
|
+
const orbit = radius * ((anchored ? 0.62 : 0.12) + (anchored ? 0.38 : 0.88) * fraction);
|
|
80
|
+
const node = byId.get(id)!;
|
|
81
|
+
const depth =
|
|
82
|
+
node.kind === "test" ? 1 : node.kind === "owner" ? 0.5 : node.kind === "intent" ? -0.5 : -1;
|
|
83
|
+
positions[id] = {
|
|
84
|
+
x: center.x + Math.cos(index * goldenAngle) * orbit,
|
|
85
|
+
y: center.y + Math.sin(index * goldenAngle) * orbit,
|
|
86
|
+
z: center.z + radius * (depth * 0.2 + ((index % 7) - 3) * 0.035),
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
features.forEach((feature, index) => {
|
|
92
|
+
const row = Math.floor(index / columns);
|
|
93
|
+
const rowSize = Math.min(columns, features.length - row * columns);
|
|
94
|
+
const center = {
|
|
95
|
+
x: ((index % columns) - (rowSize - 1) / 2) * stepX,
|
|
96
|
+
y: -45 + (row - (rows - 1) / 2) * stepY,
|
|
97
|
+
z: ((index % 3) - 1) * 12,
|
|
98
|
+
};
|
|
99
|
+
const members = exclusive.get(feature.id)!;
|
|
100
|
+
positions[feature.id] = { ...center };
|
|
101
|
+
placeMembers(members, center, featureRadius, true);
|
|
102
|
+
groups.push({
|
|
103
|
+
id: `feature:${feature.id}`,
|
|
104
|
+
kind: "feature",
|
|
105
|
+
featureId: feature.id,
|
|
106
|
+
center,
|
|
107
|
+
memberIds: [feature.id, ...members],
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
function addContextGroup(
|
|
112
|
+
kind: "shared" | "unassigned",
|
|
113
|
+
ids: string[],
|
|
114
|
+
x: number,
|
|
115
|
+
z: number,
|
|
116
|
+
): void {
|
|
117
|
+
if (ids.length === 0) return;
|
|
118
|
+
const center = features.length === 0 ? { x: 0, y: 0, z: 0 } : { x, y: 285, z };
|
|
119
|
+
placeMembers(ids, center, features.length === 0 ? 190 : 70, false);
|
|
120
|
+
groups.push({ id: kind, kind, center, memberIds: [...ids] });
|
|
121
|
+
}
|
|
122
|
+
addContextGroup("shared", shared, -175, 35);
|
|
123
|
+
addContextGroup("unassigned", unassigned, 175, -35);
|
|
124
|
+
return { positions, groups, memberships };
|
|
125
|
+
}
|