-
-
Notifications
You must be signed in to change notification settings - Fork 164
feat(daemon): add remote backend JSON-RPC prototype #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Pushed a small follow-up commit to keep the daemon in sync with the current app-server RPC surface (e.g. turn/start, account/rateLimits/read, skills/list with cwd). This should make the upcoming remote-proxy work usable without having to retrofit the server later. |
|
When launching the app in dev |
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6aad947ee5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let mut rx = events.subscribe(); | ||
| let out_tx_events = out_tx.clone(); | ||
| events_task = Some(tokio::spawn(async move { | ||
| while let Ok(event) = rx.recv().await { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle broadcast lag without killing event stream
In handle_client the event-forwarding loop is while let Ok(event) = rx.recv().await, but tokio::sync::broadcast::Receiver::recv returns Err(Lagged(_)) when the receiver falls behind (e.g., a slow client or a burst of terminal output). This code exits the loop on that error, so the client silently stops receiving all future events even though the TCP connection stays open. Consider handling Err(Lagged) by continuing (and optionally notifying the client) or re-subscribing so a temporary backlog doesn’t permanently drop the event stream.
Useful? React with 👍 / 👎.
|
Pushed two small follow-ups addressing the dev run issue + the event stream robustness feedback:
|
42b2f0b to
2818820
Compare
|
CI was failing because upstream main added a codex_home: Option parameter to spawn_workspace_session (GitHub Actions builds the PR merge commit). I rebased this branch on current main (v0.6.8) and updated the daemon to pass the resolved legacy .codexmonitor dir as CODEX_HOME (or None otherwise). CI should now be green again. |
|
Thanks! |
This PR adds an optional daemon prototype that can host CodexMonitor's backend logic in a separate process.
Motivation:
codex(and repo access) stays on another environment (WSL2, dev box, container, etc.).What’s included:
src-tauri/src/bin/codex_monitor_daemon.rs127.0.0.1:<port>and the daemon requires a shared token unless--insecure-no-authis used.REMOTE_BACKEND_POC.mdWhat’s not included:
Testing:
cargo test(insrc-tauri/)REMOTE_BACKEND_POC.md