Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
645 changes: 0 additions & 645 deletions .agents/skills/refactor/SKILL.md

This file was deleted.

1 change: 0 additions & 1 deletion .claude/skills/refactor

This file was deleted.

6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*
!Dockerfile
!package.json
!tsconfig.json
!src/
!src/**
9 changes: 9 additions & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Allowlist: only upload what the Dockerfile consumes.
# Everything else (test fixtures, binaries, terraform, docs, .git, etc.)
# is excluded to keep the Cloud Build context small.
*
!Dockerfile
!package.json
!tsconfig.json
!src/
!src/**
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,18 @@ npm-debug.log*

# Environment
.env
.env.local
.env.*
.envrc

# Cloud credentials (defensive; never commit service-account keys or similar)
*credentials*.json
*service-account*.json
*-sa-key*.json
gcp-key*.json

# TypeScript incremental build cache
*.tsbuildinfo

# Test coverage
coverage/

Expand All @@ -42,3 +51,6 @@ deploy/terraform.tfstate*
skills-lock.json

.private/

# Playwright MCP artifact directory
.playwright-mcp/
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/).

## [1.2.3] - 2026-04-18

### Added
- `anthropic` and `anthropic-vertex` providers now expose `claude-opus-4-7` as the default flagship model. `claude-opus-4-6` remains selectable via `PDF_ANALYZER_MODEL`.
- Cloud Run deployment supports all five providers (`google-vertex`, `anthropic-vertex`, `google`, `anthropic`, `openai`) via a single `PDF_ANALYZER_PROVIDER` knob; direct-API providers read their key from Secret Manager at runtime.

### Fixed
- `analyzePdf` no longer crashes when a `gs://` source falls back to chunked processing. The chunking branch now handles the `bytes` source kind via a new exhaustive `resolveSourceBytes` helper.
- MCP Streamable HTTP: the `/mcp` route handles any method (GET/POST/DELETE) instead of POST-only. GET was previously returning 404 and causing clients to misreport "SDK auth failed".

### Changed
- Cloud Run deploys are now private by default (`--no-allow-unauthenticated`). Connect via `gcloud run services proxy` locally.
- Cloud Build context slimmed from ~20 MiB to ~120 KiB via allowlist `.gcloudignore` / `.dockerignore`.
- Deploy scripts (`deploy/gcloud.sh`, `deploy/main.tf`) and templates generalized for any provider + auth mode; see `deploy/README.md` for the matrix.
- HTTP transport tests now drive the real production request handler via a new exported `createRequestHandler`; the old tests ran against an inline copy that could diverge from production.

### Security
- `.gitignore` hardened with defensive patterns for common credential, env, and build-cache leaks (`*credentials*.json`, `*service-account*.json`, `.env.*`, `*.tsbuildinfo`, etc.).

## [1.2.2] - 2026-04-08

### Added
Expand Down
22 changes: 21 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ git push -u origin <branch-name> # Push and create PR
Models per provider (do not change without discussion). Users choose during `--setup`:

- **Google Gemini**: `gemini-3-flash-preview` (fast) / `gemini-3.1-pro-preview` (flagship)
- **Anthropic Claude**: `claude-sonnet-4-6` (fast) / `claude-opus-4-6` (flagship)
- **Anthropic Claude**: `claude-sonnet-4-6` (fast) / `claude-opus-4-7` (flagship) / `claude-opus-4-6` (previous flagship, still selectable)
- **OpenAI**: `gpt-5.4-mini` (fast) / `gpt-5.4` (flagship)

Thinking/reasoning is set to minimum for all models (document analysis doesn't benefit from extended thinking).
Expand Down Expand Up @@ -85,6 +85,26 @@ npm run type-check && npm run lint && npm test

Always use `test/fixtures/1-pager.pdf` for MCP tool testing. It is small and cheap on LLM API calls. Never use `test/fixtures/oversized-doc.pdf` or other large PDFs unless the user gives explicit approval.

## Deploying to Cloud Run

The deploy scripts (`deploy/gcloud.sh` and `deploy/main.tf`) support every provider and both auth modes; which one runs is decided by `PDF_ANALYZER_PROVIDER` in `deploy/env` (gcloud) or `provider_id` in `terraform.tfvars`:

- `google-vertex`, `anthropic-vertex` → ADC via attached service account, no API key required
- `google`, `anthropic`, `openai` → API key pulled from a Secret Manager secret named in `API_KEY_SECRET_NAME` / `api_key_secret_name`

See `deploy/README.md` for the full matrix, required IAM roles per provider, and the one-time `gcloud secrets create` command for the direct-API providers. The service is always deployed `--no-allow-unauthenticated` (private).

### Running the remote MCP locally

Because the service requires authenticated invocation, MCP clients connect through a local proxy that mints fresh identity tokens per request:

```bash
gcloud run services proxy <service-name> \
--project=<project-id> --region=<region> --port=8080
```

Point `.mcp.json`'s HTTP MCP entry at `http://localhost:8080/mcp`. When the proxy stops, the MCP disconnects until you start it again. No secrets live in `.mcp.json` — auth is handled per-request by the proxy against your ADC.

## Release Process

Branch protection requires releases to go through a PR:
Expand Down
Loading
Loading