@@ -70,6 +70,7 @@ export interface CompleteAgentCallInput {
7070 callIndex : number ;
7171 responseText ?: string ;
7272 structuredJson ?: string ;
73+ returnValueJson ?: string ;
7374 providerSessionId ?: string ;
7475 dirty ?: boolean ;
7576 worktreePath ?: string ;
@@ -153,6 +154,7 @@ interface WorkflowAgentCallRow {
153154 provider_session_id : string | null ;
154155 response_text : string | null ;
155156 structured_json : string | null ;
157+ return_value_json : string | null ;
156158 error : string | null ;
157159 error_kind : string | null ;
158160 replay_match : string | null ;
@@ -673,6 +675,13 @@ export class WorkflowStore {
673675 if ( input . structuredJson !== undefined ) {
674676 assertTextSize ( input . structuredJson , WORKFLOW_LIMITS . structuredJsonBytes , "structuredJson" ) ;
675677 }
678+ if ( input . returnValueJson !== undefined ) {
679+ assertTextSize (
680+ input . returnValueJson ,
681+ WORKFLOW_LIMITS . replayValueJsonBytes ,
682+ "returnValueJson" ,
683+ ) ;
684+ }
676685 const now = isoNow ( ) ;
677686 const status : WorkflowAgentCallStatus = input . fromCache ? "from_cache" : "completed" ;
678687 this . database . sqlite
@@ -682,6 +691,7 @@ export class WorkflowStore {
682691 from_cache = ?,
683692 response_text = ?,
684693 structured_json = ?,
694+ return_value_json = ?,
685695 provider_session_id = coalesce(?, provider_session_id),
686696 worktree_path = coalesce(?, worktree_path),
687697 dirty = ?,
@@ -694,6 +704,7 @@ export class WorkflowStore {
694704 input . fromCache ? "true" : "false" ,
695705 input . responseText ?? null ,
696706 input . structuredJson ?? null ,
707+ input . returnValueJson ?? null ,
697708 input . providerSessionId ?? null ,
698709 input . worktreePath ?? null ,
699710 input . dirty === undefined ? null : input . dirty ? "true" : "false" ,
@@ -894,6 +905,7 @@ function rowToAgentCall(row: WorkflowAgentCallRow): WorkflowAgentCallRecord {
894905 providerSessionId : row . provider_session_id ?? undefined ,
895906 responseText : row . response_text ?? undefined ,
896907 structuredJson : row . structured_json ?? undefined ,
908+ returnValueJson : row . return_value_json ?? undefined ,
897909 error : row . error ?? undefined ,
898910 errorKind : ( row . error_kind as WorkflowErrorKind | null ) ?? undefined ,
899911 replayMatch :
0 commit comments