Skip to main content

backgroundChildThreads

@codebolt/codeboltjs


Variable: backgroundChildThreads

const backgroundChildThreads: {
addRunningAgent: (threadId: string, data: BackgroundAgentData, groupId?: string) => void;
checkForBackgroundAgentCompletion: () => BackgroundAgentCompletion[] | null;
checkForBackgroundGroupedAgentCompletion: () => BackgroundAgentCompletion | null;
getRunningAgentCount: () => number;
onBackgroundAgentCompletion: () => Promise<BackgroundAgentCompletion[] | null>;
onBackgroundGroupedAgentCompletion: () => Promise<BackgroundAgentCompletion | null>;
waitForAnyExternalEvent: () => Promise<BackgroundExternalEvent>;
};

Defined in: packages/codeboltjs/src/modules/backgroundChildThreads.ts:71

Background Child Threads module for tracking and managing background agent threads. This module provides APIs for tracking running background agents and their completion.

Type Declaration

NameTypeDescriptionDefined in
addRunningAgent()(threadId: string, data: BackgroundAgentData, groupId?: string) => voidAdds a running background agent to tracking.packages/codeboltjs/src/modules/backgroundChildThreads.ts:79
checkForBackgroundAgentCompletion()() => BackgroundAgentCompletion[] | nullChecks if any background agent has completed.packages/codeboltjs/src/modules/backgroundChildThreads.ts:101
checkForBackgroundGroupedAgentCompletion()() => BackgroundAgentCompletion | nullChecks if any grouped background agent has completed.packages/codeboltjs/src/modules/backgroundChildThreads.ts:130
getRunningAgentCount()() => numberGets the number of currently running background agents.packages/codeboltjs/src/modules/backgroundChildThreads.ts:93
onBackgroundAgentCompletion()() => Promise<BackgroundAgentCompletion[] | null>Waits for background agent completion.packages/codeboltjs/src/modules/backgroundChildThreads.ts:114
onBackgroundGroupedAgentCompletion()() => Promise<BackgroundAgentCompletion | null>Waits for grouped background agent completion.packages/codeboltjs/src/modules/backgroundChildThreads.ts:146
waitForAnyExternalEvent()() => Promise<BackgroundExternalEvent>Waits for any external event (background agent completion, grouped agent completion, or agent event). Returns the first event that occurs.packages/codeboltjs/src/modules/backgroundChildThreads.ts:163