@cyanheads/mcp-ts-core 0.6.11 → 0.6.13

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/CLAUDE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Agent Protocol
2
2
 
3
- **Package:** `@cyanheads/mcp-ts-core` · **Version:** 0.6.11
3
+ **Package:** `@cyanheads/mcp-ts-core` · **Version:** 0.6.12
4
4
  **npm:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) · **Docker:** [ghcr.io/cyanheads/mcp-ts-core](https://ghcr.io/cyanheads/mcp-ts-core)
5
5
 
6
6
  > **Developer note:** Never assume. Read related files and docs before making changes. Read full file content for context. Never edit a file before reading it.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  <div align="center">
7
7
 
8
- [![Version](https://img.shields.io/badge/Version-0.6.11-blue.svg?style=flat-square)](./CHANGELOG.md) [![MCP Spec](https://img.shields.io/badge/MCP%20Spec-2025--11--25-8A2BE2.svg?style=flat-square)](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE)
8
+ [![Version](https://img.shields.io/badge/Version-0.6.13-blue.svg?style=flat-square)](./CHANGELOG.md) [![MCP Spec](https://img.shields.io/badge/MCP%20Spec-2025--11--25-8A2BE2.svg?style=flat-square)](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE)
9
9
 
10
10
  [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
@@ -0,0 +1,15 @@
1
+ ---
2
+ summary: Enrich report-issue-framework and report-issue-local skills with Writing Well-Structured Issues guidance and an expanded feature-request template
3
+ breaking: false
4
+ ---
5
+
6
+ # 0.6.12 — 2026-04-23
7
+
8
+ Thickens the two issue-filing skills so feature requests land as scannable, self-contained proposals instead of abstract "wouldn't it be nice" framings. No code changes.
9
+
10
+ ## Changed
11
+
12
+ - **`skills/report-issue-framework/SKILL.md`** bumped to v1.2. Adds a **Writing Well-Structured Issues** section with nine bullets covering concrete openings, inline library links, `owner/repo#N` cross-repo refs, `Related: #N` provenance, philosophy-before-tradeoff framing, Markdown tables for comparisons, explicit `Scope` vs `Out of scope`, `Depends on:` ordering, and a generalized "skip collaborator-framing sign-offs" rule that works for both maintainer and external-contributor contexts. Expands the feature-request CLI template from three fields to a richer structure: concrete opening paragraph → `Related:` → `## Proposal` → `### Proposed API` → optional `Flow` (with a `trigger → resolve → fetch → degrade` hint) → optional `Design / Tradeoffs` (philosophy line + tradeoff table) → `Scope` → `Out of scope` → optional `Dependencies` → `Alternatives considered`. Adds a one-line cross-link to the `github-cli` skill for general `gh` workflows outside issue filing.
13
+ - **`skills/report-issue-local/SKILL.md`** bumped to v1.2 with the same treatment, adapted for server context — `### Proposed behavior` instead of `### Proposed API`, examples scoped to tools/services/resources, and a `Dependencies` section that hints at cross-repo refs to upstream framework issues.
14
+
15
+ Resolves [#48](https://github.com/cyanheads/mcp-ts-core/issues/48).
@@ -0,0 +1,14 @@
1
+ ---
2
+ summary: PdfParser.extractText now accepts raw bytes directly, skipping the pdf-lib round-trip for text-only callers (unpdf-only path)
3
+ breaking: false
4
+ ---
5
+
6
+ # 0.6.13 — 2026-04-23
7
+
8
+ Small ergonomics fix to `PdfParser.extractText`. Scholarly/API pipelines that only need text (e.g. PDFs → LLM) can now skip `pdf-lib` entirely.
9
+
10
+ ## Changed
11
+
12
+ - **`PdfParser.extractText`** now accepts `Uint8Array | ArrayBuffer` in addition to a loaded `PDFDocument`. When raw bytes are passed, `pdf-lib` is never loaded — only `unpdf` — eliminating a wasted `pdf-lib.load` → `doc.save()` → `unpdf.parse` round-trip on the text-extraction hot path. `PDFDocument` callers are unaffected (behavior preserved). Debug logs gain an `inputKind: 'bytes' | 'document'` field so callers can see which path ran.
13
+
14
+ Resolves [#47](https://github.com/cyanheads/mcp-ts-core/issues/47).
@@ -1,4 +1,4 @@
1
- {"level":50,"time":1776964260716,"env":"testing","version":"0.6.11","pid":41913,"requestId":"39HTQ-Z1TY2","timestamp":"2026-04-23T17:11:00.716Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"POST","errorData":{"path":"/mcp","method":"POST","requestId":"39HTQ-Z1TY2","timestamp":"2026-04-23T17:11:00.716Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Missing or invalid Authorization header. Bearer scheme required.","originalStack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at authMiddleware (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/authMiddleware.js:64:19)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:119:22)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:82:11)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Missing or invalid Authorization header. Bearer scheme required."}
2
- {"level":50,"time":1776964260730,"env":"testing","version":"0.6.11","pid":41913,"requestId":"96UGI-8URT9","timestamp":"2026-04-23T17:11:00.730Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"POST","errorData":{"path":"/mcp","method":"POST","requestId":"96UGI-8URT9","timestamp":"2026-04-23T17:11:00.730Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Token has expired.","originalStack":"McpError: Token has expired.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at handleJoseVerifyError (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/claimParser.js:56:11)\n at verify (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/strategies/jwtStrategy.js:91:13)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Token has expired.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Token has expired."}
3
- {"level":50,"time":1776964260733,"env":"testing","version":"0.6.11","pid":41913,"requestId":"Y7DPA-0GN8D","timestamp":"2026-04-23T17:11:00.733Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"GET","errorData":{"path":"/mcp","method":"GET","requestId":"Y7DPA-0GN8D","timestamp":"2026-04-23T17:11:00.733Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Missing or invalid Authorization header. Bearer scheme required.","originalStack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at authMiddleware (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/authMiddleware.js:64:19)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:119:22)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:82:11)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Missing or invalid Authorization header. Bearer scheme required."}
4
- {"level":50,"time":1776964261975,"env":"testing","version":"0.0.0-test","pid":41951,"requestId":"I9RC9-PC6JL","timestamp":"2026-04-23T17:11:01.974Z","operation":"HandleToolRequest","input":{"message":"blocked"},"critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"461886e20f7bb81bf0c81e4dc87a34cd9e982327ed1faaed8d7c15b148320462","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant"},"errorData":{"sessionId":"461886e20f7bb81bf0c81e4dc87a34cd9e982327ed1faaed8d7c15b148320462","toolName":"scoped_echo","input":{"message":"blocked"},"requestId":"I9RC9-PC6JL","timestamp":"2026-04-23T17:11:01.974Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:61:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:68:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:101:42)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
1
+ {"level":50,"time":1776967762040,"env":"testing","version":"0.0.0-test","pid":8455,"requestId":"P7NPK-33MSX","timestamp":"2026-04-23T18:09:22.038Z","operation":"HandleToolRequest","input":{"message":"blocked"},"critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"2364b05b8cb336090794bf4bfe7f6d32b5cf2435ede57cc542fe73032a2cb861","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant"},"errorData":{"sessionId":"2364b05b8cb336090794bf4bfe7f6d32b5cf2435ede57cc542fe73032a2cb861","toolName":"scoped_echo","input":{"message":"blocked"},"requestId":"P7NPK-33MSX","timestamp":"2026-04-23T18:09:22.038Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:61:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:68:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:101:42)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
2
+ {"level":50,"time":1776967762352,"env":"testing","version":"0.6.13","pid":8457,"requestId":"UGC43-6ESGE","timestamp":"2026-04-23T18:09:22.352Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"POST","errorData":{"path":"/mcp","method":"POST","requestId":"UGC43-6ESGE","timestamp":"2026-04-23T18:09:22.352Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Missing or invalid Authorization header. Bearer scheme required.","originalStack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at authMiddleware (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/authMiddleware.js:64:19)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:119:22)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:82:11)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Missing or invalid Authorization header. Bearer scheme required."}
3
+ {"level":50,"time":1776967762366,"env":"testing","version":"0.6.13","pid":8457,"requestId":"NVG10-T9EG9","timestamp":"2026-04-23T18:09:22.366Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"POST","errorData":{"path":"/mcp","method":"POST","requestId":"NVG10-T9EG9","timestamp":"2026-04-23T18:09:22.366Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Token has expired.","originalStack":"McpError: Token has expired.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at handleJoseVerifyError (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/claimParser.js:56:11)\n at verify (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/strategies/jwtStrategy.js:91:13)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Token has expired.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Token has expired."}
4
+ {"level":50,"time":1776967762369,"env":"testing","version":"0.6.13","pid":8457,"requestId":"KDLUE-Q8F3G","timestamp":"2026-04-23T18:09:22.369Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"GET","errorData":{"path":"/mcp","method":"GET","requestId":"KDLUE-Q8F3G","timestamp":"2026-04-23T18:09:22.369Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Missing or invalid Authorization header. Bearer scheme required.","originalStack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at authMiddleware (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/authMiddleware.js:64:19)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:119:22)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:82:11)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Missing or invalid Authorization header. Bearer scheme required."}
@@ -1,4 +1,4 @@
1
- {"level":50,"time":1776964260716,"env":"testing","version":"0.6.11","pid":41913,"requestId":"39HTQ-Z1TY2","timestamp":"2026-04-23T17:11:00.716Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"POST","errorData":{"path":"/mcp","method":"POST","requestId":"39HTQ-Z1TY2","timestamp":"2026-04-23T17:11:00.716Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Missing or invalid Authorization header. Bearer scheme required.","originalStack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at authMiddleware (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/authMiddleware.js:64:19)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:119:22)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:82:11)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Missing or invalid Authorization header. Bearer scheme required."}
2
- {"level":50,"time":1776964260730,"env":"testing","version":"0.6.11","pid":41913,"requestId":"96UGI-8URT9","timestamp":"2026-04-23T17:11:00.730Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"POST","errorData":{"path":"/mcp","method":"POST","requestId":"96UGI-8URT9","timestamp":"2026-04-23T17:11:00.730Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Token has expired.","originalStack":"McpError: Token has expired.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at handleJoseVerifyError (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/claimParser.js:56:11)\n at verify (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/strategies/jwtStrategy.js:91:13)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Token has expired.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Token has expired."}
3
- {"level":50,"time":1776964260733,"env":"testing","version":"0.6.11","pid":41913,"requestId":"Y7DPA-0GN8D","timestamp":"2026-04-23T17:11:00.733Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"GET","errorData":{"path":"/mcp","method":"GET","requestId":"Y7DPA-0GN8D","timestamp":"2026-04-23T17:11:00.733Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Missing or invalid Authorization header. Bearer scheme required.","originalStack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at authMiddleware (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/authMiddleware.js:64:19)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:119:22)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:82:11)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Missing or invalid Authorization header. Bearer scheme required."}
4
- {"level":50,"time":1776964261975,"env":"testing","version":"0.0.0-test","pid":41951,"requestId":"I9RC9-PC6JL","timestamp":"2026-04-23T17:11:01.974Z","operation":"HandleToolRequest","input":{"message":"blocked"},"critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"461886e20f7bb81bf0c81e4dc87a34cd9e982327ed1faaed8d7c15b148320462","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant"},"errorData":{"sessionId":"461886e20f7bb81bf0c81e4dc87a34cd9e982327ed1faaed8d7c15b148320462","toolName":"scoped_echo","input":{"message":"blocked"},"requestId":"I9RC9-PC6JL","timestamp":"2026-04-23T17:11:01.974Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:61:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:68:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:101:42)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
1
+ {"level":50,"time":1776967762040,"env":"testing","version":"0.0.0-test","pid":8455,"requestId":"P7NPK-33MSX","timestamp":"2026-04-23T18:09:22.038Z","operation":"HandleToolRequest","input":{"message":"blocked"},"critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"2364b05b8cb336090794bf4bfe7f6d32b5cf2435ede57cc542fe73032a2cb861","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant"},"errorData":{"sessionId":"2364b05b8cb336090794bf4bfe7f6d32b5cf2435ede57cc542fe73032a2cb861","toolName":"scoped_echo","input":{"message":"blocked"},"requestId":"P7NPK-33MSX","timestamp":"2026-04-23T18:09:22.038Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:61:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:68:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:101:42)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
2
+ {"level":50,"time":1776967762352,"env":"testing","version":"0.6.13","pid":8457,"requestId":"UGC43-6ESGE","timestamp":"2026-04-23T18:09:22.352Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"POST","errorData":{"path":"/mcp","method":"POST","requestId":"UGC43-6ESGE","timestamp":"2026-04-23T18:09:22.352Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Missing or invalid Authorization header. Bearer scheme required.","originalStack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at authMiddleware (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/authMiddleware.js:64:19)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:119:22)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:82:11)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Missing or invalid Authorization header. Bearer scheme required."}
3
+ {"level":50,"time":1776967762366,"env":"testing","version":"0.6.13","pid":8457,"requestId":"NVG10-T9EG9","timestamp":"2026-04-23T18:09:22.366Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"POST","errorData":{"path":"/mcp","method":"POST","requestId":"NVG10-T9EG9","timestamp":"2026-04-23T18:09:22.366Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Token has expired.","originalStack":"McpError: Token has expired.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at handleJoseVerifyError (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/claimParser.js:56:11)\n at verify (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/strategies/jwtStrategy.js:91:13)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Token has expired.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Token has expired."}
4
+ {"level":50,"time":1776967762369,"env":"testing","version":"0.6.13","pid":8457,"requestId":"KDLUE-Q8F3G","timestamp":"2026-04-23T18:09:22.369Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"GET","errorData":{"path":"/mcp","method":"GET","requestId":"KDLUE-Q8F3G","timestamp":"2026-04-23T18:09:22.369Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Missing or invalid Authorization header. Bearer scheme required.","originalStack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at authMiddleware (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/authMiddleware.js:64:19)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:119:22)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:82:11)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Missing or invalid Authorization header. Bearer scheme required."}
@@ -484,33 +484,36 @@ export declare class PdfParser {
484
484
  */
485
485
  setMetadata(doc: PDFDocument, metadata: SetMetadataOptions): void;
486
486
  /**
487
- * Extracts text content from all pages of a PDF document using `unpdf`.
487
+ * Extracts text content from all pages of a PDF using `unpdf`.
488
488
  *
489
- * Serializes the `PDFDocument` to bytes, then delegates to `unpdf`'s `extractText`,
490
- * which is compatible with Cloudflare Workers and other serverless environments.
491
- * Async due to lazy loading of both `pdf-lib` and `unpdf`
492
- * (`bun add pdf-lib unpdf`).
489
+ * Accepts either raw PDF bytes (`Uint8Array` | `ArrayBuffer`) or a loaded
490
+ * `PDFDocument`. When bytes are passed, `pdf-lib` is not required — `unpdf` is
491
+ * the only peer dep that loads, making this the preferred path for scholarly
492
+ * / API pipelines that just need text for an LLM. When a `PDFDocument` is
493
+ * passed, the doc is serialized via `pdf-lib`'s `save()` before extraction.
494
+ * Compatible with Cloudflare Workers and other serverless environments.
493
495
  *
494
- * @param doc - The `PDFDocument` to extract text from.
496
+ * @param input - Raw PDF bytes (`Uint8Array` | `ArrayBuffer`) or a loaded `PDFDocument`.
495
497
  * @param options - Optional extraction options. Set `mergePages: true` to get a
496
498
  * single concatenated string instead of one string per page.
497
499
  * @param context - Optional `RequestContext` for correlated logging and error metadata.
498
500
  * @returns An `ExtractTextResult` with `totalPages` and `text` — a `string[]` (one
499
501
  * per page) by default, or a single `string` when `mergePages` is `true`.
500
- * @throws {McpError} With `ConfigurationError` if `pdf-lib` or `unpdf` is not installed.
502
+ * @throws {McpError} With `ConfigurationError` if `unpdf` is not installed (or
503
+ * `pdf-lib` is missing when a `PDFDocument` is passed).
501
504
  * @throws {McpError} With `InternalError` if text extraction fails.
502
505
  * @example
503
506
  * ```typescript
504
- * // Per-page array (default)
505
- * const result = await pdfParser.extractText(doc);
506
- * console.log(result.text[0]); // Text from first page
507
+ * // Direct from bytes — skips the pdf-lib round-trip (unpdf-only path)
508
+ * const bytes = await readFile('paper.pdf');
509
+ * const result = await pdfParser.extractText(bytes, { mergePages: true });
507
510
  *
508
- * // All pages concatenated into one string
509
- * const merged = await pdfParser.extractText(doc, { mergePages: true });
510
- * console.log(merged.text); // Full document text
511
+ * // From a loaded document (when you're also editing / inspecting)
512
+ * const doc = await pdfParser.loadDocument(bytes);
513
+ * const perPage = await pdfParser.extractText(doc);
511
514
  * ```
512
515
  */
513
- extractText(doc: PDFDocument, options?: ExtractTextOptions, context?: RequestContext): Promise<ExtractTextResult>;
516
+ extractText(input: PDFDocument | Uint8Array | ArrayBuffer, options?: ExtractTextOptions, context?: RequestContext): Promise<ExtractTextResult>;
514
517
  /**
515
518
  * Serializes a PDF document to a `Uint8Array` for writing to disk or transmission.
516
519
  *
@@ -1 +1 @@
1
- {"version":3,"file":"pdfParser.d.ts","sourceRoot":"","sources":["../../../src/utils/parsing/pdfParser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAK5E,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,oCAAoC,CAAC;AAYhG;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC;IAEZ;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,UAAU,GAAG,WAAW,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IACh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E,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC"}
@@ -605,65 +605,55 @@ export class PdfParser {
605
605
  doc.setProducer(metadata.producer);
606
606
  }
607
607
  /**
608
- * Extracts text content from all pages of a PDF document using `unpdf`.
608
+ * Extracts text content from all pages of a PDF using `unpdf`.
609
609
  *
610
- * Serializes the `PDFDocument` to bytes, then delegates to `unpdf`'s `extractText`,
611
- * which is compatible with Cloudflare Workers and other serverless environments.
612
- * Async due to lazy loading of both `pdf-lib` and `unpdf`
613
- * (`bun add pdf-lib unpdf`).
610
+ * Accepts either raw PDF bytes (`Uint8Array` | `ArrayBuffer`) or a loaded
611
+ * `PDFDocument`. When bytes are passed, `pdf-lib` is not required — `unpdf` is
612
+ * the only peer dep that loads, making this the preferred path for scholarly
613
+ * / API pipelines that just need text for an LLM. When a `PDFDocument` is
614
+ * passed, the doc is serialized via `pdf-lib`'s `save()` before extraction.
615
+ * Compatible with Cloudflare Workers and other serverless environments.
614
616
  *
615
- * @param doc - The `PDFDocument` to extract text from.
617
+ * @param input - Raw PDF bytes (`Uint8Array` | `ArrayBuffer`) or a loaded `PDFDocument`.
616
618
  * @param options - Optional extraction options. Set `mergePages: true` to get a
617
619
  * single concatenated string instead of one string per page.
618
620
  * @param context - Optional `RequestContext` for correlated logging and error metadata.
619
621
  * @returns An `ExtractTextResult` with `totalPages` and `text` — a `string[]` (one
620
622
  * per page) by default, or a single `string` when `mergePages` is `true`.
621
- * @throws {McpError} With `ConfigurationError` if `pdf-lib` or `unpdf` is not installed.
623
+ * @throws {McpError} With `ConfigurationError` if `unpdf` is not installed (or
624
+ * `pdf-lib` is missing when a `PDFDocument` is passed).
622
625
  * @throws {McpError} With `InternalError` if text extraction fails.
623
626
  * @example
624
627
  * ```typescript
625
- * // Per-page array (default)
626
- * const result = await pdfParser.extractText(doc);
627
- * console.log(result.text[0]); // Text from first page
628
+ * // Direct from bytes — skips the pdf-lib round-trip (unpdf-only path)
629
+ * const bytes = await readFile('paper.pdf');
630
+ * const result = await pdfParser.extractText(bytes, { mergePages: true });
628
631
  *
629
- * // All pages concatenated into one string
630
- * const merged = await pdfParser.extractText(doc, { mergePages: true });
631
- * console.log(merged.text); // Full document text
632
+ * // From a loaded document (when you're also editing / inspecting)
633
+ * const doc = await pdfParser.loadDocument(bytes);
634
+ * const perPage = await pdfParser.extractText(doc);
632
635
  * ```
633
636
  */
634
- async extractText(doc, options, context) {
637
+ async extractText(input, options, context) {
635
638
  const logContext = context ||
636
639
  requestContextService.createRequestContext({
637
640
  operation: 'PdfParser.extractText',
638
641
  });
639
642
  try {
640
- const pageCount = doc.getPageCount();
641
643
  const mergePages = options?.mergePages ?? false;
644
+ const isBytes = input instanceof Uint8Array || input instanceof ArrayBuffer;
642
645
  logger.debug('Extracting text from PDF using unpdf.', {
643
646
  ...logContext,
644
- pageCount,
645
647
  mergePages,
648
+ inputKind: isBytes ? 'bytes' : 'document',
646
649
  });
647
- // Convert PDFDocument to bytes
648
- const pdfBytes = await doc.save();
650
+ const rawBytes = isBytes ? input : await input.save();
651
+ const pdfBytes = rawBytes instanceof ArrayBuffer ? new Uint8Array(rawBytes) : rawBytes;
649
652
  const { getDocumentProxy, extractText: unpdfExtractText } = await getUnpdf();
650
- // Create document proxy for unpdf
651
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
652
653
  const pdfProxy = await getDocumentProxy(pdfBytes);
653
- // Extract text using unpdf with explicit type handling
654
- let result;
655
- if (mergePages) {
656
- // Call with mergePages: true for merged text
657
- const merged = await unpdfExtractText(pdfProxy, { mergePages: true });
658
- result = merged;
659
- }
660
- else {
661
- // Call with mergePages: false for per-page text
662
- const perPage = await unpdfExtractText(pdfProxy, {
663
- mergePages: false,
664
- });
665
- result = perPage;
666
- }
654
+ const result = mergePages
655
+ ? await unpdfExtractText(pdfProxy, { mergePages: true })
656
+ : await unpdfExtractText(pdfProxy, { mergePages: false });
667
657
  logger.debug('Successfully extracted text from PDF.', {
668
658
  ...logContext,
669
659
  totalPages: result.totalPages,
@@ -1 +1 @@
1
- {"version":3,"file":"pdfParser.js","sourceRoot":"","sources":["../../../src/utils/parsing/pdfParser.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAuB,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAEhG,MAAM,SAAS,GAAG,UAAU,CAC1B,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EACvB,0DAA0D,CAC3D,CAAC;AAEF,MAAM,QAAQ,GAAG,UAAU,CACzB,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EACrB,2DAA2D,CAC5D,CAAC;AAqQF;;;;;;;GAOG;AACH,MAAM,OAAO,SAAS;IACpB;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,cAAc,CAAC,OAAwB;QAC3C,MAAM,UAAU,GACd,OAAO;YACP,qBAAqB,CAAC,oBAAoB,CAAC;gBACzC,SAAS,EAAE,0BAA0B;aACtC,CAAC,CAAC;QAEL,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,SAAS,EAAE,CAAC;YACjC,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,UAAU,CAAC,CAAC;YACvD,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;YAC9C,OAAO,GAAG,CAAC;QACb,CAAC;QAAC,OAAO,CAAU,EAAE,CAAC;YACpB,MAAM,KAAK,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5D,MAAM,CAAC,KAAK,CAAC,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BAAwB;aACpC,CAAC,CAAC;QAEL,IAAI,CAAC;YACH,MAAM,CAAC,KAAK,CAAC,oCAAoC,EAAE,UAAU,CAAC,CAAC;YAC/D,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;YAC/B,MAAM,CAAC,KAAK,CAAC,uCAAuC,EAAE;gBACpD,GAAG,UAAU;gBACb,UAAU,EAAE,KAAK,CAAC,MAAM;aACzB,CAAC,CAAC;YACH,OAAO,KAAK,CAAC;QACf,CAAC;QAAC,OAAO,CAAU,EAAE,CAAC;YACpB,MAAM,KAAK,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5D,MAAM,CAAC,KAAK,CAAC,mCAAmC,EAAE;gBAChD,GAAG,UAAU;gBACb,YAAY,EAAE,KAAK,CAAC,OAAO;aAC5B,CAAC,CAAC;YAEH,MAAM,IAAI,QAAQ,CAChB,gBAAgB,CAAC,aAAa,EAC9B,gCAAgC,KAAK,CAAC,OAAO,EAAE,EAC/C;gBACE,GAAG,OAAO;gBACV,QAAQ,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aAC/D,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/mcp-ts-core",
3
- "version": "0.6.11",
3
+ "version": "0.6.13",
4
4
  "mcpName": "io.github.cyanheads/mcp-ts-core",
5
5
  "description": "Agent-native TypeScript framework for building MCP servers. Declarative definitions with auth, multi-backend storage, OpenTelemetry, and first-class support for Bun/Node/Cloudflare Workers.",
6
6
  "main": "dist/core/index.js",
@@ -4,7 +4,7 @@ description: >
4
4
  File a bug or feature request against @cyanheads/mcp-ts-core when you hit a framework issue. Use when a builder, utility, context method, or config behaves contrary to the documented API — not for server-specific application bugs.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.1"
7
+ version: "1.2"
8
8
  audience: external
9
9
  type: workflow
10
10
  ---
@@ -20,6 +20,8 @@ You've isolated a problem to `@cyanheads/mcp-ts-core` itself — not your server
20
20
  - Type exports are incorrect or missing (compile error on documented usage)
21
21
  - The definition linter (`bun run lint:mcp`) produces false positives or misses real violations
22
22
 
23
+ For general `gh` CLI workflows outside issue filing (PRs, workflows, API access), see the `github-cli` skill.
24
+
23
25
  ## Before Filing
24
26
 
25
27
  1. **Confirm framework version** — `bun pm ls @cyanheads/mcp-ts-core` or check `node_modules/@cyanheads/mcp-ts-core/package.json`
@@ -31,6 +33,20 @@ You've isolated a problem to `@cyanheads/mcp-ts-core` itself — not your server
31
33
  gh issue list -R cyanheads/mcp-ts-core --search "your error message or keyword"
32
34
  ```
33
35
 
36
+ ## Writing Well-Structured Issues
37
+
38
+ Good issues are scannable, concrete, and self-contained. These patterns apply to both bugs and features — the guidance targets any prose block (Description, Additional context, feature proposals).
39
+
40
+ - **Lead with specifics.** Name the tool, function, module, or symptom. "Currently `createApp()` throws `ConfigurationError` when `MCP_HTTP_PORT` is set to `0`" beats "There's a problem with the config." A reader should know what's broken or missing before the end of the first sentence.
41
+ - **Embed library/service links on first mention.** `[Hono](https://hono.dev/)`, `[linkedom](https://github.com/WebReflection/linkedom)`. Link to the canonical repo or homepage so readers can verify the dependency and reach docs in one click.
42
+ - **Use `owner/repo#N` for cross-repo issue references.** GitHub auto-renders them as linked references (e.g. `cyanheads/pubmed-mcp-server#34`). Bare `#N` only works for same-repo issues.
43
+ - **Add a `Related: #N` line** near the top when the issue grows from prior context (discussions, other issues, PRs). Makes provenance clickable.
44
+ - **Lead design sections with a philosophy sentence.** Bold a short principle before the tradeoff details — e.g. "Philosophy: **fail fast on config errors, degrade gracefully on runtime errors.**" Establishes the lens for the rest of the section.
45
+ - **Prefer Markdown tables for comparisons.** When showing options, tiers, strategies, or tradeoffs — tables are the highest-density format for scanning N rows × M attributes.
46
+ - **Separate `### Scope` from `### Out of scope`.** The latter is as important as the former — it pre-empts scope-creep debates in comments and signals you've thought about the boundaries.
47
+ - **Use `Depends on: owner/repo#N`** to declare ordering explicitly when implementation is blocked on another issue landing first.
48
+ - **Skip collaborator-framing sign-offs.** Lines like "Happy to open a PR", "let me know if you'd like", "willing to contribute", "if that's the preferred flow" read as noise. A PR link beats an offer; if you're the maintainer filing against your own repo, the offer is redundant. End the body at the last substantive point.
49
+
34
50
  ## Redact Before Posting
35
51
 
36
52
  GitHub issues are **public**. Do not include secrets, credentials, API keys, or tokens. Redact sensitive values from env vars, headers, and logs before submitting. Replace with obvious placeholders: `REDACTED`, `sk-...REDACTED`. Do not rely on partial masking — partial keys can still be exploited.
@@ -174,14 +190,20 @@ gh issue create -R cyanheads/mcp-ts-core --template "Feature Request" --web
174
190
 
175
191
  ### CLI (non-interactive)
176
192
 
193
+ Template below demonstrates the richer structure. Omit sections you don't need — simple requests don't require Flow / Design / Dependencies blocks.
194
+
177
195
  ````bash
178
196
  gh issue create -R cyanheads/mcp-ts-core \
179
197
  --title "feat(scope): concise description" \
180
198
  --label "enhancement" \
181
199
  --body "$(cat <<'ISSUE'
182
- ### Use case
200
+ Concrete statement of what's currently missing or broken in the framework. Name the specific builder, utility, context method, or config field. Two or three sentences — the reader should know the gap before the end of the paragraph.
183
201
 
184
- Describe the problem you're solving and why the framework should handle it.
202
+ Related: #N
203
+
204
+ ## Proposal
205
+
206
+ What you want the framework to do, in one paragraph. Link external libraries on first mention: [lib name](https://github.com/owner/repo). Include a short justification — what this gives us that we don't have today.
185
207
 
186
208
  ### Proposed API
187
209
 
@@ -194,9 +216,37 @@ const result = await withRetry(() => fetchExternal(url), {
194
216
  });
195
217
  ```
196
218
 
219
+ ### Flow (optional)
220
+
221
+ Ordered steps — e.g. `trigger → resolve → fetch → degrade`. Useful when the change spans multiple phases or fallbacks.
222
+
223
+ ### Design / Tradeoffs (optional)
224
+
225
+ Philosophy: **one-line principle in bold.**
226
+
227
+ | Option | Strengths | Weaknesses |
228
+ |:---|:---|:---|
229
+ | A | ... | ... |
230
+ | B | ... | ... |
231
+
232
+ ### Scope
233
+
234
+ - Files or modules touched
235
+ - New exports, env vars, or config keys
236
+ - Tier (Tier 1 core / Tier 2 standard / Tier 3 optional peer dep)
237
+
238
+ ### Out of scope
239
+
240
+ - What we're deliberately not doing
241
+ - Adjacent work that belongs in a separate issue
242
+
243
+ ### Dependencies (optional)
244
+
245
+ - Depends on: owner/repo#N
246
+
197
247
  ### Alternatives considered
198
248
 
199
- What you tried or considered instead.
249
+ What you tried or evaluated instead, and why it didn't fit.
200
250
  ISSUE
201
251
  )"
202
252
  ````
@@ -4,7 +4,7 @@ description: >
4
4
  File a bug or feature request against this MCP server's own repo. Use for server-specific issues — tool logic, service integrations, config problems, or domain bugs that aren't caused by the framework.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.1"
7
+ version: "1.2"
8
8
  audience: external
9
9
  type: workflow
10
10
  ---
@@ -22,6 +22,8 @@ The bug is in this server's code, not in `@cyanheads/mcp-ts-core`. Typical trigg
22
22
 
23
23
  **If the issue is in the framework itself** (builders, Context, utilities, type exports, linter), use `report-issue-framework` instead.
24
24
 
25
+ For general `gh` CLI workflows outside issue filing (PRs, workflows, API access), see the `github-cli` skill.
26
+
25
27
  ## Before Filing
26
28
 
27
29
  1. **Identify the repo**:
@@ -40,6 +42,20 @@ gh issue list --search "your error message or keyword"
40
42
 
41
43
  4. **Check logs** — review `ctx.log` output and any framework telemetry for clues. If running HTTP, check the response body for structured error details.
42
44
 
45
+ ## Writing Well-Structured Issues
46
+
47
+ Good issues are scannable, concrete, and self-contained. These patterns apply to both bugs and features — the guidance targets any prose block (Description, Additional context, feature proposals).
48
+
49
+ - **Lead with specifics.** Name the tool, service, resource, or symptom. "Currently `search_docs` returns an empty array for queries containing `&`" beats "Search is broken." A reader should know what's wrong before the end of the first sentence.
50
+ - **Embed library/service links on first mention.** `[Hono](https://hono.dev/)`, `[Supabase](https://supabase.com/)`. Link to the canonical repo or homepage so readers can verify the dependency and reach docs in one click.
51
+ - **Use `owner/repo#N` for cross-repo issue references.** GitHub auto-renders them as linked references (e.g. `cyanheads/mcp-ts-core#46`). Bare `#N` only works for same-repo issues — useful when the bug depends on or relates to a framework issue.
52
+ - **Add a `Related: #N` line** near the top when the issue grows from prior context (discussions, other issues, PRs). Makes provenance clickable.
53
+ - **Lead design sections with a philosophy sentence.** Bold a short principle before the tradeoff details — e.g. "Philosophy: **return best-effort data, don't fail the tool call on parsing edge cases.**" Establishes the lens for the rest of the section.
54
+ - **Prefer Markdown tables for comparisons.** When showing options, data sources, strategies, or tradeoffs — tables are the highest-density format for scanning N rows × M attributes.
55
+ - **Separate `### Scope` from `### Out of scope`.** The latter is as important as the former — it pre-empts scope-creep debates in comments and signals you've thought about the boundaries.
56
+ - **Use `Depends on: owner/repo#N`** to declare ordering explicitly when implementation is blocked on an upstream framework change or another issue landing first.
57
+ - **Skip collaborator-framing sign-offs.** Lines like "Happy to open a PR", "let me know if you'd like", "willing to contribute", "if that's the preferred flow" read as noise. A PR link beats an offer; if you're the maintainer filing against your own repo, the offer is redundant. End the body at the last substantive point.
58
+
43
59
  ## Redact Before Posting
44
60
 
45
61
  GitHub issues are **public**. Do not include secrets, credentials, API keys, or tokens. Redact sensitive values from env vars, headers, and logs before submitting. Replace with obvious placeholders: `REDACTED`, `sk-...REDACTED`. Do not rely on partial masking — partial keys can still be exploited.
@@ -158,22 +174,61 @@ gh issue create --template "Feature Request" --web
158
174
 
159
175
  ### CLI (non-interactive)
160
176
 
177
+ Template below demonstrates the richer structure. Omit sections you don't need — simple requests don't require Flow / Design / Dependencies blocks.
178
+
161
179
  ````bash
162
180
  gh issue create \
163
181
  --title "feat(scope): concise description" \
164
182
  --label "enhancement" \
165
183
  --body "$(cat <<'ISSUE'
166
- ### Use case
184
+ Concrete statement of what's currently missing or broken. Name the specific tool, service, resource, or domain area. Two or three sentences — the reader should know the gap before the end of the paragraph.
167
185
 
168
- What problem does this solve? Who benefits?
186
+ Related: #N
187
+
188
+ ## Proposal
189
+
190
+ What you want the server to do, in one paragraph. Link external libraries or services on first mention: [lib name](https://github.com/owner/repo). Include a short justification — what this gives users that they don't have today.
169
191
 
170
192
  ### Proposed behavior
171
193
 
172
- Describe the expected behavior or API change.
194
+ Describe the new behavior or surface. For tool/resource changes, show example input/output or the new schema fields:
195
+
196
+ ```ts
197
+ // Example: new input field or output shape
198
+ ```
199
+
200
+ ### Flow (optional)
201
+
202
+ Ordered steps — e.g. `request → lookup → fallback → respond`. Useful when the change spans multiple phases or fallbacks.
203
+
204
+ ### Design / Tradeoffs (optional)
205
+
206
+ Philosophy: **one-line principle in bold.**
207
+
208
+ | Option | Strengths | Weaknesses |
209
+ |:---|:---|:---|
210
+ | A | ... | ... |
211
+ | B | ... | ... |
212
+
213
+ ### Scope
214
+
215
+ - Files or modules touched
216
+ - New env vars, config keys, or service integrations
217
+ - New or modified tools / resources / prompts
218
+
219
+ ### Out of scope
220
+
221
+ - What we're deliberately not doing
222
+ - Adjacent work that belongs in a separate issue
223
+
224
+ ### Dependencies (optional)
225
+
226
+ - Depends on: cyanheads/mcp-ts-core#N (upstream framework change)
227
+ - Depends on: owner/repo#N (other server work)
173
228
 
174
229
  ### Alternatives considered
175
230
 
176
- What you tried or considered instead.
231
+ What you tried or evaluated instead, and why it didn't fit.
177
232
  ISSUE
178
233
  )"
179
234
  ````