launchlog

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 7 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 launchlog records the worktrees the app started agent sessions in, and the pull request or issue each is for.

The launcher records a launch when it asks the agent for a worktree; the worktrees service reads the records to link each worktree to its item exactly, and its automatic cleanup uses them to find the clones worth checking. A record is only a pointer: whether a worktree may be removed is always decided from git and GitHub at the time.

Index

Constants

View Source
const (
	KindPR    = "pr"
	KindIssue = "issue"
)

Item kinds, matching the inbox's.

Variables

View Source
var ErrInvalidLaunch = errors.New("invalid worktree launch")

ErrInvalidLaunch is returned for a launch missing a field, or with an unknown kind or a number that is not positive.

Functions

This section is empty.

Types

type Launch

type Launch struct {
	// ClonePath is the clone the session was launched in.
	ClonePath string

	// Worktree is the worktree's directory name under the clone's .claude/worktrees.
	Worktree string

	// Owner and Name are the item's repository.
	Owner string
	Name  string

	// Kind is KindPR or KindIssue.
	Kind string

	// Number is the item's number.
	Number int

	// LaunchedAt is when the session was launched.
	LaunchedAt time.Time
}

Launch is one worktree the app started a session in.

type Store

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

Store reads and writes the launch records.

func NewStore

func NewStore(db *gorm.DB) *Store

NewStore returns a Store over db.

func (*Store) Forget

func (s *Store) Forget(ctx context.Context, clonePath, worktree string) error

Forget removes the record of a clone's worktree, if there is one.

func (*Store) List

func (s *Store) List(ctx context.Context) ([]Launch, error)

List returns every recorded launch, oldest first.

func (*Store) Record

func (s *Store) Record(ctx context.Context, l Launch) error

Record stores a launch, replacing an earlier one for the same worktree of the same clone.

Directories

Path Synopsis
Package model holds the persisted record of worktree launches.
Package model holds the persisted record of worktree launches.

Jump to

Keyboard shortcuts

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