@wootsup/yt-builder-mcp 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -6
- package/bin/yt-builder-mcp.js +6 -0
- package/dist/auth.d.ts +119 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +226 -0
- package/dist/auth.js.map +1 -0
- package/dist/client.d.ts +84 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +151 -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 +53 -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 +56 -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 +80 -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 +194 -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 +52 -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 +38 -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 +44 -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 +52 -0
- package/dist/clients/index.d.ts.map +1 -0
- package/dist/clients/index.js +72 -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 +69 -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 +41 -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 +49 -0
- package/dist/gateway/essentials.d.ts.map +1 -0
- package/dist/gateway/essentials.js +92 -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 +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +113 -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 +109 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +237 -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 +152 -0
- package/dist/setup-cli.d.ts.map +1 -0
- package/dist/setup-cli.js +870 -0
- package/dist/setup-cli.js.map +1 -0
- package/dist/setup-prompts.d.ts +41 -0
- package/dist/setup-prompts.d.ts.map +1 -0
- package/dist/setup-prompts.js +146 -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/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 +117 -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 +124 -0
- package/dist/sites/client-pool.d.ts.map +1 -0
- package/dist/sites/client-pool.js +172 -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 +109 -0
- package/dist/sites/secret-resolver.d.ts.map +1 -0
- package/dist/sites/secret-resolver.js +189 -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 +30 -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 +135 -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/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 +199 -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 +148 -0
- package/dist/tools/elements/handlers-write.js.map +1 -0
- package/dist/tools/elements/handlers.d.ts +68 -0
- package/dist/tools/elements/handlers.d.ts.map +1 -0
- package/dist/tools/elements/handlers.js +206 -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 +194 -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 +58 -0
- package/dist/tools/format/inspection-format.d.ts.map +1 -0
- package/dist/tools/format/inspection-format.js +164 -0
- package/dist/tools/format/inspection-format.js.map +1 -0
- package/dist/tools/format/pages-format.d.ts +48 -0
- package/dist/tools/format/pages-format.d.ts.map +1 -0
- package/dist/tools/format/pages-format.js +137 -0
- package/dist/tools/format/pages-format.js.map +1 -0
- package/dist/tools/format/sources-format.d.ts +25 -0
- package/dist/tools/format/sources-format.d.ts.map +1 -0
- package/dist/tools/format/sources-format.js +208 -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 +170 -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 +69 -0
- package/dist/tools/multi-items/builders.js.map +1 -0
- package/dist/tools/multi-items/clean-implode-handler.d.ts +28 -0
- package/dist/tools/multi-items/clean-implode-handler.d.ts.map +1 -0
- package/dist/tools/multi-items/clean-implode-handler.js +40 -0
- package/dist/tools/multi-items/clean-implode-handler.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 +41 -0
- package/dist/tools/multi-items/inspect-handler.d.ts.map +1 -0
- package/dist/tools/multi-items/inspect-handler.js +50 -0
- package/dist/tools/multi-items/inspect-handler.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 +14 -0
- package/dist/tools/pages/builders.d.ts.map +1 -0
- package/dist/tools/pages/builders.js +127 -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 +171 -0
- package/dist/tools/pages/handlers-read.js.map +1 -0
- package/dist/tools/pages/handlers-write.d.ts +21 -0
- package/dist/tools/pages/handlers-write.d.ts.map +1 -0
- package/dist/tools/pages/handlers-write.js +52 -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 +30 -0
- package/dist/tools/pages/schemas.d.ts.map +1 -0
- package/dist/tools/pages/schemas.js +48 -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 +48 -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 +115 -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 +129 -0
- package/dist/tools/sources/handlers-bind.js.map +1 -0
- package/dist/tools/sources/handlers.d.ts +45 -0
- package/dist/tools/sources/handlers.d.ts.map +1 -0
- package/dist/tools/sources/handlers.js +91 -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 +80 -0
- package/dist/tools/sparse-fields.d.ts.map +1 -0
- package/dist/tools/sparse-fields.js +144 -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 +93 -0
- package/dist/tools/tool-builder/results.d.ts.map +1 -0
- package/dist/tools/tool-builder/results.js +211 -0
- package/dist/tools/tool-builder/results.js.map +1 -0
- package/dist/tools/tool-builder/types.d.ts +82 -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/manifest.json +27 -10
- package/package.json +3 -1
- package/skills/yt-builder-mcp/SKILL.md +397 -138
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ in `tools/list`** (well under Cursor's ~40-tool cap):
|
|
|
79
79
|
clean_implode_directives, element_type_get_schema).
|
|
80
80
|
|
|
81
81
|
Total: **23 domain tools + 1 gateway = 24**. Surface: **11 entries
|
|
82
|
-
in tools/list**. See `skills/
|
|
82
|
+
in tools/list**. See `skills/yt-builder-mcp/SKILL.md` for the
|
|
83
83
|
full catalog and the 5 canonical workflows.
|
|
84
84
|
|
|
85
85
|
## Tool catalogue — 23 domain tools
|
|
@@ -144,8 +144,10 @@ When launched by an AI client (or directly):
|
|
|
144
144
|
|
|
145
145
|
| Variable | Required? | Purpose |
|
|
146
146
|
|----------|-----------|---------|
|
|
147
|
-
| `
|
|
148
|
-
| `
|
|
147
|
+
| `YTB_MCP_SITE_URL` | Yes | Host CMS base URL (e.g. `https://example.com`). Works for BOTH WordPress and Joomla. Trailing slash is stripped. |
|
|
148
|
+
| `YTB_MCP_WP_URL` | No (deprecated) | Legacy alias for `YTB_MCP_SITE_URL`; still honoured for pre-Wave-7 configurations. A non-fatal deprecation notice is written to stderr when this is used without `YTB_MCP_SITE_URL`. |
|
|
149
|
+
| `YTB_MCP_BEARER_TOKEN` | Yes | Bearer key from wp-admin (WordPress: Tools → "YT Builder MCP") or Administrator → Components → "YT Builder MCP" (Joomla). Format-checked client-side: must match `ytb_(live\|test)_<payload>.<sig>`. Do **not** prepend `Bearer ` — the MCP server adds it. |
|
|
150
|
+
| `YTB_MCP_PLATFORM` | No | Explicit platform hint: `wordpress` or `joomla`. Set to `joomla` when `YTB_MCP_SITE_URL` is an origin-only Joomla URL (no `/api/index.php/` in the path). Defaults to URL-shape auto-detection. |
|
|
149
151
|
| `YTB_MCP_TIMEOUT_MS` | No | REST timeout (default 15000). |
|
|
150
152
|
| `YTB_MCP_TEST_MODE` | No | `1` skips the stdio loop (smoke tests). |
|
|
151
153
|
|
|
@@ -157,11 +159,11 @@ client's MCP config file:
|
|
|
157
159
|
```json
|
|
158
160
|
{
|
|
159
161
|
"mcpServers": {
|
|
160
|
-
"
|
|
162
|
+
"yt-builder-mcp": {
|
|
161
163
|
"command": "npx",
|
|
162
164
|
"args": ["-y", "@wootsup/yt-builder-mcp"],
|
|
163
165
|
"env": {
|
|
164
|
-
"
|
|
166
|
+
"YTB_MCP_SITE_URL": "https://example.com",
|
|
165
167
|
"YTB_MCP_BEARER_TOKEN": "ytb_live_…"
|
|
166
168
|
}
|
|
167
169
|
}
|
|
@@ -169,6 +171,16 @@ client's MCP config file:
|
|
|
169
171
|
}
|
|
170
172
|
```
|
|
171
173
|
|
|
174
|
+
For a Joomla install at an origin-only URL, also set the platform hint:
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
"env": {
|
|
178
|
+
"YTB_MCP_SITE_URL": "https://example.com/joomla",
|
|
179
|
+
"YTB_MCP_BEARER_TOKEN": "ytb_live_…",
|
|
180
|
+
"YTB_MCP_PLATFORM": "joomla"
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
172
184
|
## Non-interactive CI usage
|
|
173
185
|
|
|
174
186
|
For scripted / CI installs, pass the answers as flags and add
|
|
@@ -213,7 +225,7 @@ The CLI returns POSIX-style exit codes for scripting / CI:
|
|
|
213
225
|
|
|
214
226
|
## Documentation
|
|
215
227
|
|
|
216
|
-
- [SKILL.md (bundled agent skill)](./skills/
|
|
228
|
+
- [SKILL.md (bundled agent skill)](./skills/yt-builder-mcp/SKILL.md) — 5 canonical workflows, gateway model, tool catalog
|
|
217
229
|
- [REST API Reference](https://github.com/wootsup/yt-builder-mcp/blob/main/docs/rest-api-reference.md)
|
|
218
230
|
- [MCP Tool Reference](https://github.com/wootsup/yt-builder-mcp/blob/main/docs/mcp-tool-reference.md)
|
|
219
231
|
|
package/bin/yt-builder-mcp.js
CHANGED
package/dist/auth.d.ts
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth / configuration loading for the MCP server.
|
|
3
|
+
*
|
|
4
|
+
* The MCP server reads two environment variables on startup:
|
|
5
|
+
*
|
|
6
|
+
* YTB_MCP_SITE_URL — base URL of the host CMS install (WordPress
|
|
7
|
+
* OR Joomla), e.g. `https://example.com`.
|
|
8
|
+
* The per-platform REST namespace
|
|
9
|
+
* (`/wp-json/yt-builder-mcp/v1` for WP,
|
|
10
|
+
* `/api/index.php/v1/yt-builder-mcp` for
|
|
11
|
+
* Joomla) is appended internally based on
|
|
12
|
+
* runtime platform detection.
|
|
13
|
+
* YTB_MCP_WP_URL — DEPRECATED alias for YTB_MCP_SITE_URL,
|
|
14
|
+
* kept for back-compat with pre-Wave 7
|
|
15
|
+
* configurations. A non-fatal deprecation
|
|
16
|
+
* notice is written to stderr when the
|
|
17
|
+
* legacy var is used in non-test mode.
|
|
18
|
+
* YTB_MCP_BEARER_TOKEN — the Bearer key generated by the plugin
|
|
19
|
+
* Settings page (`wp-admin → YT Builder MCP`
|
|
20
|
+
* on WordPress, `Components → YT Builder MCP`
|
|
21
|
+
* on Joomla).
|
|
22
|
+
*
|
|
23
|
+
* `loadConfig()` throws `ConfigError` if either is missing, so the
|
|
24
|
+
* server fails fast with a useful message rather than emitting cryptic
|
|
25
|
+
* 401/Network errors deep in the request stack.
|
|
26
|
+
*
|
|
27
|
+
* @license MIT
|
|
28
|
+
*/
|
|
29
|
+
import { SiteRegistry } from './sites/registry.js';
|
|
30
|
+
export interface ServerConfig {
|
|
31
|
+
/** Base URL of the host-CMS install (no trailing slash). */
|
|
32
|
+
readonly baseUrl: string;
|
|
33
|
+
/** Bearer key. */
|
|
34
|
+
readonly bearerToken: string;
|
|
35
|
+
/** Network timeout (ms) for REST calls. */
|
|
36
|
+
readonly timeoutMs: number;
|
|
37
|
+
/**
|
|
38
|
+
* Optional explicit platform hint from {@link ENV_PLATFORM}.
|
|
39
|
+
* `undefined` lets the consumer rely on URL-shape detection.
|
|
40
|
+
*/
|
|
41
|
+
readonly platformHint?: 'wordpress' | 'joomla';
|
|
42
|
+
}
|
|
43
|
+
export interface LoadConfigOptions {
|
|
44
|
+
/** Allow the bearer-token to be empty (for health-only smoke tests). */
|
|
45
|
+
readonly allowMissingToken?: boolean;
|
|
46
|
+
/** Source of env vars (defaults to process.env). */
|
|
47
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Canonical env-var name for the host-CMS base URL (Wave 7+: covers
|
|
51
|
+
* both WordPress and Joomla). Prefer this for all new configurations.
|
|
52
|
+
*/
|
|
53
|
+
export declare const ENV_SITE_URL = "YTB_MCP_SITE_URL";
|
|
54
|
+
/**
|
|
55
|
+
* Legacy env-var name kept for back-compat. Pre-Wave-7 configurations
|
|
56
|
+
* (every release through v1.0.x) used `YTB_MCP_WP_URL`. New code should
|
|
57
|
+
* use {@link ENV_SITE_URL}; this constant is retained so the wizard,
|
|
58
|
+
* tests, and error hints can still reference the legacy name.
|
|
59
|
+
*/
|
|
60
|
+
export declare const ENV_WP_URL = "YTB_MCP_WP_URL";
|
|
61
|
+
export declare const ENV_BEARER = "YTB_MCP_BEARER_TOKEN";
|
|
62
|
+
export declare const ENV_TIMEOUT = "YTB_MCP_TIMEOUT_MS";
|
|
63
|
+
export declare const ENV_TEST_MODE = "YTB_MCP_TEST_MODE";
|
|
64
|
+
/**
|
|
65
|
+
* Optional platform hint env var — `'wordpress'` or `'joomla'`. When
|
|
66
|
+
* unset, the server auto-detects from the URL shape (cookbook §3.7.1):
|
|
67
|
+
* - URL contains `/wp-json/` → wordpress
|
|
68
|
+
* - URL contains `/api/index.php/` → joomla
|
|
69
|
+
* - origin-only URL → defaults to wordpress (back-compat)
|
|
70
|
+
*
|
|
71
|
+
* Set this to `'joomla'` when your YTB_MCP_SITE_URL is an origin-only
|
|
72
|
+
* Joomla URL like `https://example.com/joomla`.
|
|
73
|
+
*/
|
|
74
|
+
export declare const ENV_PLATFORM = "YTB_MCP_PLATFORM";
|
|
75
|
+
/**
|
|
76
|
+
* W10 — canonical env-var name for the multi-site registry file. When
|
|
77
|
+
* set, {@link loadRegistry} loads + validates the JSON at this path and
|
|
78
|
+
* the legacy {@link ENV_SITE_URL} / {@link ENV_BEARER} pair is ignored.
|
|
79
|
+
* When unset, the env-bridge falls back to building a one-site registry
|
|
80
|
+
* from the legacy single-site pair.
|
|
81
|
+
*/
|
|
82
|
+
export declare const ENV_SITES_FILE = "YTB_MCP_SITES_FILE";
|
|
83
|
+
export declare function loadConfig(options?: LoadConfigOptions): ServerConfig;
|
|
84
|
+
export declare function isTestMode(env?: NodeJS.ProcessEnv): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Options accepted by {@link loadRegistry}.
|
|
87
|
+
*/
|
|
88
|
+
export interface LoadRegistryOptions {
|
|
89
|
+
/** Source of env vars (defaults to process.env). */
|
|
90
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* W10 — canonical boot-time registry loader.
|
|
94
|
+
*
|
|
95
|
+
* Resolution order:
|
|
96
|
+
* 1. **Sites file** — if {@link ENV_SITES_FILE} is set to a non-empty
|
|
97
|
+
* string, parse + validate the JSON at that path and wrap it in a
|
|
98
|
+
* {@link SiteRegistry}. Schema failures bubble up as
|
|
99
|
+
* `SitesFileError` (the store does not swallow them); the caller
|
|
100
|
+
* decides whether to fail-fast or fall back. Wave 10 chooses
|
|
101
|
+
* fail-fast — explicit file = explicit intent.
|
|
102
|
+
*
|
|
103
|
+
* 2. **Legacy env-bridge** — synthesise a one-site registry from the
|
|
104
|
+
* pre-W10 single-site env-vars ({@link ENV_SITE_URL} +
|
|
105
|
+
* {@link ENV_BEARER}, with {@link ENV_PLATFORM} as optional hint).
|
|
106
|
+
* Preserves the single-site UX for every customer who has not
|
|
107
|
+
* migrated to a sites.json yet.
|
|
108
|
+
*
|
|
109
|
+
* 3. **Hard fail** — neither configured. Surface a {@link ConfigError}
|
|
110
|
+
* with the three setup options so the operator knows exactly which
|
|
111
|
+
* knob to turn.
|
|
112
|
+
*
|
|
113
|
+
* This function replaces {@link loadConfig} on the main boot path.
|
|
114
|
+
* `loadConfig` is intentionally retained for the test-mode fallback in
|
|
115
|
+
* `index.ts` (`--test-mode` smoke probes) and for any embedded consumer
|
|
116
|
+
* that still wants a flat `ServerConfig`.
|
|
117
|
+
*/
|
|
118
|
+
export declare function loadRegistry(opts?: LoadRegistryOptions): Promise<SiteRegistry>;
|
|
119
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAKH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAInD,MAAM,WAAW,YAAY;IACzB,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACz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ads two environment variables on startup:
|
|
5
|
+
*
|
|
6
|
+
* YTB_MCP_SITE_URL — base URL of the host CMS install (WordPress
|
|
7
|
+
* OR Joomla), e.g. `https://example.com`.
|
|
8
|
+
* The per-platform REST namespace
|
|
9
|
+
* (`/wp-json/yt-builder-mcp/v1` for WP,
|
|
10
|
+
* `/api/index.php/v1/yt-builder-mcp` for
|
|
11
|
+
* Joomla) is appended internally based on
|
|
12
|
+
* runtime platform detection.
|
|
13
|
+
* YTB_MCP_WP_URL — DEPRECATED alias for YTB_MCP_SITE_URL,
|
|
14
|
+
* kept for back-compat with pre-Wave 7
|
|
15
|
+
* configurations. A non-fatal deprecation
|
|
16
|
+
* notice is written to stderr when the
|
|
17
|
+
* legacy var is used in non-test mode.
|
|
18
|
+
* YTB_MCP_BEARER_TOKEN — the Bearer key generated by the plugin
|
|
19
|
+
* Settings page (`wp-admin → YT Builder MCP`
|
|
20
|
+
* on WordPress, `Components → YT Builder MCP`
|
|
21
|
+
* on Joomla).
|
|
22
|
+
*
|
|
23
|
+
* `loadConfig()` throws `ConfigError` if either is missing, so the
|
|
24
|
+
* server fails fast with a useful message rather than emitting cryptic
|
|
25
|
+
* 401/Network errors deep in the request stack.
|
|
26
|
+
*
|
|
27
|
+
* @license MIT
|
|
28
|
+
*/
|
|
29
|
+
import { z } from 'zod';
|
|
30
|
+
import { ConfigError } from './errors.js';
|
|
31
|
+
import { synthesiseFromEnv } from './sites/env-bridge.js';
|
|
32
|
+
import { SiteRegistry } from './sites/registry.js';
|
|
33
|
+
import { SitesFile } from './sites/schema.js';
|
|
34
|
+
import { loadSitesFile } from './sites/store.js';
|
|
35
|
+
/**
|
|
36
|
+
* Canonical env-var name for the host-CMS base URL (Wave 7+: covers
|
|
37
|
+
* both WordPress and Joomla). Prefer this for all new configurations.
|
|
38
|
+
*/
|
|
39
|
+
export const ENV_SITE_URL = 'YTB_MCP_SITE_URL';
|
|
40
|
+
/**
|
|
41
|
+
* Legacy env-var name kept for back-compat. Pre-Wave-7 configurations
|
|
42
|
+
* (every release through v1.0.x) used `YTB_MCP_WP_URL`. New code should
|
|
43
|
+
* use {@link ENV_SITE_URL}; this constant is retained so the wizard,
|
|
44
|
+
* tests, and error hints can still reference the legacy name.
|
|
45
|
+
*/
|
|
46
|
+
export const ENV_WP_URL = 'YTB_MCP_WP_URL';
|
|
47
|
+
export const ENV_BEARER = 'YTB_MCP_BEARER_TOKEN';
|
|
48
|
+
export const ENV_TIMEOUT = 'YTB_MCP_TIMEOUT_MS';
|
|
49
|
+
export const ENV_TEST_MODE = 'YTB_MCP_TEST_MODE';
|
|
50
|
+
/**
|
|
51
|
+
* Optional platform hint env var — `'wordpress'` or `'joomla'`. When
|
|
52
|
+
* unset, the server auto-detects from the URL shape (cookbook §3.7.1):
|
|
53
|
+
* - URL contains `/wp-json/` → wordpress
|
|
54
|
+
* - URL contains `/api/index.php/` → joomla
|
|
55
|
+
* - origin-only URL → defaults to wordpress (back-compat)
|
|
56
|
+
*
|
|
57
|
+
* Set this to `'joomla'` when your YTB_MCP_SITE_URL is an origin-only
|
|
58
|
+
* Joomla URL like `https://example.com/joomla`.
|
|
59
|
+
*/
|
|
60
|
+
export const ENV_PLATFORM = 'YTB_MCP_PLATFORM';
|
|
61
|
+
/**
|
|
62
|
+
* W10 — canonical env-var name for the multi-site registry file. When
|
|
63
|
+
* set, {@link loadRegistry} loads + validates the JSON at this path and
|
|
64
|
+
* the legacy {@link ENV_SITE_URL} / {@link ENV_BEARER} pair is ignored.
|
|
65
|
+
* When unset, the env-bridge falls back to building a one-site registry
|
|
66
|
+
* from the legacy single-site pair.
|
|
67
|
+
*/
|
|
68
|
+
export const ENV_SITES_FILE = 'YTB_MCP_SITES_FILE';
|
|
69
|
+
const DEFAULT_TIMEOUT_MS = 15_000;
|
|
70
|
+
/**
|
|
71
|
+
* Maximum accepted length for a Bearer token (defense-in-depth bound;
|
|
72
|
+
* the real plugin keys are ~150-300 bytes, the 512 ceiling protects
|
|
73
|
+
* against accidental file-pastes / log dumps / memory abuse).
|
|
74
|
+
*/
|
|
75
|
+
const BEARER_MAX_LEN = 512;
|
|
76
|
+
/**
|
|
77
|
+
* Bearer-token format check — matches the plugin's `KeyService.php`
|
|
78
|
+
* `PREFIX = ytb_live_` (and the planned `ytb_test_` future variant).
|
|
79
|
+
* Token shape: `ytb_(live|test)_<payloadB64Url>.<sigB64Url>` where
|
|
80
|
+
* base64url uses `[A-Za-z0-9_-]` (no dots inside the payload or sig).
|
|
81
|
+
*
|
|
82
|
+
* Round-1 audit I7 fix (2026-05-22): the earlier `.trim()` + empty-check
|
|
83
|
+
* was not enough to catch the most common config mistakes — the leading
|
|
84
|
+
* `Bearer ` prefix accidentally pasted into the env var, copy-paste
|
|
85
|
+
* truncation (no `.` separator), or a totally wrong token style. We
|
|
86
|
+
* fail-fast here so the client never sends a known-bad value upstream.
|
|
87
|
+
*/
|
|
88
|
+
const BEARER_FORMAT_SCHEMA = z
|
|
89
|
+
.string()
|
|
90
|
+
.max(BEARER_MAX_LEN, `Bearer too long (max ${String(BEARER_MAX_LEN)} chars). The env var YTB_MCP_BEARER_TOKEN seems to contain something other than a plain key — strip leading "Bearer " or paste only the key copied from wp-admin → "YT Builder MCP" → Settings.`)
|
|
91
|
+
.regex(/^ytb_(live|test)_[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/, 'Bearer must match ytb_(live|test)_<payloadB64Url>.<sigB64Url> format (copy the key as shown in wp-admin → "YT Builder MCP" → Settings; do NOT prepend "Bearer ").');
|
|
92
|
+
export function loadConfig(options = {}) {
|
|
93
|
+
const env = options.env ?? process.env;
|
|
94
|
+
// Wave 7: YTB_MCP_SITE_URL is canonical (covers both WP + Joomla);
|
|
95
|
+
// YTB_MCP_WP_URL is retained as a deprecated back-compat alias.
|
|
96
|
+
// Resolution order: SITE_URL wins; legacy WP_URL fallback emits a
|
|
97
|
+
// soft deprecation note in non-test mode.
|
|
98
|
+
const rawSiteUrl = (env[ENV_SITE_URL] ?? '').trim();
|
|
99
|
+
const rawLegacyUrl = (env[ENV_WP_URL] ?? '').trim();
|
|
100
|
+
const rawUrl = rawSiteUrl !== '' ? rawSiteUrl : rawLegacyUrl;
|
|
101
|
+
// Soft deprecation notice — only when the loader is being used in
|
|
102
|
+
// its real-server role (env defaulted to process.env). Programmatic
|
|
103
|
+
// callers (tests, embedded uses) pass `options.env` explicitly and
|
|
104
|
+
// are silently treated as opt-in to the legacy var.
|
|
105
|
+
if (rawSiteUrl === ''
|
|
106
|
+
&& rawLegacyUrl !== ''
|
|
107
|
+
&& options.env === undefined
|
|
108
|
+
&& !isTestMode(env)) {
|
|
109
|
+
process.stderr.write(`[yt-builder-mcp] notice: ${ENV_WP_URL} is deprecated — ` +
|
|
110
|
+
`set ${ENV_SITE_URL} instead (same value; covers WordPress + Joomla).\n`);
|
|
111
|
+
}
|
|
112
|
+
const rawToken = (env[ENV_BEARER] ?? '').trim();
|
|
113
|
+
const rawTimeout = (env[ENV_TIMEOUT] ?? '').trim();
|
|
114
|
+
if (rawUrl === '') {
|
|
115
|
+
throw new ConfigError(`Missing ${ENV_SITE_URL}. Set it to your CMS base URL ` +
|
|
116
|
+
'(e.g. https://example.com — WordPress or Joomla). ' +
|
|
117
|
+
'Run `yt-builder-mcp setup` to configure.');
|
|
118
|
+
}
|
|
119
|
+
if (!options.allowMissingToken && rawToken === '') {
|
|
120
|
+
throw new ConfigError(`Missing ${ENV_BEARER}. Generate a Bearer key in wp-admin → "YT Builder MCP" → ` +
|
|
121
|
+
'Settings, then run `yt-builder-mcp setup`.');
|
|
122
|
+
}
|
|
123
|
+
// I7-fix: enforce the Bearer-format contract before the client
|
|
124
|
+
// makes any request. Empty token is allowed only via
|
|
125
|
+
// `allowMissingToken` (the health-only smoke path); any other
|
|
126
|
+
// non-empty value MUST match the plugin's KeyService format.
|
|
127
|
+
if (rawToken !== '') {
|
|
128
|
+
const parsed = BEARER_FORMAT_SCHEMA.safeParse(rawToken);
|
|
129
|
+
if (!parsed.success) {
|
|
130
|
+
const issueMsg = parsed.error.issues
|
|
131
|
+
.map((iss) => iss.message)
|
|
132
|
+
.join(' ');
|
|
133
|
+
throw new ConfigError(`Invalid ${ENV_BEARER}: ${issueMsg}`);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
let timeoutMs = DEFAULT_TIMEOUT_MS;
|
|
137
|
+
if (rawTimeout !== '') {
|
|
138
|
+
const parsed = Number.parseInt(rawTimeout, 10);
|
|
139
|
+
if (Number.isFinite(parsed) && parsed > 0) {
|
|
140
|
+
timeoutMs = parsed;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const rawPlatform = (env[ENV_PLATFORM] ?? '').trim().toLowerCase();
|
|
144
|
+
const platformHint = rawPlatform === 'wordpress' || rawPlatform === 'joomla'
|
|
145
|
+
? rawPlatform
|
|
146
|
+
: undefined;
|
|
147
|
+
return {
|
|
148
|
+
baseUrl: stripTrailingSlash(rawUrl),
|
|
149
|
+
bearerToken: rawToken,
|
|
150
|
+
timeoutMs,
|
|
151
|
+
...(platformHint !== undefined ? { platformHint } : {}),
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
export function isTestMode(env = process.env) {
|
|
155
|
+
return (env[ENV_TEST_MODE] ?? '') === '1';
|
|
156
|
+
}
|
|
157
|
+
function stripTrailingSlash(url) {
|
|
158
|
+
return url.replace(/\/+$/, '');
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* W10 — canonical boot-time registry loader.
|
|
162
|
+
*
|
|
163
|
+
* Resolution order:
|
|
164
|
+
* 1. **Sites file** — if {@link ENV_SITES_FILE} is set to a non-empty
|
|
165
|
+
* string, parse + validate the JSON at that path and wrap it in a
|
|
166
|
+
* {@link SiteRegistry}. Schema failures bubble up as
|
|
167
|
+
* `SitesFileError` (the store does not swallow them); the caller
|
|
168
|
+
* decides whether to fail-fast or fall back. Wave 10 chooses
|
|
169
|
+
* fail-fast — explicit file = explicit intent.
|
|
170
|
+
*
|
|
171
|
+
* 2. **Legacy env-bridge** — synthesise a one-site registry from the
|
|
172
|
+
* pre-W10 single-site env-vars ({@link ENV_SITE_URL} +
|
|
173
|
+
* {@link ENV_BEARER}, with {@link ENV_PLATFORM} as optional hint).
|
|
174
|
+
* Preserves the single-site UX for every customer who has not
|
|
175
|
+
* migrated to a sites.json yet.
|
|
176
|
+
*
|
|
177
|
+
* 3. **Hard fail** — neither configured. Surface a {@link ConfigError}
|
|
178
|
+
* with the three setup options so the operator knows exactly which
|
|
179
|
+
* knob to turn.
|
|
180
|
+
*
|
|
181
|
+
* This function replaces {@link loadConfig} on the main boot path.
|
|
182
|
+
* `loadConfig` is intentionally retained for the test-mode fallback in
|
|
183
|
+
* `index.ts` (`--test-mode` smoke probes) and for any embedded consumer
|
|
184
|
+
* that still wants a flat `ServerConfig`.
|
|
185
|
+
*/
|
|
186
|
+
export async function loadRegistry(opts = {}) {
|
|
187
|
+
const env = opts.env ?? process.env;
|
|
188
|
+
// (1) sites file (preferred).
|
|
189
|
+
const sitesFilePath = (env[ENV_SITES_FILE] ?? '').trim();
|
|
190
|
+
if (sitesFilePath !== '') {
|
|
191
|
+
// loadSitesFile handles both "file present" and "file absent"
|
|
192
|
+
// (the latter returns an emptySitesFile). When the file is
|
|
193
|
+
// empty (no sites), fall through to env-bridge instead of
|
|
194
|
+
// booting with an empty registry — operators who set
|
|
195
|
+
// SITES_FILE to a not-yet-populated path should still get the
|
|
196
|
+
// legacy env-var ramp until they run `add-site`.
|
|
197
|
+
const file = await loadSitesFile(sitesFilePath);
|
|
198
|
+
if (file.sites.length > 0) {
|
|
199
|
+
return new SiteRegistry(file);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
// (2) legacy env-bridge. The bridge already enforces URL/bearer
|
|
203
|
+
// non-emptiness and platform-hint validity, but we re-validate the
|
|
204
|
+
// full file shape through the W1 Zod schema before handing it to
|
|
205
|
+
// the registry. Defense-in-depth: a future env-bridge change cannot
|
|
206
|
+
// introduce a SitesFileT-shape regression that lands on the
|
|
207
|
+
// registry path without first failing this gate.
|
|
208
|
+
const synth = synthesiseFromEnv(env);
|
|
209
|
+
if (synth !== null) {
|
|
210
|
+
const parsed = SitesFile.safeParse(synth);
|
|
211
|
+
if (!parsed.success) {
|
|
212
|
+
const issues = parsed.error.issues
|
|
213
|
+
.map((i) => `${i.path.join('.')}: ${i.message}`)
|
|
214
|
+
.join('; ');
|
|
215
|
+
throw new ConfigError(`Env-bridge synthesised an invalid sites file: ${issues}`);
|
|
216
|
+
}
|
|
217
|
+
return new SiteRegistry(parsed.data);
|
|
218
|
+
}
|
|
219
|
+
// (3) fail-fast.
|
|
220
|
+
throw new ConfigError('No sites configured. Either: '
|
|
221
|
+
+ '(a) set YTB_MCP_SITES_FILE to your sites.json path, or '
|
|
222
|
+
+ '(b) set YTB_MCP_SITE_URL + YTB_MCP_BEARER_TOKEN for '
|
|
223
|
+
+ 'single-site mode, or '
|
|
224
|
+
+ '(c) run `npx -y @wootsup/yt-builder-mcp setup` interactively.');
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=auth.js.map
|
package/dist/auth.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAuBjD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAC/C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UA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v1` REST namespace.
|
|
4
|
+
*
|
|
5
|
+
* Responsibilities:
|
|
6
|
+
* - Compose final URLs (`{baseUrl}/wp-json/yt-builder-mcp/v1{path}`)
|
|
7
|
+
* - Attach `Authorization: Bearer …`
|
|
8
|
+
* - Encode JSON bodies + propagate `If-Match` etag headers
|
|
9
|
+
* - Map non-2xx into `RestError` with status / `code` / message
|
|
10
|
+
* - Map network failures into `NetworkError`
|
|
11
|
+
*
|
|
12
|
+
* The client deliberately keeps zero state beyond constructor config
|
|
13
|
+
* so each tool can hold a reference and call `.get/.post/.put/.delete`
|
|
14
|
+
* without coordinating sessions.
|
|
15
|
+
*
|
|
16
|
+
* @license MIT
|
|
17
|
+
*/
|
|
18
|
+
import type { Platform } from './platform/index.js';
|
|
19
|
+
/**
|
|
20
|
+
* Canonical WordPress REST-namespace path. Re-exported for backward
|
|
21
|
+
* compat — new code should reach for `Platform.restNamespacePath`.
|
|
22
|
+
*/
|
|
23
|
+
export declare const REST_NAMESPACE_PATH = "/wp-json/yt-builder-mcp/v1";
|
|
24
|
+
/**
|
|
25
|
+
* Legacy single-platform options shape. Kept so existing call-sites
|
|
26
|
+
* continue working without touching every entry point.
|
|
27
|
+
*/
|
|
28
|
+
export interface LegacyRestClientOptions {
|
|
29
|
+
readonly baseUrl: string;
|
|
30
|
+
readonly bearerToken: string;
|
|
31
|
+
readonly timeoutMs?: number;
|
|
32
|
+
/** Injected for tests. Defaults to `globalThis.fetch`. */
|
|
33
|
+
readonly fetch?: typeof fetch;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Platform-aware options shape (Wave G.0+).
|
|
37
|
+
* Pass an instance of `WordPressPlatform` (or any future `Platform`)
|
|
38
|
+
* instead of a bare `baseUrl`.
|
|
39
|
+
*/
|
|
40
|
+
export interface PlatformRestClientOptions {
|
|
41
|
+
readonly platform: Platform;
|
|
42
|
+
readonly bearerToken: string;
|
|
43
|
+
readonly timeoutMs?: number;
|
|
44
|
+
/** Injected for tests. Defaults to `globalThis.fetch`. */
|
|
45
|
+
readonly fetch?: typeof fetch;
|
|
46
|
+
}
|
|
47
|
+
/** Discriminated union: callers pick whichever shape suits them. */
|
|
48
|
+
export type RestClientOptions = LegacyRestClientOptions | PlatformRestClientOptions;
|
|
49
|
+
export interface RequestOptions {
|
|
50
|
+
/** Optional ETag for optimistic-lock (`If-Match` header). */
|
|
51
|
+
readonly etag?: string;
|
|
52
|
+
/** JSON body. */
|
|
53
|
+
readonly body?: unknown;
|
|
54
|
+
/** Extra headers. */
|
|
55
|
+
readonly headers?: Record<string, string>;
|
|
56
|
+
/** Optional AbortSignal. */
|
|
57
|
+
readonly signal?: AbortSignal;
|
|
58
|
+
}
|
|
59
|
+
export declare class RestClient {
|
|
60
|
+
private readonly platform;
|
|
61
|
+
private readonly baseUrl;
|
|
62
|
+
private readonly bearerToken;
|
|
63
|
+
private readonly timeoutMs;
|
|
64
|
+
private readonly fetchImpl;
|
|
65
|
+
constructor(options: RestClientOptions);
|
|
66
|
+
/** Expose the underlying platform (used by tools that need restNamespacePath/kind). */
|
|
67
|
+
getPlatform(): Platform;
|
|
68
|
+
get<T = unknown>(path: string, options?: RequestOptions): Promise<T>;
|
|
69
|
+
post<T = unknown>(path: string, options?: RequestOptions): Promise<T>;
|
|
70
|
+
put<T = unknown>(path: string, options?: RequestOptions): Promise<T>;
|
|
71
|
+
delete<T = unknown>(path: string, options?: RequestOptions): Promise<T>;
|
|
72
|
+
request<T = unknown>(method: string, path: string, options?: RequestOptions): Promise<T>;
|
|
73
|
+
private buildUrl;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* URL-encode a JSON-Pointer-style element path for use in the route.
|
|
77
|
+
*
|
|
78
|
+
* The plugin's regex captures everything after `/elements/`, so the
|
|
79
|
+
* raw `/grid/1/columns/0` path can be passed as-is — but each segment
|
|
80
|
+
* must be percent-encoded so reserved chars like `~` (used in
|
|
81
|
+
* JSON-Pointer escapes) don't collide with WordPress' router.
|
|
82
|
+
*/
|
|
83
|
+
export declare function encodeElementPath(pointer: string): string;
|
|
84
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGpD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,+BAAgC,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACtC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACjC;AAED,oEAAoE;AACpE,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,yBAAyB,CAAC;AAEpF,MAAM,WAAW,cAAc;IAC3B,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB;IACjB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,4BAA4B;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CACjC;AAED,qBA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