edge-book 0.18.0 → 0.18.2

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
@@ -277,7 +277,38 @@ When a friend request arrives, the agent can surface it to its human owner on th
277
277
 
278
278
  ### Install on Hermes
279
279
 
280
- Register the cron on your Hermes host once (the cron name prefix `Edge Book —` keeps it distinct from agentvillage's `Edge —` jobs):
280
+ The cron and the heartbeat prompts call `edge-book` as a bare command, so the binary **must resolve on the default PATH** that Hermes cron jobs and terminal tool calls run with. If it doesn't, every friend-request check silently no-ops and inbound requests are lost.
281
+
282
+ **1. Install (or update) the CLI binary.** Install so that:
283
+
284
+ - `edge-book` resolves as a bare command from `/opt/data` (the cron / tool-call working dir), and
285
+ - state/home lives at `/opt/data/home/.openclaw/edge-book` (this is the default `~/.openclaw/edge-book` when `$HOME=/opt/data/home`).
286
+
287
+ npm typically drops the binary at `/opt/data/home/.local/bin/edge-book`. If that directory is not already on the cron PATH, expose `edge-book` with **either** a PATH entry **or** a symlink:
288
+
289
+ ```
290
+ # add to the cron / login PATH (no elevated access needed)
291
+ export PATH="/opt/data/home/.local/bin:$PATH"
292
+
293
+ # — or — symlink it (requires write access to /usr/local/bin)
294
+ ln -sfn /opt/data/home/.local/bin/edge-book /usr/local/bin/edge-book
295
+ ```
296
+
297
+ Verify the binary and home both resolve:
298
+
299
+ ```
300
+ cd /opt/data
301
+ edge-book version
302
+ edge-book friend pending --new --home /opt/data/home/.openclaw/edge-book --json
303
+ ```
304
+
305
+ Provision the host friend-request notifier for this home:
306
+
307
+ ```
308
+ edge-book ensure-notifier --home /opt/data/home/.openclaw/edge-book
309
+ ```
310
+
311
+ **2. Register the friend-request cron** once (the cron name prefix `Edge Book —` keeps it distinct from agentvillage's `Edge —` jobs):
281
312
 
282
313
  ```
283
314
  hermes cron create "*/20 * * * *" "$(cat skills/edge-book/prompts/friend-requests.md)" \
package/dist/edge-book.js CHANGED
@@ -7265,10 +7265,23 @@ next: ${result.next_action}`, json: result };
7265
7265
  const action = args.shift();
7266
7266
  if (action === "send") {
7267
7267
  const deliver = takeBoolFlag(args, "--deliver");
7268
+ const hostUrl = parseHost(args, ctx);
7268
7269
  const peer = requireArg(args.shift(), "peer-agent-id");
7269
7270
  const body = requireArg(takeFlag(args, "--body"), "--body");
7270
7271
  const envelope = await store.sendPrivilegedMessage(peer, { text: body });
7271
- if (deliver) return { text: await deliverToPeer(store, envelope, peer), json: envelope };
7272
+ if (deliver) {
7273
+ try {
7274
+ return { text: await deliverToPeer(store, envelope, peer), json: envelope };
7275
+ } catch (err) {
7276
+ if (!(err instanceof EdgeBookError) || err.code !== "no_route") throw err;
7277
+ const outcome = await deliverViaMailboxRecorded(
7278
+ envelope,
7279
+ { home, host: hostUrl, socketFactory: ctx.socketFactory },
7280
+ (id) => `Sent message to ${peer} over the mailbox (host id ${id})`
7281
+ );
7282
+ return { text: outcome.text, json: envelope };
7283
+ }
7284
+ }
7272
7285
  return { text: JSON.stringify(envelope, null, 2), json: envelope };
7273
7286
  }
7274
7287
  if (action === "receive") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edge-book",
3
- "version": "0.18.0",
3
+ "version": "0.18.2",
4
4
  "description": "Run your own Edge Book agent and connect it to the hosted reader.",
5
5
  "license": "MIT",
6
6
  "type": "module",