Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDecisionContext ¶
func BuildDecisionContext(p ContextParams) json.RawMessage
BuildDecisionContext assembles a rich context for a reasoning node decision.
func ValidateResolution ¶
func ValidateResolution(options []schema.ReasoningOption, choice string) error
ValidateResolution checks that the chosen option ID exists in the available options. If options is empty, any choice is accepted (free-form reasoning). Returns nil if valid, or an OpcodeError if the choice is invalid.
Types ¶
type ContextParams ¶
type ContextParams struct {
Config schema.ReasoningConfig
StepOutputs map[string]any // stepID → parsed output
WorkflowIntent string
AgentNotes string
AccumulatedData map[string]any
ResolvedInjects map[string]any // resolved DataInject values
}
ContextParams holds the inputs needed to build a DecisionContext.
type DecisionContext ¶
type DecisionContext struct {
PromptContext string `json:"prompt_context"`
StepOutputs map[string]any `json:"step_outputs,omitempty"`
WorkflowIntent string `json:"workflow_intent,omitempty"`
AgentNotes string `json:"agent_notes,omitempty"`
DataInject map[string]any `json:"data_inject,omitempty"`
AccumulatedData map[string]any `json:"accumulated_data,omitempty"`
}
DecisionContext is the rich context stored in PendingDecision.Context. It provides the agent with all information needed to make a decision.
Click to show internal directories.
Click to hide internal directories.