Class FilesystemTranscriptStore
java.lang.Object
io.agentscope.harness.agent.transcript.FilesystemTranscriptStore
- All Implemented Interfaces:
TranscriptStore
TranscriptStore backed by a local / NAS filesystem directory.
Each segment is an immutable file under
{root}/{tenant}/{agentId}/{sessionId}/events/. POSIX append is used only when
compacting into a single object; normal writes create new files.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.agentscope.harness.agent.transcript.TranscriptStore
TranscriptStore.SegmentInfo -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendSegment(TranscriptRef ref, long seqStart, long seqEnd, String writerId, byte[] jsonl) Appends one immutable JSONL segment and returns its storage key.voidcompact(TranscriptRef ref) Optional compaction of small segments into a single object.voiddelete(TranscriptRef ref) Deletes all segments for the transcript.Lists segments ordered byseqStartascending.readSegment(String segmentKey) Opens a segment for reading; caller must close the stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.agentscope.harness.agent.transcript.TranscriptStore
withRuntimeContext
-
Constructor Details
-
FilesystemTranscriptStore
-
-
Method Details
-
appendSegment
public String appendSegment(TranscriptRef ref, long seqStart, long seqEnd, String writerId, byte[] jsonl) Description copied from interface:TranscriptStoreAppends one immutable JSONL segment and returns its storage key.- Specified by:
appendSegmentin interfaceTranscriptStore- Parameters:
ref- transcript identityseqStart- inclusive start sequence (caller-assigned, contiguous preferred)seqEnd- inclusive end sequencewriterId- unique writer / replica id (prevents key collisions)jsonl- UTF-8 JSONL payload (oneSessionEntryper line)- Returns:
- storage key of the written segment
-
listSegments
Description copied from interface:TranscriptStoreLists segments ordered byseqStartascending.- Specified by:
listSegmentsin interfaceTranscriptStore
-
readSegment
Description copied from interface:TranscriptStoreOpens a segment for reading; caller must close the stream.- Specified by:
readSegmentin interfaceTranscriptStore
-
compact
Description copied from interface:TranscriptStoreOptional compaction of small segments into a single object.- Specified by:
compactin interfaceTranscriptStore
-
delete
Description copied from interface:TranscriptStoreDeletes all segments for the transcript.- Specified by:
deletein interfaceTranscriptStore
-