Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): refresh provider session lastSeenAt on turn and task activity #5524

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

Showing 8 changed files with 39 additions and 0 deletions (loading 5).

x
0 of 8 viewed, 8 left
37 additions and 0 deletionsapps/server/src/persistence/ProviderSessionRuntime.tsModified
View file
@@ -58,6 +58,12 @@
export const DeleteProviderSessionRuntimeInput = Schema.Struct({ threadId: ThreadId });
export type DeleteProviderSessionRuntimeInput = typeof DeleteProviderSessionRuntimeInput.Type;
​
+export const TouchProviderSessionRuntimeInput = Schema.Struct({
+ threadId: ThreadId,
+ lastSeenAt: IsoDateTime,
+});
+export type TouchProviderSessionRuntimeInput = typeof TouchProviderSessionRuntimeInput.Type;
+​
/**
* ProviderSessionRuntimeRepository - Service tag for provider runtime persistence.
*/
@@ -73,6 +79,15 @@
runtime: ProviderSessionRuntime,
) => Effect.Effect<void, ProviderSessionRuntimeRepositoryError>;
​
+ /**
+ * Update only `last_seen_at` for an existing runtime row.
+ *
+ * No-op when no row exists for the thread; never creates a row.
+ */
+ readonly touchByThreadId: (
+ input: TouchProviderSessionRuntimeInput,
+ ) => Effect.Effect<void, ProviderSessionRuntimeRepositoryError>;
+​
/**
* Read provider runtime state by canonical thread id.
*/