v3.2.0
What's Changed
- feat: auto batching and configurable agent mode by @Cerlancism in #66
New Features
Agent Mode Improvements (agent subcommand)
A new agent subcommand comes with a set of specific configurable options. It is still also available as -r, --structured agent for the default configuration, which uses now array mode as the delegate.
The agent mode has been expanded into a multi-pass pipeline:
Overview pass: Samples the file to generate a content overview (file identity, duration, entry count, genre/tone, character names) and detects the source language.
Planning pass: Scans the file in token-bounded windows derived from the context budget, rather than fixed max-batch-size chunks. Each window produces a batch summary and determines a natural batch boundary. Summaries are consolidated and used to generate a refined translation instruction. The final refinement step can be skipped with --skip-refine.
Translation pass: Uses the enriched instruction and agent-determined batch boundaries. The delegate translation mode defaults to array; pass -r timestamp alongside the agent subcommand to use timestamp mode instead.
# Default (array delegate)
cli/translator.mjs agent -i subtitles.srt --from Japanese --to English
# Timestamp delegate
cli/translator.mjs agent -i subtitles.srt -r timestamp --from Japanese --to EnglishNew options available for agent subcommand:
--context-summary: Provide a context summary directly, skipping the planning pass entirely.--skip-refine: Bypass the final instruction refinement step at the end of the planning pass.
Language verification: Before translation begins, a sample of the input is checked to confirm the detected source language. A sample of the first batch output is then verified to confirm it matches the target language before proceeding.
Auto Batch Size
When --batch-sizes is omitted, the batch size is now derived automatically from the context budget (-c, --context).
Full Changelog: v3.1.3...v3.2.0