@wootsup/yt-builder-mcp 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/manifest.json +1 -1
  2. package/package.json +1 -1
  3. package/skills/{yootheme-builder → yt-builder-mcp}/SKILL.md +1 -1
  4. package/dist/auth.d.ts +0 -39
  5. package/dist/auth.d.ts.map +0 -1
  6. package/dist/auth.js +0 -93
  7. package/dist/auth.js.map +0 -1
  8. package/dist/client.d.ts +0 -84
  9. package/dist/client.d.ts.map +0 -1
  10. package/dist/client.js +0 -151
  11. package/dist/client.js.map +0 -1
  12. package/dist/clients/claude-code.d.ts +0 -18
  13. package/dist/clients/claude-code.d.ts.map +0 -1
  14. package/dist/clients/claude-code.js +0 -53
  15. package/dist/clients/claude-code.js.map +0 -1
  16. package/dist/clients/claude-desktop.d.ts +0 -19
  17. package/dist/clients/claude-desktop.d.ts.map +0 -1
  18. package/dist/clients/claude-desktop.js +0 -56
  19. package/dist/clients/claude-desktop.js.map +0 -1
  20. package/dist/clients/cline.d.ts +0 -26
  21. package/dist/clients/cline.d.ts.map +0 -1
  22. package/dist/clients/cline.js +0 -80
  23. package/dist/clients/cline.js.map +0 -1
  24. package/dist/clients/codex-cli.d.ts +0 -42
  25. package/dist/clients/codex-cli.d.ts.map +0 -1
  26. package/dist/clients/codex-cli.js +0 -194
  27. package/dist/clients/codex-cli.js.map +0 -1
  28. package/dist/clients/continue.d.ts +0 -13
  29. package/dist/clients/continue.d.ts.map +0 -1
  30. package/dist/clients/continue.js +0 -52
  31. package/dist/clients/continue.js.map +0 -1
  32. package/dist/clients/cursor.d.ts +0 -12
  33. package/dist/clients/cursor.d.ts.map +0 -1
  34. package/dist/clients/cursor.js +0 -38
  35. package/dist/clients/cursor.js.map +0 -1
  36. package/dist/clients/gemini-cli.d.ts +0 -18
  37. package/dist/clients/gemini-cli.d.ts.map +0 -1
  38. package/dist/clients/gemini-cli.js +0 -44
  39. package/dist/clients/gemini-cli.js.map +0 -1
  40. package/dist/clients/home.d.ts +0 -14
  41. package/dist/clients/home.d.ts.map +0 -1
  42. package/dist/clients/home.js +0 -20
  43. package/dist/clients/home.js.map +0 -1
  44. package/dist/clients/index.d.ts +0 -52
  45. package/dist/clients/index.d.ts.map +0 -1
  46. package/dist/clients/index.js +0 -72
  47. package/dist/clients/index.js.map +0 -1
  48. package/dist/clients/roo-code.d.ts +0 -23
  49. package/dist/clients/roo-code.d.ts.map +0 -1
  50. package/dist/clients/roo-code.js +0 -69
  51. package/dist/clients/roo-code.js.map +0 -1
  52. package/dist/clients/zed.d.ts +0 -12
  53. package/dist/clients/zed.d.ts.map +0 -1
  54. package/dist/clients/zed.js +0 -41
  55. package/dist/clients/zed.js.map +0 -1
  56. package/dist/errors/hints.d.ts +0 -51
  57. package/dist/errors/hints.d.ts.map +0 -1
  58. package/dist/errors/hints.js +0 -95
  59. package/dist/errors/hints.js.map +0 -1
  60. package/dist/errors/mask.d.ts +0 -35
  61. package/dist/errors/mask.d.ts.map +0 -1
  62. package/dist/errors/mask.js +0 -49
  63. package/dist/errors/mask.js.map +0 -1
  64. package/dist/errors/sanitize.d.ts +0 -31
  65. package/dist/errors/sanitize.d.ts.map +0 -1
  66. package/dist/errors/sanitize.js +0 -90
  67. package/dist/errors/sanitize.js.map +0 -1
  68. package/dist/errors.d.ts +0 -42
  69. package/dist/errors.d.ts.map +0 -1
  70. package/dist/errors.js +0 -61
  71. package/dist/errors.js.map +0 -1
  72. package/dist/gateway/advanced-tool/discovery.d.ts +0 -19
  73. package/dist/gateway/advanced-tool/discovery.d.ts.map +0 -1
  74. package/dist/gateway/advanced-tool/discovery.js +0 -53
  75. package/dist/gateway/advanced-tool/discovery.js.map +0 -1
  76. package/dist/gateway/advanced-tool/domains.d.ts +0 -47
  77. package/dist/gateway/advanced-tool/domains.d.ts.map +0 -1
  78. package/dist/gateway/advanced-tool/domains.js +0 -94
  79. package/dist/gateway/advanced-tool/domains.js.map +0 -1
  80. package/dist/gateway/advanced-tool/execute.d.ts +0 -29
  81. package/dist/gateway/advanced-tool/execute.d.ts.map +0 -1
  82. package/dist/gateway/advanced-tool/execute.js +0 -54
  83. package/dist/gateway/advanced-tool/execute.js.map +0 -1
  84. package/dist/gateway/advanced-tool/index.d.ts +0 -36
  85. package/dist/gateway/advanced-tool/index.d.ts.map +0 -1
  86. package/dist/gateway/advanced-tool/index.js +0 -39
  87. package/dist/gateway/advanced-tool/index.js.map +0 -1
  88. package/dist/gateway/advanced-tool/register.d.ts +0 -18
  89. package/dist/gateway/advanced-tool/register.d.ts.map +0 -1
  90. package/dist/gateway/advanced-tool/register.js +0 -69
  91. package/dist/gateway/advanced-tool/register.js.map +0 -1
  92. package/dist/gateway/advanced-tool.d.ts +0 -13
  93. package/dist/gateway/advanced-tool.d.ts.map +0 -1
  94. package/dist/gateway/advanced-tool.js +0 -13
  95. package/dist/gateway/advanced-tool.js.map +0 -1
  96. package/dist/gateway/capturing-server.d.ts +0 -117
  97. package/dist/gateway/capturing-server.d.ts.map +0 -1
  98. package/dist/gateway/capturing-server.js +0 -103
  99. package/dist/gateway/capturing-server.js.map +0 -1
  100. package/dist/gateway/essentials.d.ts +0 -49
  101. package/dist/gateway/essentials.d.ts.map +0 -1
  102. package/dist/gateway/essentials.js +0 -79
  103. package/dist/gateway/essentials.js.map +0 -1
  104. package/dist/gateway/test-support.d.ts +0 -41
  105. package/dist/gateway/test-support.d.ts.map +0 -1
  106. package/dist/gateway/test-support.js +0 -60
  107. package/dist/gateway/test-support.js.map +0 -1
  108. package/dist/index.d.ts +0 -25
  109. package/dist/index.d.ts.map +0 -1
  110. package/dist/index.js +0 -77
  111. package/dist/index.js.map +0 -1
  112. package/dist/install-skill.d.ts +0 -35
  113. package/dist/install-skill.d.ts.map +0 -1
  114. package/dist/install-skill.js +0 -107
  115. package/dist/install-skill.js.map +0 -1
  116. package/dist/platform/index.d.ts +0 -49
  117. package/dist/platform/index.d.ts.map +0 -1
  118. package/dist/platform/index.js +0 -38
  119. package/dist/platform/index.js.map +0 -1
  120. package/dist/server.d.ts +0 -50
  121. package/dist/server.d.ts.map +0 -1
  122. package/dist/server.js +0 -153
  123. package/dist/server.js.map +0 -1
  124. package/dist/setup-cli.d.ts +0 -100
  125. package/dist/setup-cli.d.ts.map +0 -1
  126. package/dist/setup-cli.js +0 -355
  127. package/dist/setup-cli.js.map +0 -1
  128. package/dist/setup-prompts.d.ts +0 -41
  129. package/dist/setup-prompts.d.ts.map +0 -1
  130. package/dist/setup-prompts.js +0 -142
  131. package/dist/setup-prompts.js.map +0 -1
  132. package/dist/setup-token.d.ts +0 -38
  133. package/dist/setup-token.d.ts.map +0 -1
  134. package/dist/setup-token.js +0 -106
  135. package/dist/setup-token.js.map +0 -1
  136. package/dist/setup-wizard-defaults.d.ts +0 -43
  137. package/dist/setup-wizard-defaults.d.ts.map +0 -1
  138. package/dist/setup-wizard-defaults.js +0 -160
  139. package/dist/setup-wizard-defaults.js.map +0 -1
  140. package/dist/setup-wizard-handshake.d.ts +0 -25
  141. package/dist/setup-wizard-handshake.d.ts.map +0 -1
  142. package/dist/setup-wizard-handshake.js +0 -103
  143. package/dist/setup-wizard-handshake.js.map +0 -1
  144. package/dist/setup-wizard-types.d.ts +0 -148
  145. package/dist/setup-wizard-types.d.ts.map +0 -1
  146. package/dist/setup-wizard-types.js +0 -11
  147. package/dist/setup-wizard-types.js.map +0 -1
  148. package/dist/setup-wizard.d.ts +0 -33
  149. package/dist/setup-wizard.d.ts.map +0 -1
  150. package/dist/setup-wizard.js +0 -166
  151. package/dist/setup-wizard.js.map +0 -1
  152. package/dist/setup.d.ts +0 -17
  153. package/dist/setup.d.ts.map +0 -1
  154. package/dist/setup.js +0 -33
  155. package/dist/setup.js.map +0 -1
  156. package/dist/skill-loader.d.ts +0 -51
  157. package/dist/skill-loader.d.ts.map +0 -1
  158. package/dist/skill-loader.js +0 -78
  159. package/dist/skill-loader.js.map +0 -1
  160. package/dist/tools/elements/builders.d.ts +0 -24
  161. package/dist/tools/elements/builders.d.ts.map +0 -1
  162. package/dist/tools/elements/builders.js +0 -177
  163. package/dist/tools/elements/builders.js.map +0 -1
  164. package/dist/tools/elements/handlers-write.d.ts +0 -49
  165. package/dist/tools/elements/handlers-write.d.ts.map +0 -1
  166. package/dist/tools/elements/handlers-write.js +0 -148
  167. package/dist/tools/elements/handlers-write.js.map +0 -1
  168. package/dist/tools/elements/handlers.d.ts +0 -61
  169. package/dist/tools/elements/handlers.d.ts.map +0 -1
  170. package/dist/tools/elements/handlers.js +0 -170
  171. package/dist/tools/elements/handlers.js.map +0 -1
  172. package/dist/tools/elements/index.d.ts +0 -28
  173. package/dist/tools/elements/index.d.ts.map +0 -1
  174. package/dist/tools/elements/index.js +0 -27
  175. package/dist/tools/elements/index.js.map +0 -1
  176. package/dist/tools/elements.d.ts +0 -13
  177. package/dist/tools/elements.d.ts.map +0 -1
  178. package/dist/tools/elements.js +0 -13
  179. package/dist/tools/elements.js.map +0 -1
  180. package/dist/tools/elicitation.d.ts +0 -87
  181. package/dist/tools/elicitation.d.ts.map +0 -1
  182. package/dist/tools/elicitation.js +0 -100
  183. package/dist/tools/elicitation.js.map +0 -1
  184. package/dist/tools/format/elements-format.d.ts +0 -40
  185. package/dist/tools/format/elements-format.d.ts.map +0 -1
  186. package/dist/tools/format/elements-format.js +0 -194
  187. package/dist/tools/format/elements-format.js.map +0 -1
  188. package/dist/tools/format/health-format.d.ts +0 -73
  189. package/dist/tools/format/health-format.d.ts.map +0 -1
  190. package/dist/tools/format/health-format.js +0 -178
  191. package/dist/tools/format/health-format.js.map +0 -1
  192. package/dist/tools/format/inspection-format.d.ts +0 -58
  193. package/dist/tools/format/inspection-format.d.ts.map +0 -1
  194. package/dist/tools/format/inspection-format.js +0 -164
  195. package/dist/tools/format/inspection-format.js.map +0 -1
  196. package/dist/tools/format/pages-format.d.ts +0 -42
  197. package/dist/tools/format/pages-format.d.ts.map +0 -1
  198. package/dist/tools/format/pages-format.js +0 -113
  199. package/dist/tools/format/pages-format.js.map +0 -1
  200. package/dist/tools/format/sources-format.d.ts +0 -25
  201. package/dist/tools/format/sources-format.d.ts.map +0 -1
  202. package/dist/tools/format/sources-format.js +0 -208
  203. package/dist/tools/format/sources-format.js.map +0 -1
  204. package/dist/tools/health.d.ts +0 -22
  205. package/dist/tools/health.d.ts.map +0 -1
  206. package/dist/tools/health.js +0 -147
  207. package/dist/tools/health.js.map +0 -1
  208. package/dist/tools/index.d.ts +0 -23
  209. package/dist/tools/index.d.ts.map +0 -1
  210. package/dist/tools/index.js +0 -25
  211. package/dist/tools/index.js.map +0 -1
  212. package/dist/tools/inspection.d.ts +0 -14
  213. package/dist/tools/inspection.d.ts.map +0 -1
  214. package/dist/tools/inspection.js +0 -125
  215. package/dist/tools/inspection.js.map +0 -1
  216. package/dist/tools/layout-flatten.d.ts +0 -75
  217. package/dist/tools/layout-flatten.d.ts.map +0 -1
  218. package/dist/tools/layout-flatten.js +0 -107
  219. package/dist/tools/layout-flatten.js.map +0 -1
  220. package/dist/tools/multi-items/builders.d.ts +0 -23
  221. package/dist/tools/multi-items/builders.d.ts.map +0 -1
  222. package/dist/tools/multi-items/builders.js +0 -56
  223. package/dist/tools/multi-items/builders.js.map +0 -1
  224. package/dist/tools/multi-items/clean-implode-handler.d.ts +0 -28
  225. package/dist/tools/multi-items/clean-implode-handler.d.ts.map +0 -1
  226. package/dist/tools/multi-items/clean-implode-handler.js +0 -40
  227. package/dist/tools/multi-items/clean-implode-handler.js.map +0 -1
  228. package/dist/tools/multi-items/index.d.ts +0 -18
  229. package/dist/tools/multi-items/index.d.ts.map +0 -1
  230. package/dist/tools/multi-items/index.js +0 -18
  231. package/dist/tools/multi-items/index.js.map +0 -1
  232. package/dist/tools/multi-items/inspect-handler.d.ts +0 -41
  233. package/dist/tools/multi-items/inspect-handler.d.ts.map +0 -1
  234. package/dist/tools/multi-items/inspect-handler.js +0 -50
  235. package/dist/tools/multi-items/inspect-handler.js.map +0 -1
  236. package/dist/tools/multi-items/item-container-map.d.ts +0 -41
  237. package/dist/tools/multi-items/item-container-map.d.ts.map +0 -1
  238. package/dist/tools/multi-items/item-container-map.js +0 -73
  239. package/dist/tools/multi-items/item-container-map.js.map +0 -1
  240. package/dist/tools/pages/builders.d.ts +0 -14
  241. package/dist/tools/pages/builders.d.ts.map +0 -1
  242. package/dist/tools/pages/builders.js +0 -115
  243. package/dist/tools/pages/builders.js.map +0 -1
  244. package/dist/tools/pages/handlers-read.d.ts +0 -33
  245. package/dist/tools/pages/handlers-read.d.ts.map +0 -1
  246. package/dist/tools/pages/handlers-read.js +0 -161
  247. package/dist/tools/pages/handlers-read.js.map +0 -1
  248. package/dist/tools/pages/handlers-write.d.ts +0 -21
  249. package/dist/tools/pages/handlers-write.d.ts.map +0 -1
  250. package/dist/tools/pages/handlers-write.js +0 -52
  251. package/dist/tools/pages/handlers-write.js.map +0 -1
  252. package/dist/tools/pages/index.d.ts +0 -17
  253. package/dist/tools/pages/index.d.ts.map +0 -1
  254. package/dist/tools/pages/index.js +0 -17
  255. package/dist/tools/pages/index.js.map +0 -1
  256. package/dist/tools/pages/schemas.d.ts +0 -30
  257. package/dist/tools/pages/schemas.d.ts.map +0 -1
  258. package/dist/tools/pages/schemas.js +0 -30
  259. package/dist/tools/pages/schemas.js.map +0 -1
  260. package/dist/tools/pages.d.ts +0 -13
  261. package/dist/tools/pages.d.ts.map +0 -1
  262. package/dist/tools/pages.js +0 -13
  263. package/dist/tools/pages.js.map +0 -1
  264. package/dist/tools/progress-phases.d.ts +0 -46
  265. package/dist/tools/progress-phases.d.ts.map +0 -1
  266. package/dist/tools/progress-phases.js +0 -48
  267. package/dist/tools/progress-phases.js.map +0 -1
  268. package/dist/tools/shared-schemas.d.ts +0 -15
  269. package/dist/tools/shared-schemas.d.ts.map +0 -1
  270. package/dist/tools/shared-schemas.js +0 -30
  271. package/dist/tools/shared-schemas.js.map +0 -1
  272. package/dist/tools/sources/builders.d.ts +0 -13
  273. package/dist/tools/sources/builders.d.ts.map +0 -1
  274. package/dist/tools/sources/builders.js +0 -103
  275. package/dist/tools/sources/builders.js.map +0 -1
  276. package/dist/tools/sources/handlers-bind.d.ts +0 -28
  277. package/dist/tools/sources/handlers-bind.d.ts.map +0 -1
  278. package/dist/tools/sources/handlers-bind.js +0 -129
  279. package/dist/tools/sources/handlers-bind.js.map +0 -1
  280. package/dist/tools/sources/handlers.d.ts +0 -45
  281. package/dist/tools/sources/handlers.d.ts.map +0 -1
  282. package/dist/tools/sources/handlers.js +0 -91
  283. package/dist/tools/sources/handlers.js.map +0 -1
  284. package/dist/tools/sources/index.d.ts +0 -19
  285. package/dist/tools/sources/index.d.ts.map +0 -1
  286. package/dist/tools/sources/index.js +0 -18
  287. package/dist/tools/sources/index.js.map +0 -1
  288. package/dist/tools/sources.d.ts +0 -14
  289. package/dist/tools/sources.d.ts.map +0 -1
  290. package/dist/tools/sources.js +0 -14
  291. package/dist/tools/sources.js.map +0 -1
  292. package/dist/tools/sparse-fields.d.ts +0 -80
  293. package/dist/tools/sparse-fields.d.ts.map +0 -1
  294. package/dist/tools/sparse-fields.js +0 -144
  295. package/dist/tools/sparse-fields.js.map +0 -1
  296. package/dist/tools/tool-builder/annotations.d.ts +0 -55
  297. package/dist/tools/tool-builder/annotations.d.ts.map +0 -1
  298. package/dist/tools/tool-builder/annotations.js +0 -86
  299. package/dist/tools/tool-builder/annotations.js.map +0 -1
  300. package/dist/tools/tool-builder/define.d.ts +0 -31
  301. package/dist/tools/tool-builder/define.d.ts.map +0 -1
  302. package/dist/tools/tool-builder/define.js +0 -31
  303. package/dist/tools/tool-builder/define.js.map +0 -1
  304. package/dist/tools/tool-builder/index.d.ts +0 -28
  305. package/dist/tools/tool-builder/index.d.ts.map +0 -1
  306. package/dist/tools/tool-builder/index.js +0 -27
  307. package/dist/tools/tool-builder/index.js.map +0 -1
  308. package/dist/tools/tool-builder/results.d.ts +0 -59
  309. package/dist/tools/tool-builder/results.d.ts.map +0 -1
  310. package/dist/tools/tool-builder/results.js +0 -125
  311. package/dist/tools/tool-builder/results.js.map +0 -1
  312. package/dist/tools/tool-builder/types.d.ts +0 -82
  313. package/dist/tools/tool-builder/types.d.ts.map +0 -1
  314. package/dist/tools/tool-builder/types.js +0 -9
  315. package/dist/tools/tool-builder/types.js.map +0 -1
  316. package/dist/tools/tool-builder.d.ts +0 -16
  317. package/dist/tools/tool-builder.d.ts.map +0 -1
  318. package/dist/tools/tool-builder.js +0 -16
  319. package/dist/tools/tool-builder.js.map +0 -1
@@ -1,35 +0,0 @@
1
- /**
2
- * `install-skill` subcommand for `@wootsup/yt-builder-mcp`.
3
- *
4
- * Copies the bundled `skills/yootheme-builder/` directory into the user's
5
- * agent-skill folder (typically `~/.claude/skills/`) and appends a marker
6
- * block to `~/AGENTS.md` so other AI clients pick it up automatically.
7
- *
8
- * Idempotent: re-running overwrites existing skill files and skips the
9
- * AGENTS.md append when the marker is already present.
10
- *
11
- * Mirrors the pattern from `@wootsup/mcp install-skill` so users on both
12
- * products get the same workflow.
13
- *
14
- * @license MIT
15
- */
16
- export declare const MARKER_LINE = "<!-- yt-builder-mcp:skill-installed -->";
17
- export interface InstallSkillOptions {
18
- /**
19
- * Package root that contains the bundled `skills/` dir. Defaults to
20
- * walking up from this file (works in both source and `dist/` layouts).
21
- */
22
- readonly pkgRoot?: string;
23
- /** Target dir where the `yootheme-builder/` skill folder will land. */
24
- readonly targetSkillsDir?: string;
25
- /** Target AGENTS.md file to append the marker to. */
26
- readonly targetAgentsFile?: string;
27
- }
28
- export interface InstallSkillResult {
29
- readonly copied: boolean;
30
- readonly markerAlreadyPresent: boolean;
31
- readonly skillTargetDir: string;
32
- readonly agentsFile: string;
33
- }
34
- export declare function installSkill(options?: InstallSkillOptions): Promise<InstallSkillResult>;
35
- //# sourceMappingURL=install-skill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"install-skill.d.ts","sourceRoot":"","sources":["../src/install-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgBH,eAAO,MAAM,WAAW,4CAA4C,CAAC;AAiBrE,MAAM,WAAW,mBAAmB;IAChC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,uEAAuE;IACvE,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,qDAAqD;IACrD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC/B;AAwCD,wBAAsB,YAAY,CAC9B,OAAO,GAAE,mBAAwB,GAClC,OAAO,CAAC,kBAAkB,CAAC,CAuC7B"}
@@ -1,107 +0,0 @@
1
- /**
2
- * `install-skill` subcommand for `@wootsup/yt-builder-mcp`.
3
- *
4
- * Copies the bundled `skills/yootheme-builder/` directory into the user's
5
- * agent-skill folder (typically `~/.claude/skills/`) and appends a marker
6
- * block to `~/AGENTS.md` so other AI clients pick it up automatically.
7
- *
8
- * Idempotent: re-running overwrites existing skill files and skips the
9
- * AGENTS.md append when the marker is already present.
10
- *
11
- * Mirrors the pattern from `@wootsup/mcp install-skill` so users on both
12
- * products get the same workflow.
13
- *
14
- * @license MIT
15
- */
16
- import { appendFileSync, copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync, } from 'node:fs';
17
- import { homedir } from 'node:os';
18
- import { dirname, join, resolve } from 'node:path';
19
- import { fileURLToPath } from 'node:url';
20
- export const MARKER_LINE = '<!-- yt-builder-mcp:skill-installed -->';
21
- const MARKER_BLOCK = `
22
-
23
- ## YT Builder MCP
24
-
25
- ${MARKER_LINE}
26
- The YOOtheme Builder skill is installed at \`~/.claude/skills/yootheme-builder/\`
27
- — the universal-marker path recognised by Claude Desktop and other AI
28
- clients that follow the \`~/AGENTS.md\` discovery protocol.
29
-
30
- It documents the 24 MCP tools (23 domain + 1 gateway, 11 entries in
31
- \`tools/list\`), the 5 canonical workflows (build hero, bind dynamic
32
- source, clone section, diagnose 401, add custom element), and the
33
- gateway routing model. Source: https://github.com/wootsup/yt-builder-mcp.
34
- `;
35
- function defaultPkgRoot() {
36
- // src/install-skill.ts → pkg root is one level up.
37
- // When running from dist/install-skill.js the layout is identical
38
- // (TypeScript emits `dist/install-skill.js` mirroring `src/`).
39
- const here = dirname(fileURLToPath(import.meta.url));
40
- return resolve(here, '..');
41
- }
42
- function copyDirRecursive(src, dst) {
43
- if (!existsSync(dst))
44
- mkdirSync(dst, { recursive: true });
45
- for (const entry of readdirSync(src)) {
46
- const sPath = join(src, entry);
47
- const dPath = join(dst, entry);
48
- const stat = statSync(sPath);
49
- if (stat.isDirectory()) {
50
- copyDirRecursive(sPath, dPath);
51
- }
52
- else {
53
- copyFileSync(sPath, dPath);
54
- }
55
- }
56
- }
57
- /**
58
- * Locate the bundled `skills/yootheme-builder` directory.
59
- *
60
- * Production layout: the skill folder is bundled INSIDE the npm package
61
- * (`packages/mcp/skills/yootheme-builder/`), next to `dist/`. The same
62
- * layout exists in the source tree (per Design-Doc §13.1) so source-mode
63
- * smoke tests and the published tarball use the same single path.
64
- *
65
- * Earlier drafts walked `../..` up to a monorepo-root `skills/` dir;
66
- * that layout was eliminated in Round-1 audit fix C1 because it produced
67
- * a tarball without `skills/` (skill-not-found at first run).
68
- */
69
- function findSkillSource(pkgRoot) {
70
- return join(pkgRoot, 'skills', 'yootheme-builder');
71
- }
72
- export async function installSkill(options = {}) {
73
- const pkgRoot = options.pkgRoot ?? defaultPkgRoot();
74
- const targetSkillsDir = options.targetSkillsDir ?? join(homedir(), '.claude', 'skills');
75
- const targetAgentsFile = options.targetAgentsFile ?? join(homedir(), 'AGENTS.md');
76
- const srcSkillDir = findSkillSource(pkgRoot);
77
- if (!existsSync(srcSkillDir)) {
78
- throw new Error(`Bundled skill not found at ${srcSkillDir}. ` +
79
- `Is the package installed correctly? (pkgRoot=${pkgRoot})`);
80
- }
81
- if (!existsSync(targetSkillsDir)) {
82
- mkdirSync(targetSkillsDir, { recursive: true });
83
- }
84
- const skillTargetDir = join(targetSkillsDir, 'yootheme-builder');
85
- copyDirRecursive(srcSkillDir, skillTargetDir);
86
- let markerAlreadyPresent = false;
87
- if (existsSync(targetAgentsFile)) {
88
- const existing = readFileSync(targetAgentsFile, 'utf-8');
89
- if (existing.includes(MARKER_LINE)) {
90
- markerAlreadyPresent = true;
91
- }
92
- else {
93
- appendFileSync(targetAgentsFile, MARKER_BLOCK);
94
- }
95
- }
96
- else {
97
- // Create with a sensible top-line and the marker block (trimmed).
98
- writeFileSync(targetAgentsFile, MARKER_BLOCK.trimStart(), 'utf-8');
99
- }
100
- return {
101
- copied: true,
102
- markerAlreadyPresent,
103
- skillTargetDir,
104
- agentsFile: targetAgentsFile,
105
- };
106
- }
107
- //# sourceMappingURL=install-skill.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"install-skill.js","sourceRoot":"","sources":["../src/install-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACH,cAAc,EACd,YAAY,EACZ,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,aAAa,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,CAAC,MAAM,WAAW,GAAG,yCAAyC,CAAC;AAErE,MAAM,YAAY,GAAG;;;;EAInB,WAAW;;;;;;;;;CASZ,CAAC;AAqBF,SAAS,cAAc;IACnB,mDAAmD;IACnD,kEAAkE;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,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC;IAE7D,MAAM,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACX,8BAA8B,WAAW,IAAI;YACzC,gDAAgD,OAAO,GAAG,CACjE,CAAC;IACN,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;QAC/B,SAAS,CAAC,eAAe,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,CAAC;IACD,MAAM,cAAc,GAAG,IAAI,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC;IACjE,gBAAgB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IAE9C,IAAI,oBAAoB,GAAG,KAAK,CAAC;IACjC,IAAI,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAC/B,MAAM,QAAQ,GAAG,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QACzD,IAAI,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YACjC,oBAAoB,GAAG,IAAI,CAAC;QAChC,CAAC;aAAM,CAAC;YACJ,cAAc,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;QACnD,CAAC;IACL,CAAC;SAAM,CAAC;QACJ,kEAAkE;QAClE,aAAa,CAAC,gBAAgB,EAAE,YAAY,CAAC,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED,OAAO;QACH,MAAM,EAAE,IAAI;QACZ,oBAAoB;QACpB,cAAc;QACd,UAAU,EAAE,gBAAgB;KAC/B,CAAC;AACN,CAAC"}
@@ -1,49 +0,0 @@
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
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,gDAAgD;AAChD,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,QAAQ,CAAC;AAElD;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACrB,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,oFAAoF;IACpF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,mFAAmF;IACnF,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACtC;AAED,+DAA+D;AAC/D,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AAE1E;;;;;GAKG;AACH,qBAAa,iBAAkB,YAAW,QAAQ;IAC9C,SAAgB,IAAI,EAAG,WAAW,CAAU;IAC5C,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,SAAgB,iBAAiB,EAAE,MAAM,CAAC;gBAE9B,OAAO,EAAE,MAAM;CAI9B"}
@@ -1,38 +0,0 @@
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
- /** 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
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
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"}
package/dist/server.d.ts DELETED
@@ -1,50 +0,0 @@
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 (7 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 (12 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 === 10` (7 L1 + 2 L3 + 1 gateway), and the
27
- * full tool surface is 22 (collectAllRegisteredTools).
28
- *
29
- * @license MIT
30
- */
31
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
32
- import type { RestClient } from './client.js';
33
- import { CapturingServer } from './gateway/capturing-server.js';
34
- import { type ToolDefinition } from './tools/index.js';
35
- export declare const SERVER_NAME = "@wootsup/yt-builder-mcp";
36
- export declare const SERVER_VERSION = "0.2.0-alpha.2";
37
- export interface CreateServerOptions {
38
- readonly client: RestClient;
39
- /** Override the tool set (defaults to `buildAllTools`). */
40
- readonly tools?: readonly ToolDefinition[];
41
- }
42
- export interface CreatedServer {
43
- readonly mcp: McpServer;
44
- /** The full set of tool definitions registered across all 3 lanes + gateway. */
45
- readonly tools: readonly ToolDefinition[];
46
- /** The CapturingServer wrapping `mcp` — exposed for test helpers. */
47
- readonly capturing: CapturingServer;
48
- }
49
- export declare function createServer(options: CreateServerOptions): CreatedServer;
50
- //# sourceMappingURL=server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAsB,MAAM,+BAA+B,CAAC;AAUpF,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE,eAAO,MAAM,WAAW,4BAA4B,CAAC;AACrD,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAE9C,MAAM,WAAW,mBAAmB;IAChC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;CAC9C;AAED,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IAC1C,qEAAqE;IACrE,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;CACvC;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,aAAa,CA0FxE"}
package/dist/server.js DELETED
@@ -1,153 +0,0 @@
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 (7 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 (12 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 === 10` (7 L1 + 2 L3 + 1 gateway), and the
27
- * full tool surface is 22 (collectAllRegisteredTools).
28
- *
29
- * @license MIT
30
- */
31
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
32
- import { registerAdvancedTool } from './gateway/advanced-tool.js';
33
- import { CapturingServer } from './gateway/capturing-server.js';
34
- import { isDirectTopLevel } from './gateway/essentials.js';
35
- import { loadSkillContent, SKILL_RESOURCE_DESCRIPTION, SKILL_RESOURCE_MIME_TYPE, SKILL_RESOURCE_NAME, SKILL_RESOURCE_URI, } from './skill-loader.js';
36
- import { toElicitationCapability } from './tools/elicitation.js';
37
- import { buildAllTools } from './tools/index.js';
38
- export const SERVER_NAME = '@wootsup/yt-builder-mcp';
39
- export const SERVER_VERSION = '0.2.0-alpha.2';
40
- export function createServer(options) {
41
- // Stream B1 — Skill-Distribution via MCP-Protocol.
42
- //
43
- // The bundled SKILL.md is published through two MCP-native channels:
44
- //
45
- // (a) `instructions` field on the `initialize` response. MCP-spec
46
- // hosts (Claude Desktop, Cursor, …) surface this string as
47
- // auto-context so Maria-the-Claude-Desktop-user receives the
48
- // skill narrative without ever calling a tool.
49
- //
50
- // (b) `skill://yt-builder-mcp` resource exposed via
51
- // `resources/list` + `resources/read`. Backup for hosts that
52
- // ignore `instructions` but honor the resources API.
53
- //
54
- // Reading SKILL.md is synchronous (small file, ~17 KB) and cached
55
- // after first call by `loadSkillContent` — no async cost.
56
- const instructions = loadSkillContent();
57
- const mcp = new McpServer({
58
- name: SERVER_NAME,
59
- version: SERVER_VERSION,
60
- }, {
61
- instructions,
62
- });
63
- // Register the SKILL.md as a static MCP resource. The capability
64
- // (`resources: { listChanged: true }` etc.) is auto-advertised by
65
- // McpServer the moment the first resource is registered, so MCP
66
- // hosts see `resources` in `initialize.capabilities`.
67
- mcp.registerResource(SKILL_RESOURCE_NAME, SKILL_RESOURCE_URI, {
68
- title: SKILL_RESOURCE_NAME,
69
- description: SKILL_RESOURCE_DESCRIPTION,
70
- mimeType: SKILL_RESOURCE_MIME_TYPE,
71
- }, async (uri) => ({
72
- contents: [
73
- {
74
- uri: uri.toString(),
75
- mimeType: SKILL_RESOURCE_MIME_TYPE,
76
- text: instructions,
77
- },
78
- ],
79
- }));
80
- // Wave G.4.5 — MCP elicitation capability wiring.
81
- //
82
- // `toElicitationCapability(mcp)` bridges the SDK's stricter
83
- // discriminated `ElicitRequestFormParams` to the toolkit's looser
84
- // `ElicitInputParams`. The 3 elicitation-aware tools
85
- // (`element_delete`, `element_unbind_source`, `element_bind_source`)
86
- // consume this capability through their `*HandlerDeps`; the other 19
87
- // tools never see it. When the host the SDK connects to does not
88
- // advertise the elicitation capability, the toolkit's `elicitChoice` /
89
- // `elicitConfirmation` return `null` / `false` and the tool falls
90
- // back to the structured-error / preview path (no hang, no guess).
91
- const elicitation = toElicitationCapability(mcp);
92
- const tools = options.tools ?? buildAllTools(options.client, { elicitation });
93
- // L3 — direct top-level: registered FIRST on the real McpServer, before
94
- // the CapturingServer wraps it. These names get a no-op route inside
95
- // the CapturingServer (see capturing-server.ts), so the SDK never sees
96
- // a duplicate registration when the builder list is later replayed.
97
- for (const tool of tools) {
98
- if (isDirectTopLevel(tool.name)) {
99
- registerToolOn(mcp, tool);
100
- }
101
- }
102
- // L1 / L2 — every other tool is routed through the CapturingServer,
103
- // which forwards essentials to the real server and captures the rest
104
- // into its advanced registry.
105
- const capturing = new CapturingServer(mcp);
106
- for (const tool of tools) {
107
- if (isDirectTopLevel(tool.name))
108
- continue;
109
- registerToolOn(capturing, tool);
110
- }
111
- // Gateway — registered LAST so the advanced registry is final.
112
- registerAdvancedTool(mcp, capturing.getAdvancedRegistry());
113
- return { mcp, tools, capturing };
114
- }
115
- /**
116
- * Registers a `ToolDefinition` on a `ToolRegistrar`. A real `McpServer`
117
- * satisfies `ToolRegistrar` structurally (its `registerTool` returns
118
- * `RegisteredTool`, which is assignable to the `ToolRegistrar` declared
119
- * `void` return type), so call-sites pass either a real server (for L3
120
- * + the gateway, which need not be captured) or a `CapturingServer`
121
- * (for L1 + L2 routing).
122
- */
123
- function registerToolOn(registrar, tool) {
124
- // The SDK's `registerTool` accepts a raw Zod shape as inputSchema. We
125
- // cast through `ZodRawShapeCompat` to keep our `ToolDefinition` generic
126
- // (any ZodRawShape) compatible with the SDK's v3/v4 dual-zod surface.
127
- const inputSchema = tool.inputSchema;
128
- // outputSchema is optional — tools migrated to structured-content (Wave
129
- // G.2) declare a Zod schema describing the `structuredContent` payload.
130
- // The SDK accepts a `ZodTypeAny` (v3/v4) via `AnySchema`; we forward our
131
- // schema verbatim. Hosts that support MCP structured output validate
132
- // responses against this schema.
133
- const outputSchema = tool.outputSchema !== undefined
134
- ? tool.outputSchema
135
- : undefined;
136
- registrar.registerTool(tool.name, {
137
- description: tool.description,
138
- inputSchema,
139
- ...(outputSchema !== undefined ? { outputSchema } : {}),
140
- annotations: tool.annotations,
141
- },
142
- // Wave G.5 — forward the SDK-supplied `extra` (RequestHandlerExtra)
143
- // as the 2nd argument to every handler. Write-handlers consume
144
- // `extra._meta.progressToken` + `extra.sendNotification` via the
145
- // local `createProgressReporter` helper; read-handlers ignore it
146
- // (their handler signature still binds `extra` to `HandlerExtra |
147
- // undefined`, so no runtime coupling for non-progress tools).
148
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- SDK generic narrows to inferred shape; safe because zod validates upstream
149
- (async (args, extra) => {
150
- return tool.handler(args, extra);
151
- }));
152
- }
153
- //# sourceMappingURL=server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAsB,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACH,gBAAgB,EAChB,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAuB,MAAM,kBAAkB,CAAC;AAEtE,MAAM,CAAC,MAAM,WAAW,GAAG,yBAAyB,CAAC;AACrD,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;AAgB9C,MAAM,UAAU,YAAY,CAAC,OAA4B;IACrD,mDAAmD;IACnD,EAAE;IACF,qEAAqE;IACrE,EAAE;IACF,oEAAoE;IACpE,iEAAiE;IACjE,mEAAmE;IACnE,qDAAqD;IACrD,EAAE;IACF,sDAAsD;IAC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,CAAC,CAAC;IACrC,CAAC,CAAU,CACd,CAAC;AACN,CAAC"}
@@ -1,100 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Top-level CLI dispatcher for `@wootsup/yt-builder-mcp`.
4
- *
5
- * Round-1 audit I5 fix (2026-05-22): the wizard implementation lives in
6
- * `setup-wizard.ts`; this file is the thin dispatcher (`runCli`) plus
7
- * the ESM main-guard. Both have their own deps-bag (`WizardDeps` /
8
- * `RunCliDeps`) so unit tests can drive them independently.
9
- *
10
- * Subcommands:
11
- *
12
- * setup (default) — runWizard (see `setup-wizard.ts`)
13
- * install-skill — copy the bundled skill into ~/.claude/skills/
14
- * and append a marker block to ~/AGENTS.md.
15
- * --help / help — print usage.
16
- * --version / -v — print the package version.
17
- *
18
- * Re-exports `runWizard`, `majorMinor` and the wizard public types so
19
- * existing callers (and tests that already import from `./setup-cli`)
20
- * keep working with a one-line import.
21
- *
22
- * @license MIT
23
- */
24
- import { installSkill as defaultInstallSkill } from './install-skill.js';
25
- import type { WizardDeps } from './setup-wizard-types.js';
26
- export { DEFAULT_WIZARD_DEPS, majorMinor, runWizard, type AuthProbeResult, type HandshakeResult, type HealthProbeResult, type WizardAnswers, type WizardDeps, type WriteResult, } from './setup-wizard.js';
27
- export interface ParsedSetupArgs {
28
- /** True when `--non-interactive` was passed. Always boolean. */
29
- readonly nonInteractive: boolean;
30
- /** WordPress base URL from `--url`, trailing slash stripped, trimmed. */
31
- readonly url: string;
32
- /** Bearer token from `--token`, trimmed. */
33
- readonly token: string;
34
- /** Client ids from repeated `--client`. */
35
- readonly clients: readonly string[];
36
- /**
37
- * Pickup URL from `--pickup`, trimmed. When set together with
38
- * `nonce`, the wizard fetches the Bearer + canonical URL from the
39
- * plugin in a single POST instead of prompting.
40
- */
41
- readonly pickup?: string;
42
- /** One-shot nonce from `--nonce`, trimmed. Pairs 1:1 with `pickup`. */
43
- readonly nonce?: string;
44
- /**
45
- * Human-readable validation errors. Empty array means the parsed
46
- * args are usable. The dispatcher prints these to stderr and exits
47
- * non-zero when non-empty AND `--non-interactive` was requested.
48
- */
49
- readonly errors: readonly string[];
50
- /**
51
- * Non-fatal warnings to surface on stderr (e.g. "--url ignored in
52
- * pickup mode"). These do NOT block the wizard from running.
53
- */
54
- readonly warnings: readonly string[];
55
- }
56
- /**
57
- * Parse the `setup` subcommand argv tail. Pure function; does no I/O.
58
- *
59
- * Accepts both `--key value` and `--key=value` styles. Unknown flags
60
- * are reported as errors so typos don't silently disable validation.
61
- */
62
- export declare function parseSetupArgs(argv: readonly string[]): ParsedSetupArgs;
63
- /**
64
- * Build a `WizardDeps` bag that answers prompts from CLI flags instead
65
- * of asking a human. Reuses every other dependency (probes, writes,
66
- * handshake) from `DEFAULT_WIZARD_DEPS` so the wizard's exit-code
67
- * contract (0/2/3/4/5) stays identical.
68
- *
69
- * `confirmContinue` always returns `false` — there is no human to ask,
70
- * so a probe failure cleanly aborts with the documented exit code.
71
- */
72
- export declare function buildNonInteractiveDeps(parsed: ParsedSetupArgs, base?: WizardDeps): WizardDeps;
73
- /**
74
- * Build a `WizardDeps` bag for the Wave-C pickup flow. The wizard's
75
- * `prompt` step calls `base.fetchPickup(url, nonce)` once, then
76
- * synthesises the `WizardAnswers` from the response — the actual answers
77
- * (token + canonical WordPress URL) come straight from the plugin via
78
- * a 256-bit one-shot nonce, never through chat history / provider logs.
79
- *
80
- * On `fetchPickup` failure the prompt resolves to `null` so the wizard
81
- * exits cleanly with code 130 (user-cancel equivalent — we treat
82
- * an unrecoverable pickup as "the conversation ends here"). The
83
- * thrown error is logged via the `log` dep so the operator sees why.
84
- *
85
- * `confirmContinue` returns `false` (same rationale as non-interactive).
86
- */
87
- export declare function buildPickupDeps(parsed: ParsedSetupArgs, base?: WizardDeps): WizardDeps;
88
- export interface RunCliDeps {
89
- /**
90
- * Wizard runner. The optional deps bag lets the non-interactive
91
- * dispatcher inject prebuilt answers; interactive callers pass
92
- * nothing and the wizard uses `DEFAULT_WIZARD_DEPS`.
93
- */
94
- runWizard: (deps?: WizardDeps) => Promise<number>;
95
- installSkill: typeof defaultInstallSkill;
96
- log?: (line: string) => void;
97
- error?: (line: string) => void;
98
- }
99
- export declare function runCli(argv: readonly string[], deps?: Partial<RunCliDeps>): Promise<number>;
100
- //# sourceMappingURL=setup-cli.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup-cli.d.ts","sourceRoot":"","sources":["../src/setup-cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGzE,OAAO,KAAK,EAAiB,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAIzE,OAAO,EACH,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,WAAW,GACnB,MAAM,mBAAmB,CAAC;AAyD3B,MAAM,WAAW,eAAe;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,yEAAyE;IACzE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,M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