fix missing event types in sdk

This commit is contained in:
Dax Raad
2026-05-14 21:53:36 -04:00
parent f179dcbf02
commit f39cf911d7
6 changed files with 219 additions and 151 deletions
@@ -6,6 +6,7 @@ import { Database } from "@/storage/db"
import { eq } from "drizzle-orm"
export function initProjectors() {
console.log("initProjectors")
SyncEvent.init({
projectors: sessionProjectors,
convertEvent: (type, data) => {
@@ -1,3 +1,6 @@
import { initProjectors } from "@/server/projectors"
initProjectors()
import { Schema } from "effect"
import { HttpApi } from "effect/unstable/httpapi"
import { BusEvent } from "@/bus/bus-event"
@@ -1,7 +1,6 @@
import { Config } from "@/config/config"
import { BusEvent } from "@/bus/bus-event"
import { SyncEvent } from "@/sync"
import "@/event-v2-bridge"
import "@/server/event"
import { Schema } from "effect"
import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
-3
View File
@@ -5,7 +5,6 @@ import { HttpRouter, HttpServer } from "effect/unstable/http"
import { OpenApi } from "effect/unstable/httpapi"
import { createServer } from "node:http"
import { MDNS } from "./mdns"
import { initProjectors } from "./projectors"
import { HttpApiApp } from "./routes/instance/httpapi/server"
import { disposeMiddleware } from "./routes/instance/httpapi/lifecycle"
import { WebSocketTracker } from "./routes/instance/httpapi/websocket-tracker"
@@ -16,8 +15,6 @@ import { lazy } from "@/util/lazy"
// @ts-ignore This global is needed to prevent ai-sdk from logging warnings to stdout https://github.com/vercel/ai/blob/2dc67e0ef538307f21368db32d5a12345d98831b/packages/ai/src/logger/log-warnings.ts#L85
globalThis.AI_SDK_LOG_WARNINGS = false
initProjectors()
const log = Log.create({ service: "server" })
export type Listener = {