package mcpresource import ( "amadan.net/oficina/equipo/internal/runnerproto" "bytes" "encoding/json" ) // The routing fixture contains no team, account or filesystem data. Every // specialist and coordinator gets the same bytes, with no write operation. func Result(method string, raw json.RawMessage) (any, error) { const uri = "equipo://routing-check" switch method { case "resources/list": return map[string]any{"resources": []any{map[string]string{"uri": uri, "name": "routing-check", "mimeType": "text/plain"}}}, nil case "resources/templates/list": return map[string]any{"resourceTemplates": []any{}}, nil case "resources/read": var params struct { URI string `json:"uri"` // Codex 0.165.0 sends a progress token on resource reads. Meta json.RawMessage `json:"_meta,omitempty"` } if runnerproto.DecodeLimit(bytes.NewReader(raw), ¶ms, 64<<10) != nil || params.URI != uri { return nil, runnerproto.ErrInvalid } return map[string]any{"contents": []any{map[string]string{"uri": uri, "mimeType": "text/plain", "text": "equipo-routing-ready"}}}, nil } return nil, runnerproto.ErrInvalid }