Documentation
¶
Index ¶
- Variables
- func NewEmbedHandler(memStore *memory.Store, model string, logger func(string, ...any)) queue.Handler
- type Conduit
- func (c *Conduit) Close() error
- func (c *Conduit) Embed(ctx context.Context, recordID string) error
- func (c *Conduit) EmbedRevision(ctx context.Context, revisionID string) error
- func (c *Conduit) GetCurrentRevision(ctx context.Context, namespace, key string) (memory.Revision, error)
- func (c *Conduit) GetRevisionHistory(ctx context.Context, namespace, key string) ([]memory.Revision, error)
- func (c *Conduit) MemoryStore() *memory.Store
- func (c *Conduit) RecallMemory(ctx context.Context, in memory.RecallInput) ([]memory.RecallResult, error)
- func (c *Conduit) Search(ctx context.Context, query string, opts SearchOptions) ([]embedding.SearchResult, error)
- func (c *Conduit) Store() *contextstore.Store
- func (c *Conduit) WriteMemory(ctx context.Context, in memory.WriteInput) (memory.Revision, error)
- type Config
- type Option
- type SearchOptions
Constants ¶
This section is empty.
Variables ¶
ErrEmbedderUnavailable is returned when an embedding operation is attempted but no embedder has been configured on the Conduit instance.
Functions ¶
func NewEmbedHandler ¶
func NewEmbedHandler(memStore *memory.Store, model string, logger func(string, ...any)) queue.Handler
NewEmbedHandler returns a queue.Handler that processes embed jobs. The handler decodes the revision ID from the job payload and calls EmbedRevision on the memory store to generate and persist the embedding.
Types ¶
type Conduit ¶
type Conduit struct {
// contains filtered or unexported fields
}
Conduit is the top-level library handle. Create one via Open().
func Open ¶
Open creates a Conduit instance rooted at cfg.RootDir, initializing the SQLite store, memory subsystem, and decay goroutine.
func (*Conduit) Embed ¶
Embed generates and stores a vector embedding for the record identified by recordID. It fetches the record from the store, extracts embeddable text, calls the configured embedder, and upserts the resulting vector.
func (*Conduit) EmbedRevision ¶
EmbedRevision generates and stores an embedding for a memory revision.
func (*Conduit) GetCurrentRevision ¶
func (c *Conduit) GetCurrentRevision(ctx context.Context, namespace, key string) (memory.Revision, error)
GetCurrentRevision returns the current revision for a namespace/key pair.
func (*Conduit) GetRevisionHistory ¶
func (c *Conduit) GetRevisionHistory(ctx context.Context, namespace, key string) ([]memory.Revision, error)
GetRevisionHistory returns all revisions for a namespace/key pair, newest first.
func (*Conduit) MemoryStore ¶
MemoryStore returns the underlying memory.Store.
func (*Conduit) RecallMemory ¶
func (c *Conduit) RecallMemory(ctx context.Context, in memory.RecallInput) ([]memory.RecallResult, error)
RecallMemory retrieves memories by namespace, ranking, and filters.
func (*Conduit) Search ¶
func (c *Conduit) Search(ctx context.Context, query string, opts SearchOptions) ([]embedding.SearchResult, error)
Search embeds the query string and returns the top matching records ranked by cosine similarity against all stored embeddings for the configured model.
func (*Conduit) Store ¶
func (c *Conduit) Store() *contextstore.Store
Store returns the underlying contextstore.Store.
func (*Conduit) WriteMemory ¶
WriteMemory writes a new memory revision.
type Config ¶
type Config struct {
RootDir string
}
Config holds the top-level configuration for a Conduit instance.
type Option ¶
type Option func(*options)
Option is a functional option for Open.
func WithDedupThreshold ¶
WithDedupThreshold sets the similarity threshold for semantic dedup.
func WithEmbedder ¶
func WithEmbedder(e embedcontracts.Embedder) Option
WithEmbedder sets the embedding provider used for vector indexing.
func WithEmbeddingModel ¶
WithEmbeddingModel sets the model name passed to the embedder.
func WithLogger ¶
WithLogger sets a custom log function (defaults to log.Printf).
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
contextd
command
|
|
|
smoke
command
|
|
|
Package domains defines the in-tree domain discriminator and per-domain policy interface for Tesseract revisions.
|
Package domains defines the in-tree domain discriminator and per-domain policy interface for Tesseract revisions. |
|
internal
|
|
|
contextapi
Package contextapi — synthesis handler.
|
Package contextapi — synthesis handler. |
|
contextstore
Package contextstore — audit event type identifiers.
|
Package contextstore — audit event type identifiers. |
|
knowledge
Package knowledge implements the Knowledge domain on top of the shared memory revision store.
|
Package knowledge implements the Knowledge domain on top of the shared memory revision store. |
|
llm/anthropic
Package anthropic is a thin SDK-backed wrapper that satisfies the Complete/Capabilities portion of llmcontracts.Provider for tesseract's synthesis path (POST /v1/synthesis/ask).
|
Package anthropic is a thin SDK-backed wrapper that satisfies the Complete/Capabilities portion of llmcontracts.Provider for tesseract's synthesis path (POST /v1/synthesis/ask). |
|
llm/openai
Package openai is a thin SDK-backed wrapper that satisfies embedcontracts.Embedder and the Complete/Capabilities portion of llmcontracts.Provider for tesseract's embedding + synthesis paths.
|
Package openai is a thin SDK-backed wrapper that satisfies embedcontracts.Embedder and the Complete/Capabilities portion of llmcontracts.Provider for tesseract's embedding + synthesis paths. |
|
mcpadapter/skills
Package skills embeds agent-facing markdown skills that document Tesseract primitives and features.
|
Package skills embeds agent-facing markdown skills that document Tesseract primitives and features. |
|
memory
Package memory — audit sink definition.
|
Package memory — audit sink definition. |
|
webui
Package webui serves the embedded Tesseract frontend as an SPA.
|
Package webui serves the embedded Tesseract frontend as an SPA. |
|
Package memory re-exports the Conduit memory subsystem types for use by external consumers.
|
Package memory re-exports the Conduit memory subsystem types for use by external consumers. |