serve

package
v1.1.61 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigPath

func ConfigPath() string

func DecodeConfigBytesInto

func DecodeConfigBytesInto(cfg *Config, data []byte) error

func InitConfig

func InitConfig(force bool) (string, error)

func InitConfigForProject added in v1.1.61

func InitConfigForProject(project bool, force bool) (string, error)

func ProjectConfigPath

func ProjectConfigPath() string

func Run

func Run(opts RunOptions, version string) error

func SaveConfig

func SaveConfig(path string, cfg *Config) error

Types

type ChannelConfig

type ChannelConfig struct {
	Wechat channels.WechatConfig `json:"wechat"`
	Feishu channels.FeishuConfig `json:"feishu"`
}

type Config

type Config struct {
	API         openaiapi.Config        `json:"api"`
	Features    FeatureConfig           `json:"features"`
	Channels    ChannelConfig           `json:"channels"`
	WebUI       WebUIConfig             `json:"webUI"`
	LobsterMode bool                    `json:"lobsterMode,omitempty"`
	Cron        channels.CronConfig     `json:"cron"`
	Memory      channels.MemoryConfig   `json:"memory"`
	Security    channels.SecurityConfig `json:"security"`
	Hooks       channels.HooksConfig    `json:"hooks"`
	Agent       channels.AgentConfig    `json:"agent"`
}

func DecodeConfigBytes

func DecodeConfigBytes(data []byte) (*Config, error)

func DefaultConfig

func DefaultConfig() *Config

func LoadConfig

func LoadConfig() (*Config, error)

func LoadConfigFrom

func LoadConfigFrom(path string) (*Config, error)

func (*Config) MarshalJSON

func (c *Config) MarshalJSON() ([]byte, error)

type FeatureConfig

type FeatureConfig struct {
	WebUI      bool `json:"webUI,omitempty"`
	OpenAIAPI  bool `json:"openaiAPI,omitempty"`
	Wechat     bool `json:"wechat,omitempty"`
	Feishu     bool `json:"feishu,omitempty"`
	WebSocket  bool `json:"websocket,omitempty"`
	MultiAgent bool `json:"multiAgent,omitempty"`
	Cron       bool `json:"cron,omitempty"`
	Memory     bool `json:"memory,omitempty"`
}

type RunOptions

type RunOptions struct {
	ConfigPath string
	Port       string
	WebUIDir   string
	Provider   string
	Model      string
	WorkDir    string
	Sandbox    bool
	MultiAgent bool
	Delegate   bool
	Workflows  bool
	WebSearch  bool
	Browser    bool
	A2AMaster  bool
	Lobster    bool
	Verbose    bool
	Debug      bool
}

type WebUIConfig

type WebUIConfig struct {
	Enabled bool   `json:"enabled"`
	Dir     string `json:"dir,omitempty"`
}

Directories

Path Synopsis
Package hooks implements shell hook scripts for serve channels.
Package hooks implements shell hook scripts for serve channels.
Package webhook implements inbound webhook routing for serve channels.
Package webhook implements inbound webhook routing for serve channels.
Package ws implements the serve WebSocket channel runtime.
Package ws implements the serve WebSocket channel runtime.

Jump to

Keyboard shortcuts

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