sessions

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 19 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

Index

Constants

View Source
const (
	NeedsYou = "needs-you"
	YourTurn = "your-turn"
	Working  = "working"
	Stopped  = "stopped"
	Past     = "past"
)

Variables

This section is empty.

Functions

func ClaudeAsk

func ClaudeAsk(id string, b claude.Block) opencode.Ask

func RetiredHub

func RetiredHub(name string) bool

RetiredHub is an earlier conversation of the assistant (or of WhatsApp before the hub took it over), named so when a newer one replaced it. Whatever is meant for it goes to the assistant.

func Sort

func Sort(list []Session)

func Tilde

func Tilde(p, home string) string

Types

type Answered

type Answered struct {
	Ask    string    `json:"ask"`
	Key    string    `json:"key,omitempty"`
	What   string    `json:"what"`
	Via    string    `json:"via,omitempty"`
	Device string    `json:"device,omitempty"`
	At     time.Time `json:"at"`
}

Answered is the last answer atc passed to one of the session's asks: Via is where it was given (web, push, widget), Device the machine it was given on.

type Brief

type Brief struct{ Title, Cwd string }

type Manager

type Manager struct {
	CLI     claude.CLI
	Index   *history.Index
	Store   *store.Store
	Summary *summary.Summarizer
	OC      *opencode.Backend
	Ports   outputs.Ports
}

func (*Manager) Adopt

func (m *Manager) Adopt(ctx context.Context, sid string)

func (*Manager) Briefs

func (m *Manager) Briefs(want map[string]bool) map[string]Brief

func (*Manager) Find

func (m *Manager) Find(sid string) (history.Transcript, bool)

func (*Manager) History

func (m *Manager) History(q, dir string, limit int) []Session

func (*Manager) Keep

func (m *Manager) Keep(sid, live string) error

func (*Manager) Live

func (m *Manager) Live(ctx context.Context) ([]Session, error)

func (*Manager) OpenCode

func (m *Manager) OpenCode(id string) bool

func (*Manager) Session

func (m *Manager) Session(sid string) (Session, bool)

Session is a conversation as its transcript shows it, for one atc runs outside Claude's own list.

type Note

type Note struct {
	Text    string    `json:"text"`
	Urgent  bool      `json:"urgent,omitempty"`
	Replies []string  `json:"replies,omitempty"`
	Page    string    `json:"page,omitempty"`
	At      time.Time `json:"at"`
}

type Session

type Session struct {
	SessionID      string           `json:"sessionId"`
	Host           string           `json:"host,omitempty"`
	ID             string           `json:"id,omitempty"`
	Kind           string           `json:"kind"`
	State          string           `json:"state"`
	Attachable     bool             `json:"attachable"`
	PID            int              `json:"pid,omitempty"`
	Title          string           `json:"title"`
	Name           string           `json:"name,omitempty"`
	Cwd            string           `json:"cwd"`
	StartCwd       string           `json:"startCwd,omitempty"`
	Branch         string           `json:"branch,omitempty"`
	Model          string           `json:"model,omitempty"`
	Engine         string           `json:"engine,omitempty"`
	Harness        string           `json:"harness,omitempty"`
	Asks           []opencode.Ask   `json:"asks,omitempty"`
	Background     []claude.Task    `json:"background,omitempty"`
	TurnDone       bool             `json:"turnDone,omitempty"`
	PermissionMode string           `json:"permissionMode,omitempty"`
	LastPrompt     string           `json:"lastPrompt,omitempty"`
	Context        int              `json:"context,omitempty"`
	PromptAt       time.Time        `json:"promptAt,omitzero"`
	Activity       string           `json:"activity,omitempty"`
	Steps          int              `json:"steps,omitempty"`
	Failed         int              `json:"failed,omitempty"`
	Files          int              `json:"files,omitempty"`
	LastReply      string           `json:"lastReply,omitempty"`
	Summary        *summary.Summary `json:"summary,omitempty"`
	Summarizing    bool             `json:"summarizing,omitempty"`
	StartedAt      time.Time        `json:"startedAt,omitzero"`
	Updated        time.Time        `json:"updated,omitzero"`
	Servers        []int            `json:"servers,omitempty"`
	Shown          []pages.Page     `json:"shown,omitempty"`
	Note           *Note            `json:"note,omitempty"`
	Answered       *Answered        `json:"answered,omitempty"`
	Tabs           []browser.Tab    `json:"tabs,omitempty"`
	Pinned         bool             `json:"pinned,omitempty"`
	Parked         bool             `json:"parked,omitempty"`
	Agent          string           `json:"agent,omitempty"`
	Root           string           `json:"root,omitempty"`
	ReportsTo      string           `json:"reportsTo,omitempty"`
	Retired        bool             `json:"retired,omitempty"`
	Load           *resources.Load  `json:"load,omitempty"`
}

func (Session) Age

func (s Session) Age() string

func (Session) Away

func (s Session) Away() bool

Away is parked and not asking anything: a parked session that needs you comes back.

func (Session) Current

func (s Session) Current() bool

Current is what the user's list shows by default: what needs them, and what runs or works and is not parked.

func (Session) Last

func (s Session) Last() time.Time

func (Session) Lineage

func (s Session) Lineage() string

func (Session) Open

func (s Session) Open() []string

Open is what the last reply's summary leaves open: its "Open:" lines.

func (Session) Result

func (s Session) Result() string

Result is what the last reply came to: its summary's status, else the reply itself.

Jump to

Keyboard shortcuts

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