diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 46eaa1de..7f62d34c 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "agmsg", "description": "Cross-agent messaging via SQLite. Send messages between CLI AI agents. No daemon, no network.", - "version": "1.1.9", + "version": "1.1.10", "author": { "name": "fujibee" }, diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f9ef1e6..763ca5c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project are documented here. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.10] - 2026-07-19 + +### Fixed +- Allow launcher-reserved bridge PID (#444) + ## [1.1.9] - 2026-07-19 ### Added @@ -306,6 +311,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Handle empty TaskList explicitly to stop fresh-session loop (#71) - Storage driver pluginization design (epic #51) (#52) +[1.1.10]: https://github.com/fujibee/agmsg/compare/app-v0.3.0...v1.1.10 [1.1.9]: https://github.com/fujibee/agmsg/compare/app-v0.2.0...v1.1.9 [1.1.8]: https://github.com/fujibee/agmsg/compare/app-v0.1.5...v1.1.8 [app-v0.1.5]: https://github.com/fujibee/agmsg/compare/v1.1.7...app-v0.1.5 diff --git a/VERSION b/VERSION index 512a1faa..5ed5faa5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.9 +1.1.10 diff --git a/app/AGMSG_CORE_REF b/app/AGMSG_CORE_REF index be388913..1573078f 100644 --- a/app/AGMSG_CORE_REF +++ b/app/AGMSG_CORE_REF @@ -1 +1 @@ -v1.1.8 +v1.1.9 diff --git a/app/package.json b/app/package.json index 581bdddc..f5d5e48a 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "agmsg-app", "private": true, - "version": "0.2.0", + "version": "0.3.0", "type": "module", "scripts": { "dev": "vite", diff --git a/app/src-tauri/Cargo.lock b/app/src-tauri/Cargo.lock index 22146fbc..f8bf77e4 100644 --- a/app/src-tauri/Cargo.lock +++ b/app/src-tauri/Cargo.lock @@ -10,7 +10,7 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "agmsg-app" -version = "0.2.0" +version = "0.3.0" dependencies = [ "anyhow", "base64 0.22.1", diff --git a/app/src-tauri/Cargo.toml b/app/src-tauri/Cargo.toml index 89ffa210..4c95dcff 100644 --- a/app/src-tauri/Cargo.toml +++ b/app/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "agmsg-app" -version = "0.2.0" +version = "0.3.0" description = "A Tauri App" authors = ["you"] edition = "2021" diff --git a/app/src-tauri/tauri.conf.json b/app/src-tauri/tauri.conf.json index 116f99b7..0649ba7f 100644 --- a/app/src-tauri/tauri.conf.json +++ b/app/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "agmsg", - "version": "0.2.0", + "version": "0.3.0", "identifier": "cc.agmsg.app", "build": { "beforeDevCommand": "pnpm dev", diff --git a/cliff.toml b/cliff.toml index 901f0187..cf3c93eb 100644 --- a/cliff.toml +++ b/cliff.toml @@ -73,6 +73,7 @@ commit_parsers = [ { message = "^Stop ancestor project resolution", group = "Fixed" }, { message = "^Fix Codex monitor multi-identity delivery", group = "Fixed" }, { message = "^Isolate Codex monitor bridges by role", group = "Added" }, + { message = "^Allow launcher-reserved bridge PID", group = "Fixed" }, # Everything else (merges, initial commit, misc) is intentionally dropped. { message = ".*", skip = true }, ] diff --git a/package.json b/package.json index 1277eadf..b267e91d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "agmsg", - "version": "1.1.9", + "version": "1.1.10", "description": "Cross-agent messaging via SQLite for CLI AI agents (Claude Code, Codex, Gemini CLI, GitHub Copilot CLI, Antigravity, OpenCode). The npm package is a thin bootstrapper that fetches and runs the canonical bash installer at https://github.com/fujibee/agmsg.", "bin": { "agmsg": "bin/agmsg.js" diff --git a/scripts/drivers/types/codex/codex-bridge.js b/scripts/drivers/types/codex/codex-bridge.js index ce2a724b..ac210c05 100755 --- a/scripts/drivers/types/codex/codex-bridge.js +++ b/scripts/drivers/types/codex/codex-bridge.js @@ -1302,6 +1302,10 @@ class CodexBridge { ensureSingleInstance() { const existing = readPid(this.pidfile); if (!existing) return; + // The launcher records the spawned PID immediately so status never points + // at a stale predecessor. When that write wins the startup race, this + // process sees its own PID here; it owns the reservation, not a peer bridge. + if (existing === process.pid) return; try { process.kill(existing, 0); die(`bridge already running for ${this.identity.team}/${this.identity.name} (pid ${existing})`); diff --git a/tests/test_codex_bridge.bats b/tests/test_codex_bridge.bats index 4aa9727a..3e432d9b 100644 --- a/tests/test_codex_bridge.bats +++ b/tests/test_codex_bridge.bats @@ -564,6 +564,27 @@ EOF [[ "$output" =~ "bridge already running" ]] } +@test "codex-bridge: accepts its PID when the launcher records it before startup (#442)" { + skip_on_windows "codex bridge identity resolution on Windows (#182)" + mkdir -p "$TEST_SKILL_DIR/run" + local wrapper="$TEST_SKILL_DIR/run-with-preseeded-pid.sh" + cat > "$wrapper" <<'EOF' +#!/usr/bin/env bash +pidfile="$1" +shift +printf '%s\n' "$$" > "$pidfile" +exec "$@" +EOF + chmod +x "$wrapper" + + AGMSG_CODEX_APP_SERVER_CMD="exit 1" run "$wrapper" \ + "$TEST_SKILL_DIR/run/codex-bridge.team.alice.pid" \ + node "$TYPES/codex/codex-bridge.js" --project "$PROJ" --team team --name alice + + [ "$status" -ne 0 ] + [[ ! "$output" =~ "bridge already running" ]] +} + @test "codex-bridge: starts a turn when app-server reports watch-once pending" { run node -e 'const r = require("child_process").spawnSync("/bin/sh", ["-c", "true"]); if (r.error) { console.error(r.error.message); process.exit(1); }' if [ "$status" -ne 0 ]; then