autodev-cli 1.4.148 → 1.4.150
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/media/gimp/LICENSE +674 -0
- package/media/gimp/gimp_mcp_server.py +267 -0
- package/out/commands/mcp.js +55 -9
- package/out/commands/mcp.js.map +1 -1
- package/out/core/gimpPluginInstall.d.ts +41 -0
- package/out/core/gimpPluginInstall.js +224 -0
- package/out/core/gimpPluginInstall.js.map +1 -0
- package/out/core/mcpCatalog.d.ts +21 -4
- package/out/core/mcpCatalog.js +45 -30
- package/out/core/mcpCatalog.js.map +1 -1
- package/out/core/mcpCatalogMigrate.js +21 -9
- package/out/core/mcpCatalogMigrate.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// gimpPluginInstall — drop the vendored AUTO-START GIMP MCP plugin into the
|
|
4
|
+
// correct GIMP 3.x user plug-ins folder so the socket bridge opens on GIMP
|
|
5
|
+
// launch (no manual copy, no menu click).
|
|
6
|
+
//
|
|
7
|
+
// GROUNDED RULES (see AutoDev research):
|
|
8
|
+
// - GIMP 3.x user config is MINOR-versioned: GIMP 3.2 → .../GIMP/3.2/ (NOT 3.0).
|
|
9
|
+
// Bases: linux $XDG_CONFIG_HOME/GIMP or ~/.config/GIMP; win32 %APPDATA%\GIMP;
|
|
10
|
+
// darwin ~/Library/Application Support/GIMP. Honor GIMP3_DIRECTORY (overrides
|
|
11
|
+
// the WHOLE versioned dir). Glob GIMP/3.* and pick the HIGHEST minor; if none
|
|
12
|
+
// exists, create 3.0 and warn (user should launch GIMP once).
|
|
13
|
+
// - GIMP 3.x layout: plug-ins/gimp_mcp_server/gimp_mcp_server.py — the .py MUST
|
|
14
|
+
// sit in a sub-folder whose name == the .py basename (a loose .py is ignored).
|
|
15
|
+
// On non-Windows the .py must be executable (0o755).
|
|
16
|
+
// - Windows Store (MSIX) GIMP reads the REAL %APPDATA%\GIMP\<ver>. As a safety
|
|
17
|
+
// net we ALSO write the virtualized path when a package dir exists:
|
|
18
|
+
// %LOCALAPPDATA%\Packages\GIMP.<...>_*\LocalCache\Roaming\GIMP\<ver>\plug-ins.
|
|
19
|
+
//
|
|
20
|
+
// Everything is dependency-injected (platform/env/homedir/fileExists/listDir/
|
|
21
|
+
// mkdirp/writeFile/chmod/copyFile/readPluginSource/detectGimp) so the resolver is
|
|
22
|
+
// unit-testable without a real GIMP or filesystem.
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
27
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
28
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
29
|
+
}
|
|
30
|
+
Object.defineProperty(o, k2, desc);
|
|
31
|
+
}) : (function(o, m, k, k2) {
|
|
32
|
+
if (k2 === undefined) k2 = k;
|
|
33
|
+
o[k2] = m[k];
|
|
34
|
+
}));
|
|
35
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
36
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
37
|
+
}) : function(o, v) {
|
|
38
|
+
o["default"] = v;
|
|
39
|
+
});
|
|
40
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
41
|
+
var ownKeys = function(o) {
|
|
42
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
43
|
+
var ar = [];
|
|
44
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
45
|
+
return ar;
|
|
46
|
+
};
|
|
47
|
+
return ownKeys(o);
|
|
48
|
+
};
|
|
49
|
+
return function (mod) {
|
|
50
|
+
if (mod && mod.__esModule) return mod;
|
|
51
|
+
var result = {};
|
|
52
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
53
|
+
__setModuleDefault(result, mod);
|
|
54
|
+
return result;
|
|
55
|
+
};
|
|
56
|
+
})();
|
|
57
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
+
exports.vendoredPluginSourcePath = vendoredPluginSourcePath;
|
|
59
|
+
exports.gimpMajorFromPath = gimpMajorFromPath;
|
|
60
|
+
exports.installGimpPlugin = installGimpPlugin;
|
|
61
|
+
const fs = __importStar(require("fs"));
|
|
62
|
+
const path = __importStar(require("path"));
|
|
63
|
+
const os = __importStar(require("os"));
|
|
64
|
+
const binDetect_1 = require("./binDetect");
|
|
65
|
+
/** Absolute path to the vendored auto-start plugin shipped in the tarball. */
|
|
66
|
+
function vendoredPluginSourcePath() {
|
|
67
|
+
// Compiled to out/core/gimpPluginInstall.js → package root is ../../ .
|
|
68
|
+
return path.join(__dirname, '..', '..', 'media', 'gimp', 'gimp_mcp_server.py');
|
|
69
|
+
}
|
|
70
|
+
function realDeps() {
|
|
71
|
+
return {
|
|
72
|
+
platform: process.platform,
|
|
73
|
+
env: process.env,
|
|
74
|
+
homedir: os.homedir,
|
|
75
|
+
fileExists: (p) => { try {
|
|
76
|
+
return fs.existsSync(p);
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return false;
|
|
80
|
+
} },
|
|
81
|
+
listDir: (p) => { try {
|
|
82
|
+
return fs.readdirSync(p);
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return [];
|
|
86
|
+
} },
|
|
87
|
+
mkdirp: (p) => { fs.mkdirSync(p, { recursive: true }); },
|
|
88
|
+
writeFile: (p, data) => { fs.writeFileSync(p, data); },
|
|
89
|
+
chmod: (p, mode) => { try {
|
|
90
|
+
fs.chmodSync(p, mode);
|
|
91
|
+
}
|
|
92
|
+
catch { /* non-POSIX fs */ } },
|
|
93
|
+
copyFile: (src, dst) => { fs.copyFileSync(src, dst); },
|
|
94
|
+
readPluginSource: () => fs.readFileSync(vendoredPluginSourcePath(), 'utf8'),
|
|
95
|
+
detectGimp: () => (0, binDetect_1.detectApp)('gimp'),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/** GIMP user-config BASE dir (the folder that CONTAINS the 3.x version dirs). */
|
|
99
|
+
function gimpConfigBase(d) {
|
|
100
|
+
const home = d.homedir();
|
|
101
|
+
if (d.platform === 'win32') {
|
|
102
|
+
const appData = d.env.APPDATA || path.join(home, 'AppData', 'Roaming');
|
|
103
|
+
return path.join(appData, 'GIMP');
|
|
104
|
+
}
|
|
105
|
+
if (d.platform === 'darwin') {
|
|
106
|
+
return path.join(home, 'Library', 'Application Support', 'GIMP');
|
|
107
|
+
}
|
|
108
|
+
const xdg = d.env.XDG_CONFIG_HOME && d.env.XDG_CONFIG_HOME.trim();
|
|
109
|
+
const cfg = xdg ? xdg : path.join(home, '.config');
|
|
110
|
+
return path.join(cfg, 'GIMP');
|
|
111
|
+
}
|
|
112
|
+
/** Parse the numeric minor from a `3.<minor>` dir name; null if not `3.*`. */
|
|
113
|
+
function minorOf(name) {
|
|
114
|
+
const m = /^3\.(\d+)$/.exec(name);
|
|
115
|
+
return m ? parseInt(m[1], 10) : null;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Pick the HIGHEST-minor `3.*` version dir under base. Returns the chosen
|
|
119
|
+
* version string and whether it already existed. When none exist, defaults to
|
|
120
|
+
* "3.0" (created + warned by the caller).
|
|
121
|
+
*/
|
|
122
|
+
function chooseVersion(base, d) {
|
|
123
|
+
const kids = d.listDir(base)
|
|
124
|
+
.map((n) => ({ name: n, minor: minorOf(n) }))
|
|
125
|
+
.filter((x) => x.minor !== null);
|
|
126
|
+
if (kids.length === 0) {
|
|
127
|
+
return { version: '3.0', existed: false };
|
|
128
|
+
}
|
|
129
|
+
kids.sort((a, b) => b.minor - a.minor);
|
|
130
|
+
return { version: kids[0].name, existed: true };
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Windows Store virtualized fallback plug-ins dir(s) for a given version. Only
|
|
134
|
+
* returned when a `GIMP.*` package dir actually exists under %LOCALAPPDATA%\Packages.
|
|
135
|
+
*/
|
|
136
|
+
function storeVirtualizedPluginDirs(version, d) {
|
|
137
|
+
if (d.platform !== 'win32') {
|
|
138
|
+
return [];
|
|
139
|
+
}
|
|
140
|
+
const home = d.homedir();
|
|
141
|
+
const localAppData = d.env.LOCALAPPDATA || path.join(home, 'AppData', 'Local');
|
|
142
|
+
const packagesDir = path.join(localAppData, 'Packages');
|
|
143
|
+
const pkgs = d.listDir(packagesDir).filter((n) => /^GIMP\./i.test(n));
|
|
144
|
+
return pkgs.map((pkg) => path.join(packagesDir, pkg, 'LocalCache', 'Roaming', 'GIMP', version, 'plug-ins'));
|
|
145
|
+
}
|
|
146
|
+
/** Extract the GIMP MAJOR version from a launcher path (e.g. gimp-2.10 → 2). */
|
|
147
|
+
function gimpMajorFromPath(p) {
|
|
148
|
+
if (!p) {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
const base = p.replace(/\\/g, '/').split('/').pop() || p;
|
|
152
|
+
const m = /gimp[-_]?(\d+)/i.exec(base);
|
|
153
|
+
return m ? parseInt(m[1], 10) : null;
|
|
154
|
+
}
|
|
155
|
+
/** Write the vendored plugin into one plug-ins dir (backing up any existing copy). */
|
|
156
|
+
function installInto(pluginsDir, source, d) {
|
|
157
|
+
const sub = path.join(pluginsDir, 'gimp_mcp_server');
|
|
158
|
+
const py = path.join(sub, 'gimp_mcp_server.py');
|
|
159
|
+
d.mkdirp(sub);
|
|
160
|
+
if (d.fileExists(py)) {
|
|
161
|
+
d.copyFile(py, py + '.bak');
|
|
162
|
+
}
|
|
163
|
+
d.writeFile(py, source);
|
|
164
|
+
if (d.platform !== 'win32') {
|
|
165
|
+
d.chmod(py, 0o755);
|
|
166
|
+
}
|
|
167
|
+
return py;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Install the auto-start GIMP MCP plugin. Resolves the target plug-ins dir(s)
|
|
171
|
+
* per-OS and writes the vendored plugin so GIMP opens the localhost:9876 socket
|
|
172
|
+
* on launch. Does NOT install when a clearly < 3 GIMP is the only one detected.
|
|
173
|
+
*/
|
|
174
|
+
function installGimpPlugin(opts, deps) {
|
|
175
|
+
const d = { ...realDeps(), ...deps };
|
|
176
|
+
const warnings = [];
|
|
177
|
+
// Gate: if a GIMP is detected and is clearly < 3, do not install.
|
|
178
|
+
const det = d.detectGimp();
|
|
179
|
+
const major = gimpMajorFromPath(det.path);
|
|
180
|
+
if (det.installed && major !== null && major < 3) {
|
|
181
|
+
warnings.push(`Detected GIMP ${major}.x at ${det.path}. GIMP MCP needs GIMP 3.x — ` +
|
|
182
|
+
'the auto-start plugin uses the GIMP 3.0 Python API and was NOT installed. ' +
|
|
183
|
+
'Install GIMP 3 and re-run.');
|
|
184
|
+
return { installed: false, paths: [], version: null, warnings };
|
|
185
|
+
}
|
|
186
|
+
const source = d.readPluginSource();
|
|
187
|
+
// Resolve the versioned config dir(s). GIMP3_DIRECTORY / opts.targetDir
|
|
188
|
+
// override the WHOLE versioned dir.
|
|
189
|
+
const override = (opts?.targetDir && opts.targetDir.trim()) || (d.env.GIMP3_DIRECTORY && d.env.GIMP3_DIRECTORY.trim());
|
|
190
|
+
const targets = [];
|
|
191
|
+
let version;
|
|
192
|
+
if (override) {
|
|
193
|
+
version = path.basename(override) || 'custom';
|
|
194
|
+
if (!d.fileExists(override)) {
|
|
195
|
+
warnings.push(`GIMP dir ${override} does not exist yet — creating it. Launch GIMP once so it initialises its config.`);
|
|
196
|
+
}
|
|
197
|
+
targets.push(path.join(override, 'plug-ins'));
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
const base = gimpConfigBase(d);
|
|
201
|
+
const chosen = chooseVersion(base, d);
|
|
202
|
+
version = chosen.version;
|
|
203
|
+
if (!chosen.existed) {
|
|
204
|
+
warnings.push(`No GIMP 3.x config dir found under ${base} — creating ${version}. ` +
|
|
205
|
+
'Launch GIMP 3 at least once (so it creates its real config dir), then re-run to be sure it lands in the right place.');
|
|
206
|
+
}
|
|
207
|
+
targets.push(path.join(base, version, 'plug-ins'));
|
|
208
|
+
// Windows Store virtualized safety net (only when a package dir exists).
|
|
209
|
+
for (const vdir of storeVirtualizedPluginDirs(version, d)) {
|
|
210
|
+
targets.push(vdir);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
const paths = [];
|
|
214
|
+
for (const pluginsDir of targets) {
|
|
215
|
+
try {
|
|
216
|
+
paths.push(installInto(pluginsDir, source, d));
|
|
217
|
+
}
|
|
218
|
+
catch (e) {
|
|
219
|
+
warnings.push(`Failed to write plugin into ${pluginsDir}: ${e.message}`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return { installed: paths.length > 0, paths, version, warnings };
|
|
223
|
+
}
|
|
224
|
+
//# sourceMappingURL=gimpPluginInstall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gimpPluginInstall.js","sourceRoot":"","sources":["../../src/core/gimpPluginInstall.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,4EAA4E;AAC5E,2EAA2E;AAC3E,0CAA0C;AAC1C,EAAE;AACF,yCAAyC;AACzC,kFAAkF;AAClF,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AACjF,iEAAiE;AACjE,iFAAiF;AACjF,kFAAkF;AAClF,wDAAwD;AACxD,gFAAgF;AAChF,uEAAuE;AACvE,kFAAkF;AAClF,EAAE;AACF,8EAA8E;AAC9E,kFAAkF;AAClF,mDAAmD;AACnD,8EAA8E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyC9E,4DAGC;AAoED,8CAKC;AAkBD,8CAwDC;AA7LD,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AACzB,2CAA8D;AAmC9D,8E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UAAU,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AACnE,CAAC"}
|
package/out/core/mcpCatalog.d.ts
CHANGED
|
@@ -19,8 +19,24 @@ export interface McpCatalogEntry {
|
|
|
19
19
|
/** Caveats worth surfacing (port clashes, upstream bugs). */
|
|
20
20
|
notes: string[];
|
|
21
21
|
}
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Legacy placeholder the OLD GIMP stub carried until the user pointed it at a
|
|
24
|
+
* local checkout. No longer the default (see serverSpecFor/gimp below) — kept
|
|
25
|
+
* ONLY so the migration can recognise + upgrade pre-git-based stubs.
|
|
26
|
+
*/
|
|
23
27
|
export declare const GIMP_CLIENT_PLACEHOLDER = "<GIMP_MCP_CLIENT_PY>";
|
|
28
|
+
/**
|
|
29
|
+
* The GIMP MCP client, run straight from git by `uv` — no manual clone. Pinned
|
|
30
|
+
* to a specific upstream commit + `mcp==1.2.0` for reproducibility: `uv run`
|
|
31
|
+
* fetches this raw script, installs the PINNED mcp SDK, and launches the FastMCP
|
|
32
|
+
* stdio server (it lazily connects to GIMP on localhost:9876, so it starts even
|
|
33
|
+
* without GIMP running). Verified end-to-end (valid MCP initialize handshake,
|
|
34
|
+
* clean exit). `mcp==1.2.0` is load-bearing — current mcp releases break this
|
|
35
|
+
* client on a removed `description=` kwarg.
|
|
36
|
+
*/
|
|
37
|
+
export declare const GIMP_MCP_COMMIT = "49c46dd6146cb7393b42a9ecda630583b3117b33";
|
|
38
|
+
export declare const GIMP_MCP_CLIENT_URL = "https://raw.githubusercontent.com/libreearth/gimp-mcp/49c46dd6146cb7393b42a9ecda630583b3117b33/gimp_mcp_client.py";
|
|
39
|
+
export declare const GIMP_MCP_PIN = "mcp==1.2.0";
|
|
24
40
|
/** Per-platform install hint for the `uv`/`uvx` toolchain (never `pip install uv`). */
|
|
25
41
|
export declare function uvInstallHint(platform: NodeJS.Platform): string;
|
|
26
42
|
/** Per-platform install hint for Python 3. */
|
|
@@ -44,9 +60,10 @@ export declare const BLENDER_LAB_FROM = "git+https://projects.blender.org/lab/bl
|
|
|
44
60
|
* from Blender Lab" add-on. NEVER bare `uvx blender-mcp` (no --from) — that
|
|
45
61
|
* pulls the incompatible community PyPI package. (The exact launcher form is
|
|
46
62
|
* under review; the args are the load-bearing part the migration re-resolves.)
|
|
47
|
-
* - GIMP:
|
|
48
|
-
*
|
|
49
|
-
*
|
|
63
|
+
* - GIMP: the git-based client run by bare `uv` (`uv run --with mcp==1.2.0
|
|
64
|
+
* <raw github url>`) on every platform — runnable now, so written ENABLED
|
|
65
|
+
* (no disabled stub). `opts.gimpClientPath` is an OPTIONAL override for users
|
|
66
|
+
* who cloned the repo locally → `python[3] <that path>`. Still experimental.
|
|
50
67
|
*/
|
|
51
68
|
export declare function serverSpecFor(app: CreativeAppId, platform: NodeJS.Platform, opts?: {
|
|
52
69
|
gimpClientPath?: string;
|
package/out/core/mcpCatalog.js
CHANGED
|
@@ -10,15 +10,32 @@
|
|
|
10
10
|
// flagged experimental because upstream ships no packaged launcher — see below.
|
|
11
11
|
// ---------------------------------------------------------------------------
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.BLENDER_LAB_FROM = exports.GIMP_CLIENT_PLACEHOLDER = void 0;
|
|
13
|
+
exports.BLENDER_LAB_FROM = exports.GIMP_MCP_PIN = exports.GIMP_MCP_CLIENT_URL = exports.GIMP_MCP_COMMIT = exports.GIMP_CLIENT_PLACEHOLDER = void 0;
|
|
14
14
|
exports.uvInstallHint = uvInstallHint;
|
|
15
15
|
exports.pythonInstallHint = pythonInstallHint;
|
|
16
16
|
exports.gitInstallHint = gitInstallHint;
|
|
17
17
|
exports.serverSpecFor = serverSpecFor;
|
|
18
18
|
exports.getCatalog = getCatalog;
|
|
19
19
|
exports.catalogEntry = catalogEntry;
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Legacy placeholder the OLD GIMP stub carried until the user pointed it at a
|
|
22
|
+
* local checkout. No longer the default (see serverSpecFor/gimp below) — kept
|
|
23
|
+
* ONLY so the migration can recognise + upgrade pre-git-based stubs.
|
|
24
|
+
*/
|
|
21
25
|
exports.GIMP_CLIENT_PLACEHOLDER = '<GIMP_MCP_CLIENT_PY>';
|
|
26
|
+
/**
|
|
27
|
+
* The GIMP MCP client, run straight from git by `uv` — no manual clone. Pinned
|
|
28
|
+
* to a specific upstream commit + `mcp==1.2.0` for reproducibility: `uv run`
|
|
29
|
+
* fetches this raw script, installs the PINNED mcp SDK, and launches the FastMCP
|
|
30
|
+
* stdio server (it lazily connects to GIMP on localhost:9876, so it starts even
|
|
31
|
+
* without GIMP running). Verified end-to-end (valid MCP initialize handshake,
|
|
32
|
+
* clean exit). `mcp==1.2.0` is load-bearing — current mcp releases break this
|
|
33
|
+
* client on a removed `description=` kwarg.
|
|
34
|
+
*/
|
|
35
|
+
exports.GIMP_MCP_COMMIT = '49c46dd6146cb7393b42a9ecda630583b3117b33';
|
|
36
|
+
exports.GIMP_MCP_CLIENT_URL = `https://raw.githubusercontent.com/libreearth/gimp-mcp/${exports.GIMP_MCP_COMMIT}/gimp_mcp_client.py`;
|
|
37
|
+
exports.GIMP_MCP_PIN = 'mcp==1.2.0';
|
|
38
|
+
const GIMP_GIT_ARGS = ['run', '--with', exports.GIMP_MCP_PIN, exports.GIMP_MCP_CLIENT_URL];
|
|
22
39
|
/** Per-platform install hint for the `uv`/`uvx` toolchain (never `pip install uv`). */
|
|
23
40
|
function uvInstallHint(platform) {
|
|
24
41
|
if (platform === 'win32') {
|
|
@@ -67,9 +84,10 @@ const BLENDER_LAB_ARGS = ['--from', exports.BLENDER_LAB_FROM, '--with', 'mcp<2',
|
|
|
67
84
|
* from Blender Lab" add-on. NEVER bare `uvx blender-mcp` (no --from) — that
|
|
68
85
|
* pulls the incompatible community PyPI package. (The exact launcher form is
|
|
69
86
|
* under review; the args are the load-bearing part the migration re-resolves.)
|
|
70
|
-
* - GIMP:
|
|
71
|
-
*
|
|
72
|
-
*
|
|
87
|
+
* - GIMP: the git-based client run by bare `uv` (`uv run --with mcp==1.2.0
|
|
88
|
+
* <raw github url>`) on every platform — runnable now, so written ENABLED
|
|
89
|
+
* (no disabled stub). `opts.gimpClientPath` is an OPTIONAL override for users
|
|
90
|
+
* who cloned the repo locally → `python[3] <that path>`. Still experimental.
|
|
73
91
|
*/
|
|
74
92
|
function serverSpecFor(app, platform, opts) {
|
|
75
93
|
if (app === 'blender') {
|
|
@@ -77,16 +95,15 @@ function serverSpecFor(app, platform, opts) {
|
|
|
77
95
|
// official Blender Lab `--from git+…lab…` client.
|
|
78
96
|
return { command: 'uvx', args: [...BLENDER_LAB_ARGS] };
|
|
79
97
|
}
|
|
80
|
-
// gimp —
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
command: platform === 'win32' ? 'python' : 'python3',
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
};
|
|
98
|
+
// gimp — OPTIONAL local override: a user who cloned the repo points us at their
|
|
99
|
+
// gimp_mcp_client.py and we run it via python (enabled — it's a real path).
|
|
100
|
+
const local = opts?.gimpClientPath && opts.gimpClientPath.trim();
|
|
101
|
+
if (local && local !== exports.GIMP_CLIENT_PLACEHOLDER) {
|
|
102
|
+
return { command: platform === 'win32' ? 'python' : 'python3', args: [local] };
|
|
103
|
+
}
|
|
104
|
+
// Default: the git-based client, fetched + launched by `uv run`. Same on every
|
|
105
|
+
// platform. Enabled by default — it launches even without GIMP present.
|
|
106
|
+
return { command: 'uv', args: [...GIMP_GIT_ARGS] };
|
|
90
107
|
}
|
|
91
108
|
/** Build the catalog for a given platform (install hints are platform-specific). */
|
|
92
109
|
function getCatalog(platform) {
|
|
@@ -116,29 +133,27 @@ function getCatalog(platform) {
|
|
|
116
133
|
name: 'GIMP',
|
|
117
134
|
experimental: true,
|
|
118
135
|
serverName: 'gimp',
|
|
119
|
-
prerequisites: [{ id: '
|
|
136
|
+
prerequisites: [{ id: 'uv', installHint: uvInstallHint(platform) }],
|
|
120
137
|
postSetup: [
|
|
121
|
-
'
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
'Re-run `autodev mcp detect --enable gimp --gimp-client <path-to-gimp_mcp_client.py>` once you have the client',
|
|
138
|
+
'The MCP client runs from git automatically (uv fetches it) — no manual download of the client.',
|
|
139
|
+
`The GIMP-side AUTO-START plugin is installed for you into your GIMP 3.x plug-ins folder (${gimpPluginDir(platform)}) — just restart GIMP and the server auto-starts on localhost:9876 (no menu click). Re-run any time with: autodev mcp gimp-install-plugin`,
|
|
140
|
+
'Requires GIMP 3.0+ (the plugin uses the GIMP 3.0 API).',
|
|
141
|
+
"Port 9876 collides with Blender — don't run both MCP servers at once.",
|
|
126
142
|
],
|
|
127
143
|
notes: [
|
|
128
|
-
'Experimental prototype: upstream
|
|
129
|
-
|
|
144
|
+
'Experimental prototype: upstream is a prototype and its README contradicts its own code — expect rough edges.',
|
|
145
|
+
`The client is pinned to a specific commit (${exports.GIMP_MCP_COMMIT.slice(0, 7)}…) and ${exports.GIMP_MCP_PIN} for reproducibility (current mcp releases break the client on a removed description= kwarg).`,
|
|
130
146
|
],
|
|
131
147
|
},
|
|
132
148
|
];
|
|
133
149
|
}
|
|
134
|
-
/** GIMP 3.0 plug-ins directory
|
|
135
|
-
function
|
|
136
|
-
|
|
137
|
-
? '%APPDATA%\\GIMP\\3.
|
|
150
|
+
/** GIMP 3.0 plug-ins directory, per OS (where the server-side plugin lives). */
|
|
151
|
+
function gimpPluginDir(platform) {
|
|
152
|
+
return platform === 'win32'
|
|
153
|
+
? '%APPDATA%\\GIMP\\3.x\\plug-ins\\'
|
|
138
154
|
: platform === 'darwin'
|
|
139
|
-
? '~/Library/Application Support/GIMP/3.
|
|
140
|
-
: '~/.config/GIMP/3.
|
|
141
|
-
return `Copy gimp_mcp_server.py into the GIMP 3.0 plug-ins dir (${dir}) and make it executable`;
|
|
155
|
+
? '~/Library/Application Support/GIMP/3.x/plug-ins/'
|
|
156
|
+
: '~/.config/GIMP/3.x/plug-ins/';
|
|
142
157
|
}
|
|
143
158
|
/** Lookup a single catalog entry. */
|
|
144
159
|
function catalogEntry(app, platform) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpCatalog.js","sourceRoot":"","sources":["../../src/core/mcpCatalog.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,gFAAgF;AAChF,2EAA2E;AAC3E,gFAAgF;AAChF,wEAAwE;AACxE,EAAE;AACF,uEAAuE;AACvE,+EAA+E;AAC/E,gFAAgF;AAChF,8EAA8E;;;
|
|
1
|
+
{"version":3,"file":"mcpCatalog.js","sourceRoot":"","sources":["../../src/core/mcpCatalog.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,gFAAgF;AAChF,2EAA2E;AAC3E,gFAAgF;AAChF,wEAAwE;AACxE,EAAE;AACF,uEAAuE;AACvE,+EAA+E;AAC/E,gFAAgF;AAChF,8EAA8E;;;AAkD9E,sCAQC;AAGD,8CAIC;AAGD,wCAIC;AA2BD,sCAmBC;AAGD,gCAwCC;AAYD,oCAIC;AAtJD;;;;GAIG;AACU,QAAA,uBAAuB,GAAG,sBAAsB,CAAC;AAE9D;;;;;;;;GAQG;AACU,QAAA,eAAe,GAAG,0CAA0C,CAAC;AAC7D,QAAA,mBAAmB,GAC9B,yDAAyD,uBAAe,qBAAqB,CAAC;AACnF,QAAA,YAAY,GAAG,YAAY,CAAC;AACzC,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,oBAAY,EAAE,2BAAmB,CAAC,CAAC;AAE3E,uFAAuF;AACvF,SAAgB,aAAa,CAAC,QAAyB;IACrD,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,OAA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Y,+FAA+F;aAC/L;SACF;KACF,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,SAAS,aAAa,CAAC,QAAyB;IAC9C,OAAO,QAAQ,KAAK,OAAO;QACzB,CAAC,CAAC,kCAAkC;QACpC,CAAC,CAAC,QAAQ,KAAK,QAAQ;YACrB,CAAC,CAAC,kDAAkD;YACpD,CAAC,CAAC,8BAA8B,CAAC;AACvC,CAAC;AAED,qCAAqC;AACrC,SAAgB,YAAY,CAAC,GAAkB,EAAE,QAAyB;IACxE,MAAM,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC;IACzD,IAAI,CAAC,CAAC,EAAE,CAAC;QAAC,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,EAAE,CAAC,CAAC;IAAC,CAAC;IAC5D,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -12,9 +12,11 @@
|
|
|
12
12
|
// It is deliberately narrow:
|
|
13
13
|
// - blender : ALWAYS re-resolved if command/args drift from the catalog spec
|
|
14
14
|
// (Blender has no user-customizable fields, so replacing is safe).
|
|
15
|
-
// - gimp : re-resolved
|
|
16
|
-
// the
|
|
17
|
-
//
|
|
15
|
+
// - gimp : re-resolved to the git-based `uv run …` spec if the stored entry
|
|
16
|
+
// drifts from the current catalog (covers the OLD <GIMP_MCP_CLIENT_PY>
|
|
17
|
+
// placeholder stub AND any earlier command). The ONE thing we never
|
|
18
|
+
// clobber is a user's LOCAL checkout: a python/python3 entry pointing
|
|
19
|
+
// at a concrete (non-placeholder) client path is preserved.
|
|
18
20
|
// `enabled`, `env`, and `_meta` are preserved; the match is name-based so entries
|
|
19
21
|
// written before any `_meta.catalogId` tag existed still migrate. Non-creative
|
|
20
22
|
// entries (built-ins, filesystem's <ALLOWED_DIR>, custom user servers) are never
|
|
@@ -37,9 +39,18 @@ function _argsEqual(a, b) {
|
|
|
37
39
|
}
|
|
38
40
|
return true;
|
|
39
41
|
}
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
/**
|
|
43
|
+
* A gimp entry the migration must PRESERVE: a user's local checkout, i.e. a
|
|
44
|
+
* python/python3 command pointing at a concrete (non-placeholder) client path.
|
|
45
|
+
* Everything else (the old <GIMP_MCP_CLIENT_PY> placeholder stub, or any earlier
|
|
46
|
+
* command form) is upgradeable to the current git-based catalog spec.
|
|
47
|
+
*/
|
|
48
|
+
function _isGimpLocalPython(e) {
|
|
49
|
+
if (e.command !== 'python' && e.command !== 'python3') {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
const first = Array.isArray(e.args) ? e.args[0] : undefined;
|
|
53
|
+
return typeof first === 'string' && first.length > 0 && first !== mcpCatalog_1.GIMP_CLIENT_PLACEHOLDER;
|
|
43
54
|
}
|
|
44
55
|
/**
|
|
45
56
|
* Re-resolve stale creative-app user entries in <root>/.mcp.json from the current
|
|
@@ -63,8 +74,9 @@ function migrateCreativeMcpEntries(root, platform, log) {
|
|
|
63
74
|
// under this name is not ours to touch.
|
|
64
75
|
if (typeof entry.command !== 'string')
|
|
65
76
|
continue;
|
|
66
|
-
// GIMP: never clobber a
|
|
67
|
-
|
|
77
|
+
// GIMP: never clobber a user's local checkout (python[3] + real client path);
|
|
78
|
+
// everything else (old placeholder stub / earlier command) upgrades below.
|
|
79
|
+
if (id === 'gimp' && _isGimpLocalPython(entry))
|
|
68
80
|
continue;
|
|
69
81
|
const spec = (0, mcpCatalog_1.serverSpecFor)(id, platform);
|
|
70
82
|
// Idempotent — already the catalog spec, nothing to do.
|
|
@@ -79,7 +91,7 @@ function migrateCreativeMcpEntries(root, platform, log) {
|
|
|
79
91
|
changed = true;
|
|
80
92
|
log?.(id === 'blender'
|
|
81
93
|
? 'ConfigManager: migrated blender MCP server to the Blender Lab client'
|
|
82
|
-
: 'ConfigManager: migrated gimp MCP server
|
|
94
|
+
: 'ConfigManager: migrated gimp MCP server to the git-based uv run client');
|
|
83
95
|
}
|
|
84
96
|
if (changed) {
|
|
85
97
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpCatalogMigrate.js","sourceRoot":"","sources":["../../src/core/mcpCatalogMigrate.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,gFAAgF;AAChF,EAAE;AACF,iFAAiF;AACjF,iFAAiF;AACjF,kFAAkF;AAClF,iFAAiF;AACjF,EAAE;AACF,gFAAgF;AAChF,kFAAkF;AAClF,6BAA6B;AAC7B,+EAA+E;AAC/E,iFAAiF;AACjF,
|
|
1
|
+
{"version":3,"file":"mcpCatalogMigrate.js","sourceRoot":"","sources":["../../src/core/mcpCatalogMigrate.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,gFAAgF;AAChF,EAAE;AACF,iFAAiF;AACjF,iFAAiF;AACjF,kFAAkF;AAClF,iFAAiF;AACjF,EAAE;AACF,gFAAgF;AAChF,kFAAkF;AAClF,6BAA6B;AAC7B,+EAA+E;AAC/E,iFAAiF;AACjF,iFAAiF;AACjF,qFAAqF;AACrF,kFAAkF;AAClF,oFAAoF;AACpF,0EAA0E;AAC1E,kFAAkF;AAClF,+EAA+E;AAC/E,iFAAiF;AACjF,iFAAiF;AACjF,8EAA8E;;AAiC9E,8DA6CC;AA5ED,6CAA0F;AAC1F,6CAA8G;AAE9G,sEAAsE;AACtE,MAAM,YAAY,GAAoB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAE1D,SAAS,UAAU,CAAC,CAAuB,EAAE,CAAuB;IAClE,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;IACnB,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;IACnB,IAAI,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MA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E,SAAS;QAEzD,MAAM,IAAI,GAAG,IAAA,0BAAa,EAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;QACzC,wDAAwD;QACxD,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;YAAE,SAAS;QAElF,8EAA8E;QAC9E,kFAAkF;QAClF,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAC7B,oEAAoE;QACpE,KAAK,CAAC,KAAK,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;QAExD,OAAO,GAAG,IAAI,CAAC;QACf,GAAG,EAAE,CAAC,EAAE,KAAK,SAAS;YACpB,CAAC,CAAC,sEAAsE;YACxE,CAAC,CAAC,wEAAwE,CAAC,CAAC;IAChF,CAAC;IAED,IAAI,OAAO,EAAE,CAAC;QACZ,IAAI,CAAC;YACH,IAAA,+BAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACpC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,GAAG,EAAE,CAAC,4DAA4D,CAAC,EAAE,CAAC,CAAC;YACvE,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autodev-cli",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.150",
|
|
4
4
|
"description": "AutoAIDev CLI — autonomous AI task loop with VS Code / Cursor launcher",
|
|
5
5
|
"author": "Peter Ivanov <peter@microweber.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"start": "node bin/autodev.js",
|
|
34
34
|
"test:coverage": "c8 npm test",
|
|
35
35
|
"coverage:html": "c8 --reporter=html npm test",
|
|
36
|
-
"test": "node test/smoke.mjs && node test/liveNarration.smoke.mjs && node test/liveNarration.edge.smoke.mjs && node test/normalizer.parity.smoke.mjs && node test/providerConfig.smoke.mjs && node test/providers.services.smoke.mjs && node test/providers.dummy.smoke.mjs && node test/mcpOnlyOperator.smoke.mjs && node test/opencodeEventFilter.smoke.mjs && node test/copilotMcpIsolation.smoke.mjs && node test/grokSpawnError.smoke.mjs && node test/initTemplate.smoke.mjs && node test/settingsAliases.smoke.mjs && node test/setupWritesOfficeMcp.smoke.mjs && node test/provisionNoGlobalMcp.smoke.mjs && node test/deprovisionCleans.smoke.mjs && node test/hooksElectronSafe.smoke.mjs && node test/claudePermissions.smoke.mjs && node test/claudeMcpAllowList.smoke.mjs && node test/presenceGuard.smoke.mjs && node test/cliExitHardFail.smoke.mjs && node test/redactSecrets.smoke.mjs && node test/claudeUsage.smoke.mjs && node test/graphStore.smoke.mjs && node test/programReminder.smoke.mjs && node test/agentBackup.smoke.mjs && node test/persona.smoke.mjs && node test/soulUpdate.smoke.mjs && node test/sessionsGlobal.smoke.mjs && node test/resumeSessionLoopDefault.smoke.mjs && node test/secureFilePerms.smoke.mjs && node test/providers.dummy.office.smoke.mjs && node test/mcpDetect.smoke.mjs && node test/mcpCatalog.smoke.mjs && node test/mcpCatalogMigrate.smoke.mjs && node test/mcpStartupTimeout.smoke.mjs"
|
|
36
|
+
"test": "node test/smoke.mjs && node test/liveNarration.smoke.mjs && node test/liveNarration.edge.smoke.mjs && node test/normalizer.parity.smoke.mjs && node test/providerConfig.smoke.mjs && node test/providers.services.smoke.mjs && node test/providers.dummy.smoke.mjs && node test/mcpOnlyOperator.smoke.mjs && node test/opencodeEventFilter.smoke.mjs && node test/copilotMcpIsolation.smoke.mjs && node test/grokSpawnError.smoke.mjs && node test/initTemplate.smoke.mjs && node test/settingsAliases.smoke.mjs && node test/setupWritesOfficeMcp.smoke.mjs && node test/provisionNoGlobalMcp.smoke.mjs && node test/deprovisionCleans.smoke.mjs && node test/hooksElectronSafe.smoke.mjs && node test/claudePermissions.smoke.mjs && node test/claudeMcpAllowList.smoke.mjs && node test/presenceGuard.smoke.mjs && node test/cliExitHardFail.smoke.mjs && node test/redactSecrets.smoke.mjs && node test/claudeUsage.smoke.mjs && node test/graphStore.smoke.mjs && node test/programReminder.smoke.mjs && node test/agentBackup.smoke.mjs && node test/persona.smoke.mjs && node test/soulUpdate.smoke.mjs && node test/sessionsGlobal.smoke.mjs && node test/resumeSessionLoopDefault.smoke.mjs && node test/secureFilePerms.smoke.mjs && node test/providers.dummy.office.smoke.mjs && node test/mcpDetect.smoke.mjs && node test/gimpPluginInstall.smoke.mjs && node test/mcpCatalog.smoke.mjs && node test/mcpCatalogMigrate.smoke.mjs && node test/mcpStartupTimeout.smoke.mjs"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@opencode-ai/sdk": "^1.14.41",
|