PDF Craft v2.6.5
PDF Craft 2.6.5 adds translation-size previews and operation-scoped resource
reports, so applications can inspect source words before execution and observed
remote consumption after completion, failure or cancellation.
- New
pcex_words_countandepub_words_countread-only queries share the actual
translation pre-scan and source-word rules. Matching options produce the same
total as translation'sSTARTED.total_words. Both Craft facades expose methods;
the async facade keeps parsing outside the event loop. - New
UsageCollector,UsageReport,UsageandRequestUsagegroup observed
requests and input/output/cache-hit input tokens by original provider object.
Passusage=to model-calling operations and inspectusage.report()without
changing the operation's existing return type. - Accepted and discarded consumption are separated as
effectiveandwasted,
including transport retries and business validation loops. Missing usage is not
estimated. Provider prompt cache is distinguished from ordinary input; local
cache hits do not create external consumption. - Support LLM, JEV and OCR vendors. OCR counts recognition submissions rather than
pages, authentication calls or polling. ExistingOCRTokensMeteringis retained. - Classify translation and fill consumption for withdrawn PCEX metadata collections
as wasted, including otherwise valid members of an incompletesubjectslist.
Independent accepted fields retain their effective consumption. Collections are
translated separately from scalar fields so their usage can be settled accurately. - Adopt
doc-page-extractor1.2.2 and clip second-pass vendor OCR boxes against the
actual redaction masks. This prevents later-stage detections from extending into
previously recognized regions, including oversized footer boxes that blocked PDF
translation writeback. See #545. - Read PCEX queue readiness and results from one SQLite snapshot, avoiding a race
where online rendering or callbacks could read an unfinished result during scanning. - See usage and sizing or 中文说明 for examples,
the accounting boundaries, and limitations. PCEX v4 and progress events are unchanged.
Resource reporting and task sizing: #550.
Full Changelog: v2.6.4...v2.6.5