@depup/angular__cli 21.2.1-depup.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 (364) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +36 -0
  3. package/bin/bootstrap.js +33 -0
  4. package/bin/ng.js +71 -0
  5. package/bin/package.json +3 -0
  6. package/changes.json +30 -0
  7. package/lib/cli/index.d.ts +11 -0
  8. package/lib/cli/index.js +109 -0
  9. package/lib/cli/index.js.map +1 -0
  10. package/lib/code-examples.db +0 -0
  11. package/lib/config/schema.json +6150 -0
  12. package/lib/config/workspace-schema.d.ts +1025 -0
  13. package/lib/config/workspace-schema.js +133 -0
  14. package/lib/config/workspace-schema.js.map +1 -0
  15. package/lib/init.d.ts +8 -0
  16. package/lib/init.js +162 -0
  17. package/lib/init.js.map +1 -0
  18. package/package.json +103 -0
  19. package/src/analytics/analytics-collector.d.ts +35 -0
  20. package/src/analytics/analytics-collector.js +195 -0
  21. package/src/analytics/analytics-collector.js.map +1 -0
  22. package/src/analytics/analytics-parameters.d.ts +101 -0
  23. package/src/analytics/analytics-parameters.js +107 -0
  24. package/src/analytics/analytics-parameters.js.map +1 -0
  25. package/src/analytics/analytics.d.ts +27 -0
  26. package/src/analytics/analytics.js +183 -0
  27. package/src/analytics/analytics.js.map +1 -0
  28. package/src/command-builder/architect-base-command-module.d.ts +30 -0
  29. package/src/command-builder/architect-base-command-module.js +244 -0
  30. package/src/command-builder/architect-base-command-module.js.map +1 -0
  31. package/src/command-builder/architect-command-module.d.ts +28 -0
  32. package/src/command-builder/architect-command-module.js +218 -0
  33. package/src/command-builder/architect-command-module.js.map +1 -0
  34. package/src/command-builder/command-module.d.ts +73 -0
  35. package/src/command-builder/command-module.js +245 -0
  36. package/src/command-builder/command-module.js.map +1 -0
  37. package/src/command-builder/command-runner.d.ts +9 -0
  38. package/src/command-builder/command-runner.js +195 -0
  39. package/src/command-builder/command-runner.js.map +1 -0
  40. package/src/command-builder/definitions.d.ts +41 -0
  41. package/src/command-builder/definitions.js +20 -0
  42. package/src/command-builder/definitions.js.map +1 -0
  43. package/src/command-builder/schematics-command-module.d.ts +41 -0
  44. package/src/command-builder/schematics-command-module.js +408 -0
  45. package/src/command-builder/schematics-command-module.js.map +1 -0
  46. package/src/command-builder/utilities/command.d.ts +13 -0
  47. package/src/command-builder/utilities/command.js +39 -0
  48. package/src/command-builder/utilities/command.js.map +1 -0
  49. package/src/command-builder/utilities/json-help.d.ts +37 -0
  50. package/src/command-builder/utilities/json-help.js +92 -0
  51. package/src/command-builder/utilities/json-help.js.map +1 -0
  52. package/src/command-builder/utilities/json-schema.d.ts +64 -0
  53. package/src/command-builder/utilities/json-schema.js +349 -0
  54. package/src/command-builder/utilities/json-schema.js.map +1 -0
  55. package/src/command-builder/utilities/normalize-options-middleware.d.ts +18 -0
  56. package/src/command-builder/utilities/normalize-options-middleware.js +37 -0
  57. package/src/command-builder/utilities/normalize-options-middleware.js.map +1 -0
  58. package/src/command-builder/utilities/schematic-engine-host.d.ts +15 -0
  59. package/src/command-builder/utilities/schematic-engine-host.js +179 -0
  60. package/src/command-builder/utilities/schematic-engine-host.js.map +1 -0
  61. package/src/command-builder/utilities/schematic-workflow.d.ts +14 -0
  62. package/src/command-builder/utilities/schematic-workflow.js +70 -0
  63. package/src/command-builder/utilities/schematic-workflow.js.map +1 -0
  64. package/src/commands/add/cli.d.ts +38 -0
  65. package/src/commands/add/cli.js +623 -0
  66. package/src/commands/add/cli.js.map +1 -0
  67. package/src/commands/add/long-description.md +7 -0
  68. package/src/commands/analytics/cli.d.ts +16 -0
  69. package/src/commands/analytics/cli.js +34 -0
  70. package/src/commands/analytics/cli.js.map +1 -0
  71. package/src/commands/analytics/info/cli.d.ts +16 -0
  72. package/src/commands/analytics/info/cli.js +25 -0
  73. package/src/commands/analytics/info/cli.js.map +1 -0
  74. package/src/commands/analytics/long-description.md +20 -0
  75. package/src/commands/analytics/settings/cli.d.ts +35 -0
  76. package/src/commands/analytics/settings/cli.js +54 -0
  77. package/src/commands/analytics/settings/cli.js.map +1 -0
  78. package/src/commands/build/cli.d.ts +16 -0
  79. package/src/commands/build/cli.js +21 -0
  80. package/src/commands/build/cli.js.map +1 -0
  81. package/src/commands/build/long-description.md +18 -0
  82. package/src/commands/cache/clean/cli.d.ts +17 -0
  83. package/src/commands/cache/clean/cli.js +32 -0
  84. package/src/commands/cache/clean/cli.js.map +1 -0
  85. package/src/commands/cache/cli.d.ts +17 -0
  86. package/src/commands/cache/cli.js +36 -0
  87. package/src/commands/cache/cli.js.map +1 -0
  88. package/src/commands/cache/info/cli.d.ts +20 -0
  89. package/src/commands/cache/info/cli.js +139 -0
  90. package/src/commands/cache/info/cli.js.map +1 -0
  91. package/src/commands/cache/long-description.md +53 -0
  92. package/src/commands/cache/settings/cli.d.ts +27 -0
  93. package/src/commands/cache/settings/cli.js +41 -0
  94. package/src/commands/cache/settings/cli.js.map +1 -0
  95. package/src/commands/cache/utilities.d.ts +11 -0
  96. package/src/commands/cache/utilities.js +47 -0
  97. package/src/commands/cache/utilities.js.map +1 -0
  98. package/src/commands/command-config.d.ts +17 -0
  99. package/src/commands/command-config.js +116 -0
  100. package/src/commands/command-config.js.map +1 -0
  101. package/src/commands/completion/cli.d.ts +16 -0
  102. package/src/commands/completion/cli.js +61 -0
  103. package/src/commands/completion/cli.js.map +1 -0
  104. package/src/commands/completion/long-description.md +67 -0
  105. package/src/commands/config/cli.d.ts +24 -0
  106. package/src/commands/config/cli.js +150 -0
  107. package/src/commands/config/cli.js.map +1 -0
  108. package/src/commands/config/long-description.md +13 -0
  109. package/src/commands/deploy/cli.d.ts +17 -0
  110. package/src/commands/deploy/cli.js +38 -0
  111. package/src/commands/deploy/cli.js.map +1 -0
  112. package/src/commands/deploy/long-description.md +22 -0
  113. package/src/commands/e2e/cli.d.ts +18 -0
  114. package/src/commands/e2e/cli.js +42 -0
  115. package/src/commands/e2e/cli.js.map +1 -0
  116. package/src/commands/extract-i18n/cli.d.ts +17 -0
  117. package/src/commands/extract-i18n/cli.js +48 -0
  118. package/src/commands/extract-i18n/cli.js.map +1 -0
  119. package/src/commands/generate/cli.d.ts +47 -0
  120. package/src/commands/generate/cli.js +189 -0
  121. package/src/commands/generate/cli.js.map +1 -0
  122. package/src/commands/lint/cli.d.ts +17 -0
  123. package/src/commands/lint/cli.js +25 -0
  124. package/src/commands/lint/cli.js.map +1 -0
  125. package/src/commands/lint/long-description.md +20 -0
  126. package/src/commands/make-this-awesome/cli.d.ts +17 -0
  127. package/src/commands/make-this-awesome/cli.js +36 -0
  128. package/src/commands/make-this-awesome/cli.js.map +1 -0
  129. package/src/commands/mcp/cli.d.ts +20 -0
  130. package/src/commands/mcp/cli.js +74 -0
  131. package/src/commands/mcp/cli.js.map +1 -0
  132. package/src/commands/mcp/constants.d.ts +10 -0
  133. package/src/commands/mcp/constants.js +16 -0
  134. package/src/commands/mcp/constants.js.map +1 -0
  135. package/src/commands/mcp/devserver.d.ts +85 -0
  136. package/src/commands/mcp/devserver.js +112 -0
  137. package/src/commands/mcp/devserver.js.map +1 -0
  138. package/src/commands/mcp/host.d.ts +97 -0
  139. package/src/commands/mcp/host.js +118 -0
  140. package/src/commands/mcp/host.js.map +1 -0
  141. package/src/commands/mcp/mcp-server.d.ts +192 -0
  142. package/src/commands/mcp/mcp-server.js +155 -0
  143. package/src/commands/mcp/mcp-server.js.map +1 -0
  144. package/src/commands/mcp/resources/ai-tutor.md +824 -0
  145. package/src/commands/mcp/resources/best-practices.md +54 -0
  146. package/src/commands/mcp/resources/instructions.d.ts +9 -0
  147. package/src/commands/mcp/resources/instructions.js +26 -0
  148. package/src/commands/mcp/resources/instructions.js.map +1 -0
  149. package/src/commands/mcp/shared-options.d.ts +12 -0
  150. package/src/commands/mcp/shared-options.js +22 -0
  151. package/src/commands/mcp/shared-options.js.map +1 -0
  152. package/src/commands/mcp/tools/ai-tutor.d.ts +12 -0
  153. package/src/commands/mcp/tools/ai-tutor.js +59 -0
  154. package/src/commands/mcp/tools/ai-tutor.js.map +1 -0
  155. package/src/commands/mcp/tools/best-practices.d.ts +13 -0
  156. package/src/commands/mcp/tools/best-practices.js +187 -0
  157. package/src/commands/mcp/tools/best-practices.js.map +1 -0
  158. package/src/commands/mcp/tools/build.d.ts +37 -0
  159. package/src/commands/mcp/tools/build.js +89 -0
  160. package/src/commands/mcp/tools/build.js.map +1 -0
  161. package/src/commands/mcp/tools/devserver/devserver-start.d.ts +31 -0
  162. package/src/commands/mcp/tools/devserver/devserver-start.js +91 -0
  163. package/src/commands/mcp/tools/devserver/devserver-start.js.map +1 -0
  164. package/src/commands/mcp/tools/devserver/devserver-stop.d.ts +31 -0
  165. package/src/commands/mcp/tools/devserver/devserver-stop.js +68 -0
  166. package/src/commands/mcp/tools/devserver/devserver-stop.js.map +1 -0
  167. package/src/commands/mcp/tools/devserver/devserver-wait-for-build.d.ts +41 -0
  168. package/src/commands/mcp/tools/devserver/devserver-wait-for-build.js +104 -0
  169. package/src/commands/mcp/tools/devserver/devserver-wait-for-build.js.map +1 -0
  170. package/src/commands/mcp/tools/doc-search.d.ts +21 -0
  171. package/src/commands/mcp/tools/doc-search.js +324 -0
  172. package/src/commands/mcp/tools/doc-search.js.map +1 -0
  173. package/src/commands/mcp/tools/e2e.d.ts +44 -0
  174. package/src/commands/mcp/tools/e2e.js +87 -0
  175. package/src/commands/mcp/tools/e2e.js.map +1 -0
  176. package/src/commands/mcp/tools/examples/database-discovery.d.ts +34 -0
  177. package/src/commands/mcp/tools/examples/database-discovery.js +87 -0
  178. package/src/commands/mcp/tools/examples/database-discovery.js.map +1 -0
  179. package/src/commands/mcp/tools/examples/database.d.ts +35 -0
  180. package/src/commands/mcp/tools/examples/database.js +125 -0
  181. package/src/commands/mcp/tools/examples/database.js.map +1 -0
  182. package/src/commands/mcp/tools/examples/index.d.ts +26 -0
  183. package/src/commands/mcp/tools/examples/index.js +149 -0
  184. package/src/commands/mcp/tools/examples/index.js.map +1 -0
  185. package/src/commands/mcp/tools/examples/query-escaper.d.ts +20 -0
  186. package/src/commands/mcp/tools/examples/query-escaper.js +68 -0
  187. package/src/commands/mcp/tools/examples/query-escaper.js.map +1 -0
  188. package/src/commands/mcp/tools/examples/runtime-database.d.ts +10 -0
  189. package/src/commands/mcp/tools/examples/runtime-database.js +192 -0
  190. package/src/commands/mcp/tools/examples/runtime-database.js.map +1 -0
  191. package/src/commands/mcp/tools/examples/schemas.d.ts +29 -0
  192. package/src/commands/mcp/tools/examples/schemas.js +101 -0
  193. package/src/commands/mcp/tools/examples/schemas.js.map +1 -0
  194. package/src/commands/mcp/tools/examples/utils.d.ts +14 -0
  195. package/src/commands/mcp/tools/examples/utils.js +31 -0
  196. package/src/commands/mcp/tools/examples/utils.js.map +1 -0
  197. package/src/commands/mcp/tools/modernize.d.ts +43 -0
  198. package/src/commands/mcp/tools/modernize.js +165 -0
  199. package/src/commands/mcp/tools/modernize.js.map +1 -0
  200. package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.d.ts +17 -0
  201. package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.js +62 -0
  202. package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.js.map +1 -0
  203. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.d.ts +12 -0
  204. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.js +73 -0
  205. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.js.map +1 -0
  206. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.d.ts +11 -0
  207. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.js +60 -0
  208. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.js.map +1 -0
  209. package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.d.ts +15 -0
  210. package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.js +238 -0
  211. package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.js.map +1 -0
  212. package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.d.ts +10 -0
  213. package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.js +20 -0
  214. package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.js.map +1 -0
  215. package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.d.ts +35 -0
  216. package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.js +136 -0
  217. package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.js.map +1 -0
  218. package/src/commands/mcp/tools/onpush-zoneless-migration/types.d.ts +13 -0
  219. package/src/commands/mcp/tools/onpush-zoneless-migration/types.js +10 -0
  220. package/src/commands/mcp/tools/onpush-zoneless-migration/types.js.map +1 -0
  221. package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.d.ts +16 -0
  222. package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.js +224 -0
  223. package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.js.map +1 -0
  224. package/src/commands/mcp/tools/projects.d.ts +47 -0
  225. package/src/commands/mcp/tools/projects.js +523 -0
  226. package/src/commands/mcp/tools/projects.js.map +1 -0
  227. package/src/commands/mcp/tools/test.d.ts +35 -0
  228. package/src/commands/mcp/tools/test.js +79 -0
  229. package/src/commands/mcp/tools/test.js.map +1 -0
  230. package/src/commands/mcp/tools/tool-registry.d.ts +39 -0
  231. package/src/commands/mcp/tools/tool-registry.js +35 -0
  232. package/src/commands/mcp/tools/tool-registry.js.map +1 -0
  233. package/src/commands/mcp/utils.d.ts +25 -0
  234. package/src/commands/mcp/utils.js +44 -0
  235. package/src/commands/mcp/utils.js.map +1 -0
  236. package/src/commands/mcp/workspace-utils.d.ts +53 -0
  237. package/src/commands/mcp/workspace-utils.js +138 -0
  238. package/src/commands/mcp/workspace-utils.js.map +1 -0
  239. package/src/commands/new/cli.d.ts +27 -0
  240. package/src/commands/new/cli.js +76 -0
  241. package/src/commands/new/cli.js.map +1 -0
  242. package/src/commands/new/long-description.md +15 -0
  243. package/src/commands/run/cli.d.ts +25 -0
  244. package/src/commands/run/cli.js +89 -0
  245. package/src/commands/run/cli.js.map +1 -0
  246. package/src/commands/run/long-description.md +10 -0
  247. package/src/commands/serve/cli.d.ts +16 -0
  248. package/src/commands/serve/cli.js +20 -0
  249. package/src/commands/serve/cli.js.map +1 -0
  250. package/src/commands/test/cli.d.ts +16 -0
  251. package/src/commands/test/cli.js +21 -0
  252. package/src/commands/test/cli.js.map +1 -0
  253. package/src/commands/test/long-description.md +2 -0
  254. package/src/commands/update/cli.d.ts +34 -0
  255. package/src/commands/update/cli.js +531 -0
  256. package/src/commands/update/cli.js.map +1 -0
  257. package/src/commands/update/long-description.md +22 -0
  258. package/src/commands/update/schematic/collection.json +9 -0
  259. package/src/commands/update/schematic/index.d.ts +11 -0
  260. package/src/commands/update/schematic/index.js +715 -0
  261. package/src/commands/update/schematic/index.js.map +1 -0
  262. package/src/commands/update/schematic/schema.d.ts +51 -0
  263. package/src/commands/update/schematic/schema.js +16 -0
  264. package/src/commands/update/schematic/schema.js.map +1 -0
  265. package/src/commands/update/schematic/schema.json +64 -0
  266. package/src/commands/update/utilities/cli-version.d.ts +48 -0
  267. package/src/commands/update/utilities/cli-version.js +196 -0
  268. package/src/commands/update/utilities/cli-version.js.map +1 -0
  269. package/src/commands/update/utilities/constants.d.ts +12 -0
  270. package/src/commands/update/utilities/constants.js +16 -0
  271. package/src/commands/update/utilities/constants.js.map +1 -0
  272. package/src/commands/update/utilities/git.d.ts +36 -0
  273. package/src/commands/update/utilities/git.js +148 -0
  274. package/src/commands/update/utilities/git.js.map +1 -0
  275. package/src/commands/update/utilities/migration.d.ts +32 -0
  276. package/src/commands/update/utilities/migration.js +267 -0
  277. package/src/commands/update/utilities/migration.js.map +1 -0
  278. package/src/commands/version/cli.d.ts +36 -0
  279. package/src/commands/version/cli.js +117 -0
  280. package/src/commands/version/cli.js.map +1 -0
  281. package/src/commands/version/version-info.d.ts +46 -0
  282. package/src/commands/version/version-info.js +107 -0
  283. package/src/commands/version/version-info.js.map +1 -0
  284. package/src/package-managers/discovery.d.ts +23 -0
  285. package/src/package-managers/discovery.js +104 -0
  286. package/src/package-managers/discovery.js.map +1 -0
  287. package/src/package-managers/error.d.ts +43 -0
  288. package/src/package-managers/error.js +41 -0
  289. package/src/package-managers/error.js.map +1 -0
  290. package/src/package-managers/factory.d.ts +30 -0
  291. package/src/package-managers/factory.js +137 -0
  292. package/src/package-managers/factory.js.map +1 -0
  293. package/src/package-managers/host.d.ts +86 -0
  294. package/src/package-managers/host.js +80 -0
  295. package/src/package-managers/host.js.map +1 -0
  296. package/src/package-managers/index.d.ts +13 -0
  297. package/src/package-managers/index.js +17 -0
  298. package/src/package-managers/index.js.map +1 -0
  299. package/src/package-managers/logger.d.ts +27 -0
  300. package/src/package-managers/logger.js +10 -0
  301. package/src/package-managers/logger.js.map +1 -0
  302. package/src/package-managers/package-manager-descriptor.d.ts +245 -0
  303. package/src/package-managers/package-manager-descriptor.js +175 -0
  304. package/src/package-managers/package-manager-descriptor.js.map +1 -0
  305. package/src/package-managers/package-manager.d.ts +191 -0
  306. package/src/package-managers/package-manager.js +496 -0
  307. package/src/package-managers/package-manager.js.map +1 -0
  308. package/src/package-managers/package-metadata.d.ts +91 -0
  309. package/src/package-managers/package-metadata.js +10 -0
  310. package/src/package-managers/package-metadata.js.map +1 -0
  311. package/src/package-managers/package-tree.d.ts +23 -0
  312. package/src/package-managers/package-tree.js +10 -0
  313. package/src/package-managers/package-tree.js.map +1 -0
  314. package/src/package-managers/parsers.d.ts +170 -0
  315. package/src/package-managers/parsers.js +467 -0
  316. package/src/package-managers/parsers.js.map +1 -0
  317. package/src/utilities/color.d.ts +9 -0
  318. package/src/utilities/color.js +28 -0
  319. package/src/utilities/color.js.map +1 -0
  320. package/src/utilities/completion.d.ts +30 -0
  321. package/src/utilities/completion.js +270 -0
  322. package/src/utilities/completion.js.map +1 -0
  323. package/src/utilities/config.d.ts +38 -0
  324. package/src/utilities/config.js +369 -0
  325. package/src/utilities/config.js.map +1 -0
  326. package/src/utilities/environment-options.d.ts +25 -0
  327. package/src/utilities/environment-options.js +60 -0
  328. package/src/utilities/environment-options.js.map +1 -0
  329. package/src/utilities/eol.d.ts +20 -0
  330. package/src/utilities/eol.js +35 -0
  331. package/src/utilities/eol.js.map +1 -0
  332. package/src/utilities/error.d.ts +18 -0
  333. package/src/utilities/error.js +41 -0
  334. package/src/utilities/error.js.map +1 -0
  335. package/src/utilities/find-up.d.ts +21 -0
  336. package/src/utilities/find-up.js +67 -0
  337. package/src/utilities/find-up.js.map +1 -0
  338. package/src/utilities/json-file.d.ts +24 -0
  339. package/src/utilities/json-file.js +179 -0
  340. package/src/utilities/json-file.js.map +1 -0
  341. package/src/utilities/log-file.d.ts +13 -0
  342. package/src/utilities/log-file.js +28 -0
  343. package/src/utilities/log-file.js.map +1 -0
  344. package/src/utilities/memoize.d.ts +15 -0
  345. package/src/utilities/memoize.js +64 -0
  346. package/src/utilities/memoize.js.map +1 -0
  347. package/src/utilities/package-metadata.d.ts +58 -0
  348. package/src/utilities/package-metadata.js +265 -0
  349. package/src/utilities/package-metadata.js.map +1 -0
  350. package/src/utilities/prettier.d.ts +13 -0
  351. package/src/utilities/prettier.js +46 -0
  352. package/src/utilities/prettier.js.map +1 -0
  353. package/src/utilities/project.d.ts +8 -0
  354. package/src/utilities/project.js +81 -0
  355. package/src/utilities/project.js.map +1 -0
  356. package/src/utilities/prompt.d.ts +17 -0
  357. package/src/utilities/prompt.js +90 -0
  358. package/src/utilities/prompt.js.map +1 -0
  359. package/src/utilities/tty.d.ts +16 -0
  360. package/src/utilities/tty.js +23 -0
  361. package/src/utilities/tty.js.map +1 -0
  362. package/src/utilities/version.d.ts +16 -0
  363. package/src/utilities/version.js +26 -0
  364. package/src/utilities/version.js.map +1 -0
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ export declare const k1 = "@angular/cli";
9
+ export declare const at = "gv2tkIHTOiWtI6Su96LXLQ==";
10
+ export declare const iv: Buffer<ArrayBuffer>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.dev/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.iv = exports.at = exports.k1 = void 0;
11
+ exports.k1 = '@angular/cli';
12
+ exports.at = 'gv2tkIHTOiWtI6Su96LXLQ==';
13
+ exports.iv = Buffer.from([
14
+ 0x97, 0xf4, 0x62, 0x95, 0x3e, 0x12, 0x76, 0x84, 0x8a, 0x09, 0x4a, 0xc9, 0xeb, 0xa2, 0x84, 0x69,
15
+ ]);
16
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["constants.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEU,QAAA,EAAE,GAAG,cAAc,CAAC;AACpB,QAAA,EAAE,GAAG,0BAA0B,CAAC;AAChC,QAAA,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC;IAC5B,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;CAC/F,CAAC,CAAC"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ import type { Host } from './host';
9
+ export type BuildStatus = 'success' | 'failure' | 'unknown';
10
+ /**
11
+ * An Angular development server managed by the MCP server.
12
+ */
13
+ export interface Devserver {
14
+ /**
15
+ * Launches the dev server and returns immediately.
16
+ *
17
+ * Throws if this server is already running.
18
+ */
19
+ start(): void;
20
+ /**
21
+ * If the dev server is running, stops it.
22
+ */
23
+ stop(): void;
24
+ /**
25
+ * Gets all the server logs so far (stdout + stderr).
26
+ */
27
+ getServerLogs(): string[];
28
+ /**
29
+ * Gets all the server logs from the latest build.
30
+ */
31
+ getMostRecentBuild(): {
32
+ status: BuildStatus;
33
+ logs: string[];
34
+ };
35
+ /**
36
+ * Whether the dev server is currently being built, or is awaiting further changes.
37
+ */
38
+ isBuilding(): boolean;
39
+ /**
40
+ * `ng serve` port to use.
41
+ */
42
+ port: number;
43
+ /**
44
+ * The workspace path for this server.
45
+ */
46
+ workspacePath: string;
47
+ /**
48
+ * The project name for this server.
49
+ */
50
+ project: string;
51
+ }
52
+ /**
53
+ * A local Angular development server managed by the MCP server.
54
+ */
55
+ export declare class LocalDevserver implements Devserver {
56
+ readonly host: Host;
57
+ readonly port: number;
58
+ readonly workspacePath: string;
59
+ readonly project: string;
60
+ private devserverProcess;
61
+ private serverLogs;
62
+ private buildInProgress;
63
+ private latestBuildLogStartIndex?;
64
+ private latestBuildStatus;
65
+ constructor({ host, port, workspacePath, project, }: {
66
+ host: Host;
67
+ port: number;
68
+ workspacePath: string;
69
+ project: string;
70
+ });
71
+ start(): void;
72
+ private addLog;
73
+ stop(): void;
74
+ getServerLogs(): string[];
75
+ getMostRecentBuild(): {
76
+ status: BuildStatus;
77
+ logs: string[];
78
+ };
79
+ isBuilding(): boolean;
80
+ }
81
+ export declare function getDevserverKey(workspacePath: string, projectName: string): string;
82
+ export declare function createDevServerNotFoundError(devservers: Map<string, {
83
+ project: string;
84
+ workspacePath: string;
85
+ }>): Error;
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.dev/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.LocalDevserver = void 0;
11
+ exports.getDevserverKey = getDevserverKey;
12
+ exports.createDevServerNotFoundError = createDevServerNotFoundError;
13
+ // Log messages that we want to catch to identify the build status.
14
+ const BUILD_SUCCEEDED_MESSAGE = 'Application bundle generation complete.';
15
+ const BUILD_FAILED_MESSAGE = 'Application bundle generation failed.';
16
+ const WAITING_FOR_CHANGES_MESSAGE = 'Watch mode enabled. Watching for file changes...';
17
+ const CHANGES_DETECTED_START_MESSAGE = '❯ Changes detected. Rebuilding...';
18
+ const CHANGES_DETECTED_SUCCESS_MESSAGE = '✔ Changes detected. Rebuilding...';
19
+ const BUILD_START_MESSAGES = [CHANGES_DETECTED_START_MESSAGE];
20
+ const BUILD_END_MESSAGES = [
21
+ BUILD_SUCCEEDED_MESSAGE,
22
+ BUILD_FAILED_MESSAGE,
23
+ WAITING_FOR_CHANGES_MESSAGE,
24
+ CHANGES_DETECTED_SUCCESS_MESSAGE,
25
+ ];
26
+ /**
27
+ * A local Angular development server managed by the MCP server.
28
+ */
29
+ class LocalDevserver {
30
+ host;
31
+ port;
32
+ workspacePath;
33
+ project;
34
+ devserverProcess = null;
35
+ serverLogs = [];
36
+ buildInProgress = false;
37
+ latestBuildLogStartIndex = undefined;
38
+ latestBuildStatus = 'unknown';
39
+ constructor({ host, port, workspacePath, project, }) {
40
+ this.host = host;
41
+ this.port = port;
42
+ this.workspacePath = workspacePath;
43
+ this.project = project;
44
+ }
45
+ start() {
46
+ if (this.devserverProcess) {
47
+ throw Error('Dev server already started.');
48
+ }
49
+ const args = ['serve'];
50
+ if (this.project) {
51
+ args.push(this.project);
52
+ }
53
+ args.push(`--port=${this.port}`);
54
+ this.devserverProcess = this.host.spawn('ng', args, {
55
+ stdio: 'pipe',
56
+ cwd: this.workspacePath,
57
+ });
58
+ this.devserverProcess.stdout?.on('data', (data) => {
59
+ this.addLog(data.toString());
60
+ });
61
+ this.devserverProcess.stderr?.on('data', (data) => {
62
+ this.addLog(data.toString());
63
+ });
64
+ this.devserverProcess.stderr?.on('close', () => {
65
+ this.stop();
66
+ });
67
+ this.buildInProgress = true;
68
+ }
69
+ addLog(log) {
70
+ this.serverLogs.push(log);
71
+ if (BUILD_START_MESSAGES.some((message) => log.startsWith(message))) {
72
+ this.buildInProgress = true;
73
+ this.latestBuildLogStartIndex = this.serverLogs.length - 1;
74
+ }
75
+ else if (BUILD_END_MESSAGES.some((message) => log.startsWith(message))) {
76
+ this.buildInProgress = false;
77
+ // We consider everything except a specific failure message to be a success.
78
+ this.latestBuildStatus = log.startsWith(BUILD_FAILED_MESSAGE) ? 'failure' : 'success';
79
+ }
80
+ }
81
+ stop() {
82
+ this.devserverProcess?.kill();
83
+ this.devserverProcess = null;
84
+ }
85
+ getServerLogs() {
86
+ return [...this.serverLogs];
87
+ }
88
+ getMostRecentBuild() {
89
+ return {
90
+ status: this.latestBuildStatus,
91
+ logs: this.serverLogs.slice(this.latestBuildLogStartIndex),
92
+ };
93
+ }
94
+ isBuilding() {
95
+ return this.buildInProgress;
96
+ }
97
+ }
98
+ exports.LocalDevserver = LocalDevserver;
99
+ function getDevserverKey(workspacePath, projectName) {
100
+ return `${workspacePath}:${projectName}`;
101
+ }
102
+ function createDevServerNotFoundError(devservers) {
103
+ if (devservers.size === 0) {
104
+ return new Error('No development servers are currently running.');
105
+ }
106
+ const runningServers = Array.from(devservers.values())
107
+ .map((server) => `- Project '${server.project}' in workspace path '${server.workspacePath}'`)
108
+ .join('\n');
109
+ return new Error(`Dev server not found. Currently running servers:\n${runningServers}\n` +
110
+ 'Please provide the correct workspace and project arguments.');
111
+ }
112
+ //# sourceMappingURL=devserver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devserver.js","sourceRoot":"","sources":["devserver.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAoKH,0CAEC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+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ import { ChildProcess } from 'node:child_process';
9
+ import { Stats } from 'node:fs';
10
+ /**
11
+ * An error thrown when a command fails to execute.
12
+ */
13
+ export declare class CommandError extends Error {
14
+ readonly logs: string[];
15
+ readonly code: number | null;
16
+ constructor(message: string, logs: string[], code: number | null);
17
+ }
18
+ /**
19
+ * An abstraction layer for operating-system or file-system operations.
20
+ */
21
+ export interface Host {
22
+ /**
23
+ * Gets the stats of a file or directory.
24
+ * @param path The path to the file or directory.
25
+ * @returns A promise that resolves to the stats.
26
+ */
27
+ stat(path: string): Promise<Stats>;
28
+ /**
29
+ * Checks if a path exists on the file system.
30
+ * @param path The path to check.
31
+ * @returns A boolean indicating whether the path exists.
32
+ */
33
+ existsSync(path: string): boolean;
34
+ /**
35
+ * Reads a file and returns its content.
36
+ * @param path The path to the file.
37
+ * @param encoding The encoding to use.
38
+ * @returns A promise that resolves to the file content.
39
+ */
40
+ readFile(path: string, encoding: 'utf-8'): Promise<string>;
41
+ /**
42
+ * Finds files matching a glob pattern.
43
+ * @param pattern The glob pattern.
44
+ * @param options Options for the glob search.
45
+ * @returns An async iterable of file entries.
46
+ */
47
+ glob(pattern: string, options: {
48
+ cwd: string;
49
+ }): AsyncIterable<{
50
+ name: string;
51
+ parentPath: string;
52
+ isFile(): boolean;
53
+ }>;
54
+ /**
55
+ * Resolves a module request from a given path.
56
+ * @param request The module request to resolve.
57
+ * @param from The path from which to resolve the request.
58
+ * @returns The resolved module path.
59
+ */
60
+ resolveModule(request: string, from: string): string;
61
+ /**
62
+ * Spawns a child process and returns a promise that resolves with the process's
63
+ * output or rejects with a structured error.
64
+ * @param command The command to run.
65
+ * @param args The arguments to pass to the command.
66
+ * @param options Options for the child process.
67
+ * @returns A promise that resolves with the standard output and standard error of the command.
68
+ */
69
+ runCommand(command: string, args: readonly string[], options?: {
70
+ timeout?: number;
71
+ stdio?: 'pipe' | 'ignore';
72
+ cwd?: string;
73
+ env?: Record<string, string>;
74
+ }): Promise<{
75
+ logs: string[];
76
+ }>;
77
+ /**
78
+ * Spawns a long-running child process and returns the `ChildProcess` object.
79
+ * @param command The command to run.
80
+ * @param args The arguments to pass to the command.
81
+ * @param options Options for the child process.
82
+ * @returns The spawned `ChildProcess` instance.
83
+ */
84
+ spawn(command: string, args: readonly string[], options?: {
85
+ stdio?: 'pipe' | 'ignore';
86
+ cwd?: string;
87
+ env?: Record<string, string>;
88
+ }): ChildProcess;
89
+ /**
90
+ * Finds an available TCP port on the system.
91
+ */
92
+ getAvailablePort(): Promise<number>;
93
+ }
94
+ /**
95
+ * A concrete implementation of the `Host` interface that runs on a local workspace.
96
+ */
97
+ export declare const LocalWorkspaceHost: Host;
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.dev/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.LocalWorkspaceHost = exports.CommandError = void 0;
11
+ /**
12
+ * @fileoverview
13
+ * This file defines an abstraction layer for operating-system or file-system operations, such as
14
+ * command execution. This allows for easier testing by enabling the injection of mock or
15
+ * test-specific implementations.
16
+ */
17
+ const fs_1 = require("fs");
18
+ const node_child_process_1 = require("node:child_process");
19
+ const promises_1 = require("node:fs/promises");
20
+ const node_module_1 = require("node:module");
21
+ const node_net_1 = require("node:net");
22
+ /**
23
+ * An error thrown when a command fails to execute.
24
+ */
25
+ class CommandError extends Error {
26
+ logs;
27
+ code;
28
+ constructor(message, logs, code) {
29
+ super(message);
30
+ this.logs = logs;
31
+ this.code = code;
32
+ }
33
+ }
34
+ exports.CommandError = CommandError;
35
+ /**
36
+ * A concrete implementation of the `Host` interface that runs on a local workspace.
37
+ */
38
+ exports.LocalWorkspaceHost = {
39
+ stat: promises_1.stat,
40
+ existsSync: fs_1.existsSync,
41
+ readFile: promises_1.readFile,
42
+ glob: function (pattern, options) {
43
+ return (0, promises_1.glob)(pattern, { ...options, withFileTypes: true });
44
+ },
45
+ resolveModule(request, from) {
46
+ return (0, node_module_1.createRequire)(from).resolve(request);
47
+ },
48
+ runCommand: async (command, args, options = {}) => {
49
+ const signal = options.timeout ? AbortSignal.timeout(options.timeout) : undefined;
50
+ return new Promise((resolve, reject) => {
51
+ const childProcess = (0, node_child_process_1.spawn)(command, args, {
52
+ shell: false,
53
+ stdio: options.stdio ?? 'pipe',
54
+ signal,
55
+ cwd: options.cwd,
56
+ env: {
57
+ ...process.env,
58
+ ...options.env,
59
+ },
60
+ });
61
+ const logs = [];
62
+ childProcess.stdout?.on('data', (data) => logs.push(data.toString()));
63
+ childProcess.stderr?.on('data', (data) => logs.push(data.toString()));
64
+ childProcess.on('close', (code) => {
65
+ if (code === 0) {
66
+ resolve({ logs });
67
+ }
68
+ else {
69
+ const message = `Process exited with code ${code}.`;
70
+ reject(new CommandError(message, logs, code));
71
+ }
72
+ });
73
+ childProcess.on('error', (err) => {
74
+ if (err.name === 'AbortError') {
75
+ const message = `Process timed out.`;
76
+ reject(new CommandError(message, logs, null));
77
+ return;
78
+ }
79
+ const message = `Process failed with error: ${err.message}`;
80
+ reject(new CommandError(message, logs, null));
81
+ });
82
+ });
83
+ },
84
+ spawn(command, args, options = {}) {
85
+ return (0, node_child_process_1.spawn)(command, args, {
86
+ shell: false,
87
+ stdio: options.stdio ?? 'pipe',
88
+ cwd: options.cwd,
89
+ env: {
90
+ ...process.env,
91
+ ...options.env,
92
+ },
93
+ });
94
+ },
95
+ getAvailablePort() {
96
+ return new Promise((resolve, reject) => {
97
+ // Create a new temporary server from Node's net library.
98
+ const server = (0, node_net_1.createServer)();
99
+ server.once('error', (err) => {
100
+ reject(err);
101
+ });
102
+ // Listen on port 0 to let the OS assign an available port.
103
+ server.listen(0, () => {
104
+ const address = server.address();
105
+ // Ensure address is an object with a port property.
106
+ if (address && typeof address === 'object') {
107
+ const port = address.port;
108
+ server.close();
109
+ resolve(port);
110
+ }
111
+ else {
112
+ reject(new Error('Unable to retrieve address information from server.'));
113
+ }
114
+ });
115
+ });
116
+ },
117
+ };
118
+ //# sourceMappingURL=host.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host.js","sourceRoot":"","sources":["host.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH;;;;;GAKG;AAEH,2BAAkD;AAClD,2DAAyD;AAEzD,+CAAoF;AACpF,6CAA4C;AAC5C,uCAAwC;AAExC;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK;IAGnB;IACA;IAHlB,YACE,OAAe,EACC,IAAc,EACd,IAAmB;QAEnC,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,SAAI,GAAJ,IAAI,CAAU;QACd,SAAI,GAAJ,IAAI,CAAe;IAGrC,CAAC;CACF;AARD,oCAQC;AAyFD;;GAEG;AACU,QAAA,kBAAkB,GAAS;IACtC,IAAI,EAAJ,eAAI;IAEJ,UAAU,EAAE,eAAc;IAE1B,QAAQ,EAAE,mBAAY;IAEtB,IAAI,EAAE,UACJ,OAAe,EACf,OAAwB;QAExB,OAAO,IAAA,eAAQ,EAAC,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IAED,aAAa,CAAC,OAAe,EAAE,IAAY;QACzC,OAAO,IAAA,2BAAa,EAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,UAAU,EAAE,KAAK,EACf,OAAe,EACf,IAAuB,EACvB,UAKI,EAAE,EACuB,EAAE;QAC/B,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CA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,CAAC;gBAChB,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC,CAAC;gBAC3E,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
@@ -0,0 +1,192 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
9
+ import type { AngularWorkspace } from '../../utilities/config';
10
+ import { type AnyMcpToolDeclaration } from './tools/tool-registry';
11
+ /**
12
+ * The set of tools that are available but not enabled by default.
13
+ * These tools are considered experimental and may have limitations.
14
+ */
15
+ export declare const EXPERIMENTAL_TOOLS: readonly [import("./tools/tool-registry").McpToolDeclaration<{
16
+ configuration: import("zod").ZodOptional<import("zod").ZodString>;
17
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
18
+ project: import("zod").ZodOptional<import("zod").ZodString>;
19
+ }, {
20
+ status: import("zod").ZodEnum<{
21
+ success: "success";
22
+ failure: "failure";
23
+ }>;
24
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
25
+ path: import("zod").ZodOptional<import("zod").ZodString>;
26
+ }>, import("./tools/tool-registry").McpToolDeclaration<{
27
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
28
+ project: import("zod").ZodOptional<import("zod").ZodString>;
29
+ }, {
30
+ status: import("zod").ZodEnum<{
31
+ success: "success";
32
+ failure: "failure";
33
+ }>;
34
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
35
+ }>, import("./tools/tool-registry").McpToolDeclaration<{
36
+ transformations: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
37
+ [x: string]: string;
38
+ }>>>;
39
+ path: import("zod").ZodOptional<import("zod").ZodString>;
40
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
41
+ project: import("zod").ZodOptional<import("zod").ZodString>;
42
+ }, {
43
+ instructions: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
44
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
45
+ }>, import("./tools/tool-registry").McpToolDeclaration<{
46
+ filter: import("zod").ZodOptional<import("zod").ZodString>;
47
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
48
+ project: import("zod").ZodOptional<import("zod").ZodString>;
49
+ }, {
50
+ status: import("zod").ZodEnum<{
51
+ success: "success";
52
+ failure: "failure";
53
+ }>;
54
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
55
+ }>, ...(import("./tools/tool-registry").McpToolDeclaration<{
56
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
57
+ project: import("zod").ZodOptional<import("zod").ZodString>;
58
+ }, {
59
+ message: import("zod").ZodString;
60
+ address: import("zod").ZodOptional<import("zod").ZodString>;
61
+ }> | import("./tools/tool-registry").McpToolDeclaration<{
62
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
63
+ project: import("zod").ZodOptional<import("zod").ZodString>;
64
+ }, {
65
+ message: import("zod").ZodString;
66
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
67
+ }> | import("./tools/tool-registry").McpToolDeclaration<{
68
+ timeout: import("zod").ZodDefault<import("zod").ZodNumber>;
69
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
70
+ project: import("zod").ZodOptional<import("zod").ZodString>;
71
+ }, {
72
+ status: import("zod").ZodEnum<{
73
+ success: "success";
74
+ timeout: "timeout";
75
+ failure: "failure";
76
+ unknown: "unknown";
77
+ }>;
78
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
79
+ }>)[]];
80
+ /**
81
+ * Experimental tools that are grouped together under a single name.
82
+ *
83
+ * Used for enabling them as a group.
84
+ */
85
+ export declare const EXPERIMENTAL_TOOL_GROUPS: {
86
+ all: readonly [import("./tools/tool-registry").McpToolDeclaration<{
87
+ configuration: import("zod").ZodOptional<import("zod").ZodString>;
88
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
89
+ project: import("zod").ZodOptional<import("zod").ZodString>;
90
+ }, {
91
+ status: import("zod").ZodEnum<{
92
+ success: "success";
93
+ failure: "failure";
94
+ }>;
95
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
96
+ path: import("zod").ZodOptional<import("zod").ZodString>;
97
+ }>, import("./tools/tool-registry").McpToolDeclaration<{
98
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
99
+ project: import("zod").ZodOptional<import("zod").ZodString>;
100
+ }, {
101
+ status: import("zod").ZodEnum<{
102
+ success: "success";
103
+ failure: "failure";
104
+ }>;
105
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
106
+ }>, import("./tools/tool-registry").McpToolDeclaration<{
107
+ transformations: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
108
+ [x: string]: string;
109
+ }>>>;
110
+ path: import("zod").ZodOptional<import("zod").ZodString>;
111
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
112
+ project: import("zod").ZodOptional<import("zod").ZodString>;
113
+ }, {
114
+ instructions: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
115
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
116
+ }>, import("./tools/tool-registry").McpToolDeclaration<{
117
+ filter: import("zod").ZodOptional<import("zod").ZodString>;
118
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
119
+ project: import("zod").ZodOptional<import("zod").ZodString>;
120
+ }, {
121
+ status: import("zod").ZodEnum<{
122
+ success: "success";
123
+ failure: "failure";
124
+ }>;
125
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
126
+ }>, ...(import("./tools/tool-registry").McpToolDeclaration<{
127
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
128
+ project: import("zod").ZodOptional<import("zod").ZodString>;
129
+ }, {
130
+ message: import("zod").ZodString;
131
+ address: import("zod").ZodOptional<import("zod").ZodString>;
132
+ }> | import("./tools/tool-registry").McpToolDeclaration<{
133
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
134
+ project: import("zod").ZodOptional<import("zod").ZodString>;
135
+ }, {
136
+ message: import("zod").ZodString;
137
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
138
+ }> | import("./tools/tool-registry").McpToolDeclaration<{
139
+ timeout: import("zod").ZodDefault<import("zod").ZodNumber>;
140
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
141
+ project: import("zod").ZodOptional<import("zod").ZodString>;
142
+ }, {
143
+ status: import("zod").ZodEnum<{
144
+ success: "success";
145
+ timeout: "timeout";
146
+ failure: "failure";
147
+ unknown: "unknown";
148
+ }>;
149
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
150
+ }>)[]];
151
+ devserver: (import("./tools/tool-registry").McpToolDeclaration<{
152
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
153
+ project: import("zod").ZodOptional<import("zod").ZodString>;
154
+ }, {
155
+ message: import("zod").ZodString;
156
+ address: import("zod").ZodOptional<import("zod").ZodString>;
157
+ }> | import("./tools/tool-registry").McpToolDeclaration<{
158
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
159
+ project: import("zod").ZodOptional<import("zod").ZodString>;
160
+ }, {
161
+ message: import("zod").ZodString;
162
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
163
+ }> | import("./tools/tool-registry").McpToolDeclaration<{
164
+ timeout: import("zod").ZodDefault<import("zod").ZodNumber>;
165
+ workspace: import("zod").ZodOptional<import("zod").ZodString>;
166
+ project: import("zod").ZodOptional<import("zod").ZodString>;
167
+ }, {
168
+ status: import("zod").ZodEnum<{
169
+ success: "success";
170
+ timeout: "timeout";
171
+ failure: "failure";
172
+ unknown: "unknown";
173
+ }>;
174
+ logs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
175
+ }>)[];
176
+ };
177
+ export declare function createMcpServer(options: {
178
+ workspace?: AngularWorkspace;
179
+ readOnly?: boolean;
180
+ localOnly?: boolean;
181
+ experimentalTools?: string[];
182
+ }, logger: {
183
+ warn(text: string): void;
184
+ }): Promise<McpServer>;
185
+ export declare function assembleToolDeclarations(stableDeclarations: readonly AnyMcpToolDeclaration[], experimentalDeclarations: readonly AnyMcpToolDeclaration[], options: {
186
+ readOnly?: boolean;
187
+ localOnly?: boolean;
188
+ experimentalTools?: string[];
189
+ logger: {
190
+ warn(text: string): void;
191
+ };
192
+ }): AnyMcpToolDeclaration[];