Skip to main content

Module outbox

Module outbox 

Source
Expand description

Durable outbox: everything bound for Cloud is written here first and sent later by the scheduler (or lean-ctx cloud sync), so Cloud never blocks a tool call and nothing is lost while offline.

<data_dir>/cloud/outbox/<channel>/<id>.json, one 0600 file per item, ids sort by creation time and double as Idempotency-Key. At most 10 000 items / 50 MB: when full, the oldest metrics give way; knowledge is never dropped silently (enqueueing fails instead). An item Cloud refuses for good moves to outbox/failed/<channel>/ and stays visible in cloud status; each channel keeps the newest MAX_FAILED there and the newest MAX_DAMAGED damaged files (RB8 M14).

Structs§

Outbox
OutboxDepth
Counts for cloud status.
OutboxItem

Constants§

CHANNEL_KNOWLEDGE
CHANNEL_METRICS
CHANNEL_RECEIPTS
CHANNEL_TASKS
Task proposals (C0 1.9 §1): agent tasks and contradictions.
CHANNEL_TASK_EVIDENCE
The evidence of a closed Cloud task (leanctx.cloud.task-evidence/v1, contract §36): IDs, digests and counts, never content.
MAX_DAMAGED
Damaged item files (*.damaged) kept per channel, newest first.
MAX_FAILED
Refused items kept per channel under failed/, newest first.