Skip to content
Open
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
2 changes: 1 addition & 1 deletion .codex/environments/environment.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY
version = 1
name = "CodexMonitor"
name = "OpenCodeMonitor"

[setup]
script = "npm install"
Expand Down
12 changes: 6 additions & 6 deletions .codex/skills/app-server-events-sync/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
name: app-server-events-sync
description: Maintain CodexMonitor and Codex app-server protocol parity. Use when asked to audit supported or missing app-server notifications/requests, trace event routing, diagnose schema drift in app-server payloads, or update docs/app-server-events.md after upstream Codex changes.
description: Maintain OpenCodeMonitor and OpenCode app-server protocol parity. Use when asked to audit supported or missing app-server notifications/requests, trace event routing, diagnose schema drift in app-server payloads, or update docs/app-server-events.md after upstream OpenCode changes.
---

# App-Server Events Sync

Use this skill to keep CodexMonitor app-server integration accurate as `../Codex` evolves.
Use this skill to keep OpenCodeMonitor app-server integration accurate as `../OpenCode` evolves.

## Canonical Source

Expand All @@ -20,11 +20,11 @@ Treat that file as the canonical runbook and update it when behavior changes.
- Read Codex hash from `../Codex` and update the hash in `docs/app-server-events.md` title.

2. Compare notification methods:
- Diff Codex v2 notification method set against CodexMonitor routing in `src/utils/appServerEvents.ts` and `src/features/app/hooks/useAppServerEvents.ts`.
- Diff OpenCode v2 notification method set against OpenCodeMonitor routing in `src/utils/appServerEvents.ts` and `src/features/app/hooks/useAppServerEvents.ts`.
- Update `Supported Events` and `Missing Events` sections in `docs/app-server-events.md`.

3. Compare request methods:
- Diff Codex v2 client/server request sets against CodexMonitor outgoing and inbound handling.
- Diff OpenCode v2 client/server request sets against OpenCodeMonitor outgoing and inbound handling.
- Update `Supported Requests`, `Missing Client Requests`, and `Server Requests` sections.

4. Investigate schema drift when lists look unchanged:
Expand All @@ -51,8 +51,8 @@ Treat that file as the canonical runbook and update it when behavior changes.
- Item/turn handlers: `src/features/threads/hooks/useThreadItemEvents.ts`, `src/features/threads/hooks/useThreadTurnEvents.ts`
- Normalization: `src/features/threads/utils/threadNormalize.ts`
- State: `src/features/threads/hooks/useThreadsReducer.ts`
- Outgoing requests: `src/services/tauri.ts`, `src-tauri/src/shared/codex_core.rs`
- Daemon RPC: `src-tauri/src/bin/codex_monitor_daemon/rpc.rs` and `rpc/*`
- Outgoing requests: `src/services/tauri.ts`, `src-tauri/src/shared/opencode_core.rs`
- Daemon RPC: `src-tauri/src/bin/opencode_monitor_daemon/rpc.rs` and `rpc/*`

## References

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ rg -n "SUPPORTED_APP_SERVER_METHODS" src/utils/appServerEvents.ts
```bash
awk '/client_request_definitions! \{/,/\/\/\/ DEPRECATED APIs below/' ../Codex/codex-rs/app-server-protocol/src/protocol/common.rs | rg -N -o '=>\s*"[^"]+"\s*\{' | sed -E 's/.*"([^"]+)".*/\1/' | sort -u
awk '/server_request_definitions! \{/,/\/\/\/ DEPRECATED APIs below/' ../Codex/codex-rs/app-server-protocol/src/protocol/common.rs | rg -N -o '=>\s*"[^"]+"\s*\{' | sed -E 's/.*"([^"]+)".*/\1/' | sort -u
perl -0777 -ne 'while(/send_request_for_workspace\(\s*&[^,]+\s*,\s*"([^"]+)"/g){print "$1\n"}' src-tauri/src/shared/codex_core.rs | sort -u
perl -0777 -ne 'while(/send_request_for_workspace\(\s*&[^,]+\s*,\s*"([^"]+)"/g){print "$1\n"}' src-tauri/src/shared/opencode_core.rs | sort -u
```

## Schema Drift
Expand Down
106 changes: 42 additions & 64 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,37 +64,25 @@ jobs:
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "" "$KEYCHAIN"

- name: Configure notarytool credentials
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore notary credential setup

In the build_macos workflow, this step was reduced to a name-only no-op, but the later notarization step still runs xcrun notarytool submit ... --keychain-profile "$NOTARY_PROFILE_NAME". On a clean GitHub runner that profile is only created by the removed notarytool store-credentials command, so macOS releases will fail at notarization before any artifacts are uploaded.

Useful? React with 👍 / 👎.

env:
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER_ID: ${{ secrets.APPLE_API_ISSUER_ID }}
APPLE_API_PRIVATE_KEY_B64: ${{ secrets.APPLE_API_PRIVATE_KEY_B64 }}
run: |
set -euo pipefail
mkdir -p private_keys
echo "$APPLE_API_PRIVATE_KEY_B64" | base64 --decode > private_keys/AuthKey.p8
xcrun notarytool store-credentials "$NOTARY_PROFILE_NAME" \
--key-id "$APPLE_API_KEY_ID" \
--issuer "$APPLE_API_ISSUER_ID" \
--key "private_keys/AuthKey.p8"

- name: Write Tauri signing key
run: |
set -euo pipefail
mkdir -p "$HOME/.tauri"
echo "$TAURI_SIGNING_PRIVATE_KEY_B64" | base64 --decode > "$HOME/.tauri/codexmonitor.key"
echo "$TAURI_SIGNING_PRIVATE_KEY_B64" | base64 --decode > "$HOME/.tauri/opencode-monitor.key"

- name: Build app bundle
run: |
set -euo pipefail
export TAURI_SIGNING_PRIVATE_KEY
TAURI_SIGNING_PRIVATE_KEY="$(cat "$HOME/.tauri/codexmonitor.key")"
TAURI_SIGNING_PRIVATE_KEY="$(cat "$HOME/.tauri/opencode-monitor.key")"
npm run tauri -- build --bundles app

- name: Build daemon binaries
run: |
set -euo pipefail
cd src-tauri
cargo build --release --bin codex_monitor_daemon --bin codex_monitor_daemonctl
cargo build --release --bin opencode_monitor_daemon --bin opencode_monitor_daemonctl

- name: Bundle OpenSSL and re-sign
run: |
Expand All @@ -106,15 +94,15 @@ jobs:
run: |
set -euo pipefail
ditto -c -k --keepParent \
"src-tauri/target/release/bundle/macos/Codex Monitor.app" \
CodexMonitor.zip
"src-tauri/target/release/bundle/macos/OpenCode Monitor.app" \
OpenCodeMonitor.zip

xcrun notarytool submit CodexMonitor.zip \
xcrun notarytool submit OpenCodeMonitor.zip \
--keychain-profile "$NOTARY_PROFILE_NAME" \
--wait

xcrun stapler staple \
"src-tauri/target/release/bundle/macos/Codex Monitor.app"
"src-tauri/target/release/bundle/macos/OpenCode Monitor.app"

- name: Package artifacts
run: |
Expand All @@ -129,42 +117,42 @@ jobs:
)

mkdir -p release-artifacts release-artifacts/dmg-root
rm -rf "release-artifacts/dmg-root/Codex Monitor.app"
ditto "src-tauri/target/release/bundle/macos/Codex Monitor.app" \
"release-artifacts/dmg-root/Codex Monitor.app"
rm -rf "release-artifacts/dmg-root/OpenCode Monitor.app"
ditto "src-tauri/target/release/bundle/macos/OpenCode Monitor.app" \
"release-artifacts/dmg-root/OpenCode Monitor.app"

ditto -c -k --keepParent \
"src-tauri/target/release/bundle/macos/Codex Monitor.app" \
release-artifacts/CodexMonitor.zip
"src-tauri/target/release/bundle/macos/OpenCode Monitor.app" \
release-artifacts/OpenCodeMonitor.zip

hdiutil create -volname "Codex Monitor" \
hdiutil create -volname "OpenCode Monitor" \
-srcfolder release-artifacts/dmg-root \
-ov -format UDZO \
release-artifacts/CodexMonitor_${VERSION}_aarch64.dmg
release-artifacts/OpenCodeMonitor_${VERSION}_aarch64.dmg

COPYFILE_DISABLE=1 tar -czf \
"src-tauri/target/release/bundle/macos/Codex Monitor.app.tar.gz" \
-C src-tauri/target/release/bundle/macos "Codex Monitor.app"
"src-tauri/target/release/bundle/macos/OpenCode Monitor.app.tar.gz" \
-C src-tauri/target/release/bundle/macos "OpenCode Monitor.app"

npm run tauri signer sign -- \
-f "$HOME/.tauri/codexmonitor.key" \
-f "$HOME/.tauri/opencode-monitor.key" \
-p "$TAURI_SIGNING_PRIVATE_KEY_PASSWORD" \
"src-tauri/target/release/bundle/macos/Codex Monitor.app.tar.gz"
"src-tauri/target/release/bundle/macos/OpenCode Monitor.app.tar.gz"

cp "src-tauri/target/release/bundle/macos/Codex Monitor.app.tar.gz" \
release-artifacts/CodexMonitor.app.tar.gz
cp "src-tauri/target/release/bundle/macos/Codex Monitor.app.tar.gz.sig" \
release-artifacts/CodexMonitor.app.tar.gz.sig
cp "src-tauri/target/release/bundle/macos/OpenCode Monitor.app.tar.gz" \
release-artifacts/OpenCodeMonitor.app.tar.gz
cp "src-tauri/target/release/bundle/macos/OpenCode Monitor.app.tar.gz.sig" \
release-artifacts/OpenCodeMonitor.app.tar.gz.sig

- name: Upload macOS artifacts
uses: actions/upload-artifact@v4
with:
name: macos-artifacts
path: |
release-artifacts/CodexMonitor.zip
release-artifacts/CodexMonitor_*_aarch64.dmg
release-artifacts/CodexMonitor.app.tar.gz
release-artifacts/CodexMonitor.app.tar.gz.sig
release-artifacts/OpenCodeMonitor.zip
release-artifacts/OpenCodeMonitor_*_aarch64.dmg
release-artifacts/OpenCodeMonitor.app.tar.gz
release-artifacts/OpenCodeMonitor.app.tar.gz.sig

build_linux:
name: linux bundles (${{ matrix.arch }})
Expand Down Expand Up @@ -210,13 +198,13 @@ jobs:
run: |
set -euo pipefail
mkdir -p "$HOME/.tauri"
echo "$TAURI_SIGNING_PRIVATE_KEY_B64" | base64 --decode > "$HOME/.tauri/codexmonitor.key"
echo "$TAURI_SIGNING_PRIVATE_KEY_B64" | base64 --decode > "$HOME/.tauri/opencode-monitor.key"

- name: build AppImage and RPM
run: |
set -euo pipefail
export TAURI_SIGNING_PRIVATE_KEY
TAURI_SIGNING_PRIVATE_KEY="$(cat "$HOME/.tauri/codexmonitor.key")"
TAURI_SIGNING_PRIVATE_KEY="$(cat "$HOME/.tauri/opencode-monitor.key")"
npm run tauri -- build --bundles appimage,rpm

- name: Validate Linux bundle outputs
Expand Down Expand Up @@ -288,15 +276,15 @@ jobs:
home = Path.home()
target = home / ".tauri"
target.mkdir(parents=True, exist_ok=True)
(target / "codexmonitor.key").write_bytes(raw)
(target / "opencode-monitor.key").write_bytes(raw)
PY

- name: build windows bundles
shell: bash
run: |
set -euo pipefail
export TAURI_SIGNING_PRIVATE_KEY
TAURI_SIGNING_PRIVATE_KEY="$(cat "$HOME/.tauri/codexmonitor.key")"
TAURI_SIGNING_PRIVATE_KEY="$(cat "$HOME/.tauri/opencode-monitor.key")"
npm run tauri:build:win

- name: Upload Windows artifacts
Expand Down Expand Up @@ -386,7 +374,7 @@ jobs:
PY
)

SIGNATURE=$(cat release-artifacts/CodexMonitor.app.tar.gz.sig)
SIGNATURE=$(cat release-artifacts/OpenCodeMonitor.app.tar.gz.sig)
LAST_TAG=$(git tag --sort=-version:refname \
| grep -v "^v${VERSION}$" \
| head -n 1 || true)
Expand Down Expand Up @@ -444,11 +432,11 @@ jobs:
artifacts_dir = Path("release-artifacts")

def release_url(filename):
return f"https://github.com/Dimillian/CodexMonitor/releases/download/v${VERSION}/{quote(filename)}"
return f"https://github.com/Dimillian/OpenCodeMonitor/releases/download/v${VERSION}/{quote(filename)}"

platforms = {
"darwin-aarch64": {
"url": release_url("CodexMonitor.app.tar.gz"),
"url": release_url("OpenCodeMonitor.app.tar.gz"),
"signature": "${SIGNATURE}",
}
}
Expand Down Expand Up @@ -484,7 +472,7 @@ jobs:
preferred_installers = []
for candidate in exe_candidates:
lowered = candidate.name.lower()
if "codexmonitor" in lowered and ("setup" in lowered or "installer" in lowered):
if "opencode-monitor" in lowered and ("setup" in lowered or "installer" in lowered):
preferred_installers.append(candidate)
if preferred_installers:
windows_installer = preferred_installers[0]
Expand Down Expand Up @@ -588,10 +576,10 @@ jobs:
--title "v${VERSION}" \
--notes-file release-artifacts/release-notes.md \
--target "$GITHUB_SHA" \
release-artifacts/CodexMonitor.zip \
release-artifacts/CodexMonitor_*_aarch64.dmg \
release-artifacts/CodexMonitor.app.tar.gz \
release-artifacts/CodexMonitor.app.tar.gz.sig \
release-artifacts/OpenCodeMonitor.zip \
release-artifacts/OpenCodeMonitor_*_aarch64.dmg \
release-artifacts/OpenCodeMonitor.app.tar.gz \
release-artifacts/OpenCodeMonitor.app.tar.gz.sig \
"${appimages[@]}" \
"${rpms[@]}" \
"${windows_exes[@]}" \
Expand Down Expand Up @@ -664,33 +652,23 @@ jobs:
path = Path("src-tauri/Cargo.lock")
content = path.read_text()
content, count = re.subn(
r'(?ms)(\[\[package\]\]\nname = "codex-monitor"\nversion = ")[^"]+(")',
r'(?ms)(\[\[package\]\]\nname = "opencode-monitor"\nversion = ")[^"]+(")',
r'\g<1>$NEXT_VERSION\2',
content,
count=1,
)
if count != 1:
raise SystemExit("Failed to update codex-monitor version in src-tauri/Cargo.lock")
raise SystemExit("Failed to update opencode-monitor version in src-tauri/Cargo.lock")
path.write_text(content)
PY

python3 - <<PY
import plistlib
from pathlib import Path

path = Path("src-tauri/gen/apple/codex-monitor_iOS/Info.plist")
with path.open("rb") as f:
data = plistlib.load(f)

data["CFBundleShortVersionString"] = "$NEXT_VERSION"
data["CFBundleVersion"] = "$NEXT_VERSION"

with path.open("wb") as f:
plistlib.dump(data, f, sort_keys=False)
PY
path = Path("src-tauri/gen/apple/opencode-monitor_iOS/Info.plist")

git checkout -b "chore/bump-version-${NEXT_VERSION}"
git add package.json package-lock.json src-tauri/Cargo.toml src-tauri/Cargo.lock src-tauri/tauri.conf.json src-tauri/gen/apple/codex-monitor_iOS/Info.plist
git add package.json package-lock.json src-tauri/Cargo.toml src-tauri/Cargo.lock src-tauri/tauri.conf.json src-tauri/gen/apple/opencode-monitor_iOS/Info.plist
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Close the Python heredoc before running git commands

In the Bump version and open PR step, the python3 - <<PY block above this line is never terminated before the shell commands resume, so git add ... is fed to Python and the workflow fails with a syntax error instead of creating the version-bump PR.

Useful? React with 👍 / 👎.

git commit -m "chore: bump version to ${NEXT_VERSION}"
git push origin "chore/bump-version-${NEXT_VERSION}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recreate the bump branch before pushing it

This push names chore/bump-version-${NEXT_VERSION} as the source ref, but the commit was made on the checkout branch because the preceding git checkout -b ... was removed. After the heredoc issue is fixed, this still fails with a missing local ref instead of pushing the bump branch for the PR.

Useful? React with 👍 / 👎.


Expand Down
16 changes: 8 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CodexMonitor Agent Guide
# OpenCodeMonitor Agent Guide

All docs must be canonical, with no past commentary, only live state.

Expand All @@ -8,16 +8,16 @@ This file is the agent contract for how to work in this repo.
Detailed navigation/runbooks live in:

- `docs/codebase-map.md` (task-oriented file map: "if you need X, edit Y")
- `docs/multi-agent-sync-runbook.md` (upstream `../Codex` sync checklist for multi-agent/config behavior)
- `docs/multi-agent-sync-runbook.md` (upstream `../OpenCode` sync checklist for multi-agent/config behavior)
- `README.md` (setup, build, release, and broader project docs)

## Project Snapshot

CodexMonitor is a Tauri app that orchestrates Codex agents across local workspaces.
OpenCodeMonitor is a Tauri app that orchestrates OpenCode agents across local workspaces.

- Frontend: React + Vite (`src/`)
- Backend app: Tauri Rust process (`src-tauri/src/lib.rs`)
- Backend daemon: JSON-RPC process (`src-tauri/src/bin/codex_monitor_daemon.rs`)
- Backend daemon: JSON-RPC process (`src-tauri/src/bin/opencode_monitor_daemon.rs`)
- Shared backend source of truth: `src-tauri/src/shared/*`

## Non-Negotiable Architecture Rules
Expand All @@ -35,7 +35,7 @@ For backend behavior changes, follow this order:
1. Shared core (`src-tauri/src/shared/*`) when behavior is cross-runtime.
2. App adapter and Tauri command surface (`src-tauri/src/lib.rs` + adapter module).
3. Frontend IPC wrapper (`src/services/tauri.ts`).
4. Daemon RPC surface (`src-tauri/src/bin/codex_monitor_daemon/rpc.rs` + `rpc/*`).
4. Daemon RPC surface (`src-tauri/src/bin/opencode_monitor_daemon/rpc.rs` + `rpc/*`).

If you add a backend command, update all relevant layers and tests.

Expand Down Expand Up @@ -67,8 +67,8 @@ Use project aliases for frontend imports:
- Frontend IPC wrapper: `src/services/tauri.ts`
- Frontend event hub: `src/services/events.ts`
- App command registry: `src-tauri/src/lib.rs`
- Daemon entrypoint: `src-tauri/src/bin/codex_monitor_daemon.rs`
- Daemon RPC router: `src-tauri/src/bin/codex_monitor_daemon/rpc.rs`
- Daemon entrypoint: `src-tauri/src/bin/opencode_monitor_daemon.rs`
- Daemon RPC router: `src-tauri/src/bin/opencode_monitor_daemon/rpc.rs`
- Shared workspaces core: `src-tauri/src/shared/workspaces_core.rs` + `src-tauri/src/shared/workspaces_core/*`
- Shared git UI core: `src-tauri/src/shared/git_ui_core.rs` + `src-tauri/src/shared/git_ui_core/*`
- Threads reducer entrypoint: `src/features/threads/hooks/useThreadsReducer.ts`
Expand Down Expand Up @@ -160,7 +160,7 @@ Use extra care in high-churn/high-complexity files:
- `src/features/threads/hooks/useThreadsReducer.ts`
- `src-tauri/src/shared/git_ui_core.rs`
- `src-tauri/src/shared/workspaces_core.rs`
- `src-tauri/src/bin/codex_monitor_daemon/rpc.rs`
- `src-tauri/src/bin/opencode_monitor_daemon/rpc.rs`

## Canonical References

Expand Down
Loading