CCCC Rust SDK
Official blocking Rust client for the native CCCC Daemon IPC v1. SDK language does not constrain application architecture; Python and TypeScript clients use the same daemon contract.
This version targets the CCCC 0.4.55 daemon contract.
Structured answers use client.call("reply_request_answer", args) with JSON
values, including V2 option-plus-note answers. See the
three-language examples.
The 0.4.55 alignment includes the daemon's Backlog, task and delivery
contracts. Backlog operations and task sources use generic call; no typed
Backlog workflow or automatic retry is added. Coordination-note operations
are retired by the daemon. See the
0.4.55 migration guide.
Install
[]
= "0.4.55"
Quick start
use ;
The client discovers ${CCCC_HOME}/daemon/ccccd.addr.json, supports Unix
sockets and TCP, and falls back to ${CCCC_HOME}/daemon/ccccd.sock on Unix.
Common helpers include ping, groups, group_show, send, reply,
inbox_peek, inbox_read, message_history, message_deliver, reply_request_cancel,
context_get, context_get_with_detail, context_sync, cursor-based terminal
reads, and Web Model delivery-preference/recovery operations. Use call
for every other non-streaming operation:
use CCCCClient;
use ;
let client = discover?;
let args: =
.into_iter
.collect;
let preamble = client.call?;
# Ok::
message_history_with_options supports a sender filter with CCCC 0.4.50 or
later; older daemons silently ignore it. group_activity reports review leads,
not member value; scheduled notices do not prove delivery or a model turn.
group_automation_run_now("g_xxx", "standup", "user", Some(7)) runs a saved
notification rule once without changing its schedule or run limit. It creates
real notifications and may wake members and use model credits. The returned
Actor IDs identify notices written to the ledger, not confirmed deliveries;
an interrupted response can leave the outcome unknown and must not be silently
retried.
Terminal helpers return typed cursor payloads. term_resize uses the standard
operation name and falls back to the compatibility
terminal_resize alias only after unknown_op; the legacy success payload is
normalized to the standard typed result:
use ;
let client = discover?;
let snapshot = client.terminal_snapshot?;
println!;
# Ok::
Clients created by discover / discover_in re-read ccccd.addr.json after
a connection-establishment failure. Once request exchange begins, failures are
reported as Error::OutcomeUnknown and are never replayed automatically.
Clients created with new(endpoint) keep that explicit endpoint.
assert_compatible probes requested operation names and rejects an advertised
capability whose actual operation returns unknown_op.
Streaming upgrade operations such as events_stream and term_attach are not
exposed as iterators in this SDK. assert_compatible uses advertised capabilities
for unsafe duplex operations and rejects unverified requirements; a reusable stream API will be added only with stable ownership,
close, and backpressure semantics.
Voice library and Web Models
Use assistant_voice_document_library, assistant_voice_document_library_update
and assistant_voice_document_delete for the stored Voice library. Updates take
VoiceDocumentLibraryAction and return VoiceDocumentLibrary; folder removal
retains documents, and renaming never moves files. An empty ReorderRoot list
clears ordering; an empty Move.folder_id means root. Deletion permanently
removes the Markdown file; archive/restore retains it.
Create/update Actors through generic IPC calls with runtime="grok_web_model"
for Grok Bot or runtime="web_model" for ChatGPT. CCCC Web configures the Grok
Bot URL, native Webhook Routine credentials and remote MCP connector; Grok does
not use CCCC-managed browser delivery. grok is the separate CLI runtime.
See the migration guide.