claude

package
v0.166.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 23 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 claude finds the Claude Code sessions running on the machine and what they are doing, from what is on disk: the CLI processes (their environment names the desktop session), the record each CLI keeps of the session it runs, the desktop app's session records (title, branch), the transcripts (last activity, last words) and the git checkout each works in. No MCP call and no GitHub request is needed.

Index

Constants

View Source
const ChromeSkipAll = "skip_all_permission_checks"

ChromeSkipAll is the Chrome permission mode under which the desktop runs a session's browser actions without a site request.

View Source
const Current = 3

Current is how many of the most recent refs count as what a session is on now.

View Source
const DesktopAppID = "com.anthropic.Claude"

DesktopAppID is the Wayland app id of Claude Desktop's windows.

View Source
const RoleTool = "tool"

RoleTool is the role of a tool call's turn in what Follow returns.

Variables

This section is empty.

Functions

func Archived added in v0.69.0

func Archived(cfg *config.Config) map[string]bool

Archived is the set of the archived desktop sessions: their desktop ids and their CLI session ids, current and prior. A stopped session is not in it.

func ByCLI added in v0.136.0

func ByCLI(cfg *config.Config) map[string]*Record

ByCLI maps CLI session ids, current and prior, to their desktop records, archived sessions included: the title and the desktop session of a CLI that is gone.

func CallResult added in v0.82.0

func CallResult(path, suffix string) (string, bool, error)

CallResult is the text of the first result without an error of a call of a tool whose name ends in suffix in the transcript at path: a posted Slack message's channel and ts.

func Called added in v0.26.0

func Called(path, suffix string) (bool, error)

Called reports whether the transcript at path holds a call of a tool whose name ends in suffix that returned without an error: a posted Slack message is a slack_send_message call's result.

func Context added in v0.107.0

func Context(path string) int64

Context is the size of the last request in the transcript at path (Activity.Context), read again only once the transcript changed: an idle session's costs a stat.

func DesktopAtCap added in v0.71.0

func DesktopAtCap(logPath string, since time.Time) (int, bool, error)

DesktopAtCap reports whether the desktop's log holds a warm spawn declined at or after since, and the cap its governor last named (0: none named).

func DesktopCap added in v0.93.0

func DesktopCap(logPath string) (int, bool)

DesktopCap is the cap of CLIs the desktop's governor last named in its log ("at cap=<n>"); false when the log names none.

func DesktopFocus added in v0.23.2

func DesktopFocus(logPath string) (string, error)

DesktopFocus is the host session id (local_…) the desktop app's main window shows, from the last focus change in its log; empty when it shows no session or the log holds no focus change.

func DesktopWindowActive added in v0.37.5

func DesktopWindowActive(ctx context.Context) (bool, error)

DesktopWindowActive reports whether the compositor's focused window is Claude Desktop's: the person is reading or typing in it, and a claude:// link, which switches its main window to another session, would switch it under them. It asks Hyprland (hyprctl activewindow); without a Hyprland session there is no focus to ask, and it reports false.

func GitInfo

func GitInfo(dir string) (repo, branch string)

GitInfo returns the GitHub repository ("owner/repo" from the origin remote) and the checked-out branch of the checkout dir lies in, reading .git directly: a worktree's .git file, its commondir, HEAD and config. Empty strings when dir is not in a git checkout.

func InvokesGitHub added in v0.59.0

func InvokesGitHub(cmd string) bool

InvokesGitHub says a shell command runs gh or devctl as one of its commands.

func LinkedWorktree added in v0.136.0

func LinkedWorktree(dir string) bool

LinkedWorktree reports whether dir is a linked git worktree that exists (git worktree add, or the worktree the desktop makes for a session): its .git is a file naming a gitdir under its repository's worktrees.

func Model added in v0.25.1

func Model(path string) (string, error)

Model returns the model of the transcript's last assistant message, which Claude Desktop takes as an imported session's model for every later turn; empty while the transcript holds none. A partial last line (the CLI still writing it) is skipped.

func Nested added in v0.135.1

func Nested(t *proc.Table, pid int) bool

Nested reports whether process pid runs inside a claude another session's tool command started (a `claude -p` from a worker's Bash): its parent chain passes two session CLIs. Its environment carries the outer session's CLAUDE_CODE_* ids, which name that session, not it.

func OwnCLI added in v0.149.0

func OwnCLI(t *proc.Table, pid int) *proc.Process

OwnCLI is the CLI of the session whose tool command runs the process pid: its nearest ancestor that is a session's CLI; nil when none is in the table (a sandbox's own process namespace hides it).

func PersonTyped added in v0.103.0

func PersonTyped(path string) (bool, error)

PersonTyped reports whether a person typed a prompt into the session of the transcript at path in the desktop: a user entry of the desktop's CLI that is no meta entry, no tool result and opens like none of notTyped. A prompt it cannot tell apart counts as typed.

func ProjectFolder added in v0.107.0

func ProjectFolder(dir string) string

ProjectFolder is the name of the project folder Claude Code keeps the transcripts of the sessions run in dir under: every character that is no ASCII letter or digit becomes a dash.

func ReadTranscript added in v0.14.0

func ReadTranscript(path string, now time.Time) (Work, Activity)

ReadTranscript reads the window of the transcript at path once for what the session is on and how it has been doing.

func ReadWindow added in v0.59.0

func ReadWindow(path string) ([]byte, bool)

ReadWindow returns the last 512 KiB of a session file and whether they are all of it, for another harness's reader.

func RecordName added in v0.15.2

func RecordName(cfg *config.Config, t *proc.Table, id string) string

RecordName is the name in the record of the running CLI of session id, "" for none: the title a `claude --bg` worker was started under, which the commands its tools run do not inherit.

func RepoFromURL

func RepoFromURL(u string) string

RepoFromURL turns a GitHub remote URL into "owner/repo"; other hosts keep "host/owner/repo".

func ScreenLocked added in v0.71.0

func ScreenLocked(t *proc.Table) bool

ScreenLocked reports whether a screen locker runs: nobody reads or types in the desktop's window, whatever the compositor names as focused.

func ScreenLocker added in v0.156.1

func ScreenLocker(t *proc.Table) string

ScreenLocker names the screen locker that runs, "" when none does: under it the compositor draws no window but the lock's.

func ToolGist added in v0.61.0

func ToolGist(name string, input json.RawMessage) string

ToolGist is one line naming a tool call: its name and the first of its input's telling fields ("Bash: Run the tests").

func Transcript added in v0.107.0

func Transcript(cfg *config.Config, id, cwd string) string

Transcript is the path of session id's transcript (<projects>/<folder>/<id>.jsonl), "" while it has none. cwd, when known, is the folder the session runs in: Claude Code names a project folder after it, so its transcript is found with one stat. The path found is kept; a session that moved folders or an unknown cwd costs one scan of the project folders, at most every transcriptMiss while none holds it and no project folder was added.

func TranscriptCwd added in v0.31.0

func TranscriptCwd(path string) (string, error)

TranscriptCwd is the working directory the transcript at path records for its session: the first entry's cwd within firstWindow, "" for none.

Types

type Activity added in v0.14.0

type Activity struct {
	Since    time.Time `json:"since,omitzero"`
	Whole    bool      `json:"whole"`
	Total    Counts    `json:"total"`
	LastHour Counts    `json:"lastHour"`
	// Context is the size of the last request: the tokens it read and the
	// tokens it wrote, which the next request reads.
	Context       int64   `json:"contextTokens"`
	ContextWindow int     `json:"contextWindow,omitempty"`
	ContextFill   float64 `json:"contextFill,omitempty"`
	Model         string  `json:"model,omitempty"`
	// contains filtered or unexported fields
}

Activity is how a session has been doing, read from the same window of its transcript as its Work (the last 512 KiB): reading whole transcripts on every call would cost seconds with thirty sessions. Since is the window's first entry; Whole says the window is the whole transcript.

func (*Activity) Price added in v0.14.0

func (a *Activity) Price(m config.Metrics)

Price sets the costs and the context window from the configured models.

type Acts added in v0.66.2

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

Acts collects, in transcript order, the issues, pull requests and repositories a session acts on: what its gh and devctl commands name, the owner, repository and number of its GitHub tools' calls, and what the issues and pull requests it creates come back as. Text it reads or writes is no act: a ref it only quotes is a mention.

func NewActs added in v0.66.2

func NewActs() *Acts

NewActs starts an empty collection.

func (*Acts) Call added in v0.66.2

func (a *Acts) Call(id, name string, input json.RawMessage, cwd string)

Call notes what a tool call acts on: the gh and devctl commands of a shell command run in cwd, or a tool's owner, repo and number fields.

func (*Acts) Result added in v0.66.2

func (a *Acts) Result(id, text string)

Result notes the refs a call that creates an issue or a pull request returned: the new item's URL.

func (*Acts) Work added in v0.66.2

func (a *Acts) Work(window string) Work

Work is what the session acted on, with the refs window mentions besides as Mentioned.

type Answer added in v0.91.1

type Answer struct {
	Calls []AnswerCall
	Text  string
}

Answer is what a session did in the turns it ran since a message to it: its tool calls, in order, and the last text it wrote.

func ReadAnswer added in v0.91.1

func ReadAnswer(path string, since time.Time) (Answer, error)

ReadAnswer reads from the end of the transcript at path what its session did from since on.

type AnswerCall added in v0.91.1

type AnswerCall struct {
	Name   string
	Input  json.RawMessage
	Result string
	Error  bool
	Done   bool
}

AnswerCall is one tool call of an Answer: the tool, its input and its result, Done once the result came.

type Background added in v0.73.1

type Background struct {
	Command, Description string
}

Background is a Bash command a session started in the background (run_in_background) whose completion notice its transcript does not hold.

func OpenBackground added in v0.73.1

func OpenBackground(path string) ([]Background, error)

OpenBackground lists the background Bash commands of the transcript at path that no completion notice followed: a headless turn that ended on one never hears it finish, since the end of the turn is the end of its process.

type Command

type Command struct {
	PID     int           `json:"pid"`
	Args    string        `json:"args"`
	Elapsed time.Duration `json:"elapsed"`
	// Remaining is set for a `sleep`: when the bounded wait ends.
	Remaining time.Duration `json:"remaining,omitempty"`
}

Command is a tool command a session runs right now (foreground or in the background): the first non-shell process under the tool's shell.

func ProcessTree added in v0.59.0

func ProcessTree(t *proc.Table, pid int, now time.Time) (memMiB int, cmds []Command)

ProcessTree is the memory of another harness's agent process pid with the processes below it, and its tool commands: the first non-shell process under each shell the agent started.

type Counts added in v0.14.0

type Counts struct {
	// Busy is the time between entries less than busyGap apart.
	Busy        time.Duration `json:"busy"`
	Turns       int           `json:"turns"`
	ToolCalls   int           `json:"toolCalls"`
	ToolErrors  int           `json:"toolErrors"`
	GitHubCalls int           `json:"githubCalls"`
	// SameErrors is how often the most repeated failing tool call failed;
	// SameError names it.
	SameErrors int    `json:"sameErrors"`
	SameError  string `json:"sameError,omitempty"`
	Tokens     Tokens `json:"tokens"`
	// CostUSD is nil when a request's model has no price: CostUnknown
	// names those models.
	CostUSD     *float64 `json:"costUSD,omitempty"`
	CostUnknown []string `json:"costUnknown,omitempty"`
}

Counts are the figures of one span of a transcript.

func (*Counts) Add added in v0.14.0

func (c *Counts) Add(o Counts)

Add adds o to c: the sums, the larger repeat and an unknown cost.

type ModelSpend added in v0.113.0

type ModelSpend struct {
	Model    string  `json:"model"`
	Priced   bool    `json:"priced"`
	Requests int     `json:"requests"`
	Tokens   Tokens  `json:"tokens"`
	USD      float64 `json:"usd"`
}

ModelSpend is one model's share of a Spend; a fast request's model is marked (fast).

type Overlap

type Overlap struct {
	// Kind is "ref" (the same issue or pull request) or "repo".
	Kind     string   `json:"kind"`
	Key      string   `json:"key"`
	Sessions []string `json:"sessions"`
}

Overlap is something two or more sessions are on at once.

func Overlaps

func Overlaps(sessions []*Session, work map[int]Work, o OverlapOptions) []Overlap

Overlaps finds the refs and repositories that more than one session is on now.

type OverlapOptions

type OverlapOptions struct {
	// Skip leaves a session out (the supervisor mentions everything).
	Skip func(*Session) bool
	// Ignore lists repositories whose refs and name form no overlap:
	// issue trackers and notebooks every session writes to.
	Ignore []string
	// ActiveSince leaves out sessions idle since before it: they are not
	// on anything now.
	ActiveSince time.Time
}

OverlapOptions narrows what counts as an overlap.

type Record

type Record struct {
	SessionID    string `json:"sessionId"`
	CLISessionID string `json:"cliSessionId"`
	Cwd          string `json:"cwd"`
	// OriginCwd is the folder the session started from when the desktop
	// runs it in a worktree of its own (Cwd).
	OriginCwd      string `json:"originCwd"`
	Branch         string `json:"branch"`
	Title          string `json:"title"`
	IsArchived     bool   `json:"isArchived"`
	LastActivityAt int64  `json:"lastActivityAt"`
	// LastFocusedAt is when the desktop's window last showed the session.
	LastFocusedAt int64 `json:"lastFocusedAt"`
	// AutoArchiveExempt says someone brought the session back from the
	// Archived list: it stays in the sidebar.
	AutoArchiveExempt bool   `json:"autoArchiveExempt"`
	PermissionMode    string `json:"permissionMode"`
	// ChromePermissionMode is how the desktop answers the session's Claude
	// in Chrome actions: ChromeSkipAll without asking, anything else (empty
	// included) with a site request for its person.
	ChromePermissionMode string `json:"chromePermissionMode"`
	Model                string `json:"model"`
	// PriorCLISessionIDs are the CLI sessions the desktop session ran before
	// a restart gave it a new one.
	PriorCLISessionIDs []string `json:"priorCliSessionIds"`
	// PostTurnSummary is the desktop's summary of the turn
	// PostTurnSummaryFor, LastAssistantUUID the session's latest turn.
	PostTurnSummary    *TurnSummary `json:"postTurnSummary"`
	PostTurnSummaryFor string       `json:"postTurnSummaryFor"`
	LastAssistantUUID  string       `json:"lastAssistantUuid"`
}

Record is the part of a desktop session record beekeeper reads.

func ReadRecord

func ReadRecord(cfg *config.Config, hostID string) (*Record, bool)

ReadRecord reads the desktop record of a host session id.

func StoppedRecords added in v0.22.1

func StoppedRecords(cfg *config.Config, running []*Session, since time.Time) []*Record

StoppedRecords returns the unarchived desktop records active since since whose session runs no CLI (paused or closed), most recently active first.

func (*Record) Aside added in v0.22.1

func (r *Record) Aside() string

Aside says why the guide leaves the record's session out of its feed, as Session.Aside does.

func (*Record) BrowserAsks added in v0.69.3

func (r *Record) BrowserAsks() bool

BrowserAsks reports whether the desktop holds the session's navigate to a site it was not allowed on yet for its person's approval: a request Claude Code's permission layer never sees, so neither bypassPermissions nor a PermissionRequest hook answers it.

func (*Record) LastSeen added in v0.103.0

func (r *Record) LastSeen() time.Time

LastSeen is when the session last ran a desktop turn or the desktop's window last showed it; zero when the record says neither.

func (*Record) Party added in v0.22.1

func (r *Record) Party() state.Party

Party is the record's session as the state names it.

func (*Record) Waiting added in v0.20.0

func (r *Record) Waiting() *Waiting

Waiting is what the record says the session waits on its person for: its latest turn's summary is blocked on an action; nil otherwise.

type Session

type Session struct {
	PID    int    `json:"pid"`
	ID     string `json:"session"`
	HostID string `json:"hostSession,omitempty"`
	// Parent is the session whose tool command started this one.
	Parent string `json:"parent,omitempty"`
	Name   string `json:"name"`
	// Peer is the name the CLI takes messages under: the name in its record,
	// else its -n. A desktop title that follows a rename (Name) is not it
	// when the CLI derived its own, from its folder ("klaus-lab-16").
	Peer       string    `json:"peer,omitempty"`
	Cwd        string    `json:"cwd"`
	Repo       string    `json:"repo,omitempty"`
	Branch     string    `json:"branch,omitempty"`
	Transcript string    `json:"transcript,omitempty"`
	LastActive time.Time `json:"lastActive,omitzero"`
	Started    time.Time `json:"started"`
	Commands   []Command `json:"commands,omitempty"`
	MemMiB     int       `json:"memMiB"`
	Permission string    `json:"permissionMode,omitempty"`
	Model      string    `json:"model,omitempty"`
	// Waiting is what the session waits on its person for, as the desktop
	// recorded it after its last turn; "" when it waits on nobody.
	Waiting *Waiting `json:"waiting,omitempty"`
	// Archived says the person archived the session in the desktop app.
	Archived bool `json:"archived,omitempty"`
	// Background says the claude daemon runs the session (`claude --bg`):
	// it resumes the session by itself when its CLI dies, so only `claude
	// stop` ends it.
	Background bool `json:"background,omitempty"`
	// Harness is the agent harness that runs the session: "" for Claude
	// Code, "omp" for oh-my-pi (package omp), whose Transcript is omp's
	// session file.
	Harness string `json:"harness,omitempty"`
	// State is an omp session's: busy, idle or ended; "" for Claude Code.
	State string `json:"state,omitempty"`
}

Session is one running Claude Code CLI.

func Discover

func Discover(cfg *config.Config, t *proc.Table, now time.Time) []*Session

Discover returns the running sessions, newest first. Every session is a CLI process of its own: a desktop session's, a background session's behind the daemon (a fresh CLI, or the spare the daemon handed it), a headless one's. A CLI that another session's tool command runs belongs to that session unless it was started under an id of its own.

func Live

func Live(sessions []*Session, p state.Party) (*Session, bool)

Live reports whether party names one of the running sessions, and which.

func OwnerOf

func OwnerOf(sessions []*Session, pid int) (*Session, bool)

OwnerOf returns the session a process was started by, from the session ids every tool command inherits in its environment: it holds for a command whose tool shell has exited and left it to systemd too.

func (*Session) Address added in v0.155.10

func (s *Session) Address() string

Address is the name a SendMessage reaches the session's CLI by: Peer, else Name.

func (*Session) Aside added in v0.22.1

func (s *Session) Aside() string

Aside says why the guide leaves the session out of its feed: "archived", "test" (titled "test: …", as every test run is), "" for neither.

func (*Session) Key added in v0.13.1

func (s *Session) Key() string

Key identifies the session across CLI restarts: the desktop's host id, else the session id, else the process.

func (*Session) Party

func (s *Session) Party() state.Party

Party is the session as the state names it.

type Spend added in v0.113.0

type Spend struct {
	From time.Time `json:"from"`
	To   time.Time `json:"to"`
	// Transcripts are the files with a request in the window, Sessions the
	// sessions' own (not their subagents').
	Transcripts int    `json:"transcripts"`
	Sessions    int    `json:"sessions"`
	Requests    int    `json:"requests"`
	Tokens      Tokens `json:"tokens"`
	// USD is the cost of the priced requests; Unpriced names the models
	// whose requests have no price, and those requests are in Models only.
	USD      float64      `json:"usd"`
	Unpriced []string     `json:"unpriced,omitempty"`
	Models   []ModelSpend `json:"models"`
}

Spend is what the API requests of a window cost, read from every transcript of the harnesses: the sessions' and their subagents' files, whether the session runs, is paused or was archived. A request counts once, by its id, however many transcripts carry it (a forked or resumed session copies its history).

func PriceSpend added in v0.139.0

func PriceSpend(ts []SpendTranscript, from, to time.Time, m config.Metrics) Spend

PriceSpend counts each request of ts once, in their order, and prices it with m.

type SpendRequest added in v0.139.0

type SpendRequest struct {
	// ID is what the request counts once by; empty, it always counts.
	ID string
	At time.Time
	// Model is the model it is priced by and listed under.
	Model  string
	Fast   bool
	Tokens Tokens
}

SpendRequest is an API request a transcript records.

func InWindow added in v0.139.0

func InWindow(rs []SpendRequest, from, to time.Time) []SpendRequest

InWindow drops the requests of rs before from, at or after to, or without tokens.

type SpendTranscript added in v0.139.0

type SpendTranscript struct {
	Subagent bool
	Requests []SpendRequest
}

SpendTranscript is the requests of one transcript in a window; a subagent's transcript is no session.

func ReadSpendTranscripts added in v0.139.0

func ReadSpendTranscripts(dir string, from, to time.Time) ([]SpendTranscript, error)

ReadSpendTranscripts reads the requests from from up to to of every Claude Code transcript under dir. A transcript last written before from has none and is not read.

type Tokens added in v0.14.0

type Tokens struct {
	Input        int64 `json:"input"`
	CacheWrite5m int64 `json:"cacheWrite5m"`
	CacheWrite1h int64 `json:"cacheWrite1h"`
	CacheRead    int64 `json:"cacheRead"`
	Output       int64 `json:"output"`
}

Tokens are the usage fields of the API's responses, summed.

func (Tokens) Sum added in v0.14.0

func (t Tokens) Sum() int64

Sum is every token of t.

type ToolShell added in v0.149.0

type ToolShell struct {
	PID      int
	Tree     []int
	Commands []Command
}

ToolShell is a tool shell of a session's CLI: its process, every process below it, and the commands it runs.

func ToolShells added in v0.149.0

func ToolShells(t *proc.Table, pid int, now time.Time) []ToolShell

ToolShells returns the tool shells of the CLI pid, those of the sessions its tool commands started included.

func (ToolShell) Sleeping added in v0.149.0

func (sh ToolShell) Sleeping() bool

Sleeping reports whether the shell only waits: every command it runs is a `sleep`, the turn of a background wait loop between its checks.

type TranscriptCache added in v0.107.0

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

TranscriptCache reads the transcripts as ReadTranscript does, for a process that reads them again and again (a watch): a transcript unchanged since its last read hands back that read while it is younger than fresh, so an idle session's costs a stat. Its last hour's figures are as old as that read.

func NewTranscriptCache added in v0.107.0

func NewTranscriptCache(fresh time.Duration) *TranscriptCache

NewTranscriptCache returns a cache whose reads stay fresh for fresh.

func (*TranscriptCache) Read added in v0.107.0

func (c *TranscriptCache) Read(path string, now time.Time) (Work, Activity)

Read is ReadTranscript(path, now), from the cache while the transcript is unchanged and the last read younger than the cache's fresh.

type Turn

type Turn struct {
	At   time.Time `json:"at"`
	Role string    `json:"role"`
	Text string    `json:"text"`
}

Turn is one message of a transcript: what a person, a peer or the model said, without tool results. Follow adds the model's tool calls as turns of RoleTool, the call's name and its gist.

func First added in v0.23.0

func First(path string) (t Turn, found bool, err error)

First returns the first turn a person or a starter gave the session: its brief. found is false when the transcript's start holds none.

func Follow added in v0.61.0

func Follow(path string, n int) ([]Turn, error)

Follow returns the last n turns of the transcript at path with the model's tool calls among them: what a session does right now, as the person's screen follows it.

func Tail

func Tail(path string, n int) ([]Turn, error)

Tail returns the last n turns of the transcript at path.

type TurnSummary added in v0.20.0

type TurnSummary struct {
	Category    string `json:"status_category"`
	NeedsAction string `json:"needs_action"`
}

TurnSummary is the desktop's summary of a turn: the status it files the session under (blocked: it needs its person) and what it needs.

type Waiting added in v0.20.0

type Waiting struct {
	Turn   string `json:"turn"`
	Action string `json:"action"`
}

Waiting is a session's turn that ended needing its person: the desktop's summary of the turn Turn says what it needs (Action).

type Work

type Work struct {
	Repos []string `json:"repos,omitempty"`
	Refs  []string `json:"refs,omitempty"`
	// Mentioned are the refs its window names that it did not act on:
	// quoted in a message, read in a tool's output.
	Mentioned []string `json:"mentioned,omitempty"`
}

Work is what a session's recent transcript is about: the GitHub issues and pull requests it acted on and the repositories it acted in (Acts), most recent first, and the refs it only mentions. It is read from the transcript's tail, so a brief read hours ago does not count and the session's latest turns do.

func (Work) CurrentRefs

func (w Work) CurrentRefs(ignore []string) []string

CurrentRefs are the most recent refs outside ignore.

func (Work) Primary

func (w Work) Primary(ignore []string) string

Primary is the repository a session works in now: the most recently acted-in one outside ignore.

func (Work) Serve added in v0.66.2

func (w Work) Serve(ref string) Work

Serve puts ref, the issue a session's record says it serves, first among its refs and its repository first among its repositories: serving an issue is acting on it.

Jump to

Keyboard shortcuts

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