@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,718 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { compareCodepoints, isUntangleError, } from "@untangle-code/domain";
|
|
3
|
+
import { MAX_MAX_EDGES, MAX_MAX_NODES } from "@untangle-code/graph-explorer";
|
|
4
|
+
import { SearchJourneyService } from "@untangle-code/search";
|
|
5
|
+
import { openLocalStorage } from "@untangle-code/storage-local";
|
|
6
|
+
import { createSymbolGraphIndex } from "@untangle-code/symbol-graph";
|
|
7
|
+
import { CliError, EXIT } from "../cli/exit.js";
|
|
8
|
+
import { loadGraphs } from "../cli/graphs.js";
|
|
9
|
+
import { stateRootOf } from "../cli/index-state.js";
|
|
10
|
+
import { BufferIo } from "../cli/io.js";
|
|
11
|
+
import { systemClock, systemRandom } from "../cli/system.js";
|
|
12
|
+
import { CLI_VERSION } from "../cli/version.js";
|
|
13
|
+
import { loadWorkspace } from "../cli/workspace.js";
|
|
14
|
+
import { complexityCommand } from "../commands/complexity.js";
|
|
15
|
+
import { doctorCommand } from "../commands/doctor.js";
|
|
16
|
+
import { flowCommand } from "../commands/flow/index.js";
|
|
17
|
+
import { MAX_FLOW_DEPTH, MAX_FLOW_EDGES, MAX_FLOW_NODES, MAX_FLOW_RESULT_LIMIT, MAX_GRAPH_QUERY_DEPTH, MAX_GRAPH_QUERY_EDGES, MAX_GRAPH_QUERY_NODES, } from "../commands/flow/limits.js";
|
|
18
|
+
import { selectSymbolNode } from "../commands/flow/select.js";
|
|
19
|
+
import { runBoundaries } from "../commands/graph/boundaries.js";
|
|
20
|
+
import { graphCommand } from "../commands/graph/index.js";
|
|
21
|
+
import { productCommand } from "../commands/product.js";
|
|
22
|
+
import { queryCommand } from "../commands/query.js";
|
|
23
|
+
import { mcpFailure, mcpSuccess, unavailableEnvelope } from "./envelope.js";
|
|
24
|
+
import { UNTANGLE_MCP_SUCCESS_DATA_SCHEMAS } from "./output-schemas.js";
|
|
25
|
+
const SOURCE_URL = "https://github.com/lboel/untangle";
|
|
26
|
+
export const DEFAULT_MCP_AVAILABLE_TOOLS = Object.freeze([
|
|
27
|
+
"untangle_health",
|
|
28
|
+
"untangle_projects",
|
|
29
|
+
"untangle_search",
|
|
30
|
+
"untangle_search_session",
|
|
31
|
+
"untangle_context_list",
|
|
32
|
+
"untangle_graph_status",
|
|
33
|
+
"untangle_graph_query",
|
|
34
|
+
"untangle_graph_stats",
|
|
35
|
+
"untangle_graph_cycles",
|
|
36
|
+
"untangle_graph_visualize",
|
|
37
|
+
"untangle_symbols",
|
|
38
|
+
"untangle_symbol",
|
|
39
|
+
"untangle_flow",
|
|
40
|
+
"untangle_impact",
|
|
41
|
+
"untangle_complexity",
|
|
42
|
+
"untangle_hotspots",
|
|
43
|
+
"untangle_about",
|
|
44
|
+
"untangle_product",
|
|
45
|
+
"untangle_boundaries",
|
|
46
|
+
]);
|
|
47
|
+
const DEFAULT_MCP_AVAILABLE_TOOL_SET = new Set(DEFAULT_MCP_AVAILABLE_TOOLS);
|
|
48
|
+
function isDefaultAvailableTool(operation) {
|
|
49
|
+
return DEFAULT_MCP_AVAILABLE_TOOL_SET.has(operation);
|
|
50
|
+
}
|
|
51
|
+
/** Default local runtime. It never spawns an external process. */
|
|
52
|
+
export class DefaultUntangleMcpRuntime {
|
|
53
|
+
async invoke(operation, input, context) {
|
|
54
|
+
if (context.signal.aborted) {
|
|
55
|
+
return mcpFailure(operation, "CANCELLED", "The MCP operation was cancelled.", false);
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
const scopeFailure = validateRequestedWorkspace(operation, input, context);
|
|
59
|
+
if (scopeFailure !== null)
|
|
60
|
+
return scopeFailure;
|
|
61
|
+
if (!isDefaultAvailableTool(operation)) {
|
|
62
|
+
if (operation === "untangle_blueprint" && input["apply"] === true) {
|
|
63
|
+
const targetDirectory = path.resolve(stringInput(input, "root") ?? context.cwd, String(input["targetDir"]));
|
|
64
|
+
return mcpFailure(operation, "FEATURE_UNAVAILABLE", `Blueprint apply is unavailable for target directory "${targetDirectory}"; no filesystem changes were made.`, false, {
|
|
65
|
+
...(typeof input["workspaceId"] === "string"
|
|
66
|
+
? { workspaceId: input["workspaceId"] }
|
|
67
|
+
: {}),
|
|
68
|
+
details: {
|
|
69
|
+
missingCapability: unavailableReason(operation),
|
|
70
|
+
targetDirectory,
|
|
71
|
+
mutationPerformed: false,
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return unavailableEnvelope(operation, unavailableReason(operation));
|
|
76
|
+
}
|
|
77
|
+
let result;
|
|
78
|
+
switch (operation) {
|
|
79
|
+
case "untangle_boundaries": {
|
|
80
|
+
const flags = { format: "json" };
|
|
81
|
+
copyString(input, "root", flags, "root");
|
|
82
|
+
copyString(input, "path", flags, "path");
|
|
83
|
+
copyString(input, "servicesFile", flags, "services");
|
|
84
|
+
copyNumber(input, "maxRelations", flags, "max-relations");
|
|
85
|
+
result = await invokeJsonCommand(operation, { spec: graphCommand.spec, run: runBoundaries }, { positionals: [], flags }, context);
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
case "untangle_about":
|
|
89
|
+
result = about(operation, context.env);
|
|
90
|
+
break;
|
|
91
|
+
case "untangle_projects":
|
|
92
|
+
result = projects(operation, input, context);
|
|
93
|
+
break;
|
|
94
|
+
case "untangle_context_list":
|
|
95
|
+
result = contextList(operation, input, context);
|
|
96
|
+
break;
|
|
97
|
+
case "untangle_health":
|
|
98
|
+
result = await this.health(operation, input, context);
|
|
99
|
+
break;
|
|
100
|
+
case "untangle_search":
|
|
101
|
+
result = await this.search(operation, input, context);
|
|
102
|
+
break;
|
|
103
|
+
case "untangle_search_session":
|
|
104
|
+
result = await this.searchSession(operation, input, context);
|
|
105
|
+
break;
|
|
106
|
+
case "untangle_complexity":
|
|
107
|
+
case "untangle_hotspots":
|
|
108
|
+
result = await this.complexity(operation, input, context);
|
|
109
|
+
break;
|
|
110
|
+
case "untangle_product":
|
|
111
|
+
result = await this.product(operation, input, context);
|
|
112
|
+
break;
|
|
113
|
+
case "untangle_graph_status":
|
|
114
|
+
case "untangle_graph_query":
|
|
115
|
+
case "untangle_graph_stats":
|
|
116
|
+
case "untangle_graph_cycles":
|
|
117
|
+
case "untangle_graph_visualize":
|
|
118
|
+
result = await this.graph(operation, input, context);
|
|
119
|
+
break;
|
|
120
|
+
case "untangle_symbols":
|
|
121
|
+
case "untangle_symbol":
|
|
122
|
+
result = await this.symbols(operation, input, context);
|
|
123
|
+
break;
|
|
124
|
+
case "untangle_flow":
|
|
125
|
+
case "untangle_impact":
|
|
126
|
+
result = await this.flow(operation, input, context);
|
|
127
|
+
break;
|
|
128
|
+
default:
|
|
129
|
+
return assertNever(operation);
|
|
130
|
+
}
|
|
131
|
+
if (context.signal.aborted)
|
|
132
|
+
return cancelledEnvelope(operation);
|
|
133
|
+
return result;
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
if (context.signal.aborted)
|
|
137
|
+
return cancelledEnvelope(operation);
|
|
138
|
+
return failureFromThrown(operation, error);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
async health(operation, input, context) {
|
|
142
|
+
const flags = { format: "json" };
|
|
143
|
+
copyString(input, "root", flags, "root");
|
|
144
|
+
copyBoolean(input, "skipEmbeddings", flags, "skip-embeddings");
|
|
145
|
+
copyNumber(input, "timeoutMs", flags, "timeout");
|
|
146
|
+
return invokeJsonCommand(operation, doctorCommand, { positionals: [], flags }, context, [
|
|
147
|
+
EXIT.ok,
|
|
148
|
+
EXIT.environment,
|
|
149
|
+
]);
|
|
150
|
+
}
|
|
151
|
+
async search(operation, input, context) {
|
|
152
|
+
const flags = { format: "json" };
|
|
153
|
+
copyString(input, "root", flags, "root");
|
|
154
|
+
copyString(input, "workspaceId", flags, "workspace");
|
|
155
|
+
copyNumber(input, "limit", flags, "limit");
|
|
156
|
+
copyString(input, "mode", flags, "mode");
|
|
157
|
+
copyString(input, "abstention", flags, "abstention");
|
|
158
|
+
copyBoolean(input, "requireFresh", flags, "require-fresh");
|
|
159
|
+
copyStrings(input, "repositories", flags, "repo");
|
|
160
|
+
copyStrings(input, "refs", flags, "ref");
|
|
161
|
+
copyStrings(input, "pathGlob", flags, "path");
|
|
162
|
+
copyStrings(input, "languages", flags, "lang");
|
|
163
|
+
copyStrings(input, "symbolNames", flags, "symbol");
|
|
164
|
+
copyBoolean(input, "includeContent", flags, "content");
|
|
165
|
+
copyBoolean(input, "includeContext", flags, "context");
|
|
166
|
+
copyBoolean(input, "includeLinked", flags, "linked");
|
|
167
|
+
copyBoolean(input, "explain", flags, "explain");
|
|
168
|
+
const result = await invokeJsonCommand(operation, queryCommand, { positionals: [String(input["query"])], flags }, context);
|
|
169
|
+
const link = searchSessionLink(input);
|
|
170
|
+
if (link === null)
|
|
171
|
+
return result;
|
|
172
|
+
const searchData = result.ok ? result.data : result.error?.details?.["data"];
|
|
173
|
+
try {
|
|
174
|
+
const service = await openSearchJourneyService(input, context);
|
|
175
|
+
const parsed = UNTANGLE_MCP_SUCCESS_DATA_SCHEMAS.untangle_search.safeParse(searchData);
|
|
176
|
+
if (parsed.success) {
|
|
177
|
+
const recorded = await service.recordSearch(link.id, parsed.data, link.step === undefined ? {} : { step: link.step }, { signal: context.signal });
|
|
178
|
+
return withSearchObservation(result, parsed.data, {
|
|
179
|
+
sessionId: link.id,
|
|
180
|
+
attemptId: recorded.attempt.attemptId,
|
|
181
|
+
status: "recorded",
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
if (result.ok)
|
|
185
|
+
return result;
|
|
186
|
+
await service.recordFailedSearch(link.id, {
|
|
187
|
+
query: String(input["query"]),
|
|
188
|
+
failureCode: result.error?.code ?? "OPERATION_FAILED",
|
|
189
|
+
failureReason: result.error?.message ?? "The search did not produce a success result.",
|
|
190
|
+
}, link.step === undefined ? {} : { step: link.step }, { signal: context.signal });
|
|
191
|
+
return result;
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
const warning = {
|
|
195
|
+
code: "SEARCH_SESSION_RECORDING_FAILED",
|
|
196
|
+
message: searchData !== undefined
|
|
197
|
+
? "The search result is valid, but its optional Dynamic Product Complexity observation could not be recorded."
|
|
198
|
+
: "The search failed, and its optional Dynamic Product Complexity failure observation could not be recorded.",
|
|
199
|
+
details: {
|
|
200
|
+
sessionId: link.id,
|
|
201
|
+
reasonCode: isUntangleError(error)
|
|
202
|
+
? error.code
|
|
203
|
+
: error instanceof Error
|
|
204
|
+
? error.name
|
|
205
|
+
: "UNKNOWN_ERROR",
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
if (!isRecord(searchData)) {
|
|
209
|
+
return { ...result, warnings: [...result.warnings, warning] };
|
|
210
|
+
}
|
|
211
|
+
return withSearchObservation({ ...result, warnings: [...result.warnings, warning] }, searchData, { sessionId: link.id, status: "not_recorded", warningCode: warning.code });
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
async searchSession(operation, input, context) {
|
|
215
|
+
const action = String(input["action"]);
|
|
216
|
+
const service = await openSearchJourneyService(input, context);
|
|
217
|
+
const callOptions = { signal: context.signal };
|
|
218
|
+
switch (action) {
|
|
219
|
+
case "start": {
|
|
220
|
+
const session = await service.start({
|
|
221
|
+
goal: String(input["goal"]),
|
|
222
|
+
...(typeof input["featureId"] === "string" ? { featureId: input["featureId"] } : {}),
|
|
223
|
+
...(typeof input["retainText"] === "boolean"
|
|
224
|
+
? { retainText: input["retainText"] }
|
|
225
|
+
: {}),
|
|
226
|
+
...(isRecord(input["executionContext"])
|
|
227
|
+
? {
|
|
228
|
+
executionContext: input["executionContext"],
|
|
229
|
+
}
|
|
230
|
+
: {}),
|
|
231
|
+
}, callOptions);
|
|
232
|
+
return mcpSuccess(operation, { action, session }, { workspaceId: session.workspaceId });
|
|
233
|
+
}
|
|
234
|
+
case "get": {
|
|
235
|
+
const session = await service.get(String(input["sessionId"]), callOptions);
|
|
236
|
+
return mcpSuccess(operation, { action, session }, { workspaceId: session.workspaceId });
|
|
237
|
+
}
|
|
238
|
+
case "observe": {
|
|
239
|
+
const session = await service.observeNavigation(String(input["sessionId"]), {
|
|
240
|
+
kind: input["kind"],
|
|
241
|
+
...(typeof input["toolName"] === "string" ? { toolName: input["toolName"] } : {}),
|
|
242
|
+
...(isRecord(input["target"]) ? { target: searchJourneyTarget(input["target"]) } : {}),
|
|
243
|
+
}, callOptions);
|
|
244
|
+
return mcpSuccess(operation, { action, session }, { workspaceId: session.workspaceId });
|
|
245
|
+
}
|
|
246
|
+
case "complete": {
|
|
247
|
+
const session = await service.complete(String(input["sessionId"]), {
|
|
248
|
+
target: searchJourneyTarget(input["target"]),
|
|
249
|
+
...(typeof input["acceptedAttemptId"] === "string"
|
|
250
|
+
? { acceptedAttemptId: input["acceptedAttemptId"] }
|
|
251
|
+
: {}),
|
|
252
|
+
}, callOptions);
|
|
253
|
+
return mcpSuccess(operation, { action, session }, { workspaceId: session.workspaceId });
|
|
254
|
+
}
|
|
255
|
+
case "abandon": {
|
|
256
|
+
const session = await service.abandon(String(input["sessionId"]), {
|
|
257
|
+
...(typeof input["reasonCode"] === "string"
|
|
258
|
+
? { reasonCode: input["reasonCode"] }
|
|
259
|
+
: {}),
|
|
260
|
+
...(typeof input["reason"] === "string" ? { reason: input["reason"] } : {}),
|
|
261
|
+
}, callOptions);
|
|
262
|
+
return mcpSuccess(operation, { action, session }, { workspaceId: session.workspaceId });
|
|
263
|
+
}
|
|
264
|
+
case "report": {
|
|
265
|
+
const report = await service.report(callOptions);
|
|
266
|
+
return mcpSuccess(operation, { action, report }, { workspaceId: report.workspaceId });
|
|
267
|
+
}
|
|
268
|
+
default:
|
|
269
|
+
return mcpFailure(operation, "INVALID_ARGUMENT", `Unknown search-session action "${action}".`, false);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
async product(operation, input, context) {
|
|
273
|
+
const flags = { format: "json" };
|
|
274
|
+
copyString(input, "root", flags, "root");
|
|
275
|
+
copyString(input, "manifest", flags, "manifest");
|
|
276
|
+
copyString(input, "testEvidence", flags, "test-evidence");
|
|
277
|
+
copyString(input, "featureId", flags, "feature");
|
|
278
|
+
copyString(input, "path", flags, "path");
|
|
279
|
+
copyNumber(input, "maxCognitive", flags, "max-cognitive");
|
|
280
|
+
copyBoolean(input, "requireComplete", flags, "require-complete");
|
|
281
|
+
return invokeJsonCommand(operation, productCommand, { positionals: [], flags }, context);
|
|
282
|
+
}
|
|
283
|
+
async complexity(operation, input, context) {
|
|
284
|
+
const flags = { format: "json" };
|
|
285
|
+
copyString(input, "root", flags, "root");
|
|
286
|
+
copyBoolean(input, "prose", flags, "prose");
|
|
287
|
+
if (operation === "untangle_hotspots") {
|
|
288
|
+
copyNumber(input, "limit", flags, "top");
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
copyNumber(input, "top", flags, "top");
|
|
292
|
+
copyBoolean(input, "includeNested", flags, "include-nested");
|
|
293
|
+
}
|
|
294
|
+
return invokeJsonCommand(operation, complexityCommand, { positionals: [], flags }, context);
|
|
295
|
+
}
|
|
296
|
+
async graph(operation, input, context) {
|
|
297
|
+
if (operation === "untangle_graph_query" && stringInput(input, "file") === undefined) {
|
|
298
|
+
return mcpFailure(operation, "INVALID_ARGUMENT", "untangle_graph_query requires an explicit file; the unbounded workspace overview is not exposed over MCP.", false);
|
|
299
|
+
}
|
|
300
|
+
const flags = { format: "json" };
|
|
301
|
+
copyString(input, "root", flags, "root");
|
|
302
|
+
copyString(input, "direction", flags, "direction");
|
|
303
|
+
copyCappedNumber(input, "depth", flags, "depth", MAX_GRAPH_QUERY_DEPTH);
|
|
304
|
+
copyCappedNumber(input, "maxNodes", flags, "max-nodes", operation === "untangle_graph_visualize" ? MAX_MAX_NODES : MAX_GRAPH_QUERY_NODES);
|
|
305
|
+
copyCappedNumber(input, "maxEdges", flags, "max-edges", operation === "untangle_graph_visualize" ? MAX_MAX_EDGES : MAX_GRAPH_QUERY_EDGES);
|
|
306
|
+
copyNumber(input, "limit", flags, "limit");
|
|
307
|
+
copyString(input, "out", flags, "out");
|
|
308
|
+
copyString(input, "layout", flags, "layout");
|
|
309
|
+
const file = typeof input["file"] === "string" ? input["file"] : undefined;
|
|
310
|
+
const positionals = operation === "untangle_graph_visualize" ? ["visualize"] : file === undefined ? [] : [file];
|
|
311
|
+
const envelope = await invokeJsonCommand(operation, graphCommand, { positionals, flags }, context);
|
|
312
|
+
if (!envelope.ok || !isRecord(envelope.data))
|
|
313
|
+
return envelope;
|
|
314
|
+
if (operation === "untangle_graph_query" && file !== undefined)
|
|
315
|
+
return envelope;
|
|
316
|
+
if (file !== undefined)
|
|
317
|
+
return envelope;
|
|
318
|
+
if (operation === "untangle_graph_stats") {
|
|
319
|
+
return {
|
|
320
|
+
...envelope,
|
|
321
|
+
data: {
|
|
322
|
+
generationId: envelope.data["generationId"],
|
|
323
|
+
metrics: envelope.data["metrics"],
|
|
324
|
+
boundaries: envelope.data["boundaries"],
|
|
325
|
+
issues: envelope.data["issues"],
|
|
326
|
+
},
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
if (operation === "untangle_graph_cycles") {
|
|
330
|
+
const limit = typeof input["limit"] === "number" ? input["limit"] : 20;
|
|
331
|
+
const cycles = Array.isArray(envelope.data["cyclePaths"])
|
|
332
|
+
? envelope.data["cyclePaths"].slice(0, limit)
|
|
333
|
+
: [];
|
|
334
|
+
return {
|
|
335
|
+
...envelope,
|
|
336
|
+
data: {
|
|
337
|
+
generationId: envelope.data["generationId"],
|
|
338
|
+
cycles,
|
|
339
|
+
total: Array.isArray(envelope.data["cyclePaths"])
|
|
340
|
+
? envelope.data["cyclePaths"].length
|
|
341
|
+
: 0,
|
|
342
|
+
issues: envelope.data["issues"],
|
|
343
|
+
},
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
if (operation === "untangle_graph_status") {
|
|
347
|
+
return {
|
|
348
|
+
...envelope,
|
|
349
|
+
data: {
|
|
350
|
+
generationId: envelope.data["generationId"],
|
|
351
|
+
workspaceId: envelope.data["workspaceId"],
|
|
352
|
+
metrics: envelope.data["metrics"],
|
|
353
|
+
issues: envelope.data["issues"],
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
return envelope;
|
|
358
|
+
}
|
|
359
|
+
async symbols(operation, input, context) {
|
|
360
|
+
const loaded = await loadGraphs({
|
|
361
|
+
cwd: stringInput(input, "root") ?? context.cwd,
|
|
362
|
+
env: context.env,
|
|
363
|
+
signal: context.signal,
|
|
364
|
+
});
|
|
365
|
+
const requestedWorkspace = stringInput(input, "workspaceId");
|
|
366
|
+
if (requestedWorkspace !== undefined && requestedWorkspace !== loaded.fileGraph.workspaceId) {
|
|
367
|
+
return mcpFailure(operation, "WORKSPACE_NOT_FOUND", `Loaded graph belongs to workspace "${loaded.fileGraph.workspaceId}", not requested workspace "${requestedWorkspace}".`, false);
|
|
368
|
+
}
|
|
369
|
+
if (loaded.symbolGraph === null) {
|
|
370
|
+
return mcpFailure(operation, "INDEX_INCOMPLETE", loaded.symbolGraphMissingReason ?? "The symbol graph is unavailable.", false);
|
|
371
|
+
}
|
|
372
|
+
const index = createSymbolGraphIndex(loaded.symbolGraph.graph);
|
|
373
|
+
if (operation === "untangle_symbols") {
|
|
374
|
+
const query = stringInput(input, "query")?.toLowerCase();
|
|
375
|
+
const limit = numberInput(input, "limit") ?? 100;
|
|
376
|
+
const matching = index
|
|
377
|
+
.nodes()
|
|
378
|
+
.filter((node) => query === undefined ||
|
|
379
|
+
node.name.toLowerCase().includes(query) ||
|
|
380
|
+
node.qualifiedName.toLowerCase().includes(query))
|
|
381
|
+
.sort((left, right) => compareCodepoints(left.repoId, right.repoId) ||
|
|
382
|
+
compareCodepoints(left.refId, right.refId) ||
|
|
383
|
+
compareCodepoints(left.filePath, right.filePath) ||
|
|
384
|
+
left.startLine - right.startLine ||
|
|
385
|
+
compareCodepoints(left.id, right.id));
|
|
386
|
+
return mcpSuccess(operation, {
|
|
387
|
+
generationId: loaded.generationId,
|
|
388
|
+
symbols: matching.slice(0, limit),
|
|
389
|
+
total: matching.length,
|
|
390
|
+
truncated: matching.length > limit,
|
|
391
|
+
}, { workspaceId: loaded.fileGraph.workspaceId });
|
|
392
|
+
}
|
|
393
|
+
const selection = selectSymbolNode(index.nodes(), String(input["symbol"]));
|
|
394
|
+
if (selection.status === "ambiguous") {
|
|
395
|
+
return mcpFailure(operation, "SYMBOL_AMBIGUOUS", `The symbol matched ${String(selection.candidates.length)} persisted nodes; none was selected.`, false, { details: { candidates: selection.candidates } });
|
|
396
|
+
}
|
|
397
|
+
if (selection.status === "absent") {
|
|
398
|
+
return mcpFailure(operation, "SYMBOL_NOT_FOUND", "The symbol is not present in the persisted graph.", false, { details: { near: selection.near } });
|
|
399
|
+
}
|
|
400
|
+
return mcpSuccess(operation, {
|
|
401
|
+
generationId: loaded.generationId,
|
|
402
|
+
matchedBy: selection.matchedBy,
|
|
403
|
+
symbol: selection.node,
|
|
404
|
+
outgoing: index.outgoingEdges(selection.node.id),
|
|
405
|
+
callers: index.callers(selection.node.id),
|
|
406
|
+
}, { workspaceId: loaded.fileGraph.workspaceId });
|
|
407
|
+
}
|
|
408
|
+
async flow(operation, input, context) {
|
|
409
|
+
const flags = { format: "json" };
|
|
410
|
+
copyString(input, "root", flags, "root");
|
|
411
|
+
copyCappedNumber(input, "depth", flags, "depth", MAX_FLOW_DEPTH);
|
|
412
|
+
copyCappedNumber(input, "limit", flags, "limit", MAX_FLOW_RESULT_LIMIT);
|
|
413
|
+
copyCappedNumber(input, "maxNodes", flags, "max-nodes", MAX_FLOW_NODES);
|
|
414
|
+
copyCappedNumber(input, "maxEdges", flags, "max-edges", MAX_FLOW_EDGES);
|
|
415
|
+
copyNumber(input, "minConfidence", flags, "min-confidence");
|
|
416
|
+
const first = operation === "untangle_impact" ? String(input["symbol"]) : String(input["from"]);
|
|
417
|
+
const positionals = [first];
|
|
418
|
+
if (operation === "untangle_impact") {
|
|
419
|
+
flags["impact"] = true;
|
|
420
|
+
}
|
|
421
|
+
else if (typeof input["to"] === "string") {
|
|
422
|
+
positionals.push(input["to"]);
|
|
423
|
+
}
|
|
424
|
+
return invokeJsonCommand(operation, flowCommand, { positionals, flags }, context);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
async function openSearchJourneyService(input, context) {
|
|
428
|
+
const view = loadWorkspace({
|
|
429
|
+
cwd: stringInput(input, "root") ?? context.cwd,
|
|
430
|
+
env: context.env,
|
|
431
|
+
strict: true,
|
|
432
|
+
});
|
|
433
|
+
const local = await openLocalStorage(stateRootOf(view.root), {
|
|
434
|
+
clock: systemClock,
|
|
435
|
+
random: systemRandom,
|
|
436
|
+
}, { signal: context.signal });
|
|
437
|
+
return new SearchJourneyService({
|
|
438
|
+
workspaceId: view.workspaceId,
|
|
439
|
+
store: local.searchJourneys,
|
|
440
|
+
clock: systemClock,
|
|
441
|
+
random: systemRandom,
|
|
442
|
+
fingerprintKeyProvider: async (options) => await local.searchJourneys.getOrCreateFingerprintKey(options),
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
function searchSessionLink(input) {
|
|
446
|
+
const session = input["session"];
|
|
447
|
+
if (!isRecord(session) || typeof session["id"] !== "string")
|
|
448
|
+
return null;
|
|
449
|
+
return {
|
|
450
|
+
id: session["id"],
|
|
451
|
+
...(typeof session["step"] === "number" ? { step: session["step"] } : {}),
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
function searchJourneyTarget(input) {
|
|
455
|
+
const output = {};
|
|
456
|
+
for (const key of [
|
|
457
|
+
"repoId",
|
|
458
|
+
"refId",
|
|
459
|
+
"filePath",
|
|
460
|
+
"chunkId",
|
|
461
|
+
"symbolId",
|
|
462
|
+
"embeddingProfileId",
|
|
463
|
+
"indexGeneration",
|
|
464
|
+
]) {
|
|
465
|
+
const value = input[key];
|
|
466
|
+
if (typeof value === "string")
|
|
467
|
+
output[key] = value;
|
|
468
|
+
}
|
|
469
|
+
return output;
|
|
470
|
+
}
|
|
471
|
+
function validateRequestedWorkspace(operation, input, context) {
|
|
472
|
+
const requestedWorkspace = stringInput(input, "workspaceId");
|
|
473
|
+
if (requestedWorkspace === undefined)
|
|
474
|
+
return null;
|
|
475
|
+
const view = loadWorkspace({
|
|
476
|
+
cwd: stringInput(input, "root") ?? context.cwd,
|
|
477
|
+
env: context.env,
|
|
478
|
+
strict: true,
|
|
479
|
+
});
|
|
480
|
+
if (requestedWorkspace === view.workspaceId)
|
|
481
|
+
return null;
|
|
482
|
+
return mcpFailure(operation, "WORKSPACE_NOT_FOUND", `The requested workspace "${requestedWorkspace}" is not the workspace served by this MCP scope.`, false, { workspaceId: requestedWorkspace });
|
|
483
|
+
}
|
|
484
|
+
function about(operation, env) {
|
|
485
|
+
const commit = env["UNTANGLE_BUILD_COMMIT"]?.trim() || "unknown";
|
|
486
|
+
const warnings = commit === "unknown"
|
|
487
|
+
? [
|
|
488
|
+
{
|
|
489
|
+
code: "BUILD_COMMIT_UNKNOWN",
|
|
490
|
+
message: "This development build did not embed a source commit.",
|
|
491
|
+
},
|
|
492
|
+
]
|
|
493
|
+
: [];
|
|
494
|
+
return mcpSuccess(operation, {
|
|
495
|
+
name: "untangle",
|
|
496
|
+
version: CLI_VERSION,
|
|
497
|
+
license: "AGPL-3.0-only",
|
|
498
|
+
source: SOURCE_URL,
|
|
499
|
+
commit,
|
|
500
|
+
availableTools: [...DEFAULT_MCP_AVAILABLE_TOOLS].sort(compareCodepoints),
|
|
501
|
+
unavailableToolsReturn: "FEATURE_UNAVAILABLE",
|
|
502
|
+
}, { warnings });
|
|
503
|
+
}
|
|
504
|
+
function projects(operation, input, context) {
|
|
505
|
+
const view = loadWorkspace({
|
|
506
|
+
cwd: stringInput(input, "root") ?? context.cwd,
|
|
507
|
+
env: context.env,
|
|
508
|
+
strict: true,
|
|
509
|
+
});
|
|
510
|
+
return mcpSuccess(operation, {
|
|
511
|
+
root: view.root,
|
|
512
|
+
repositories: view.config.repositories ?? [],
|
|
513
|
+
projectId: view.config.projectId,
|
|
514
|
+
}, { workspaceId: view.workspaceId });
|
|
515
|
+
}
|
|
516
|
+
function contextList(operation, input, context) {
|
|
517
|
+
const view = loadWorkspace({
|
|
518
|
+
cwd: stringInput(input, "root") ?? context.cwd,
|
|
519
|
+
env: context.env,
|
|
520
|
+
strict: true,
|
|
521
|
+
});
|
|
522
|
+
const artifacts = [...(view.config.contextArtifacts ?? [])].sort((left, right) => compareCodepoints(left.name, right.name));
|
|
523
|
+
return mcpSuccess(operation, { artifacts, configured: artifacts.length }, { workspaceId: view.workspaceId });
|
|
524
|
+
}
|
|
525
|
+
async function invokeJsonCommand(operation, command, args, context, acceptedExitCodes = [EXIT.ok]) {
|
|
526
|
+
const io = new BufferIo();
|
|
527
|
+
const commandContext = {
|
|
528
|
+
io,
|
|
529
|
+
cwd: context.cwd,
|
|
530
|
+
env: context.env,
|
|
531
|
+
signal: context.signal,
|
|
532
|
+
};
|
|
533
|
+
let exitCode;
|
|
534
|
+
try {
|
|
535
|
+
exitCode = await command.run(commandContext, args);
|
|
536
|
+
}
|
|
537
|
+
catch (error) {
|
|
538
|
+
if (context.signal.aborted)
|
|
539
|
+
return cancelledEnvelope(operation);
|
|
540
|
+
const failure = failureFromThrown(operation, error);
|
|
541
|
+
return partialSearchFailure(operation, error, io, failure) ?? failure;
|
|
542
|
+
}
|
|
543
|
+
if (context.signal.aborted)
|
|
544
|
+
return cancelledEnvelope(operation);
|
|
545
|
+
const warnings = diagnostics(io.errText);
|
|
546
|
+
let data;
|
|
547
|
+
try {
|
|
548
|
+
data = io.outText.trim() === "" ? null : JSON.parse(io.outText);
|
|
549
|
+
}
|
|
550
|
+
catch {
|
|
551
|
+
return mcpFailure(operation, "INVALID_INTERNAL_OUTPUT", `${command.spec.name} did not emit valid JSON.`, false, { warnings });
|
|
552
|
+
}
|
|
553
|
+
if (!acceptedExitCodes.includes(exitCode)) {
|
|
554
|
+
return mcpFailure(operation, codeForExit(exitCode), `The ${command.spec.name} operation ended with exit code ${String(exitCode)}.`, exitCode === EXIT.environment, { warnings, details: { exitCode, data } });
|
|
555
|
+
}
|
|
556
|
+
return mcpSuccess(operation, data, { warnings });
|
|
557
|
+
}
|
|
558
|
+
/** Preserve verified fallback hits without turning infrastructure failure into success. */
|
|
559
|
+
function partialSearchFailure(operation, error, io, failure) {
|
|
560
|
+
if (operation !== "untangle_search" ||
|
|
561
|
+
!(error instanceof CliError) ||
|
|
562
|
+
error.exitCode !== EXIT.environment) {
|
|
563
|
+
return undefined;
|
|
564
|
+
}
|
|
565
|
+
let output;
|
|
566
|
+
try {
|
|
567
|
+
output = JSON.parse(io.outText);
|
|
568
|
+
}
|
|
569
|
+
catch {
|
|
570
|
+
return undefined;
|
|
571
|
+
}
|
|
572
|
+
const parsed = UNTANGLE_MCP_SUCCESS_DATA_SCHEMAS.untangle_search.safeParse(output);
|
|
573
|
+
if (!parsed.success ||
|
|
574
|
+
!parsed.data.warnings.some((warning) => warning.code === "SEARCH_BRANCH_UNAVAILABLE") ||
|
|
575
|
+
!parsed.data.skipped.some((entry) => entry.subjectKind === "search_candidate" && entry.reason === "provider_unavailable")) {
|
|
576
|
+
return undefined;
|
|
577
|
+
}
|
|
578
|
+
return {
|
|
579
|
+
...failure,
|
|
580
|
+
workspaceId: parsed.data.query.workspaceId,
|
|
581
|
+
warnings: [
|
|
582
|
+
...failure.warnings,
|
|
583
|
+
...parsed.data.warnings.map(({ code, message, details }) => ({
|
|
584
|
+
code,
|
|
585
|
+
message,
|
|
586
|
+
...(details === undefined ? {} : { details }),
|
|
587
|
+
})),
|
|
588
|
+
...diagnostics(io.errText),
|
|
589
|
+
],
|
|
590
|
+
error: {
|
|
591
|
+
code: failure.error?.code ?? "ENVIRONMENT_UNAVAILABLE",
|
|
592
|
+
message: failure.error?.message ?? "Search retrieval was incomplete.",
|
|
593
|
+
retryable: true,
|
|
594
|
+
details: { ...failure.error?.details, exitCode: error.exitCode, data: parsed.data },
|
|
595
|
+
},
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
/** A partial search observation belongs inside its preserved failure payload. */
|
|
599
|
+
function withSearchObservation(result, searchData, observation) {
|
|
600
|
+
const data = { ...searchData, searchObservation: observation };
|
|
601
|
+
if (result.ok)
|
|
602
|
+
return { ...result, data };
|
|
603
|
+
if (result.error === undefined)
|
|
604
|
+
return result;
|
|
605
|
+
return { ...result, error: { ...result.error, details: { ...result.error.details, data } } };
|
|
606
|
+
}
|
|
607
|
+
function failureFromThrown(operation, error) {
|
|
608
|
+
if (error instanceof CliError) {
|
|
609
|
+
return mcpFailure(operation, codeForExit(error.exitCode), error.message, error.exitCode === EXIT.environment, error.nextStep === undefined ? {} : { details: { nextStep: error.nextStep } });
|
|
610
|
+
}
|
|
611
|
+
if (error instanceof Error && error.name === "AbortError") {
|
|
612
|
+
return mcpFailure(operation, "CANCELLED", "The MCP operation was cancelled.", false);
|
|
613
|
+
}
|
|
614
|
+
if (isUntangleError(error)) {
|
|
615
|
+
return mcpFailure(operation, error.code, error.message, error.retryable, {
|
|
616
|
+
...(Object.keys(error.context).length === 0 ? {} : { details: error.context }),
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
return mcpFailure(operation, "INTERNAL_ERROR", error instanceof Error ? error.message : String(error), false);
|
|
620
|
+
}
|
|
621
|
+
function cancelledEnvelope(operation) {
|
|
622
|
+
return mcpFailure(operation, "CANCELLED", "The MCP operation was cancelled.", false);
|
|
623
|
+
}
|
|
624
|
+
function assertNever(value) {
|
|
625
|
+
throw new Error(`Unhandled default MCP capability: ${String(value)}`);
|
|
626
|
+
}
|
|
627
|
+
function codeForExit(exitCode) {
|
|
628
|
+
if (exitCode === EXIT.usage)
|
|
629
|
+
return "INVALID_ARGUMENT";
|
|
630
|
+
if (exitCode === EXIT.unavailable)
|
|
631
|
+
return "FEATURE_UNAVAILABLE";
|
|
632
|
+
if (exitCode === EXIT.environment)
|
|
633
|
+
return "ENVIRONMENT_UNAVAILABLE";
|
|
634
|
+
if (exitCode === EXIT.gate)
|
|
635
|
+
return "QUALITY_GATE_FAILED";
|
|
636
|
+
if (exitCode === EXIT.cancelled)
|
|
637
|
+
return "CANCELLED";
|
|
638
|
+
return "OPERATION_FAILED";
|
|
639
|
+
}
|
|
640
|
+
function diagnostics(text) {
|
|
641
|
+
return text
|
|
642
|
+
.split("\n")
|
|
643
|
+
.map((line) => line.trim())
|
|
644
|
+
.filter((line) => line !== "")
|
|
645
|
+
.map((message) => ({ code: "CLI_DIAGNOSTIC", message }));
|
|
646
|
+
}
|
|
647
|
+
function unavailableReason(operation) {
|
|
648
|
+
if ([
|
|
649
|
+
"untangle_index",
|
|
650
|
+
"untangle_update",
|
|
651
|
+
"untangle_stop",
|
|
652
|
+
"untangle_watch",
|
|
653
|
+
"untangle_status",
|
|
654
|
+
].includes(operation))
|
|
655
|
+
return "the job-capable MCP composition and persisted job registry are not wired";
|
|
656
|
+
if (["untangle_context_index", "untangle_context_search", "untangle_context_remove"].includes(operation))
|
|
657
|
+
return "context-artifact mutation/search use cases are not exposed by the current core facade";
|
|
658
|
+
if (["untangle_graph_build", "untangle_graph_remove"].includes(operation))
|
|
659
|
+
return "standalone graph mutation is not exposed by the current core facade";
|
|
660
|
+
if (operation === "untangle_cross_repo_impact")
|
|
661
|
+
return "a workspace-scoped multi-repository graph snapshot is required before cross-repository impact can be claimed";
|
|
662
|
+
if ([
|
|
663
|
+
"untangle_complexity_explain",
|
|
664
|
+
"untangle_complexity_diff",
|
|
665
|
+
"untangle_changes",
|
|
666
|
+
"untangle_change_search",
|
|
667
|
+
"untangle_quality_gate",
|
|
668
|
+
].includes(operation))
|
|
669
|
+
return "the change-analysis and quality-gate engine is not implemented";
|
|
670
|
+
if (operation.startsWith("untangle_portfolio") ||
|
|
671
|
+
[
|
|
672
|
+
"untangle_stack_matrix",
|
|
673
|
+
"untangle_who_uses",
|
|
674
|
+
"untangle_conventions",
|
|
675
|
+
"untangle_archetypes",
|
|
676
|
+
"untangle_tech_radar",
|
|
677
|
+
"untangle_blueprint",
|
|
678
|
+
].includes(operation))
|
|
679
|
+
return "the portfolio engine is not implemented";
|
|
680
|
+
return "the operation is not implemented by this runtime";
|
|
681
|
+
}
|
|
682
|
+
function stringInput(input, key) {
|
|
683
|
+
const value = input[key];
|
|
684
|
+
return typeof value === "string" ? value : undefined;
|
|
685
|
+
}
|
|
686
|
+
function numberInput(input, key) {
|
|
687
|
+
const value = input[key];
|
|
688
|
+
return typeof value === "number" ? value : undefined;
|
|
689
|
+
}
|
|
690
|
+
function copyString(input, from, flags, to) {
|
|
691
|
+
const value = stringInput(input, from);
|
|
692
|
+
if (value !== undefined)
|
|
693
|
+
flags[to] = value;
|
|
694
|
+
}
|
|
695
|
+
function copyNumber(input, from, flags, to) {
|
|
696
|
+
const value = numberInput(input, from);
|
|
697
|
+
if (value !== undefined)
|
|
698
|
+
flags[to] = value;
|
|
699
|
+
}
|
|
700
|
+
function copyCappedNumber(input, from, flags, to, maximum) {
|
|
701
|
+
const value = numberInput(input, from);
|
|
702
|
+
if (value !== undefined)
|
|
703
|
+
flags[to] = Math.min(value, maximum);
|
|
704
|
+
}
|
|
705
|
+
function copyBoolean(input, from, flags, to) {
|
|
706
|
+
const value = input[from];
|
|
707
|
+
if (typeof value === "boolean")
|
|
708
|
+
flags[to] = value;
|
|
709
|
+
}
|
|
710
|
+
function copyStrings(input, from, flags, to) {
|
|
711
|
+
const value = input[from];
|
|
712
|
+
if (Array.isArray(value) && value.every((entry) => typeof entry === "string"))
|
|
713
|
+
flags[to] = value;
|
|
714
|
+
}
|
|
715
|
+
function isRecord(value) {
|
|
716
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
717
|
+
}
|
|
718
|
+
//# sourceMappingURL=default-runtime.js.map
|