muse

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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 New

func New() *Adapter

New creates a Muse adapter using XDG_DATA_HOME or ~/.local/share.

func NewWithIndexForTest

func NewWithIndexForTest(sessionsDir, indexDBPath string) *Adapter

NewWithIndexForTest creates an adapter with explicit DB path (test helper).

func NewWithPaths

func NewWithPaths(sessionsDir, indexDBPath string) *Adapter

NewWithPaths creates an adapter with explicit sessionsDir and indexDBPath.

func NewWithSessionsDir

func NewWithSessionsDir(sessionsDir string) *Adapter

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) Detect

func (a *Adapter) Detect(projectRoot string) (bool, error)

Detect reports whether any Muse sessions exist for projectRoot.

func (*Adapter) DiscoverRelatedProjectDirs

func (a *Adapter) DiscoverRelatedProjectDirs(mainWorktreePath string) ([]string, error)

DiscoverRelatedProjectDirs finds other project dirs with sessions for same base.

func (*Adapter) ID

func (a *Adapter) ID() string

func (*Adapter) Icon

func (a *Adapter) Icon() string

func (*Adapter) Messages

func (a *Adapter) Messages(sessionID string) ([]adapter.Message, error)

Messages returns conversation messages for sessionID.

func (*Adapter) Name

func (a *Adapter) Name() string

func (*Adapter) SessionByID

func (a *Adapter) SessionByID(sessionID string) (*adapter.Session, error)

SessionByID implements TargetedRefresher.

func (*Adapter) SessionIDFromPath

func (a *Adapter) SessionIDFromPath(path string) (string, error)

SessionIDFromPath resolves a session.jsonl path to its session ID.

func (*Adapter) Sessions

func (a *Adapter) Sessions(projectRoot string) ([]adapter.Session, error)

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) Watch

func (a *Adapter) Watch(projectRoot string) (<-chan adapter.Event, io.Closer, error)

func (*Adapter) WatchForProjectDiscovery

func (a *Adapter) WatchForProjectDiscovery() bool

func (*Adapter) WatchScope

func (a *Adapter) WatchScope() adapter.WatchScope

Jump to

Keyboard shortcuts

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