bodhi-realtime-agent / ReconnectRecovery
Class: ReconnectRecovery
Defined in: src/runtime/reconnect-recovery.ts:32
ReconnectRecovery tracks in-flight state for session-scoped recovery and provides dedup protection for idempotent message delivery.
Constructors
Constructor
new ReconnectRecovery():
ReconnectRecovery
Returns
ReconnectRecovery
Accessors
workflowCount
Get Signature
get workflowCount():
number
Defined in: src/runtime/reconnect-recovery.ts:78
Get count of tracked workflows.
Returns
number
Methods
clear()
clear():
void
Defined in: src/runtime/reconnect-recovery.ts:133
Clear all recovery state (on session close).
Returns
void
getRecoverableWorkflows()
getRecoverableWorkflows():
RecoverableWorkflow[]
Defined in: src/runtime/reconnect-recovery.ts:68
Get all recoverable workflows.
Returns
hasWorkflow()
hasWorkflow(
toolCallId):boolean
Defined in: src/runtime/reconnect-recovery.ts:73
Check if a workflow is being tracked.
Parameters
toolCallId
string
Returns
boolean
isDuplicateResponse()
isDuplicateResponse(
requestId):boolean
Defined in: src/runtime/reconnect-recovery.ts:109
Check if an interaction response has been applied.
Parameters
requestId
string
Returns
boolean
isDuplicateTerminalEvent()
isDuplicateTerminalEvent(
workflowId):boolean
Defined in: src/runtime/reconnect-recovery.ts:97
Check if a terminal event for this workflow has been processed.
Parameters
workflowId
string
Returns
boolean
isDuplicateToolResult()
isDuplicateToolResult(
toolCallId):boolean
Defined in: src/runtime/reconnect-recovery.ts:85
Check if a tool result has already been delivered. Returns true if duplicate.
Parameters
toolCallId
string
Returns
boolean
isDuplicateTransfer()
isDuplicateTransfer(
transferCorrelationId):boolean
Defined in: src/runtime/reconnect-recovery.ts:121
Check if a transfer completion has been emitted.
Parameters
transferCorrelationId
string
Returns
boolean
markResponseApplied()
markResponseApplied(
requestId):void
Defined in: src/runtime/reconnect-recovery.ts:114
Mark an interaction response as applied.
Parameters
requestId
string
Returns
void
markTerminalEvent()
markTerminalEvent(
workflowId):void
Defined in: src/runtime/reconnect-recovery.ts:102
Mark a terminal workflow event as processed.
Parameters
workflowId
string
Returns
void
markToolResultDelivered()
markToolResultDelivered(
toolCallId):void
Defined in: src/runtime/reconnect-recovery.ts:90
Mark a tool result as delivered.
Parameters
toolCallId
string
Returns
void
markTransferCompleted()
markTransferCompleted(
transferCorrelationId):void
Defined in: src/runtime/reconnect-recovery.ts:126
Mark a transfer as completed.
Parameters
transferCorrelationId
string
Returns
void
removeWorkflow()
removeWorkflow(
toolCallId):void
Defined in: src/runtime/reconnect-recovery.ts:63
Remove a workflow (terminal state reached).
Parameters
toolCallId
string
Returns
void
trackWorkflow()
trackWorkflow(
workflow):void
Defined in: src/runtime/reconnect-recovery.ts:45
Register a workflow for recovery tracking.
Parameters
workflow
Returns
void
updateWorkflowState()
updateWorkflowState(
toolCallId,state,pendingQuestion?):void
Defined in: src/runtime/reconnect-recovery.ts:50
Update workflow state (e.g., running → waiting_input).
Parameters
toolCallId
string
state
"running" | "waiting_input"
pendingQuestion?
string
Returns
void