@wootsup/yt-builder-mcp 1.12.0 → 2.1.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 +139 -40
- package/bin/node-floor.d.ts +28 -0
- package/bin/node-floor.js +150 -0
- package/bin/yt-builder-mcp.js +51 -10
- package/dist/auth.d.ts +3 -121
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +44 -174
- 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 +8 -52
- 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 +21 -62
- 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 +46 -55
- 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 +1 -23
- 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 +1 -19
- 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 +1 -34
- 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 +12 -147
- package/dist/clients/codex-cli.js.map +1 -1
- package/dist/clients/config-file.d.ts +15 -0
- package/dist/clients/config-file.d.ts.map +1 -0
- package/dist/clients/config-file.js +86 -0
- package/dist/clients/config-file.js.map +1 -0
- package/dist/clients/continue.d.ts +0 -10
- package/dist/clients/continue.d.ts.map +1 -1
- package/dist/clients/continue.js +3 -30
- 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 +1 -12
- 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 +1 -18
- 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 +2 -153
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +3 -153
- 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 +1 -23
- 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 +1 -19
- 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 +27 -38
- package/dist/diagnostics/diagnose-network-error.js.map +1 -1
- package/dist/diagnostics/doctor.d.ts +1 -85
- package/dist/diagnostics/doctor.d.ts.map +1 -1
- package/dist/diagnostics/doctor.js +7 -92
- 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 +1 -33
- 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 +15 -24
- 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 +9 -178
- 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 +8 -48
- 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/product-name.d.ts +2 -0
- package/dist/product-name.d.ts.map +1 -0
- package/dist/product-name.js +2 -0
- package/dist/product-name.js.map +1 -0
- 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 +109 -204
- 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 +120 -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 +95 -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 +165 -177
- 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 +2 -37
- package/dist/setup-wizard-defaults.d.ts.map +1 -1
- package/dist/setup-wizard-defaults.js +28 -93
- 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 +18 -217
- 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-write-types.d.ts +19 -0
- package/dist/setup-wizard-write-types.d.ts.map +1 -0
- package/dist/setup-wizard-write-types.js +2 -0
- package/dist/setup-wizard-write-types.js.map +1 -0
- 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 +65 -79
- 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 +2 -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 -79
- 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 +85 -0
- package/dist/skill-instructions.js.map +1 -0
- package/dist/skill-loader.d.ts +1 -103
- package/dist/skill-loader.d.ts.map +1 -1
- package/dist/skill-loader.js +6 -143
- 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 +14 -19
- package/dist/tools/budgeted-table.d.ts.map +1 -1
- package/dist/tools/budgeted-table.js +171 -105
- package/dist/tools/budgeted-table.js.map +1 -1
- 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 +147 -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 +26 -43
- package/dist/tools/format/health-format.d.ts.map +1 -1
- package/dist/tools/format/health-format.js +32 -63
- package/dist/tools/format/health-format.js.map +1 -1
- package/dist/tools/format/inspection-format.d.ts +2 -54
- package/dist/tools/format/inspection-format.d.ts.map +1 -1
- package/dist/tools/format/inspection-format.js +33 -119
- 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 +114 -139
- 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 +84 -0
- package/dist/tools/health-output-schemas.d.ts.map +1 -0
- package/dist/tools/health-output-schemas.js +132 -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 +47 -233
- 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 +12 -39
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/inspection.d.ts +4 -34
- package/dist/tools/inspection.d.ts.map +1 -1
- package/dist/tools/inspection.js +164 -536
- package/dist/tools/inspection.js.map +1 -1
- package/dist/tools/library.d.ts +115 -127
- package/dist/tools/library.d.ts.map +1 -1
- package/dist/tools/library.js +707 -455
- 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 +103 -46
- 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 -65
- 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 +1 -16
- package/dist/tools/navigation/builders.d.ts.map +1 -1
- package/dist/tools/navigation/builders.js +5 -27
- package/dist/tools/navigation/builders.js.map +1 -1
- package/dist/tools/navigation/index.d.ts +0 -13
- package/dist/tools/navigation/index.d.ts.map +1 -1
- package/dist/tools/navigation/index.js +0 -12
- package/dist/tools/navigation/index.js.map +1 -1
- package/dist/tools/navigation/schemas.d.ts +0 -30
- package/dist/tools/navigation/schemas.d.ts.map +1 -1
- package/dist/tools/navigation/schemas.js +0 -30
- package/dist/tools/navigation/schemas.js.map +1 -1
- 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 +320 -405
- package/dist/tools/pages/builders.js.map +1 -1
- package/dist/tools/pages/header-transparency.d.ts +2 -32
- package/dist/tools/pages/header-transparency.d.ts.map +1 -1
- package/dist/tools/pages/header-transparency.js +9 -43
- package/dist/tools/pages/header-transparency.js.map +1 -1
- 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 +323 -241
- package/dist/tools/pages/schemas.d.ts.map +1 -1
- package/dist/tools/pages/schemas.js +514 -549
- 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 +31 -106
- 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 +0 -69
- package/dist/tools/response-budget.d.ts.map +1 -1
- package/dist/tools/response-budget.js +0 -127
- package/dist/tools/response-budget.js.map +1 -1
- package/dist/tools/shared-schemas.d.ts +11 -65
- package/dist/tools/shared-schemas.d.ts.map +1 -1
- package/dist/tools/shared-schemas.js +40 -123
- 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 +194 -170
- 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 +16 -232
- package/dist/tools/sparse-fields.d.ts.map +1 -1
- package/dist/tools/sparse-fields.js +178 -242
- 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 -39
- 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 -124
- package/dist/tools/tool-builder/results.d.ts.map +1 -1
- package/dist/tools/tool-builder/results.js +258 -263
- 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 +3 -50
- 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 +7 -12
- package/package.json +6 -11
- package/skills/yt-builder-mcp/SKILL.md +1871 -414
- package/dist/tools/elements/handlers-write.d.ts +0 -89
- package/dist/tools/elements/handlers-write.d.ts.map +0 -1
- package/dist/tools/elements/handlers-write.js +0 -797
- package/dist/tools/elements/handlers-write.js.map +0 -1
- package/dist/tools/elements/handlers.d.ts +0 -130
- package/dist/tools/elements/handlers.d.ts.map +0 -1
- package/dist/tools/elements/handlers.js +0 -581
- 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 -218
- package/dist/tools/elements/schema-validation.d.ts.map +0 -1
- package/dist/tools/elements/schema-validation.js +0 -685
- 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 -368
- 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 -56
- package/dist/tools/local-content/handlers.d.ts.map +0 -1
- package/dist/tools/local-content/handlers.js +0 -320
- 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/navigation/handlers.d.ts +0 -30
- package/dist/tools/navigation/handlers.d.ts.map +0 -1
- package/dist/tools/navigation/handlers.js +0 -41
- package/dist/tools/navigation/handlers.js.map +0 -1
- package/dist/tools/pages/handlers-audit.d.ts +0 -140
- package/dist/tools/pages/handlers-audit.d.ts.map +0 -1
- package/dist/tools/pages/handlers-audit.js +0 -714
- package/dist/tools/pages/handlers-audit.js.map +0 -1
- package/dist/tools/pages/handlers-read.d.ts +0 -133
- package/dist/tools/pages/handlers-read.d.ts.map +0 -1
- package/dist/tools/pages/handlers-read.js +0 -1061
- 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 -419
- 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 -657
- package/dist/tools/sources/handlers-bind.js.map +0 -1
- package/dist/tools/sources/handlers.d.ts +0 -116
- package/dist/tools/sources/handlers.d.ts.map +0 -1
- package/dist/tools/sources/handlers.js +0 -289
- 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,122 +1,131 @@
|
|
|
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 {
|
|
11
|
-
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());
|
|
12
33
|
export const PAGES_LIST_OUTPUT_SCHEMA = z.object({
|
|
13
|
-
|
|
14
|
-
// `frontend_url_template`, `frontend_url_description` so an MCP-agent
|
|
15
|
-
// can answer "What is the URL of my <type> template?" without a
|
|
16
|
-
// follow-up REST call or operator input. Server-side resolvers
|
|
17
|
-
// (WordPress: get_permalink/get_term_link/get_author_posts_url; Joomla:
|
|
18
|
-
// RouteHelper::getArticleRoute/getCategoryRoute/getTagRoute) emit one
|
|
19
|
-
// of two shapes per row:
|
|
20
|
-
// - `frontend_url: <permalink>` + `frontend_url_template: null`
|
|
21
|
-
// when a canonical public URL exists (latest post / first category
|
|
22
|
-
// / first author etc.).
|
|
23
|
-
// - `frontend_url: null` + `frontend_url_template: <pattern>` when
|
|
24
|
-
// the URL needs a runtime parameter (search, 404-test) or when no
|
|
25
|
-
// public content of the matching type exists yet.
|
|
26
|
-
// `frontend_url_description` is a short human hint ("Append any non-
|
|
27
|
-
// existent path to test." / "Latest published post — rendered with
|
|
28
|
-
// this template.") so the agent can render an instruction to the
|
|
29
|
-
// end-user. All three keys are kept on the row-record (not an extra
|
|
30
|
-
// schema object) so per-item sparse-field projection works.
|
|
31
|
-
//
|
|
32
|
-
// F33 (2026-06-10): each row also carries `builder_url` — a version-
|
|
33
|
-
// aware (WP YT4/YT5) + platform-aware (Joomla com_ajax) "open in the
|
|
34
|
-
// YOOtheme Pro builder" deep-link (or null when the host could not
|
|
35
|
-
// resolve the admin base). Kept on the row-record so per-item sparse-
|
|
36
|
-
// field projection + available_fields discovery surface it.
|
|
37
|
-
items: z.array(z.record(z.string(), z.unknown())),
|
|
34
|
+
items: z.array(PAGE_ROW_SCHEMA),
|
|
38
35
|
total: z.number(),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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(),
|
|
42
55
|
returned: z.number().optional(),
|
|
43
56
|
next_cursor: z.string().optional(),
|
|
44
57
|
etag: z.string().optional(),
|
|
45
58
|
projected_fields: z.array(z.string()).optional(),
|
|
46
|
-
// F-004 fix (2026-05-25 exhaustive audit): projection-feedback —
|
|
47
|
-
// emitted ONLY when the caller passed `fields[]`. `available_fields`
|
|
48
|
-
// is the discovered top-level field vocabulary; `unknown_fields` is
|
|
49
|
-
// the subset of requested fields that did NOT appear in any item
|
|
50
|
-
// (previously: items came back as `[{}, {}, …]` silently).
|
|
51
59
|
available_fields: z.array(z.string()).optional(),
|
|
60
|
+
available_fields_by_kind: z.record(z.string(), z.array(z.string())).optional(),
|
|
52
61
|
unknown_fields: z.array(z.string()).optional(),
|
|
53
|
-
|
|
54
|
-
// structuredContent — hosts that surface structuredContent (not the
|
|
55
|
-
// text leg) to the model would otherwise never see it.
|
|
62
|
+
field_coverage: FIELD_COVERAGE_SCHEMA,
|
|
56
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`.'),
|
|
57
88
|
});
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
label: z.string().optional(),
|
|
75
|
-
has_binding: z.boolean().optional(),
|
|
76
|
-
})
|
|
77
|
-
.passthrough()),
|
|
78
|
-
total: z.number(),
|
|
79
|
-
template_id: z.string(),
|
|
80
|
-
// G-B: `fields[]` projection echo + the F23 unknown-field feedback,
|
|
81
|
-
// emitted ONLY when the caller passed `fields[]`.
|
|
82
|
-
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(),
|
|
83
105
|
available_fields: z.array(z.string()).optional(),
|
|
106
|
+
available_fields_by_kind: z.record(z.string(), z.array(z.string())).optional(),
|
|
84
107
|
unknown_fields: z.array(z.string()).optional(),
|
|
108
|
+
field_coverage: FIELD_COVERAGE_SCHEMA,
|
|
85
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.',
|
|
86
121
|
});
|
|
87
122
|
export const ETAG_OUTPUT_SCHEMA = z.object({
|
|
88
123
|
etag: z.string(),
|
|
89
124
|
generated_at: z.string().optional(),
|
|
90
125
|
});
|
|
91
|
-
// F-AUDIT-2 (2026-05-26): template_summary outputSchema. The handler
|
|
92
|
-
// passes the REST `/pages/{id}/summary` body through verbatim via
|
|
93
|
-
// `jsonResult(data)`. Live shape verified against the WP+Joomla dev
|
|
94
|
-
// hosts: `template_id`, `counts_by_type` (open-ended map element-type
|
|
95
|
-
// → count), `bound_count`, `max_depth`, `total`, `named_sections` (each
|
|
96
|
-
// `{path, name}`), and the `etag` string. NOTE: `_meta` is merged at
|
|
97
|
-
// the RESULT-LEVEL by `withSiteMeta`, NEVER into `structuredContent`
|
|
98
|
-
// (see results.ts W12-R2 commentary) — this schema therefore validates
|
|
99
|
-
// only the inner template-summary shape.
|
|
100
|
-
//
|
|
101
|
-
// T-C5 (mega-push plan 2026-07-24-02, customer P1.5): `template_summary` is now
|
|
102
|
-
// BIMODAL — a single-`template_id` call returns these fields at the TOP LEVEL
|
|
103
|
-
// (unchanged wire shape, back-compat preserved); a `template_ids` BATCH call
|
|
104
|
-
// instead returns `{summaries: {<id>: <that SAME per-template shape>},
|
|
105
|
-
// not_found: [...]}` and omits every top-level field below. The 7 fields that
|
|
106
|
-
// used to be REQUIRED (template_id/counts_by_type/bound_count/max_depth/total/
|
|
107
|
-
// named_sections/etag) are now `.optional()` too, SPECIFICALLY so one strict
|
|
108
|
-
// Zod object can validate BOTH response variants without a `z.union()` — the
|
|
109
|
-
// codebase's established alternative for a bimodal MCP response is dropping
|
|
110
|
-
// `outputSchema` entirely (see page_get_layout / page_dynamize in
|
|
111
|
-
// builders.ts), which would lose validation for the (overwhelmingly common)
|
|
112
|
-
// single-template case too. Declaring every possible field of BOTH shapes as
|
|
113
|
-
// optional on one object keeps `additionalProperties:false` catching
|
|
114
|
-
// genuinely unexpected keys while tolerating "this variant's fields are
|
|
115
|
-
// absent" — the SAME relaxation `resolved_target`/`FINDING` already use
|
|
116
|
-
// elsewhere in this file for the identical reason (different response
|
|
117
|
-
// variants omit different keys).
|
|
118
126
|
export const TEMPLATE_SUMMARY_OUTPUT_SCHEMA = z.object({
|
|
119
|
-
|
|
127
|
+
...RESOLVED_LAYOUT_ID_OUTPUT,
|
|
128
|
+
layout_id: z.string().optional(),
|
|
120
129
|
counts_by_type: z.record(z.string(), z.number().int().nonnegative()).optional(),
|
|
121
130
|
bound_count: z.number().int().nonnegative().optional(),
|
|
122
131
|
max_depth: z.number().int().nonnegative().optional(),
|
|
@@ -127,40 +136,13 @@ export const TEMPLATE_SUMMARY_OUTPUT_SCHEMA = z.object({
|
|
|
127
136
|
name: z.string(),
|
|
128
137
|
}))
|
|
129
138
|
.optional(),
|
|
130
|
-
// pages_audit impl plan Task 7 (2026-07-19): additive enrichment —
|
|
131
|
-
// heading-level census (h1-h6 + div — `div` counts `description_list`
|
|
132
|
-
// elements, the one type whose title_element defaults to div),
|
|
133
|
-
// unbound-image-alt-gap count, and disabled-element count. Reuses the
|
|
134
|
-
// SAME `LayoutAuditExtractor` pass `pages_audit` runs. `.optional()` so
|
|
135
|
-
// a NEW MCP client talking to an OLD (pre-1.10.0) host plugin — which
|
|
136
|
-
// doesn't emit these fields yet — still validates.
|
|
137
139
|
heading_levels: z.record(z.string(), z.number().int().nonnegative()).optional(),
|
|
138
|
-
// T-A3 (mega-push plan 2026-07-24-02): a static, always-present sibling
|
|
139
|
-
// stating which sources feed heading_levels above — html/text/code
|
|
140
|
-
// raw-HTML elements count (T-A1 widened the shared LayoutAuditExtractor
|
|
141
|
-
// pass to read them), module/widget output does NOT (no content field to
|
|
142
|
-
// parse). `.optional()` for the same pre-1.10.0-host back-compat reason
|
|
143
|
-
// as heading_levels itself.
|
|
144
140
|
heading_levels_note: z.string().optional(),
|
|
145
141
|
images_missing_alt: z.number().int().nonnegative().optional(),
|
|
146
142
|
disabled_elements: z.number().int().nonnegative().optional(),
|
|
147
|
-
// F191 (2026-06-12) source-transparency flags the PHP summary() has emitted
|
|
148
|
-
// since June but this schema never declared, so a strict SDK parse silently
|
|
149
|
-
// stripped them. `already_dynamized` = the layout already binds an API Mapper
|
|
150
|
-
// source (demo/clone vs pristine theme); `is_theme_template` = a real YOOtheme
|
|
151
|
-
// theme template vs a per-page/per-article layout. `.optional()` for the same
|
|
152
|
-
// pre-1.10.0-host back-compat reason as the fields above.
|
|
153
143
|
already_dynamized: z.boolean().optional(),
|
|
154
144
|
is_theme_template: z.boolean().optional(),
|
|
155
145
|
etag: z.string().optional(),
|
|
156
|
-
// Task 6 (Wave 1 audit, F4, 2026-07-24): one entry per content-bearing
|
|
157
|
-
// node (structural wrappers section/row/column/fragment/layout excluded).
|
|
158
|
-
// Disabled/render-dead nodes ARE included, unlike disabled_elements above:
|
|
159
|
-
// this is the field that says WHICH node and WHY, not just a count.
|
|
160
|
-
// T-E2 (mega-push plan 2026-07-24-02, Thomas-Entscheid C): OPT-IN now —
|
|
161
|
-
// absent unless the caller passed `include_nodes:true` (previously
|
|
162
|
-
// unconditional). `.optional()` covers BOTH that opt-out-by-default case
|
|
163
|
-
// AND the pre-1.10.0-host back-compat reason the three fields above share.
|
|
164
146
|
content_nodes: z
|
|
165
147
|
.array(z.object({
|
|
166
148
|
path: z.string(),
|
|
@@ -172,40 +154,11 @@ export const TEMPLATE_SUMMARY_OUTPUT_SCHEMA = z.object({
|
|
|
172
154
|
alts: z.array(z.string()),
|
|
173
155
|
}))
|
|
174
156
|
.optional(),
|
|
175
|
-
// T-C5: page 2+ of content_nodes when `include_nodes:true` + `limit` were
|
|
176
|
-
// supplied. Present ONLY while more content_nodes rows remain (mirrors
|
|
177
|
-
// pages_list / element_list — never an always-present nullable field).
|
|
178
157
|
next_cursor: z.string().optional(),
|
|
179
|
-
// T-C5 (customer P1.5) batch shape — present ONLY when the caller passed
|
|
180
|
-
// `template_ids` instead of `template_id`. One entry per id that resolved
|
|
181
|
-
// (SAME per-template shape as the single-mode top-level fields above,
|
|
182
|
-
// left as an open record here rather than nesting the whole shape a
|
|
183
|
-
// second time); `not_found` lists ids that did not.
|
|
184
158
|
summaries: z.record(z.string(), z.record(z.string(), z.unknown())).optional(),
|
|
185
159
|
not_found: z.array(z.string()).optional(),
|
|
160
|
+
forbidden: z.array(z.string()).optional(),
|
|
186
161
|
});
|
|
187
|
-
// ─── C1 — pages_create + pages_delete (v1.2) ──────────────────────────
|
|
188
|
-
//
|
|
189
|
-
// MCP tool schemas wrapping the Phase B REST endpoints:
|
|
190
|
-
// POST /pages → yootheme_builder_pages_create
|
|
191
|
-
// DELETE /pages/{post_id} → yootheme_builder_pages_delete
|
|
192
|
-
//
|
|
193
|
-
// These schemas drive (a) input validation at the MCP boundary and (b)
|
|
194
|
-
// the structured-content outputSchema for client introspection.
|
|
195
|
-
/**
|
|
196
|
-
* Input shape for `yootheme_builder_pages_create`.
|
|
197
|
-
*
|
|
198
|
-
* Mirrors the args of `POST /pages` (Phase B).
|
|
199
|
-
*
|
|
200
|
-
* Design pins:
|
|
201
|
-
* - `post_type` is intentionally NOT exposed. Layer 9 defensive guard
|
|
202
|
-
* on the REST side rejects it server-side; surfacing it at the MCP
|
|
203
|
-
* boundary would invite a footgun where an agent tries to set it
|
|
204
|
-
* and fails confusingly.
|
|
205
|
-
* - `status` defaults to `draft` on the server (Q6 design — no public
|
|
206
|
-
* empty page).
|
|
207
|
-
* - `dry_run` triggers validation Layers 1+2+4 without persisting.
|
|
208
|
-
*/
|
|
209
162
|
export const PAGES_CREATE_INPUT = {
|
|
210
163
|
title: z
|
|
211
164
|
.string()
|
|
@@ -222,14 +175,6 @@ export const PAGES_CREATE_INPUT = {
|
|
|
222
175
|
'WordPress accepts all five; Joomla maps draft→state 0 / publish→state 1 ' +
|
|
223
176
|
'(the other three are WP-only). For the common make-it-live case prefer ' +
|
|
224
177
|
'the `published` boolean below.'),
|
|
225
|
-
// F12 (2026-06-09): friendly one-boolean publish shortcut. A fresh
|
|
226
|
-
// draft on Joomla returns 404 to anonymous front-end visitors (state
|
|
227
|
-
// 0); there was no ergonomic MCP path to flip it live. `published`
|
|
228
|
-
// maps to the existing `status` field the PHP host already honours
|
|
229
|
-
// (WP post_status=publish, Joomla state=1) — see the handler. Default
|
|
230
|
-
// false keeps the safe "no public empty page" behaviour. When the
|
|
231
|
-
// caller sets an explicit `status`, that wins (published is the
|
|
232
|
-
// shortcut, not an override).
|
|
233
178
|
published: z
|
|
234
179
|
.boolean()
|
|
235
180
|
.default(false)
|
|
@@ -237,20 +182,16 @@ export const PAGES_CREATE_INPUT = {
|
|
|
237
182
|
'Joomla state=1) so anonymous visitors can render it immediately. ' +
|
|
238
183
|
'Default false: created as a draft, visible only in the builder until ' +
|
|
239
184
|
'you publish. Ignored when an explicit `status` is provided.'),
|
|
240
|
-
// F64 (2026-06-10): Joomla-only routing helper. A published Joomla
|
|
241
|
-
// article without a menu item has NO SEF route (anonymous 404). When
|
|
242
|
-
// truthy AND the article is published, the host creates a
|
|
243
|
-
// com_content single-article menu item via the Joomla Menu-Table API
|
|
244
|
-
// under a dedicated HIDDEN menutype (string value picks the
|
|
245
|
-
// menutype; `mainmenu` is rejected server-side so customer
|
|
246
|
-
// navigation is never polluted). Ignored on WordPress.
|
|
247
185
|
menu_item: z
|
|
248
186
|
.union([z.boolean(), z.string().min(1).max(64)])
|
|
249
187
|
.optional()
|
|
250
188
|
.describe('Joomla only: create a SEF route for the new article. true = ' +
|
|
251
189
|
'hidden default menutype; a string picks the menutype ' +
|
|
252
190
|
'("mainmenu" is rejected). Requires published/status=publish. ' +
|
|
253
|
-
'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.'),
|
|
254
195
|
layout: z
|
|
255
196
|
.record(z.string(), z.unknown())
|
|
256
197
|
.optional()
|
|
@@ -259,118 +200,58 @@ export const PAGES_CREATE_INPUT = {
|
|
|
259
200
|
.boolean()
|
|
260
201
|
.optional()
|
|
261
202
|
.describe('When true, runs validation Layers 1+2+4 without persisting.'),
|
|
262
|
-
// post_type intentionally NOT exposed — Layer 9 defensive guard rejects
|
|
263
|
-
// it server-side. Exposing it would invite footgun attempts.
|
|
264
203
|
};
|
|
265
|
-
/**
|
|
266
|
-
* Wire shape for `yootheme_builder_pages_create` on success (non-dry-run).
|
|
267
|
-
*
|
|
268
|
-
* Mirrors the REST 201 response shape.
|
|
269
|
-
*
|
|
270
|
-
* Design pins:
|
|
271
|
-
* - `frontend_url` is nullable: REST returns null for fresh drafts
|
|
272
|
-
* before publish.
|
|
273
|
-
* - `template_id` is a plain string. The "page:{post_id}" prefix is
|
|
274
|
-
* enforced server-side; adding a `.startsWith()` here would buy no
|
|
275
|
-
* MCP-client value while adding Zod complexity.
|
|
276
|
-
* - `warnings` is a lean string array (e.g. "slug_collision_resolved"
|
|
277
|
-
* when WP auto-appends `-2`). The REST surface may expand this to
|
|
278
|
-
* richer objects in v1.3; strings keep the v1.2 surface minimal.
|
|
279
|
-
*/
|
|
280
204
|
export const PAGES_CREATE_OUTPUT_SCHEMA = z
|
|
281
205
|
.object({
|
|
282
|
-
// E1 cross-platform divergence: WP returns `page_id`, Joomla returns
|
|
283
|
-
// `article_id`. Both are positive ints; at least one is always present.
|
|
284
206
|
page_id: z.number().int().positive().optional(),
|
|
285
207
|
article_id: z.number().int().positive().optional(),
|
|
286
208
|
title: z.string(),
|
|
287
209
|
slug: z.string(),
|
|
288
210
|
status: z.string(),
|
|
289
211
|
frontend_url: z.string().nullable(),
|
|
290
|
-
// F33 (2026-06-10): "open in the YOOtheme Pro builder" deep-link for
|
|
291
|
-
// the freshly-created page/article. Version-aware (WP YT4/YT5) +
|
|
292
|
-
// platform-aware (Joomla com_ajax). Nullable: null when the host
|
|
293
|
-
// could not resolve the admin base. `.optional()` keeps the schema
|
|
294
|
-
// back-compatible with an older host that predates the field.
|
|
295
212
|
builder_url: z.string().nullable().optional(),
|
|
296
|
-
|
|
213
|
+
layout_id: z
|
|
297
214
|
.string()
|
|
298
|
-
.describe('Synthetic per-page
|
|
215
|
+
.describe('Synthetic per-page layout id, e.g. "page:3275" (WP) or "article:42" (Joomla).'),
|
|
299
216
|
etag: z.string(),
|
|
300
217
|
warnings: z
|
|
301
218
|
.array(z.string())
|
|
302
219
|
.describe('e.g. "slug_collision_resolved" when slug collision was resolved.'),
|
|
303
220
|
})
|
|
304
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)' });
|
|
305
|
-
/**
|
|
306
|
-
* Wire shape for `yootheme_builder_pages_create` when `dry_run:true`.
|
|
307
|
-
*
|
|
308
|
-
* Design pin: NO `etag` field. The B6 fix-cycle decision was that
|
|
309
|
-
* surfacing a "live" ETag with a dry-run response invites a stale-
|
|
310
|
-
* If-Match footgun (caller pins the ETag, then non-dry-run mutates,
|
|
311
|
-
* stale ETag rejected with 412). Dry-run is validation-only.
|
|
312
|
-
*
|
|
313
|
-
* `template_id_pattern` is a literal — the actual `template_id` cannot
|
|
314
|
-
* be materialised before WP allocates the post_id.
|
|
315
|
-
*/
|
|
316
222
|
export const PAGES_CREATE_DRY_RUN_OUTPUT_SCHEMA = z.object({
|
|
317
223
|
dry_run: z.literal(true),
|
|
318
224
|
would_create: z.object({
|
|
319
225
|
title: z.string(),
|
|
320
226
|
slug: z.string(),
|
|
321
227
|
status: z.string(),
|
|
322
|
-
|
|
323
|
-
template_id_pattern: z.enum(['page:{post_id}', 'article:{article_id}']),
|
|
228
|
+
layout_id_pattern: z.enum(['page:{post_id}', 'article:{article_id}']),
|
|
324
229
|
}),
|
|
325
230
|
validation_report: z.object({
|
|
326
231
|
layer_1_structural: z.literal('passed'),
|
|
327
232
|
layer_2_element_types: z.literal('passed'),
|
|
328
233
|
layer_4_renderer: z.literal('passed'),
|
|
329
234
|
}),
|
|
330
|
-
// No `etag` field — by design (see B6 fix-cycle: stale-If-Match footgun).
|
|
331
235
|
});
|
|
332
|
-
/**
|
|
333
|
-
* Input shape for `yootheme_builder_pages_delete`.
|
|
334
|
-
*
|
|
335
|
-
* Mirrors the args of `DELETE /pages/{post_id}` (Phase B).
|
|
336
|
-
*
|
|
337
|
-
* Design pin: `confirm` is `z.literal(true)`. This is the Zod-side
|
|
338
|
-
* enforcement of the confirm gate — the MCP boundary rejects requests
|
|
339
|
-
* without `confirm:true` before they ever hit the REST layer.
|
|
340
|
-
*
|
|
341
|
-
* `force` defaults to false server-side → wp_delete_post(trash). When
|
|
342
|
-
* true → hard delete (irrecoverable).
|
|
343
|
-
*/
|
|
344
236
|
export const PAGES_DELETE_INPUT = {
|
|
345
|
-
|
|
346
|
-
.number()
|
|
347
|
-
.
|
|
348
|
-
.
|
|
349
|
-
.describe('ID of the page/article to delete — WordPress post_id or Joomla article_id ' +
|
|
350
|
-
'(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.'),
|
|
351
241
|
confirm: z
|
|
352
|
-
.literal(true)
|
|
353
|
-
.describe('Must be true. Confirm gate prevents accidental deletes.'),
|
|
354
|
-
force: z
|
|
355
242
|
.boolean()
|
|
356
243
|
.optional()
|
|
357
|
-
.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.'),
|
|
358
254
|
};
|
|
359
|
-
// ─── P-G (Goldstandard wave 3) — page_dynamize ────────────────────────
|
|
360
|
-
//
|
|
361
|
-
// The composite "dynamize an existing designed layout" write. The recipe
|
|
362
|
-
// of `dynamize-existing-layout.md` encoded server-side — the agent supplies
|
|
363
|
-
// ONLY the language-level inputs (which list source, which leaf maps to
|
|
364
|
-
// which flow field). F98 HYBRID EXECUTION: server runs the deterministic
|
|
365
|
-
// steps (copy byte-identically, swap queries + leaf names, keep everything
|
|
366
|
-
// else), reaching 85-95% compliance vs 60-70% for instruction-only.
|
|
367
|
-
/**
|
|
368
|
-
* A single `leaf_map` / `conditions` value — the F96 FieldMappingValue
|
|
369
|
-
* shape reused verbatim (mirrors `field_mappings` in `sources/builders.ts`):
|
|
370
|
-
* EITHER a plain string (the new flat field name) OR a structured
|
|
371
|
-
* `{name, filters?}` carrying an explicit YT5 filters operator (e.g. a
|
|
372
|
-
* `_condition` `{condition:'!!'}` or a date format `{date:'D, d.m.y'}`).
|
|
373
|
-
*/
|
|
374
255
|
const FIELD_MAPPING_VALUE = z.union([
|
|
375
256
|
z.string(),
|
|
376
257
|
z
|
|
@@ -385,20 +266,18 @@ const FIELD_MAPPING_VALUE = z.union([
|
|
|
385
266
|
})
|
|
386
267
|
.strict(),
|
|
387
268
|
]);
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
* `POST /pages/dynamize`. Narrowest-schema rule: `template_id` +
|
|
391
|
-
* `list_source_name` + `page.title` are required non-empty; `page` carries
|
|
392
|
-
* the create-machinery passthrough; the reference selector is `section_name`
|
|
393
|
-
* OR `element_path` (exactly-one is enforced server-side so a miss can list
|
|
394
|
-
* the available named sections as remediation).
|
|
395
|
-
*/
|
|
396
|
-
export const PAGE_DYNAMIZE_INPUT = {
|
|
397
|
-
template_id: z
|
|
269
|
+
export const PAGE_GENERATE_DYNAMIC_INPUT = {
|
|
270
|
+
layout_id: z
|
|
398
271
|
.string()
|
|
399
272
|
.min(1)
|
|
400
|
-
.describe('
|
|
273
|
+
.describe('The layout holding the REFERENCE section (e.g. "default"). ' +
|
|
401
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.'),
|
|
402
281
|
section_name: z
|
|
403
282
|
.string()
|
|
404
283
|
.min(1)
|
|
@@ -411,7 +290,9 @@ export const PAGE_DYNAMIZE_INPUT = {
|
|
|
411
290
|
.min(1)
|
|
412
291
|
.optional()
|
|
413
292
|
.describe('JSON-Pointer / rel-path to the reference subtree (e.g. "/children/2"). ' +
|
|
414
|
-
'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).'),
|
|
415
296
|
list_source_name: z
|
|
416
297
|
.string()
|
|
417
298
|
.min(1)
|
|
@@ -421,10 +302,6 @@ export const PAGE_DYNAMIZE_INPUT = {
|
|
|
421
302
|
'(apiMapperFlow…List, e.g. "apiMapperFlowAbcList") OR a native source/relation ' +
|
|
422
303
|
'(e.g. "posts.customPosts", "articles"). Provide THIS or `source_map` — exactly ' +
|
|
423
304
|
'one. Use yootheme_builder_sources_list to discover.'),
|
|
424
|
-
// F201 (multi-block): a section with SEVERAL source blocks (Played / Next /
|
|
425
|
-
// Later) dynamizes in ONE call. Each entry keys the EXISTING iterating
|
|
426
|
-
// column query (`match`) to its flow list source (`source_name`) + its own
|
|
427
|
-
// leaf_map. Provide THIS or `list_source_name` — exactly one.
|
|
428
305
|
source_map: z
|
|
429
306
|
.array(z
|
|
430
307
|
.object({
|
|
@@ -499,13 +376,7 @@ export const PAGE_DYNAMIZE_INPUT = {
|
|
|
499
376
|
.describe('Joomla only: create a SEF route. true = hidden menutype; a string picks it.'),
|
|
500
377
|
})
|
|
501
378
|
.describe('Passthrough to the existing create machinery (slug-collision, menu_item routing).'),
|
|
502
|
-
etag:
|
|
503
|
-
.string()
|
|
504
|
-
.min(1)
|
|
505
|
-
.optional()
|
|
506
|
-
.describe('Optimistic-lock ETag from yootheme_builder_get_etag. Optional; when provided, ' +
|
|
507
|
-
'412 on conflict. Recommended for collaborative edits.'),
|
|
508
|
-
// SOURCES_BINDING-27: preflight the dynamize without creating a page.
|
|
379
|
+
etag: ETAG_PREVIEW_OPTIONAL.optional(),
|
|
509
380
|
dry_run: z
|
|
510
381
|
.boolean()
|
|
511
382
|
.optional()
|
|
@@ -514,57 +385,248 @@ export const PAGE_DYNAMIZE_INPUT = {
|
|
|
514
385
|
'(etag == new_etag). Inspect summary.queries_swapped / unmatched_map_keys ' +
|
|
515
386
|
'before the real call.'),
|
|
516
387
|
};
|
|
517
|
-
/**
|
|
518
|
-
* Wire shape for `yootheme_builder_pages_delete` on success.
|
|
519
|
-
*
|
|
520
|
-
* `deleted` is `z.literal(true)` — the success-response invariant. A
|
|
521
|
-
* failed delete surfaces as `isError:true` with a structured-error
|
|
522
|
-
* envelope, not as `deleted:false`.
|
|
523
|
-
*/
|
|
524
388
|
export const PAGES_DELETE_OUTPUT_SCHEMA = z
|
|
525
389
|
.object({
|
|
526
|
-
|
|
527
|
-
|
|
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(),
|
|
528
396
|
page_id: z.number().int().positive().optional(),
|
|
529
397
|
article_id: z.number().int().positive().optional(),
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
// it touched. pages_delete forwards the PHP body VERBATIM via
|
|
535
|
-
// structuredResult, so these MUST be declared here — the host
|
|
536
|
-
// validates structuredContent under additionalProperties:false and a
|
|
537
|
-
// 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(),
|
|
538
402
|
new_etag: z.string().optional(),
|
|
539
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.'),
|
|
540
453
|
})
|
|
541
|
-
.
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
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
|
+
});
|
|
561
629
|
export const TARGET_KEYS = ['template_id', 'post_id', 'url', 'special', 'title'];
|
|
562
|
-
/**
|
|
563
|
-
* The semantic-special vocabulary, byte-identical to PHP `SpecialTargetMap`'s
|
|
564
|
-
* key set. `date` is IN the vocabulary but unsupported on both platforms — it
|
|
565
|
-
* resolves to a clean `special_not_supported` error rather than "unknown
|
|
566
|
-
* special", which is why it is listed here.
|
|
567
|
-
*/
|
|
568
630
|
export const SPECIAL_TARGET_TOKENS = [
|
|
569
631
|
'home',
|
|
570
632
|
'front-page',
|
|
@@ -617,9 +679,6 @@ export const PAGES_TARGET = z
|
|
|
617
679
|
'special / title — supplying two returns a typed too_many_targets error, ' +
|
|
618
680
|
'supplying none runs the unscoped default.');
|
|
619
681
|
export const PAGES_RESOLVE_INPUT = {
|
|
620
|
-
// A-6: OPTIONAL since a target-only resolve must be expressible. The
|
|
621
|
-
// exactly-one-of(url, target) contract lives in `handlePagesResolve`
|
|
622
|
-
// (typed too_many_targets / missing_url), not in the schema.
|
|
623
682
|
url: z
|
|
624
683
|
.string()
|
|
625
684
|
.min(1)
|
|
@@ -633,112 +692,49 @@ export const PAGES_RESOLVE_INPUT = {
|
|
|
633
692
|
'"author", "archive") or a title substring. Mutually exclusive with `url`.'),
|
|
634
693
|
};
|
|
635
694
|
export const PAGES_RESOLVE_OUTPUT_SCHEMA = z.object({
|
|
636
|
-
|
|
637
|
-
// (page_get_layout, page_get_schema, element_*): a `page:<id>` (WP) /
|
|
638
|
-
// `article:<id>` (Joomla) token for a per-page layout, OR the raw
|
|
639
|
-
// `templates.<id>` key for a governing THEME TEMPLATE (G-A2).
|
|
640
|
-
template_id: z.string(),
|
|
641
|
-
// The resolved integer post-id (WP) / article-id (Joomla) for a per-page
|
|
642
|
-
// layout, or NULL for a theme template (an archive URL has no single post).
|
|
695
|
+
layout_id: z.string(),
|
|
643
696
|
post_id: z.number().int().positive().nullable(),
|
|
644
|
-
// Content type — `get_post_type`/archive post-type/taxonomy on WP,
|
|
645
|
-
// "article"/"category" on Joomla.
|
|
646
697
|
type: z.string(),
|
|
647
|
-
// The page's human display name. Load-bearing for the fuzzy addresses: a
|
|
648
|
-
// `special`/`title` resolve is only checkable if the caller can see WHICH
|
|
649
|
-
// page it landed on without a second round-trip. `.optional()` because a
|
|
650
|
-
// host predating the label fill omits it and this is a STRICT object.
|
|
651
698
|
label: z.string().optional(),
|
|
652
|
-
// Canonical permalink (null when the platform cannot re-derive one).
|
|
653
699
|
frontend_url: z.string().nullable(),
|
|
654
|
-
// G-A2: the matched YT type/condition for a theme template
|
|
655
|
-
// (e.g. "archive-example_help", "taxonomy-category_faq"), else null for a
|
|
656
|
-
// per-page layout.
|
|
657
700
|
context: z.string().nullable(),
|
|
658
|
-
// G-A2: which kind was resolved — a per-page layout vs. the governing theme
|
|
659
|
-
// template — so the agent knows it reached the right surface.
|
|
660
701
|
resolved_via: z.enum(['per_page', 'theme_template']),
|
|
661
|
-
// A-6: WHICH branch of the `target` object matched, echoed so the caller can
|
|
662
|
-
// tell the user how a fuzzy address (a title substring, a semantic special)
|
|
663
|
-
// was interpreted. `.optional()` is load-bearing: a `url` resolve and every
|
|
664
|
-
// host predating A-5 omit it, and this is a STRICT object.
|
|
665
702
|
matched_by: z.enum(TARGET_KEYS).optional(),
|
|
666
703
|
});
|
|
667
|
-
// ─── F5 + N5 (customer HANDOFF-4/5) — render_preview ──────────────────
|
|
668
|
-
//
|
|
669
|
-
// The input shape (`template_id` OR `url`, exactly one — mirroring
|
|
670
|
-
// page_get_layout's addressing) is assembled in `builders.ts` from the shared
|
|
671
|
-
// TEMPLATE_ID_OPTIONAL + RESOLVE_URL schemas, the same way pages_resolve /
|
|
672
|
-
// page_get_layout do. Only the STRICT output schema lives here.
|
|
673
|
-
/**
|
|
674
|
-
* Wire shape for `yootheme_builder_render_preview` on success.
|
|
675
|
-
*
|
|
676
|
-
* STRICT (additionalProperties:false default ZodObject) — every field the
|
|
677
|
-
* handler puts in structuredContent MUST be declared here, or a strict MCP
|
|
678
|
-
* host -32602-rejects the SUCCESS (the structured-content-shape-pin guard
|
|
679
|
-
* enforces this).
|
|
680
|
-
*
|
|
681
|
-
* - rendered: the in-process Builder render did NOT throw.
|
|
682
|
-
* - item_count: count of rendered repeat-source items (`el-item` rows).
|
|
683
|
-
* - empty: the rendered HTML is empty / whitespace-only.
|
|
684
|
-
* - error: OPTIONAL — present ONLY when the render threw; the otherwise-
|
|
685
|
-
* swallowed YOOtheme render message.
|
|
686
|
-
* - cache_purge_hint: the constant operator steer (purge Rocket/CDN after save).
|
|
687
|
-
* - template_id: echoed back (the resolved id the render ran on).
|
|
688
|
-
* - matched: OPTIONAL — present ONLY when the caller passed `expect`; did the
|
|
689
|
-
* rendered HTML contain that substring (customer HANDOFF-6 #4).
|
|
690
|
-
* - snippet: OPTIONAL — present ONLY when the caller passed `expect`; a
|
|
691
|
-
* ~200-char window around the first match (or null when not
|
|
692
|
-
* matched / the render threw). NULLABLE so the no-match case
|
|
693
|
-
* validates under the strict schema.
|
|
694
|
-
*/
|
|
695
704
|
export const RENDER_PREVIEW_OUTPUT_SCHEMA = z.object({
|
|
705
|
+
...RESOLVED_LAYOUT_ID_OUTPUT,
|
|
696
706
|
rendered: z.boolean(),
|
|
697
|
-
|
|
707
|
+
rendered_item_wrapper_count: z.number().int().nonnegative(),
|
|
708
|
+
rendered_item_wrapper_count_note: z.string().optional(),
|
|
698
709
|
empty: z.boolean(),
|
|
710
|
+
fallback_used: z.boolean(),
|
|
711
|
+
dropped_count: z.number().int().nonnegative(),
|
|
712
|
+
dropped_count_note: z.string().optional(),
|
|
699
713
|
error: z.string().optional(),
|
|
700
714
|
cache_purge_hint: z.string(),
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
// (strict ZodObject → additionalProperties:false) so a strict host does not
|
|
705
|
-
// -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(),
|
|
706
718
|
matched: z.boolean().optional(),
|
|
707
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(),
|
|
708
734
|
});
|
|
709
|
-
// ─── T-A5 (heading_outline tool, mega-push plan 2026-07-24-02) ─────────────
|
|
710
|
-
//
|
|
711
|
-
// A real, doc-order H1-H6 outline of ONE template, each heading attributed to
|
|
712
|
-
// its SOURCE element (`element_type`/`path`), plus the alt-status of every
|
|
713
|
-
// image (including images living inside `html`/`text`/`code` raw markup).
|
|
714
|
-
// Read-only STRUCTURE inspection — no findings/severity (that is
|
|
715
|
-
// `pages_audit`'s job). `template_id`-only addressing (no `post_id`/`url`
|
|
716
|
-
// sugar): resolve via `yootheme_builder_pages_resolve` first, like the other
|
|
717
|
-
// per-page tools that need a bare template_id.
|
|
718
|
-
//
|
|
719
|
-
// The INPUT shape is assembled directly in `builders.ts` (template_id + a
|
|
720
|
-
// local `mode` enum), mirroring render_preview/template_summary — only the
|
|
721
|
-
// STRICT output schema lives here.
|
|
722
|
-
/**
|
|
723
|
-
* Wire shape for `yootheme_builder_heading_outline` on success.
|
|
724
|
-
*
|
|
725
|
-
* STRICT (additionalProperties:false default ZodObject) — every field the
|
|
726
|
-
* handler puts in structuredContent MUST be declared here, or a strict MCP
|
|
727
|
-
* host -32602-rejects the SUCCESS.
|
|
728
|
-
*
|
|
729
|
-
* - outline: every H1-H6 heading, in TRUE document order, each carrying its
|
|
730
|
-
* TEXT and the source element that carries it (`element_type`/`path`).
|
|
731
|
-
* - images: every image this pass sees (populated OR empty alt) — `alt` is
|
|
732
|
-
* null for a missing/empty alt, the raw string otherwise; `is_generic_alt`
|
|
733
|
-
* flags an exact match against the same generic-phrase list pages_audit's
|
|
734
|
-
* `generic-alt-text` check uses ("logo", "image", "photo", ...).
|
|
735
|
-
* - h1_count / has_level_skip / images_missing_alt: derived flags —
|
|
736
|
-
* has_level_skip mirrors pages_audit's `heading-skip` check EXACTLY (a
|
|
737
|
-
* level more than one above the highest seen so far, including a
|
|
738
|
-
* document that OPENS below h1).
|
|
739
|
-
*/
|
|
740
735
|
export const HEADING_OUTLINE_OUTPUT_SCHEMA = z.object({
|
|
741
|
-
|
|
736
|
+
...RESOLVED_LAYOUT_ID_OUTPUT,
|
|
737
|
+
layout_id: z.string(),
|
|
742
738
|
mode: z.enum(['builder', 'rendered']),
|
|
743
739
|
etag: z.string(),
|
|
744
740
|
outline: z.array(z.object({
|
|
@@ -756,35 +752,9 @@ export const HEADING_OUTLINE_OUTPUT_SCHEMA = z.object({
|
|
|
756
752
|
h1_count: z.number().int().nonnegative(),
|
|
757
753
|
has_level_skip: z.boolean(),
|
|
758
754
|
images_missing_alt: z.number().int().nonnegative(),
|
|
755
|
+
render_fallback_used: z.boolean().optional(),
|
|
756
|
+
render_dropped_count: z.number().int().nonnegative().optional(),
|
|
759
757
|
});
|
|
760
|
-
// ─── Task 6 (pages_audit design, 2026-07-19) — shared FINDING/QUICK_CHECK ──
|
|
761
|
-
//
|
|
762
|
-
// Defined ONCE here — referenced by `pages_audit`'s own output schema AND
|
|
763
|
-
// (Task 8) `page_publish` / `page_save`'s additive `quick_check` block, so
|
|
764
|
-
// the finding shape has exactly one source of truth across all three
|
|
765
|
-
// surfaces (design §5-§7). Mirrors the PHP wire shape verbatim
|
|
766
|
-
// (`PageAuditService::audit()` / `AuditCheck`'s partial-finding contract).
|
|
767
|
-
/**
|
|
768
|
-
* The human-locatable address of ONE audit hit (B-3/B-5) — mirrors the PHP
|
|
769
|
-
* `FindingLocator::toArray()` wire shape. `path` stays the machine write
|
|
770
|
-
* address; `breadcrumb`/`element_type`/`element_name` are what a HUMAN needs
|
|
771
|
-
* to find the element in the customizer. Per the PHP null-key policy the
|
|
772
|
-
* optional members are OMITTED rather than sent as null.
|
|
773
|
-
*
|
|
774
|
-
* FAIL-SOFT BY CONSTRUCTION. `pages[]` rows used to ride through
|
|
775
|
-
* `.catchall(z.unknown())` untyped; now that `locators` is a typed array, a
|
|
776
|
-
* mismatch is no longer stripped — the MCP SDK THROWS `McpError`
|
|
777
|
-
* (InvalidParams) on an outputSchema violation, which fails the WHOLE audit
|
|
778
|
-
* call. So the optional members are `.nullish()` (an explicit `null` from a
|
|
779
|
-
* host that does not honour the omit-nulls policy must not be fatal) and the
|
|
780
|
-
* object carries a `.catchall`, so a field a future host version adds can
|
|
781
|
-
* never hard-fail an otherwise perfectly good audit.
|
|
782
|
-
*
|
|
783
|
-
* `repeat` is the one deliberately STRICT member: PHP emits it clamped to
|
|
784
|
-
* `>= 1` (`repeat: 0` is meaningless — a hit that renders zero times is not a
|
|
785
|
-
* hit), so `min(1)` states the real contract rather than tolerating a value
|
|
786
|
-
* that could only mean a producer bug.
|
|
787
|
-
*/
|
|
788
758
|
export const FINDING_LOCATOR = z
|
|
789
759
|
.object({
|
|
790
760
|
path: z.string(),
|
|
@@ -798,64 +768,26 @@ export const FINDING_LOCATOR = z
|
|
|
798
768
|
name: z.string().nullish(),
|
|
799
769
|
})
|
|
800
770
|
.catchall(z.unknown());
|
|
801
|
-
/**
|
|
802
|
-
* One audit finding. `pages` carries per-page mini-evidence whose KEYS vary
|
|
803
|
-
* by check code (`first_headline_path`, `alt_paths`, `cluster_id`,
|
|
804
|
-
* `iterated`, `disabled_elements`, `elements_content`, ...) — `.catchall`
|
|
805
|
-
* keeps every row's base `{id, label}` typed while tolerating the
|
|
806
|
-
* check-specific extras without a per-code union.
|
|
807
|
-
*
|
|
808
|
-
* The ADDITIVE B-3/B-5 keys (`locators`, `hits_truncated`,
|
|
809
|
-
* `locators_stripped`, `builder_url`) are declared EXPLICITLY for
|
|
810
|
-
* self-documentation — the `.catchall` already tolerated them, but a named
|
|
811
|
-
* member states the contract. All stay `.optional()`: a host plugin predating
|
|
812
|
-
* B-3 emits none of them.
|
|
813
|
-
*
|
|
814
|
-
* `frontend_url` (T-B1, 2026-07-24) rides alongside `builder_url` on EVERY
|
|
815
|
-
* page entry now, not just the nine element-located "hit" checks — a
|
|
816
|
-
* theme/archive template with no public route legitimately omits it (never
|
|
817
|
-
* emitted as `null`), same convention as `builder_url`.
|
|
818
|
-
*
|
|
819
|
-
* `hits_truncated` and `locators_stripped` mean DIFFERENT things and are never
|
|
820
|
-
* interchangeable: the former says the upstream `hit_cap` dropped hits (so the
|
|
821
|
-
* raw `paths`/`alt_paths`/`skips`/`dead_anchors` arrays are incomplete), the
|
|
822
|
-
* latter says the transport's shrink-to-fit shed locator PROSE while leaving
|
|
823
|
-
* those arrays complete.
|
|
824
|
-
*
|
|
825
|
-
* FORWARD-COMPAT `.catchall`, for the same reason `FINDING_LOCATOR` carries one:
|
|
826
|
-
* the handler forwards each finding VERBATIM, and a strict object generates
|
|
827
|
-
* `additionalProperties:false`, so ONE additive field on the PHP side (an
|
|
828
|
-
* explicit hit total, a new evidence key) would make a strict host -32602-reject
|
|
829
|
-
* an otherwise perfect audit. Every declared member is still validated; only
|
|
830
|
-
* UNDECLARED ones ride through untyped.
|
|
831
|
-
*/
|
|
832
771
|
export const FINDING = z.object({
|
|
833
772
|
code: z.string(),
|
|
834
773
|
category: z.enum(['seo', 'structure', 'content', 'links', 'design']),
|
|
835
774
|
severity: z.enum(['critical', 'warning', 'info']),
|
|
836
775
|
title: z.string(),
|
|
837
|
-
|
|
776
|
+
affected_pages: z.number().int().nonnegative(),
|
|
838
777
|
pages: z.array(z
|
|
839
778
|
.object({
|
|
840
779
|
id: z.string(),
|
|
841
780
|
label: z.string(),
|
|
842
781
|
locators: z.array(FINDING_LOCATOR).optional(),
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
// therefore emits an unambiguous `hits` alias next to a page
|
|
846
|
-
// entry's `count` whenever that count really is a hit tally.
|
|
847
|
-
// Declared (not merely tolerated via `.catchall`) so the field
|
|
848
|
-
// is part of the contract and `hitCountOf` may prefer it.
|
|
849
|
-
hits: z.number().int().nonnegative().optional(),
|
|
782
|
+
occurrences_here: z.number().int().nonnegative().optional(),
|
|
783
|
+
bound_gaps_not_counted: z.number().int().nonnegative().optional(),
|
|
850
784
|
hits_truncated: z.boolean().optional(),
|
|
851
785
|
locators_stripped: z.boolean().optional(),
|
|
852
786
|
builder_url: z.string().nullable().optional(),
|
|
853
787
|
frontend_url: z.string().nullable().optional(),
|
|
854
788
|
})
|
|
855
789
|
.catchall(z.unknown())),
|
|
856
|
-
|
|
857
|
-
// Machine-executable remediation (design §5): absent for findings with
|
|
858
|
-
// NO safe auto-fix (duplicate-layout, title-collision — human decision).
|
|
790
|
+
finding_pages_truncated: z.boolean(),
|
|
859
791
|
fix_hint: z
|
|
860
792
|
.object({
|
|
861
793
|
tool: z.string(),
|
|
@@ -864,46 +796,43 @@ export const FINDING = z.object({
|
|
|
864
796
|
})
|
|
865
797
|
.optional(),
|
|
866
798
|
}).catchall(z.unknown());
|
|
867
|
-
/**
|
|
868
|
-
* The advisory block `page_publish` (default on) / `page_save`
|
|
869
|
-
* (opt-in via `quick_check:true`) attach (Task 8). Design §7: `{clean:true}`
|
|
870
|
-
* on zero findings, else `{findings, note}` pointing at `pages_audit` for
|
|
871
|
-
* the site-wide (scope==='site') checks this per-page pass does not run.
|
|
872
|
-
*/
|
|
873
799
|
export const QUICK_CHECK = z.object({
|
|
874
800
|
clean: z.boolean().optional(),
|
|
875
801
|
findings: z.array(FINDING).optional(),
|
|
876
802
|
note: z.string().optional(),
|
|
877
803
|
});
|
|
878
|
-
/**
|
|
879
|
-
* Input shape for `yootheme_builder_pages_audit` (design §5). `site_id` is
|
|
880
|
-
* spread in separately by `builders.ts` (mirrors PAGES_RESOLVE_INPUT).
|
|
881
|
-
*/
|
|
882
804
|
export const PAGES_AUDIT_INPUT = {
|
|
883
|
-
// T-A2 (mega-push plan 2026-07-24-02): opt-in rendered-DOM audit. Default
|
|
884
|
-
// omitted = "builder", byte-identical to the pre-T-A2 sweep (reads the
|
|
885
|
-
// saved layout JSON tree; no `mode`/`render_scan`/`render_errors` keys on
|
|
886
|
-
// the response).
|
|
887
805
|
mode: z
|
|
888
806
|
.enum(['builder', 'rendered'])
|
|
889
807
|
.optional()
|
|
890
808
|
.describe('Audit source. "builder" (default) reads the saved layout tree: fast, but blind to ' +
|
|
891
|
-
'module/widget output and anything a plugin injects only at render time
|
|
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". ' +
|
|
892
813
|
'"rendered" renders each page first (via the SAME engine render_preview uses) and ' +
|
|
893
|
-
'audits the ACTUAL DOM
|
|
894
|
-
'
|
|
895
|
-
'
|
|
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 ' +
|
|
896
823
|
'plugin form (Formidable/ACF) only exists at render time. Findings carry no builder ' +
|
|
897
824
|
'element path in this mode (empty breadcrumb/' +
|
|
898
825
|
'element_type by design, there is no builder node to point at); locate the hit by ' +
|
|
899
826
|
'its content_snippet or the page\'s builder_url/frontend_url instead. A SITE-wide ' +
|
|
900
827
|
'rendered sweep is capped (rendering is expensive); the response\'s render_scan ' +
|
|
901
|
-
'{attempted, rendered, capped} always says so honestly
|
|
902
|
-
'
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
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).'),
|
|
907
836
|
target: PAGES_TARGET.optional().describe('Audit ONE page instead of the whole site — by template_id, post_id, url, a ' +
|
|
908
837
|
'semantic special ("home", "blog", "404", "search", "category", "tag", ' +
|
|
909
838
|
'"author", "archive") or a title substring. The response then carries ' +
|
|
@@ -919,12 +848,21 @@ export const PAGES_AUDIT_INPUT = {
|
|
|
919
848
|
.array(z.enum(['seo', 'structure', 'content', 'links', 'design']))
|
|
920
849
|
.optional()
|
|
921
850
|
.describe('Run only these check categories (default: all five). "seo" = title-collision, ' +
|
|
922
|
-
'non-pretty-url, stale-content. "structure" = empty-page,
|
|
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, ' +
|
|
923
856
|
'multiple-h1, no-headings, heading-skip, heading-hidden-on-mobile (hidden at ' +
|
|
924
857
|
'the mobile-first UIkit breakpoint; Google indexes mobile-first, so this is ' +
|
|
925
858
|
'effectively invisible for ranking), long-heading. "content" = ' +
|
|
926
859
|
'images-missing-alt, generic-alt-text, thin-content, duplicate-layout. ' +
|
|
927
|
-
'"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, ' +
|
|
928
866
|
'design-foreign-class, design-inline-style: markup breaking out of the UIkit ' +
|
|
929
867
|
'design system (e.g. a plugin form submit button with no uk-button); most ' +
|
|
930
868
|
'valuable in mode:"rendered", where a plugin\'s own output actually exists — ' +
|
|
@@ -952,50 +890,51 @@ export const PAGES_AUDIT_INPUT = {
|
|
|
952
890
|
.optional()
|
|
953
891
|
.describe('Months since a page\'s `modified_at` after which it is flagged `stale-content`. ' +
|
|
954
892
|
'Pages with an empty modified_at are never flagged. Default: 24.'),
|
|
955
|
-
// PERF-4 / PROD-2: on THIS tool `max_chars` bounds BOTH legs — the shared
|
|
956
|
-
// describe's "structuredContent stays complete" is true everywhere else,
|
|
957
|
-
// but an audit's structured leg was measured at 349 KB (~89k tokens) for a
|
|
958
|
-
// site sweep, so it carries its own default ceiling
|
|
959
|
-
// ({@see STRUCTURED_BUDGET_CHARS}) that this argument raises or lowers.
|
|
960
893
|
max_chars: MAX_CHARS.describe('Optional cap (chars) on this result. Bounds BOTH the text leg and the ' +
|
|
961
894
|
'structuredContent payload (default: 48000 chars for structuredContent). ' +
|
|
962
895
|
'When the structured leg has to shrink, locator detail is shed before ' +
|
|
963
|
-
'evidence pages and the response carries structured_truncated:true.
|
|
964
|
-
'
|
|
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`.'),
|
|
965
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.'),
|
|
966
925
|
};
|
|
967
|
-
/**
|
|
968
|
-
* Wire shape for `yootheme_builder_pages_audit` (design §5). `scanned.by_type`
|
|
969
|
-
* is a `Record<string, number>` — the PHP side already normalizes an empty
|
|
970
|
-
* sweep to `(object) []` (`{}` over the wire), matching this schema without
|
|
971
|
-
* the array-vs-object workaround `template_summary` needed (Task #46).
|
|
972
|
-
*/
|
|
973
926
|
export const PAGES_AUDIT_OUTPUT_SCHEMA = z.object({
|
|
974
927
|
etag: z.string(),
|
|
975
|
-
// B-5 — the three single-target keys. `.optional()` is LOAD-BEARING, not
|
|
976
|
-
// decoration: this is a strict object, and both a site sweep and every
|
|
977
|
-
// host predating single-target mode omit all three, so a non-optional
|
|
978
|
-
// member would make every such (perfectly valid) response fail validation.
|
|
979
928
|
scope: z.string().optional(),
|
|
980
929
|
note: z.string().optional(),
|
|
981
|
-
// Every member of `PageQuery::descriptorFromRow()` /
|
|
982
|
-
// `augmentResolverDescriptor()` must be declared here — the audit handler
|
|
983
|
-
// forwards `resolved_target` VERBATIM, and this object generates
|
|
984
|
-
// `additionalProperties:false`, so an undeclared key makes a strict host
|
|
985
|
-
// -32602-reject a SUCCESSFUL call (W12-R2). All eight are `.optional()`
|
|
986
|
-
// because a host predating single-target mode sends none of them.
|
|
987
930
|
resolved_target: z
|
|
988
931
|
.object({
|
|
989
|
-
|
|
932
|
+
layout_id: z.string().optional(),
|
|
990
933
|
post_id: z.union([z.number(), z.string()]).nullable().optional(),
|
|
991
934
|
type: z.string().optional(),
|
|
992
935
|
label: z.string().optional(),
|
|
993
936
|
frontend_url: z.string().nullable().optional(),
|
|
994
|
-
// The matched YT type/condition for a theme template
|
|
995
|
-
// (e.g. "taxonomy-category_faq"); null for a per-page layout.
|
|
996
937
|
context: z.string().nullable().optional(),
|
|
997
|
-
// `per_page` | `theme_template` — kept a plain string rather than an
|
|
998
|
-
// enum so a newer host's additional kind is forwarded, not rejected.
|
|
999
938
|
resolved_via: z.string().optional(),
|
|
1000
939
|
matched_by: z.string().optional(),
|
|
1001
940
|
})
|
|
@@ -1005,42 +944,68 @@ export const PAGES_AUDIT_OUTPUT_SCHEMA = z.object({
|
|
|
1005
944
|
by_type: z.record(z.string(), z.number().int().nonnegative()),
|
|
1006
945
|
}),
|
|
1007
946
|
summary: z.object({
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
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(),
|
|
1011
952
|
}),
|
|
1012
953
|
findings: z.array(FINDING),
|
|
1013
954
|
disclaimer: z.string(),
|
|
1014
|
-
|
|
1015
|
-
// ladder had to run to bring `structuredContent` under its char budget.
|
|
1016
|
-
// Its PRESENCE is the whole signal: a complete payload omits the key
|
|
1017
|
-
// entirely, so a reader can never mistake a shrunk audit for a full one.
|
|
1018
|
-
// Which entries lost what is flagged in place — `locators_stripped` on the
|
|
1019
|
-
// page rows whose locator prose went, `pages_truncated` on the findings
|
|
1020
|
-
// whose evidence pages were capped or dropped.
|
|
955
|
+
occurrences_unit: z.string().optional(),
|
|
1021
956
|
structured_truncated: z.boolean().optional(),
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
// behaviour" convention). `render_scan` is ALWAYS present alongside it,
|
|
1025
|
-
// even when the cap never engaged — Design-Nut 4's "never silent" rule:
|
|
1026
|
-
// a caller can always see attempted vs. actually-rendered.
|
|
957
|
+
truncated_by: z.array(z.enum(['response_budget', 'per_page_hit_cap'])).optional(),
|
|
958
|
+
truncation_remedy: z.string().optional(),
|
|
1027
959
|
mode: z.enum(['rendered']).optional(),
|
|
1028
960
|
render_scan: z
|
|
1029
961
|
.object({
|
|
1030
962
|
attempted: z.number().int().nonnegative(),
|
|
1031
963
|
rendered: z.number().int().nonnegative(),
|
|
1032
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(),
|
|
1033
976
|
})
|
|
1034
977
|
.optional(),
|
|
1035
|
-
// Present only when at least one template's render threw — excluded from
|
|
1036
|
-
// findings entirely (a render failure must never masquerade as a content
|
|
1037
|
-
// finding), surfaced here instead so nothing is silently dropped.
|
|
1038
978
|
render_errors: z
|
|
1039
979
|
.array(z.object({
|
|
1040
980
|
id: z.string(),
|
|
1041
981
|
label: z.string(),
|
|
1042
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(),
|
|
1043
1006
|
}))
|
|
1044
1007
|
.optional(),
|
|
1008
|
+
modules_by_page_omitted: z.boolean().optional(),
|
|
1009
|
+
retry_hint: z.string().optional(),
|
|
1045
1010
|
});
|
|
1046
1011
|
//# sourceMappingURL=schemas.js.map
|