* feat: allow per-request file parser selection with fallback chains Clients can now specify which parser(s) to use when calling the file retain endpoint, instead of being locked to the server-side default. Changes: - `parser` field added to `FileRetainRequest` (request-level default) and `FileRetainMetadata` (per-file override); accepts a single name or an ordered fallback chain (list) - Resolution priority: per-file > request-level > server default - `HINDSIGHT_API_FILE_PARSER` now accepts a comma-separated fallback chain (e.g. `iris,markitdown`); fully backward-compatible - New `HINDSIGHT_API_FILE_PARSER_ALLOWLIST` env var restricts which parsers clients may request (defaults to all registered parsers) - Invalid/disallowed parser names are rejected with HTTP 400 - `FileParserRegistry.convert_with_fallback()` tries each parser in order, falling back on UnsupportedFileTypeError, empty content, or any other error - Worker updated to use the fallback chain stored per-task - OpenAPI spec and all generated clients regenerated * fix: handle on_file_convert_complete hook and rebase onto main - Return ConvertResult dataclass from convert_with_fallback() instead of a plain str, carrying both the content and the winning parser name - Use winning_parser_name in the on_file_convert_complete hook so parser_name reflects the parser that actually succeeded, not the chain - Update all test calls to submit_async_file_retain() to use the new per-item parser field instead of the removed top-level parser= kwarg * docs: document HINDSIGHT_API_FILE_PARSER fallback chain and ALLOWLIST |
||
|---|---|---|
| .. | ||
| blog | ||
| docs | ||
| examples | ||
| src | ||
| static | ||
| versioned_docs | ||
| versioned_sidebars | ||
| .gitignore | ||
| docusaurus.config.ts | ||
| package.json | ||
| README.md | ||
| sidebars.ts | ||
| tsconfig.json | ||
| versions.json | ||
Website
This website is built using Docusaurus, a modern static website generator.
Installation
npm install
Local Development
npm start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Build
npm run build
This command generates static content into the build directory and can be served using any static contents hosting service.
Deployment
Using SSH:
USE_SSH=true npm run deploy
Not using SSH:
GIT_USER=<Your GitHub username> npm run deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.