AS AgentScopeAPI 手册 / API Reference

FilesystemTranscriptStore

public class FilesystemTranscriptStore implements TranscriptStore
源码Source io/agentscope/harness/agent/transcript/FilesystemTranscriptStore.java:42–181

文件系统 Transcript 存储,负责持久化与读取数据。位于 io.agentscope.harness.agent.transcript 包,实现 TranscriptStore。核心成员包括 appendSegment、listSegments、readSegment、compact、delete、FilesystemTranscriptStore。

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.

构造器摘要Constructor Summary

构造器Constructor说明Description
public FilesystemTranscriptStore(Path root)
初始化 `FilesystemTranscriptStore` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public String appendSegment(TranscriptRef ref, long seqStart, long seqEnd, String writerId, byte[] jsonl)
追加 `appendSegment`。
Performs the append segment operation.
public List<SegmentInfo> listSegments(TranscriptRef ref)
列出 `listSegments`。
Lists the segments.
public InputStream readSegment(String segmentKey)
设置该参数。
Performs the read segment operation.
public void compact(TranscriptRef ref)
设置该参数。
Performs the compact operation.
public void delete(TranscriptRef ref)
删除数据。
Performs the delete operation.

构造器详情Constructor Detail

FilesystemTranscriptStore

public FilesystemTranscriptStore(Path root)

初始化 FilesystemTranscriptStore 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
rootPath根(类型 `Path`)。The root.
源码Source io/agentscope/harness/agent/transcript/FilesystemTranscriptStore.java:50–52

方法详情Method Detail

appendSegment

public String appendSegment(TranscriptRef ref, long seqStart, long seqEnd, String writerId, byte[] jsonl)

追加 appendSegment。

Performs the append segment operation.

参数Parameters
名称Name类型Type说明Description
refTranscriptRef引用(类型 `TranscriptRef`)。The ref.
seqStartlongseq 启动(类型 `long`)。The seq start.
seqEndlongseq 结束(类型 `long`)。The seq end.
writerIdStringwriter 标识(类型 `String`)。The writer id.
jsonlbyte[]jsonl(类型 `byte[]`)。The jsonl.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/transcript/FilesystemTranscriptStore.java:54–68

listSegments

public List<SegmentInfo> listSegments(TranscriptRef ref)

列出 listSegments。

Lists the segments.

参数Parameters
名称Name类型Type说明Description
refTranscriptRef引用(类型 `TranscriptRef`)。The ref.
返回Returns List<SegmentInfo>
返回列出。Returns list.
源码Source io/agentscope/harness/agent/transcript/FilesystemTranscriptStore.java:70–103

readSegment

public InputStream readSegment(String segmentKey)

设置该参数。

Performs the read segment operation.

参数Parameters
名称Name类型Type说明Description
segmentKeyStringsegment 键(类型 `String`)。The segment key.
返回Returns InputStream
返回InputStream。Returns input stream.
源码Source io/agentscope/harness/agent/transcript/FilesystemTranscriptStore.java:105–113

compact

public void compact(TranscriptRef ref)

设置该参数。

Performs the compact operation.

参数Parameters
名称Name类型Type说明Description
refTranscriptRef引用(类型 `TranscriptRef`)。The ref.
源码Source io/agentscope/harness/agent/transcript/FilesystemTranscriptStore.java:115–146

delete

public void delete(TranscriptRef ref)

删除数据。

Performs the delete operation.

参数Parameters
名称Name类型Type说明Description
refTranscriptRef引用(类型 `TranscriptRef`)。The ref.
源码Source io/agentscope/harness/agent/transcript/FilesystemTranscriptStore.java:148–162

继承成员Inherited Members

继承自Methods inherited from TranscriptStore
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.