import type { ToolCall } from '@moonshot-ai/kosong'; import { expect, it } from 'vitest'; import { createCommandKaos, testAgent } from './harness/agent'; it('runs a text-only agent turn from prompt to completion', async () => { const ctx = testAgent(); ctx.configure(); ctx.mockNextResponse({ type: 'think', think: '' }, { type: 'text', text: '' }); await ctx.rpc.prompt({ input: [{ type: 'text', text: 'Hello' }] }); expect(await ctx.untilTurnEnd()).toMatchInlineSnapshot(` [wire] turn.prompt { "input": [ { "type": "text", "text": "Hello" } ], "origin": { "kind": "user" }, "time": "