pub struct SessionPaths { /* private fields */ }Expand description
Session 目录布局抽象。
布局:sessions/<id>/transcript.jsonl。
Implementations§
Source§impl SessionPaths
impl SessionPaths
pub fn new(session_id: &str) -> Self
pub fn dir(&self) -> &Path
Sourcepub fn transcript(&self) -> PathBuf
pub fn transcript(&self) -> PathBuf
主数据文件:sessions/<id>/transcript.jsonl
Sourcepub fn transcripts_dir(&self) -> PathBuf
pub fn transcripts_dir(&self) -> PathBuf
compact 快照目录:sessions/<id>/.transcripts/
Sourcepub fn teammates_file(&self) -> PathBuf
pub fn teammates_file(&self) -> PathBuf
Teammate 状态文件:sessions/<id>/teammates.json
Sourcepub fn teammates_dir(&self) -> PathBuf
pub fn teammates_dir(&self) -> PathBuf
Teammate 独立目录根:sessions/<id>/teammates/
Sourcepub fn teammate_dir(&self, sanitized_name: &str) -> PathBuf
pub fn teammate_dir(&self, sanitized_name: &str) -> PathBuf
单个 teammate 的独立子目录:sessions/<id>/teammates/<sanitized_name>/
Sourcepub fn teammate_transcript(&self, sanitized_name: &str) -> PathBuf
pub fn teammate_transcript(&self, sanitized_name: &str) -> PathBuf
单个 teammate 的 transcript JSONL 路径:sessions/<id>/teammates/<sanitized_name>/transcript.jsonl
Sourcepub fn teammate_todos_file(&self, sanitized_name: &str) -> PathBuf
pub fn teammate_todos_file(&self, sanitized_name: &str) -> PathBuf
单个 teammate 的 todo 文件路径:sessions/<id>/teammates/<sanitized_name>/todos.json
Sourcepub fn subagents_file(&self) -> PathBuf
pub fn subagents_file(&self) -> PathBuf
SubAgent 状态文件:sessions/<id>/subagents.json
Sourcepub fn subagents_dir(&self) -> PathBuf
pub fn subagents_dir(&self) -> PathBuf
SubAgent 独立目录根:sessions/<id>/subagents/
Sourcepub fn subagent_dir(&self, sub_id: &str) -> PathBuf
pub fn subagent_dir(&self, sub_id: &str) -> PathBuf
单个 subagent 的独立子目录:sessions/<id>/subagents/<sub_id>/
Sourcepub fn subagent_transcript(&self, sub_id: &str) -> PathBuf
pub fn subagent_transcript(&self, sub_id: &str) -> PathBuf
单个 subagent 的 transcript JSONL 路径:sessions/<id>/subagents/<sub_id>/transcript.jsonl
Sourcepub fn subagent_todos_file(&self, sub_id: &str) -> PathBuf
pub fn subagent_todos_file(&self, sub_id: &str) -> PathBuf
单个 subagent 的 todo 文件路径:sessions/<id>/subagents/<sub_id>/todos.json
Sourcepub fn tasks_file(&self) -> PathBuf
pub fn tasks_file(&self) -> PathBuf
Task 状态文件:sessions/<id>/tasks.json
Sourcepub fn todos_file(&self) -> PathBuf
pub fn todos_file(&self) -> PathBuf
Todo 状态文件:sessions/<id>/todos.json
Sourcepub fn skills_file(&self) -> PathBuf
pub fn skills_file(&self) -> PathBuf
InvokedSkills 状态文件:sessions/<id>/skills.json
Sourcepub fn hooks_file(&self) -> PathBuf
pub fn hooks_file(&self) -> PathBuf
Session Hook 状态文件:sessions/<id>/hooks.json
Sourcepub fn sandbox_file(&self) -> PathBuf
pub fn sandbox_file(&self) -> PathBuf
Sandbox 状态文件:sessions/<id>/sandbox.json
Sourcepub fn loaded_deferred_file(&self) -> PathBuf
pub fn loaded_deferred_file(&self) -> PathBuf
LoadTool 已加载的 deferred 工具:sessions/<id>/loaded_deferred.json
Sourcepub fn metrics_file(&self) -> PathBuf
pub fn metrics_file(&self) -> PathBuf
性能指标文件:sessions/
pub fn ensure_dir(&self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionPaths
impl RefUnwindSafe for SessionPaths
impl Send for SessionPaths
impl Sync for SessionPaths
impl Unpin for SessionPaths
impl UnsafeUnpin for SessionPaths
impl UnwindSafe for SessionPaths
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.