Output routing
Kheish separates internal output persistence from external delivery.Local output
Every daemon-produced answer is first recorded locally in the daemon’s own output stream and session records. This ensures the output exists even if an external delivery fails.Rich retained outputs
When a run creates daemon-owned media, the visible reply still needs one final persisted output step. Current pattern:- call one generator such as
generate_audio,generate_image, oredit_image - keep the returned daemon asset ids
- call
emit_outputto publish the visible answer and attach those assets
emit_output includes asset parts or sets include_artifacts_inline = true.
Reply targets
Output routing is driven by reply targets. A run can inherit or override reply targets from:- the explicit request
- the session defaults
- connector-derived routing
- an explicit output override
- the run snapshot
- the session defaults
Generic output plugins
External delivery is handled through a generic output plugin model. Output plugins receive normalized response envelopes and can deliver them to one or more external systems.Queued delivery
Connector-backed output delivery is not purely synchronous. Kheish uses a persisted delivery queue with retries, so transient failures do not silently discard outbound responses.Current output surfaces
Today, the daemon can keep output local and route it through queued plugins for:- HTTP
- Slack
- Telegram
