Skip to main content

Module cl

Module cl 

Source
Expand description

Content Language (CL) — spec §6.2.

The shared grammar agents use inside envelope bodies: facts about the world, typed actions, queries, and commitments. This is what makes ACL a communication language (agent-agnostic semantics) rather than only a transport protocol.

Design notes:

  • Fact.args is a BTreeMap so serialization is canonical (identical bytes regardless of insertion order) — required for stable signatures.
  • well_formed is the normative grammar matrix (§6.2): which CL ops a performative may carry. Receivers SHOULD validate; encoders MUST emit well-formed bodies.

Structs§

ClAction
An action expression: name(params) -> result_schema?.

Enums§

ClExpr
One content-language expression.
ClValue
Typed content value (§27): the CL’s own type system. Wire-compatible with plain msgpack/JSON values (Str→string, Int→integer, …) so existing encoders keep working — but Rust-level code now knows the TYPE. Var is the exception: it serializes as a single-key map {"$var": name} to stay unambiguous with Str.
CommitmentStatus
Status of a commitment (§6.2 lifecycle).
Epistemic
Epistemic modality of a fact (spec §6.4): how the sender holds it.

Functions§

well_formed
Normative grammar (spec §6.2): which CL ops each performative may carry. Returns Err with a human-readable reason on ill-formed combinations.