update: Session-lifetime/scoped を Pod-lifetime に修正

タスクストア/ファイルトラッカーは compaction を跨いで Pod プロセス寿命まで生きる。
旧 SessionId = Segment の時代の表現を Pod-lifetime に正す。pod_cli の表示も Segment: に。
This commit is contained in:
Keisuke Hirata 2026-05-20 05:06:38 +09:00
parent 22f5d02385
commit 2d23673393
4 changed files with 5 additions and 5 deletions

View File

@ -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?;

View File

@ -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.

View File

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

View File

@ -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: