Files
Clawd BotandClaude Opus 4.6 ca9b510922 chore: align with upstream openclaw/openclaw and overlay local additions
- 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]>
2026-03-03 07:40:46 +01:00

2.5 KiB

EVENTS.md — Event Format and Channels

All communication between system components happens through Redis using structured JSON events.


Universal Event Schema

{
  "id": "evt-20260204-00123",
  "source": "gpu-box",
  "type": "system.alert",
  "timestamp": 1738678200,
  "severity": "medium",
  "payload": {}
}

Channels

james.events.system

Emitted by Watchers.

Examples:

  • container_down
  • vram_high
  • disk_full
  • service_unhealthy

james.events.mail

Emitted by Mail Agent.

Examples:

  • important_email
  • invoice_detected
  • security_notice

james.decisions

Emitted by Analyst.

Contains priority, confidence, and suggested actions.

james.actions

Emitted after human or policy approval.

Consumed by Action Router.

james.audit

Immutable log of:

  • Events
  • Decisions
  • Approvals
  • Executed actions

Severity Levels

  • low → informational
  • medium → notable
  • high → urgent
  • critical → immediate attention

Event Types

System Events

  • system.metrics
  • container.stopped
  • container.restarted
  • disk.high_usage
  • cpu.high_usage
  • memory.high_usage
  • gpu.vram_high
  • service.unhealthy
  • backup.failed

Mail Events

  • mail.action_required
  • mail.invoice
  • mail.security_alert
  • mail.newsletter

Decision Events

  • decision.action_suggested
  • decision.approval_required
  • decision.denied
  • decision.no_action

Action Events

  • action.executed
  • action.failed
  • action.pending_approval
  • action.allowed
  • action.denied

Decision Payload (example)

{
  "summary": "disk.high_usage on gpu-box",
  "priority": "medium",
  "confidence": 0.72,
  "suggested_actions": [
    {
      "action": "refresh_status",
      "target": "gpu-box",
      "reason": "disk.high_usage threshold exceeded"
    }
  ],
  "event": {
    "id": "evt-20260204-00123",
    "type": "disk.high_usage",
    "source": "gpu-box",
    "severity": "medium"
  }
}

Action Payload (example)

{
  "decision_id": "evt-20260204-04567",
  "decision_event": {
    "id": "evt-20260204-00123",
    "type": "disk.high_usage",
    "source": "gpu-box",
    "severity": "medium"
  },
  "actions": [
    {
      "action": "refresh_status",
      "target": "gpu-box",
      "reason": "disk.high_usage threshold exceeded",
      "classification": "internal",
      "decision_id": null,
      "decision_event_id": "evt-20260204-00123",
      "requested_by": "gpu-box",
      "status": "allowed"
    }
  ]
}