document-mcp 1.1.7 → 1.2.1

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 CHANGED
@@ -91,7 +91,7 @@ Or, for local development against a checkout of this repository rather than the
91
91
 
92
92
  Every tool that takes or produces document bytes goes through the same two hybrid shapes, documented once here rather than repeated per tool below.
93
93
 
94
- **Input** (`DocumentInput`) is a union: either a filesystem `path` (the format is inferred from the file extension — `docx`, `pptx`, `xlsx`, `odt`, `odp`, `ods`, `odg`, `odf`, `md`/`markdown`, `pdf`), or inline `bytesBase64` plus an explicit `format` (required, since inline bytes carry no filename to infer one from). `.odb` tools are the one exception: a `.odb` has no single `DocumentFormat` of its own (it is a database front end, not a document — tables, saved queries, and reports are three unrelated output shapes), so their `source.path`/`source.bytesBase64` bytes are read directly with no format inference at all.
94
+ **Input** (`DocumentInput`) is a union: either a filesystem `path` (the format is inferred from the file extension — `docx`, `pptx`, `xlsx`, `odt`, `odp`, `ods`, `odg`, `odf`, `md`/`markdown`, `pdf`), or inline `bytesBase64` plus an explicit `format` (required, since inline bytes carry no filename to infer one from). Each ODF/OOXML template and macro-enabled variant also reads as its base format: `.ott`/`.ots`/`.otp`/`.otg`/`.otf` as `odt`/`ods`/`odp`/`odg`/`odf`, and `.dotx`/`.potx`/`.xltx` (templates) or `.docm`/`.xlsm`/`.pptm` (macro-enabled) as their OOXML base — a template is the same package with a `-template` mimetype, and a macro-enabled file carries a `vbaProject` part this library reads past without executing or re-emitting. `.odb` tools are the one exception: a `.odb` has no single `DocumentFormat` of its own (it is a database front end, not a document — tables, saved queries, and reports are three unrelated output shapes), so their `source.path`/`source.bytesBase64` bytes are read directly with no format inference at all.
95
95
 
96
96
  **Output** (`DocumentOutput`), on every tool that produces a document, is a single optional `outputPath`: supply it to have the tool write the result to that filesystem path (the response then reports `{ path, byteLength }`); omit it to receive the bytes inline instead (`{ bytesBase64, byteLength }`, flagged `large: true` above 5 MB — advisory only, the bytes are never truncated or refused).
97
97
 
package/dist/bin.js CHANGED
@@ -8,18 +8,29 @@ import { readFontFace } from "pdf-codec";
8
8
  import { existsSync, readFileSync } from "node:fs";
9
9
  import { basename, join } from "node:path";
10
10
  //#region package.json
11
- var version = "1.1.7";
11
+ var version = "1.2.1";
12
12
  //#endregion
13
13
  //#region src/io/document-input.ts
14
14
  const EXTENSION_TO_FORMAT = {
15
15
  docx: "docx",
16
+ dotx: "docx",
17
+ docm: "docx",
16
18
  pptx: "pptx",
19
+ potx: "pptx",
20
+ pptm: "pptx",
17
21
  xlsx: "xlsx",
22
+ xltx: "xlsx",
23
+ xlsm: "xlsx",
18
24
  odt: "odt",
25
+ ott: "odt",
19
26
  odp: "odp",
27
+ otp: "odp",
20
28
  ods: "ods",
29
+ ots: "ods",
21
30
  odg: "odg",
31
+ otg: "odg",
22
32
  odf: "odf",
33
+ otf: "odf",
23
34
  markdown: "markdown",
24
35
  md: "markdown",
25
36
  pdf: "pdf"
package/dist/index.cjs CHANGED
@@ -7,18 +7,29 @@ let pdf_codec = require("pdf-codec");
7
7
  let node_fs = require("node:fs");
8
8
  let node_path = require("node:path");
9
9
  //#region package.json
10
- var version = "1.1.7";
10
+ var version = "1.2.1";
11
11
  //#endregion
12
12
  //#region src/io/document-input.ts
13
13
  const EXTENSION_TO_FORMAT = {
14
14
  docx: "docx",
15
+ dotx: "docx",
16
+ docm: "docx",
15
17
  pptx: "pptx",
18
+ potx: "pptx",
19
+ pptm: "pptx",
16
20
  xlsx: "xlsx",
21
+ xltx: "xlsx",
22
+ xlsm: "xlsx",
17
23
  odt: "odt",
24
+ ott: "odt",
18
25
  odp: "odp",
26
+ otp: "odp",
19
27
  ods: "ods",
28
+ ots: "ods",
20
29
  odg: "odg",
30
+ otg: "odg",
21
31
  odf: "odf",
32
+ otf: "odf",
22
33
  markdown: "markdown",
23
34
  md: "markdown",
24
35
  pdf: "pdf"
package/dist/index.js CHANGED
@@ -6,18 +6,29 @@ import { readFontFace } from "pdf-codec";
6
6
  import { existsSync, readFileSync } from "node:fs";
7
7
  import { basename, join } from "node:path";
8
8
  //#region package.json
9
- var version = "1.1.7";
9
+ var version = "1.2.1";
10
10
  //#endregion
11
11
  //#region src/io/document-input.ts
12
12
  const EXTENSION_TO_FORMAT = {
13
13
  docx: "docx",
14
+ dotx: "docx",
15
+ docm: "docx",
14
16
  pptx: "pptx",
17
+ potx: "pptx",
18
+ pptm: "pptx",
15
19
  xlsx: "xlsx",
20
+ xltx: "xlsx",
21
+ xlsm: "xlsx",
16
22
  odt: "odt",
23
+ ott: "odt",
17
24
  odp: "odp",
25
+ otp: "odp",
18
26
  ods: "ods",
27
+ ots: "ods",
19
28
  odg: "odg",
29
+ otg: "odg",
20
30
  odf: "odf",
31
+ otf: "odf",
21
32
  markdown: "markdown",
22
33
  md: "markdown",
23
34
  pdf: "pdf"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-mcp",
3
- "version": "1.1.7",
3
+ "version": "1.2.1",
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": {