feat: add background task notification system (#827)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-02-04 22:45:16 -08:00
committed by GitHub
parent 84e9a6d744
commit 48ccd8f220
44 changed files with 2244 additions and 234 deletions

View File

@@ -29,6 +29,7 @@ export interface SubagentState {
model?: string;
startTime: number;
toolCallId?: string; // Links this subagent to its parent Task tool call
isBackground?: boolean; // True if running in background (fire-and-forget)
}
interface SubagentStore {
@@ -106,6 +107,7 @@ export function registerSubagent(
type: string,
description: string,
toolCallId?: string,
isBackground?: boolean,
): void {
// Capitalize type for display (explore -> Explore)
const displayType = type.charAt(0).toUpperCase() + type.slice(1);
@@ -121,6 +123,7 @@ export function registerSubagent(
durationMs: 0,
startTime: Date.now(),
toolCallId,
isBackground,
};
store.agents.set(id, agent);