fix(events): resolve TypeScript build errors

- Import EventBus/EventBusConfig types from types.js instead of bus.js
- Convert SQLite result.changes bigint to number

https://claude.ai/code/session_01NAdzND6SJEF1Fgk8dRDmAD
This commit is contained in:
Claude 2026-01-29 23:07:30 +00:00
parent e9637f8521
commit f9aa50d67d
No known key found for this signature in database
2 changed files with 3 additions and 8 deletions

View File

@ -12,13 +12,8 @@
import type { MoltbotConfig } from "../config/config.js";
import { onAgentEvent, type AgentEventPayload } from "../infra/agent-events.js";
import { onDiagnosticEvent, type DiagnosticEventPayload } from "../infra/diagnostic-events.js";
import {
createEventBus,
setEventBus,
getEventBus,
type EventBus,
type EventBusConfig,
} from "./bus.js";
import { createEventBus, setEventBus, getEventBus } from "./bus.js";
import type { EventBus, EventBusConfig } from "./types.js";
import { createEventStore, getDefaultEventStorePath } from "./store.js";
import { createEvent, type EventTopicMap } from "./catalog.js";

View File

@ -249,7 +249,7 @@ export function createEventStore(config: EventStoreConfig): EventStore & {
const prune = async (olderThan: number): Promise<number> => {
const result = pruneByTimeStmt.run(olderThan);
return result.changes;
return Number(result.changes);
};
const close = (): void => {