Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Cmd = NewCommand()
Cmd represents the watch command.
Functions ¶
Types ¶
type RepoLock ¶ added in v0.33.0
type RepoLock struct {
// contains filtered or unexported fields
}
RepoLock is the exclusive advisory lock that gates persistence and serving to a single clarity watch process per repository (see CLR-91). It is held for the lifetime of the process; the OS releases it automatically on exit, including a crash, so there is no stale-lock/PID-liveness bookkeeping to build or recover.
func AcquireRepoLock ¶ added in v0.33.0
AcquireRepoLock tries to become the sole clarity watch process for the repository containing worktreePath. On success it returns the held lock, ready for SetServing once the port is known, and a nil lockInfo. If another process already holds it, it returns a nil *RepoLock and that process's last recorded lockInfo instead.
func (*RepoLock) Release ¶ added in v0.33.0
Release releases the lock. The file itself is left in place — its content goes stale but is harmless, and the next holder overwrites it via SetServing.
func (*RepoLock) SetServing ¶ added in v0.33.0
SetServing records the port this process is serving on, so a process that loses the lock race can point the user at it instead of starting a competing instance.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package store persists clarity watch's session history (projects, worktrees, sessions, commits, snapshots) to a per-repo SQLite database, so it survives a process restart or crash.
|
Package store persists clarity watch's session history (projects, worktrees, sessions, commits, snapshots) to a per-repo SQLite database, so it survives a process restart or crash. |