mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-27 13:06:20 +02:00
15 lines
440 B
Go
15 lines
440 B
Go
package agent
|
|
|
|
import (
|
|
"bytes"
|
|
"encoding/json"
|
|
)
|
|
|
|
// hasManagedMcpConfig preserves the API's three-state MCP semantics. Only SQL
|
|
// NULL / JSON null mean "inherit the runtime configuration"; any object,
|
|
// including an explicitly empty one, is a managed set and enables strict mode.
|
|
func hasManagedMcpConfig(raw json.RawMessage) bool {
|
|
trimmed := bytes.TrimSpace(raw)
|
|
return len(trimmed) > 0 && !bytes.Equal(trimmed, []byte("null"))
|
|
}
|