@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.
Files changed (571) hide show
  1. package/LICENSE +661 -0
  2. package/NOTICE +90 -0
  3. package/README.md +424 -2
  4. package/THIRD_PARTY_LICENSES.md +152 -0
  5. package/dist/cli/args.d.ts +48 -0
  6. package/dist/cli/args.d.ts.map +1 -0
  7. package/dist/cli/args.js +167 -0
  8. package/dist/cli/args.js.map +1 -0
  9. package/dist/cli/command.d.ts +69 -0
  10. package/dist/cli/command.d.ts.map +1 -0
  11. package/dist/cli/command.js +82 -0
  12. package/dist/cli/command.js.map +1 -0
  13. package/dist/cli/deadline.d.ts +33 -0
  14. package/dist/cli/deadline.d.ts.map +1 -0
  15. package/dist/cli/deadline.js +49 -0
  16. package/dist/cli/deadline.js.map +1 -0
  17. package/dist/cli/embedder-deadline.d.ts +72 -0
  18. package/dist/cli/embedder-deadline.d.ts.map +1 -0
  19. package/dist/cli/embedder-deadline.js +117 -0
  20. package/dist/cli/embedder-deadline.js.map +1 -0
  21. package/dist/cli/exit.d.ts +71 -0
  22. package/dist/cli/exit.d.ts.map +1 -0
  23. package/dist/cli/exit.js +81 -0
  24. package/dist/cli/exit.js.map +1 -0
  25. package/dist/cli/graphs.d.ts +65 -0
  26. package/dist/cli/graphs.d.ts.map +1 -0
  27. package/dist/cli/graphs.js +108 -0
  28. package/dist/cli/graphs.js.map +1 -0
  29. package/dist/cli/index-freshness.d.ts +13 -0
  30. package/dist/cli/index-freshness.d.ts.map +1 -0
  31. package/dist/cli/index-freshness.js +226 -0
  32. package/dist/cli/index-freshness.js.map +1 -0
  33. package/dist/cli/index-refresh.d.ts +10 -0
  34. package/dist/cli/index-refresh.d.ts.map +1 -0
  35. package/dist/cli/index-refresh.js +76 -0
  36. package/dist/cli/index-refresh.js.map +1 -0
  37. package/dist/cli/index-state.d.ts +184 -0
  38. package/dist/cli/index-state.d.ts.map +1 -0
  39. package/dist/cli/index-state.js +852 -0
  40. package/dist/cli/index-state.js.map +1 -0
  41. package/dist/cli/io.d.ts +29 -0
  42. package/dist/cli/io.d.ts.map +1 -0
  43. package/dist/cli/io.js +42 -0
  44. package/dist/cli/io.js.map +1 -0
  45. package/dist/cli/language-support.d.ts +77 -0
  46. package/dist/cli/language-support.d.ts.map +1 -0
  47. package/dist/cli/language-support.js +152 -0
  48. package/dist/cli/language-support.js.map +1 -0
  49. package/dist/cli/renewing-lease.d.ts +26 -0
  50. package/dist/cli/renewing-lease.d.ts.map +1 -0
  51. package/dist/cli/renewing-lease.js +102 -0
  52. package/dist/cli/renewing-lease.js.map +1 -0
  53. package/dist/cli/search-graph-enrichment.d.ts +16 -0
  54. package/dist/cli/search-graph-enrichment.d.ts.map +1 -0
  55. package/dist/cli/search-graph-enrichment.js +428 -0
  56. package/dist/cli/search-graph-enrichment.js.map +1 -0
  57. package/dist/cli/system.d.ts +34 -0
  58. package/dist/cli/system.d.ts.map +1 -0
  59. package/dist/cli/system.js +89 -0
  60. package/dist/cli/system.js.map +1 -0
  61. package/dist/cli/vector-store-policy.d.ts +116 -0
  62. package/dist/cli/vector-store-policy.d.ts.map +1 -0
  63. package/dist/cli/vector-store-policy.js +160 -0
  64. package/dist/cli/vector-store-policy.js.map +1 -0
  65. package/dist/cli/version.d.ts +3 -0
  66. package/dist/cli/version.d.ts.map +1 -0
  67. package/dist/cli/version.js +3 -0
  68. package/dist/cli/version.js.map +1 -0
  69. package/dist/cli/workspace.d.ts +105 -0
  70. package/dist/cli/workspace.d.ts.map +1 -0
  71. package/dist/cli/workspace.js +215 -0
  72. package/dist/cli/workspace.js.map +1 -0
  73. package/dist/commands/complexity.d.ts +72 -0
  74. package/dist/commands/complexity.d.ts.map +1 -0
  75. package/dist/commands/complexity.js +580 -0
  76. package/dist/commands/complexity.js.map +1 -0
  77. package/dist/commands/doctor.d.ts +66 -0
  78. package/dist/commands/doctor.d.ts.map +1 -0
  79. package/dist/commands/doctor.js +764 -0
  80. package/dist/commands/doctor.js.map +1 -0
  81. package/dist/commands/doctor.languages.d.ts +37 -0
  82. package/dist/commands/doctor.languages.d.ts.map +1 -0
  83. package/dist/commands/doctor.languages.js +143 -0
  84. package/dist/commands/doctor.languages.js.map +1 -0
  85. package/dist/commands/doctor.storage.d.ts +17 -0
  86. package/dist/commands/doctor.storage.d.ts.map +1 -0
  87. package/dist/commands/doctor.storage.js +91 -0
  88. package/dist/commands/doctor.storage.js.map +1 -0
  89. package/dist/commands/extensions/add.d.ts +10 -0
  90. package/dist/commands/extensions/add.d.ts.map +1 -0
  91. package/dist/commands/extensions/add.js +213 -0
  92. package/dist/commands/extensions/add.js.map +1 -0
  93. package/dist/commands/extensions/configure.d.ts +5 -0
  94. package/dist/commands/extensions/configure.d.ts.map +1 -0
  95. package/dist/commands/extensions/configure.js +58 -0
  96. package/dist/commands/extensions/configure.js.map +1 -0
  97. package/dist/commands/extensions/container.d.ts +15 -0
  98. package/dist/commands/extensions/container.d.ts.map +1 -0
  99. package/dist/commands/extensions/container.js +135 -0
  100. package/dist/commands/extensions/container.js.map +1 -0
  101. package/dist/commands/extensions/context.d.ts +37 -0
  102. package/dist/commands/extensions/context.d.ts.map +1 -0
  103. package/dist/commands/extensions/context.js +72 -0
  104. package/dist/commands/extensions/context.js.map +1 -0
  105. package/dist/commands/extensions/enable.d.ts +6 -0
  106. package/dist/commands/extensions/enable.d.ts.map +1 -0
  107. package/dist/commands/extensions/enable.js +180 -0
  108. package/dist/commands/extensions/enable.js.map +1 -0
  109. package/dist/commands/extensions/environment.d.ts +74 -0
  110. package/dist/commands/extensions/environment.d.ts.map +1 -0
  111. package/dist/commands/extensions/environment.js +168 -0
  112. package/dist/commands/extensions/environment.js.map +1 -0
  113. package/dist/commands/extensions/feature-scan.d.ts +48 -0
  114. package/dist/commands/extensions/feature-scan.d.ts.map +1 -0
  115. package/dist/commands/extensions/feature-scan.js +156 -0
  116. package/dist/commands/extensions/feature-scan.js.map +1 -0
  117. package/dist/commands/extensions/invoke.d.ts +60 -0
  118. package/dist/commands/extensions/invoke.d.ts.map +1 -0
  119. package/dist/commands/extensions/invoke.js +275 -0
  120. package/dist/commands/extensions/invoke.js.map +1 -0
  121. package/dist/commands/extensions/list.d.ts +5 -0
  122. package/dist/commands/extensions/list.d.ts.map +1 -0
  123. package/dist/commands/extensions/list.js +125 -0
  124. package/dist/commands/extensions/list.js.map +1 -0
  125. package/dist/commands/extensions/logs.d.ts +5 -0
  126. package/dist/commands/extensions/logs.d.ts.map +1 -0
  127. package/dist/commands/extensions/logs.js +74 -0
  128. package/dist/commands/extensions/logs.js.map +1 -0
  129. package/dist/commands/extensions/provision.d.ts +36 -0
  130. package/dist/commands/extensions/provision.d.ts.map +1 -0
  131. package/dist/commands/extensions/provision.js +137 -0
  132. package/dist/commands/extensions/provision.js.map +1 -0
  133. package/dist/commands/extensions/remove.d.ts +5 -0
  134. package/dist/commands/extensions/remove.d.ts.map +1 -0
  135. package/dist/commands/extensions/remove.js +77 -0
  136. package/dist/commands/extensions/remove.js.map +1 -0
  137. package/dist/commands/extensions/render.d.ts +16 -0
  138. package/dist/commands/extensions/render.d.ts.map +1 -0
  139. package/dist/commands/extensions/render.js +25 -0
  140. package/dist/commands/extensions/render.js.map +1 -0
  141. package/dist/commands/extensions/run.d.ts +30 -0
  142. package/dist/commands/extensions/run.d.ts.map +1 -0
  143. package/dist/commands/extensions/run.js +292 -0
  144. package/dist/commands/extensions/run.js.map +1 -0
  145. package/dist/commands/extensions/secret-store.d.ts +15 -0
  146. package/dist/commands/extensions/secret-store.d.ts.map +1 -0
  147. package/dist/commands/extensions/secret-store.js +164 -0
  148. package/dist/commands/extensions/secret-store.js.map +1 -0
  149. package/dist/commands/extensions/setup.d.ts +17 -0
  150. package/dist/commands/extensions/setup.d.ts.map +1 -0
  151. package/dist/commands/extensions/setup.js +94 -0
  152. package/dist/commands/extensions/setup.js.map +1 -0
  153. package/dist/commands/extensions/source.d.ts +47 -0
  154. package/dist/commands/extensions/source.d.ts.map +1 -0
  155. package/dist/commands/extensions/source.js +142 -0
  156. package/dist/commands/extensions/source.js.map +1 -0
  157. package/dist/commands/extensions/state.d.ts +62 -0
  158. package/dist/commands/extensions/state.d.ts.map +1 -0
  159. package/dist/commands/extensions/state.js +177 -0
  160. package/dist/commands/extensions/state.js.map +1 -0
  161. package/dist/commands/extensions/status.d.ts +9 -0
  162. package/dist/commands/extensions/status.d.ts.map +1 -0
  163. package/dist/commands/extensions/status.js +239 -0
  164. package/dist/commands/extensions/status.js.map +1 -0
  165. package/dist/commands/extensions.d.ts +3 -0
  166. package/dist/commands/extensions.d.ts.map +1 -0
  167. package/dist/commands/extensions.js +223 -0
  168. package/dist/commands/extensions.js.map +1 -0
  169. package/dist/commands/flow/index.d.ts +3 -0
  170. package/dist/commands/flow/index.d.ts.map +1 -0
  171. package/dist/commands/flow/index.js +295 -0
  172. package/dist/commands/flow/index.js.map +1 -0
  173. package/dist/commands/flow/limits.d.ts +12 -0
  174. package/dist/commands/flow/limits.d.ts.map +1 -0
  175. package/dist/commands/flow/limits.js +13 -0
  176. package/dist/commands/flow/limits.js.map +1 -0
  177. package/dist/commands/flow/output.d.ts +8 -0
  178. package/dist/commands/flow/output.d.ts.map +1 -0
  179. package/dist/commands/flow/output.js +11 -0
  180. package/dist/commands/flow/output.js.map +1 -0
  181. package/dist/commands/flow/render.d.ts +51 -0
  182. package/dist/commands/flow/render.d.ts.map +1 -0
  183. package/dist/commands/flow/render.js +220 -0
  184. package/dist/commands/flow/render.js.map +1 -0
  185. package/dist/commands/flow/select.d.ts +31 -0
  186. package/dist/commands/flow/select.d.ts.map +1 -0
  187. package/dist/commands/flow/select.js +62 -0
  188. package/dist/commands/flow/select.js.map +1 -0
  189. package/dist/commands/graph/boundaries-input.d.ts +26 -0
  190. package/dist/commands/graph/boundaries-input.d.ts.map +1 -0
  191. package/dist/commands/graph/boundaries-input.js +54 -0
  192. package/dist/commands/graph/boundaries-input.js.map +1 -0
  193. package/dist/commands/graph/boundaries.d.ts +4 -0
  194. package/dist/commands/graph/boundaries.d.ts.map +1 -0
  195. package/dist/commands/graph/boundaries.js +141 -0
  196. package/dist/commands/graph/boundaries.js.map +1 -0
  197. package/dist/commands/graph/bounds.d.ts +16 -0
  198. package/dist/commands/graph/bounds.d.ts.map +1 -0
  199. package/dist/commands/graph/bounds.js +22 -0
  200. package/dist/commands/graph/bounds.js.map +1 -0
  201. package/dist/commands/graph/category-clusters.d.ts +20 -0
  202. package/dist/commands/graph/category-clusters.d.ts.map +1 -0
  203. package/dist/commands/graph/category-clusters.js +158 -0
  204. package/dist/commands/graph/category-clusters.js.map +1 -0
  205. package/dist/commands/graph/feature-3d.d.ts +22 -0
  206. package/dist/commands/graph/feature-3d.d.ts.map +1 -0
  207. package/dist/commands/graph/feature-3d.js +114 -0
  208. package/dist/commands/graph/feature-3d.js.map +1 -0
  209. package/dist/commands/graph/feature-clusters.d.ts +17 -0
  210. package/dist/commands/graph/feature-clusters.d.ts.map +1 -0
  211. package/dist/commands/graph/feature-clusters.js +94 -0
  212. package/dist/commands/graph/feature-clusters.js.map +1 -0
  213. package/dist/commands/graph/feature-html.d.ts +26 -0
  214. package/dist/commands/graph/feature-html.d.ts.map +1 -0
  215. package/dist/commands/graph/feature-html.js +314 -0
  216. package/dist/commands/graph/feature-html.js.map +1 -0
  217. package/dist/commands/graph/feature-map.d.ts +31 -0
  218. package/dist/commands/graph/feature-map.d.ts.map +1 -0
  219. package/dist/commands/graph/feature-map.js +217 -0
  220. package/dist/commands/graph/feature-map.js.map +1 -0
  221. package/dist/commands/graph/feature-model.d.ts +55 -0
  222. package/dist/commands/graph/feature-model.d.ts.map +1 -0
  223. package/dist/commands/graph/feature-model.js +167 -0
  224. package/dist/commands/graph/feature-model.js.map +1 -0
  225. package/dist/commands/graph/feature-untangle-motion.d.ts +33 -0
  226. package/dist/commands/graph/feature-untangle-motion.d.ts.map +1 -0
  227. package/dist/commands/graph/feature-untangle-motion.js +155 -0
  228. package/dist/commands/graph/feature-untangle-motion.js.map +1 -0
  229. package/dist/commands/graph/index.d.ts +3 -0
  230. package/dist/commands/graph/index.d.ts.map +1 -0
  231. package/dist/commands/graph/index.js +414 -0
  232. package/dist/commands/graph/index.js.map +1 -0
  233. package/dist/commands/graph/render.d.ts +63 -0
  234. package/dist/commands/graph/render.d.ts.map +1 -0
  235. package/dist/commands/graph/render.js +352 -0
  236. package/dist/commands/graph/render.js.map +1 -0
  237. package/dist/commands/graph/select.d.ts +34 -0
  238. package/dist/commands/graph/select.d.ts.map +1 -0
  239. package/dist/commands/graph/select.js +55 -0
  240. package/dist/commands/graph/select.js.map +1 -0
  241. package/dist/commands/index/index.d.ts +6 -0
  242. package/dist/commands/index/index.d.ts.map +1 -0
  243. package/dist/commands/index/index.js +461 -0
  244. package/dist/commands/index/index.js.map +1 -0
  245. package/dist/commands/index/render.d.ts +53 -0
  246. package/dist/commands/index/render.d.ts.map +1 -0
  247. package/dist/commands/index/render.js +205 -0
  248. package/dist/commands/index/render.js.map +1 -0
  249. package/dist/commands/index/target.d.ts +34 -0
  250. package/dist/commands/index/target.d.ts.map +1 -0
  251. package/dist/commands/index/target.js +97 -0
  252. package/dist/commands/index/target.js.map +1 -0
  253. package/dist/commands/index-watch.d.ts +30 -0
  254. package/dist/commands/index-watch.d.ts.map +1 -0
  255. package/dist/commands/index-watch.js +138 -0
  256. package/dist/commands/index-watch.js.map +1 -0
  257. package/dist/commands/init/command.d.ts +25 -0
  258. package/dist/commands/init/command.d.ts.map +1 -0
  259. package/dist/commands/init/command.js +198 -0
  260. package/dist/commands/init/command.js.map +1 -0
  261. package/dist/commands/init/config-draft.d.ts +48 -0
  262. package/dist/commands/init/config-draft.d.ts.map +1 -0
  263. package/dist/commands/init/config-draft.js +201 -0
  264. package/dist/commands/init/config-draft.js.map +1 -0
  265. package/dist/commands/init/diff.d.ts +33 -0
  266. package/dist/commands/init/diff.d.ts.map +1 -0
  267. package/dist/commands/init/diff.js +109 -0
  268. package/dist/commands/init/diff.js.map +1 -0
  269. package/dist/commands/init/http-probe.d.ts +26 -0
  270. package/dist/commands/init/http-probe.d.ts.map +1 -0
  271. package/dist/commands/init/http-probe.js +144 -0
  272. package/dist/commands/init/http-probe.js.map +1 -0
  273. package/dist/commands/init/ignore-rules.d.ts +70 -0
  274. package/dist/commands/init/ignore-rules.d.ts.map +1 -0
  275. package/dist/commands/init/ignore-rules.js +146 -0
  276. package/dist/commands/init/ignore-rules.js.map +1 -0
  277. package/dist/commands/init/index.d.ts +33 -0
  278. package/dist/commands/init/index.d.ts.map +1 -0
  279. package/dist/commands/init/index.js +32 -0
  280. package/dist/commands/init/index.js.map +1 -0
  281. package/dist/commands/init/integrations-apply.d.ts +50 -0
  282. package/dist/commands/init/integrations-apply.d.ts.map +1 -0
  283. package/dist/commands/init/integrations-apply.js +452 -0
  284. package/dist/commands/init/integrations-apply.js.map +1 -0
  285. package/dist/commands/init/integrations-plan.d.ts +68 -0
  286. package/dist/commands/init/integrations-plan.d.ts.map +1 -0
  287. package/dist/commands/init/integrations-plan.js +515 -0
  288. package/dist/commands/init/integrations-plan.js.map +1 -0
  289. package/dist/commands/init/integrations.d.ts +5 -0
  290. package/dist/commands/init/integrations.d.ts.map +1 -0
  291. package/dist/commands/init/integrations.js +4 -0
  292. package/dist/commands/init/integrations.js.map +1 -0
  293. package/dist/commands/init/languages.d.ts +55 -0
  294. package/dist/commands/init/languages.d.ts.map +1 -0
  295. package/dist/commands/init/languages.js +245 -0
  296. package/dist/commands/init/languages.js.map +1 -0
  297. package/dist/commands/init/product-context.d.ts +63 -0
  298. package/dist/commands/init/product-context.d.ts.map +1 -0
  299. package/dist/commands/init/product-context.js +390 -0
  300. package/dist/commands/init/product-context.js.map +1 -0
  301. package/dist/commands/init/render.d.ts +38 -0
  302. package/dist/commands/init/render.d.ts.map +1 -0
  303. package/dist/commands/init/render.js +501 -0
  304. package/dist/commands/init/render.js.map +1 -0
  305. package/dist/commands/init/report.d.ts +24 -0
  306. package/dist/commands/init/report.d.ts.map +1 -0
  307. package/dist/commands/init/report.js +163 -0
  308. package/dist/commands/init/report.js.map +1 -0
  309. package/dist/commands/init/run.d.ts +71 -0
  310. package/dist/commands/init/run.d.ts.map +1 -0
  311. package/dist/commands/init/run.js +253 -0
  312. package/dist/commands/init/run.js.map +1 -0
  313. package/dist/commands/init/services.d.ts +82 -0
  314. package/dist/commands/init/services.d.ts.map +1 -0
  315. package/dist/commands/init/services.js +209 -0
  316. package/dist/commands/init/services.js.map +1 -0
  317. package/dist/commands/init/storage.d.ts +8 -0
  318. package/dist/commands/init/storage.d.ts.map +1 -0
  319. package/dist/commands/init/storage.js +102 -0
  320. package/dist/commands/init/storage.js.map +1 -0
  321. package/dist/commands/init/toml.d.ts +65 -0
  322. package/dist/commands/init/toml.d.ts.map +1 -0
  323. package/dist/commands/init/toml.js +159 -0
  324. package/dist/commands/init/toml.js.map +1 -0
  325. package/dist/commands/init/topology.d.ts +54 -0
  326. package/dist/commands/init/topology.d.ts.map +1 -0
  327. package/dist/commands/init/topology.js +146 -0
  328. package/dist/commands/init/topology.js.map +1 -0
  329. package/dist/commands/init/types.d.ts +334 -0
  330. package/dist/commands/init/types.d.ts.map +1 -0
  331. package/dist/commands/init/types.js +31 -0
  332. package/dist/commands/init/types.js.map +1 -0
  333. package/dist/commands/init/wizard-terminal.d.ts +36 -0
  334. package/dist/commands/init/wizard-terminal.d.ts.map +1 -0
  335. package/dist/commands/init/wizard-terminal.js +163 -0
  336. package/dist/commands/init/wizard-terminal.js.map +1 -0
  337. package/dist/commands/init/wizard.d.ts +25 -0
  338. package/dist/commands/init/wizard.d.ts.map +1 -0
  339. package/dist/commands/init/wizard.js +358 -0
  340. package/dist/commands/init/wizard.js.map +1 -0
  341. package/dist/commands/mcp.d.ts +4 -0
  342. package/dist/commands/mcp.d.ts.map +1 -0
  343. package/dist/commands/mcp.js +111 -0
  344. package/dist/commands/mcp.js.map +1 -0
  345. package/dist/commands/product-test-runner.d.ts +4 -0
  346. package/dist/commands/product-test-runner.d.ts.map +1 -0
  347. package/dist/commands/product-test-runner.js +85 -0
  348. package/dist/commands/product-test-runner.js.map +1 -0
  349. package/dist/commands/product.d.ts +16 -0
  350. package/dist/commands/product.d.ts.map +1 -0
  351. package/dist/commands/product.js +262 -0
  352. package/dist/commands/product.js.map +1 -0
  353. package/dist/commands/query.d.ts +114 -0
  354. package/dist/commands/query.d.ts.map +1 -0
  355. package/dist/commands/query.js +783 -0
  356. package/dist/commands/query.js.map +1 -0
  357. package/dist/commands/scan.d.ts +10 -0
  358. package/dist/commands/scan.d.ts.map +1 -0
  359. package/dist/commands/scan.js +302 -0
  360. package/dist/commands/scan.js.map +1 -0
  361. package/dist/commands/sdd.d.ts +24 -0
  362. package/dist/commands/sdd.d.ts.map +1 -0
  363. package/dist/commands/sdd.js +195 -0
  364. package/dist/commands/sdd.js.map +1 -0
  365. package/dist/commands/unavailable.d.ts +40 -0
  366. package/dist/commands/unavailable.d.ts.map +1 -0
  367. package/dist/commands/unavailable.js +73 -0
  368. package/dist/commands/unavailable.js.map +1 -0
  369. package/dist/commands/watch/analyze.d.ts +69 -0
  370. package/dist/commands/watch/analyze.d.ts.map +1 -0
  371. package/dist/commands/watch/analyze.js +402 -0
  372. package/dist/commands/watch/analyze.js.map +1 -0
  373. package/dist/commands/watch/cli.d.ts +8 -0
  374. package/dist/commands/watch/cli.d.ts.map +1 -0
  375. package/dist/commands/watch/cli.js +97 -0
  376. package/dist/commands/watch/cli.js.map +1 -0
  377. package/dist/commands/watch/delta.d.ts +46 -0
  378. package/dist/commands/watch/delta.d.ts.map +1 -0
  379. package/dist/commands/watch/delta.js +170 -0
  380. package/dist/commands/watch/delta.js.map +1 -0
  381. package/dist/commands/watch/events.d.ts +214 -0
  382. package/dist/commands/watch/events.d.ts.map +1 -0
  383. package/dist/commands/watch/events.js +13 -0
  384. package/dist/commands/watch/events.js.map +1 -0
  385. package/dist/commands/watch/index.d.ts +19 -0
  386. package/dist/commands/watch/index.d.ts.map +1 -0
  387. package/dist/commands/watch/index.js +15 -0
  388. package/dist/commands/watch/index.js.map +1 -0
  389. package/dist/commands/watch/options.d.ts +43 -0
  390. package/dist/commands/watch/options.d.ts.map +1 -0
  391. package/dist/commands/watch/options.js +193 -0
  392. package/dist/commands/watch/options.js.map +1 -0
  393. package/dist/commands/watch/render.d.ts +26 -0
  394. package/dist/commands/watch/render.d.ts.map +1 -0
  395. package/dist/commands/watch/render.js +175 -0
  396. package/dist/commands/watch/render.js.map +1 -0
  397. package/dist/commands/watch/run.d.ts +14 -0
  398. package/dist/commands/watch/run.d.ts.map +1 -0
  399. package/dist/commands/watch/run.js +460 -0
  400. package/dist/commands/watch/run.js.map +1 -0
  401. package/dist/commands/watch/runtime.d.ts +67 -0
  402. package/dist/commands/watch/runtime.d.ts.map +1 -0
  403. package/dist/commands/watch/runtime.js +149 -0
  404. package/dist/commands/watch/runtime.js.map +1 -0
  405. package/dist/commands/watch-command.d.ts +3 -0
  406. package/dist/commands/watch-command.d.ts.map +1 -0
  407. package/dist/commands/watch-command.js +273 -0
  408. package/dist/commands/watch-command.js.map +1 -0
  409. package/dist/entry-point.d.ts +11 -0
  410. package/dist/entry-point.d.ts.map +1 -0
  411. package/dist/entry-point.js +65 -0
  412. package/dist/entry-point.js.map +1 -0
  413. package/dist/index.d.ts +38 -0
  414. package/dist/index.d.ts.map +1 -0
  415. package/dist/index.js +245 -0
  416. package/dist/index.js.map +1 -0
  417. package/dist/mcp/boundaries-schema.d.ts +262 -0
  418. package/dist/mcp/boundaries-schema.d.ts.map +1 -0
  419. package/dist/mcp/boundaries-schema.js +183 -0
  420. package/dist/mcp/boundaries-schema.js.map +1 -0
  421. package/dist/mcp/default-runtime.d.ts +16 -0
  422. package/dist/mcp/default-runtime.d.ts.map +1 -0
  423. package/dist/mcp/default-runtime.js +718 -0
  424. package/dist/mcp/default-runtime.js.map +1 -0
  425. package/dist/mcp/envelope.d.ts +13 -0
  426. package/dist/mcp/envelope.d.ts.map +1 -0
  427. package/dist/mcp/envelope.js +29 -0
  428. package/dist/mcp/envelope.js.map +1 -0
  429. package/dist/mcp/index.d.ts +8 -0
  430. package/dist/mcp/index.d.ts.map +1 -0
  431. package/dist/mcp/index.js +8 -0
  432. package/dist/mcp/index.js.map +1 -0
  433. package/dist/mcp/output-schemas.d.ts +5928 -0
  434. package/dist/mcp/output-schemas.d.ts.map +1 -0
  435. package/dist/mcp/output-schemas.js +2814 -0
  436. package/dist/mcp/output-schemas.js.map +1 -0
  437. package/dist/mcp/path-sandbox.d.ts +35 -0
  438. package/dist/mcp/path-sandbox.d.ts.map +1 -0
  439. package/dist/mcp/path-sandbox.js +128 -0
  440. package/dist/mcp/path-sandbox.js.map +1 -0
  441. package/dist/mcp/server.d.ts +155 -0
  442. package/dist/mcp/server.d.ts.map +1 -0
  443. package/dist/mcp/server.js +257 -0
  444. package/dist/mcp/server.js.map +1 -0
  445. package/dist/mcp/stdio.d.ts +20 -0
  446. package/dist/mcp/stdio.d.ts.map +1 -0
  447. package/dist/mcp/stdio.js +71 -0
  448. package/dist/mcp/stdio.js.map +1 -0
  449. package/dist/mcp/tools.d.ts +355 -0
  450. package/dist/mcp/tools.d.ts.map +1 -0
  451. package/dist/mcp/tools.js +319 -0
  452. package/dist/mcp/tools.js.map +1 -0
  453. package/dist/mcp/types.d.ts +15 -0
  454. package/dist/mcp/types.d.ts.map +1 -0
  455. package/dist/mcp/types.js +45 -0
  456. package/dist/mcp/types.js.map +1 -0
  457. package/package.json +99 -3
  458. package/src/cli/args.ts +231 -0
  459. package/src/cli/command.ts +146 -0
  460. package/src/cli/deadline.ts +56 -0
  461. package/src/cli/embedder-deadline.ts +187 -0
  462. package/src/cli/exit.ts +94 -0
  463. package/src/cli/graphs.ts +191 -0
  464. package/src/cli/index-freshness.ts +303 -0
  465. package/src/cli/index-refresh.ts +125 -0
  466. package/src/cli/index-state.ts +1217 -0
  467. package/src/cli/io.ts +56 -0
  468. package/src/cli/language-support.ts +203 -0
  469. package/src/cli/renewing-lease.ts +121 -0
  470. package/src/cli/search-graph-enrichment.ts +639 -0
  471. package/src/cli/system.ts +94 -0
  472. package/src/cli/vector-store-policy.ts +213 -0
  473. package/src/cli/version.ts +2 -0
  474. package/src/cli/workspace.ts +324 -0
  475. package/src/commands/complexity.ts +776 -0
  476. package/src/commands/doctor.languages.ts +187 -0
  477. package/src/commands/doctor.storage.ts +124 -0
  478. package/src/commands/doctor.ts +946 -0
  479. package/src/commands/extensions/add.ts +312 -0
  480. package/src/commands/extensions/configure.ts +82 -0
  481. package/src/commands/extensions/container.ts +209 -0
  482. package/src/commands/extensions/context.ts +109 -0
  483. package/src/commands/extensions/enable.ts +237 -0
  484. package/src/commands/extensions/environment.ts +218 -0
  485. package/src/commands/extensions/feature-scan.ts +232 -0
  486. package/src/commands/extensions/invoke.ts +368 -0
  487. package/src/commands/extensions/list.ts +158 -0
  488. package/src/commands/extensions/logs.ts +104 -0
  489. package/src/commands/extensions/provision.ts +206 -0
  490. package/src/commands/extensions/remove.ts +110 -0
  491. package/src/commands/extensions/render.ts +32 -0
  492. package/src/commands/extensions/run.ts +386 -0
  493. package/src/commands/extensions/secret-store.ts +223 -0
  494. package/src/commands/extensions/setup.ts +140 -0
  495. package/src/commands/extensions/source.ts +189 -0
  496. package/src/commands/extensions/state.ts +252 -0
  497. package/src/commands/extensions/status.ts +320 -0
  498. package/src/commands/extensions.ts +280 -0
  499. package/src/commands/flow/index.ts +402 -0
  500. package/src/commands/flow/limits.ts +14 -0
  501. package/src/commands/flow/output.ts +16 -0
  502. package/src/commands/flow/render.ts +318 -0
  503. package/src/commands/flow/select.ts +101 -0
  504. package/src/commands/graph/boundaries-input.ts +63 -0
  505. package/src/commands/graph/boundaries.ts +182 -0
  506. package/src/commands/graph/bounds.ts +25 -0
  507. package/src/commands/graph/category-clusters.ts +194 -0
  508. package/src/commands/graph/feature-3d.ts +141 -0
  509. package/src/commands/graph/feature-clusters.ts +125 -0
  510. package/src/commands/graph/feature-html.ts +336 -0
  511. package/src/commands/graph/feature-map.ts +270 -0
  512. package/src/commands/graph/feature-model.ts +234 -0
  513. package/src/commands/graph/feature-untangle-motion.ts +192 -0
  514. package/src/commands/graph/index.ts +562 -0
  515. package/src/commands/graph/render.ts +503 -0
  516. package/src/commands/graph/select.ts +77 -0
  517. package/src/commands/index/index.ts +595 -0
  518. package/src/commands/index/render.ts +325 -0
  519. package/src/commands/index/target.ts +136 -0
  520. package/src/commands/index-watch.ts +206 -0
  521. package/src/commands/init/command.ts +238 -0
  522. package/src/commands/init/config-draft.ts +235 -0
  523. package/src/commands/init/diff.ts +117 -0
  524. package/src/commands/init/http-probe.ts +150 -0
  525. package/src/commands/init/ignore-rules.ts +170 -0
  526. package/src/commands/init/index.ts +63 -0
  527. package/src/commands/init/integrations-apply.ts +618 -0
  528. package/src/commands/init/integrations-plan.ts +634 -0
  529. package/src/commands/init/integrations.ts +8 -0
  530. package/src/commands/init/languages.ts +320 -0
  531. package/src/commands/init/product-context.ts +576 -0
  532. package/src/commands/init/render.ts +598 -0
  533. package/src/commands/init/report.ts +204 -0
  534. package/src/commands/init/run.ts +349 -0
  535. package/src/commands/init/services.ts +271 -0
  536. package/src/commands/init/storage.ts +136 -0
  537. package/src/commands/init/toml.ts +174 -0
  538. package/src/commands/init/topology.ts +192 -0
  539. package/src/commands/init/types.ts +366 -0
  540. package/src/commands/init/wizard-terminal.ts +206 -0
  541. package/src/commands/init/wizard.ts +450 -0
  542. package/src/commands/mcp.ts +123 -0
  543. package/src/commands/product-test-runner.ts +80 -0
  544. package/src/commands/product.ts +331 -0
  545. package/src/commands/query.ts +1032 -0
  546. package/src/commands/scan.ts +360 -0
  547. package/src/commands/sdd.ts +243 -0
  548. package/src/commands/unavailable.ts +92 -0
  549. package/src/commands/watch/README.md +160 -0
  550. package/src/commands/watch/analyze.ts +600 -0
  551. package/src/commands/watch/cli.ts +108 -0
  552. package/src/commands/watch/delta.ts +186 -0
  553. package/src/commands/watch/events.ts +235 -0
  554. package/src/commands/watch/index.ts +53 -0
  555. package/src/commands/watch/options.ts +234 -0
  556. package/src/commands/watch/render.ts +240 -0
  557. package/src/commands/watch/run.ts +553 -0
  558. package/src/commands/watch/runtime.ts +167 -0
  559. package/src/commands/watch-command.ts +294 -0
  560. package/src/entry-point.ts +67 -0
  561. package/src/index.ts +291 -0
  562. package/src/mcp/boundaries-schema.ts +193 -0
  563. package/src/mcp/default-runtime.ts +1034 -0
  564. package/src/mcp/envelope.ts +57 -0
  565. package/src/mcp/index.ts +28 -0
  566. package/src/mcp/output-schemas.ts +3071 -0
  567. package/src/mcp/path-sandbox.ts +156 -0
  568. package/src/mcp/server.ts +358 -0
  569. package/src/mcp/stdio.ts +92 -0
  570. package/src/mcp/tools.ts +563 -0
  571. package/src/mcp/types.ts +66 -0
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Monorepo topology: the level ABOVE the files.
3
+ *
4
+ * A project is rarely one thing. It is `packages/*` under a workspace
5
+ * definition, and it is `frontend`/`backend`/`worker` under a container
6
+ * composition — two different, equally real decompositions of the same
7
+ * repository. `@untangle-code/file-graph` already reads both
8
+ * (`loadWorkspaceTopology`: `pnpm-workspace.yaml`, `package.json#workspaces`,
9
+ * `tsconfig*.json`, and every composition file), so this module CALLS it and
10
+ * does not rebuild it.
11
+ *
12
+ * What is added here is exactly the part file-graph does not read: the marker
13
+ * files of the other workspace managers (`lerna.json`, `nx.json`,
14
+ * `turbo.json`). They are DETECTED, not interpreted into a second package
15
+ * discovery. When such a marker declares a layout the topology pass did not
16
+ * find, that is written down as a gap (E4) — a config that quietly claims a
17
+ * single-package project because nobody read `lerna.json` is exactly the kind
18
+ * of silent skip the project forbids.
19
+ */
20
+ import { buildSkipLedgerEntry, compareCodepoints, sortByCodepoints } from "@untangle-code/domain";
21
+ import { loadWorkspaceTopology } from "@untangle-code/file-graph";
22
+ /**
23
+ * Transient ids for the topology pass. `loadWorkspaceTopology` needs a
24
+ * workspace id and a generation id to key its skip ledger; `init` persists
25
+ * neither, so both are fixed constants rather than a clock- or
26
+ * random-derived value (determinism rule: no `Date.now()`/`Math.random()` in
27
+ * result data).
28
+ */
29
+ export const INIT_WORKSPACE_ID = "untangle-init";
30
+ export const INIT_GENERATION_ID = "untangle-init";
31
+ /** The single repository `init` looks at: the directory it was pointed at. */
32
+ export const INIT_REPO_ID = "root";
33
+ export const INIT_REF_ID = "root:HEAD";
34
+ /** Marker files of workspace managers, in probe order (codepoint-sorted). */
35
+ export const WORKSPACE_MANAGER_MARKERS = ["lerna.json", "nx.json", "turbo.json"];
36
+ export async function detectTopology(input) {
37
+ const { fs, repoRoot, limits, onSkipEntry } = input;
38
+ const loaded = await loadWorkspaceTopology(fs, {
39
+ workspaceId: INIT_WORKSPACE_ID,
40
+ generationId: INIT_GENERATION_ID,
41
+ // `rootPath` is what the topology walk actually descends from, so it is
42
+ // the ABSOLUTE repository root — the field's own doc calls it
43
+ // workspace-root-relative, and for a single-repository workspace those
44
+ // are the same thing. Everything the pass reports back is repo-relative.
45
+ repositories: [{ repoId: INIT_REPO_ID, refId: INIT_REF_ID, rootPath: repoRoot }],
46
+ maxDepth: limits.maxTopologyDepth,
47
+ maxDirectories: limits.maxTopologyDirectories,
48
+ });
49
+ // The topology pass keeps its own ledger; folding it into ours is what
50
+ // keeps a single `untangle init` run answerable for everything it skipped.
51
+ for (const entry of loaded.topology.skipped.entries) {
52
+ onSkipEntry(entry);
53
+ }
54
+ const packages = loaded.topology.packages
55
+ .map((pkg) => ({
56
+ name: pkg.name,
57
+ directory: pkg.packageDir,
58
+ workspaceDependencyCount: pkg.workspaceDependencies.length,
59
+ }))
60
+ .sort((a, b) => compareCodepoints(a.name, b.name) || compareCodepoints(a.directory, b.directory));
61
+ const services = loaded.topology.services
62
+ .map((service) => ({
63
+ name: service.name,
64
+ composeFile: service.composeFile,
65
+ ...(service.buildContext === undefined ? {} : { buildContext: service.buildContext }),
66
+ ...(service.image === undefined ? {} : { image: service.image }),
67
+ dependsOn: sortByCodepoints(service.dependsOn),
68
+ }))
69
+ .sort((a, b) => compareCodepoints(a.composeFile, b.composeFile) || compareCodepoints(a.name, b.name));
70
+ const managers = await detectWorkspaceManagers(fs, repoRoot, packages.length, onSkipEntry);
71
+ return {
72
+ workspaceGlobs: sortByCodepoints(loaded.topology.workspaceGlobs),
73
+ packages,
74
+ services,
75
+ packageEdgeCount: loaded.topology.packageEdges.length,
76
+ serviceEdgeCount: loaded.topology.serviceEdges.length,
77
+ managers,
78
+ isMonorepo: packages.length > 1 || services.length > 1,
79
+ };
80
+ }
81
+ /**
82
+ * Reads the marker files of the workspace managers file-graph does not know.
83
+ *
84
+ * `lerna.json` is the only one of the three that declares a package layout in
85
+ * its own right (`packages: [...]`); `nx.json` and `turbo.json` sit on top of
86
+ * an existing npm/pnpm/yarn workspace and therefore add nothing to the
87
+ * package list. So only lerna can produce a real gap, and only when the
88
+ * topology pass found no packages at all.
89
+ */
90
+ export async function detectWorkspaceManagers(fs, repoRoot, packagesFound, onSkipEntry) {
91
+ const markerFiles = [];
92
+ let lernaGlobs = [];
93
+ for (const marker of WORKSPACE_MANAGER_MARKERS) {
94
+ const absolute = joinPath(repoRoot, marker);
95
+ const stat = await fs.stat(absolute);
96
+ if (stat === null || stat.kind !== "file") {
97
+ continue;
98
+ }
99
+ markerFiles.push(marker);
100
+ if (marker !== "lerna.json") {
101
+ continue;
102
+ }
103
+ try {
104
+ const parsed = JSON.parse(await fs.readTextFile(absolute));
105
+ lernaGlobs = sortByCodepoints(readStringArray(parsed, "packages"));
106
+ }
107
+ catch {
108
+ onSkipEntry(buildSkipLedgerEntry({
109
+ stage: "file_graph",
110
+ subjectKind: "file",
111
+ path: marker,
112
+ reason: "parse_failed",
113
+ detail: "lerna.json exists but could not be read as JSON; its declared package globs are therefore absent from the topology.",
114
+ recoverable: false,
115
+ }));
116
+ }
117
+ }
118
+ const uncoveredByTopology = [];
119
+ if (lernaGlobs.length > 0 && packagesFound === 0) {
120
+ uncoveredByTopology.push("lerna.json");
121
+ onSkipEntry(buildSkipLedgerEntry({
122
+ stage: "file_graph",
123
+ subjectKind: "file",
124
+ path: "lerna.json",
125
+ reason: "unsupported_language",
126
+ detail: `lerna.json declares package globs (${lernaGlobs.join(", ")}), but topology discovered no packages: @untangle-code/file-graph reads pnpm-workspace.yaml and package.json#workspaces, not lerna.json. This repository's subprojects are therefore absent from the topology.`,
127
+ recoverable: false,
128
+ }));
129
+ }
130
+ return { markerFiles: sortByCodepoints(markerFiles), lernaGlobs, uncoveredByTopology };
131
+ }
132
+ function readStringArray(value, key) {
133
+ if (typeof value !== "object" || value === null) {
134
+ return [];
135
+ }
136
+ const raw = value[key];
137
+ if (!Array.isArray(raw)) {
138
+ return [];
139
+ }
140
+ return raw.filter((item) => typeof item === "string");
141
+ }
142
+ /** `node:path`-free join: this module must stay usable against any `FileSystemPort`. */
143
+ function joinPath(base, name) {
144
+ return base.endsWith("/") ? `${base}${name}` : `${base}/${name}`;
145
+ }
146
+ //# sourceMappingURL=topology.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topology.js","sourceRoot":"","sources":["../../../src/commands/init/topology.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAUlE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AACjD,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAClD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC;AAEvC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,YAAY,EAAE,SAAS,EAAE,YAAY,CAAU,CAAC;AAU1F,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,KA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AAI,CAAC,IAAI,CAAC,gNAAgN;YACnR,WAAW,EAAE,KAAK;SACnB,CAAC,CACH,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,WAAW,EAAE,gBAAgB,CAAC,WAAW,CAAC,EAAE,UAAU,EAAE,mBAAmB,EAAE,CAAC;AACzF,CAAC;AAED,SAAS,eAAe,CAAC,KAAc,EAAE,GAAW;IAClD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,GAAG,GAAI,KAAiC,CAAC,GAAG,CAAC,CAAC;IACpD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC;AACxE,CAAC;AAED,wFAAwF;AACxF,SAAS,QAAQ,CAAC,IAAY,EAAE,IAAY;IAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;AACnE,CAAC"}
@@ -0,0 +1,334 @@
1
+ /**
2
+ * Contracts of `untangle init` (WP-125).
3
+ *
4
+ * `init` is the first command a user ever runs, so it has exactly one job:
5
+ * understand a foreign project WITHOUT asking, and write down what it
6
+ * understood in a form the user can read and correct.
7
+ *
8
+ * Everything the command learns lands in `ProjectFindingsV1`. Rendering,
9
+ * comparison and reporting are pure functions over that value — which is why
10
+ * the whole command is testable without a network, without a container and
11
+ * without `node:fs` (every read goes through `FileSystemPort`, every probe
12
+ * through `HttpProbePort`).
13
+ *
14
+ * DETERMINISMUS: `ProjectFindingsV1` is result data. It carries no wall-clock
15
+ * time and no random value, and every list in it is sorted by an explicit,
16
+ * documented comparator (never `String#localeCompare`). Two runs over an
17
+ * unchanged project MUST produce byte-identical findings — that is what makes
18
+ * the idempotency check in `diff.ts` a comparison of substance rather than of
19
+ * noise.
20
+ */
21
+ import type { ProductAlignmentReportV1, SkipLedgerV1 } from "@untangle-code/domain";
22
+ import type { ProductContextAssessmentV1 } from "./product-context.js";
23
+ /** One language, weighted by the lines of code found in it. */
24
+ export interface LanguageCensusEntryV1 {
25
+ /** Scanner language id (`typescript`, `python`, …) or `"unknown"`. */
26
+ languageId: string;
27
+ fileCount: number;
28
+ lineCount: number;
29
+ byteCount: number;
30
+ /** Share of `lineCount` across all entries, rounded to four decimals. */
31
+ lineShare: number;
32
+ /**
33
+ * True when `@untangle-code/parser-registry` has an adapter for this
34
+ * language — i.e. whether symbols, imports and complexity are available for
35
+ * it, or only text search.
36
+ */
37
+ hasParserAdapter: boolean;
38
+ /**
39
+ * GEMESSENE Unterstuetzungsstufe, wenn es einen Adapter gibt (WP-240).
40
+ *
41
+ * Nicht die Konstante aus der Sprachtabelle: `init` laesst den Adapter ein
42
+ * Wort parsen und damit seine Grammatik laden. Fehlt sie auf dieser
43
+ * Maschine, steht hier "text" — und {@link declaredSupportLevel} sagt,
44
+ * was der Adapter behauptet hatte.
45
+ */
46
+ supportLevel?: string;
47
+ /** Nur wenn die Messung die Behauptung widerlegt hat: die Behauptung. */
48
+ declaredSupportLevel?: string;
49
+ /** Nur dann: der benannte Grund, warum die Grammatik nicht geladen werden konnte. */
50
+ grammarUnavailableReason?: string;
51
+ }
52
+ /**
53
+ * One reason the scanner excluded paths, with how often it applied.
54
+ *
55
+ * These are COUNTS, not skip-ledger entries, and that is deliberate. An
56
+ * exclusion by `.gitignore`, by the default excludes or by the binary
57
+ * classifier is the configured scope of the scan, not content lost without a
58
+ * reason — E4 is satisfied by naming the reason and the magnitude in the
59
+ * open. Entries in `ProjectFindingsV1.skipped` are reserved for the
60
+ * genuinely surprising cases (unreadable file, symlink escape, size limit),
61
+ * which stay few enough to list individually.
62
+ */
63
+ export interface ExclusionCountV1 {
64
+ reason: string;
65
+ count: number;
66
+ }
67
+ /** The whole language picture of a project. */
68
+ export interface LanguageCensusV1 {
69
+ /** Sorted by `lineCount` descending, ties broken by `languageId` codepoints. */
70
+ entries: LanguageCensusEntryV1[];
71
+ totalFiles: number;
72
+ totalLines: number;
73
+ /** Share of lines that a deep parser adapter can actually analyse. */
74
+ parsedLineShare: number;
75
+ /** True when the scan stopped at `InitLimitsV1.maxFilesScanned`. */
76
+ truncated: boolean;
77
+ /** Codepoint-sorted by `reason`. */
78
+ excluded: ExclusionCountV1[];
79
+ }
80
+ /** A monorepo sub-project on the coarse level: a workspace package. */
81
+ export interface DetectedPackageV1 {
82
+ name: string;
83
+ /** Repo-relative directory, `""` for the repository root. */
84
+ directory: string;
85
+ /** Names of other workspace packages this one depends on. */
86
+ workspaceDependencyCount: number;
87
+ }
88
+ /** A monorepo sub-project on the coarse level: a container service. */
89
+ export interface DetectedServiceV1 {
90
+ name: string;
91
+ /** Repo-relative path of the composition file it was declared in. */
92
+ composeFile: string;
93
+ buildContext?: string;
94
+ image?: string;
95
+ dependsOn: string[];
96
+ }
97
+ /**
98
+ * Markers of workspace managers.
99
+ *
100
+ * `pnpm-workspace.yaml` and `package.json#workspaces` are read by
101
+ * `@untangle-code/file-graph` itself and end up in `packages`. The other three
102
+ * are only DETECTED here, never re-implemented: when one of them declares a
103
+ * package layout that the topology did not find, that is reported as a gap
104
+ * (E4), not papered over with a second package discovery.
105
+ */
106
+ export interface WorkspaceManagerMarkersV1 {
107
+ /** Manager marker files found at the repository root, codepoint-sorted. */
108
+ markerFiles: string[];
109
+ /** Globs declared by `lerna.json#packages`, codepoint-sorted. */
110
+ lernaGlobs: string[];
111
+ /**
112
+ * Marker files that declare or imply a package layout which the topology
113
+ * pass did not cover. Non-empty means: believe the report, not the config.
114
+ */
115
+ uncoveredByTopology: string[];
116
+ }
117
+ /** The coarse, above-the-files level of a project. */
118
+ export interface TopologyFindingsV1 {
119
+ /** Globs of the workspace definition, codepoint-sorted. */
120
+ workspaceGlobs: string[];
121
+ /** Codepoint-sorted by (name, directory). */
122
+ packages: DetectedPackageV1[];
123
+ /** Codepoint-sorted by (composeFile, name). */
124
+ services: DetectedServiceV1[];
125
+ packageEdgeCount: number;
126
+ serviceEdgeCount: number;
127
+ managers: WorkspaceManagerMarkersV1;
128
+ /** True when either level found more than one member. */
129
+ isMonorepo: boolean;
130
+ }
131
+ /** What the ignore pass decided. */
132
+ export interface IgnoreFindingsV1 {
133
+ gitignorePresent: boolean;
134
+ /** Number of effective (non-empty, non-comment) rules in the root `.gitignore`. */
135
+ gitignoreRuleCount: number;
136
+ /** Negation rules (`!…`) seen and deliberately NOT lifted into the config. */
137
+ gitignoreNegationCount: number;
138
+ untangleIgnorePresent: boolean;
139
+ /** The built-in defaults, spelled out so the user can see and override them. */
140
+ defaultExcludes: string[];
141
+ /**
142
+ * Directory rules taken from `.gitignore` that the defaults do not already
143
+ * cover, codepoint-sorted. These get pinned into the config because they are
144
+ * project-specific build output the defaults cannot know about.
145
+ */
146
+ additionalExcludes: string[];
147
+ }
148
+ /** One reachable embedding model as the provider itself describes it. */
149
+ export interface EmbeddingModelInfoV1 {
150
+ name: string;
151
+ /** Vector width the provider reports; `undefined` when it does not say. */
152
+ dimensions?: number;
153
+ /** Context window the provider reports; `undefined` when it does not say. */
154
+ contextLength?: number;
155
+ }
156
+ /** Result of probing one endpoint. */
157
+ export type ProbeOutcome = "reachable" | "unreachable" | "not-probed";
158
+ /**
159
+ * Outcome of the embedding probe (WP-228).
160
+ *
161
+ * `timeout` is deliberately its OWN value, separate from `failed`: an
162
+ * endpoint that answers "no" is a different thing from an endpoint that does
163
+ * not answer at all, and only the second one is the failure mode that made
164
+ * `untangle index` hang.
165
+ */
166
+ export type EmbedProbeOutcome = "ok" | "timeout" | "failed" | "not-probed";
167
+ /**
168
+ * What `/api/embed` — the endpoint indexing actually uses — answered.
169
+ *
170
+ * WHY THIS EXISTS: `init` used to call the provider "erreichbar" on the
171
+ * strength of `/api/tags` alone. On the machine this was measured on,
172
+ * `/api/tags` answered instantly while `/api/embed` hung indefinitely, so
173
+ * the configuration promised a working service that could not embed a single
174
+ * chunk. A reachability check that never touches the endpoint the product
175
+ * uses claims more than it knows (E4).
176
+ *
177
+ * NO DURATION IS RECORDED — only the outcome and the deadline that applied.
178
+ * A measured millisecond count would make `ProjectFindingsV1`
179
+ * non-reproducible, and the file `init` writes is supposed to be identical
180
+ * across two runs over an unchanged project.
181
+ */
182
+ export interface EmbedProbeFindingsV1 {
183
+ outcome: EmbedProbeOutcome;
184
+ /** The deadline that applied, in milliseconds. */
185
+ timeoutMs: number;
186
+ /** Vector width of the probe embedding when the endpoint answered. */
187
+ dimensions?: number;
188
+ /** Why it was not `ok`; short, no secrets, no timings. */
189
+ detail?: string;
190
+ }
191
+ export interface OllamaFindingsV1 {
192
+ outcome: ProbeOutcome;
193
+ url: string;
194
+ /** Server version string when reachable. */
195
+ version?: string;
196
+ /** Every embedding-capable model, codepoint-sorted by name. */
197
+ embeddingModels: EmbeddingModelInfoV1[];
198
+ /** The model `init` chose, and why — see `services.ts` `chooseEmbeddingModel`. */
199
+ chosenModel?: EmbeddingModelInfoV1;
200
+ chosenReason?: string;
201
+ /** What `/api/embed` answered for the chosen model (WP-228). */
202
+ embedProbe: EmbedProbeFindingsV1;
203
+ }
204
+ export interface QdrantFindingsV1 {
205
+ outcome: ProbeOutcome;
206
+ /** URLs actually probed, in probe order. */
207
+ probedUrls: string[];
208
+ /** The first reachable URL. */
209
+ url?: string;
210
+ version?: string;
211
+ /**
212
+ * URLs deliberately NOT probed, with the reason. spec.md §3.2 forbids
213
+ * touching third-party instances; a port that is known to host somebody
214
+ * else's data is skipped rather than adopted (E4: with a reason, in the
215
+ * open).
216
+ */
217
+ skippedUrls: {
218
+ url: string;
219
+ reason: string;
220
+ }[];
221
+ }
222
+ /** Local storage inspection is read-only; init never creates an index directory. */
223
+ export interface StorageFindingsV1 {
224
+ backend: "lancedb" | "qdrant";
225
+ path?: string;
226
+ directory?: string;
227
+ directoryStatus?: "present" | "missing" | "not-directory" | "unreadable";
228
+ detail?: string;
229
+ configurationWarnings?: string[];
230
+ qdrantMode?: "managed" | "external";
231
+ qdrantUrl?: string;
232
+ }
233
+ /** Everything `init` learned about a project. Pure data, no I/O. */
234
+ export interface ProjectFindingsV1 {
235
+ schemaVersion: 1;
236
+ /** Absolute, canonical repository root. */
237
+ root: string;
238
+ /** Derived from the root directory name; the config's `projectId`. */
239
+ projectId: string;
240
+ languages: LanguageCensusV1;
241
+ topology: TopologyFindingsV1;
242
+ /** Source-backed intent inventory; semantic feature alignment stays unverified. */
243
+ productContext?: ProductContextAssessmentV1;
244
+ /** Explicit feature boundaries and evidence; never inferred from embeddings. */
245
+ featureAlignment?: ProductAlignmentReportV1;
246
+ ignore: IgnoreFindingsV1;
247
+ ollama: OllamaFindingsV1;
248
+ qdrant: QdrantFindingsV1;
249
+ /** Absent only in older findings supplied through the library API. */
250
+ storage?: StorageFindingsV1;
251
+ /** Everything skipped during discovery, with a reason (E4). */
252
+ skipped: SkipLedgerV1;
253
+ }
254
+ /** Budgets. Without them a pathological repository never finishes. */
255
+ export interface InitLimitsV1 {
256
+ /** Files whose lines are counted before the census reports itself truncated. */
257
+ maxFilesScanned: number;
258
+ /** Directory depth the topology pass descends. */
259
+ maxTopologyDepth: number;
260
+ /** Directories the topology pass visits. */
261
+ maxTopologyDirectories: number;
262
+ /** Per-file byte ceiling handed to the scanner. */
263
+ maxFileSizeBytes: number;
264
+ /** Bounded parallelism of the line-count stage. */
265
+ concurrency: number;
266
+ /** Timeout of a single infrastructure probe. */
267
+ probeTimeoutMs: number;
268
+ /**
269
+ * Timeout of the embedding probe (WP-228). Longer than a plain GET,
270
+ * because the provider may have to load the model first — and still short,
271
+ * because `init` is a command a user waits for.
272
+ */
273
+ embedProbeTimeoutMs: number;
274
+ /** Languages listed individually in the report and the file's comments. */
275
+ reportedLanguages: number;
276
+ }
277
+ export declare const DEFAULT_INIT_LIMITS: InitLimitsV1;
278
+ /** What one embedding probe answered. Never a throw — always an answer. */
279
+ export type EmbedProbeResult = {
280
+ readonly ok: true;
281
+ readonly dimensions: number;
282
+ } | {
283
+ readonly ok: false;
284
+ readonly timedOut: boolean;
285
+ readonly detail: string;
286
+ };
287
+ /**
288
+ * Read-only HTTP probe port.
289
+ *
290
+ * `null` for every failure — a probe that cannot reach an endpoint is an
291
+ * ANSWER ("not there"), not an exception. Deliberately NOT a general HTTP
292
+ * client: `init` must be incapable of mutating a foreign service
293
+ * (spec.md §3.2). It has exactly two verbs, and neither of them can change
294
+ * anything:
295
+ *
296
+ * - {@link getJson} — a GET.
297
+ * - {@link probeEmbedding} — the ONE POST this command may make (WP-228):
298
+ * the embedding of a fixed, tiny probe text. It is a POST only because
299
+ * that is the shape of the endpoint; it writes nothing, creates nothing
300
+ * and deletes nothing. It is also exactly the call `untangle index` is
301
+ * about to make thousands of times — which is the whole point: an
302
+ * "erreichbar" that never touched this endpoint was a claim about a
303
+ * different endpoint.
304
+ */
305
+ export interface HttpProbePort {
306
+ getJson(url: string, timeoutMs: number): Promise<unknown | null>;
307
+ probeEmbedding(baseUrl: string, model: string, timeoutMs: number): Promise<EmbedProbeResult>;
308
+ }
309
+ /** What `init` did to the file on disk. */
310
+ export type InitOutcome = "created" | "unchanged" | "overwritten" | "differs" | "would-create" | "would-be-unchanged" | "would-overwrite";
311
+ export interface InitResultV1 {
312
+ outcome: InitOutcome;
313
+ /** Absolute path of the configuration file. */
314
+ configPath: string;
315
+ findings: ProjectFindingsV1;
316
+ /** The rendered `untangle.toml` text, always produced, even for `--dry-run`. */
317
+ rendered: string;
318
+ /** Non-empty only for `differs`/`would-overwrite`: what the file would gain and lose. */
319
+ changes: ConfigChangeV1[];
320
+ /** Exactly one sentence naming the single next thing to do. */
321
+ nextStep: string;
322
+ /** Schema warnings from `@untangle-code/config`'s validator, if any. */
323
+ configWarnings: string[];
324
+ /** Schema errors from `@untangle-code/config`'s validator, if any. */
325
+ configErrors: string[];
326
+ exitCode: number;
327
+ }
328
+ /** One line-level difference between the file on disk and a fresh render. */
329
+ export interface ConfigChangeV1 {
330
+ kind: "added" | "removed";
331
+ /** The line itself, trimmed of trailing whitespace. */
332
+ line: string;
333
+ }
334
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/commands/init/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEpF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAEvE,+DAA+D;AAC/D,MAAM,WAAW,qBAAqB;IACpC,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qFAAqF;IACrF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,+CAA+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,gFAAgF;IAChF,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,eAAe,EAAE,MAAM,CAAC;IACx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AyF;IACzF,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,sEAAsE;IACtE,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Contracts of `untangle init` (WP-125).
3
+ *
4
+ * `init` is the first command a user ever runs, so it has exactly one job:
5
+ * understand a foreign project WITHOUT asking, and write down what it
6
+ * understood in a form the user can read and correct.
7
+ *
8
+ * Everything the command learns lands in `ProjectFindingsV1`. Rendering,
9
+ * comparison and reporting are pure functions over that value — which is why
10
+ * the whole command is testable without a network, without a container and
11
+ * without `node:fs` (every read goes through `FileSystemPort`, every probe
12
+ * through `HttpProbePort`).
13
+ *
14
+ * DETERMINISMUS: `ProjectFindingsV1` is result data. It carries no wall-clock
15
+ * time and no random value, and every list in it is sorted by an explicit,
16
+ * documented comparator (never `String#localeCompare`). Two runs over an
17
+ * unchanged project MUST produce byte-identical findings — that is what makes
18
+ * the idempotency check in `diff.ts` a comparison of substance rather than of
19
+ * noise.
20
+ */
21
+ export const DEFAULT_INIT_LIMITS = {
22
+ maxFilesScanned: 50_000,
23
+ maxTopologyDepth: 12,
24
+ maxTopologyDirectories: 20_000,
25
+ maxFileSizeBytes: 5 * 1024 * 1024,
26
+ concurrency: 8,
27
+ probeTimeoutMs: 2_000,
28
+ embedProbeTimeoutMs: 8_000,
29
+ reportedLanguages: 12,
30
+ };
31
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/commands/init/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAkRH,MAAM,CAAC,MAAM,mBAAmB,GAAiB;IAC/C,eAAe,EAAE,MAAM;IACvB,gBAAgB,EAAE,EAAE;IACpB,sBAAsB,EAAE,MAAM;IAC9B,gBAAgB,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI;IACjC,WAAW,EAAE,CAAC;IACd,cAAc,EAAE,KAAK;IACrB,mBAAmB,EAAE,KAAK;IAC1B,iBAAiB,EAAE,EAAE;CACtB,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { type Key } from "node:readline";
2
+ export interface WizardChoice<T extends string> {
3
+ value: T;
4
+ label: string;
5
+ detail?: string;
6
+ }
7
+ export interface WizardTerminal {
8
+ readonly interactive: boolean;
9
+ choose<T extends string>(question: string, choices: readonly WizardChoice<T>[]): Promise<T>;
10
+ input(question: string, initial?: string): Promise<string>;
11
+ message(text: string): void;
12
+ }
13
+ export interface WizardInput {
14
+ isTTY?: boolean;
15
+ isRaw?: boolean;
16
+ setRawMode(mode: boolean): unknown;
17
+ isPaused(): boolean;
18
+ resume(): unknown;
19
+ pause(): unknown;
20
+ on(event: "keypress", listener: (text: string | undefined, key: Key) => void): unknown;
21
+ on(event: "end" | "close", listener: () => void): unknown;
22
+ removeListener(event: "keypress", listener: (text: string | undefined, key: Key) => void): unknown;
23
+ removeListener(event: "end" | "close", listener: () => void): unknown;
24
+ }
25
+ /** Project strings never get to send control sequences to the terminal. */
26
+ export declare function terminalText(text: string): string;
27
+ /** Keep grapheme clusters intact and account for ordinary double-width terminal cells. */
28
+ export declare function wrapTerminalFrame(frame: string, columns: number): string;
29
+ /** Each prompt owns its listeners/raw mode only until a choice is made. */
30
+ export declare function createWizardTerminal(options: {
31
+ input?: WizardInput;
32
+ write: (text: string) => void;
33
+ signal: AbortSignal;
34
+ columns?: number;
35
+ }): WizardTerminal;
36
+ //# sourceMappingURL=wizard-terminal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wizard-ter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