reactor

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalArgs

func CanonicalArgs(args map[string]interface{}) string

CanonicalArgs returns a deterministic, canonical JSON representation of the provided args map. Keys are sorted recursively so that semantically equal argument objects yield identical strings regardless of original key order. The empty map or nil returns an empty string for convenience when building composite keys.

func MapEqual

func MapEqual(a, b map[string]interface{}) bool

MapEqual reports whether two maps contain the same keys and the corresponding values are deeply equal. Nil and empty maps are treated as equivalent.

Prior implementation ignored type mismatches which could lead to false positives (e.g. string "1" vs number 1). This version returns false on any differing key, value or value type.

func RefinePlan

func RefinePlan(p *execution.Plan)

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(service *core2.Service, registry tool.Registry, convClient apiconv.Client, finder agentmdl.Finder, builder func(ctx context.Context, conv *apiconv.Conversation, instruction string) (*core2.GenerateInput, error)) *Service

func (*Service) Run

func (s *Service) Run(ctx context.Context, genInput *core2.GenerateInput, genOutput *core2.GenerateOutput) (*execution.Plan, error)

func (*Service) TurnToolResults added in v0.1.7

func (s *Service) TurnToolResults(turnID string) []llm.ToolCall

TurnToolResults returns a defensive copy of the remembered successful tool results for a turn. Agent.runPlanLoop uses this to rehydrate prompt history across iterations when transcript history is temporarily missing current-turn assistant/tool messages.

type ToolKey

type ToolKey struct {
	Name string
	Args string
}

ToolKey uniquely identifies a tool call by its name and canonicalised arguments JSON. Hashable so it can be used as a map key.

Jump to

Keyboard shortcuts

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