Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,10 @@ jobs:
wait_healthy "Redis" "buzz-redis"
wait_healthy "Typesense" "buzz-typesense"
wait_healthy "MinIO" "buzz-minio"
- name: Create pgschema plan database
run: PGPASSWORD=buzz_dev createdb -h localhost -p 5432 -U buzz pgschema_plan
- name: Apply database schema
run: ./bin/pgschema apply --file schema/schema.sql --auto-approve
run: ./bin/pgschema apply --file schema/schema.sql --auto-approve --plan-host localhost --plan-port 5432 --plan-user buzz --plan-password buzz_dev --plan-db pgschema_plan
env:
PGHOST: localhost
PGPORT: "5432"
Expand Down
10 changes: 10 additions & 0 deletions crates/buzz-acp/src/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,16 @@ async fn create_session_and_apply_model(
});
}

// Emit session config for desktop consumption (config bridge tier 1b).
agent.acp.observe(
"session_config_captured",
serde_json::json!({
"configOptions": resp.raw.get("configOptions").cloned().unwrap_or(serde_json::Value::Null),
"modes": resp.raw.get("modes").cloned().unwrap_or(serde_json::Value::Null),
"models": resp.raw.get("models").cloned().unwrap_or(serde_json::Value::Null),
}),
);

// Apply desired_model if set, matching against the fresh session/new response.
if let Some(ref desired) = agent.desired_model {
match resolve_model_switch_method(&resp.raw, desired) {
Expand Down
1 change: 1 addition & 0 deletions desktop/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default defineConfig({
"**/channel-controls-screenshots.spec.ts",
"**/team-management-screenshots.spec.ts",
"**/active-turn-screenshots.spec.ts",
"**/config-bridge-screenshots.spec.ts",
"**/file-attachment.spec.ts",
"**/video-attachment.spec.ts",
"**/mentions.spec.ts",
Expand Down
4 changes: 2 additions & 2 deletions desktop/scripts/check-file-sizes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const rules = [
// Do not add to this list; split the file instead. Remove each entry as its
// file is broken up. Tracked as a follow-up.
const overrides = new Map([
["src-tauri/src/commands/agents.rs", 1294],
["src-tauri/src/commands/agents.rs", 1350],
["src-tauri/src/managed_agents/nest.rs", 1420],
["src-tauri/src/managed_agents/runtime.rs", 1940],
["src-tauri/src/managed_agents/personas.rs", 1080],
["src-tauri/src/managed_agents/persona_card.rs", 1050],
["src/shared/api/tauri.ts", 1196],
["src/shared/api/tauri.ts", 1250],
["src-tauri/src/nostr_convert.rs", 1126],
["src/shared/api/relayClientSession.ts", 1022],
["src-tauri/src/migration.rs", 1295],
Expand Down
1 change: 1 addition & 0 deletions desktop/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ neteq = { version = "0.8", default-features = false }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9"
toml = "0.8"
nostr = { version = "0.44", features = ["nip44"] }
zeroize = "1"
reqwest = { version = "0.13", features = ["json", "query", "stream"] }
Expand Down
21 changes: 21 additions & 0 deletions desktop/src-tauri/src/app_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use tauri::{AppHandle, Manager};
use tokio::sync::Mutex as AsyncMutex;

use crate::huddle::HuddleState;
use crate::managed_agents::config_bridge::SessionConfigCache;
use crate::managed_agents::ManagedAgentProcess;

pub struct AppState {
Expand All @@ -33,6 +34,9 @@ pub struct AppState {
pub audio_output_device: Mutex<Option<String>>,
/// Port of the localhost media streaming proxy (set during setup).
pub media_proxy_port: AtomicU16,
/// Cached ACP session config from running agents, keyed by agent pubkey.
/// Populated when the harness emits `session_config_captured` observer events.
pub session_config_cache: Mutex<HashMap<String, SessionConfigCache>>,
/// IOKit power assertion state — prevents idle sleep while agents run.
pub prevent_sleep: Arc<Mutex<crate::prevent_sleep::PreventSleepState>>,
/// In-process mesh-llm node started by Buzz Desktop.
Expand Down Expand Up @@ -81,6 +85,7 @@ pub fn build_app_state() -> AppState {
managed_agents_store_lock: Mutex::new(()),
channel_templates_store_lock: Mutex::new(()),
managed_agent_processes: Mutex::new(HashMap::new()),
session_config_cache: Mutex::new(HashMap::new()),
huddle_state: Mutex::new(HuddleState::default()),
app_handle: Mutex::new(None),
audio_output_device: Mutex::new(None),
Expand All @@ -105,6 +110,22 @@ impl AppState {
self.huddle_state.lock().map_err(|e| e.to_string())
}

pub fn get_session_cache(&self, pubkey: &str) -> Option<SessionConfigCache> {
self.session_config_cache.lock().ok()?.get(pubkey).cloned()
}

pub fn put_session_cache(&self, pubkey: &str, cache: SessionConfigCache) {
if let Ok(mut map) = self.session_config_cache.lock() {
map.insert(pubkey.to_string(), cache);
}
}

pub fn clear_session_cache(&self, pubkey: &str) {
if let Ok(mut map) = self.session_config_cache.lock() {
map.remove(pubkey);
}
}

/// Emit the current huddle state to the frontend via Tauri event.
///
/// Acquires both locks (app_handle + huddle_state), clones a snapshot,
Expand Down
Loading