Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): make provider session reaper timing configurable #5525

Closedkraptor23(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/5525/headopened View on GitHub

Showing 5 changed files with 187 additions and 5 deletions (loading 4).

x
0 of 5 viewed, 5 left
187 additions and 5 deletionsapps/server/src/provider/Layers/ProviderSessionReaper.test.tsModified
View file
@@ -8,6 +8,7 @@
} from "@t3tools/contracts";
import * as Clock from "effect/Clock";
import * as DateTime from "effect/DateTime";
+import * as Duration from "effect/Duration";
import * as Effect from "effect/Effect";
import * as Exit from "effect/Exit";
import * as Layer from "effect/Layer";
@@ -23,8 +24,12 @@
import { ProviderValidationError } from "../Errors.ts";
import { ProviderSessionReaper } from "../Services/ProviderSessionReaper.ts";
import { ProviderService, type ProviderServiceShape } from "../Services/ProviderService.ts";
+import * as ServerSettings from "../../serverSettings.ts";
import { ProviderSessionDirectoryLive } from "./ProviderSessionDirectory.ts";
-import { makeProviderSessionReaperLive } from "./ProviderSessionReaper.ts";
+import {
+ makeProviderSessionReaperLive,
+ type ProviderSessionReaperLiveOptions,
+} from "./ProviderSessionReaper.ts";
​
const defaultModelSelection = {
instanceId: ProviderInstanceId.make("codex"),
@@ -140,6 +145,8 @@
readonly stopSessionImplementation?: (input: {
readonly threadId: ThreadId;
}) => ReturnType<ProviderServiceShape["stopSession"]>;
+ readonly reaperOptions?: ProviderSessionReaperLiveOptions;
+ readonly settingsOverrides?: Parameters<typeof ServerSettings.layerTest>[0];