works.iterative.claude.core.log.model

Members list

Type members

Classlikes

case class AssistantLogEntry(content: List[ContentBlock], model: Option[String], usage: Option[TokenUsage], requestId: Option[String]) extends LogEntryPayload

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class AttachmentLogEntry(data: Map[String, Any]) extends LogEntryPayload

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ConversationLogEntry(uuid: Option[String], parentUuid: Option[String], timestamp: Option[Moment], sessionId: String, isSidechain: Boolean, cwd: Option[String], version: Option[String], payload: LogEntryPayload, agentId: Option[String] = ..., isMeta: Boolean = ..., isCompactSummary: Boolean = ...)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class CustodyFacts(installation: Path, harness: String, takenAt: Instant)

What a keeper knows about a record that the record itself cannot say.

What a keeper knows about a record that the record itself cannot say.

Value parameters

harness

the agent harness that wrote the transcript

installation

the config directory the session's CLI ran under

takenAt

when custody first took the session

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class EntryPage(entries: Seq[ConversationLogEntry], older: Option[PageToken])

A bounded page of a session's main-thread entries.

A bounded page of a session's main-thread entries.

Value parameters

entries

the page's entries in file order (oldest first), already parsed with the tolerant line parser, so unrecognized vendor lines survive as raw entries and blank or unparseable lines are omitted

older

a cursor to the page immediately before this one, or None when this page reaches the start of the transcript

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class FileHistorySnapshotLogEntry(data: Map[String, Any]) extends LogEntryPayload

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Followed(entries: Seq[ConversationLogEntry], reachesStart: Boolean)

A batch a follow has just produced.

A batch a follow has just produced.

reachesStart is true only on the batch a follow opens with, and only when that batch reached the session's beginning — the same fact EntryPage.older carries for a page a reader asks for once. Everything a transcript grows by afterwards says false, because growth is never a beginning.

A follow that re-subscribes — the file was not written yet, the connection was re-made — opens again, so the fact arrives again with the batch it belongs to rather than being remembered anywhere.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class LastPromptLogEntry(data: Map[String, Any]) extends LogEntryPayload

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait LogEntryPayload

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class LogFileMetadata(path: Path, sessionId: String, summary: Option[String], lastModified: Instant, fileSize: Long, cwd: Option[String], gitBranch: Option[String], createdAt: Option[Instant])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class MirrorReport(copied: Seq[SubPath], extended: Seq[SubPath], refreshed: Seq[SubPath], skipped: Seq[SubPath], failed: Seq[(SubPath, String)] = ..., firstKeep: Boolean = ...)

The result of mirroring a session tree.

The result of mirroring a session tree.

Value parameters

copied

files that were absent from the mirror and copied whole

extended

files appended in place after the mirrored bytes were confirmed a prefix

failed

files whose copy failed mid-run (e.g. the vendor deleted or truncated them between listing and copy), paired with the failure message. Other files are still mirrored; a later run retries these because the mirror is idempotent.

firstKeep

whether this run first took the session into custody — the run that wrote its custody facts; every later run of the same session is not

refreshed

files recopied whole because they shrank or their mirrored prefix diverged

skipped

files left untouched because source and mirror sizes matched

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class PageToken

A continuation cursor for reading older entries of a session's transcript.

A continuation cursor for reading older entries of a session's transcript.

It is opaque by construction: only the archive read path (within the log package) mints one. A consumer obtains one from a page and hands it back to fetch the previous page, but cannot forge one against an arbitrary file. Its fields pin the cursor to a single resolved file so it can never be applied to a different one:

  • offset is a byte position into an append-only file, so it stays valid as the file grows.
  • source is the exact transcript path the cursor was minted against. The vendor-then-mirror fallback can change which file a session resolves to between calls (e.g. the vendor tree is pruned mid-paging); when the current resolution no longer matches source, paging fails rather than reading a stale offset against the wrong file.

Value parameters

offset

the exclusive byte bound below which older entries are read

sessionId

the session the cursor pages, re-resolved on each older-page call

source

the transcript file the cursor's offset indexes into

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
PageToken.type
case class PermissionModeLogEntry(data: Map[String, Any]) extends LogEntryPayload

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ProgressLogEntry(data: Map[String, Any], parentToolUseId: Option[String]) extends LogEntryPayload

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class QueueOperationLogEntry(operation: String, content: Option[String]) extends LogEntryPayload

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class RawLogEntry(entryType: String, json: Json) extends LogEntryPayload

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
enum RecordRoot

The root a SessionRecord was resolved under.

The root a SessionRecord was resolved under.

Resolution tries the live vendor tree first and falls back to the archive mirror, so a session pruned from the vendor directory still reads from the mirror. The root a record won under also decides custody: only a Vendor record is a mirror source, so mirroring an Archive-resolved session never writes back into the archive.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class SessionRecord(sessionId: SessionId, mainTranscript: Path, treeDir: Path, root: RecordRoot)

A located session record.

A located session record.

Value parameters

mainTranscript

the <sessionId>.jsonl main-thread transcript file

root

which root the record was resolved under — the live vendor tree or the archive mirror it falls back to

sessionId

the vendor session id

treeDir

the <sessionId>/ directory holding subagents/, tool-results/, and workflows/; may not exist when a session spawned no sub-agents

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class SubAgentMetadata(agentId: String, agentType: Option[String], description: Option[String], transcriptPath: Path, toolUseId: Option[String] = ...)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class SystemLogEntry(subtype: String, data: Map[String, Any]) extends LogEntryPayload

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class TurnTroubleLogEntry(trouble: TurnTrouble, detail: Option[String]) extends LogEntryPayload

A turn that stopped without answering, and what stopped it.

A turn that stopped without answering, and what stopped it.

No transcript file holds this. The vendor writes down the conversation, not the envelope that ended it, and a process that died wrote nothing at all — so a reader is told this by the session while it is running, or not at all.

detail is what the ending said for itself, in the vendor's own words, and is absent when it said nothing.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class UserLogEntry(content: List[ContentBlock]) extends LogEntryPayload

Attributes

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