diff --git a/.changeset/transcript-notification-fold.md b/.changeset/transcript-notification-fold.md new file mode 100644 index 0000000000..22b28162c2 --- /dev/null +++ b/.changeset/transcript-notification-fold.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Fix the cold transcript rebuild splitting a turn at background-task completion notices; they now fold into the current turn like the live stream does. diff --git a/packages/agent-core-v2/src/agent/prompt/promptOps.ts b/packages/agent-core-v2/src/agent/prompt/promptOps.ts index 60342fcecb..52fa432ff6 100644 --- a/packages/agent-core-v2/src/agent/prompt/promptOps.ts +++ b/packages/agent-core-v2/src/agent/prompt/promptOps.ts @@ -12,6 +12,7 @@ const promptAcceptedSchema = z.object({ export class PromptAccepted extends AgentEvent2> { static override readonly type = 'prompt.accepted'; static override readonly durable = true; + static override readonly observable = true; static override readonly schema = promptAcceptedSchema; } export interface PromptAccepted { diff --git a/packages/agent-core-v2/test/agent/loop/loop.test.ts b/packages/agent-core-v2/test/agent/loop/loop.test.ts index fe78957756..a84c5e3a7e 100644 --- a/packages/agent-core-v2/test/agent/loop/loop.test.ts +++ b/packages/agent-core-v2/test/agent/loop/loop.test.ts @@ -67,6 +67,7 @@ describe('Agent loop', () => { expect(await ctx.untilTurnEnd()).toMatchInlineSnapshot(` [wire] tools.set_active_tools { "agentId": "main", "names": [], "time": "