watch

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package watch implements live monitoring of agent session directories (killer feature #5): it tails growing transcript files and emits normalized event lines in real time. Read-only — it never blocks, modifies or signals the observed agents.

Polling (stdlib-only) rather than OS file notification: forensically predictable, cross-platform, and dependency-free. New files start at offset 0; files existing at startup start at their current size so only NEW activity is reported.

Index

Constants

View Source
const MaxLineBytes = 8 << 20

MaxLineBytes bounds one tailed line.

Variables

This section is empty.

Functions

This section is empty.

Types

type Watcher

type Watcher struct {
	Paths    []string // directory roots to watch (recursive, *.jsonl)
	Interval time.Duration
	Out      io.Writer
	// contains filtered or unexported fields
}

Watcher polls transcript trees for growth.

func (*Watcher) Run

func (w *Watcher) Run(cycles int) error

Run polls for the given number of cycles (<=0 = until error/forever).

Jump to

Keyboard shortcuts

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