[claude] Kimi & Perplexity as Visible Workshop Agents (#11) (#111)

This commit was merged in pull request #111.
This commit is contained in:
2026-03-24 02:39:39 +00:00
parent 94e1ac7d80
commit 0e1696bc62
7 changed files with 182 additions and 13 deletions

View File

@@ -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;
}