@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.
- package/README.md +131 -33
- package/bin/node-floor.d.ts +28 -0
- package/bin/node-floor.js +123 -0
- package/bin/yt-builder-mcp.js +52 -11
- package/dist/auth.d.ts +3 -121
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +40 -170
- package/dist/auth.js.map +1 -1
- package/dist/catalog/build-catalog.d.ts +4 -49
- package/dist/catalog/build-catalog.d.ts.map +1 -1
- package/dist/catalog/build-catalog.js +15 -126
- package/dist/catalog/build-catalog.js.map +1 -1
- package/dist/catalog/json-schema.d.ts +3 -0
- package/dist/catalog/json-schema.d.ts.map +1 -0
- package/dist/catalog/json-schema.js +68 -0
- package/dist/catalog/json-schema.js.map +1 -0
- package/dist/catalog/output-shapes.d.ts +6 -0
- package/dist/catalog/output-shapes.d.ts.map +1 -0
- package/dist/catalog/output-shapes.js +89 -0
- package/dist/catalog/output-shapes.js.map +1 -0
- package/dist/catalog/tool-catalog-markdown.d.ts +1 -37
- package/dist/catalog/tool-catalog-markdown.d.ts.map +1 -1
- package/dist/catalog/tool-catalog-markdown.js +9 -41
- package/dist/catalog/tool-catalog-markdown.js.map +1 -1
- package/dist/cli/doctor-command.d.ts +2 -7
- package/dist/cli/doctor-command.d.ts.map +1 -1
- package/dist/cli/doctor-command.js +33 -54
- package/dist/cli/doctor-command.js.map +1 -1
- package/dist/cli/invocation-decision.d.ts +4 -52
- package/dist/cli/invocation-decision.d.ts.map +1 -1
- package/dist/cli/invocation-decision.js +45 -54
- package/dist/cli/invocation-decision.js.map +1 -1
- package/dist/client.d.ts +3 -107
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +34 -115
- package/dist/client.js.map +1 -1
- package/dist/clients/claude-code.d.ts +0 -15
- package/dist/clients/claude-code.d.ts.map +1 -1
- package/dist/clients/claude-code.js +0 -22
- package/dist/clients/claude-code.js.map +1 -1
- package/dist/clients/claude-desktop.d.ts +0 -16
- package/dist/clients/claude-desktop.d.ts.map +1 -1
- package/dist/clients/claude-desktop.js +0 -18
- package/dist/clients/claude-desktop.js.map +1 -1
- package/dist/clients/cline.d.ts +0 -23
- package/dist/clients/cline.d.ts.map +1 -1
- package/dist/clients/cline.js +0 -33
- package/dist/clients/cline.js.map +1 -1
- package/dist/clients/codex-cli.d.ts +0 -39
- package/dist/clients/codex-cli.d.ts.map +1 -1
- package/dist/clients/codex-cli.js +0 -137
- package/dist/clients/codex-cli.js.map +1 -1
- package/dist/clients/continue.d.ts +0 -10
- package/dist/clients/continue.d.ts.map +1 -1
- package/dist/clients/continue.js +0 -26
- package/dist/clients/continue.js.map +1 -1
- package/dist/clients/cursor.d.ts +0 -9
- package/dist/clients/cursor.d.ts.map +1 -1
- package/dist/clients/cursor.js +0 -11
- package/dist/clients/cursor.js.map +1 -1
- package/dist/clients/gemini-cli.d.ts +0 -15
- package/dist/clients/gemini-cli.d.ts.map +1 -1
- package/dist/clients/gemini-cli.js +0 -17
- package/dist/clients/gemini-cli.js.map +1 -1
- package/dist/clients/home.d.ts +0 -12
- package/dist/clients/home.d.ts.map +1 -1
- package/dist/clients/home.js +0 -12
- package/dist/clients/home.js.map +1 -1
- package/dist/clients/index.d.ts +0 -150
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +0 -112
- package/dist/clients/index.js.map +1 -1
- package/dist/clients/roo-code.d.ts +0 -20
- package/dist/clients/roo-code.d.ts.map +1 -1
- package/dist/clients/roo-code.js +0 -22
- package/dist/clients/roo-code.js.map +1 -1
- package/dist/clients/zed.d.ts +0 -9
- package/dist/clients/zed.d.ts.map +1 -1
- package/dist/clients/zed.js +0 -18
- package/dist/clients/zed.js.map +1 -1
- package/dist/compat-floor.d.ts +35 -0
- package/dist/compat-floor.d.ts.map +1 -0
- package/dist/compat-floor.js +84 -0
- package/dist/compat-floor.js.map +1 -0
- package/dist/compat-probe.d.ts +6 -0
- package/dist/compat-probe.d.ts.map +1 -0
- package/dist/compat-probe.js +20 -0
- package/dist/compat-probe.js.map +1 -0
- package/dist/diagnostics/ca-reexec.d.ts +0 -30
- package/dist/diagnostics/ca-reexec.d.ts.map +1 -1
- package/dist/diagnostics/ca-reexec.js +0 -62
- package/dist/diagnostics/ca-reexec.js.map +1 -1
- package/dist/diagnostics/ca-trust.d.ts +0 -22
- package/dist/diagnostics/ca-trust.d.ts.map +1 -1
- package/dist/diagnostics/ca-trust.js +3 -42
- package/dist/diagnostics/ca-trust.js.map +1 -1
- package/dist/diagnostics/diagnose-network-error.d.ts +1 -38
- package/dist/diagnostics/diagnose-network-error.d.ts.map +1 -1
- package/dist/diagnostics/diagnose-network-error.js +26 -37
- package/dist/diagnostics/diagnose-network-error.js.map +1 -1
- package/dist/diagnostics/doctor.d.ts +13 -65
- package/dist/diagnostics/doctor.d.ts.map +1 -1
- package/dist/diagnostics/doctor.js +46 -70
- package/dist/diagnostics/doctor.js.map +1 -1
- package/dist/diagnostics/startup-self-probe.d.ts +3 -25
- package/dist/diagnostics/startup-self-probe.d.ts.map +1 -1
- package/dist/diagnostics/startup-self-probe.js +11 -48
- package/dist/diagnostics/startup-self-probe.js.map +1 -1
- package/dist/errors/hints.d.ts +0 -44
- package/dist/errors/hints.d.ts.map +1 -1
- package/dist/errors/hints.js +0 -32
- package/dist/errors/hints.js.map +1 -1
- package/dist/errors/mask.d.ts +0 -31
- package/dist/errors/mask.d.ts.map +1 -1
- package/dist/errors/mask.js +0 -32
- package/dist/errors/mask.js.map +1 -1
- package/dist/errors/redact-credentials.d.ts +2 -0
- package/dist/errors/redact-credentials.d.ts.map +1 -0
- package/dist/errors/redact-credentials.js +13 -0
- package/dist/errors/redact-credentials.js.map +1 -0
- package/dist/errors/sanitize.d.ts +0 -29
- package/dist/errors/sanitize.d.ts.map +1 -1
- package/dist/errors/sanitize.js +0 -40
- package/dist/errors/sanitize.js.map +1 -1
- package/dist/errors.d.ts +6 -17
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +16 -21
- package/dist/errors.js.map +1 -1
- package/dist/gateway/advanced-read-tool.d.ts +0 -32
- package/dist/gateway/advanced-read-tool.d.ts.map +1 -1
- package/dist/gateway/advanced-read-tool.js +43 -111
- package/dist/gateway/advanced-read-tool.js.map +1 -1
- package/dist/gateway/advanced-tool/discovery.d.ts +1 -12
- package/dist/gateway/advanced-tool/discovery.d.ts.map +1 -1
- package/dist/gateway/advanced-tool/discovery.js +18 -16
- package/dist/gateway/advanced-tool/discovery.js.map +1 -1
- package/dist/gateway/advanced-tool/domains.d.ts +7 -66
- package/dist/gateway/advanced-tool/domains.d.ts.map +1 -1
- package/dist/gateway/advanced-tool/domains.js +36 -80
- package/dist/gateway/advanced-tool/domains.js.map +1 -1
- package/dist/gateway/advanced-tool/execute.d.ts +0 -25
- package/dist/gateway/advanced-tool/execute.d.ts.map +1 -1
- package/dist/gateway/advanced-tool/execute.js +13 -49
- package/dist/gateway/advanced-tool/execute.js.map +1 -1
- package/dist/gateway/advanced-tool/index.d.ts +1 -32
- package/dist/gateway/advanced-tool/index.d.ts.map +1 -1
- package/dist/gateway/advanced-tool/index.js +1 -35
- package/dist/gateway/advanced-tool/index.js.map +1 -1
- package/dist/gateway/advanced-tool/register.d.ts +0 -14
- package/dist/gateway/advanced-tool/register.d.ts.map +1 -1
- package/dist/gateway/advanced-tool/register.js +22 -58
- package/dist/gateway/advanced-tool/register.js.map +1 -1
- package/dist/gateway/advanced-tool.d.ts +0 -11
- package/dist/gateway/advanced-tool.d.ts.map +1 -1
- package/dist/gateway/advanced-tool.js +0 -11
- package/dist/gateway/advanced-tool.js.map +1 -1
- package/dist/gateway/capturing-server.d.ts +3 -88
- package/dist/gateway/capturing-server.d.ts.map +1 -1
- package/dist/gateway/capturing-server.js +0 -77
- package/dist/gateway/capturing-server.js.map +1 -1
- package/dist/gateway/essentials.d.ts +1 -63
- package/dist/gateway/essentials.d.ts.map +1 -1
- package/dist/gateway/essentials.js +10 -174
- package/dist/gateway/essentials.js.map +1 -1
- package/dist/gateway/test-support.d.ts +0 -28
- package/dist/gateway/test-support.d.ts.map +1 -1
- package/dist/gateway/test-support.js +0 -29
- package/dist/gateway/test-support.js.map +1 -1
- package/dist/health-response.d.ts +2 -0
- package/dist/health-response.d.ts.map +1 -0
- package/dist/health-response.js +7 -0
- package/dist/health-response.js.map +1 -0
- package/dist/icon-data.js +0 -3
- package/dist/icon-data.js.map +1 -1
- package/dist/index.d.ts +7 -23
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -130
- package/dist/index.js.map +1 -1
- package/dist/install-skill.d.ts +0 -44
- package/dist/install-skill.d.ts.map +1 -1
- package/dist/install-skill.js +5 -46
- package/dist/install-skill.js.map +1 -1
- package/dist/net/extra-headers.d.ts +0 -58
- package/dist/net/extra-headers.d.ts.map +1 -1
- package/dist/net/extra-headers.js +0 -67
- package/dist/net/extra-headers.js.map +1 -1
- package/dist/net/internal-host.d.ts +0 -31
- package/dist/net/internal-host.d.ts.map +1 -1
- package/dist/net/internal-host.js +7 -65
- package/dist/net/internal-host.js.map +1 -1
- package/dist/net/proxy-dispatcher.d.ts +0 -37
- package/dist/net/proxy-dispatcher.d.ts.map +1 -1
- package/dist/net/proxy-dispatcher.js +0 -40
- package/dist/net/proxy-dispatcher.js.map +1 -1
- package/dist/net/public-fetch.d.ts +53 -0
- package/dist/net/public-fetch.d.ts.map +1 -0
- package/dist/net/public-fetch.js +143 -0
- package/dist/net/public-fetch.js.map +1 -0
- package/dist/net/public-page-report.d.ts +26 -0
- package/dist/net/public-page-report.d.ts.map +1 -0
- package/dist/net/public-page-report.js +145 -0
- package/dist/net/public-page-report.js.map +1 -0
- package/dist/net/redirect-safe-fetch.d.ts +14 -0
- package/dist/net/redirect-safe-fetch.d.ts.map +1 -0
- package/dist/net/redirect-safe-fetch.js +61 -0
- package/dist/net/redirect-safe-fetch.js.map +1 -0
- package/dist/net/session-recovery-fetch.d.ts +7 -0
- package/dist/net/session-recovery-fetch.d.ts.map +1 -0
- package/dist/net/session-recovery-fetch.js +139 -0
- package/dist/net/session-recovery-fetch.js.map +1 -0
- package/dist/net/site-basic-auth.d.ts +1 -59
- package/dist/net/site-basic-auth.d.ts.map +1 -1
- package/dist/net/site-basic-auth.js +5 -94
- package/dist/net/site-basic-auth.js.map +1 -1
- package/dist/package-version.d.ts +2 -0
- package/dist/package-version.d.ts.map +1 -0
- package/dist/package-version.js +15 -0
- package/dist/package-version.js.map +1 -0
- package/dist/platform/detect.d.ts +0 -54
- package/dist/platform/detect.d.ts.map +1 -1
- package/dist/platform/detect.js +0 -53
- package/dist/platform/detect.js.map +1 -1
- package/dist/platform/index.d.ts +0 -100
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js +0 -106
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/joomla.d.ts +0 -35
- package/dist/platform/joomla.d.ts.map +1 -1
- package/dist/platform/joomla.js +0 -35
- package/dist/platform/joomla.js.map +1 -1
- package/dist/proxy/bridge.d.ts +36 -76
- package/dist/proxy/bridge.d.ts.map +1 -1
- package/dist/proxy/bridge.js +443 -136
- package/dist/proxy/bridge.js.map +1 -1
- package/dist/proxy/confirm-elicitation.d.ts +22 -0
- package/dist/proxy/confirm-elicitation.d.ts.map +1 -0
- package/dist/proxy/confirm-elicitation.js +170 -0
- package/dist/proxy/confirm-elicitation.js.map +1 -0
- package/dist/proxy/confirm-question-contract.d.ts +6 -0
- package/dist/proxy/confirm-question-contract.d.ts.map +1 -0
- package/dist/proxy/confirm-question-contract.js +9 -0
- package/dist/proxy/confirm-question-contract.js.map +1 -0
- package/dist/proxy/confirm-question.d.ts +2 -0
- package/dist/proxy/confirm-question.d.ts.map +1 -0
- package/dist/proxy/confirm-question.js +125 -0
- package/dist/proxy/confirm-question.js.map +1 -0
- package/dist/proxy/instructions.d.ts +4 -0
- package/dist/proxy/instructions.d.ts.map +1 -0
- package/dist/proxy/instructions.js +12 -0
- package/dist/proxy/instructions.js.map +1 -0
- package/dist/proxy/mode.d.ts +14 -9
- package/dist/proxy/mode.d.ts.map +1 -1
- package/dist/proxy/mode.js +58 -34
- package/dist/proxy/mode.js.map +1 -1
- package/dist/proxy/multi-site.d.ts +42 -0
- package/dist/proxy/multi-site.d.ts.map +1 -0
- package/dist/proxy/multi-site.js +134 -0
- package/dist/proxy/multi-site.js.map +1 -0
- package/dist/proxy/request-headers.d.ts +9 -0
- package/dist/proxy/request-headers.d.ts.map +1 -0
- package/dist/proxy/request-headers.js +17 -0
- package/dist/proxy/request-headers.js.map +1 -0
- package/dist/proxy/shadow-tools.d.ts +9 -0
- package/dist/proxy/shadow-tools.d.ts.map +1 -0
- package/dist/proxy/shadow-tools.js +42 -0
- package/dist/proxy/shadow-tools.js.map +1 -0
- package/dist/proxy/tools-list-cap.d.ts +7 -0
- package/dist/proxy/tools-list-cap.d.ts.map +1 -0
- package/dist/proxy/tools-list-cap.js +14 -0
- package/dist/proxy/tools-list-cap.js.map +1 -0
- package/dist/proxy/transport-uncertainty.d.ts +2 -0
- package/dist/proxy/transport-uncertainty.d.ts.map +1 -0
- package/dist/proxy/transport-uncertainty.js +8 -0
- package/dist/proxy/transport-uncertainty.js.map +1 -0
- package/dist/proxy/upstream-error.d.ts +7 -0
- package/dist/proxy/upstream-error.d.ts.map +1 -0
- package/dist/proxy/upstream-error.js +35 -0
- package/dist/proxy/upstream-error.js.map +1 -0
- package/dist/proxy/wire-dialect.d.ts +5 -0
- package/dist/proxy/wire-dialect.d.ts.map +1 -0
- package/dist/proxy/wire-dialect.js +33 -0
- package/dist/proxy/wire-dialect.js.map +1 -0
- package/dist/server.d.ts +14 -82
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +107 -203
- package/dist/server.js.map +1 -1
- package/dist/setup/banner-color.d.ts +13 -0
- package/dist/setup/banner-color.d.ts.map +1 -0
- package/dist/setup/banner-color.js +93 -0
- package/dist/setup/banner-color.js.map +1 -0
- package/dist/setup/banner.d.ts +22 -0
- package/dist/setup/banner.d.ts.map +1 -0
- package/dist/setup/banner.js +119 -0
- package/dist/setup/banner.js.map +1 -0
- package/dist/setup/ca-recovery.d.ts +20 -0
- package/dist/setup/ca-recovery.d.ts.map +1 -0
- package/dist/setup/ca-recovery.js +92 -0
- package/dist/setup/ca-recovery.js.map +1 -0
- package/dist/setup/closing.d.ts +15 -0
- package/dist/setup/closing.d.ts.map +1 -0
- package/dist/setup/closing.js +43 -0
- package/dist/setup/closing.js.map +1 -0
- package/dist/setup/corporate-ca.d.ts +16 -0
- package/dist/setup/corporate-ca.d.ts.map +1 -0
- package/dist/setup/corporate-ca.js +32 -0
- package/dist/setup/corporate-ca.js.map +1 -0
- package/dist/setup/host-platform.d.ts +8 -0
- package/dist/setup/host-platform.d.ts.map +1 -0
- package/dist/setup/host-platform.js +21 -0
- package/dist/setup/host-platform.js.map +1 -0
- package/dist/setup/install-configs.d.ts +18 -0
- package/dist/setup/install-configs.d.ts.map +1 -0
- package/dist/setup/install-configs.js +70 -0
- package/dist/setup/install-configs.js.map +1 -0
- package/dist/setup/multi-site-loop.d.ts +14 -0
- package/dist/setup/multi-site-loop.d.ts.map +1 -0
- package/dist/setup/multi-site-loop.js +20 -0
- package/dist/setup/multi-site-loop.js.map +1 -0
- package/dist/setup/phases.d.ts +18 -0
- package/dist/setup/phases.d.ts.map +1 -0
- package/dist/setup/phases.js +55 -0
- package/dist/setup/phases.js.map +1 -0
- package/dist/setup/registry-remedy.d.ts +12 -0
- package/dist/setup/registry-remedy.d.ts.map +1 -0
- package/dist/setup/registry-remedy.js +37 -0
- package/dist/setup/registry-remedy.js.map +1 -0
- package/dist/setup/resume.d.ts +28 -0
- package/dist/setup/resume.d.ts.map +1 -0
- package/dist/setup/resume.js +99 -0
- package/dist/setup/resume.js.map +1 -0
- package/dist/setup-ca-env.d.ts +0 -30
- package/dist/setup-ca-env.d.ts.map +1 -1
- package/dist/setup-ca-env.js +0 -28
- package/dist/setup-ca-env.js.map +1 -1
- package/dist/setup-ca-reprobe.d.ts +0 -25
- package/dist/setup-ca-reprobe.d.ts.map +1 -1
- package/dist/setup-ca-reprobe.js +0 -34
- package/dist/setup-ca-reprobe.js.map +1 -1
- package/dist/setup-cli-confirm.d.ts +0 -34
- package/dist/setup-cli-confirm.d.ts.map +1 -1
- package/dist/setup-cli-confirm.js +0 -36
- package/dist/setup-cli-confirm.js.map +1 -1
- package/dist/setup-cli.d.ts +6 -167
- package/dist/setup-cli.d.ts.map +1 -1
- package/dist/setup-cli.js +161 -173
- package/dist/setup-cli.js.map +1 -1
- package/dist/setup-npx-spec.d.ts +0 -36
- package/dist/setup-npx-spec.d.ts.map +1 -1
- package/dist/setup-npx-spec.js +0 -38
- package/dist/setup-npx-spec.js.map +1 -1
- package/dist/setup-prompts.d.ts +5 -70
- package/dist/setup-prompts.d.ts.map +1 -1
- package/dist/setup-prompts.js +67 -107
- package/dist/setup-prompts.js.map +1 -1
- package/dist/setup-token.d.ts +0 -34
- package/dist/setup-token.d.ts.map +1 -1
- package/dist/setup-token.js +0 -40
- package/dist/setup-token.js.map +1 -1
- package/dist/setup-wizard-defaults.d.ts +0 -36
- package/dist/setup-wizard-defaults.d.ts.map +1 -1
- package/dist/setup-wizard-defaults.js +0 -75
- package/dist/setup-wizard-defaults.js.map +1 -1
- package/dist/setup-wizard-handshake.d.ts +1 -19
- package/dist/setup-wizard-handshake.d.ts.map +1 -1
- package/dist/setup-wizard-handshake.js +8 -45
- package/dist/setup-wizard-handshake.js.map +1 -1
- package/dist/setup-wizard-types.d.ts +16 -209
- package/dist/setup-wizard-types.d.ts.map +1 -1
- package/dist/setup-wizard-types.js +0 -9
- package/dist/setup-wizard-types.js.map +1 -1
- package/dist/setup-wizard.d.ts +0 -28
- package/dist/setup-wizard.d.ts.map +1 -1
- package/dist/setup-wizard.js +167 -412
- package/dist/setup-wizard.js.map +1 -1
- package/dist/setup.d.ts +0 -15
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +0 -15
- package/dist/setup.js.map +1 -1
- package/dist/sites/bootstrap.d.ts +0 -38
- package/dist/sites/bootstrap.d.ts.map +1 -1
- package/dist/sites/bootstrap.js +0 -44
- package/dist/sites/bootstrap.js.map +1 -1
- package/dist/sites/cli/add-site.d.ts +0 -76
- package/dist/sites/cli/add-site.d.ts.map +1 -1
- package/dist/sites/cli/add-site.js +0 -71
- package/dist/sites/cli/add-site.js.map +1 -1
- package/dist/sites/cli/list-sites.d.ts +0 -31
- package/dist/sites/cli/list-sites.d.ts.map +1 -1
- package/dist/sites/cli/list-sites.js +0 -45
- package/dist/sites/cli/list-sites.js.map +1 -1
- package/dist/sites/cli/remove-site.d.ts +0 -37
- package/dist/sites/cli/remove-site.d.ts.map +1 -1
- package/dist/sites/cli/remove-site.js +0 -37
- package/dist/sites/cli/remove-site.js.map +1 -1
- package/dist/sites/cli/set-default.d.ts +0 -25
- package/dist/sites/cli/set-default.d.ts.map +1 -1
- package/dist/sites/cli/set-default.js +0 -22
- package/dist/sites/cli/set-default.js.map +1 -1
- package/dist/sites/cli/test-site.d.ts +0 -44
- package/dist/sites/cli/test-site.d.ts.map +1 -1
- package/dist/sites/cli/test-site.js +0 -39
- package/dist/sites/cli/test-site.js.map +1 -1
- package/dist/sites/client-pool.d.ts +11 -164
- package/dist/sites/client-pool.d.ts.map +1 -1
- package/dist/sites/client-pool.js +73 -194
- package/dist/sites/client-pool.js.map +1 -1
- package/dist/sites/config-problem.d.ts +2 -0
- package/dist/sites/config-problem.d.ts.map +1 -0
- package/dist/sites/config-problem.js +13 -0
- package/dist/sites/config-problem.js.map +1 -0
- package/dist/sites/env-bridge.d.ts +0 -69
- package/dist/sites/env-bridge.d.ts.map +1 -1
- package/dist/sites/env-bridge.js +2 -71
- package/dist/sites/env-bridge.js.map +1 -1
- package/dist/sites/op-inject.d.ts +23 -0
- package/dist/sites/op-inject.d.ts.map +1 -0
- package/dist/sites/op-inject.js +131 -0
- package/dist/sites/op-inject.js.map +1 -0
- package/dist/sites/paths.d.ts +0 -19
- package/dist/sites/paths.d.ts.map +1 -1
- package/dist/sites/paths.js +0 -19
- package/dist/sites/paths.js.map +1 -1
- package/dist/sites/probe.d.ts +1 -47
- package/dist/sites/probe.d.ts.map +1 -1
- package/dist/sites/probe.js +4 -46
- package/dist/sites/probe.js.map +1 -1
- package/dist/sites/registry.d.ts +4 -135
- package/dist/sites/registry.d.ts.map +1 -1
- package/dist/sites/registry.js +4 -98
- package/dist/sites/registry.js.map +1 -1
- package/dist/sites/schema.d.ts +3 -51
- package/dist/sites/schema.d.ts.map +1 -1
- package/dist/sites/schema.js +6 -52
- package/dist/sites/schema.js.map +1 -1
- package/dist/sites/secret-resolver.d.ts +6 -76
- package/dist/sites/secret-resolver.d.ts.map +1 -1
- package/dist/sites/secret-resolver.js +39 -104
- package/dist/sites/secret-resolver.js.map +1 -1
- package/dist/sites/store.d.ts +12 -69
- package/dist/sites/store.d.ts.map +1 -1
- package/dist/sites/store.js +37 -86
- package/dist/sites/store.js.map +1 -1
- package/dist/sites/substituted-registry.d.ts +11 -0
- package/dist/sites/substituted-registry.d.ts.map +1 -0
- package/dist/sites/substituted-registry.js +13 -0
- package/dist/sites/substituted-registry.js.map +1 -0
- package/dist/sites/tools/fetch-public-url.d.ts +4 -0
- package/dist/sites/tools/fetch-public-url.d.ts.map +1 -0
- package/dist/sites/tools/fetch-public-url.js +231 -0
- package/dist/sites/tools/fetch-public-url.js.map +1 -0
- package/dist/sites/tools/index.d.ts +2 -26
- package/dist/sites/tools/index.d.ts.map +1 -1
- package/dist/sites/tools/index.js +5 -28
- package/dist/sites/tools/index.js.map +1 -1
- package/dist/sites/tools/sites-list.d.ts +3 -47
- package/dist/sites/tools/sites-list.d.ts.map +1 -1
- package/dist/sites/tools/sites-list.js +68 -80
- package/dist/sites/tools/sites-list.js.map +1 -1
- package/dist/sites/tools/sites-overview.d.ts +4 -0
- package/dist/sites/tools/sites-overview.d.ts.map +1 -0
- package/dist/sites/tools/sites-overview.js +209 -0
- package/dist/sites/tools/sites-overview.js.map +1 -0
- package/dist/sites/tools/sites-test.d.ts +2 -45
- package/dist/sites/tools/sites-test.d.ts.map +1 -1
- package/dist/sites/tools/sites-test.js +1 -56
- package/dist/sites/tools/sites-test.js.map +1 -1
- package/dist/sites/tools/use-site.d.ts +2 -45
- package/dist/sites/tools/use-site.d.ts.map +1 -1
- package/dist/sites/tools/use-site.js +31 -80
- package/dist/sites/tools/use-site.js.map +1 -1
- package/dist/sites/unknown-name-result.d.ts +10 -0
- package/dist/sites/unknown-name-result.d.ts.map +1 -0
- package/dist/sites/unknown-name-result.js +13 -0
- package/dist/sites/unknown-name-result.js.map +1 -0
- package/dist/skill-instructions.d.ts +7 -0
- package/dist/skill-instructions.d.ts.map +1 -0
- package/dist/skill-instructions.js +84 -0
- package/dist/skill-instructions.js.map +1 -0
- package/dist/skill-loader.d.ts +0 -102
- package/dist/skill-loader.d.ts.map +1 -1
- package/dist/skill-loader.js +4 -142
- package/dist/skill-loader.js.map +1 -1
- package/dist/skill-manifest.d.ts +0 -20
- package/dist/skill-manifest.d.ts.map +1 -1
- package/dist/skill-manifest.js +1 -21
- package/dist/skill-manifest.js.map +1 -1
- package/dist/skill-topics.d.ts +19 -0
- package/dist/skill-topics.d.ts.map +1 -0
- package/dist/skill-topics.js +181 -0
- package/dist/skill-topics.js.map +1 -0
- package/dist/tools/active-site.d.ts +16 -0
- package/dist/tools/active-site.d.ts.map +1 -0
- package/dist/tools/active-site.js +55 -0
- package/dist/tools/active-site.js.map +1 -0
- package/dist/tools/bind-guidance.d.ts +2 -72
- package/dist/tools/bind-guidance.d.ts.map +1 -1
- package/dist/tools/bind-guidance.js +2 -72
- package/dist/tools/bind-guidance.js.map +1 -1
- package/dist/tools/budgeted-table.d.ts +16 -0
- package/dist/tools/budgeted-table.d.ts.map +1 -0
- package/dist/tools/budgeted-table.js +203 -0
- package/dist/tools/budgeted-table.js.map +1 -0
- package/dist/tools/elements/bind-output-schema.d.ts +69 -0
- package/dist/tools/elements/bind-output-schema.d.ts.map +1 -0
- package/dist/tools/elements/bind-output-schema.js +64 -0
- package/dist/tools/elements/bind-output-schema.js.map +1 -0
- package/dist/tools/elements/builders.d.ts +1 -22
- package/dist/tools/elements/builders.d.ts.map +1 -1
- package/dist/tools/elements/builders.js +171 -133
- package/dist/tools/elements/builders.js.map +1 -1
- package/dist/tools/elements/index.d.ts +0 -26
- package/dist/tools/elements/index.d.ts.map +1 -1
- package/dist/tools/elements/index.js +0 -25
- package/dist/tools/elements/index.js.map +1 -1
- package/dist/tools/elements/read-output-schemas.d.ts +121 -0
- package/dist/tools/elements/read-output-schemas.d.ts.map +1 -0
- package/dist/tools/elements/read-output-schemas.js +225 -0
- package/dist/tools/elements/read-output-schemas.js.map +1 -0
- package/dist/tools/elements/write-output-schemas.d.ts +185 -0
- package/dist/tools/elements/write-output-schemas.d.ts.map +1 -0
- package/dist/tools/elements/write-output-schemas.js +98 -0
- package/dist/tools/elements/write-output-schemas.js.map +1 -0
- package/dist/tools/elements.d.ts +0 -11
- package/dist/tools/elements.d.ts.map +1 -1
- package/dist/tools/elements.js +0 -11
- package/dist/tools/elements.js.map +1 -1
- package/dist/tools/format/health-format.d.ts +42 -43
- package/dist/tools/format/health-format.d.ts.map +1 -1
- package/dist/tools/format/health-format.js +32 -55
- package/dist/tools/format/health-format.js.map +1 -1
- package/dist/tools/format/inspection-format.d.ts +4 -49
- package/dist/tools/format/inspection-format.d.ts.map +1 -1
- package/dist/tools/format/inspection-format.js +46 -114
- package/dist/tools/format/inspection-format.js.map +1 -1
- package/dist/tools/format/pages-format.d.ts +32 -69
- package/dist/tools/format/pages-format.d.ts.map +1 -1
- package/dist/tools/format/pages-format.js +115 -133
- package/dist/tools/format/pages-format.js.map +1 -1
- package/dist/tools/format/sources-format.d.ts +5 -39
- package/dist/tools/format/sources-format.d.ts.map +1 -1
- package/dist/tools/format/sources-format.js +57 -87
- package/dist/tools/format/sources-format.js.map +1 -1
- package/dist/tools/health-output-schemas.d.ts +82 -0
- package/dist/tools/health-output-schemas.d.ts.map +1 -0
- package/dist/tools/health-output-schemas.js +130 -0
- package/dist/tools/health-output-schemas.js.map +1 -0
- package/dist/tools/health.d.ts +2 -20
- package/dist/tools/health.d.ts.map +1 -1
- package/dist/tools/health.js +59 -184
- package/dist/tools/health.js.map +1 -1
- package/dist/tools/index.d.ts +1 -26
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +13 -33
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/inspection.d.ts +21 -17
- package/dist/tools/inspection.d.ts.map +1 -1
- package/dist/tools/inspection.js +431 -268
- package/dist/tools/inspection.js.map +1 -1
- package/dist/tools/library.d.ts +118 -126
- package/dist/tools/library.d.ts.map +1 -1
- package/dist/tools/library.js +723 -456
- package/dist/tools/library.js.map +1 -1
- package/dist/tools/local-content/builders.d.ts +1 -17
- package/dist/tools/local-content/builders.d.ts.map +1 -1
- package/dist/tools/local-content/builders.js +105 -48
- package/dist/tools/local-content/builders.js.map +1 -1
- package/dist/tools/local-content/index.d.ts +0 -15
- package/dist/tools/local-content/index.d.ts.map +1 -1
- package/dist/tools/local-content/index.js +0 -14
- package/dist/tools/local-content/index.js.map +1 -1
- package/dist/tools/local-content/schemas.d.ts +31 -47
- package/dist/tools/local-content/schemas.d.ts.map +1 -1
- package/dist/tools/local-content/schemas.js +33 -62
- package/dist/tools/local-content/schemas.js.map +1 -1
- package/dist/tools/modules/builders.d.ts +4 -0
- package/dist/tools/modules/builders.d.ts.map +1 -0
- package/dist/tools/modules/builders.js +58 -0
- package/dist/tools/modules/builders.js.map +1 -0
- package/dist/tools/modules/index.d.ts +2 -0
- package/dist/tools/modules/index.d.ts.map +1 -0
- package/dist/tools/modules/index.js +2 -0
- package/dist/tools/modules/index.js.map +1 -0
- package/dist/tools/modules/module-id-schema.d.ts +4 -0
- package/dist/tools/modules/module-id-schema.d.ts.map +1 -0
- package/dist/tools/modules/module-id-schema.js +14 -0
- package/dist/tools/modules/module-id-schema.js.map +1 -0
- package/dist/tools/modules/module-type-fields.d.ts +10 -0
- package/dist/tools/modules/module-type-fields.d.ts.map +1 -0
- package/dist/tools/modules/module-type-fields.js +34 -0
- package/dist/tools/modules/module-type-fields.js.map +1 -0
- package/dist/tools/modules/modules-create.d.ts +59 -0
- package/dist/tools/modules/modules-create.d.ts.map +1 -0
- package/dist/tools/modules/modules-create.js +154 -0
- package/dist/tools/modules/modules-create.js.map +1 -0
- package/dist/tools/modules/modules-delete.d.ts +51 -0
- package/dist/tools/modules/modules-delete.d.ts.map +1 -0
- package/dist/tools/modules/modules-delete.js +180 -0
- package/dist/tools/modules/modules-delete.js.map +1 -0
- package/dist/tools/modules/modules-update.d.ts +43 -0
- package/dist/tools/modules/modules-update.d.ts.map +1 -0
- package/dist/tools/modules/modules-update.js +177 -0
- package/dist/tools/modules/modules-update.js.map +1 -0
- package/dist/tools/modules/placement-hints.d.ts +5 -0
- package/dist/tools/modules/placement-hints.d.ts.map +1 -0
- package/dist/tools/modules/placement-hints.js +90 -0
- package/dist/tools/modules/placement-hints.js.map +1 -0
- package/dist/tools/modules/placement-ways.d.ts +13 -0
- package/dist/tools/modules/placement-ways.d.ts.map +1 -0
- package/dist/tools/modules/placement-ways.js +61 -0
- package/dist/tools/modules/placement-ways.js.map +1 -0
- package/dist/tools/multi-items/builders.d.ts +1 -21
- package/dist/tools/multi-items/builders.d.ts.map +1 -1
- package/dist/tools/multi-items/builders.js +22 -67
- package/dist/tools/multi-items/builders.js.map +1 -1
- package/dist/tools/multi-items/index.d.ts +0 -15
- package/dist/tools/multi-items/index.d.ts.map +1 -1
- package/dist/tools/multi-items/index.js +0 -15
- package/dist/tools/multi-items/index.js.map +1 -1
- package/dist/tools/multi-items/item-container-map.d.ts +0 -35
- package/dist/tools/multi-items/item-container-map.d.ts.map +1 -1
- package/dist/tools/multi-items/item-container-map.js +0 -35
- package/dist/tools/multi-items/item-container-map.js.map +1 -1
- package/dist/tools/multi-items/output-schemas.d.ts +101 -0
- package/dist/tools/multi-items/output-schemas.d.ts.map +1 -0
- package/dist/tools/multi-items/output-schemas.js +74 -0
- package/dist/tools/multi-items/output-schemas.js.map +1 -0
- package/dist/tools/navigation/builders.d.ts +3 -0
- package/dist/tools/navigation/builders.d.ts.map +1 -0
- package/dist/tools/navigation/builders.js +25 -0
- package/dist/tools/navigation/builders.js.map +1 -0
- package/dist/tools/navigation/index.d.ts +2 -0
- package/dist/tools/navigation/index.d.ts.map +1 -0
- package/dist/tools/navigation/index.js +2 -0
- package/dist/tools/navigation/index.js.map +1 -0
- package/dist/tools/navigation/schemas.d.ts +16 -0
- package/dist/tools/navigation/schemas.d.ts.map +1 -0
- package/dist/tools/navigation/schemas.js +11 -0
- package/dist/tools/navigation/schemas.js.map +1 -0
- package/dist/tools/output-schema-metadata.d.ts +5 -0
- package/dist/tools/output-schema-metadata.d.ts.map +1 -0
- package/dist/tools/output-schema-metadata.js +83 -0
- package/dist/tools/output-schema-metadata.js.map +1 -0
- package/dist/tools/pages/builders.d.ts +1 -41
- package/dist/tools/pages/builders.d.ts.map +1 -1
- package/dist/tools/pages/builders.js +373 -359
- package/dist/tools/pages/builders.js.map +1 -1
- package/dist/tools/pages/header-transparency.d.ts +34 -0
- package/dist/tools/pages/header-transparency.d.ts.map +1 -0
- package/dist/tools/pages/header-transparency.js +85 -0
- package/dist/tools/pages/header-transparency.js.map +1 -0
- package/dist/tools/pages/index.d.ts +1 -19
- package/dist/tools/pages/index.d.ts.map +1 -1
- package/dist/tools/pages/index.js +1 -19
- package/dist/tools/pages/index.js.map +1 -1
- package/dist/tools/pages/schemas.d.ts +392 -224
- package/dist/tools/pages/schemas.d.ts.map +1 -1
- package/dist/tools/pages/schemas.js +605 -458
- package/dist/tools/pages/schemas.js.map +1 -1
- package/dist/tools/pages/write-output-schemas.d.ts +139 -0
- package/dist/tools/pages/write-output-schemas.d.ts.map +1 -0
- package/dist/tools/pages/write-output-schemas.js +138 -0
- package/dist/tools/pages/write-output-schemas.js.map +1 -0
- package/dist/tools/pages.d.ts +0 -11
- package/dist/tools/pages.d.ts.map +1 -1
- package/dist/tools/pages.js +0 -11
- package/dist/tools/pages.js.map +1 -1
- package/dist/tools/pool-resolve-helper.d.ts +0 -52
- package/dist/tools/pool-resolve-helper.d.ts.map +1 -1
- package/dist/tools/pool-resolve-helper.js +29 -104
- package/dist/tools/pool-resolve-helper.js.map +1 -1
- package/dist/tools/progress-phases.d.ts +0 -42
- package/dist/tools/progress-phases.d.ts.map +1 -1
- package/dist/tools/progress-phases.js +0 -44
- package/dist/tools/progress-phases.js.map +1 -1
- package/dist/tools/response-budget.d.ts +8 -0
- package/dist/tools/response-budget.d.ts.map +1 -0
- package/dist/tools/response-budget.js +7 -0
- package/dist/tools/response-budget.js.map +1 -0
- package/dist/tools/shared-schemas.d.ts +12 -43
- package/dist/tools/shared-schemas.d.ts.map +1 -1
- package/dist/tools/shared-schemas.js +42 -97
- package/dist/tools/shared-schemas.js.map +1 -1
- package/dist/tools/skill/builders.d.ts +3 -0
- package/dist/tools/skill/builders.d.ts.map +1 -0
- package/dist/tools/skill/builders.js +81 -0
- package/dist/tools/skill/builders.js.map +1 -0
- package/dist/tools/sources/builders.d.ts +1 -11
- package/dist/tools/sources/builders.d.ts.map +1 -1
- package/dist/tools/sources/builders.js +195 -173
- package/dist/tools/sources/builders.js.map +1 -1
- package/dist/tools/sources/index.d.ts +0 -17
- package/dist/tools/sources/index.d.ts.map +1 -1
- package/dist/tools/sources/index.js +0 -16
- package/dist/tools/sources/index.js.map +1 -1
- package/dist/tools/sources/read-output-schemas.d.ts +101 -0
- package/dist/tools/sources/read-output-schemas.d.ts.map +1 -0
- package/dist/tools/sources/read-output-schemas.js +105 -0
- package/dist/tools/sources/read-output-schemas.js.map +1 -0
- package/dist/tools/sources/source-name-argument.d.ts +17 -0
- package/dist/tools/sources/source-name-argument.d.ts.map +1 -0
- package/dist/tools/sources/source-name-argument.js +64 -0
- package/dist/tools/sources/source-name-argument.js.map +1 -0
- package/dist/tools/sources/write-output-schemas.d.ts +100 -0
- package/dist/tools/sources/write-output-schemas.d.ts.map +1 -0
- package/dist/tools/sources/write-output-schemas.js +61 -0
- package/dist/tools/sources/write-output-schemas.js.map +1 -0
- package/dist/tools/sources.d.ts +0 -12
- package/dist/tools/sources.d.ts.map +1 -1
- package/dist/tools/sources.js +0 -12
- package/dist/tools/sources.js.map +1 -1
- package/dist/tools/sparse-fields.d.ts +19 -194
- package/dist/tools/sparse-fields.d.ts.map +1 -1
- package/dist/tools/sparse-fields.js +212 -196
- package/dist/tools/sparse-fields.js.map +1 -1
- package/dist/tools/strict-input.d.ts +5 -0
- package/dist/tools/strict-input.d.ts.map +1 -0
- package/dist/tools/strict-input.js +55 -0
- package/dist/tools/strict-input.js.map +1 -0
- package/dist/tools/sublayout/builders.d.ts +1 -21
- package/dist/tools/sublayout/builders.d.ts.map +1 -1
- package/dist/tools/sublayout/builders.js +10 -40
- package/dist/tools/sublayout/builders.js.map +1 -1
- package/dist/tools/sublayout/index.d.ts +1 -11
- package/dist/tools/sublayout/index.d.ts.map +1 -1
- package/dist/tools/sublayout/index.js +1 -11
- package/dist/tools/sublayout/index.js.map +1 -1
- package/dist/tools/sublayout/output-schemas.d.ts +57 -0
- package/dist/tools/sublayout/output-schemas.d.ts.map +1 -0
- package/dist/tools/sublayout/output-schemas.js +51 -0
- package/dist/tools/sublayout/output-schemas.js.map +1 -0
- package/dist/tools/tool-builder/annotations.d.ts +1 -49
- package/dist/tools/tool-builder/annotations.d.ts.map +1 -1
- package/dist/tools/tool-builder/annotations.js +9 -49
- package/dist/tools/tool-builder/annotations.js.map +1 -1
- package/dist/tools/tool-builder/confirm-preview.d.ts +24 -0
- package/dist/tools/tool-builder/confirm-preview.d.ts.map +1 -0
- package/dist/tools/tool-builder/confirm-preview.js +37 -0
- package/dist/tools/tool-builder/confirm-preview.js.map +1 -0
- package/dist/tools/tool-builder/define.d.ts +6 -26
- package/dist/tools/tool-builder/define.d.ts.map +1 -1
- package/dist/tools/tool-builder/define.js +0 -25
- package/dist/tools/tool-builder/define.js.map +1 -1
- package/dist/tools/tool-builder/index.d.ts +3 -26
- package/dist/tools/tool-builder/index.d.ts.map +1 -1
- package/dist/tools/tool-builder/index.js +2 -25
- package/dist/tools/tool-builder/index.js.map +1 -1
- package/dist/tools/tool-builder/results.d.ts +4 -111
- package/dist/tools/tool-builder/results.d.ts.map +1 -1
- package/dist/tools/tool-builder/results.js +258 -250
- package/dist/tools/tool-builder/results.js.map +1 -1
- package/dist/tools/tool-builder/types.d.ts +5 -59
- package/dist/tools/tool-builder/types.d.ts.map +1 -1
- package/dist/tools/tool-builder/types.js +0 -7
- package/dist/tools/tool-builder/types.js.map +1 -1
- package/dist/tools/tool-builder.d.ts +0 -14
- package/dist/tools/tool-builder.d.ts.map +1 -1
- package/dist/tools/tool-builder.js +0 -14
- package/dist/tools/tool-builder.js.map +1 -1
- package/dist/uninstall-skill.d.ts +0 -41
- package/dist/uninstall-skill.d.ts.map +1 -1
- package/dist/uninstall-skill.js +0 -49
- package/dist/uninstall-skill.js.map +1 -1
- package/dist/uninstall.d.ts +0 -41
- package/dist/uninstall.d.ts.map +1 -1
- package/dist/uninstall.js +1 -29
- package/dist/uninstall.js.map +1 -1
- package/dist/update/update-check.d.ts +0 -26
- package/dist/update/update-check.d.ts.map +1 -1
- package/dist/update/update-check.js +0 -25
- package/dist/update/update-check.js.map +1 -1
- package/manifest.json +4 -5
- package/package.json +5 -5
- package/skills/yt-builder-mcp/SKILL.md +2958 -382
- package/dist/tools/elements/handlers-write.d.ts +0 -70
- package/dist/tools/elements/handlers-write.d.ts.map +0 -1
- package/dist/tools/elements/handlers-write.js +0 -700
- package/dist/tools/elements/handlers-write.js.map +0 -1
- package/dist/tools/elements/handlers.d.ts +0 -125
- package/dist/tools/elements/handlers.d.ts.map +0 -1
- package/dist/tools/elements/handlers.js +0 -571
- package/dist/tools/elements/handlers.js.map +0 -1
- package/dist/tools/elements/layout-hierarchy-rules.d.ts +0 -62
- package/dist/tools/elements/layout-hierarchy-rules.d.ts.map +0 -1
- package/dist/tools/elements/layout-hierarchy-rules.js +0 -154
- package/dist/tools/elements/layout-hierarchy-rules.js.map +0 -1
- package/dist/tools/elements/schema-validation.d.ts +0 -96
- package/dist/tools/elements/schema-validation.d.ts.map +0 -1
- package/dist/tools/elements/schema-validation.js +0 -249
- package/dist/tools/elements/schema-validation.js.map +0 -1
- package/dist/tools/elicitation.d.ts +0 -87
- package/dist/tools/elicitation.d.ts.map +0 -1
- package/dist/tools/elicitation.js +0 -100
- package/dist/tools/elicitation.js.map +0 -1
- package/dist/tools/format/elements-format.d.ts +0 -75
- package/dist/tools/format/elements-format.d.ts.map +0 -1
- package/dist/tools/format/elements-format.js +0 -324
- package/dist/tools/format/elements-format.js.map +0 -1
- package/dist/tools/format/source-schema-format.d.ts +0 -74
- package/dist/tools/format/source-schema-format.d.ts.map +0 -1
- package/dist/tools/format/source-schema-format.js +0 -208
- package/dist/tools/format/source-schema-format.js.map +0 -1
- package/dist/tools/layout-flatten.d.ts +0 -84
- package/dist/tools/layout-flatten.d.ts.map +0 -1
- package/dist/tools/layout-flatten.js +0 -129
- package/dist/tools/layout-flatten.js.map +0 -1
- package/dist/tools/local-content/handlers.d.ts +0 -54
- package/dist/tools/local-content/handlers.d.ts.map +0 -1
- package/dist/tools/local-content/handlers.js +0 -316
- package/dist/tools/local-content/handlers.js.map +0 -1
- package/dist/tools/multi-items/clean-implode-handler.d.ts +0 -37
- package/dist/tools/multi-items/clean-implode-handler.d.ts.map +0 -1
- package/dist/tools/multi-items/clean-implode-handler.js +0 -65
- package/dist/tools/multi-items/clean-implode-handler.js.map +0 -1
- package/dist/tools/multi-items/format/inspection-format.d.ts +0 -41
- package/dist/tools/multi-items/format/inspection-format.d.ts.map +0 -1
- package/dist/tools/multi-items/format/inspection-format.js +0 -64
- package/dist/tools/multi-items/format/inspection-format.js.map +0 -1
- package/dist/tools/multi-items/inspect-handler.d.ts +0 -97
- package/dist/tools/multi-items/inspect-handler.d.ts.map +0 -1
- package/dist/tools/multi-items/inspect-handler.js +0 -323
- package/dist/tools/multi-items/inspect-handler.js.map +0 -1
- package/dist/tools/multi-items/inspection-cache.d.ts +0 -85
- package/dist/tools/multi-items/inspection-cache.d.ts.map +0 -1
- package/dist/tools/multi-items/inspection-cache.js +0 -126
- package/dist/tools/multi-items/inspection-cache.js.map +0 -1
- package/dist/tools/pages/handlers-audit.d.ts +0 -129
- package/dist/tools/pages/handlers-audit.d.ts.map +0 -1
- package/dist/tools/pages/handlers-audit.js +0 -704
- package/dist/tools/pages/handlers-audit.js.map +0 -1
- package/dist/tools/pages/handlers-read.d.ts +0 -95
- package/dist/tools/pages/handlers-read.d.ts.map +0 -1
- package/dist/tools/pages/handlers-read.js +0 -929
- package/dist/tools/pages/handlers-read.js.map +0 -1
- package/dist/tools/pages/handlers-write.d.ts +0 -212
- package/dist/tools/pages/handlers-write.d.ts.map +0 -1
- package/dist/tools/pages/handlers-write.js +0 -418
- package/dist/tools/pages/handlers-write.js.map +0 -1
- package/dist/tools/pages/target.d.ts +0 -162
- package/dist/tools/pages/target.d.ts.map +0 -1
- package/dist/tools/pages/target.js +0 -239
- package/dist/tools/pages/target.js.map +0 -1
- package/dist/tools/sources/handlers-bind.d.ts +0 -148
- package/dist/tools/sources/handlers-bind.d.ts.map +0 -1
- package/dist/tools/sources/handlers-bind.js +0 -655
- package/dist/tools/sources/handlers-bind.js.map +0 -1
- package/dist/tools/sources/handlers.d.ts +0 -114
- package/dist/tools/sources/handlers.d.ts.map +0 -1
- package/dist/tools/sources/handlers.js +0 -285
- package/dist/tools/sources/handlers.js.map +0 -1
- package/dist/tools/sublayout/inspect-sublayout-handler.d.ts +0 -95
- package/dist/tools/sublayout/inspect-sublayout-handler.d.ts.map +0 -1
- package/dist/tools/sublayout/inspect-sublayout-handler.js +0 -181
- package/dist/tools/sublayout/inspect-sublayout-handler.js.map +0 -1
|
@@ -1,145 +1,164 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Page-tool output-schemas (Wave G.2 §4 structuredContent contracts).
|
|
3
|
-
*
|
|
4
|
-
* Split out of `src/tools/pages.ts` (Round-2 R2-A2-CRIT1) so the
|
|
5
|
-
* handler files stay focused on logic.
|
|
6
|
-
*
|
|
7
|
-
* @license MIT
|
|
8
|
-
*/
|
|
9
1
|
import { z } from 'zod';
|
|
10
|
-
import {
|
|
2
|
+
import { PAGE_KIND_WORDS, VISIBILITY_WORDS } from '../format/pages-format.js';
|
|
3
|
+
import { RESOLVED_LAYOUT_ID_OUTPUT, ETAG_PREVIEW_OPTIONAL, INCLUDE_META_SCHEMA } from '../shared-schemas.js';
|
|
4
|
+
import { FIELD_COVERAGE_SCHEMA, MAX_CHARS } from '../sparse-fields.js';
|
|
5
|
+
import { HOST_PROMPT_PROMISE } from '../tool-builder/confirm-preview.js';
|
|
6
|
+
import { HOST_PROMPT_ANSWERS } from '../../proxy/confirm-question-contract.js';
|
|
7
|
+
import { CMS_VISIBILITY_SCHEMA } from './write-output-schemas.js';
|
|
8
|
+
const PAGE_ROW_SCHEMA = z
|
|
9
|
+
.object({
|
|
10
|
+
id: z.string().optional(),
|
|
11
|
+
label: z.string().optional(),
|
|
12
|
+
type: z.string().optional(),
|
|
13
|
+
elements_count: z.number().optional(),
|
|
14
|
+
modified_at: z.string().nullable().optional(),
|
|
15
|
+
frontend_url: z.string().nullable().optional(),
|
|
16
|
+
frontend_url_template: z.string().nullable().optional(),
|
|
17
|
+
frontend_url_description: z.string().nullable().optional(),
|
|
18
|
+
builder_url: z.string().nullable().optional(),
|
|
19
|
+
serves_context_kind: z.string().optional(),
|
|
20
|
+
serves_context_ids: z.array(z.number()).optional(),
|
|
21
|
+
page_role: z.string().optional(),
|
|
22
|
+
is_theme_template: z.boolean().optional(),
|
|
23
|
+
is_public_homepage: z.boolean().optional(),
|
|
24
|
+
kind: z.enum(PAGE_KIND_WORDS).optional(),
|
|
25
|
+
cms_status: z.string().optional(),
|
|
26
|
+
visibility: z.enum(VISIBILITY_WORDS).optional(),
|
|
27
|
+
visibility_reason: z.string().optional(),
|
|
28
|
+
visibility_note: z.string().optional(),
|
|
29
|
+
frontend_url_provisional: z.boolean().optional(),
|
|
30
|
+
frontend_url_note: z.string().optional(),
|
|
31
|
+
})
|
|
32
|
+
.catchall(z.unknown());
|
|
11
33
|
export const PAGES_LIST_OUTPUT_SCHEMA = z.object({
|
|
12
|
-
|
|
13
|
-
// `frontend_url_template`, `frontend_url_description` so an MCP-agent
|
|
14
|
-
// can answer "What is the URL of my <type> template?" without a
|
|
15
|
-
// follow-up REST call or operator input. Server-side resolvers
|
|
16
|
-
// (WordPress: get_permalink/get_term_link/get_author_posts_url; Joomla:
|
|
17
|
-
// RouteHelper::getArticleRoute/getCategoryRoute/getTagRoute) emit one
|
|
18
|
-
// of two shapes per row:
|
|
19
|
-
// - `frontend_url: <permalink>` + `frontend_url_template: null`
|
|
20
|
-
// when a canonical public URL exists (latest post / first category
|
|
21
|
-
// / first author etc.).
|
|
22
|
-
// - `frontend_url: null` + `frontend_url_template: <pattern>` when
|
|
23
|
-
// the URL needs a runtime parameter (search, 404-test) or when no
|
|
24
|
-
// public content of the matching type exists yet.
|
|
25
|
-
// `frontend_url_description` is a short human hint ("Append any non-
|
|
26
|
-
// existent path to test." / "Latest published post — rendered with
|
|
27
|
-
// this template.") so the agent can render an instruction to the
|
|
28
|
-
// end-user. All three keys are kept on the row-record (not an extra
|
|
29
|
-
// schema object) so per-item sparse-field projection works.
|
|
30
|
-
//
|
|
31
|
-
// F33 (2026-06-10): each row also carries `builder_url` — a version-
|
|
32
|
-
// aware (WP YT4/YT5) + platform-aware (Joomla com_ajax) "open in the
|
|
33
|
-
// YOOtheme Pro builder" deep-link (or null when the host could not
|
|
34
|
-
// resolve the admin base). Kept on the row-record so per-item sparse-
|
|
35
|
-
// field projection + available_fields discovery surface it.
|
|
36
|
-
items: z.array(z.record(z.string(), z.unknown())),
|
|
34
|
+
items: z.array(PAGE_ROW_SCHEMA),
|
|
37
35
|
total: z.number(),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
totals: z
|
|
37
|
+
.object({
|
|
38
|
+
content: z.number(),
|
|
39
|
+
theme_template: z.number(),
|
|
40
|
+
all: z.number(),
|
|
41
|
+
visibility: z
|
|
42
|
+
.object({
|
|
43
|
+
public: z.number().optional(),
|
|
44
|
+
hidden: z.number().optional(),
|
|
45
|
+
undetermined: z.number().optional(),
|
|
46
|
+
no_cms_status: z.number().optional(),
|
|
47
|
+
})
|
|
48
|
+
.optional(),
|
|
49
|
+
})
|
|
50
|
+
.optional(),
|
|
51
|
+
counting_note: z.string().optional(),
|
|
52
|
+
trashed_note: z.string().optional(),
|
|
53
|
+
hidden_count: z.number().optional(),
|
|
54
|
+
hidden_reason: z.string().optional(),
|
|
41
55
|
returned: z.number().optional(),
|
|
42
56
|
next_cursor: z.string().optional(),
|
|
43
57
|
etag: z.string().optional(),
|
|
44
58
|
projected_fields: z.array(z.string()).optional(),
|
|
45
|
-
// F-004 fix (2026-05-25 exhaustive audit): projection-feedback —
|
|
46
|
-
// emitted ONLY when the caller passed `fields[]`. `available_fields`
|
|
47
|
-
// is the discovered top-level field vocabulary; `unknown_fields` is
|
|
48
|
-
// the subset of requested fields that did NOT appear in any item
|
|
49
|
-
// (previously: items came back as `[{}, {}, …]` silently).
|
|
50
59
|
available_fields: z.array(z.string()).optional(),
|
|
60
|
+
available_fields_by_kind: z.record(z.string(), z.array(z.string())).optional(),
|
|
51
61
|
unknown_fields: z.array(z.string()).optional(),
|
|
52
|
-
|
|
53
|
-
// structuredContent — hosts that surface structuredContent (not the
|
|
54
|
-
// text leg) to the model would otherwise never see it.
|
|
62
|
+
field_coverage: FIELD_COVERAGE_SCHEMA,
|
|
55
63
|
projection_warning: z.string().optional(),
|
|
64
|
+
sorted_over: z
|
|
65
|
+
.string()
|
|
66
|
+
.optional()
|
|
67
|
+
.describe('Scope the `sort` actually covered: `all` (the whole filtered set) or ' +
|
|
68
|
+
'`this_page` (only the rows returned here). Present only when `sort` was passed.'),
|
|
69
|
+
sort_note: z
|
|
70
|
+
.string()
|
|
71
|
+
.optional()
|
|
72
|
+
.describe('Present only when `sorted_over` is `this_page`: says that the newest row here ' +
|
|
73
|
+
'is not necessarily the newest on the site.'),
|
|
74
|
+
visibility_note: z
|
|
75
|
+
.string()
|
|
76
|
+
.optional()
|
|
77
|
+
.describe('Present only when some row carries `visibility:"undetermined"`: explains that the ' +
|
|
78
|
+
'word means "the CMS status does not hide it", which is not proof a visitor ' +
|
|
79
|
+
'FINDS it. On Joomla an unrouted page is still served on its own direct URL.'),
|
|
80
|
+
visibility_filter_note: z.string().optional(),
|
|
81
|
+
default_row_note: z.string().optional(),
|
|
82
|
+
text_leg_note: z.string().optional(),
|
|
83
|
+
fields_hint: z
|
|
84
|
+
.string()
|
|
85
|
+
.optional()
|
|
86
|
+
.describe('Present only on a large, unfiltered answer: suggests narrowing with `fields` (see ' +
|
|
87
|
+
'`available_fields`) or paging with `limit`/`cursor`.'),
|
|
56
88
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
label: z.string().optional(),
|
|
74
|
-
has_binding: z.boolean().optional(),
|
|
75
|
-
})
|
|
76
|
-
.passthrough()),
|
|
77
|
-
total: z.number(),
|
|
78
|
-
template_id: z.string(),
|
|
79
|
-
// G-B: `fields[]` projection echo + the F23 unknown-field feedback,
|
|
80
|
-
// emitted ONLY when the caller passed `fields[]`.
|
|
81
|
-
projected_fields: z.array(z.string()).optional(),
|
|
89
|
+
const PAGE_GET_LAYOUT_ENVELOPE = z
|
|
90
|
+
.object({
|
|
91
|
+
...RESOLVED_LAYOUT_ID_OUTPUT,
|
|
92
|
+
layout_id: z.string().optional(),
|
|
93
|
+
etag: z.string().optional(),
|
|
94
|
+
layout_root_pointer: z.string().optional(),
|
|
95
|
+
pointer_hint: z.string().optional(),
|
|
96
|
+
layout: z.unknown().optional(),
|
|
97
|
+
elements: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
98
|
+
named_sections: z.unknown().optional(),
|
|
99
|
+
outline_text: z.string().optional(),
|
|
100
|
+
mode: z.string().optional(),
|
|
101
|
+
unchanged: z.boolean().optional(),
|
|
102
|
+
note: z.string().optional(),
|
|
103
|
+
total_elements: z.number().optional(),
|
|
104
|
+
warning: z.string().optional(),
|
|
82
105
|
available_fields: z.array(z.string()).optional(),
|
|
106
|
+
available_fields_by_kind: z.record(z.string(), z.array(z.string())).optional(),
|
|
83
107
|
unknown_fields: z.array(z.string()).optional(),
|
|
108
|
+
field_coverage: FIELD_COVERAGE_SCHEMA,
|
|
84
109
|
projection_warning: z.string().optional(),
|
|
110
|
+
projected_fields: z.array(z.string()).optional(),
|
|
111
|
+
label_note: z.string().optional(),
|
|
112
|
+
modules_on_page: z.unknown().optional(),
|
|
113
|
+
modules_on_page_unavailable: z.unknown().optional(),
|
|
114
|
+
fields_not_applied: z.unknown().optional(),
|
|
115
|
+
})
|
|
116
|
+
.catchall(z.unknown());
|
|
117
|
+
export const PAGE_GET_LAYOUT_OUTPUT_SCHEMA = PAGE_GET_LAYOUT_ENVELOPE.refine((value) => Object.keys(PAGE_GET_LAYOUT_ENVELOPE.shape).some((key) => value[key] !== undefined), {
|
|
118
|
+
message: 'a page_get_layout answer carries at least one declared envelope key — every measured '
|
|
119
|
+
+ 'branch does (layout_id / elements / unchanged / mode). An answer made only of '
|
|
120
|
+
+ 'catchall keys means the envelope was lost.',
|
|
85
121
|
});
|
|
86
122
|
export const ETAG_OUTPUT_SCHEMA = z.object({
|
|
87
123
|
etag: z.string(),
|
|
88
124
|
generated_at: z.string().optional(),
|
|
89
125
|
});
|
|
90
|
-
// F-AUDIT-2 (2026-05-26): template_summary outputSchema. The handler
|
|
91
|
-
// passes the REST `/pages/{id}/summary` body through verbatim via
|
|
92
|
-
// `jsonResult(data)`. Live shape verified against the WP+Joomla dev
|
|
93
|
-
// hosts: `template_id`, `counts_by_type` (open-ended map element-type
|
|
94
|
-
// → count), `bound_count`, `max_depth`, `total`, `named_sections` (each
|
|
95
|
-
// `{path, name}`), and the `etag` string. NOTE: `_meta` is merged at
|
|
96
|
-
// the RESULT-LEVEL by `withSiteMeta`, NEVER into `structuredContent`
|
|
97
|
-
// (see results.ts W12-R2 commentary) — this schema therefore validates
|
|
98
|
-
// only the inner template-summary shape.
|
|
99
126
|
export const TEMPLATE_SUMMARY_OUTPUT_SCHEMA = z.object({
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
127
|
+
...RESOLVED_LAYOUT_ID_OUTPUT,
|
|
128
|
+
layout_id: z.string().optional(),
|
|
129
|
+
counts_by_type: z.record(z.string(), z.number().int().nonnegative()).optional(),
|
|
130
|
+
bound_count: z.number().int().nonnegative().optional(),
|
|
131
|
+
max_depth: z.number().int().nonnegative().optional(),
|
|
132
|
+
total: z.number().int().nonnegative().optional(),
|
|
133
|
+
named_sections: z
|
|
134
|
+
.array(z.object({
|
|
106
135
|
path: z.string(),
|
|
107
136
|
name: z.string(),
|
|
108
|
-
}))
|
|
109
|
-
|
|
110
|
-
// heading-level census (h1-h6 + div — `div` counts `description_list`
|
|
111
|
-
// elements, the one type whose title_element defaults to div),
|
|
112
|
-
// unbound-image-alt-gap count, and disabled-element count. Reuses the
|
|
113
|
-
// SAME `LayoutAuditExtractor` pass `pages_audit` runs. `.optional()` so
|
|
114
|
-
// a NEW MCP client talking to an OLD (pre-1.10.0) host plugin — which
|
|
115
|
-
// doesn't emit these fields yet — still validates.
|
|
137
|
+
}))
|
|
138
|
+
.optional(),
|
|
116
139
|
heading_levels: z.record(z.string(), z.number().int().nonnegative()).optional(),
|
|
140
|
+
heading_levels_note: z.string().optional(),
|
|
117
141
|
images_missing_alt: z.number().int().nonnegative().optional(),
|
|
118
142
|
disabled_elements: z.number().int().nonnegative().optional(),
|
|
119
|
-
|
|
143
|
+
already_dynamized: z.boolean().optional(),
|
|
144
|
+
is_theme_template: z.boolean().optional(),
|
|
145
|
+
etag: z.string().optional(),
|
|
146
|
+
content_nodes: z
|
|
147
|
+
.array(z.object({
|
|
148
|
+
path: z.string(),
|
|
149
|
+
type: z.string(),
|
|
150
|
+
status: z.boolean(),
|
|
151
|
+
effective_visible: z.boolean(),
|
|
152
|
+
hidden_on_mobile: z.boolean(),
|
|
153
|
+
headings: z.array(z.string()),
|
|
154
|
+
alts: z.array(z.string()),
|
|
155
|
+
}))
|
|
156
|
+
.optional(),
|
|
157
|
+
next_cursor: z.string().optional(),
|
|
158
|
+
summaries: z.record(z.string(), z.record(z.string(), z.unknown())).optional(),
|
|
159
|
+
not_found: z.array(z.string()).optional(),
|
|
160
|
+
forbidden: z.array(z.string()).optional(),
|
|
120
161
|
});
|
|
121
|
-
// ─── C1 — pages_create + pages_delete (v1.2) ──────────────────────────
|
|
122
|
-
//
|
|
123
|
-
// MCP tool schemas wrapping the Phase B REST endpoints:
|
|
124
|
-
// POST /pages → yootheme_builder_pages_create
|
|
125
|
-
// DELETE /pages/{post_id} → yootheme_builder_pages_delete
|
|
126
|
-
//
|
|
127
|
-
// These schemas drive (a) input validation at the MCP boundary and (b)
|
|
128
|
-
// the structured-content outputSchema for client introspection.
|
|
129
|
-
/**
|
|
130
|
-
* Input shape for `yootheme_builder_pages_create`.
|
|
131
|
-
*
|
|
132
|
-
* Mirrors the args of `POST /pages` (Phase B).
|
|
133
|
-
*
|
|
134
|
-
* Design pins:
|
|
135
|
-
* - `post_type` is intentionally NOT exposed. Layer 9 defensive guard
|
|
136
|
-
* on the REST side rejects it server-side; surfacing it at the MCP
|
|
137
|
-
* boundary would invite a footgun where an agent tries to set it
|
|
138
|
-
* and fails confusingly.
|
|
139
|
-
* - `status` defaults to `draft` on the server (Q6 design — no public
|
|
140
|
-
* empty page).
|
|
141
|
-
* - `dry_run` triggers validation Layers 1+2+4 without persisting.
|
|
142
|
-
*/
|
|
143
162
|
export const PAGES_CREATE_INPUT = {
|
|
144
163
|
title: z
|
|
145
164
|
.string()
|
|
@@ -156,14 +175,6 @@ export const PAGES_CREATE_INPUT = {
|
|
|
156
175
|
'WordPress accepts all five; Joomla maps draft→state 0 / publish→state 1 ' +
|
|
157
176
|
'(the other three are WP-only). For the common make-it-live case prefer ' +
|
|
158
177
|
'the `published` boolean below.'),
|
|
159
|
-
// F12 (2026-06-09): friendly one-boolean publish shortcut. A fresh
|
|
160
|
-
// draft on Joomla returns 404 to anonymous front-end visitors (state
|
|
161
|
-
// 0); there was no ergonomic MCP path to flip it live. `published`
|
|
162
|
-
// maps to the existing `status` field the PHP host already honours
|
|
163
|
-
// (WP post_status=publish, Joomla state=1) — see the handler. Default
|
|
164
|
-
// false keeps the safe "no public empty page" behaviour. When the
|
|
165
|
-
// caller sets an explicit `status`, that wins (published is the
|
|
166
|
-
// shortcut, not an override).
|
|
167
178
|
published: z
|
|
168
179
|
.boolean()
|
|
169
180
|
.default(false)
|
|
@@ -171,20 +182,16 @@ export const PAGES_CREATE_INPUT = {
|
|
|
171
182
|
'Joomla state=1) so anonymous visitors can render it immediately. ' +
|
|
172
183
|
'Default false: created as a draft, visible only in the builder until ' +
|
|
173
184
|
'you publish. Ignored when an explicit `status` is provided.'),
|
|
174
|
-
// F64 (2026-06-10): Joomla-only routing helper. A published Joomla
|
|
175
|
-
// article without a menu item has NO SEF route (anonymous 404). When
|
|
176
|
-
// truthy AND the article is published, the host creates a
|
|
177
|
-
// com_content single-article menu item via the Joomla Menu-Table API
|
|
178
|
-
// under a dedicated HIDDEN menutype (string value picks the
|
|
179
|
-
// menutype; `mainmenu` is rejected server-side so customer
|
|
180
|
-
// navigation is never polluted). Ignored on WordPress.
|
|
181
185
|
menu_item: z
|
|
182
186
|
.union([z.boolean(), z.string().min(1).max(64)])
|
|
183
187
|
.optional()
|
|
184
188
|
.describe('Joomla only: create a SEF route for the new article. true = ' +
|
|
185
189
|
'hidden default menutype; a string picks the menutype ' +
|
|
186
190
|
'("mainmenu" is rejected). Requires published/status=publish. ' +
|
|
187
|
-
'Without a route
|
|
191
|
+
'Without a route the SEF url 404s, but the article still ' +
|
|
192
|
+
'answers 200 on its raw ?option=com_content&view=article&id=N ' +
|
|
193
|
+
'url: a missing menu item costs findability, never privacy. ' +
|
|
194
|
+
'To keep an article non-public set its state or its access level.'),
|
|
188
195
|
layout: z
|
|
189
196
|
.record(z.string(), z.unknown())
|
|
190
197
|
.optional()
|
|
@@ -193,118 +200,58 @@ export const PAGES_CREATE_INPUT = {
|
|
|
193
200
|
.boolean()
|
|
194
201
|
.optional()
|
|
195
202
|
.describe('When true, runs validation Layers 1+2+4 without persisting.'),
|
|
196
|
-
// post_type intentionally NOT exposed — Layer 9 defensive guard rejects
|
|
197
|
-
// it server-side. Exposing it would invite footgun attempts.
|
|
198
203
|
};
|
|
199
|
-
/**
|
|
200
|
-
* Wire shape for `yootheme_builder_pages_create` on success (non-dry-run).
|
|
201
|
-
*
|
|
202
|
-
* Mirrors the REST 201 response shape.
|
|
203
|
-
*
|
|
204
|
-
* Design pins:
|
|
205
|
-
* - `frontend_url` is nullable: REST returns null for fresh drafts
|
|
206
|
-
* before publish.
|
|
207
|
-
* - `template_id` is a plain string. The "page:{post_id}" prefix is
|
|
208
|
-
* enforced server-side; adding a `.startsWith()` here would buy no
|
|
209
|
-
* MCP-client value while adding Zod complexity.
|
|
210
|
-
* - `warnings` is a lean string array (e.g. "slug_collision_resolved"
|
|
211
|
-
* when WP auto-appends `-2`). The REST surface may expand this to
|
|
212
|
-
* richer objects in v1.3; strings keep the v1.2 surface minimal.
|
|
213
|
-
*/
|
|
214
204
|
export const PAGES_CREATE_OUTPUT_SCHEMA = z
|
|
215
205
|
.object({
|
|
216
|
-
// E1 cross-platform divergence: WP returns `page_id`, Joomla returns
|
|
217
|
-
// `article_id`. Both are positive ints; at least one is always present.
|
|
218
206
|
page_id: z.number().int().positive().optional(),
|
|
219
207
|
article_id: z.number().int().positive().optional(),
|
|
220
208
|
title: z.string(),
|
|
221
209
|
slug: z.string(),
|
|
222
210
|
status: z.string(),
|
|
223
211
|
frontend_url: z.string().nullable(),
|
|
224
|
-
// F33 (2026-06-10): "open in the YOOtheme Pro builder" deep-link for
|
|
225
|
-
// the freshly-created page/article. Version-aware (WP YT4/YT5) +
|
|
226
|
-
// platform-aware (Joomla com_ajax). Nullable: null when the host
|
|
227
|
-
// could not resolve the admin base. `.optional()` keeps the schema
|
|
228
|
-
// back-compatible with an older host that predates the field.
|
|
229
212
|
builder_url: z.string().nullable().optional(),
|
|
230
|
-
|
|
213
|
+
layout_id: z
|
|
231
214
|
.string()
|
|
232
|
-
.describe('Synthetic per-page
|
|
215
|
+
.describe('Synthetic per-page layout id, e.g. "page:3275" (WP) or "article:42" (Joomla).'),
|
|
233
216
|
etag: z.string(),
|
|
234
217
|
warnings: z
|
|
235
218
|
.array(z.string())
|
|
236
219
|
.describe('e.g. "slug_collision_resolved" when slug collision was resolved.'),
|
|
237
220
|
})
|
|
238
221
|
.refine((v) => typeof v.page_id === 'number' || typeof v.article_id === 'number', { message: 'response must contain either page_id (WP) or article_id (Joomla)' });
|
|
239
|
-
/**
|
|
240
|
-
* Wire shape for `yootheme_builder_pages_create` when `dry_run:true`.
|
|
241
|
-
*
|
|
242
|
-
* Design pin: NO `etag` field. The B6 fix-cycle decision was that
|
|
243
|
-
* surfacing a "live" ETag with a dry-run response invites a stale-
|
|
244
|
-
* If-Match footgun (caller pins the ETag, then non-dry-run mutates,
|
|
245
|
-
* stale ETag rejected with 412). Dry-run is validation-only.
|
|
246
|
-
*
|
|
247
|
-
* `template_id_pattern` is a literal — the actual `template_id` cannot
|
|
248
|
-
* be materialised before WP allocates the post_id.
|
|
249
|
-
*/
|
|
250
222
|
export const PAGES_CREATE_DRY_RUN_OUTPUT_SCHEMA = z.object({
|
|
251
223
|
dry_run: z.literal(true),
|
|
252
224
|
would_create: z.object({
|
|
253
225
|
title: z.string(),
|
|
254
226
|
slug: z.string(),
|
|
255
227
|
status: z.string(),
|
|
256
|
-
|
|
257
|
-
template_id_pattern: z.enum(['page:{post_id}', 'article:{article_id}']),
|
|
228
|
+
layout_id_pattern: z.enum(['page:{post_id}', 'article:{article_id}']),
|
|
258
229
|
}),
|
|
259
230
|
validation_report: z.object({
|
|
260
231
|
layer_1_structural: z.literal('passed'),
|
|
261
232
|
layer_2_element_types: z.literal('passed'),
|
|
262
233
|
layer_4_renderer: z.literal('passed'),
|
|
263
234
|
}),
|
|
264
|
-
// No `etag` field — by design (see B6 fix-cycle: stale-If-Match footgun).
|
|
265
235
|
});
|
|
266
|
-
/**
|
|
267
|
-
* Input shape for `yootheme_builder_pages_delete`.
|
|
268
|
-
*
|
|
269
|
-
* Mirrors the args of `DELETE /pages/{post_id}` (Phase B).
|
|
270
|
-
*
|
|
271
|
-
* Design pin: `confirm` is `z.literal(true)`. This is the Zod-side
|
|
272
|
-
* enforcement of the confirm gate — the MCP boundary rejects requests
|
|
273
|
-
* without `confirm:true` before they ever hit the REST layer.
|
|
274
|
-
*
|
|
275
|
-
* `force` defaults to false server-side → wp_delete_post(trash). When
|
|
276
|
-
* true → hard delete (irrecoverable).
|
|
277
|
-
*/
|
|
278
236
|
export const PAGES_DELETE_INPUT = {
|
|
279
|
-
|
|
280
|
-
.number()
|
|
281
|
-
.
|
|
282
|
-
.
|
|
283
|
-
.describe('ID of the page/article to delete — WordPress post_id or Joomla article_id ' +
|
|
284
|
-
'(the numeric part of the template_id, e.g. 42 for "article:42").'),
|
|
237
|
+
layout_id: z
|
|
238
|
+
.union([z.string().min(1), z.number().int().positive()])
|
|
239
|
+
.describe('Which layout: "page:42", "article:12", "default", or a bare id (42). '
|
|
240
|
+
+ 'Use yootheme_builder_pages_list to discover.'),
|
|
285
241
|
confirm: z
|
|
286
|
-
.literal(true)
|
|
287
|
-
.describe('Must be true. Confirm gate prevents accidental deletes.'),
|
|
288
|
-
force: z
|
|
289
242
|
.boolean()
|
|
290
243
|
.optional()
|
|
291
|
-
.describe('
|
|
244
|
+
.describe('Must be true to actually delete. LEAVE IT OUT (or send false) to get a '
|
|
245
|
+
+ 'preview instead: the server answers 200 with what would be lost (label, '
|
|
246
|
+
+ 'elements_count, what happens to media) plus the intents this page\'s current '
|
|
247
|
+
+ 'state allows, and deletes nothing. '
|
|
248
|
+
+ HOST_PROMPT_PROMISE),
|
|
249
|
+
intent: z
|
|
250
|
+
.string()
|
|
251
|
+
.optional()
|
|
252
|
+
.describe('What "remove" means here. Call without it once and the server lists the intents ' +
|
|
253
|
+
'possible for this page\'s CURRENT state, in the words of its CMS.'),
|
|
292
254
|
};
|
|
293
|
-
// ─── P-G (Goldstandard wave 3) — page_dynamize ────────────────────────
|
|
294
|
-
//
|
|
295
|
-
// The composite "dynamize an existing designed layout" write. The recipe
|
|
296
|
-
// of `dynamize-existing-layout.md` encoded server-side — the agent supplies
|
|
297
|
-
// ONLY the language-level inputs (which list source, which leaf maps to
|
|
298
|
-
// which flow field). F98 HYBRID EXECUTION: server runs the deterministic
|
|
299
|
-
// steps (copy byte-identically, swap queries + leaf names, keep everything
|
|
300
|
-
// else), reaching 85-95% compliance vs 60-70% for instruction-only.
|
|
301
|
-
/**
|
|
302
|
-
* A single `leaf_map` / `conditions` value — the F96 FieldMappingValue
|
|
303
|
-
* shape reused verbatim (mirrors `field_mappings` in `sources/builders.ts`):
|
|
304
|
-
* EITHER a plain string (the new flat field name) OR a structured
|
|
305
|
-
* `{name, filters?}` carrying an explicit YT5 filters operator (e.g. a
|
|
306
|
-
* `_condition` `{condition:'!!'}` or a date format `{date:'D, d.m.y'}`).
|
|
307
|
-
*/
|
|
308
255
|
const FIELD_MAPPING_VALUE = z.union([
|
|
309
256
|
z.string(),
|
|
310
257
|
z
|
|
@@ -319,20 +266,18 @@ const FIELD_MAPPING_VALUE = z.union([
|
|
|
319
266
|
})
|
|
320
267
|
.strict(),
|
|
321
268
|
]);
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
* `POST /pages/dynamize`. Narrowest-schema rule: `template_id` +
|
|
325
|
-
* `list_source_name` + `page.title` are required non-empty; `page` carries
|
|
326
|
-
* the create-machinery passthrough; the reference selector is `section_name`
|
|
327
|
-
* OR `element_path` (exactly-one is enforced server-side so a miss can list
|
|
328
|
-
* the available named sections as remediation).
|
|
329
|
-
*/
|
|
330
|
-
export const PAGE_DYNAMIZE_INPUT = {
|
|
331
|
-
template_id: z
|
|
269
|
+
export const PAGE_GENERATE_DYNAMIC_INPUT = {
|
|
270
|
+
layout_id: z
|
|
332
271
|
.string()
|
|
333
272
|
.min(1)
|
|
334
|
-
.describe('
|
|
273
|
+
.describe('The layout holding the REFERENCE section (e.g. "default"). ' +
|
|
335
274
|
'Use yootheme_builder_pages_list / yootheme_builder_template_summary to discover.'),
|
|
275
|
+
output: z
|
|
276
|
+
.enum(['new_page'])
|
|
277
|
+
.describe('Where the dynamized result lands. "new_page" (the only value today) creates a ' +
|
|
278
|
+
'NEW, unpublished, unlinked page from the reference — it never rewrites the ' +
|
|
279
|
+
'reference itself. A later "in_place" value (editing the reference page ' +
|
|
280
|
+
'directly) is not yet available.'),
|
|
336
281
|
section_name: z
|
|
337
282
|
.string()
|
|
338
283
|
.min(1)
|
|
@@ -345,7 +290,9 @@ export const PAGE_DYNAMIZE_INPUT = {
|
|
|
345
290
|
.min(1)
|
|
346
291
|
.optional()
|
|
347
292
|
.describe('JSON-Pointer / rel-path to the reference subtree (e.g. "/children/2"). ' +
|
|
348
|
-
'Provide THIS or `section_name` — exactly one.'
|
|
293
|
+
'Provide THIS or `section_name` — exactly one. The path must satisfy the ' +
|
|
294
|
+
'same section→row→column hierarchy as a new page (`scaffold_section` ' +
|
|
295
|
+
'builds a hull).'),
|
|
349
296
|
list_source_name: z
|
|
350
297
|
.string()
|
|
351
298
|
.min(1)
|
|
@@ -355,10 +302,6 @@ export const PAGE_DYNAMIZE_INPUT = {
|
|
|
355
302
|
'(apiMapperFlow…List, e.g. "apiMapperFlowAbcList") OR a native source/relation ' +
|
|
356
303
|
'(e.g. "posts.customPosts", "articles"). Provide THIS or `source_map` — exactly ' +
|
|
357
304
|
'one. Use yootheme_builder_sources_list to discover.'),
|
|
358
|
-
// F201 (multi-block): a section with SEVERAL source blocks (Played / Next /
|
|
359
|
-
// Later) dynamizes in ONE call. Each entry keys the EXISTING iterating
|
|
360
|
-
// column query (`match`) to its flow list source (`source_name`) + its own
|
|
361
|
-
// leaf_map. Provide THIS or `list_source_name` — exactly one.
|
|
362
305
|
source_map: z
|
|
363
306
|
.array(z
|
|
364
307
|
.object({
|
|
@@ -433,13 +376,7 @@ export const PAGE_DYNAMIZE_INPUT = {
|
|
|
433
376
|
.describe('Joomla only: create a SEF route. true = hidden menutype; a string picks it.'),
|
|
434
377
|
})
|
|
435
378
|
.describe('Passthrough to the existing create machinery (slug-collision, menu_item routing).'),
|
|
436
|
-
etag:
|
|
437
|
-
.string()
|
|
438
|
-
.min(1)
|
|
439
|
-
.optional()
|
|
440
|
-
.describe('Optimistic-lock ETag from yootheme_builder_get_etag. Optional; when provided, ' +
|
|
441
|
-
'412 on conflict. Recommended for collaborative edits.'),
|
|
442
|
-
// SOURCES_BINDING-27: preflight the dynamize without creating a page.
|
|
379
|
+
etag: ETAG_PREVIEW_OPTIONAL.optional(),
|
|
443
380
|
dry_run: z
|
|
444
381
|
.boolean()
|
|
445
382
|
.optional()
|
|
@@ -448,57 +385,248 @@ export const PAGE_DYNAMIZE_INPUT = {
|
|
|
448
385
|
'(etag == new_etag). Inspect summary.queries_swapped / unmatched_map_keys ' +
|
|
449
386
|
'before the real call.'),
|
|
450
387
|
};
|
|
451
|
-
/**
|
|
452
|
-
* Wire shape for `yootheme_builder_pages_delete` on success.
|
|
453
|
-
*
|
|
454
|
-
* `deleted` is `z.literal(true)` — the success-response invariant. A
|
|
455
|
-
* failed delete surfaces as `isError:true` with a structured-error
|
|
456
|
-
* envelope, not as `deleted:false`.
|
|
457
|
-
*/
|
|
458
388
|
export const PAGES_DELETE_OUTPUT_SCHEMA = z
|
|
459
389
|
.object({
|
|
460
|
-
|
|
461
|
-
|
|
390
|
+
...RESOLVED_LAYOUT_ID_OUTPUT,
|
|
391
|
+
deleted: z.boolean(),
|
|
392
|
+
dry_run: z.literal(true).optional(),
|
|
393
|
+
already_trashed: z.literal(true).optional(),
|
|
394
|
+
note: z.string().optional(),
|
|
395
|
+
article_state: z.number().int().optional(),
|
|
462
396
|
page_id: z.number().int().positive().optional(),
|
|
463
397
|
article_id: z.number().int().positive().optional(),
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
// it touched. pages_delete forwards the PHP body VERBATIM via
|
|
469
|
-
// structuredResult, so these MUST be declared here — the host
|
|
470
|
-
// validates structuredContent under additionalProperties:false and a
|
|
471
|
-
// SUCCESS would otherwise trip -32602. Optional for back-compat.
|
|
398
|
+
post_id: z.number().int().positive().optional(),
|
|
399
|
+
post_type: z.string().optional(),
|
|
400
|
+
force_deleted: z.boolean().optional(),
|
|
401
|
+
etag: z.string().optional(),
|
|
472
402
|
new_etag: z.string().optional(),
|
|
473
403
|
changed_paths: z.array(z.string()).optional(),
|
|
404
|
+
label: z.string().nullable().optional(),
|
|
405
|
+
element_count: z.number().int().nonnegative().nullable().optional(),
|
|
406
|
+
has_dynamic_binding: z.boolean().optional(),
|
|
407
|
+
impact_note: z.string().optional(),
|
|
408
|
+
binding_note: z.string().nullable().optional(),
|
|
409
|
+
next_step: z.string().optional(),
|
|
410
|
+
preview: z.literal(true).optional(),
|
|
411
|
+
step_reversible: z.boolean().optional(),
|
|
412
|
+
host_prompt: z.enum(HOST_PROMPT_ANSWERS).optional(),
|
|
413
|
+
requires_confirm: z.literal(true).optional(),
|
|
414
|
+
requires_confirmation: z.literal(true).optional(),
|
|
415
|
+
operation: z.string().optional(),
|
|
416
|
+
warning: z.string().optional(),
|
|
417
|
+
hint: z.string().optional(),
|
|
418
|
+
received_confirm: z.unknown().optional(),
|
|
419
|
+
received_confirm_type: z.string().optional(),
|
|
420
|
+
expected_confirm: z.string().optional(),
|
|
421
|
+
layout_id: z.string().optional(),
|
|
422
|
+
elements_count: z.number().int().nonnegative().optional(),
|
|
423
|
+
elements_count_note: z.string().optional(),
|
|
424
|
+
media_note: z.string().optional(),
|
|
425
|
+
menu_item_ids: z.array(z.number().int().positive()).optional(),
|
|
426
|
+
menu_items_note: z.string().optional(),
|
|
427
|
+
applied: z.literal(false).optional(),
|
|
428
|
+
requires_intent: z.literal(true).optional(),
|
|
429
|
+
given_intent: z.string().optional(),
|
|
430
|
+
current_state: z.string().optional(),
|
|
431
|
+
intents: z
|
|
432
|
+
.array(z.object({
|
|
433
|
+
intent: z.string(),
|
|
434
|
+
effect: z.string(),
|
|
435
|
+
reversible: z.boolean(),
|
|
436
|
+
native_name: z.string(),
|
|
437
|
+
restore_call: z.string().nullable().optional(),
|
|
438
|
+
restore_state_note: z.string().nullable().optional(),
|
|
439
|
+
undo: z.string(),
|
|
440
|
+
}))
|
|
441
|
+
.optional(),
|
|
442
|
+
notes: z.array(z.string()).optional(),
|
|
443
|
+
instruction: z.string().optional(),
|
|
444
|
+
reads_degraded: z
|
|
445
|
+
.array(z.enum(['label', 'elements']))
|
|
446
|
+
.optional()
|
|
447
|
+
.describe('Reads that did not answer, so the fields they back are NOT measured. '
|
|
448
|
+
+ '"label" backs `label` (null here means "could not read", not "no title"). '
|
|
449
|
+
+ '"elements" backs `element_count`, `has_dynamic_binding` and `binding_note` '
|
|
450
|
+
+ '(has_dynamic_binding defaults to false, so on a degraded read it reads as '
|
|
451
|
+
+ '"no binding" rather than "unknown" — the more dangerous direction before a '
|
|
452
|
+
+ 'delete). Absent when both reads answered.'),
|
|
474
453
|
})
|
|
475
|
-
.
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
454
|
+
.superRefine((v, ctx) => {
|
|
455
|
+
if (v.requires_confirmation === true) {
|
|
456
|
+
if (v.deleted !== false) {
|
|
457
|
+
ctx.addIssue({
|
|
458
|
+
code: 'custom',
|
|
459
|
+
path: ['deleted'],
|
|
460
|
+
message: 'a confirm preview must report deleted:false — nothing was removed',
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
if (!Array.isArray(v.intents) || v.intents.length === 0) {
|
|
464
|
+
ctx.addIssue({
|
|
465
|
+
code: 'custom',
|
|
466
|
+
path: ['intents'],
|
|
467
|
+
message: 'a confirm preview must carry the intents this state allows — without them '
|
|
468
|
+
+ 'the caller cannot form the follow-up call it is being asked to make',
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
if (typeof v.page_id !== 'number' && typeof v.article_id !== 'number') {
|
|
472
|
+
ctx.addIssue({
|
|
473
|
+
code: 'custom',
|
|
474
|
+
path: ['page_id'],
|
|
475
|
+
message: 'response must contain either page_id (WP) or article_id (Joomla)',
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
if (v.dry_run === true) {
|
|
481
|
+
if (v.deleted !== false) {
|
|
482
|
+
ctx.addIssue({
|
|
483
|
+
code: 'custom',
|
|
484
|
+
path: ['deleted'],
|
|
485
|
+
message: 'a dry_run preview must report deleted:false — nothing was written',
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
if (typeof v.post_id !== 'number') {
|
|
489
|
+
ctx.addIssue({
|
|
490
|
+
code: 'custom',
|
|
491
|
+
path: ['post_id'],
|
|
492
|
+
message: 'a dry_run preview must echo the post_id it previewed',
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
if (v.requires_intent === true) {
|
|
498
|
+
if (v.deleted !== false) {
|
|
499
|
+
ctx.addIssue({
|
|
500
|
+
code: 'custom',
|
|
501
|
+
path: ['deleted'],
|
|
502
|
+
message: 'a discovery answer must report deleted:false — nothing was removed',
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
if (!Array.isArray(v.intents) || v.intents.length === 0) {
|
|
506
|
+
ctx.addIssue({
|
|
507
|
+
code: 'custom',
|
|
508
|
+
path: ['intents'],
|
|
509
|
+
message: 'a discovery answer must carry the options it was asked for',
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
if (v.already_trashed === true) {
|
|
515
|
+
if (v.deleted !== false) {
|
|
516
|
+
ctx.addIssue({
|
|
517
|
+
code: 'custom',
|
|
518
|
+
path: ['deleted'],
|
|
519
|
+
message: 'an already-trashed report must say deleted:false — nothing was removed',
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
if (typeof v.note !== 'string' || v.note.length === 0) {
|
|
523
|
+
ctx.addIssue({
|
|
524
|
+
code: 'custom',
|
|
525
|
+
path: ['note'],
|
|
526
|
+
message: 'an already-trashed report must name the state and what to call next',
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
if (typeof v.page_id !== 'number' && typeof v.article_id !== 'number') {
|
|
530
|
+
ctx.addIssue({
|
|
531
|
+
code: 'custom',
|
|
532
|
+
path: ['page_id'],
|
|
533
|
+
message: 'response must contain either page_id (WP) or article_id (Joomla)',
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
if (v.deleted !== true) {
|
|
539
|
+
ctx.addIssue({
|
|
540
|
+
code: 'custom',
|
|
541
|
+
path: ['deleted'],
|
|
542
|
+
message: 'a carried-out delete must report deleted:true (a failure is isError, not deleted:false)',
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
if (typeof v.force_deleted !== 'boolean') {
|
|
546
|
+
ctx.addIssue({
|
|
547
|
+
code: 'custom',
|
|
548
|
+
path: ['force_deleted'],
|
|
549
|
+
message: 'a carried-out delete must say whether it was permanent',
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
if (typeof v.page_id !== 'number' && typeof v.article_id !== 'number') {
|
|
553
|
+
ctx.addIssue({
|
|
554
|
+
code: 'custom',
|
|
555
|
+
path: ['page_id'],
|
|
556
|
+
message: 'response must contain either page_id (WP) or article_id (Joomla)',
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
if (typeof v.etag !== 'string') {
|
|
560
|
+
ctx.addIssue({
|
|
561
|
+
code: 'custom',
|
|
562
|
+
path: ['etag'],
|
|
563
|
+
message: 'a carried-out delete must carry the post-write etag',
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
export const PAGES_SET_STATUS_INPUT = {
|
|
568
|
+
layout_id: z
|
|
569
|
+
.union([z.string().min(1), z.number().int().positive()])
|
|
570
|
+
.describe('Which layout: "page:42", "article:12", "default", or a bare id (42). '
|
|
571
|
+
+ 'Use yootheme_builder_pages_list to discover.'),
|
|
572
|
+
status: z
|
|
573
|
+
.enum([
|
|
574
|
+
'publish', 'draft', 'pending', 'private', 'future',
|
|
575
|
+
'published', 'unpublished', 'archived',
|
|
576
|
+
])
|
|
577
|
+
.describe('The CMS status, in YOUR platform\'s own words. WordPress: publish, draft, '
|
|
578
|
+
+ 'pending, private, future. Joomla: published, unpublished, archived. A status '
|
|
579
|
+
+ 'from the other platform is refused (422) with the list valid HERE — no '
|
|
580
|
+
+ 'translation happens. To trash or delete a page use '
|
|
581
|
+
+ 'yootheme_builder_pages_delete (it carries the confirm gate); no status value '
|
|
582
|
+
+ 'deletes anything. A page already IN the trash is refused (409) — restore it '
|
|
583
|
+
+ 'in the CMS first, which is what puts its original URL back. '
|
|
584
|
+
+ 'This write takes NO `etag` and is last-one-wins — nothing detects a competing '
|
|
585
|
+
+ 'change. The `etag` it RETURNS is the post-write layout etag, for chaining into '
|
|
586
|
+
+ 'your next LAYOUT write.'),
|
|
587
|
+
};
|
|
588
|
+
export const PAGES_SET_STATUS_OUTPUT_SCHEMA = z.object({
|
|
589
|
+
...RESOLVED_LAYOUT_ID_OUTPUT,
|
|
590
|
+
post_id: z.number().int().positive(),
|
|
591
|
+
article_id: z.number().int().positive().optional(),
|
|
592
|
+
layout_id: z.string(),
|
|
593
|
+
post_type: z.string().optional(),
|
|
594
|
+
status: z.string(),
|
|
595
|
+
previous_status: z.string(),
|
|
596
|
+
changed: z.boolean(),
|
|
597
|
+
requested_status: z.string(),
|
|
598
|
+
warnings: z.array(z.string()),
|
|
599
|
+
changed_paths: z.array(z.string()).optional(),
|
|
600
|
+
etag: z.string(),
|
|
601
|
+
new_etag: z.string(),
|
|
602
|
+
findable_by_visitor: z.boolean().nullable(),
|
|
603
|
+
cms_visibility: CMS_VISIBILITY_SCHEMA.optional(),
|
|
604
|
+
cms_warning: z.string().optional(),
|
|
605
|
+
frontend_url: z.string().optional(),
|
|
606
|
+
frontend_url_provisional: z.boolean().optional(),
|
|
607
|
+
frontend_url_note: z.string().optional(),
|
|
608
|
+
});
|
|
609
|
+
export const PAGES_RESTORE_INPUT = {
|
|
610
|
+
layout_id: z
|
|
611
|
+
.union([z.string().min(1), z.number().int().positive()])
|
|
612
|
+
.describe('Which layout: "page:42", "article:12", "default", or a bare id (42). '
|
|
613
|
+
+ 'Use yootheme_builder_pages_list to discover. Not currently trashed → refused (409).'),
|
|
614
|
+
};
|
|
615
|
+
export const PAGES_RESTORE_OUTPUT_SCHEMA = z.object({
|
|
616
|
+
...RESOLVED_LAYOUT_ID_OUTPUT,
|
|
617
|
+
restored: z.boolean(),
|
|
618
|
+
post_id: z.number().int().positive(),
|
|
619
|
+
article_id: z.number().int().positive().optional(),
|
|
620
|
+
post_type: z.string().optional(),
|
|
621
|
+
status: z.string(),
|
|
622
|
+
restored_from: z.literal('trash').or(z.literal('trashed')),
|
|
623
|
+
changed_paths: z.array(z.string()).optional(),
|
|
624
|
+
etag: z.string(),
|
|
625
|
+
new_etag: z.string(),
|
|
626
|
+
note: z.string(),
|
|
627
|
+
frontend_url: z.string().optional(),
|
|
628
|
+
});
|
|
495
629
|
export const TARGET_KEYS = ['template_id', 'post_id', 'url', 'special', 'title'];
|
|
496
|
-
/**
|
|
497
|
-
* The semantic-special vocabulary, byte-identical to PHP `SpecialTargetMap`'s
|
|
498
|
-
* key set. `date` is IN the vocabulary but unsupported on both platforms — it
|
|
499
|
-
* resolves to a clean `special_not_supported` error rather than "unknown
|
|
500
|
-
* special", which is why it is listed here.
|
|
501
|
-
*/
|
|
502
630
|
export const SPECIAL_TARGET_TOKENS = [
|
|
503
631
|
'home',
|
|
504
632
|
'front-page',
|
|
@@ -551,9 +679,6 @@ export const PAGES_TARGET = z
|
|
|
551
679
|
'special / title — supplying two returns a typed too_many_targets error, ' +
|
|
552
680
|
'supplying none runs the unscoped default.');
|
|
553
681
|
export const PAGES_RESOLVE_INPUT = {
|
|
554
|
-
// A-6: OPTIONAL since a target-only resolve must be expressible. The
|
|
555
|
-
// exactly-one-of(url, target) contract lives in `handlePagesResolve`
|
|
556
|
-
// (typed too_many_targets / missing_url), not in the schema.
|
|
557
682
|
url: z
|
|
558
683
|
.string()
|
|
559
684
|
.min(1)
|
|
@@ -567,107 +692,69 @@ export const PAGES_RESOLVE_INPUT = {
|
|
|
567
692
|
'"author", "archive") or a title substring. Mutually exclusive with `url`.'),
|
|
568
693
|
};
|
|
569
694
|
export const PAGES_RESOLVE_OUTPUT_SCHEMA = z.object({
|
|
570
|
-
|
|
571
|
-
// (page_get_layout, page_get_schema, element_*): a `page:<id>` (WP) /
|
|
572
|
-
// `article:<id>` (Joomla) token for a per-page layout, OR the raw
|
|
573
|
-
// `templates.<id>` key for a governing THEME TEMPLATE (G-A2).
|
|
574
|
-
template_id: z.string(),
|
|
575
|
-
// The resolved integer post-id (WP) / article-id (Joomla) for a per-page
|
|
576
|
-
// layout, or NULL for a theme template (an archive URL has no single post).
|
|
695
|
+
layout_id: z.string(),
|
|
577
696
|
post_id: z.number().int().positive().nullable(),
|
|
578
|
-
// Content type — `get_post_type`/archive post-type/taxonomy on WP,
|
|
579
|
-
// "article"/"category" on Joomla.
|
|
580
697
|
type: z.string(),
|
|
581
|
-
// The page's human display name. Load-bearing for the fuzzy addresses: a
|
|
582
|
-
// `special`/`title` resolve is only checkable if the caller can see WHICH
|
|
583
|
-
// page it landed on without a second round-trip. `.optional()` because a
|
|
584
|
-
// host predating the label fill omits it and this is a STRICT object.
|
|
585
698
|
label: z.string().optional(),
|
|
586
|
-
// Canonical permalink (null when the platform cannot re-derive one).
|
|
587
699
|
frontend_url: z.string().nullable(),
|
|
588
|
-
// G-A2: the matched YT type/condition for a theme template
|
|
589
|
-
// (e.g. "archive-gloeckle_help", "taxonomy-category_faq"), else null for a
|
|
590
|
-
// per-page layout.
|
|
591
700
|
context: z.string().nullable(),
|
|
592
|
-
// G-A2: which kind was resolved — a per-page layout vs. the governing theme
|
|
593
|
-
// template — so the agent knows it reached the right surface.
|
|
594
701
|
resolved_via: z.enum(['per_page', 'theme_template']),
|
|
595
|
-
// A-6: WHICH branch of the `target` object matched, echoed so the caller can
|
|
596
|
-
// tell the user how a fuzzy address (a title substring, a semantic special)
|
|
597
|
-
// was interpreted. `.optional()` is load-bearing: a `url` resolve and every
|
|
598
|
-
// host predating A-5 omit it, and this is a STRICT object.
|
|
599
702
|
matched_by: z.enum(TARGET_KEYS).optional(),
|
|
600
703
|
});
|
|
601
|
-
// ─── F5 + N5 (Glöckle HANDOFF-4/5) — render_preview ──────────────────
|
|
602
|
-
//
|
|
603
|
-
// The input shape (`template_id` OR `url`, exactly one — mirroring
|
|
604
|
-
// page_get_layout's addressing) is assembled in `builders.ts` from the shared
|
|
605
|
-
// TEMPLATE_ID_OPTIONAL + RESOLVE_URL schemas, the same way pages_resolve /
|
|
606
|
-
// page_get_layout do. Only the STRICT output schema lives here.
|
|
607
|
-
/**
|
|
608
|
-
* Wire shape for `yootheme_builder_render_preview` on success.
|
|
609
|
-
*
|
|
610
|
-
* STRICT (additionalProperties:false default ZodObject) — every field the
|
|
611
|
-
* handler puts in structuredContent MUST be declared here, or a strict MCP
|
|
612
|
-
* host -32602-rejects the SUCCESS (the structured-content-shape-pin guard
|
|
613
|
-
* enforces this).
|
|
614
|
-
*
|
|
615
|
-
* - rendered: the in-process Builder render did NOT throw.
|
|
616
|
-
* - item_count: count of rendered repeat-source items (`el-item` rows).
|
|
617
|
-
* - empty: the rendered HTML is empty / whitespace-only.
|
|
618
|
-
* - error: OPTIONAL — present ONLY when the render threw; the otherwise-
|
|
619
|
-
* swallowed YOOtheme render message.
|
|
620
|
-
* - cache_purge_hint: the constant operator steer (purge Rocket/CDN after save).
|
|
621
|
-
* - template_id: echoed back (the resolved id the render ran on).
|
|
622
|
-
* - matched: OPTIONAL — present ONLY when the caller passed `expect`; did the
|
|
623
|
-
* rendered HTML contain that substring (Glöckle HANDOFF-6 #4).
|
|
624
|
-
* - snippet: OPTIONAL — present ONLY when the caller passed `expect`; a
|
|
625
|
-
* ~200-char window around the first match (or null when not
|
|
626
|
-
* matched / the render threw). NULLABLE so the no-match case
|
|
627
|
-
* validates under the strict schema.
|
|
628
|
-
*/
|
|
629
704
|
export const RENDER_PREVIEW_OUTPUT_SCHEMA = z.object({
|
|
705
|
+
...RESOLVED_LAYOUT_ID_OUTPUT,
|
|
630
706
|
rendered: z.boolean(),
|
|
631
|
-
|
|
707
|
+
rendered_item_wrapper_count: z.number().int().nonnegative(),
|
|
708
|
+
rendered_item_wrapper_count_note: z.string().optional(),
|
|
632
709
|
empty: z.boolean(),
|
|
710
|
+
fallback_used: z.boolean(),
|
|
711
|
+
dropped_count: z.number().int().nonnegative(),
|
|
712
|
+
dropped_count_note: z.string().optional(),
|
|
633
713
|
error: z.string().optional(),
|
|
634
714
|
cache_purge_hint: z.string(),
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
// (strict ZodObject → additionalProperties:false) so a strict host does not
|
|
639
|
-
// -32602-reject the `expect` variant. `snippet` is nullable (null on a miss).
|
|
715
|
+
layout_id: z.string(),
|
|
716
|
+
source_item_counts: z.record(z.string(), z.number().int().nonnegative()),
|
|
717
|
+
unresolved_sources: z.array(z.string()).optional(),
|
|
640
718
|
matched: z.boolean().optional(),
|
|
641
719
|
snippet: z.string().nullable().optional(),
|
|
720
|
+
match_conclusive: z.boolean().optional(),
|
|
721
|
+
match_note: z.string().optional(),
|
|
722
|
+
mismatch_hints: z.array(z.string()).optional(),
|
|
723
|
+
stored_but_not_rendered: z
|
|
724
|
+
.object({
|
|
725
|
+
elements: z.array(z.object({
|
|
726
|
+
path: z.string(),
|
|
727
|
+
source_name: z.string(),
|
|
728
|
+
})),
|
|
729
|
+
note: z.string(),
|
|
730
|
+
})
|
|
731
|
+
.optional(),
|
|
732
|
+
cms_status: z.string().optional(),
|
|
733
|
+
cms_status_note: z.string().optional(),
|
|
734
|
+
});
|
|
735
|
+
export const HEADING_OUTLINE_OUTPUT_SCHEMA = z.object({
|
|
736
|
+
...RESOLVED_LAYOUT_ID_OUTPUT,
|
|
737
|
+
layout_id: z.string(),
|
|
738
|
+
mode: z.enum(['builder', 'rendered']),
|
|
739
|
+
etag: z.string(),
|
|
740
|
+
outline: z.array(z.object({
|
|
741
|
+
level: z.string(),
|
|
742
|
+
text: z.string(),
|
|
743
|
+
element_type: z.string(),
|
|
744
|
+
path: z.string(),
|
|
745
|
+
})),
|
|
746
|
+
images: z.array(z.object({
|
|
747
|
+
alt: z.string().nullable(),
|
|
748
|
+
is_generic_alt: z.boolean(),
|
|
749
|
+
element_type: z.string(),
|
|
750
|
+
path: z.string(),
|
|
751
|
+
})),
|
|
752
|
+
h1_count: z.number().int().nonnegative(),
|
|
753
|
+
has_level_skip: z.boolean(),
|
|
754
|
+
images_missing_alt: z.number().int().nonnegative(),
|
|
755
|
+
render_fallback_used: z.boolean().optional(),
|
|
756
|
+
render_dropped_count: z.number().int().nonnegative().optional(),
|
|
642
757
|
});
|
|
643
|
-
// ─── Task 6 (pages_audit design, 2026-07-19) — shared FINDING/QUICK_CHECK ──
|
|
644
|
-
//
|
|
645
|
-
// Defined ONCE here — referenced by `pages_audit`'s own output schema AND
|
|
646
|
-
// (Task 8) `page_publish` / `page_save`'s additive `quick_check` block, so
|
|
647
|
-
// the finding shape has exactly one source of truth across all three
|
|
648
|
-
// surfaces (design §5-§7). Mirrors the PHP wire shape verbatim
|
|
649
|
-
// (`PageAuditService::audit()` / `AuditCheck`'s partial-finding contract).
|
|
650
|
-
/**
|
|
651
|
-
* The human-locatable address of ONE audit hit (B-3/B-5) — mirrors the PHP
|
|
652
|
-
* `FindingLocator::toArray()` wire shape. `path` stays the machine write
|
|
653
|
-
* address; `breadcrumb`/`element_type`/`element_name` are what a HUMAN needs
|
|
654
|
-
* to find the element in the customizer. Per the PHP null-key policy the
|
|
655
|
-
* optional members are OMITTED rather than sent as null.
|
|
656
|
-
*
|
|
657
|
-
* FAIL-SOFT BY CONSTRUCTION. `pages[]` rows used to ride through
|
|
658
|
-
* `.catchall(z.unknown())` untyped; now that `locators` is a typed array, a
|
|
659
|
-
* mismatch is no longer stripped — the MCP SDK THROWS `McpError`
|
|
660
|
-
* (InvalidParams) on an outputSchema violation, which fails the WHOLE audit
|
|
661
|
-
* call. So the optional members are `.nullish()` (an explicit `null` from a
|
|
662
|
-
* host that does not honour the omit-nulls policy must not be fatal) and the
|
|
663
|
-
* object carries a `.catchall`, so a field a future host version adds can
|
|
664
|
-
* never hard-fail an otherwise perfectly good audit.
|
|
665
|
-
*
|
|
666
|
-
* `repeat` is the one deliberately STRICT member: PHP emits it clamped to
|
|
667
|
-
* `>= 1` (`repeat: 0` is meaningless — a hit that renders zero times is not a
|
|
668
|
-
* hit), so `min(1)` states the real contract rather than tolerating a value
|
|
669
|
-
* that could only mean a producer bug.
|
|
670
|
-
*/
|
|
671
758
|
export const FINDING_LOCATOR = z
|
|
672
759
|
.object({
|
|
673
760
|
path: z.string(),
|
|
@@ -681,58 +768,26 @@ export const FINDING_LOCATOR = z
|
|
|
681
768
|
name: z.string().nullish(),
|
|
682
769
|
})
|
|
683
770
|
.catchall(z.unknown());
|
|
684
|
-
/**
|
|
685
|
-
* One audit finding. `pages` carries per-page mini-evidence whose KEYS vary
|
|
686
|
-
* by check code (`first_headline_path`, `alt_paths`, `cluster_id`,
|
|
687
|
-
* `iterated`, `disabled_elements`, `elements_content`, ...) — `.catchall`
|
|
688
|
-
* keeps every row's base `{id, label}` typed while tolerating the
|
|
689
|
-
* check-specific extras without a per-code union.
|
|
690
|
-
*
|
|
691
|
-
* The ADDITIVE B-3/B-5 keys (`locators`, `hits_truncated`,
|
|
692
|
-
* `locators_stripped`, `builder_url`) are declared EXPLICITLY for
|
|
693
|
-
* self-documentation — the `.catchall` already tolerated them, but a named
|
|
694
|
-
* member states the contract. All stay `.optional()`: a host plugin predating
|
|
695
|
-
* B-3 emits none of them.
|
|
696
|
-
*
|
|
697
|
-
* `hits_truncated` and `locators_stripped` mean DIFFERENT things and are never
|
|
698
|
-
* interchangeable: the former says the upstream `hit_cap` dropped hits (so the
|
|
699
|
-
* raw `paths`/`alt_paths`/`skips`/`dead_anchors` arrays are incomplete), the
|
|
700
|
-
* latter says the transport's shrink-to-fit shed locator PROSE while leaving
|
|
701
|
-
* those arrays complete.
|
|
702
|
-
*
|
|
703
|
-
* FORWARD-COMPAT `.catchall`, for the same reason `FINDING_LOCATOR` carries one:
|
|
704
|
-
* the handler forwards each finding VERBATIM, and a strict object generates
|
|
705
|
-
* `additionalProperties:false`, so ONE additive field on the PHP side (an
|
|
706
|
-
* explicit hit total, a new evidence key) would make a strict host -32602-reject
|
|
707
|
-
* an otherwise perfect audit. Every declared member is still validated; only
|
|
708
|
-
* UNDECLARED ones ride through untyped.
|
|
709
|
-
*/
|
|
710
771
|
export const FINDING = z.object({
|
|
711
772
|
code: z.string(),
|
|
712
|
-
category: z.enum(['seo', 'structure', 'content', 'links']),
|
|
773
|
+
category: z.enum(['seo', 'structure', 'content', 'links', 'design']),
|
|
713
774
|
severity: z.enum(['critical', 'warning', 'info']),
|
|
714
775
|
title: z.string(),
|
|
715
|
-
|
|
776
|
+
affected_pages: z.number().int().nonnegative(),
|
|
716
777
|
pages: z.array(z
|
|
717
778
|
.object({
|
|
718
779
|
id: z.string(),
|
|
719
780
|
label: z.string(),
|
|
720
781
|
locators: z.array(FINDING_LOCATOR).optional(),
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
// therefore emits an unambiguous `hits` alias next to a page
|
|
724
|
-
// entry's `count` whenever that count really is a hit tally.
|
|
725
|
-
// Declared (not merely tolerated via `.catchall`) so the field
|
|
726
|
-
// is part of the contract and `hitCountOf` may prefer it.
|
|
727
|
-
hits: z.number().int().nonnegative().optional(),
|
|
782
|
+
occurrences_here: z.number().int().nonnegative().optional(),
|
|
783
|
+
bound_gaps_not_counted: z.number().int().nonnegative().optional(),
|
|
728
784
|
hits_truncated: z.boolean().optional(),
|
|
729
785
|
locators_stripped: z.boolean().optional(),
|
|
730
786
|
builder_url: z.string().nullable().optional(),
|
|
787
|
+
frontend_url: z.string().nullable().optional(),
|
|
731
788
|
})
|
|
732
789
|
.catchall(z.unknown())),
|
|
733
|
-
|
|
734
|
-
// Machine-executable remediation (design §5): absent for findings with
|
|
735
|
-
// NO safe auto-fix (duplicate-layout, title-collision — human decision).
|
|
790
|
+
finding_pages_truncated: z.boolean(),
|
|
736
791
|
fix_hint: z
|
|
737
792
|
.object({
|
|
738
793
|
tool: z.string(),
|
|
@@ -741,26 +796,43 @@ export const FINDING = z.object({
|
|
|
741
796
|
})
|
|
742
797
|
.optional(),
|
|
743
798
|
}).catchall(z.unknown());
|
|
744
|
-
/**
|
|
745
|
-
* The advisory block `page_publish` (default on) / `page_save`
|
|
746
|
-
* (opt-in via `quick_check:true`) attach (Task 8). Design §7: `{clean:true}`
|
|
747
|
-
* on zero findings, else `{findings, note}` pointing at `pages_audit` for
|
|
748
|
-
* the site-wide (scope==='site') checks this per-page pass does not run.
|
|
749
|
-
*/
|
|
750
799
|
export const QUICK_CHECK = z.object({
|
|
751
800
|
clean: z.boolean().optional(),
|
|
752
801
|
findings: z.array(FINDING).optional(),
|
|
753
802
|
note: z.string().optional(),
|
|
754
803
|
});
|
|
755
|
-
/**
|
|
756
|
-
* Input shape for `yootheme_builder_pages_audit` (design §5). `site_id` is
|
|
757
|
-
* spread in separately by `builders.ts` (mirrors PAGES_RESOLVE_INPUT).
|
|
758
|
-
*/
|
|
759
804
|
export const PAGES_AUDIT_INPUT = {
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
805
|
+
mode: z
|
|
806
|
+
.enum(['builder', 'rendered'])
|
|
807
|
+
.optional()
|
|
808
|
+
.describe('Audit source. "builder" (default) reads the saved layout tree: fast, but blind to ' +
|
|
809
|
+
'module/widget output and anything a plugin injects only at render time — the ' +
|
|
810
|
+
'response names the checks that blindness affects in ' +
|
|
811
|
+
'`checks_limited_to_saved_layout`, so a 0 from one of them reads as "0 in the ' +
|
|
812
|
+
'stored layout" rather than "0 on the page". ' +
|
|
813
|
+
'"rendered" renders each page first (via the SAME engine render_preview uses) and ' +
|
|
814
|
+
'audits the ACTUAL DOM. It runs a SUBSET of the checks, so a code that is not in ' +
|
|
815
|
+
'that subset reports nothing here — "0 found" and "0 checked" are different ' +
|
|
816
|
+
'answers, and the response says which one you got in `checks_not_run`. These do ' +
|
|
817
|
+
'NOT run in "rendered" (each needs the stored builder tree): ' +
|
|
818
|
+
'empty-page, dangling-source, unknown-source-fields, container-missing-item-child, ' +
|
|
819
|
+
'binding-renders-nothing, heading-hidden-on-mobile, thin-content, duplicate-layout, ' +
|
|
820
|
+
'title-collision, non-pretty-url, stale-content, header-contrast-risk, ' +
|
|
821
|
+
'header-contrast-unverifiable. ' +
|
|
822
|
+
'This is the MOST valuable mode for the "design" category, since a ' +
|
|
823
|
+
'plugin form (Formidable/ACF) only exists at render time. Findings carry no builder ' +
|
|
824
|
+
'element path in this mode (empty breadcrumb/' +
|
|
825
|
+
'element_type by design, there is no builder node to point at); locate the hit by ' +
|
|
826
|
+
'its content_snippet or the page\'s builder_url/frontend_url instead. A SITE-wide ' +
|
|
827
|
+
'rendered sweep is capped (rendering is expensive); the response\'s render_scan ' +
|
|
828
|
+
'{attempted, rendered, capped} always says so honestly and, when the cap engaged, ' +
|
|
829
|
+
'skipped_by_cap NAMES the templates it skipped, so the gap can be closed with a ' +
|
|
830
|
+
'types-narrowed re-run. render_errors lists any ' +
|
|
831
|
+
'page whose render failed (excluded from findings, never reported as a false clean). ' +
|
|
832
|
+
'A Joomla page with module/module_position is NOT a render failure — it renders via ' +
|
|
833
|
+
'a tolerant fallback (that subtree excluded) and shows up in render_fallback ' +
|
|
834
|
+
'{pages, suppressed_checks} instead, with no-headings/missing-h1/heading-skip ' +
|
|
835
|
+
'suppressed on just those pages (the only codes a hidden widget heading could fabricate).'),
|
|
764
836
|
target: PAGES_TARGET.optional().describe('Audit ONE page instead of the whole site — by template_id, post_id, url, a ' +
|
|
765
837
|
'semantic special ("home", "blog", "404", "search", "category", "tag", ' +
|
|
766
838
|
'"author", "archive") or a title substring. The response then carries ' +
|
|
@@ -773,13 +845,37 @@ export const PAGES_AUDIT_INPUT = {
|
|
|
773
845
|
'same `type` values yootheme_builder_pages_list rows carry). Default: every ' +
|
|
774
846
|
'scanned template/page is included.'),
|
|
775
847
|
checks: z
|
|
776
|
-
.array(z.enum(['seo', 'structure', 'content', 'links']))
|
|
848
|
+
.array(z.enum(['seo', 'structure', 'content', 'links', 'design']))
|
|
777
849
|
.optional()
|
|
778
|
-
.describe('Run only these check categories (default: all
|
|
779
|
-
'non-pretty-url, stale-content. "structure" = empty-page,
|
|
780
|
-
'
|
|
850
|
+
.describe('Run only these check categories (default: all five). "seo" = title-collision, ' +
|
|
851
|
+
'non-pretty-url, stale-content. "structure" = empty-page, dangling-source, ' +
|
|
852
|
+
'unknown-source-fields (the bound source exists but a field_mappings value it ' +
|
|
853
|
+
'does not emit renders blank), ' +
|
|
854
|
+
'container-missing-item-child (a grid/button/slideshow with no *_item child ' +
|
|
855
|
+
'repeats nothing, so it renders nothing), missing-h1, ' +
|
|
856
|
+
'multiple-h1, no-headings, heading-skip, heading-hidden-on-mobile (hidden at ' +
|
|
857
|
+
'the mobile-first UIkit breakpoint; Google indexes mobile-first, so this is ' +
|
|
858
|
+
'effectively invisible for ranking), long-heading. "content" = ' +
|
|
781
859
|
'images-missing-alt, generic-alt-text, thin-content, duplicate-layout. ' +
|
|
782
|
-
'"links" = dead-anchor, anchor-text-quality
|
|
860
|
+
'"links" = dead-anchor, anchor-text-quality — BOTH stay on the page they are ' +
|
|
861
|
+
'reading. No link TARGET is ever fetched or resolved: a link to a deleted page, a ' +
|
|
862
|
+
'wrong internal path, or an external URL that answers 404 is not checked by this ' +
|
|
863
|
+
'tool at all, so "no findings under links" must not be read as "no broken links". ' +
|
|
864
|
+
'dead-anchor only means a `#id` jump whose target id is missing on the SAME page. ' +
|
|
865
|
+
'"design" = design-missing-uikit-class, ' +
|
|
866
|
+
'design-foreign-class, design-inline-style: markup breaking out of the UIkit ' +
|
|
867
|
+
'design system (e.g. a plugin form submit button with no uk-button); most ' +
|
|
868
|
+
'valuable in mode:"rendered", where a plugin\'s own output actually exists — ' +
|
|
869
|
+
'plus header-contrast-risk (warning): the first section pulls the navigation ' +
|
|
870
|
+
'over itself (header_transparent) in a colour the theme\'s own --uk-inverse ' +
|
|
871
|
+
'declaration contradicts, with no image or video hiding the background that ' +
|
|
872
|
+
'declaration describes; and header-contrast-unverifiable (info): the same ' +
|
|
873
|
+
'transparent header over a hero image/video, whatever the colour — the medium ' +
|
|
874
|
+
'hides that background, so no colour is verifiable from the props, none is ' +
|
|
875
|
+
'recommended, and readability is only verifiable by looking at the rendered ' +
|
|
876
|
+
'page. Both are builder-mode only (section props do not exist ' +
|
|
877
|
+
'in a rendered document). Headings and image alt are also read from raw HTML ' +
|
|
878
|
+
'(html/text element content), not just builder props.'),
|
|
783
879
|
thin_content_threshold: z
|
|
784
880
|
.number()
|
|
785
881
|
.int()
|
|
@@ -794,49 +890,51 @@ export const PAGES_AUDIT_INPUT = {
|
|
|
794
890
|
.optional()
|
|
795
891
|
.describe('Months since a page\'s `modified_at` after which it is flagged `stale-content`. ' +
|
|
796
892
|
'Pages with an empty modified_at are never flagged. Default: 24.'),
|
|
797
|
-
// PERF-4 / PROD-2: on THIS tool `max_chars` bounds BOTH legs — the shared
|
|
798
|
-
// describe's "structuredContent stays complete" is true everywhere else,
|
|
799
|
-
// but an audit's structured leg was measured at 349 KB (~89k tokens) for a
|
|
800
|
-
// site sweep, so it carries its own default ceiling
|
|
801
|
-
// ({@see STRUCTURED_BUDGET_CHARS}) that this argument raises or lowers.
|
|
802
893
|
max_chars: MAX_CHARS.describe('Optional cap (chars) on this result. Bounds BOTH the text leg and the ' +
|
|
803
894
|
'structuredContent payload (default: 48000 chars for structuredContent). ' +
|
|
804
895
|
'When the structured leg has to shrink, locator detail is shed before ' +
|
|
805
|
-
'evidence pages and the response carries structured_truncated:true.
|
|
806
|
-
'
|
|
896
|
+
'evidence pages and the response carries structured_truncated:true. ' +
|
|
897
|
+
'It does NOT lift the per-page HIT cap: a site sweep lists at most 5 hits ' +
|
|
898
|
+
'per page (flagged hits_truncated) whatever you pass here — pass `target` ' +
|
|
899
|
+
'to audit ONE page, which raises that cap to 100. Raise max_chars for a ' +
|
|
900
|
+
'complete pathological page, lower it on a tight context budget. ' +
|
|
901
|
+
'Raising it stops helping at the limit your own client puts on a single tool ' +
|
|
902
|
+
'result, which this server cannot see. ' +
|
|
903
|
+
'Out of range, the cap that actually applied comes back as `max_chars`.'),
|
|
904
|
+
include_meta: INCLUDE_META_SCHEMA,
|
|
905
|
+
include_modules: z
|
|
906
|
+
.boolean()
|
|
907
|
+
.optional()
|
|
908
|
+
.describe('When true, attach `modules_by_page[layout_id]` — the widgets/modules that ' +
|
|
909
|
+
'render on each SCANNED page, split into `from_elements` (a module/' +
|
|
910
|
+
'module_position element placed directly in this page\'s own layout) and ' +
|
|
911
|
+
'`from_positions` (a site-wide theme position — navbar/header/footer — ' +
|
|
912
|
+
'rendering here with no element in this page\'s own layout at all). On ' +
|
|
913
|
+
'Joomla, a site-wide module can still be assignment-EXCLUDED from a ' +
|
|
914
|
+
'specific page (`except`); when that decision cannot be resolved for a ' +
|
|
915
|
+
'page (no menu item addresses it, or more than one does), the row lands in ' +
|
|
916
|
+
'`from_positions_undecidable` instead of being guessed in or out. A ' +
|
|
917
|
+
'builder-content module (Joomla mod_yootheme_builder, WP builderwidget) ' +
|
|
918
|
+
'carries its embedded layout SUMMARIZED here as ' +
|
|
919
|
+
'`{omitted_for_size:true, node_count:N}`, not the full tree (B25) — ' +
|
|
920
|
+
'`layout_root` still names its root type; for the actual content call ' +
|
|
921
|
+
'local_content_read(kind:"modules") on that id. Costly across a site-wide ' +
|
|
922
|
+
'sweep otherwise: `layout` alone routinely dwarfs every other field on ' +
|
|
923
|
+
'the row. Default false — omit for the pre-existing response shape, ' +
|
|
924
|
+
'unchanged.'),
|
|
807
925
|
};
|
|
808
|
-
/**
|
|
809
|
-
* Wire shape for `yootheme_builder_pages_audit` (design §5). `scanned.by_type`
|
|
810
|
-
* is a `Record<string, number>` — the PHP side already normalizes an empty
|
|
811
|
-
* sweep to `(object) []` (`{}` over the wire), matching this schema without
|
|
812
|
-
* the array-vs-object workaround `template_summary` needed (Task #46).
|
|
813
|
-
*/
|
|
814
926
|
export const PAGES_AUDIT_OUTPUT_SCHEMA = z.object({
|
|
815
927
|
etag: z.string(),
|
|
816
|
-
// B-5 — the three single-target keys. `.optional()` is LOAD-BEARING, not
|
|
817
|
-
// decoration: this is a strict object, and both a site sweep and every
|
|
818
|
-
// host predating single-target mode omit all three, so a non-optional
|
|
819
|
-
// member would make every such (perfectly valid) response fail validation.
|
|
820
928
|
scope: z.string().optional(),
|
|
821
929
|
note: z.string().optional(),
|
|
822
|
-
// Every member of `PageQuery::descriptorFromRow()` /
|
|
823
|
-
// `augmentResolverDescriptor()` must be declared here — the audit handler
|
|
824
|
-
// forwards `resolved_target` VERBATIM, and this object generates
|
|
825
|
-
// `additionalProperties:false`, so an undeclared key makes a strict host
|
|
826
|
-
// -32602-reject a SUCCESSFUL call (W12-R2). All eight are `.optional()`
|
|
827
|
-
// because a host predating single-target mode sends none of them.
|
|
828
930
|
resolved_target: z
|
|
829
931
|
.object({
|
|
830
|
-
|
|
932
|
+
layout_id: z.string().optional(),
|
|
831
933
|
post_id: z.union([z.number(), z.string()]).nullable().optional(),
|
|
832
934
|
type: z.string().optional(),
|
|
833
935
|
label: z.string().optional(),
|
|
834
936
|
frontend_url: z.string().nullable().optional(),
|
|
835
|
-
// The matched YT type/condition for a theme template
|
|
836
|
-
// (e.g. "taxonomy-category_faq"); null for a per-page layout.
|
|
837
937
|
context: z.string().nullable().optional(),
|
|
838
|
-
// `per_page` | `theme_template` — kept a plain string rather than an
|
|
839
|
-
// enum so a newer host's additional kind is forwarded, not rejected.
|
|
840
938
|
resolved_via: z.string().optional(),
|
|
841
939
|
matched_by: z.string().optional(),
|
|
842
940
|
})
|
|
@@ -846,19 +944,68 @@ export const PAGES_AUDIT_OUTPUT_SCHEMA = z.object({
|
|
|
846
944
|
by_type: z.record(z.string(), z.number().int().nonnegative()),
|
|
847
945
|
}),
|
|
848
946
|
summary: z.object({
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
947
|
+
critical_finding_kinds: z.number().int().nonnegative(),
|
|
948
|
+
warning_finding_kinds: z.number().int().nonnegative(),
|
|
949
|
+
info_finding_kinds: z.number().int().nonnegative(),
|
|
950
|
+
finding_kinds: z.number().int().nonnegative().optional(),
|
|
951
|
+
affected_pages_summed_across_findings: z.number().int().nonnegative().optional(),
|
|
852
952
|
}),
|
|
853
953
|
findings: z.array(FINDING),
|
|
854
954
|
disclaimer: z.string(),
|
|
855
|
-
|
|
856
|
-
// ladder had to run to bring `structuredContent` under its char budget.
|
|
857
|
-
// Its PRESENCE is the whole signal: a complete payload omits the key
|
|
858
|
-
// entirely, so a reader can never mistake a shrunk audit for a full one.
|
|
859
|
-
// Which entries lost what is flagged in place — `locators_stripped` on the
|
|
860
|
-
// page rows whose locator prose went, `pages_truncated` on the findings
|
|
861
|
-
// whose evidence pages were capped or dropped.
|
|
955
|
+
occurrences_unit: z.string().optional(),
|
|
862
956
|
structured_truncated: z.boolean().optional(),
|
|
957
|
+
truncated_by: z.array(z.enum(['response_budget', 'per_page_hit_cap'])).optional(),
|
|
958
|
+
truncation_remedy: z.string().optional(),
|
|
959
|
+
mode: z.enum(['rendered']).optional(),
|
|
960
|
+
render_scan: z
|
|
961
|
+
.object({
|
|
962
|
+
attempted: z.number().int().nonnegative(),
|
|
963
|
+
rendered: z.number().int().nonnegative(),
|
|
964
|
+
capped: z.boolean(),
|
|
965
|
+
skipped_by_cap: z
|
|
966
|
+
.array(z.object({ id: z.string(), label: z.string() }))
|
|
967
|
+
.optional(),
|
|
968
|
+
skipped_by_cap_not_listed: z.number().int().nonnegative().optional(),
|
|
969
|
+
})
|
|
970
|
+
.optional(),
|
|
971
|
+
checks_not_run: z.array(z.string()).optional(),
|
|
972
|
+
checks_limited_to_saved_layout: z
|
|
973
|
+
.object({
|
|
974
|
+
codes: z.array(z.string()),
|
|
975
|
+
note: z.string(),
|
|
976
|
+
})
|
|
977
|
+
.optional(),
|
|
978
|
+
render_errors: z
|
|
979
|
+
.array(z.object({
|
|
980
|
+
id: z.string(),
|
|
981
|
+
label: z.string(),
|
|
982
|
+
error: z.string(),
|
|
983
|
+
error_class: z.string().optional(),
|
|
984
|
+
reason: z.string().optional(),
|
|
985
|
+
}))
|
|
986
|
+
.optional(),
|
|
987
|
+
render_fallback: z
|
|
988
|
+
.object({
|
|
989
|
+
pages: z.array(z.object({
|
|
990
|
+
id: z.string(),
|
|
991
|
+
label: z.string(),
|
|
992
|
+
dropped_count: z.number().int().nonnegative(),
|
|
993
|
+
})),
|
|
994
|
+
suppressed_checks: z.array(z.string()),
|
|
995
|
+
})
|
|
996
|
+
.optional(),
|
|
997
|
+
modules_by_page: z
|
|
998
|
+
.record(z.string(), z.object({
|
|
999
|
+
from_elements: z.array(z.record(z.string(), z.unknown())),
|
|
1000
|
+
from_positions: z.array(z.record(z.string(), z.unknown())),
|
|
1001
|
+
from_positions_undecidable: z.array(z.record(z.string(), z.unknown())),
|
|
1002
|
+
unresolved_positions: z
|
|
1003
|
+
.array(z.object({ position: z.string(), reason: z.string() }))
|
|
1004
|
+
.optional(),
|
|
1005
|
+
unresolved_module_universe: z.object({ reason: z.string() }).optional(),
|
|
1006
|
+
}))
|
|
1007
|
+
.optional(),
|
|
1008
|
+
modules_by_page_omitted: z.boolean().optional(),
|
|
1009
|
+
retry_hint: z.string().optional(),
|
|
863
1010
|
});
|
|
864
1011
|
//# sourceMappingURL=schemas.js.map
|