@wootsup/yt-builder-mcp 1.11.0 → 2.0.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 (853) hide show
  1. package/README.md +131 -33
  2. package/bin/node-floor.d.ts +28 -0
  3. package/bin/node-floor.js +123 -0
  4. package/bin/yt-builder-mcp.js +52 -11
  5. package/dist/auth.d.ts +3 -121
  6. package/dist/auth.d.ts.map +1 -1
  7. package/dist/auth.js +40 -170
  8. package/dist/auth.js.map +1 -1
  9. package/dist/catalog/build-catalog.d.ts +4 -49
  10. package/dist/catalog/build-catalog.d.ts.map +1 -1
  11. package/dist/catalog/build-catalog.js +15 -126
  12. package/dist/catalog/build-catalog.js.map +1 -1
  13. package/dist/catalog/json-schema.d.ts +3 -0
  14. package/dist/catalog/json-schema.d.ts.map +1 -0
  15. package/dist/catalog/json-schema.js +68 -0
  16. package/dist/catalog/json-schema.js.map +1 -0
  17. package/dist/catalog/output-shapes.d.ts +6 -0
  18. package/dist/catalog/output-shapes.d.ts.map +1 -0
  19. package/dist/catalog/output-shapes.js +89 -0
  20. package/dist/catalog/output-shapes.js.map +1 -0
  21. package/dist/catalog/tool-catalog-markdown.d.ts +1 -37
  22. package/dist/catalog/tool-catalog-markdown.d.ts.map +1 -1
  23. package/dist/catalog/tool-catalog-markdown.js +9 -41
  24. package/dist/catalog/tool-catalog-markdown.js.map +1 -1
  25. package/dist/cli/doctor-command.d.ts +2 -7
  26. package/dist/cli/doctor-command.d.ts.map +1 -1
  27. package/dist/cli/doctor-command.js +33 -54
  28. package/dist/cli/doctor-command.js.map +1 -1
  29. package/dist/cli/invocation-decision.d.ts +4 -52
  30. package/dist/cli/invocation-decision.d.ts.map +1 -1
  31. package/dist/cli/invocation-decision.js +45 -54
  32. package/dist/cli/invocation-decision.js.map +1 -1
  33. package/dist/client.d.ts +3 -107
  34. package/dist/client.d.ts.map +1 -1
  35. package/dist/client.js +34 -115
  36. package/dist/client.js.map +1 -1
  37. package/dist/clients/claude-code.d.ts +0 -15
  38. package/dist/clients/claude-code.d.ts.map +1 -1
  39. package/dist/clients/claude-code.js +0 -22
  40. package/dist/clients/claude-code.js.map +1 -1
  41. package/dist/clients/claude-desktop.d.ts +0 -16
  42. package/dist/clients/claude-desktop.d.ts.map +1 -1
  43. package/dist/clients/claude-desktop.js +0 -18
  44. package/dist/clients/claude-desktop.js.map +1 -1
  45. package/dist/clients/cline.d.ts +0 -23
  46. package/dist/clients/cline.d.ts.map +1 -1
  47. package/dist/clients/cline.js +0 -33
  48. package/dist/clients/cline.js.map +1 -1
  49. package/dist/clients/codex-cli.d.ts +0 -39
  50. package/dist/clients/codex-cli.d.ts.map +1 -1
  51. package/dist/clients/codex-cli.js +0 -137
  52. package/dist/clients/codex-cli.js.map +1 -1
  53. package/dist/clients/continue.d.ts +0 -10
  54. package/dist/clients/continue.d.ts.map +1 -1
  55. package/dist/clients/continue.js +0 -26
  56. package/dist/clients/continue.js.map +1 -1
  57. package/dist/clients/cursor.d.ts +0 -9
  58. package/dist/clients/cursor.d.ts.map +1 -1
  59. package/dist/clients/cursor.js +0 -11
  60. package/dist/clients/cursor.js.map +1 -1
  61. package/dist/clients/gemini-cli.d.ts +0 -15
  62. package/dist/clients/gemini-cli.d.ts.map +1 -1
  63. package/dist/clients/gemini-cli.js +0 -17
  64. package/dist/clients/gemini-cli.js.map +1 -1
  65. package/dist/clients/home.d.ts +0 -12
  66. package/dist/clients/home.d.ts.map +1 -1
  67. package/dist/clients/home.js +0 -12
  68. package/dist/clients/home.js.map +1 -1
  69. package/dist/clients/index.d.ts +0 -150
  70. package/dist/clients/index.d.ts.map +1 -1
  71. package/dist/clients/index.js +0 -112
  72. package/dist/clients/index.js.map +1 -1
  73. package/dist/clients/roo-code.d.ts +0 -20
  74. package/dist/clients/roo-code.d.ts.map +1 -1
  75. package/dist/clients/roo-code.js +0 -22
  76. package/dist/clients/roo-code.js.map +1 -1
  77. package/dist/clients/zed.d.ts +0 -9
  78. package/dist/clients/zed.d.ts.map +1 -1
  79. package/dist/clients/zed.js +0 -18
  80. package/dist/clients/zed.js.map +1 -1
  81. package/dist/compat-floor.d.ts +35 -0
  82. package/dist/compat-floor.d.ts.map +1 -0
  83. package/dist/compat-floor.js +84 -0
  84. package/dist/compat-floor.js.map +1 -0
  85. package/dist/compat-probe.d.ts +6 -0
  86. package/dist/compat-probe.d.ts.map +1 -0
  87. package/dist/compat-probe.js +20 -0
  88. package/dist/compat-probe.js.map +1 -0
  89. package/dist/diagnostics/ca-reexec.d.ts +0 -30
  90. package/dist/diagnostics/ca-reexec.d.ts.map +1 -1
  91. package/dist/diagnostics/ca-reexec.js +0 -62
  92. package/dist/diagnostics/ca-reexec.js.map +1 -1
  93. package/dist/diagnostics/ca-trust.d.ts +0 -22
  94. package/dist/diagnostics/ca-trust.d.ts.map +1 -1
  95. package/dist/diagnostics/ca-trust.js +3 -42
  96. package/dist/diagnostics/ca-trust.js.map +1 -1
  97. package/dist/diagnostics/diagnose-network-error.d.ts +1 -38
  98. package/dist/diagnostics/diagnose-network-error.d.ts.map +1 -1
  99. package/dist/diagnostics/diagnose-network-error.js +26 -37
  100. package/dist/diagnostics/diagnose-network-error.js.map +1 -1
  101. package/dist/diagnostics/doctor.d.ts +13 -65
  102. package/dist/diagnostics/doctor.d.ts.map +1 -1
  103. package/dist/diagnostics/doctor.js +46 -70
  104. package/dist/diagnostics/doctor.js.map +1 -1
  105. package/dist/diagnostics/startup-self-probe.d.ts +3 -25
  106. package/dist/diagnostics/startup-self-probe.d.ts.map +1 -1
  107. package/dist/diagnostics/startup-self-probe.js +11 -48
  108. package/dist/diagnostics/startup-self-probe.js.map +1 -1
  109. package/dist/errors/hints.d.ts +0 -44
  110. package/dist/errors/hints.d.ts.map +1 -1
  111. package/dist/errors/hints.js +0 -32
  112. package/dist/errors/hints.js.map +1 -1
  113. package/dist/errors/mask.d.ts +0 -31
  114. package/dist/errors/mask.d.ts.map +1 -1
  115. package/dist/errors/mask.js +0 -32
  116. package/dist/errors/mask.js.map +1 -1
  117. package/dist/errors/redact-credentials.d.ts +2 -0
  118. package/dist/errors/redact-credentials.d.ts.map +1 -0
  119. package/dist/errors/redact-credentials.js +13 -0
  120. package/dist/errors/redact-credentials.js.map +1 -0
  121. package/dist/errors/sanitize.d.ts +0 -29
  122. package/dist/errors/sanitize.d.ts.map +1 -1
  123. package/dist/errors/sanitize.js +0 -40
  124. package/dist/errors/sanitize.js.map +1 -1
  125. package/dist/errors.d.ts +6 -17
  126. package/dist/errors.d.ts.map +1 -1
  127. package/dist/errors.js +16 -21
  128. package/dist/errors.js.map +1 -1
  129. package/dist/gateway/advanced-read-tool.d.ts +0 -32
  130. package/dist/gateway/advanced-read-tool.d.ts.map +1 -1
  131. package/dist/gateway/advanced-read-tool.js +43 -111
  132. package/dist/gateway/advanced-read-tool.js.map +1 -1
  133. package/dist/gateway/advanced-tool/discovery.d.ts +1 -12
  134. package/dist/gateway/advanced-tool/discovery.d.ts.map +1 -1
  135. package/dist/gateway/advanced-tool/discovery.js +18 -16
  136. package/dist/gateway/advanced-tool/discovery.js.map +1 -1
  137. package/dist/gateway/advanced-tool/domains.d.ts +7 -66
  138. package/dist/gateway/advanced-tool/domains.d.ts.map +1 -1
  139. package/dist/gateway/advanced-tool/domains.js +36 -80
  140. package/dist/gateway/advanced-tool/domains.js.map +1 -1
  141. package/dist/gateway/advanced-tool/execute.d.ts +0 -25
  142. package/dist/gateway/advanced-tool/execute.d.ts.map +1 -1
  143. package/dist/gateway/advanced-tool/execute.js +13 -49
  144. package/dist/gateway/advanced-tool/execute.js.map +1 -1
  145. package/dist/gateway/advanced-tool/index.d.ts +1 -32
  146. package/dist/gateway/advanced-tool/index.d.ts.map +1 -1
  147. package/dist/gateway/advanced-tool/index.js +1 -35
  148. package/dist/gateway/advanced-tool/index.js.map +1 -1
  149. package/dist/gateway/advanced-tool/register.d.ts +0 -14
  150. package/dist/gateway/advanced-tool/register.d.ts.map +1 -1
  151. package/dist/gateway/advanced-tool/register.js +22 -58
  152. package/dist/gateway/advanced-tool/register.js.map +1 -1
  153. package/dist/gateway/advanced-tool.d.ts +0 -11
  154. package/dist/gateway/advanced-tool.d.ts.map +1 -1
  155. package/dist/gateway/advanced-tool.js +0 -11
  156. package/dist/gateway/advanced-tool.js.map +1 -1
  157. package/dist/gateway/capturing-server.d.ts +3 -88
  158. package/dist/gateway/capturing-server.d.ts.map +1 -1
  159. package/dist/gateway/capturing-server.js +0 -77
  160. package/dist/gateway/capturing-server.js.map +1 -1
  161. package/dist/gateway/essentials.d.ts +1 -63
  162. package/dist/gateway/essentials.d.ts.map +1 -1
  163. package/dist/gateway/essentials.js +10 -174
  164. package/dist/gateway/essentials.js.map +1 -1
  165. package/dist/gateway/test-support.d.ts +0 -28
  166. package/dist/gateway/test-support.d.ts.map +1 -1
  167. package/dist/gateway/test-support.js +0 -29
  168. package/dist/gateway/test-support.js.map +1 -1
  169. package/dist/health-response.d.ts +2 -0
  170. package/dist/health-response.d.ts.map +1 -0
  171. package/dist/health-response.js +7 -0
  172. package/dist/health-response.js.map +1 -0
  173. package/dist/icon-data.js +0 -3
  174. package/dist/icon-data.js.map +1 -1
  175. package/dist/index.d.ts +7 -23
  176. package/dist/index.d.ts.map +1 -1
  177. package/dist/index.js +46 -130
  178. package/dist/index.js.map +1 -1
  179. package/dist/install-skill.d.ts +0 -44
  180. package/dist/install-skill.d.ts.map +1 -1
  181. package/dist/install-skill.js +5 -46
  182. package/dist/install-skill.js.map +1 -1
  183. package/dist/net/extra-headers.d.ts +0 -58
  184. package/dist/net/extra-headers.d.ts.map +1 -1
  185. package/dist/net/extra-headers.js +0 -67
  186. package/dist/net/extra-headers.js.map +1 -1
  187. package/dist/net/internal-host.d.ts +0 -31
  188. package/dist/net/internal-host.d.ts.map +1 -1
  189. package/dist/net/internal-host.js +7 -65
  190. package/dist/net/internal-host.js.map +1 -1
  191. package/dist/net/proxy-dispatcher.d.ts +0 -37
  192. package/dist/net/proxy-dispatcher.d.ts.map +1 -1
  193. package/dist/net/proxy-dispatcher.js +0 -40
  194. package/dist/net/proxy-dispatcher.js.map +1 -1
  195. package/dist/net/public-fetch.d.ts +53 -0
  196. package/dist/net/public-fetch.d.ts.map +1 -0
  197. package/dist/net/public-fetch.js +143 -0
  198. package/dist/net/public-fetch.js.map +1 -0
  199. package/dist/net/public-page-report.d.ts +26 -0
  200. package/dist/net/public-page-report.d.ts.map +1 -0
  201. package/dist/net/public-page-report.js +145 -0
  202. package/dist/net/public-page-report.js.map +1 -0
  203. package/dist/net/redirect-safe-fetch.d.ts +14 -0
  204. package/dist/net/redirect-safe-fetch.d.ts.map +1 -0
  205. package/dist/net/redirect-safe-fetch.js +61 -0
  206. package/dist/net/redirect-safe-fetch.js.map +1 -0
  207. package/dist/net/session-recovery-fetch.d.ts +7 -0
  208. package/dist/net/session-recovery-fetch.d.ts.map +1 -0
  209. package/dist/net/session-recovery-fetch.js +139 -0
  210. package/dist/net/session-recovery-fetch.js.map +1 -0
  211. package/dist/net/site-basic-auth.d.ts +1 -59
  212. package/dist/net/site-basic-auth.d.ts.map +1 -1
  213. package/dist/net/site-basic-auth.js +5 -94
  214. package/dist/net/site-basic-auth.js.map +1 -1
  215. package/dist/package-version.d.ts +2 -0
  216. package/dist/package-version.d.ts.map +1 -0
  217. package/dist/package-version.js +15 -0
  218. package/dist/package-version.js.map +1 -0
  219. package/dist/platform/detect.d.ts +0 -54
  220. package/dist/platform/detect.d.ts.map +1 -1
  221. package/dist/platform/detect.js +0 -53
  222. package/dist/platform/detect.js.map +1 -1
  223. package/dist/platform/index.d.ts +0 -100
  224. package/dist/platform/index.d.ts.map +1 -1
  225. package/dist/platform/index.js +0 -106
  226. package/dist/platform/index.js.map +1 -1
  227. package/dist/platform/joomla.d.ts +0 -35
  228. package/dist/platform/joomla.d.ts.map +1 -1
  229. package/dist/platform/joomla.js +0 -35
  230. package/dist/platform/joomla.js.map +1 -1
  231. package/dist/proxy/bridge.d.ts +36 -76
  232. package/dist/proxy/bridge.d.ts.map +1 -1
  233. package/dist/proxy/bridge.js +443 -136
  234. package/dist/proxy/bridge.js.map +1 -1
  235. package/dist/proxy/confirm-elicitation.d.ts +22 -0
  236. package/dist/proxy/confirm-elicitation.d.ts.map +1 -0
  237. package/dist/proxy/confirm-elicitation.js +170 -0
  238. package/dist/proxy/confirm-elicitation.js.map +1 -0
  239. package/dist/proxy/confirm-question-contract.d.ts +6 -0
  240. package/dist/proxy/confirm-question-contract.d.ts.map +1 -0
  241. package/dist/proxy/confirm-question-contract.js +9 -0
  242. package/dist/proxy/confirm-question-contract.js.map +1 -0
  243. package/dist/proxy/confirm-question.d.ts +2 -0
  244. package/dist/proxy/confirm-question.d.ts.map +1 -0
  245. package/dist/proxy/confirm-question.js +125 -0
  246. package/dist/proxy/confirm-question.js.map +1 -0
  247. package/dist/proxy/instructions.d.ts +4 -0
  248. package/dist/proxy/instructions.d.ts.map +1 -0
  249. package/dist/proxy/instructions.js +12 -0
  250. package/dist/proxy/instructions.js.map +1 -0
  251. package/dist/proxy/mode.d.ts +14 -9
  252. package/dist/proxy/mode.d.ts.map +1 -1
  253. package/dist/proxy/mode.js +58 -34
  254. package/dist/proxy/mode.js.map +1 -1
  255. package/dist/proxy/multi-site.d.ts +42 -0
  256. package/dist/proxy/multi-site.d.ts.map +1 -0
  257. package/dist/proxy/multi-site.js +134 -0
  258. package/dist/proxy/multi-site.js.map +1 -0
  259. package/dist/proxy/request-headers.d.ts +9 -0
  260. package/dist/proxy/request-headers.d.ts.map +1 -0
  261. package/dist/proxy/request-headers.js +17 -0
  262. package/dist/proxy/request-headers.js.map +1 -0
  263. package/dist/proxy/shadow-tools.d.ts +9 -0
  264. package/dist/proxy/shadow-tools.d.ts.map +1 -0
  265. package/dist/proxy/shadow-tools.js +42 -0
  266. package/dist/proxy/shadow-tools.js.map +1 -0
  267. package/dist/proxy/tools-list-cap.d.ts +7 -0
  268. package/dist/proxy/tools-list-cap.d.ts.map +1 -0
  269. package/dist/proxy/tools-list-cap.js +14 -0
  270. package/dist/proxy/tools-list-cap.js.map +1 -0
  271. package/dist/proxy/transport-uncertainty.d.ts +2 -0
  272. package/dist/proxy/transport-uncertainty.d.ts.map +1 -0
  273. package/dist/proxy/transport-uncertainty.js +8 -0
  274. package/dist/proxy/transport-uncertainty.js.map +1 -0
  275. package/dist/proxy/upstream-error.d.ts +7 -0
  276. package/dist/proxy/upstream-error.d.ts.map +1 -0
  277. package/dist/proxy/upstream-error.js +35 -0
  278. package/dist/proxy/upstream-error.js.map +1 -0
  279. package/dist/proxy/wire-dialect.d.ts +5 -0
  280. package/dist/proxy/wire-dialect.d.ts.map +1 -0
  281. package/dist/proxy/wire-dialect.js +33 -0
  282. package/dist/proxy/wire-dialect.js.map +1 -0
  283. package/dist/server.d.ts +14 -82
  284. package/dist/server.d.ts.map +1 -1
  285. package/dist/server.js +107 -203
  286. package/dist/server.js.map +1 -1
  287. package/dist/setup/banner-color.d.ts +13 -0
  288. package/dist/setup/banner-color.d.ts.map +1 -0
  289. package/dist/setup/banner-color.js +93 -0
  290. package/dist/setup/banner-color.js.map +1 -0
  291. package/dist/setup/banner.d.ts +22 -0
  292. package/dist/setup/banner.d.ts.map +1 -0
  293. package/dist/setup/banner.js +119 -0
  294. package/dist/setup/banner.js.map +1 -0
  295. package/dist/setup/ca-recovery.d.ts +20 -0
  296. package/dist/setup/ca-recovery.d.ts.map +1 -0
  297. package/dist/setup/ca-recovery.js +92 -0
  298. package/dist/setup/ca-recovery.js.map +1 -0
  299. package/dist/setup/closing.d.ts +15 -0
  300. package/dist/setup/closing.d.ts.map +1 -0
  301. package/dist/setup/closing.js +43 -0
  302. package/dist/setup/closing.js.map +1 -0
  303. package/dist/setup/corporate-ca.d.ts +16 -0
  304. package/dist/setup/corporate-ca.d.ts.map +1 -0
  305. package/dist/setup/corporate-ca.js +32 -0
  306. package/dist/setup/corporate-ca.js.map +1 -0
  307. package/dist/setup/host-platform.d.ts +8 -0
  308. package/dist/setup/host-platform.d.ts.map +1 -0
  309. package/dist/setup/host-platform.js +21 -0
  310. package/dist/setup/host-platform.js.map +1 -0
  311. package/dist/setup/install-configs.d.ts +18 -0
  312. package/dist/setup/install-configs.d.ts.map +1 -0
  313. package/dist/setup/install-configs.js +70 -0
  314. package/dist/setup/install-configs.js.map +1 -0
  315. package/dist/setup/multi-site-loop.d.ts +14 -0
  316. package/dist/setup/multi-site-loop.d.ts.map +1 -0
  317. package/dist/setup/multi-site-loop.js +20 -0
  318. package/dist/setup/multi-site-loop.js.map +1 -0
  319. package/dist/setup/phases.d.ts +18 -0
  320. package/dist/setup/phases.d.ts.map +1 -0
  321. package/dist/setup/phases.js +55 -0
  322. package/dist/setup/phases.js.map +1 -0
  323. package/dist/setup/registry-remedy.d.ts +12 -0
  324. package/dist/setup/registry-remedy.d.ts.map +1 -0
  325. package/dist/setup/registry-remedy.js +37 -0
  326. package/dist/setup/registry-remedy.js.map +1 -0
  327. package/dist/setup/resume.d.ts +28 -0
  328. package/dist/setup/resume.d.ts.map +1 -0
  329. package/dist/setup/resume.js +99 -0
  330. package/dist/setup/resume.js.map +1 -0
  331. package/dist/setup-ca-env.d.ts +0 -30
  332. package/dist/setup-ca-env.d.ts.map +1 -1
  333. package/dist/setup-ca-env.js +0 -28
  334. package/dist/setup-ca-env.js.map +1 -1
  335. package/dist/setup-ca-reprobe.d.ts +0 -25
  336. package/dist/setup-ca-reprobe.d.ts.map +1 -1
  337. package/dist/setup-ca-reprobe.js +0 -34
  338. package/dist/setup-ca-reprobe.js.map +1 -1
  339. package/dist/setup-cli-confirm.d.ts +0 -34
  340. package/dist/setup-cli-confirm.d.ts.map +1 -1
  341. package/dist/setup-cli-confirm.js +0 -36
  342. package/dist/setup-cli-confirm.js.map +1 -1
  343. package/dist/setup-cli.d.ts +6 -167
  344. package/dist/setup-cli.d.ts.map +1 -1
  345. package/dist/setup-cli.js +161 -173
  346. package/dist/setup-cli.js.map +1 -1
  347. package/dist/setup-npx-spec.d.ts +0 -36
  348. package/dist/setup-npx-spec.d.ts.map +1 -1
  349. package/dist/setup-npx-spec.js +0 -38
  350. package/dist/setup-npx-spec.js.map +1 -1
  351. package/dist/setup-prompts.d.ts +5 -70
  352. package/dist/setup-prompts.d.ts.map +1 -1
  353. package/dist/setup-prompts.js +67 -107
  354. package/dist/setup-prompts.js.map +1 -1
  355. package/dist/setup-token.d.ts +0 -34
  356. package/dist/setup-token.d.ts.map +1 -1
  357. package/dist/setup-token.js +0 -40
  358. package/dist/setup-token.js.map +1 -1
  359. package/dist/setup-wizard-defaults.d.ts +0 -36
  360. package/dist/setup-wizard-defaults.d.ts.map +1 -1
  361. package/dist/setup-wizard-defaults.js +0 -75
  362. package/dist/setup-wizard-defaults.js.map +1 -1
  363. package/dist/setup-wizard-handshake.d.ts +1 -19
  364. package/dist/setup-wizard-handshake.d.ts.map +1 -1
  365. package/dist/setup-wizard-handshake.js +8 -45
  366. package/dist/setup-wizard-handshake.js.map +1 -1
  367. package/dist/setup-wizard-types.d.ts +16 -209
  368. package/dist/setup-wizard-types.d.ts.map +1 -1
  369. package/dist/setup-wizard-types.js +0 -9
  370. package/dist/setup-wizard-types.js.map +1 -1
  371. package/dist/setup-wizard.d.ts +0 -28
  372. package/dist/setup-wizard.d.ts.map +1 -1
  373. package/dist/setup-wizard.js +167 -412
  374. package/dist/setup-wizard.js.map +1 -1
  375. package/dist/setup.d.ts +0 -15
  376. package/dist/setup.d.ts.map +1 -1
  377. package/dist/setup.js +0 -15
  378. package/dist/setup.js.map +1 -1
  379. package/dist/sites/bootstrap.d.ts +0 -38
  380. package/dist/sites/bootstrap.d.ts.map +1 -1
  381. package/dist/sites/bootstrap.js +0 -44
  382. package/dist/sites/bootstrap.js.map +1 -1
  383. package/dist/sites/cli/add-site.d.ts +0 -76
  384. package/dist/sites/cli/add-site.d.ts.map +1 -1
  385. package/dist/sites/cli/add-site.js +0 -71
  386. package/dist/sites/cli/add-site.js.map +1 -1
  387. package/dist/sites/cli/list-sites.d.ts +0 -31
  388. package/dist/sites/cli/list-sites.d.ts.map +1 -1
  389. package/dist/sites/cli/list-sites.js +0 -45
  390. package/dist/sites/cli/list-sites.js.map +1 -1
  391. package/dist/sites/cli/remove-site.d.ts +0 -37
  392. package/dist/sites/cli/remove-site.d.ts.map +1 -1
  393. package/dist/sites/cli/remove-site.js +0 -37
  394. package/dist/sites/cli/remove-site.js.map +1 -1
  395. package/dist/sites/cli/set-default.d.ts +0 -25
  396. package/dist/sites/cli/set-default.d.ts.map +1 -1
  397. package/dist/sites/cli/set-default.js +0 -22
  398. package/dist/sites/cli/set-default.js.map +1 -1
  399. package/dist/sites/cli/test-site.d.ts +0 -44
  400. package/dist/sites/cli/test-site.d.ts.map +1 -1
  401. package/dist/sites/cli/test-site.js +0 -39
  402. package/dist/sites/cli/test-site.js.map +1 -1
  403. package/dist/sites/client-pool.d.ts +11 -164
  404. package/dist/sites/client-pool.d.ts.map +1 -1
  405. package/dist/sites/client-pool.js +73 -194
  406. package/dist/sites/client-pool.js.map +1 -1
  407. package/dist/sites/config-problem.d.ts +2 -0
  408. package/dist/sites/config-problem.d.ts.map +1 -0
  409. package/dist/sites/config-problem.js +13 -0
  410. package/dist/sites/config-problem.js.map +1 -0
  411. package/dist/sites/env-bridge.d.ts +0 -69
  412. package/dist/sites/env-bridge.d.ts.map +1 -1
  413. package/dist/sites/env-bridge.js +2 -71
  414. package/dist/sites/env-bridge.js.map +1 -1
  415. package/dist/sites/op-inject.d.ts +23 -0
  416. package/dist/sites/op-inject.d.ts.map +1 -0
  417. package/dist/sites/op-inject.js +131 -0
  418. package/dist/sites/op-inject.js.map +1 -0
  419. package/dist/sites/paths.d.ts +0 -19
  420. package/dist/sites/paths.d.ts.map +1 -1
  421. package/dist/sites/paths.js +0 -19
  422. package/dist/sites/paths.js.map +1 -1
  423. package/dist/sites/probe.d.ts +1 -47
  424. package/dist/sites/probe.d.ts.map +1 -1
  425. package/dist/sites/probe.js +4 -46
  426. package/dist/sites/probe.js.map +1 -1
  427. package/dist/sites/registry.d.ts +4 -135
  428. package/dist/sites/registry.d.ts.map +1 -1
  429. package/dist/sites/registry.js +4 -98
  430. package/dist/sites/registry.js.map +1 -1
  431. package/dist/sites/schema.d.ts +3 -51
  432. package/dist/sites/schema.d.ts.map +1 -1
  433. package/dist/sites/schema.js +6 -52
  434. package/dist/sites/schema.js.map +1 -1
  435. package/dist/sites/secret-resolver.d.ts +6 -76
  436. package/dist/sites/secret-resolver.d.ts.map +1 -1
  437. package/dist/sites/secret-resolver.js +39 -104
  438. package/dist/sites/secret-resolver.js.map +1 -1
  439. package/dist/sites/store.d.ts +12 -69
  440. package/dist/sites/store.d.ts.map +1 -1
  441. package/dist/sites/store.js +37 -86
  442. package/dist/sites/store.js.map +1 -1
  443. package/dist/sites/substituted-registry.d.ts +11 -0
  444. package/dist/sites/substituted-registry.d.ts.map +1 -0
  445. package/dist/sites/substituted-registry.js +13 -0
  446. package/dist/sites/substituted-registry.js.map +1 -0
  447. package/dist/sites/tools/fetch-public-url.d.ts +4 -0
  448. package/dist/sites/tools/fetch-public-url.d.ts.map +1 -0
  449. package/dist/sites/tools/fetch-public-url.js +231 -0
  450. package/dist/sites/tools/fetch-public-url.js.map +1 -0
  451. package/dist/sites/tools/index.d.ts +2 -26
  452. package/dist/sites/tools/index.d.ts.map +1 -1
  453. package/dist/sites/tools/index.js +5 -28
  454. package/dist/sites/tools/index.js.map +1 -1
  455. package/dist/sites/tools/sites-list.d.ts +3 -47
  456. package/dist/sites/tools/sites-list.d.ts.map +1 -1
  457. package/dist/sites/tools/sites-list.js +68 -80
  458. package/dist/sites/tools/sites-list.js.map +1 -1
  459. package/dist/sites/tools/sites-overview.d.ts +4 -0
  460. package/dist/sites/tools/sites-overview.d.ts.map +1 -0
  461. package/dist/sites/tools/sites-overview.js +209 -0
  462. package/dist/sites/tools/sites-overview.js.map +1 -0
  463. package/dist/sites/tools/sites-test.d.ts +2 -45
  464. package/dist/sites/tools/sites-test.d.ts.map +1 -1
  465. package/dist/sites/tools/sites-test.js +1 -56
  466. package/dist/sites/tools/sites-test.js.map +1 -1
  467. package/dist/sites/tools/use-site.d.ts +2 -45
  468. package/dist/sites/tools/use-site.d.ts.map +1 -1
  469. package/dist/sites/tools/use-site.js +31 -80
  470. package/dist/sites/tools/use-site.js.map +1 -1
  471. package/dist/sites/unknown-name-result.d.ts +10 -0
  472. package/dist/sites/unknown-name-result.d.ts.map +1 -0
  473. package/dist/sites/unknown-name-result.js +13 -0
  474. package/dist/sites/unknown-name-result.js.map +1 -0
  475. package/dist/skill-instructions.d.ts +7 -0
  476. package/dist/skill-instructions.d.ts.map +1 -0
  477. package/dist/skill-instructions.js +84 -0
  478. package/dist/skill-instructions.js.map +1 -0
  479. package/dist/skill-loader.d.ts +0 -102
  480. package/dist/skill-loader.d.ts.map +1 -1
  481. package/dist/skill-loader.js +4 -142
  482. package/dist/skill-loader.js.map +1 -1
  483. package/dist/skill-manifest.d.ts +0 -20
  484. package/dist/skill-manifest.d.ts.map +1 -1
  485. package/dist/skill-manifest.js +1 -21
  486. package/dist/skill-manifest.js.map +1 -1
  487. package/dist/skill-topics.d.ts +19 -0
  488. package/dist/skill-topics.d.ts.map +1 -0
  489. package/dist/skill-topics.js +181 -0
  490. package/dist/skill-topics.js.map +1 -0
  491. package/dist/tools/active-site.d.ts +16 -0
  492. package/dist/tools/active-site.d.ts.map +1 -0
  493. package/dist/tools/active-site.js +55 -0
  494. package/dist/tools/active-site.js.map +1 -0
  495. package/dist/tools/bind-guidance.d.ts +2 -72
  496. package/dist/tools/bind-guidance.d.ts.map +1 -1
  497. package/dist/tools/bind-guidance.js +2 -72
  498. package/dist/tools/bind-guidance.js.map +1 -1
  499. package/dist/tools/budgeted-table.d.ts +16 -0
  500. package/dist/tools/budgeted-table.d.ts.map +1 -0
  501. package/dist/tools/budgeted-table.js +203 -0
  502. package/dist/tools/budgeted-table.js.map +1 -0
  503. package/dist/tools/elements/bind-output-schema.d.ts +69 -0
  504. package/dist/tools/elements/bind-output-schema.d.ts.map +1 -0
  505. package/dist/tools/elements/bind-output-schema.js +64 -0
  506. package/dist/tools/elements/bind-output-schema.js.map +1 -0
  507. package/dist/tools/elements/builders.d.ts +1 -22
  508. package/dist/tools/elements/builders.d.ts.map +1 -1
  509. package/dist/tools/elements/builders.js +171 -133
  510. package/dist/tools/elements/builders.js.map +1 -1
  511. package/dist/tools/elements/index.d.ts +0 -26
  512. package/dist/tools/elements/index.d.ts.map +1 -1
  513. package/dist/tools/elements/index.js +0 -25
  514. package/dist/tools/elements/index.js.map +1 -1
  515. package/dist/tools/elements/read-output-schemas.d.ts +121 -0
  516. package/dist/tools/elements/read-output-schemas.d.ts.map +1 -0
  517. package/dist/tools/elements/read-output-schemas.js +225 -0
  518. package/dist/tools/elements/read-output-schemas.js.map +1 -0
  519. package/dist/tools/elements/write-output-schemas.d.ts +185 -0
  520. package/dist/tools/elements/write-output-schemas.d.ts.map +1 -0
  521. package/dist/tools/elements/write-output-schemas.js +98 -0
  522. package/dist/tools/elements/write-output-schemas.js.map +1 -0
  523. package/dist/tools/elements.d.ts +0 -11
  524. package/dist/tools/elements.d.ts.map +1 -1
  525. package/dist/tools/elements.js +0 -11
  526. package/dist/tools/elements.js.map +1 -1
  527. package/dist/tools/format/health-format.d.ts +42 -43
  528. package/dist/tools/format/health-format.d.ts.map +1 -1
  529. package/dist/tools/format/health-format.js +32 -55
  530. package/dist/tools/format/health-format.js.map +1 -1
  531. package/dist/tools/format/inspection-format.d.ts +4 -49
  532. package/dist/tools/format/inspection-format.d.ts.map +1 -1
  533. package/dist/tools/format/inspection-format.js +46 -114
  534. package/dist/tools/format/inspection-format.js.map +1 -1
  535. package/dist/tools/format/pages-format.d.ts +32 -69
  536. package/dist/tools/format/pages-format.d.ts.map +1 -1
  537. package/dist/tools/format/pages-format.js +115 -133
  538. package/dist/tools/format/pages-format.js.map +1 -1
  539. package/dist/tools/format/sources-format.d.ts +5 -39
  540. package/dist/tools/format/sources-format.d.ts.map +1 -1
  541. package/dist/tools/format/sources-format.js +57 -87
  542. package/dist/tools/format/sources-format.js.map +1 -1
  543. package/dist/tools/health-output-schemas.d.ts +82 -0
  544. package/dist/tools/health-output-schemas.d.ts.map +1 -0
  545. package/dist/tools/health-output-schemas.js +130 -0
  546. package/dist/tools/health-output-schemas.js.map +1 -0
  547. package/dist/tools/health.d.ts +2 -20
  548. package/dist/tools/health.d.ts.map +1 -1
  549. package/dist/tools/health.js +59 -184
  550. package/dist/tools/health.js.map +1 -1
  551. package/dist/tools/index.d.ts +1 -26
  552. package/dist/tools/index.d.ts.map +1 -1
  553. package/dist/tools/index.js +13 -33
  554. package/dist/tools/index.js.map +1 -1
  555. package/dist/tools/inspection.d.ts +21 -17
  556. package/dist/tools/inspection.d.ts.map +1 -1
  557. package/dist/tools/inspection.js +431 -268
  558. package/dist/tools/inspection.js.map +1 -1
  559. package/dist/tools/library.d.ts +118 -126
  560. package/dist/tools/library.d.ts.map +1 -1
  561. package/dist/tools/library.js +723 -456
  562. package/dist/tools/library.js.map +1 -1
  563. package/dist/tools/local-content/builders.d.ts +1 -17
  564. package/dist/tools/local-content/builders.d.ts.map +1 -1
  565. package/dist/tools/local-content/builders.js +105 -48
  566. package/dist/tools/local-content/builders.js.map +1 -1
  567. package/dist/tools/local-content/index.d.ts +0 -15
  568. package/dist/tools/local-content/index.d.ts.map +1 -1
  569. package/dist/tools/local-content/index.js +0 -14
  570. package/dist/tools/local-content/index.js.map +1 -1
  571. package/dist/tools/local-content/schemas.d.ts +31 -47
  572. package/dist/tools/local-content/schemas.d.ts.map +1 -1
  573. package/dist/tools/local-content/schemas.js +33 -62
  574. package/dist/tools/local-content/schemas.js.map +1 -1
  575. package/dist/tools/modules/builders.d.ts +4 -0
  576. package/dist/tools/modules/builders.d.ts.map +1 -0
  577. package/dist/tools/modules/builders.js +58 -0
  578. package/dist/tools/modules/builders.js.map +1 -0
  579. package/dist/tools/modules/index.d.ts +2 -0
  580. package/dist/tools/modules/index.d.ts.map +1 -0
  581. package/dist/tools/modules/index.js +2 -0
  582. package/dist/tools/modules/index.js.map +1 -0
  583. package/dist/tools/modules/module-id-schema.d.ts +4 -0
  584. package/dist/tools/modules/module-id-schema.d.ts.map +1 -0
  585. package/dist/tools/modules/module-id-schema.js +14 -0
  586. package/dist/tools/modules/module-id-schema.js.map +1 -0
  587. package/dist/tools/modules/module-type-fields.d.ts +10 -0
  588. package/dist/tools/modules/module-type-fields.d.ts.map +1 -0
  589. package/dist/tools/modules/module-type-fields.js +34 -0
  590. package/dist/tools/modules/module-type-fields.js.map +1 -0
  591. package/dist/tools/modules/modules-create.d.ts +59 -0
  592. package/dist/tools/modules/modules-create.d.ts.map +1 -0
  593. package/dist/tools/modules/modules-create.js +154 -0
  594. package/dist/tools/modules/modules-create.js.map +1 -0
  595. package/dist/tools/modules/modules-delete.d.ts +51 -0
  596. package/dist/tools/modules/modules-delete.d.ts.map +1 -0
  597. package/dist/tools/modules/modules-delete.js +180 -0
  598. package/dist/tools/modules/modules-delete.js.map +1 -0
  599. package/dist/tools/modules/modules-update.d.ts +43 -0
  600. package/dist/tools/modules/modules-update.d.ts.map +1 -0
  601. package/dist/tools/modules/modules-update.js +177 -0
  602. package/dist/tools/modules/modules-update.js.map +1 -0
  603. package/dist/tools/modules/placement-hints.d.ts +5 -0
  604. package/dist/tools/modules/placement-hints.d.ts.map +1 -0
  605. package/dist/tools/modules/placement-hints.js +90 -0
  606. package/dist/tools/modules/placement-hints.js.map +1 -0
  607. package/dist/tools/modules/placement-ways.d.ts +13 -0
  608. package/dist/tools/modules/placement-ways.d.ts.map +1 -0
  609. package/dist/tools/modules/placement-ways.js +61 -0
  610. package/dist/tools/modules/placement-ways.js.map +1 -0
  611. package/dist/tools/multi-items/builders.d.ts +1 -21
  612. package/dist/tools/multi-items/builders.d.ts.map +1 -1
  613. package/dist/tools/multi-items/builders.js +22 -67
  614. package/dist/tools/multi-items/builders.js.map +1 -1
  615. package/dist/tools/multi-items/index.d.ts +0 -15
  616. package/dist/tools/multi-items/index.d.ts.map +1 -1
  617. package/dist/tools/multi-items/index.js +0 -15
  618. package/dist/tools/multi-items/index.js.map +1 -1
  619. package/dist/tools/multi-items/item-container-map.d.ts +0 -35
  620. package/dist/tools/multi-items/item-container-map.d.ts.map +1 -1
  621. package/dist/tools/multi-items/item-container-map.js +0 -35
  622. package/dist/tools/multi-items/item-container-map.js.map +1 -1
  623. package/dist/tools/multi-items/output-schemas.d.ts +101 -0
  624. package/dist/tools/multi-items/output-schemas.d.ts.map +1 -0
  625. package/dist/tools/multi-items/output-schemas.js +74 -0
  626. package/dist/tools/multi-items/output-schemas.js.map +1 -0
  627. package/dist/tools/navigation/builders.d.ts +3 -0
  628. package/dist/tools/navigation/builders.d.ts.map +1 -0
  629. package/dist/tools/navigation/builders.js +25 -0
  630. package/dist/tools/navigation/builders.js.map +1 -0
  631. package/dist/tools/navigation/index.d.ts +2 -0
  632. package/dist/tools/navigation/index.d.ts.map +1 -0
  633. package/dist/tools/navigation/index.js +2 -0
  634. package/dist/tools/navigation/index.js.map +1 -0
  635. package/dist/tools/navigation/schemas.d.ts +16 -0
  636. package/dist/tools/navigation/schemas.d.ts.map +1 -0
  637. package/dist/tools/navigation/schemas.js +11 -0
  638. package/dist/tools/navigation/schemas.js.map +1 -0
  639. package/dist/tools/output-schema-metadata.d.ts +5 -0
  640. package/dist/tools/output-schema-metadata.d.ts.map +1 -0
  641. package/dist/tools/output-schema-metadata.js +83 -0
  642. package/dist/tools/output-schema-metadata.js.map +1 -0
  643. package/dist/tools/pages/builders.d.ts +1 -41
  644. package/dist/tools/pages/builders.d.ts.map +1 -1
  645. package/dist/tools/pages/builders.js +373 -359
  646. package/dist/tools/pages/builders.js.map +1 -1
  647. package/dist/tools/pages/header-transparency.d.ts +34 -0
  648. package/dist/tools/pages/header-transparency.d.ts.map +1 -0
  649. package/dist/tools/pages/header-transparency.js +85 -0
  650. package/dist/tools/pages/header-transparency.js.map +1 -0
  651. package/dist/tools/pages/index.d.ts +1 -19
  652. package/dist/tools/pages/index.d.ts.map +1 -1
  653. package/dist/tools/pages/index.js +1 -19
  654. package/dist/tools/pages/index.js.map +1 -1
  655. package/dist/tools/pages/schemas.d.ts +392 -224
  656. package/dist/tools/pages/schemas.d.ts.map +1 -1
  657. package/dist/tools/pages/schemas.js +605 -458
  658. package/dist/tools/pages/schemas.js.map +1 -1
  659. package/dist/tools/pages/write-output-schemas.d.ts +139 -0
  660. package/dist/tools/pages/write-output-schemas.d.ts.map +1 -0
  661. package/dist/tools/pages/write-output-schemas.js +138 -0
  662. package/dist/tools/pages/write-output-schemas.js.map +1 -0
  663. package/dist/tools/pages.d.ts +0 -11
  664. package/dist/tools/pages.d.ts.map +1 -1
  665. package/dist/tools/pages.js +0 -11
  666. package/dist/tools/pages.js.map +1 -1
  667. package/dist/tools/pool-resolve-helper.d.ts +0 -52
  668. package/dist/tools/pool-resolve-helper.d.ts.map +1 -1
  669. package/dist/tools/pool-resolve-helper.js +29 -104
  670. package/dist/tools/pool-resolve-helper.js.map +1 -1
  671. package/dist/tools/progress-phases.d.ts +0 -42
  672. package/dist/tools/progress-phases.d.ts.map +1 -1
  673. package/dist/tools/progress-phases.js +0 -44
  674. package/dist/tools/progress-phases.js.map +1 -1
  675. package/dist/tools/response-budget.d.ts +8 -0
  676. package/dist/tools/response-budget.d.ts.map +1 -0
  677. package/dist/tools/response-budget.js +7 -0
  678. package/dist/tools/response-budget.js.map +1 -0
  679. package/dist/tools/shared-schemas.d.ts +12 -43
  680. package/dist/tools/shared-schemas.d.ts.map +1 -1
  681. package/dist/tools/shared-schemas.js +42 -97
  682. package/dist/tools/shared-schemas.js.map +1 -1
  683. package/dist/tools/skill/builders.d.ts +3 -0
  684. package/dist/tools/skill/builders.d.ts.map +1 -0
  685. package/dist/tools/skill/builders.js +81 -0
  686. package/dist/tools/skill/builders.js.map +1 -0
  687. package/dist/tools/sources/builders.d.ts +1 -11
  688. package/dist/tools/sources/builders.d.ts.map +1 -1
  689. package/dist/tools/sources/builders.js +195 -173
  690. package/dist/tools/sources/builders.js.map +1 -1
  691. package/dist/tools/sources/index.d.ts +0 -17
  692. package/dist/tools/sources/index.d.ts.map +1 -1
  693. package/dist/tools/sources/index.js +0 -16
  694. package/dist/tools/sources/index.js.map +1 -1
  695. package/dist/tools/sources/read-output-schemas.d.ts +101 -0
  696. package/dist/tools/sources/read-output-schemas.d.ts.map +1 -0
  697. package/dist/tools/sources/read-output-schemas.js +105 -0
  698. package/dist/tools/sources/read-output-schemas.js.map +1 -0
  699. package/dist/tools/sources/source-name-argument.d.ts +17 -0
  700. package/dist/tools/sources/source-name-argument.d.ts.map +1 -0
  701. package/dist/tools/sources/source-name-argument.js +64 -0
  702. package/dist/tools/sources/source-name-argument.js.map +1 -0
  703. package/dist/tools/sources/write-output-schemas.d.ts +100 -0
  704. package/dist/tools/sources/write-output-schemas.d.ts.map +1 -0
  705. package/dist/tools/sources/write-output-schemas.js +61 -0
  706. package/dist/tools/sources/write-output-schemas.js.map +1 -0
  707. package/dist/tools/sources.d.ts +0 -12
  708. package/dist/tools/sources.d.ts.map +1 -1
  709. package/dist/tools/sources.js +0 -12
  710. package/dist/tools/sources.js.map +1 -1
  711. package/dist/tools/sparse-fields.d.ts +19 -194
  712. package/dist/tools/sparse-fields.d.ts.map +1 -1
  713. package/dist/tools/sparse-fields.js +212 -196
  714. package/dist/tools/sparse-fields.js.map +1 -1
  715. package/dist/tools/strict-input.d.ts +5 -0
  716. package/dist/tools/strict-input.d.ts.map +1 -0
  717. package/dist/tools/strict-input.js +55 -0
  718. package/dist/tools/strict-input.js.map +1 -0
  719. package/dist/tools/sublayout/builders.d.ts +1 -21
  720. package/dist/tools/sublayout/builders.d.ts.map +1 -1
  721. package/dist/tools/sublayout/builders.js +10 -40
  722. package/dist/tools/sublayout/builders.js.map +1 -1
  723. package/dist/tools/sublayout/index.d.ts +1 -11
  724. package/dist/tools/sublayout/index.d.ts.map +1 -1
  725. package/dist/tools/sublayout/index.js +1 -11
  726. package/dist/tools/sublayout/index.js.map +1 -1
  727. package/dist/tools/sublayout/output-schemas.d.ts +57 -0
  728. package/dist/tools/sublayout/output-schemas.d.ts.map +1 -0
  729. package/dist/tools/sublayout/output-schemas.js +51 -0
  730. package/dist/tools/sublayout/output-schemas.js.map +1 -0
  731. package/dist/tools/tool-builder/annotations.d.ts +1 -49
  732. package/dist/tools/tool-builder/annotations.d.ts.map +1 -1
  733. package/dist/tools/tool-builder/annotations.js +9 -49
  734. package/dist/tools/tool-builder/annotations.js.map +1 -1
  735. package/dist/tools/tool-builder/confirm-preview.d.ts +24 -0
  736. package/dist/tools/tool-builder/confirm-preview.d.ts.map +1 -0
  737. package/dist/tools/tool-builder/confirm-preview.js +37 -0
  738. package/dist/tools/tool-builder/confirm-preview.js.map +1 -0
  739. package/dist/tools/tool-builder/define.d.ts +6 -26
  740. package/dist/tools/tool-builder/define.d.ts.map +1 -1
  741. package/dist/tools/tool-builder/define.js +0 -25
  742. package/dist/tools/tool-builder/define.js.map +1 -1
  743. package/dist/tools/tool-builder/index.d.ts +3 -26
  744. package/dist/tools/tool-builder/index.d.ts.map +1 -1
  745. package/dist/tools/tool-builder/index.js +2 -25
  746. package/dist/tools/tool-builder/index.js.map +1 -1
  747. package/dist/tools/tool-builder/results.d.ts +4 -111
  748. package/dist/tools/tool-builder/results.d.ts.map +1 -1
  749. package/dist/tools/tool-builder/results.js +258 -250
  750. package/dist/tools/tool-builder/results.js.map +1 -1
  751. package/dist/tools/tool-builder/types.d.ts +5 -59
  752. package/dist/tools/tool-builder/types.d.ts.map +1 -1
  753. package/dist/tools/tool-builder/types.js +0 -7
  754. package/dist/tools/tool-builder/types.js.map +1 -1
  755. package/dist/tools/tool-builder.d.ts +0 -14
  756. package/dist/tools/tool-builder.d.ts.map +1 -1
  757. package/dist/tools/tool-builder.js +0 -14
  758. package/dist/tools/tool-builder.js.map +1 -1
  759. package/dist/uninstall-skill.d.ts +0 -41
  760. package/dist/uninstall-skill.d.ts.map +1 -1
  761. package/dist/uninstall-skill.js +0 -49
  762. package/dist/uninstall-skill.js.map +1 -1
  763. package/dist/uninstall.d.ts +0 -41
  764. package/dist/uninstall.d.ts.map +1 -1
  765. package/dist/uninstall.js +1 -29
  766. package/dist/uninstall.js.map +1 -1
  767. package/dist/update/update-check.d.ts +0 -26
  768. package/dist/update/update-check.d.ts.map +1 -1
  769. package/dist/update/update-check.js +0 -25
  770. package/dist/update/update-check.js.map +1 -1
  771. package/manifest.json +4 -5
  772. package/package.json +5 -5
  773. package/skills/yt-builder-mcp/SKILL.md +2958 -382
  774. package/dist/tools/elements/handlers-write.d.ts +0 -70
  775. package/dist/tools/elements/handlers-write.d.ts.map +0 -1
  776. package/dist/tools/elements/handlers-write.js +0 -700
  777. package/dist/tools/elements/handlers-write.js.map +0 -1
  778. package/dist/tools/elements/handlers.d.ts +0 -125
  779. package/dist/tools/elements/handlers.d.ts.map +0 -1
  780. package/dist/tools/elements/handlers.js +0 -571
  781. package/dist/tools/elements/handlers.js.map +0 -1
  782. package/dist/tools/elements/layout-hierarchy-rules.d.ts +0 -62
  783. package/dist/tools/elements/layout-hierarchy-rules.d.ts.map +0 -1
  784. package/dist/tools/elements/layout-hierarchy-rules.js +0 -154
  785. package/dist/tools/elements/layout-hierarchy-rules.js.map +0 -1
  786. package/dist/tools/elements/schema-validation.d.ts +0 -96
  787. package/dist/tools/elements/schema-validation.d.ts.map +0 -1
  788. package/dist/tools/elements/schema-validation.js +0 -249
  789. package/dist/tools/elements/schema-validation.js.map +0 -1
  790. package/dist/tools/elicitation.d.ts +0 -87
  791. package/dist/tools/elicitation.d.ts.map +0 -1
  792. package/dist/tools/elicitation.js +0 -100
  793. package/dist/tools/elicitation.js.map +0 -1
  794. package/dist/tools/format/elements-format.d.ts +0 -75
  795. package/dist/tools/format/elements-format.d.ts.map +0 -1
  796. package/dist/tools/format/elements-format.js +0 -324
  797. package/dist/tools/format/elements-format.js.map +0 -1
  798. package/dist/tools/format/source-schema-format.d.ts +0 -74
  799. package/dist/tools/format/source-schema-format.d.ts.map +0 -1
  800. package/dist/tools/format/source-schema-format.js +0 -208
  801. package/dist/tools/format/source-schema-format.js.map +0 -1
  802. package/dist/tools/layout-flatten.d.ts +0 -84
  803. package/dist/tools/layout-flatten.d.ts.map +0 -1
  804. package/dist/tools/layout-flatten.js +0 -129
  805. package/dist/tools/layout-flatten.js.map +0 -1
  806. package/dist/tools/local-content/handlers.d.ts +0 -54
  807. package/dist/tools/local-content/handlers.d.ts.map +0 -1
  808. package/dist/tools/local-content/handlers.js +0 -316
  809. package/dist/tools/local-content/handlers.js.map +0 -1
  810. package/dist/tools/multi-items/clean-implode-handler.d.ts +0 -37
  811. package/dist/tools/multi-items/clean-implode-handler.d.ts.map +0 -1
  812. package/dist/tools/multi-items/clean-implode-handler.js +0 -65
  813. package/dist/tools/multi-items/clean-implode-handler.js.map +0 -1
  814. package/dist/tools/multi-items/format/inspection-format.d.ts +0 -41
  815. package/dist/tools/multi-items/format/inspection-format.d.ts.map +0 -1
  816. package/dist/tools/multi-items/format/inspection-format.js +0 -64
  817. package/dist/tools/multi-items/format/inspection-format.js.map +0 -1
  818. package/dist/tools/multi-items/inspect-handler.d.ts +0 -97
  819. package/dist/tools/multi-items/inspect-handler.d.ts.map +0 -1
  820. package/dist/tools/multi-items/inspect-handler.js +0 -323
  821. package/dist/tools/multi-items/inspect-handler.js.map +0 -1
  822. package/dist/tools/multi-items/inspection-cache.d.ts +0 -85
  823. package/dist/tools/multi-items/inspection-cache.d.ts.map +0 -1
  824. package/dist/tools/multi-items/inspection-cache.js +0 -126
  825. package/dist/tools/multi-items/inspection-cache.js.map +0 -1
  826. package/dist/tools/pages/handlers-audit.d.ts +0 -129
  827. package/dist/tools/pages/handlers-audit.d.ts.map +0 -1
  828. package/dist/tools/pages/handlers-audit.js +0 -704
  829. package/dist/tools/pages/handlers-audit.js.map +0 -1
  830. package/dist/tools/pages/handlers-read.d.ts +0 -95
  831. package/dist/tools/pages/handlers-read.d.ts.map +0 -1
  832. package/dist/tools/pages/handlers-read.js +0 -929
  833. package/dist/tools/pages/handlers-read.js.map +0 -1
  834. package/dist/tools/pages/handlers-write.d.ts +0 -212
  835. package/dist/tools/pages/handlers-write.d.ts.map +0 -1
  836. package/dist/tools/pages/handlers-write.js +0 -418
  837. package/dist/tools/pages/handlers-write.js.map +0 -1
  838. package/dist/tools/pages/target.d.ts +0 -162
  839. package/dist/tools/pages/target.d.ts.map +0 -1
  840. package/dist/tools/pages/target.js +0 -239
  841. package/dist/tools/pages/target.js.map +0 -1
  842. package/dist/tools/sources/handlers-bind.d.ts +0 -148
  843. package/dist/tools/sources/handlers-bind.d.ts.map +0 -1
  844. package/dist/tools/sources/handlers-bind.js +0 -655
  845. package/dist/tools/sources/handlers-bind.js.map +0 -1
  846. package/dist/tools/sources/handlers.d.ts +0 -114
  847. package/dist/tools/sources/handlers.d.ts.map +0 -1
  848. package/dist/tools/sources/handlers.js +0 -285
  849. package/dist/tools/sources/handlers.js.map +0 -1
  850. package/dist/tools/sublayout/inspect-sublayout-handler.d.ts +0 -95
  851. package/dist/tools/sublayout/inspect-sublayout-handler.d.ts.map +0 -1
  852. package/dist/tools/sublayout/inspect-sublayout-handler.js +0 -181
  853. package/dist/tools/sublayout/inspect-sublayout-handler.js.map +0 -1
@@ -1,91 +1,30 @@
1
- /**
2
- * Page-tool builders — pure `defineTool` factory list.
3
- *
4
- * Split out of `src/tools/pages.ts` (Round-2 R2-A2-CRIT1). Handler
5
- * bodies live in `./handlers-read.ts` (pages_list, page_get_layout,
6
- * page_get_schema, get_etag, template_summary) and `./handlers-write.ts`
7
- * (page_save, page_publish, pages_create, pages_delete — 3-phase
8
- * progress contract).
9
- *
10
- * Surface: 9 page-level tools (pre-C4: 7; v1.2 C4 added pages_create +
11
- * pages_delete wrapping POST /pages and DELETE /pages/{id}).
12
- *
13
- * @license MIT
14
- */
15
1
  import { z } from 'zod';
16
- import { withSiteRetry, withWriteSiteRetry } from '../pool-resolve-helper.js';
17
- import { ETAG as ETAG_STRICT, POST_ID, RESOLVE_URL, SITE_ID_SCHEMA, TEMPLATE_ID, TEMPLATE_ID_OPTIONAL, } from '../shared-schemas.js';
2
+ import { ETAG as ETAG_STRICT, ETAG_PREVIEW_OPTIONAL, INCLUDE_META_SCHEMA, RESOLVE_URL, SITE_ID_SCHEMA, LAYOUT_ID, LAYOUT_ID_OPTIONAL, } from '../shared-schemas.js';
18
3
  import { FIELDS, FLAT, MAX_CHARS } from '../sparse-fields.js';
19
- import { creating, defineTool, destructive, mutating, readOnly, withSiteMeta, } from '../tool-builder.js';
20
- import { handlePagesAudit } from './handlers-audit.js';
21
- import { handleGetEtag, handlePageGetLayout, handlePageGetSchema, handlePagesList, handlePagesResolve, handleRenderPreview, handleTemplateSummary, } from './handlers-read.js';
22
- import { handlePageDynamize, handlePagePublish, handlePagesCreate, handlePagesDelete, handlePageSave, handleTemplateSetType, TEMPLATE_SET_TYPE_OUTPUT_SCHEMA, } from './handlers-write.js';
23
- import { ETAG_OUTPUT_SCHEMA, PAGE_DYNAMIZE_INPUT, PAGES_AUDIT_INPUT, PAGES_AUDIT_OUTPUT_SCHEMA, PAGES_CREATE_INPUT, PAGES_DELETE_INPUT, PAGES_DELETE_OUTPUT_SCHEMA, PAGES_LIST_OUTPUT_SCHEMA, PAGES_RESOLVE_INPUT, PAGES_RESOLVE_OUTPUT_SCHEMA, RENDER_PREVIEW_OUTPUT_SCHEMA, SCHEMA_OUTPUT_SCHEMA, TEMPLATE_SUMMARY_OUTPUT_SCHEMA, } from './schemas.js';
24
- // F-14: page-level save/publish accept OPTIONAL ETag (no precondition lock
25
- // at template level — element/binding mutations REQUIRE one via the strict
26
- // ETAG in shared-schemas.ts). Schema and description now agree: optional
27
- // here, recommended for safety. When provided, 412 Precondition Failed is
28
- // raised on stale snapshots; when omitted, the save proceeds unconditionally.
29
- const ETAG = z
30
- .string()
31
- .optional()
32
- .describe('Optimistic-lock ETag (from yootheme_builder_get_etag). ' +
33
- 'Optional; when provided, optimistic-lock is enforced (412 on conflict). ' +
34
- 'When omitted, last-write-wins applies. Recommended for collaborative edits.');
35
- /**
36
- * Build the {@link RenderContext} from the data reachable in a page
37
- * builder. Pure: no I/O, no `any`. Missing `parentTemplateId` / `locale`
38
- * collapse to `null`.
39
- */
40
- export function buildRenderContext(input) {
41
- return {
42
- parent_template_id: input.parentTemplateId ?? null,
43
- locale: input.locale ?? null,
44
- site_url: input.siteUrl,
45
- };
46
- }
47
- /**
48
- * Best-effort locale extraction from a resolved site. The registry does
49
- * not (yet) carry an explicit locale, so we read it from the platform
50
- * descriptor when present; otherwise `null` (the consumer-stable
51
- * "unknown" value). Kept narrow + guarded so this stays `any`-free.
52
- */
53
- function localeForSite(site) {
54
- const platform = site.platform;
55
- if (typeof platform === 'object' && platform !== null && 'locale' in platform) {
56
- const value = platform.locale;
57
- if (typeof value === 'string' && value !== '') {
58
- return value;
59
- }
60
- }
61
- return null;
62
- }
63
- /**
64
- * Stamp a {@link RenderContext} into a tool result's free-form
65
- * result-level `_meta` (next to the site-meta `withSiteMeta` adds).
66
- * Never touches `structuredContent` — that stays schema-pure so it keeps
67
- * validating against the tool's `outputSchema`. Pure: returns a new
68
- * result, does not mutate the input.
69
- */
70
- function withRenderContext(result, ctx) {
71
- const base = result._meta;
72
- const mergedMeta = base !== undefined && base !== null && typeof base === 'object'
73
- ? { ...base, render_context: ctx }
74
- : { render_context: ctx };
75
- return { ...result, _meta: mergedMeta };
76
- }
77
- export function buildPagesTools(pool) {
4
+ import { creating, defineTool, destructive, mutating, readOnly, } from '../tool-builder.js';
5
+ import { HEADER_TRANSPARENCY_SET_INPUT } from './header-transparency.js';
6
+ import { PAGES_CREATE_OUTPUT_SCHEMA, PAGE_GENERATE_DYNAMIC_OUTPUT_SCHEMA, PAGE_PUBLISH_OUTPUT_SCHEMA, PAGE_SAVE_OUTPUT_SCHEMA, TEMPLATE_SET_TYPE_OUTPUT_SCHEMA, } from './write-output-schemas.js';
7
+ import { ETAG_OUTPUT_SCHEMA, HEADING_OUTLINE_OUTPUT_SCHEMA, PAGE_GENERATE_DYNAMIC_INPUT, PAGE_GET_LAYOUT_OUTPUT_SCHEMA, PAGES_AUDIT_INPUT, PAGES_AUDIT_OUTPUT_SCHEMA, PAGES_CREATE_INPUT, PAGES_DELETE_INPUT, PAGES_DELETE_OUTPUT_SCHEMA, PAGES_LIST_OUTPUT_SCHEMA, PAGES_RESOLVE_INPUT, PAGES_RESOLVE_OUTPUT_SCHEMA, PAGES_RESTORE_INPUT, PAGES_RESTORE_OUTPUT_SCHEMA, PAGES_SET_STATUS_INPUT, PAGES_SET_STATUS_OUTPUT_SCHEMA, RENDER_PREVIEW_OUTPUT_SCHEMA, TEMPLATE_SUMMARY_OUTPUT_SCHEMA, } from './schemas.js';
8
+ export function buildPagesTools() {
78
9
  return [
79
10
  defineTool({
80
11
  name: 'yootheme_builder_pages_list',
81
- description: 'List pages, templates, and layouts in the YOOtheme Pro builder ' +
82
- '(id, label, type, elements_count, frontend_url, builder_url, ' +
83
- 'serves_context_kind, serves_context_ids per row). ' +
84
- 'CALL THIS FIRST to discover template IDs before page_get_layout / element_list / ' +
85
- 'page_get_schema. Paginates: up to `limit` rows (default 50) plus `total` and a ' +
86
- '`next_cursor` (pass it back as `cursor`) when more remain. Filter with ' +
87
- '`label_contains`. Slim rows with `fields:["id","label"]`; bound output ' +
88
- 'with `max_chars`. Operates on the default site unless site_id is provided.',
12
+ description: 'List pages, templates and layouts. Each row returns `kind` ' +
13
+ '(content | theme_template) plus serves_context_kind, serves_context_ids and ' +
14
+ 'page_role the template ROLE (WHICH objects it renders for), NOT a data ' +
15
+ 'binding; for who-binds-what call layout_query with no layout_id. The ' +
16
+ 'envelope returns `totals`. Call first for layout_id ' +
17
+ '(page_get_layout/element_list). ' +
18
+ '`type` = PAGE type, not element type (those filter on `element_type`). ' +
19
+ 'Rows with a CMS status carry `visibility`: public | hidden | undetermined, never ' +
20
+ 'empty. Reads STORED FIELDS only — status, plus WordPress password protection ' +
21
+ '(`hidden`, with the reason). It does NOT read the menu route, the access level, ' +
22
+ 'or whether the permalink resolves, so Joomla rows stay `undetermined`; for THAT ' +
23
+ 'verdict read `cms_visibility.findable_by_visitor` from pages_set_status / ' +
24
+ 'page_publish — a different, per-page question. ' +
25
+ 'Page contents (SEO/structure/links/modules): yootheme_builder_pages_audit. ' +
26
+ '`is_public_homepage` marks the one row served at / (the site front page); ' +
27
+ 'no tool here moves it.',
89
28
  inputSchema: {
90
29
  site_id: SITE_ID_SCHEMA,
91
30
  fields: FIELDS,
@@ -103,60 +42,80 @@ export function buildPagesTools(pool) {
103
42
  label_contains: z
104
43
  .string()
105
44
  .optional()
106
- .describe('Case-insensitive substring filter on the page label / id / type (e.g. "blog").'),
45
+ .describe('Case-insensitive substring filter on the page label / id / type / frontend_url ' +
46
+ '(also matches a slug or URL fragment, e.g. "blog" or "product-launch").'),
47
+ visibility: z
48
+ .enum(['public', 'hidden', 'undetermined', 'no_cms_status'])
49
+ .optional()
50
+ .describe('Keep only rows whose `visibility` reads this word (no_cms_status = a theme ' +
51
+ 'template, which has none). `totals.visibility` counts all four over the ' +
52
+ 'same filtered set, so one call answers how many are hidden without ' +
53
+ 'reading the rows.'),
107
54
  max_chars: MAX_CHARS,
55
+ sort: z
56
+ .enum(['recent'])
57
+ .optional()
58
+ .describe('Order the rows. "recent" = most recently modified first (rows with no '
59
+ + 'timestamp go last, never first). Omit to keep the default order '
60
+ + '(theme templates, then per-page). The answer reports `sorted_over` '
61
+ + '("all" or "this_page") so a paged result cannot read as a site-wide '
62
+ + 'verdict.'),
63
+ include_meta: INCLUDE_META_SCHEMA,
108
64
  },
109
65
  outputSchema: PAGES_LIST_OUTPUT_SCHEMA,
110
66
  annotations: readOnly('List Pages'),
111
- handler: async ({ site_id, ...rest }) => withSiteRetry(pool, site_id, async (client, site) => withSiteMeta(await handlePagesList(client, rest), site)),
112
67
  }),
113
68
  defineTool({
114
69
  name: 'yootheme_builder_page_get_layout',
115
- // B-1 (SEO-routing fix, 2026-07-21): a generic "SEO audit" prompt
116
- // from a COLD agent (no SKILL.md) otherwise loops this tool
117
- // page-by-page into its Max-Iterations limit instead of the one-call
118
- // pages_audit sweep (empirically confirmed at glöckle —
119
- // followup_pages_audit_routing_generic_seo_request). The negative
120
- // steer at the tail routes a whole-site audit to pages_audit (an L2
121
- // read-only tool reached via yootheme_builder_advanced_read). The
122
- // per-arg details dropped from this prose (bindings-skeleton / force
123
- // / cursor semantics) already live in each param's own .describe().
124
- description: 'Get the layout tree for one template — address it by `template_id` ' +
125
- '(from pages_list), `post_id`, or `url`. `mode:"bindings_only"` for ' +
126
- 'dynamize/bind; `mode:"full"` (default) is nested `{layout, etag}`, ' +
127
- '`flat:true` a depth-first array. `max_chars` bounds the text; a clipped ' +
128
- 'read returns `next_cursor` to page the rest. For a site-wide ' +
129
- 'SEO/structure/content/links audit (h1, image alt, thin pages, dead ' +
130
- 'links) do NOT loop this tool page-by-page — call ' +
131
- 'yootheme_builder_pages_audit (one sweep via ' +
132
- 'yootheme_builder_advanced_read). Operates on the default site unless ' +
133
- 'site_id is provided.',
70
+ description: 'Get the layout tree for one layout — address by `layout_id` or `url`. `mode:"bindings_only"` for dynamize/bind. Over `max_chars` whole ' +
71
+ 'entries DROP (`truncated`+`omitted_count`; outline cuts its text) and NOTHING ' +
72
+ 'pages the rest no cursor in any mode. Narrow instead: `mode:"outline"` to ' +
73
+ 'map, then element_list(root_path). ' +
74
+ 'For a site-wide SEO/structure ' +
75
+ 'audit do NOT loop this tool page-by-page call yootheme_builder_pages_audit ' +
76
+ '(gateway-only). ' +
77
+ 'For ONE narrow question (e.g. "where is the binding" or "which elements have ' +
78
+ 'type X") this whole-template read is heavier than it needs to be — prefer ' +
79
+ 'yootheme_builder_layout_query (gateway-only; has_binding/element_type/' +
80
+ 'name_matches filters) or element_list with `root_path` to scope the walk.',
134
81
  inputSchema: {
135
82
  site_id: SITE_ID_SCHEMA,
136
- // G-A (Track-C URL→layout): three interchangeable addressing modes
137
- // (exactly one required) so ONE call reaches a layout from a
138
- // template_id, a bare numeric post/article id, or a pasted URL.
139
- template_id: TEMPLATE_ID_OPTIONAL,
140
- post_id: POST_ID,
83
+ layout_id: LAYOUT_ID_OPTIONAL,
141
84
  url: RESOLVE_URL,
142
- // F195 (P0): bindings_only returns the trimmed binding skeleton —
143
- // recommended for dynamize/bind workflows (token-efficient).
144
- // G1 (V3): outline returns a token-efficient INDENTED semantic
145
- // outline — one line per node, cheapest way to orient in a large
146
- // layout before reading specifics.
147
85
  mode: z
148
86
  .enum(['full', 'bindings_only', 'outline'])
149
87
  .optional()
150
88
  .describe('full (default) = whole nested layout; bindings_only = trimmed ' +
151
89
  'binding skeleton (path/type/name/has_binding/source/children, ' +
152
- 'no style props); outline = a token-efficient INDENTED text ' +
153
- 'tree (one line per node: label type (bound: …) [sN]) for ' +
154
- 'cheap orientation in a large layout. Each outline line carries ' +
155
- 'a per-read handle [sN] AND the node’s real JSON-Pointer ' +
156
- 'path; the handle is a short alias that is STATE-SCOPED re-read ' +
157
- 'after any mutation. Prefer bindings_only for dynamize/bind, ' +
158
- 'outline to first map an unfamiliar template.'),
159
- // F195 (P0): bypass the per-process unchanged-read dedup.
90
+ 'no style props). It compares each binding SOURCE against the ' +
91
+ 'sources this site registers: one that is gone carries ' +
92
+ '`unresolved:true` and is named once in `unresolved_sources`, with ' +
93
+ '`unresolved_sources_note` beside it saying what to repair. That ' +
94
+ 'list is present but EMPTY when nothing is dead, and replaced by ' +
95
+ '`unresolved_sources_not_checked` when the registered-source list ' +
96
+ 'could not be read at all (then an unmarked binding means ' +
97
+ 'nothing). The field ' +
98
+ 'VALUES inside a source that DOES resolve are not compared: one ' +
99
+ 'naming a field that does not exist looks exactly like one that ' +
100
+ 'does here, and renders blank — element_get_binding names those ' +
101
+ 'for ONE element. pages_audit reports the same dead sources ' +
102
+ 'site-wide as dangling-source. outline = an INDENTED text ' +
103
+ 'tree (one line per node: label ▸ type (bound: …) [sN] ' +
104
+ '/children/…) for cheap orientation in a large layout — the tree ' +
105
+ 'arrives on ' +
106
+ 'BOTH legs: as the TEXT content, and as `outline_text` in ' +
107
+ 'structuredContent, the same string under the same `max_chars` ' +
108
+ 'cap. structuredContent also carries a SUMMARY beside it ' +
109
+ '(named_sections with a node_count each, total_elements, etag) ' +
110
+ 'to pick WHICH section to open; the raw per-node array is not ' +
111
+ 'sent on either leg — call element_list(root_path, depth) for ' +
112
+ 'one section\'s actual nodes. Each outline line ENDS in that ' +
113
+ 'node\'s `element_path` — the RELATIVE address element_update_settings, ' +
114
+ 'element_move and element_delete take — so you can edit straight from ' +
115
+ 'this read. The [sN] handle before it is a per-read alias, ' +
116
+ 'STATE-SCOPED: re-read after any mutation. Prefer bindings_only for ' +
117
+ 'dynamize/bind, outline to first map an unfamiliar template. Neither ' +
118
+ 'cheap mode can be combined with include_modules:true — see that argument.'),
160
119
  force: z
161
120
  .boolean()
162
121
  .optional()
@@ -164,148 +123,145 @@ export function buildPagesTools(pool) {
164
123
  'already read this session (bypasses the [unchanged] dedup).'),
165
124
  flat: FLAT,
166
125
  fields: FIELDS,
167
- max_chars: MAX_CHARS,
168
- // B7 (Glöckle continuation cursor): resume a clipped full/
169
- // bindings_only text leg from its char offset. Opaque
170
- // base64url `o:<n>` — the SAME offset-cursor contract
171
- // pages_list/sources_list use. Omit to read from the start.
172
- cursor: z
173
- .string()
126
+ max_chars: MAX_CHARS.describe('Cap (chars) on the text output. For `mode:"full"`/`"bindings_only"` both ' +
127
+ 'legs carry the same shortened payload, so structuredContent is not a way ' +
128
+ 'around the cap. For `mode:"outline"` this bounds ONLY the outline text ' +
129
+ '(the text content and `outline_text` in structuredContent) — the summary ' +
130
+ 'beside it (`named_sections`, `total_elements`, `etag`) is never shortened ' +
131
+ 'and always arrives complete, whatever this cap did to the outline text. ' +
132
+ 'A `[site @ host] ` prefix is added AFTER, so delivery is ' +
133
+ 'longer by it. ' +
134
+ 'Raising it stops helping at the limit your own client puts on a single tool ' +
135
+ 'result, which this server cannot see. ' +
136
+ 'Out of range, the cap that actually applied comes back as `max_chars`.'),
137
+ include_modules: z
138
+ .boolean()
174
139
  .optional()
175
- .describe('Char-offset cursor from a clipped response\'s next_cursor resumes ' +
176
- 'the same dump at that offset (use with max_chars).'),
140
+ .describe('mode:"full" (the default) ONLY including with flat:true, which is a ' +
141
+ 'projection of mode:"full" and serves it. In ' +
142
+ 'mode:"outline"/"bindings_only" the ' +
143
+ 'server cannot serve it and the response says so in ' +
144
+ '`modules_on_page_unavailable` (it does NOT mean the page has no ' +
145
+ 'modules). When true, attach `modules_on_page` — the widgets/modules that render ' +
146
+ 'on THIS page, split into `from_elements` (a module/module_position ' +
147
+ 'element placed directly in this page\'s own layout) and ' +
148
+ '`from_positions` (a site-wide theme position — navbar/header/footer ' +
149
+ '— rendering here with no element in this page\'s own layout at all). ' +
150
+ 'On Joomla, a site-wide module can still be assignment-EXCLUDED from ' +
151
+ 'this specific page (`except`); when that decision cannot be resolved ' +
152
+ '(no menu item addresses this page, or more than one does), the row ' +
153
+ 'lands in `from_positions_undecidable` instead of being guessed in or ' +
154
+ 'out. A builder-content module (Joomla mod_yootheme_builder, WP ' +
155
+ 'builderwidget) carries its embedded layout SUMMARIZED here as ' +
156
+ '`{omitted_for_size:true, node_count:N}`, not the full tree (B25) — ' +
157
+ '`layout_root` still names its root type; for the actual content call ' +
158
+ 'local_content_read(kind:"modules") on that id. Default false — omit ' +
159
+ 'for the pre-existing response shape, unchanged.'),
177
160
  },
178
- // No outputSchema: the response shape is a union (nested OR flat with
179
- // optional projection) and the JSON-Pointer-keyed nested shape is
180
- // structurally open-ended — modelling it precisely buys nothing here.
161
+ outputSchema: PAGE_GET_LAYOUT_OUTPUT_SCHEMA,
181
162
  annotations: readOnly('Get Page Layout'),
182
- handler: async ({ site_id, ...rest }) => withSiteRetry(pool, site_id, async (client, site) => withSiteMeta(await handlePageGetLayout(client, rest), site)),
183
- }),
184
- defineTool({
185
- name: 'yootheme_builder_page_get_schema',
186
- description: 'Get the flat schema for a template — nodes with their JSON-Pointer ' +
187
- 'paths and element types. Lighter than page_get_layout, enough to locate ' +
188
- 'elements before editing. Address by `template_id` (pages_list), `post_id`, ' +
189
- 'or `url`. `fields[]` slims each node; `max_chars` bounds output. ' +
190
- 'Operates on the default site unless site_id is provided.',
191
- inputSchema: {
192
- site_id: SITE_ID_SCHEMA,
193
- // G-A (Track-C URL→layout): three interchangeable addressing modes.
194
- template_id: TEMPLATE_ID_OPTIONAL,
195
- post_id: POST_ID,
196
- url: RESOLVE_URL,
197
- fields: FIELDS,
198
- max_chars: MAX_CHARS,
199
- },
200
- outputSchema: SCHEMA_OUTPUT_SCHEMA,
201
- annotations: readOnly('Get Page Schema'),
202
- handler: async ({ site_id, ...rest }) => withSiteRetry(pool, site_id, async (client, site) => withSiteMeta(await handlePageGetSchema(client, rest), site)),
203
163
  }),
204
- // ─── G-A (Track-C URL→layout) — pages_resolve ─────────────────
205
- // THE core "paste a URL → reach a layout in ≤1 MCP call" tool. An
206
- // agent handed only a public page URL resolves it to the per-page
207
- // template_id that every read tool accepts. L1 essential so a cold
208
- // agent reaches it directly (the whole point of the gap fix).
209
164
  defineTool({
210
165
  name: 'yootheme_builder_pages_resolve',
211
- description: 'Resolve a public page/article/archive URL to the template_id that renders it ' +
212
- 'paste a URL, get the layout id. Pretty/SEF permalinks resolve on WordPress AND ' +
213
- 'Joomla (incl. deep sub-category paths), not only raw ?option= URLs. A singular page ' +
214
- ' its per-page layout; a category/tag/CPT/author archive → the governing THEME ' +
215
- 'TEMPLATE, and for a category/term the SPECIFICALLY-ASSIGNED template (honoring ' +
216
- 'include-child-categories), not a generic one. Or a `target`. Returns {template_id, ' +
217
- 'post_id, type, frontend_url, context, resolved_via}. ' +
218
- 'Operates on the default site unless site_id is provided.',
166
+ description: 'Resolve a page/article/archive URL to the layout_id that renders it. SEF/pretty ' +
167
+ 'permalinks resolve on both WordPress and Joomla. A category/term resolves to the ' +
168
+ 'SPECIFICALLY-ASSIGNED template (honoring include-child-categories), not a generic ' +
169
+ 'one. Returns {layout_id, post_id, type, frontend_url, context, resolved_via}.',
219
170
  inputSchema: { site_id: SITE_ID_SCHEMA, ...PAGES_RESOLVE_INPUT },
220
171
  outputSchema: PAGES_RESOLVE_OUTPUT_SCHEMA,
221
172
  annotations: readOnly('Resolve URL to Template'),
222
- handler: async ({ site_id, ...rest }) => withSiteRetry(pool, site_id, async (client, site) => withSiteMeta(await handlePagesResolve(client, rest), site)),
223
173
  }),
224
174
  defineTool({
225
175
  name: 'yootheme_builder_get_etag',
226
- description: 'Get the current ETag (state revision) for the YOOtheme builder. Returns a ' +
227
- 'sha256+revision string for optimistic locking. This ETag is SITE-WIDE: it covers ' +
228
- 'the ENTIRE builder state, so ANY write to ANY template (by any client) bumps it — ' +
229
- 'a 412 means the site state advanced, not necessarily that YOUR template changed. ' +
230
- 'It is the SAME token the read tools (page_get_layout, element_list) return in ' +
231
- 'their `etag`. Pass it back as `etag` on any write tool; on 412, re-read and retry. ' +
232
- 'Operates on the default site unless site_id is provided.',
176
+ description: 'Get the current site-wide ETag for optimistic locking. ANY write to ANY ' +
177
+ 'template bumps it a 412 means the site state advanced, not necessarily ' +
178
+ 'your template. Same token page_get_layout/element_list return. Pass back as ' +
179
+ '`etag` on writes; on 412, re-read and retry. The ETag is SITE-wide, not per ' +
180
+ 'template that is why this tool takes no `layout_id`.',
233
181
  inputSchema: { site_id: SITE_ID_SCHEMA },
234
182
  outputSchema: ETAG_OUTPUT_SCHEMA,
235
183
  annotations: readOnly('Get ETag'),
236
- handler: async ({ site_id }) => withSiteRetry(pool, site_id, async (client, site) => withSiteMeta(await handleGetEtag(client), site)),
237
184
  }),
238
185
  defineTool({
239
186
  name: 'yootheme_builder_template_summary',
240
- description: 'Token-efficient template overview: element counts by type, binding ' +
241
- 'count, max nesting depth, and named landmark sections — computed ' +
242
- 'server-side in one call. Use this to grasp a large template before ' +
243
- 'pulling element_list or page_get_layout. ' +
244
- 'template_id only resolve a URL/post first via pages_resolve. ' +
245
- // F206 (P3): concrete first-call example. The Desktop client
246
- // rejected the first guessed call because no example showed the
247
- // exact arg shape (the whole yt-builder package used none, while
248
- // apimapper's schema.ts does). Mirrors apimapper's 'Example:'
249
- // pattern.
250
- 'Example: yootheme_builder_template_summary({ template_id: "default" }). ' +
251
- 'Operates on the default site unless site_id is provided.',
252
- inputSchema: { site_id: SITE_ID_SCHEMA, template_id: TEMPLATE_ID },
187
+ description: 'Token-efficient template overview: element counts by type, bindings, max ' +
188
+ 'depth, named sections — computed server-side in one call. Use before ' +
189
+ 'element_list/page_get_layout on a large template. `include_nodes:true` adds a ' +
190
+ '`content_nodes` per-node breakdown (status/effective_visible/headings/alts), ' +
191
+ 'pageable via `limit`/`cursor`. `layout_ids:[...]` batches several: response ' +
192
+ 'carries `summaries`, `not_found` and `forbidden`. ' +
193
+ 'Example: yootheme_builder_template_summary({ layout_id: "default" }).',
194
+ inputSchema: {
195
+ site_id: SITE_ID_SCHEMA,
196
+ layout_id: LAYOUT_ID.optional().describe('Which layout: "page:42", "article:12", "default", or a bare id (42). ' +
197
+ 'Provide this OR `layout_ids` (batch) - exactly one, not both. ' +
198
+ 'Use yootheme_builder_pages_list to discover.'),
199
+ layout_ids: z
200
+ .array(z.string().min(1))
201
+ .min(1)
202
+ .optional()
203
+ .describe('Batch of layout ids (2+) - one call instead of N. Provide this OR ' +
204
+ '`layout_id` (single) - exactly one, not both. Response carries ' +
205
+ '`summaries` (keyed by id), `not_found` and `forbidden`.'),
206
+ include_nodes: z
207
+ .boolean()
208
+ .optional()
209
+ .describe('When true, also return `content_nodes` (per-node status/' +
210
+ 'effective_visible/hidden_on_mobile/headings/alts). Default false ' +
211
+ '(the compact aggregate-only shape).'),
212
+ limit: z
213
+ .number()
214
+ .int()
215
+ .min(1)
216
+ .max(200)
217
+ .optional()
218
+ .describe('Page size for `content_nodes` when `include_nodes:true` (1-200). ' +
219
+ 'Omit for the full unpaged list. The response carries `next_cursor` ' +
220
+ 'when more remain.'),
221
+ cursor: z
222
+ .string()
223
+ .optional()
224
+ .describe('Opaque cursor from a previous response\'s next_cursor - resumes ' +
225
+ 'content_nodes pagination (use with include_nodes:true + limit).'),
226
+ },
253
227
  outputSchema: TEMPLATE_SUMMARY_OUTPUT_SCHEMA,
254
228
  annotations: readOnly('Template Summary'),
255
- handler: async ({ site_id, ...rest }) => withSiteRetry(pool, site_id, async (client, site) => withSiteMeta(await handleTemplateSummary(client, rest), site)),
256
229
  }),
257
- // ─── Task 6 (pages_audit design, 2026-07-19) — pages_audit ────
258
- // L2 (advanced_read): a site-wide, severity-sorted SEO/structure/
259
- // content/links sweep computed server-side in ONE call. Deliberately
260
- // NOT in ESSENTIAL_TOOLS (keeps first-class tools/list at 41) —
261
- // `readOnly()` annotation routes it into the `advanced_read` gateway
262
- // automatically (annotation-driven, no allowlist edit).
263
230
  defineTool({
264
231
  name: 'yootheme_builder_pages_audit',
265
- description: 'One-call site-wide SEO/structure/content/links audit — severity-sorted findings ' +
266
- 'with fix_hints (each a props FRAGMENT to merge, not a ready-made call — supply ' +
267
- 'template_id + path from the finding locator). Covers h1/headings, thin pages, ' +
268
- 'image alt, duplicate layouts, title collisions, non-pretty URLs, dead anchors. ' +
269
- 'A SITE-wide sweep caps hits/page and drops per-hit content_snippet; scope to ONE ' +
270
- 'page via `target` for the full set (cap 100). Filter with `types`/`checks`. ' +
271
- 'Disclaimer: SEO-plugin meta (title/description/OG) NOT covered. ' +
272
- 'Operates on the default site unless site_id is provided.',
232
+ description: 'One-call site-wide SEO / structure / content / links / design audit — ' +
233
+ 'severity-sorted findings with fix_hints (a props fragment to merge). Covers ' +
234
+ 'heading structure and accessibility (h1/heading-skip), image alt text, thin ' +
235
+ 'content, duplicate layouts, title collisions, broken in-page anchor links ' +
236
+ '(same-page `#id` jumps only no external link is ever fetched or resolved), ' +
237
+ 'and design consistency (markup outside the UIkit design system, header/' +
238
+ 'navigation contrast). Only active (non-disabled) nodes produce findings. ' +
239
+ '`target` scopes to ONE page for the full set. SEO-plugin meta (title/' +
240
+ 'description/OG) NOT covered.',
273
241
  inputSchema: { site_id: SITE_ID_SCHEMA, ...PAGES_AUDIT_INPUT },
274
242
  outputSchema: PAGES_AUDIT_OUTPUT_SCHEMA,
275
243
  annotations: readOnly('Pages Audit'),
276
- handler: async ({ site_id, ...rest }) => withSiteRetry(pool, site_id, async (client, site) => withSiteMeta(await handlePagesAudit(client, rest), site)),
277
244
  }),
278
- // ─── F5 + N5 (Glöckle HANDOFF-4/5) — render_preview ───────────
279
- // The authenticated post-write render HEALTHCHECK. READ-ONLY: renders
280
- // the template server-side over the existing Bearer channel and reports
281
- // {rendered, item_count, empty, error?} + a cache_purge_hint — answering
282
- // "does my saved page actually render, with how many items?" where an
283
- // external cURL 401s behind QA Basic-Auth. L2 (advanced-read) — reached
284
- // via yootheme_builder_advanced_read, NOT in ESSENTIAL_TOOLS, so the L1
285
- // token-baseline stays at 32. Addressing mirrors page_get_layout:
286
- // template_id OR url (exactly one).
287
245
  defineTool({
288
246
  name: 'yootheme_builder_render_preview',
289
- description: 'Render-check a saved template does it actually render, with how many items, or ' +
290
- 'is it blank? Address by `template_id` (from pages_list), `post_id`, or `url` ' +
291
- '(resolved for you) exactly one. `item_count` = items yielded by the ' +
292
- 'template\'s dynamic/Multi-Items bindings (rendered repeat-source rows); 0 with ' +
293
- 'empty:true means a binding returned nothing. Returns {rendered, item_count, empty, ' +
294
- 'error?, cache_purge_hint}; with `expect`, also {matched, snippet}. Use AFTER a ' +
295
- 'save/bind to catch a silently-empty page. Read-only. ' +
296
- 'Operates on the default site unless site_id is provided.',
247
+ description: 'Render-check a SAVED layout. Address by ' +
248
+ '`layout_id` or `url`. rendered_item_wrapper_count counts the ' +
249
+ 'repeat-item wrappers rendered, BOUND OR NOT, so a 0 is not evidence a ' +
250
+ 'binding failed (per-source rows: `source_item_counts`). Distinct from ' +
251
+ 'pages_list `elements_count` (all tree nodes). A source the registry cannot ' +
252
+ 'resolve is named in `unresolved_sources`, not just a smaller count. Renders ' +
253
+ 'ONLY the page\'s own layout tree, never the theme wrapper: a MISS with ' +
254
+ '`expect` proves nothing beyond the tree (adds {matched, snippet, ' +
255
+ 'match_conclusive, match_note, mismatch_hints, stored_but_not_rendered — the ' +
256
+ 'last names elements that DO store the text but rendered no rows}). A Joomla ' +
257
+ 'module/module_position element sharpens this — EXCLUDED (fallback_used:true) ' +
258
+ 'or silently empty (dropped_count:0) — but match_conclusive:false marks EVERY ' +
259
+ 'inconclusive miss. Reports CMS status in `cms_status`/`cms_status_note` (absent ' +
260
+ 'for a theme template); pages_set_status remains the tool that changes it.',
297
261
  inputSchema: {
298
262
  site_id: SITE_ID_SCHEMA,
299
- // WAVE-1 follow-up (a): render_preview threads the SAME three
300
- // addressing modes page_get_layout uses (template_id | post_id |
301
- // url, exactly one) — the handler already resolved post_id via
302
- // resolveEffectiveTemplateId; this exposes it at the MCP boundary.
303
- template_id: TEMPLATE_ID_OPTIONAL,
304
- post_id: POST_ID,
263
+ layout_id: LAYOUT_ID_OPTIONAL,
305
264
  url: RESOLVE_URL,
306
- // Glöckle HANDOFF-6 #4: optional substring the rendered HTML must
307
- // contain. When set, the response adds {matched, snippet} so "did
308
- // my edit reach the render?" is answerable in one call.
309
265
  expect: z
310
266
  .string()
311
267
  .min(1)
@@ -319,24 +275,56 @@ export function buildPagesTools(pool) {
319
275
  },
320
276
  outputSchema: RENDER_PREVIEW_OUTPUT_SCHEMA,
321
277
  annotations: readOnly('Render Preview'),
322
- handler: async ({ site_id, ...rest }) => withSiteRetry(pool, site_id, async (client, site) => withSiteMeta(await handleRenderPreview(client, rest), site)),
278
+ }),
279
+ defineTool({
280
+ name: 'yootheme_builder_heading_outline',
281
+ description: 'A real, doc-order H1-H6 outline of ONE template, each heading with its source ' +
282
+ 'element, plus alt-status of every image. Structure inspection, not findings — ' +
283
+ 'use pages_audit for site-wide SEO findings. ' +
284
+ 'One row per CARRIER: a container whose bound item repeats appears once, ' +
285
+ 'while template_summary.heading_levels counts it once per rendered row.',
286
+ inputSchema: {
287
+ site_id: SITE_ID_SCHEMA,
288
+ layout_id: LAYOUT_ID,
289
+ max_chars: MAX_CHARS,
290
+ mode: z
291
+ .enum(['builder', 'rendered'])
292
+ .optional()
293
+ .describe('Outline source. "builder" (default) reads the saved layout tree: fast, ' +
294
+ 'but blind to module/widget output and anything a plugin injects only ' +
295
+ 'at render time. "rendered" renders the page first (via the SAME ' +
296
+ 'engine render_preview / pages_audit use) and reads the ACTUAL DOM - ' +
297
+ 'element_type is empty ("") in this mode, since there is no builder ' +
298
+ 'node to point at; locate a heading by its `path` (a synthetic ' +
299
+ '"rendered:heading:N" marker) or the page\'s frontend_url instead. A ' +
300
+ 'Joomla page with module/module_position renders via a tolerant ' +
301
+ 'fallback (that subtree excluded) rather than failing; the response ' +
302
+ 'then carries render_fallback_used:true + render_dropped_count:N — ' +
303
+ 'treat h1_count/has_level_skip/the outline as possibly incomplete when ' +
304
+ 'that flag is true. A genuine render failure returns error:"render_failed".'),
305
+ },
306
+ outputSchema: HEADING_OUTLINE_OUTPUT_SCHEMA,
307
+ annotations: readOnly('Heading Outline'),
323
308
  }),
324
309
  defineTool({
325
310
  name: 'yootheme_builder_page_save',
326
- description: 'Re-run save-transforms + flush caches. Optionally REPLACE the template tree by ' +
327
- 'passing the INNER {type:"layout",children:[...]} tree as `layout` — page_get_layout\'s ' +
328
- '`.layout` child, NOT the whole response it returns (rejected 422, would blank the ' +
329
- 'page). Validated + ETag-locked; nothing persists on reject. Does NOT change CMS ' +
330
- 'post status a draft stays invisible to visitors; set status via pages_create. ' +
331
- '`dry_run:true` preflights; success carries `previous_layout` for rollback. ETag ' +
332
- 'optional (412 on conflict; else last-write-wins). ' +
333
- 'Operates on the default site unless site_id is provided.',
311
+ description: 'Re-run save-transforms + flush the plugin\'s own caches. Optional whole-tree ' +
312
+ 'replace via `layout` — ' +
313
+ 'the INNER {type:"layout",children:[...]} tree, NOT page_get_layout\'s whole ' +
314
+ 'response (rejected 422). ' +
315
+ 'THREE separate steps, and this is the first: (1) page_save replaces or ' +
316
+ 're-normalises the stored tree every write, element or whole-tree, runs the ' +
317
+ 'same save-transforms; (2) page_publish snapshots the ETag and flushes them; ' +
318
+ '(3) pages_set_status decides whether a visitor may see the page at all. This ' +
319
+ 'call does NOT do (2) or (3). ' +
320
+ 'Response `previous_layout` is the tree right before THIS call, not before your ' +
321
+ 'edits (element writes already landed) — identical to what you just wrote is normal ' +
322
+ 'when the transforms change nothing. ' +
323
+ '`dry_run:true` preflights, no ETag. ETag on the save (428/412).',
334
324
  inputSchema: {
335
325
  site_id: SITE_ID_SCHEMA,
336
- template_id: TEMPLATE_ID,
337
- etag: ETAG,
338
- // F85: optional whole-layout atomic replacement (ARTICLE/page
339
- // templates + theme templates). Same shape as pages_create.layout.
326
+ layout_id: LAYOUT_ID,
327
+ etag: ETAG_PREVIEW_OPTIONAL.optional(),
340
328
  layout: z
341
329
  .record(z.string(), z.unknown())
342
330
  .optional()
@@ -345,9 +333,9 @@ export function buildPagesTools(pool) {
345
333
  'child, NOT the whole response it returns (passing that is rejected ' +
346
334
  'as a double-nest). Replaces the template tree atomically. Validated ' +
347
335
  '+ ETag-locked, BUT prop KEYS are NOT schema-validated on a whole-tree ' +
348
- 'save — YT-Pro silently drops unknown keys; use element_update_settings ' +
349
- 'for validated per-element edits. Omit to just re-run save-transforms.'),
350
- // U3/F3 (Glöckle HANDOFF-4): optional render preflight.
336
+ 'save — an unknown key is stored as sent, not dropped and not reported ' +
337
+ 'here; element_update_settings keeps it too, but reports it back as ' +
338
+ '`unknown_prop_keys`. Omit to just re-run save-transforms.'),
351
339
  dry_run: z
352
340
  .boolean()
353
341
  .optional()
@@ -355,7 +343,6 @@ export function buildPagesTools(pool) {
355
343
  'render dry-run and return a validation_report WITHOUT persisting ' +
356
344
  '(no write, no cache flush, no ETag bump). Use to verify a binding ' +
357
345
  'renders before it can blank the live page. Omit to actually save.'),
358
- // Task 8 (design §7): opt-in advisory quick_check on save.
359
346
  quick_check: z
360
347
  .boolean()
361
348
  .optional()
@@ -367,26 +354,62 @@ export function buildPagesTools(pool) {
367
354
  'Advisory only — the save always succeeds. Site-wide checks ' +
368
355
  '(duplicate-layout, title-collision) need pages_audit.'),
369
356
  },
357
+ outputSchema: PAGE_SAVE_OUTPUT_SCHEMA,
370
358
  annotations: mutating('Save Page'),
371
- handler: async ({ site_id, ...rest }, extra) => withWriteSiteRetry(pool, site_id, 'yootheme_builder_page_save', async (client, site) => withRenderContext(withSiteMeta(await handlePageSave(client, rest, extra), site), buildRenderContext({
372
- siteUrl: site.url,
373
- parentTemplateId: rest.template_id,
374
- locale: localeForSite(site),
375
- }))),
376
359
  }),
377
360
  defineTool({
378
361
  name: 'yootheme_builder_page_publish',
379
- description: 'Publish a template — persist state, flush YT + WP caches, snapshot the ' +
380
- 'published-state ETag. YOOtheme templates already publish on save, so this is a ' +
381
- 'cache-flush + state-snapshot op. Neither publish nor save changes the CMS post ' +
382
- 'status a draft page stays invisible to visitors; set status at creation via ' +
383
- 'pages_create/library_insert. ETag optional when provided, 412 on conflict; when ' +
384
- 'omitted, last-write-wins. Operates on the default site unless site_id is provided.',
362
+ description: 'Publish a template\'s LAYOUT — persist state, flush the plugin\'s own caches ' +
363
+ '(a page-cache/CDN plugin is NOT purged: purge it yourself, then verify with ' +
364
+ 'fetch_public_url), snapshot the ETag; ' +
365
+ '"publish" ALSO means the CMS post status, and this tool does not change that, ' +
366
+ 'so a draft page stays invisible. ' +
367
+ 'Step (2) of the three page_save describes; pages_set_status is step (3). ' +
368
+ 'ETag required — 412 on conflict. ' +
369
+ 'Answers `cms_visibility.findable_by_visitor`: can a visitor FIND this one page via ' +
370
+ 'a navigation path? It reads the menu route AND the access level, which the ' +
371
+ 'per-row `visibility` of pages_list does not. ' +
372
+ 'Optional `cms_status` folds step (3) into this call for the common ' +
373
+ 'build-it-and-make-it-live case; without it nothing about the CMS status changes.',
385
374
  inputSchema: {
386
375
  site_id: SITE_ID_SCHEMA,
387
- template_id: TEMPLATE_ID,
388
- etag: ETAG,
389
- // Task 8 (design §7): the publish QuickCheck is DEFAULT-ON.
376
+ layout_id: LAYOUT_ID,
377
+ etag: ETAG_STRICT,
378
+ cms_status: z
379
+ .enum([
380
+ 'publish',
381
+ 'draft',
382
+ 'pending',
383
+ 'private',
384
+ 'future',
385
+ 'published',
386
+ 'unpublished',
387
+ 'archived',
388
+ ])
389
+ .optional()
390
+ .describe('Optional. Also set the CMS status in THIS call, so the common ' +
391
+ '"build it and make it live" case is one call instead of three. Same ' +
392
+ 'words and same refusals as yootheme_builder_pages_set_status — ' +
393
+ 'WordPress publish/draft/pending/private/future, Joomla ' +
394
+ 'published/unpublished/archived; the other platform\'s word is refused ' +
395
+ 'and NOTHING is published. Needs a page:/article: template (a theme ' +
396
+ 'template has no single page). To trash or delete use ' +
397
+ 'yootheme_builder_pages_delete; no status value here removes anything. ' +
398
+ 'Omit to leave the CMS status untouched. ' +
399
+ 'The response carries `cms_status_applied` with the STORED status after ' +
400
+ 'the write, and `cms_visibility` then reflects the NEW status.'),
401
+ menu_item: z
402
+ .union([z.boolean(), z.string().min(1).max(64)])
403
+ .optional()
404
+ .describe('Joomla only. Also create a SEF route for the article: true = the ' +
405
+ 'dedicated hidden menutype, a string picks the menutype ("mainmenu" is ' +
406
+ 'refused so generated routes never enter the site navigation). The ' +
407
+ 'article must end up published — pass cms_status:"published" here or ' +
408
+ 'publish it first; otherwise the call is refused rather than handing ' +
409
+ 'back a route to an unpublished article, whose url no visitor can ' +
410
+ 'open. Response carries `menu_item_id`. On WordPress this argument is ' +
411
+ 'REFUSED, never ignored: a WP page is served at its permalink as soon ' +
412
+ 'as its status is publish, so there is no route to create.'),
390
413
  quick_check: z
391
414
  .boolean()
392
415
  .optional()
@@ -396,56 +419,38 @@ export function buildPagesTools(pool) {
396
419
  'report for THIS page, with fix_hints, or `{clean:true}`. Set false to ' +
397
420
  'OPT OUT (e.g. bulk publishes). Advisory only — publish ALWAYS ' +
398
421
  'succeeds; findings never block it. Site-wide checks (duplicate-layout, ' +
399
- 'title-collision) still need pages_audit.'),
422
+ 'title-collision) still need pages_audit. `render_check:{ok,worst,' +
423
+ 'findings}` rides next to `published` with the render verdict — ' +
424
+ '`ok:false` names a QUALITY finding, not a failed publish: the ' +
425
+ 'publish above it already succeeded regardless.'),
400
426
  },
401
- // Stream D3 T3: publish is idempotent — re-running on an
402
- // unchanged template snapshots the same ETag and flushes
403
- // the same caches. Matrix marks `idempotentHint:true`.
427
+ outputSchema: PAGE_PUBLISH_OUTPUT_SCHEMA,
404
428
  annotations: mutating('Publish Page'),
405
- handler: async ({ site_id, ...rest }, extra) => withWriteSiteRetry(pool, site_id, 'yootheme_builder_page_publish', async (client, site) => withRenderContext(withSiteMeta(await handlePagePublish(client, rest, extra), site), buildRenderContext({
406
- siteUrl: site.url,
407
- parentTemplateId: rest.template_id,
408
- locale: localeForSite(site),
409
- }))),
410
429
  }),
411
- // ─── N3 (Glöckle HANDOFF-5) — template_set_type ───────────────
412
- // L2 (advanced): set which archive/single a YOOtheme theme template
413
- // is assigned to (the `templates.<id>.type` condition pages_list
414
- // reads). The #1 missing step in a taxonomy/CPT-rename workflow —
415
- // after categoryFaq→categoryHelp the `taxonomy-category_faq` /
416
- // `single-gloeckle_faq` templates are orphaned and must be re-typed.
417
430
  defineTool({
418
431
  name: 'yootheme_builder_template_set_type',
419
- description:
420
- // N3 (Glöckle HANDOFF-5) archive/single TYPE reassignment.
421
- 'Reassign which archive/single a YOOtheme THEME template applies to ' +
422
- 'set its `type` condition (the value pages_list shows) in ONE ETag-locked ' +
423
- 'write. Use after a taxonomy/CPT rename orphans a template (e.g. re-type ' +
424
- '"taxonomy-category_faq" → "taxonomy-category_help"). Returns ' +
425
- '{type, previous_type, new_etag}. Site-wide + immediate — preview with ' +
426
- 'dry_run:true, reversible via previous_type. ' +
427
- 'THEME templates only: page:/article: is refused (422). ETag req. ' +
428
- 'Operates on the default site unless site_id is provided.',
432
+ description: 'Reassign which archive/single a YOOtheme THEME template applies to — set its ' +
433
+ '`type` condition in ONE ETag-locked write. Use after a taxonomy/CPT rename ' +
434
+ 'orphans a template. Site-wide + immediate preview with dry_run:true, ' +
435
+ 'reversible via previous_type. THEME templates only: page:/article: refused (422).',
429
436
  inputSchema: {
430
437
  site_id: SITE_ID_SCHEMA,
431
- template_id: TEMPLATE_ID,
438
+ layout_id: LAYOUT_ID,
432
439
  type: z
433
440
  .string()
434
441
  .min(1)
435
442
  .describe('The new archive/single TYPE assignment (the `type` condition ' +
436
443
  'pages_list surfaces), e.g. "taxonomy-category_help", ' +
437
- '"single-gloeckle_help", "archive-post", or the bare "template". ' +
444
+ '"single-example_help", "archive-post", or the bare "template". ' +
438
445
  'Read the current value via pages_list (the `type` column) or ' +
439
446
  'GET the template first. `page`/`article` are NOT valid here.'),
440
- // Required strict ETag (the re-type is a real mutation; the PHP
441
- // controller enforces If-Match → 428 if omitted, 412 on stale).
442
- etag: ETAG_STRICT,
443
- // PAGES_LIBRARY_MEDIA-14: preflight the re-type without persisting.
447
+ etag: ETAG_PREVIEW_OPTIONAL.optional(),
444
448
  dry_run: z
445
449
  .boolean()
446
450
  .optional()
447
451
  .describe('Preflight ONLY. When true, validate the re-type (authz + ETag ' +
448
- 'lock + theme-template-only + type validity + template-exists) ' +
452
+ 'staleness, though a missing ETag is fine on a preview + ' +
453
+ 'theme-template-only + type validity + template-exists) ' +
449
454
  'and return {previous_type, would_change, dry_run:true} WITHOUT ' +
450
455
  'persisting — the template TYPE assignment governs which items ' +
451
456
  'render this layout SITE-WIDE and applies immediately once ' +
@@ -454,82 +459,91 @@ export function buildPagesTools(pool) {
454
459
  },
455
460
  outputSchema: TEMPLATE_SET_TYPE_OUTPUT_SCHEMA,
456
461
  annotations: mutating('Set Template Type'),
457
- handler: async ({ site_id, ...rest }, extra) => withWriteSiteRetry(pool, site_id, 'yootheme_builder_template_set_type', async (client, site) => withRenderContext(withSiteMeta(await handleTemplateSetType(client, rest, extra), site), buildRenderContext({
458
- siteUrl: site.url,
459
- parentTemplateId: rest.template_id,
460
- locale: localeForSite(site),
461
- }))),
462
462
  }),
463
- // ─── C4 (v1.2) — pages_create + pages_delete ──────────────────
464
- // First-class customer-facing page-level mutations. Both wrap
465
- // Phase B REST endpoints (POST /pages, DELETE /pages/{id}) and
466
- // are L1 essentials (see gateway/essentials.ts).
467
463
  defineTool({
468
464
  name: 'yootheme_builder_pages_create',
469
- description: 'Create a page (WordPress) or article (Joomla 5/6) with a YOOtheme per-page ' +
470
- 'layout. Required: title. Optional: slug, status (default draft), published ' +
471
- '(default false live on true: WP publish / Joomla state 1), layout (JSON), ' +
472
- 'menu_item (Joomla SEF route), dry_run (preflight, no persist). Returns page_id ' +
473
- '(WP) / article_id (Joomla), slug, template_id (page:{id} or article:{id}), etag, ' +
474
- 'warnings. Joomla: a published article has NO SEF route until a menu item points ' +
475
- 'at it — pass menu_item, else frontend_url may 404. ' +
476
- 'Operates on the default site unless site_id is provided.',
465
+ description: 'Create a page (WordPress) or article (Joomla 5/6) with a per-page layout. ' +
466
+ 'Required: title. Optional: status (default draft), layout, menu_item, ' +
467
+ 'dry_run (preflight, no persist). Joomla: a published article has NO SEF route ' +
468
+ 'until a menu item points at it pass menu_item for a navigable url. ' +
469
+ 'Cannot make it the site front page: which page answers / is a CMS menu ' +
470
+ 'setting this server never writes. pages_list marks the current one with ' +
471
+ 'is_public_homepage.',
477
472
  inputSchema: { site_id: SITE_ID_SCHEMA, ...PAGES_CREATE_INPUT },
478
- // No outputSchema: the response shape is a discriminated union
479
- // (201 wet vs 200 dry-run). page_get_layout uses the same pattern.
480
- annotations: mutating('Create Page'),
481
- handler: async ({ site_id, ...rest }, extra) => withWriteSiteRetry(pool, site_id, 'yootheme_builder_pages_create', async (client, site) => withRenderContext(withSiteMeta(await handlePagesCreate(client, rest, extra), site), buildRenderContext({
482
- siteUrl: site.url,
483
- // A new page has no caller-supplied parent
484
- // template; null until the REST response carries
485
- // one (kept stable rather than absent).
486
- parentTemplateId: null,
487
- locale: localeForSite(site),
488
- }))),
473
+ outputSchema: PAGES_CREATE_OUTPUT_SCHEMA,
474
+ annotations: creating('Create Page'),
489
475
  }),
490
- // ─── P-G (Goldstandard wave 3) — page_dynamize ────────────────
491
- // THE one-call canonical path to dynamize an existing designed
492
- // section. L1 essential: an agent must reach it directly INSTEAD
493
- // of hand-editing layout JSON (the recipe is CODE, server-side).
494
476
  defineTool({
495
- name: 'yootheme_builder_page_dynamize',
496
- description: 'One-call way to dynamize a designed section: copies the layout ' +
497
- 'byte-identically and swaps only what you map. Use INSTEAD of ' +
498
- 'hand-editing JSON. Give a REFERENCE (section_name from ' +
499
- 'template_summary, or element_path) + list_source_name + a leaf_map ' +
500
- '(original leaf field-name flat flow field; #parent + tuned props kept). ' +
501
- 'A section with several source blocks dynamizes in ONE ' +
502
- 'call via source_map ({match, source_name, leaf_map?}[]). Sub-query panels: ' +
503
- 'key by "<subquery>.<leaf>". Returns page + `summary`. Preview with dry_run:true. ' +
504
- 'Operates on the default site unless site_id is provided.',
505
- inputSchema: { site_id: SITE_ID_SCHEMA, ...PAGE_DYNAMIZE_INPUT },
506
- // No outputSchema: the response is the create wire-shape (WP
507
- // page_id / Joomla article_id discriminated union) plus the
508
- // `summary` object — pages_create uses the same no-outputSchema
509
- // pattern for its discriminated union.
510
- annotations: creating('Dynamize Page'),
511
- handler: async ({ site_id, ...rest }, extra) => withWriteSiteRetry(pool, site_id, 'yootheme_builder_page_dynamize', async (client, site) => withRenderContext(withSiteMeta(await handlePageDynamize(client, rest, extra), site), buildRenderContext({
512
- siteUrl: site.url,
513
- parentTemplateId: null,
514
- locale: localeForSite(site),
515
- }))),
477
+ name: 'yootheme_builder_page_generate_dynamic',
478
+ description: 'Copies a designed section byte-identically into a NEW, unpublished, unlinked ' +
479
+ 'page and swaps only what you map it never edits the reference. Requires ' +
480
+ 'output:"new_page" (today\'s only value; "in_place" is not yet available). Give ' +
481
+ 'a REFERENCE (section_name or element_path) + list_source_name + a leaf_map. A ' +
482
+ 'section with several source blocks dynamizes in ONE call via source_map. ' +
483
+ 'Preview with dry_run:true (a would_change:false answer carries `reason`). Live ' +
484
+ 'at once stage hidden with element_set_status(status:false). The response ' +
485
+ 'carries `cms_visibility.findable_by_visitor`: can a visitor FIND this one page ' +
486
+ 'via a navigation path? It reads the menu route AND the access level, which the ' +
487
+ 'per-row `visibility` of pages_list does not. ' +
488
+ 'Cannot make it the site front page (a CMS menu setting).',
489
+ inputSchema: { site_id: SITE_ID_SCHEMA, ...PAGE_GENERATE_DYNAMIC_INPUT },
490
+ outputSchema: PAGE_GENERATE_DYNAMIC_OUTPUT_SCHEMA,
491
+ annotations: creating('Generate Dynamic Page'),
492
+ }),
493
+ defineTool({
494
+ name: 'yootheme_builder_header_transparency_set',
495
+ description: 'Inspect + repair the transparent header. Always targets the FIRST section — ' +
496
+ 'later ones are silently dead. dry_run defaults TRUE: returns current state + ' +
497
+ 'the theme-declared --uk-inverse, risk_class, recommendation. mode:"auto" writes ' +
498
+ 'the theme-declared colour; over a hero image/video it writes NONE and says LOOK. ' +
499
+ 'mode:"explicit" refuses a colour contradicting the theme (409) unless ' +
500
+ 'acknowledge_contrast_risk. transparent:false is always allowed.',
501
+ inputSchema: HEADER_TRANSPARENCY_SET_INPUT,
502
+ annotations: mutating('Set Header Transparency'),
516
503
  }),
517
504
  defineTool({
518
505
  name: 'yootheme_builder_pages_delete',
519
- description: 'Delete a page (WordPress) or article (Joomla 5/6) with its YOOtheme per-page ' +
520
- 'layout. Requires confirm:true (gate against accidental deletion). Default: trash ' +
521
- '(recoverable). force:true: permanent delete. Refuses non-page/article types with ' +
522
- '403 (Layer 9 defense). Returns deleted:true, page_id (WP) / article_id (Joomla), ' +
523
- 'force_deleted, bumped etag. Operates on the default site unless site_id is provided.',
506
+ description: 'Delete a page (WordPress) or article (Joomla 5/6). OMIT confirm to preview: ' +
507
+ 'returns 200 with label, elements_count, what happens to media, and the intents ' +
508
+ 'this page\'s state allows, and deletes nothing. confirm:true + an intent carries ' +
509
+ 'it out. Already-trashed returns 200 {deleted:false, already_trashed:true}, ' +
510
+ 'not an error.',
524
511
  inputSchema: { site_id: SITE_ID_SCHEMA, ...PAGES_DELETE_INPUT },
525
512
  outputSchema: PAGES_DELETE_OUTPUT_SCHEMA,
526
- // A page/article delete (force:true = PERMANENT, non-idempotent) is
527
- // destructive — annotate it so, matching yootheme_builder_element_delete
528
- // and so an MCP host's destructive-approval gate fires (audit fix F9,
529
- // 2026-07-16). The confirm:z.literal(true) guard already satisfies the
530
- // destructive()+confirm contract.
531
513
  annotations: destructive('Delete Page'),
532
- handler: async ({ site_id, ...rest }, extra) => withWriteSiteRetry(pool, site_id, 'yootheme_builder_pages_delete', async (client, site) => withSiteMeta(await handlePagesDelete(client, rest, extra), site)),
514
+ }),
515
+ defineTool({
516
+ name: 'yootheme_builder_pages_set_status',
517
+ description: 'Change the CMS status of an EXISTING page (WordPress) or article (Joomla) — ' +
518
+ 'keeps its id and URL. Step (3) of the three page_save describes. ' +
519
+ 'Use YOUR platform\'s own words: WordPress publish, draft, ' +
520
+ 'pending, private, future; Joomla published, unpublished, archived — the other ' +
521
+ 'platform\'s word is refused (422). Status is RE-READ after the write. To trash ' +
522
+ 'or delete use yootheme_builder_pages_delete; a page already IN the trash is ' +
523
+ 'refused (409) — use yootheme_builder_pages_restore first. ' +
524
+ 'The response carries `cms_visibility.findable_by_visitor`: can a visitor FIND ' +
525
+ 'this one page via a navigation path? It reads the menu route AND the access ' +
526
+ 'level, which the per-row `visibility` of pages_list does not.',
527
+ inputSchema: { site_id: SITE_ID_SCHEMA, ...PAGES_SET_STATUS_INPUT },
528
+ outputSchema: PAGES_SET_STATUS_OUTPUT_SCHEMA,
529
+ annotations: mutating('Set Page Status'),
530
+ }),
531
+ defineTool({
532
+ name: 'yootheme_builder_pages_restore',
533
+ description: 'Restore a TRASHED page (WordPress) or article (Joomla) — the one correct way ' +
534
+ 'back (pages_set_status refuses a trashed page with 409 naming this tool). ' +
535
+ 'WordPress: reinstates the EXACT pre-trash status (core defaults restores to ' +
536
+ 'draft since 5.6) and attempts to reclaim the pre-trash slug — a hand-rolled ' +
537
+ 'write leaves the "__trashed" suffix instead; a slug another page has since ' +
538
+ 'taken comes back different — check the response\'s frontend_url. Joomla stores ' +
539
+ 'no pre-trash status, so this can only set state to unpublished (visible to ' +
540
+ 'editors, not visitors); call yootheme_builder_pages_set_status with ' +
541
+ 'status:"published" afterwards to make it visible. Not currently trashed → ' +
542
+ 'refused (409). Find a trashed id with ' +
543
+ 'yootheme_builder_local_content_read({kind:"entities", status:"trash"}).',
544
+ inputSchema: { site_id: SITE_ID_SCHEMA, ...PAGES_RESTORE_INPUT },
545
+ outputSchema: PAGES_RESTORE_OUTPUT_SCHEMA,
546
+ annotations: creating('Restore Page'),
533
547
  }),
534
548
  ];
535
549
  }