[Feature]: Option to stream repository progress in --print mode
Summary
Opt-in streaming of repository_progress events in --print mode. Default stays buffered.
Motivation
openwiki code --update --print buffers every repository_progress event until the run finishes. handlePrintEvent inside runPrintCommand (src/cli/runners.ts:274 at 0.5.2) pushes them into output[], which is flushed once at the end. In a GitHub Actions job the log is empty for the whole run. Ours takes 40+ minutes for a ~30-page wiki on Opus, and there is no way to tell progress from a hang.
I'd like this opt-in, not a change to the default. The current behaviour keeps stdout a single clean payload, and changing that would break anyone parsing it.
Proposed Solution
- A flag or env var, e.g.
--stream-progressorOPENWIKI_PRINT_STREAM_PROGRESS=1. - When set,
repository_progressevents go straight toprocess.stdout.write(or stderr, if stdout should stay a pure payload).textevents stay buffered. - Default unchanged.
runIngestCommand already writes events to stdout as they arrive, so the pattern exists in the codebase.
Alternatives Considered
Workaround we run in CI today: a guarded perl substitution on the installed dist/cli/runners.js after npm install --global. It works, but has to be re-verified on every version bump.
Additional Context
Happy to open a PR with a test if there's interest.
Source: langchain-ai/openwiki