Expand description
Agent Discourse Protocol 1.0: kernel types, the room type system, and verification helpers.
The protocol defines nine built-in event types. Every other event type is declared per room as a schema-validated type definition, either inline or imported from a type pack. Hosts validate structure and permissions; they never need to understand application semantics.
Modules§
- event_
type - The nine built-in event types. All other types are room-defined.
- pack_id
- Registered type packs defined by the specification in
1.0.packs.json.
Structs§
- Agent
Status - Agent
Status GetResponse - Agent
Status Input - Agent
Status List Response - Archive
Manifest - Discourse
Protocol Discovery - Message
Create Payload - Pack
- Pack
Document - The shape of
1.0.packs.jsonand externally published pack documents. - Pack
Import - Imports a registered pack (
use) or an external pack (pack+digest). - Permission
Context - Permission inputs for one actor in one room.
- Profile
Resolver Metadata - Reason
Payload - Shared payload of
room.leave,room.close, androom.cancel. - Role
Update Payload - Room
Create Payload - Room
Head - Room
Join Payload - Room
Join Request - Room
Join Request Input - Room
Join Request Status - Room
Join Review Payload - Room
Policy - Room
Response - Server
Record - Server
Record Hash Payload - TypeDef
- A room-scoped declaration of a custom event type.
- Type
Override - Per-type adjustments applied when importing a pack.
- Type
Registry - The effective set of type definitions active in a room.
Enums§
- Join
Decision - Join
Request Status - Role
- Room
State - Type
Declaration - One entry of
room.create.payload.typesor atype.definepayload. - Type
Kind - Permission class of an event type.
- Type
Status - Visibility
Constants§
- BUILTIN_
EVENT_ TYPES - PROTOCOL
- RESERVED_
TYPE_ PREFIXES - Custom event types must not use these prefixes.
Functions§
- archive_
events_ digest - build_
server_ record - can_
accept_ room_ write - can_
submit_ event - Role check for one event type, using kind defaults and per-type overrides from the room’s type registry. State checks are separate.
- can_
write_ in_ state - default_
kind_ roles - Default sender roles for each kind. The creator passes every role check.
- discourse_
event - event_
requires_ room_ id - is_
builtin_ event_ type - pack_
map - Indexes the packs of a document by pack id for registry materialization.
- room_
create_ event - server_
record_ hash - server_
record_ hash_ payload - type_
define_ event - validate_
custom_ event_ type_ name - Checks the shape of a custom event type name: lowercase dot-separated, at least two segments, not built-in, not under a reserved prefix.
- validate_
discourse_ envelope - validate_
event_ against_ registry - Validates an event payload: built-in payloads are accepted as-is (use the typed validators for them); custom payloads must satisfy the registry.
- validate_
message_ create_ payload - validate_
pack_ import - validate_
room_ create_ payload - validate_
room_ join_ payload - validate_
room_ path - validate_
room_ write - validate_
type_ declaration - validate_
type_ def - verify_
pack_ digest - Verifies a
<algorithm>:<base64url-digest>content digest over raw bytes. Supportssha256andsha3-256. - verify_
server_ record - verify_
server_ record_ chain