@untangle-code/cli 0.0.0-stage → 0.1.1

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 +451 -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,26 @@
1
+ /**
2
+ * The Node implementation of `HttpProbePort`.
3
+ *
4
+ * Kept in its own module so every other file of the command stays testable
5
+ * without a network. It is GET-only and it swallows nothing: a failure
6
+ * becomes `null`, which the callers treat as the ANSWER "not there" — and
7
+ * every such answer ends up visible in the written file (Befund 3), never as
8
+ * a silently missing section.
9
+ */
10
+ import type { HttpProbePort } from "./types.js";
11
+ /**
12
+ * The text sent to `/api/embed`. Fixed and tiny on purpose: the probe is a
13
+ * question about the ENDPOINT, not about the model's quality, and a short
14
+ * input keeps it cheap on somebody else's machine.
15
+ */
16
+ export declare const EMBED_PROBE_TEXT = "untangle probe";
17
+ export declare function nodeHttpProbe(): HttpProbePort;
18
+ /**
19
+ * The vector width from an `/api/embed` response, or `undefined` when the
20
+ * body is not one. Parsed here rather than in `services.ts` so the network
21
+ * shape stays in the module that speaks to the network.
22
+ */
23
+ export declare function readProbeDimensions(bodyText: string): number | undefined;
24
+ /** A probe that answers nothing — for `--offline` and for tests. */
25
+ export declare function offlineProbe(): HttpProbePort;
26
+ //# sourceMappingURL=http-probe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-probe.d.ts","sourceRoot":"","sources":["../../../src/commands/init/http-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAoB,aAAa,EAAE,MAAM,YAAY,CAAC;AAKlE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AAEjD,wBAAgB,aAAa,IAAI,aAAa,CAmE7C;AA0BD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAaxE;AAED,oEAAoE;AACpE,wBAAgB,YAAY,IAAI,aAAa,CAa5C"}
@@ -0,0 +1,144 @@
1
+ /**
2
+ * The Node implementation of `HttpProbePort`.
3
+ *
4
+ * Kept in its own module so every other file of the command stays testable
5
+ * without a network. It is GET-only and it swallows nothing: a failure
6
+ * becomes `null`, which the callers treat as the ANSWER "not there" — and
7
+ * every such answer ends up visible in the written file (Befund 3), never as
8
+ * a silently missing section.
9
+ */
10
+ /** Ceiling on a probe response, so an endpoint that is not what we think it is cannot flood memory. */
11
+ const MAX_PROBE_BYTES = 1024 * 1024;
12
+ /**
13
+ * The text sent to `/api/embed`. Fixed and tiny on purpose: the probe is a
14
+ * question about the ENDPOINT, not about the model's quality, and a short
15
+ * input keeps it cheap on somebody else's machine.
16
+ */
17
+ export const EMBED_PROBE_TEXT = "untangle probe";
18
+ export function nodeHttpProbe() {
19
+ return {
20
+ /**
21
+ * The one POST (WP-228). It embeds {@link EMBED_PROBE_TEXT} and reports
22
+ * the vector width — or that the endpoint did not answer within the
23
+ * deadline. It never throws: not answering is the answer.
24
+ */
25
+ async probeEmbedding(baseUrl, model, timeoutMs) {
26
+ const url = `${baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl}/api/embed`;
27
+ try {
28
+ const response = await fetch(url, {
29
+ method: "POST",
30
+ headers: { "content-type": "application/json", accept: "application/json" },
31
+ body: JSON.stringify({ model, input: [EMBED_PROBE_TEXT] }),
32
+ signal: AbortSignal.timeout(timeoutMs),
33
+ });
34
+ if (!response.ok) {
35
+ return {
36
+ ok: false,
37
+ timedOut: false,
38
+ detail: `HTTP ${String(response.status)} from /api/embed`,
39
+ };
40
+ }
41
+ const text = await readCapped(response, MAX_PROBE_BYTES);
42
+ if (text === null) {
43
+ return { ok: false, timedOut: false, detail: "Unreadable /api/embed response" };
44
+ }
45
+ const dimensions = readProbeDimensions(text);
46
+ return dimensions === undefined
47
+ ? { ok: false, timedOut: false, detail: "/api/embed returned no vector" }
48
+ : { ok: true, dimensions };
49
+ }
50
+ catch (error) {
51
+ const timedOut = error instanceof Error && error.name === "TimeoutError";
52
+ return {
53
+ ok: false,
54
+ timedOut,
55
+ detail: timedOut
56
+ ? "/api/embed did not respond within the deadline"
57
+ : `/api/embed is unreachable: ${error instanceof Error ? error.name : "unknown"}`,
58
+ };
59
+ }
60
+ },
61
+ async getJson(url, timeoutMs) {
62
+ try {
63
+ const response = await fetch(url, {
64
+ method: "GET",
65
+ headers: { accept: "application/json" },
66
+ signal: AbortSignal.timeout(timeoutMs),
67
+ });
68
+ if (!response.ok) {
69
+ return null;
70
+ }
71
+ const text = await readCapped(response, MAX_PROBE_BYTES);
72
+ if (text === null) {
73
+ return null;
74
+ }
75
+ return JSON.parse(text);
76
+ }
77
+ catch {
78
+ return null;
79
+ }
80
+ },
81
+ };
82
+ }
83
+ async function readCapped(response, maxBytes) {
84
+ const body = response.body;
85
+ if (body === null) {
86
+ return null;
87
+ }
88
+ const reader = body.getReader();
89
+ const decoder = new TextDecoder();
90
+ let size = 0;
91
+ let text = "";
92
+ for (;;) {
93
+ const { done, value } = await reader.read();
94
+ if (done) {
95
+ break;
96
+ }
97
+ size += value.byteLength;
98
+ if (size > maxBytes) {
99
+ await reader.cancel();
100
+ return null;
101
+ }
102
+ text += decoder.decode(value, { stream: true });
103
+ }
104
+ return text + decoder.decode();
105
+ }
106
+ /**
107
+ * The vector width from an `/api/embed` response, or `undefined` when the
108
+ * body is not one. Parsed here rather than in `services.ts` so the network
109
+ * shape stays in the module that speaks to the network.
110
+ */
111
+ export function readProbeDimensions(bodyText) {
112
+ let payload;
113
+ try {
114
+ payload = JSON.parse(bodyText);
115
+ }
116
+ catch {
117
+ return undefined;
118
+ }
119
+ if (typeof payload !== "object" || payload === null)
120
+ return undefined;
121
+ const embeddings = payload.embeddings;
122
+ if (!Array.isArray(embeddings))
123
+ return undefined;
124
+ const first = embeddings[0];
125
+ if (!Array.isArray(first) || first.length === 0)
126
+ return undefined;
127
+ return first.length;
128
+ }
129
+ /** A probe that answers nothing — for `--offline` and for tests. */
130
+ export function offlineProbe() {
131
+ return {
132
+ getJson() {
133
+ return Promise.resolve(null);
134
+ },
135
+ probeEmbedding() {
136
+ return Promise.resolve({
137
+ ok: false,
138
+ timedOut: false,
139
+ detail: "not checked (--offline)",
140
+ });
141
+ },
142
+ };
143
+ }
144
+ //# sourceMappingURL=http-probe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-probe.js","sourceRoot":"","sources":["../../../src/commands/init/http-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,uGAAuG;AACvG,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpC;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAEjD,MAAM,UAAU,aAAa;IAC3B,OAAO;QACL;;;;WAIG;QACH,KAAK,CAAC,cAAc,CAClB,OAAe,EACf,KAAa,EACb,SAAiB;YAEjB,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,YAAY,CAAC;YAClF,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;oBAChC,MAAM,EAAE,MAAM;oBACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,EAAE,kBAA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ACL,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Ignore rules: `.gitignore` plus sensible defaults.
3
+ *
4
+ * The scanner evaluates `.gitignore` and `.untangleignore` itself, at every
5
+ * directory level, every time it runs (spec.md §6.2). So this module does NOT
6
+ * copy those rules into the configuration — a duplicated rule set is a rule
7
+ * set that drifts. What it does instead is two things the scanner cannot do
8
+ * for the user:
9
+ *
10
+ * 1. It writes the built-in default excludes into the file EXPLICITLY. They
11
+ * are the rules most likely to be wrong for a given project (a repository
12
+ * whose real source lives in `build/` exists), and a default you cannot
13
+ * see is a default you cannot correct.
14
+ * 2. It lifts project-specific output directories out of `.gitignore` — the
15
+ * ones the defaults do not already cover — and pins them, because those
16
+ * are exactly the directories the defaults could not have known about.
17
+ *
18
+ * Negation rules (`!…`) are read but deliberately never lifted: taken out of
19
+ * their ordered context a negation inverts meaning, and half a `.gitignore`
20
+ * is worse than none of it. Their count is reported instead.
21
+ *
22
+ * ONE CONSEQUENCE WORTH KNOWING: a rule lifted into `repositories[].exclude`
23
+ * moves from the `.gitignore` layer (spec.md §6.2 item 4) up to the explicit
24
+ * config-exclude layer (item 2), where a later `.untangleignore` can no
25
+ * longer take it back. That is the intent of pinning — the indexed scope
26
+ * becomes visible and stable in one list — but it is a real change of
27
+ * priority, so only plain directory names are ever lifted, never patterns.
28
+ */
29
+ import type { FileSystemPort } from "@untangle-code/domain";
30
+ import type { IgnoreFindingsV1 } from "./types.js";
31
+ /**
32
+ * The exclude list written into the configuration.
33
+ *
34
+ * Mirrors `@untangle-code/scanner`'s own overridable default tier, plus
35
+ * `.git`, which the scanner treats as a security-tier exclusion the user
36
+ * cannot switch off — it is listed here so the written file tells the whole
37
+ * truth about what is skipped, not just the switchable half.
38
+ */
39
+ export declare const DEFAULT_PROJECT_EXCLUDES: readonly string[];
40
+ /** One effective line of a `.gitignore`. */
41
+ export interface GitignoreRuleV1 {
42
+ pattern: string;
43
+ negated: boolean;
44
+ /** True when the rule can only ever match a directory (trailing `/`). */
45
+ directoryOnly: boolean;
46
+ }
47
+ /**
48
+ * Splits `.gitignore` text into effective rules. Blank lines and `#` comments
49
+ * are dropped; a leading `\#` is git's escape for a literal `#` and is
50
+ * unescaped rather than treated as a comment.
51
+ */
52
+ export declare function parseGitignore(text: string): GitignoreRuleV1[];
53
+ /**
54
+ * Picks the rules worth pinning into the configuration: plain directory names
55
+ * that the defaults do not already cover.
56
+ *
57
+ * "Plain" means no glob metacharacter and no nested path — `output/` and
58
+ * `.ruff_cache/` qualify, `*.log` and `backend/.env` do not. A file pattern
59
+ * is left to the scanner's runtime `.gitignore` evaluation; the point of
60
+ * pinning is to make the coarse SCOPE of the index visible in one list, not
61
+ * to restate every rule.
62
+ */
63
+ export declare function selectAdditionalExcludes(rules: readonly GitignoreRuleV1[]): string[];
64
+ export interface IgnoreInput {
65
+ fs: FileSystemPort;
66
+ /** Absolute, canonical repository root. */
67
+ repoRoot: string;
68
+ }
69
+ export declare function detectIgnoreRules(input: IgnoreInput): Promise<IgnoreFindingsV1>;
70
+ //# sourceMappingURL=ignore-rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore-rules.d.ts","sourceRoot":"","sources":["../../../src/commands/init/ignore-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAgBrD,CAAC;AAIF,4CAA4C;AAC5C,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,yEAAyE;IACzE,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,EAAE,CAkB9D;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,EAAE,CA0BpF;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,cAAc,CAAC;IACnB,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAcrF"}
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Ignore rules: `.gitignore` plus sensible defaults.
3
+ *
4
+ * The scanner evaluates `.gitignore` and `.untangleignore` itself, at every
5
+ * directory level, every time it runs (spec.md §6.2). So this module does NOT
6
+ * copy those rules into the configuration — a duplicated rule set is a rule
7
+ * set that drifts. What it does instead is two things the scanner cannot do
8
+ * for the user:
9
+ *
10
+ * 1. It writes the built-in default excludes into the file EXPLICITLY. They
11
+ * are the rules most likely to be wrong for a given project (a repository
12
+ * whose real source lives in `build/` exists), and a default you cannot
13
+ * see is a default you cannot correct.
14
+ * 2. It lifts project-specific output directories out of `.gitignore` — the
15
+ * ones the defaults do not already cover — and pins them, because those
16
+ * are exactly the directories the defaults could not have known about.
17
+ *
18
+ * Negation rules (`!…`) are read but deliberately never lifted: taken out of
19
+ * their ordered context a negation inverts meaning, and half a `.gitignore`
20
+ * is worse than none of it. Their count is reported instead.
21
+ *
22
+ * ONE CONSEQUENCE WORTH KNOWING: a rule lifted into `repositories[].exclude`
23
+ * moves from the `.gitignore` layer (spec.md §6.2 item 4) up to the explicit
24
+ * config-exclude layer (item 2), where a later `.untangleignore` can no
25
+ * longer take it back. That is the intent of pinning — the indexed scope
26
+ * becomes visible and stable in one list — but it is a real change of
27
+ * priority, so only plain directory names are ever lifted, never patterns.
28
+ */
29
+ import { sortByCodepoints } from "@untangle-code/domain";
30
+ /**
31
+ * The exclude list written into the configuration.
32
+ *
33
+ * Mirrors `@untangle-code/scanner`'s own overridable default tier, plus
34
+ * `.git`, which the scanner treats as a security-tier exclusion the user
35
+ * cannot switch off — it is listed here so the written file tells the whole
36
+ * truth about what is skipped, not just the switchable half.
37
+ */
38
+ export const DEFAULT_PROJECT_EXCLUDES = [
39
+ ".cache",
40
+ ".git",
41
+ ".gradle",
42
+ ".next",
43
+ ".nuxt",
44
+ ".venv",
45
+ "__pycache__",
46
+ "build",
47
+ "coverage",
48
+ "dist",
49
+ "node_modules",
50
+ "out",
51
+ "target",
52
+ "vendor",
53
+ "venv",
54
+ ];
55
+ const DEFAULT_EXCLUDE_SET = new Set(DEFAULT_PROJECT_EXCLUDES);
56
+ /**
57
+ * Splits `.gitignore` text into effective rules. Blank lines and `#` comments
58
+ * are dropped; a leading `\#` is git's escape for a literal `#` and is
59
+ * unescaped rather than treated as a comment.
60
+ */
61
+ export function parseGitignore(text) {
62
+ const rules = [];
63
+ for (const rawLine of text.split("\n")) {
64
+ const line = rawLine.replace(/\r$/u, "").trim();
65
+ if (line.length === 0 || line.startsWith("#")) {
66
+ continue;
67
+ }
68
+ const negated = line.startsWith("!");
69
+ let pattern = negated ? line.slice(1) : line;
70
+ if (pattern.startsWith("\\#") || pattern.startsWith("\\!")) {
71
+ pattern = pattern.slice(1);
72
+ }
73
+ if (pattern.length === 0) {
74
+ continue;
75
+ }
76
+ rules.push({ pattern, negated, directoryOnly: pattern.endsWith("/") });
77
+ }
78
+ return rules;
79
+ }
80
+ /**
81
+ * Picks the rules worth pinning into the configuration: plain directory names
82
+ * that the defaults do not already cover.
83
+ *
84
+ * "Plain" means no glob metacharacter and no nested path — `output/` and
85
+ * `.ruff_cache/` qualify, `*.log` and `backend/.env` do not. A file pattern
86
+ * is left to the scanner's runtime `.gitignore` evaluation; the point of
87
+ * pinning is to make the coarse SCOPE of the index visible in one list, not
88
+ * to restate every rule.
89
+ */
90
+ export function selectAdditionalExcludes(rules) {
91
+ const picked = new Set();
92
+ for (const rule of rules) {
93
+ if (rule.negated) {
94
+ continue;
95
+ }
96
+ const bare = rule.pattern.replace(/^\/+/u, "").replace(/\/+$/u, "");
97
+ if (bare.length === 0 || bare.includes("/")) {
98
+ continue;
99
+ }
100
+ if (/[*?[\]!]/u.test(bare)) {
101
+ continue;
102
+ }
103
+ // `foo.log` and `.untangle.local.json` carry an extension and are files,
104
+ // not directories; only a trailing slash makes such a name worth pinning.
105
+ // A leading dot alone does not count as an extension, so `.turbo` and
106
+ // `.venv` still qualify.
107
+ if (!rule.directoryOnly && bare.slice(1).includes(".")) {
108
+ continue;
109
+ }
110
+ if (DEFAULT_EXCLUDE_SET.has(bare)) {
111
+ continue;
112
+ }
113
+ picked.add(bare);
114
+ }
115
+ return sortByCodepoints([...picked]);
116
+ }
117
+ export async function detectIgnoreRules(input) {
118
+ const { fs, repoRoot } = input;
119
+ const gitignoreText = await readOptionalText(fs, `${trimSlash(repoRoot)}/.gitignore`);
120
+ const untangleIgnoreText = await readOptionalText(fs, `${trimSlash(repoRoot)}/.untangleignore`);
121
+ const rules = gitignoreText === null ? [] : parseGitignore(gitignoreText);
122
+ return {
123
+ gitignorePresent: gitignoreText !== null,
124
+ gitignoreRuleCount: rules.length,
125
+ gitignoreNegationCount: rules.filter((rule) => rule.negated).length,
126
+ untangleIgnorePresent: untangleIgnoreText !== null,
127
+ defaultExcludes: [...DEFAULT_PROJECT_EXCLUDES],
128
+ additionalExcludes: selectAdditionalExcludes(rules),
129
+ };
130
+ }
131
+ function trimSlash(value) {
132
+ return value.endsWith("/") ? value.slice(0, -1) : value;
133
+ }
134
+ async function readOptionalText(fs, path) {
135
+ const stat = await fs.stat(path);
136
+ if (stat === null || stat.kind !== "file") {
137
+ return null;
138
+ }
139
+ try {
140
+ return await fs.readTextFile(path);
141
+ }
142
+ catch {
143
+ return null;
144
+ }
145
+ }
146
+ //# sourceMappingURL=ignore-rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore-rules.js","sourceRoot":"","sources":["../../../src/commands/init/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C;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * `untangle init` (WP-125) — the only public surface of this command.
3
+ *
4
+ * WHAT THE CLI SHELL NEEDS FROM HERE: `initCommand`, a `Command` in the sense
5
+ * of `src/cli/command.ts`. Registering it is the whole integration:
6
+ *
7
+ * import { initCommand } from "./commands/init/index.js";
8
+ *
9
+ * Everything else exported here is for tests and for other commands that want
10
+ * the DETECTION without the terminal — `runInit` returns the full
11
+ * `InitResultV1` (findings, rendered file, diff, next step) and writes
12
+ * nothing when `dryRun` is set. `untangle doctor` in particular should reuse
13
+ * `probeOllama`/`probeQdrant` rather than growing its own probes.
14
+ */
15
+ export { createInitCommand, initCommand, initOptionsFrom } from "./command.js";
16
+ export { CONFIG_FILE_NAME, decideOutcome, qdrantProbeList, runInit } from "./run.js";
17
+ export type { InitDepsV1, InitOptionsV1 } from "./run.js";
18
+ export { formatTextReport } from "./report.js";
19
+ export { renderUntangleToml } from "./render.js";
20
+ export { buildConfigDraft, deriveProjectId, nextStepFor } from "./config-draft.js";
21
+ export { buildLanguageCensus, countLines } from "./languages.js";
22
+ export { detectTopology } from "./topology.js";
23
+ export { assessProductContext } from "./product-context.js";
24
+ export type { AssessProductContextInputV1, ProductContextAssessmentV1 } from "./product-context.js";
25
+ export { detectIgnoreRules, DEFAULT_PROJECT_EXCLUDES } from "./ignore-rules.js";
26
+ export { DEFAULT_OLLAMA_URL, DEFAULT_QDRANT_URL, chooseEmbeddingModel, probeOllama, probeQdrant, readEmbeddingModels, } from "./services.js";
27
+ export { nodeHttpProbe, offlineProbe } from "./http-probe.js";
28
+ export { FOREIGN_DEFAULT_QDRANT_URLS, MANAGED_QDRANT_URL, decideVectorStore, qdrantProbePlan, } from "../../cli/vector-store-policy.js";
29
+ export { diffLines, toLines } from "./diff.js";
30
+ export { TomlWriter } from "./toml.js";
31
+ export { DEFAULT_INIT_LIMITS } from "./types.js";
32
+ export type { ConfigChangeV1, DetectedPackageV1, DetectedServiceV1, HttpProbePort, IgnoreFindingsV1, InitLimitsV1, InitOutcome, InitResultV1, LanguageCensusEntryV1, LanguageCensusV1, OllamaFindingsV1, ProjectFindingsV1, QdrantFindingsV1, StorageFindingsV1, TopologyFindingsV1, } from "./types.js";
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/init/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACrF,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,mBAAmB,GACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG9D,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * `untangle init` (WP-125) — the only public surface of this command.
3
+ *
4
+ * WHAT THE CLI SHELL NEEDS FROM HERE: `initCommand`, a `Command` in the sense
5
+ * of `src/cli/command.ts`. Registering it is the whole integration:
6
+ *
7
+ * import { initCommand } from "./commands/init/index.js";
8
+ *
9
+ * Everything else exported here is for tests and for other commands that want
10
+ * the DETECTION without the terminal — `runInit` returns the full
11
+ * `InitResultV1` (findings, rendered file, diff, next step) and writes
12
+ * nothing when `dryRun` is set. `untangle doctor` in particular should reuse
13
+ * `probeOllama`/`probeQdrant` rather than growing its own probes.
14
+ */
15
+ export { createInitCommand, initCommand, initOptionsFrom } from "./command.js";
16
+ export { CONFIG_FILE_NAME, decideOutcome, qdrantProbeList, runInit } from "./run.js";
17
+ export { formatTextReport } from "./report.js";
18
+ export { renderUntangleToml } from "./render.js";
19
+ export { buildConfigDraft, deriveProjectId, nextStepFor } from "./config-draft.js";
20
+ export { buildLanguageCensus, countLines } from "./languages.js";
21
+ export { detectTopology } from "./topology.js";
22
+ export { assessProductContext } from "./product-context.js";
23
+ export { detectIgnoreRules, DEFAULT_PROJECT_EXCLUDES } from "./ignore-rules.js";
24
+ export { DEFAULT_OLLAMA_URL, DEFAULT_QDRANT_URL, chooseEmbeddingModel, probeOllama, probeQdrant, readEmbeddingModels, } from "./services.js";
25
+ export { nodeHttpProbe, offlineProbe } from "./http-probe.js";
26
+ // WP-222: die Regel, welcher Vektorspeicher benutzt werden darf, steht an
27
+ // EINER Stelle und wird von `init` wie von `doctor` benutzt.
28
+ export { FOREIGN_DEFAULT_QDRANT_URLS, MANAGED_QDRANT_URL, decideVectorStore, qdrantProbePlan, } from "../../cli/vector-store-policy.js";
29
+ export { diffLines, toLines } from "./diff.js";
30
+ export { TomlWriter } from "./toml.js";
31
+ export { DEFAULT_INIT_LIMITS } from "./types.js";
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/init/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAErF,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,mBAAmB,GACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC9D,0EAA0E;AAC1E,6DAA6D;AAC7D,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { type ProcessRunnerPort } from "@untangle-code/extension-runtime";
2
+ import { type IntegrationCommandV1, type IntegrationDownloadV1, type IntegrationPlanItemV1, type IntegrationSetupPlanV1 } from "./integrations-plan.js";
3
+ export interface IntegrationCommandResultV1 {
4
+ exitCode: number;
5
+ reused?: boolean;
6
+ /** In-memory result only; raw stdout/stderr are never persisted in a setup report. */
7
+ value?: unknown;
8
+ }
9
+ export interface IntegrationExecutedCommandV1 {
10
+ command: string;
11
+ args: readonly string[];
12
+ exitCode: number | null;
13
+ reused?: boolean;
14
+ outcome?: string;
15
+ }
16
+ export interface IntegrationSetupDepsV1 {
17
+ execute?: boolean;
18
+ signal?: AbortSignal;
19
+ env?: Readonly<Record<string, string | undefined>>;
20
+ runner?: ProcessRunnerPort;
21
+ fetchImpl?: typeof fetch;
22
+ runExtensionCommand?: (args: readonly string[], root: string, signal?: AbortSignal) => Promise<IntegrationCommandResultV1>;
23
+ }
24
+ export interface IntegrationSetupItemResultV1 {
25
+ id: IntegrationPlanItemV1["id"];
26
+ status: "prepared" | "installed" | "needs_configuration" | "failed" | "cancelled";
27
+ detail: string;
28
+ files: string[];
29
+ executed: IntegrationExecutedCommandV1[];
30
+ nextSteps: readonly string[];
31
+ metricsRead?: number;
32
+ }
33
+ export interface IntegrationSetupReportV1 {
34
+ schemaVersion: 1;
35
+ root: string;
36
+ executeRequested: boolean;
37
+ offline: boolean;
38
+ items: IntegrationSetupItemResultV1[];
39
+ reportPath: string;
40
+ cancelled?: true;
41
+ }
42
+ export declare class IntegrationSetupCancelledError extends Error {
43
+ readonly reportPath: string | undefined;
44
+ name: string;
45
+ constructor(reportPath: string | undefined);
46
+ }
47
+ export declare function downloadIntegrationBinary(download: IntegrationDownloadV1, fetchImpl: typeof fetch, signal?: AbortSignal): Promise<Uint8Array>;
48
+ export declare function verifySelectedBinary(plan: IntegrationSetupPlanV1, item: IntegrationPlanItemV1, command: IntegrationCommandV1): Promise<void>;
49
+ export declare function applyIntegrationSetup(supplied: IntegrationSetupPlanV1, deps?: IntegrationSetupDepsV1): Promise<IntegrationSetupReportV1>;
50
+ //# sourceMappingURL=integrations-apply.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrations-apply.d.ts","sourceRoot":"","sources":["../../../src/commands/init/integrations-apply.ts"],"names":[],"mappings":"AAMA,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,kCAAkC,CAAC;AAU1C,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC5B,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sFAAsF;IACtF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAA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