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