Documentation
¶
Overview ¶
Package ancora provides a read-only snapshot reader for the Ancora SQLite database. It does NOT import the ancora binary or its store package — it speaks directly to the DB file so vela stays independent.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDBPath ¶
DefaultDBPath returns the path to the ancora SQLite database. Respects ANCORA_DATA_DIR env var, otherwise uses ~/.ancora/ancora.db.
Types ¶
type Observation ¶
type Observation struct {
ID int64
Title string
Content string
Type string // "decision", "bugfix", "architecture", etc.
Workspace string // project/repo name — may be empty
Visibility string // "work" | "personal"
Organization string // optional org scope
TopicKey string // optional dedup key
References string // JSON array string — may be empty
CreatedAt time.Time
UpdatedAt time.Time
}
Observation is a minimal projection of ancora's observations table. Only the fields vela needs for graph extraction are included.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader opens a read-only view of the ancora SQLite database.
func Open ¶
Open opens the ancora database at dbPath in read-only WAL mode. The caller must call Close() when done.
func (*Reader) AllObservations ¶
func (r *Reader) AllObservations(workspace, visibility string) ([]Observation, error)
AllObservations returns all non-deleted observations. workspace and visibility are optional filters ("" = all).