SessionRecordMeta
이 콘텐츠는 아직 번역되지 않았습니다.
会话存储登记行(元数据半边;内容经 get 另取,list 恒不携内容)
createdAt
Section titled “createdAt”createdAt: string;ISO-8601 创建时间
optional cwd?: string;会话当前工作目录(meta.json cwd):建档写入 createSession 的会话 cwd(server 份
AgentStoredSessionMeta.cwd 同笔),setCwd 切换后经 recordCwdChange 改写为新值;
resume 对账锚。旧记录亦有本键(值为当时进程 cwd)。
cwdHistory?
Section titled “cwdHistory?”optional cwdHistory?: readonly SessionCwdChange[];cwd 中途切换史(meta.json cwdHistory,原文 JSON 扩展键,platformSessionId 同法):
按切换序追加,cwdHistory[0].from 即创建期 cwd。未切换过的会话无本键。
forkedFrom?
Section titled “forkedFrom?”optional forkedFrom?: { checkpointId: string; sessionId: string;};本会话由哪个会话的哪份快照 fork 而来(store.fork 建档时记入
meta.json forkedFrom,kernel SessionMetaSchema 可选位;createFileSessionStore 读出)。
直建 / resume / 五方法回落径 fork 出的会话缺席。列举面据此呈现血缘;SDK 恒不据此改行为。
checkpointId
Section titled “checkpointId”checkpointId: string;sessionId
Section titled “sessionId”sessionId: string;optional meta?: Record<string, unknown>;开发者自留元数据域(SDK 恒不消费其内容)
platformSessionId?
Section titled “platformSessionId?”optional platformSessionId?: string;平台会话 id(ULID 26 位 Crockford):令牌档 createSession per-AgentSession 铸造并经 twp meta.sessionId 出线,ULID↔内核 UUID 映射 落在此键——平台侧会话行(归因/续租/亲和)与本地记录互认的桥。 resume 径沿用此键——缓存键/粘性/归因跨 resume 延续;旧记录无键时 resume 铸新并补录。
sessionId
Section titled “sessionId”sessionId: string;逻辑会话 id(= AgentSession.sessionId;缺省 UUID 形制,可显式供给)
title?
Section titled “title?”optional title?: string;会话标题(缺省 = 首条用户输入截断;可显式供给)
updatedAt
Section titled “updatedAt”updatedAt: string;ISO-8601 最近提交时间(list 排序锚)
이 페이지가 도움이 되었나요?
피드백 감사합니다. 이 문서를 계속 개선하겠습니다.