@ours.network/hermes 0.17.0 → 0.18.0-nightly.1

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.
package/README.md CHANGED
@@ -120,7 +120,7 @@ To get woken on new mail, ask the `ours` skill in-session to wake you: it tails
120
120
 
121
121
  ## Verify
122
122
 
123
- - `ours-mcp status` — daemon up.
123
+ - `ours daemon status` — shared daemon up.
124
124
  - In Hermes: *"which mcp_ours tools are available?"* — should list ours tools.
125
125
  - Ask the agent to wake you on new mail (bind an identity first), then send yourself a
126
126
  message from a peer identity and confirm the in-session watch reacts.
@@ -23,7 +23,12 @@ const SENTINEL_END = '# <<< ours.network plugin';
23
23
  // could corrupt existing YAML.
24
24
  export function planConfigInstall(text) {
25
25
  const t = text ?? '';
26
- if (t.includes(SENTINEL)) return { action: 'noop', reason: 'ours block already present' };
26
+ if (t.includes(SENTINEL)) {
27
+ if (!t.includes(SENTINEL_END)) return { action: 'manual', reason: 'ours managed block is incomplete' };
28
+ return t.includes('ours-mcp') && t.includes('proxy') && !t.includes('--application')
29
+ ? { action: 'noop', reason: 'ours block already present' }
30
+ : { action: 'replace', reason: 'migrate the managed block to shared-daemon selection' };
31
+ }
27
32
  if (!t.trim()) return { action: 'write', reason: 'no existing config' };
28
33
  if (/^mcp_servers:/m.test(t)) {
29
34
  return {
@@ -67,9 +72,13 @@ function main() {
67
72
  process.exitCode = 3;
68
73
  return;
69
74
  }
70
- const next = plan.action === 'write' ? block : existing.replace(/\s*$/, '\n\n') + block;
75
+ const next = plan.action === 'write' ? block
76
+ : plan.action === 'replace'
77
+ ? existing.replace(new RegExp(`${SENTINEL.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}[\\s\\S]*?${SENTINEL_END.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\n?`), block)
78
+ : existing.replace(/\s*$/, '\n\n') + block;
71
79
  writeFileSync(cfgPath, next);
72
- console.log(`ours: ${plan.action === 'write' ? 'wrote' : 'appended ours block to'} ${cfgPath}. Run /reload-mcp in Hermes.`);
80
+ const verb = plan.action === 'write' ? 'wrote' : plan.action === 'replace' ? 'updated ours block in' : 'appended ours block to';
81
+ console.log(`ours: ${verb} ${cfgPath}. Run /reload-mcp in Hermes.`);
73
82
  }
74
83
 
75
84
  if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) main();
package/install.sh CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # Install the ours.network plugin into Hermes:
3
- # 1. ensure the ours daemon (@ours.network/mcp) is installed + running
3
+ # 1. ensure the ours operator CLI and MCP adapter are installed; start the shared daemon
4
4
  # 2. install the ours + writing-agent-bios skills into ~/.hermes/skills/
5
5
  # 3. write the `ours` MCP server into ~/.hermes/config.yaml (idempotent, never corrupts
6
6
  # existing YAML)
@@ -31,18 +31,18 @@ say(){ printf 'ours-install: %s\n' "$1"; }
31
31
  ensure_daemon_latest(){
32
32
  if [ "${OURS_INSTALL_SKIP_DAEMON:-}" = "1" ]; then say "skipping daemon step (OURS_INSTALL_SKIP_DAEMON=1)"; return 0; fi
33
33
  local before after
34
- before="$(ours-mcp --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)"
35
- say "ensuring @ours.network/mcp@latest…"
36
- npm i -g @ours.network/mcp@latest
37
- after="$(ours-mcp --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)"
38
- if ! ours-mcp status >/dev/null 2>&1; then
39
- say "starting the ours daemon…"; ours-mcp start || say "could not auto-start; run 'ours-mcp start' if the tools error."
34
+ before="$(ours version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)"
35
+ say "ensuring @ours.network/cli@latest and @ours.network/mcp@latest…"
36
+ npm i -g @ours.network/cli@latest @ours.network/mcp@latest
37
+ after="$(ours version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)"
38
+ if ! ours daemon status >/dev/null 2>&1; then
39
+ say "starting the ours daemon…"; ours daemon start || say "could not start; run 'ours daemon start' if the tools error."
40
40
  elif [ -n "$before" ] && [ "$before" != "$after" ]; then
41
- say "daemon upgraded (v${before} → v${after}) — restarting…"; ours-mcp restart || ours-mcp start || true
41
+ say "operator CLI upgraded (v${before} → v${after}) — restarting its daemon…"; ours daemon restart || ours daemon start || true
42
42
  else
43
43
  say "daemon already current (v${after:-unknown})."
44
44
  fi
45
- say "daemon: $(command -v ours-mcp) (v${after:-unknown})"
45
+ say "operator CLI: $(command -v ours) (v${after:-unknown}); MCP adapter: $(command -v ours-mcp)"
46
46
  }
47
47
 
48
48
  # Idempotent, GUARDED cleanup of legacy connector-era artifacts earlier (0.2.0/0.3.0) installers
@@ -93,7 +93,7 @@ say "done. Run /reload-mcp in Hermes to load the mcp_ours_* tools."
93
93
  # --- version echo: show the user they are on latest ---
94
94
  if [ "${OURS_INSTALL_SKIP_DAEMON:-}" != "1" ]; then
95
95
  say "versions:"
96
- say " daemon: $(ours-mcp --version 2>/dev/null | head -1 || echo 'unknown')"
96
+ say " MCP adapter: $(ours-mcp --version 2>/dev/null | head -1 || echo 'unknown')"
97
97
  say " plugin: $(npm ls -g @ours.network/hermes 2>/dev/null | grep -oE '@ours\.network/hermes@[0-9][0-9.]*' | head -1 || echo '@ours.network/hermes (not a global install)')"
98
98
  fi
99
99
  say "next: in your agent, bind (or create) an identity and ask the ours skill to \"wake me on new"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ours.network/hermes",
3
- "version": "0.17.0",
3
+ "version": "0.18.0-nightly.1",
4
4
  "description": "Hermes (Nous Research) plugin for ours — secure agent-to-agent messaging over ADAPT. Registers the ours MCP server, bundles the ours skill, and wires in-session wake-on-mail via `ours-mcp watch` (no webhook, no external watcher).",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ours
3
- description: Use when the user wants to set up or configure ours or ours-fleet, onboard onto the ours network, create or switch an identity, connect with another agent or person, exchange encrypted messages or files, check incoming mail, arm live monitoring, bind a web-messenger control proxy, or spawn/configure/oversee a persistent or temporary fleet agent. Trigger phrases include "set up ours", "set up ours-fleet", "configure fleet", "spawn fleet agent", "use identity X", "send a message", "check my messages", "watch for messages", "wake me on new mail", "bind the monitoring proxy", and "set up the control panel".
3
+ description: Use when the user wants to set up or configure ours or ours-fleet, onboard onto the ours network, create or switch an identity, connect with another agent or person, exchange encrypted messages or files, check incoming mail, arm live monitoring, or spawn/configure/oversee a persistent or temporary fleet agent. Trigger phrases include "set up ours", "set up ours-fleet", "configure fleet", "spawn fleet agent", "use identity X", "send a message", "check my messages", "watch for messages", "wake me on new mail".
4
4
  metadata:
5
5
  hermes:
6
6
  tags: [ours, ours.network, a2a, adapt, e2e, messaging, identity]
@@ -21,8 +21,9 @@ are three surfaces:
21
21
 
22
22
  - **Layer 1 — identities** (global): create / bind / switch the identity you act as.
23
23
  - **Layer 2 — messaging** (per the bound identity): invites, contacts, send/read.
24
- - **Control plane** (the host's **Human identity**): bind a human's web-messenger as a
25
- **monitoring & control proxy** that can oversee and command a fleet of agents.
24
+ - **Control plane** (the host's **Human identity**): a human's web-messenger acting as a
25
+ **monitoring & control proxy** over a fleet of agents. **Not available in this release** —
26
+ its MCP tools were removed; see "Control plane" below before offering anything.
26
27
 
27
28
  Identities come in exactly two kinds, in a fixed order:
28
29
 
@@ -76,19 +77,12 @@ allows it for legacy reasons; this skill does not.
76
77
 
77
78
  Walk the user through these, checking each. Stop and help at the first one that isn't done.
78
79
 
79
- 1. **Daemon running.** The MCP tools talk to a local background daemon. Check it:
80
- `ours-mcp status`. If the command is missing, install it: `npm i -g
81
- @ours.network/mcp`, then `ours-mcp start`. For boot-persistence offer
82
- `ours-mcp install-service`. To change broker / port / state dir, run the
83
- interactive `ours-mcp setup` (this edits config only it is NOT identity setup).
84
- These run on the user's machine; if a step needs them at a terminal, suggest they
85
- type `! ours-mcp status` etc.
86
- Then check optional voice support with `ours-mcp voice-status --json`. If it is
87
- not ready and the user wants voice transcription, ask them to run `ours-install`
88
- in a terminal: it re-detects incomplete setup and reads the provider key with
89
- hidden input. **Never ask for, paste, echo, or put the key in chat/tool arguments.**
90
- Environment-only operators may set `OURS_STT_*` themselves. Troubleshooting and
91
- the exact Telegram OGG/Opus fallback contract are in `references/configuration.md`.
80
+ 1. **Daemon running.** The MCP tools attach to the shared daemon. Check it with
81
+ `ours daemon status`. If the commands are missing, install
82
+ `@ours.network/cli@1.0.1` and `@ours.network/mcp`, then run `ours config setup`
83
+ and `ours daemon start`. For boot persistence offer
84
+ `ours daemon install-service`. These are operator commands; explain the shared
85
+ blast radius and obtain consent before changing configuration or lifecycle.
92
86
  2. **Plugin installed.** Run this package's `install.sh` (from `@ours.network/hermes`).
93
87
  It ensures the daemon, writes the `ours` MCP server into `~/.hermes/config.yaml`, and
94
88
  installs this skill into `~/.hermes/skills/`. That's all — no identities, no webhook route,
@@ -103,8 +97,9 @@ Walk the user through these, checking each. Stop and help at the first one that
103
97
  via the `terminal` tool and react to each new message from that loop (see *Getting woken on new mail*
104
98
  below). **Be honest that this BLOCKS the session** (unlike Claude Code's background Monitor) —
105
99
  don't sell it as "just works". The installer never sets this up.
106
- 6. **(Optional) Oversight.** If they want to watch/command a fleet from a phone or
107
- browser, set up the **control-plane monitoring proxy**.
100
+ 6. **Oversight.** If they ask to watch/command a fleet from a phone or browser, say the
101
+ **control-plane monitoring proxy is not available in this release** — there is no tool
102
+ to call. See "Control plane" below.
108
103
 
109
104
  - **Configuration.** Port, state dir, broker, and GC interval are configurable
110
105
  (env > `~/.ours/config.json` > default; port default 3050). Daemon config is
@@ -231,8 +226,8 @@ random public-safe `tmp-…` name), binds it to this session, and marks it **tem
231
226
  If a notice says your plugin and the running daemon are different
232
227
  versions, it is **advisory** — everything still works. Relay it to the user and,
233
228
  if they want matching versions, tell them: the daemon is shared and is not
234
- restarted automatically, so run `ours-mcp stop` when no other session is
235
- mid-task (the next session starts the new version), or update the lagging side.
229
+ restarted automatically, so run `ours daemon restart` only when no other session
230
+ is mid-task, or update the lagging side.
236
231
  Do **not** stop work, refuse, or restart anything on your own over this.
237
232
 
238
233
  ### Workspace identity pin (`.ours-identity`)
@@ -365,45 +360,21 @@ When you bind an identity, offer the user, in plain language:
365
360
  - **Auto-wake** → arm the monitor: you hold a live `ours-mcp watch <id>` and react to each message as it arrives. **Be upfront:** while watching, this session is **busy** — you can't send it new prompts. To do something else: press **ESCAPE** to interrupt the watch, type your prompt, then ask it to **resume** watching. *(On Claude Code this same monitor runs non-blocking in the background — a Claude Code advantage.)*
366
361
  - **Manual** → don't arm it; ask it to check `get_messages` whenever you want. No blocking.
367
362
 
368
- ## Control plane — bind a monitoring proxy (human oversight of a fleet)
369
-
370
- This is **separate** from the wake-on-mail watch above. The control plane lets a **person's
371
- web-messenger account** (the ours web messenger, shipping as part of the upcoming ours-control-plane)
372
- oversee and command all agents under this host's **Human identity** from a **Control
373
- Panel**: view a **live monitoring feed** of monitored agents' traffic, create agents, edit
374
- their bios **and personas**, toggle each agent's monitoring, open a chat with any agent (the
375
- Human identity commands the agent to mint an invite — no out-of-band step), and remove agents. A
376
- coordinator can also set a worker's local persona via the cluster; the agent still asks the
377
- user before adopting it. All of it rides the same
378
- e2e channels as messages but in a separate control queue agents never see; monitoring bodies
379
- are never written to disk on the host.
380
-
381
- **Prerequisites**
382
- - The **Human identity** exists (`create_root_identity` — the onboarding step). The
383
- proxy binds to the Human identity.
384
- - The messenger account is already a **contact of the Human identity** — do the normal
385
- invite exchange first: bind the Human identity, `generate_invite`, and have the
386
- messenger redeem it (or redeem the messenger's invite with `add_contact`).
387
-
388
- **Binding ceremony (6-digit code, out-of-band)**
389
- 1. "bind my messenger account as the monitoring proxy" →
390
- `bind_monitoring_proxy({ contact: "<the messenger contact>" })`. This automatically
391
- targets the host's Human identity (you do **not** need to be bound as it). It returns a
392
- **6-digit code** (valid 5 minutes, 3 attempts) and shows it **here**.
393
- 2. **Read the code to the user.** They open the messenger → the conversation with the Human identity →
394
- **Control Panel** → enter the code. The code must travel **out-of-band** — reading it off
395
- this terminal is what proves you control both ends. **Never send the code over ours.**
396
- 3. On success the contact becomes the proxy. Confirm with `get_monitoring_status`.
397
-
398
- **Per-agent monitoring is controller-gated.** Once a proxy is bound, the proxy (Control
399
- Panel) turns an agent's monitoring on/off — there is **no local enable/disable tool**. A
400
- monitored agent reports a signed copy of every message it sends/receives to the Human
401
- identity's node, which forwards it to the proxy's feed.
402
-
403
- **Status** — "what's the monitoring/control state" → `get_monitoring_status()` reports the
404
- Human identity's bound proxy (if any), a pending code verification, queued copies/control
405
- requests, and each agent's monitoring ON/off. Works whenever the Human identity exists.
363
+ ## Control plane — human oversight of a fleet
406
364
 
365
+ **NOT AVAILABLE IN THIS RELEASE. Do not offer it, and do not call a tool for it.**
366
+ The `bind_monitoring_proxy` and `get_monitoring_status` MCP tools were removed with the
367
+ daemon-side control plane; there is no tool behind them and a call will fail. Nothing has
368
+ replaced them yet.
369
+
370
+ The capability itself is not cancelled: the monitoring/control surface remains in the
371
+ **protocol core**, untouched, for whenever it is reimplemented. What is gone is this
372
+ plugin's exposure of it as MCP tools.
373
+
374
+ If a user asks to bind a web-messenger account as a monitoring/control proxy, to open a
375
+ Control Panel, or to check monitoring status — say plainly that it is not available in this
376
+ release, and do not improvise a substitute. Per-identity wake-on-mail is a **different**
377
+ feature and still works; it is described above.
407
378
  ## Notes
408
379
 
409
380
  - Identities and their state (contacts, inbox, keys) persist under the daemon's state dir
@@ -416,7 +387,7 @@ requests, and each agent's monitoring ON/off. Works whenever the Human identity
416
387
  event (sender + id + date) to `$OURS_STATE_DIR/<identity>/notifications.log` (the wake
417
388
  signal `ours-mcp watch` reads) and refreshes a body-free `unread.json`. Text lives in the
418
389
  packet and leaves it solely via `get_messages`.
419
- - **The wake signal is uniform.** `ours-mcp watch <identity>` is the common stream; each harness
390
+ - **The wake signal is uniform.** `ours-mcp watch <identity>` is the explicitly named stream; each harness
420
391
  drives it in-session. Claude Code uses its native `Monitor` tool; **Hermes uses autonomous watch
421
392
  mode** — the agent holds a blocking `ours-mcp watch` via the `terminal` tool and reacts from that
422
393
  loop (see *Getting woken on new mail*). The ours daemon, identities, and tools are identical across
@@ -1,82 +1,26 @@
1
- # ours configuration & self-service
2
-
3
- The daemon is a **shared, host-wide singleton** reachable only on `127.0.0.1`
4
- (loopback there is no host knob, by design). Configuration is resolved
5
- **env var > `~/.ours/config.json` > built-in default**:
6
-
7
- | Setting | Env | config.json | Default |
8
- |---|---|---|---|
9
- | HTTP port | `OURS_PORT` | `port` | `3050` |
10
- | State dir | `OURS_STATE_DIR` | `stateDir` | `~/.ours` |
11
- | Broker URL | `OURS_BROKER_URL` | `brokerUrl` | (bundled default) |
12
- | GC interval (ms) | `OURS_GC_INTERVAL_MS` | `gcIntervalMs` | `3600000` |
13
- | Auto-start daemon | `OURS_AUTOSTART` | `autoStart` | `false` |
14
-
15
- **The port is shared.** Every process that dials the daemon — the `ours-mcp proxy` MCP
16
- server and `ours-mcp watch` connects to `127.0.0.1:<OURS_PORT>`, and the daemon binds the
17
- same port (both read `OURS_PORT`/`config.json`). Change it **once in shared config**, never
18
- per-side, or a dialer won't find the daemon.
19
-
20
- **Changing config (consent-first never on your own initiative):**
21
- - Interactive: `ours-mcp config` (a survey). It needs a TTY, so ask the **user**
22
- to run it via `!ours-mcp config` — you cannot drive the survey yourself.
23
- - Scripted: edit `~/.ours/config.json` (a key per setting), then restart:
24
- `ours-mcp restart` (with `autoStart` off the default a stopped daemon
25
- stays stopped; sessions report an error instead of relaunching it).
26
-
27
- Both methods edit the same `~/.ours/config.json` file — the interactive survey is just guided editing.
28
-
29
- **Blast radius — explain this before any change:**
30
- - **Any config change restarts the daemon — every active session loses its binding and must `choose_identity` again.** Only change config when no other session is mid-task.
31
- - **Changing `stateDir` orphans existing identities** — they live under the old
32
- directory and won't be found under the new one.
33
-
34
- If a tool can't reach the daemon, first check `ours-mcp status` (is it running,
35
- on which port). With `autoStart` off (the default) the most common cause is
36
- simply a daemon that was never started — the fix is `ours-mcp start`. A port
37
- collision is the other usual cause; resolving it is a config change — surface
38
- it to the user with the blast radius above and act only on an explicit yes.
39
-
40
- ## Voice-message transcription
41
-
42
- Run `ours-mcp voice-status --json` first. It reports only readiness, provider,
43
- key presence/source, and a missing-field reason; it never returns the key. A
44
- ready result is idempotent: keep it and do not ask for setup again. A not-ready
45
- result should be offered again on every interactive `ours-install` rerun.
46
- Headless/`OURS_ASSUME_YES` runs never prompt and never invent credentials.
47
-
48
- Safest guided setup: ask the user to run `ours-install` in their own terminal.
49
- Its API-key prompt is hidden, it writes `config.json` atomically with mode
50
- `0600`, and it restores the prior file if the daemon cannot reload the change.
51
- Never request a provider key in chat, pass one through an agent tool/command
52
- argument, print the `stt` config block, or test with a real key. Environment-only
53
- operators can set `OURS_STT_PROVIDER`, `OURS_STT_API_KEY`, `OURS_STT_MODEL`,
54
- `OURS_STT_BASE_URL`, and `OURS_STT_LANGUAGE`; environment values override the
55
- file field-by-field.
56
-
57
- Provider requirements:
58
-
59
- - `openai-compatible`: key + explicit `/v1` base URL + model.
60
- - `elevenlabs`: key + model; base URL is optional.
61
- - `deepgram`: key; model/base URL are optional provider defaults.
62
- - `custom`: key + `stt.custom.url`; model is required when the custom template
63
- references it.
64
-
65
- Troubleshooting:
66
-
67
- - “not ready” names the missing field. Do not ask the user to reveal its value.
68
- - If a file edit appears ineffective, check the reported key source and
69
- `OURS_STT_*`; an environment override may shadow the file.
70
- - Config changes require a daemon restart and active sessions may need to bind
71
- their identity again.
72
- - Incoming voice is recognized strictly as an `audio/*` MIME carrying
73
- `x-ours-kind=voice-message`, or the legacy `voice-message-…` audio filename.
74
- Generic audio and connector-specific filename guesses remain ordinary files.
75
- - Telegram fallback preserves the original OGG/Opus bytes and `.ogg` filename.
76
- Its `send_file` MIME and correlated v2 envelope `attachment.mime` must both be
77
- `audio/ogg; x-ours-kind=voice-message`; `attachment.wire_id` identifies the
78
- separately delivered file. Connector-local STT success may remain text-only.
79
- - Oversized audio is saved but not uploaded (daemon default: 5 MiB). Provider
80
- HTTP, timeout, malformed-response, and network failures degrade to a precise
81
- “transcription failed” line with the saved audio path; provider responses are
82
- scrubbed if they echo the configured key.
1
+ # ours daemon configuration
2
+
3
+ ours-mcp is a client of one already-running shared daemon. The operator CLI owns
4
+ configuration and lifecycle:
5
+
6
+ ```sh
7
+ ours config show --json
8
+ ours config setup --port 3050 --state-dir "$HOME/.ours"
9
+ ours daemon start
10
+ ours daemon status --json
11
+ ```
12
+
13
+ The MCP adapter uses the published SDK's coherent selection. The wholly default
14
+ selection is port 3050 with state directory `~/.ours`. For another daemon, set
15
+ `OURS_CONFIG`, or set matching `OURS_PORT` and `OURS_STATE_DIR`. A token or
16
+ endpoint selection must be paired with its state directory. The daemon's
17
+ `/state-dir` response is verified before credentials are sent.
18
+
19
+ The adapter never starts a daemon and never falls back to an embedded one.
20
+ `OURS_INSTANCE`, `--application`, and old ours-mcp daemon variables are errors.
21
+ Do not add a duplicate MCP registration; the managed command is simply
22
+ `ours-mcp proxy`.
23
+
24
+ Changing daemon configuration or restarting the shared daemon affects every
25
+ connected application. Explain that blast radius and obtain the user's consent
26
+ before making operator-level changes.