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

Function validateAgentConfigFileContent

agent/app/service/agents.go:1431–1437  ·  view source on GitHub ↗
(agentType, content string)

Source from the content-addressed store, hash-verified

1429}
1430
1431func validateAgentConfigFileContent(agentType, content string) error {
1432 var payload interface{}
1433 if agentType == constant.AppHermesAgent {
1434 return yaml.Unmarshal([]byte(content), &payload)
1435 }
1436 return json.Unmarshal([]byte(content), &payload)
1437}
1438
1439func getOpenclawNPMRegistry(containerName string) (string, error) {
1440 registry, err := cmd.RunDockerExecWithStdout(20*time.Second, containerName, "npm", "get", "registry")

Callers 1

UpdateConfigFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected