Commit graph

2 commits

Author SHA1 Message Date
jedarden
c4ff5194dd feat(pdftract-67tm8): implement MCP stdio transport with integration tests
Implements the stdio transport for the MCP server, enabling communication
with local agents (Claude Desktop, Claude Code, Continue, Cursor) over
standard input/output with Content-Length framing.

Core features:
- LSP-style Content-Length framing with \r\n terminators
- JSON-RPC 2.0 message parsing and serialization
- INV-9 compliance: stdout contains only JSON-RPC frames
- Panic hook redirects panics to stderr
- SIGTERM handler for graceful shutdown
- Parse errors return -32700 with id: null, then continue

Acceptance criteria:
-  Piping tools/list with framing produces expected response < 50ms
-  EOF on stdin → clean exit within 100ms
-  Malformed JSON → -32700 error, subsequent requests work
-  No println!/log output to stdout (INV-9 enforced)
-  Panics go to stderr, no partial JSON on stdout
-  SIGTERM → exit 0, SIGINT → immediate non-zero exit

Tests added:
- crates/pdftract-cli/tests/mcp-stdio.rs (8 integration tests, all pass)
- All 49 existing unit tests continue to pass

Refs: pdftract-67tm8, plan Phase 6.7.2
2026-05-23 00:16:42 -04:00
jedarden
6fa837d3c9 docs(pdftract-8eo1): add verification note for cosign keyless signing implementation
Status: Implementation COMPLETE, infrastructure blocker REMAINING

Implemented:
- cosign installed in pdftract-github-release.yaml and pdftract-docker-build.yaml
- OIDC token projection configured with audience: sigstore
- SHA256SUMS signing via cosign sign-blob
- Docker image signing for all 3 variants (latest, ocr, full)
- SLSA provenance attestation via cosign attest
- README verification documentation complete

Blocker:
- OIDC issuer https://iad-ci-oidc.ardenone.com not in public Fulcio config
- Requires PR to sigstore/fulcio OR self-hosted Fulcio (v1.1+)

References:
- https://github.com/sigstore/fulcio/blob/main/config/identity/config.yaml
- Bead pdftract-8eo1
2026-05-20 19:36:09 -04:00