What the channel layer does
Wirken routes messages from named chat surfaces to one agent that answers to you. Each channel runs in its own adapter process with its own platform credentials, and the switchboard authenticates the channel identity on every IPC frame. You decide which channels exist; the channels never decide on your behalf.
The adapters
Each adapter is an independent Cargo crate that converts platform messages to and from the same Cap'n Proto frame the switchboard expects. The set:
Adding a channel means writing one more crate against the same trait set. The switchboard does not care which channel a frame arrived on, as long as it can prove the frame arrived on the channel the connection authenticated as.
Cross-channel isolation
AuthenticatedChannel is the channel a connection resolved to during the Ed25519 handshake; the gateway sets it once and checks every inbound frame against it. SessionHandle<C: Channel> is a session reference parameterized by a channel marker; SessionHandle<Telegram> and SessionHandle<Discord> are distinct Rust types. That typed handle is not used on the production message path: there, crossing channels is refused by a runtime check, not by the compiler.
pub trait Channel: Send + Sync + 'static {
fn id() -> &'static str;
}
pub struct AuthenticatedChannel(String);
pub struct SessionHandle<C: Channel> {
id: SessionId,
_channel: PhantomData<C>,
}
A function that takes a SessionHandle<Telegram> does not accept a SessionHandle<Discord>. On the production path the gateway runs AuthenticatedChannel::require_match on every inbound frame, which refuses a mismatch and writes it to the audit chain. The credentials handed to an adapter are that adapter's own.
What lands in the audit log
A tool call is written to the session's hash chain before it runs, and its result after. Three rows from one session, as wirken audit log --format json prints them:
{
"action": "assistant_tool_calls",
"actor_id": "",
"actor_kind": "user",
"channel": null,
"detail": {
"agent_id": "default",
"calls": [
{
"arguments": "{}",
"id": "call_hg7477ku",
"name": "list_files"
},
{
"arguments": "{\"path\":\"notes.txt\"}",
"id": "call_p4wj64k5",
"name": "read_file"
}
]
},
"hash": "b3169cf11e36d52de1b5f6c8cc93aac67b1be4e31bd6f083bd2e684f08150304",
"id": 9,
"session": {
"full": "default"
},
"target": "",
"ts": "2026-11-12T01:42:15.275320760+00:00"
}
{
"action": "tool_result",
"actor_id": "",
"actor_kind": "user",
"channel": null,
"detail": {
"agent_id": "default",
"call_id": "call_hg7477ku",
"output": "notes.txt",
"success": true,
"tool_name": "list_files"
},
"hash": "e7a78eb66c755906cdfd567ccbccb2b730e16a01f507922a4b4ee439662e1d97",
"id": 11,
"session": {
"full": "default"
},
"target": "",
"ts": "2026-11-12T01:42:15.275852070+00:00"
}
{
"action": "llm_request",
"actor_id": "",
"actor_kind": "user",
"channel": null,
"detail": {
"agent_id": "default",
"messages_hash": "b4d0ed4a5cb823cffba6fe2e83998c53195bf1c639835e8b09b07b2efee2ab67",
"model": "qwen2.5:7b",
"provider": "ollama",
"request_bytes": 6690,
"request_id": "req-c2739452-14a2-47fc-a864-e422a992bd14",
"tools_hash": "d3e9d3691a34b13620f3e353b9a35c71d903f2e971ce8be7cd1650f1bd04b75d",
"tools_hash_version": "v2"
},
"hash": "db1f59c1ea90284ed3a14153eaa95cc899d07d6ade5d465f144a188e82d56ae1",
"id": 13,
"session": {
"full": "default"
},
"target": "",
"ts": "2026-11-12T01:42:15.276797579+00:00"
}
Each row's hash covers the row before it, so changing a row changes every hash after it. Removing rows from the end of a session is not detected by the chain itself.
SIEM forwarding
The same typed events feed a SIEM forwarder when one is configured. Datadog, Splunk HEC, Microsoft Sentinel, and any HTTPS webhook are first-class targets. Events ship after they land in the chain, so the SIEM stream and your local audit log are independent views of the same record.
If you want structured ingestion, choose typed events. If you already have a normalizer pointed at a generic webhook, keep using it.
Verify a session offline
wirken sessions verify reads the session's rows, recomputes message hashes, re-runs read_file and list_files against the current workspace, and reports any divergence.
$ wirken sessions verify default
wirken sessions verify default
──────────────────────
agent: default
Note: deterministic tools (read_file, list_files) are re-executed against the
CURRENT workspace, not the workspace state at the time of execution.
events_total: 13
events_verified: 11
events_unverifiable: 2
events_divergent: 0
chain: OK (13 rows)
Chain-head Ed25519 signatures are checked with wirken audit verify, which walks every session's chain and verifies the signature on each head. Checking against a copy of the public key kept off the machine is what detects a rewrite by a process running as the same user.