file-organizer-mcp 3.3.0 → 3.3.2
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 +42 -0
- package/README.md +6 -22
- package/dist/src/config.js +1 -1
- package/dist/src/index.js +95 -95
- package/dist/src/schemas/common.schemas.d.ts +1 -1
- package/dist/src/schemas/common.schemas.d.ts.map +1 -1
- package/dist/src/schemas/common.schemas.js +4 -4
- package/dist/src/schemas/common.schemas.js.map +1 -1
- package/dist/src/schemas/index.d.ts +4 -4
- package/dist/src/schemas/index.js +4 -4
- package/dist/src/schemas/organize.schemas.d.ts +1 -1
- package/dist/src/schemas/organize.schemas.js +2 -2
- package/dist/src/schemas/rename.schemas.d.ts +1 -1
- package/dist/src/schemas/rename.schemas.js +19 -19
- package/dist/src/schemas/scan.schemas.d.ts +1 -1
- package/dist/src/schemas/scan.schemas.d.ts.map +1 -1
- package/dist/src/schemas/scan.schemas.js +2 -2
- package/dist/src/schemas/scan.schemas.js.map +1 -1
- package/dist/src/schemas/security.schemas.d.ts +1 -1
- package/dist/src/schemas/security.schemas.d.ts.map +1 -1
- package/dist/src/schemas/security.schemas.js +9 -5
- package/dist/src/schemas/security.schemas.js.map +1 -1
- package/dist/src/services/auto-organize.service.d.ts +4 -4
- package/dist/src/services/auto-organize.service.d.ts.map +1 -1
- package/dist/src/services/auto-organize.service.js +38 -34
- package/dist/src/services/auto-organize.service.js.map +1 -1
- package/dist/src/services/categorizer.service.d.ts +30 -2
- package/dist/src/services/categorizer.service.d.ts.map +1 -1
- package/dist/src/services/categorizer.service.js +93 -9
- package/dist/src/services/categorizer.service.js.map +1 -1
- package/dist/src/services/metadata.service.d.ts +1 -1
- package/dist/src/services/metadata.service.d.ts.map +1 -1
- package/dist/src/services/metadata.service.js +33 -23
- package/dist/src/services/metadata.service.js.map +1 -1
- package/dist/src/services/music-organizer.service.d.ts +1 -0
- package/dist/src/services/music-organizer.service.d.ts.map +1 -1
- package/dist/src/services/music-organizer.service.js.map +1 -1
- package/dist/src/services/organizer.service.d.ts +2 -2
- package/dist/src/services/organizer.service.d.ts.map +1 -1
- package/dist/src/services/organizer.service.js +125 -83
- package/dist/src/services/organizer.service.js.map +1 -1
- package/dist/src/services/photo-organizer.service.d.ts +1 -0
- package/dist/src/services/photo-organizer.service.d.ts.map +1 -1
- package/dist/src/services/photo-organizer.service.js +1 -1
- package/dist/src/services/photo-organizer.service.js.map +1 -1
- package/dist/src/services/renaming.service.d.ts +2 -2
- package/dist/src/services/renaming.service.d.ts.map +1 -1
- package/dist/src/services/renaming.service.js +58 -58
- package/dist/src/services/renaming.service.js.map +1 -1
- package/dist/src/services/rollback.service.d.ts +1 -1
- package/dist/src/services/rollback.service.d.ts.map +1 -1
- package/dist/src/services/rollback.service.js +27 -22
- package/dist/src/services/rollback.service.js.map +1 -1
- package/dist/src/services/scheduler-state.service.d.ts.map +1 -1
- package/dist/src/services/scheduler-state.service.js +33 -33
- package/dist/src/services/scheduler-state.service.js.map +1 -1
- package/dist/src/tools/content-organization.js +19 -19
- package/dist/src/tools/duplicate-management.d.ts +2 -2
- package/dist/src/tools/duplicate-management.d.ts.map +1 -1
- package/dist/src/tools/duplicate-management.js +58 -41
- package/dist/src/tools/duplicate-management.js.map +1 -1
- package/dist/src/tools/file-analysis.d.ts +2 -2
- package/dist/src/tools/file-analysis.d.ts.map +1 -1
- package/dist/src/tools/file-analysis.js +39 -24
- package/dist/src/tools/file-analysis.js.map +1 -1
- package/dist/src/tools/file-categorization.d.ts +2 -2
- package/dist/src/tools/file-categorization.d.ts.map +1 -1
- package/dist/src/tools/file-categorization.js +47 -33
- package/dist/src/tools/file-categorization.js.map +1 -1
- package/dist/src/tools/file-duplicates.d.ts +2 -2
- package/dist/src/tools/file-duplicates.d.ts.map +1 -1
- package/dist/src/tools/file-duplicates.js +35 -24
- package/dist/src/tools/file-duplicates.js.map +1 -1
- package/dist/src/tools/file-listing.d.ts +2 -2
- package/dist/src/tools/file-listing.d.ts.map +1 -1
- package/dist/src/tools/file-listing.js +34 -23
- package/dist/src/tools/file-listing.js.map +1 -1
- package/dist/src/tools/file-management.d.ts +2 -2
- package/dist/src/tools/file-management.d.ts.map +1 -1
- package/dist/src/tools/file-management.js +44 -31
- package/dist/src/tools/file-management.js.map +1 -1
- package/dist/src/tools/file-organization.d.ts +2 -2
- package/dist/src/tools/file-organization.d.ts.map +1 -1
- package/dist/src/tools/file-organization.js +51 -39
- package/dist/src/tools/file-organization.js.map +1 -1
- package/dist/src/tools/file-renaming.d.ts +2 -2
- package/dist/src/tools/file-renaming.d.ts.map +1 -1
- package/dist/src/tools/file-renaming.js +57 -34
- package/dist/src/tools/file-renaming.js.map +1 -1
- package/dist/src/tools/file-scanning.js +9 -9
- package/dist/src/tools/metadata-inspection.d.ts +2 -2
- package/dist/src/tools/metadata-inspection.d.ts.map +1 -1
- package/dist/src/tools/metadata-inspection.js +56 -39
- package/dist/src/tools/metadata-inspection.js.map +1 -1
- package/dist/src/tools/music-organization.d.ts +2 -2
- package/dist/src/tools/music-organization.d.ts.map +1 -1
- package/dist/src/tools/music-organization.js +60 -56
- package/dist/src/tools/music-organization.js.map +1 -1
- package/dist/src/tools/organization-preview.d.ts +2 -2
- package/dist/src/tools/organization-preview.d.ts.map +1 -1
- package/dist/src/tools/organization-preview.js +39 -32
- package/dist/src/tools/organization-preview.js.map +1 -1
- package/dist/src/tools/photo-organization.d.ts +2 -2
- package/dist/src/tools/photo-organization.d.ts.map +1 -1
- package/dist/src/tools/photo-organization.js +64 -60
- package/dist/src/tools/photo-organization.js.map +1 -1
- package/dist/src/tools/rollback.d.ts +2 -2
- package/dist/src/tools/rollback.d.ts.map +1 -1
- package/dist/src/tools/rollback.js +24 -17
- package/dist/src/tools/rollback.js.map +1 -1
- package/dist/src/tools/smart-organization.d.ts.map +1 -1
- package/dist/src/tools/smart-organization.js +34 -9
- package/dist/src/tools/smart-organization.js.map +1 -1
- package/dist/src/tools/watch.tool.d.ts +2 -2
- package/dist/src/tools/watch.tool.d.ts.map +1 -1
- package/dist/src/tools/watch.tool.js +82 -71
- package/dist/src/tools/watch.tool.js.map +1 -1
- package/dist/src/tui/index.js +8 -7
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/setup-wizard.d.ts.map +1 -1
- package/dist/src/tui/setup-wizard.js.map +1 -1
- package/dist/src/utils/cron-utils.d.ts.map +1 -1
- package/dist/src/utils/cron-utils.js +46 -40
- package/dist/src/utils/cron-utils.js.map +1 -1
- package/dist/src/utils/diagnostics.d.ts.map +1 -1
- package/dist/src/utils/diagnostics.js +148 -128
- package/dist/src/utils/diagnostics.js.map +1 -1
- package/dist/src/utils/error-handler.d.ts.map +1 -1
- package/dist/src/utils/error-handler.js +11 -10
- package/dist/src/utils/error-handler.js.map +1 -1
- package/dist/src/utils/file-utils.d.ts +1 -0
- package/dist/src/utils/file-utils.d.ts.map +1 -1
- package/dist/src/utils/file-utils.js +20 -6
- package/dist/src/utils/file-utils.js.map +1 -1
- package/dist/src/utils/formatters.js +2 -2
- package/dist/src/utils/index.d.ts +5 -5
- package/dist/src/utils/index.js +5 -5
- package/dist/src/utils/logger.js +1 -1
- package/dist/src/utils/logger.js.map +1 -1
- package/dist/src/utils/path-security.d.ts.map +1 -1
- package/dist/src/utils/path-security.js +32 -29
- package/dist/src/utils/path-security.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.3.2] - 2026-02-13
|
|
4
|
+
|
|
5
|
+
### 🐛 Bug Fixes
|
|
6
|
+
|
|
7
|
+
#### Smart Organization
|
|
8
|
+
- **Fixed dry_run not passed** in photo-organization.ts and music-organization.ts
|
|
9
|
+
- **Fixed delete-before-verify bug** - Source files now verified copied before deletion
|
|
10
|
+
- **Fixed source/target validation** - Added proper path validation in smart-organization.ts
|
|
11
|
+
|
|
12
|
+
#### Code Quality
|
|
13
|
+
- **Fixed logger.ts Jest detection** - typeof jest no longer throws ReferenceError
|
|
14
|
+
- **Fixed path-security.ts argument order** - Corrected wrong argument order to isSubPath
|
|
15
|
+
- **Fixed categorizer.service.ts** - useContentAnalysis now properly implemented
|
|
16
|
+
- **Fixed test mock pollution** - smart-organization-edge-cases.test.ts no longer pollutes other tests
|
|
17
|
+
|
|
18
|
+
### 🧪 Testing
|
|
19
|
+
- All 59 test suites passing (893/896 tests, 3 skipped)
|
|
20
|
+
- Build passes successfully
|
|
21
|
+
|
|
22
|
+
## [3.3.1] - 2026-02-13
|
|
23
|
+
|
|
24
|
+
### 🐛 Bug Fixes
|
|
25
|
+
|
|
26
|
+
#### Error Handling
|
|
27
|
+
- **Fixed `createErrorResponse` missing `isError: true`** - All error responses now consistently include the `isError` flag
|
|
28
|
+
|
|
29
|
+
#### Smart Organization
|
|
30
|
+
- **Fixed directory creation bug** - Only creates Music/Photos/Documents folders when files of those types actually exist (was creating all folders unconditionally)
|
|
31
|
+
- **Fixed Copy vs Move behavior** - `organizeDocuments()` now correctly respects the `copyInsteadOfMove` option
|
|
32
|
+
|
|
33
|
+
#### File Organization
|
|
34
|
+
- **Fixed `use_content_analysis` no-op bug** - The flag was parsed but not passed to the categorizer; now properly flows through `organize()` → `generateOrganizationPlan()` → `getCategory()`
|
|
35
|
+
|
|
36
|
+
#### Code Cleanup
|
|
37
|
+
- **Removed empty `cleanupEmptyFolders` method** - Was an unused placeholder in organizer.service.ts
|
|
38
|
+
|
|
39
|
+
### 🧪 Testing
|
|
40
|
+
- Added 74 comprehensive tests for Smart Organization tool:
|
|
41
|
+
- Unit tests (29 tests)
|
|
42
|
+
- Edge case tests (25 tests)
|
|
43
|
+
- Integration tests (20 tests)
|
|
44
|
+
|
|
3
45
|
## [3.3.0] - 2026-02-13
|
|
4
46
|
|
|
5
47
|
### ✨ New Features
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# <a id="file-organizer-mcp-server"></a>File Organizer MCP Server 🗂️
|
|
2
2
|
|
|
3
|
-
**Version:** 3.3.
|
|
3
|
+
**Version:** 3.3.2 | **MCP Protocol:** 2024-11-05 | **Node:** ≥18.0.0
|
|
4
4
|
|
|
5
5
|
**New in v3.3.0 - Smart Organization:**
|
|
6
6
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
[](https://www.npmjs.com/package/file-organizer-mcp)
|
|
21
21
|
[](https://www.npmjs.com/package/file-organizer-mcp)
|
|
22
22
|
[](https://github.com/kridaydave/File-Organizer-MCP)
|
|
23
23
|
[](https://nodejs.org)
|
|
@@ -204,27 +204,11 @@ Run `npx file-organizer-mcp --setup` for guided configuration:
|
|
|
204
204
|
- **📅 Schedule Setup** - Configure automatic organization schedules
|
|
205
205
|
- **🤖 Claude Integration** - Auto-generates `claude_desktop_config.json`
|
|
206
206
|
|
|
207
|
-
### What's
|
|
208
|
-
|
|
209
|
-
**
|
|
210
|
-
|
|
211
|
-
- **Enhanced Metadata Extraction** - Extracts EXIF for photos, ID3 tags for music, and detailed metadata for documents
|
|
212
|
-
- **Music Organization** - Organizes music files by Artist/Album/Title structure using ID3 metadata
|
|
213
|
-
- **Photo Organization** - Organizes photos by date (YYYY/MM/DD) using EXIF metadata
|
|
214
|
-
- **Security Screening** - Enhanced security with metadata-based threat detection
|
|
215
|
-
- **Metadata Cache System** - Efficient metadata caching for faster operations
|
|
216
|
-
- **File-reader tool** - Read files with configurable encoding and line limits
|
|
217
|
-
|
|
207
|
+
### What's Next ?
|
|
208
|
+
- **Automatic Compression of unsed/old files**
|
|
209
|
+
- **Server Code migration to TypeScript**
|
|
210
|
+
- **Added Security and performance**
|
|
218
211
|
See [CHANGELOG.md](CHANGELOG.md) for full details.
|
|
219
|
-
|
|
220
|
-
### Recent Fixes (v3.2.0)
|
|
221
|
-
|
|
222
|
-
- Fixed test coverage and added 57 new test cases
|
|
223
|
-
- Improved duplicate detection accuracy
|
|
224
|
-
- Enhanced file categorization logic
|
|
225
|
-
- Better handling of special characters in filenames
|
|
226
|
-
- Improved error messages for permission denied scenarios
|
|
227
|
-
|
|
228
212
|
---
|
|
229
213
|
|
|
230
214
|
## <a id="tools-reference"></a>Tools Reference 🛠️
|
package/dist/src/config.js
CHANGED
package/dist/src/index.js
CHANGED
|
@@ -22,18 +22,18 @@ const MIN_NODE_VERSION = 18;
|
|
|
22
22
|
const currentNodeVersion = process.versions.node;
|
|
23
23
|
const majorVersion = parseInt(currentNodeVersion.split(".")[0] || "0", 10);
|
|
24
24
|
if (majorVersion < MIN_NODE_VERSION) {
|
|
25
|
-
logger.error(`
|
|
26
|
-
╔══════════════════════════════════════════════════════════════════╗
|
|
27
|
-
║ ERROR: Node.js version ${currentNodeVersion.padEnd(8)} is not supported ║
|
|
28
|
-
╠══════════════════════════════════════════════════════════════════╣
|
|
29
|
-
║ File Organizer MCP requires Node.js ${MIN_NODE_VERSION} or higher ║
|
|
30
|
-
║ ║
|
|
31
|
-
║ To upgrade: ║
|
|
32
|
-
║ • Visit: https://nodejs.org/ ║
|
|
33
|
-
║ • Or use a version manager: ║
|
|
34
|
-
║ - nvm (Linux/Mac): nvm install ${MIN_NODE_VERSION} && nvm use ${MIN_NODE_VERSION} ║
|
|
35
|
-
║ - nvm-windows: nvm install ${MIN_NODE_VERSION}.0.0 && nvm use ${MIN_NODE_VERSION}.0.0 ║
|
|
36
|
-
╚══════════════════════════════════════════════════════════════════╝
|
|
25
|
+
logger.error(`
|
|
26
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
27
|
+
║ ERROR: Node.js version ${currentNodeVersion.padEnd(8)} is not supported ║
|
|
28
|
+
╠══════════════════════════════════════════════════════════════════╣
|
|
29
|
+
║ File Organizer MCP requires Node.js ${MIN_NODE_VERSION} or higher ║
|
|
30
|
+
║ ║
|
|
31
|
+
║ To upgrade: ║
|
|
32
|
+
║ • Visit: https://nodejs.org/ ║
|
|
33
|
+
║ • Or use a version manager: ║
|
|
34
|
+
║ - nvm (Linux/Mac): nvm install ${MIN_NODE_VERSION} && nvm use ${MIN_NODE_VERSION} ║
|
|
35
|
+
║ - nvm-windows: nvm install ${MIN_NODE_VERSION}.0.0 && nvm use ${MIN_NODE_VERSION}.0.0 ║
|
|
36
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
37
37
|
`.trim());
|
|
38
38
|
process.exit(1);
|
|
39
39
|
}
|
|
@@ -49,28 +49,28 @@ const distIndexPath = path.join(__dirname, "index.js");
|
|
|
49
49
|
const distServerPath = path.join(__dirname, "server.js");
|
|
50
50
|
if (!fs.existsSync(distIndexPath) || !fs.existsSync(distServerPath)) {
|
|
51
51
|
const packageRoot = path.resolve(__dirname, "..");
|
|
52
|
-
logger.error(`
|
|
53
|
-
╔══════════════════════════════════════════════════════════════════╗
|
|
54
|
-
║ INSTALLATION INCOMPLETE ║
|
|
55
|
-
╠══════════════════════════════════════════════════════════════════╣
|
|
56
|
-
║ The server files (dist/) are missing or incomplete. ║
|
|
57
|
-
║ ║
|
|
58
|
-
║ Common causes: ║
|
|
59
|
-
║ • npm install --ignore-scripts (skipped prepare script) ║
|
|
60
|
-
║ • Global install without proper build step ║
|
|
61
|
-
║ • Installing from GitHub without devDependencies ║
|
|
62
|
-
║ • Package corruption during download ║
|
|
63
|
-
║ ║
|
|
64
|
-
║ How to fix: ║
|
|
65
|
-
║ ║
|
|
66
|
-
║ For regular users: ║
|
|
67
|
-
║ npm uninstall -g file-organizer-mcp ║
|
|
68
|
-
║ npm install -g file-organizer-mcp ║
|
|
69
|
-
║ ║
|
|
70
|
-
║ For GitHub/source installs: ║
|
|
71
|
-
║ cd "${packageRoot}" ║
|
|
72
|
-
║ npm install && npm run build ║
|
|
73
|
-
╚══════════════════════════════════════════════════════════════════╝
|
|
52
|
+
logger.error(`
|
|
53
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
54
|
+
║ INSTALLATION INCOMPLETE ║
|
|
55
|
+
╠══════════════════════════════════════════════════════════════════╣
|
|
56
|
+
║ The server files (dist/) are missing or incomplete. ║
|
|
57
|
+
║ ║
|
|
58
|
+
║ Common causes: ║
|
|
59
|
+
║ • npm install --ignore-scripts (skipped prepare script) ║
|
|
60
|
+
║ • Global install without proper build step ║
|
|
61
|
+
║ • Installing from GitHub without devDependencies ║
|
|
62
|
+
║ • Package corruption during download ║
|
|
63
|
+
║ ║
|
|
64
|
+
║ How to fix: ║
|
|
65
|
+
║ ║
|
|
66
|
+
║ For regular users: ║
|
|
67
|
+
║ npm uninstall -g file-organizer-mcp ║
|
|
68
|
+
║ npm install -g file-organizer-mcp ║
|
|
69
|
+
║ ║
|
|
70
|
+
║ For GitHub/source installs: ║
|
|
71
|
+
║ cd "${packageRoot}" ║
|
|
72
|
+
║ npm install && npm run build ║
|
|
73
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
74
74
|
`.trim());
|
|
75
75
|
process.exit(1);
|
|
76
76
|
}
|
|
@@ -85,30 +85,30 @@ for (const dep of criticalDeps) {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
if (missingDeps.length > 0) {
|
|
88
|
-
logger.error(`
|
|
89
|
-
╔══════════════════════════════════════════════════════════════════╗
|
|
90
|
-
║ INCOMPLETE DEPENDENCIES ║
|
|
91
|
-
╠══════════════════════════════════════════════════════════════════╣
|
|
92
|
-
║ Required packages failed to install: ║
|
|
93
|
-
║ ║
|
|
94
|
-
${missingDeps.map((d) => `║ • ${d.padEnd(59)}║`).join("\n")}
|
|
95
|
-
║ ║
|
|
96
|
-
║ Common causes: ║
|
|
97
|
-
║ • npm install --production (skipped dependencies) ║
|
|
98
|
-
║ • Network interruption during install ║
|
|
99
|
-
║ • npm cache corruption ║
|
|
100
|
-
║ ║
|
|
101
|
-
║ How to fix: ║
|
|
102
|
-
║ ║
|
|
103
|
-
║ rm -rf node_modules package-lock.json ║
|
|
104
|
-
║ npm cache clean --force ║
|
|
105
|
-
║ npm install ║
|
|
106
|
-
║ ║
|
|
107
|
-
║ For global installs: ║
|
|
108
|
-
║ npm uninstall -g file-organizer-mcp ║
|
|
109
|
-
║ npm cache clean --force ║
|
|
110
|
-
║ npm install -g file-organizer-mcp ║
|
|
111
|
-
╚══════════════════════════════════════════════════════════════════╝
|
|
88
|
+
logger.error(`
|
|
89
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
90
|
+
║ INCOMPLETE DEPENDENCIES ║
|
|
91
|
+
╠══════════════════════════════════════════════════════════════════╣
|
|
92
|
+
║ Required packages failed to install: ║
|
|
93
|
+
║ ║
|
|
94
|
+
${missingDeps.map((d) => `║ • ${d.padEnd(59)}║`).join("\n")}
|
|
95
|
+
║ ║
|
|
96
|
+
║ Common causes: ║
|
|
97
|
+
║ • npm install --production (skipped dependencies) ║
|
|
98
|
+
║ • Network interruption during install ║
|
|
99
|
+
║ • npm cache corruption ║
|
|
100
|
+
║ ║
|
|
101
|
+
║ How to fix: ║
|
|
102
|
+
║ ║
|
|
103
|
+
║ rm -rf node_modules package-lock.json ║
|
|
104
|
+
║ npm cache clean --force ║
|
|
105
|
+
║ npm install ║
|
|
106
|
+
║ ║
|
|
107
|
+
║ For global installs: ║
|
|
108
|
+
║ npm uninstall -g file-organizer-mcp ║
|
|
109
|
+
║ npm cache clean --force ║
|
|
110
|
+
║ npm install -g file-organizer-mcp ║
|
|
111
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
112
112
|
`.trim());
|
|
113
113
|
process.exit(1);
|
|
114
114
|
}
|
|
@@ -123,18 +123,18 @@ async function main() {
|
|
|
123
123
|
const args = process.argv.slice(2);
|
|
124
124
|
// --help flag
|
|
125
125
|
if (args.includes("--help") || args.includes("-h")) {
|
|
126
|
-
logger.info(`
|
|
127
|
-
File Organizer MCP Server v${CONFIG.VERSION}
|
|
128
|
-
|
|
129
|
-
Usage:
|
|
130
|
-
npx file-organizer-mcp [options]
|
|
131
|
-
|
|
132
|
-
Options:
|
|
133
|
-
--setup, -s Run the interactive setup wizard
|
|
134
|
-
--version, -v Show version number
|
|
135
|
-
--help, -h Show this help message
|
|
136
|
-
|
|
137
|
-
For more information, visit: https://github.com/kridaydave/File-Organizer-MCP
|
|
126
|
+
logger.info(`
|
|
127
|
+
File Organizer MCP Server v${CONFIG.VERSION}
|
|
128
|
+
|
|
129
|
+
Usage:
|
|
130
|
+
npx file-organizer-mcp [options]
|
|
131
|
+
|
|
132
|
+
Options:
|
|
133
|
+
--setup, -s Run the interactive setup wizard
|
|
134
|
+
--version, -v Show version number
|
|
135
|
+
--help, -h Show this help message
|
|
136
|
+
|
|
137
|
+
For more information, visit: https://github.com/kridaydave/File-Organizer-MCP
|
|
138
138
|
`);
|
|
139
139
|
process.exit(0);
|
|
140
140
|
}
|
|
@@ -231,34 +231,34 @@ For more information, visit: https://github.com/kridaydave/File-Organizer-MCP
|
|
|
231
231
|
// Provide helpful error messages for common issues
|
|
232
232
|
if (errorMessage.includes("EPIPE") ||
|
|
233
233
|
errorMessage.includes("broken pipe")) {
|
|
234
|
-
logger.error(`
|
|
235
|
-
╔══════════════════════════════════════════════════════════════════╗
|
|
236
|
-
║ CONNECTION ERROR ║
|
|
237
|
-
╠══════════════════════════════════════════════════════════════════╣
|
|
238
|
-
║ The connection to Claude Desktop was broken. ║
|
|
239
|
-
║ ║
|
|
240
|
-
║ Common causes: ║
|
|
241
|
-
║ • Claude Desktop was closed ║
|
|
242
|
-
║ • Another MCP server is using the same stdio transport ║
|
|
243
|
-
║ • The MCP server was restarted too quickly ║
|
|
244
|
-
║ ║
|
|
245
|
-
║ To fix: ║
|
|
246
|
-
║ 1. Restart Claude Desktop ║
|
|
247
|
-
║ 2. Check for duplicate MCP server entries in config ║
|
|
248
|
-
║ 3. Wait a few seconds before restarting ║
|
|
249
|
-
╚══════════════════════════════════════════════════════════════════╝
|
|
234
|
+
logger.error(`
|
|
235
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
236
|
+
║ CONNECTION ERROR ║
|
|
237
|
+
╠══════════════════════════════════════════════════════════════════╣
|
|
238
|
+
║ The connection to Claude Desktop was broken. ║
|
|
239
|
+
║ ║
|
|
240
|
+
║ Common causes: ║
|
|
241
|
+
║ • Claude Desktop was closed ║
|
|
242
|
+
║ • Another MCP server is using the same stdio transport ║
|
|
243
|
+
║ • The MCP server was restarted too quickly ║
|
|
244
|
+
║ ║
|
|
245
|
+
║ To fix: ║
|
|
246
|
+
║ 1. Restart Claude Desktop ║
|
|
247
|
+
║ 2. Check for duplicate MCP server entries in config ║
|
|
248
|
+
║ 3. Wait a few seconds before restarting ║
|
|
249
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
250
250
|
`.trim());
|
|
251
251
|
}
|
|
252
252
|
else if (errorMessage.includes("ECONNREFUSED")) {
|
|
253
|
-
logger.error(`
|
|
254
|
-
╔══════════════════════════════════════════════════════════════════╗
|
|
255
|
-
║ CONNECTION REFUSED ║
|
|
256
|
-
╠══════════════════════════════════════════════════════════════════╣
|
|
257
|
-
║ Could not connect to the MCP transport. ║
|
|
258
|
-
║ ║
|
|
259
|
-
║ This usually means Claude Desktop is not running or ║
|
|
260
|
-
║ the MCP configuration is incorrect. ║
|
|
261
|
-
╚══════════════════════════════════════════════════════════════════╝
|
|
253
|
+
logger.error(`
|
|
254
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
255
|
+
║ CONNECTION REFUSED ║
|
|
256
|
+
╠══════════════════════════════════════════════════════════════════╣
|
|
257
|
+
║ Could not connect to the MCP transport. ║
|
|
258
|
+
║ ║
|
|
259
|
+
║ This usually means Claude Desktop is not running or ║
|
|
260
|
+
║ the MCP configuration is incorrect. ║
|
|
261
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
262
262
|
`.trim());
|
|
263
263
|
}
|
|
264
264
|
throw error;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.schemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/common.schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;iBAE/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;
|
|
1
|
+
{"version":3,"file":"common.schemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/common.schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;iBAE/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;iBAO7B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC/D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* File Organizer MCP Server v3.2.0
|
|
3
3
|
* Common Validation Schemas
|
|
4
4
|
*/
|
|
5
|
-
import { z } from
|
|
5
|
+
import { z } from "zod";
|
|
6
6
|
/**
|
|
7
7
|
* Base directory input schema
|
|
8
8
|
*/
|
|
9
9
|
export const DirectoryInputSchema = z.object({
|
|
10
|
-
directory: z.string().min(1,
|
|
10
|
+
directory: z.string().min(1, "Directory path is required"),
|
|
11
11
|
});
|
|
12
12
|
/**
|
|
13
13
|
* Schema for operations that can include subdirectories
|
|
@@ -27,8 +27,8 @@ export const PaginationSchema = z.object({
|
|
|
27
27
|
*/
|
|
28
28
|
export const CommonParamsSchema = z.object({
|
|
29
29
|
response_format: z
|
|
30
|
-
.enum([
|
|
31
|
-
.default(
|
|
30
|
+
.enum(["json", "markdown"])
|
|
31
|
+
.default("markdown")
|
|
32
32
|
.describe('Output format: "markdown" for human-readable, "json" for programmatic use'),
|
|
33
33
|
});
|
|
34
34
|
//# sourceMappingURL=common.schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.schemas.js","sourceRoot":"","sources":["../../../src/schemas/common.schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,4BAA4B,CAAC;CAC3D,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,MAAM,CAAC;IAC9D,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CAC5C,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC;IAC/C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;CAClD,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,eAAe,EAAE,CAAC;SACf,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;SAC1B,OAAO,CAAC,UAAU,CAAC;SACnB,QAAQ,
|
|
1
|
+
{"version":3,"file":"common.schemas.js","sourceRoot":"","sources":["../../../src/schemas/common.schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,4BAA4B,CAAC;CAC3D,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,MAAM,CAAC;IAC9D,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CAC5C,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC;IAC/C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;CAClD,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,eAAe,EAAE,CAAC;SACf,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;SAC1B,OAAO,CAAC,UAAU,CAAC;SACnB,QAAQ,CACP,2EAA2E,CAC5E;CACJ,CAAC,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* File Organizer MCP Server v3.2.0
|
|
3
3
|
* Schemas Module Exports
|
|
4
4
|
*/
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
5
|
+
export * from "./common.schemas.js";
|
|
6
|
+
export * from "./scan.schemas.js";
|
|
7
|
+
export * from "./organize.schemas.js";
|
|
8
|
+
export * from "./security.schemas.js";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* File Organizer MCP Server v3.2.0
|
|
3
3
|
* Schemas Module Exports
|
|
4
4
|
*/
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
5
|
+
export * from "./common.schemas.js";
|
|
6
|
+
export * from "./scan.schemas.js";
|
|
7
|
+
export * from "./organize.schemas.js";
|
|
8
|
+
export * from "./security.schemas.js";
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* File Organizer MCP Server v3.2.0
|
|
3
3
|
* Organize Operation Schemas
|
|
4
4
|
*/
|
|
5
|
-
import { z } from
|
|
6
|
-
import { DirectoryInputSchema } from
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { DirectoryInputSchema } from "./common.schemas.js";
|
|
7
7
|
/**
|
|
8
8
|
* Schema for organize_files tool
|
|
9
9
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
export const FindReplaceRuleSchema = z.object({
|
|
3
|
-
type: z.literal(
|
|
3
|
+
type: z.literal("find_replace"),
|
|
4
4
|
find: z.string().min(1),
|
|
5
5
|
replace: z.string(),
|
|
6
6
|
use_regex: z.boolean().default(false),
|
|
@@ -8,36 +8,36 @@ export const FindReplaceRuleSchema = z.object({
|
|
|
8
8
|
global: z.boolean().default(true), // Replace all occurrences
|
|
9
9
|
});
|
|
10
10
|
export const CaseRuleSchema = z.object({
|
|
11
|
-
type: z.literal(
|
|
11
|
+
type: z.literal("case"),
|
|
12
12
|
conversion: z.enum([
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
"lowercase",
|
|
14
|
+
"uppercase",
|
|
15
|
+
"camelCase",
|
|
16
|
+
"PascalCase",
|
|
17
|
+
"snake_case",
|
|
18
|
+
"kebab-case",
|
|
19
|
+
"Title Case",
|
|
20
20
|
]),
|
|
21
21
|
});
|
|
22
22
|
export const AddTextRuleSchema = z.object({
|
|
23
|
-
type: z.literal(
|
|
23
|
+
type: z.literal("add_text"),
|
|
24
24
|
text: z.string().min(1),
|
|
25
|
-
position: z.enum([
|
|
25
|
+
position: z.enum(["start", "end"]),
|
|
26
26
|
});
|
|
27
27
|
export const NumberingRuleSchema = z.object({
|
|
28
|
-
type: z.literal(
|
|
28
|
+
type: z.literal("numbering"),
|
|
29
29
|
start_at: z.number().int().default(1),
|
|
30
30
|
increment_by: z.number().int().default(1),
|
|
31
|
-
format: z.string().default(
|
|
32
|
-
separator: z.string().default(
|
|
33
|
-
location: z.enum([
|
|
31
|
+
format: z.string().default("search_index"), // 'search_index' means append to name, or simple format string like "%n - "
|
|
32
|
+
separator: z.string().default(" "),
|
|
33
|
+
location: z.enum(["start", "end"]).default("end"),
|
|
34
34
|
});
|
|
35
35
|
export const TrimRuleSchema = z.object({
|
|
36
|
-
type: z.literal(
|
|
36
|
+
type: z.literal("trim"),
|
|
37
37
|
chars: z.string().optional(), // Characters to trim, defaults to whitespace
|
|
38
|
-
position: z.enum([
|
|
38
|
+
position: z.enum(["start", "end", "both"]).default("both"),
|
|
39
39
|
});
|
|
40
|
-
export const RenameRuleSchema = z.discriminatedUnion(
|
|
40
|
+
export const RenameRuleSchema = z.discriminatedUnion("type", [
|
|
41
41
|
FindReplaceRuleSchema,
|
|
42
42
|
CaseRuleSchema,
|
|
43
43
|
AddTextRuleSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan.schemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/scan.schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"scan.schemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/scan.schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,oBAAoB;;iBAAuB,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;iBAEnC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;iBAEtC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,6BAA6B;;iBAAuB,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;iBAAuB,CAAC;AAEhE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* File Organizer MCP Server v3.2.0
|
|
3
3
|
* Scan Operation Schemas
|
|
4
4
|
*/
|
|
5
|
-
import { z } from
|
|
6
|
-
import { DirectoryInputSchema, RecursiveInputSchema } from
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { DirectoryInputSchema, RecursiveInputSchema, } from "./common.schemas.js";
|
|
7
7
|
/**
|
|
8
8
|
* Schema for list_files tool
|
|
9
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan.schemas.js","sourceRoot":"","sources":["../../../src/schemas/scan.schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"scan.schemas.js","sourceRoot":"","sources":["../../../src/schemas/scan.schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAEzD;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC,MAAM,CAAC;IAClE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CACzD,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,oBAAoB,CAAC,MAAM,CAAC;IACrE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CAC/C,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,oBAAoB,CAAC;AAElE;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security.schemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/security.schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,UAAU,aAKnB,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;
|
|
1
|
+
{"version":3,"file":"security.schemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/security.schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,UAAU,aAKnB,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;EAI7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,yBAA6B,CAAC;AAE7D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -2,21 +2,25 @@
|
|
|
2
2
|
* File Organizer MCP Server v3.2.0
|
|
3
3
|
* Security Validation Schemas
|
|
4
4
|
*/
|
|
5
|
-
import { z } from
|
|
5
|
+
import { z } from "zod";
|
|
6
6
|
/**
|
|
7
7
|
* Schema for path validation - ensures path is a valid non-empty string
|
|
8
8
|
* without null bytes (security check)
|
|
9
9
|
*/
|
|
10
10
|
export const PathSchema = z
|
|
11
11
|
.string()
|
|
12
|
-
.min(1,
|
|
13
|
-
.refine((path) => !path.includes(
|
|
14
|
-
message:
|
|
12
|
+
.min(1, "Path is required")
|
|
13
|
+
.refine((path) => !path.includes("\0"), {
|
|
14
|
+
message: "Path contains invalid null byte",
|
|
15
15
|
});
|
|
16
16
|
/**
|
|
17
17
|
* Schema for security mode configuration
|
|
18
18
|
*/
|
|
19
|
-
export const SecurityModeSchema = z.enum([
|
|
19
|
+
export const SecurityModeSchema = z.enum([
|
|
20
|
+
"strict",
|
|
21
|
+
"sandboxed",
|
|
22
|
+
"unrestricted",
|
|
23
|
+
]);
|
|
20
24
|
/**
|
|
21
25
|
* Schema for allowed paths configuration
|
|
22
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security.schemas.js","sourceRoot":"","sources":["../../../src/schemas/security.schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC;KAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;IACtC,OAAO,EAAE,iCAAiC;CAC3C,CAAC,CAAC;AAEL;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"security.schemas.js","sourceRoot":"","sources":["../../../src/schemas/security.schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC;KAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;IACtC,OAAO,EAAE,iCAAiC;CAC3C,CAAC,CAAC;AAEL;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,QAAQ;IACR,WAAW;IACX,cAAc;CACf,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* Supports min_file_age filtering and batch limits.
|
|
7
7
|
* Includes smart catchup for missed schedules.
|
|
8
8
|
*/
|
|
9
|
-
import { FileScannerService } from
|
|
10
|
-
import { OrganizerService } from
|
|
11
|
-
import { type UserConfig } from
|
|
12
|
-
import { SchedulerStateService } from
|
|
9
|
+
import { FileScannerService } from "./file-scanner.service.js";
|
|
10
|
+
import { OrganizerService } from "./organizer.service.js";
|
|
11
|
+
import { type UserConfig } from "../config.js";
|
|
12
|
+
import { SchedulerStateService } from "./scheduler-state.service.js";
|
|
13
13
|
export type ConfigLoader = () => UserConfig;
|
|
14
14
|
/**
|
|
15
15
|
* Auto-Organize Scheduler Service
|