refactor: move retry and recovery paths to structured output helpers

This commit is contained in:
Eyejoker
2026-03-28 06:17:52 +09:00
parent 47dda19ded
commit 38d96578a4
8 changed files with 144 additions and 18 deletions

View File

@@ -26,6 +26,16 @@ export function getAgentOutputText(output: {
return stringifyLegacyAgentResult(output.result);
}
export function hasAgentOutputPayload(output: {
output?: StructuredAgentOutput;
result?: string | object | null;
}): boolean {
if (output.output) {
return true;
}
return output.result !== null && output.result !== undefined;
}
export function isSilentAgentOutput(output: {
output?: StructuredAgentOutput;
}): boolean {