Skip to main content

Module op

Module op 

Source
Expand description

Op-in API in crates/protocol (issue #5261).

The TUI engine already had an internal channel (Op in crates/tui/src/core/ops.rs with tx_op / rx_op and tx_steer). This protocol file formalizes that channel so TUI, CLI, app-server, and tests share one serializable API. The wire is OpEnvelope + Op; transports that already speak JSON (app-server, tests) can send the envelope directly, while in-process callers continue to use the typed enum.

Structs§

OpEnvelope
Every Op is paired with the ids that route it. This is the Op-in half of the Op-in / EventMsg-out contract.

Enums§

Op
Operations that can be submitted to the core engine. This is the protocol view of crates/tui/src/core/ops::Op — same lifecycle, same provenance gate — but serializable and free of mpsc / oneshot fields. In-process callers convert at the boundary; out-of-process callers send the JSON directly.

Functions§

headless_send_message_op
Build a headless SendMessage envelope with fresh ids. This is the one-line helper every headless caller (CLI exec, app-server, tests) uses so TUI and headless start a session identically.