@ours.network/hermes 1.2.0-nightly.1 → 1.2.0-nightly.10

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
@@ -37,7 +37,7 @@ not a background daemon that wakes a dormant agent.
37
37
 
38
38
  - Node.js ≥ 22
39
39
  - Hermes installed (`~/.hermes/` present)
40
- - The ours daemon: `npm i -g @ours.network/mcp@latest` (the installer does this for you)
40
+ - The ours daemon (server): `npm i -g @ours.network/daemon` (the installer does this for you)
41
41
 
42
42
  > **Fastest path:** the one-shot [ours.network installer](../installer/README.md) sets up the
43
43
  > daemon and Hermes in one pass —
@@ -48,7 +48,7 @@ not a background daemon that wakes a dormant agent.
48
48
 
49
49
  ```sh
50
50
  npm i -g @ours.network/hermes@latest
51
- ours-hermes-install # ensures the daemon, wires the MCP server + skill only
51
+ ours-hermes-install # validates the shared profile, wires the MCP server + skill
52
52
  ```
53
53
 
54
54
  That's it — the MCP server and the `ours` skill are live immediately; run **`/reload-mcp`**
@@ -56,8 +56,8 @@ in Hermes to load the `mcp_ours_*` tools. The base install asks **zero** questio
56
56
  identities or wake-on-mail — those are set up later, in-session, via the `ours` skill.
57
57
 
58
58
  `ours-hermes-install` is a thin front-door over this package's `install.sh` (below); both
59
- are idempotent, so re-running is always safe. Other flags: `--port`, `--hermes-dir`,
60
- `--skip-daemon`, `--help`.
59
+ are idempotent, so re-running is always safe. Provision the shared profile with `ours-install client` first. Other flags:
60
+ `--hermes-dir`, `--help`; legacy `--skip-daemon` is a no-op.
61
61
 
62
62
  ### Optional: get woken on new mail
63
63
 
@@ -82,8 +82,7 @@ re-invoke a dormant agent on background output.
82
82
  Equivalently, from a checkout you can run `bash install.sh` directly (same env knobs).
83
83
  `install.sh` is idempotent and:
84
84
 
85
- 1. ensures `@ours.network/mcp@latest` — an existing daemon is **upgraded** (not skipped),
86
- and restarted if the version changed, so a re-run is a clean upgrade;
85
+ 1. validates the installed gateway client profile before any plugin changes;
87
86
  2. removes any **legacy connector-era artifacts** an older build left behind
88
87
  (`ours-connector.env`/`.log` and a stale `ours-wake` webhook block in `config.yaml`);
89
88
  3. installs the `ours` + `writing-agent-bios` skills into
@@ -91,9 +90,9 @@ Equivalently, from a checkout you can run `bash install.sh` directly (same env k
91
90
  4. writes the `ours` MCP server into `~/.hermes/config.yaml` — **safely**: if your
92
91
  config already defines `mcp_servers:` or `platforms:`, it prints the block for
93
92
  you to merge by hand instead of risking a duplicate-key corruption;
94
- 5. echoes the installed daemon + plugin versions so you can confirm you are on latest.
93
+ Server installation, upgrades and lifecycle are separate administrator operations.
95
94
 
96
- That's the whole base install — daemon, skills, and the `ours` MCP server. Wake-on-mail
95
+ That installs skills and the `ours` MCP client wiring. Wake-on-mail
97
96
  is enabled later, in-session, via the agent's `ours-mcp watch` tail (see *Optional: get
98
97
  woken on new mail* above); the installer writes no route, secret, or watcher.
99
98
 
@@ -104,7 +103,7 @@ Then run **`/reload-mcp`** in Hermes so it loads the `mcp_ours_*` tools.
104
103
  | var | default | purpose |
105
104
  |---|---|---|
106
105
  | `HERMES_DIR` | `~/.hermes` | config + skills root |
107
- | `OURS_INSTALL_SKIP_DAEMON` | — | skip the daemon step |
106
+ | `OURS_CONFIG` | `~/.ours-client/profile.json` | complete shared gateway profile |
108
107
 
109
108
  ## Install (manual)
110
109
 
@@ -5,7 +5,7 @@
5
5
  // npm i -g @ours.network/hermes
6
6
  // ours-hermes-install
7
7
  //
8
- // It resolves this package's own install.sh (which ensures the ours daemon, registers the
8
+ // It resolves this package's own install.sh (which validates the shared gateway profile, registers the
9
9
  // `ours` MCP server in ~/.hermes/config.yaml, and installs the skills) and runs it — no env-var
10
10
  // gymnastics. The MCP server + skill install immediately. Wake-on-mail is NOT set up here: the
11
11
  // agent enables it in-session by tailing `ours-mcp watch <identity>` (see the ours skill),
@@ -36,13 +36,13 @@ function help() {
36
36
 
37
37
  ours-hermes-install [options]
38
38
 
39
- Sets up the daemon + the ours MCP server + the skill. It asks nothing about identities or
39
+ Requires an ours-install client profile; sets up the MCP server and skill. It asks nothing about identities or
40
40
  wake-on-mail: you enable wake in-session from your agent (bind an identity, then ask the ours
41
41
  skill to "wake me on new mail" — it tails ours-mcp watch and reacts in-session).
42
42
 
43
43
  Options:
44
44
  --hermes-dir <dir> Hermes config+skills root (default ~/.hermes)
45
- --skip-daemon do not install/start the ours daemon
45
+ --skip-daemon compatibility flag; server lifecycle is never changed
46
46
  -h, --help show this help
47
47
 
48
48
  Idempotent: safe to re-run. After it finishes, run /reload-mcp in Hermes.`);
@@ -57,7 +57,6 @@ if (!existsSync(INSTALL)) {
57
57
  // the env vars it already understands.
58
58
  const env = { ...process.env };
59
59
  if (opts.hermesDir) env.HERMES_DIR = opts.hermesDir;
60
- if (opts.skipDaemon) env.OURS_INSTALL_SKIP_DAEMON = '1';
61
60
 
62
61
  const res = spawnSync('bash', [INSTALL], { stdio: 'inherit', env });
63
62
  if (res.error) { console.error(`ours-hermes-install: ${res.error.message}`); process.exit(1); }
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 operator CLI and MCP adapter are installed; start the shared daemon
3
+ # 1. verify the installed gateway client profile before modifying plugin configuration
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)
@@ -10,7 +10,6 @@
10
10
  #
11
11
  # Idempotent: safe to re-run. Test/CI knobs (all optional):
12
12
  # HERMES_DIR config+skills root (default ~/.hermes)
13
- # OURS_INSTALL_SKIP_DAEMON=1 skip daemon install/start
14
13
  set -euo pipefail
15
14
 
16
15
  SELFDIR="$(cd "$(dirname "$0")" && pwd)"
@@ -24,30 +23,17 @@ MANAGED_SENTINEL_END='# <<< ours.network plugin'
24
23
 
25
24
  say(){ printf 'ours-install: %s\n' "$1"; }
26
25
 
27
- # Ensure the ours daemon is on @latest (UPGRADE, not install-if-missing): an already-present
28
- # daemon must still be pulled up to the newest published version — that is the whole point of a
29
- # re-run. Record the CLI version before/after; start if not running, restart only if the version
30
- # actually changed, so the RUNNING daemon always ends on latest.
31
- ensure_daemon_latest(){
32
- if [ "${OURS_INSTALL_SKIP_DAEMON:-}" = "1" ]; then say "skipping daemon step (OURS_INSTALL_SKIP_DAEMON=1)"; return 0; fi
33
- local before after
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…"
40
- if ! ours daemon start; then say "could not start the ours daemon; installation stopped."; return 1; fi
41
- elif [ -n "$before" ] && [ "$before" != "$after" ]; then
42
- say "operator CLI upgraded (v${before} → v${after}) — restarting its daemon…"
43
- if ! ours daemon restart; then
44
- say "restart failed; trying a clean start…"
45
- if ! ours daemon start; then say "could not restart or start the upgraded daemon; installation stopped."; return 1; fi
46
- fi
47
- else
48
- say "daemon already current (v${after:-unknown})."
26
+ # Client installation never installs, starts or restarts server services.
27
+ require_gateway_client(){
28
+ if ! command -v ours >/dev/null 2>&1 || ! command -v ours-mcp >/dev/null 2>&1; then
29
+ say "Install gateway clients with ours-install client first; ours and ours-mcp are required."
30
+ return 1
31
+ fi
32
+ local contract
33
+ if ! contract="$(ours-mcp verify-client-profile)" || [ "$contract" != "ours.gateway-client-profile-v1" ]; then
34
+ say "Configure the shared gateway profile with ours-install client first; plugin setup was left unchanged."
35
+ return 1
49
36
  fi
50
- say "operator CLI: $(command -v ours) (v${after:-unknown}); MCP adapter: $(command -v ours-mcp)"
51
37
  }
52
38
 
53
39
  # Idempotent, GUARDED cleanup of legacy connector-era artifacts earlier (0.2.0/0.3.0) installers
@@ -74,8 +60,8 @@ legacy_cleanup(){
74
60
  fi
75
61
  }
76
62
 
77
- # --- 1) daemon (ensure @latest + restart on change) ---
78
- ensure_daemon_latest
63
+ # --- 1) shared gateway client preflight ---
64
+ require_gateway_client
79
65
 
80
66
  # --- 1b) legacy connector-era cleanup (idempotent, guarded) ---
81
67
  legacy_cleanup
@@ -95,11 +81,5 @@ HERMES_CONFIG="$HERMES_CONFIG" node "$SELFDIR/bin/hermes-config-install.mjs" ||
95
81
  }
96
82
 
97
83
  say "done. Run /reload-mcp in Hermes to load the mcp_ours_* tools."
98
- # --- version echo: show the user they are on latest ---
99
- if [ "${OURS_INSTALL_SKIP_DAEMON:-}" != "1" ]; then
100
- say "versions:"
101
- say " MCP adapter: $(ours-mcp --version 2>/dev/null | head -1 || echo 'unknown')"
102
- 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)')"
103
- fi
104
84
  say "next: in your agent, bind (or create) an identity and ask the ours skill to \"wake me on new"
105
85
  say " mail\" — it tails ours-mcp watch in-session and reacts to new mail as it arrives."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ours.network/hermes",
3
- "version": "1.2.0-nightly.1",
3
+ "version": "1.2.0-nightly.10",
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",
@@ -108,12 +108,12 @@ existing file.
108
108
  **control-plane monitoring proxy is not available in this release** — there is no tool
109
109
  to call. See "Control plane" below.
110
110
 
111
- - **Configuration.** Port, state dir, broker, and GC interval are configurable
112
- (env > `~/.ours/config.json` > default; port default 3050). Daemon config is
113
- **host-wide and shared** — changing it restarts the daemon and drops every
114
- session's binding. Never self-configure on your own initiative: surface the
115
- need, explain the impact, and act only on the user's explicit yes. Details:
116
- `references/configuration.md`.
111
+ - **Configuration.** Every client selects the HTTP gateway through
112
+ `~/.ours-client/profile.json` (or the whole-profile `OURS_CONFIG` override).
113
+ `serverUrl` is the base URL; daemon and Cowork use `/daemon` and `/cowork`
114
+ beneath it. Import the issued credential with `ours-install client`.
115
+ Local daemon ports, state directories, and Unix sockets are not client routes.
116
+ Missing or invalid configuration fails closed. See `references/configuration.md`.
117
117
 
118
118
  ## ours-fleet — persistent harness roles
119
119
 
@@ -412,9 +412,8 @@ release, and do not improvise a substitute. Per-identity wake-on-mail is a **dif
412
412
  feature and still works; it is described above.
413
413
  ## Notes
414
414
 
415
- - Identities and their state (contacts, history, keys) persist under the daemon's state dir
416
- (`OURS_STATE_DIR`, default `~/.ours`) and survive restarts. The daemon is a singleton
417
- shared by all your Hermes agents and sessions on this host.
415
+ - Identity state is stored on the selected server and survives client restarts.
416
+ Clients access it through the gateway; no server state directory is required locally.
418
417
  - Inbound messages from unknown (non-contact) senders are rejected — only peers added via an
419
418
  invite handshake, same-host agents under the same Human identity, or registrar-verified
420
419
  local-contact-book introductions can reach you.
@@ -1,26 +1,24 @@
1
- # ours daemon configuration
1
+ # Shared gateway client configuration
2
2
 
3
- ours-mcp is a client of one already-running shared daemon. The operator CLI owns
4
- configuration and lifecycle:
3
+ Fleet, ours CLI, MCP and harness hooks select one server through
4
+ `~/.ours-client/profile.json`. `serverUrl` names the HTTP(S) gateway, with
5
+ optional base path. Daemon operations use `/daemon`; Cowork uses `/cowork`.
6
+ The profile also pins `expectedInstanceId` and an absolute `credentialPath`.
7
+ An optional `endpoint` must equal `serverUrl + "/daemon"`.
5
8
 
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
- ```
9
+ Import a prepared private profile with `ours-install client --config /absolute/profile.json`.
10
+ Use `ours config show --json` to inspect connection metadata without reading the token.
11
+ Keep the profile directory mode 0700 and files mode 0600. `OURS_CONFIG` may
12
+ select the same whole profile for all clients. Remove legacy `OURS_PORT`,
13
+ `OURS_STATE_DIR`, `OURS_API_TOKEN` and `OURS_DAEMON_ID` overrides.
12
14
 
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.
15
+ Missing profiles, rejected credentials and unavailable gateways fail closed.
16
+ Clients never read daemon state, start a daemon, or try a local port/socket.
17
+ Hooks use the same gateway and return a harmless no-op on failure. Their
18
+ application-local identity/session files do not select another server.
18
19
 
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.
20
+ For full-stack setup, a custom public port (such as 4050), systemd propagation
21
+ and migration, see the [gateway setup guide](https://github.com/adapt-toolkit/ours-network/blob/prerelease/packages/installer/GATEWAY_SETUP.md).
22
+ The coordinated gateway changes require approved matching package releases;
23
+ current npm nightly is not automatically evidence that these changes are installed.
24
+ Server administration uses `ours-install server` on the server host.