Skip to content

Add document detection events and custom rules - #374

Merged
enoch3712 merged 1 commit into
mainfrom
codex/document-events
Sep 16, 2026
Merged

enoch3712 merged 1 commit into
mainfrom
codex/document-events

Conversation

@enoch3712

Copy link
Copy Markdown
Owner

Adds DocumentLoaderEvents with structured handwriting/chart/image signals, custom rules and callbacks. VisionEventDetector sends one page-image request to a configured vision model; applications can instead supply their own detector or run local rules without a model. Events preserve source page numbers and reach extraction metadata.

The wrapper restores loader vision state and completes all detection/predicate evaluation before invoking callbacks. Failures propagate rather than returning partial detection success. Documentation covers repeat-load behavior, callback side effects, provider usage and model-dependent accuracy.

Validation: 224 offline tests passed on Python 3.12; all nine event tests also passed on Python 3.9 and 3.13. Covers multimodal request construction, built-in/custom event dispatch, metadata propagation and failure ordering. Strict documentation build and whitespace checks passed. Tests use deterministic detector responses; live vision accuracy was not benchmarked.

Fixes #48

@enoch3712
enoch3712 merged commit e17965e into main Sep 16, 2026
6 checks passed
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.

Events: Add IDP events

1 participant