@intactfile/mcp 0.2.0 → 0.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/dist/index.js +17 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -30,6 +30,9 @@ const OUT_EXT = {
|
|
|
30
30
|
archive: "",
|
|
31
31
|
audio: ".wav",
|
|
32
32
|
avi: ".avi",
|
|
33
|
+
raw: ".dng",
|
|
34
|
+
psd: ".psd",
|
|
35
|
+
"office-legacy": ".doc",
|
|
33
36
|
};
|
|
34
37
|
function writeOut(input, out, r) {
|
|
35
38
|
if (r.kind === "archive") {
|
|
@@ -47,7 +50,20 @@ function writeOut(input, out, r) {
|
|
|
47
50
|
return written;
|
|
48
51
|
}
|
|
49
52
|
const p = parse(input);
|
|
50
|
-
const
|
|
53
|
+
const rep = r.report;
|
|
54
|
+
// A salvaged preview (RAW embedded JPEG, PSD thumbnail-only) is a JPEG, not the
|
|
55
|
+
// native container — name it accordingly.
|
|
56
|
+
const rawPreview = r.kind === "file" && r.family === "raw" && rep.previewSource != null;
|
|
57
|
+
const psdThumb = r.kind === "file" && r.family === "psd" && rep.output === "jpeg";
|
|
58
|
+
let dest;
|
|
59
|
+
if (out)
|
|
60
|
+
dest = out;
|
|
61
|
+
else if (rawPreview)
|
|
62
|
+
dest = join(p.dir, `${p.name}.preview.jpg`);
|
|
63
|
+
else if (psdThumb)
|
|
64
|
+
dest = join(p.dir, `${p.name}.thumbnail.jpg`);
|
|
65
|
+
else
|
|
66
|
+
dest = join(p.dir, `${p.name}.repaired${p.ext || OUT_EXT[r.family]}`);
|
|
51
67
|
writeFileSync(dest, r.bytes);
|
|
52
68
|
return [dest];
|
|
53
69
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intactfile/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "IntactFile MCP server — repair corrupted files from your AI agent, locally. Discovery + diagnosis are free; repair requires an active Business subscription. Files never leave your machine.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
18
18
|
"zod": "^3.23.8",
|
|
19
|
-
"@intactfile/node-core": "0.
|
|
19
|
+
"@intactfile/node-core": "0.3.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/node": "^22.15.0",
|