interface WorldState {
timestamp: number
agentId: string
systemState: {
activeAgents: string[] // Which agents are running
worktreeAllocation: {} // Git worktree usage
hubConnections: number // Context Hub connections
buildStatus: Record<string, string> // Build health per service
fileLocks: string[] // Currently locked files
pendingEvals: number // Queued eval runs
}
contextState: {
recentCommits: number // Commits in last 24h
openPRs: number // Open pull requests
failingTests: number // Currently failing tests
codeChurn: number // Lines changed recently
humanActivity: boolean // Is a human currently working?
}
agentState: {
lastEvalScore: number // Most recent eval composite
rewardEMA: number // Exponential moving average of rewards
actionHistory: string[] // Recent action types taken
consecutiveFailures: number // Reverts in a row
}
}