imgx-mcp 1.1.1 → 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/CHANGELOG.md +32 -0
- package/README.md +11 -3
- package/dist/cli.bundle.js +112 -88
- package/dist/mcp.bundle.js +163 -100
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.3.0 (2026-03-04)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **Session-based `clear_history`** — MCP `clear_history` tool accepts optional `session_id` parameter to clear a single session instead of all sessions
|
|
8
|
+
- **Managed path protection** — MCP `clear_history` with `delete_files` only deletes files inside managed directories (`.imgx/` or `~/Pictures/imgx/`); files saved to custom output paths are never deleted
|
|
9
|
+
- **`clearSession()` API** — new function to remove a single session from history
|
|
10
|
+
- **`isManagedPath()` API** — determines whether a file path is inside a managed directory
|
|
11
|
+
- **CLI `history clear <session-id>`** — clear a specific session from CLI (errors on `--all` + session ID combo)
|
|
12
|
+
- **Uninstall cleanup documentation** — README uninstall section now documents data that `npm uninstall` does not remove
|
|
13
|
+
- 7 new tests for `clearSession` and `isManagedPath` (total: 66 tests)
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **`historyDir()` exported** — previously private, now available for managed path detection
|
|
18
|
+
- **MCP `clear_history` response** — now includes `skippedFiles` count for files outside managed directories
|
|
19
|
+
|
|
20
|
+
## 1.2.0 (2026-03-04)
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- **MCP roots-based project detection** — MCP server now calls `listRoots()` after connection to get the client's workspace directory, making project-scoped history work without `.imgxrc` when used via Claude Code and other MCP clients
|
|
25
|
+
- **`setProjectRoot()` API** — allows MCP server (or other integrations) to set the project root programmatically
|
|
26
|
+
- **Project-scoped default output** — when a project root is detected, default output directory is `<project-root>/.imgx/` instead of `~/Pictures/imgx`
|
|
27
|
+
- 5 new tests for MCP root detection and project-scoped default output (total: 59 tests)
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- **Project root resolution priority** — `IMGX_PROJECT_ROOT` env var > MCP roots (`setProjectRoot`) > `.imgxrc` upward search (CLI fallback)
|
|
32
|
+
- **`fallbackOutputDir()`** — configured `outputDir` is now resolved via `resolveProjectPath()` for correct relative path handling
|
|
33
|
+
- **`resetProjectRootCache()`** — now also clears the MCP root value
|
|
34
|
+
|
|
3
35
|
## 1.1.1 (2026-03-04)
|
|
4
36
|
|
|
5
37
|
### Added
|
package/README.md
CHANGED
|
@@ -100,7 +100,7 @@ The skill guides Claude Code through image workflows: blog covers, iterative edi
|
|
|
100
100
|
| `set_output_dir` | Change the default output directory (optionally move existing files) |
|
|
101
101
|
| `list_providers` | List available providers and capabilities |
|
|
102
102
|
|
|
103
|
-
Images are saved to `~/Pictures/imgx/<session-id>/`
|
|
103
|
+
Images are saved to `<project-root>/.imgx/<session-id>/` when a project root is detected, or `~/Pictures/imgx/<session-id>/` otherwise. Each session gets its own directory. File paths are returned in the response. Inline image preview is included in MCP responses (base64).
|
|
104
104
|
|
|
105
105
|
### Iterative editing
|
|
106
106
|
|
|
@@ -377,7 +377,7 @@ Or create manually:
|
|
|
377
377
|
|
|
378
378
|
Project config is shared via Git. Do not put API keys in `.imgxrc`.
|
|
379
379
|
|
|
380
|
-
When `.imgxrc` is present,
|
|
380
|
+
When used via MCP (Claude Code, etc.), imgx-mcp automatically detects the project root from the client's workspace via MCP roots. When `.imgxrc` is present, that directory is used as the project root (CLI fallback). You can also set `IMGX_PROJECT_ROOT` environment variable explicitly. History is saved to `<project-root>/.imgx/output-history.json` (project-scoped, not shared with other projects). Default image output goes to `<project-root>/.imgx/<session-id>/`. Relative paths in `output` and `output_dir` are resolved against the project root instead of the MCP server's working directory.
|
|
381
381
|
|
|
382
382
|
### Settings resolution
|
|
383
383
|
|
|
@@ -438,7 +438,9 @@ Delete the `image-generation/` directory from `.claude/skills/` or `~/.claude/sk
|
|
|
438
438
|
npm uninstall -g imgx-mcp
|
|
439
439
|
```
|
|
440
440
|
|
|
441
|
-
|
|
441
|
+
`npm uninstall` removes the package but does not delete configuration or generated files. Remove them manually if needed:
|
|
442
|
+
|
|
443
|
+
**Global configuration:**
|
|
442
444
|
|
|
443
445
|
```bash
|
|
444
446
|
# Linux / macOS
|
|
@@ -448,6 +450,12 @@ rm -rf ~/.config/imgx/
|
|
|
448
450
|
Remove-Item -Recurse -Force "$env:APPDATA\imgx"
|
|
449
451
|
```
|
|
450
452
|
|
|
453
|
+
**Project history and images:** Each project may have a `.imgx/` directory containing edit history and generated images. Remove it from each project as needed.
|
|
454
|
+
|
|
455
|
+
```bash
|
|
456
|
+
rm -rf <project-root>/.imgx/
|
|
457
|
+
```
|
|
458
|
+
|
|
451
459
|
## License
|
|
452
460
|
|
|
453
461
|
MIT — [SOMA COFFEE KYOTO](https://github.com/somacoffeekyoto)
|