@wootsup/yt-builder-mcp 1.1.6 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/bin/yt-builder-mcp.js +55 -40
- package/dist/auth.d.ts +137 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +244 -0
- package/dist/auth.js.map +1 -0
- package/dist/cli/invocation-decision.d.ts +57 -0
- package/dist/cli/invocation-decision.d.ts.map +1 -0
- package/dist/cli/invocation-decision.js +86 -0
- package/dist/cli/invocation-decision.js.map +1 -0
- package/dist/client.d.ts +112 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +190 -0
- package/dist/client.js.map +1 -0
- package/dist/clients/claude-code.d.ts +18 -0
- package/dist/clients/claude-code.d.ts.map +1 -0
- package/dist/clients/claude-code.js +55 -0
- package/dist/clients/claude-code.js.map +1 -0
- package/dist/clients/claude-desktop.d.ts +19 -0
- package/dist/clients/claude-desktop.d.ts.map +1 -0
- package/dist/clients/claude-desktop.js +58 -0
- package/dist/clients/claude-desktop.js.map +1 -0
- package/dist/clients/cline.d.ts +26 -0
- package/dist/clients/cline.d.ts.map +1 -0
- package/dist/clients/cline.js +82 -0
- package/dist/clients/cline.js.map +1 -0
- package/dist/clients/codex-cli.d.ts +42 -0
- package/dist/clients/codex-cli.d.ts.map +1 -0
- package/dist/clients/codex-cli.js +292 -0
- package/dist/clients/codex-cli.js.map +1 -0
- package/dist/clients/continue.d.ts +13 -0
- package/dist/clients/continue.d.ts.map +1 -0
- package/dist/clients/continue.js +121 -0
- package/dist/clients/continue.js.map +1 -0
- package/dist/clients/cursor.d.ts +12 -0
- package/dist/clients/cursor.d.ts.map +1 -0
- package/dist/clients/cursor.js +40 -0
- package/dist/clients/cursor.js.map +1 -0
- package/dist/clients/gemini-cli.d.ts +18 -0
- package/dist/clients/gemini-cli.d.ts.map +1 -0
- package/dist/clients/gemini-cli.js +46 -0
- package/dist/clients/gemini-cli.js.map +1 -0
- package/dist/clients/home.d.ts +14 -0
- package/dist/clients/home.d.ts.map +1 -0
- package/dist/clients/home.js +20 -0
- package/dist/clients/home.js.map +1 -0
- package/dist/clients/index.d.ts +156 -0
- package/dist/clients/index.d.ts.map +1 -0
- package/dist/clients/index.js +213 -0
- package/dist/clients/index.js.map +1 -0
- package/dist/clients/roo-code.d.ts +23 -0
- package/dist/clients/roo-code.d.ts.map +1 -0
- package/dist/clients/roo-code.js +71 -0
- package/dist/clients/roo-code.js.map +1 -0
- package/dist/clients/zed.d.ts +12 -0
- package/dist/clients/zed.d.ts.map +1 -0
- package/dist/clients/zed.js +43 -0
- package/dist/clients/zed.js.map +1 -0
- package/dist/errors/hints.d.ts +51 -0
- package/dist/errors/hints.d.ts.map +1 -0
- package/dist/errors/hints.js +95 -0
- package/dist/errors/hints.js.map +1 -0
- package/dist/errors/mask.d.ts +35 -0
- package/dist/errors/mask.d.ts.map +1 -0
- package/dist/errors/mask.js +49 -0
- package/dist/errors/mask.js.map +1 -0
- package/dist/errors/sanitize.d.ts +31 -0
- package/dist/errors/sanitize.d.ts.map +1 -0
- package/dist/errors/sanitize.js +100 -0
- package/dist/errors/sanitize.js.map +1 -0
- package/dist/errors.d.ts +42 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +61 -0
- package/dist/errors.js.map +1 -0
- package/dist/gateway/advanced-tool/discovery.d.ts +19 -0
- package/dist/gateway/advanced-tool/discovery.d.ts.map +1 -0
- package/dist/gateway/advanced-tool/discovery.js +53 -0
- package/dist/gateway/advanced-tool/discovery.js.map +1 -0
- package/dist/gateway/advanced-tool/domains.d.ts +47 -0
- package/dist/gateway/advanced-tool/domains.d.ts.map +1 -0
- package/dist/gateway/advanced-tool/domains.js +94 -0
- package/dist/gateway/advanced-tool/domains.js.map +1 -0
- package/dist/gateway/advanced-tool/execute.d.ts +29 -0
- package/dist/gateway/advanced-tool/execute.d.ts.map +1 -0
- package/dist/gateway/advanced-tool/execute.js +54 -0
- package/dist/gateway/advanced-tool/execute.js.map +1 -0
- package/dist/gateway/advanced-tool/index.d.ts +36 -0
- package/dist/gateway/advanced-tool/index.d.ts.map +1 -0
- package/dist/gateway/advanced-tool/index.js +39 -0
- package/dist/gateway/advanced-tool/index.js.map +1 -0
- package/dist/gateway/advanced-tool/register.d.ts +18 -0
- package/dist/gateway/advanced-tool/register.d.ts.map +1 -0
- package/dist/gateway/advanced-tool/register.js +69 -0
- package/dist/gateway/advanced-tool/register.js.map +1 -0
- package/dist/gateway/advanced-tool.d.ts +13 -0
- package/dist/gateway/advanced-tool.d.ts.map +1 -0
- package/dist/gateway/advanced-tool.js +13 -0
- package/dist/gateway/advanced-tool.js.map +1 -0
- package/dist/gateway/capturing-server.d.ts +117 -0
- package/dist/gateway/capturing-server.d.ts.map +1 -0
- package/dist/gateway/capturing-server.js +103 -0
- package/dist/gateway/capturing-server.js.map +1 -0
- package/dist/gateway/essentials.d.ts +50 -0
- package/dist/gateway/essentials.d.ts.map +1 -0
- package/dist/gateway/essentials.js +108 -0
- package/dist/gateway/essentials.js.map +1 -0
- package/dist/gateway/test-support.d.ts +41 -0
- package/dist/gateway/test-support.d.ts.map +1 -0
- package/dist/gateway/test-support.js +60 -0
- package/dist/gateway/test-support.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +119 -0
- package/dist/index.js.map +1 -0
- package/dist/install-skill.d.ts +43 -0
- package/dist/install-skill.d.ts.map +1 -0
- package/dist/install-skill.js +118 -0
- package/dist/install-skill.js.map +1 -0
- package/dist/platform/detect.d.ts +64 -0
- package/dist/platform/detect.d.ts.map +1 -0
- package/dist/platform/detect.js +98 -0
- package/dist/platform/detect.js.map +1 -0
- package/dist/platform/index.d.ts +121 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/index.js +176 -0
- package/dist/platform/index.js.map +1 -0
- package/dist/platform/joomla.d.ts +44 -0
- package/dist/platform/joomla.d.ts.map +1 -0
- package/dist/platform/joomla.js +46 -0
- package/dist/platform/joomla.js.map +1 -0
- package/dist/server.d.ts +110 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +274 -0
- package/dist/server.js.map +1 -0
- package/dist/setup-cli-confirm.d.ts +36 -0
- package/dist/setup-cli-confirm.d.ts.map +1 -0
- package/dist/setup-cli-confirm.js +59 -0
- package/dist/setup-cli-confirm.js.map +1 -0
- package/dist/setup-cli.d.ts +193 -0
- package/dist/setup-cli.d.ts.map +1 -0
- package/dist/setup-cli.js +1032 -0
- package/dist/setup-cli.js.map +1 -0
- package/dist/setup-prompts.d.ts +64 -0
- package/dist/setup-prompts.d.ts.map +1 -0
- package/dist/setup-prompts.js +221 -0
- package/dist/setup-prompts.js.map +1 -0
- package/dist/setup-token.d.ts +38 -0
- package/dist/setup-token.d.ts.map +1 -0
- package/dist/setup-token.js +106 -0
- package/dist/setup-token.js.map +1 -0
- package/dist/setup-wizard-defaults.d.ts +43 -0
- package/dist/setup-wizard-defaults.d.ts.map +1 -0
- package/dist/setup-wizard-defaults.js +160 -0
- package/dist/setup-wizard-defaults.js.map +1 -0
- package/dist/setup-wizard-handshake.d.ts +25 -0
- package/dist/setup-wizard-handshake.d.ts.map +1 -0
- package/dist/setup-wizard-handshake.js +103 -0
- package/dist/setup-wizard-handshake.js.map +1 -0
- package/dist/setup-wizard-types.d.ts +164 -0
- package/dist/setup-wizard-types.d.ts.map +1 -0
- package/dist/setup-wizard-types.js +11 -0
- package/dist/setup-wizard-types.js.map +1 -0
- package/dist/setup-wizard.d.ts +33 -0
- package/dist/setup-wizard.d.ts.map +1 -0
- package/dist/setup-wizard.js +199 -0
- package/dist/setup-wizard.js.map +1 -0
- package/dist/setup.d.ts +17 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +33 -0
- package/dist/setup.js.map +1 -0
- package/dist/sites/bootstrap.d.ts +41 -0
- package/dist/sites/bootstrap.d.ts.map +1 -0
- package/dist/sites/bootstrap.js +58 -0
- package/dist/sites/bootstrap.js.map +1 -0
- package/dist/sites/cli/add-site.d.ts +106 -0
- package/dist/sites/cli/add-site.d.ts.map +1 -0
- package/dist/sites/cli/add-site.js +185 -0
- package/dist/sites/cli/add-site.js.map +1 -0
- package/dist/sites/cli/list-sites.d.ts +40 -0
- package/dist/sites/cli/list-sites.d.ts.map +1 -0
- package/dist/sites/cli/list-sites.js +116 -0
- package/dist/sites/cli/list-sites.js.map +1 -0
- package/dist/sites/cli/remove-site.d.ts +60 -0
- package/dist/sites/cli/remove-site.d.ts.map +1 -0
- package/dist/sites/cli/remove-site.js +120 -0
- package/dist/sites/cli/remove-site.js.map +1 -0
- package/dist/sites/cli/set-default.d.ts +47 -0
- package/dist/sites/cli/set-default.d.ts.map +1 -0
- package/dist/sites/cli/set-default.js +69 -0
- package/dist/sites/cli/set-default.js.map +1 -0
- package/dist/sites/cli/test-site.d.ts +77 -0
- package/dist/sites/cli/test-site.d.ts.map +1 -0
- package/dist/sites/cli/test-site.js +146 -0
- package/dist/sites/cli/test-site.js.map +1 -0
- package/dist/sites/client-pool.d.ts +157 -0
- package/dist/sites/client-pool.d.ts.map +1 -0
- package/dist/sites/client-pool.js +222 -0
- package/dist/sites/client-pool.js.map +1 -0
- package/dist/sites/env-bridge.d.ts +55 -0
- package/dist/sites/env-bridge.d.ts.map +1 -0
- package/dist/sites/env-bridge.js +94 -0
- package/dist/sites/env-bridge.js.map +1 -0
- package/dist/sites/paths.d.ts +21 -0
- package/dist/sites/paths.d.ts.map +1 -0
- package/dist/sites/paths.js +37 -0
- package/dist/sites/paths.js.map +1 -0
- package/dist/sites/probe.d.ts +60 -0
- package/dist/sites/probe.d.ts.map +1 -0
- package/dist/sites/probe.js +112 -0
- package/dist/sites/probe.js.map +1 -0
- package/dist/sites/registry.d.ts +142 -0
- package/dist/sites/registry.d.ts.map +1 -0
- package/dist/sites/registry.js +163 -0
- package/dist/sites/registry.js.map +1 -0
- package/dist/sites/schema.d.ts +90 -0
- package/dist/sites/schema.d.ts.map +1 -0
- package/dist/sites/schema.js +71 -0
- package/dist/sites/schema.js.map +1 -0
- package/dist/sites/secret-resolver.d.ts +115 -0
- package/dist/sites/secret-resolver.d.ts.map +1 -0
- package/dist/sites/secret-resolver.js +225 -0
- package/dist/sites/secret-resolver.js.map +1 -0
- package/dist/sites/store.d.ts +82 -0
- package/dist/sites/store.d.ts.map +1 -0
- package/dist/sites/store.js +198 -0
- package/dist/sites/store.js.map +1 -0
- package/dist/sites/tools/index.d.ts +28 -0
- package/dist/sites/tools/index.d.ts.map +1 -0
- package/dist/sites/tools/index.js +38 -0
- package/dist/sites/tools/index.js.map +1 -0
- package/dist/sites/tools/sites-list.d.ts +48 -0
- package/dist/sites/tools/sites-list.d.ts.map +1 -0
- package/dist/sites/tools/sites-list.js +137 -0
- package/dist/sites/tools/sites-list.js.map +1 -0
- package/dist/sites/tools/sites-test.d.ts +47 -0
- package/dist/sites/tools/sites-test.d.ts.map +1 -0
- package/dist/sites/tools/sites-test.js +148 -0
- package/dist/sites/tools/sites-test.js.map +1 -0
- package/dist/sites/tools/use-site.d.ts +47 -0
- package/dist/sites/tools/use-site.d.ts.map +1 -0
- package/dist/sites/tools/use-site.js +183 -0
- package/dist/sites/tools/use-site.js.map +1 -0
- package/dist/skill-loader.d.ts +111 -0
- package/dist/skill-loader.d.ts.map +1 -0
- package/dist/skill-loader.js +191 -0
- package/dist/skill-loader.js.map +1 -0
- package/dist/tools/elements/builders.d.ts +24 -0
- package/dist/tools/elements/builders.d.ts.map +1 -0
- package/dist/tools/elements/builders.js +208 -0
- package/dist/tools/elements/builders.js.map +1 -0
- package/dist/tools/elements/handlers-write.d.ts +49 -0
- package/dist/tools/elements/handlers-write.d.ts.map +1 -0
- package/dist/tools/elements/handlers-write.js +341 -0
- package/dist/tools/elements/handlers-write.js.map +1 -0
- package/dist/tools/elements/handlers.d.ts +70 -0
- package/dist/tools/elements/handlers.d.ts.map +1 -0
- package/dist/tools/elements/handlers.js +292 -0
- package/dist/tools/elements/handlers.js.map +1 -0
- package/dist/tools/elements/index.d.ts +28 -0
- package/dist/tools/elements/index.d.ts.map +1 -0
- package/dist/tools/elements/index.js +27 -0
- package/dist/tools/elements/index.js.map +1 -0
- package/dist/tools/elements.d.ts +13 -0
- package/dist/tools/elements.d.ts.map +1 -0
- package/dist/tools/elements.js +13 -0
- package/dist/tools/elements.js.map +1 -0
- package/dist/tools/elicitation.d.ts +87 -0
- package/dist/tools/elicitation.d.ts.map +1 -0
- package/dist/tools/elicitation.js +100 -0
- package/dist/tools/elicitation.js.map +1 -0
- package/dist/tools/format/elements-format.d.ts +40 -0
- package/dist/tools/format/elements-format.d.ts.map +1 -0
- package/dist/tools/format/elements-format.js +193 -0
- package/dist/tools/format/elements-format.js.map +1 -0
- package/dist/tools/format/health-format.d.ts +79 -0
- package/dist/tools/format/health-format.d.ts.map +1 -0
- package/dist/tools/format/health-format.js +181 -0
- package/dist/tools/format/health-format.js.map +1 -0
- package/dist/tools/format/inspection-format.d.ts +70 -0
- package/dist/tools/format/inspection-format.d.ts.map +1 -0
- package/dist/tools/format/inspection-format.js +359 -0
- package/dist/tools/format/inspection-format.js.map +1 -0
- package/dist/tools/format/pages-format.d.ts +57 -0
- package/dist/tools/format/pages-format.d.ts.map +1 -0
- package/dist/tools/format/pages-format.js +157 -0
- package/dist/tools/format/pages-format.js.map +1 -0
- package/dist/tools/format/sources-format.d.ts +44 -0
- package/dist/tools/format/sources-format.d.ts.map +1 -0
- package/dist/tools/format/sources-format.js +242 -0
- package/dist/tools/format/sources-format.js.map +1 -0
- package/dist/tools/health.d.ts +22 -0
- package/dist/tools/health.d.ts.map +1 -0
- package/dist/tools/health.js +220 -0
- package/dist/tools/health.js.map +1 -0
- package/dist/tools/index.d.ts +30 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +39 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/inspection.d.ts +14 -0
- package/dist/tools/inspection.d.ts.map +1 -0
- package/dist/tools/inspection.js +401 -0
- package/dist/tools/inspection.js.map +1 -0
- package/dist/tools/layout-flatten.d.ts +75 -0
- package/dist/tools/layout-flatten.d.ts.map +1 -0
- package/dist/tools/layout-flatten.js +107 -0
- package/dist/tools/layout-flatten.js.map +1 -0
- package/dist/tools/multi-items/builders.d.ts +23 -0
- package/dist/tools/multi-items/builders.d.ts.map +1 -0
- package/dist/tools/multi-items/builders.js +84 -0
- package/dist/tools/multi-items/builders.js.map +1 -0
- package/dist/tools/multi-items/clean-implode-handler.d.ts +36 -0
- package/dist/tools/multi-items/clean-implode-handler.d.ts.map +1 -0
- package/dist/tools/multi-items/clean-implode-handler.js +57 -0
- package/dist/tools/multi-items/clean-implode-handler.js.map +1 -0
- package/dist/tools/multi-items/format/inspection-format.d.ts +41 -0
- package/dist/tools/multi-items/format/inspection-format.d.ts.map +1 -0
- package/dist/tools/multi-items/format/inspection-format.js +64 -0
- package/dist/tools/multi-items/format/inspection-format.js.map +1 -0
- package/dist/tools/multi-items/index.d.ts +18 -0
- package/dist/tools/multi-items/index.d.ts.map +1 -0
- package/dist/tools/multi-items/index.js +18 -0
- package/dist/tools/multi-items/index.js.map +1 -0
- package/dist/tools/multi-items/inspect-handler.d.ts +76 -0
- package/dist/tools/multi-items/inspect-handler.d.ts.map +1 -0
- package/dist/tools/multi-items/inspect-handler.js +133 -0
- package/dist/tools/multi-items/inspect-handler.js.map +1 -0
- package/dist/tools/multi-items/inspection-cache.d.ts +85 -0
- package/dist/tools/multi-items/inspection-cache.d.ts.map +1 -0
- package/dist/tools/multi-items/inspection-cache.js +126 -0
- package/dist/tools/multi-items/inspection-cache.js.map +1 -0
- package/dist/tools/multi-items/item-container-map.d.ts +41 -0
- package/dist/tools/multi-items/item-container-map.d.ts.map +1 -0
- package/dist/tools/multi-items/item-container-map.js +73 -0
- package/dist/tools/multi-items/item-container-map.js.map +1 -0
- package/dist/tools/pages/builders.d.ts +43 -0
- package/dist/tools/pages/builders.d.ts.map +1 -0
- package/dist/tools/pages/builders.js +229 -0
- package/dist/tools/pages/builders.js.map +1 -0
- package/dist/tools/pages/handlers-read.d.ts +33 -0
- package/dist/tools/pages/handlers-read.d.ts.map +1 -0
- package/dist/tools/pages/handlers-read.js +260 -0
- package/dist/tools/pages/handlers-read.js.map +1 -0
- package/dist/tools/pages/handlers-write.d.ts +63 -0
- package/dist/tools/pages/handlers-write.d.ts.map +1 -0
- package/dist/tools/pages/handlers-write.js +127 -0
- package/dist/tools/pages/handlers-write.js.map +1 -0
- package/dist/tools/pages/index.d.ts +17 -0
- package/dist/tools/pages/index.d.ts.map +1 -0
- package/dist/tools/pages/index.js +17 -0
- package/dist/tools/pages/index.js.map +1 -0
- package/dist/tools/pages/schemas.d.ts +157 -0
- package/dist/tools/pages/schemas.d.ts.map +1 -0
- package/dist/tools/pages/schemas.js +232 -0
- package/dist/tools/pages/schemas.js.map +1 -0
- package/dist/tools/pages.d.ts +13 -0
- package/dist/tools/pages.d.ts.map +1 -0
- package/dist/tools/pages.js +13 -0
- package/dist/tools/pages.js.map +1 -0
- package/dist/tools/pool-resolve-helper.d.ts +83 -0
- package/dist/tools/pool-resolve-helper.d.ts.map +1 -0
- package/dist/tools/pool-resolve-helper.js +148 -0
- package/dist/tools/pool-resolve-helper.js.map +1 -0
- package/dist/tools/progress-phases.d.ts +46 -0
- package/dist/tools/progress-phases.d.ts.map +1 -0
- package/dist/tools/progress-phases.js +48 -0
- package/dist/tools/progress-phases.js.map +1 -0
- package/dist/tools/shared-schemas.d.ts +25 -0
- package/dist/tools/shared-schemas.d.ts.map +1 -0
- package/dist/tools/shared-schemas.js +72 -0
- package/dist/tools/shared-schemas.js.map +1 -0
- package/dist/tools/sources/builders.d.ts +13 -0
- package/dist/tools/sources/builders.d.ts.map +1 -0
- package/dist/tools/sources/builders.js +118 -0
- package/dist/tools/sources/builders.js.map +1 -0
- package/dist/tools/sources/handlers-bind.d.ts +28 -0
- package/dist/tools/sources/handlers-bind.d.ts.map +1 -0
- package/dist/tools/sources/handlers-bind.js +181 -0
- package/dist/tools/sources/handlers-bind.js.map +1 -0
- package/dist/tools/sources/handlers.d.ts +47 -0
- package/dist/tools/sources/handlers.d.ts.map +1 -0
- package/dist/tools/sources/handlers.js +108 -0
- package/dist/tools/sources/handlers.js.map +1 -0
- package/dist/tools/sources/index.d.ts +19 -0
- package/dist/tools/sources/index.d.ts.map +1 -0
- package/dist/tools/sources/index.js +18 -0
- package/dist/tools/sources/index.js.map +1 -0
- package/dist/tools/sources.d.ts +14 -0
- package/dist/tools/sources.d.ts.map +1 -0
- package/dist/tools/sources.js +14 -0
- package/dist/tools/sources.js.map +1 -0
- package/dist/tools/sparse-fields.d.ts +106 -0
- package/dist/tools/sparse-fields.d.ts.map +1 -0
- package/dist/tools/sparse-fields.js +165 -0
- package/dist/tools/sparse-fields.js.map +1 -0
- package/dist/tools/tool-builder/annotations.d.ts +55 -0
- package/dist/tools/tool-builder/annotations.d.ts.map +1 -0
- package/dist/tools/tool-builder/annotations.js +86 -0
- package/dist/tools/tool-builder/annotations.js.map +1 -0
- package/dist/tools/tool-builder/define.d.ts +31 -0
- package/dist/tools/tool-builder/define.d.ts.map +1 -0
- package/dist/tools/tool-builder/define.js +31 -0
- package/dist/tools/tool-builder/define.js.map +1 -0
- package/dist/tools/tool-builder/index.d.ts +28 -0
- package/dist/tools/tool-builder/index.d.ts.map +1 -0
- package/dist/tools/tool-builder/index.js +27 -0
- package/dist/tools/tool-builder/index.js.map +1 -0
- package/dist/tools/tool-builder/results.d.ts +104 -0
- package/dist/tools/tool-builder/results.d.ts.map +1 -0
- package/dist/tools/tool-builder/results.js +224 -0
- package/dist/tools/tool-builder/results.js.map +1 -0
- package/dist/tools/tool-builder/types.d.ts +97 -0
- package/dist/tools/tool-builder/types.d.ts.map +1 -0
- package/dist/tools/tool-builder/types.js +9 -0
- package/dist/tools/tool-builder/types.js.map +1 -0
- package/dist/tools/tool-builder.d.ts +16 -0
- package/dist/tools/tool-builder.d.ts.map +1 -0
- package/dist/tools/tool-builder.js +16 -0
- package/dist/tools/tool-builder.js.map +1 -0
- package/dist/uninstall-skill.d.ts +52 -0
- package/dist/uninstall-skill.d.ts.map +1 -0
- package/dist/uninstall-skill.js +146 -0
- package/dist/uninstall-skill.js.map +1 -0
- package/dist/uninstall.d.ts +73 -0
- package/dist/uninstall.d.ts.map +1 -0
- package/dist/uninstall.js +82 -0
- package/dist/uninstall.js.map +1 -0
- package/icon.png +0 -0
- package/manifest.json +10 -10
- package/package.json +4 -1
- package/skills/yt-builder-mcp/SKILL.md +30 -26
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini CLI config writer.
|
|
3
|
+
*
|
|
4
|
+
* All platforms: ~/.gemini/settings.json
|
|
5
|
+
*
|
|
6
|
+
* Schema mirrors Claude Desktop's `mcpServers` map:
|
|
7
|
+
*
|
|
8
|
+
* {
|
|
9
|
+
* "mcpServers": {
|
|
10
|
+
* "<name>": { "command": "npx", "args": [...], "env": {...} }
|
|
11
|
+
* }
|
|
12
|
+
* }
|
|
13
|
+
*
|
|
14
|
+
* @license MIT
|
|
15
|
+
*/
|
|
16
|
+
import { type ClientWriter } from './index.js';
|
|
17
|
+
export declare const geminiCliClient: ClientWriter;
|
|
18
|
+
//# sourceMappingURL=gemini-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini-cli.d.ts","sourceRoot":"","sources":["../../src/clients/gemini-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAIH,KAAK,YAAY,EAEpB,MAAM,YAAY,CAAC;AAMpB,eAAO,MAAM,eAAe,EAAE,YAuB7B,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini CLI config writer.
|
|
3
|
+
*
|
|
4
|
+
* All platforms: ~/.gemini/settings.json
|
|
5
|
+
*
|
|
6
|
+
* Schema mirrors Claude Desktop's `mcpServers` map:
|
|
7
|
+
*
|
|
8
|
+
* {
|
|
9
|
+
* "mcpServers": {
|
|
10
|
+
* "<name>": { "command": "npx", "args": [...], "env": {...} }
|
|
11
|
+
* }
|
|
12
|
+
* }
|
|
13
|
+
*
|
|
14
|
+
* @license MIT
|
|
15
|
+
*/
|
|
16
|
+
import { existsSync } from 'node:fs';
|
|
17
|
+
import { join } from 'node:path';
|
|
18
|
+
import { userHome } from './home.js';
|
|
19
|
+
import { detectInServerMap, patchJsonFile, removeFromServerMap, } from './index.js';
|
|
20
|
+
function configPath() {
|
|
21
|
+
return join(userHome(), '.gemini', 'settings.json');
|
|
22
|
+
}
|
|
23
|
+
export const geminiCliClient = {
|
|
24
|
+
id: 'gemini-cli',
|
|
25
|
+
label: 'Gemini CLI',
|
|
26
|
+
configPath,
|
|
27
|
+
isDetected: () => existsSync(join(userHome(), '.gemini')),
|
|
28
|
+
apply: async (serverName, config) => {
|
|
29
|
+
await patchJsonFile(configPath(), (current) => {
|
|
30
|
+
const servers = current.mcpServers !== null &&
|
|
31
|
+
typeof current.mcpServers === 'object' &&
|
|
32
|
+
!Array.isArray(current.mcpServers)
|
|
33
|
+
? { ...current.mcpServers }
|
|
34
|
+
: {};
|
|
35
|
+
servers[serverName] = {
|
|
36
|
+
command: config.command,
|
|
37
|
+
args: config.args,
|
|
38
|
+
env: config.env,
|
|
39
|
+
};
|
|
40
|
+
return { ...current, mcpServers: servers };
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
detect: () => detectInServerMap(configPath(), 'mcpServers'),
|
|
44
|
+
remove: () => removeFromServerMap(configPath(), 'mcpServers'),
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=gemini-cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini-cli.js","sourceRoot":"","sources":["../../src/clients/gemini-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC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AC,UAAU,EAAE,EAAE,YAAY,CAAC;CAChE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `userHome()` — single source of truth for "where do AI clients live?".
|
|
3
|
+
*
|
|
4
|
+
* Returns `process.env.HOME` (or `USERPROFILE` on Windows) if set, falling
|
|
5
|
+
* back to `os.homedir()`. The env-first ordering is important for tests:
|
|
6
|
+
* Node's `os.homedir()` on POSIX uses `getpwuid_r`, which IGNORES the HOME
|
|
7
|
+
* env override — so tests that set `process.env.HOME = tmpDir` would
|
|
8
|
+
* otherwise stomp the real Claude / Cursor / Zed configs on the
|
|
9
|
+
* developer's machine. Hard-learned during Wave-4 setup.
|
|
10
|
+
*
|
|
11
|
+
* @license MIT
|
|
12
|
+
*/
|
|
13
|
+
export declare function userHome(): string;
|
|
14
|
+
//# sourceMappingURL=home.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../../src/clients/home.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,wBAAgB,QAAQ,IAAI,MAAM,CAIjC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `userHome()` — single source of truth for "where do AI clients live?".
|
|
3
|
+
*
|
|
4
|
+
* Returns `process.env.HOME` (or `USERPROFILE` on Windows) if set, falling
|
|
5
|
+
* back to `os.homedir()`. The env-first ordering is important for tests:
|
|
6
|
+
* Node's `os.homedir()` on POSIX uses `getpwuid_r`, which IGNORES the HOME
|
|
7
|
+
* env override — so tests that set `process.env.HOME = tmpDir` would
|
|
8
|
+
* otherwise stomp the real Claude / Cursor / Zed configs on the
|
|
9
|
+
* developer's machine. Hard-learned during Wave-4 setup.
|
|
10
|
+
*
|
|
11
|
+
* @license MIT
|
|
12
|
+
*/
|
|
13
|
+
import { homedir } from 'node:os';
|
|
14
|
+
export function userHome() {
|
|
15
|
+
const home = process.env.HOME ?? process.env.USERPROFILE;
|
|
16
|
+
if (home !== undefined && home !== '')
|
|
17
|
+
return home;
|
|
18
|
+
return homedir();
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=home.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../src/clients/home.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,UAAU,QAAQ;IACpB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IACzD,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IACnD,OAAO,OAAO,EAAE,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-config-writers.
|
|
3
|
+
*
|
|
4
|
+
* Each supported AI client has its own module that knows
|
|
5
|
+
* - which config file to read/write
|
|
6
|
+
* - what JSON shape to inject under `mcpServers` (or equivalent)
|
|
7
|
+
*
|
|
8
|
+
* The setup wizard calls `detectAvailableClients()` to enumerate, then
|
|
9
|
+
* `writeClientConfig({client, server})` once the user picks one.
|
|
10
|
+
*
|
|
11
|
+
* @license MIT
|
|
12
|
+
*/
|
|
13
|
+
import { claudeCodeClient } from './claude-code.js';
|
|
14
|
+
import { claudeDesktopClient } from './claude-desktop.js';
|
|
15
|
+
import { clineClient } from './cline.js';
|
|
16
|
+
import { codexCliClient } from './codex-cli.js';
|
|
17
|
+
import { continueClient } from './continue.js';
|
|
18
|
+
import { cursorClient } from './cursor.js';
|
|
19
|
+
import { geminiCliClient } from './gemini-cli.js';
|
|
20
|
+
import { rooCodeClient } from './roo-code.js';
|
|
21
|
+
import { zedClient } from './zed.js';
|
|
22
|
+
export interface McpServerConfig {
|
|
23
|
+
readonly command: string;
|
|
24
|
+
readonly args: readonly string[];
|
|
25
|
+
readonly env: Record<string, string>;
|
|
26
|
+
}
|
|
27
|
+
export interface ClientWriter {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly label: string;
|
|
30
|
+
/** Absolute path to the config file. */
|
|
31
|
+
configPath: () => string;
|
|
32
|
+
/** Returns true if the config file exists (client is "installed"). */
|
|
33
|
+
isDetected: () => boolean;
|
|
34
|
+
/** Apply the MCP server config to the file. Creates the file if missing. */
|
|
35
|
+
apply: (serverName: string, config: McpServerConfig) => Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Inspect the config file for an existing yt-builder-mcp server entry.
|
|
38
|
+
* The inverse of {@link apply} — used by the `uninstall` subcommand to
|
|
39
|
+
* decide which clients to surface in the removal checklist.
|
|
40
|
+
*
|
|
41
|
+
* Matches by EITHER a known server key (`yt-builder-mcp` /
|
|
42
|
+
* `yootheme-builder`, see {@link KNOWN_SERVER_KEYS}) OR any entry whose
|
|
43
|
+
* command/args reference the `@wootsup/yt-builder-mcp` npm package —
|
|
44
|
+
* this catches legacy/renamed leftovers a user may have hand-edited or
|
|
45
|
+
* an older wizard version wrote under a different key.
|
|
46
|
+
*
|
|
47
|
+
* Never throws on a missing / malformed file; returns `present: false`.
|
|
48
|
+
*/
|
|
49
|
+
detect: () => Promise<ClientDetection>;
|
|
50
|
+
/**
|
|
51
|
+
* Remove the matched yt-builder-mcp server entry from the config file.
|
|
52
|
+
* Inverse of {@link apply}: atomic (read → mutate → write), preserves
|
|
53
|
+
* every other server + unrelated config, idempotent (a no-op when no
|
|
54
|
+
* matching entry exists), and never creates the file if it is missing.
|
|
55
|
+
*
|
|
56
|
+
* Returns the keys/names actually removed so the caller can render an
|
|
57
|
+
* accurate summary.
|
|
58
|
+
*/
|
|
59
|
+
remove: () => Promise<ClientRemoval>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Result of a {@link ClientWriter.detect} probe.
|
|
63
|
+
*/
|
|
64
|
+
export interface ClientDetection {
|
|
65
|
+
/** True when at least one matching server entry was found. */
|
|
66
|
+
readonly present: boolean;
|
|
67
|
+
/** Absolute config-file path that was inspected. */
|
|
68
|
+
readonly configPath: string;
|
|
69
|
+
/**
|
|
70
|
+
* The server keys/names that matched (e.g. `['yt-builder-mcp']`). For
|
|
71
|
+
* the Continue array-format this is the entry `name`s; for codex-cli it
|
|
72
|
+
* is the TOML table key. Empty when `present` is false.
|
|
73
|
+
*/
|
|
74
|
+
readonly matchedKeys: readonly string[];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Result of a {@link ClientWriter.remove} operation.
|
|
78
|
+
*/
|
|
79
|
+
export interface ClientRemoval {
|
|
80
|
+
/** True when one or more entries were removed from the file. */
|
|
81
|
+
readonly removed: boolean;
|
|
82
|
+
/** Absolute config-file path that was mutated (or inspected). */
|
|
83
|
+
readonly configPath: string;
|
|
84
|
+
/** The server keys/names actually removed. Empty on a no-op. */
|
|
85
|
+
readonly removedKeys: readonly string[];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Canonical + legacy server keys the wizard has ever written. `detect` /
|
|
89
|
+
* `remove` match any of these by name, in addition to the
|
|
90
|
+
* package-reference heuristic. Ordered canonical-first.
|
|
91
|
+
*
|
|
92
|
+
* - `yt-builder-mcp` — current key (1.0.2 Wave-R Part 2, see setup-wizard.ts).
|
|
93
|
+
* - `yootheme-builder` — pre-1.0.1 key (alpha-tester only; no production installs).
|
|
94
|
+
*/
|
|
95
|
+
export declare const KNOWN_SERVER_KEYS: readonly string[];
|
|
96
|
+
/**
|
|
97
|
+
* The npm package name an AI-client server entry runs. Used by the
|
|
98
|
+
* package-reference heuristic in `detect` / `remove` so a hand-edited or
|
|
99
|
+
* differently-keyed leftover (e.g. `"yt-builder": { command: "npx", args:
|
|
100
|
+
* ["-y", "@wootsup/yt-builder-mcp"] }`) is still caught.
|
|
101
|
+
*/
|
|
102
|
+
export declare const PACKAGE_NAME = "@wootsup/yt-builder-mcp";
|
|
103
|
+
/**
|
|
104
|
+
* True when a JSON MCP-server entry references our npm package via its
|
|
105
|
+
* `command` / `args`. Defensive across shapes: an entry might be `{
|
|
106
|
+
* command: 'npx', args: ['-y', '@wootsup/yt-builder-mcp'] }`, or a
|
|
107
|
+
* Zed-style `{ command: { path, args } }`, or a Continue-style `{
|
|
108
|
+
* transport: { command, args } }`. We stringify the command+args island
|
|
109
|
+
* and substring-match the package name.
|
|
110
|
+
*/
|
|
111
|
+
export declare function entryReferencesPackage(entry: unknown): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Compute which keys of a JSON server-map (`mcpServers` /
|
|
114
|
+
* `context_servers`) match yt-builder-mcp — by known key name OR by
|
|
115
|
+
* package reference. Shared by the JSON-format clients' detect/remove.
|
|
116
|
+
*/
|
|
117
|
+
export declare function matchServerMapKeys(servers: Record<string, unknown>): string[];
|
|
118
|
+
export declare const ALL_CLIENTS: readonly ClientWriter[];
|
|
119
|
+
export interface DetectedClient {
|
|
120
|
+
readonly id: string;
|
|
121
|
+
readonly label: string;
|
|
122
|
+
readonly configPath: string;
|
|
123
|
+
readonly detected: boolean;
|
|
124
|
+
}
|
|
125
|
+
export declare function detectAvailableClients(): DetectedClient[];
|
|
126
|
+
export declare function findClient(id: string): ClientWriter | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Shared helper: read a JSON file, mutate via callback, write back.
|
|
129
|
+
* Creates parent directories if missing.
|
|
130
|
+
*/
|
|
131
|
+
export declare function patchJsonFile(path: string, mutator: (current: Record<string, unknown>) => Record<string, unknown>): Promise<void>;
|
|
132
|
+
/**
|
|
133
|
+
* Read a JSON config file WITHOUT creating it. Returns `null` when the
|
|
134
|
+
* file is missing or unparseable (the inverse-friendly read for detect /
|
|
135
|
+
* remove, which must be no-ops on absent config). On a parse error we
|
|
136
|
+
* return `null` rather than `{}` so callers can distinguish "no config to
|
|
137
|
+
* touch" from "empty object".
|
|
138
|
+
*/
|
|
139
|
+
export declare function readJsonFileOrNull(path: string): Promise<Record<string, unknown> | null>;
|
|
140
|
+
/**
|
|
141
|
+
* Detect helper for the JSON server-map clients (Claude Desktop / Code,
|
|
142
|
+
* Cursor, Cline, Roo Code, Gemini CLI use `mcpServers`; Zed uses
|
|
143
|
+
* `context_servers`). Reads the file, pulls the named map, and returns
|
|
144
|
+
* the matching keys.
|
|
145
|
+
*/
|
|
146
|
+
export declare function detectInServerMap(path: string, mapKey: 'mcpServers' | 'context_servers'): Promise<ClientDetection>;
|
|
147
|
+
/**
|
|
148
|
+
* Remove helper for the JSON server-map clients. Atomic read → delete →
|
|
149
|
+
* write, preserving every other key in the map AND every other top-level
|
|
150
|
+
* key in the file. No-op (no write) when nothing matches or the file is
|
|
151
|
+
* absent. When the map becomes empty it is dropped entirely so we don't
|
|
152
|
+
* leave a dangling `"mcpServers": {}` behind.
|
|
153
|
+
*/
|
|
154
|
+
export declare function removeFromServerMap(path: string, mapKey: 'mcpServers' | 'context_servers'): Promise<ClientRemoval>;
|
|
155
|
+
export { claudeCodeClient, claudeDesktopClient, clineClient, codexCliClient, continueClient, cursorClient, geminiCliClient, rooCodeClient, zedClient, };
|
|
156
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,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,mBAAmB,CACrC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,YAAY,GAAG,iBAAiB,GACzC,OAAO,CAAC,aAAa,CAAC,CAuBxB;AAED,OAAO,EACH,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,cAAc,EACd,YAAY,EACZ,eAAe,EACf,aAAa,EACb,SAAS,GACZ,CAAC"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-config-writers.
|
|
3
|
+
*
|
|
4
|
+
* Each supported AI client has its own module that knows
|
|
5
|
+
* - which config file to read/write
|
|
6
|
+
* - what JSON shape to inject under `mcpServers` (or equivalent)
|
|
7
|
+
*
|
|
8
|
+
* The setup wizard calls `detectAvailableClients()` to enumerate, then
|
|
9
|
+
* `writeClientConfig({client, server})` once the user picks one.
|
|
10
|
+
*
|
|
11
|
+
* @license MIT
|
|
12
|
+
*/
|
|
13
|
+
import { existsSync } from 'node:fs';
|
|
14
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
15
|
+
import { dirname } from 'node:path';
|
|
16
|
+
import { claudeCodeClient } from './claude-code.js';
|
|
17
|
+
import { claudeDesktopClient } from './claude-desktop.js';
|
|
18
|
+
import { clineClient } from './cline.js';
|
|
19
|
+
import { codexCliClient } from './codex-cli.js';
|
|
20
|
+
import { continueClient } from './continue.js';
|
|
21
|
+
import { cursorClient } from './cursor.js';
|
|
22
|
+
import { geminiCliClient } from './gemini-cli.js';
|
|
23
|
+
import { rooCodeClient } from './roo-code.js';
|
|
24
|
+
import { zedClient } from './zed.js';
|
|
25
|
+
/**
|
|
26
|
+
* Canonical + legacy server keys the wizard has ever written. `detect` /
|
|
27
|
+
* `remove` match any of these by name, in addition to the
|
|
28
|
+
* package-reference heuristic. Ordered canonical-first.
|
|
29
|
+
*
|
|
30
|
+
* - `yt-builder-mcp` — current key (1.0.2 Wave-R Part 2, see setup-wizard.ts).
|
|
31
|
+
* - `yootheme-builder` — pre-1.0.1 key (alpha-tester only; no production installs).
|
|
32
|
+
*/
|
|
33
|
+
export const KNOWN_SERVER_KEYS = ['yt-builder-mcp', 'yootheme-builder'];
|
|
34
|
+
/**
|
|
35
|
+
* The npm package name an AI-client server entry runs. Used by the
|
|
36
|
+
* package-reference heuristic in `detect` / `remove` so a hand-edited or
|
|
37
|
+
* differently-keyed leftover (e.g. `"yt-builder": { command: "npx", args:
|
|
38
|
+
* ["-y", "@wootsup/yt-builder-mcp"] }`) is still caught.
|
|
39
|
+
*/
|
|
40
|
+
export const PACKAGE_NAME = '@wootsup/yt-builder-mcp';
|
|
41
|
+
/**
|
|
42
|
+
* True when a JSON MCP-server entry references our npm package via its
|
|
43
|
+
* `command` / `args`. Defensive across shapes: an entry might be `{
|
|
44
|
+
* command: 'npx', args: ['-y', '@wootsup/yt-builder-mcp'] }`, or a
|
|
45
|
+
* Zed-style `{ command: { path, args } }`, or a Continue-style `{
|
|
46
|
+
* transport: { command, args } }`. We stringify the command+args island
|
|
47
|
+
* and substring-match the package name.
|
|
48
|
+
*/
|
|
49
|
+
export function entryReferencesPackage(entry) {
|
|
50
|
+
if (entry === null || typeof entry !== 'object')
|
|
51
|
+
return false;
|
|
52
|
+
const haystacks = [];
|
|
53
|
+
const rec = entry;
|
|
54
|
+
haystacks.push(rec.command, rec.args);
|
|
55
|
+
// Zed nests command under `command: { path, args }`.
|
|
56
|
+
if (rec.command !== null && typeof rec.command === 'object') {
|
|
57
|
+
const cmd = rec.command;
|
|
58
|
+
haystacks.push(cmd.path, cmd.args);
|
|
59
|
+
}
|
|
60
|
+
// Continue nests under `transport: { command, args }`.
|
|
61
|
+
if (rec.transport !== null && typeof rec.transport === 'object') {
|
|
62
|
+
const t = rec.transport;
|
|
63
|
+
haystacks.push(t.command, t.args);
|
|
64
|
+
}
|
|
65
|
+
for (const h of haystacks) {
|
|
66
|
+
if (typeof h === 'string' && h.includes(PACKAGE_NAME))
|
|
67
|
+
return true;
|
|
68
|
+
if (Array.isArray(h)) {
|
|
69
|
+
for (const v of h) {
|
|
70
|
+
if (typeof v === 'string' && v.includes(PACKAGE_NAME))
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Compute which keys of a JSON server-map (`mcpServers` /
|
|
79
|
+
* `context_servers`) match yt-builder-mcp — by known key name OR by
|
|
80
|
+
* package reference. Shared by the JSON-format clients' detect/remove.
|
|
81
|
+
*/
|
|
82
|
+
export function matchServerMapKeys(servers) {
|
|
83
|
+
const matched = [];
|
|
84
|
+
for (const [key, entry] of Object.entries(servers)) {
|
|
85
|
+
if (KNOWN_SERVER_KEYS.includes(key) || entryReferencesPackage(entry)) {
|
|
86
|
+
matched.push(key);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return matched;
|
|
90
|
+
}
|
|
91
|
+
export const ALL_CLIENTS = [
|
|
92
|
+
claudeDesktopClient,
|
|
93
|
+
claudeCodeClient,
|
|
94
|
+
cursorClient,
|
|
95
|
+
zedClient,
|
|
96
|
+
continueClient,
|
|
97
|
+
clineClient,
|
|
98
|
+
rooCodeClient,
|
|
99
|
+
codexCliClient,
|
|
100
|
+
geminiCliClient,
|
|
101
|
+
];
|
|
102
|
+
export function detectAvailableClients() {
|
|
103
|
+
return ALL_CLIENTS.map((c) => ({
|
|
104
|
+
id: c.id,
|
|
105
|
+
label: c.label,
|
|
106
|
+
configPath: c.configPath(),
|
|
107
|
+
detected: c.isDetected(),
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
export function findClient(id) {
|
|
111
|
+
return ALL_CLIENTS.find((c) => c.id === id);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Shared helper: read a JSON file, mutate via callback, write back.
|
|
115
|
+
* Creates parent directories if missing.
|
|
116
|
+
*/
|
|
117
|
+
export async function patchJsonFile(path, mutator) {
|
|
118
|
+
let current = {};
|
|
119
|
+
if (existsSync(path)) {
|
|
120
|
+
try {
|
|
121
|
+
const raw = await readFile(path, 'utf-8');
|
|
122
|
+
const parsed = raw.trim() === '' ? {} : JSON.parse(raw);
|
|
123
|
+
if (parsed !== null && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
124
|
+
current = parsed;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
current = {};
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
await mkdir(dirname(path), { recursive: true });
|
|
133
|
+
}
|
|
134
|
+
const next = mutator(current);
|
|
135
|
+
await writeFile(path, JSON.stringify(next, null, 2) + '\n', 'utf-8');
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Read a JSON config file WITHOUT creating it. Returns `null` when the
|
|
139
|
+
* file is missing or unparseable (the inverse-friendly read for detect /
|
|
140
|
+
* remove, which must be no-ops on absent config). On a parse error we
|
|
141
|
+
* return `null` rather than `{}` so callers can distinguish "no config to
|
|
142
|
+
* touch" from "empty object".
|
|
143
|
+
*/
|
|
144
|
+
export async function readJsonFileOrNull(path) {
|
|
145
|
+
if (!existsSync(path))
|
|
146
|
+
return null;
|
|
147
|
+
try {
|
|
148
|
+
const raw = await readFile(path, 'utf-8');
|
|
149
|
+
if (raw.trim() === '')
|
|
150
|
+
return null;
|
|
151
|
+
const parsed = JSON.parse(raw);
|
|
152
|
+
if (parsed !== null && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
153
|
+
return parsed;
|
|
154
|
+
}
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Detect helper for the JSON server-map clients (Claude Desktop / Code,
|
|
163
|
+
* Cursor, Cline, Roo Code, Gemini CLI use `mcpServers`; Zed uses
|
|
164
|
+
* `context_servers`). Reads the file, pulls the named map, and returns
|
|
165
|
+
* the matching keys.
|
|
166
|
+
*/
|
|
167
|
+
export async function detectInServerMap(path, mapKey) {
|
|
168
|
+
const current = await readJsonFileOrNull(path);
|
|
169
|
+
if (current === null) {
|
|
170
|
+
return { present: false, configPath: path, matchedKeys: [] };
|
|
171
|
+
}
|
|
172
|
+
const raw = current[mapKey];
|
|
173
|
+
if (raw === null || typeof raw !== 'object' || Array.isArray(raw)) {
|
|
174
|
+
return { present: false, configPath: path, matchedKeys: [] };
|
|
175
|
+
}
|
|
176
|
+
const matched = matchServerMapKeys(raw);
|
|
177
|
+
return { present: matched.length > 0, configPath: path, matchedKeys: matched };
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Remove helper for the JSON server-map clients. Atomic read → delete →
|
|
181
|
+
* write, preserving every other key in the map AND every other top-level
|
|
182
|
+
* key in the file. No-op (no write) when nothing matches or the file is
|
|
183
|
+
* absent. When the map becomes empty it is dropped entirely so we don't
|
|
184
|
+
* leave a dangling `"mcpServers": {}` behind.
|
|
185
|
+
*/
|
|
186
|
+
export async function removeFromServerMap(path, mapKey) {
|
|
187
|
+
const current = await readJsonFileOrNull(path);
|
|
188
|
+
if (current === null) {
|
|
189
|
+
return { removed: false, configPath: path, removedKeys: [] };
|
|
190
|
+
}
|
|
191
|
+
const raw = current[mapKey];
|
|
192
|
+
if (raw === null || typeof raw !== 'object' || Array.isArray(raw)) {
|
|
193
|
+
return { removed: false, configPath: path, removedKeys: [] };
|
|
194
|
+
}
|
|
195
|
+
const servers = { ...raw };
|
|
196
|
+
const matched = matchServerMapKeys(servers);
|
|
197
|
+
if (matched.length === 0) {
|
|
198
|
+
return { removed: false, configPath: path, removedKeys: [] };
|
|
199
|
+
}
|
|
200
|
+
for (const key of matched)
|
|
201
|
+
delete servers[key];
|
|
202
|
+
const next = { ...current };
|
|
203
|
+
if (Object.keys(servers).length === 0) {
|
|
204
|
+
delete next[mapKey];
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
next[mapKey] = servers;
|
|
208
|
+
}
|
|
209
|
+
await writeFile(path, JSON.stringify(next, null, 2) + '\n', 'utf-8');
|
|
210
|
+
return { removed: true, configPath: path, removedKeys: matched };
|
|
211
|
+
}
|
|
212
|
+
export { claudeCodeClient, claudeDesktopClient, clineClient, codexCliClient, continueClient, cursorClient, geminiCliClient, rooCodeClient, zedClient, };
|
|
213
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAuErC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAsB,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;AAE3F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,yBAAyB,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAc;IACjD,IAAI,KAA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
|
|
3
|
+
*
|
|
4
|
+
* Roo Code (formerly Roo Cline) is the VS Code extension
|
|
5
|
+
* `rooveterinaryinc.roo-cline` — a fork of Cline. It follows the
|
|
6
|
+
* same VS Code globalStorage layout but its own settings file is
|
|
7
|
+
* named `mcp_settings.json` (without the legacy `cline_` prefix
|
|
8
|
+
* its parent uses).
|
|
9
|
+
*
|
|
10
|
+
* <vsCodeUserDir>/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json
|
|
11
|
+
*
|
|
12
|
+
* VS Code's `<vsCodeUserDir>` is:
|
|
13
|
+
* macOS: ~/Library/Application Support/Code/User
|
|
14
|
+
* Linux: ~/.config/Code/User
|
|
15
|
+
* Windows: %APPDATA%\Code\User
|
|
16
|
+
*
|
|
17
|
+
* Schema mirrors Claude Desktop's `mcpServers` map.
|
|
18
|
+
*
|
|
19
|
+
* @license MIT
|
|
20
|
+
*/
|
|
21
|
+
import { type ClientWriter } from './index.js';
|
|
22
|
+
export declare const rooCodeClient: ClientWriter;
|
|
23
|
+
//# sourceMappingURL=roo-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roo-code.d.ts","sourceRoot":"","sources":["../../src/clients/roo-code.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,OAAO,EAIH,KAAK,YAAY,EAEpB,MAAM,YAAY,CAAC;AAkCpB,eAAO,MAAM,aAAa,EAAE,YAuB3B,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Roo Code MCP config writer.
|
|
3
|
+
*
|
|
4
|
+
* Roo Code (formerly Roo Cline) is the VS Code extension
|
|
5
|
+
* `rooveterinaryinc.roo-cline` — a fork of Cline. It follows the
|
|
6
|
+
* same VS Code globalStorage layout but its own settings file is
|
|
7
|
+
* named `mcp_settings.json` (without the legacy `cline_` prefix
|
|
8
|
+
* its parent uses).
|
|
9
|
+
*
|
|
10
|
+
* <vsCodeUserDir>/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json
|
|
11
|
+
*
|
|
12
|
+
* VS Code's `<vsCodeUserDir>` is:
|
|
13
|
+
* macOS: ~/Library/Application Support/Code/User
|
|
14
|
+
* Linux: ~/.config/Code/User
|
|
15
|
+
* Windows: %APPDATA%\Code\User
|
|
16
|
+
*
|
|
17
|
+
* Schema mirrors Claude Desktop's `mcpServers` map.
|
|
18
|
+
*
|
|
19
|
+
* @license MIT
|
|
20
|
+
*/
|
|
21
|
+
import { existsSync } from 'node:fs';
|
|
22
|
+
import { platform } from 'node:os';
|
|
23
|
+
import { join } from 'node:path';
|
|
24
|
+
import { userHome } from './home.js';
|
|
25
|
+
import { detectInServerMap, patchJsonFile, removeFromServerMap, } from './index.js';
|
|
26
|
+
const EXTENSION_ID = 'rooveterinaryinc.roo-cline';
|
|
27
|
+
const SETTINGS_FILENAME = 'mcp_settings.json';
|
|
28
|
+
function vsCodeUserDir() {
|
|
29
|
+
const home = userHome();
|
|
30
|
+
switch (platform()) {
|
|
31
|
+
case 'darwin':
|
|
32
|
+
return join(home, 'Library', 'Application Support', 'Code', 'User');
|
|
33
|
+
case 'win32': {
|
|
34
|
+
const appData = process.env.APPDATA ?? join(home, 'AppData', 'Roaming');
|
|
35
|
+
return join(appData, 'Code', 'User');
|
|
36
|
+
}
|
|
37
|
+
default:
|
|
38
|
+
return join(home, '.config', 'Code', 'User');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function configPath() {
|
|
42
|
+
return join(vsCodeUserDir(), 'globalStorage', EXTENSION_ID, 'settings', SETTINGS_FILENAME);
|
|
43
|
+
}
|
|
44
|
+
function isDetected() {
|
|
45
|
+
const extDir = join(vsCodeUserDir(), 'globalStorage', EXTENSION_ID);
|
|
46
|
+
return existsSync(extDir) || existsSync(configPath());
|
|
47
|
+
}
|
|
48
|
+
export const rooCodeClient = {
|
|
49
|
+
id: 'roo-code',
|
|
50
|
+
label: 'Roo Code (VS Code)',
|
|
51
|
+
configPath,
|
|
52
|
+
isDetected,
|
|
53
|
+
apply: async (serverName, config) => {
|
|
54
|
+
await patchJsonFile(configPath(), (current) => {
|
|
55
|
+
const servers = current.mcpServers !== null &&
|
|
56
|
+
typeof current.mcpServers === 'object' &&
|
|
57
|
+
!Array.isArray(current.mcpServers)
|
|
58
|
+
? { ...current.mcpServers }
|
|
59
|
+
: {};
|
|
60
|
+
servers[serverName] = {
|
|
61
|
+
command: config.command,
|
|
62
|
+
args: config.args,
|
|
63
|
+
env: config.env,
|
|
64
|
+
};
|
|
65
|
+
return { ...current, mcpServers: servers };
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
detect: () => detectInServerMap(configPath(), 'mcpServers'),
|
|
69
|
+
remove: () => removeFromServerMap(configPath(), 'mcpServers'),
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=roo-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roo-code.js","sourceRoot":"","sources":["../../src/clients/roo-code.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EACH,iBAAiB,EACjB,aAAa,EACb,mBAAmB,GAGtB,MAAM,YAAY,CAAC;AAEpB,MAAM,YAAY,GAAG,4BAA4B,CAAC;AAClD,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C,SAAS,aAAa;IAClB,MAAM,IAAI,GAAG,QAAQ,EAAE,CAAC;IACxB,QAAQ,QAAQ,EAAE,EAAE,CAAC;QACjB,KAAK,QAAQ;YACT,OAAO,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,EAAE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AI,EAAE,MAAM,CAAC,IAAI;gBACjB,GAAG,EAAE,MAAM,CAAC,GAAG;aAClB,CAAC;YACF,OAAO,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;QAC/C,CAAC,CAAC,CAAC;IACP,CAAC;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,UAAU,EAAE,EAAE,YAAY,CAAC;IAC3D,MAAM,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,UAAU,EAAE,EAAE,YAAY,CAAC;CAChE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zed MCP config writer.
|
|
3
|
+
*
|
|
4
|
+
* Global: ~/.config/zed/settings.json (JSONC; we treat as JSON for write)
|
|
5
|
+
*
|
|
6
|
+
* Schema: `context_servers` map (Zed-specific naming).
|
|
7
|
+
*
|
|
8
|
+
* @license MIT
|
|
9
|
+
*/
|
|
10
|
+
import { type ClientWriter } from './index.js';
|
|
11
|
+
export declare const zedClient: ClientWriter;
|
|
12
|
+
//# sourceMappingURL=zed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zed.d.ts","sourceRoot":"","sources":["../../src/clients/zed.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,EAIH,KAAK,YAAY,EAEpB,MAAM,YAAY,CAAC;AAMpB,eAAO,MAAM,SAAS,EAAE,YA0BvB,CAAC"}
|