Skip to content

feat: extract tool over Clairic, deployable to your own Cloudflare account - #1

Merged
lmarkmann merged 13 commits into
mainfrom
extract-tool
Oct 19, 2026
Merged

lmarkmann merged 13 commits into
mainfrom
extract-tool

Conversation

@lmarkmann

Copy link
Copy Markdown
Owner

The first version of the server: one MCP tool, extract, that sends text, a page or up to four images plus typed fields to Clairic and renders its answers with confidence, p_null, line numbers and [check] marks.

  • Worker behind Cloudflare Access with Managed OAuth; the Worker only verifies the Access JWT, and an empty AUD rejects everything
  • just access creates the Access app and policy, just deploy runs the checks and deploys; deployment values live in a gitignored .env
  • page and image fetching capped while reading; image totals checked before encoding
  • tests drive the tool through the real MCP handler against recorded Clairic responses
  • CI, Changesets release workflow on the release App, Dependabot for actions
  • README and MIT license

- field specs are strict objects and dates are real ISO dates
- fetched text honours the charset and decodes typographic entities
- a body that breaks off mid-read is an upstream error, not a crash
- x-ratelimit-reset is read as epoch or relative seconds
- small estimates keep three significant digits; empty lists show confidence
- the reply says when input past 400,000 characters was cut and where to resume
- DEV_SKIP_AUTH type-checks without .dev.vars, so a fresh clone deploys
- just access deletes its policy when creating the app fails
- prek formats jsonc and yaml and runs tests on text fixtures
- the rejection fixture is re-recorded with the request its test sends
@lmarkmann
lmarkmann merged commit df3a8eb into main Oct 19, 2026
1 check passed
@lmarkmann
lmarkmann deleted the extract-tool branch October 19, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant