Commit 2c87876
committed
refactor(agent-runtime): extract helpers from run-agent-step.ts (Commit 2.3)
- Create agent-step-helpers.ts with extracted functions
- Add initializeAgentRun, buildInitialMessages, buildToolDefinitions
- Add prepareStepContext, handleOutputSchemaRetry helpers
- Add error utilities: extractErrorMessage, isPaymentRequiredError, getErrorStatusCode
- Reduce run-agent-step.ts from ~966 to ~850 lines1 parent fa973dd commit 2c87876
2 files changed
Lines changed: 558 additions & 261 deletions
0 commit comments