@@ -5,10 +5,11 @@ import { sleep } from "../../utils.js";
55import type { GetReplyOptions , ReplyPayload } from "../types.js" ;
66import { registerDispatcher } from "./dispatcher-registry.js" ;
77import { normalizeReplyPayload , type NormalizeReplySkipReason } from "./normalize-reply.js" ;
8+ import type { ReplyDispatchKind , ReplyDispatcher } from "./reply-dispatcher.types.js" ;
89import type { ResponsePrefixContext } from "./response-prefix-template.js" ;
910import type { TypingController } from "./typing.js" ;
1011
11- export type ReplyDispatchKind = "tool" | "block" | "final ";
12+ export type { ReplyDispatchKind , ReplyDispatcher } from "./reply-dispatcher.types.js ";
1213
1314type ReplyDispatchErrorHandler = ( err : unknown , info : { kind : ReplyDispatchKind } ) => void ;
1415
@@ -75,16 +76,6 @@ type ReplyDispatcherWithTypingResult = {
7576 markRunComplete : ( ) => void ;
7677} ;
7778
78- export type ReplyDispatcher = {
79- sendToolResult : ( payload : ReplyPayload ) => boolean ;
80- sendBlockReply : ( payload : ReplyPayload ) => boolean ;
81- sendFinalReply : ( payload : ReplyPayload ) => boolean ;
82- waitForIdle : ( ) => Promise < void > ;
83- getQueuedCounts : ( ) => Record < ReplyDispatchKind , number > ;
84- getFailedCounts : ( ) => Record < ReplyDispatchKind , number > ;
85- markComplete : ( ) => void ;
86- } ;
87-
8879type NormalizeReplyPayloadInternalOptions = Pick <
8980 ReplyDispatcherOptions ,
9081 | "responsePrefix"
0 commit comments