Documentation
¶
Index ¶
- Constants
- func ClearHermesSecret(paths Paths) error
- func ClearOpenClawToken(paths Paths) error
- func ConfigureHermesHostNotify(paths Paths, notifyURL string, secret *string, deliver string, enabled bool) error
- func DefaultWorkspaceHomeDir(home string) string
- func DeriveANPServiceDID(serviceBaseURL string) string
- func DeriveANPServiceEndpoint(serviceBaseURL string) string
- func DeriveWebSocketURL(baseURL string, path string) string
- func EnsureConfigSchemaVersion(path string) error
- func JoinBaseURL(baseURL string, path string) string
- func LegacyConfigPath(paths Paths) string
- func NormalizeBaseURL(baseURL string) string
- func NormalizeDIDDomain(raw string) (string, error)
- func SetHermesSecret(paths Paths, secret string) error
- func SetOpenClawToken(paths Paths, token string) error
- func Snapshot(resolved *Resolved) map[string]any
- func UpdateActiveIdentity(paths Paths, identityName string) error
- func UpdateDIDDomain(paths Paths, value string) error
- func UpdateHermesSettings(paths Paths, notifyURL *string, deliver *string) error
- func UpdateHostNotifyEnabled(paths Paths, enabled bool) error
- func UpdateHostNotifySink(paths Paths, sink string) error
- func UpdateOpenClawSettings(paths Paths, hookURL *string) error
- func UpdateRuntimeListenerSettings(paths Paths, enabled *bool, autoInstall *bool, autoStart *bool) error
- func UpdateRuntimeSettings(paths Paths, mode string, socketPath string) error
- func WriteFileConfig(path string, fileConfig FileConfig) error
- type EnvHit
- type FileConfig
- type Overrides
- type Paths
- type PolicyError
- type Resolved
- type ValueSource
Constants ¶
View Source
const (
ConfigSchemaVersion = 1
)
Variables ¶
This section is empty.
Functions ¶
func ClearHermesSecret ¶
func ClearOpenClawToken ¶
func DefaultWorkspaceHomeDir ¶
func DeriveANPServiceDID ¶
DeriveANPServiceDID returns the default bare-domain service DID for a service base URL.
func DeriveANPServiceEndpoint ¶
DeriveANPServiceEndpoint returns the default public ANP RPC endpoint for a service base URL.
func DeriveWebSocketURL ¶
func JoinBaseURL ¶
func LegacyConfigPath ¶
func NormalizeBaseURL ¶
func NormalizeDIDDomain ¶
NormalizeDIDDomain returns a canonical bare-domain did_domain value.
func SetHermesSecret ¶
func SetOpenClawToken ¶
func UpdateActiveIdentity ¶
func UpdateDIDDomain ¶
func UpdateHermesSettings ¶
func UpdateHostNotifyEnabled ¶
func UpdateHostNotifySink ¶
func UpdateOpenClawSettings ¶
func UpdateRuntimeSettings ¶
func WriteFileConfig ¶
func WriteFileConfig(path string, fileConfig FileConfig) error
Types ¶
type FileConfig ¶
type FileConfig struct {
SchemaVersion int `json:"schema_version,omitempty" yaml:"schema_version,omitempty"`
Identity struct {
Active string `json:"active" yaml:"active"`
} `json:"identity" yaml:"identity"`
Runtime struct {
Mode string `json:"mode" yaml:"mode"`
SocketPath string `json:"socket_path" yaml:"socket_path"`
Listener struct {
Enabled *bool `json:"enabled" yaml:"enabled"`
AutoInstall *bool `json:"auto_install" yaml:"auto_install"`
AutoStart *bool `json:"auto_start" yaml:"auto_start"`
} `json:"listener" yaml:"listener"`
HostNotify struct {
Enabled *bool `json:"enabled" yaml:"enabled"`
Sink string `json:"sink" yaml:"sink"`
FilePath string `json:"file_path" yaml:"file_path"`
OpenClaw struct {
HookURL string `json:"hook_url" yaml:"hook_url"`
AgentID string `json:"agent_id" yaml:"agent_id"`
HookName string `json:"hook_name" yaml:"hook_name"`
Token string `json:"token" yaml:"token"`
} `json:"openclaw" yaml:"openclaw"`
Hermes struct {
NotifyURL string `json:"notify_url" yaml:"notify_url"`
Deliver string `json:"deliver" yaml:"deliver"`
Secret string `json:"secret" yaml:"secret"`
} `json:"hermes" yaml:"hermes"`
LegacyWebhook struct {
NotifyURL string `json:"notify_url" yaml:"notify_url"`
Secret string `json:"secret" yaml:"secret"`
} `json:"webhook" yaml:"webhook"`
} `json:"host_notify" yaml:"host_notify"`
} `json:"runtime" yaml:"runtime"`
Output struct {
Format string `json:"format" yaml:"format"`
NoColor *bool `json:"no_color" yaml:"no_color"`
} `json:"output" yaml:"output"`
Services struct {
ServiceBaseURL string `json:"service_base_url" yaml:"service_base_url"`
DIDDomain string `json:"did_domain" yaml:"did_domain"`
ANPServiceEndpoint string `json:"anp_service_endpoint" yaml:"anp_service_endpoint"`
ANPServiceDID string `json:"anp_service_did" yaml:"anp_service_did"`
CABundle string `json:"ca_bundle" yaml:"ca_bundle"`
MailServiceURL string `json:"mail_service_url,omitempty" yaml:"mail_service_url,omitempty"`
} `json:"services" yaml:"services"`
Update struct {
DisableStrictVersion bool `json:"disable_strict_version" yaml:"disable_strict_version"`
MetadataCacheTTLSeconds int `json:"metadata_cache_ttl_seconds" yaml:"metadata_cache_ttl_seconds"`
} `json:"update" yaml:"update"`
}
func ReadFileConfig ¶
func ReadFileConfig(path string) (FileConfig, bool, error)
type Paths ¶
type Paths struct {
WorkspaceHomeDir string `json:"workspace_home_dir"`
RootDir string `json:"root_dir"`
ConfigDir string `json:"config_dir"`
DataDir string `json:"data_dir"`
StateDir string `json:"state_dir"`
CacheDir string `json:"cache_dir"`
LogsDir string `json:"logs_dir"`
ConfigFile string `json:"config_file"`
IdentityDir string `json:"identity_dir"`
DatabaseFile string `json:"database_file"`
LegacyCredentialsDir string `json:"legacy_credentials_dir"`
LegacyDataDir string `json:"legacy_data_dir"`
}
type PolicyError ¶
func (*PolicyError) Error ¶
func (e *PolicyError) Error() string
type Resolved ¶
type Resolved struct {
Paths Paths `json:"paths"`
ConfigSchemaVersion int `json:"config_schema_version"`
ActiveIdentity string `json:"active_identity,omitempty"`
RuntimeMode string `json:"runtime_mode"`
RuntimeSocketPath string `json:"runtime_socket_path,omitempty"`
RuntimeListenerEnabled bool `json:"runtime_listener_enabled"`
RuntimeListenerAutoInstall bool `json:"runtime_listener_auto_install"`
RuntimeListenerAutoStart bool `json:"runtime_listener_auto_start"`
HostNotifyEnabled bool `json:"host_notify_enabled"`
HostNotifySink string `json:"host_notify_sink"`
HostNotifyFilePath string `json:"host_notify_file_path,omitempty"`
HostNotifyOpenClawHookURL string `json:"host_notify_openclaw_hook_url,omitempty"`
HostNotifyOpenClawAgentID string `json:"host_notify_openclaw_agent_id,omitempty"`
HostNotifyOpenClawHookName string `json:"host_notify_openclaw_hook_name,omitempty"`
HostNotifyHermesNotifyURL string `json:"host_notify_hermes_notify_url,omitempty"`
HostNotifyHermesDeliver string `json:"host_notify_hermes_deliver,omitempty"`
OutputFormat string `json:"output_format"`
NoColor bool `json:"no_color"`
ServiceBaseURL string `json:"service_base_url"`
DIDDomain string `json:"did_domain"`
ANPServiceEndpoint string `json:"anp_service_endpoint"`
ANPServiceDID string `json:"anp_service_did"`
MailServiceURL string `json:"mail_service_url"`
CABundle string `json:"ca_bundle,omitempty"`
UpdateDisableStrictVersion bool `json:"update_disable_strict_version"`
UpdateMetadataCacheTTLSeconds int `json:"update_metadata_cache_ttl_seconds"`
ConfigExists bool `json:"config_exists"`
ConfigError string `json:"config_error,omitempty"`
EnvHits []EnvHit `json:"env_hits,omitempty"`
Sources map[string]ValueSource `json:"sources"`
}
type ValueSource ¶
Click to show internal directories.
Click to hide internal directories.