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
- func Archived(cfg *config.Config) map[string]bool
- func BeekeeperSubcommand(p *proc.Process) string
- func ByCLI(cfg *config.Config) map[string]*Record
- func CallResult(path, suffix string) (string, bool, error)
- func Called(path, suffix string) (bool, error)
- func Context(path string) int64
- func DesktopAtCap(logPath string, since time.Time) (int, bool, error)
- func DesktopCap(logPath string) (int, bool)
- func DesktopFocus(logPath string) (string, error)
- func DesktopWindowActive(ctx context.Context) (bool, error)
- func GitInfo(dir string) (repo, branch string)
- func InvokesGitHub(cmd string) bool
- func IsDaemon(p *proc.Process) bool
- func IsWait(p *proc.Process) bool
- func LastSubagentWrite(transcript string) time.Time
- func LinkedWorktree(dir string) bool
- func Model(path string) (string, error)
- func Nested(t *proc.Table, pid int) bool
- func OwnCLI(t *proc.Table, pid int) *proc.Process
- func PersonTyped(path string) (bool, error)
- func ProjectFolder(dir string) string
- func ReadTranscript(path string, now time.Time) (Work, Activity)
- func ReadWindow(path string) ([]byte, bool)
- func RecordName(cfg *config.Config, t *proc.Table, id string) string
- func RepoFromURL(u string) string
- func ScreenLocked(t *proc.Table) bool
- func ScreenLocker(t *proc.Table) string
- func ToolGist(name string, input json.RawMessage) string
- func Transcript(cfg *config.Config, id, cwd string) string
- func TranscriptCwd(path string) (string, error)
- func TurnDone(path string) bool
- type Activity
- type Acts
- type Answer
- type AnswerCall
- type Background
- type Command
- type Counts
- type Dialog
- type ModelSpend
- type Overlap
- type OverlapOptions
- type Record
- type SDKChild
- type Session
- type Spend
- type SpendRequest
- type SpendTranscript
- type Tokens
- type ToolShell
- type TranscriptCache
- type Turn
- type TurnSummary
- type Waiting
- type Work
Constants ¶
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.
const Current = 3
Current is how many of the most recent refs count as what a session is on now.
const DesktopAppID = "com.anthropic.Claude"
DesktopAppID is the Wayland app id of Claude Desktop's windows.
const RoleTool = "tool"
RoleTool is the role of a tool call's turn in what Follow returns.
const SDKEntrypoint = "sdk-py"
SDKEntrypoint is the entrypoint a transcript of a session the Claude Agent SDK for Python ran records: the security-guidance plugin's review runs as one on a session's Stop, commit and push, in that session's folder.
Variables ¶
This section is empty.
Functions ¶
func Archived ¶ added in v0.69.0
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 BeekeeperSubcommand ¶
BeekeeperSubcommand is beekeeper's subcommand in p's arguments: the first word after the program that is no flag nor a global flag's value; "" for none.
func ByCLI ¶ added in v0.136.0
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
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
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
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
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
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
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
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 ¶
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
InvokesGitHub says a shell command runs gh or devctl as one of its commands.
func IsDaemon ¶
IsDaemon reports whether p is the claude daemon (claude daemon run), which runs the background sessions, rather than a client of it (claude daemon status, logs, stop or uninstall).
func IsWait ¶ added in v0.171.0
IsWait reports whether p is a long-running command that blocks on something outside the session: a merge, a release, a CI run, an image moving between stores, a port-forward.
func LastSubagentWrite ¶ added in v0.171.0
LastSubagentWrite is the latest write of the subagents' transcripts of the session whose transcript is transcript (<dir>/<id>.jsonl, its subagents' <dir>/<id>/subagents/*.jsonl); zero for none.
func LinkedWorktree ¶ added in v0.136.0
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
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
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
OwnCLI is the CLI of the session whose tool command runs the process pid: its nearest ancestor that is a session's CLI, including a claimed spare. A tool command beneath a spare establishes ownership without a session record. Returns nil when none is in the table (a sandbox's own process namespace hides it).
func PersonTyped ¶ added in v0.103.0
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
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
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
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
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 ¶
RepoFromURL turns a GitHub remote URL into "owner/repo"; other hosts keep "host/owner/repo".
func ScreenLocked ¶ added in v0.71.0
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
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
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
TranscriptCwd is the working directory the transcript at path records for its session: the first entry's cwd within firstWindow, "" for none.
func TurnDone ¶ added in v0.174.0
TurnDone reports whether the transcript at path proves its session's last turn ended: its last message of its own is an assistant message that stopped with an end reason. A tail that ends on a user message (a wake or a tool result the model has not answered yet), on an assistant message still running (a tool call, a stop reason missing while the CLI writes it), on a line only partly written, or says nothing at all (no file, no message) is not proof: false. A wake or resume appends the message it was given as a user message before its model answers, so a session in a turn a wake just started reads as not done.
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) AddRequest ¶ added in v0.171.0
AddRequest records one model request's timestamp, model and token counts so Price can compute Total and LastHour cost and CostUnknown for a harness.
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 (*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.
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.
type AnswerCall ¶ added in v0.91.1
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"`
// Wait says the command only waits: a sleep, a CI watch, a merge's
// turn (onlyWaits).
Wait bool `json:"wait,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
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.
type Dialog ¶
Dialog is a person's answer to one AskUserQuestion call: the questions it showed and the selected option plus any notes or free text, verbatim.
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.
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 AllRecords ¶
AllRecords returns the desktop session records, archived included, most recently active first.
func ReadRecord ¶
ReadRecord reads the desktop record of a host session id.
func StoppedRecords ¶ added in v0.22.1
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
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
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
LastSeen is when the session last ran a desktop turn or the desktop's window last showed it; zero when the record says neither.
type SDKChild ¶
type SDKChild struct {
Session string `json:"session"`
Started time.Time `json:"started"`
Models []string `json:"models"`
Requests int `json:"requests"`
USD float64 `json:"usd"`
// Unpriced: a model of its requests has no price, so USD is short.
Unpriced bool `json:"unpriced,omitempty"`
}
SDKChild is one sdk-py session run in a folder: when its first request went out, what its requests cost, and on which models.
func SDKChildren ¶
SDKChildren reads the sdk-py sessions of the project folder dir with a request at or after since, oldest first, priced with m. Every other transcript, and one last written before since, is passed over; an unreadable folder has none.
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 ("fixture-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"`
// LastSubagent is the latest write of its subagents' transcripts
// (LastSubagentWrite): a subagent works while the session's own
// transcript stays quiet.
LastSubagent time.Time `json:"lastSubagent,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 ¶
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 OwnerOf ¶
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
Address is the name a SendMessage reaches the session's CLI by: Peer, else Name.
func (*Session) Aside ¶ added in v0.22.1
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
Key identifies the session across CLI restarts: the desktop's host id, else the session id, else the process.
func (*Session) OwnWait ¶ added in v0.171.0
OwnWait says what the session waits on while it does no work of its own: it runs at least one tool command, every one of them only waits (Command.Wait), and its transcript and its subagents' have been quiet for quiet. It is "" for a session that works (a subagent of it included), runs nothing (its turn ended, or the model thinks), or whose last activity is unknown. A session in a wait of its own (a polling loop, a CI watch, a merge's turn) spends next to no budget.
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
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
// Session is the id of the session the transcript belongs to (a
// subagent's: its parent's) where the file names it; empty: unknown.
Session string
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.
type ToolShell ¶ added in v0.149.0
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
ToolShells returns the tool shells of the CLI pid, those of the sessions its tool commands started included.
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.
type Turn ¶
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
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.
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
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"`
// Created are the issues the session created (gh issue create,
// create_issue, issue_write), most recent first.
Created []string `json:"created,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 ¶
CurrentRefs are the most recent refs outside ignore.