mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-07-12 21:02:17 +02:00
fix(x): FakeTurnEventBus satisfies ITurnEventBus
The interface grew subscribe/subscribeAll when the IPC bridge moved to resolving ITurnEventBus, but the runtime-test fake still only had publish — a TS2739 invisible to vitest and the build tsconfig. The fake now declares 'implements ITurnEventBus' so the next interface change fails loudly here instead of silently drifting. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
de84b2e9ce
commit
05eb94cd3a
1 changed files with 8 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ import type { IAgentResolver } from "./agent-resolver.js";
|
||||||
import type { TurnExecution, TurnOutcome } from "./api.js";
|
import type { TurnExecution, TurnOutcome } from "./api.js";
|
||||||
import { TurnDependencyError, TurnInputError } from "./api.js";
|
import { TurnDependencyError, TurnInputError } from "./api.js";
|
||||||
import type { TurnLifecycleEvent } from "./bus.js";
|
import type { TurnLifecycleEvent } from "./bus.js";
|
||||||
|
import type { ITurnEventBus } from "./event-hub.js";
|
||||||
import { TurnRepoContextResolver } from "./context-resolver.js";
|
import { TurnRepoContextResolver } from "./context-resolver.js";
|
||||||
import { InMemoryTurnRepo } from "./in-memory-turn-repo.js";
|
import { InMemoryTurnRepo } from "./in-memory-turn-repo.js";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -278,11 +279,17 @@ class FakeBus {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FakeTurnEventBus {
|
class FakeTurnEventBus implements ITurnEventBus {
|
||||||
events: TurnBusEvent[] = [];
|
events: TurnBusEvent[] = [];
|
||||||
publish(event: TurnBusEvent): void {
|
publish(event: TurnBusEvent): void {
|
||||||
this.events.push(event);
|
this.events.push(event);
|
||||||
}
|
}
|
||||||
|
subscribe(): () => void {
|
||||||
|
return () => {};
|
||||||
|
}
|
||||||
|
subscribeAll(): () => void {
|
||||||
|
return () => {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FakeIdGen {
|
class FakeIdGen {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue