Documentation
¶
Overview ¶
Package muse provides a Sidecar adapter for Muse Spark sessions.
Muse Spark (Muse Code) stores sessions under ~/.local/share/muse/sessions/YYYY/MM/DD/<uuid>/session.jsonl and an index at ~/.local/share/muse/session-index.db (SQLite). This adapter reads the SQLite index for fast Sessions() and parses the JSONL log for Messages(), with a filesystem fallback when the index is unavailable (tests, older installs).
Index ¶
- type Adapter
- func (a *Adapter) Capabilities() adapter.CapabilitySet
- func (a *Adapter) Detect(projectRoot string) (bool, error)
- func (a *Adapter) DiscoverRelatedProjectDirs(mainWorktreePath string) ([]string, error)
- func (a *Adapter) ID() string
- func (a *Adapter) Icon() string
- func (a *Adapter) Messages(sessionID string) ([]adapter.Message, error)
- func (a *Adapter) Name() string
- func (a *Adapter) SessionByID(sessionID string) (*adapter.Session, error)
- func (a *Adapter) SessionIDFromPath(path string) (string, error)
- func (a *Adapter) Sessions(projectRoot string) ([]adapter.Session, error)
- func (a *Adapter) Usage(sessionID string) (*adapter.UsageStats, error)
- func (a *Adapter) Watch(projectRoot string) (<-chan adapter.Event, io.Closer, error)
- func (a *Adapter) WatchForProjectDiscovery() bool
- func (a *Adapter) WatchScope() adapter.WatchScope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements adapter.Adapter for Muse Spark sessions.
func NewWithIndexForTest ¶
NewWithIndexForTest creates an adapter with explicit DB path (test helper).
func NewWithPaths ¶
NewWithPaths creates an adapter with explicit sessionsDir and indexDBPath.
func NewWithSessionsDir ¶
NewWithSessionsDir creates an adapter rooted at sessionsDir (for tests). The index DB is assumed at <parent>/session-index.db.
func (*Adapter) Capabilities ¶
func (a *Adapter) Capabilities() adapter.CapabilitySet
func (*Adapter) DiscoverRelatedProjectDirs ¶
DiscoverRelatedProjectDirs finds other project dirs with sessions for same base.
func (*Adapter) SessionByID ¶
SessionByID implements TargetedRefresher.
func (*Adapter) SessionIDFromPath ¶
SessionIDFromPath resolves a session.jsonl path to its session ID.
func (*Adapter) Sessions ¶
Sessions returns sessions for projectRoot sorted by UpdatedAt descending.
func (*Adapter) Usage ¶
func (a *Adapter) Usage(sessionID string) (*adapter.UsageStats, error)
Usage not available from Muse logs (encrypted output); return empty.
func (*Adapter) WatchForProjectDiscovery ¶
func (*Adapter) WatchScope ¶
func (a *Adapter) WatchScope() adapter.WatchScope