runtime

package
v1.0.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ModeHTTP      = "http"
	ModeWebSocket = "websocket"
)

Variables

This section is empty.

Functions

func BridgeEndpointAvailable

func BridgeEndpointAvailable(path string) bool

func BridgeHealthProbe

func BridgeHealthProbe(path string, timeout time.Duration) error

func CallLocalBridge

func CallLocalBridge(ctx context.Context, request BridgeRequest, resolved *appconfig.Resolved) (map[string]any, error)

func IsWebSocketMode

func IsWebSocketMode(resolved *appconfig.Resolved) bool

func ListenBridge

func ListenBridge(path string) (net.Listener, error)

Types

type BridgeCallError

type BridgeCallError struct {
	Phase   string
	Message string
	Cause   error
}

func (*BridgeCallError) Error

func (e *BridgeCallError) Error() string

func (*BridgeCallError) Unwrap

func (e *BridgeCallError) Unwrap() error

type BridgeError

type BridgeError struct {
	Code    string `json:"code,omitempty"`
	Message string `json:"message"`
}

type BridgeRequest

type BridgeRequest struct {
	Method       string         `json:"method"`
	Params       map[string]any `json:"params"`
	IdentityName string         `json:"identity_name"`
}

type BridgeResponse

type BridgeResponse struct {
	OK     bool           `json:"ok"`
	Result map[string]any `json:"result,omitempty"`
	Error  *BridgeError   `json:"error,omitempty"`
}

type HermesConfig

type HermesConfig struct {
	NotifyURL string `json:"notify_url,omitempty"`
	Deliver   string `json:"deliver,omitempty"`
}

type HostNotifyConfig

type HostNotifyConfig struct {
	Enabled  bool           `json:"enabled"`
	Sink     string         `json:"sink"`
	FilePath string         `json:"file_path,omitempty"`
	OpenClaw OpenClawConfig `json:"openclaw,omitempty"`
	Hermes   HermesConfig   `json:"hermes,omitempty"`
}

type ListenerConfig

type ListenerConfig struct {
	Enabled     bool `json:"enabled"`
	AutoInstall bool `json:"auto_install"`
	AutoStart   bool `json:"auto_start"`
}

type OpenClawConfig

type OpenClawConfig struct {
	HookURL  string `json:"hook_url,omitempty"`
	AgentID  string `json:"agent_id,omitempty"`
	HookName string `json:"hook_name,omitempty"`
}

type Resolved

type Resolved struct {
	Mode       string           `json:"mode"`
	SocketPath string           `json:"socket_path,omitempty"`
	Listener   ListenerConfig   `json:"listener"`
	HostNotify HostNotifyConfig `json:"host_notify"`
}

func Resolve

func Resolve(resolved *appconfig.Resolved) Resolved

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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