mirror of
https://github.com/block/buzz.git
synced 2026-10-31 06:21:34 +00:00
fix(desktop): repair MCP team rebase integration
The team snapshot refactor introduced constructors after the MCP layer, and the team argument was added to spawn hashes. Keep local MCP configuration absent from imported shared snapshots while preserving regression coverage. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This commit is contained in:
parent
b2bc6ea762
commit
a2ccaa67a3
@@ -573,6 +573,9 @@ pub async fn confirm_team_snapshot_import(
|
||||
provider: member.definition.provider.clone(),
|
||||
persona_source_version: None,
|
||||
env_vars: std::collections::BTreeMap::new(),
|
||||
// MCP configuration is local-only, never part of a shared team snapshot.
|
||||
// Imported instances therefore inherit no local override.
|
||||
mcp_servers: Vec::new(),
|
||||
start_on_app_launch: false,
|
||||
auto_restart_on_config_change: true,
|
||||
runtime_pid: None,
|
||||
|
||||
@@ -150,6 +150,7 @@ fn team_export_with_instance_and_memory_level_uses_supplied_entries() {
|
||||
source_team: None,
|
||||
source_team_persona_slug: None,
|
||||
env_vars: Default::default(),
|
||||
mcp_servers: vec![],
|
||||
respond_to: None,
|
||||
respond_to_allowlist: vec![],
|
||||
parallelism: None,
|
||||
@@ -196,6 +197,7 @@ fn team_export_with_instance_and_memory_level_uses_supplied_entries() {
|
||||
provider: None,
|
||||
persona_source_version: None,
|
||||
env_vars: Default::default(),
|
||||
mcp_servers: vec![],
|
||||
start_on_app_launch: false,
|
||||
auto_restart_on_config_change: true,
|
||||
runtime_pid: None,
|
||||
@@ -317,6 +319,7 @@ fn team_import_definitions_are_built_for_all_members() {
|
||||
definition.id.len() == 36
|
||||
&& definition.source_team.is_none()
|
||||
&& definition.env_vars.is_empty()
|
||||
&& definition.mcp_servers.is_empty()
|
||||
&& definition.respond_to_allowlist.is_empty()
|
||||
}));
|
||||
assert_eq!(definitions[0].system_prompt, "Alice prompt");
|
||||
|
||||
@@ -152,12 +152,14 @@ fn buzz_agent_mcp_edit_changes_hash_but_other_runtime_ignores_it() {
|
||||
spawn_config_hash(
|
||||
&buzz_agent,
|
||||
&[],
|
||||
&[],
|
||||
"wss://ws.example",
|
||||
&GlobalAgentConfig::default()
|
||||
),
|
||||
spawn_config_hash(
|
||||
&edited,
|
||||
&[],
|
||||
&[],
|
||||
"wss://ws.example",
|
||||
&GlobalAgentConfig::default()
|
||||
)
|
||||
@@ -171,12 +173,14 @@ fn buzz_agent_mcp_edit_changes_hash_but_other_runtime_ignores_it() {
|
||||
spawn_config_hash(
|
||||
&goose,
|
||||
&[],
|
||||
&[],
|
||||
"wss://ws.example",
|
||||
&GlobalAgentConfig::default()
|
||||
),
|
||||
spawn_config_hash(
|
||||
&goose_edited,
|
||||
&[],
|
||||
&[],
|
||||
"wss://ws.example",
|
||||
&GlobalAgentConfig::default()
|
||||
)
|
||||
@@ -196,12 +200,14 @@ fn definition_mcp_edit_changes_buzz_agent_hash_without_becoming_agent_override()
|
||||
spawn_config_hash(
|
||||
&record,
|
||||
&[persona],
|
||||
&[],
|
||||
"wss://ws.example",
|
||||
&GlobalAgentConfig::default()
|
||||
),
|
||||
spawn_config_hash(
|
||||
&record,
|
||||
&[edited_persona],
|
||||
&[],
|
||||
"wss://ws.example",
|
||||
&GlobalAgentConfig::default()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user