MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / writeOpenclawConfigRaw

Function writeOpenclawConfigRaw

agent/app/service/agents_utils.go:101–110  ·  view source on GitHub ↗
(configPath string, conf map[string]interface{})

Source from the content-addressed store, hash-verified

99}
100
101func writeOpenclawConfigRaw(configPath string, conf map[string]interface{}) error {
102 ensureGatewaySecurityDefaults(conf)
103 ensureOpenclawUpdateDefaults(conf)
104 payload, err := json.MarshalIndent(conf, "", " ")
105 if err != nil {
106 return err
107 }
108 fileOp := files.NewFileOp()
109 return fileOp.SaveFile(configPath, string(payload), 0600)
110}
111
112func normalizeAllowedOrigins(origins []string) ([]string, error) {
113 if len(origins) == 0 {

Callers 12

ResetTokenMethod · 0.85
UpdateSecurityConfigMethod · 0.85
UpdateOtherConfigMethod · 0.85
mutateAgentConfigMethod · 0.85
UpdateSkillMethod · 0.85
writeOpenclawConfigFunction · 0.85
InstallPluginMethod · 0.85
UpgradePluginMethod · 0.85
UninstallPluginMethod · 0.85

Calls 3

SaveFileMethod · 0.95

Tested by

no test coverage detected