From 8888634740fb8571ca038ffe6650687b423e4cd8 Mon Sep 17 00:00:00 2001 From: Sam Valladares Date: Sun, 28 Jun 2026 17:31:07 -0500 Subject: [PATCH] =?UTF-8?q?feat(mcp):=20rename=20`session=5Fcontext`=20?= =?UTF-8?q?=E2=86=92=20`session=5Fstart`=20(v2.2=20consolidation=202/6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tool Consolidation v2.2.0, Layer 1 commit 2/6. Advertised count unchanged at 27 (pure rename). `session_start` is the imperative-outcome name for the one-call session initializer. `session_context` remains a hidden warn!+redirect alias (≥1 minor release, removed v2.3.0), calling the same handler unchanged. Tests: positive assert swapped to session_start + negative assert for the old name. Gates: cargo test --workspace, cargo clippy -D warnings — clean. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/vestige-mcp/src/server.rs | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/crates/vestige-mcp/src/server.rs b/crates/vestige-mcp/src/server.rs index e77b3ef..2fb0d54 100644 --- a/crates/vestige-mcp/src/server.rs +++ b/crates/vestige-mcp/src/server.rs @@ -392,8 +392,8 @@ impl McpServer { // CONTEXT PACKETS (v1.8+) // ================================================================ ToolDescription { - name: "session_context".to_string(), - description: Some("One-call session initialization. Combines search, intentions, status, predictions, and codebase context into a single token-budgeted response. Replaces 5 separate calls at session start.".to_string()), + name: "session_start".to_string(), + description: Some("One-call session initialization. Combines search, intentions, status, predictions, and codebase context into a single token-budgeted response. Call this once at the start of a session instead of 5 separate calls. (Renamed from 'session_context' in v2.2.)".to_string()), input_schema: tools::session_context::schema(), ..Default::default() }, @@ -1017,9 +1017,20 @@ impl McpServer { "restore" => tools::restore::execute(&self.storage, request.arguments).await, // ================================================================ - // CONTEXT PACKETS (v1.8+) + // CONTEXT PACKETS (v1.8+) — `session_start` (renamed v2.2) // ================================================================ + "session_start" => { + tools::session_context::execute( + &self.storage, + &self.cognitive, + &self.output_config, + request.arguments, + ) + .await + } + // DEPRECATED (v2.2): renamed to `session_start`. Hidden alias. "session_context" => { + warn!("Tool 'session_context' is deprecated in v2.2. Use 'session_start'."); tools::session_context::execute( &self.storage, &self.cognitive, @@ -1886,8 +1897,12 @@ mod tests { assert!(tool_names.contains(&"predict")); assert!(tool_names.contains(&"restore")); - // Context packets (v1.8) - assert!(tool_names.contains(&"session_context")); + // Context packets (v1.8) — renamed session_context → session_start (v2.2) + assert!(tool_names.contains(&"session_start")); + assert!( + !tool_names.contains(&"session_context"), + "session_context renamed to 'session_start' in v2.2" + ); // Autonomic tools (v1.9) assert!(tool_names.contains(&"memory_health"));