Skip to main content

SessionPaths

Struct SessionPaths 

Source
pub struct SessionPaths { /* private fields */ }
Expand description

Session 目录布局抽象。

布局:sessions/<id>/transcript.jsonl

Implementations§

Source§

impl SessionPaths

Source

pub fn new(session_id: &str) -> Self

Source

pub fn dir(&self) -> &Path

Source

pub fn transcript(&self) -> PathBuf

主数据文件:sessions/<id>/transcript.jsonl

Source

pub fn meta_file(&self) -> PathBuf

元数据文件:sessions/<id>/session.json

Source

pub fn transcripts_dir(&self) -> PathBuf

compact 快照目录:sessions/<id>/.transcripts/

Source

pub fn teammates_file(&self) -> PathBuf

Teammate 状态文件:sessions/<id>/teammates.json

Source

pub fn display(&self) -> PathBuf

Display 消息 JSONL:sessions/<id>/display.jsonl

Source

pub fn teammates_dir(&self) -> PathBuf

Teammate 独立目录根:sessions/<id>/teammates/

Source

pub fn teammate_dir(&self, sanitized_name: &str) -> PathBuf

单个 teammate 的独立子目录:sessions/<id>/teammates/<sanitized_name>/

Source

pub fn teammate_transcript(&self, sanitized_name: &str) -> PathBuf

单个 teammate 的 transcript JSONL 路径:sessions/<id>/teammates/<sanitized_name>/transcript.jsonl

Source

pub fn teammate_todos_file(&self, sanitized_name: &str) -> PathBuf

单个 teammate 的 todo 文件路径:sessions/<id>/teammates/<sanitized_name>/todos.json

Source

pub fn subagents_file(&self) -> PathBuf

SubAgent 状态文件:sessions/<id>/subagents.json

Source

pub fn subagents_dir(&self) -> PathBuf

SubAgent 独立目录根:sessions/<id>/subagents/

Source

pub fn subagent_dir(&self, sub_id: &str) -> PathBuf

单个 subagent 的独立子目录:sessions/<id>/subagents/<sub_id>/

Source

pub fn subagent_transcript(&self, sub_id: &str) -> PathBuf

单个 subagent 的 transcript JSONL 路径:sessions/<id>/subagents/<sub_id>/transcript.jsonl

Source

pub fn subagent_todos_file(&self, sub_id: &str) -> PathBuf

单个 subagent 的 todo 文件路径:sessions/<id>/subagents/<sub_id>/todos.json

Source

pub fn tasks_file(&self) -> PathBuf

Task 状态文件:sessions/<id>/tasks.json

Source

pub fn todos_file(&self) -> PathBuf

Todo 状态文件:sessions/<id>/todos.json

Source

pub fn plan_file(&self) -> PathBuf

Plan 状态文件:sessions/<id>/plan.json

Source

pub fn skills_file(&self) -> PathBuf

InvokedSkills 状态文件:sessions/<id>/skills.json

Source

pub fn hooks_file(&self) -> PathBuf

Session Hook 状态文件:sessions/<id>/hooks.json

Source

pub fn sandbox_file(&self) -> PathBuf

Sandbox 状态文件:sessions/<id>/sandbox.json

Source

pub fn loaded_deferred_file(&self) -> PathBuf

LoadTool 已加载的 deferred 工具:sessions/<id>/loaded_deferred.json

Source

pub fn ops_file(&self) -> PathBuf

操作审计文件:sessions//ops.jsonl

Source

pub fn metrics_file(&self) -> PathBuf

性能指标文件:sessions//metrics.json

Source

pub fn ensure_dir(&self) -> Result<()>

Source

pub fn id(&self) -> &str

返回 session ID(即目录名)

Trait Implementations§

Source§

impl Debug for SessionPaths

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more