Add Ely-Eye MCP server
Local read-only Model Context Protocol server (Go) exposing the .ely_eye memory store to coding agents such as Codex and Claude Code: nine tools over status, cartridges, Evidence Atoms, compiled evidence packs, proof suites, and HashHop proofs. One-line cross-platform install (no Docker), with a prebuilt-binary release workflow.
This commit is contained in:
1 parent
1392f4456d
commit
4cd29f91e5
23 files changed
+2463
-3
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
)
|
||||
|
||||
func optionalJSONValue(value string) (any, error) {
|
||||
if value == "" || value == "null" {
|
||||
return nil, nil
|
||||
}
|
||||
return decodeJSONValue(value)
|
||||
}
|
||||
|
||||
func requiredJSONValue(value string) (any, error) {
|
||||
if value == "" {
|
||||
return map[string]any{}, nil
|
||||
}
|
||||
return decodeJSONValue(value)
|
||||
}
|
||||
|
||||
func readJSONValue(data []byte) (any, error) {
|
||||
if !json.Valid(data) {
|
||||
return nil, errors.New("invalid JSON")
|
||||
}
|
||||
var value any
|
||||
if err := json.Unmarshal(data, &value); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return value, nil
|
||||
}
|
||||
|
||||
func decodeJSONValue(value string) (any, error) {
|
||||
return readJSONValue([]byte(value))
|
||||
}
|
||||
Reference in new issue
Block a user