spool

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: AGPL-3.0 Imports: 8 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 spool keeps not-yet-acked transcript data alive after Claude Code deletes the original.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Spool

type Spool struct {
	Dir string
	// contains filtered or unexported fields
}

Spool mirrors files below Dir via hardlinks, falling back to copies.

func New

func New(dir string) *Spool

New returns a Spool rooted at dir.

func (*Spool) Ensure

func (s *Spool) Ensure(relPath, abs, fileID string) (string, bool, error)

Ensure makes sure a spool entry for relPath mirrors abs. Returns the spool path and whether it is a copy.

func (*Spool) Path

func (s *Spool) Path(relPath string) string

Path returns the spool path for relPath ("/" separators).

func (*Spool) Remove

func (s *Spool) Remove(path string) error

Remove deletes a spool path (missing is fine) and prunes empty parent dirs below Dir.

func (*Spool) Retire

func (s *Spool) Retire(relPath, fileID string) (string, error)

Retire moves the current entry aside to <path>.<fileID>.old; a missing entry returns "". It is idempotent: when only the .old file exists (a crash between the rename and the caller's state write) that path is returned again.

Jump to

Keyboard shortcuts

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