Skip to main content

Module attribution

Module attribution 

Source
Expand description

Alias-bound attribution surface used by every emission in the workspace. Each “thing” that participates in an event (channel, agent, tool, cron job, model provider, memory backend, peer group, skill bundle, MCP bundle, session) implements Attributable. Entry points open attribution_span!(thing) once at the start of their work; the LogCaptureLayer in zeroclaw-log walks the span scope and fills the typed attribution slots automatically.

Adding a new variant: extend the relevant Kind enum (the variant name’s snake_case form is the canonical <type> string via strum::IntoStaticStr), and — only if a new role family is needed — update the Role::composite_prefix / Role::attribution_field / Role::default_category match arms. No call-site changes.

Enums§

ChannelKind
Channel implementations.
CronKind
Cron schedule shapes.
MemoryKind
ModelProviderKind
ProviderKind
Provider family. The inner enum carries the specific implementation; the outer family drives which composite prefix (model_provider / tts_provider / …) the layer populates.
Role
Closed taxonomy of every role a thing can fill.
ToolKind
Built-in tool implementations. Closed set — plugins that need their own attribution add a variant here.
TranscriptionProviderKind
TtsProviderKind
TunnelProviderKind

Traits§

Attributable
Trait every alias-bound “thing” implements once next to its struct.