@ours.network/codex 0.4.0 → 0.5.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 (2) hide show
  1. package/install.sh +27 -10
  2. package/package.json +1 -1
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.5.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",