eventrouter

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type    string          `json:"type"`
	RunID   string          `json:"run_id,omitempty"`
	Payload json.RawMessage `json:"payload,omitempty"`
}

Event is an external trigger delivered through webhooks, queues, or CLI.

type Router

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

Router maps external events to run requests using scenario trigger definitions.

func NewRouter

func NewRouter(scenario core.Scenario) *Router

func (*Router) Resolve

func (r *Router) Resolve(event Event) (RunRequest, error)

type RunRequest

type RunRequest struct {
	RunID   string          `json:"run_id,omitempty"`
	Agent   string          `json:"agent,omitempty"`
	Prompt  string          `json:"prompt,omitempty"`
	Context json.RawMessage `json:"context,omitempty"`
}

RunRequest is the resolved run input produced from an event.

Jump to

Keyboard shortcuts

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