autodev-cli 1.4.150 → 1.4.152
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/gimp_mcp_client.py +204 -0
- package/media/gimp/gimp_mcp_server.py +310 -211
- package/out/commands/mcp.js +36 -30
- package/out/commands/mcp.js.map +1 -1
- package/out/configManager.js +54 -0
- package/out/configManager.js.map +1 -1
- package/out/core/gimpClientSource.d.ts +4 -0
- package/out/core/gimpClientSource.js +221 -0
- package/out/core/gimpClientSource.js.map +1 -0
- package/out/core/gimpPluginInstall.d.ts +45 -6
- package/out/core/gimpPluginInstall.js +184 -63
- package/out/core/gimpPluginInstall.js.map +1 -1
- package/out/core/gimpPluginSource.d.ts +4 -0
- package/out/core/gimpPluginSource.js +383 -0
- package/out/core/gimpPluginSource.js.map +1 -0
- package/out/core/mcpCatalog.d.ts +25 -17
- package/out/core/mcpCatalog.js +68 -36
- package/out/core/mcpCatalog.js.map +1 -1
- package/out/core/mcpCatalogMigrate.d.ts +9 -1
- package/out/core/mcpCatalogMigrate.js +34 -22
- package/out/core/mcpCatalogMigrate.js.map +1 -1
- package/package.json +3 -1
|
@@ -12,11 +12,14 @@
|
|
|
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 :
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
15
|
+
// - gimp : the ONE thing we never clobber is a user's concrete local client
|
|
16
|
+
// (python[3] <path>, or `uv run … <concrete local path>`). Anything
|
|
17
|
+
// else — the old <…> placeholder stub, OR the BROKEN raw-github
|
|
18
|
+
// upstream client (raw.githubusercontent.com/…/gimp_mcp_client.py)
|
|
19
|
+
// — is upgraded to `uv run --with mcp==1.2.0 <LOCAL client path>`
|
|
20
|
+
// using the client installGimpPlugin() writes on this machine. If
|
|
21
|
+
// GIMP is not installed we can't compute that path, so we leave the
|
|
22
|
+
// entry as-is (we never NEWLY write the broken raw URL).
|
|
20
23
|
// `enabled`, `env`, and `_meta` are preserved; the match is name-based so entries
|
|
21
24
|
// written before any `_meta.catalogId` tag existed still migrate. Non-creative
|
|
22
25
|
// entries (built-ins, filesystem's <ALLOWED_DIR>, custom user servers) are never
|
|
@@ -25,6 +28,7 @@
|
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
29
|
exports.migrateCreativeMcpEntries = migrateCreativeMcpEntries;
|
|
27
30
|
const mcpCatalog_1 = require("./mcpCatalog");
|
|
31
|
+
const gimpPluginInstall_1 = require("./gimpPluginInstall");
|
|
28
32
|
const projectMcp_1 = require("./projectMcp");
|
|
29
33
|
/** Creative catalog ids we re-resolve (single source: mcpCatalog). */
|
|
30
34
|
const CREATIVE_IDS = ['blender', 'gimp'];
|
|
@@ -40,24 +44,21 @@ function _argsEqual(a, b) {
|
|
|
40
44
|
return true;
|
|
41
45
|
}
|
|
42
46
|
/**
|
|
43
|
-
* A gimp entry the migration must PRESERVE:
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
+
* A gimp entry the migration must PRESERVE: it already points at a CONCRETE local
|
|
48
|
+
* client (a real filesystem path, not the placeholder and not a URL) — either a
|
|
49
|
+
* user's own checkout or the client we already installed. Everything else (the
|
|
50
|
+
* placeholder stub, the broken raw-github URL, or a bare command) is upgradeable.
|
|
47
51
|
*/
|
|
48
|
-
function
|
|
49
|
-
|
|
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;
|
|
52
|
+
function _isGimpConcreteLocal(e) {
|
|
53
|
+
return (0, mcpCatalog_1.isConcreteGimpClientArg)((0, mcpCatalog_1.gimpClientArgOf)(e));
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Re-resolve stale creative-app user entries in <root>/.mcp.json from the current
|
|
57
57
|
* catalog. Persists the upgraded set back to .mcp.json when anything changed and
|
|
58
58
|
* logs each upgrade. Returns true iff at least one entry was migrated.
|
|
59
59
|
*/
|
|
60
|
-
function migrateCreativeMcpEntries(root, platform, log) {
|
|
60
|
+
function migrateCreativeMcpEntries(root, platform, log, opts) {
|
|
61
|
+
const resolveGimpClient = opts?.resolveGimpClient ?? (() => (0, gimpPluginInstall_1.resolveGimpClientPath)());
|
|
61
62
|
let userMcp;
|
|
62
63
|
try {
|
|
63
64
|
userMcp = (0, projectMcp_1.loadProjectUserMcp)(root);
|
|
@@ -74,11 +75,22 @@ function migrateCreativeMcpEntries(root, platform, log) {
|
|
|
74
75
|
// under this name is not ours to touch.
|
|
75
76
|
if (typeof entry.command !== 'string')
|
|
76
77
|
continue;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
let spec;
|
|
79
|
+
if (id === 'gimp') {
|
|
80
|
+
// Never clobber a user's concrete local client (or the one we installed).
|
|
81
|
+
if (_isGimpConcreteLocal(entry))
|
|
82
|
+
continue;
|
|
83
|
+
// Otherwise (placeholder stub / broken raw-github URL / bare command) upgrade
|
|
84
|
+
// to the locally-installed client — but only if we can resolve one. Without a
|
|
85
|
+
// detected GIMP we leave the entry as-is (never NEWLY write the broken URL).
|
|
86
|
+
const clientPath = resolveGimpClient();
|
|
87
|
+
if (!clientPath)
|
|
88
|
+
continue;
|
|
89
|
+
spec = (0, mcpCatalog_1.serverSpecFor)('gimp', platform, { gimpClientPath: clientPath });
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
spec = (0, mcpCatalog_1.serverSpecFor)(id, platform);
|
|
93
|
+
}
|
|
82
94
|
// Idempotent — already the catalog spec, nothing to do.
|
|
83
95
|
if (entry.command === spec.command && _argsEqual(entry.args, spec.args))
|
|
84
96
|
continue;
|
|
@@ -91,7 +103,7 @@ function migrateCreativeMcpEntries(root, platform, log) {
|
|
|
91
103
|
changed = true;
|
|
92
104
|
log?.(id === 'blender'
|
|
93
105
|
? 'ConfigManager: migrated blender MCP server to the Blender Lab client'
|
|
94
|
-
: 'ConfigManager: migrated gimp MCP server to the
|
|
106
|
+
: 'ConfigManager: migrated gimp MCP server to the locally-installed client (uv run)');
|
|
95
107
|
}
|
|
96
108
|
if (changed) {
|
|
97
109
|
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,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,kFAAkF;AAClF,8EAA8E;AAC9E,iFAAiF;AACjF,gFAAgF;AAChF,gFAAgF;AAChF,kFAAkF;AAClF,uEAAuE;AACvE,kFAAkF;AAClF,+EAA+E;AAC/E,iFAAiF;AACjF,iFAAiF;AACjF,8EAA8E;;AAyC9E,8DA0DC;AAjGD,6CAA2G;AAC3G,2DAA4D;AAC5D,6CAA8G;AAE9G,sEAAsE;AACtE,MAAM,YAAY,GAAoB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAW1D,SA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E,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.152",
|
|
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",
|
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
"cursor"
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
|
+
"gen:gimp": "node scripts/gen-gimp-plugin-source.mjs",
|
|
31
|
+
"prebuild": "node scripts/gen-gimp-plugin-source.mjs",
|
|
30
32
|
"build": "tsc -p ./",
|
|
31
33
|
"dev": "tsc -p ./ --watch",
|
|
32
34
|
"prepublishOnly": "npm run build",
|