reasoning

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL