document-mcp 1.4.1 → 1.4.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/README.md +10 -5
- package/dist/bin.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -54,11 +54,12 @@ Requires Node.js `>=20` and pnpm `11.6.0` (pinned via `packageManager` in `packa
|
|
|
54
54
|
|
|
55
55
|
```sh
|
|
56
56
|
pnpm install
|
|
57
|
-
pnpm build # tsdown -> dist/ (ESM + CJS + .d.ts)
|
|
58
|
-
pnpm typecheck # tsc --noEmit
|
|
59
|
-
pnpm lint # eslint . --fix --cache --max-warnings 0
|
|
60
|
-
pnpm test # vitest run --project unit
|
|
61
|
-
pnpm test:
|
|
57
|
+
pnpm build # turbo -> tsdown -> dist/ (ESM + CJS + .d.ts)
|
|
58
|
+
pnpm typecheck # turbo -> tsc --noEmit
|
|
59
|
+
pnpm lint # turbo -> eslint . --fix --cache --max-warnings 0
|
|
60
|
+
pnpm test # turbo -> vitest run --project unit
|
|
61
|
+
pnpm test:workers # turbo -> vitest under the real Cloudflare Workers runtime (workerd) via @cloudflare/vitest-pool-workers, driving createServer() through an in-memory JSON-RPC pair
|
|
62
|
+
pnpm test:smoke # turbo -> tsdown then vitest --project smoke -- spawns dist/bin.js as a real subprocess driven over genuine MCP stdio
|
|
62
63
|
```
|
|
63
64
|
|
|
64
65
|
Once published, run the server directly via `npx document-mcp` (stdio transport, no install step needed).
|
|
@@ -127,6 +128,10 @@ Every tool that takes or produces document bytes goes through the same two hybri
|
|
|
127
128
|
- [document-cli](https://github.com/ExaDev/document-cli) — the sibling CLI/TUI over the same library, whose toolchain this repository's scaffold mirrors.
|
|
128
129
|
- [Model Context Protocol](https://modelcontextprotocol.io) — the protocol this server implements, via [`@modelcontextprotocol/server`](https://www.npmjs.com/package/@modelcontextprotocol/server).
|
|
129
130
|
|
|
131
|
+
## Gotchas
|
|
132
|
+
|
|
133
|
+
- **Runtime dependencies are `documents.js` + `@modelcontextprotocol/server` + `zod` only; `pdf-codec` and `odf.js` are devDependencies (test-support only).** Every runtime reach into either — `ProvidedFont`/`FontSubstitution`/`describeFontFace`/the `WinAnsi` substitution shape — goes through `documents.js`'s own re-exports, so a published install pulls in no direct `pdf-codec`/`odf.js` dependency. `odf.js` survives in `devDependencies` solely because `src/test-support/odm-fixture.ts` and `src/test-support/embedded-font-fixture.ts` build real ODF package fixtures from its low-level XML primitives (`zipPackage`/`el`/`rootElement`), and `src/test-support/` is excluded from the `tsdown` build — only `src/index.ts` and `src/bin.ts` are entry points — so neither fixture module ever ships in `dist/`.
|
|
134
|
+
|
|
130
135
|
## License
|
|
131
136
|
|
|
132
137
|
MIT
|
package/dist/bin.js
CHANGED
|
@@ -7,7 +7,7 @@ import { readFile, writeFile } from "node:fs/promises";
|
|
|
7
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
8
8
|
import { basename, join } from "node:path";
|
|
9
9
|
//#region package.json
|
|
10
|
-
var version = "1.4.
|
|
10
|
+
var version = "1.4.2";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/io/document-input.ts
|
|
13
13
|
const EXTENSION_TO_FORMAT = {
|
package/dist/index.cjs
CHANGED
|
@@ -6,7 +6,7 @@ let node_fs_promises = require("node:fs/promises");
|
|
|
6
6
|
let node_fs = require("node:fs");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
//#region package.json
|
|
9
|
-
var version = "1.4.
|
|
9
|
+
var version = "1.4.2";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/io/document-input.ts
|
|
12
12
|
const EXTENSION_TO_FORMAT = {
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { readFile, writeFile } from "node:fs/promises";
|
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
import { basename, join } from "node:path";
|
|
7
7
|
//#region package.json
|
|
8
|
-
var version = "1.4.
|
|
8
|
+
var version = "1.4.2";
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/io/document-input.ts
|
|
11
11
|
const EXTENSION_TO_FORMAT = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document-mcp",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "MCP (Model Context Protocol) server exposing documents.js's document-conversion, .odb, metadata, and font tooling as MCP tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"husky": "^9.1.7",
|
|
105
105
|
"lint-staged": "^17.3.0",
|
|
106
106
|
"odf.js": "^2.3.1",
|
|
107
|
-
"pdf-codec": "^2.1.
|
|
107
|
+
"pdf-codec": "^2.1.3",
|
|
108
108
|
"publint": "^0.3.22",
|
|
109
109
|
"semantic-release": "^25.0.8",
|
|
110
110
|
"tsdown": "^0.22.14",
|