feat(scheduler): add types needed for event driven scheduler (#16641)

This commit is contained in:
Abhi
2026-01-14 17:22:44 -05:00
committed by GitHub
parent 7e6817da5b
commit 6021e4c3ba
6 changed files with 98 additions and 22 deletions
+13 -1
View File
@@ -14,6 +14,7 @@ import type {
} from '../tools/tools.js';
import type { AnsiOutput } from '../utils/terminalSerializer.js';
import type { ToolErrorType } from '../tools/tool-error.js';
import type { SerializableConfirmationDetails } from '../confirmation-bus/types.js';
export interface ToolCallRequestInfo {
callId: string;
@@ -98,7 +99,18 @@ export type WaitingToolCall = {
request: ToolCallRequestInfo;
tool: AnyDeclarativeTool;
invocation: AnyToolInvocation;
confirmationDetails: ToolCallConfirmationDetails;
/**
* Supports both legacy (with callbacks) and new (serializable) details.
* New code should treat this as SerializableConfirmationDetails.
*
* TODO: Remove ToolCallConfirmationDetails and collapse to just
* SerializableConfirmationDetails after migration.
*/
confirmationDetails:
| ToolCallConfirmationDetails
| SerializableConfirmationDetails;
// TODO: Make required after migration.
correlationId?: string;
startTime?: number;
outcome?: ToolConfirmationOutcome;
};