Documentation
¶
Overview ¶
Package synapset provides a client for the Synapset MCP-based semantic memory service. It handles session initialization and exposes search/store operations via the MCP JSON-RPC 2.0 protocol over Streamable HTTP.
The client degrades gracefully: if Synapset is unreachable or returns an error, operations log a warning and return empty results rather than blocking the caller.
Index ¶
- Constants
- type Client
- func (c *Client) Pool() string
- func (c *Client) QueryMemory(ctx context.Context, pool string, opts map[string]interface{}) (memories []Memory, err error)
- func (c *Client) SearchAll(ctx context.Context, query string, limit int) (memories []Memory, err error)
- func (c *Client) SearchMemory(ctx context.Context, pool, query string, limit int) (memories []Memory, err error)
- func (c *Client) StoreMemory(ctx context.Context, pool, content, category string, tags []string, ...) error
- func (c *Client) UpdateMemory(ctx context.Context, pool, id string, updates map[string]interface{}) error
- type Config
- type Memory
Constants ¶
const DefaultPool = "samverk"
DefaultPool is the default pool name for agent memories.
const DefaultURL = "https://synapset.herbhall.net/mcp"
DefaultURL is used when neither config nor env var specifies a Synapset endpoint.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client communicates with a Synapset MCP server over Streamable HTTP.
func (*Client) QueryMemory ¶ added in v0.1.21
func (c *Client) QueryMemory(ctx context.Context, pool string, opts map[string]interface{}) (memories []Memory, err error)
QueryMemory performs a structured query against a Synapset pool using exact-match filters (source, category, tags) rather than semantic search.
func (*Client) SearchAll ¶
func (c *Client) SearchAll(ctx context.Context, query string, limit int) (memories []Memory, err error)
SearchAll searches across all pools for memories matching the query.
func (*Client) SearchMemory ¶
func (c *Client) SearchMemory(ctx context.Context, pool, query string, limit int) (memories []Memory, err error)
SearchMemory searches a specific pool for memories matching the query.
func (*Client) StoreMemory ¶
func (c *Client) StoreMemory(ctx context.Context, pool, content, category string, tags []string, source string) error
StoreMemory saves a memory entry to the specified pool.
func (*Client) UpdateMemory ¶ added in v0.1.21
func (c *Client) UpdateMemory(ctx context.Context, pool, id string, updates map[string]interface{}) error
UpdateMemory updates an existing memory entry by ID. Fields in the updates map are merged into the existing record; only supplied fields are changed.