runtime: replace owner progress with final delivery

This commit is contained in:
ejclaw
2026-04-11 12:45:41 +09:00
parent 29e39f25c9
commit dcf18b8797
5 changed files with 202 additions and 51 deletions

View File

@@ -109,6 +109,7 @@ interface CreateExecuteTurnDeps {
forcedAgentType?: AgentType;
deliveryRole: PairedRoomRole | null;
deliveryServiceId: string | null;
replaceMessageId?: string | null;
}) => Promise<boolean>;
afterDeliverySuccess?: (args: {
chatJid: string;
@@ -197,7 +198,7 @@ export function createExecuteTurn(deps: CreateExecuteTurnDeps): ExecuteTurnFn {
});
return ownership.state !== 'inactive';
},
deliverFinalText: async (text) => {
deliverFinalText: async (text, options) => {
try {
return await deps.deliverFinalText({
text,
@@ -210,6 +211,7 @@ export function createExecuteTurn(deps: CreateExecuteTurnDeps): ExecuteTurnFn {
forcedAgentType: args.forcedAgentType,
deliveryRole: resolvedDeliveryRole,
deliveryServiceId: resolvedDeliveryServiceId,
replaceMessageId: options?.replaceMessageId ?? null,
});
} catch (err) {
logger.warn(