fix(types): align portable runtime helpers

This commit is contained in:
Vincent Koc
2026-04-04 03:15:14 +09:00
parent 5e204df0bf
commit 516e9054de
4 changed files with 37 additions and 28 deletions

View File

@@ -112,7 +112,7 @@ function expectChannels(call: Record<string, unknown>, channel: string) {
}
function readAgentCommandCall(fromEnd = 1) {
const calls = vi.mocked(agentCommand).mock.calls as unknown[][];
const calls = vi.mocked(agentCommand).mock.calls;
return (calls.at(-fromEnd)?.[0] ?? {}) as Record<string, unknown>;
}
@@ -376,7 +376,7 @@ describe("gateway server agent", () => {
test("agent routes bare /new through session reset before running greeting prompt", async () => {
await writeMainSessionEntry({ sessionId: "sess-main-before-reset" });
const spy = vi.mocked(agentCommand);
const calls = spy.mock.calls as unknown[][];
const calls = spy.mock.calls;
const callsBefore = calls.length;
const res = await rpcReq(ws, "agent", {
message: "/new",