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

This commit is contained in:
Kit Langton 2026-06-26 05:33:35 +02:00 committed by GitHub
commit ef5c9f4931
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 233 additions and 68 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) {