mirror of
https://github.com/samvallad33/vestige.git
synced 2026-07-02 22:01:01 +02:00
feat(mcp): rename session_context → session_start (v2.2 consolidation 2/6)
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) <noreply@anthropic.com>
This commit is contained in:
parent
ba85a06eac
commit
8888634740
1 changed files with 20 additions and 5 deletions
|
|
@ -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"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue