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.
@@ -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 : 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.
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: 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
+ * 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 _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;
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
- // 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))
80
- continue;
81
- const spec = (0, mcpCatalog_1.serverSpecFor)(id, platform);
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 git-based uv run client');
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,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,CA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AS;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,kFAAkF,CAAC,CAAC;IAC1F,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.150",
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",