1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! Shared event types for the control bus — types only, no transport.
//!
//! Why: Owner ruling 2026-09-05 (superseding DOC-73 §4.1 Option C) makes
//! trusty-console the one and only event bus. Every harness —
//! trusty-agents, trusty-mpm, trusty-code — is a producer that pushes to
//! it. Producers and that consumer must agree on the envelope, so the
//! envelope cannot live inside any one producer: before this module,
//! reaching these types meant depending on `trusty-agents-common`, which
//! is a sibling producer, not a shared library. Hoisting the types here
//! gives all four crates one definition and no producer-to-producer edge.
//! What: Re-exports `HarnessSource` and `LifecycleEvent` (the taxonomy),
//! `HarnessPayload` and `HarnessEvent` (the envelope), `EventId` (the
//! envelope's `id`/`parent_id` type, issue #6847), `Filter` (the
//! subscriber-side predicate), the `ActionEvent` taxonomy and its
//! supporting types (`ActionMeta`, `Actor`, `ObjectRef`, `ObjectType`,
//! `PathRef`, and the five phase enums, issue #6847, DOC-73 §3.2), and
//! — behind the `uds` feature, unix only — `PushClient` (the buffered
//! producer-side transport to console's ingest socket, DOC-73 §4).
//! Everything except `PushClient` is a type with no transport: no
//! channel, no process-global sender, no sequence counter. A producer
//! stamps `seq`, `at`, and `id` itself and hands the envelope to
//! `PushClient`, which buffers and dials out; the bus that assigns
//! `seq` on arrival, orders, retains, and fans events back out is
//! trusty-console's alone.
//! Test: `tests` below covers serde round-trips and the filter matrix, and
//! `tests::control_bus_declares_no_transport` reads this module's own
//! sources to keep the types-only boundary from eroding — `PushClient`
//! is the one deliberate, scanned-and-allowed exception (its own
//! module doc explains why it still satisfies that scan); its own
//! behavioral tests live beside it in `push_client.rs`.
// #6846: hoisted out of `trusty_agents_common::events`, which keeps its
// in-process channel and stderr relay until slice 9 (#6854) removes them.
// #6847: `event_id` added — `uuid` became a mandatory dependency of this
// crate (previously optional, gated behind `rpc`/`daemon-token`/etc.) because
// `HarnessEvent` is ungated and now always carries an `EventId`. `action`
// (the `HarnessPayload::Action` taxonomy, DOC-73 §3.2) and `push_client` (the
// buffered UDS client, DOC-73 §4) close out the two items #6847 still owed
// after the envelope fields landed in #7150. `push_client` is gated on `uds`
// (and `unix`, matching every other consumer of `crate::uds`) because it is
// the first thing in this module that actually dials a socket; `action` adds
// no dependency, so it stays unconditional like every other type here.
pub use ;
pub use ;
pub use EventId;
pub use Filter;
pub use ;
pub use ;