@wootsup/yt-builder-mcp 1.1.6 → 1.2.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 +7 -7
- package/bin/yt-builder-mcp.js +55 -40
- package/dist/auth.d.ts +137 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +244 -0
- package/dist/auth.js.map +1 -0
- package/dist/cli/invocation-decision.d.ts +57 -0
- package/dist/cli/invocation-decision.d.ts.map +1 -0
- package/dist/cli/invocation-decision.js +86 -0
- package/dist/cli/invocation-decision.js.map +1 -0
- package/dist/client.d.ts +112 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +190 -0
- package/dist/client.js.map +1 -0
- package/dist/clients/claude-code.d.ts +18 -0
- package/dist/clients/claude-code.d.ts.map +1 -0
- package/dist/clients/claude-code.js +55 -0
- package/dist/clients/claude-code.js.map +1 -0
- package/dist/clients/claude-desktop.d.ts +19 -0
- package/dist/clients/claude-desktop.d.ts.map +1 -0
- package/dist/clients/claude-desktop.js +58 -0
- package/dist/clients/claude-desktop.js.map +1 -0
- package/dist/clients/cline.d.ts +26 -0
- package/dist/clients/cline.d.ts.map +1 -0
- package/dist/clients/cline.js +82 -0
- package/dist/clients/cline.js.map +1 -0
- package/dist/clients/codex-cli.d.ts +42 -0
- package/dist/clients/codex-cli.d.ts.map +1 -0
- package/dist/clients/codex-cli.js +292 -0
- package/dist/clients/codex-cli.js.map +1 -0
- package/dist/clients/continue.d.ts +13 -0
- package/dist/clients/continue.d.ts.map +1 -0
- package/dist/clients/continue.js +121 -0
- package/dist/clients/continue.js.map +1 -0
- package/dist/clients/cursor.d.ts +12 -0
- package/dist/clients/cursor.d.ts.map +1 -0
- package/dist/clients/cursor.js +40 -0
- package/dist/clients/cursor.js.map +1 -0
- package/dist/clients/gemini-cli.d.ts +18 -0
- package/dist/clients/gemini-cli.d.ts.map +1 -0
- package/dist/clients/gemini-cli.js +46 -0
- package/dist/clients/gemini-cli.js.map +1 -0
- package/dist/clients/home.d.ts +14 -0
- package/dist/clients/home.d.ts.map +1 -0
- package/dist/clients/home.js +20 -0
- package/dist/clients/home.js.map +1 -0
- package/dist/clients/index.d.ts +156 -0
- package/dist/clients/index.d.ts.map +1 -0
- package/dist/clients/index.js +213 -0
- package/dist/clients/index.js.map +1 -0
- package/dist/clients/roo-code.d.ts +23 -0
- package/dist/clients/roo-code.d.ts.map +1 -0
- package/dist/clients/roo-code.js +71 -0
- package/dist/clients/roo-code.js.map +1 -0
- package/dist/clients/zed.d.ts +12 -0
- package/dist/clients/zed.d.ts.map +1 -0
- package/dist/clients/zed.js +43 -0
- package/dist/clients/zed.js.map +1 -0
- package/dist/errors/hints.d.ts +51 -0
- package/dist/errors/hints.d.ts.map +1 -0
- package/dist/errors/hints.js +95 -0
- package/dist/errors/hints.js.map +1 -0
- package/dist/errors/mask.d.ts +35 -0
- package/dist/errors/mask.d.ts.map +1 -0
- package/dist/errors/mask.js +49 -0
- package/dist/errors/mask.js.map +1 -0
- package/dist/errors/sanitize.d.ts +31 -0
- package/dist/errors/sanitize.d.ts.map +1 -0
- package/dist/errors/sanitize.js +100 -0
- package/dist/errors/sanitize.js.map +1 -0
- package/dist/errors.d.ts +42 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +61 -0
- package/dist/errors.js.map +1 -0
- package/dist/gateway/advanced-tool/discovery.d.ts +19 -0
- package/dist/gateway/advanced-tool/discovery.d.ts.map +1 -0
- package/dist/gateway/advanced-tool/discovery.js +53 -0
- package/dist/gateway/advanced-tool/discovery.js.map +1 -0
- package/dist/gateway/advanced-tool/domains.d.ts +47 -0
- package/dist/gateway/advanced-tool/domains.d.ts.map +1 -0
- package/dist/gateway/advanced-tool/domains.js +94 -0
- package/dist/gateway/advanced-tool/domains.js.map +1 -0
- package/dist/gateway/advanced-tool/execute.d.ts +29 -0
- package/dist/gateway/advanced-tool/execute.d.ts.map +1 -0
- package/dist/gateway/advanced-tool/execute.js +54 -0
- package/dist/gateway/advanced-tool/execute.js.map +1 -0
- package/dist/gateway/advanced-tool/index.d.ts +36 -0
- package/dist/gateway/advanced-tool/index.d.ts.map +1 -0
- package/dist/gateway/advanced-tool/index.js +39 -0
- package/dist/gateway/advanced-tool/index.js.map +1 -0
- package/dist/gateway/advanced-tool/register.d.ts +18 -0
- package/dist/gateway/advanced-tool/register.d.ts.map +1 -0
- package/dist/gateway/advanced-tool/register.js +69 -0
- package/dist/gateway/advanced-tool/register.js.map +1 -0
- package/dist/gateway/advanced-tool.d.ts +13 -0
- package/dist/gateway/advanced-tool.d.ts.map +1 -0
- package/dist/gateway/advanced-tool.js +13 -0
- package/dist/gateway/advanced-tool.js.map +1 -0
- package/dist/gateway/capturing-server.d.ts +117 -0
- package/dist/gateway/capturing-server.d.ts.map +1 -0
- package/dist/gateway/capturing-server.js +103 -0
- package/dist/gateway/capturing-server.js.map +1 -0
- package/dist/gateway/essentials.d.ts +50 -0
- package/dist/gateway/essentials.d.ts.map +1 -0
- package/dist/gateway/essentials.js +108 -0
- package/dist/gateway/essentials.js.map +1 -0
- package/dist/gateway/test-support.d.ts +41 -0
- package/dist/gateway/test-support.d.ts.map +1 -0
- package/dist/gateway/test-support.js +60 -0
- package/dist/gateway/test-support.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +119 -0
- package/dist/index.js.map +1 -0
- package/dist/install-skill.d.ts +43 -0
- package/dist/install-skill.d.ts.map +1 -0
- package/dist/install-skill.js +118 -0
- package/dist/install-skill.js.map +1 -0
- package/dist/platform/detect.d.ts +64 -0
- package/dist/platform/detect.d.ts.map +1 -0
- package/dist/platform/detect.js +98 -0
- package/dist/platform/detect.js.map +1 -0
- package/dist/platform/index.d.ts +121 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/index.js +176 -0
- package/dist/platform/index.js.map +1 -0
- package/dist/platform/joomla.d.ts +44 -0
- package/dist/platform/joomla.d.ts.map +1 -0
- package/dist/platform/joomla.js +46 -0
- package/dist/platform/joomla.js.map +1 -0
- package/dist/server.d.ts +110 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +274 -0
- package/dist/server.js.map +1 -0
- package/dist/setup-cli-confirm.d.ts +36 -0
- package/dist/setup-cli-confirm.d.ts.map +1 -0
- package/dist/setup-cli-confirm.js +59 -0
- package/dist/setup-cli-confirm.js.map +1 -0
- package/dist/setup-cli.d.ts +193 -0
- package/dist/setup-cli.d.ts.map +1 -0
- package/dist/setup-cli.js +1032 -0
- package/dist/setup-cli.js.map +1 -0
- package/dist/setup-prompts.d.ts +64 -0
- package/dist/setup-prompts.d.ts.map +1 -0
- package/dist/setup-prompts.js +221 -0
- package/dist/setup-prompts.js.map +1 -0
- package/dist/setup-token.d.ts +38 -0
- package/dist/setup-token.d.ts.map +1 -0
- package/dist/setup-token.js +106 -0
- package/dist/setup-token.js.map +1 -0
- package/dist/setup-wizard-defaults.d.ts +43 -0
- package/dist/setup-wizard-defaults.d.ts.map +1 -0
- package/dist/setup-wizard-defaults.js +160 -0
- package/dist/setup-wizard-defaults.js.map +1 -0
- package/dist/setup-wizard-handshake.d.ts +25 -0
- package/dist/setup-wizard-handshake.d.ts.map +1 -0
- package/dist/setup-wizard-handshake.js +103 -0
- package/dist/setup-wizard-handshake.js.map +1 -0
- package/dist/setup-wizard-types.d.ts +164 -0
- package/dist/setup-wizard-types.d.ts.map +1 -0
- package/dist/setup-wizard-types.js +11 -0
- package/dist/setup-wizard-types.js.map +1 -0
- package/dist/setup-wizard.d.ts +33 -0
- package/dist/setup-wizard.d.ts.map +1 -0
- package/dist/setup-wizard.js +199 -0
- package/dist/setup-wizard.js.map +1 -0
- package/dist/setup.d.ts +17 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +33 -0
- package/dist/setup.js.map +1 -0
- package/dist/sites/bootstrap.d.ts +41 -0
- package/dist/sites/bootstrap.d.ts.map +1 -0
- package/dist/sites/bootstrap.js +58 -0
- package/dist/sites/bootstrap.js.map +1 -0
- package/dist/sites/cli/add-site.d.ts +106 -0
- package/dist/sites/cli/add-site.d.ts.map +1 -0
- package/dist/sites/cli/add-site.js +185 -0
- package/dist/sites/cli/add-site.js.map +1 -0
- package/dist/sites/cli/list-sites.d.ts +40 -0
- package/dist/sites/cli/list-sites.d.ts.map +1 -0
- package/dist/sites/cli/list-sites.js +116 -0
- package/dist/sites/cli/list-sites.js.map +1 -0
- package/dist/sites/cli/remove-site.d.ts +60 -0
- package/dist/sites/cli/remove-site.d.ts.map +1 -0
- package/dist/sites/cli/remove-site.js +120 -0
- package/dist/sites/cli/remove-site.js.map +1 -0
- package/dist/sites/cli/set-default.d.ts +47 -0
- package/dist/sites/cli/set-default.d.ts.map +1 -0
- package/dist/sites/cli/set-default.js +69 -0
- package/dist/sites/cli/set-default.js.map +1 -0
- package/dist/sites/cli/test-site.d.ts +77 -0
- package/dist/sites/cli/test-site.d.ts.map +1 -0
- package/dist/sites/cli/test-site.js +146 -0
- package/dist/sites/cli/test-site.js.map +1 -0
- package/dist/sites/client-pool.d.ts +157 -0
- package/dist/sites/client-pool.d.ts.map +1 -0
- package/dist/sites/client-pool.js +222 -0
- package/dist/sites/client-pool.js.map +1 -0
- package/dist/sites/env-bridge.d.ts +55 -0
- package/dist/sites/env-bridge.d.ts.map +1 -0
- package/dist/sites/env-bridge.js +94 -0
- package/dist/sites/env-bridge.js.map +1 -0
- package/dist/sites/paths.d.ts +21 -0
- package/dist/sites/paths.d.ts.map +1 -0
- package/dist/sites/paths.js +37 -0
- package/dist/sites/paths.js.map +1 -0
- package/dist/sites/probe.d.ts +60 -0
- package/dist/sites/probe.d.ts.map +1 -0
- package/dist/sites/probe.js +112 -0
- package/dist/sites/probe.js.map +1 -0
- package/dist/sites/registry.d.ts +142 -0
- package/dist/sites/registry.d.ts.map +1 -0
- package/dist/sites/registry.js +163 -0
- package/dist/sites/registry.js.map +1 -0
- package/dist/sites/schema.d.ts +90 -0
- package/dist/sites/schema.d.ts.map +1 -0
- package/dist/sites/schema.js +71 -0
- package/dist/sites/schema.js.map +1 -0
- package/dist/sites/secret-resolver.d.ts +115 -0
- package/dist/sites/secret-resolver.d.ts.map +1 -0
- package/dist/sites/secret-resolver.js +225 -0
- package/dist/sites/secret-resolver.js.map +1 -0
- package/dist/sites/store.d.ts +82 -0
- package/dist/sites/store.d.ts.map +1 -0
- package/dist/sites/store.js +198 -0
- package/dist/sites/store.js.map +1 -0
- package/dist/sites/tools/index.d.ts +28 -0
- package/dist/sites/tools/index.d.ts.map +1 -0
- package/dist/sites/tools/index.js +38 -0
- package/dist/sites/tools/index.js.map +1 -0
- package/dist/sites/tools/sites-list.d.ts +48 -0
- package/dist/sites/tools/sites-list.d.ts.map +1 -0
- package/dist/sites/tools/sites-list.js +137 -0
- package/dist/sites/tools/sites-list.js.map +1 -0
- package/dist/sites/tools/sites-test.d.ts +47 -0
- package/dist/sites/tools/sites-test.d.ts.map +1 -0
- package/dist/sites/tools/sites-test.js +148 -0
- package/dist/sites/tools/sites-test.js.map +1 -0
- package/dist/sites/tools/use-site.d.ts +47 -0
- package/dist/sites/tools/use-site.d.ts.map +1 -0
- package/dist/sites/tools/use-site.js +183 -0
- package/dist/sites/tools/use-site.js.map +1 -0
- package/dist/skill-loader.d.ts +111 -0
- package/dist/skill-loader.d.ts.map +1 -0
- package/dist/skill-loader.js +191 -0
- package/dist/skill-loader.js.map +1 -0
- package/dist/tools/elements/builders.d.ts +24 -0
- package/dist/tools/elements/builders.d.ts.map +1 -0
- package/dist/tools/elements/builders.js +208 -0
- package/dist/tools/elements/builders.js.map +1 -0
- package/dist/tools/elements/handlers-write.d.ts +49 -0
- package/dist/tools/elements/handlers-write.d.ts.map +1 -0
- package/dist/tools/elements/handlers-write.js +341 -0
- package/dist/tools/elements/handlers-write.js.map +1 -0
- package/dist/tools/elements/handlers.d.ts +70 -0
- package/dist/tools/elements/handlers.d.ts.map +1 -0
- package/dist/tools/elements/handlers.js +292 -0
- package/dist/tools/elements/handlers.js.map +1 -0
- package/dist/tools/elements/index.d.ts +28 -0
- package/dist/tools/elements/index.d.ts.map +1 -0
- package/dist/tools/elements/index.js +27 -0
- package/dist/tools/elements/index.js.map +1 -0
- package/dist/tools/elements.d.ts +13 -0
- package/dist/tools/elements.d.ts.map +1 -0
- package/dist/tools/elements.js +13 -0
- package/dist/tools/elements.js.map +1 -0
- package/dist/tools/elicitation.d.ts +87 -0
- package/dist/tools/elicitation.d.ts.map +1 -0
- package/dist/tools/elicitation.js +100 -0
- package/dist/tools/elicitation.js.map +1 -0
- package/dist/tools/format/elements-format.d.ts +40 -0
- package/dist/tools/format/elements-format.d.ts.map +1 -0
- package/dist/tools/format/elements-format.js +193 -0
- package/dist/tools/format/elements-format.js.map +1 -0
- package/dist/tools/format/health-format.d.ts +79 -0
- package/dist/tools/format/health-format.d.ts.map +1 -0
- package/dist/tools/format/health-format.js +181 -0
- package/dist/tools/format/health-format.js.map +1 -0
- package/dist/tools/format/inspection-format.d.ts +70 -0
- package/dist/tools/format/inspection-format.d.ts.map +1 -0
- package/dist/tools/format/inspection-format.js +359 -0
- package/dist/tools/format/inspection-format.js.map +1 -0
- package/dist/tools/format/pages-format.d.ts +57 -0
- package/dist/tools/format/pages-format.d.ts.map +1 -0
- package/dist/tools/format/pages-format.js +157 -0
- package/dist/tools/format/pages-format.js.map +1 -0
- package/dist/tools/format/sources-format.d.ts +44 -0
- package/dist/tools/format/sources-format.d.ts.map +1 -0
- package/dist/tools/format/sources-format.js +242 -0
- package/dist/tools/format/sources-format.js.map +1 -0
- package/dist/tools/health.d.ts +22 -0
- package/dist/tools/health.d.ts.map +1 -0
- package/dist/tools/health.js +220 -0
- package/dist/tools/health.js.map +1 -0
- package/dist/tools/index.d.ts +30 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +39 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/inspection.d.ts +14 -0
- package/dist/tools/inspection.d.ts.map +1 -0
- package/dist/tools/inspection.js +401 -0
- package/dist/tools/inspection.js.map +1 -0
- package/dist/tools/layout-flatten.d.ts +75 -0
- package/dist/tools/layout-flatten.d.ts.map +1 -0
- package/dist/tools/layout-flatten.js +107 -0
- package/dist/tools/layout-flatten.js.map +1 -0
- package/dist/tools/multi-items/builders.d.ts +23 -0
- package/dist/tools/multi-items/builders.d.ts.map +1 -0
- package/dist/tools/multi-items/builders.js +84 -0
- package/dist/tools/multi-items/builders.js.map +1 -0
- package/dist/tools/multi-items/clean-implode-handler.d.ts +36 -0
- package/dist/tools/multi-items/clean-implode-handler.d.ts.map +1 -0
- package/dist/tools/multi-items/clean-implode-handler.js +57 -0
- package/dist/tools/multi-items/clean-implode-handler.js.map +1 -0
- package/dist/tools/multi-items/format/inspection-format.d.ts +41 -0
- package/dist/tools/multi-items/format/inspection-format.d.ts.map +1 -0
- package/dist/tools/multi-items/format/inspection-format.js +64 -0
- package/dist/tools/multi-items/format/inspection-format.js.map +1 -0
- package/dist/tools/multi-items/index.d.ts +18 -0
- package/dist/tools/multi-items/index.d.ts.map +1 -0
- package/dist/tools/multi-items/index.js +18 -0
- package/dist/tools/multi-items/index.js.map +1 -0
- package/dist/tools/multi-items/inspect-handler.d.ts +76 -0
- package/dist/tools/multi-items/inspect-handler.d.ts.map +1 -0
- package/dist/tools/multi-items/inspect-handler.js +133 -0
- package/dist/tools/multi-items/inspect-handler.js.map +1 -0
- package/dist/tools/multi-items/inspection-cache.d.ts +85 -0
- package/dist/tools/multi-items/inspection-cache.d.ts.map +1 -0
- package/dist/tools/multi-items/inspection-cache.js +126 -0
- package/dist/tools/multi-items/inspection-cache.js.map +1 -0
- package/dist/tools/multi-items/item-container-map.d.ts +41 -0
- package/dist/tools/multi-items/item-container-map.d.ts.map +1 -0
- package/dist/tools/multi-items/item-container-map.js +73 -0
- package/dist/tools/multi-items/item-container-map.js.map +1 -0
- package/dist/tools/pages/builders.d.ts +43 -0
- package/dist/tools/pages/builders.d.ts.map +1 -0
- package/dist/tools/pages/builders.js +229 -0
- package/dist/tools/pages/builders.js.map +1 -0
- package/dist/tools/pages/handlers-read.d.ts +33 -0
- package/dist/tools/pages/handlers-read.d.ts.map +1 -0
- package/dist/tools/pages/handlers-read.js +260 -0
- package/dist/tools/pages/handlers-read.js.map +1 -0
- package/dist/tools/pages/handlers-write.d.ts +63 -0
- package/dist/tools/pages/handlers-write.d.ts.map +1 -0
- package/dist/tools/pages/handlers-write.js +127 -0
- package/dist/tools/pages/handlers-write.js.map +1 -0
- package/dist/tools/pages/index.d.ts +17 -0
- package/dist/tools/pages/index.d.ts.map +1 -0
- package/dist/tools/pages/index.js +17 -0
- package/dist/tools/pages/index.js.map +1 -0
- package/dist/tools/pages/schemas.d.ts +157 -0
- package/dist/tools/pages/schemas.d.ts.map +1 -0
- package/dist/tools/pages/schemas.js +232 -0
- package/dist/tools/pages/schemas.js.map +1 -0
- package/dist/tools/pages.d.ts +13 -0
- package/dist/tools/pages.d.ts.map +1 -0
- package/dist/tools/pages.js +13 -0
- package/dist/tools/pages.js.map +1 -0
- package/dist/tools/pool-resolve-helper.d.ts +83 -0
- package/dist/tools/pool-resolve-helper.d.ts.map +1 -0
- package/dist/tools/pool-resolve-helper.js +148 -0
- package/dist/tools/pool-resolve-helper.js.map +1 -0
- package/dist/tools/progress-phases.d.ts +46 -0
- package/dist/tools/progress-phases.d.ts.map +1 -0
- package/dist/tools/progress-phases.js +48 -0
- package/dist/tools/progress-phases.js.map +1 -0
- package/dist/tools/shared-schemas.d.ts +25 -0
- package/dist/tools/shared-schemas.d.ts.map +1 -0
- package/dist/tools/shared-schemas.js +72 -0
- package/dist/tools/shared-schemas.js.map +1 -0
- package/dist/tools/sources/builders.d.ts +13 -0
- package/dist/tools/sources/builders.d.ts.map +1 -0
- package/dist/tools/sources/builders.js +118 -0
- package/dist/tools/sources/builders.js.map +1 -0
- package/dist/tools/sources/handlers-bind.d.ts +28 -0
- package/dist/tools/sources/handlers-bind.d.ts.map +1 -0
- package/dist/tools/sources/handlers-bind.js +181 -0
- package/dist/tools/sources/handlers-bind.js.map +1 -0
- package/dist/tools/sources/handlers.d.ts +47 -0
- package/dist/tools/sources/handlers.d.ts.map +1 -0
- package/dist/tools/sources/handlers.js +108 -0
- package/dist/tools/sources/handlers.js.map +1 -0
- package/dist/tools/sources/index.d.ts +19 -0
- package/dist/tools/sources/index.d.ts.map +1 -0
- package/dist/tools/sources/index.js +18 -0
- package/dist/tools/sources/index.js.map +1 -0
- package/dist/tools/sources.d.ts +14 -0
- package/dist/tools/sources.d.ts.map +1 -0
- package/dist/tools/sources.js +14 -0
- package/dist/tools/sources.js.map +1 -0
- package/dist/tools/sparse-fields.d.ts +106 -0
- package/dist/tools/sparse-fields.d.ts.map +1 -0
- package/dist/tools/sparse-fields.js +165 -0
- package/dist/tools/sparse-fields.js.map +1 -0
- package/dist/tools/tool-builder/annotations.d.ts +55 -0
- package/dist/tools/tool-builder/annotations.d.ts.map +1 -0
- package/dist/tools/tool-builder/annotations.js +86 -0
- package/dist/tools/tool-builder/annotations.js.map +1 -0
- package/dist/tools/tool-builder/define.d.ts +31 -0
- package/dist/tools/tool-builder/define.d.ts.map +1 -0
- package/dist/tools/tool-builder/define.js +31 -0
- package/dist/tools/tool-builder/define.js.map +1 -0
- package/dist/tools/tool-builder/index.d.ts +28 -0
- package/dist/tools/tool-builder/index.d.ts.map +1 -0
- package/dist/tools/tool-builder/index.js +27 -0
- package/dist/tools/tool-builder/index.js.map +1 -0
- package/dist/tools/tool-builder/results.d.ts +104 -0
- package/dist/tools/tool-builder/results.d.ts.map +1 -0
- package/dist/tools/tool-builder/results.js +224 -0
- package/dist/tools/tool-builder/results.js.map +1 -0
- package/dist/tools/tool-builder/types.d.ts +97 -0
- package/dist/tools/tool-builder/types.d.ts.map +1 -0
- package/dist/tools/tool-builder/types.js +9 -0
- package/dist/tools/tool-builder/types.js.map +1 -0
- package/dist/tools/tool-builder.d.ts +16 -0
- package/dist/tools/tool-builder.d.ts.map +1 -0
- package/dist/tools/tool-builder.js +16 -0
- package/dist/tools/tool-builder.js.map +1 -0
- package/dist/uninstall-skill.d.ts +52 -0
- package/dist/uninstall-skill.d.ts.map +1 -0
- package/dist/uninstall-skill.js +146 -0
- package/dist/uninstall-skill.js.map +1 -0
- package/dist/uninstall.d.ts +73 -0
- package/dist/uninstall.d.ts.map +1 -0
- package/dist/uninstall.js +82 -0
- package/dist/uninstall.js.map +1 -0
- package/icon.png +0 -0
- package/manifest.json +10 -10
- package/package.json +4 -1
- package/skills/yt-builder-mcp/SKILL.md +30 -26
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inspection format-sidecar — pure transforms for `element_types_list` (table)
|
|
3
|
+
* and `element_type_get_schema` (detail). Wave G.2.9 (Design §3.2 rows 11 / 12).
|
|
4
|
+
*
|
|
5
|
+
* These functions are stateless. The handlers themselves are tested separately
|
|
6
|
+
* in `tests/tools/inspection.test.ts` (shape pins on the REST URL).
|
|
7
|
+
*
|
|
8
|
+
* @license MIT
|
|
9
|
+
*/
|
|
10
|
+
// ─── element_types_list columns (Design §3.2 row 11) ─────────────────
|
|
11
|
+
/** Full columns for `yootheme_builder_element_types_list`. */
|
|
12
|
+
export const TYPES_TABLE_COLUMNS = [
|
|
13
|
+
{ key: 'name', label: 'NAME', width: 24, llmOnly: true },
|
|
14
|
+
{ key: 'label', label: 'LABEL', width: 28 },
|
|
15
|
+
{ key: 'origin', label: 'ORIGIN', width: 14 },
|
|
16
|
+
{ key: 'has_children_support', label: 'CHILDREN', width: 10 },
|
|
17
|
+
];
|
|
18
|
+
/** Compact columns kick in at 21+ rows — drop the boolean. */
|
|
19
|
+
export const TYPES_COMPACT_COLUMNS = [
|
|
20
|
+
{ key: 'name', label: 'NAME', width: 24, llmOnly: true },
|
|
21
|
+
{ key: 'label', label: 'LABEL', width: 28 },
|
|
22
|
+
{ key: 'origin', label: 'ORIGIN', width: 14 },
|
|
23
|
+
];
|
|
24
|
+
// ─── Row mapper ──────────────────────────────────────────────────────
|
|
25
|
+
function asString(v) {
|
|
26
|
+
return typeof v === 'string' ? v : '';
|
|
27
|
+
}
|
|
28
|
+
function asBool(v) {
|
|
29
|
+
return v === true;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Maps an `/element-types` row to the table shape.
|
|
33
|
+
*
|
|
34
|
+
* - `has_children_support` honours an explicit boolean (the canonical
|
|
35
|
+
* column key on the MCP-TS side). The PHP REST envelope surfaces both
|
|
36
|
+
* `has_children` (its canonical key) AND `has_children_support` (this
|
|
37
|
+
* alias) for every row — accept either to ride out a deploy skew where
|
|
38
|
+
* the wp-plugin and npm-package versions are temporarily out of step.
|
|
39
|
+
* Maria-Audit Stream C2 F-03 v2 (2026-05-22).
|
|
40
|
+
* - Falls back to presence of a `children` field on the type definition.
|
|
41
|
+
* - Missing fields default to empty.
|
|
42
|
+
*/
|
|
43
|
+
export function mapTypeRow(input) {
|
|
44
|
+
let explicitChildren;
|
|
45
|
+
if (typeof input.has_children_support === 'boolean') {
|
|
46
|
+
explicitChildren = input.has_children_support;
|
|
47
|
+
}
|
|
48
|
+
else if (typeof input.has_children === 'boolean') {
|
|
49
|
+
// F-03 v2: PHP wire-shape uses `has_children`; older wp-plugins
|
|
50
|
+
// may surface only this key. MCP-TS keeps `has_children_support`
|
|
51
|
+
// as the canonical column-key but accepts the PHP-side spelling.
|
|
52
|
+
explicitChildren = input.has_children;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
name: asString(input.name),
|
|
56
|
+
label: asString(input.label),
|
|
57
|
+
origin: asString(input.origin),
|
|
58
|
+
has_children_support: explicitChildren ?? hasChildrenField(input.children),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function hasChildrenField(v) {
|
|
62
|
+
if (Array.isArray(v))
|
|
63
|
+
return v.length > 0;
|
|
64
|
+
if (v !== null && typeof v === 'object') {
|
|
65
|
+
return Object.keys(v).length > 0;
|
|
66
|
+
}
|
|
67
|
+
return asBool(v);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The REST plugin exposes element types in one of three shapes:
|
|
71
|
+
*
|
|
72
|
+
* 1. F-03 v2 (current — Maria-Audit Stream C2 2026-05-22): wrapper object
|
|
73
|
+
* `{items: [{name, label, origin, has_children, has_children_support,
|
|
74
|
+
* …}], total, element_types: [<string>, …]}`. This is the richest
|
|
75
|
+
* shape and the only one carrying label/origin/has_children — prefer
|
|
76
|
+
* it always.
|
|
77
|
+
* 2. Legacy F-03 v1: wrapper object `{element_types: [<string>, …]}`
|
|
78
|
+
* with name-only entries (older WP-plugin versions). Used as the
|
|
79
|
+
* back-compat fallback when `items` is absent.
|
|
80
|
+
* 3. Flat array of `{name, …}` objects — never seen on the live
|
|
81
|
+
* yt-builder-mcp REST but kept for paranoia.
|
|
82
|
+
*/
|
|
83
|
+
export function flattenTypesPayload(payload) {
|
|
84
|
+
if (Array.isArray(payload)) {
|
|
85
|
+
return payload.map(normalizeTypeEntry).filter((x) => x !== null);
|
|
86
|
+
}
|
|
87
|
+
if (payload !== null && typeof payload === 'object') {
|
|
88
|
+
const obj = payload;
|
|
89
|
+
// F-03 v2 preferred shape: `items[]` carries the full row.
|
|
90
|
+
// Reading from `element_types` (plain string list) drops every
|
|
91
|
+
// label/origin/has_children value before mapTypeRow ever sees
|
|
92
|
+
// them, which is the root-cause of the audit-finding.
|
|
93
|
+
if (Array.isArray(obj.items)) {
|
|
94
|
+
return obj.items.map(normalizeTypeEntry).filter((x) => x !== null);
|
|
95
|
+
}
|
|
96
|
+
if (Array.isArray(obj.element_types)) {
|
|
97
|
+
return obj.element_types.map(normalizeTypeEntry).filter((x) => x !== null);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
function normalizeTypeEntry(entry) {
|
|
103
|
+
if (typeof entry === 'string')
|
|
104
|
+
return { name: entry };
|
|
105
|
+
if (entry !== null && typeof entry === 'object')
|
|
106
|
+
return entry;
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
// ─── Detail builder (Design §3.2 row 12) ─────────────────────────────
|
|
110
|
+
function summarizeFieldKeys(fields) {
|
|
111
|
+
if (fields === null || typeof fields !== 'object')
|
|
112
|
+
return '—';
|
|
113
|
+
// `fields` is a list of {name,…} descriptors (canonical REST shape);
|
|
114
|
+
// a plain record is also tolerated for back-compat.
|
|
115
|
+
const keys = Array.isArray(fields)
|
|
116
|
+
? fields.map((f) => {
|
|
117
|
+
if (f !== null && typeof f === 'object') {
|
|
118
|
+
const n = f.name;
|
|
119
|
+
if (typeof n === 'string')
|
|
120
|
+
return n;
|
|
121
|
+
}
|
|
122
|
+
return '?';
|
|
123
|
+
})
|
|
124
|
+
: Object.keys(fields);
|
|
125
|
+
if (keys.length === 0)
|
|
126
|
+
return '—';
|
|
127
|
+
if (keys.length <= 8)
|
|
128
|
+
return keys.join(', ');
|
|
129
|
+
return `${keys.slice(0, 8).join(', ')}, …(+${String(keys.length - 8)} more)`;
|
|
130
|
+
}
|
|
131
|
+
function countFields(fields) {
|
|
132
|
+
if (fields === null || typeof fields !== 'object')
|
|
133
|
+
return 0;
|
|
134
|
+
if (Array.isArray(fields))
|
|
135
|
+
return fields.length;
|
|
136
|
+
return Object.keys(fields).length;
|
|
137
|
+
}
|
|
138
|
+
// F-201 (Audit 2026-05-26): cap so the rendered tabular field list cannot
|
|
139
|
+
// blow the toolkit `detail` 8000-char budget. The largest element type
|
|
140
|
+
// observed in the wild (`grid`) carries 148 field descriptors — at ~70
|
|
141
|
+
// chars per row that would be ~10 kB which truncates. 50 rows comfortably
|
|
142
|
+
// fits and the footer points the agent at `structuredContent.fields` for
|
|
143
|
+
// the full list.
|
|
144
|
+
const FIELD_TABLE_CAP = 50;
|
|
145
|
+
function asFieldDescriptor(raw) {
|
|
146
|
+
if (raw === null || typeof raw !== 'object')
|
|
147
|
+
return null;
|
|
148
|
+
const obj = raw;
|
|
149
|
+
const name = typeof obj.name === 'string' ? obj.name : '';
|
|
150
|
+
if (name === '')
|
|
151
|
+
return null;
|
|
152
|
+
return {
|
|
153
|
+
name,
|
|
154
|
+
type: typeof obj.type === 'string' ? obj.type : '',
|
|
155
|
+
label: typeof obj.label === 'string' ? obj.label : '',
|
|
156
|
+
// F-201 follow-up (reviewer Gap 1): honour an explicit
|
|
157
|
+
// `required: true` flag on the field descriptor.
|
|
158
|
+
//
|
|
159
|
+
// Upstream-status: the live YT REST endpoint backing
|
|
160
|
+
// `element_type_get_schema` does NOT surface required-ness today
|
|
161
|
+
// (`Inspector::projectField` emits only
|
|
162
|
+
// `{name, type, label?, default?, enum?, group?}` — YT4 itself
|
|
163
|
+
// treats required-ness as UI-validation, not schema-declared).
|
|
164
|
+
// The renderer still honours the flag so the moment upstream
|
|
165
|
+
// adds a required-marker the table updates automatically with
|
|
166
|
+
// no code change here.
|
|
167
|
+
required: obj.required === true,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
function normaliseFieldList(fields) {
|
|
171
|
+
if (Array.isArray(fields)) {
|
|
172
|
+
const out = [];
|
|
173
|
+
for (const raw of fields) {
|
|
174
|
+
const d = asFieldDescriptor(raw);
|
|
175
|
+
if (d !== null)
|
|
176
|
+
out.push(d);
|
|
177
|
+
}
|
|
178
|
+
return out;
|
|
179
|
+
}
|
|
180
|
+
if (fields !== null && typeof fields === 'object') {
|
|
181
|
+
// Back-compat: record-shaped (legacy back-end).
|
|
182
|
+
const out = [];
|
|
183
|
+
for (const [name, def] of Object.entries(fields)) {
|
|
184
|
+
const type = def !== null && typeof def === 'object'
|
|
185
|
+
? (typeof def.type === 'string'
|
|
186
|
+
? def.type
|
|
187
|
+
: '')
|
|
188
|
+
: '';
|
|
189
|
+
const label = def !== null && typeof def === 'object'
|
|
190
|
+
&& typeof def.label === 'string'
|
|
191
|
+
? def.label
|
|
192
|
+
: '';
|
|
193
|
+
const required = def !== null && typeof def === 'object'
|
|
194
|
+
&& def.required === true;
|
|
195
|
+
out.push({ name, type, label, required });
|
|
196
|
+
}
|
|
197
|
+
return out;
|
|
198
|
+
}
|
|
199
|
+
return [];
|
|
200
|
+
}
|
|
201
|
+
function padRight(s, width) {
|
|
202
|
+
if (s.length >= width)
|
|
203
|
+
return s.slice(0, width);
|
|
204
|
+
return s + ' '.repeat(width - s.length);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* F-201 (Audit 2026-05-26): render the field descriptor list as a
|
|
208
|
+
* markdown-light text table for the LLM. Layout:
|
|
209
|
+
*
|
|
210
|
+
* NAME | TYPE | LABEL
|
|
211
|
+
* ----------------- | ------------ | ----------------
|
|
212
|
+
* * content | editor | Content ← required
|
|
213
|
+
* link | link | Link
|
|
214
|
+
*
|
|
215
|
+
* The leading 2-char gutter carries `* ` for required fields and two
|
|
216
|
+
* spaces for optional fields, keeping column alignment intact whether
|
|
217
|
+
* or not any row is required. A legend at the foot of the table
|
|
218
|
+
* explains the marker semantics so the LLM doesn't have to guess.
|
|
219
|
+
*
|
|
220
|
+
* Required-marker upstream-status: see `asFieldDescriptor` above — live
|
|
221
|
+
* YT REST does not surface required-ness, so the marker is dormant
|
|
222
|
+
* until upstream adds the flag. The test fixture proves the renderer
|
|
223
|
+
* is ready.
|
|
224
|
+
*
|
|
225
|
+
* Capped at FIELD_TABLE_CAP rows; large element types (`grid` = 148
|
|
226
|
+
* fields) get a footer pointing the agent at `structuredContent.fields`
|
|
227
|
+
* for the full list.
|
|
228
|
+
*
|
|
229
|
+
* Returns `undefined` when the field list is empty so the caller can
|
|
230
|
+
* skip the section entirely.
|
|
231
|
+
*/
|
|
232
|
+
function buildFieldTable(fields) {
|
|
233
|
+
if (fields.length === 0)
|
|
234
|
+
return undefined;
|
|
235
|
+
// Column widths: name 24, type 14, label fills remainder (cap 36).
|
|
236
|
+
const nameW = 24;
|
|
237
|
+
const typeW = 14;
|
|
238
|
+
const labelW = 36;
|
|
239
|
+
const lines = ['[Fields]'];
|
|
240
|
+
// Header row — the gutter is empty here (no row gets a `*`).
|
|
241
|
+
lines.push(` ${padRight('NAME', nameW)} | ${padRight('TYPE', typeW)} | ${padRight('LABEL', labelW)}`);
|
|
242
|
+
lines.push(` ${'-'.repeat(nameW)} | ${'-'.repeat(typeW)} | ${'-'.repeat(labelW)}`);
|
|
243
|
+
const visible = fields.slice(0, FIELD_TABLE_CAP);
|
|
244
|
+
let anyRequired = false;
|
|
245
|
+
for (const f of visible) {
|
|
246
|
+
const prefix = f.required ? '* ' : ' ';
|
|
247
|
+
if (f.required)
|
|
248
|
+
anyRequired = true;
|
|
249
|
+
lines.push(`${prefix}${padRight(f.name, nameW)} | ${padRight(f.type, typeW)} | ${padRight(f.label, labelW)}`);
|
|
250
|
+
}
|
|
251
|
+
// Legend: only emit when at least one visible row is required, so
|
|
252
|
+
// the common (no-required) case stays uncluttered. The literal
|
|
253
|
+
// string `* = required` is the assertion target in the test.
|
|
254
|
+
if (anyRequired) {
|
|
255
|
+
lines.push('');
|
|
256
|
+
lines.push('* = required');
|
|
257
|
+
}
|
|
258
|
+
if (fields.length > FIELD_TABLE_CAP) {
|
|
259
|
+
// Detect required-ness in the truncated tail too so the legend
|
|
260
|
+
// still fires when the only required rows are beyond the cap.
|
|
261
|
+
if (!anyRequired) {
|
|
262
|
+
const tailRequired = fields.slice(FIELD_TABLE_CAP).some((f) => f.required);
|
|
263
|
+
if (tailRequired) {
|
|
264
|
+
lines.push('');
|
|
265
|
+
lines.push('* = required');
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
const remaining = fields.length - FIELD_TABLE_CAP;
|
|
269
|
+
lines.push('');
|
|
270
|
+
lines.push(`…and ${String(remaining)} more — see structuredContent.fields for the full list.`);
|
|
271
|
+
}
|
|
272
|
+
return lines.join('\n');
|
|
273
|
+
}
|
|
274
|
+
export function buildTypeSchemaDetail(payload) {
|
|
275
|
+
const normalisedFields = normaliseFieldList(payload.fields);
|
|
276
|
+
const appendText = buildFieldTable(normalisedFields);
|
|
277
|
+
const groups = [
|
|
278
|
+
{
|
|
279
|
+
label: 'Identity',
|
|
280
|
+
entries: [
|
|
281
|
+
{ key: 'name', label: 'Name', value: payload.name, format: 'code', copyable: true },
|
|
282
|
+
...(typeof payload.label === 'string' && payload.label.length > 0
|
|
283
|
+
? [{ key: 'label', label: 'Label', value: payload.label }]
|
|
284
|
+
: []),
|
|
285
|
+
...(typeof payload.origin === 'string' && payload.origin.length > 0
|
|
286
|
+
? [{ key: 'origin', label: 'Origin', value: payload.origin, format: 'badge' }]
|
|
287
|
+
: []),
|
|
288
|
+
],
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
label: 'Fields (summary)',
|
|
292
|
+
entries: [
|
|
293
|
+
{ key: 'count', label: 'Count', value: countFields(payload.fields), format: 'text' },
|
|
294
|
+
{ key: 'keys', label: 'Keys', value: summarizeFieldKeys(payload.fields) },
|
|
295
|
+
],
|
|
296
|
+
},
|
|
297
|
+
];
|
|
298
|
+
if (payload.bindingContract !== undefined) {
|
|
299
|
+
const bc = payload.bindingContract;
|
|
300
|
+
const entries = [
|
|
301
|
+
{ key: 'kind', label: 'Kind', value: bc.kind, format: 'badge' },
|
|
302
|
+
{ key: 'pattern', label: 'Pattern', value: bc.pattern },
|
|
303
|
+
];
|
|
304
|
+
if (typeof bc.child_type === 'string') {
|
|
305
|
+
entries.push({
|
|
306
|
+
key: 'child_type',
|
|
307
|
+
label: 'Bind on child',
|
|
308
|
+
value: bc.child_type,
|
|
309
|
+
format: 'code',
|
|
310
|
+
copyable: true,
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
if (Array.isArray(bc.binding_target_props) && bc.binding_target_props.length > 0) {
|
|
314
|
+
entries.push({
|
|
315
|
+
key: 'targets',
|
|
316
|
+
label: 'Binding target props',
|
|
317
|
+
value: bc.binding_target_props.join(', '),
|
|
318
|
+
format: 'code',
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
if (typeof bc.set_via_tool === 'string') {
|
|
322
|
+
entries.push({
|
|
323
|
+
key: 'set_via',
|
|
324
|
+
label: 'Set via',
|
|
325
|
+
value: bc.set_via_tool,
|
|
326
|
+
format: 'code',
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
if (typeof bc.discover_source_tool === 'string') {
|
|
330
|
+
entries.push({
|
|
331
|
+
key: 'discover',
|
|
332
|
+
label: 'Discover source',
|
|
333
|
+
value: bc.discover_source_tool,
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
if (Array.isArray(bc.do_not) && bc.do_not.length > 0) {
|
|
337
|
+
entries.push({
|
|
338
|
+
key: 'do_not',
|
|
339
|
+
label: 'Do NOT',
|
|
340
|
+
value: bc.do_not.map((s) => `• ${s}`).join('\n'),
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
if (bc.minimal_layout !== undefined) {
|
|
344
|
+
entries.push({
|
|
345
|
+
key: 'minimal_layout',
|
|
346
|
+
label: 'Minimal layout (canonical)',
|
|
347
|
+
value: JSON.stringify(bc.minimal_layout, null, 2),
|
|
348
|
+
format: 'code',
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
groups.push({ label: 'Binding contract (Multi-Items)', entries });
|
|
352
|
+
}
|
|
353
|
+
return {
|
|
354
|
+
title: `Element type: ${payload.name}`,
|
|
355
|
+
groups,
|
|
356
|
+
...(appendText !== undefined ? { appendText } : {}),
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
//# sourceMappingURL=inspection-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspection-format.js","sourceRoot":"","sources":["../../../src/tools/format/inspection-format.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,wEAAwE;AAExE,8DAA8D;AAC9D,MAAM,CAAC,MAAM,mBAAmB,GAA2B;IACvD,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IACxD,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,OAA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AU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtD,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pages format-sidecar — pure transforms for `pages_list`, `page_get_schema`
|
|
3
|
+
* and `get_etag`. Wave G.2.1 (Design §3.2 rows 3 / 5 / 6).
|
|
4
|
+
*
|
|
5
|
+
* These functions are stateless and free of REST-client concerns so the
|
|
6
|
+
* handlers stay tiny and so the shape is asserted in unit tests
|
|
7
|
+
* (`tests/tools/format/pages-format.test.ts`) and shape-pin tests
|
|
8
|
+
* (`tests/wave-shape-pin.test.ts`).
|
|
9
|
+
*
|
|
10
|
+
* @license MIT
|
|
11
|
+
*/
|
|
12
|
+
import type { DetailGroup, TableColumn } from '@getimo/mcp-toolkit';
|
|
13
|
+
/** Full columns for `pages_list`. */
|
|
14
|
+
export declare const PAGES_TABLE_COLUMNS: readonly TableColumn[];
|
|
15
|
+
/** Compact columns kick in at 21+ rows; drops `modified_at` + `type`. */
|
|
16
|
+
export declare const PAGES_COMPACT_COLUMNS: readonly TableColumn[];
|
|
17
|
+
export declare const SCHEMA_TABLE_COLUMNS: readonly TableColumn[];
|
|
18
|
+
/**
|
|
19
|
+
* Compact columns for `page_get_schema`. Real-world templates routinely
|
|
20
|
+
* exceed 21 nodes (a typical home-page has 30–150 elements; landing pages
|
|
21
|
+
* reach 300+), so the handler ALWAYS uses these compact columns via the
|
|
22
|
+
* `detailOverride: 'compact'` argument to `tableResult` (toolkit's
|
|
23
|
+
* `resolveDetailLevel` short-circuits when given a direct level).
|
|
24
|
+
*/
|
|
25
|
+
export declare const SCHEMA_COMPACT_COLUMNS: readonly TableColumn[];
|
|
26
|
+
/** Maps an `/pages` element to the table row shape. Missing fields default to empty.
|
|
27
|
+
* REST returns `name` (YOOtheme's internal field name); we surface it as `label`
|
|
28
|
+
* for LLM-friendly schemas. The legacy `label` fallback is for forward-compat
|
|
29
|
+
* if the backend ever switches naming.
|
|
30
|
+
*
|
|
31
|
+
* F-Frontend-URL (2026-05-25): the three frontend-URL hints carry through
|
|
32
|
+
* the mapper unchanged. The table-renderer doesn't render them (would
|
|
33
|
+
* blow the column budget), but the structured-content leg surfaces them
|
|
34
|
+
* so an MCP-agent walking the response sees the per-template URL hint
|
|
35
|
+
* without a follow-up REST call. */
|
|
36
|
+
export declare function mapPageRow(input: Record<string, unknown>): Record<string, unknown>;
|
|
37
|
+
/** Maps a `/pages/{id}/schema` node to the table row shape.
|
|
38
|
+
*
|
|
39
|
+
* F-006 (2026-05-26): also surfaces `rel_path` (path minus the
|
|
40
|
+
* `/templates/<id>/layout` prefix) so paths copied from `page_get_schema`
|
|
41
|
+
* match the `rel_path` form emitted by `element_list` + `page_get_layout`
|
|
42
|
+
* — agents that copy paths between tools no longer hit "no such element"
|
|
43
|
+
* on the fully-qualified pointer. Mirrors `mapElementRow` in
|
|
44
|
+
* `elements-format.ts`. The full `path` stays on the row for back-compat;
|
|
45
|
+
* the table column header points at `rel_path` instead.
|
|
46
|
+
*/
|
|
47
|
+
export declare function mapSchemaNodeRow(input: Record<string, unknown>): Record<string, unknown>;
|
|
48
|
+
/** Builds schema rows from the array returned by the REST `nodes` field. */
|
|
49
|
+
export declare function buildSchemaRows(nodes: ReadonlyArray<Record<string, unknown>>): Record<string, unknown>[];
|
|
50
|
+
/** Build the `detailResult` body for `get_etag`. Two groups: identity + freshness. */
|
|
51
|
+
export declare function buildEtagDetail(payload: {
|
|
52
|
+
etag: string;
|
|
53
|
+
generated_at?: string;
|
|
54
|
+
}): {
|
|
55
|
+
groups: DetailGroup[];
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=pages-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pages-format.d.ts","sourceRoot":"","sources":["../../../src/tools/format/pages-format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIpE,qCAAqC;AACrC,eAAO,MAAM,mBAAmB,EAAE,SAAS,WAAW,EAMrD,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,EAAE,SAAS,WAAW,EAIvD,CAAC;AAQF,eAAO,MAAM,oBAAoB,EAAE,SAAS,WAAW,EAKtD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,WAAW,EAIxD,CAAC;AA4BF;;;;;;;;;qCASqC;AACrC,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAelF;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAcxF;AAED,4EAA4E;AAC5E,wBAAgB,eAAe,CAC3B,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAC9C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAE3B;AAID,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,OAAO,EAAE;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG;IAAE,MAAM,EAAE,WAAW,EAAE,CAAA;CAAE,CA4B5B"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pages format-sidecar — pure transforms for `pages_list`, `page_get_schema`
|
|
3
|
+
* and `get_etag`. Wave G.2.1 (Design §3.2 rows 3 / 5 / 6).
|
|
4
|
+
*
|
|
5
|
+
* These functions are stateless and free of REST-client concerns so the
|
|
6
|
+
* handlers stay tiny and so the shape is asserted in unit tests
|
|
7
|
+
* (`tests/tools/format/pages-format.test.ts`) and shape-pin tests
|
|
8
|
+
* (`tests/wave-shape-pin.test.ts`).
|
|
9
|
+
*
|
|
10
|
+
* @license MIT
|
|
11
|
+
*/
|
|
12
|
+
// ─── Pages list columns (Design §3.2 row 3) ──────────────────────────
|
|
13
|
+
/** Full columns for `pages_list`. */
|
|
14
|
+
export const PAGES_TABLE_COLUMNS = [
|
|
15
|
+
{ key: 'id', label: 'ID', width: 36, llmOnly: true },
|
|
16
|
+
{ key: 'label', label: 'NAME', width: 28 },
|
|
17
|
+
{ key: 'type', label: 'TYPE', width: 12 },
|
|
18
|
+
{ key: 'elements_count', label: '#EL', width: 8, align: 'right' },
|
|
19
|
+
{ key: 'modified_at', label: 'MODIFIED', width: 20 },
|
|
20
|
+
];
|
|
21
|
+
/** Compact columns kick in at 21+ rows; drops `modified_at` + `type`. */
|
|
22
|
+
export const PAGES_COMPACT_COLUMNS = [
|
|
23
|
+
{ key: 'id', label: 'ID', width: 36, llmOnly: true },
|
|
24
|
+
{ key: 'label', label: 'NAME', width: 28 },
|
|
25
|
+
{ key: 'elements_count', label: '#EL', width: 8, align: 'right' },
|
|
26
|
+
];
|
|
27
|
+
// ─── Schema columns (Design §3.2 row 5 — always-compact override) ────
|
|
28
|
+
// F-006 (2026-05-26): PATH column shows `rel_path` (path minus the
|
|
29
|
+
// `/templates/<id>/layout` prefix) so paths copied out of page_get_schema
|
|
30
|
+
// match the form element_list emits. Fully-qualified `path` remains on
|
|
31
|
+
// the row for back-compat and is surfaced via structuredContent.
|
|
32
|
+
export const SCHEMA_TABLE_COLUMNS = [
|
|
33
|
+
{ key: 'rel_path', label: 'PATH', width: 48, llmOnly: true },
|
|
34
|
+
{ key: 'element_type', label: 'TYPE', width: 16 },
|
|
35
|
+
{ key: 'label', label: 'LABEL', width: 28 },
|
|
36
|
+
{ key: 'has_binding', label: 'BIND', width: 8 },
|
|
37
|
+
];
|
|
38
|
+
/**
|
|
39
|
+
* Compact columns for `page_get_schema`. Real-world templates routinely
|
|
40
|
+
* exceed 21 nodes (a typical home-page has 30–150 elements; landing pages
|
|
41
|
+
* reach 300+), so the handler ALWAYS uses these compact columns via the
|
|
42
|
+
* `detailOverride: 'compact'` argument to `tableResult` (toolkit's
|
|
43
|
+
* `resolveDetailLevel` short-circuits when given a direct level).
|
|
44
|
+
*/
|
|
45
|
+
export const SCHEMA_COMPACT_COLUMNS = [
|
|
46
|
+
{ key: 'rel_path', label: 'PATH', width: 48, llmOnly: true },
|
|
47
|
+
{ key: 'element_type', label: 'TYPE', width: 16 },
|
|
48
|
+
{ key: 'label', label: 'LABEL', width: 28 },
|
|
49
|
+
];
|
|
50
|
+
// ─── Row mappers ─────────────────────────────────────────────────────
|
|
51
|
+
function asString(v) {
|
|
52
|
+
return typeof v === 'string' ? v : '';
|
|
53
|
+
}
|
|
54
|
+
function asInt(v) {
|
|
55
|
+
return typeof v === 'number' && Number.isFinite(v) ? Math.trunc(v) : 0;
|
|
56
|
+
}
|
|
57
|
+
function asBool(v) {
|
|
58
|
+
return v === true;
|
|
59
|
+
}
|
|
60
|
+
function asNullableString(v) {
|
|
61
|
+
if (typeof v === 'string') {
|
|
62
|
+
return v;
|
|
63
|
+
}
|
|
64
|
+
if (v === null) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
// Unknown / undefined → null (consistent with the server-side honest-null
|
|
68
|
+
// convention — `frontend_url: null` is meaningful, `undefined` is not).
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
/** Maps an `/pages` element to the table row shape. Missing fields default to empty.
|
|
72
|
+
* REST returns `name` (YOOtheme's internal field name); we surface it as `label`
|
|
73
|
+
* for LLM-friendly schemas. The legacy `label` fallback is for forward-compat
|
|
74
|
+
* if the backend ever switches naming.
|
|
75
|
+
*
|
|
76
|
+
* F-Frontend-URL (2026-05-25): the three frontend-URL hints carry through
|
|
77
|
+
* the mapper unchanged. The table-renderer doesn't render them (would
|
|
78
|
+
* blow the column budget), but the structured-content leg surfaces them
|
|
79
|
+
* so an MCP-agent walking the response sees the per-template URL hint
|
|
80
|
+
* without a follow-up REST call. */
|
|
81
|
+
export function mapPageRow(input) {
|
|
82
|
+
return {
|
|
83
|
+
id: asString(input.id),
|
|
84
|
+
label: asString(input.name ?? input.label),
|
|
85
|
+
type: asString(input.type),
|
|
86
|
+
elements_count: asInt(input.elements_count),
|
|
87
|
+
modified_at: asString(input.modified_at),
|
|
88
|
+
// F-Frontend-URL: nullable-strings, NOT empty-string coercion —
|
|
89
|
+
// a null frontend_url is semantically different from an empty
|
|
90
|
+
// string ("not applicable" vs "we tried and got nothing"). The
|
|
91
|
+
// server emits null deliberately; the mapper preserves it.
|
|
92
|
+
frontend_url: asNullableString(input.frontend_url),
|
|
93
|
+
frontend_url_template: asNullableString(input.frontend_url_template),
|
|
94
|
+
frontend_url_description: asNullableString(input.frontend_url_description),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/** Maps a `/pages/{id}/schema` node to the table row shape.
|
|
98
|
+
*
|
|
99
|
+
* F-006 (2026-05-26): also surfaces `rel_path` (path minus the
|
|
100
|
+
* `/templates/<id>/layout` prefix) so paths copied from `page_get_schema`
|
|
101
|
+
* match the `rel_path` form emitted by `element_list` + `page_get_layout`
|
|
102
|
+
* — agents that copy paths between tools no longer hit "no such element"
|
|
103
|
+
* on the fully-qualified pointer. Mirrors `mapElementRow` in
|
|
104
|
+
* `elements-format.ts`. The full `path` stays on the row for back-compat;
|
|
105
|
+
* the table column header points at `rel_path` instead.
|
|
106
|
+
*/
|
|
107
|
+
export function mapSchemaNodeRow(input) {
|
|
108
|
+
const path = asString(input.path);
|
|
109
|
+
// F-006: derive relative path by stripping `/templates/<id>/layout`
|
|
110
|
+
// prefix so the LLM table column shows uniquely-identifying suffix,
|
|
111
|
+
// and the `rel_path` value can be copy-pasted into `element_path` /
|
|
112
|
+
// `root_path` arguments without further trimming.
|
|
113
|
+
const relPath = path.replace(/^\/templates\/[^/]+\/layout/, '') || '/';
|
|
114
|
+
return {
|
|
115
|
+
path,
|
|
116
|
+
rel_path: relPath,
|
|
117
|
+
element_type: asString(input.element_type),
|
|
118
|
+
label: asString(input.label),
|
|
119
|
+
has_binding: asBool(input.has_binding),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/** Builds schema rows from the array returned by the REST `nodes` field. */
|
|
123
|
+
export function buildSchemaRows(nodes) {
|
|
124
|
+
return nodes.map(mapSchemaNodeRow);
|
|
125
|
+
}
|
|
126
|
+
// ─── Detail builders ─────────────────────────────────────────────────
|
|
127
|
+
/** Build the `detailResult` body for `get_etag`. Two groups: identity + freshness. */
|
|
128
|
+
export function buildEtagDetail(payload) {
|
|
129
|
+
return {
|
|
130
|
+
groups: [
|
|
131
|
+
{
|
|
132
|
+
label: 'Identity',
|
|
133
|
+
entries: [
|
|
134
|
+
{
|
|
135
|
+
key: 'etag',
|
|
136
|
+
label: 'ETag',
|
|
137
|
+
value: payload.etag,
|
|
138
|
+
format: 'code',
|
|
139
|
+
copyable: true,
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
label: 'Freshness',
|
|
145
|
+
entries: [
|
|
146
|
+
{
|
|
147
|
+
key: 'generated_at',
|
|
148
|
+
label: 'Generated',
|
|
149
|
+
value: payload.generated_at ?? null,
|
|
150
|
+
format: 'date',
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=pages-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pages-format.js","sourceRoot":"","sources":["../../../src/tools/format/pages-format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,wEAAwE;AAExE,qCAAqC;AACrC,MAAM,CAAC,MAAM,mBAAmB,GAA2B;IACvD,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAA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oBACL;wBACI,GAAG,EAAE,MAAM;wBACX,KAAK,EAAE,MAAM;wBACb,KAAK,EAAE,OAAO,CAAC,IAAI;wBACnB,MAAM,EAAE,MAAM;wBACd,QAAQ,EAAE,IAAI;qBACjB;iBACJ;aACJ;YACD;gBACI,KAAK,EAAE,WAAW;gBAClB,OAAO,EAAE;oBACL;wBACI,GAAG,EAAE,cAAc;wBACnB,KAAK,EAAE,WAAW;wBAClB,KAAK,EAAE,OAAO,CAAC,YAAY,IAAI,IAAI;wBACnC,MAAM,EAAE,MAAM;qBACjB;iBACJ;aACJ;SACJ;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sources format-sidecar — pure transforms for `sources_list` (table) and
|
|
3
|
+
* `element_get_binding` (detail). Wave G.2.7 (Design §3.2 rows 16 / 17).
|
|
4
|
+
*
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
import type { DetailGroup, TableColumn } from '@getimo/mcp-toolkit';
|
|
8
|
+
export declare const SOURCES_TABLE_COLUMNS: readonly TableColumn[];
|
|
9
|
+
export interface SourceRow {
|
|
10
|
+
name: string;
|
|
11
|
+
label: string;
|
|
12
|
+
origin: string;
|
|
13
|
+
kind: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function mapSourceRow(input: Record<string, unknown>): SourceRow;
|
|
16
|
+
export declare function flattenSourcesPayload(payload: unknown): Record<string, unknown>[];
|
|
17
|
+
/**
|
|
18
|
+
* F-A5-1 (v1.1.5) — Joomla content sources arrive tagged with
|
|
19
|
+
* `origin: "wordpress"` because YT Pro historically uses that group
|
|
20
|
+
* key for "host-CMS-native" sources. On Joomla that label is wrong:
|
|
21
|
+
* `Article` / `Category` / `Tag` are Joomla concepts, not WordPress.
|
|
22
|
+
*
|
|
23
|
+
* The MCP server knows the bound client's platform via
|
|
24
|
+
* {@link RestClient.getPlatform}, so we remap unconditionally:
|
|
25
|
+
*
|
|
26
|
+
* platform === 'joomla' AND origin === 'wordpress' → 'joomla'
|
|
27
|
+
*
|
|
28
|
+
* The unconditional remap is safe in v1.x: the Joomla host plugin
|
|
29
|
+
* never serves WP-named sources (WP custom-post-type integrations
|
|
30
|
+
* don't apply on Joomla), so any row tagged `wordpress` on a Joomla
|
|
31
|
+
* site is by definition a Joomla-native source mis-labelled by the
|
|
32
|
+
* upstream group key. A server-side fix is tracked separately for
|
|
33
|
+
* v1.2; until then this keeps cross-platform agent reasoning honest.
|
|
34
|
+
*/
|
|
35
|
+
export declare function remapOriginForPlatform(rows: Record<string, unknown>[], platformKind: 'wordpress' | 'joomla'): Record<string, unknown>[];
|
|
36
|
+
export declare function buildBindingDetail(payload: {
|
|
37
|
+
template_id: string;
|
|
38
|
+
element_path: string;
|
|
39
|
+
binding: Record<string, unknown>;
|
|
40
|
+
}): {
|
|
41
|
+
groups: DetailGroup[];
|
|
42
|
+
title?: string;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=sources-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sources-format.d.ts","sourceRoot":"","sources":["../../../src/tools/format/sources-format.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIpE,eAAO,MAAM,qBAAqB,EAAE,SAAS,WAAW,EAKvD,CAAC;AAQF,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAYtE;AAgBD,wBAAgB,qBAAqB,CACjC,OAAO,EAAE,OAAO,GACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAqB3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC/B,YAAY,EAAE,WAAW,GAAG,QAAQ,GACrC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAU3B;AAsED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,GAAG;IAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAgG5C"}
|