@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.
- package/lib/orchestrator.ts +10 -1
- package/package.json +1 -1
- package/src/protocol.ts +9 -0
package/lib/orchestrator.ts
CHANGED
|
@@ -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
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;
|