sessindex

package
v0.3.44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSQLIndex added in v0.3.41

NewSQLIndex registers session/sql-index: FTS over session/sql durable events.

func NewSQLiteIndex

func NewSQLiteIndex(cfg SQLiteIndexConfig, deps SQLiteIndexDeps) (capsessionindex.Service, error)

NewSQLiteIndex registers session/sqlite-index: FTS index over session/store JSONL files.

Types

type SQLIndex added in v0.3.41

type SQLIndex struct {
	// contains filtered or unexported fields
}

SQLIndex derives a searchable transcript index from session/sql durable events.

func (*SQLIndex) ListSessions added in v0.3.41

func (s *SQLIndex) ListSessions(ctx context.Context, limit int) ([]capsessionindex.SessionSummary, error)

func (*SQLIndex) ScrollMessages added in v0.3.41

func (s *SQLIndex) ScrollMessages(ctx context.Context, sessionID string, anchorSeq int64, before, after int) ([]capsessionindex.MessageRow, error)

func (*SQLIndex) Search added in v0.3.41

func (s *SQLIndex) Search(ctx context.Context, query string, limit int) ([]capsessionindex.Hit, error)

func (*SQLIndex) SyncSessions added in v0.3.41

func (s *SQLIndex) SyncSessions(ctx context.Context) error

SyncSessions ingests new events from ak_session_events above the per-session watermark.

type SQLIndexConfig added in v0.3.41

type SQLIndexConfig struct {
	// Driver is database/sql driver name: sqlite, pgx (postgres), or any registered driver.
	Driver string `json:"driver"`
	// DSN is the driver data source name; should match the session/sql store DSN.
	DSN string `json:"dsn"`
}

SQLIndexConfig mirrors session/sql connection settings so the index lives in the same database as ak_session_events (one DSN to persist in Docker).

type SQLIndexDeps added in v0.3.41

type SQLIndexDeps struct{}

type SQLiteIndex

type SQLiteIndex struct {
	// contains filtered or unexported fields
}

SQLiteIndex persists FTS5 over session JSONL transcripts per tenant workspace.

func (*SQLiteIndex) ListSessions

func (s *SQLiteIndex) ListSessions(ctx context.Context, limit int) ([]capsessionindex.SessionSummary, error)

func (*SQLiteIndex) ScrollMessages

func (s *SQLiteIndex) ScrollMessages(ctx context.Context, sessionID string, anchorSeq int64, before, after int) ([]capsessionindex.MessageRow, error)

func (*SQLiteIndex) Search

func (s *SQLiteIndex) Search(ctx context.Context, query string, limit int) ([]capsessionindex.Hit, error)

func (*SQLiteIndex) SyncSessions

func (s *SQLiteIndex) SyncSessions(ctx context.Context) error

type SQLiteIndexConfig

type SQLiteIndexConfig struct {
	// IndexRel is the workspace-relative SQLite file path.
	IndexRel string `json:"indexRel"`
	// SessionsRel is the workspace-relative sessions directory to ingest.
	SessionsRel string `json:"sessionsRel"`
}

type SQLiteIndexDeps

type SQLiteIndexDeps struct {
	Workspace workspace.Service `json:"workspace"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL