SessionArchiveHook

works.iterative.claude.zio.internal.cli.SessionArchiveHook
See theSessionArchiveHook companion class

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def mirroring(config: ArchiveConfig, background: (UIO[Unit]) => UIO[Unit] = ...): UIO[SessionArchiveHook]

A hook that mirrors the session tree into the configured archive. Failures are logged as warnings and swallowed: a whole-mirror failure and any per-file failures within an otherwise-successful report are both surfaced only as logs, so mirroring can never break the session.

A hook that mirrors the session tree into the configured archive. Failures are logged as warnings and swallowed: a whole-mirror failure and any per-file failures within an otherwise-successful report are both surfaced only as logs, so mirroring can never break the session.

A single permit serialises mirrors so two never run concurrently (and so never corrupt the append-in-place copy). afterResult hands its mirror to background (forking a daemon fiber in production) and skips when one is already in flight, so it never blocks the reader and completed turns cannot pile up. onClose takes the permit, waiting for any in-flight mirror before running the final one, bounded by CloseMirrorTimeout.

Value parameters

background

how a scheduled afterResult mirror is run; the default forks a daemon fiber. A test may pass identity to run it synchronously.

Attributes

Concrete fields

val CloseMirrorTimeout: Duration

Upper bound on how long onClose waits for the final mirror before it logs a warning and moves on, so releasing an archive-configured session's scope cannot block indefinitely on a slow filesystem copy.

Upper bound on how long onClose waits for the final mirror before it logs a warning and moves on, so releasing an archive-configured session's scope cannot block indefinitely on a slow filesystem copy.

Attributes

A hook that does nothing — the default when no archive is configured.

A hook that does nothing — the default when no archive is configured.

Attributes