file-organizer-mcp 3.1.1 โ 3.1.3
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 +183 -149
- package/README.md +808 -773
- package/dist/config.js +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/dist/schemas/common.schemas.d.ts +1 -1
- package/dist/schemas/common.schemas.js +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/organize.schemas.d.ts +1 -1
- package/dist/schemas/organize.schemas.js +1 -1
- package/dist/schemas/scan.schemas.d.ts +1 -1
- package/dist/schemas/scan.schemas.js +1 -1
- package/dist/schemas/security.schemas.d.ts +1 -1
- package/dist/schemas/security.schemas.js +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/services/auto-organize.service.d.ts +1 -1
- package/dist/services/auto-organize.service.d.ts.map +1 -1
- package/dist/services/auto-organize.service.js +14 -6
- package/dist/services/auto-organize.service.js.map +1 -1
- package/dist/services/categorizer.service.d.ts +1 -1
- package/dist/services/categorizer.service.js +2 -2
- package/dist/services/categorizer.service.js.map +1 -1
- package/dist/services/duplicate-finder.service.d.ts +1 -1
- package/dist/services/duplicate-finder.service.js +1 -1
- package/dist/services/file-scanner.service.d.ts +1 -1
- package/dist/services/file-scanner.service.d.ts.map +1 -1
- package/dist/services/file-scanner.service.js +42 -29
- package/dist/services/file-scanner.service.js.map +1 -1
- package/dist/services/hash-calculator.service.d.ts +1 -1
- package/dist/services/hash-calculator.service.js +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/organizer.service.d.ts +1 -1
- package/dist/services/organizer.service.js +2 -2
- package/dist/services/organizer.service.js.map +1 -1
- package/dist/services/path-validator.service.d.ts +1 -1
- package/dist/services/path-validator.service.js +1 -1
- package/dist/services/renaming.service.d.ts +1 -1
- package/dist/services/renaming.service.js +1 -1
- package/dist/services/rollback.service.d.ts +1 -1
- package/dist/services/rollback.service.js +1 -1
- package/dist/services/security/rate-limiter.service.d.ts +1 -1
- package/dist/services/security/rate-limiter.service.js +1 -1
- package/dist/services/streaming-scanner.service.d.ts +1 -1
- package/dist/services/streaming-scanner.service.js +1 -1
- package/dist/tests/test-edge-cases.js +3 -1
- package/dist/tests/test-edge-cases.js.map +1 -1
- package/dist/tools/duplicate-management.d.ts +1 -1
- package/dist/tools/duplicate-management.js +18 -18
- package/dist/tools/file-analysis.d.ts +1 -1
- package/dist/tools/file-analysis.js +3 -3
- package/dist/tools/file-categorization.d.ts +1 -1
- package/dist/tools/file-categorization.js +3 -3
- package/dist/tools/file-duplicates.d.ts +1 -1
- package/dist/tools/file-duplicates.js +8 -8
- package/dist/tools/file-listing.d.ts +1 -1
- package/dist/tools/file-listing.js +7 -7
- package/dist/tools/file-management.d.ts +1 -1
- package/dist/tools/file-management.js +3 -3
- package/dist/tools/file-organization.d.ts +1 -1
- package/dist/tools/file-organization.js +14 -14
- package/dist/tools/file-renaming.d.ts +1 -1
- package/dist/tools/file-renaming.js +1 -1
- package/dist/tools/file-scanning.d.ts +1 -1
- package/dist/tools/file-scanning.js +8 -8
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/metadata-inspection.d.ts +1 -1
- package/dist/tools/metadata-inspection.js +1 -1
- package/dist/tools/organization-preview.d.ts +1 -1
- package/dist/tools/organization-preview.js +16 -16
- package/dist/tools/rollback.d.ts +1 -1
- package/dist/tools/rollback.js +7 -7
- package/dist/tools/watch.tool.d.ts +1 -1
- package/dist/tools/watch.tool.js +14 -14
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utils/error-handler.d.ts +5 -1
- package/dist/utils/error-handler.d.ts.map +1 -1
- package/dist/utils/error-handler.js +20 -11
- package/dist/utils/error-handler.js.map +1 -1
- package/dist/utils/file-utils.d.ts +1 -1
- package/dist/utils/file-utils.js +1 -1
- package/dist/utils/formatters.d.ts +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/path-security.d.ts +1 -1
- package/dist/utils/path-security.js +1 -1
- package/package.json +95 -93
- package/scripts/postinstall.js +38 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,149 +1,183 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## [3.1.
|
|
4
|
-
|
|
5
|
-
###
|
|
6
|
-
|
|
7
|
-
- **
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- **
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
- `
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
-
|
|
104
|
-
- `
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
###
|
|
123
|
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
###
|
|
129
|
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [3.1.3] - 2026-02-06
|
|
4
|
+
|
|
5
|
+
### ๐ Documentation
|
|
6
|
+
|
|
7
|
+
- **Version Bump**: Updated all documentation and source files to v3.1.3
|
|
8
|
+
|
|
9
|
+
## [3.1.2] - 2026-02-06
|
|
10
|
+
|
|
11
|
+
### ๐ Fixed
|
|
12
|
+
|
|
13
|
+
- **Bin Entry**: Fixed `file-organizer-setup` bin path (`tui-index.js` โ `index.js`)
|
|
14
|
+
- **Postinstall**: Added postinstall welcome message after npm install
|
|
15
|
+
|
|
16
|
+
## [3.1.1] - 2026-02-06
|
|
17
|
+
|
|
18
|
+
### โจ New Features
|
|
19
|
+
|
|
20
|
+
- **Interactive Setup Wizard**: New TUI-based setup (`npx file-organizer-mcp --setup`) for easy configuration of folders, conflict strategies, and Claude Desktop integration.
|
|
21
|
+
- **Smart Metadata Organization**:
|
|
22
|
+
- Organization by Year/Month for images and videos.
|
|
23
|
+
- Organization by Artist/Album for audio files.
|
|
24
|
+
- New tool `file_organizer_inspect_metadata` for safe metadata extraction.
|
|
25
|
+
- **Smart Scheduling & Watch Mode**:
|
|
26
|
+
- New tools: `file_organizer_watch_directory`, `file_organizer_unwatch_directory`, `file_organizer_list_watches`.
|
|
27
|
+
- Cron-based scheduling for automatic organization (e.g., `"0 10 * * *"` for daily at 10am).
|
|
28
|
+
- Per-directory configuration with independent schedules.
|
|
29
|
+
- `min_file_age_minutes` - Skip files newer than X minutes (prevents organizing in-progress downloads).
|
|
30
|
+
- `max_files_per_run` - Limit files processed per scheduled run.
|
|
31
|
+
- Hot-reload configuration without server restart.
|
|
32
|
+
- **Batch Renaming**: New powerful `file_organizer_batch_rename` tool.
|
|
33
|
+
|
|
34
|
+
### ๐ก๏ธ Improvements
|
|
35
|
+
|
|
36
|
+
- **Conflict Strategy**: Configurable default conflict resolution (`rename`/`skip`/`overwrite`) via config.
|
|
37
|
+
- **Security Check**: Enforced stricter validation for symlink security with explicit `lstat` checks.
|
|
38
|
+
- **Config Management**: Deep merge updates preserve existing settings when adding new configuration.
|
|
39
|
+
- **Free Models**: Updated default configuration to prioritize free models.
|
|
40
|
+
|
|
41
|
+
### ๐ Fixed
|
|
42
|
+
|
|
43
|
+
- Resolved JSON configuration errors.
|
|
44
|
+
- Fixed Cloud Authentication issues.
|
|
45
|
+
- Fixed server disconnection stability issues.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## [3.0.0] - 2026-02-02
|
|
50
|
+
|
|
51
|
+
### ๐ Major: Full TypeScript Migration
|
|
52
|
+
|
|
53
|
+
Complete rewrite from monolithic JavaScript to modular TypeScript architecture.
|
|
54
|
+
|
|
55
|
+
### โจ Added
|
|
56
|
+
|
|
57
|
+
#### Architecture
|
|
58
|
+
|
|
59
|
+
- New `src/` directory structure with layered architecture
|
|
60
|
+
- TypeScript strict mode with full type safety
|
|
61
|
+
- ESLint + Prettier configuration for code quality
|
|
62
|
+
|
|
63
|
+
**Services Layer** (`src/services/`)
|
|
64
|
+
|
|
65
|
+
- `PathValidatorService` - 8-layer path validation with Zod schemas
|
|
66
|
+
- `FileScannerService` - Recursive file scanning with depth/count limits
|
|
67
|
+
- `HashCalculatorService` - SHA-256 hashing for duplicate detection
|
|
68
|
+
- `CategorizerService` - File type categorization by extension
|
|
69
|
+
- `OrganizerService` - File organization with dry-run support
|
|
70
|
+
- `RollbackService` - Undo file operations with manifest tracking
|
|
71
|
+
|
|
72
|
+
**Tools Layer** (`src/tools/`)
|
|
73
|
+
|
|
74
|
+
- Each tool in its own file with Zod input validation
|
|
75
|
+
- Comprehensive JSDoc documentation with examples
|
|
76
|
+
- Exported TypeScript types inferred from Zod schemas
|
|
77
|
+
|
|
78
|
+
**Utilities** (`src/utils/`)
|
|
79
|
+
|
|
80
|
+
- `formatters.ts` - Byte/date/duration formatting
|
|
81
|
+
- `file-utils.ts` - Path normalization, expansion, validation
|
|
82
|
+
- `error-handler.ts` - Centralized error handling with sanitization
|
|
83
|
+
- `logger.ts` - Structured JSON logging with configurable log levels (debug/info/warn/error)
|
|
84
|
+
|
|
85
|
+
**Configuration** (`src/config.ts`)
|
|
86
|
+
|
|
87
|
+
- Platform-aware default directory detection (Windows/macOS/Linux)
|
|
88
|
+
- User configuration loading from platform-specific locations
|
|
89
|
+
- Whitelist/blacklist system for directory access control
|
|
90
|
+
- Auto-initialization of user config file
|
|
91
|
+
|
|
92
|
+
**Schemas** (`src/schemas/`)
|
|
93
|
+
|
|
94
|
+
- Zod schemas for all tool inputs
|
|
95
|
+
- Runtime validation with descriptive error messages
|
|
96
|
+
- Type inference from schemas
|
|
97
|
+
|
|
98
|
+
#### Testing
|
|
99
|
+
|
|
100
|
+
- Comprehensive unit tests for all services
|
|
101
|
+
- Integration tests for complete workflows
|
|
102
|
+
- Performance benchmarks
|
|
103
|
+
- 100+ tests passing across unit, integration, and performance suites
|
|
104
|
+
- `TESTS.md` - Complete test documentation
|
|
105
|
+
|
|
106
|
+
### ๐ง Changed
|
|
107
|
+
|
|
108
|
+
- Entry point: `dist/index.js` (compiled from TypeScript)
|
|
109
|
+
- Build: `npm run build` compiles TypeScript
|
|
110
|
+
- Tests: `npm test` runs complete test suite
|
|
111
|
+
- Improved error messages with sanitized paths
|
|
112
|
+
- Enhanced security with TOCTOU mitigation using file descriptors
|
|
113
|
+
|
|
114
|
+
### ๐ Fixed
|
|
115
|
+
|
|
116
|
+
- Path traversal vulnerability (8-layer validation pipeline)
|
|
117
|
+
- Race conditions in file operations (atomic copy with `COPYFILE_EXCL`)
|
|
118
|
+
- Data loss during overwrites (automatic backups to `.file-organizer-backups/`)
|
|
119
|
+
- Windows path case-sensitivity issues
|
|
120
|
+
- Multiple test failures in duplicate management, organization flow, and file inspection
|
|
121
|
+
|
|
122
|
+
### ๐๏ธ Removed
|
|
123
|
+
|
|
124
|
+
- `server.js` (672-line monolith) โ replaced by `src/` modules
|
|
125
|
+
- `lib/` folder โ migrated to `src/services/`
|
|
126
|
+
- JavaScript test files โ migrated to TypeScript
|
|
127
|
+
|
|
128
|
+
### ๐ฆ Dependencies Added
|
|
129
|
+
|
|
130
|
+
- `typescript` ^5.3.2
|
|
131
|
+
- `zod` ^3.22.4
|
|
132
|
+
- `@types/node` ^20.10.0
|
|
133
|
+
- `eslint`, `prettier`, `rimraf`
|
|
134
|
+
- `jest` for testing
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## [3.0.0-beta.1] - 2026-02-02
|
|
139
|
+
|
|
140
|
+
### ๐ Security (CRITICAL)
|
|
141
|
+
|
|
142
|
+
- **FIXED**: Path traversal vulnerability (CVE-pending)
|
|
143
|
+
- Previous versions allowed `../` to access parent directories
|
|
144
|
+
- Now implements 8-layer validation pipeline
|
|
145
|
+
- All paths restricted to current working directory in strict mode
|
|
146
|
+
- **FIXED**: Windows Path Case-Sensitivity
|
|
147
|
+
- Resolves access denial for paths like `c:\Users` vs `C:\Users`
|
|
148
|
+
- Ensures robust whitelist matching on Windows platforms
|
|
149
|
+
|
|
150
|
+
### โจ Added
|
|
151
|
+
|
|
152
|
+
- New 8-layer path validation system
|
|
153
|
+
- Custom error classes (AccessDeniedError, ValidationError)
|
|
154
|
+
- Comprehensive security test suite (5/5 passing)
|
|
155
|
+
- Forward compatibility for Phase 2 (config system)
|
|
156
|
+
|
|
157
|
+
### ๐ง Changed
|
|
158
|
+
|
|
159
|
+
- Updated to v3.0.0 architecture
|
|
160
|
+
- Path validation now uses base-validator.js
|
|
161
|
+
- Improved error messages with sanitized paths
|
|
162
|
+
|
|
163
|
+
### โ ๏ธ Breaking Changes
|
|
164
|
+
|
|
165
|
+
- **NONE** - Fully backward compatible with v2.x for valid use cases
|
|
166
|
+
- Only breaking for invalid use cases (accessing parent directories)
|
|
167
|
+
|
|
168
|
+
### ๐ฆ Migration from v2.x
|
|
169
|
+
|
|
170
|
+
No changes needed! All existing workflows continue to work.
|
|
171
|
+
If you were using `../` paths (which was a security bug), those now correctly fail.
|
|
172
|
+
|
|
173
|
+
### ๐งช Testing
|
|
174
|
+
|
|
175
|
+
- 5/5 critical security tests passing
|
|
176
|
+
- All 6 original MCP tools tested and working
|
|
177
|
+
- Cross-platform tested (Windows, macOS, Linux)
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## [2.1.0] - 2026-02-01
|
|
182
|
+
|
|
183
|
+
(Previous version with path traversal vulnerability - UPGRADE IMMEDIATELY)
|