update: Session-lifetime/scoped を Pod-lifetime に修正
タスクストア/ファイルトラッカーは compaction を跨いで Pod プロセス寿命まで生きる。 旧 SessionId = Segment の時代の表現を Pod-lifetime に正す。pod_cli の表示も Segment: に。
This commit is contained in:
parent
22f5d02385
commit
2d23673393
|
|
@ -54,7 +54,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
let mut pod = Pod::from_manifest_toml(&toml, store).await?;
|
||||
let manifest: &PodManifest = pod.manifest();
|
||||
println!("Pod: {}", manifest.pod.name);
|
||||
println!("Session: {}", pod.segment_id());
|
||||
println!("Segment: {}", pod.segment_id());
|
||||
|
||||
// 4. Run a prompt
|
||||
let result = pod.run_text("What is the capital of France?").await?;
|
||||
|
|
|
|||
|
|
@ -193,12 +193,12 @@ pub struct Pod<C: LlmClient, St: Store> {
|
|||
/// Worker (e.g. the savings estimator used by the prune projection)
|
||||
/// can share the same view via [`Pod::usage_history_handle`].
|
||||
usage_history: Arc<Mutex<Vec<UsageRecord>>>,
|
||||
/// Session-lifetime file-operation tracker from the builtin `tools`
|
||||
/// Pod-lifetime file-operation tracker from the builtin `tools`
|
||||
/// crate. Populated by the Controller when it registers the builtin
|
||||
/// tools so that Pod-owned operations (e.g. compaction) can consult
|
||||
/// the recency of touched files.
|
||||
tracker: Option<tools::Tracker>,
|
||||
/// Session-lifetime task store from the builtin `tools` crate. Shared by
|
||||
/// Pod-lifetime task store from the builtin `tools` crate. Shared by
|
||||
/// TaskCreate / TaskUpdate / TaskList / TaskGet and preserved across
|
||||
/// compaction by keeping the same handle while the Worker history is
|
||||
/// replaced. Restored Pods reconstruct it by replaying Task* tool calls.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//! Session-scoped TaskStore and builtin task tools.
|
||||
//! Pod-lifetime TaskStore and builtin task tools.
|
||||
//!
|
||||
//! The store is Pod/session-lifetime state shared by the four Task* tools. It
|
||||
//! is reconstructed on resume by replaying TaskCreate / TaskUpdate tool-call
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//! Session-scoped tracker for file operations performed by the builtin
|
||||
//! Pod-lifetime tracker for file operations performed by the builtin
|
||||
//! file-manipulation tools.
|
||||
//!
|
||||
//! A `Tracker` serves two orthogonal purposes:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user