Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): snoozed threads allow queued automatic wakes #19099

MergedYash-Singh1(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/19099/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 7 changed files with 165 additions and 6 deletions (loading 4).

x
0 of 7 viewed, 7 left
13 additions and 0 deletionsapps/server/src/orchestration-v2/NotificationMailbox.tsModified
View file
@@ -1,9 +1,22 @@
import {
latestProviderTurnForAttempt,
type MessageId,
+ type OrchestrationV2ConversationMessage,
type OrchestrationV2ThreadProjection,
} from "@t3tools/contracts";
​
+/** A wake attaches to output held in provider memory, which Stop or process loss discards. */
+export function isBufferedProviderNotification(
+ message: OrchestrationV2ConversationMessage,
+): boolean {
+ return (
+ message.createdBy === "agent" &&
+ message.creationSource === "provider" &&
+ message.notification !== undefined &&
+ message.delegatedCompletion === undefined
+ );
+}
+​
/**
* A persisted steer without an acceptance receipt can be retried as a continuation.
* Delivery is at least once: provider acceptance and our receipt cannot commit
56 additions and 6 deletionsapps/server/src/orchestration-v2/Orchestrator.tsModified
View file
@@ -89,7 +89,10 @@
import { ContextHandoffServiceV2 } from "./ContextHandoffService.ts";
import { notificationTurnItem } from "@t3tools/provider-core/server/notification";
import { isRestartNoteSource } from "./RestartBackgroundNote.ts";