imgx-mcp 1.2.0 → 1.4.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 CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.0 (2026-03-04)
4
+
5
+ ### Added
6
+
7
+ - **Sequential file naming for edit chains** — `edit_last` now generates sequential filenames based on the origin file: `cover.png` → `cover-1.png` → `cover-2.png`. Default UUID-based names follow the same pattern: `imgx-a1b2c3d4.png` → `imgx-a1b2c3d4-1.png`
8
+ - **File deletion on undo + re-edit** — When editing after undo, spliced (abandoned) entries' files are deleted from disk, preventing orphaned images
9
+ - **Session base info tracking** — `Session` now stores `baseName`, `baseExt`, `baseDir` to maintain file identity across the edit chain
10
+ - **`getSessionChainNumber()` API** — returns the next sequential number for chained edits
11
+ - **`getSessionBaseInfo()` / `setSessionBaseInfo()` API** — read/write the origin file identity on the active session
12
+ - 15 new tests (total: 81 tests)
13
+
14
+ ### Changed
15
+
16
+ - **`saveImage()` signature** — new optional `isChained` parameter for sequential naming (backward compatible, defaults to falsy)
17
+ - Legacy sessions without `baseName` fall back to UUID naming when `isChained` is true
18
+
19
+ ## 1.3.0 (2026-03-04)
20
+
21
+ ### Added
22
+
23
+ - **Session-based `clear_history`** — MCP `clear_history` tool accepts optional `session_id` parameter to clear a single session instead of all sessions
24
+ - **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
25
+ - **`clearSession()` API** — new function to remove a single session from history
26
+ - **`isManagedPath()` API** — determines whether a file path is inside a managed directory
27
+ - **CLI `history clear <session-id>`** — clear a specific session from CLI (errors on `--all` + session ID combo)
28
+ - **Uninstall cleanup documentation** — README uninstall section now documents data that `npm uninstall` does not remove
29
+ - 7 new tests for `clearSession` and `isManagedPath` (total: 66 tests)
30
+
31
+ ### Changed
32
+
33
+ - **`historyDir()` exported** — previously private, now available for managed path detection
34
+ - **MCP `clear_history` response** — now includes `skippedFiles` count for files outside managed directories
35
+
3
36
  ## 1.2.0 (2026-03-04)
4
37
 
5
38
  ### Added
package/README.md CHANGED
@@ -129,7 +129,18 @@ generate → edit_last → edit_last → edit_last
129
129
  ↑ current
130
130
  ```
131
131
 
132
- After undo, calling `edit_last` branches from the current position (newer entries are discarded).
132
+ After undo, calling `edit_last` branches from the current position (abandoned entries and their files are deleted from disk).
133
+
134
+ **File naming** — `edit_last` generates sequential filenames based on the origin file:
135
+
136
+ ```
137
+ generate_image → cover.png
138
+ edit_last → cover-1.png
139
+ edit_last → cover-2.png
140
+
141
+ generate_image (no output) → imgx-a1b2c3d4.png
142
+ edit_last → imgx-a1b2c3d4-1.png
143
+ ```
133
144
 
134
145
  **Session switching** — Use `edit_history` to see all sessions, then `switch_session` to resume a previous session. The `edit_last` tool will use the current position in the switched session.
135
146
 
@@ -438,7 +449,9 @@ Delete the `image-generation/` directory from `.claude/skills/` or `~/.claude/sk
438
449
  npm uninstall -g imgx-mcp
439
450
  ```
440
451
 
441
- ### Clean up configuration (optional)
452
+ `npm uninstall` removes the package but does not delete configuration or generated files. Remove them manually if needed:
453
+
454
+ **Global configuration:**
442
455
 
443
456
  ```bash
444
457
  # Linux / macOS
@@ -448,6 +461,12 @@ rm -rf ~/.config/imgx/
448
461
  Remove-Item -Recurse -Force "$env:APPDATA\imgx"
449
462
  ```
450
463
 
464
+ **Project history and images:** Each project may have a `.imgx/` directory containing edit history and generated images. Remove it from each project as needed.
465
+
466
+ ```bash
467
+ rm -rf <project-root>/.imgx/
468
+ ```
469
+
451
470
  ## License
452
471
 
453
472
  MIT — [SOMA COFFEE KYOTO](https://github.com/somacoffeekyoto)