Documentation
¶
Overview ¶
Package pinned is an out-of-band registry of the board records a user has chosen to keep. A pin is a zero-byte marker file at ConfigDir/pinned/<kind>/<id>; it carries no content. The registry is deliberately separate from the record stores (subagent-jobs, teams-history) so the record writers — a board refresh's teamhist.Upsert, the engine's manifest SaveRun, a job's writeMeta — never touch a pin and so can never clobber it. GC and the board consult the registry to skip / mark pinned records; an explicit per-record delete (board `d`) Unpins, and uninstall Purges the whole dir.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Kind ¶
type Kind string
Kind namespaces a pin by record type so a job, a run, and a team can share an id without colliding (each lives under its own subdir).
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set is an in-memory snapshot of the registry — a map lookup so a GC sweep or a board refresh can test many records without one stat per record. The zero Set has no pins (Has always false), so a caller that fails to snapshot degrades safely to "nothing pinned" only where that is the intended fallback.
func Snapshot ¶
Snapshot reads the whole registry into a Set. A missing registry (or a missing kind subdir) yields an empty set for that kind — everything reads as unpinned.
func (Set) With ¶
With returns a copy of the set with (kind,id) pinned (add=true) or unpinned (add=false). The board applies it optimistically when it dispatches a pin toggle, so two quick presses before the registry write + reload land still alternate instead of both pinning off the same stale snapshot.