Documentation
¶
Index ¶
Constants ¶
View Source
const ( VersionV1 = "moltnet.client.v1" LegacyVersion = "spawnfile.moltnet-http-skill.v1" DefaultPath = ".moltnet/config.json" LegacyPath = ".spawnfile/moltnet.json" )
View Source
const (
MaxOutboundDMPeers = 256
)
Variables ¶
View Source
var DefaultDiscoveryOrder = []string{ DefaultPath, LegacyPath, }
Functions ¶
func DefaultPathForWorkspace ¶
Types ¶
type AgentConfig ¶
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"`
OutboundDMPEers []string `json:"outbound_dm_peers,omitempty"`
MemberID string `json:"member_id"`
NetworkID string `json:"network_id"`
Rooms []bridgeconfig.RoomBinding `json:"rooms,omitempty"`
Runtime string `json:"runtime,omitempty"`
}
func (AttachmentConfig) OutboundDMPeers ¶ added in v0.1.14
func (a AttachmentConfig) OutboundDMPeers() []string
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"`
Registration string `json:"registration,omitempty"`
Token string `json:"token,omitempty"`
TokenEnv string `json:"token_env,omitempty"`
TokenPath string `json:"token_path,omitempty"`
}
func (AuthConfig) HasTokenSource ¶ added in v0.1.1
func (a AuthConfig) HasTokenSource() bool
type Config ¶
type Config struct {
Version string `json:"version"`
Agent AgentConfig `json:"agent"`
Attachments []AttachmentConfig `json:"attachments"`
}
func (Config) ResolveAttachment ¶
func (c Config) ResolveAttachment(networkID string) (AttachmentConfig, error)
func (Config) ResolveAttachmentFor ¶ added in v0.1.1
func (c Config) ResolveAttachmentFor(networkID string, memberID string) (AttachmentConfig, error)
func (Config) ResolveTokenPaths ¶ added in v0.1.1
Click to show internal directories.
Click to hide internal directories.