- Reset master to upstream/main (16,697 commits) - Overlay 2,271 local-only files (skills, tools, workspace, configs, apps) - Restore IDENTITY.md and USER.md templates - Build verified, gateway running, Discord working Co-Authored-By: Claude Opus 4.6 <[email protected]>
2.3 KiB
2.3 KiB
EVENTS.md — Event Format and Channels
All James components communicate through Redis using a universal JSON schema.
Schema
Schema file: workspace/james/schemas/event.json
{
"id": "evt-20260204-00123",
"source": "node-a",
"type": "system.metrics",
"timestamp": 1738678200,
"severity": "low",
"payload": {}
}
Validation
- Runtime validation:
workspace/james/lib/schema.py - CLI validation:
workspace/james/tools/validate_event.py
Channels
james.events.system— watcher eventsjames.events.mail— mail agent eventsjames.events.voice— voice stub outputjames.decisions— analyst outputjames.actions— policy outputjames.audit— audit replay channel
Event Types (implemented)
System
system.metricsdisk.high_usagecpu.high_usagememory.high_usagegpu.vram_highcontainer.runningcontainer.stopped
mail.action_requiredmail.invoicemail.security_alertmail.newslettermail.fyi
Decision
decision.action_suggesteddecision.no_action
Action
action.pending_approvalaction.allowedaction.denied
Voice
voice.briefingvoice.approval_request
Severity
low— informationalmedium— notablehigh— urgentcritical— immediate attention
Decision Payload (example)
{
"summary": "disk.high_usage on node-a",
"priority": "medium",
"confidence": 0.72,
"suggested_actions": [
{
"action": "refresh_status",
"target": "node-a",
"reason": "disk.high_usage threshold exceeded"
}
],
"event": {
"id": "evt-20260204-00123",
"type": "disk.high_usage",
"source": "node-a",
"severity": "medium"
}
}
Action Payload (example)
{
"decision_id": "evt-20260204-04567",
"decision_event": {
"id": "evt-20260204-00123",
"type": "disk.high_usage",
"source": "node-a",
"severity": "medium"
},
"actions": [
{
"action": "refresh_status",
"target": "node-a",
"reason": "disk.high_usage threshold exceeded",
"classification": "internal",
"decision_id": "evt-20260204-04567",
"decision_event_id": "evt-20260204-00123",
"requested_by": "node-a",
"status": "allowed"
}
]
}