mirror of
https://github.com/block/buzz.git
synced 2026-11-13 12:51:34 +00:00
Implements B8 (owner user-scope MCP server inheritance) per the frozen contract and Thufir's two hard invariants: 1. Lifecycle serialization: merge executes inside apply_claude_spawn_policy, which is called from spawn_agent_child while managed_agent_runtime_transition mutex is held. Every Buzz path that can spawn an agent (start_pair, restart, restore sweep) holds this mutex; stop acquires it and calls terminate_process + child.wait() before releasing — no live Claude process writes to the agent root when B8 runs. 2. Collision invariant: proactive case-insensitive filter at merge time. Inherited entries whose name matches the ACP server name are omitted + warned before write. Buzz wins by construction; no reliance on SDK object-merge order. Three distinct failure-state warnings (Thufir normative): - Owner unreadable: prior inherited set preserved (warn + return early) - Invalid agent file: state replaced (warn, proceed with empty base) - Write failure: servers may be stale (warn + continue; spawn never blocked) Per-entry provenance: ExtensionEntry gains an optional source field. Entries read from an isolated agent root (agent_mcp_path) are tagged source=owner_user_scope and rendered as inherited from owner user scope in McpServersSection. Panel re-anchor (#3493): read_config_surface accepts agent_mcp_path; for isolated local claude agents the panel reads MCP from the agent-root .claude.json. B8 tests (10 new in claude_config/tests.rs): merge writes servers, preserves non-mcpServers keys, owner-read-failure preserves prior set, empty owner clears inherited set, invalid agent replaced, collision filter (exact + case variant), empty ACP name disables filter, missing owner writes empty set, concurrent writes produce valid JSON, path location contract. Ratchet fixes: agent_discovery.rs, runtime.rs, AgentDefinitionDialog.tsx, AgentInstanceEditDialog.tsx, types.ts — all five ratchet checks pass. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Buzz
Desktop chat shell with:
- Tauri + React + TypeScript + Vite
- Tailwind CSS
- shadcn/ui-ready shared components
- Biome (lint/format/check)
- Feature-driven frontend structure
Scripts
pnpm dev- run the web frontendpnpm tauri dev- run the desktop apppnpm build- typecheck and build frontendpnpm typecheck- TypeScript checkspnpm lint- Biome lintpnpm format- Biome format (write)pnpm check- Biome check
Structure
src/shared- reusable app-wide code (ui,lib,styles)src/features- feature modules (vertical slices)src/app- top-level app composition