feat(sdk): expose active sessions (#33991)

This commit is contained in:
Kit Langton
2026-06-26 05:33:35 +02:00
committed by GitHub
parent 40ecfceec2
commit ef5c9f4931
19 changed files with 236 additions and 71 deletions

View File

@@ -76,6 +76,16 @@ export const SessionHandler = HttpApiBuilder.group(Api, "server.session", (handl
}
}),
)
.handle(
"session.active",
Effect.fn(function* () {
return {
data: Object.fromEntries(
Array.from(yield* session.active, (sessionID) => [sessionID, { type: "running" as const }]),
),
}
}),
)
.handle(
"session.get",
Effect.fn(function* (ctx) {