session

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasActiveSessions

func HasActiveSessions(claudeDir string) bool

HasActiveSessions returns true if any Claude Code sessions are running.

Types

type ActiveSession

type ActiveSession struct {
	PID       int    `json:"pid"`
	SessionID string `json:"sessionId"`
	Project   string `json:"project"`
}

ActiveSession represents a running Claude Code session.

func DetectActive

func DetectActive(claudeDir string) ([]ActiveSession, error)

DetectActive reads ~/.claude/sessions/*.json and returns sessions whose PIDs are still alive.

type SealLock

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

SealLock provides file-based locking for seal operations.

func NewSealLock

func NewSealLock(sealDir string) *SealLock

NewSealLock creates a lock for the given seal directory.

func (*SealLock) Acquire

func (l *SealLock) Acquire(timeout time.Duration) (bool, error)

Acquire tries to acquire the lock with a timeout. Returns true if acquired, false if timed out.

func (*SealLock) Release

func (l *SealLock) Release() error

Release releases the lock.

Jump to

Keyboard shortcuts

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