Skip to main content
API reference sections

Schema

ActivityEntry

One line of a subject's activity - a projection of an envelope, not the envelope.

A pane asking "what happened to this task" wants what happened, when, who did it and which lines belong to one gesture. It does not want the device id, the profile id, the emitting session, the payload version or the journal's own append clock, all of which a [StoredEvent] carries. Sending the whole envelope would mean handing a rendering surface a device identity it has no use for, and every later field added to the envelope with it - so the row is enumerated here and the envelope stays the journal's shape.

No content, structurally. The only free-form thing an envelope holds is its attributes, and [AttrValue] has no free-string variant: a value is a reference, a time, a count, a flag, or a token from the vocabulary the registry declared for that key. So passing the map through whole cannot leak a title, a due date, a tag name or a line of text, and the pane gets the tokens it actually needs - reason on a lifecycle event, change and temporal_kind on a Due change, child on a structural one - without this type learning a field per event.

Type object

Shape

FieldTypeDescription
seqrequiredinteger (uint64, >= 0)

The journal position. The page cursor, and the only ordering: two entries are compared by this and never by occurred_at_ms.

namerequiredEventName

A registry-validated dotted event name, e.g. document.created.

Construct literals through [crate::event_name!], which fails the build on a name missing from the registry; a runtime-built name is refused by [crate::validate] at the boundary instead.

occurred_at_msrequiredinteger (int64)

Wall clock, epoch ms UTC. Display only - clocks skew and devices sleep, so a surface prints this and orders by seq.

actorrequiredActorKind

Who acted, as a kind: a person, an agent, or a part of the system.

actor_tokenstring or null

The actor's registered name token when it has one - an agent's name, a system component (store, importer). Lowercase and from a closed vocabulary, never prose, and absent for a person at this profile.

correlation_idrequiredEventId

The causal group. A cascade - completing a parent completes every task under it - is a set of events sharing one of these, not one event with a count, so a pane folds a group into one line by this key. It is [Envelope::chain_root] already resolved: an event that started its own chain reports its own id, so this is never absent and a reader never has to know the None-means-self rule.

attrsmap of string to AttrValue

The event's declared attributes, whole - see the type doc for why that cannot be content.

Example
{
  "seq": 0,
  "name": "string",
  "occurred_at_ms": 0,
  "actor": {},
  "actor_token": "string",
  "correlation_id": {},
  "attrs": {
    "key": {
      "t": "id",
      "v": "00000000-0000-4000-8000-000000000000"
    }
  }
}

The contract has no example values, so example bodies are generated from each schema: every field is shown with a placeholder of its type.

Generated from contract version 1. Last updated .

Privacy choices

Choose which optional tools Koru may use on this site. Your choice is saved in a cookie in this browser for 12 months. Privacy policy

Privacy choices

Keep you signed in, protect forms and remember your language and this choice.

Always on

PostHog and Google Analytics 4 measure page views and actions such as downloads, using cookies or local storage.

PostHog records how pages are used, with form inputs masked and private pages excluded. Needs Analytics.

Ahrefs Web Analytics measures visits and where they come from, and Google Ads measures whether our ads led to a visit or download.