feat: add Kimi & Perplexity as visible Workshop agents (#11)
Some checks failed
CI / Typecheck & Lint (pull_request) Failing after 1s
Some checks failed
CI / Typecheck & Lint (pull_request) Failing after 1s
- agent-defs.js: add Kimi (Long Context Analysis, cyan) and Perplexity (Real-time Research, pink) with world positions at (-10,-10) and (10,-10) - agents.js: add 3D geometric bodies for both agents — Kimi as an octahedron with orbital rings, Perplexity as an icosahedron with scanning tori; idle/active/dormant animations driven by agent state; restrict Timmy mood derivation to workshop agents only - hud-labels.js: show specialization and last-task summary in inspect popup; export setLabelLastTask() for WS updates - websocket.js: handle agent_task_summary messages; call setLabelLastTask on job_completed events - world-state.ts: add kimi and perplexity to initial agentStates; restrict _deriveTimmy() to workshop agents only - event-bus.ts: add AgentExternalEvent type for external agent state changes - events.ts: handle agent:external_state bus events, broadcast agent_state and agent_task_summary WS messages Fixes #11 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -269,6 +269,21 @@ function translateEvent(ev: BusEvent): object | null {
|
||||
text: ev.text,
|
||||
};
|
||||
|
||||
// ── External agent state (Kimi, Perplexity) (#11) ─────────────────────────
|
||||
case "agent:external_state": {
|
||||
updateAgentWorld(ev.agentId, ev.state);
|
||||
void logWorldEvent(
|
||||
`agent:${ev.state}`,
|
||||
`${ev.agentId} is now ${ev.state}${ev.taskSummary ? `: ${ev.taskSummary.slice(0, 80)}` : ""}`,
|
||||
ev.agentId,
|
||||
);
|
||||
const msgs: object[] = [{ type: "agent_state", agentId: ev.agentId, state: ev.state }];
|
||||
if (ev.taskSummary) {
|
||||
msgs.push({ type: "agent_task_summary", agentId: ev.agentId, summary: ev.taskSummary });
|
||||
}
|
||||
return msgs;
|
||||
}
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user