Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hit ¶
type Hit struct {
Value string `json:"value"`
Timestamp time.Time `json:"timestamp"`
Score float64 `json:"score"`
}
Hit is one recalled fact as the query endpoint serializes it (Hit.MarshalJSON in internal/query): the stored value, its write time, and its raw score. Scores are float64 regardless of the daemon's precision — that is what JSON numbers decode to, and the bridge never does arithmetic on them.
type MCPServer ¶
type MCPServer struct {
Config *config.ConfigSet
Server *mcp.Server
// contains filtered or unexported fields
}
MCPServer is the stdio MCP bridge to a running fraise daemon. It is a thin adapter over the HTTP query API — not a second engine — so it reads the same config the daemon does and derives the daemon's address from it: `fraise mcp -config x` finds whatever `fraise -config x` serves.
func New ¶
New builds the bridge and registers its two tools. Registration goes through the SDK's typed AddTool: it unmarshals and validates arguments against the input schema before a handler runs, marshals the typed output into structured content and validates it against the output schema, and turns a handler error into an in-band tool error the model can read.
type RecallInput ¶
type RecallInput struct {
Query string `json:"query"`
Parameters map[string][]float64 `json:"parameters,omitempty"`
}
RecallInput is the recall tool's argument payload, forwarded verbatim as the /api/v1/q request body (HandleQueryRequest): the raw FQL query plus any out-of-band vector bindings its vec:$name placeholders reference.
type RecallOutput ¶
type RecallOutput struct {
Results Result `json:"results"`
Warnings []string `json:"warnings,omitempty"`
}
RecallOutput is the recall tool's result payload, the /api/v1/q response body verbatim: the results envelope plus any parse warnings the server attached — the query still ran and the results beside them stand.
type RememberInput ¶
type RememberInput struct {
Query string `json:"query"`
Parameters map[string][]float64 `json:"parameters,omitempty"`
}
RememberInput is the remember tool's argument payload, forwarded verbatim as the /api/v1/q request body, exactly as RecallInput is.
type RememberOutput ¶
type RememberOutput struct {
Results Result `json:"results"`
Warnings []string `json:"warnings,omitempty"`
}
RememberOutput is the remember tool's result payload: the same response envelope as a recall, with the result always empty — the acknowledgement is the response itself, and warnings ride beside it when the parse had something to say.