@ours.network/codex 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +5 -2
  2. package/install.sh +27 -10
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -81,6 +81,10 @@ as every other ours harness, just in-session:
81
81
  Because Codex does not re-invoke the agent on background output, this reacts while the agent
82
82
  is **live/working** — it is not a background daemon that wakes a dormant agent.
83
83
 
84
+ > Claude Code has the most tested, reliable wake-on-mail monitor; Codex support is newer and
85
+ > may have rough edges — please report anything off:
86
+ > https://github.com/adapt-toolkit/ours-mcp/issues
87
+
84
88
  ## Prerequisites
85
89
 
86
90
  - Node.js ≥ 20
@@ -126,8 +130,7 @@ from either.
126
130
  so it does not inject an unread-mail summary and does not auto-read a workspace identity
127
131
  pin. Codex *does* read `~/.codex/AGENTS.md` + project `AGENTS.md` each session, which is
128
132
  why the pointer lives there. Bind explicitly with `choose_identity`.
129
- - `~/.agents/skills` is also scanned by OpenClaw — installing there is fine; the skills are
130
- harness-agnostic.
133
+ - `~/.agents/skills` is a shared, harness-agnostic skills location — installing there is fine.
131
134
 
132
135
  ## Uninstall
133
136
 
package/install.sh CHANGED
@@ -27,17 +27,28 @@ SKILLS_DIR="${SKILLS_DIR:-$HOME/.agents/skills}"
27
27
 
28
28
  say(){ printf 'ours-install: %s\n' "$1"; }
29
29
 
30
- # --- 1) daemon ---
31
- if [ "${OURS_INSTALL_SKIP_DAEMON:-}" != "1" ]; then
32
- if ! command -v ours-mcp >/dev/null 2>&1; then
33
- say "installing @ours.network/mcp globally (npm i -g)…"
34
- npm i -g @ours.network/mcp
30
+ # Ensure the ours daemon is on @latest (UPGRADE, not install-if-missing): an already-present
31
+ # daemon must still be pulled up to the newest published version. Record the CLI version
32
+ # before/after; start if not running, restart only if the version actually changed.
33
+ ensure_daemon_latest(){
34
+ if [ "${OURS_INSTALL_SKIP_DAEMON:-}" = "1" ]; then say "skipping daemon step (OURS_INSTALL_SKIP_DAEMON=1)"; return 0; fi
35
+ local before after
36
+ before="$(ours-mcp --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)"
37
+ say "ensuring @ours.network/mcp@latest…"
38
+ npm i -g @ours.network/mcp@latest
39
+ after="$(ours-mcp --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)"
40
+ if ! ours-mcp status >/dev/null 2>&1; then
41
+ say "starting the ours daemon…"; ours-mcp start || say "could not auto-start; run 'ours-mcp start' if the tools error."
42
+ elif [ -n "$before" ] && [ "$before" != "$after" ]; then
43
+ say "daemon upgraded (v${before} → v${after}) — restarting…"; ours-mcp restart || ours-mcp start || true
44
+ else
45
+ say "daemon already current (v${after:-unknown})."
35
46
  fi
36
- if ! ours-mcp status >/dev/null 2>&1; then say "starting the ours daemon…"; ours-mcp start || true; fi
37
- say "daemon: $(command -v ours-mcp)"
38
- else
39
- say "skipping daemon step (OURS_INSTALL_SKIP_DAEMON=1)"
40
- fi
47
+ say "daemon: $(command -v ours-mcp) (v${after:-unknown})"
48
+ }
49
+
50
+ # --- 1) daemon (ensure @latest + restart on change) ---
51
+ ensure_daemon_latest
41
52
 
42
53
  # --- 2) skills (USER scope: ~/.agents/skills/<name>/) ---
43
54
  mkdir -p "$SKILLS_DIR"
@@ -55,5 +66,11 @@ CODEX_CONFIG="$CODEX_CONFIG" node "$SELFDIR/bin/codex-config-install.mjs"
55
66
  CODEX_AGENTS="$CODEX_AGENTS" node "$SELFDIR/bin/codex-agents-install.mjs"
56
67
 
57
68
  say "done. The ours MCP server + skill are live for the next Codex session."
69
+ # --- version echo: show the user they are on latest ---
70
+ if [ "${OURS_INSTALL_SKIP_DAEMON:-}" != "1" ]; then
71
+ say "versions:"
72
+ say " daemon: $(ours-mcp --version 2>/dev/null | head -1 || echo 'unknown')"
73
+ say " plugin: $(npm ls -g @ours.network/codex 2>/dev/null | grep -oE '@ours\.network/codex@[0-9][0-9.]*' | head -1 || echo '@ours.network/codex (not a global install)')"
74
+ fi
58
75
  say "next: bind (or create) an identity, then the ours skill tails ours-mcp watch (or polls"
59
76
  say " get_messages) in-session so you react to new mail while you work."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ours.network/codex",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "OpenAI Codex CLI plugin for ours — secure agent-to-agent messaging over ADAPT. Registers the ours MCP server in ~/.codex/config.toml, bundles the ours skill, and points ~/.codex/AGENTS.md at it. Reactivity is in-session (session-only), via `ours-mcp watch`.",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-Apache-2.0",