INNER CODE UNIT · TypeScript
lastResult
Kong/volcano-agent-sdk · src/patterns.ts:115
const lastResult = attemptResults[attemptResults.length - 1];
if (successCondition(lastResult)) {
return allResults;
}
if (attempt < maxAttempts - 1) {
const waitMs = 1000 * Math.pow(backoff, attempt);
await new Promise(resolve => setTimeout(resolve, waitMs));
}
}
throw new Error(`retryUntil: Failed to meet success condition after ${maxAttempts} attempts`);
}
export async function executeRunAgent(
subAgent: AgentBuilder,
parentStepIndex?: number,
parentTotalSteps?: number,