@wootsup/yt-builder-mcp 1.1.6 → 1.1.7
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/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 +50 -0
- package/dist/gateway/essentials.d.ts.map +1 -0
- package/dist/gateway/essentials.js +94 -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 +111 -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 +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 +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 +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 +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 +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 +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/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 +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 +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 +59 -0
- package/dist/tools/format/inspection-format.d.ts.map +1 -0
- package/dist/tools/format/inspection-format.js +303 -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 +208 -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 +78 -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/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 +136 -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 +203 -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 +45 -0
- package/dist/tools/pages/schemas.d.ts.map +1 -0
- package/dist/tools/pages/schemas.js +82 -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 +59 -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 +129 -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/package.json +2 -1
package/dist/server.js
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP server factory — Wave G.1 / Gateway-Hub edition.
|
|
3
|
+
*
|
|
4
|
+
* `createServer({client})` builds a configured `McpServer` with a 3-lane
|
|
5
|
+
* tool registration:
|
|
6
|
+
*
|
|
7
|
+
* L3 — direct top-level (yootheme_builder_health + yootheme_builder_diagnose)
|
|
8
|
+
* Registered FIRST, BEFORE the CapturingServer wraps the real server.
|
|
9
|
+
* These tools must reach the LLM even when the gateway itself
|
|
10
|
+
* misbehaves (chicken-and-egg: the LLM diagnoses gateway breakage
|
|
11
|
+
* via these two).
|
|
12
|
+
*
|
|
13
|
+
* L1 — essential forwarded (17 tools)
|
|
14
|
+
* Routed through the CapturingServer to the real server. Appear in
|
|
15
|
+
* `tools/list` as first-class entries (Cursor-cap-safe).
|
|
16
|
+
*
|
|
17
|
+
* L2 — advanced captured (7 tools)
|
|
18
|
+
* Routed through the CapturingServer into its in-process advanced
|
|
19
|
+
* registry; reachable via the single `yootheme_builder_advanced`
|
|
20
|
+
* gateway tool. Hidden from `tools/list`.
|
|
21
|
+
*
|
|
22
|
+
* Gateway — `yootheme_builder_advanced`
|
|
23
|
+
* Registered LAST on the real server, after every L1/L2 tool is
|
|
24
|
+
* placed and the advanced registry is final.
|
|
25
|
+
*
|
|
26
|
+
* Result: `tools/list.length === 20` (17 L1 + 2 L3 + 1 gateway), and the
|
|
27
|
+
* full callable tool surface is 27 (20 advertised + 7 advanced reachable
|
|
28
|
+
* through the gateway).
|
|
29
|
+
*
|
|
30
|
+
* @license MIT
|
|
31
|
+
*/
|
|
32
|
+
import { readFileSync } from 'node:fs';
|
|
33
|
+
import { dirname, resolve } from 'node:path';
|
|
34
|
+
import { fileURLToPath } from 'node:url';
|
|
35
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
36
|
+
import { registerAdvancedTool } from './gateway/advanced-tool.js';
|
|
37
|
+
import { CapturingServer } from './gateway/capturing-server.js';
|
|
38
|
+
import { isDirectTopLevel } from './gateway/essentials.js';
|
|
39
|
+
import { loadSkillContent, SKILL_RESOURCE_DESCRIPTION, SKILL_RESOURCE_MIME_TYPE, SKILL_RESOURCE_NAME, SKILL_RESOURCE_URI, } from './skill-loader.js';
|
|
40
|
+
import { toElicitationCapability } from './tools/elicitation.js';
|
|
41
|
+
import { buildAllTools } from './tools/index.js';
|
|
42
|
+
export const SERVER_NAME = '@wootsup/yt-builder-mcp';
|
|
43
|
+
/**
|
|
44
|
+
* Read `version` from the package.json that ships alongside `dist/` (and
|
|
45
|
+
* `src/` in the source tree). Resolved at module-init from
|
|
46
|
+
*
|
|
47
|
+
* src-tree: packages/mcp/src/server.ts → ../package.json
|
|
48
|
+
* tarball: packages/mcp/dist/server.js → ../package.json
|
|
49
|
+
*
|
|
50
|
+
* Both layouts work because `package.json` lives at the package root and
|
|
51
|
+
* `src/` / `dist/` are siblings. Bumping `package.json#version` (e.g. via
|
|
52
|
+
* `php scripts/release.php release yt-builder-mcp patch`) is the SINGLE
|
|
53
|
+
* source of truth — the value reported on MCP `initialize.serverInfo`
|
|
54
|
+
* follows automatically. No hardcoded string to drift out of sync.
|
|
55
|
+
*/
|
|
56
|
+
function readPackageVersion() {
|
|
57
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
58
|
+
const pkgPath = resolve(here, '..', 'package.json');
|
|
59
|
+
const raw = readFileSync(pkgPath, 'utf-8');
|
|
60
|
+
const parsed = JSON.parse(raw);
|
|
61
|
+
if (typeof parsed.version !== 'string' || parsed.version.length === 0) {
|
|
62
|
+
throw new Error(`yt-builder-mcp: package.json at ${pkgPath} is missing a string "version" field`);
|
|
63
|
+
}
|
|
64
|
+
return parsed.version;
|
|
65
|
+
}
|
|
66
|
+
export const SERVER_VERSION = readPackageVersion();
|
|
67
|
+
/**
|
|
68
|
+
* W8 — stable URI under which the live sites snapshot is exposed via
|
|
69
|
+
* MCP `resources/*`. Single fixed resource (no list-changed needed) —
|
|
70
|
+
* MCP hosts can fetch the current registry roster on demand without
|
|
71
|
+
* having to invoke a tool.
|
|
72
|
+
*/
|
|
73
|
+
export const SITES_RESOURCE_URI = 'sites://current';
|
|
74
|
+
/** Human-readable resource name surfaced in `resources/list`. */
|
|
75
|
+
export const SITES_RESOURCE_NAME = 'Currently configured sites';
|
|
76
|
+
/** Short description for `resources/list` consumers. */
|
|
77
|
+
export const SITES_RESOURCE_DESCRIPTION = 'Live snapshot of sites wired into this MCP server (site_id, URL, ' +
|
|
78
|
+
'platform, default flag, label). Bearer fields are redacted. ' +
|
|
79
|
+
'Mirrors what `yootheme_builder_sites_list` would print.';
|
|
80
|
+
/** MIME type for the `sites://current` payload. */
|
|
81
|
+
export const SITES_RESOURCE_MIME_TYPE = 'application/json';
|
|
82
|
+
/**
|
|
83
|
+
* Build the JSON payload served by the `sites://current` resource.
|
|
84
|
+
*
|
|
85
|
+
* Field projection (per plan §W8 Z.925-933):
|
|
86
|
+
* - `default_site_id` from {@link SiteRegistry.defaultSiteId}.
|
|
87
|
+
* - `sites[].site_id` / `url` / `is_default` / `label` verbatim.
|
|
88
|
+
* - `sites[].platform` prefers the resolved kind from the W3 memo
|
|
89
|
+
* cache (peek-only, no probe) and falls back to the configured
|
|
90
|
+
* hint when no probe has run.
|
|
91
|
+
*
|
|
92
|
+
* Bearer fields are NEVER referenced. The `bearer_source` hint that
|
|
93
|
+
* the W7 `sites_list` tool exposes is intentionally omitted from this
|
|
94
|
+
* resource: even the "plain" vs "op" hint hints at storage layout,
|
|
95
|
+
* and the resource is positioned as a host-facing public roster.
|
|
96
|
+
*/
|
|
97
|
+
export function buildSitesResourcePayload(registry) {
|
|
98
|
+
const rows = registry.listForDisplay();
|
|
99
|
+
return {
|
|
100
|
+
default_site_id: registry.defaultSiteId(),
|
|
101
|
+
sites: rows.map((row) => {
|
|
102
|
+
const platform = row.platform_resolved ?? row.platform_hint;
|
|
103
|
+
const out = {
|
|
104
|
+
site_id: row.site_id,
|
|
105
|
+
url: row.url,
|
|
106
|
+
platform,
|
|
107
|
+
is_default: row.is_default,
|
|
108
|
+
};
|
|
109
|
+
if (row.label !== undefined) {
|
|
110
|
+
out.label = row.label;
|
|
111
|
+
}
|
|
112
|
+
return out;
|
|
113
|
+
}),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export function createServer(options) {
|
|
117
|
+
// Stream B1 — Skill-Distribution via MCP-Protocol.
|
|
118
|
+
//
|
|
119
|
+
// The bundled SKILL.md is published through two MCP-native channels:
|
|
120
|
+
//
|
|
121
|
+
// (a) `instructions` field on the `initialize` response. MCP-spec
|
|
122
|
+
// hosts (Claude Desktop, Cursor, …) surface this string as
|
|
123
|
+
// auto-context so Maria-the-Claude-Desktop-user receives the
|
|
124
|
+
// skill narrative without ever calling a tool.
|
|
125
|
+
//
|
|
126
|
+
// (b) `skill://yt-builder-mcp` resource exposed via
|
|
127
|
+
// `resources/list` + `resources/read`. Backup for hosts that
|
|
128
|
+
// ignore `instructions` but honor the resources API.
|
|
129
|
+
//
|
|
130
|
+
// Reading SKILL.md is synchronous (small file, ~17 KB) and cached
|
|
131
|
+
// after first call by `loadSkillContent` — no async cost.
|
|
132
|
+
//
|
|
133
|
+
// W8 — pass the pool's registry so loadSkillContent can append the
|
|
134
|
+
// live "Currently configured sites" block. When the registry is
|
|
135
|
+
// empty (fresh install, no sites yet) the appendix is silently
|
|
136
|
+
// omitted and the host receives the unchanged skill content.
|
|
137
|
+
// Bearer fields are never touched by the appendix (see
|
|
138
|
+
// {@link appendSitesBlock} in skill-loader.ts).
|
|
139
|
+
const instructions = loadSkillContent(options.pool.registry);
|
|
140
|
+
const mcp = new McpServer({
|
|
141
|
+
name: SERVER_NAME,
|
|
142
|
+
version: SERVER_VERSION,
|
|
143
|
+
}, {
|
|
144
|
+
instructions,
|
|
145
|
+
});
|
|
146
|
+
// Register the SKILL.md as a static MCP resource. The capability
|
|
147
|
+
// (`resources: { listChanged: true }` etc.) is auto-advertised by
|
|
148
|
+
// McpServer the moment the first resource is registered, so MCP
|
|
149
|
+
// hosts see `resources` in `initialize.capabilities`.
|
|
150
|
+
mcp.registerResource(SKILL_RESOURCE_NAME, SKILL_RESOURCE_URI, {
|
|
151
|
+
title: SKILL_RESOURCE_NAME,
|
|
152
|
+
description: SKILL_RESOURCE_DESCRIPTION,
|
|
153
|
+
mimeType: SKILL_RESOURCE_MIME_TYPE,
|
|
154
|
+
}, async (uri) => ({
|
|
155
|
+
contents: [
|
|
156
|
+
{
|
|
157
|
+
uri: uri.toString(),
|
|
158
|
+
mimeType: SKILL_RESOURCE_MIME_TYPE,
|
|
159
|
+
text: instructions,
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
}));
|
|
163
|
+
// W8 — `sites://current` resource: live registry snapshot as JSON.
|
|
164
|
+
//
|
|
165
|
+
// The payload is computed on every read (cheap — listForDisplay()
|
|
166
|
+
// is in-memory) so hosts that re-fetch after a sites file edit see
|
|
167
|
+
// up-to-date data. We do NOT emit `notifications/resources/updated`
|
|
168
|
+
// since the only mutation path is the W9 CLI which itself requires
|
|
169
|
+
// an AI-client restart (per plan §W8 line 919) — the resource is
|
|
170
|
+
// structurally static for the lifetime of the MCP session.
|
|
171
|
+
//
|
|
172
|
+
// Bearer / bearer_ref are NEVER referenced (see
|
|
173
|
+
// {@link buildSitesResourcePayload}). The resource intentionally
|
|
174
|
+
// omits the `bearer_source` hint that the `sites_list` tool
|
|
175
|
+
// surfaces; a host-facing roster should not even hint at storage
|
|
176
|
+
// layout.
|
|
177
|
+
const registry = options.pool.registry;
|
|
178
|
+
mcp.registerResource(SITES_RESOURCE_NAME, SITES_RESOURCE_URI, {
|
|
179
|
+
title: SITES_RESOURCE_NAME,
|
|
180
|
+
description: SITES_RESOURCE_DESCRIPTION,
|
|
181
|
+
mimeType: SITES_RESOURCE_MIME_TYPE,
|
|
182
|
+
}, async (uri) => ({
|
|
183
|
+
contents: [
|
|
184
|
+
{
|
|
185
|
+
uri: uri.toString(),
|
|
186
|
+
mimeType: SITES_RESOURCE_MIME_TYPE,
|
|
187
|
+
text: JSON.stringify(buildSitesResourcePayload(registry), null, 2),
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
}));
|
|
191
|
+
// Wave G.4.5 — MCP elicitation capability wiring.
|
|
192
|
+
//
|
|
193
|
+
// `toElicitationCapability(mcp)` bridges the SDK's stricter
|
|
194
|
+
// discriminated `ElicitRequestFormParams` to the toolkit's looser
|
|
195
|
+
// `ElicitInputParams`. The 3 elicitation-aware tools
|
|
196
|
+
// (`element_delete`, `element_unbind_source`, `element_bind_source`)
|
|
197
|
+
// consume this capability through their `*HandlerDeps`; the other 19
|
|
198
|
+
// tools never see it. When the host the SDK connects to does not
|
|
199
|
+
// advertise the elicitation capability, the toolkit's `elicitChoice` /
|
|
200
|
+
// `elicitConfirmation` return `null` / `false` and the tool falls
|
|
201
|
+
// back to the structured-error / preview path (no hang, no guess).
|
|
202
|
+
const elicitation = toElicitationCapability(mcp);
|
|
203
|
+
const tools = options.tools ?? buildAllTools(options.pool, { elicitation });
|
|
204
|
+
// L3 — direct top-level: registered FIRST on the real McpServer, before
|
|
205
|
+
// the CapturingServer wraps it. These names get a no-op route inside
|
|
206
|
+
// the CapturingServer (see capturing-server.ts), so the SDK never sees
|
|
207
|
+
// a duplicate registration when the builder list is later replayed.
|
|
208
|
+
for (const tool of tools) {
|
|
209
|
+
if (isDirectTopLevel(tool.name)) {
|
|
210
|
+
registerToolOn(mcp, tool);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
// L1 / L2 — every other tool is routed through the CapturingServer,
|
|
214
|
+
// which forwards essentials to the real server and captures the rest
|
|
215
|
+
// into its advanced registry.
|
|
216
|
+
const capturing = new CapturingServer(mcp);
|
|
217
|
+
for (const tool of tools) {
|
|
218
|
+
if (isDirectTopLevel(tool.name))
|
|
219
|
+
continue;
|
|
220
|
+
registerToolOn(capturing, tool);
|
|
221
|
+
}
|
|
222
|
+
// Gateway — registered LAST so the advanced registry is final.
|
|
223
|
+
registerAdvancedTool(mcp, capturing.getAdvancedRegistry());
|
|
224
|
+
return { mcp, tools, capturing };
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Registers a `ToolDefinition` on a `ToolRegistrar`. A real `McpServer`
|
|
228
|
+
* satisfies `ToolRegistrar` structurally (its `registerTool` returns
|
|
229
|
+
* `RegisteredTool`, which is assignable to the `ToolRegistrar` declared
|
|
230
|
+
* `void` return type), so call-sites pass either a real server (for L3
|
|
231
|
+
* + the gateway, which need not be captured) or a `CapturingServer`
|
|
232
|
+
* (for L1 + L2 routing).
|
|
233
|
+
*/
|
|
234
|
+
function registerToolOn(registrar, tool) {
|
|
235
|
+
// F-203 follow-up (Audit 2026-05-26 reviewer Gap 2): when the tool
|
|
236
|
+
// ships a refined `inputObjectSchema` (a full `z.object(...).refine(...)`
|
|
237
|
+
// built from the same shape as `inputSchema`), forward THAT to the
|
|
238
|
+
// SDK so its built-in pre-handler validation enforces cross-field
|
|
239
|
+
// rules and raises a JSON-RPC `-32602 InvalidParams` envelope on
|
|
240
|
+
// violation — BEFORE the handler ever runs. Otherwise fall back to
|
|
241
|
+
// the raw `ZodRawShape`, which the SDK auto-wraps with
|
|
242
|
+
// `objectFromShape()` (no `.refine`).
|
|
243
|
+
const inputSchema = tool.inputObjectSchema !== undefined
|
|
244
|
+
? tool.inputObjectSchema
|
|
245
|
+
: tool.inputSchema;
|
|
246
|
+
// outputSchema is optional — tools migrated to structured-content (Wave
|
|
247
|
+
// G.2) declare a Zod schema describing the `structuredContent` payload.
|
|
248
|
+
// The SDK accepts a `ZodTypeAny` (v3/v4) via `AnySchema`; we forward our
|
|
249
|
+
// schema verbatim. Hosts that support MCP structured output validate
|
|
250
|
+
// responses against this schema.
|
|
251
|
+
const outputSchema = tool.outputSchema !== undefined
|
|
252
|
+
? tool.outputSchema
|
|
253
|
+
: undefined;
|
|
254
|
+
registrar.registerTool(tool.name, {
|
|
255
|
+
description: tool.description,
|
|
256
|
+
inputSchema,
|
|
257
|
+
...(outputSchema !== undefined ? { outputSchema } : {}),
|
|
258
|
+
annotations: tool.annotations,
|
|
259
|
+
},
|
|
260
|
+
// Wave G.5 — forward the SDK-supplied `extra` (RequestHandlerExtra)
|
|
261
|
+
// as the 2nd argument to every handler. Write-handlers consume
|
|
262
|
+
// `extra._meta.progressToken` + `extra.sendNotification` via the
|
|
263
|
+
// local `createProgressReporter` helper; read-handlers ignore it
|
|
264
|
+
// (their handler signature still binds `extra` to `HandlerExtra |
|
|
265
|
+
// undefined`, so no runtime coupling for non-progress tools).
|
|
266
|
+
// F-203 follow-up: cross-field input refinement (when present on
|
|
267
|
+
// `tool.inputObjectSchema`) is enforced by the SDK pre-handler;
|
|
268
|
+
// see the `inputSchema` selection above.
|
|
269
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- SDK generic narrows to inferred shape; safe because zod validates upstream
|
|
270
|
+
(async (args, extra) => {
|
|
271
|
+
return tool.handler(args, extra);
|
|
272
|
+
}));
|
|
273
|
+
}
|
|
274
|
+
//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|
|
|
1
|
+
/**
|
|
2
|
+
* W12-R2A — TTY confirm prompt for destructive CLI subcommands.
|
|
3
|
+
*
|
|
4
|
+
* Hosts `confirmTTY(prompt)`, the y/N readline callback the W9
|
|
5
|
+
* dispatcher wires into the `removeSiteCommand` / `setDefaultCommand`
|
|
6
|
+
* deps bag. Lives in its own file so the dispatcher stays a thin
|
|
7
|
+
* routing layer and so tests can mock the prompt without touching the
|
|
8
|
+
* subcommand factories.
|
|
9
|
+
*
|
|
10
|
+
* Contract:
|
|
11
|
+
*
|
|
12
|
+
* - Returns `true` ONLY when stdin is a TTY AND the operator types
|
|
13
|
+
* "y", "Y", or "yes" (case-insensitive). Anything else (incl. EOF,
|
|
14
|
+
* empty line, Ctrl-D) returns `false` → caller treats this as a
|
|
15
|
+
* cancel and skips the write.
|
|
16
|
+
*
|
|
17
|
+
* - When stdin is NOT a TTY (CI, piped input, MCP-server stdio), the
|
|
18
|
+
* function does NOT block — it returns `false` immediately and
|
|
19
|
+
* writes a one-line hint to stderr telling the operator to pass
|
|
20
|
+
* `--yes` for non-interactive use. The dispatcher then surfaces a
|
|
21
|
+
* typed `CONFIRM_REQUIRED` / `SET_DEFAULT_CONFIRM_REQUIRED` error
|
|
22
|
+
* via the subcommand factory (which fails closed when no confirm
|
|
23
|
+
* hook AND no --yes is in play).
|
|
24
|
+
*
|
|
25
|
+
* - No external deps; uses Node's built-in `node:readline` so the
|
|
26
|
+
* package keeps the same dep-graph as Round-1.
|
|
27
|
+
*
|
|
28
|
+
* @license MIT
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* Read one line via readline and resolve `true` on y/Y/yes,
|
|
32
|
+
* `false` otherwise. Stdin-not-a-TTY short-circuits to `false` with a
|
|
33
|
+
* stderr hint so a piped invocation can't silently hang.
|
|
34
|
+
*/
|
|
35
|
+
export declare function confirmTTY(prompt: string): Promise<boolean>;
|
|
36
|
+
//# sourceMappingURL=setup-cli-confirm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-cli-confirm.d.ts","sourceRoot":"","sources":["../src/setup-cli-confirm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAIH;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAuBjE"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* W12-R2A — TTY confirm prompt for destructive CLI subcommands.
|
|
3
|
+
*
|
|
4
|
+
* Hosts `confirmTTY(prompt)`, the y/N readline callback the W9
|
|
5
|
+
* dispatcher wires into the `removeSiteCommand` / `setDefaultCommand`
|
|
6
|
+
* deps bag. Lives in its own file so the dispatcher stays a thin
|
|
7
|
+
* routing layer and so tests can mock the prompt without touching the
|
|
8
|
+
* subcommand factories.
|
|
9
|
+
*
|
|
10
|
+
* Contract:
|
|
11
|
+
*
|
|
12
|
+
* - Returns `true` ONLY when stdin is a TTY AND the operator types
|
|
13
|
+
* "y", "Y", or "yes" (case-insensitive). Anything else (incl. EOF,
|
|
14
|
+
* empty line, Ctrl-D) returns `false` → caller treats this as a
|
|
15
|
+
* cancel and skips the write.
|
|
16
|
+
*
|
|
17
|
+
* - When stdin is NOT a TTY (CI, piped input, MCP-server stdio), the
|
|
18
|
+
* function does NOT block — it returns `false` immediately and
|
|
19
|
+
* writes a one-line hint to stderr telling the operator to pass
|
|
20
|
+
* `--yes` for non-interactive use. The dispatcher then surfaces a
|
|
21
|
+
* typed `CONFIRM_REQUIRED` / `SET_DEFAULT_CONFIRM_REQUIRED` error
|
|
22
|
+
* via the subcommand factory (which fails closed when no confirm
|
|
23
|
+
* hook AND no --yes is in play).
|
|
24
|
+
*
|
|
25
|
+
* - No external deps; uses Node's built-in `node:readline` so the
|
|
26
|
+
* package keeps the same dep-graph as Round-1.
|
|
27
|
+
*
|
|
28
|
+
* @license MIT
|
|
29
|
+
*/
|
|
30
|
+
import { createInterface } from 'node:readline';
|
|
31
|
+
/**
|
|
32
|
+
* Read one line via readline and resolve `true` on y/Y/yes,
|
|
33
|
+
* `false` otherwise. Stdin-not-a-TTY short-circuits to `false` with a
|
|
34
|
+
* stderr hint so a piped invocation can't silently hang.
|
|
35
|
+
*/
|
|
36
|
+
export async function confirmTTY(prompt) {
|
|
37
|
+
// process.stdin.isTTY is `true | undefined` per Node's typings —
|
|
38
|
+
// explicit !== true guards against both undefined and false.
|
|
39
|
+
if (process.stdin.isTTY !== true) {
|
|
40
|
+
process.stderr.write('yt-builder-mcp: no TTY available for confirmation. '
|
|
41
|
+
+ 'Pass --yes to run this subcommand non-interactively.\n');
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
const rl = createInterface({
|
|
45
|
+
input: process.stdin,
|
|
46
|
+
output: process.stderr,
|
|
47
|
+
});
|
|
48
|
+
try {
|
|
49
|
+
const answer = await new Promise((resolve) => {
|
|
50
|
+
rl.question(`${prompt} [y/N] `, (line) => resolve(line));
|
|
51
|
+
});
|
|
52
|
+
const normalised = answer.trim().toLowerCase();
|
|
53
|
+
return normalised === 'y' || normalised === 'yes';
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
rl.close();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=setup-cli-confirm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-cli-confirm.js","sourceRoot":"","sources":["../src/setup-cli-confirm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAc;IAC3C,iEAAiE;IACjE,6DAA6D;IAC7D,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;QAC/B,OAAO,CAAC,MAAM,CAAC,KAAK,CAChB,qDAAqD;cAC/C,wDAAwD,CACjE,CAAC;QACF,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,MAAM,EAAE,GAAG,eAAe,CAAC;QACvB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;KACzB,CAAC,CAAC;IACH,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;YACjD,EAAE,CAAC,QAAQ,CAAC,GAAG,MAAM,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC/C,OAAO,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,KAAK,CAAC;IACtD,CAAC;YAAS,CAAC;QACP,EAAE,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Top-level CLI dispatcher for `@wootsup/yt-builder-mcp`.
|
|
4
|
+
*
|
|
5
|
+
* Round-1 audit I5 fix (2026-05-22): the wizard implementation lives in
|
|
6
|
+
* `setup-wizard.ts`; this file is the thin dispatcher (`runCli`) plus
|
|
7
|
+
* the ESM main-guard. Both have their own deps-bag (`WizardDeps` /
|
|
8
|
+
* `RunCliDeps`) so unit tests can drive them independently.
|
|
9
|
+
*
|
|
10
|
+
* Subcommands:
|
|
11
|
+
*
|
|
12
|
+
* setup (default) — runWizard (see `setup-wizard.ts`)
|
|
13
|
+
* install-skill — copy the bundled skill into ~/.claude/skills/
|
|
14
|
+
* and append a marker block to ~/AGENTS.md.
|
|
15
|
+
* --help / help — print usage.
|
|
16
|
+
* --version / -v — print the package version.
|
|
17
|
+
*
|
|
18
|
+
* Re-exports `runWizard`, `majorMinor` and the wizard public types so
|
|
19
|
+
* existing callers (and tests that already import from `./setup-cli`)
|
|
20
|
+
* keep working with a one-line import.
|
|
21
|
+
*
|
|
22
|
+
* @license MIT
|
|
23
|
+
*/
|
|
24
|
+
import { installSkill as defaultInstallSkill } from './install-skill.js';
|
|
25
|
+
import type { WizardDeps } from './setup-wizard-types.js';
|
|
26
|
+
import { type AddSiteArgs, type AddSiteDeps, type AddSiteResult } from './sites/cli/add-site.js';
|
|
27
|
+
import { type ListSitesDeps } from './sites/cli/list-sites.js';
|
|
28
|
+
import { type RemoveSiteDeps } from './sites/cli/remove-site.js';
|
|
29
|
+
import { type SetDefaultDeps } from './sites/cli/set-default.js';
|
|
30
|
+
import { type TestSiteDeps } from './sites/cli/test-site.js';
|
|
31
|
+
export { DEFAULT_WIZARD_DEPS, majorMinor, runWizard, type AuthProbeResult, type HandshakeResult, type HealthProbeResult, type WizardAnswers, type WizardDeps, type WriteResult, } from './setup-wizard.js';
|
|
32
|
+
export interface ParsedSetupArgs {
|
|
33
|
+
/** True when `--non-interactive` was passed. Always boolean. */
|
|
34
|
+
readonly nonInteractive: boolean;
|
|
35
|
+
/** Site base URL from `--url` (WordPress or Joomla), trailing slash stripped, trimmed. */
|
|
36
|
+
readonly url: string;
|
|
37
|
+
/** Bearer token from `--token`, trimmed. */
|
|
38
|
+
readonly token: string;
|
|
39
|
+
/** Client ids from repeated `--client`. */
|
|
40
|
+
readonly clients: readonly string[];
|
|
41
|
+
/**
|
|
42
|
+
* Pickup URL from `--pickup`, trimmed. When set together with
|
|
43
|
+
* `nonce`, the wizard fetches the Bearer + canonical URL from the
|
|
44
|
+
* plugin in a single POST instead of prompting.
|
|
45
|
+
*/
|
|
46
|
+
readonly pickup?: string;
|
|
47
|
+
/** One-shot nonce from `--nonce`, trimmed. Pairs 1:1 with `pickup`. */
|
|
48
|
+
readonly nonce?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Human-readable validation errors. Empty array means the parsed
|
|
51
|
+
* args are usable. The dispatcher prints these to stderr and exits
|
|
52
|
+
* non-zero when non-empty AND `--non-interactive` was requested.
|
|
53
|
+
*/
|
|
54
|
+
readonly errors: readonly string[];
|
|
55
|
+
/**
|
|
56
|
+
* Non-fatal warnings to surface on stderr (e.g. "--url ignored in
|
|
57
|
+
* pickup mode"). These do NOT block the wizard from running.
|
|
58
|
+
*/
|
|
59
|
+
readonly warnings: readonly string[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Parse the `setup` subcommand argv tail. Pure function; does no I/O.
|
|
63
|
+
*
|
|
64
|
+
* Accepts both `--key value` and `--key=value` styles. Unknown flags
|
|
65
|
+
* are reported as errors so typos don't silently disable validation.
|
|
66
|
+
*/
|
|
67
|
+
export declare function parseSetupArgs(argv: readonly string[]): ParsedSetupArgs;
|
|
68
|
+
/**
|
|
69
|
+
* Build a `WizardDeps` bag that answers prompts from CLI flags instead
|
|
70
|
+
* of asking a human. Reuses every other dependency (probes, writes,
|
|
71
|
+
* handshake) from `DEFAULT_WIZARD_DEPS` so the wizard's exit-code
|
|
72
|
+
* contract (0/2/3/4/5) stays identical.
|
|
73
|
+
*
|
|
74
|
+
* `confirmContinue` always returns `false` — there is no human to ask,
|
|
75
|
+
* so a probe failure cleanly aborts with the documented exit code.
|
|
76
|
+
*/
|
|
77
|
+
export declare function buildNonInteractiveDeps(parsed: ParsedSetupArgs, base?: WizardDeps): WizardDeps;
|
|
78
|
+
/**
|
|
79
|
+
* Build a `WizardDeps` bag for the Wave-C pickup flow. The wizard's
|
|
80
|
+
* `prompt` step calls `base.fetchPickup(url, nonce)` once, then
|
|
81
|
+
* synthesises the `WizardAnswers` from the response — the actual answers
|
|
82
|
+
* (token + canonical WordPress URL) come straight from the plugin via
|
|
83
|
+
* a 256-bit one-shot nonce, never through chat history / provider logs.
|
|
84
|
+
*
|
|
85
|
+
* On `fetchPickup` failure the prompt resolves to `null` so the wizard
|
|
86
|
+
* exits cleanly with code 130 (user-cancel equivalent — we treat
|
|
87
|
+
* an unrecoverable pickup as "the conversation ends here"). The
|
|
88
|
+
* thrown error is logged via the `log` dep so the operator sees why.
|
|
89
|
+
*
|
|
90
|
+
* `confirmContinue` returns `false` (same rationale as non-interactive).
|
|
91
|
+
*/
|
|
92
|
+
export declare function buildPickupDeps(parsed: ParsedSetupArgs, base?: WizardDeps): WizardDeps;
|
|
93
|
+
/**
|
|
94
|
+
* Parsed shape for the `add-site` subcommand. Pure-data; tests
|
|
95
|
+
* exercise this without filesystem deps.
|
|
96
|
+
*/
|
|
97
|
+
export interface ParsedAddSiteArgs {
|
|
98
|
+
readonly url: string;
|
|
99
|
+
readonly token: string;
|
|
100
|
+
readonly tokenRef: string;
|
|
101
|
+
readonly platform?: 'auto' | 'wordpress' | 'joomla';
|
|
102
|
+
readonly label: string;
|
|
103
|
+
readonly siteId: string;
|
|
104
|
+
readonly default: boolean;
|
|
105
|
+
readonly yes: boolean;
|
|
106
|
+
readonly sitesFile?: string;
|
|
107
|
+
readonly errors: readonly string[];
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Parse `add-site` flags from the tail of argv. Accepts both
|
|
111
|
+
* `--key value` and `--key=value` styles. Unknown flags are reported
|
|
112
|
+
* as errors so typos never silently disable validation.
|
|
113
|
+
*/
|
|
114
|
+
export declare function parseAddSiteArgs(argv: readonly string[]): ParsedAddSiteArgs;
|
|
115
|
+
export interface RunCliDeps {
|
|
116
|
+
/**
|
|
117
|
+
* Wizard runner. The optional deps bag lets the non-interactive
|
|
118
|
+
* dispatcher inject prebuilt answers; interactive callers pass
|
|
119
|
+
* nothing and the wizard uses `DEFAULT_WIZARD_DEPS`.
|
|
120
|
+
*/
|
|
121
|
+
runWizard: (deps?: WizardDeps) => Promise<number>;
|
|
122
|
+
installSkill: typeof defaultInstallSkill;
|
|
123
|
+
log?: (line: string) => void;
|
|
124
|
+
error?: (line: string) => void;
|
|
125
|
+
/** Test injection — override the resolved sites.json path. */
|
|
126
|
+
resolveSitesPath?: () => string;
|
|
127
|
+
addSiteDeps?: AddSiteDeps;
|
|
128
|
+
listSitesDeps?: ListSitesDeps;
|
|
129
|
+
removeSiteDeps?: RemoveSiteDeps;
|
|
130
|
+
setDefaultDeps?: SetDefaultDeps;
|
|
131
|
+
testSiteDeps?: TestSiteDeps;
|
|
132
|
+
/**
|
|
133
|
+
* W12-R2A — y/N prompt for destructive subcommands (remove-site,
|
|
134
|
+
* set-default). Defaults to {@link defaultConfirmTTY} which reads
|
|
135
|
+
* from process.stdin via readline. Tests inject a stub.
|
|
136
|
+
*
|
|
137
|
+
* Note: when the operator passes `--yes`, this hook is NEVER
|
|
138
|
+
* invoked — the subcommand factory short-circuits before reaching
|
|
139
|
+
* the confirm step. When `--yes` is absent AND no confirm hook is
|
|
140
|
+
* injectable (CI / piped stdin), the factory throws a typed
|
|
141
|
+
* CONFIRM_REQUIRED / SET_DEFAULT_CONFIRM_REQUIRED error.
|
|
142
|
+
*/
|
|
143
|
+
confirm?: (message: string) => Promise<boolean>;
|
|
144
|
+
/**
|
|
145
|
+
* Optional override for the post-wizard `addSiteCommand` call.
|
|
146
|
+
* Tests stub this to assert the wizard wires through addSiteCommand
|
|
147
|
+
* without writing to disk.
|
|
148
|
+
*/
|
|
149
|
+
addSiteFromWizard?: (args: AddSiteArgs, path: string) => Promise<AddSiteResult>;
|
|
150
|
+
}
|
|
151
|
+
export declare function runCli(argv: readonly string[], deps?: Partial<RunCliDeps>): Promise<number>;
|
|
152
|
+
//# sourceMappingURL=setup-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-cli.d.ts","sourceRoot":"","sources":["../src/setup-cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAIzE,OAAO,KAAK,EAAiB,UAAU,EAAE,MAAM,yBAAyB,CAAC;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