Skip to content

Commit c7ed210

Browse files
committed
feat(orchestration): add voice step support to WorkflowBuilder configToNode
Add voice pipeline node lowering in configToNode() so that StepConfig.voice is compiled to a GraphNode with type 'voice', executorConfig.type 'voice', react_bounded execution mode, and 'before' checkpoint policy — enabling voice steps authored via workflow() or compileWorkflowYaml().
1 parent 8310ac5 commit c7ed210

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

src/orchestration/builders/WorkflowBuilder.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,26 @@ export class WorkflowBuilder {
603603
};
604604
}
605605

606+
if (config.voice) {
607+
// Voice pipeline node: runs a bidirectional STT/TTS session with configurable
608+
// turn limits and exit conditions. Uses `react_bounded` execution mode to
609+
// model the multi-turn interaction loop within a single graph node.
610+
return {
611+
id,
612+
type: 'voice' as const,
613+
executorConfig: {
614+
type: 'voice' as const,
615+
voiceConfig: config.voice,
616+
},
617+
executionMode: 'react_bounded',
618+
effectClass: config.effectClass ?? 'external',
619+
timeout: config.timeout,
620+
checkpoint: 'before',
621+
memoryPolicy: config.memory,
622+
guardrailPolicy: config.guardrails,
623+
};
624+
}
625+
606626
// Fallback: treat as a no-op tool node.
607627
return {
608628
...toolNode('unknown', { timeout: config.timeout }),

0 commit comments

Comments
 (0)