14. Protocol Constants & Configuration

Constants are fixed by the specification. Configuration is per-agent and per-implementation. Both are normative — implementations MUST respect constants and SHOULD use the default configuration values unless the agent’s domain requires otherwise.

14.1 Protocol Constants

ConstantValueNotes
MAX_FRAME_SIZE1,048,576 bytesFrames exceeding this MUST be rejected
HANDSHAKE_TIMEOUT10,000 msInbound identification deadline
HEARTBEAT_INTERVAL5,000 msDefault; configurable per implementation
HEARTBEAT_TIMEOUT15,000 msDefault; configurable per implementation
STATE_SYNC_INTERVAL30,000 msDefault periodic re-broadcast
WAKE_COOLDOWN300,000 msDefault per-peer wake rate limit
PEER_RETENTION300 sStale peer eviction age
DNS-SD_SERVICE_TYPE_sym._tcpService type for Bonjour discovery
DNS-SD_DOMAINlocal.Discovery domain

14.2 Agent Profiles

Each agent type has a pre-built configuration. The profile determines which CMB fields matter most (αf weights) and how long signals stay relevant (freshness window). New agent types join the mesh by defining their profile — no protocol changes needed.

ProfileBest forFreshnessWhy this freshness
musicMusic, ambience, soundscapes1,800s (30min)Stale mood = wrong music. React fast.
codingCoding assistants, dev tools7,200s (2hr)Session context matters. Yesterday’s debugging doesn’t.
fitnessFitness, health, movement10,800s (3hr)Sedentary detection needs hours of context.
messagingChat, notifications, social3,600s (1hr)Recent conversation context. Older messages lose relevance.
knowledgeNews feeds, research, digests86,400s (24hr)Daily cycle. Today’s news is relevant until tomorrow’s.
legalLegal, compliance, contracts86,400s (24hr)Regulatory deadlines don’t expire fast.
healthHealth monitoring, clinical10,800s (3hr)Patient state evolves over hours, not minutes.
financeFinance, trading, compliance7,200s (2hr)Market sessions. After-hours context fades.
uniformGeneral purpose, prototyping1,800s (30min)No field preference. Good starting point.

14.3 CAT7 Field Weights (αf)

Per-agent field weights control which CMB fields matter most for each agent type. Higher weight = this field has more influence on SVAF evaluation and remix relevance. The schema is fixed (7 fields). The weights are per-agent.

Agentfocissintmotcompermood
Coding21.51.511.210.8
Music10.80.80.80.81.22
Fitness1.51.511.5112
Knowledge21.51.510.51.50.3
Legal221.5121.50.5
Health1.5211.511.52
Finance221.51220.3

Regulated domains (legal, finance): issue and commitment always high — risks and obligations are non-negotiable. Human-facing domains (music, fitness, health): mood always high — affect drives the experience.Knowledge domains (coding, research): focus always high — subject matter is core.

Custom weights: derive from your domain using these patterns. Implementations SHOULD expose field weights as configuration, not hardcode them.

14.4 SVAF Drift Thresholds

SVAF computes a totalDrift score (0–1) for each incoming memory. Three zones determine acceptance:

ZoneDriftActionDefault
Aligned≤ TstableAccepted, full blending0.25
GuardedTstable < drift ≤ TguardedAccepted, attenuated blending0.50
Rejected> TguardedDiscarded

Defaults work for most agents. Override only with domain-specific reason: tighter thresholds for high-precision domains (legal, health), wider for exploratory domains (research, knowledge).

14.5 Mood vs Memory Thresholds

Mood and memory use different acceptance paths:

SignalGateDefaultWhy
MoodKuramoto coupling drift0.80 (permissive)Affect crosses all domain boundaries
MemorySVAF per-field drift0.50 (selective)Memories are domain-specific

14.6 Drift Formula

totalDrift = (1 - λ) × fieldDrift + λ × temporalDrift

fieldDrift    = Σ(α_f × δ_f) / Σ(α_f)
temporalDrift = 1 - exp(-age / τ_freshness)
λ             = temporalLambda (default 0.3 = 70% content, 30% time)

At default settings (temporalLambda: 0.3, freshnessSeconds: 1800):

Signal ageTemporal drift contribution
1 minute~0.01 — negligible
30 minutes~0.19 — noticeable
2 hours~0.29 — likely pushes over threshold