mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-09 11:06:02 +08:00
Enable flow-aware decision routing
This commit is contained in:
@@ -33,6 +33,35 @@ export interface DecisionNodeAutoTrigger {
|
||||
delayMs?: number
|
||||
}
|
||||
|
||||
export type DecisionNodeTriggerType = 'auto_time' | 'auto_variable' | 'regex' | 'none'
|
||||
|
||||
export interface DecisionNodeTrigger {
|
||||
id: string
|
||||
type: DecisionNodeTriggerType
|
||||
order?: number
|
||||
delaySeconds?: number
|
||||
variable?: string
|
||||
operator?: DecisionComparisonOperator
|
||||
value?: number | string | boolean
|
||||
pattern?: string
|
||||
patternFlags?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
export type DecisionNodeConditionType = 'variable_value' | 'regex' | 'regex_not'
|
||||
|
||||
export interface DecisionNodeCondition {
|
||||
id: string
|
||||
type: DecisionNodeConditionType
|
||||
order?: number
|
||||
variable?: string
|
||||
operator?: DecisionComparisonOperator
|
||||
value?: number | string | boolean
|
||||
pattern?: string
|
||||
patternFlags?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
export interface DecisionTransitionMetadata {
|
||||
color?: string
|
||||
icon?: string
|
||||
@@ -114,6 +143,8 @@ export interface DecisionNodeModel {
|
||||
trigger?: string
|
||||
frequency?: string
|
||||
frequencyName?: string
|
||||
triggers?: DecisionNodeTrigger[]
|
||||
conditions?: DecisionNodeCondition[]
|
||||
transitions: DecisionNodeTransition[]
|
||||
layout?: DecisionNodeLayout
|
||||
metadata?: DecisionNodeMetadata
|
||||
@@ -198,10 +229,13 @@ export interface RuntimeDecisionState {
|
||||
frequency?: string
|
||||
frequencyName?: string
|
||||
auto_transitions?: RuntimeDecisionAutoTransition[]
|
||||
triggers?: DecisionNodeTrigger[]
|
||||
conditions?: DecisionNodeCondition[]
|
||||
metadata?: DecisionNodeMetadata
|
||||
}
|
||||
|
||||
export interface RuntimeDecisionTree {
|
||||
slug: string
|
||||
schema_version: string
|
||||
name: string
|
||||
description?: string
|
||||
@@ -216,6 +250,12 @@ export interface RuntimeDecisionTree {
|
||||
states: Record<string, RuntimeDecisionState>
|
||||
}
|
||||
|
||||
export interface RuntimeDecisionSystem {
|
||||
main: string
|
||||
order: string[]
|
||||
flows: Record<string, RuntimeDecisionTree>
|
||||
}
|
||||
|
||||
export interface DecisionFlowSummary {
|
||||
id: string
|
||||
slug: string
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
export interface LLMDecisionInput {
|
||||
state_id: string
|
||||
state: any
|
||||
candidates: Array<{ id: string; state: any }>
|
||||
candidates: Array<{ id: string; state: any; flow?: string }>
|
||||
variables: Record<string, any>
|
||||
flags: Record<string, any>
|
||||
pilot_utterance: string
|
||||
flow_slug?: string
|
||||
}
|
||||
|
||||
export interface LLMDecision {
|
||||
@@ -14,4 +15,6 @@ export interface LLMDecision {
|
||||
controller_say_tpl?: string
|
||||
off_schema?: boolean
|
||||
radio_check?: boolean
|
||||
activate_flow?: string
|
||||
resume_previous?: boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user