Files
goclaw/pkg/protocol/events.go
T
Viet TranandClaude Opus 4.6 f3f4c67b36 Initial commit: GoClaw AI agent gateway
Multi-agent AI gateway with WebSocket RPC, HTTP API, and messaging channel integrations.
Go port of OpenClaw with multi-tenant PostgreSQL, per-user isolation, security hardening,
and production observability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:58:07 +07:00

42 lines
1.3 KiB
Go

package protocol
// WebSocket event names pushed from server to client.
const (
EventAgent = "agent"
EventChat = "chat"
EventHealth = "health"
EventCron = "cron"
EventExecApprovalReq = "exec.approval.requested"
EventExecApprovalRes = "exec.approval.resolved"
EventPresence = "presence"
EventTick = "tick"
EventShutdown = "shutdown"
EventNodePairRequested = "node.pair.requested"
EventNodePairResolved = "node.pair.resolved"
EventDevicePairReq = "device.pair.requested"
EventDevicePairRes = "device.pair.resolved"
EventVoicewakeChanged = "voicewake.changed"
EventConnectChallenge = "connect.challenge"
EventHeartbeat = "heartbeat"
EventTalkMode = "talk.mode"
// Cache invalidation events (internal, not forwarded to WS clients).
EventCacheInvalidate = "cache.invalidate"
)
// Agent event subtypes (in payload.type)
const (
AgentEventRunStarted = "run.started"
AgentEventRunCompleted = "run.completed"
AgentEventRunFailed = "run.failed"
AgentEventToolCall = "tool.call"
AgentEventToolResult = "tool.result"
)
// Chat event subtypes (in payload.type)
const (
ChatEventChunk = "chunk"
ChatEventMessage = "message"
ChatEventThinking = "thinking"
)