@wootsup/yt-builder-mcp 1.12.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 (857) hide show
  1. package/README.md +128 -30
  2. package/bin/node-floor.d.ts +28 -0
  3. package/bin/node-floor.js +123 -0
  4. package/bin/yt-builder-mcp.js +51 -10
  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 +8 -52
  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 +21 -62
  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 +1 -85
  102. package/dist/diagnostics/doctor.d.ts.map +1 -1
  103. package/dist/diagnostics/doctor.js +5 -90
  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 +15 -24
  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 +9 -178
  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 +65 -79
  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 +0 -55
  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 +29 -78
  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 +14 -19
  500. package/dist/tools/budgeted-table.d.ts.map +1 -1
  501. package/dist/tools/budgeted-table.js +171 -105
  502. package/dist/tools/budgeted-table.js.map +1 -1
  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 +147 -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 +26 -43
  528. package/dist/tools/format/health-format.d.ts.map +1 -1
  529. package/dist/tools/format/health-format.js +28 -60
  530. package/dist/tools/format/health-format.js.map +1 -1
  531. package/dist/tools/format/inspection-format.d.ts +2 -54
  532. package/dist/tools/format/inspection-format.d.ts.map +1 -1
  533. package/dist/tools/format/inspection-format.js +33 -119
  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 +114 -139
  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 +46 -232
  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 +12 -39
  554. package/dist/tools/index.js.map +1 -1
  555. package/dist/tools/inspection.d.ts +4 -34
  556. package/dist/tools/inspection.d.ts.map +1 -1
  557. package/dist/tools/inspection.js +164 -536
  558. package/dist/tools/inspection.js.map +1 -1
  559. package/dist/tools/library.d.ts +115 -127
  560. package/dist/tools/library.d.ts.map +1 -1
  561. package/dist/tools/library.js +706 -454
  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 +103 -46
  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 -65
  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 +1 -16
  628. package/dist/tools/navigation/builders.d.ts.map +1 -1
  629. package/dist/tools/navigation/builders.js +5 -27
  630. package/dist/tools/navigation/builders.js.map +1 -1
  631. package/dist/tools/navigation/index.d.ts +0 -13
  632. package/dist/tools/navigation/index.d.ts.map +1 -1
  633. package/dist/tools/navigation/index.js +0 -12
  634. package/dist/tools/navigation/index.js.map +1 -1
  635. package/dist/tools/navigation/schemas.d.ts +0 -30
  636. package/dist/tools/navigation/schemas.d.ts.map +1 -1
  637. package/dist/tools/navigation/schemas.js +0 -30
  638. package/dist/tools/navigation/schemas.js.map +1 -1
  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 +320 -405
  646. package/dist/tools/pages/builders.js.map +1 -1
  647. package/dist/tools/pages/header-transparency.d.ts +2 -32
  648. package/dist/tools/pages/header-transparency.d.ts.map +1 -1
  649. package/dist/tools/pages/header-transparency.js +9 -43
  650. package/dist/tools/pages/header-transparency.js.map +1 -1
  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 +323 -241
  656. package/dist/tools/pages/schemas.d.ts.map +1 -1
  657. package/dist/tools/pages/schemas.js +514 -549
  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 +0 -69
  676. package/dist/tools/response-budget.d.ts.map +1 -1
  677. package/dist/tools/response-budget.js +0 -127
  678. package/dist/tools/response-budget.js.map +1 -1
  679. package/dist/tools/shared-schemas.d.ts +11 -65
  680. package/dist/tools/shared-schemas.d.ts.map +1 -1
  681. package/dist/tools/shared-schemas.js +40 -123
  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 +194 -170
  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 +16 -232
  712. package/dist/tools/sparse-fields.d.ts.map +1 -1
  713. package/dist/tools/sparse-fields.js +178 -242
  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 -39
  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 -124
  748. package/dist/tools/tool-builder/results.d.ts.map +1 -1
  749. package/dist/tools/tool-builder/results.js +258 -263
  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 +4 -4
  773. package/skills/yt-builder-mcp/SKILL.md +1857 -400
  774. package/dist/tools/elements/handlers-write.d.ts +0 -89
  775. package/dist/tools/elements/handlers-write.d.ts.map +0 -1
  776. package/dist/tools/elements/handlers-write.js +0 -797
  777. package/dist/tools/elements/handlers-write.js.map +0 -1
  778. package/dist/tools/elements/handlers.d.ts +0 -130
  779. package/dist/tools/elements/handlers.d.ts.map +0 -1
  780. package/dist/tools/elements/handlers.js +0 -581
  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 -218
  787. package/dist/tools/elements/schema-validation.d.ts.map +0 -1
  788. package/dist/tools/elements/schema-validation.js +0 -685
  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 -368
  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 -56
  807. package/dist/tools/local-content/handlers.d.ts.map +0 -1
  808. package/dist/tools/local-content/handlers.js +0 -320
  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/navigation/handlers.d.ts +0 -30
  827. package/dist/tools/navigation/handlers.d.ts.map +0 -1
  828. package/dist/tools/navigation/handlers.js +0 -41
  829. package/dist/tools/navigation/handlers.js.map +0 -1
  830. package/dist/tools/pages/handlers-audit.d.ts +0 -140
  831. package/dist/tools/pages/handlers-audit.d.ts.map +0 -1
  832. package/dist/tools/pages/handlers-audit.js +0 -714
  833. package/dist/tools/pages/handlers-audit.js.map +0 -1
  834. package/dist/tools/pages/handlers-read.d.ts +0 -133
  835. package/dist/tools/pages/handlers-read.d.ts.map +0 -1
  836. package/dist/tools/pages/handlers-read.js +0 -1061
  837. package/dist/tools/pages/handlers-read.js.map +0 -1
  838. package/dist/tools/pages/handlers-write.d.ts +0 -212
  839. package/dist/tools/pages/handlers-write.d.ts.map +0 -1
  840. package/dist/tools/pages/handlers-write.js +0 -419
  841. package/dist/tools/pages/handlers-write.js.map +0 -1
  842. package/dist/tools/pages/target.d.ts +0 -162
  843. package/dist/tools/pages/target.d.ts.map +0 -1
  844. package/dist/tools/pages/target.js +0 -239
  845. package/dist/tools/pages/target.js.map +0 -1
  846. package/dist/tools/sources/handlers-bind.d.ts +0 -148
  847. package/dist/tools/sources/handlers-bind.d.ts.map +0 -1
  848. package/dist/tools/sources/handlers-bind.js +0 -657
  849. package/dist/tools/sources/handlers-bind.js.map +0 -1
  850. package/dist/tools/sources/handlers.d.ts +0 -116
  851. package/dist/tools/sources/handlers.d.ts.map +0 -1
  852. package/dist/tools/sources/handlers.js +0 -289
  853. package/dist/tools/sources/handlers.js.map +0 -1
  854. package/dist/tools/sublayout/inspect-sublayout-handler.d.ts +0 -95
  855. package/dist/tools/sublayout/inspect-sublayout-handler.d.ts.map +0 -1
  856. package/dist/tools/sublayout/inspect-sublayout-handler.js +0 -181
  857. package/dist/tools/sublayout/inspect-sublayout-handler.js.map +0 -1
@@ -1,714 +0,0 @@
1
- /**
2
- * `pages_audit` handler — Task 6 of the pages_audit implementation plan
3
- * (2026-07-19-04). Kept in its OWN file (not `handlers-read.ts`, already
4
- * 981 LoC) per the plan's explicit instruction.
5
- *
6
- * The handler is a thin REST-to-MCP adapter: `GET /pages/audit` already
7
- * returns the FULL, severity-sorted, deterministic sweep
8
- * ({@see \WootsUp\BuilderMcp\Pages\Audit\PageAuditService::audit()}); this
9
- * file only (a) forwards the optional filters as query params, (b) renders
10
- * a COMPACT truncate-tolerant text-leg table (never the raw JSON dump —
11
- * design §5), and (c) carries the complete, UNTRIMMED payload in
12
- * `structuredContent` via `structuredResult` (mirrors
13
- * `local-content/handlers.ts` — `applyMaxChars` only ever clips the text
14
- * leg, never `structuredContent`).
15
- *
16
- * @license MIT
17
- */
18
- import { tableResult } from '@getimo/mcp-toolkit';
19
- import { RestError } from '../../errors.js';
20
- import { applyMaxChars } from '../sparse-fields.js';
21
- import { errorResult, structuredResult } from '../tool-builder.js';
22
- import { appendTargetParams, isTypedTargetError, malformedTargetError, normalizeTarget, serverTooOldError, TARGET_FAILURE_HINT, targetKeysOf, tooManyTargetsError, typesConflictsWithTargetError, } from './target.js';
23
- const FINDINGS_COLUMNS = [
24
- { key: 'severity', label: 'SEVERITY', width: 8 },
25
- { key: 'code', label: 'CODE', width: 22 },
26
- { key: 'category', label: 'CATEGORY', width: 10 },
27
- { key: 'count', label: 'COUNT', width: 6, align: 'right' },
28
- { key: 'title', label: 'TITLE', width: 44 },
29
- ];
30
- /**
31
- * COUNT-COLUMN RULE (2026-07-22, cold-agent acceptance finding). The column
32
- * always answers *"how many of the unit this sweep counts"* — and the LABEL
33
- * names that unit, because the number alone is ambiguous:
34
- *
35
- * | scope | label | value |
36
- * |----------|---------|-------------------------------------------|
37
- * | site | `COUNT` | `finding.count` — affected PAGES |
38
- * | `single` | `HITS` | hits on that page ({@see hitCountOf}) |
39
- *
40
- * A single-page sweep scanned exactly ONE page, so the affected-page count is
41
- * structurally `1` for every finding and carries no information at all. A cold
42
- * agent auditing a page with 19 alt-less images read that `1` as "one image is
43
- * affected". Renaming the column in single mode (rather than silently swapping
44
- * the number under an unchanged header) is what makes the two readings
45
- * distinguishable.
46
- *
47
- * Site mode is deliberately byte-identical to before — pinned by
48
- * "locators NEVER enter the site-mode text leg" in `pages-audit.test.ts`.
49
- *
50
- * The KEY stays `count` in both modes: it is the machine-side row key that ties
51
- * `_meta.ui.payload.columns[]` to `_meta.ui.payload.data[]`, and `tableResult`
52
- * derives BOTH legs from this one column list, so text and Rich-Card can never
53
- * drift apart. `structuredContent.findings[].count` is NOT touched — that is a
54
- * published contract and stays page-based in every scope.
55
- */
56
- function findingsColumns(isSingleScope) {
57
- if (!isSingleScope)
58
- return [...FINDINGS_COLUMNS];
59
- return FINDINGS_COLUMNS.map((col) => (col.key === 'count' ? { ...col, label: 'HITS' } : col));
60
- }
61
- /**
62
- * How many individual hits one finding represents on the page(s) it lists.
63
- *
64
- * Defensive by construction — every input here is host-supplied and may be
65
- * missing, capped or malformed, and the value is RENDERED, so it must never
66
- * come out as `undefined`/`NaN`:
67
- * - no `pages` at all → fall back to `finding.count` (itself sanity-checked);
68
- * - a page entry with no usable `count` → ONE hit (the page itself is the
69
- * hit — that is exactly the shape `empty-page` & friends emit);
70
- * - a non-integer / non-positive / non-numeric `count` → the same one-hit
71
- * floor, never a negative or fractional cell.
72
- *
73
- * The sum runs over ALL listed pages. Single mode lists exactly one, so this is
74
- * that page's hit total; summing rather than reading `pages[0]` keeps the
75
- * function honest if a host ever scopes to a small group.
76
- */
77
- function hitCountOf(finding) {
78
- if (finding.pages.length === 0) {
79
- return Number.isFinite(finding.count) && finding.count > 0 ? Math.trunc(finding.count) : 0;
80
- }
81
- return finding.pages.reduce((total, page) => {
82
- // NAME-2: prefer the unambiguous `hits` alias when the host sends it —
83
- // a page entry's `count` is a hit tally only SOMETIMES (a finding whose
84
- // unit is the page itself carries no hit count), and `hits` is emitted
85
- // exactly when it is one. An older host sends only `count`, so it stays
86
- // the fallback; neither present means the page IS the single hit.
87
- const raw = typeof page.hits === 'number' ? page.hits : page.count;
88
- const usable = typeof raw === 'number' && Number.isFinite(raw) && raw >= 1;
89
- return total + (usable ? Math.trunc(raw) : 1);
90
- }, 0);
91
- }
92
- /**
93
- * PHP already normalizes an empty sweep's `by_type` to `(object) []`
94
- * (`{}` over the wire — see `PageAuditService::audit()`), so this is
95
- * belt-and-braces against an older/partial host that still emits the
96
- * empty-array shape `template_summary` hit before its own Friction-3 fix.
97
- */
98
- function normalizeByType(value) {
99
- return Array.isArray(value) ? {} : value;
100
- }
101
- /**
102
- * How many locators ONE finding may render into the TEXT leg before the rest
103
- * is summarised (2026-07-22 review finding 3).
104
- *
105
- * This budget is UNCONDITIONAL, and it has to be: `max_chars` is `.optional()`
106
- * with no default, `applyMaxChars(result, undefined)` returns the result
107
- * untouched, and agents rarely pass it. Single mode meanwhile raises the host's
108
- * `hit_cap` to 100 across five locator-emitting checks, so a pathological page
109
- * could render ~500 locator blocks ≈ 75 KB of prose in one tool result.
110
- *
111
- * Per FINDING, not per response: each finding is a different problem the agent
112
- * has to act on, and 15 examples are enough to characterise any one of them.
113
- * `structuredContent` is never affected — it keeps every locator, which is what
114
- * the remainder line points at.
115
- */
116
- const LOCATOR_LINES_PER_FINDING = 15;
117
- /**
118
- * PERF-4 / PROD-2 — the DEFAULT ceiling (chars of serialised JSON) on the
119
- * `structuredContent` leg of one `pages_audit` result.
120
- *
121
- * There was NO ceiling at all: `applyMaxChars` clips only `content[0].text`
122
- * (it says so in its own docblock), `max_chars` has no default, and the
123
- * projection forwarded `findings` verbatim. Measured on this transport: **349.1
124
- * KB (~89k tokens)** for a site sweep and **193.9 KB (~50k tokens)** for ONE
125
- * busy page — against 12,000 chars for the identical request on the in-process
126
- * native transport. A single tool result could eat most of a context window.
127
- *
128
- * WHY 48,000 and not the native handler's 12,000:
129
- *
130
- * - The two transports carry DIFFERENT things under that number. Native emits
131
- * ONE payload — the audit JSON rendered as the text the model reads — so
132
- * 12,000 chars is the whole result. Here the legs are separate: the text leg
133
- * is independently bounded ({@link LOCATOR_LINES_PER_FINDING} = 15 locators
134
- * per finding) and `structuredContent` is the MACHINE leg an agent drills
135
- * into for the exact paths it is about to write to. Sharing one constant
136
- * across that boundary would make each transport's budget wrong for the
137
- * other's payload.
138
- * - 48,000 chars ≈ 12k tokens at 4 chars/token — a bounded, predictable slice
139
- * of a context window, and still a ~7× cut from the measured 349 KB.
140
- * - It is above every realistic SINGLE-page audit (the headline case: ~100
141
- * hits × ~250 chars of locator ≈ 25 KB), so the capability that motivated
142
- * locators is never shed on a normal page — only pathological ones degrade.
143
- *
144
- * `max_chars` overrides it in BOTH directions (the schema's range is
145
- * 200…100,000), which is why the `max_chars` describe on THIS tool states that
146
- * it bounds both legs while the shared one still says text-only.
147
- */
148
- export const STRUCTURED_BUDGET_CHARS = 48_000;
149
- /**
150
- * Safety cap on the halving loops — mirrors PHP `MAX_SHRINK_ITERATIONS`.
151
- * A loop also exits on its own once there is nothing left to halve.
152
- */
153
- const MAX_SHRINK_ITERATIONS = 8;
154
- /**
155
- * The per-page-entry keys the evidence rung KEEPS — mirrors
156
- * `McpPagesAuditHandler::PAGE_IDENTITY_KEYS`, and is pinned against the value
157
- * PHP derives from its own constant by
158
- * `tests/contracts/audit-shrink-ladder.test.ts`.
159
- *
160
- * An allow-list, not a drop-list, on purpose: evidence keys are check-SPECIFIC
161
- * (`paths`, `alt_paths`, `anchors`, `generic_alts`, `skips`, `dead_anchors`,
162
- * `long_headings`, `first_headline_path`, `cluster_id`, `iterated`, …) and a
163
- * new check on the HOST adds new ones this package has never heard of. A
164
- * drop-list would silently stop shedding the day a host ships one; an
165
- * allow-list keeps identity + counts protected by construction.
166
- */
167
- export const PAGE_IDENTITY_KEYS = [
168
- 'id',
169
- 'label',
170
- 'count',
171
- 'hits',
172
- 'builder_url',
173
- 'locators',
174
- 'locators_stripped',
175
- 'hits_truncated',
176
- 'evidence_stripped',
177
- ];
178
- /**
179
- * BUGS-2 — the raw per-hit evidence arrays that are a PROVABLE DUPLICATE of the
180
- * locators riding on the same page entry, and may therefore be shed BEFORE a
181
- * single locator is thinned. Mirrors
182
- * `McpPagesAuditHandler::REDUNDANT_EVIDENCE_KEYS`; same contract test pins it.
183
- *
184
- * "Provable" means every field the array element carries also rides on the
185
- * locator built from the SAME hit, host-side in `AuditCheckRegistry`:
186
- * `paths` → path (+ the locator adds heading_source + repeat, which a bare
187
- * pointer cannot express), `alt_paths` → path (+ prop), `dead_anchors` →
188
- * {path,name}, `anchors` → {path,reason,text}, `generic_alts` →
189
- * {path,prop,text}, `long_headings` → {path,length}.
190
- *
191
- * DELIBERATELY ABSENT: `skips` (heading-skip). Its elements are
192
- * `{path, from, to}` and that check builds its locator with no from/to rider,
193
- * so the jumped heading levels ride on that array and nothing else. It is shed
194
- * by the allow-list rung instead.
195
- *
196
- * Being a DROP-list this one is allowed to be incomplete — a new host check's
197
- * array simply is not shed EARLY, and the allow-list rung behind it still sheds
198
- * everything. Opposite failure modes on purpose: this one under-sheds, the
199
- * other cannot.
200
- */
201
- export const REDUNDANT_EVIDENCE_KEYS = [
202
- 'paths',
203
- 'alt_paths',
204
- 'dead_anchors',
205
- 'anchors',
206
- 'generic_alts',
207
- 'long_headings',
208
- ];
209
- /** The serialised size the host actually transmits for `structuredContent`. */
210
- function encodedLength(payload) {
211
- return JSON.stringify(payload).length;
212
- }
213
- /** Rebuild one page entry, keeping only the keys `keep` accepts, in order. */
214
- function pickPageKeys(page, keep) {
215
- // `id`/`label` are seeded first so the result provably satisfies the
216
- // interface's two required members — no cast has to be taken on faith.
217
- const kept = { id: page.id, label: page.label };
218
- for (const [key, value] of Object.entries(page)) {
219
- if (keep(key))
220
- kept[key] = value;
221
- }
222
- return kept;
223
- }
224
- /**
225
- * Shrink stage 1 (BUGS-2) — drop the {@link REDUNDANT_EVIDENCE_KEYS} arrays
226
- * from every page entry that carries LOCATORS to duplicate them, flagging
227
- * `evidence_stripped: true` on each entry actually shortened.
228
- *
229
- * These are the only bytes in the payload that cost something and carry
230
- * nothing, so they go before anything else. Shedding the locators FIRST — which
231
- * both ladders used to do — spends budget on the copy while discarding the
232
- * original, richer data: the same hit's breadcrumb, element name and snippet.
233
- *
234
- * The `locators` gate is load-bearing, not defensive decoration. This handler
235
- * consumes a REMOTE host's payload, and a host predating B-3 emits no
236
- * `locators` key at all; there `alt_paths` IS the evidence, exactly as `skips`
237
- * is. Nothing is a duplicate then, so those entries fall through to the
238
- * allow-list rung untouched and the arrays degrade together.
239
- */
240
- function stripRedundantEvidence(findings) {
241
- return findings.map((finding) => ({
242
- ...finding,
243
- pages: finding.pages.map((page) => {
244
- if (!Array.isArray(page.locators) || page.locators.length === 0)
245
- return page;
246
- const hasRedundant = REDUNDANT_EVIDENCE_KEYS.some((key) => key in page);
247
- if (!hasRedundant)
248
- return page;
249
- return {
250
- ...pickPageKeys(page, (key) => !REDUNDANT_EVIDENCE_KEYS.includes(key)),
251
- evidence_stripped: true,
252
- };
253
- }),
254
- }));
255
- }
256
- /** The largest `locators` list on any page entry — the halving base for stage 2a. */
257
- function largestLocatorCount(findings) {
258
- let largest = 0;
259
- for (const finding of findings) {
260
- for (const page of finding.pages) {
261
- if (Array.isArray(page.locators))
262
- largest = Math.max(largest, page.locators.length);
263
- }
264
- }
265
- return largest;
266
- }
267
- /**
268
- * Shrink stage 2a (PROD-1) — TRIM every page entry's `locators` list to `cap`,
269
- * flagging `locators_stripped: true` on each entry actually shortened.
270
- *
271
- * Emptying the whole list the moment the payload is one char over is a cliff: a
272
- * page at the host's single-target `hit_cap` of 100 sits just above the budget,
273
- * and losing 100% of the evidence to save 5% of the bytes is a bad trade.
274
- * Halving (like the page rung below) sheds the smallest amount that fits.
275
- *
276
- * The flag carries ONE meaning — "the transport shed locator prose to fit its
277
- * budget" — equally true of a partial and a total shed, so a reader can never
278
- * mistake a trimmed list for the complete one.
279
- */
280
- function capLocators(findings, cap) {
281
- return findings.map((finding) => ({
282
- ...finding,
283
- pages: finding.pages.map((page) => {
284
- if (!Array.isArray(page.locators))
285
- return page;
286
- if (page.locators.length <= cap)
287
- return page;
288
- return { ...page, locators: page.locators.slice(0, cap), locators_stripped: true };
289
- }),
290
- }));
291
- }
292
- /**
293
- * Shrink stage 2b — EMPTY every page entry's `locators`, flagging
294
- * `locators_stripped: true` wherever locators were actually dropped.
295
- *
296
- * Emptied, NOT removed: an ABSENT `locators` key means "this host predates B-3
297
- * and cannot produce locators", whereas `locators: []` + `locators_stripped:
298
- * true` says the honest thing — the hits exist, they were too expensive to
299
- * transmit, and re-running the audit scoped to that one page returns them.
300
- * `builder_url` stays: one short string, and it is the caller's way BACK to the
301
- * hits this stage dropped.
302
- *
303
- * `hits_truncated` is deliberately untouched — it means the HOST's `hit_cap`
304
- * dropped hits (so the raw `paths`/`alt_paths`/… arrays are incomplete), which
305
- * is a different fact from the transport shedding prose. Two causes, two flags
306
- * (the same separation the PHP stage documents).
307
- */
308
- function stripLocators(findings) {
309
- return findings.map((finding) => ({
310
- ...finding,
311
- pages: finding.pages.map((page) => {
312
- if (!Array.isArray(page.locators))
313
- return page;
314
- if (page.locators.length === 0)
315
- return page;
316
- return { ...page, locators: [], locators_stripped: true };
317
- }),
318
- }));
319
- }
320
- /**
321
- * Shrink stage 3 (PROD-1) — reduce every page entry to
322
- * {@link PAGE_IDENTITY_KEYS}: its identity, hit totals, shed flags and
323
- * `builder_url`. Entries actually shortened are flagged
324
- * `evidence_stripped: true`.
325
- *
326
- * What reaches this rung is the evidence stage 1 could NOT prove redundant
327
- * (`skips`' `{from, to}`, `cluster_id`, whatever a newer host ships) plus, on a
328
- * locator-less host, everything. With the prose already gone there is no richer
329
- * copy left to prefer, and identity + counts are still worth more than any of
330
- * it: an entry naming the page, its hit total and its `builder_url` is
331
- * actionable; one carrying only `{from, to}` is not.
332
- *
333
- * `hits_truncated` is kept and never touched — it reports the HOST's `hit_cap`,
334
- * not a transport shed.
335
- */
336
- function stripPageEvidence(findings) {
337
- return findings.map((finding) => ({
338
- ...finding,
339
- pages: finding.pages.map((page) => {
340
- const kept = pickPageKeys(page, (key) => PAGE_IDENTITY_KEYS.includes(key));
341
- if (Object.keys(kept).length === Object.keys(page).length)
342
- return page;
343
- return { ...kept, evidence_stripped: true };
344
- }),
345
- }));
346
- }
347
- /** Shrink stage 4 — cap every finding's evidence `pages` at `cap`. */
348
- function applyPageCap(findings, cap) {
349
- return findings.map((finding) => finding.pages.length > cap
350
- ? { ...finding, pages: finding.pages.slice(0, cap), pages_truncated: true }
351
- : finding);
352
- }
353
- /** Shrink final stage — counts-only: bounded regardless of the site's size. */
354
- function stripPages(findings) {
355
- return findings.map((finding) => finding.pages.length > 0 ? { ...finding, pages: [], pages_truncated: true } : finding);
356
- }
357
- /**
358
- * PERF-4 / PROD-2 — bring `structuredContent` under `budget`, shedding in the
359
- * SAME ORDER as `McpPagesAuditHandler::shrinkToFit()` so the two transports
360
- * degrade identically rather than each inventing a policy:
361
- *
362
- * 0. as received (the host already caps evidence pages at 30/finding);
363
- * 1. the DUPLICATE raw evidence arrays ({@link stripRedundantEvidence}) —
364
- * free bytes: every field also rides on a locator of the same hit;
365
- * 2a. THIN the locator prose by halving ({@link capLocators});
366
- * 2b. shed the prose entirely ({@link stripLocators}) — re-derivable by
367
- * re-auditing that one page;
368
- * 3. the REMAINING raw evidence ({@link stripPageEvidence}), keeping each
369
- * entry's identity + counts;
370
- * 4. halve every finding's page cap, repeatedly, until it fits or no finding
371
- * has more than one page left;
372
- * 5. counts-only — drop `pages` entirely, flagging `pages_truncated`.
373
- *
374
- * The order encodes what is worth protecting LAST: a dropped locator can be
375
- * recovered with one scoped re-run, a dropped page id is simply invisible.
376
- * Shedding stops the moment the payload fits, so a result 1 char over loses
377
- * only the duplicate, never a page.
378
- *
379
- * THE PARITY CLAIM ABOVE IS ENFORCED, NOT ASSERTED (PERF-5 / MM-2 / QUAL-1).
380
- * This docblock used to make it while the ladder had rungs 1, 2a and 3 missing:
381
- * PHP grew them in c8fe86acb and this file was never revisited, so on one
382
- * identical 90,825-byte payload the native transport kept 18 locators and this
383
- * one kept 0 — while the prose said "degrade identically" and SKILL.md
384
- * documented an `evidence_stripped` rung this transport could never emit.
385
- * `tests/contracts/audit-shrink-ladder.test.ts` now DERIVES the rung order from
386
- * this function by driving it over the shared fixture at a sweep of budgets and
387
- * compares it with the order PHP derives from its own handler, so a rung added
388
- * on one side alone goes red instead of shipping.
389
- *
390
- * The BUDGETS stay deliberately separate (see {@link STRUCTURED_BUDGET_CHARS}):
391
- * the two legs carry different things. The two agree on the shed ORDER — a
392
- * contract — not on a magic number.
393
- */
394
- function shrinkStructured(envelope, findings, budget) {
395
- // Every stage after the first EMITS `structured_truncated`, so its own bytes
396
- // are counted against the budget it certifies — otherwise the marker could
397
- // push a payload that "fits" back over the line it was measured against.
398
- const fits = (candidate, marked) => encodedLength({
399
- ...envelope,
400
- findings: candidate,
401
- ...(marked ? { structured_truncated: true } : {}),
402
- }) <= budget;
403
- if (fits(findings, false))
404
- return { findings, shrunk: false };
405
- let current = stripRedundantEvidence(findings);
406
- if (fits(current, true))
407
- return { findings: current, shrunk: true };
408
- for (let i = 0; i < MAX_SHRINK_ITERATIONS; i += 1) {
409
- const largest = largestLocatorCount(current);
410
- if (largest <= 1)
411
- break;
412
- current = capLocators(current, Math.max(1, Math.trunc(largest / 2)));
413
- if (fits(current, true))
414
- return { findings: current, shrunk: true };
415
- }
416
- current = stripLocators(current);
417
- if (fits(current, true))
418
- return { findings: current, shrunk: true };
419
- current = stripPageEvidence(current);
420
- if (fits(current, true))
421
- return { findings: current, shrunk: true };
422
- for (let i = 0; i < MAX_SHRINK_ITERATIONS; i += 1) {
423
- const largest = current.reduce((max, f) => Math.max(max, f.pages.length), 0);
424
- if (largest <= 1)
425
- break;
426
- current = applyPageCap(current, Math.max(1, Math.trunc(largest / 2)));
427
- if (fits(current, true))
428
- return { findings: current, shrunk: true };
429
- }
430
- return { findings: stripPages(current), shrunk: true };
431
- }
432
- /**
433
- * A-6 — render the per-hit LOCATOR prose for a SINGLE-target sweep.
434
- *
435
- * Only reached when the host answered `scope:'single'`. The SITE sweep
436
- * deliberately gets NONE of this — see the text-leg rule below.
437
- *
438
- * Rendered from the ORIGINAL (un-shrunk) findings: the text leg carries its own
439
- * budget and a human reading it must see the true evidence. `structuredComplete`
440
- * only changes where the remainder line POINTS — promising "the complete list in
441
- * structuredContent" after that leg was shrunk would be a lie.
442
- *
443
- * Returns `''` when nothing has locators, so a host predating B-3 (or a clean
444
- * page) never gets an empty, confusing section header.
445
- */
446
- function renderLocatorDetail(findings, structuredComplete) {
447
- const lines = [];
448
- for (const finding of findings) {
449
- const pagesWithLocators = finding.pages.filter((p) => Array.isArray(p.locators) && p.locators.length > 0);
450
- if (pagesWithLocators.length === 0)
451
- continue;
452
- lines.push(`${finding.code} — ${finding.title}`);
453
- let budget = LOCATOR_LINES_PER_FINDING;
454
- let omitted = 0;
455
- for (const page of pagesWithLocators) {
456
- const locators = page.locators ?? [];
457
- if (budget === 0) {
458
- // Budget already spent on an earlier page of this finding —
459
- // count the rest rather than printing a header with no entries.
460
- omitted += locators.length;
461
- continue;
462
- }
463
- const builder = typeof page.builder_url === 'string' && page.builder_url !== ''
464
- ? ` — open in builder: ${page.builder_url}`
465
- : '';
466
- lines.push(` ${page.label} (${page.id})${builder}`);
467
- for (const locator of locators) {
468
- if (budget === 0) {
469
- omitted += 1;
470
- continue;
471
- }
472
- budget -= 1;
473
- // `breadcrumb · element_name · heading_source` — the three facts
474
- // a human needs to FIND the element in the customizer. Absent
475
- // members are dropped rather than rendered as "null".
476
- const parts = [
477
- locator.breadcrumb,
478
- typeof locator.element_name === 'string' && locator.element_name !== ''
479
- ? locator.element_name
480
- : locator.element_type,
481
- typeof locator.heading_source === 'string' && locator.heading_source !== ''
482
- ? locator.heading_source
483
- : undefined,
484
- ].filter((p) => typeof p === 'string' && p !== '');
485
- const repeat = locator.repeat > 1 ? ` ×${String(locator.repeat)}` : '';
486
- lines.push(` • ${parts.join(' · ')}${repeat}`);
487
- if (typeof locator.content_snippet === 'string' && locator.content_snippet !== '') {
488
- lines.push(` "${locator.content_snippet}"`);
489
- }
490
- }
491
- if (page.hits_truncated === true) {
492
- lines.push(' … more hits exist on this page (hits_truncated).');
493
- }
494
- if (page.locators_stripped === true) {
495
- lines.push(' … locator detail was shed to fit (locators_stripped).');
496
- }
497
- }
498
- if (omitted > 0) {
499
- lines.push(` … ${String(omitted)} more locator${omitted === 1 ? '' : 's'} for this ` +
500
- (structuredComplete
501
- ? 'finding (complete list in structuredContent).'
502
- : 'finding (structuredContent was shrunk too — raise max_chars for the full list).'));
503
- }
504
- }
505
- if (lines.length === 0)
506
- return '';
507
- return ['Where to fix:', ...lines].join('\n');
508
- }
509
- /**
510
- * Splice `detail` into an already-built text leg, BEFORE the trailing
511
- * `<!-- structured-meta:... -->` marker the toolkit appends (that marker is a
512
- * machine rider; prose belongs above it).
513
- */
514
- function appendDetailText(result, detail) {
515
- if (detail === '')
516
- return result;
517
- const first = result.content[0];
518
- if (first === undefined || first.type !== 'text' || typeof first.text !== 'string') {
519
- return result;
520
- }
521
- const markerAt = first.text.indexOf('\n<!-- structured-meta:');
522
- const text = markerAt === -1
523
- ? `${first.text}\n\n${detail}`
524
- : `${first.text.slice(0, markerAt)}\n\n${detail}\n${first.text.slice(markerAt + 1)}`;
525
- return { ...result, content: [{ ...first, text }, ...result.content.slice(1)] };
526
- }
527
- export async function handlePagesAudit(client, { mode, types, checks, thin_content_threshold, stale_after_months, max_chars, target, include_meta }) {
528
- // A-6 / F205: exactly-one-of lives HERE, not in a zod `.refine` — an
529
- // SDK-level rejection surfaces as a raw -32602 with none of this steering.
530
- const resolvedTarget = normalizeTarget(target);
531
- // BUG-4: a target bag that survived nothing is a MALFORMED ADDRESS, not an
532
- // absent one. Checked FIRST (mirroring the PHP controllers' ordering)
533
- // because the alternative is a full site sweep answered 200 and read as the
534
- // audit of one page.
535
- const malformed = malformedTargetError(target, resolvedTarget, {
536
- context: { target: target ?? null, types: types ?? null },
537
- hint: 'Each target member must be a non-empty string or number — e.g. '
538
- + 'target:{special:"home"} or target:{template_id:"page:4816"}. Omit `target` '
539
- + 'entirely to audit the whole site.',
540
- });
541
- if (malformed !== null)
542
- return malformed;
543
- const suppliedKeys = targetKeysOf(resolvedTarget);
544
- if (suppliedKeys.length > 1) {
545
- return tooManyTargetsError({
546
- supplied: suppliedKeys,
547
- context: { target: resolvedTarget, types: types ?? null },
548
- });
549
- }
550
- const hasTarget = suppliedKeys.length === 1;
551
- // Key decision 11 — `types` narrows a SITE sweep; a target already names
552
- // exactly one page. Refusing here (rather than letting PHP 400 it) keeps the
553
- // agent out of the generic catch's "run diagnose" hint, which would blame
554
- // connectivity for a request-shape clash, and saves the round-trip.
555
- if (hasTarget && types !== undefined && types.length > 0) {
556
- return typesConflictsWithTargetError({
557
- context: { target: resolvedTarget, types: [...types] },
558
- });
559
- }
560
- try {
561
- const qs = new URLSearchParams();
562
- appendTargetParams(qs, resolvedTarget);
563
- if (mode !== undefined)
564
- qs.set('mode', mode);
565
- if (types !== undefined && types.length > 0)
566
- qs.set('types', types.join(','));
567
- if (checks !== undefined && checks.length > 0)
568
- qs.set('checks', checks.join(','));
569
- if (typeof thin_content_threshold === 'number') {
570
- qs.set('thin_content_threshold', String(thin_content_threshold));
571
- }
572
- if (typeof stale_after_months === 'number') {
573
- qs.set('stale_after_months', String(stale_after_months));
574
- }
575
- const query = qs.toString();
576
- const data = await client.get(`/pages/audit${query !== '' ? `?${query}` : ''}`);
577
- // A-6 VERSION-SKEW GUARD (blocker-class). A host plugin predating
578
- // single-target addressing IGNORES the unknown `target[...]` query
579
- // params and answers HTTP 200 with a FULL SITE SWEEP. The existing 404
580
- // gate does not cover this (it only fires when the route is absent), so
581
- // returning `data` here would present whole-site findings as "the audit
582
- // of your homepage" — wrong findings attributed to the wrong page. We
583
- // therefore require POSITIVE proof of scoping and never fall back to
584
- // the sweep.
585
- if (hasTarget && data.scope !== 'single') {
586
- return serverTooOldError({
587
- message: 'The site answered a single-target audit with an UNSCOPED result ' +
588
- `(scope: ${data.scope === undefined ? 'absent' : JSON.stringify(data.scope)}, ` +
589
- `${String(data.scanned.templates)} templates scanned). Refusing to report a ` +
590
- 'site-wide sweep as a single-page audit.',
591
- context: { target: resolvedTarget, scope: data.scope ?? null },
592
- });
593
- }
594
- const findings = data.findings;
595
- const byType = normalizeByType(data.scanned.by_type);
596
- // Single mode counts HITS, site mode counts PAGES — see the
597
- // COUNT-COLUMN RULE on `findingsColumns`. Both the text table and the
598
- // `_meta.ui` data-table are built from these two values by
599
- // `tableResult`, so the label and the number cannot disagree.
600
- const isSingleScope = data.scope === 'single';
601
- const rows = findings.map((f) => ({
602
- severity: f.severity,
603
- code: f.code,
604
- category: f.category,
605
- count: isSingleScope ? hitCountOf(f) : f.count,
606
- title: f.title,
607
- }));
608
- // TEXT-LEG RULE (B-5, pinned by a test): the SITE-sweep text leg is
609
- // and stays this 5-column summary table. Per-hit LOCATORS — breadcrumb,
610
- // element name, snippet, builder_url — are structuredContent-ONLY: a
611
- // site sweep can carry dozens of findings × 30 evidence pages × N hits,
612
- // and inlining that prose would blow the text budget and force
613
- // `applyMaxChars` to clip the table itself. Do NOT render locators here.
614
- //
615
- // A-6: a SINGLE-target sweep is the one exception — one page, bounded
616
- // hits — and gets the locator prose spliced in below (Key decision 8).
617
- const toolkitResult = tableResult(rows, {
618
- columns: findingsColumns(isSingleScope),
619
- header: (count) => `${String(count)} finding${count === 1 ? '' : 's'} — ` +
620
- `${String(data.summary.critical)} critical / ` +
621
- `${String(data.summary.warning)} warning / ` +
622
- `${String(data.summary.info)} info ` +
623
- `(scanned ${String(data.scanned.templates)} templates, etag ${data.etag})`,
624
- footer: `${data.disclaimer} Drill into a flagged page with ` +
625
- 'yootheme_builder_template_summary({ template_id }); apply a fix via the ' +
626
- "finding's fix_hint (e.g. element_update_settings), one page at a time.",
627
- includeMeta: include_meta,
628
- });
629
- // The projection is rebuilt FIELD BY FIELD, so a top-level field the
630
- // host starts sending is silently DROPPED unless it is named here
631
- // (`findings` passes through verbatim, which is why per-page locators
632
- // survive on their own). `scope`/`note`/`resolved_target` are forwarded
633
- // ONLY when the host actually sent them — a site sweep and every host
634
- // predating single-target mode omit all three, and inventing defaults
635
- // would make an old server look like it answered a scoped audit.
636
- const envelope = {
637
- etag: data.etag,
638
- ...(data.scope !== undefined ? { scope: data.scope } : {}),
639
- ...(data.note !== undefined ? { note: data.note } : {}),
640
- ...(data.resolved_target !== undefined ? { resolved_target: data.resolved_target } : {}),
641
- scanned: { templates: data.scanned.templates, by_type: byType },
642
- summary: { ...data.summary },
643
- disclaimer: data.disclaimer,
644
- // T-A2 — forwarded only when the host actually sent them (a
645
- // builder-mode sweep and every host predating rendered mode omit
646
- // all three, same "absent means the old behaviour" convention as
647
- // scope/note/resolved_target above).
648
- ...(data.mode !== undefined ? { mode: data.mode } : {}),
649
- ...(data.render_scan !== undefined ? { render_scan: data.render_scan } : {}),
650
- ...(data.render_errors !== undefined ? { render_errors: data.render_errors } : {}),
651
- };
652
- // PERF-4 / PROD-2: bound the MACHINE leg. `max_chars` overrides the
653
- // default in both directions; the ladder is a no-op when the payload
654
- // already fits, so a normal audit is byte-identical to before.
655
- const budget = max_chars ?? STRUCTURED_BUDGET_CHARS;
656
- const shrunk = shrinkStructured(envelope, findings, budget);
657
- // The text leg is built from the ORIGINAL findings — its own budget is
658
- // independent (15 locators/finding), and rewriting the numbers a human
659
- // reads because the machine leg was shed would be the silent-swap the
660
- // COUNT-COLUMN RULE exists to prevent.
661
- const detail = [
662
- isSingleScope ? renderLocatorDetail(findings, !shrunk.shrunk) : '',
663
- shrunk.shrunk
664
- ? `Note: structuredContent exceeded its ${String(budget)}-char budget and was `
665
- + 'shrunk (duplicate raw evidence first, then locator detail, then the remaining '
666
- + 'evidence, then whole pages — flagged per entry as evidence_stripped / '
667
- + 'locators_stripped / pages_truncated). Raise max_chars, or re-run scoped to '
668
- + 'one page with target:{…}, for the complete payload.'
669
- : '',
670
- ]
671
- .filter((part) => part !== '')
672
- .join('\n\n');
673
- const textLeg = appendDetailText(toolkitResult, detail);
674
- return structuredResult(applyMaxChars(textLeg, max_chars), {
675
- ...envelope,
676
- findings: shrunk.findings,
677
- // Never invented on a complete payload — its PRESENCE is the signal.
678
- ...(shrunk.shrunk ? { structured_truncated: true } : {}),
679
- });
680
- }
681
- catch (e) {
682
- const context = { types: types ?? null, checks: checks ?? null, target: resolvedTarget };
683
- // BUG-3 / MM-5 — a TYPED `yootheme_builder_mcp.pages.*` failure answers
684
- // the ADDRESS, not the connection. It must be tested FIRST, because four
685
- // of its members are 404s (`title_no_match`, `special_not_resolvable`,
686
- // `url_no_match`, `template_not_found`) that the capability gate below
687
- // would otherwise mis-report as "your plugin predates pages_audit" — a
688
- // false claim, actionable in the wrong direction. The server's own
689
- // message rides through `errorResult` unchanged; only the HINT is ours,
690
- // and it is the SAME string `pages_resolve` already used for this family
691
- // so one error family cannot read two ways depending on which sibling
692
- // tool the agent happened to call.
693
- if (hasTarget && isTypedTargetError(e)) {
694
- return errorResult({ error: e, context, hint: TARGET_FAILURE_HINT });
695
- }
696
- if (e instanceof RestError && e.status === 404) {
697
- return errorResult({
698
- error: e,
699
- context,
700
- hint: 'GET /pages/audit was not found on this site — the yt-builder-mcp host ' +
701
- 'plugin predates pages_audit (added in 1.10.0). Update the plugin on this ' +
702
- 'site, then retry.',
703
- });
704
- }
705
- // Everything left is a genuine transport / auth / server failure — the
706
- // one case the diagnose steer is actually for.
707
- return errorResult({
708
- error: e,
709
- context,
710
- hint: 'Run yootheme_builder_diagnose to verify auth + that the host plugin is reachable.',
711
- });
712
- }
713
- }
714
- //# sourceMappingURL=handlers-audit.js.map