From ac1d8b1c7d4dc636f453565ca9c011eb9e5caaae Mon Sep 17 00:00:00 2001 From: Hare Date: Wed, 20 May 2026 05:06:38 +0900 Subject: [PATCH] =?UTF-8?q?update:=20Session-lifetime/scoped=20=E3=82=92?= =?UTF-8?q?=20Pod-lifetime=20=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit タスクストア/ファイルトラッカーは compaction を跨いで Pod プロセス寿命まで生きる。 旧 SessionId = Segment の時代の表現を Pod-lifetime に正す。pod_cli の表示も Segment: に。 --- crates/pod/examples/pod_cli.rs | 2 +- crates/pod/src/pod.rs | 4 ++-- crates/tools/src/task.rs | 2 +- crates/tools/src/tracker.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/pod/examples/pod_cli.rs b/crates/pod/examples/pod_cli.rs index cc94e66f..b3d6b07b 100644 --- a/crates/pod/examples/pod_cli.rs +++ b/crates/pod/examples/pod_cli.rs @@ -54,7 +54,7 @@ async fn main() -> Result<(), Box> { 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?; diff --git a/crates/pod/src/pod.rs b/crates/pod/src/pod.rs index aa63f3f2..5dc30025 100644 --- a/crates/pod/src/pod.rs +++ b/crates/pod/src/pod.rs @@ -193,12 +193,12 @@ pub struct Pod { /// Worker (e.g. the savings estimator used by the prune projection) /// can share the same view via [`Pod::usage_history_handle`]. usage_history: Arc>>, - /// 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, - /// 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. diff --git a/crates/tools/src/task.rs b/crates/tools/src/task.rs index 2eed7dd0..32ddd461 100644 --- a/crates/tools/src/task.rs +++ b/crates/tools/src/task.rs @@ -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 diff --git a/crates/tools/src/tracker.rs b/crates/tools/src/tracker.rs index 2d4b6973..a299a84e 100644 --- a/crates/tools/src/tracker.rs +++ b/crates/tools/src/tracker.rs @@ -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: