Problem
When Relay calls ai-hist-native syncAndPush for background Reflex history capture, the native importer writes progress directly to the host process standard streams, for example:
[codex] scanned 1 new rollout files; 1516 sessions mapped
This bypasses Relay's structured logger and pollutes normal agent-relay up output. Relay can gate its own Reflex diagnostics, but cannot intercept native writes.
Requested behavior
Add a quiet/logging control for the NAPI syncAndPush entry point. When called programmatically, it should be silent by default (or accept an explicit quiet option). Progress should be returned as structured data and left to the caller's logger.
CLI usage may keep its current human-readable progress output.
Acceptance criteria
- Calling NAPI syncAndPush does not directly write importer progress to standard streams by default.
- The API can expose useful structured sync progress/results for callers that opt into logging.
- Existing ai-hist CLI progress behavior remains unchanged, or has an explicit verbose mode.
- Add coverage for quiet NAPI invocation.
Context
Relay will route Reflex events to its shared log file and show them only with agent-relay up --verbose. This change is needed so the Codex importer lines follow the same policy.
Problem
When Relay calls ai-hist-native syncAndPush for background Reflex history capture, the native importer writes progress directly to the host process standard streams, for example:
[codex] scanned 1 new rollout files; 1516 sessions mapped
This bypasses Relay's structured logger and pollutes normal agent-relay up output. Relay can gate its own Reflex diagnostics, but cannot intercept native writes.
Requested behavior
Add a quiet/logging control for the NAPI syncAndPush entry point. When called programmatically, it should be silent by default (or accept an explicit quiet option). Progress should be returned as structured data and left to the caller's logger.
CLI usage may keep its current human-readable progress output.
Acceptance criteria
Context
Relay will route Reflex events to its shared log file and show them only with agent-relay up --verbose. This change is needed so the Codex importer lines follow the same policy.