@runuai/host 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -375,7 +375,16 @@ class Orchestrator {
375
375
  });
376
376
  break;
377
377
  }
378
- case "turn_complete":
378
+ case "turn_complete": {
379
+ // Turn boundary — the cloud flushes any @-mentions buffered across this
380
+ // turn's messages and wakes the mentioned peers with the full turn.
381
+ this.emitHost({
382
+ kind: "agent.turn_complete",
383
+ taskId: channel.taskId,
384
+ agentId,
385
+ });
386
+ break;
387
+ }
379
388
  case "exit":
380
389
  break;
381
390
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runuai/host",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Uai host — runs ephemeral AI coding tasks in Docker on a machine you control.",
5
5
  "license": "MIT",
6
6
  "author": "Diogo Perillo <diogo.perillo@gmail.com>",
package/src/protocol.ts CHANGED
@@ -399,6 +399,15 @@ export type HostEvent =
399
399
  fullText: string;
400
400
  mentions: string[];
401
401
  }
402
+ // The agent finished a turn (it may have emitted several message_complete
403
+ // items within it). The cloud waits for this before waking @-mentioned peers,
404
+ // so a peer is handed the agent's COMPLETE turn rather than a mid-turn
405
+ // fragment that happened to contain the mention.
406
+ | {
407
+ kind: "agent.turn_complete";
408
+ taskId: string;
409
+ agentId: string;
410
+ }
402
411
  | {
403
412
  kind: "agent.tool_call";
404
413
  taskId: string;