nativeagent

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: AGPL-3.0 Imports: 35 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DataDir    string
	Store      ConfigStore
	Tools      []Tool
	HTTPClient *http.Client
}

type ConfigStore

type ConfigStore interface {
	Load(ctx context.Context) (map[string]any, bool, error)
	Save(ctx context.Context, config map[string]any) error
}

type Event

type Event struct {
	Event string
	Data  map[string]any
}

type Runtime

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

func New

func New(config Config) *Runtime

func (*Runtime) Apply

func (r *Runtime) Apply(ctx context.Context, action string) error

func (*Runtime) Invoke

func (r *Runtime) Invoke(ctx context.Context, action string, params map[string]any) (map[string]any, error)

func (*Runtime) Stream

func (r *Runtime) Stream(ctx context.Context, action string, params map[string]any, emit func(Event) error) error

type Tool

type Tool struct {
	Name        string
	Description string
	Parameters  map[string]any
	Write       bool
	Handler     func(context.Context, map[string]any) (any, error)
}

Jump to

Keyboard shortcuts

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