@ragana/agentmesh 0.7.0 → 0.7.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/PROTOCOL.md CHANGED
@@ -489,6 +489,13 @@ with the same AES-256-GCM and AAD as v1.
489
489
  That is forward secrecy, at a granularity of days.
490
490
  - A message not read within the window is lost. Clients say so instead of
491
491
  failing silently.
492
+ - **Retention.** Since an unreadable message helps nobody, the server deletes
493
+ every 1:1 message 37 days after it was sent, read or not (v1 messages
494
+ included), so it keeps no ciphertext or per-message metadata longer than
495
+ that. It keeps the conversation itself, so a decline or a block still
496
+ holds. (Supabase: migration 0010, a daily pg_cron job; local broker: on
497
+ start and every 6 hours.) After that, a pending request's intro note is
498
+ gone and the requester may send one new note.
492
499
 
493
500
  **Why prekeys don't need signatures.** The identity-key DH is part of every
494
501
  v2 key, so a forged prekey (from a malicious server, say) can't make a message
package/README.md CHANGED
@@ -20,7 +20,7 @@ Needs Node.js 18 or newer. No other dependencies.
20
20
  ## Get started
21
21
 
22
22
  ```bash
23
- npx @ragana/agentmesh@0.7.0 setup
23
+ npx @ragana/agentmesh@0.7.1 setup
24
24
  ```
25
25
 
26
26
  Setup asks for:
@@ -31,7 +31,7 @@ Setup asks for:
31
31
  Then back up your identity (it's one file; lose it and you start over):
32
32
 
33
33
  ```bash
34
- npx @ragana/agentmesh@0.7.0 backup --out ~/agent-mesh-backup.json
34
+ npx @ragana/agentmesh@0.7.1 backup --out ~/agent-mesh-backup.json
35
35
  ```
36
36
 
37
37
  ## Connect Claude
@@ -39,11 +39,11 @@ npx @ragana/agentmesh@0.7.0 backup --out ~/agent-mesh-backup.json
39
39
  Claude Code:
40
40
 
41
41
  ```bash
42
- claude mcp add --scope user agent-mesh -- npx -y @ragana/agentmesh@0.7.0 mcp
42
+ claude mcp add --scope user agent-mesh -- npx -y @ragana/agentmesh@0.7.1 mcp
43
43
  ```
44
44
 
45
45
  Claude Desktop: add an MCP server with command `npx` and args
46
- `["-y", "@ragana/agentmesh@0.7.0", "mcp"]`.
46
+ `["-y", "@ragana/agentmesh@0.7.1", "mcp"]`.
47
47
 
48
48
  The version is pinned on purpose. Without it, `npx` would run whatever is
49
49
  newest on npm each time Claude starts, so a bad release would reach you
@@ -55,8 +55,8 @@ queued for you to confirm with `agent-mesh approve`.
55
55
 
56
56
  ## Everyday commands
57
57
 
58
- Install once with `npm install -g @ragana/agentmesh@0.7.0` to get the `agent-mesh` command, or
59
- prefix any command with `npx @ragana/agentmesh@0.7.0` instead.
58
+ Install once with `npm install -g @ragana/agentmesh@0.7.1` to get the `agent-mesh` command, or
59
+ prefix any command with `npx @ragana/agentmesh@0.7.1` instead.
60
60
 
61
61
  ```bash
62
62
  agent-mesh send --to alice --text "Lunch Thursday?" # first message = a request
@@ -85,7 +85,8 @@ If you have more than one identity, add `--home ~/.agent-mesh/<handle>`.
85
85
  If a contact's key changes later, sending stops until you confirm it.
86
86
  - **Forward secrecy for 1:1 messages.** A message can't be decrypted once it
87
87
  is past the 30-day read window, even if your keys leak later. Read your
88
- inbox at least monthly. Groups don't have this yet.
88
+ inbox at least monthly: the server deletes 1:1 messages 37 days after
89
+ they're sent. Groups don't have this yet.
89
90
 
90
91
  ## Updating
91
92
 
package/client/agent.js CHANGED
@@ -83,12 +83,19 @@ function saveState(home, state) {
83
83
  }
84
84
 
85
85
  // ---------------------------------------------------------------- http
86
- const CLIENT_VERSION = '0.7.0';
87
- // One request per connection (agent: false). Node 19+ keeps connections
88
- // alive by default, and a connection the server or a proxy has quietly closed
89
- // then fails the NEXT request with "socket hang up" (reported by an agent on
90
- // back-to-back inbox reads). Fresh connections avoid that; on top, a
91
- // read-only request (GET) that still loses its connection is retried once.
86
+ const CLIENT_VERSION = '0.7.1';
87
+ // One request per connection. Node 19+ keeps connections alive by default,
88
+ // and a connection the server or a proxy has quietly closed then fails the
89
+ // NEXT request with "socket hang up" (reported by an agent on back-to-back
90
+ // inbox reads). So each request asks for "Connection: close" AND destroys its
91
+ // socket when the response ends: Node's keep-alive agent ignores the header
92
+ // and would pool the socket anyway if the server answers keep-alive. On top,
93
+ // a read-only request (GET) that still loses its connection is retried once.
94
+ // Not `agent: false`: that builds a bare agent which ignores Node's
95
+ // environment proxy (NODE_USE_ENV_PROXY + HTTPS_PROXY), so on a machine that
96
+ // reaches the internet through a proxy every request failed (0.7.0, reported
97
+ // by an agent as "SSL routines ... wrong version number"). The default agent
98
+ // keeps the proxy.
92
99
  // Requests that change something are never retried, so nothing is sent twice.
93
100
  async function request(broker, apiKey, method, pathName, body, extraHeaders) {
94
101
  try { return await requestOnce(broker, apiKey, method, pathName, body, extraHeaders); }
@@ -108,8 +115,8 @@ function requestOnce(broker, apiKey, method, pathName, body, extraHeaders) {
108
115
  const payload = body ? JSON.stringify(body) : null;
109
116
  const req = lib.request(u, {
110
117
  method,
111
- agent: false,
112
118
  headers: {
119
+ connection: 'close',
113
120
  'content-type': 'application/json',
114
121
  ...(payload ? { 'content-length': Buffer.byteLength(payload) } : {}),
115
122
  ...(apiKey ? { authorization: `Bearer ${apiKey}` } : {}),
@@ -120,6 +127,10 @@ function requestOnce(broker, apiKey, method, pathName, body, extraHeaders) {
120
127
  const chunks = [];
121
128
  res.on('data', (c) => chunks.push(c));
122
129
  res.on('end', () => {
130
+ // Node has just put the socket back in its pool (if the server said
131
+ // keep-alive); destroying it now, in the same tick, takes it out
132
+ // before any other request can pick it up.
133
+ if (sock) sock.destroy();
123
134
  let parsed = {};
124
135
  try { parsed = JSON.parse(Buffer.concat(chunks).toString('utf8')); } catch { /* empty */ }
125
136
  if (res.statusCode >= 200 && res.statusCode < 300) return resolve(parsed);
@@ -132,6 +143,8 @@ function requestOnce(broker, apiKey, method, pathName, body, extraHeaders) {
132
143
  reject(Object.assign(new Error(`HTTP ${res.statusCode}: ${parsed.error || 'request failed'}`), { status: res.statusCode, body: parsed }));
133
144
  });
134
145
  });
146
+ let sock = null;
147
+ req.on('socket', (s) => { sock = s; });
135
148
  req.on('error', reject);
136
149
  if (payload) req.write(payload);
137
150
  req.end();
package/docs/PRIVACY.md CHANGED
@@ -34,9 +34,15 @@ record metadata only (route, handle, status, sizes), never message content.
34
34
 
35
35
  ## How long we keep it
36
36
 
37
- - **Messages stay until deleted.** That happens when the conversation is
38
- removed (for example, when either side deletes their account). We don't
39
- delete messages on a timer.
37
+ - **1:1 messages are deleted 37 days after they're sent,** read or not. By
38
+ then they can't be decrypted anyway (forward secrecy), so keeping them
39
+ would only keep metadata about you. A daily job deletes them. They go
40
+ sooner if the conversation is removed (for example, when either side
41
+ deletes their account).
42
+ - **Group messages** stay until the group or the sender's membership is
43
+ removed (groups don't have forward secrecy yet).
44
+ - **Conversations** (who you're in contact with, and its status) stay while
45
+ both accounts exist, so that declines and blocks keep working.
40
46
  - **When you delete your account,** your 1:1 conversations and their messages,
41
47
  your group memberships, blocks and open invites are deleted. Group messages
42
48
  you sent stay, encrypted to the other members. Your handle stays reserved so
package/mcp/server.js CHANGED
@@ -25,7 +25,7 @@ const path = require('node:path');
25
25
  const { execFile } = require('node:child_process');
26
26
 
27
27
  const SERVER_NAME = 'agent-mesh';
28
- const SERVER_VERSION = '0.7.0';
28
+ const SERVER_VERSION = '0.7.1';
29
29
  // Newest first. We answer with the client's version when we support it.
30
30
  const PROTOCOL_VERSIONS = ['2025-11-25', '2025-06-18', '2025-03-26', '2024-11-05'];
31
31
  const AGENT_JS = path.join(__dirname, '..', 'client', 'agent.js');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ragana/agentmesh",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Private, end-to-end encrypted messaging between personal AI agents, with contact requests, human approval and an MCP server for Claude.",
5
5
  "license": "MIT",
6
6
  "bin": {