works.iterative.claude.core.log

Members list

Type members

Classlikes

case class ArchiveConfig(vendorProjectsDir: Path, archiveDir: Path, cwd: Path)

Configuration for ConversationArchive.

Configuration for ConversationArchive.

Value parameters

archiveDir

destination root the session tree is mirrored into.

cwd

the known working directory a session ran under; the record is located by encoding this cwd, never by decoding a directory name.

vendorProjectsDir

the Claude projects directory holding per-cwd session trees. Configurable because CLAUDE_CONFIG_DIR relocates it (e.g. /home/mph/.claude-iw, not ~/.claude). Use ArchiveConfig.locating to derive it from a config-dir override and home directory.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ArchiveConfig

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
enum ArchiveError extends Throwable

Errors surfaced by ConversationArchive operations. Extends Throwable so an implementation may also let it propagate through effect types whose error channel is Throwable.

Errors surfaced by ConversationArchive operations. Extends Throwable so an implementation may also let it propagate through effect types whose error channel is Throwable.

Attributes

Supertypes
trait Enum
trait Product
trait Equals
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
object ArchivePaths

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Reads the last complete lines of a byte region without scanning it from the start.

Reads the last complete lines of a byte region without scanning it from the start.

The region is a file being appended to by the CLI. Lines are delimited by 0x0A; because no byte of a multi-byte UTF-8 sequence is ever 0x0A, splitting on the raw byte never severs a character, so each line's byte slice decodes as UTF-8 independently. A single trailing \r is stripped so a CRLF-terminated line reads the same as an LF-terminated one.

Torn-final-line rule: bytes after the last 0x0A in the region are a line whose terminating newline has not been written yet — a live append in progress — and are excluded from the tail. A region that ends exactly on a newline (or on a previous page's cursor, which is always a line start) has no such remainder.

Blocks are read backward from the region end, only far enough to expose the requested number of complete lines, so cost is proportional to the page, not the region.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
trait ConversationArchive[F[_]]

Custody of a session's record: locate it, read its conversation entries (main thread and sub-agent sidechains), and mirror the whole tree into an archive directory.

Custody of a session's record: locate it, read its conversation entries (main thread and sub-agent sidechains), and mirror the whole tree into an archive directory.

Every locate and read resolves the session vendor-first, falling back to the archive mirror once the vendor tree has been pruned; the located record's root names which one won. Locating encodes a known cwd into a project directory — never decodes a directory name, which is ambiguous — and looks for that directory under the vendor projects tree first, then under the mirror. The record is a tree (the main .jsonl plus the sub-agent .jsonl and .meta.json sidechains), so the mirror copies the tree, not a single file. Entry reads tolerate vendor drift by degrading unrecognized lines to raw entries rather than losing them.

Type parameters

F

the effect type; the abstract EntryStream lets each backend pick its own streaming type.

Attributes

Supertypes
class Object
trait Matchable
class Any
trait ConversationLogIndex[F[_]]

Attributes

Supertypes
class Object
trait Matchable
class Any
trait ConversationLogReader[F[_]]

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

One planned mirror operation for a single file, keyed by its path relative to the tree root.

One planned mirror operation for a single file, keyed by its path relative to the tree root.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class MirrorPlan(actions: Seq[MirrorAction])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object MirrorPlanner

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object PageSize

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
PageSize.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type