imgx-mcp 1.4.0 → 1.4.1
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/CHANGELOG.md +6 -0
- package/dist/cli.bundle.js +1 -1
- package/dist/mcp.bundle.js +15 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.4.1 (2026-03-04)
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **MCP roots detection race condition** — `listRoots()` was called immediately after `server.connect()`, before the MCP initialization handshake completed. The request failed silently, causing `setProjectRoot()` to never execute and images to save to the fallback `~/Pictures/imgx/` instead of `<project-root>/.imgx/`. Now uses `oninitialized` callback to wait for handshake completion and checks `roots` capability before requesting.
|
|
8
|
+
|
|
3
9
|
## 1.4.0 (2026-03-04)
|
|
4
10
|
|
|
5
11
|
### Added
|
package/dist/cli.bundle.js
CHANGED
|
@@ -40281,7 +40281,7 @@ function runRedo() {
|
|
|
40281
40281
|
}
|
|
40282
40282
|
|
|
40283
40283
|
// build/cli/index.js
|
|
40284
|
-
var VERSION2 = "1.4.
|
|
40284
|
+
var VERSION2 = "1.4.1";
|
|
40285
40285
|
var HELP = `imgx v${VERSION2} \u2014 AI image generation and editing for MCP-compatible AI agents
|
|
40286
40286
|
|
|
40287
40287
|
Commands:
|
package/dist/mcp.bundle.js
CHANGED
|
@@ -69977,7 +69977,7 @@ function buildImageContent(images, paths, extra) {
|
|
|
69977
69977
|
}
|
|
69978
69978
|
var server = new McpServer({
|
|
69979
69979
|
name: "imgx",
|
|
69980
|
-
version: "1.4.
|
|
69980
|
+
version: "1.4.1"
|
|
69981
69981
|
});
|
|
69982
69982
|
initGemini();
|
|
69983
69983
|
initOpenAI();
|
|
@@ -70287,17 +70287,22 @@ function fileUriToPath(uri) {
|
|
|
70287
70287
|
}
|
|
70288
70288
|
async function main() {
|
|
70289
70289
|
const transport = new StdioServerTransport();
|
|
70290
|
-
|
|
70291
|
-
|
|
70292
|
-
|
|
70293
|
-
|
|
70294
|
-
|
|
70295
|
-
|
|
70296
|
-
|
|
70290
|
+
server.server.oninitialized = async () => {
|
|
70291
|
+
try {
|
|
70292
|
+
const caps = server.server.getClientCapabilities();
|
|
70293
|
+
if (!caps?.roots)
|
|
70294
|
+
return;
|
|
70295
|
+
const result = await server.server.listRoots();
|
|
70296
|
+
if (result.roots.length > 0) {
|
|
70297
|
+
const rootUri = result.roots[0].uri;
|
|
70298
|
+
if (rootUri.startsWith("file://")) {
|
|
70299
|
+
setProjectRoot(fileUriToPath(rootUri));
|
|
70300
|
+
}
|
|
70297
70301
|
}
|
|
70302
|
+
} catch {
|
|
70298
70303
|
}
|
|
70299
|
-
}
|
|
70300
|
-
|
|
70304
|
+
};
|
|
70305
|
+
await server.connect(transport);
|
|
70301
70306
|
}
|
|
70302
70307
|
main().catch((err) => {
|
|
70303
70308
|
console.error("MCP server error:", err);
|
package/package.json
CHANGED