Skip to content

Commit f28c39f

Browse files
feat(core): export the bounded document text extractor as @objectstack/core/document-text (#39016)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBH23HT1YJEmgJ6vSoWz5BSL)_ Part of #39008 (this PR is its first acceptance item; the second, the cloud card that switches PDF input to the extracted text, is filed by the seat when this lands) Clause-②: yes (widening) Metadata-protocol: none ## 维护者速读 - 用户无感:MCP 读文件工具的回答一字不变;平台多了一个公开入口,云端 AI 服务以后可以直接拿文档里的文字,不必再把 PDF 原文件交给模型。 - 为云端 AI 读 PDF 解决:不支持 PDF 的模型那一轮报错、费用随页数涨,这是它的前置一步。 - 出错会怎样:最坏是读 PDF、Word 的文字变慢或失败,读文件工具回一句读不了的说明;改动可整个撤回,无数据迁移。 - 要你做什么:无。 ## What changes The bounded document text extractor MCP `read_file` used (until now private to `@objectstack/mcp`) moves to `@objectstack/core` and is exported from a new Node-only subpath, **`@objectstack/core/document-text`**. The last public manifest of `@objectstack/service-ai` (npm 10.3.0) depends on `@objectstack/core`, `formula`, `spec` and `types`, never on `@objectstack/mcp`, so the AI service can use it without a new dependency (the cloud tree is not readable from here: the cloud follow-up card re-reads its manifest). - **Home**: a subpath like `@objectstack/core/egress`, kept off the main entry, so a host that never reads a document never loads `unpdf`. `unpdf` 1.9.1 moves from `@objectstack/mcp` dependencies to `@objectstack/core` (still a dynamic import on the first PDF; it stays an `@objectstack/mcp` devDependency for the suite's `vi.mock('unpdf')`). - **Moved verbatim**: the caps (100,000 characters, 200 PDF pages, 32 MiB inflated `.docx` body, 5 MiB image), the CPU budget per extraction and its wall-clock ceiling, the process-wide cap on extractions in flight and its refusal (`ReadFileExtractionBusyError`, 503, retryable), the worker pool and the worker entry (`packages/mcp/src/file-extraction-{pool,worker}.ts` → `packages/core/src/document-text-{pool,worker}.ts`, git renames; the extractor itself to `packages/core/src/document-text-extract.ts`). Names and the two host variables (`OS_MCP_READ_FILE_*`) are unchanged. - **The public entry is curated**: `packages/core/src/document-text.ts` re-exports exactly `extractFileContent` and `ExtractedContent`, `ReadFileExtractionBusyError`, the caps and bound constants (`READ_FILE_*`), `resolveReadFileExtractionLimits` / `configureReadFileExtraction` / `activeReadFileExtractionLimits` and `ReadFileExtractionLimits`, and `configureExtractionWorkerEntry` / `ExtractionWorkerEntry`. New beside the moved names: `activeReadFileExtractionLimits()` (the bounds now, failing on a malformed variable; `renderReadFile` calls it where it called the private one) and `configureExtractionWorkerEntry`, so a host that bundles core into one file can point the pool at the worker entry it ships. The rest (the document-only `extractDocument`, the worker protocol, the pool's stats and reset) stays internal. - **One state per process, whatever the copy**: the bounds, the count of extractions in flight and the pool live under a registered symbol on `globalThis` (`packages/core/src/document-text-state.ts`, key `objectstack.core.documentText.state.v1`, the pattern of `security/credential-use-client.ts`), so an ESM `import` and a CJS `require` of the subpath, or two installed versions, share one cap instead of admitting it once each. One fact stays per copy: whether a worker entry can be found beside that copy's own `import.meta.url` (the pool's `unavailableReason`), so a bundled copy that finds no worker never sends another copy, `read_file`'s included, to the request thread; an idle worker serves any copy first. `ReadFileExtractionBusyError` answers `instanceof` for a refusal from any copy (a symbol brand). A worker thread has its own `globalThis` and counts nothing. - **Buffer-safe hand-off to the worker**: the pool copies the caller's bytes with `new Uint8Array(bytes)` instead of `bytes.slice()`. A Node `Buffer` is a `Uint8Array` whose `slice` is a view over the same memory: a small one sits in Node's shared pool, which cannot be transferred (`DataCloneError`, the read rejects), and a large one would have its memory detached from the caller. Today's `read_file` bridge hands a `Uint8Array`; a public caller would naturally hand a `Buffer`. - **Build**: `packages/core/tsup.config.ts` builds `document-text` as an entry and `document-text-worker` beside it in both formats, with `shims: true` so the CJS build's `import.meta.url` finds the worker (nothing else in core reads `import.meta`, `__dirname` or `__filename`). `packages/mcp/tsup.config.ts` drops its worker entry. - **`read_file`**: `packages/mcp/src/file-content.ts` keeps `READ_FILE_MAX_BYTES`, the file bridge types and `renderReadFile`, and imports the extractor; `plugin.ts` and `mcp-http-tools.ts` import `configureReadFileExtraction` / `ReadFileExtractionBusyError` from the subpath. One process, one pool and one count, whoever asks. - **Docs**: `content/docs/ai/connect-mcp.mdx` says the two bounds cover every caller in the process; the platform checklist item `ai.mcp-read-file-pdf-word-extraction` repoints its anchors (revision 4, no clause changed). - **Test alias tables**: every vitest config that maps `@objectstack/core` to its source by prefix now maps `@objectstack/core/document-text` first (`mcp`, `runtime`, `metadata`, `driver-memory`, `driver-sql`, `knowledge-memory`, `knowledge-pgvector`, `knowledge-turso`, `plugin-dev`, `plugin-hono-server`); `check:test-source-alias` found them, and `runtime` was a live ENOTDIR (its tests reach `@objectstack/mcp`). <details><summary>Read first (by risk)</summary> 1. `packages/core/src/document-text-state.ts`: the shared state and its key; the suffix must change whenever the state's shape or the worker protocol does. 2. `packages/core/tsup.config.ts`: the worker entry and `shims`; a CJS build that cannot find the worker silently reads in-process (still bounded). `shims` changes no other entry: `dist/logger.{js,cjs}`, `dist/index.js` and `dist/egress.cjs` carry no shim, only `dist/document-text.cjs` does. 3. `packages/core/src/document-text-pool.ts`: the worker URL is now `./document-text-worker.(c)js` beside `document-text.(c)js`. 4. `packages/core/src/document-text.worker-pool.test.ts`: the worker pins, moved from the MCP suite and re-asserted on the extractor's answer. </details> ## Tests At `b2b49cb9`: - `pnpm --filter @objectstack/core test`: 161 files, 3,839 passed. `pnpm --filter @objectstack/mcp exec vitest run`: 89 files, 1,659 passed. - `packages/runtime` (at `a48aefc4`; nothing it reaches changed since) `src/mcp-record-file-bridge.test.ts` and `src/domains/mcp-object-schema-mask.test.ts` (after the alias fix): 2 files, 87 passed. - `pnpm --filter @objectstack/core typecheck` and `pnpm --filter @objectstack/mcp typecheck`: clean, test-typecheck ledgers held. - The ten worker-pool pins (`read_file extracts PDF and Word text on a worker pool…` and `…stopped at its wall-clock ceiling before the first page…`) moved from `packages/mcp/src/mcp-file-tools.test.ts` to `packages/core/src/document-text.worker-pool.test.ts`: same cases, same inputs, asserting the extractor's `ExtractedContent` (or its rejection) instead of the `read_file` blocks. How `read_file` renders each shape (facts, note, the coded busy refusal, the could-not-read sentence for a rejected read) stays pinned in-process in the MCP suite, which keeps its other 44 tests and `automated.ref`. - New: `packages/core/src/document-text.shared-state.test.ts` (5 tests) loads two module copies of the public entry and pins that bounds set through one bind the other, an extraction in flight through one is refused by the other at a cap of 1, and a refusal from either is `instanceof` both classes (and a look-alike error is not). With the state key swapped for a plain `Symbol()`, 3 of the first 4 fail. The fifth pins that one copy's "cannot start" is its own: a second copy looks for its own entry, and a copy that recorded one still takes an idle worker another copy started; with the verdict back in the shared state it fails. New in the worker suite: a pooled and a non-pooled `Buffer` each read on a worker and are left unchanged; with `slice()` restored it fails with `DataCloneError`. - Built-output smoke, one process loading both builds: `import('@objectstack/core/document-text')` and `require('@objectstack/core/document-text')` are distinct modules; bounds set through the ESM copy are what the CJS copy reads; with a cap of 1, a read held through the ESM copy makes the CJS copy refuse with `SERVICE_UNAVAILABLE`, `instanceof` both classes; each then reads a one-page PDF on a real worker with no fallback warning. The ESM export list is exactly the 15 curated runtime names (the three curated types beside them have no runtime form). `@objectstack/mcp`'s built `dist/index.{js,cjs}` carries no copy of the extractor (`getDocumentProxy` 0 hits) and imports the subpath; core's main `dist/index.js` carries none either. ## Gates Local, re-run in full at `e1cb87d2` after the review fixes: `dispatch-gates --commands` derived 127 commands over this change set; 126 green, including `check:dual-build-cjs-loads`, `check:published-readme-exports`, `@objectstack/spec check:skill-examples`, `check:query-options-erasure`, `check:test-source-alias` and `check:platform-checklist` (each unmeasured or red in the first round: the first four lacked a full build or were killed with the container, and the alias tables fixed the fifth). NOT MEASURED, prerequisite not met (exit 3): `check-plugin-teardown-shape --self-test`, whose fixture is pinned to a commit a shallow clone cannot reach; CI runs it. `check-platform-checklist --changed-from origin/main`: 30 anchors judged, 0 lost. After the S3 fix (`b2b49cb9`): core tests and typecheck, the MCP suite, `check:test-source-alias` and `check-platform-checklist --changed-from origin/main` re-run green, and the built ESM-plus-CJS smoke repeated. CI on `b2b49cb9`: 75 check-runs, 64 success and 11 skipped, none failed; mergeable state clean. ## Acceptance notes - The Buffer hand-off fix changes one `read_file` answer: on a built worker, a Node `Buffer` small enough to sit in Node's shared pool used to fail the transfer and answer the could-not-read sentence; it now reads. The changeset names it. - Two installed versions of core with the same state key share idle workers too, so one version's job can run on the other's worker. The `.v1` suffix guards the worker protocol; bumping it when the protocol changes is a comment in `document-text-state.ts` with no pin yet (contract review N4, accepted; a pin belongs on a follow-up card). - The extractor's `kind: 'none'` sentences were written for `read_file`: two name the tool and all say "Download it with the link instead". A caller that hands them to a model with no link (the cloud follow-up) should know; changing them changes `read_file`'s answers, so they are left as they are. `carrier: cloud` (the follow-up card). - The constant names keep the `READ_FILE_` prefix and the host variables keep `OS_MCP_READ_FILE_*`, now bounding every caller. Renaming them is a separate change through the deprecation helper, not this PR. - Two copies of `@objectstack/core` in one process (ESM and CJS, or two installed versions) now share one pool and one count, as long as they carry the same state key suffix. - One operator-visible change: the one-time `warn` when no worker can start now reads `[document-text] PDF and Word text (read_file and every other caller) is extracted on the request thread, not on a worker: …` (was `[MCP] read_file extracts PDF and Word text on the request thread, not on a worker: …`). The changeset and `connect-mcp.mdx` say so; a log alert on the old text needs the new one. - Found while smoking, not changed here (since #31828, moved verbatim): a short-lived script that reads a PDF or Word file on a worker does not exit by itself afterwards, because the pool pipes each worker's stdout to the parent's stderr and a piped worker stream holds the event loop open even after `worker.unref()` (reproduced with a bare `Worker`; a `data` listener does the same). A server never notices; a CLI or batch script calling the extractor would. Follow-up card for the seat to file. - `unpdf` (2.1 MB unpacked, no dependencies) now installs with `@objectstack/core`. Every server install already had it through `@objectstack/runtime` → `@objectstack/mcp`. ## Verification `node -e "import('@objectstack/core/document-text').then(m => console.log(Object.keys(m).includes('extractFileContent')))"` from `packages/core` after `pnpm --filter @objectstack/core build`: prints `true`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WGufzegtzKWMxkohs9dHSd <!-- signed: repo:objectstack@os-support-ai · os-support-ai · session_01WGufzegtzKWMxkohs9dHSd --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent f42afe7 commit f28c39f

29 files changed

Lines changed: 1646 additions & 1215 deletions
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
'@objectstack/core': patch
3+
'@objectstack/mcp': patch
4+
---
5+
6+
feat(core): the bounded document text extractor is exported as `@objectstack/core/document-text`
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
The extractor MCP `read_file` reads PDF, Word, text and image files with now lives in `@objectstack/core` and is exported from a Node-only subpath, so a service that depends on the kernel package (an AI service handing a model a document's text instead of the document) uses it without depending on `@objectstack/mcp`:
12+
13+
```ts
14+
import { extractFileContent, ReadFileExtractionBusyError } from '@objectstack/core/document-text';
15+
16+
const content = await extractFileContent(bytes, mimeType, fileName);
17+
// { kind: 'text', text, truncated, format, note? } | { kind: 'image', data, mimeType } | { kind: 'none', reason }
18+
```
19+
20+
It keeps every bound `read_file`'s extraction had (how many bytes to read at all stays the caller's cap: `read_file` keeps its 10 MiB `READ_FILE_MAX_BYTES`, and a text or image file is decoded on the calling thread at whatever size it is handed):
21+
22+
- at most 100,000 characters of text (`READ_FILE_TEXT_MAX_CHARS`), 200 PDF pages, a 32 MiB inflated Word body and a 5 MiB image;
23+
- a CPU-time budget per PDF or Word extraction (`OS_MCP_READ_FILE_CPU_BUDGET_MS`, default 2000 ms), checked between pages and paragraphs, with a wall-clock ceiling of five budgets on a worker;
24+
- a `worker_threads` pool and a process-wide cap on extractions in flight (`OS_MCP_READ_FILE_MAX_CONCURRENT`, default 4); one more is refused at once with `ReadFileExtractionBusyError` (`SERVICE_UNAVAILABLE`, 503, `retryAfterSeconds`), never queued.
25+
26+
Every caller in one process shares the bounds, the pool and the count, so the cap holds whoever asks, and through whichever copy of the package: an ESM `import` and a CJS `require` of the subpath (or two installed versions) share one state under a registered symbol, and `instanceof ReadFileExtractionBusyError` recognises a refusal from any copy. A host that bundles `@objectstack/core` into one file ships `dist/document-text-worker.js` (or `.cjs`) beside its bundle, or points the pool at wherever it put that file with `configureExtractionWorkerEntry` (the file is addressed by path; no `exports` entry names it). Without a worker, that copy extracts on the request thread under the same two bounds, said once at `warn`; another copy in the same process that finds its worker keeps reading on workers, and an idle worker serves any copy.
27+
28+
The subpath is kept off the main entry, so a host that never reads a document never loads `unpdf`, which is now a dependency of `@objectstack/core` instead of `@objectstack/mcp`. `read_file` reads through the shared extractor and answers as before; the two host variables keep their names and defaults. One fix on the way: the pool now copies the bytes it hands a worker into a fresh `Uint8Array` instead of slicing them, so a Node `Buffer` (whose `slice` is a view over shared memory) reads on a worker instead of failing to transfer, which `read_file` answered with its could-not-read sentence, and the caller's `Buffer` is left intact. One operator-visible change: the one-time `warn` when no worker can start now reads `[document-text] PDF and Word text (read_file and every other caller) is extracted on the request thread, not on a worker: …` (was `[MCP] read_file extracts PDF and Word text on the request thread, not on a worker: …`), since it now speaks for every caller; a log alert matching the old text needs the new one.

‎content/docs/ai/connect-mcp.mdx‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,14 @@ The defaults keep a self-hosted deployment reading files as before: a 9 MiB,
486486
inside the budget. Both are read once when the server starts; a value that is
487487
not a positive whole number stops the start with a message naming the variable.
488488

489+
The extractor behind `read_file` is the platform's shared one,
490+
`@objectstack/core/document-text`, so an AI service in the same process reads
491+
documents under the same two bounds: the cap counts every extraction in flight,
492+
whoever asked for it. If no worker can start (a host that bundled the server
493+
into one file), files are read on the request thread under the same two bounds,
494+
said once in the log as `[document-text] PDF and Word text … is extracted on the
495+
request thread, not on a worker`.
496+
489497
The tools are a fixed ~10-tool **spine** with the object name as a *parameter*
490498
(`query_records(objectName, …)`), not one tool per object — so the list stays
491499
usable on an app with hundreds of objects. Which objects and actions that spine

‎docs/qa/platform-checklist/areas/ai.json‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@
12631263
"title": "read_file answers the text of a PDF and a Word document with its facts, stops a long extraction at the CPU-time budget with a note, refuses past the concurrent-reading cap with a retryable 503, and a malformed budget variable fails the boot naming it",
12641264
"since": "v18.4",
12651265
"status": "active",
1266-
"revision": 3,
1266+
"revision": 4,
12671267
"priority": "P1",
12681268
"surface": "api",
12691269
"personas": [
@@ -1295,7 +1295,7 @@
12951295
{
12961296
"clause": "a Word document answers its paragraphs as text",
12971297
"oracle": "network",
1298-
"verify": "facts carry content 'text' and the .docx mime type as format; the text block holds the document's paragraphs (packages/mcp/src/file-content.ts#extractFileContent)",
1298+
"verify": "facts carry content 'text' and the .docx mime type as format; the text block holds the document's paragraphs (packages/core/src/document-text-extract.ts#extractFileContent)",
12991299
"evidence": "both content blocks"
13001300
},
13011301
{
@@ -1307,13 +1307,13 @@
13071307
{
13081308
"clause": "an extraction over the CPU-time budget answers the text read so far, truncated, with the budget note",
13091309
"oracle": "network",
1310-
"verify": "facts carry content 'text', truncated true and a note opening 'Reading stopped at the CPU-time budget for one file (60 ms) after page', the budget the boot carries (packages/mcp/src/file-content.ts#pdfAnswer, #stoppedExtractionAnswer, #READ_FILE_CPU_BUDGET_MS_ENV). A budget spent before the first page's text answers the zero-page shape instead: content 'none', no truncated, and the budget sentence as the note (pdfAnswer's empty arm hands the budget note over as its reason). That shape is a fixture budget too low for the host, not this clause's verdict: record it and read again at a higher budget. Whether a stopped read must always carry truncated true is open for the maintainer (#32945); until it is ruled, the zero-page shape is no FAIL",
1310+
"verify": "facts carry content 'text', truncated true and a note opening 'Reading stopped at the CPU-time budget for one file (60 ms) after page', the budget the boot carries (packages/core/src/document-text-extract.ts#pdfAnswer, #stoppedExtractionAnswer, #READ_FILE_CPU_BUDGET_MS_ENV). A budget spent before the first page's text answers the zero-page shape instead: content 'none', no truncated, and the budget sentence as the note (pdfAnswer's empty arm hands the budget note over as its reason). That shape is a fixture budget too low for the host, not this clause's verdict: record it and read again at a higher budget. Whether a stopped read must always carry truncated true is open for the maintainer (#32945); until it is ruled, the zero-page shape is no FAIL",
13111311
"evidence": "the facts block"
13121312
},
13131313
{
13141314
"clause": "a malformed budget variable fails the boot naming the variable",
13151315
"oracle": "log",
1316-
"verify": "the boot fails with 'OS_MCP_READ_FILE_CPU_BUDGET_MS must be a positive integer; got \"abc\"' (packages/mcp/src/file-content.ts#configureReadFileExtraction, called from the MCP plugin's init)",
1316+
"verify": "the boot fails with 'OS_MCP_READ_FILE_CPU_BUDGET_MS must be a positive integer; got \"abc\"' (packages/core/src/document-text-extract.ts#configureReadFileExtraction, called from the MCP plugin's init)",
13171317
"evidence": "the exit code and the log line"
13181318
},
13191319
{
@@ -1336,10 +1336,10 @@
13361336
},
13371337
"source": [
13381338
"packages/mcp/src/file-content.ts#renderReadFile",
1339-
"packages/mcp/src/file-content.ts#extractFileContent",
1340-
"packages/mcp/src/file-content.ts#stoppedExtractionAnswer",
1341-
"packages/mcp/src/file-content.ts#configureReadFileExtraction",
1342-
"packages/mcp/src/file-content.ts#ReadFileExtractionBusyError",
1339+
"packages/core/src/document-text-extract.ts#extractFileContent",
1340+
"packages/core/src/document-text-extract.ts#stoppedExtractionAnswer",
1341+
"packages/core/src/document-text-extract.ts#configureReadFileExtraction",
1342+
"packages/core/src/document-text-extract.ts#ReadFileExtractionBusyError",
13431343
"packages/mcp/src/mcp-http-tools.ts#registerFileTools"
13441344
],
13451345
"history": [
@@ -1352,14 +1352,20 @@
13521352
{
13531353
"revision": 2,
13541354
"date": "2026-11-13",
1355-
"change": "assertion-defect correction of acceptance[3] (with fixtures.requires[2] and [3], steps[0] and steps[2]). At OS_MCP_READ_FILE_CPU_BUDGET_MS=1 the budget is spent before the first page, so pdfAnswer's empty arm answers content 'none' with the budget note and no truncated (packages/mcp/src/file-content.ts#pdfAnswer); at 60 the clause's shape appears. The fixture budget is raised to 60, the clause names the zero-page shape as a fixture signal to re-read at a higher budget, and leaves open whether a stopped read must always carry truncated true (if ruled so, that is a product defect in pdfAnswer's empty arm, not this item's). The receipt field is on showcase_invoice_line, not showcase_invoice (examples/app-showcase/src/data/objects/invoice.object.ts), so the fixture and steps name the invoice line. Found by the 18.4.0 acceptance run #32940 (F-4 to F-8 and its R4/R5 comments; wave anchor #32908). Re-read at main cf1b55c0. Card #32945",
1355+
"change": "assertion-defect correction of acceptance[3] (with fixtures.requires[2] and [3], steps[0] and steps[2]). At OS_MCP_READ_FILE_CPU_BUDGET_MS=1 the budget is spent before the first page, so pdfAnswer's empty arm answers content 'none' with the budget note and no truncated (packages/core/src/document-text-extract.ts#pdfAnswer, where the extractor moved in revision 4); at 60 the clause's shape appears. The fixture budget is raised to 60, the clause names the zero-page shape as a fixture signal to re-read at a higher budget, and leaves open whether a stopped read must always carry truncated true (if ruled so, that is a product defect in pdfAnswer's empty arm, not this item's). The receipt field is on showcase_invoice_line, not showcase_invoice (examples/app-showcase/src/data/objects/invoice.object.ts), so the fixture and steps name the invoice line. Found by the 18.4.0 acceptance run #32940 (F-4 to F-8 and its R4/R5 comments; wave anchor #32908). Re-read at main cf1b55c0. Card #32945",
13561356
"ref": "#32945"
13571357
},
13581358
{
13591359
"revision": 3,
13601360
"date": "2026-11-15",
13611361
"change": "acceptance[5].verify names `--reporter=tree`, the reporter that prints the one line per pin file this is scored on: in a runner's non-TTY shell vitest's default reporter prints the run's totals only (RUNNER.md's environment facts; QA run #33784's note 10, comment 6893243542). No clause or threshold changed. Card #33969",
13621362
"ref": "#34068"
1363+
},
1364+
{
1365+
"revision": 4,
1366+
"date": "2026-12-02",
1367+
"change": "anchor repoint, no clause, step, fixture or threshold changed: the extractor read_file reads through (its caps, the CPU budget, the worker pool, the cap on reads in flight and the busy refusal) moved from packages/mcp/src/file-content.ts to the shared packages/core/src/document-text-extract.ts (published through the curated entry packages/core/src/document-text.ts, export @objectstack/core/document-text), so acceptance[1], [3] and [4], source and revision 2's citation name it there; renderReadFile and READ_FILE_MAX_BYTES stay in the MCP file. The worker-pool pins moved beside the pool (packages/core/src/document-text.worker-pool.test.ts); the pins acceptance[5] scores stay in automated.ref. Card #39008",
1368+
"ref": "#39008"
13631369
}
13641370
]
13651371
},

‎packages/core/package.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@
3737
"types": "./dist/logger.d.cts",
3838
"default": "./dist/logger.cjs"
3939
}
40+
},
41+
"./document-text": {
42+
"import": {
43+
"types": "./dist/document-text.d.ts",
44+
"default": "./dist/document-text.js"
45+
},
46+
"require": {
47+
"types": "./dist/document-text.d.cts",
48+
"default": "./dist/document-text.cjs"
49+
}
4050
}
4151
},
4252
"scripts": {
@@ -60,6 +70,7 @@
6070
"@objectstack/spec": "workspace:*",
6171
"@objectstack/types": "workspace:*",
6272
"undici": "^7.30.1",
73+
"unpdf": "1.9.1",
6374
"zod": "^4.6.6"
6475
},
6576
"keywords": [

0 commit comments

Comments
 (0)