@wootsup/yt-builder-mcp 1.1.6 → 1.1.7

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 (397) hide show
  1. package/dist/auth.d.ts +119 -0
  2. package/dist/auth.d.ts.map +1 -0
  3. package/dist/auth.js +226 -0
  4. package/dist/auth.js.map +1 -0
  5. package/dist/client.d.ts +84 -0
  6. package/dist/client.d.ts.map +1 -0
  7. package/dist/client.js +151 -0
  8. package/dist/client.js.map +1 -0
  9. package/dist/clients/claude-code.d.ts +18 -0
  10. package/dist/clients/claude-code.d.ts.map +1 -0
  11. package/dist/clients/claude-code.js +53 -0
  12. package/dist/clients/claude-code.js.map +1 -0
  13. package/dist/clients/claude-desktop.d.ts +19 -0
  14. package/dist/clients/claude-desktop.d.ts.map +1 -0
  15. package/dist/clients/claude-desktop.js +56 -0
  16. package/dist/clients/claude-desktop.js.map +1 -0
  17. package/dist/clients/cline.d.ts +26 -0
  18. package/dist/clients/cline.d.ts.map +1 -0
  19. package/dist/clients/cline.js +80 -0
  20. package/dist/clients/cline.js.map +1 -0
  21. package/dist/clients/codex-cli.d.ts +42 -0
  22. package/dist/clients/codex-cli.d.ts.map +1 -0
  23. package/dist/clients/codex-cli.js +194 -0
  24. package/dist/clients/codex-cli.js.map +1 -0
  25. package/dist/clients/continue.d.ts +13 -0
  26. package/dist/clients/continue.d.ts.map +1 -0
  27. package/dist/clients/continue.js +52 -0
  28. package/dist/clients/continue.js.map +1 -0
  29. package/dist/clients/cursor.d.ts +12 -0
  30. package/dist/clients/cursor.d.ts.map +1 -0
  31. package/dist/clients/cursor.js +38 -0
  32. package/dist/clients/cursor.js.map +1 -0
  33. package/dist/clients/gemini-cli.d.ts +18 -0
  34. package/dist/clients/gemini-cli.d.ts.map +1 -0
  35. package/dist/clients/gemini-cli.js +44 -0
  36. package/dist/clients/gemini-cli.js.map +1 -0
  37. package/dist/clients/home.d.ts +14 -0
  38. package/dist/clients/home.d.ts.map +1 -0
  39. package/dist/clients/home.js +20 -0
  40. package/dist/clients/home.js.map +1 -0
  41. package/dist/clients/index.d.ts +52 -0
  42. package/dist/clients/index.d.ts.map +1 -0
  43. package/dist/clients/index.js +72 -0
  44. package/dist/clients/index.js.map +1 -0
  45. package/dist/clients/roo-code.d.ts +23 -0
  46. package/dist/clients/roo-code.d.ts.map +1 -0
  47. package/dist/clients/roo-code.js +69 -0
  48. package/dist/clients/roo-code.js.map +1 -0
  49. package/dist/clients/zed.d.ts +12 -0
  50. package/dist/clients/zed.d.ts.map +1 -0
  51. package/dist/clients/zed.js +41 -0
  52. package/dist/clients/zed.js.map +1 -0
  53. package/dist/errors/hints.d.ts +51 -0
  54. package/dist/errors/hints.d.ts.map +1 -0
  55. package/dist/errors/hints.js +95 -0
  56. package/dist/errors/hints.js.map +1 -0
  57. package/dist/errors/mask.d.ts +35 -0
  58. package/dist/errors/mask.d.ts.map +1 -0
  59. package/dist/errors/mask.js +49 -0
  60. package/dist/errors/mask.js.map +1 -0
  61. package/dist/errors/sanitize.d.ts +31 -0
  62. package/dist/errors/sanitize.d.ts.map +1 -0
  63. package/dist/errors/sanitize.js +100 -0
  64. package/dist/errors/sanitize.js.map +1 -0
  65. package/dist/errors.d.ts +42 -0
  66. package/dist/errors.d.ts.map +1 -0
  67. package/dist/errors.js +61 -0
  68. package/dist/errors.js.map +1 -0
  69. package/dist/gateway/advanced-tool/discovery.d.ts +19 -0
  70. package/dist/gateway/advanced-tool/discovery.d.ts.map +1 -0
  71. package/dist/gateway/advanced-tool/discovery.js +53 -0
  72. package/dist/gateway/advanced-tool/discovery.js.map +1 -0
  73. package/dist/gateway/advanced-tool/domains.d.ts +47 -0
  74. package/dist/gateway/advanced-tool/domains.d.ts.map +1 -0
  75. package/dist/gateway/advanced-tool/domains.js +94 -0
  76. package/dist/gateway/advanced-tool/domains.js.map +1 -0
  77. package/dist/gateway/advanced-tool/execute.d.ts +29 -0
  78. package/dist/gateway/advanced-tool/execute.d.ts.map +1 -0
  79. package/dist/gateway/advanced-tool/execute.js +54 -0
  80. package/dist/gateway/advanced-tool/execute.js.map +1 -0
  81. package/dist/gateway/advanced-tool/index.d.ts +36 -0
  82. package/dist/gateway/advanced-tool/index.d.ts.map +1 -0
  83. package/dist/gateway/advanced-tool/index.js +39 -0
  84. package/dist/gateway/advanced-tool/index.js.map +1 -0
  85. package/dist/gateway/advanced-tool/register.d.ts +18 -0
  86. package/dist/gateway/advanced-tool/register.d.ts.map +1 -0
  87. package/dist/gateway/advanced-tool/register.js +69 -0
  88. package/dist/gateway/advanced-tool/register.js.map +1 -0
  89. package/dist/gateway/advanced-tool.d.ts +13 -0
  90. package/dist/gateway/advanced-tool.d.ts.map +1 -0
  91. package/dist/gateway/advanced-tool.js +13 -0
  92. package/dist/gateway/advanced-tool.js.map +1 -0
  93. package/dist/gateway/capturing-server.d.ts +117 -0
  94. package/dist/gateway/capturing-server.d.ts.map +1 -0
  95. package/dist/gateway/capturing-server.js +103 -0
  96. package/dist/gateway/capturing-server.js.map +1 -0
  97. package/dist/gateway/essentials.d.ts +50 -0
  98. package/dist/gateway/essentials.d.ts.map +1 -0
  99. package/dist/gateway/essentials.js +94 -0
  100. package/dist/gateway/essentials.js.map +1 -0
  101. package/dist/gateway/test-support.d.ts +41 -0
  102. package/dist/gateway/test-support.d.ts.map +1 -0
  103. package/dist/gateway/test-support.js +60 -0
  104. package/dist/gateway/test-support.js.map +1 -0
  105. package/dist/index.d.ts +29 -0
  106. package/dist/index.d.ts.map +1 -0
  107. package/dist/index.js +111 -0
  108. package/dist/index.js.map +1 -0
  109. package/dist/install-skill.d.ts +43 -0
  110. package/dist/install-skill.d.ts.map +1 -0
  111. package/dist/install-skill.js +118 -0
  112. package/dist/install-skill.js.map +1 -0
  113. package/dist/platform/detect.d.ts +64 -0
  114. package/dist/platform/detect.d.ts.map +1 -0
  115. package/dist/platform/detect.js +98 -0
  116. package/dist/platform/detect.js.map +1 -0
  117. package/dist/platform/index.d.ts +121 -0
  118. package/dist/platform/index.d.ts.map +1 -0
  119. package/dist/platform/index.js +176 -0
  120. package/dist/platform/index.js.map +1 -0
  121. package/dist/platform/joomla.d.ts +44 -0
  122. package/dist/platform/joomla.d.ts.map +1 -0
  123. package/dist/platform/joomla.js +46 -0
  124. package/dist/platform/joomla.js.map +1 -0
  125. package/dist/server.d.ts +110 -0
  126. package/dist/server.d.ts.map +1 -0
  127. package/dist/server.js +274 -0
  128. package/dist/server.js.map +1 -0
  129. package/dist/setup-cli-confirm.d.ts +36 -0
  130. package/dist/setup-cli-confirm.d.ts.map +1 -0
  131. package/dist/setup-cli-confirm.js +59 -0
  132. package/dist/setup-cli-confirm.js.map +1 -0
  133. package/dist/setup-cli.d.ts +152 -0
  134. package/dist/setup-cli.d.ts.map +1 -0
  135. package/dist/setup-cli.js +870 -0
  136. package/dist/setup-cli.js.map +1 -0
  137. package/dist/setup-prompts.d.ts +41 -0
  138. package/dist/setup-prompts.d.ts.map +1 -0
  139. package/dist/setup-prompts.js +146 -0
  140. package/dist/setup-prompts.js.map +1 -0
  141. package/dist/setup-token.d.ts +38 -0
  142. package/dist/setup-token.d.ts.map +1 -0
  143. package/dist/setup-token.js +106 -0
  144. package/dist/setup-token.js.map +1 -0
  145. package/dist/setup-wizard-defaults.d.ts +43 -0
  146. package/dist/setup-wizard-defaults.d.ts.map +1 -0
  147. package/dist/setup-wizard-defaults.js +160 -0
  148. package/dist/setup-wizard-defaults.js.map +1 -0
  149. package/dist/setup-wizard-handshake.d.ts +25 -0
  150. package/dist/setup-wizard-handshake.d.ts.map +1 -0
  151. package/dist/setup-wizard-handshake.js +103 -0
  152. package/dist/setup-wizard-handshake.js.map +1 -0
  153. package/dist/setup-wizard-types.d.ts +164 -0
  154. package/dist/setup-wizard-types.d.ts.map +1 -0
  155. package/dist/setup-wizard-types.js +11 -0
  156. package/dist/setup-wizard-types.js.map +1 -0
  157. package/dist/setup-wizard.d.ts +33 -0
  158. package/dist/setup-wizard.d.ts.map +1 -0
  159. package/dist/setup-wizard.js +199 -0
  160. package/dist/setup-wizard.js.map +1 -0
  161. package/dist/setup.d.ts +17 -0
  162. package/dist/setup.d.ts.map +1 -0
  163. package/dist/setup.js +33 -0
  164. package/dist/setup.js.map +1 -0
  165. package/dist/sites/cli/add-site.d.ts +106 -0
  166. package/dist/sites/cli/add-site.d.ts.map +1 -0
  167. package/dist/sites/cli/add-site.js +185 -0
  168. package/dist/sites/cli/add-site.js.map +1 -0
  169. package/dist/sites/cli/list-sites.d.ts +40 -0
  170. package/dist/sites/cli/list-sites.d.ts.map +1 -0
  171. package/dist/sites/cli/list-sites.js +116 -0
  172. package/dist/sites/cli/list-sites.js.map +1 -0
  173. package/dist/sites/cli/remove-site.d.ts +60 -0
  174. package/dist/sites/cli/remove-site.d.ts.map +1 -0
  175. package/dist/sites/cli/remove-site.js +120 -0
  176. package/dist/sites/cli/remove-site.js.map +1 -0
  177. package/dist/sites/cli/set-default.d.ts +47 -0
  178. package/dist/sites/cli/set-default.d.ts.map +1 -0
  179. package/dist/sites/cli/set-default.js +69 -0
  180. package/dist/sites/cli/set-default.js.map +1 -0
  181. package/dist/sites/cli/test-site.d.ts +77 -0
  182. package/dist/sites/cli/test-site.d.ts.map +1 -0
  183. package/dist/sites/cli/test-site.js +146 -0
  184. package/dist/sites/cli/test-site.js.map +1 -0
  185. package/dist/sites/client-pool.d.ts +124 -0
  186. package/dist/sites/client-pool.d.ts.map +1 -0
  187. package/dist/sites/client-pool.js +172 -0
  188. package/dist/sites/client-pool.js.map +1 -0
  189. package/dist/sites/env-bridge.d.ts +55 -0
  190. package/dist/sites/env-bridge.d.ts.map +1 -0
  191. package/dist/sites/env-bridge.js +94 -0
  192. package/dist/sites/env-bridge.js.map +1 -0
  193. package/dist/sites/paths.d.ts +21 -0
  194. package/dist/sites/paths.d.ts.map +1 -0
  195. package/dist/sites/paths.js +37 -0
  196. package/dist/sites/paths.js.map +1 -0
  197. package/dist/sites/probe.d.ts +60 -0
  198. package/dist/sites/probe.d.ts.map +1 -0
  199. package/dist/sites/probe.js +112 -0
  200. package/dist/sites/probe.js.map +1 -0
  201. package/dist/sites/registry.d.ts +142 -0
  202. package/dist/sites/registry.d.ts.map +1 -0
  203. package/dist/sites/registry.js +163 -0
  204. package/dist/sites/registry.js.map +1 -0
  205. package/dist/sites/schema.d.ts +90 -0
  206. package/dist/sites/schema.d.ts.map +1 -0
  207. package/dist/sites/schema.js +71 -0
  208. package/dist/sites/schema.js.map +1 -0
  209. package/dist/sites/secret-resolver.d.ts +115 -0
  210. package/dist/sites/secret-resolver.d.ts.map +1 -0
  211. package/dist/sites/secret-resolver.js +225 -0
  212. package/dist/sites/secret-resolver.js.map +1 -0
  213. package/dist/sites/store.d.ts +82 -0
  214. package/dist/sites/store.d.ts.map +1 -0
  215. package/dist/sites/store.js +198 -0
  216. package/dist/sites/store.js.map +1 -0
  217. package/dist/sites/tools/index.d.ts +28 -0
  218. package/dist/sites/tools/index.d.ts.map +1 -0
  219. package/dist/sites/tools/index.js +30 -0
  220. package/dist/sites/tools/index.js.map +1 -0
  221. package/dist/sites/tools/sites-list.d.ts +48 -0
  222. package/dist/sites/tools/sites-list.d.ts.map +1 -0
  223. package/dist/sites/tools/sites-list.js +137 -0
  224. package/dist/sites/tools/sites-list.js.map +1 -0
  225. package/dist/sites/tools/sites-test.d.ts +47 -0
  226. package/dist/sites/tools/sites-test.d.ts.map +1 -0
  227. package/dist/sites/tools/sites-test.js +148 -0
  228. package/dist/sites/tools/sites-test.js.map +1 -0
  229. package/dist/skill-loader.d.ts +111 -0
  230. package/dist/skill-loader.d.ts.map +1 -0
  231. package/dist/skill-loader.js +191 -0
  232. package/dist/skill-loader.js.map +1 -0
  233. package/dist/tools/elements/builders.d.ts +24 -0
  234. package/dist/tools/elements/builders.d.ts.map +1 -0
  235. package/dist/tools/elements/builders.js +199 -0
  236. package/dist/tools/elements/builders.js.map +1 -0
  237. package/dist/tools/elements/handlers-write.d.ts +49 -0
  238. package/dist/tools/elements/handlers-write.d.ts.map +1 -0
  239. package/dist/tools/elements/handlers-write.js +148 -0
  240. package/dist/tools/elements/handlers-write.js.map +1 -0
  241. package/dist/tools/elements/handlers.d.ts +70 -0
  242. package/dist/tools/elements/handlers.d.ts.map +1 -0
  243. package/dist/tools/elements/handlers.js +292 -0
  244. package/dist/tools/elements/handlers.js.map +1 -0
  245. package/dist/tools/elements/index.d.ts +28 -0
  246. package/dist/tools/elements/index.d.ts.map +1 -0
  247. package/dist/tools/elements/index.js +27 -0
  248. package/dist/tools/elements/index.js.map +1 -0
  249. package/dist/tools/elements.d.ts +13 -0
  250. package/dist/tools/elements.d.ts.map +1 -0
  251. package/dist/tools/elements.js +13 -0
  252. package/dist/tools/elements.js.map +1 -0
  253. package/dist/tools/elicitation.d.ts +87 -0
  254. package/dist/tools/elicitation.d.ts.map +1 -0
  255. package/dist/tools/elicitation.js +100 -0
  256. package/dist/tools/elicitation.js.map +1 -0
  257. package/dist/tools/format/elements-format.d.ts +40 -0
  258. package/dist/tools/format/elements-format.d.ts.map +1 -0
  259. package/dist/tools/format/elements-format.js +194 -0
  260. package/dist/tools/format/elements-format.js.map +1 -0
  261. package/dist/tools/format/health-format.d.ts +79 -0
  262. package/dist/tools/format/health-format.d.ts.map +1 -0
  263. package/dist/tools/format/health-format.js +181 -0
  264. package/dist/tools/format/health-format.js.map +1 -0
  265. package/dist/tools/format/inspection-format.d.ts +59 -0
  266. package/dist/tools/format/inspection-format.d.ts.map +1 -0
  267. package/dist/tools/format/inspection-format.js +303 -0
  268. package/dist/tools/format/inspection-format.js.map +1 -0
  269. package/dist/tools/format/pages-format.d.ts +57 -0
  270. package/dist/tools/format/pages-format.d.ts.map +1 -0
  271. package/dist/tools/format/pages-format.js +157 -0
  272. package/dist/tools/format/pages-format.js.map +1 -0
  273. package/dist/tools/format/sources-format.d.ts +44 -0
  274. package/dist/tools/format/sources-format.d.ts.map +1 -0
  275. package/dist/tools/format/sources-format.js +242 -0
  276. package/dist/tools/format/sources-format.js.map +1 -0
  277. package/dist/tools/health.d.ts +22 -0
  278. package/dist/tools/health.d.ts.map +1 -0
  279. package/dist/tools/health.js +220 -0
  280. package/dist/tools/health.js.map +1 -0
  281. package/dist/tools/index.d.ts +30 -0
  282. package/dist/tools/index.d.ts.map +1 -0
  283. package/dist/tools/index.js +39 -0
  284. package/dist/tools/index.js.map +1 -0
  285. package/dist/tools/inspection.d.ts +14 -0
  286. package/dist/tools/inspection.d.ts.map +1 -0
  287. package/dist/tools/inspection.js +208 -0
  288. package/dist/tools/inspection.js.map +1 -0
  289. package/dist/tools/layout-flatten.d.ts +75 -0
  290. package/dist/tools/layout-flatten.d.ts.map +1 -0
  291. package/dist/tools/layout-flatten.js +107 -0
  292. package/dist/tools/layout-flatten.js.map +1 -0
  293. package/dist/tools/multi-items/builders.d.ts +23 -0
  294. package/dist/tools/multi-items/builders.d.ts.map +1 -0
  295. package/dist/tools/multi-items/builders.js +78 -0
  296. package/dist/tools/multi-items/builders.js.map +1 -0
  297. package/dist/tools/multi-items/clean-implode-handler.d.ts +36 -0
  298. package/dist/tools/multi-items/clean-implode-handler.d.ts.map +1 -0
  299. package/dist/tools/multi-items/clean-implode-handler.js +57 -0
  300. package/dist/tools/multi-items/clean-implode-handler.js.map +1 -0
  301. package/dist/tools/multi-items/index.d.ts +18 -0
  302. package/dist/tools/multi-items/index.d.ts.map +1 -0
  303. package/dist/tools/multi-items/index.js +18 -0
  304. package/dist/tools/multi-items/index.js.map +1 -0
  305. package/dist/tools/multi-items/inspect-handler.d.ts +41 -0
  306. package/dist/tools/multi-items/inspect-handler.d.ts.map +1 -0
  307. package/dist/tools/multi-items/inspect-handler.js +50 -0
  308. package/dist/tools/multi-items/inspect-handler.js.map +1 -0
  309. package/dist/tools/multi-items/item-container-map.d.ts +41 -0
  310. package/dist/tools/multi-items/item-container-map.d.ts.map +1 -0
  311. package/dist/tools/multi-items/item-container-map.js +73 -0
  312. package/dist/tools/multi-items/item-container-map.js.map +1 -0
  313. package/dist/tools/pages/builders.d.ts +14 -0
  314. package/dist/tools/pages/builders.d.ts.map +1 -0
  315. package/dist/tools/pages/builders.js +136 -0
  316. package/dist/tools/pages/builders.js.map +1 -0
  317. package/dist/tools/pages/handlers-read.d.ts +33 -0
  318. package/dist/tools/pages/handlers-read.d.ts.map +1 -0
  319. package/dist/tools/pages/handlers-read.js +203 -0
  320. package/dist/tools/pages/handlers-read.js.map +1 -0
  321. package/dist/tools/pages/handlers-write.d.ts +21 -0
  322. package/dist/tools/pages/handlers-write.d.ts.map +1 -0
  323. package/dist/tools/pages/handlers-write.js +52 -0
  324. package/dist/tools/pages/handlers-write.js.map +1 -0
  325. package/dist/tools/pages/index.d.ts +17 -0
  326. package/dist/tools/pages/index.d.ts.map +1 -0
  327. package/dist/tools/pages/index.js +17 -0
  328. package/dist/tools/pages/index.js.map +1 -0
  329. package/dist/tools/pages/schemas.d.ts +45 -0
  330. package/dist/tools/pages/schemas.d.ts.map +1 -0
  331. package/dist/tools/pages/schemas.js +82 -0
  332. package/dist/tools/pages/schemas.js.map +1 -0
  333. package/dist/tools/pages.d.ts +13 -0
  334. package/dist/tools/pages.d.ts.map +1 -0
  335. package/dist/tools/pages.js +13 -0
  336. package/dist/tools/pages.js.map +1 -0
  337. package/dist/tools/pool-resolve-helper.d.ts +83 -0
  338. package/dist/tools/pool-resolve-helper.d.ts.map +1 -0
  339. package/dist/tools/pool-resolve-helper.js +148 -0
  340. package/dist/tools/pool-resolve-helper.js.map +1 -0
  341. package/dist/tools/progress-phases.d.ts +46 -0
  342. package/dist/tools/progress-phases.d.ts.map +1 -0
  343. package/dist/tools/progress-phases.js +48 -0
  344. package/dist/tools/progress-phases.js.map +1 -0
  345. package/dist/tools/shared-schemas.d.ts +25 -0
  346. package/dist/tools/shared-schemas.d.ts.map +1 -0
  347. package/dist/tools/shared-schemas.js +59 -0
  348. package/dist/tools/shared-schemas.js.map +1 -0
  349. package/dist/tools/sources/builders.d.ts +13 -0
  350. package/dist/tools/sources/builders.d.ts.map +1 -0
  351. package/dist/tools/sources/builders.js +118 -0
  352. package/dist/tools/sources/builders.js.map +1 -0
  353. package/dist/tools/sources/handlers-bind.d.ts +28 -0
  354. package/dist/tools/sources/handlers-bind.d.ts.map +1 -0
  355. package/dist/tools/sources/handlers-bind.js +129 -0
  356. package/dist/tools/sources/handlers-bind.js.map +1 -0
  357. package/dist/tools/sources/handlers.d.ts +47 -0
  358. package/dist/tools/sources/handlers.d.ts.map +1 -0
  359. package/dist/tools/sources/handlers.js +108 -0
  360. package/dist/tools/sources/handlers.js.map +1 -0
  361. package/dist/tools/sources/index.d.ts +19 -0
  362. package/dist/tools/sources/index.d.ts.map +1 -0
  363. package/dist/tools/sources/index.js +18 -0
  364. package/dist/tools/sources/index.js.map +1 -0
  365. package/dist/tools/sources.d.ts +14 -0
  366. package/dist/tools/sources.d.ts.map +1 -0
  367. package/dist/tools/sources.js +14 -0
  368. package/dist/tools/sources.js.map +1 -0
  369. package/dist/tools/sparse-fields.d.ts +106 -0
  370. package/dist/tools/sparse-fields.d.ts.map +1 -0
  371. package/dist/tools/sparse-fields.js +165 -0
  372. package/dist/tools/sparse-fields.js.map +1 -0
  373. package/dist/tools/tool-builder/annotations.d.ts +55 -0
  374. package/dist/tools/tool-builder/annotations.d.ts.map +1 -0
  375. package/dist/tools/tool-builder/annotations.js +86 -0
  376. package/dist/tools/tool-builder/annotations.js.map +1 -0
  377. package/dist/tools/tool-builder/define.d.ts +31 -0
  378. package/dist/tools/tool-builder/define.d.ts.map +1 -0
  379. package/dist/tools/tool-builder/define.js +31 -0
  380. package/dist/tools/tool-builder/define.js.map +1 -0
  381. package/dist/tools/tool-builder/index.d.ts +28 -0
  382. package/dist/tools/tool-builder/index.d.ts.map +1 -0
  383. package/dist/tools/tool-builder/index.js +27 -0
  384. package/dist/tools/tool-builder/index.js.map +1 -0
  385. package/dist/tools/tool-builder/results.d.ts +104 -0
  386. package/dist/tools/tool-builder/results.d.ts.map +1 -0
  387. package/dist/tools/tool-builder/results.js +224 -0
  388. package/dist/tools/tool-builder/results.js.map +1 -0
  389. package/dist/tools/tool-builder/types.d.ts +97 -0
  390. package/dist/tools/tool-builder/types.d.ts.map +1 -0
  391. package/dist/tools/tool-builder/types.js +9 -0
  392. package/dist/tools/tool-builder/types.js.map +1 -0
  393. package/dist/tools/tool-builder.d.ts +16 -0
  394. package/dist/tools/tool-builder.d.ts.map +1 -0
  395. package/dist/tools/tool-builder.js +16 -0
  396. package/dist/tools/tool-builder.js.map +1 -0
  397. package/package.json +2 -1
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Platform abstraction — Wave G.0.
3
+ *
4
+ * A `Platform` is the seam between the MCP server and a host CMS. Today
5
+ * the only concrete impl is `WordPressPlatform`; `joomla` is reserved
6
+ * as a typed seam-marker so Wave G.4+ can land Joomla without rippling
7
+ * through every call site.
8
+ *
9
+ * Why an interface instead of a tagged union?
10
+ * - Each platform owns its REST-namespace path verbatim (WP uses
11
+ * `/wp-json/<ns>`, Joomla will use `/index.php?option=com_ajax&…`).
12
+ * - Adding a platform = implement the interface + add a `PlatformKind`
13
+ * member. No switch statements to update.
14
+ *
15
+ * The `RestClient` accepts EITHER a `Platform` OR the legacy
16
+ * `{baseUrl}` form (which internally builds a `WordPressPlatform`),
17
+ * so existing callers keep working unchanged.
18
+ *
19
+ * @license MIT
20
+ */
21
+ /** Tagged union of supported host platforms. */
22
+ export type PlatformKind = 'wordpress' | 'joomla';
23
+ /**
24
+ * A `Platform` describes WHERE and HOW the MCP server reaches the
25
+ * REST surface of the host CMS.
26
+ */
27
+ export interface Platform {
28
+ /** Discriminator for runtime checks. */
29
+ readonly kind: PlatformKind;
30
+ /** Origin (scheme + host + optional port). No trailing-slash normalisation here. */
31
+ readonly baseUrl: string;
32
+ /** Path prefix appended to baseUrl to form the REST root (must start with `/`). */
33
+ readonly restNamespacePath: string;
34
+ }
35
+ /** Canonical WordPress REST-namespace path for this plugin. */
36
+ export declare const WORDPRESS_REST_NAMESPACE_PATH = "/wp-json/yt-builder-mcp/v1";
37
+ /**
38
+ * WordPress platform implementation.
39
+ *
40
+ * `restNamespacePath` is fixed to the plugin's namespace; the caller
41
+ * supplies only the site origin.
42
+ */
43
+ export declare class WordPressPlatform implements Platform {
44
+ readonly kind: "wordpress";
45
+ readonly baseUrl: string;
46
+ readonly restNamespacePath: string;
47
+ constructor(baseUrl: string);
48
+ }
49
+ export { JoomlaPlatform, JOOMLA_REST_NAMESPACE_PATH } from './joomla.js';
50
+ /**
51
+ * Detect which {@link Platform} a base URL targets based on the URL
52
+ * shape alone (no network call).
53
+ *
54
+ * - pathname starts with `/wp-json/` → `'wordpress'`
55
+ * - pathname starts with `/api/index.php/` → `'joomla'`
56
+ * - otherwise → `null` (ambiguous — caller may probe `/identity`)
57
+ *
58
+ * Round-6 A1 polish: detection switched from `String.includes` to a
59
+ * proper `URL`-parse + `pathname.startsWith` so query-string payloads
60
+ * cannot cause mis-detection (e.g. a Joomla site URL like
61
+ * `https://example.com/?redirect=/wp-json/foo` no longer pretends to
62
+ * be WordPress). Malformed URLs that the `URL` constructor rejects
63
+ * gracefully fall back to the legacy substring scan so callers that
64
+ * accidentally pass a host-only string (e.g. `example.com`) keep
65
+ * working — they would have already failed the actual network call
66
+ * with a clearer error before this function was reached in practice.
67
+ *
68
+ * Cookbook §3.7.1 — the runtime tie-breaker (when this returns `null`)
69
+ * is the `/identity` endpoint, which returns
70
+ * `{ product: 'yt-builder-mcp', platform: 'wordpress'|'joomla', ... }`
71
+ * on both platforms.
72
+ */
73
+ export declare function detectPlatformFromUrl(url: string): PlatformKind | null;
74
+ /**
75
+ * Construct the right {@link Platform} for a base URL.
76
+ *
77
+ * When the URL shape gives an unambiguous hint via
78
+ * {@link detectPlatformFromUrl}, that wins. Otherwise the caller can
79
+ * pass an explicit `hint` (e.g. from a config flag) or fall back to
80
+ * the default (`'wordpress'` for back-compat — Joomla support landed
81
+ * in Wave 7, so existing WordPress installs never need to flag).
82
+ *
83
+ * Synchronous variant — kept for back-compat with callers that cannot
84
+ * (or do not need to) probe over the network. Prefer
85
+ * {@link platformForUrlAsync} when running in the server boot path:
86
+ * it adds a runtime probe that disambiguates origin-only / subfolder
87
+ * URLs (e.g. `https://example.com/joomla`) where the URL shape alone
88
+ * is silent.
89
+ */
90
+ export declare function platformForUrl(baseUrl: string, hint?: PlatformKind): Platform;
91
+ /**
92
+ * Async variant of {@link platformForUrl} that adds a runtime probe
93
+ * step for URLs the URL-shape heuristic cannot disambiguate.
94
+ *
95
+ * Resolution order (first match wins):
96
+ * 1. Explicit `hint` from `YTB_MCP_PLATFORM` env var → no probe.
97
+ * 2. URL-shape via {@link detectPlatformFromUrl} (clear `/wp-json/`
98
+ * or `/api/index.php/` marker) → no probe.
99
+ * 3. Runtime probe via `detectPlatformAtRuntime` (the F-Platform-
100
+ * Detect-Probe fix — handles subfolder installs like
101
+ * `https://dev.example.com/joomla` where steps 1+2 return null).
102
+ * 4. Final fallback: `'wordpress'` (back-compat).
103
+ *
104
+ * The probe step is what unblocks origin-only Joomla customers without
105
+ * forcing them to manually set `YTB_MCP_PLATFORM=joomla` — the DXT
106
+ * default of `auto` finally lives up to its name.
107
+ *
108
+ * If both probes fail (server unreachable, plugin not installed, etc.)
109
+ * we fall back to the wordpress default and emit a single stderr note
110
+ * so the customer at least sees *why* the next authenticated call may
111
+ * 404; the real diagnosis still belongs to the first authenticated
112
+ * tool invocation.
113
+ *
114
+ * @param opts.probe Optional probe override (tests / DI).
115
+ * @param opts.logger Optional stderr writer (defaults to `process.stderr.write`).
116
+ */
117
+ export declare function platformForUrlAsync(baseUrl: string, hint?: PlatformKind, opts?: {
118
+ readonly probe?: (url: string) => Promise<PlatformKind | null>;
119
+ readonly logger?: (msg: string) => void;
120
+ }): Promise<Platform>;
121
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,gD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2
+ * Platform abstraction — Wave G.0.
3
+ *
4
+ * A `Platform` is the seam between the MCP server and a host CMS. Today
5
+ * the only concrete impl is `WordPressPlatform`; `joomla` is reserved
6
+ * as a typed seam-marker so Wave G.4+ can land Joomla without rippling
7
+ * through every call site.
8
+ *
9
+ * Why an interface instead of a tagged union?
10
+ * - Each platform owns its REST-namespace path verbatim (WP uses
11
+ * `/wp-json/<ns>`, Joomla will use `/index.php?option=com_ajax&…`).
12
+ * - Adding a platform = implement the interface + add a `PlatformKind`
13
+ * member. No switch statements to update.
14
+ *
15
+ * The `RestClient` accepts EITHER a `Platform` OR the legacy
16
+ * `{baseUrl}` form (which internally builds a `WordPressPlatform`),
17
+ * so existing callers keep working unchanged.
18
+ *
19
+ * @license MIT
20
+ */
21
+ /** Canonical WordPress REST-namespace path for this plugin. */
22
+ export const WORDPRESS_REST_NAMESPACE_PATH = '/wp-json/yt-builder-mcp/v1';
23
+ /**
24
+ * WordPress platform implementation.
25
+ *
26
+ * `restNamespacePath` is fixed to the plugin's namespace; the caller
27
+ * supplies only the site origin.
28
+ */
29
+ export class WordPressPlatform {
30
+ kind = 'wordpress';
31
+ baseUrl;
32
+ restNamespacePath;
33
+ constructor(baseUrl) {
34
+ this.baseUrl = baseUrl;
35
+ this.restNamespacePath = WORDPRESS_REST_NAMESPACE_PATH;
36
+ }
37
+ }
38
+ // Local import keeps the symbol in scope for `platformForUrl` below;
39
+ // the re-export immediately after surfaces it to outside callers so
40
+ // the platform barrel remains the single import point (cookbook
41
+ // Ch1 Finding 2).
42
+ import { JoomlaPlatform } from './joomla.js';
43
+ export { JoomlaPlatform, JOOMLA_REST_NAMESPACE_PATH } from './joomla.js';
44
+ /**
45
+ * Detect which {@link Platform} a base URL targets based on the URL
46
+ * shape alone (no network call).
47
+ *
48
+ * - pathname starts with `/wp-json/` → `'wordpress'`
49
+ * - pathname starts with `/api/index.php/` → `'joomla'`
50
+ * - otherwise → `null` (ambiguous — caller may probe `/identity`)
51
+ *
52
+ * Round-6 A1 polish: detection switched from `String.includes` to a
53
+ * proper `URL`-parse + `pathname.startsWith` so query-string payloads
54
+ * cannot cause mis-detection (e.g. a Joomla site URL like
55
+ * `https://example.com/?redirect=/wp-json/foo` no longer pretends to
56
+ * be WordPress). Malformed URLs that the `URL` constructor rejects
57
+ * gracefully fall back to the legacy substring scan so callers that
58
+ * accidentally pass a host-only string (e.g. `example.com`) keep
59
+ * working — they would have already failed the actual network call
60
+ * with a clearer error before this function was reached in practice.
61
+ *
62
+ * Cookbook §3.7.1 — the runtime tie-breaker (when this returns `null`)
63
+ * is the `/identity` endpoint, which returns
64
+ * `{ product: 'yt-builder-mcp', platform: 'wordpress'|'joomla', ... }`
65
+ * on both platforms.
66
+ */
67
+ export function detectPlatformFromUrl(url) {
68
+ let pathname;
69
+ try {
70
+ pathname = new URL(url).pathname;
71
+ }
72
+ catch {
73
+ // Fallback for inputs the URL constructor rejects (host-only
74
+ // strings, relative paths). Preserves the legacy substring
75
+ // behaviour as a defensive net.
76
+ if (url.includes('/wp-json/'))
77
+ return 'wordpress';
78
+ if (url.includes('/api/index.php/'))
79
+ return 'joomla';
80
+ return null;
81
+ }
82
+ if (pathname.startsWith('/wp-json/'))
83
+ return 'wordpress';
84
+ if (pathname.startsWith('/api/index.php/'))
85
+ return 'joomla';
86
+ return null;
87
+ }
88
+ /**
89
+ * Construct the right {@link Platform} for a base URL.
90
+ *
91
+ * When the URL shape gives an unambiguous hint via
92
+ * {@link detectPlatformFromUrl}, that wins. Otherwise the caller can
93
+ * pass an explicit `hint` (e.g. from a config flag) or fall back to
94
+ * the default (`'wordpress'` for back-compat — Joomla support landed
95
+ * in Wave 7, so existing WordPress installs never need to flag).
96
+ *
97
+ * Synchronous variant — kept for back-compat with callers that cannot
98
+ * (or do not need to) probe over the network. Prefer
99
+ * {@link platformForUrlAsync} when running in the server boot path:
100
+ * it adds a runtime probe that disambiguates origin-only / subfolder
101
+ * URLs (e.g. `https://example.com/joomla`) where the URL shape alone
102
+ * is silent.
103
+ */
104
+ export function platformForUrl(baseUrl, hint) {
105
+ const detected = detectPlatformFromUrl(baseUrl);
106
+ const kind = detected ?? hint ?? 'wordpress';
107
+ return kind === 'joomla'
108
+ ? new JoomlaPlatform(baseUrl)
109
+ : new WordPressPlatform(baseUrl);
110
+ }
111
+ /**
112
+ * Async variant of {@link platformForUrl} that adds a runtime probe
113
+ * step for URLs the URL-shape heuristic cannot disambiguate.
114
+ *
115
+ * Resolution order (first match wins):
116
+ * 1. Explicit `hint` from `YTB_MCP_PLATFORM` env var → no probe.
117
+ * 2. URL-shape via {@link detectPlatformFromUrl} (clear `/wp-json/`
118
+ * or `/api/index.php/` marker) → no probe.
119
+ * 3. Runtime probe via `detectPlatformAtRuntime` (the F-Platform-
120
+ * Detect-Probe fix — handles subfolder installs like
121
+ * `https://dev.example.com/joomla` where steps 1+2 return null).
122
+ * 4. Final fallback: `'wordpress'` (back-compat).
123
+ *
124
+ * The probe step is what unblocks origin-only Joomla customers without
125
+ * forcing them to manually set `YTB_MCP_PLATFORM=joomla` — the DXT
126
+ * default of `auto` finally lives up to its name.
127
+ *
128
+ * If both probes fail (server unreachable, plugin not installed, etc.)
129
+ * we fall back to the wordpress default and emit a single stderr note
130
+ * so the customer at least sees *why* the next authenticated call may
131
+ * 404; the real diagnosis still belongs to the first authenticated
132
+ * tool invocation.
133
+ *
134
+ * @param opts.probe Optional probe override (tests / DI).
135
+ * @param opts.logger Optional stderr writer (defaults to `process.stderr.write`).
136
+ */
137
+ export async function platformForUrlAsync(baseUrl, hint, opts = {}) {
138
+ // 1. Explicit hint wins — probe-less, by design (user override).
139
+ if (hint !== undefined) {
140
+ return hint === 'joomla'
141
+ ? new JoomlaPlatform(baseUrl)
142
+ : new WordPressPlatform(baseUrl);
143
+ }
144
+ // 2. Static URL-shape heuristic.
145
+ const detected = detectPlatformFromUrl(baseUrl);
146
+ if (detected !== null) {
147
+ return detected === 'joomla'
148
+ ? new JoomlaPlatform(baseUrl)
149
+ : new WordPressPlatform(baseUrl);
150
+ }
151
+ // 3. Runtime probe. Lazy-imported so the sync `platformForUrl`
152
+ // barrel above stays free of any fetch dependency for callers
153
+ // that do not opt-in.
154
+ const probe = opts.probe
155
+ ?? (async (url) => {
156
+ const mod = await import('./detect.js');
157
+ return mod.detectPlatformAtRuntime(url);
158
+ });
159
+ const probed = await probe(baseUrl);
160
+ if (probed !== null) {
161
+ return probed === 'joomla'
162
+ ? new JoomlaPlatform(baseUrl)
163
+ : new WordPressPlatform(baseUrl);
164
+ }
165
+ // 4. Final fallback — emit a single soft note so the user knows
166
+ // we tried and that explicit YTB_MCP_PLATFORM may rescue.
167
+ const logger = opts.logger
168
+ ?? ((msg) => {
169
+ process.stderr.write(msg);
170
+ });
171
+ logger('[yt-builder-mcp] notice: platform auto-detection probe failed for '
172
+ + `${baseUrl} — falling back to wordpress. Set YTB_MCP_PLATFORM=joomla `
173
+ + 'if this is a Joomla install.\n');
174
+ return new WordPressPlatform(baseUrl);
175
+ }
176
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAkBH,+DAA+D;AAC/D,MAAM,CAAC,MAAM,6BAA6B,GAAG,4BAA4B,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,OAAO,iBAAiB;IACV,IAAI,GAAG,WAAoB,CAAC;IAC5B,OAAO,CAAS;IAChB,iBAAiB,CAAS;IAE1C,YAAY,OAAe;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,iBAAiB,GAAG,6BAA6B,CAAC;IAC3D,CAAC;CACJ;AAED,qEAAqE;AACrE,oEAAoE;AACpE,gEAAgE;AAChE,kBAAkB;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;A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/6 platform implementation — Wave 7 prep.
3
+ *
4
+ * Mirrors {@link WordPressPlatform} but targets the Joomla Web Services
5
+ * API surface registered by `plg_system_ytbmcp` (see
6
+ * `src/packaging/joomla/extensions/plg_system_ytbmcp/src/Extension/Ytbmcp.php`
7
+ * — `onBeforeApiRoute()` mounts the routes under
8
+ * `v1/yt-builder-mcp/...` against `com_ytbmcp`).
9
+ *
10
+ * The full request URL composed by {@link RestClient} is:
11
+ *
12
+ * {baseUrl}/api/index.php/v1/yt-builder-mcp/{path}
13
+ *
14
+ * — where `{baseUrl}` is the Joomla site origin (e.g. `https://example.com`
15
+ * or `https://example.com/joomla` for a subfolder install) and `{path}`
16
+ * is the per-tool REST path (e.g. `/health`, `/pages`, `/etag`).
17
+ *
18
+ * Cookbook Ch1 Finding 2: the `PlatformKind` union already declared
19
+ * `'joomla'` in Wave G.0; this class fills the seam so no tool handler
20
+ * has to change.
21
+ *
22
+ * Cookbook §3.7 (cross-platform parity): the REST byte-shape returned
23
+ * by every endpoint is identical across platforms — only the route
24
+ * prefix differs.
25
+ *
26
+ * @license MIT
27
+ */
28
+ import type { Platform } from './index.js';
29
+ /** Canonical Joomla REST namespace prefix for this plugin. */
30
+ export declare const JOOMLA_REST_NAMESPACE_PATH = "/api/index.php/v1/yt-builder-mcp";
31
+ /**
32
+ * Joomla platform implementation.
33
+ *
34
+ * `restNamespacePath` is fixed to the Web Services API mount point that
35
+ * `plg_system_ytbmcp::onBeforeApiRoute()` registers; the caller supplies
36
+ * only the site origin.
37
+ */
38
+ export declare class JoomlaPlatform implements Platform {
39
+ readonly kind: "joomla";
40
+ readonly baseUrl: string;
41
+ readonly restNamespacePath: string;
42
+ constructor(baseUrl: string);
43
+ }
44
+ //# sourceMappingURL=joomla.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joomla.d.ts","sourceRoot":"","sources":["../../src/platform/joomla.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,8DAA8D;AAC9D,eAAO,MAAM,0BAA0B,qCAAqC,CAAC;AAE7E;;;;;;GAMG;AACH,qBAAa,cAAe,YAAW,QAAQ;IAC3C,SAAgB,IAAI,EAAG,QAAQ,CAAU;IACzC,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,SAAgB,iBAAiB,EAAE,MAAM,CAAC;gBAE9B,OAAO,EAAE,MAAM;CAI9B"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Joomla 5/6 platform implementation — Wave 7 prep.
3
+ *
4
+ * Mirrors {@link WordPressPlatform} but targets the Joomla Web Services
5
+ * API surface registered by `plg_system_ytbmcp` (see
6
+ * `src/packaging/joomla/extensions/plg_system_ytbmcp/src/Extension/Ytbmcp.php`
7
+ * — `onBeforeApiRoute()` mounts the routes under
8
+ * `v1/yt-builder-mcp/...` against `com_ytbmcp`).
9
+ *
10
+ * The full request URL composed by {@link RestClient} is:
11
+ *
12
+ * {baseUrl}/api/index.php/v1/yt-builder-mcp/{path}
13
+ *
14
+ * — where `{baseUrl}` is the Joomla site origin (e.g. `https://example.com`
15
+ * or `https://example.com/joomla` for a subfolder install) and `{path}`
16
+ * is the per-tool REST path (e.g. `/health`, `/pages`, `/etag`).
17
+ *
18
+ * Cookbook Ch1 Finding 2: the `PlatformKind` union already declared
19
+ * `'joomla'` in Wave G.0; this class fills the seam so no tool handler
20
+ * has to change.
21
+ *
22
+ * Cookbook §3.7 (cross-platform parity): the REST byte-shape returned
23
+ * by every endpoint is identical across platforms — only the route
24
+ * prefix differs.
25
+ *
26
+ * @license MIT
27
+ */
28
+ /** Canonical Joomla REST namespace prefix for this plugin. */
29
+ export const JOOMLA_REST_NAMESPACE_PATH = '/api/index.php/v1/yt-builder-mcp';
30
+ /**
31
+ * Joomla platform implementation.
32
+ *
33
+ * `restNamespacePath` is fixed to the Web Services API mount point that
34
+ * `plg_system_ytbmcp::onBeforeApiRoute()` registers; the caller supplies
35
+ * only the site origin.
36
+ */
37
+ export class JoomlaPlatform {
38
+ kind = 'joomla';
39
+ baseUrl;
40
+ restNamespacePath;
41
+ constructor(baseUrl) {
42
+ this.baseUrl = baseUrl;
43
+ this.restNamespacePath = JOOMLA_REST_NAMESPACE_PATH;
44
+ }
45
+ }
46
+ //# sourceMappingURL=joomla.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joomla.js","sourceRoot":"","sources":["../../src/platform/joomla.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,0BAA0B,GAAG,kCAAkC,CAAC;AAE7E;;;;;;GAMG;AACH,MAAM,OAAO,cAAc;IACP,IAAI,GAAG,QAAiB,CAAC;IACzB,OAAO,CAAS;IAChB,iBAAiB,CAAS;IAE1C,YAAY,OAAe;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,iBAAiB,GAAG,0BAA0B,CAAC;IACxD,CAAC;CACJ"}
@@ -0,0 +1,110 @@
1
+ /**
2
+ * MCP server factory — Wave G.1 / Gateway-Hub edition.
3
+ *
4
+ * `createServer({client})` builds a configured `McpServer` with a 3-lane
5
+ * tool registration:
6
+ *
7
+ * L3 — direct top-level (yootheme_builder_health + yootheme_builder_diagnose)
8
+ * Registered FIRST, BEFORE the CapturingServer wraps the real server.
9
+ * These tools must reach the LLM even when the gateway itself
10
+ * misbehaves (chicken-and-egg: the LLM diagnoses gateway breakage
11
+ * via these two).
12
+ *
13
+ * L1 — essential forwarded (17 tools)
14
+ * Routed through the CapturingServer to the real server. Appear in
15
+ * `tools/list` as first-class entries (Cursor-cap-safe).
16
+ *
17
+ * L2 — advanced captured (7 tools)
18
+ * Routed through the CapturingServer into its in-process advanced
19
+ * registry; reachable via the single `yootheme_builder_advanced`
20
+ * gateway tool. Hidden from `tools/list`.
21
+ *
22
+ * Gateway — `yootheme_builder_advanced`
23
+ * Registered LAST on the real server, after every L1/L2 tool is
24
+ * placed and the advanced registry is final.
25
+ *
26
+ * Result: `tools/list.length === 20` (17 L1 + 2 L3 + 1 gateway), and the
27
+ * full callable tool surface is 27 (20 advertised + 7 advanced reachable
28
+ * through the gateway).
29
+ *
30
+ * @license MIT
31
+ */
32
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
33
+ import { CapturingServer } from './gateway/capturing-server.js';
34
+ import type { ClientPool } from './sites/client-pool.js';
35
+ import type { SiteRegistry } from './sites/registry.js';
36
+ import { type ToolDefinition } from './tools/index.js';
37
+ export declare const SERVER_NAME = "@wootsup/yt-builder-mcp";
38
+ export declare const SERVER_VERSION: string;
39
+ /**
40
+ * W8 — stable URI under which the live sites snapshot is exposed via
41
+ * MCP `resources/*`. Single fixed resource (no list-changed needed) —
42
+ * MCP hosts can fetch the current registry roster on demand without
43
+ * having to invoke a tool.
44
+ */
45
+ export declare const SITES_RESOURCE_URI = "sites://current";
46
+ /** Human-readable resource name surfaced in `resources/list`. */
47
+ export declare const SITES_RESOURCE_NAME = "Currently configured sites";
48
+ /** Short description for `resources/list` consumers. */
49
+ export declare const SITES_RESOURCE_DESCRIPTION: string;
50
+ /** MIME type for the `sites://current` payload. */
51
+ export declare const SITES_RESOURCE_MIME_TYPE = "application/json";
52
+ /**
53
+ * Bearer-redacted JSON payload shape for the W8 `sites://current`
54
+ * resource. Mirrors the structured-content shape of the
55
+ * `yootheme_builder_sites_list` tool but never reveals bearer or
56
+ * bearer_ref — only safe-to-render display fields land in the
57
+ * `sites[]` rows.
58
+ */
59
+ export interface SitesResourcePayload {
60
+ readonly default_site_id: string | null;
61
+ readonly sites: readonly SitesResourceRow[];
62
+ }
63
+ /**
64
+ * One row inside {@link SitesResourcePayload.sites}. Strictly the
65
+ * fields enumerated by plan §W8 Z.929 — no bearer / bearer_ref /
66
+ * bearer_source. `label` and `platform_resolved` are optional (only
67
+ * present when the underlying registry entry / probe carries them).
68
+ */
69
+ export interface SitesResourceRow {
70
+ readonly site_id: string;
71
+ readonly url: string;
72
+ readonly platform: 'wordpress' | 'joomla' | 'auto';
73
+ readonly is_default: boolean;
74
+ readonly label?: string;
75
+ }
76
+ /**
77
+ * Build the JSON payload served by the `sites://current` resource.
78
+ *
79
+ * Field projection (per plan §W8 Z.925-933):
80
+ * - `default_site_id` from {@link SiteRegistry.defaultSiteId}.
81
+ * - `sites[].site_id` / `url` / `is_default` / `label` verbatim.
82
+ * - `sites[].platform` prefers the resolved kind from the W3 memo
83
+ * cache (peek-only, no probe) and falls back to the configured
84
+ * hint when no probe has run.
85
+ *
86
+ * Bearer fields are NEVER referenced. The `bearer_source` hint that
87
+ * the W7 `sites_list` tool exposes is intentionally omitted from this
88
+ * resource: even the "plain" vs "op" hint hints at storage layout,
89
+ * and the resource is positioned as a host-facing public roster.
90
+ */
91
+ export declare function buildSitesResourcePayload(registry: SiteRegistry): SitesResourcePayload;
92
+ export interface CreateServerOptions {
93
+ /**
94
+ * Multi-site client pool — replaces the single `client` parameter
95
+ * shipped pre-W6. Each tool handler asks `pool.resolve(site_id)`
96
+ * for the per-call REST client + resolved site descriptor.
97
+ */
98
+ readonly pool: ClientPool;
99
+ /** Override the tool set (defaults to `buildAllTools`). */
100
+ readonly tools?: readonly ToolDefinition[];
101
+ }
102
+ export interface CreatedServer {
103
+ readonly mcp: McpServer;
104
+ /** The full set of tool definitions registered across all 3 lanes + gateway. */
105
+ readonly tools: readonly ToolDefinition[];
106
+ /** The CapturingServer wrapping `mcp` — exposed for test helpers. */
107
+ readonly capturing: CapturingServer;
108
+ }
109
+ export declare function createServer(options: CreateServerOptions): CreatedServer;
110
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAMH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;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