clientconfig

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionV1     = "moltnet.client.v1"
	LegacyVersion = "spawnfile.moltnet-http-skill.v1"
	DefaultPath   = ".moltnet/config.json"
	LegacyPath    = ".spawnfile/moltnet.json"
)

Variables

View Source
var DefaultDiscoveryOrder = []string{
	DefaultPath,
	LegacyPath,
}

Functions

func DefaultPathForWorkspace

func DefaultPathForWorkspace(workspace string) string

func DiscoverPath

func DiscoverPath(explicit string) (string, bool, error)

Types

type AgentConfig

type AgentConfig struct {
	Name    string `json:"name,omitempty"`
	Runtime string `json:"runtime,omitempty"`
}

type AttachmentConfig

type AttachmentConfig struct {
	AgentName string                     `json:"agent_name,omitempty"`
	Auth      AuthConfig                 `json:"auth"`
	BaseURL   string                     `json:"base_url"`
	DMs       *bridgeconfig.DMConfig     `json:"dms,omitempty"`
	MemberID  string                     `json:"member_id"`
	NetworkID string                     `json:"network_id"`
	Rooms     []bridgeconfig.RoomBinding `json:"rooms,omitempty"`
	Runtime   string                     `json:"runtime,omitempty"`
}

func (AttachmentConfig) ResolveToken

func (a AttachmentConfig) ResolveToken() (string, error)

func (AttachmentConfig) Validate

func (a AttachmentConfig) Validate() error

type AuthConfig

type AuthConfig struct {
	Mode     string `json:"mode"`
	Token    string `json:"token,omitempty"`
	TokenEnv string `json:"token_env,omitempty"`
}

type Config

type Config struct {
	Version     string             `json:"version"`
	Agent       AgentConfig        `json:"agent"`
	Attachments []AttachmentConfig `json:"attachments"`
}

func LoadFile

func LoadFile(path string) (Config, error)

func (Config) ResolveAttachment

func (c Config) ResolveAttachment(networkID string) (AttachmentConfig, error)

func (Config) Validate

func (c Config) Validate() error

Jump to

Keyboard shortcuts

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