ArchivePaths

works.iterative.claude.core.log.ArchivePaths
object ArchivePaths

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def archiveProjectDir(config: ArchiveConfig): Path

The archive's project directory: the same encoded-cwd segment projectDir uses, hung off config.archiveDir. The archive is thus projects-dir-shaped, so a session reads back through the identical relative layout whether it is served from the vendor tree or the mirror.

The archive's project directory: the same encoded-cwd segment projectDir uses, hung off config.archiveDir. The archive is thus projects-dir-shaped, so a session reads back through the identical relative layout whether it is served from the vendor tree or the mirror.

Attributes

def candidates(config: ArchiveConfig, sessionId: SessionId): Either[ArchiveError, Seq[SessionRecord]]

The record candidates for a session, in resolution order: the live vendor tree first, then the archive mirror. Each candidate names the paths a record would have under its root; the caller keeps the first whose main transcript exists. Rejects a non-accepted id before deriving any path.

The record candidates for a session, in resolution order: the live vendor tree first, then the archive mirror. Each candidate names the paths a record would have under its root; the caller keeps the first whose main transcript exists. Rejects a non-accepted id before deriving any path.

Attributes

def mainTranscript(config: ArchiveConfig, sessionId: SessionId): Either[ArchiveError, Path]

The <sessionId>.jsonl main-thread transcript for a session, or a rejection when the id is not an accepted shape.

The <sessionId>.jsonl main-thread transcript for a session, or a rejection when the id is not an accepted shape.

Attributes

def projectDir(config: ArchiveConfig): Path

The project directory holding a cwd's session trees, resolved by encoding config.cwd. A cwd containing - resolves to its own encoding; the decode direction is never used because it is ambiguous.

The project directory holding a cwd's session trees, resolved by encoding config.cwd. A cwd containing - resolves to its own encoding; the decode direction is never used because it is ambiguous.

Attributes

def treeDir(config: ArchiveConfig, sessionId: SessionId): Either[ArchiveError, Path]

The <sessionId>/ directory holding sub-agent and workflow sidechains, or a rejection when the id is not an accepted shape.

The <sessionId>/ directory holding sub-agent and workflow sidechains, or a rejection when the id is not an accepted shape.

Attributes

def validateId(id: String): Either[ArchiveError, String]

Accepts an id only when it matches ValidIdPattern; otherwise rejects it with ArchiveError.InvalidSessionId so no path is derived from it. This is the single choke point every id-derived path must pass through.

Accepts an id only when it matches ValidIdPattern; otherwise rejects it with ArchiveError.InvalidSessionId so no path is derived from it. This is the single choke point every id-derived path must pass through.

Attributes

Concrete fields

val ValidIdPattern: Regex

Accepted shape for vendor session and sub-agent ids — UUID- or agent-<hex>-shaped tokens. Validating an id against this before deriving any path keeps .., /, \, and absolute paths from ever reaching path construction, so no derived path can escape the project directory.

Accepted shape for vendor session and sub-agent ids — UUID- or agent-<hex>-shaped tokens. Validating an id against this before deriving any path keeps .., /, \, and absolute paths from ever reaching path construction, so no derived path can escape the project directory.

Attributes