File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ export async function runProgrammaticStep(
125125 )
126126 } else {
127127 // Initialize native generator
128- generator = ( template . handleSteps as any ) ( {
128+ generator = template . handleSteps ( {
129129 agentState,
130130 prompt,
131131 params,
@@ -172,9 +172,10 @@ export async function runProgrammaticStep(
172172 ...data ,
173173 } )
174174 } ,
175- agentState : cloneDeep (
176- agentState as AgentState & Required < Pick < AgentState , 'runId' > > ,
177- ) ,
175+ agentState : cloneDeep ( {
176+ ...agentState ,
177+ runId : agentState . runId ! , // We've already verified runId exists above
178+ } ) ,
178179 agentContext : cloneDeep ( agentState . agentContext ) ,
179180 messages : cloneDeep ( agentState . messageHistory ) ,
180181 }
Original file line number Diff line number Diff line change 11/**
22 * Backend Agent Template Types
3- *
3+ *
44 * This file provides backend-compatible agent template types with strict validation.
55 * It imports base types from the user-facing template to eliminate duplication.
66 */
@@ -68,9 +68,11 @@ export type StepGenerator = Generator<
6868export type StepHandler <
6969 P = string | undefined ,
7070 T = Record < string , any > | undefined ,
71- > = (
72- params : { agentState : AgentState ; prompt : P ; params : T } ,
73- logger : Logger ,
74- ) => StepGenerator
71+ > = ( context : {
72+ agentState : AgentState
73+ prompt : P
74+ params : T
75+ logger : Logger
76+ } ) => StepGenerator
7577
7678export { Logger , PublicAgentState }
You can’t perform that action at this time.
0 commit comments