@wootsup/yt-builder-mcp 1.1.7 → 1.3.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 +14 -10
- package/bin/yt-builder-mcp.js +55 -40
- package/dist/auth.d.ts +18 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +18 -0
- package/dist/auth.js.map +1 -1
- package/dist/catalog/build-catalog.d.ts +63 -0
- package/dist/catalog/build-catalog.d.ts.map +1 -0
- package/dist/catalog/build-catalog.js +166 -0
- package/dist/catalog/build-catalog.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 +28 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +40 -1
- package/dist/client.js.map +1 -1
- package/dist/clients/claude-code.d.ts.map +1 -1
- package/dist/clients/claude-code.js +3 -1
- package/dist/clients/claude-code.js.map +1 -1
- package/dist/clients/claude-desktop.d.ts.map +1 -1
- package/dist/clients/claude-desktop.js +3 -1
- package/dist/clients/claude-desktop.js.map +1 -1
- package/dist/clients/cline.d.ts.map +1 -1
- package/dist/clients/cline.js +3 -1
- package/dist/clients/cline.js.map +1 -1
- package/dist/clients/codex-cli.d.ts +1 -1
- package/dist/clients/codex-cli.d.ts.map +1 -1
- package/dist/clients/codex-cli.js +98 -0
- package/dist/clients/codex-cli.js.map +1 -1
- package/dist/clients/continue.d.ts.map +1 -1
- package/dist/clients/continue.js +70 -1
- package/dist/clients/continue.js.map +1 -1
- package/dist/clients/cursor.d.ts.map +1 -1
- package/dist/clients/cursor.js +3 -1
- package/dist/clients/cursor.js.map +1 -1
- package/dist/clients/gemini-cli.d.ts.map +1 -1
- package/dist/clients/gemini-cli.js +3 -1
- package/dist/clients/gemini-cli.js.map +1 -1
- package/dist/clients/index.d.ts +104 -0
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +141 -0
- package/dist/clients/index.js.map +1 -1
- package/dist/clients/roo-code.d.ts.map +1 -1
- package/dist/clients/roo-code.js +3 -1
- package/dist/clients/roo-code.js.map +1 -1
- package/dist/clients/zed.d.ts.map +1 -1
- package/dist/clients/zed.js +3 -1
- package/dist/clients/zed.js.map +1 -1
- package/dist/gateway/advanced-read-tool.d.ts +37 -0
- package/dist/gateway/advanced-read-tool.d.ts.map +1 -0
- package/dist/gateway/advanced-read-tool.js +156 -0
- package/dist/gateway/advanced-read-tool.js.map +1 -0
- package/dist/gateway/advanced-tool/domains.d.ts +18 -3
- package/dist/gateway/advanced-tool/domains.d.ts.map +1 -1
- package/dist/gateway/advanced-tool/domains.js +28 -9
- package/dist/gateway/advanced-tool/domains.js.map +1 -1
- package/dist/gateway/advanced-tool/register.d.ts.map +1 -1
- package/dist/gateway/advanced-tool/register.js +43 -11
- package/dist/gateway/advanced-tool/register.js.map +1 -1
- package/dist/gateway/essentials.d.ts +14 -4
- package/dist/gateway/essentials.d.ts.map +1 -1
- package/dist/gateway/essentials.js +55 -5
- package/dist/gateway/essentials.js.map +1 -1
- package/dist/gateway/test-support.d.ts +3 -3
- package/dist/gateway/test-support.js +3 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/install-skill.js +1 -1
- package/dist/proxy/bridge.d.ts +36 -0
- package/dist/proxy/bridge.d.ts.map +1 -0
- package/dist/proxy/bridge.js +129 -0
- package/dist/proxy/bridge.js.map +1 -0
- package/dist/proxy/mode.d.ts +10 -0
- package/dist/proxy/mode.d.ts.map +1 -0
- package/dist/proxy/mode.js +20 -0
- package/dist/proxy/mode.js.map +1 -0
- package/dist/server.d.ts +6 -4
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +14 -4
- package/dist/server.js.map +1 -1
- package/dist/setup-cli.d.ts +41 -0
- package/dist/setup-cli.d.ts.map +1 -1
- package/dist/setup-cli.js +163 -1
- package/dist/setup-cli.js.map +1 -1
- package/dist/setup-prompts.d.ts +23 -0
- package/dist/setup-prompts.d.ts.map +1 -1
- package/dist/setup-prompts.js +76 -1
- package/dist/setup-prompts.js.map +1 -1
- package/dist/setup-wizard.d.ts.map +1 -1
- package/dist/setup-wizard.js +7 -0
- package/dist/setup-wizard.js.map +1 -1
- 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/client-pool.d.ts +33 -0
- package/dist/sites/client-pool.d.ts.map +1 -1
- package/dist/sites/client-pool.js +69 -1
- package/dist/sites/client-pool.js.map +1 -1
- package/dist/sites/registry.d.ts +30 -0
- package/dist/sites/registry.d.ts.map +1 -1
- package/dist/sites/registry.js.map +1 -1
- package/dist/sites/store.d.ts +8 -1
- package/dist/sites/store.d.ts.map +1 -1
- package/dist/sites/store.js +17 -2
- package/dist/sites/store.js.map +1 -1
- package/dist/sites/tools/index.d.ts.map +1 -1
- package/dist/sites/tools/index.js +9 -1
- package/dist/sites/tools/index.js.map +1 -1
- 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 +203 -0
- package/dist/sites/tools/use-site.js.map +1 -0
- package/dist/tools/bind-guidance.d.ts +80 -0
- package/dist/tools/bind-guidance.d.ts.map +1 -0
- package/dist/tools/bind-guidance.js +95 -0
- package/dist/tools/bind-guidance.js.map +1 -0
- package/dist/tools/elements/builders.d.ts.map +1 -1
- package/dist/tools/elements/builders.js +75 -18
- package/dist/tools/elements/builders.js.map +1 -1
- package/dist/tools/elements/handlers-write.d.ts +20 -3
- package/dist/tools/elements/handlers-write.d.ts.map +1 -1
- package/dist/tools/elements/handlers-write.js +372 -10
- package/dist/tools/elements/handlers-write.js.map +1 -1
- package/dist/tools/elements/handlers.d.ts +6 -1
- package/dist/tools/elements/handlers.d.ts.map +1 -1
- package/dist/tools/elements/handlers.js +77 -10
- package/dist/tools/elements/handlers.js.map +1 -1
- package/dist/tools/elements/layout-hierarchy-rules.d.ts +62 -0
- package/dist/tools/elements/layout-hierarchy-rules.d.ts.map +1 -0
- package/dist/tools/elements/layout-hierarchy-rules.js +154 -0
- package/dist/tools/elements/layout-hierarchy-rules.js.map +1 -0
- package/dist/tools/format/elements-format.d.ts +35 -0
- package/dist/tools/format/elements-format.d.ts.map +1 -1
- package/dist/tools/format/elements-format.js +134 -12
- package/dist/tools/format/elements-format.js.map +1 -1
- package/dist/tools/format/inspection-format.d.ts +29 -0
- package/dist/tools/format/inspection-format.d.ts.map +1 -1
- package/dist/tools/format/inspection-format.js +99 -22
- package/dist/tools/format/inspection-format.js.map +1 -1
- package/dist/tools/format/pages-format.d.ts.map +1 -1
- package/dist/tools/format/pages-format.js +7 -0
- package/dist/tools/format/pages-format.js.map +1 -1
- package/dist/tools/format/sources-format.d.ts +8 -0
- package/dist/tools/format/sources-format.d.ts.map +1 -1
- package/dist/tools/format/sources-format.js +10 -0
- package/dist/tools/format/sources-format.js.map +1 -1
- package/dist/tools/health.d.ts.map +1 -1
- package/dist/tools/health.js +24 -0
- package/dist/tools/health.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/inspection.d.ts +24 -0
- package/dist/tools/inspection.d.ts.map +1 -1
- package/dist/tools/inspection.js +297 -5
- package/dist/tools/inspection.js.map +1 -1
- package/dist/tools/layout-flatten.d.ts +11 -8
- package/dist/tools/layout-flatten.d.ts.map +1 -1
- package/dist/tools/layout-flatten.js +17 -6
- package/dist/tools/layout-flatten.js.map +1 -1
- package/dist/tools/multi-items/builders.d.ts.map +1 -1
- package/dist/tools/multi-items/builders.js +18 -3
- package/dist/tools/multi-items/builders.js.map +1 -1
- package/dist/tools/multi-items/clean-implode-handler.d.ts.map +1 -1
- package/dist/tools/multi-items/clean-implode-handler.js +2 -2
- package/dist/tools/multi-items/clean-implode-handler.js.map +1 -1
- 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/inspect-handler.d.ts +50 -2
- package/dist/tools/multi-items/inspect-handler.d.ts.map +1 -1
- package/dist/tools/multi-items/inspect-handler.js +237 -10
- package/dist/tools/multi-items/inspect-handler.js.map +1 -1
- 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/pages/builders.d.ts +31 -2
- package/dist/tools/pages/builders.d.ts.map +1 -1
- package/dist/tools/pages/builders.js +173 -17
- package/dist/tools/pages/builders.js.map +1 -1
- package/dist/tools/pages/handlers-read.d.ts +6 -2
- package/dist/tools/pages/handlers-read.d.ts.map +1 -1
- package/dist/tools/pages/handlers-read.js +228 -26
- package/dist/tools/pages/handlers-read.js.map +1 -1
- package/dist/tools/pages/handlers-write.d.ts +143 -7
- package/dist/tools/pages/handlers-write.d.ts.map +1 -1
- package/dist/tools/pages/handlers-write.js +215 -11
- package/dist/tools/pages/handlers-write.js.map +1 -1
- package/dist/tools/pages/index.d.ts +1 -1
- package/dist/tools/pages/index.d.ts.map +1 -1
- package/dist/tools/pages/index.js +1 -1
- package/dist/tools/pages/index.js.map +1 -1
- package/dist/tools/pages/schemas.d.ts +166 -0
- package/dist/tools/pages/schemas.d.ts.map +1 -1
- package/dist/tools/pages/schemas.js +347 -0
- package/dist/tools/pages/schemas.js.map +1 -1
- package/dist/tools/shared-schemas.d.ts.map +1 -1
- package/dist/tools/shared-schemas.js +26 -11
- package/dist/tools/shared-schemas.js.map +1 -1
- package/dist/tools/sources/builders.d.ts.map +1 -1
- package/dist/tools/sources/builders.js +64 -6
- package/dist/tools/sources/builders.js.map +1 -1
- package/dist/tools/sources/handlers-bind.d.ts +13 -1
- package/dist/tools/sources/handlers-bind.d.ts.map +1 -1
- package/dist/tools/sources/handlers-bind.js +219 -5
- package/dist/tools/sources/handlers-bind.js.map +1 -1
- package/dist/tools/sources/handlers.d.ts +3 -0
- package/dist/tools/sources/handlers.d.ts.map +1 -1
- package/dist/tools/sources/handlers.js +45 -8
- package/dist/tools/sources/handlers.js.map +1 -1
- package/dist/tools/sparse-fields.d.ts +23 -0
- package/dist/tools/sparse-fields.d.ts.map +1 -1
- package/dist/tools/sparse-fields.js +29 -0
- package/dist/tools/sparse-fields.js.map +1 -1
- package/dist/tools/sublayout/builders.d.ts +23 -0
- package/dist/tools/sublayout/builders.d.ts.map +1 -0
- package/dist/tools/sublayout/builders.js +54 -0
- package/dist/tools/sublayout/builders.js.map +1 -0
- package/dist/tools/sublayout/index.d.ts +13 -0
- package/dist/tools/sublayout/index.d.ts.map +1 -0
- package/dist/tools/sublayout/index.js +13 -0
- package/dist/tools/sublayout/index.js.map +1 -0
- package/dist/tools/sublayout/inspect-sublayout-handler.d.ts +95 -0
- package/dist/tools/sublayout/inspect-sublayout-handler.d.ts.map +1 -0
- package/dist/tools/sublayout/inspect-sublayout-handler.js +181 -0
- package/dist/tools/sublayout/inspect-sublayout-handler.js.map +1 -0
- package/dist/tools/tool-builder/results.d.ts +31 -0
- package/dist/tools/tool-builder/results.d.ts.map +1 -1
- package/dist/tools/tool-builder/results.js +95 -4
- package/dist/tools/tool-builder/results.js.map +1 -1
- 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 +7 -3
- package/skills/yt-builder-mcp/SKILL.md +157 -88
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `uninstall-skill` — the inverse of {@link installSkill}.
|
|
3
|
+
*
|
|
4
|
+
* Removes the bundled skill directory from the user's agent-skill folder
|
|
5
|
+
* (`~/.claude/skills/yt-builder-mcp/`, plus the legacy
|
|
6
|
+
* `~/.claude/skills/yootheme-builder/`) and strips the marker block this
|
|
7
|
+
* package appended to `~/AGENTS.md`.
|
|
8
|
+
*
|
|
9
|
+
* Idempotent + non-destructive to the user's own content: only OUR
|
|
10
|
+
* `## YT Builder MCP` marker section is removed from AGENTS.md; every
|
|
11
|
+
* other line the user wrote is preserved verbatim.
|
|
12
|
+
*
|
|
13
|
+
* @license MIT
|
|
14
|
+
*/
|
|
15
|
+
import { existsSync, readFileSync, rmSync, writeFileSync, } from 'node:fs';
|
|
16
|
+
import { homedir } from 'node:os';
|
|
17
|
+
import { join } from 'node:path';
|
|
18
|
+
import { MARKER_LINE } from './install-skill.js';
|
|
19
|
+
/** Skill folder names this package has ever installed (canonical first). */
|
|
20
|
+
const SKILL_DIR_NAMES = ['yt-builder-mcp', 'yootheme-builder'];
|
|
21
|
+
function resolveSkillsDir(opts) {
|
|
22
|
+
return opts.targetSkillsDir ?? join(homedir(), '.claude', 'skills');
|
|
23
|
+
}
|
|
24
|
+
function resolveAgentsFile(opts) {
|
|
25
|
+
return opts.targetAgentsFile ?? join(homedir(), 'AGENTS.md');
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* True when a skill folder OR an AGENTS.md marker is present — used by
|
|
29
|
+
* the uninstall CLI to decide whether to surface the "remove skill"
|
|
30
|
+
* checkbox at all.
|
|
31
|
+
*/
|
|
32
|
+
export function isSkillInstalled(opts = {}) {
|
|
33
|
+
const skillsDir = resolveSkillsDir(opts);
|
|
34
|
+
for (const name of SKILL_DIR_NAMES) {
|
|
35
|
+
if (existsSync(join(skillsDir, name)))
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
const agentsFile = resolveAgentsFile(opts);
|
|
39
|
+
if (existsSync(agentsFile)) {
|
|
40
|
+
try {
|
|
41
|
+
if (readFileSync(agentsFile, 'utf-8').includes(MARKER_LINE))
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
// unreadable → treat as not-installed
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Strip our `## YT Builder MCP` marker section from an AGENTS.md body.
|
|
52
|
+
*
|
|
53
|
+
* The block installSkill writes is:
|
|
54
|
+
*
|
|
55
|
+
* \n\n## YT Builder MCP\n\n<MARKER_LINE>\n<a few prose lines>\n
|
|
56
|
+
*
|
|
57
|
+
* It is always appended at EOF. We locate the `## YT Builder MCP`
|
|
58
|
+
* heading whose following lines contain {@link MARKER_LINE}, then remove
|
|
59
|
+
* from that heading (collapsing the blank lines that preceded it) up to
|
|
60
|
+
* the next top-level/section heading (`# ` or `## `) or EOF. Returns the
|
|
61
|
+
* cleaned body, or `null` when no marker block was found (no-op).
|
|
62
|
+
*/
|
|
63
|
+
export function stripMarkerBlock(body) {
|
|
64
|
+
if (!body.includes(MARKER_LINE))
|
|
65
|
+
return null;
|
|
66
|
+
const lines = body.split('\n');
|
|
67
|
+
// Find the `## YT Builder MCP` heading that owns the marker line.
|
|
68
|
+
let headingIdx = -1;
|
|
69
|
+
for (let i = 0; i < lines.length; i++) {
|
|
70
|
+
if (lines[i].trim() === '## YT Builder MCP') {
|
|
71
|
+
// Confirm the marker line appears before the next heading.
|
|
72
|
+
for (let j = i + 1; j < lines.length; j++) {
|
|
73
|
+
const t = lines[j];
|
|
74
|
+
if (/^#{1,2}\s/.test(t))
|
|
75
|
+
break;
|
|
76
|
+
if (t.includes(MARKER_LINE)) {
|
|
77
|
+
headingIdx = i;
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (headingIdx !== -1)
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
// Fallback: marker present but no recognised heading (hand-edited).
|
|
86
|
+
// Remove just the marker line + its immediate prose paragraph.
|
|
87
|
+
if (headingIdx === -1) {
|
|
88
|
+
const filtered = lines.filter((l) => !l.includes(MARKER_LINE));
|
|
89
|
+
const cleaned = filtered.join('\n');
|
|
90
|
+
return cleaned === body ? null : cleaned;
|
|
91
|
+
}
|
|
92
|
+
// Walk to the end of the block: next `# `/`## ` heading or EOF.
|
|
93
|
+
let endIdx = lines.length;
|
|
94
|
+
for (let j = headingIdx + 1; j < lines.length; j++) {
|
|
95
|
+
if (/^#{1,2}\s/.test(lines[j])) {
|
|
96
|
+
endIdx = j;
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
// Collapse trailing blank lines that immediately preceded the heading
|
|
101
|
+
// so we don't leave a widening gap.
|
|
102
|
+
let startIdx = headingIdx;
|
|
103
|
+
while (startIdx > 0 && lines[startIdx - 1].trim() === '') {
|
|
104
|
+
startIdx--;
|
|
105
|
+
}
|
|
106
|
+
const kept = [...lines.slice(0, startIdx), ...lines.slice(endIdx)];
|
|
107
|
+
let cleaned = kept.join('\n');
|
|
108
|
+
// Normalise trailing whitespace: collapse 3+ newlines, ensure single
|
|
109
|
+
// trailing newline when there is content.
|
|
110
|
+
cleaned = cleaned.replace(/\n{3,}/g, '\n\n').replace(/\n*$/, '');
|
|
111
|
+
if (cleaned !== '')
|
|
112
|
+
cleaned += '\n';
|
|
113
|
+
return cleaned;
|
|
114
|
+
}
|
|
115
|
+
export async function uninstallSkill(options = {}) {
|
|
116
|
+
const skillsDir = resolveSkillsDir(options);
|
|
117
|
+
const agentsFile = resolveAgentsFile(options);
|
|
118
|
+
const skillTargetDir = join(skillsDir, SKILL_DIR_NAMES[0]);
|
|
119
|
+
// 1. Remove skill directories (canonical + legacy).
|
|
120
|
+
let skillRemoved = false;
|
|
121
|
+
for (const name of SKILL_DIR_NAMES) {
|
|
122
|
+
const dir = join(skillsDir, name);
|
|
123
|
+
if (existsSync(dir)) {
|
|
124
|
+
rmSync(dir, { recursive: true, force: true });
|
|
125
|
+
skillRemoved = true;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// 2. Strip the marker block from AGENTS.md.
|
|
129
|
+
let markerRemoved = false;
|
|
130
|
+
if (existsSync(agentsFile)) {
|
|
131
|
+
let body = '';
|
|
132
|
+
try {
|
|
133
|
+
body = readFileSync(agentsFile, 'utf-8');
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
body = '';
|
|
137
|
+
}
|
|
138
|
+
const cleaned = stripMarkerBlock(body);
|
|
139
|
+
if (cleaned !== null) {
|
|
140
|
+
writeFileSync(agentsFile, cleaned, 'utf-8');
|
|
141
|
+
markerRemoved = true;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return { skillRemoved, skillTargetDir, markerRemoved, agentsFile };
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=uninstall-skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall-skill.js","sourceRoot":"","sources":["../src/uninstall-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACH,UAAU,EACV,YAAY,EACZ,MAAM,EACN,aAAa,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,4EAA4E;AAC5E,MAAM,eAAe,GAAsB,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;AAoBlF,SAAS,gBAAgB,CAAC,IAA2B;IACjD,OAAO,IAAI,CAAC,eAAe,IAAI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AA4C;IAC5C,IAAI,aAAa,GAAG,KAAK,CAAC;IAC1B,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACzB,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,IAAI,CAAC;YACD,IAAI,GAAG,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAC7C,CAAC;QAAC,MAAM,CAAC;YACL,IAAI,GAAG,EAAE,CAAC;QACd,CAAC;QACD,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACnB,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC5C,aAAa,GAAG,IAAI,CAAC;QACzB,CAAC;IACL,CAAC;IAED,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Uninstall orchestration core — the inverse of the setup wizard.
|
|
3
|
+
*
|
|
4
|
+
* `setup` writes the yt-builder-mcp MCP server entry into one or more AI
|
|
5
|
+
* clients' config files (and optionally installs a skill). `uninstall`
|
|
6
|
+
* reverses that: it detects which clients currently carry our entry,
|
|
7
|
+
* removes the chosen ones, and optionally removes the installed skill.
|
|
8
|
+
*
|
|
9
|
+
* This module is the pure, testable core: detection + removal across the
|
|
10
|
+
* client registry, with every side effect injected via {@link
|
|
11
|
+
* UninstallDeps} so unit tests touch no real disk. The interactive clack
|
|
12
|
+
* checklist + the CLI flag-parsing live in `setup-cli.ts` and call into
|
|
13
|
+
* `detectInstalledClients` / `runUninstall` here.
|
|
14
|
+
*
|
|
15
|
+
* @license MIT
|
|
16
|
+
*/
|
|
17
|
+
import { type ClientWriter } from './clients/index.js';
|
|
18
|
+
import { isSkillInstalled as defaultIsSkillInstalled, uninstallSkill as defaultUninstallSkill, type UninstallSkillResult } from './uninstall-skill.js';
|
|
19
|
+
/** A client that currently carries a yt-builder-mcp server entry. */
|
|
20
|
+
export interface InstalledClient {
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly label: string;
|
|
23
|
+
readonly configPath: string;
|
|
24
|
+
/** The server keys/names found (e.g. `['yt-builder-mcp']`). */
|
|
25
|
+
readonly matchedKeys: readonly string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Probe every client in `clients` and return those whose config carries
|
|
29
|
+
* our server entry. Detection is parallel — the probes are independent
|
|
30
|
+
* file reads.
|
|
31
|
+
*/
|
|
32
|
+
export declare function detectInstalledClients(clients?: readonly ClientWriter[]): Promise<InstalledClient[]>;
|
|
33
|
+
/** What the caller asked to uninstall. */
|
|
34
|
+
export interface UninstallSelection {
|
|
35
|
+
/** Client ids to remove our entry from. */
|
|
36
|
+
readonly clientIds: readonly string[];
|
|
37
|
+
/** Also remove the installed skill (+ AGENTS.md marker)? */
|
|
38
|
+
readonly removeSkill: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** Per-client outcome of a removal. */
|
|
41
|
+
export interface ClientUninstallResult {
|
|
42
|
+
readonly id: string;
|
|
43
|
+
readonly label: string;
|
|
44
|
+
readonly configPath: string;
|
|
45
|
+
/** True when an entry was actually removed (false on no-op or error). */
|
|
46
|
+
readonly removed: boolean;
|
|
47
|
+
/** The keys removed (empty on no-op / error). */
|
|
48
|
+
readonly removedKeys: readonly string[];
|
|
49
|
+
/** Populated when removal threw. */
|
|
50
|
+
readonly error?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface UninstallResult {
|
|
53
|
+
readonly clientResults: readonly ClientUninstallResult[];
|
|
54
|
+
/** Present only when `removeSkill` was requested. */
|
|
55
|
+
readonly skillResult?: UninstallSkillResult;
|
|
56
|
+
}
|
|
57
|
+
/** Injectable side effects so tests run without touching disk. */
|
|
58
|
+
export interface UninstallDeps {
|
|
59
|
+
/** Registry to resolve `clientIds` against. */
|
|
60
|
+
readonly clients: readonly ClientWriter[];
|
|
61
|
+
readonly uninstallSkill: typeof defaultUninstallSkill;
|
|
62
|
+
readonly isSkillInstalled: typeof defaultIsSkillInstalled;
|
|
63
|
+
}
|
|
64
|
+
export declare const DEFAULT_UNINSTALL_DEPS: UninstallDeps;
|
|
65
|
+
/**
|
|
66
|
+
* Execute an uninstall. Removes our server entry from each selected,
|
|
67
|
+
* KNOWN client id (unknown ids are silently skipped) and — when
|
|
68
|
+
* `removeSkill` is set — removes the installed skill. Each client removal
|
|
69
|
+
* is isolated: a failure on one is captured into its result and does not
|
|
70
|
+
* abort the others (so a partial uninstall still cleans what it can).
|
|
71
|
+
*/
|
|
72
|
+
export declare function runUninstall(selection: UninstallSelection, deps?: UninstallDeps): Promise<UninstallResult>;
|
|
73
|
+
//# sourceMappingURL=uninstall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../src/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EACH,gBAAgB,IAAI,uBAAuB,EAC3C,cAAc,IAAI,qBAAqB,EACvC,KAAK,oBAAoB,EAC5B,MAAM,sBAAsB,CAAC;AAE9B,qEAAqE;AACrE,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CACxC,OAAO,GAAE,SAAS,YAAY,EAAgB,GAC/C,OAAO,CAAC,eAAe,EAAE,CAAC,CAY5B;AAED,0CAA0C;AAC1C,MAAM,WAAW,kBAAkB;IAC/B,2CAA2C;IAC3C,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,4DAA4D;IAC5D,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CACjC;AAED,uCAAuC;AACvC,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,iDAAiD;IACjD,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,oCAAoC;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,aAAa,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACzD,qDAAqD;IACrD,QAAQ,CAAC,WAAW,CAAC,EAAE,oBAAoB,CAAC;CAC/C;AAED,kEAAkE;AAClE,MAAM,WAAW,aAAa;IAC1B,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IAC1C,QAAQ,CAAC,cAAc,EAAE,OAAO,qBAAqB,CAAC;IACtD,QAAQ,CAAC,gBAAgB,EAAE,OAAO,uBAAuB,CAAC;CAC7D;AAED,eAAO,MAAM,sBAAsB,EAAE,aAIpC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,YAAY,CAC9B,SAAS,EAAE,kBAAkB,EAC7B,IAAI,GAAE,aAAsC,GAC7C,OAAO,CAAC,eAAe,CAAC,CAmC1B"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Uninstall orchestration core — the inverse of the setup wizard.
|
|
3
|
+
*
|
|
4
|
+
* `setup` writes the yt-builder-mcp MCP server entry into one or more AI
|
|
5
|
+
* clients' config files (and optionally installs a skill). `uninstall`
|
|
6
|
+
* reverses that: it detects which clients currently carry our entry,
|
|
7
|
+
* removes the chosen ones, and optionally removes the installed skill.
|
|
8
|
+
*
|
|
9
|
+
* This module is the pure, testable core: detection + removal across the
|
|
10
|
+
* client registry, with every side effect injected via {@link
|
|
11
|
+
* UninstallDeps} so unit tests touch no real disk. The interactive clack
|
|
12
|
+
* checklist + the CLI flag-parsing live in `setup-cli.ts` and call into
|
|
13
|
+
* `detectInstalledClients` / `runUninstall` here.
|
|
14
|
+
*
|
|
15
|
+
* @license MIT
|
|
16
|
+
*/
|
|
17
|
+
import { ALL_CLIENTS } from './clients/index.js';
|
|
18
|
+
import { isSkillInstalled as defaultIsSkillInstalled, uninstallSkill as defaultUninstallSkill, } from './uninstall-skill.js';
|
|
19
|
+
/**
|
|
20
|
+
* Probe every client in `clients` and return those whose config carries
|
|
21
|
+
* our server entry. Detection is parallel — the probes are independent
|
|
22
|
+
* file reads.
|
|
23
|
+
*/
|
|
24
|
+
export async function detectInstalledClients(clients = ALL_CLIENTS) {
|
|
25
|
+
const detections = await Promise.all(clients.map(async (c) => ({ client: c, det: await c.detect() })));
|
|
26
|
+
return detections
|
|
27
|
+
.filter((d) => d.det.present)
|
|
28
|
+
.map((d) => ({
|
|
29
|
+
id: d.client.id,
|
|
30
|
+
label: d.client.label,
|
|
31
|
+
configPath: d.det.configPath,
|
|
32
|
+
matchedKeys: d.det.matchedKeys,
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
export const DEFAULT_UNINSTALL_DEPS = {
|
|
36
|
+
clients: ALL_CLIENTS,
|
|
37
|
+
uninstallSkill: defaultUninstallSkill,
|
|
38
|
+
isSkillInstalled: defaultIsSkillInstalled,
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Execute an uninstall. Removes our server entry from each selected,
|
|
42
|
+
* KNOWN client id (unknown ids are silently skipped) and — when
|
|
43
|
+
* `removeSkill` is set — removes the installed skill. Each client removal
|
|
44
|
+
* is isolated: a failure on one is captured into its result and does not
|
|
45
|
+
* abort the others (so a partial uninstall still cleans what it can).
|
|
46
|
+
*/
|
|
47
|
+
export async function runUninstall(selection, deps = DEFAULT_UNINSTALL_DEPS) {
|
|
48
|
+
const byId = new Map(deps.clients.map((c) => [c.id, c]));
|
|
49
|
+
const clientResults = [];
|
|
50
|
+
for (const id of selection.clientIds) {
|
|
51
|
+
const client = byId.get(id);
|
|
52
|
+
if (client === undefined)
|
|
53
|
+
continue; // unknown id — skip
|
|
54
|
+
try {
|
|
55
|
+
const res = await client.remove();
|
|
56
|
+
clientResults.push({
|
|
57
|
+
id: client.id,
|
|
58
|
+
label: client.label,
|
|
59
|
+
configPath: res.configPath,
|
|
60
|
+
removed: res.removed,
|
|
61
|
+
removedKeys: res.removedKeys,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
catch (e) {
|
|
65
|
+
const error = e instanceof Error ? e.message : String(e);
|
|
66
|
+
clientResults.push({
|
|
67
|
+
id: client.id,
|
|
68
|
+
label: client.label,
|
|
69
|
+
configPath: client.configPath(),
|
|
70
|
+
removed: false,
|
|
71
|
+
removedKeys: [],
|
|
72
|
+
error,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
let skillResult;
|
|
77
|
+
if (selection.removeSkill) {
|
|
78
|
+
skillResult = await deps.uninstallSkill();
|
|
79
|
+
}
|
|
80
|
+
return { clientResults, ...(skillResult !== undefined ? { skillResult } : {}) };
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=uninstall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../src/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,WAAW,EAAqB,MAAM,oBAAoB,CAAC;AACpE,OAAO,EACH,gBAAgB,IAAI,uBAAuB,EAC3C,cAAc,IAAI,qBAAqB,GAE1C,MAAM,sBAAsB,CAAC;AAW9B;;;;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theme Pro (unofficial)",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.3.0",
|
|
6
6
|
"description": "Drive your YOOtheme Pro Page Builder programmatically from Claude, Cursor, Codex, Gemini and 5 other MCP-capable AI assistants — read layouts, edit settings, add elements, bind dynamic sources. Works on WordPress and Joomla 5/6. Built for YOOtheme Pro 4.0+. Independent third-party project, not affiliated with YOOtheme GmbH.",
|
|
7
7
|
"long_description": "YT Builder MCP gives AI assistants a typed, scoped, and idempotent surface for your YOOtheme Pro Page Builder, on either WordPress or Joomla 5/6. Tools cover page discovery, layout inspection, element CRUD, source binding, and diagnostics. Bearer auth, optimistic locking via ETag, scope hierarchy (read < write < admin), and structured-error responses keep the agent safe and the workflow correct on first try. Independent third-party project — YOOtheme® is a registered trademark of YOOtheme GmbH (yootheme.com); YT Builder MCP is built by WootsUp (getimo productions) and is not affiliated with, endorsed by, or sponsored by YOOtheme.",
|
|
8
8
|
"icon": "icon.png",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"${__dirname}/dist/index.js"
|
|
40
40
|
],
|
|
41
41
|
"env": {
|
|
42
|
-
"YTB_MCP_SITES_FILE": "${user_config.YTB_MCP_SITES_FILE}",
|
|
43
42
|
"YTB_MCP_SITE_URL": "${user_config.YTB_MCP_SITE_URL}",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
43
|
+
"YTB_MCP_BEARER_TOKEN": "${user_config.YTB_MCP_BEARER_TOKEN}",
|
|
44
|
+
"YTB_MCP_PROFILE": "${user_config.YTB_MCP_PROFILE}",
|
|
45
|
+
"YTB_MCP_SITES_FILE": "${user_config.YTB_MCP_SITES_FILE}"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
},
|
|
@@ -60,17 +60,17 @@
|
|
|
60
60
|
"required": false,
|
|
61
61
|
"sensitive": true
|
|
62
62
|
},
|
|
63
|
-
"
|
|
63
|
+
"YTB_MCP_PROFILE": {
|
|
64
64
|
"type": "string",
|
|
65
|
-
"title": "
|
|
66
|
-
"description": "
|
|
65
|
+
"title": "Profile name (Optional for Single Site Configuration)",
|
|
66
|
+
"description": "Optional label for this site profile. Defaults to 'default'. With a Sites file, it selects which configured site is active; switch any time via yootheme_builder_use_site.",
|
|
67
67
|
"required": false,
|
|
68
|
-
"default": "
|
|
68
|
+
"default": "default"
|
|
69
69
|
},
|
|
70
70
|
"YTB_MCP_SITES_FILE": {
|
|
71
71
|
"type": "string",
|
|
72
|
-
"title": "Sites file (
|
|
73
|
-
"description": "Only for managing several sites from one install (agencies). Path to a sites.json, e.g. /Users/you/.config/yt-builder-mcp/sites.json. Create and fill it with: npx -y @wootsup/yt-builder-mcp add-site (do not hand-edit). When set, the
|
|
72
|
+
"title": "Sites file (for Multi-Site Configurations)",
|
|
73
|
+
"description": "Only for managing several sites from one install (agencies). Path to a sites.json, e.g. /Users/you/.config/yt-builder-mcp/sites.json. Create and fill it with: npx -y @wootsup/yt-builder-mcp add-site (do not hand-edit). When set, the single-site YTB_MCP_SITE_URL + token fields above are ignored. Most people leave this empty.",
|
|
74
74
|
"required": false
|
|
75
75
|
}
|
|
76
76
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wootsup/yt-builder-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "YT Builder MCP — drive your page builder from Claude, Cursor, Codex, Gemini and 5 other MCP-capable AI assistants. Built for YOOtheme Pro 4.0+. Independent third-party project, not affiliated with YOOtheme GmbH.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"node": ">=18.17.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
|
+
"prepublishOnly": "node -e \"if (process.env.RELEASE_PHP_PUBLISH !== '1') { console.error('Manual npm publish is no longer supported. Use: php scripts/release.php release yt-builder-mcp <bump> followed by php scripts/release.php push-tag yt-builder-mcp <version>, which triggers the GitHub Actions publish workflow (.github/workflows/yt-builder-mcp-publish.yml). Set RELEASE_PHP_PUBLISH=1 only if you know you are running from that workflow.'); process.exit(1); }\"",
|
|
51
52
|
"build": "tsc",
|
|
52
|
-
"prepublishOnly": "npm run build",
|
|
53
53
|
"dev": "tsc --watch",
|
|
54
54
|
"test": "vitest run",
|
|
55
55
|
"test:watch": "vitest",
|
|
@@ -57,10 +57,13 @@
|
|
|
57
57
|
"test:grep-gate": "vitest run tests/auth/secrets-grep-gate.test.ts",
|
|
58
58
|
"typecheck": "tsc --noEmit",
|
|
59
59
|
"lint": "eslint src --max-warnings=0",
|
|
60
|
+
"bump": "node ./scripts/bump-version.mjs",
|
|
60
61
|
"setup": "node ./bin/yt-builder-mcp.js setup",
|
|
61
62
|
"install-skill": "node ./bin/yt-builder-mcp.js install-skill",
|
|
62
63
|
"build:dxt": "node ./scripts/build-dxt.js",
|
|
63
|
-
"extract-tools": "node ./scripts/extract-tools.mjs"
|
|
64
|
+
"extract-tools": "node ./scripts/extract-tools.mjs",
|
|
65
|
+
"export:catalog": "node ./scripts/export-catalog.mjs",
|
|
66
|
+
"sync:catalog": "node ./scripts/sync-catalog.mjs"
|
|
64
67
|
},
|
|
65
68
|
"dependencies": {
|
|
66
69
|
"@getimo/mcp-toolkit": "^1.1.1",
|
|
@@ -76,6 +79,7 @@
|
|
|
76
79
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
77
80
|
"@typescript-eslint/parser": "^8.0.0",
|
|
78
81
|
"@vitest/coverage-v8": "^1.4.0",
|
|
82
|
+
"esbuild": "^0.21.5",
|
|
79
83
|
"eslint": "^9.0.0",
|
|
80
84
|
"typescript": "^5.4.0",
|
|
81
85
|
"typescript-eslint": "^8.0.0",
|