@wootsup/yt-builder-mcp 1.1.6 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (430) hide show
  1. package/README.md +7 -7
  2. package/bin/yt-builder-mcp.js +55 -40
  3. package/dist/auth.d.ts +137 -0
  4. package/dist/auth.d.ts.map +1 -0
  5. package/dist/auth.js +244 -0
  6. package/dist/auth.js.map +1 -0
  7. package/dist/cli/invocation-decision.d.ts +57 -0
  8. package/dist/cli/invocation-decision.d.ts.map +1 -0
  9. package/dist/cli/invocation-decision.js +86 -0
  10. package/dist/cli/invocation-decision.js.map +1 -0
  11. package/dist/client.d.ts +112 -0
  12. package/dist/client.d.ts.map +1 -0
  13. package/dist/client.js +190 -0
  14. package/dist/client.js.map +1 -0
  15. package/dist/clients/claude-code.d.ts +18 -0
  16. package/dist/clients/claude-code.d.ts.map +1 -0
  17. package/dist/clients/claude-code.js +55 -0
  18. package/dist/clients/claude-code.js.map +1 -0
  19. package/dist/clients/claude-desktop.d.ts +19 -0
  20. package/dist/clients/claude-desktop.d.ts.map +1 -0
  21. package/dist/clients/claude-desktop.js +58 -0
  22. package/dist/clients/claude-desktop.js.map +1 -0
  23. package/dist/clients/cline.d.ts +26 -0
  24. package/dist/clients/cline.d.ts.map +1 -0
  25. package/dist/clients/cline.js +82 -0
  26. package/dist/clients/cline.js.map +1 -0
  27. package/dist/clients/codex-cli.d.ts +42 -0
  28. package/dist/clients/codex-cli.d.ts.map +1 -0
  29. package/dist/clients/codex-cli.js +292 -0
  30. package/dist/clients/codex-cli.js.map +1 -0
  31. package/dist/clients/continue.d.ts +13 -0
  32. package/dist/clients/continue.d.ts.map +1 -0
  33. package/dist/clients/continue.js +121 -0
  34. package/dist/clients/continue.js.map +1 -0
  35. package/dist/clients/cursor.d.ts +12 -0
  36. package/dist/clients/cursor.d.ts.map +1 -0
  37. package/dist/clients/cursor.js +40 -0
  38. package/dist/clients/cursor.js.map +1 -0
  39. package/dist/clients/gemini-cli.d.ts +18 -0
  40. package/dist/clients/gemini-cli.d.ts.map +1 -0
  41. package/dist/clients/gemini-cli.js +46 -0
  42. package/dist/clients/gemini-cli.js.map +1 -0
  43. package/dist/clients/home.d.ts +14 -0
  44. package/dist/clients/home.d.ts.map +1 -0
  45. package/dist/clients/home.js +20 -0
  46. package/dist/clients/home.js.map +1 -0
  47. package/dist/clients/index.d.ts +156 -0
  48. package/dist/clients/index.d.ts.map +1 -0
  49. package/dist/clients/index.js +213 -0
  50. package/dist/clients/index.js.map +1 -0
  51. package/dist/clients/roo-code.d.ts +23 -0
  52. package/dist/clients/roo-code.d.ts.map +1 -0
  53. package/dist/clients/roo-code.js +71 -0
  54. package/dist/clients/roo-code.js.map +1 -0
  55. package/dist/clients/zed.d.ts +12 -0
  56. package/dist/clients/zed.d.ts.map +1 -0
  57. package/dist/clients/zed.js +43 -0
  58. package/dist/clients/zed.js.map +1 -0
  59. package/dist/errors/hints.d.ts +51 -0
  60. package/dist/errors/hints.d.ts.map +1 -0
  61. package/dist/errors/hints.js +95 -0
  62. package/dist/errors/hints.js.map +1 -0
  63. package/dist/errors/mask.d.ts +35 -0
  64. package/dist/errors/mask.d.ts.map +1 -0
  65. package/dist/errors/mask.js +49 -0
  66. package/dist/errors/mask.js.map +1 -0
  67. package/dist/errors/sanitize.d.ts +31 -0
  68. package/dist/errors/sanitize.d.ts.map +1 -0
  69. package/dist/errors/sanitize.js +100 -0
  70. package/dist/errors/sanitize.js.map +1 -0
  71. package/dist/errors.d.ts +42 -0
  72. package/dist/errors.d.ts.map +1 -0
  73. package/dist/errors.js +61 -0
  74. package/dist/errors.js.map +1 -0
  75. package/dist/gateway/advanced-tool/discovery.d.ts +19 -0
  76. package/dist/gateway/advanced-tool/discovery.d.ts.map +1 -0
  77. package/dist/gateway/advanced-tool/discovery.js +53 -0
  78. package/dist/gateway/advanced-tool/discovery.js.map +1 -0
  79. package/dist/gateway/advanced-tool/domains.d.ts +47 -0
  80. package/dist/gateway/advanced-tool/domains.d.ts.map +1 -0
  81. package/dist/gateway/advanced-tool/domains.js +94 -0
  82. package/dist/gateway/advanced-tool/domains.js.map +1 -0
  83. package/dist/gateway/advanced-tool/execute.d.ts +29 -0
  84. package/dist/gateway/advanced-tool/execute.d.ts.map +1 -0
  85. package/dist/gateway/advanced-tool/execute.js +54 -0
  86. package/dist/gateway/advanced-tool/execute.js.map +1 -0
  87. package/dist/gateway/advanced-tool/index.d.ts +36 -0
  88. package/dist/gateway/advanced-tool/index.d.ts.map +1 -0
  89. package/dist/gateway/advanced-tool/index.js +39 -0
  90. package/dist/gateway/advanced-tool/index.js.map +1 -0
  91. package/dist/gateway/advanced-tool/register.d.ts +18 -0
  92. package/dist/gateway/advanced-tool/register.d.ts.map +1 -0
  93. package/dist/gateway/advanced-tool/register.js +69 -0
  94. package/dist/gateway/advanced-tool/register.js.map +1 -0
  95. package/dist/gateway/advanced-tool.d.ts +13 -0
  96. package/dist/gateway/advanced-tool.d.ts.map +1 -0
  97. package/dist/gateway/advanced-tool.js +13 -0
  98. package/dist/gateway/advanced-tool.js.map +1 -0
  99. package/dist/gateway/capturing-server.d.ts +117 -0
  100. package/dist/gateway/capturing-server.d.ts.map +1 -0
  101. package/dist/gateway/capturing-server.js +103 -0
  102. package/dist/gateway/capturing-server.js.map +1 -0
  103. package/dist/gateway/essentials.d.ts +50 -0
  104. package/dist/gateway/essentials.d.ts.map +1 -0
  105. package/dist/gateway/essentials.js +108 -0
  106. package/dist/gateway/essentials.js.map +1 -0
  107. package/dist/gateway/test-support.d.ts +41 -0
  108. package/dist/gateway/test-support.d.ts.map +1 -0
  109. package/dist/gateway/test-support.js +60 -0
  110. package/dist/gateway/test-support.js.map +1 -0
  111. package/dist/index.d.ts +30 -0
  112. package/dist/index.d.ts.map +1 -0
  113. package/dist/index.js +119 -0
  114. package/dist/index.js.map +1 -0
  115. package/dist/install-skill.d.ts +43 -0
  116. package/dist/install-skill.d.ts.map +1 -0
  117. package/dist/install-skill.js +118 -0
  118. package/dist/install-skill.js.map +1 -0
  119. package/dist/platform/detect.d.ts +64 -0
  120. package/dist/platform/detect.d.ts.map +1 -0
  121. package/dist/platform/detect.js +98 -0
  122. package/dist/platform/detect.js.map +1 -0
  123. package/dist/platform/index.d.ts +121 -0
  124. package/dist/platform/index.d.ts.map +1 -0
  125. package/dist/platform/index.js +176 -0
  126. package/dist/platform/index.js.map +1 -0
  127. package/dist/platform/joomla.d.ts +44 -0
  128. package/dist/platform/joomla.d.ts.map +1 -0
  129. package/dist/platform/joomla.js +46 -0
  130. package/dist/platform/joomla.js.map +1 -0
  131. package/dist/server.d.ts +110 -0
  132. package/dist/server.d.ts.map +1 -0
  133. package/dist/server.js +274 -0
  134. package/dist/server.js.map +1 -0
  135. package/dist/setup-cli-confirm.d.ts +36 -0
  136. package/dist/setup-cli-confirm.d.ts.map +1 -0
  137. package/dist/setup-cli-confirm.js +59 -0
  138. package/dist/setup-cli-confirm.js.map +1 -0
  139. package/dist/setup-cli.d.ts +193 -0
  140. package/dist/setup-cli.d.ts.map +1 -0
  141. package/dist/setup-cli.js +1032 -0
  142. package/dist/setup-cli.js.map +1 -0
  143. package/dist/setup-prompts.d.ts +64 -0
  144. package/dist/setup-prompts.d.ts.map +1 -0
  145. package/dist/setup-prompts.js +221 -0
  146. package/dist/setup-prompts.js.map +1 -0
  147. package/dist/setup-token.d.ts +38 -0
  148. package/dist/setup-token.d.ts.map +1 -0
  149. package/dist/setup-token.js +106 -0
  150. package/dist/setup-token.js.map +1 -0
  151. package/dist/setup-wizard-defaults.d.ts +43 -0
  152. package/dist/setup-wizard-defaults.d.ts.map +1 -0
  153. package/dist/setup-wizard-defaults.js +160 -0
  154. package/dist/setup-wizard-defaults.js.map +1 -0
  155. package/dist/setup-wizard-handshake.d.ts +25 -0
  156. package/dist/setup-wizard-handshake.d.ts.map +1 -0
  157. package/dist/setup-wizard-handshake.js +103 -0
  158. package/dist/setup-wizard-handshake.js.map +1 -0
  159. package/dist/setup-wizard-types.d.ts +164 -0
  160. package/dist/setup-wizard-types.d.ts.map +1 -0
  161. package/dist/setup-wizard-types.js +11 -0
  162. package/dist/setup-wizard-types.js.map +1 -0
  163. package/dist/setup-wizard.d.ts +33 -0
  164. package/dist/setup-wizard.d.ts.map +1 -0
  165. package/dist/setup-wizard.js +199 -0
  166. package/dist/setup-wizard.js.map +1 -0
  167. package/dist/setup.d.ts +17 -0
  168. package/dist/setup.d.ts.map +1 -0
  169. package/dist/setup.js +33 -0
  170. package/dist/setup.js.map +1 -0
  171. package/dist/sites/bootstrap.d.ts +41 -0
  172. package/dist/sites/bootstrap.d.ts.map +1 -0
  173. package/dist/sites/bootstrap.js +58 -0
  174. package/dist/sites/bootstrap.js.map +1 -0
  175. package/dist/sites/cli/add-site.d.ts +106 -0
  176. package/dist/sites/cli/add-site.d.ts.map +1 -0
  177. package/dist/sites/cli/add-site.js +185 -0
  178. package/dist/sites/cli/add-site.js.map +1 -0
  179. package/dist/sites/cli/list-sites.d.ts +40 -0
  180. package/dist/sites/cli/list-sites.d.ts.map +1 -0
  181. package/dist/sites/cli/list-sites.js +116 -0
  182. package/dist/sites/cli/list-sites.js.map +1 -0
  183. package/dist/sites/cli/remove-site.d.ts +60 -0
  184. package/dist/sites/cli/remove-site.d.ts.map +1 -0
  185. package/dist/sites/cli/remove-site.js +120 -0
  186. package/dist/sites/cli/remove-site.js.map +1 -0
  187. package/dist/sites/cli/set-default.d.ts +47 -0
  188. package/dist/sites/cli/set-default.d.ts.map +1 -0
  189. package/dist/sites/cli/set-default.js +69 -0
  190. package/dist/sites/cli/set-default.js.map +1 -0
  191. package/dist/sites/cli/test-site.d.ts +77 -0
  192. package/dist/sites/cli/test-site.d.ts.map +1 -0
  193. package/dist/sites/cli/test-site.js +146 -0
  194. package/dist/sites/cli/test-site.js.map +1 -0
  195. package/dist/sites/client-pool.d.ts +157 -0
  196. package/dist/sites/client-pool.d.ts.map +1 -0
  197. package/dist/sites/client-pool.js +222 -0
  198. package/dist/sites/client-pool.js.map +1 -0
  199. package/dist/sites/env-bridge.d.ts +55 -0
  200. package/dist/sites/env-bridge.d.ts.map +1 -0
  201. package/dist/sites/env-bridge.js +94 -0
  202. package/dist/sites/env-bridge.js.map +1 -0
  203. package/dist/sites/paths.d.ts +21 -0
  204. package/dist/sites/paths.d.ts.map +1 -0
  205. package/dist/sites/paths.js +37 -0
  206. package/dist/sites/paths.js.map +1 -0
  207. package/dist/sites/probe.d.ts +60 -0
  208. package/dist/sites/probe.d.ts.map +1 -0
  209. package/dist/sites/probe.js +112 -0
  210. package/dist/sites/probe.js.map +1 -0
  211. package/dist/sites/registry.d.ts +142 -0
  212. package/dist/sites/registry.d.ts.map +1 -0
  213. package/dist/sites/registry.js +163 -0
  214. package/dist/sites/registry.js.map +1 -0
  215. package/dist/sites/schema.d.ts +90 -0
  216. package/dist/sites/schema.d.ts.map +1 -0
  217. package/dist/sites/schema.js +71 -0
  218. package/dist/sites/schema.js.map +1 -0
  219. package/dist/sites/secret-resolver.d.ts +115 -0
  220. package/dist/sites/secret-resolver.d.ts.map +1 -0
  221. package/dist/sites/secret-resolver.js +225 -0
  222. package/dist/sites/secret-resolver.js.map +1 -0
  223. package/dist/sites/store.d.ts +82 -0
  224. package/dist/sites/store.d.ts.map +1 -0
  225. package/dist/sites/store.js +198 -0
  226. package/dist/sites/store.js.map +1 -0
  227. package/dist/sites/tools/index.d.ts +28 -0
  228. package/dist/sites/tools/index.d.ts.map +1 -0
  229. package/dist/sites/tools/index.js +38 -0
  230. package/dist/sites/tools/index.js.map +1 -0
  231. package/dist/sites/tools/sites-list.d.ts +48 -0
  232. package/dist/sites/tools/sites-list.d.ts.map +1 -0
  233. package/dist/sites/tools/sites-list.js +137 -0
  234. package/dist/sites/tools/sites-list.js.map +1 -0
  235. package/dist/sites/tools/sites-test.d.ts +47 -0
  236. package/dist/sites/tools/sites-test.d.ts.map +1 -0
  237. package/dist/sites/tools/sites-test.js +148 -0
  238. package/dist/sites/tools/sites-test.js.map +1 -0
  239. package/dist/sites/tools/use-site.d.ts +47 -0
  240. package/dist/sites/tools/use-site.d.ts.map +1 -0
  241. package/dist/sites/tools/use-site.js +183 -0
  242. package/dist/sites/tools/use-site.js.map +1 -0
  243. package/dist/skill-loader.d.ts +111 -0
  244. package/dist/skill-loader.d.ts.map +1 -0
  245. package/dist/skill-loader.js +191 -0
  246. package/dist/skill-loader.js.map +1 -0
  247. package/dist/tools/elements/builders.d.ts +24 -0
  248. package/dist/tools/elements/builders.d.ts.map +1 -0
  249. package/dist/tools/elements/builders.js +208 -0
  250. package/dist/tools/elements/builders.js.map +1 -0
  251. package/dist/tools/elements/handlers-write.d.ts +49 -0
  252. package/dist/tools/elements/handlers-write.d.ts.map +1 -0
  253. package/dist/tools/elements/handlers-write.js +341 -0
  254. package/dist/tools/elements/handlers-write.js.map +1 -0
  255. package/dist/tools/elements/handlers.d.ts +70 -0
  256. package/dist/tools/elements/handlers.d.ts.map +1 -0
  257. package/dist/tools/elements/handlers.js +292 -0
  258. package/dist/tools/elements/handlers.js.map +1 -0
  259. package/dist/tools/elements/index.d.ts +28 -0
  260. package/dist/tools/elements/index.d.ts.map +1 -0
  261. package/dist/tools/elements/index.js +27 -0
  262. package/dist/tools/elements/index.js.map +1 -0
  263. package/dist/tools/elements.d.ts +13 -0
  264. package/dist/tools/elements.d.ts.map +1 -0
  265. package/dist/tools/elements.js +13 -0
  266. package/dist/tools/elements.js.map +1 -0
  267. package/dist/tools/elicitation.d.ts +87 -0
  268. package/dist/tools/elicitation.d.ts.map +1 -0
  269. package/dist/tools/elicitation.js +100 -0
  270. package/dist/tools/elicitation.js.map +1 -0
  271. package/dist/tools/format/elements-format.d.ts +40 -0
  272. package/dist/tools/format/elements-format.d.ts.map +1 -0
  273. package/dist/tools/format/elements-format.js +193 -0
  274. package/dist/tools/format/elements-format.js.map +1 -0
  275. package/dist/tools/format/health-format.d.ts +79 -0
  276. package/dist/tools/format/health-format.d.ts.map +1 -0
  277. package/dist/tools/format/health-format.js +181 -0
  278. package/dist/tools/format/health-format.js.map +1 -0
  279. package/dist/tools/format/inspection-format.d.ts +70 -0
  280. package/dist/tools/format/inspection-format.d.ts.map +1 -0
  281. package/dist/tools/format/inspection-format.js +359 -0
  282. package/dist/tools/format/inspection-format.js.map +1 -0
  283. package/dist/tools/format/pages-format.d.ts +57 -0
  284. package/dist/tools/format/pages-format.d.ts.map +1 -0
  285. package/dist/tools/format/pages-format.js +157 -0
  286. package/dist/tools/format/pages-format.js.map +1 -0
  287. package/dist/tools/format/sources-format.d.ts +44 -0
  288. package/dist/tools/format/sources-format.d.ts.map +1 -0
  289. package/dist/tools/format/sources-format.js +242 -0
  290. package/dist/tools/format/sources-format.js.map +1 -0
  291. package/dist/tools/health.d.ts +22 -0
  292. package/dist/tools/health.d.ts.map +1 -0
  293. package/dist/tools/health.js +220 -0
  294. package/dist/tools/health.js.map +1 -0
  295. package/dist/tools/index.d.ts +30 -0
  296. package/dist/tools/index.d.ts.map +1 -0
  297. package/dist/tools/index.js +39 -0
  298. package/dist/tools/index.js.map +1 -0
  299. package/dist/tools/inspection.d.ts +14 -0
  300. package/dist/tools/inspection.d.ts.map +1 -0
  301. package/dist/tools/inspection.js +401 -0
  302. package/dist/tools/inspection.js.map +1 -0
  303. package/dist/tools/layout-flatten.d.ts +75 -0
  304. package/dist/tools/layout-flatten.d.ts.map +1 -0
  305. package/dist/tools/layout-flatten.js +107 -0
  306. package/dist/tools/layout-flatten.js.map +1 -0
  307. package/dist/tools/multi-items/builders.d.ts +23 -0
  308. package/dist/tools/multi-items/builders.d.ts.map +1 -0
  309. package/dist/tools/multi-items/builders.js +84 -0
  310. package/dist/tools/multi-items/builders.js.map +1 -0
  311. package/dist/tools/multi-items/clean-implode-handler.d.ts +36 -0
  312. package/dist/tools/multi-items/clean-implode-handler.d.ts.map +1 -0
  313. package/dist/tools/multi-items/clean-implode-handler.js +57 -0
  314. package/dist/tools/multi-items/clean-implode-handler.js.map +1 -0
  315. package/dist/tools/multi-items/format/inspection-format.d.ts +41 -0
  316. package/dist/tools/multi-items/format/inspection-format.d.ts.map +1 -0
  317. package/dist/tools/multi-items/format/inspection-format.js +64 -0
  318. package/dist/tools/multi-items/format/inspection-format.js.map +1 -0
  319. package/dist/tools/multi-items/index.d.ts +18 -0
  320. package/dist/tools/multi-items/index.d.ts.map +1 -0
  321. package/dist/tools/multi-items/index.js +18 -0
  322. package/dist/tools/multi-items/index.js.map +1 -0
  323. package/dist/tools/multi-items/inspect-handler.d.ts +76 -0
  324. package/dist/tools/multi-items/inspect-handler.d.ts.map +1 -0
  325. package/dist/tools/multi-items/inspect-handler.js +133 -0
  326. package/dist/tools/multi-items/inspect-handler.js.map +1 -0
  327. package/dist/tools/multi-items/inspection-cache.d.ts +85 -0
  328. package/dist/tools/multi-items/inspection-cache.d.ts.map +1 -0
  329. package/dist/tools/multi-items/inspection-cache.js +126 -0
  330. package/dist/tools/multi-items/inspection-cache.js.map +1 -0
  331. package/dist/tools/multi-items/item-container-map.d.ts +41 -0
  332. package/dist/tools/multi-items/item-container-map.d.ts.map +1 -0
  333. package/dist/tools/multi-items/item-container-map.js +73 -0
  334. package/dist/tools/multi-items/item-container-map.js.map +1 -0
  335. package/dist/tools/pages/builders.d.ts +43 -0
  336. package/dist/tools/pages/builders.d.ts.map +1 -0
  337. package/dist/tools/pages/builders.js +229 -0
  338. package/dist/tools/pages/builders.js.map +1 -0
  339. package/dist/tools/pages/handlers-read.d.ts +33 -0
  340. package/dist/tools/pages/handlers-read.d.ts.map +1 -0
  341. package/dist/tools/pages/handlers-read.js +260 -0
  342. package/dist/tools/pages/handlers-read.js.map +1 -0
  343. package/dist/tools/pages/handlers-write.d.ts +63 -0
  344. package/dist/tools/pages/handlers-write.d.ts.map +1 -0
  345. package/dist/tools/pages/handlers-write.js +127 -0
  346. package/dist/tools/pages/handlers-write.js.map +1 -0
  347. package/dist/tools/pages/index.d.ts +17 -0
  348. package/dist/tools/pages/index.d.ts.map +1 -0
  349. package/dist/tools/pages/index.js +17 -0
  350. package/dist/tools/pages/index.js.map +1 -0
  351. package/dist/tools/pages/schemas.d.ts +157 -0
  352. package/dist/tools/pages/schemas.d.ts.map +1 -0
  353. package/dist/tools/pages/schemas.js +232 -0
  354. package/dist/tools/pages/schemas.js.map +1 -0
  355. package/dist/tools/pages.d.ts +13 -0
  356. package/dist/tools/pages.d.ts.map +1 -0
  357. package/dist/tools/pages.js +13 -0
  358. package/dist/tools/pages.js.map +1 -0
  359. package/dist/tools/pool-resolve-helper.d.ts +83 -0
  360. package/dist/tools/pool-resolve-helper.d.ts.map +1 -0
  361. package/dist/tools/pool-resolve-helper.js +148 -0
  362. package/dist/tools/pool-resolve-helper.js.map +1 -0
  363. package/dist/tools/progress-phases.d.ts +46 -0
  364. package/dist/tools/progress-phases.d.ts.map +1 -0
  365. package/dist/tools/progress-phases.js +48 -0
  366. package/dist/tools/progress-phases.js.map +1 -0
  367. package/dist/tools/shared-schemas.d.ts +25 -0
  368. package/dist/tools/shared-schemas.d.ts.map +1 -0
  369. package/dist/tools/shared-schemas.js +72 -0
  370. package/dist/tools/shared-schemas.js.map +1 -0
  371. package/dist/tools/sources/builders.d.ts +13 -0
  372. package/dist/tools/sources/builders.d.ts.map +1 -0
  373. package/dist/tools/sources/builders.js +118 -0
  374. package/dist/tools/sources/builders.js.map +1 -0
  375. package/dist/tools/sources/handlers-bind.d.ts +28 -0
  376. package/dist/tools/sources/handlers-bind.d.ts.map +1 -0
  377. package/dist/tools/sources/handlers-bind.js +181 -0
  378. package/dist/tools/sources/handlers-bind.js.map +1 -0
  379. package/dist/tools/sources/handlers.d.ts +47 -0
  380. package/dist/tools/sources/handlers.d.ts.map +1 -0
  381. package/dist/tools/sources/handlers.js +108 -0
  382. package/dist/tools/sources/handlers.js.map +1 -0
  383. package/dist/tools/sources/index.d.ts +19 -0
  384. package/dist/tools/sources/index.d.ts.map +1 -0
  385. package/dist/tools/sources/index.js +18 -0
  386. package/dist/tools/sources/index.js.map +1 -0
  387. package/dist/tools/sources.d.ts +14 -0
  388. package/dist/tools/sources.d.ts.map +1 -0
  389. package/dist/tools/sources.js +14 -0
  390. package/dist/tools/sources.js.map +1 -0
  391. package/dist/tools/sparse-fields.d.ts +106 -0
  392. package/dist/tools/sparse-fields.d.ts.map +1 -0
  393. package/dist/tools/sparse-fields.js +165 -0
  394. package/dist/tools/sparse-fields.js.map +1 -0
  395. package/dist/tools/tool-builder/annotations.d.ts +55 -0
  396. package/dist/tools/tool-builder/annotations.d.ts.map +1 -0
  397. package/dist/tools/tool-builder/annotations.js +86 -0
  398. package/dist/tools/tool-builder/annotations.js.map +1 -0
  399. package/dist/tools/tool-builder/define.d.ts +31 -0
  400. package/dist/tools/tool-builder/define.d.ts.map +1 -0
  401. package/dist/tools/tool-builder/define.js +31 -0
  402. package/dist/tools/tool-builder/define.js.map +1 -0
  403. package/dist/tools/tool-builder/index.d.ts +28 -0
  404. package/dist/tools/tool-builder/index.d.ts.map +1 -0
  405. package/dist/tools/tool-builder/index.js +27 -0
  406. package/dist/tools/tool-builder/index.js.map +1 -0
  407. package/dist/tools/tool-builder/results.d.ts +104 -0
  408. package/dist/tools/tool-builder/results.d.ts.map +1 -0
  409. package/dist/tools/tool-builder/results.js +224 -0
  410. package/dist/tools/tool-builder/results.js.map +1 -0
  411. package/dist/tools/tool-builder/types.d.ts +97 -0
  412. package/dist/tools/tool-builder/types.d.ts.map +1 -0
  413. package/dist/tools/tool-builder/types.js +9 -0
  414. package/dist/tools/tool-builder/types.js.map +1 -0
  415. package/dist/tools/tool-builder.d.ts +16 -0
  416. package/dist/tools/tool-builder.d.ts.map +1 -0
  417. package/dist/tools/tool-builder.js +16 -0
  418. package/dist/tools/tool-builder.js.map +1 -0
  419. package/dist/uninstall-skill.d.ts +52 -0
  420. package/dist/uninstall-skill.d.ts.map +1 -0
  421. package/dist/uninstall-skill.js +146 -0
  422. package/dist/uninstall-skill.js.map +1 -0
  423. package/dist/uninstall.d.ts +73 -0
  424. package/dist/uninstall.d.ts.map +1 -0
  425. package/dist/uninstall.js +82 -0
  426. package/dist/uninstall.js.map +1 -0
  427. package/icon.png +0 -0
  428. package/manifest.json +10 -10
  429. package/package.json +4 -1
  430. package/skills/yt-builder-mcp/SKILL.md +30 -26
@@ -0,0 +1,165 @@
1
+ /**
2
+ * Sparse-fields helper — projects per-item field whitelists onto tool
3
+ * responses and exposes per-tool default-sets that the AI client can rely
4
+ * on when calling read tools without a `fields` parameter.
5
+ *
6
+ * Design references:
7
+ *
8
+ * - §3.5 Sparse-Fields Adaption: 4 read tools opt-in to `fields[]`;
9
+ * the toolkit's `pickFields` is used directly; `projected_fields` is
10
+ * echoed in the result envelope so the LLM can confirm exactly which
11
+ * keys were kept.
12
+ * - §4.4.1 — when used together with `flat: true` projection runs
13
+ * AFTER the depth-first walk so paths are stable before narrowing.
14
+ *
15
+ * Reference implementation pattern: `connections.ts:721, 779-792, 810`
16
+ * in `@wootsup/apimapper-mcp`.
17
+ *
18
+ * The defaults are pure constants so they can be imported, exported, and
19
+ * asserted against in tests without any side-effects.
20
+ *
21
+ * @license MIT
22
+ */
23
+ import { pickFields } from '@getimo/mcp-toolkit';
24
+ import { z } from 'zod';
25
+ // ─── Schema ──────────────────────────────────────────────────────────
26
+ /**
27
+ * Optional whitelist of fields. Per Design §3.5 the cap is 40 to stop
28
+ * runaway prompts from blowing up the request size; nested paths
29
+ * (`props.title`) are supported by the toolkit's `pickFields`.
30
+ */
31
+ export const FIELDS = z
32
+ .array(z.string().min(1))
33
+ .max(40)
34
+ .optional()
35
+ .describe('Optional whitelist of fields to keep per item (supports nested paths like ' +
36
+ '"props.title"). Default: tool-specific compact set (echoed in projected_fields). ' +
37
+ 'Cuts response size — e.g. fields:["path","element_type","label"] for a minimal ' +
38
+ 'navigation view.');
39
+ /**
40
+ * Flag enabling client-side flattening on `page_get_layout`. When true
41
+ * the response shape switches from `{layout, etag}` to
42
+ * `{elements: [...], etag}` and `fields[]` projection becomes meaningful.
43
+ */
44
+ export const FLAT = z
45
+ .boolean()
46
+ .default(false)
47
+ .describe('When true, response is a flat [{path, element_type, ...}] array. Enables ' +
48
+ 'fields[] projection. Default: false (nested layout, no projection).');
49
+ // ─── Default field-sets per tool ─────────────────────────────────────
50
+ /**
51
+ * Default fields echoed when the caller omits `fields`. Following the
52
+ * apimapper-mcp convention these are **echo-only** — projection itself
53
+ * is skipped (default-all preserved) but `projected_fields` still
54
+ * surfaces the implicit compact set so the AI can plan future requests.
55
+ */
56
+ export const DEFAULT_FIELDS_PAGES_LIST = [
57
+ 'id',
58
+ 'label',
59
+ 'type',
60
+ 'elements_count',
61
+ 'modified_at',
62
+ ];
63
+ export const DEFAULT_FIELDS_ELEMENT_LIST = [
64
+ 'path',
65
+ 'element_type',
66
+ 'label',
67
+ ];
68
+ export const DEFAULT_FIELDS_SCHEMA = [
69
+ 'path',
70
+ 'element_type',
71
+ 'label',
72
+ ];
73
+ export const DEFAULT_FIELDS_SOURCES_LIST = [
74
+ 'name',
75
+ 'label',
76
+ 'origin',
77
+ 'kind',
78
+ ];
79
+ export const DEFAULT_FIELDS_TYPES_LIST = [
80
+ 'name',
81
+ 'label',
82
+ 'origin',
83
+ 'has_children_support',
84
+ ];
85
+ /**
86
+ * element_get defaults to "all" because the AI often needs the full
87
+ * props payload for follow-up edits; sparse projection here is opt-in
88
+ * with nested-path support.
89
+ */
90
+ export const DEFAULT_FIELDS_ELEMENT_GET = undefined;
91
+ // ─── Pure projection helpers ─────────────────────────────────────────
92
+ /**
93
+ * Project an array of items to the requested fields. Returns items
94
+ * unchanged when `fields` is undefined (default-all). Skips non-object
95
+ * entries without crashing (they pass through as-is).
96
+ *
97
+ * @param items - The items to project.
98
+ * @param fields - The whitelist; `undefined` skips projection.
99
+ * @param _defaults - Per-tool default set, accepted for interface symmetry
100
+ * with `projectedFieldsEcho` (unused for actual projection — default-all
101
+ * semantics matches the apimapper-mcp reference, see `connections.ts:789`).
102
+ */
103
+ export function projectFields(items, fields, _defaults) {
104
+ if (fields === undefined) {
105
+ return [...items];
106
+ }
107
+ const mutable = [...fields];
108
+ return items.map((item) => {
109
+ if (item === null || typeof item !== 'object' || Array.isArray(item)) {
110
+ return item;
111
+ }
112
+ return pickFields(item, mutable);
113
+ });
114
+ }
115
+ /**
116
+ * Project a single object via the same `pickFields` rules. Returns the
117
+ * object unchanged when `fields` is undefined.
118
+ */
119
+ export function projectFieldsSingle(obj, fields, _defaults) {
120
+ if (fields === undefined) {
121
+ return obj;
122
+ }
123
+ if (obj === null || typeof obj !== 'object' || Array.isArray(obj)) {
124
+ return obj;
125
+ }
126
+ return pickFields(obj, [...fields]);
127
+ }
128
+ /**
129
+ * Compute the `projected_fields` echo. Returns the caller-requested
130
+ * fields when provided; otherwise returns the per-tool default set so
131
+ * the AI client knows exactly which compact view it implicitly opted into.
132
+ *
133
+ * @returns `undefined` only when neither `requested` nor `defaults` was set
134
+ * (e.g. `element_get` with no opt-in) — callers should omit
135
+ * `projected_fields` from the structuredContent in that case.
136
+ */
137
+ export function projectedFieldsEcho(requested, defaults) {
138
+ if (requested !== undefined)
139
+ return requested;
140
+ if (defaults !== undefined)
141
+ return defaults;
142
+ return undefined;
143
+ }
144
+ export function projectionFeedback(items, requested) {
145
+ if (requested === undefined || requested.length === 0)
146
+ return undefined;
147
+ const seen = new Set();
148
+ for (const item of items) {
149
+ if (item && typeof item === 'object' && !Array.isArray(item)) {
150
+ for (const k of Object.keys(item))
151
+ seen.add(k);
152
+ }
153
+ }
154
+ const available = [...seen].sort();
155
+ // A leaf-path counts as "known" if its TOP level matches a key on any
156
+ // item (the toolkit `pickFields` walks dotted paths — `props.title`
157
+ // is reachable as long as `props` exists; per-item depth would be
158
+ // overkill here).
159
+ const unknown = requested.filter((f) => {
160
+ const top = f.split('.')[0];
161
+ return top !== undefined && !seen.has(top);
162
+ });
163
+ return { available_fields: available, unknown_fields: unknown };
164
+ }
165
+ //# sourceMappingURL=sparse-fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sparse-fields.js","sourceRoot":"","sources":["../../src/tools/sparse-fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wEAAwE;AAExE;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC;KAClB,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KACxB,GAAG,CAAC,EAAE,CAAC;KACP,QAAQ,EAAE;KACV,QAAQ,CACL,4EAA4E;IACxE,mFAAmF;IACnF,iFAAiF;IACjF,kBAAkB,CACzB,CAAC;AAEN;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC;KAChB,OAAO,EAAE;KACT,OAAO,CAAC,KAAK,CAAC;KACd,QAAQ,CACL,2EAA2E;IACvE,qEAAqE,CAC5E,CAAC;AAEN,wEAAwE;AAExE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAsB;IACxD,IAAI;IACJ,OAAO;IACP,MAAM;IACN,gBAAgB;IAChB,aAAa;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAsB;IAC1D,MAAM;IACN,cAAc;IACd,OAAO;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACpD,MAAM;IACN,cAAc;IACd,OAAO;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAsB;IAC1D,MAAM;IACN,OAAO;IACP,QAAQ;IACR,MAAM;CACT,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAsB;IACxD,MAAM;IACN,OAAO;IACP,QAAQ;IACR,sBAAsB;CACzB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAkC,SAAS,CAAC;AAEnF,wEAAwE;AAExE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CACzB,KAAmB,EACnB,MAAqC,EACrC,SAA4B;IAE5B,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC;IACtB,CAAC;IACD,MAAM,OAAO,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;IAC5B,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACtB,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACnE,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,UAAU,CAAC,IAAI,EAAE,OAAO,CAAM,CAAC;IAC1C,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAC/B,GAAM,EACN,MAAqC,EACrC,SAAwC;IAExC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,GAAG,CAAC;IACf,CAAC;IACD,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAChE,OAAO,GAAG,CAAC;IACf,CAAC;IACD,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,CAAM,CAAC;AAC7C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAC/B,SAAwC,EACxC,QAAuC;IAEvC,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC9C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IAC5C,OAAO,SAAS,CAAC;AACrB,CAAC;AA4BD,MAAM,UAAU,kBAAkB,CAC9B,KAAyC,EACzC,SAAwC;IAExC,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IACxE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3D,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;gBAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACnD,CAAC;IACL,CAAC;IACD,MAAM,SAAS,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;IACnC,sEAAsE;IACtE,oEAAoE;IACpE,kEAAkE;IAClE,kBAAkB;IAClB,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;QACnC,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,OAAO,GAAG,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC;AACpE,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * `tool-builder/annotations` — annotation builders that produce the
3
+ * MCP `ToolAnnotations` shape. Each helper encodes a verified
4
+ * read/write/destructive policy so call-sites in domain tools (pages,
5
+ * elements, sources, …) get a single one-liner instead of repeating
6
+ * the four-flag pattern verbatim.
7
+ *
8
+ * Split from `tool-builder.ts` in Round-1.5 — see `index.ts` for
9
+ * the cohesion rationale.
10
+ *
11
+ * Audit-v3 / Stream D3 T3 (2026-05-22) — per Anthropic MCP spec
12
+ * 2026-03-16 "Tool Annotations", every registered tool MUST advertise
13
+ * the full 4-tuple `{readOnlyHint, destructiveHint, idempotentHint,
14
+ * openWorldHint}`. Hosts treat `undefined` hints as "potentially
15
+ * destructive" — defaulting `destructiveHint:false` and
16
+ * `idempotentHint:true/false` explicitly removes that ambiguity for
17
+ * read-only and additive tools.
18
+ *
19
+ * `openWorldHint:false` reflects the closed Builder domain: the REST
20
+ * surface writes to a single local `wp_option('yootheme')` blob —
21
+ * there is no external network side-effect or world-modifying action.
22
+ * The gateway (`yootheme_builder_advanced`) is the exception (its
23
+ * effective behaviour is dynamic, decided at call-time).
24
+ *
25
+ * @license MIT
26
+ */
27
+ import type { ToolAnnotations } from './types.js';
28
+ /**
29
+ * Build a `readOnly` annotation.
30
+ *
31
+ * Reads are idempotent by definition — repeating a read returns the
32
+ * same data (modulo concurrent writes). Setting `idempotentHint:true`
33
+ * is informative for hosts that surface a "safe-to-retry" badge.
34
+ */
35
+ export declare function readOnly(title?: string): ToolAnnotations;
36
+ /**
37
+ * Build a `mutating` annotation for idempotent updates (PUT-style
38
+ * writes — full replacement semantics where repeating the call with
39
+ * the same inputs yields the same end-state).
40
+ */
41
+ export declare function mutating(title?: string): ToolAnnotations;
42
+ /**
43
+ * Build a `creating` annotation for non-idempotent creates (POST-style
44
+ * writes — repeating the call produces additional elements / new IDs).
45
+ */
46
+ export declare function creating(title?: string): ToolAnnotations;
47
+ /**
48
+ * Build a `destructive` annotation. Callers MUST also expose a
49
+ * `confirm` param + preview guard (see annotations-pin.test.ts).
50
+ *
51
+ * Destructive ops are inherently non-idempotent (the first call
52
+ * removes data; the second call hits a 404 / already-gone state).
53
+ */
54
+ export declare function destructive(title?: string): ToolAnnotations;
55
+ //# sourceMappingURL=annotations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../../src/tools/tool-builder/annotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,eAAe,CAQxD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,eAAe,CAQxD;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,eAAe,CAQxD;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,eAAe,CAQ3D"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * `tool-builder/annotations` — annotation builders that produce the
3
+ * MCP `ToolAnnotations` shape. Each helper encodes a verified
4
+ * read/write/destructive policy so call-sites in domain tools (pages,
5
+ * elements, sources, …) get a single one-liner instead of repeating
6
+ * the four-flag pattern verbatim.
7
+ *
8
+ * Split from `tool-builder.ts` in Round-1.5 — see `index.ts` for
9
+ * the cohesion rationale.
10
+ *
11
+ * Audit-v3 / Stream D3 T3 (2026-05-22) — per Anthropic MCP spec
12
+ * 2026-03-16 "Tool Annotations", every registered tool MUST advertise
13
+ * the full 4-tuple `{readOnlyHint, destructiveHint, idempotentHint,
14
+ * openWorldHint}`. Hosts treat `undefined` hints as "potentially
15
+ * destructive" — defaulting `destructiveHint:false` and
16
+ * `idempotentHint:true/false` explicitly removes that ambiguity for
17
+ * read-only and additive tools.
18
+ *
19
+ * `openWorldHint:false` reflects the closed Builder domain: the REST
20
+ * surface writes to a single local `wp_option('yootheme')` blob —
21
+ * there is no external network side-effect or world-modifying action.
22
+ * The gateway (`yootheme_builder_advanced`) is the exception (its
23
+ * effective behaviour is dynamic, decided at call-time).
24
+ *
25
+ * @license MIT
26
+ */
27
+ /**
28
+ * Build a `readOnly` annotation.
29
+ *
30
+ * Reads are idempotent by definition — repeating a read returns the
31
+ * same data (modulo concurrent writes). Setting `idempotentHint:true`
32
+ * is informative for hosts that surface a "safe-to-retry" badge.
33
+ */
34
+ export function readOnly(title) {
35
+ return {
36
+ title,
37
+ readOnlyHint: true,
38
+ destructiveHint: false,
39
+ idempotentHint: true,
40
+ openWorldHint: false,
41
+ };
42
+ }
43
+ /**
44
+ * Build a `mutating` annotation for idempotent updates (PUT-style
45
+ * writes — full replacement semantics where repeating the call with
46
+ * the same inputs yields the same end-state).
47
+ */
48
+ export function mutating(title) {
49
+ return {
50
+ title,
51
+ readOnlyHint: false,
52
+ destructiveHint: false,
53
+ idempotentHint: true,
54
+ openWorldHint: false,
55
+ };
56
+ }
57
+ /**
58
+ * Build a `creating` annotation for non-idempotent creates (POST-style
59
+ * writes — repeating the call produces additional elements / new IDs).
60
+ */
61
+ export function creating(title) {
62
+ return {
63
+ title,
64
+ readOnlyHint: false,
65
+ destructiveHint: false,
66
+ idempotentHint: false,
67
+ openWorldHint: false,
68
+ };
69
+ }
70
+ /**
71
+ * Build a `destructive` annotation. Callers MUST also expose a
72
+ * `confirm` param + preview guard (see annotations-pin.test.ts).
73
+ *
74
+ * Destructive ops are inherently non-idempotent (the first call
75
+ * removes data; the second call hits a 404 / already-gone state).
76
+ */
77
+ export function destructive(title) {
78
+ return {
79
+ title,
80
+ readOnlyHint: false,
81
+ destructiveHint: true,
82
+ idempotentHint: false,
83
+ openWorldHint: false,
84
+ };
85
+ }
86
+ //# sourceMappingURL=annotations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotations.js","sourceRoot":"","sources":["../../../src/tools/tool-builder/annotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO;QACH,KAAK;QACL,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACvB,CAAC;AACN,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO;QACH,KAAK;QACL,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACvB,CAAC;AACN,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO;QACH,KAAK;QACL,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,KAAK;QACrB,aAAa,EAAE,KAAK;KACvB,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,OAAO;QACH,KAAK;QACL,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,IAAI;QACrB,cAAc,EAAE,KAAK;QACrB,aAAa,EAAE,KAAK;KACvB,CAAC;AACN,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * `tool-builder/define` — the `defineTool` identity helper plus the
3
+ * progress-reporter re-export.
4
+ *
5
+ * `defineTool` is intentionally trivial at runtime (returns its
6
+ * argument verbatim) — its only job is to preserve the inferred Zod
7
+ * schema shape so each tool's handler is fully type-checked against
8
+ * its inputSchema. The wrapping/sanitising work happens in
9
+ * `results.ts`.
10
+ *
11
+ * Split from `tool-builder.ts` in Round-1.5 — see `index.ts` for
12
+ * the cohesion rationale.
13
+ *
14
+ * @license MIT
15
+ */
16
+ import { createProgressReporter as toolkitCreateProgressReporter } from '@getimo/mcp-toolkit';
17
+ import type { ZodRawShape } from 'zod';
18
+ import type { ToolDefinition } from './types.js';
19
+ /**
20
+ * Re-export the toolkit's `createProgressReporter` under a stable
21
+ * local symbol so every write-handler in this package depends on a
22
+ * single import path. Returns `null` when the caller sent no
23
+ * `progressToken` — handlers then no-op via `progress?.report(...)`.
24
+ */
25
+ export declare const createProgressReporter: typeof toolkitCreateProgressReporter;
26
+ /**
27
+ * `defineTool` — preserves the inferred Zod-schema shape so each
28
+ * tool's handler is fully type-checked against its inputSchema.
29
+ */
30
+ export declare function defineTool<TSchema extends ZodRawShape>(def: ToolDefinition<TSchema>): ToolDefinition<TSchema>;
31
+ //# sourceMappingURL=define.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../../../src/tools/tool-builder/define.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,sBAAsB,IAAI,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,sCAAgC,CAAC;AAEpE;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,SAAS,WAAW,EAClD,GAAG,EAAE,cAAc,CAAC,OAAO,CAAC,GAC7B,cAAc,CAAC,OAAO,CAAC,CAEzB"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * `tool-builder/define` — the `defineTool` identity helper plus the
3
+ * progress-reporter re-export.
4
+ *
5
+ * `defineTool` is intentionally trivial at runtime (returns its
6
+ * argument verbatim) — its only job is to preserve the inferred Zod
7
+ * schema shape so each tool's handler is fully type-checked against
8
+ * its inputSchema. The wrapping/sanitising work happens in
9
+ * `results.ts`.
10
+ *
11
+ * Split from `tool-builder.ts` in Round-1.5 — see `index.ts` for
12
+ * the cohesion rationale.
13
+ *
14
+ * @license MIT
15
+ */
16
+ import { createProgressReporter as toolkitCreateProgressReporter } from '@getimo/mcp-toolkit';
17
+ /**
18
+ * Re-export the toolkit's `createProgressReporter` under a stable
19
+ * local symbol so every write-handler in this package depends on a
20
+ * single import path. Returns `null` when the caller sent no
21
+ * `progressToken` — handlers then no-op via `progress?.report(...)`.
22
+ */
23
+ export const createProgressReporter = toolkitCreateProgressReporter;
24
+ /**
25
+ * `defineTool` — preserves the inferred Zod-schema shape so each
26
+ * tool's handler is fully type-checked against its inputSchema.
27
+ */
28
+ export function defineTool(def) {
29
+ return def;
30
+ }
31
+ //# sourceMappingURL=define.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define.js","sourceRoot":"","sources":["../../../src/tools/tool-builder/define.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,sBAAsB,IAAI,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAI9F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,UAAU,UAAU,CACtB,GAA4B;IAE5B,OAAO,GAAG,CAAC;AACf,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * `tool-builder/index` — barrel re-export for the split
3
+ * tool-definition system.
4
+ *
5
+ * Round-1.5: structural split of the former monolithic
6
+ * `tool-builder.ts` (320 LoC). Cohesion is preserved by topic:
7
+ *
8
+ * - `types.ts` — pure type declarations (no runtime imports
9
+ * beyond type-only `zod` + SDK notifications)
10
+ * - `annotations.ts` — `readOnly` / `mutating` / `creating` /
11
+ * `destructive` annotation builders
12
+ * - `results.ts` — `jsonResult` / `errorResult` /
13
+ * `structuredResult` / `confirmGuard` envelope
14
+ * builders + the shared `sanitizeContentItem`
15
+ * helper (single LLM-boundary mask)
16
+ * - `define.ts` — `defineTool` identity helper + progress-
17
+ * reporter re-export
18
+ *
19
+ * The parent file `../tool-builder.ts` re-exports this barrel so
20
+ * existing `./tool-builder.js` imports keep working without churn.
21
+ *
22
+ * @license MIT
23
+ */
24
+ export type { AnyToolDefinition, HandlerExtra, ToolAnnotations, ToolContent, ToolDefinition, ToolHandler, ToolResult, } from './types.js';
25
+ export { creating, destructive, mutating, readOnly, } from './annotations.js';
26
+ export { confirmGuard, errorResult, jsonResult, structuredResult, withSiteMeta, } from './results.js';
27
+ export { createProgressReporter, defineTool } from './define.js';
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/tool-builder/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,YAAY,EACR,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,WAAW,EACX,cAAc,EACd,WAAW,EACX,UAAU,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EACH,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,QAAQ,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACH,YAAY,EACZ,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,YAAY,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * `tool-builder/index` — barrel re-export for the split
3
+ * tool-definition system.
4
+ *
5
+ * Round-1.5: structural split of the former monolithic
6
+ * `tool-builder.ts` (320 LoC). Cohesion is preserved by topic:
7
+ *
8
+ * - `types.ts` — pure type declarations (no runtime imports
9
+ * beyond type-only `zod` + SDK notifications)
10
+ * - `annotations.ts` — `readOnly` / `mutating` / `creating` /
11
+ * `destructive` annotation builders
12
+ * - `results.ts` — `jsonResult` / `errorResult` /
13
+ * `structuredResult` / `confirmGuard` envelope
14
+ * builders + the shared `sanitizeContentItem`
15
+ * helper (single LLM-boundary mask)
16
+ * - `define.ts` — `defineTool` identity helper + progress-
17
+ * reporter re-export
18
+ *
19
+ * The parent file `../tool-builder.ts` re-exports this barrel so
20
+ * existing `./tool-builder.js` imports keep working without churn.
21
+ *
22
+ * @license MIT
23
+ */
24
+ export { creating, destructive, mutating, readOnly, } from './annotations.js';
25
+ export { confirmGuard, errorResult, jsonResult, structuredResult, withSiteMeta, } from './results.js';
26
+ export { createProgressReporter, defineTool } from './define.js';
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/tool-builder/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAWH,OAAO,EACH,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,QAAQ,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACH,YAAY,EACZ,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,YAAY,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * `tool-builder/results` — envelope builders (`jsonResult`,
3
+ * `errorResult`, `structuredResult`, `confirmGuard`) + the shared
4
+ * `sanitizeContentItem` helper. Every payload accepted here runs
5
+ * through the `sanitizeSecrets` / `sanitizeForLogs` boundary so an
6
+ * upstream regression can never land in the LLM context. The mask
7
+ * is concentrated here — `define.ts` and call-sites do not re-mask.
8
+ *
9
+ * Split from `tool-builder.ts` in Round-1.5.
10
+ *
11
+ * @license MIT
12
+ */
13
+ import type { ResolvedSite } from '../../sites/registry.js';
14
+ import type { ToolContent, ToolResult } from './types.js';
15
+ /**
16
+ * Convert any JSON-serializable value into the MCP content envelope
17
+ * (2-space JSON). Wave G.6.4b: every payload is deep-walked through
18
+ * `sanitizeSecrets` before stringification so an upstream regression
19
+ * (REST handler surfacing `oauth_refresh_token`, `auth_data`, etc.)
20
+ * can never land in the LLM context.
21
+ */
22
+ export declare function jsonResult(payload: unknown, options?: {
23
+ isError?: boolean;
24
+ }): ToolResult;
25
+ /**
26
+ * Render a structured error result with `context` (echoed input) and a
27
+ * recovery `hint`. Wave G.6.3 defense-in-depth: message is
28
+ * mask-and-truncate'd; context is deep-walked so an input param that
29
+ * accidentally echoed a secret-bearing value cannot leak.
30
+ */
31
+ export declare function errorResult(opts: {
32
+ error: unknown;
33
+ context: Record<string, unknown>;
34
+ hint: string;
35
+ }): ToolResult;
36
+ /**
37
+ * Confirm-guard preview helper for destructive tools. Returns the
38
+ * preview `ToolResult` when `confirm` is false; callers `return` it
39
+ * before executing the destructive REST call.
40
+ */
41
+ export declare function confirmGuard(opts: {
42
+ operation: string;
43
+ details: Record<string, unknown>;
44
+ }): ToolResult;
45
+ /**
46
+ * Merge a toolkit `StructuredCallToolResult` (carries `content[0].text`
47
+ * + `_meta.ui`) with a domain-typed `structuredContent` payload. The
48
+ * result satisfies both Rich-Card hosts (read `_meta.ui`) AND
49
+ * structured-output hosts (read `structuredContent`, may validate
50
+ * against `outputSchema`). Single envelope-merger from every migrated
51
+ * tool's handler — toolkit builders are wrapped, not modified.
52
+ */
53
+ /**
54
+ * W6.2 — site-awareness envelope wrapper.
55
+ *
56
+ * Stamps a resolved-site descriptor onto a tool result so the human +
57
+ * agent both know which connected site the call ran against. Two
58
+ * channels:
59
+ *
60
+ * 1. **text-prefix PRIMARY surface** — `[<label or site_id> @
61
+ * <hostname>] ` is injected at the start of `content[0].text`
62
+ * when that block is a text item. Per the W6 web-research
63
+ * addendum (HCFV §B, Claude-Desktop UI gap doc'd in plan
64
+ * Z.1329-1332), `_meta` is read by the agent but NOT rendered as
65
+ * a UI widget today — so the prefix is the only thing Maria the
66
+ * Claude-Desktop-user reliably SEES. LOAD-BEARING.
67
+ *
68
+ * 2. **result-level `_meta` SECONDARY surface** — `_meta:
69
+ * {site_id, site_url, platform}` is merged into the RESULT-level
70
+ * `_meta` (alongside the toolkit's `_meta.ui`). This is the
71
+ * MCP-spec metadata channel: free-form and NOT validated against
72
+ * the tool's `outputSchema`.
73
+ *
74
+ * W12-R2 fix: site meta was previously merged into
75
+ * `structuredContent._meta`. That broke real hosts. Every tool's
76
+ * `outputSchema` is generated with `additionalProperties:false`,
77
+ * so an undeclared `_meta` key inside `structuredContent` fails
78
+ * client-side schema validation (`-32602`) and surfaces as a
79
+ * "Failed to call tool" toast in Claude Desktop EVEN ON A
80
+ * SUCCESSFUL CALL. `live-verify.mjs` never caught it because raw
81
+ * JSON-RPC calls skip the host's structuredContent↔outputSchema
82
+ * validation. `structuredContent` must stay schema-pure.
83
+ *
84
+ * Pure function: never mutates the input result. Non-text blocks
85
+ * (resource / image / etc.) pass through verbatim. `structuredContent`
86
+ * is passed through UNTOUCHED so it always validates against
87
+ * `outputSchema`. Empty `content[]` is tolerated and produces a
88
+ * prefix-free result (the meta still lands in result-level `_meta`).
89
+ *
90
+ * Label-fallback: `site.label` wins; falls back to `site.id`.
91
+ *
92
+ * Hostname extraction defaults to `new URL(site.url).host`. A
93
+ * malformed URL falls back to the raw site.url string so the prefix
94
+ * remains user-readable even when the registry was hand-edited.
95
+ */
96
+ export declare function withSiteMeta<R extends ToolResult>(result: R, site: ResolvedSite): R;
97
+ export declare function structuredResult(toolkitResult: {
98
+ content: ToolContent[];
99
+ _meta?: {
100
+ ui?: unknown;
101
+ } & Record<string, unknown>;
102
+ isError?: boolean;
103
+ }, structuredContent: Record<string, unknown>): ToolResult;
104
+ //# sourceMappingURL=results.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../../../src/tools/tool-builder/results.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAU1D;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,UAAU,CAM5F;AAaD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAC9B,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;CAChB,GAAG,UAAU,CAYb;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,GAAG,UAAU,CAQb;AAuBD;;;;;;;GAOG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,UAAU,EAC7C,MAAM,EAAE,CAAC,EACT,IAAI,EAAE,YAAY,GACnB,CAAC,CA2DH;AAED,wBAAgB,gBAAgB,CAC5B,aAAa,EAAE;IACX,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE;QAAE,EAAE,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,EACD,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3C,UAAU,CAgBZ"}