Play rounds end in present.v1 body instead of creation HITL.

Narrator uses capability-probed structured delivery and falls back to shell body on failure; play UI hides worker questions and keeps thinking on process rows.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-02 01:07:43 +08:00
co-authored by Cursor
parent f37388761b
commit 92b2d88738
11 changed files with 828 additions and 327 deletions
+17
View File
@@ -4,6 +4,8 @@ import {
parsePresentPacket,
parseShellAdaptationFromReplyFormat,
presentFromPlainText,
presentOutputFromFallback,
isPlayPresentWorker,
shellDefaultRegions,
} from "../src/skills/present-packet.js";
@@ -114,3 +116,18 @@ describe("shell adaptation from reply-format", () => {
expect(adapt?.shell_id).toBe("prose");
});
});
describe("play present worker", () => {
it("recognizes narrator and round-present", () => {
expect(isPlayPresentWorker("narrator")).toBe(true);
expect(isPlayPresentWorker("round-present")).toBe(true);
expect(isPlayPresentWorker("world-simulator")).toBe(false);
});
it("fallback packet uses the given shell", () => {
const raw = presentOutputFromFallback("她点了点头。", "chat_monitor");
const view = parsePresentPacket(raw, "prose");
expect(view.packet.shell).toBe("chat_monitor");
expect(view.packet.blocks.body).toBe("她点了点头。");
});
});