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
68 changes: 68 additions & 0 deletions 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 src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ libc = "0.2"
chrono = { version = "0.4", features = ["clock"] }
shell-words = "1.1"
toml_edit = "0.20.2"
rusqlite = { version = "0.32", features = ["bundled"] }

[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-updater = "2.10.0"
Expand Down
10 changes: 10 additions & 0 deletions src-tauri/resources/symphony/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version": "0.1.0-codexmonitor",
"binaries": {
"darwin-aarch64": "codex_monitor_symphony",
"darwin-x86_64": "codex_monitor_symphony",
"linux-x86_64": "codex_monitor_symphony",
"windows-x86_64": "codex_monitor_symphony.exe"
},
"notes": "Place pinned CodexMonitor Symphony release binaries in this directory for bundle builds."
}
3 changes: 3 additions & 0 deletions src-tauri/src/backend/events.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use serde::Serialize;
use serde_json::Value;

use crate::types::WorkspaceSymphonyEvent;

#[derive(Serialize, Clone)]
pub(crate) struct AppServerEvent {
pub(crate) workspace_id: String,
Expand Down Expand Up @@ -28,4 +30,5 @@ pub(crate) trait EventSink: Clone + Send + Sync + 'static {
fn emit_app_server_event(&self, event: AppServerEvent);
fn emit_terminal_output(&self, event: TerminalOutput);
fn emit_terminal_exit(&self, event: TerminalExit);
fn emit_workspace_symphony_event(&self, event: WorkspaceSymphonyEvent);
}
16 changes: 12 additions & 4 deletions src-tauri/src/bin/codex_monitor_daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ mod rules;
mod shared;
#[path = "../storage.rs"]
mod storage;
#[path = "../symphony_binary.rs"]
mod symphony_binary;
#[path = "codex_monitor_daemon/transport.rs"]
mod transport;
#[allow(dead_code)]
Expand Down Expand Up @@ -82,13 +84,13 @@ use shared::process_core::kill_child_process_tree;
use shared::prompts_core::{self, CustomPromptEntry};
use shared::{
agents_config_core, codex_aux_core, codex_core, files_core, git_core, git_ui_core,
local_usage_core, settings_core, workspaces_core, worktree_core,
local_usage_core, settings_core, symphony_core, workspaces_core, worktree_core,
};
use storage::{read_settings, read_workspaces};
use types::{
AppSettings, GitCommitDiff, GitFileDiff, GitHubIssuesResponse, GitHubPullRequestComment,
GitHubPullRequestDiff, GitHubPullRequestsResponse, GitLogResponse, LocalUsageSnapshot,
WorkspaceEntry, WorkspaceInfo, WorkspaceSettings, WorktreeSetupStatus,
WorkspaceEntry, WorkspaceInfo, WorkspaceSettings, WorkspaceSymphonyEvent, WorktreeSetupStatus,
};
use workspace_settings::apply_workspace_settings_update;

Expand Down Expand Up @@ -122,6 +124,7 @@ struct DaemonEventSink {
#[derive(Clone)]
enum DaemonEvent {
AppServer(AppServerEvent),
WorkspaceSymphony(WorkspaceSymphonyEvent),
#[allow(dead_code)]
TerminalOutput(TerminalOutput),
#[allow(dead_code)]
Expand All @@ -140,6 +143,10 @@ impl EventSink for DaemonEventSink {
fn emit_terminal_exit(&self, event: TerminalExit) {
let _ = self.tx.send(DaemonEvent::TerminalExit(event));
}

fn emit_workspace_symphony_event(&self, event: WorkspaceSymphonyEvent) {
let _ = self.tx.send(DaemonEvent::WorkspaceSymphony(event));
}
}

struct DaemonConfig {
Expand All @@ -158,6 +165,7 @@ struct DaemonState {
event_sink: DaemonEventSink,
codex_login_cancels: Mutex<HashMap<String, CodexLoginCancelState>>,
daemon_binary_path: Option<String>,
symphony_runtimes: Arc<symphony_core::SymphonyRuntimeRegistry>,
}

#[derive(Serialize, Deserialize)]
Expand Down Expand Up @@ -185,6 +193,7 @@ impl DaemonState {
event_sink,
codex_login_cancels: Mutex::new(HashMap::new()),
daemon_binary_path,
symphony_runtimes: Arc::new(Mutex::new(HashMap::new())),
}
}

Expand Down Expand Up @@ -757,8 +766,7 @@ impl DaemonState {
limit: Option<u32>,
sort_key: Option<String>,
) -> Result<Value, String> {
codex_core::list_threads_core(&self.sessions, workspace_id, cursor, limit, sort_key)
.await
codex_core::list_threads_core(&self.sessions, workspace_id, cursor, limit, sort_key).await
}

async fn list_mcp_server_status(
Expand Down
9 changes: 5 additions & 4 deletions src-tauri/src/bin/codex_monitor_daemon/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ fn build_event_notification(event: DaemonEvent) -> Option<String> {
"method": "app-server-event",
"params": payload,
}),
DaemonEvent::WorkspaceSymphony(payload) => json!({
"method": "workspace-symphony-event",
"params": payload,
}),
DaemonEvent::TerminalOutput(payload) => json!({
"method": "terminal-output",
"params": payload,
Expand Down Expand Up @@ -85,10 +89,7 @@ pub(super) fn parse_optional_string(value: &Value, key: &str) -> Option<String>
}
}

pub(super) fn parse_optional_nullable_string(
value: &Value,
key: &str,
) -> Option<Option<String>> {
pub(super) fn parse_optional_nullable_string(value: &Value, key: &str) -> Option<Option<String>> {
match value {
Value::Object(map) => match map.get(key) {
Some(Value::Null) => Some(None),
Expand Down
Loading
Loading