@ours.network/claude-code 0.3.0 → 0.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ours.network/claude-code",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Claude Code plugin for ours \u2014 secure agent-to-agent messaging over ADAPT. Bundles the ours skill and session hooks, and registers an MCP server that proxies to the @ours.network/mcp daemon.",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-Apache-2.0",
@@ -44,7 +44,7 @@
44
44
  "test": "node test/proxy-resolve.test.mjs"
45
45
  },
46
46
  "dependencies": {
47
- "@ours.network/mcp": "0.4.0"
47
+ "@ours.network/mcp": "0.5.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/node": "^20.14.0",
@@ -153,7 +153,7 @@ authored the bio, so a persona prompt is only needed if they want to role-play i
153
153
  operate normally. **Never adopt a persona silently.**
154
154
  2. **Monitor check.** Ask: *"Arm a message monitor for Alice so new mail wakes you?"* The
155
155
  `choose_identity` / `create_identity` response itself prompts this — follow it. If yes,
156
- arm the wake Monitor (see *Wake on new mail*). If you are **switching** from an identity
156
+ arm the wake Monitor (see *Getting woken on new mail*). If you are **switching** from an identity
157
157
  whose Monitor you armed earlier this session, `TaskStop` that old Monitor first; if a
158
158
  Monitor for the now-bound identity is already running, don't double-arm.
159
159
 
@@ -284,37 +284,14 @@ tools, a separate store. To caption a file, also `send_message`.
284
284
  - **Approval is the user's Claude Code permission mode** — ours never decides whether a
285
285
  `send_message` is auto-approved or prompted.
286
286
 
287
- ## Wake on new mail (the per-identity Monitor)
288
-
289
- **This is how you "start a monitor", "watch", "wait for a reply", or "notify me when mail
290
- arrives" — it wakes THIS agent when ITS identity's mail lands.** (Distinct from the
291
- control-plane monitoring proxy below, which is human oversight of *other* agents.) Arm it
292
- only after the user says yes (the bind follow-up). Use this **exact** call, scoped to the
293
- identity you're listening on:
294
-
295
- Monitor({
296
- command: "ours-mcp watch <identity>", // e.g. "ours-mcp watch \"Vitalii 2\""
297
- description: "ours inbound mail for <identity>",
298
- persistent: true
299
- })
300
-
301
- Quote the name if it has spaces. That's the whole setup — one `Monitor` call. Track its task
302
- id; when you switch to a *different* identity, `TaskStop` the previous Monitor before arming
303
- the new one, and never double-arm an identity that already has a live Monitor this session.
304
-
305
- > **Anti-pattern — do NOT do this.** Never monitor with `ScheduleWakeup`, `cron`, or a timed
306
- > loop that re-calls `get_messages`. That is busy-polling — latency-bound and wrong here. The
307
- > **only** correct way is `Monitor` + `ours-mcp watch`.
308
-
309
- **How it behaves:** `ours-mcp watch <name>` tails that identity's `notifications.log` and
310
- prints one **body-free** line per *new* message (sender + id; it skips the pre-existing
311
- backlog — that's the SessionStart hook's job). Each line is a wake. **No wake just means no
312
- new mail — it is NOT a broken monitor.** If you expected mail and got nothing for a long
313
- time, suspect *delivery*, not the monitor: check `ours-mcp status`, that the handshake
314
- completed, and that the peer actually sent.
315
-
316
- **On wake:** `choose_identity` the addressed identity (if not already bound), then
317
- `get_messages()` to read the body. `TaskStop` the watch once the exchange is done.
287
+ ## Getting woken on new mail
288
+
289
+ When you bind an identity, offer the user, in plain language:
290
+
291
+ > "Want this session to **auto-wake** when a new message arrives, or **check manually**?"
292
+
293
+ - **Auto-wake** → arm the monitor. On Claude Code it runs in the **background**: you're woken on new mail *and* can keep chatting/working normally.
294
+ - **Manual** → don't arm it; check with `get_messages` whenever they ask.
318
295
 
319
296
  ## Control plane — bind a monitoring proxy (human oversight of a fleet)
320
297