2 Commits

Author SHA1 Message Date
Alejandro Gutiérrez
32fc4a0c98 fix: align connector-slack and connector-telegram deps with workspace versions
Some checks failed
CI / Typecheck (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled
Sherif enforces consistent dependency versions across the monorepo.
The connectors used ^8.0.0 for ws and @types/ws while the rest used
exact 8.20.0 / 8.5.13. Also sorted dependencies alphabetically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 00:16:19 +01:00
Alejandro Gutiérrez
b315b31cc9 docs: add peer session persistence and MCP notification to vision
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 00:15:49 +01:00
4 changed files with 38 additions and 11 deletions

View File

@@ -345,6 +345,32 @@ A structured logging system where peers report errors, warnings, and debug info
**Effort:** 1-2 days.
### 23. Peer session persistence ("welcome back")
When a peer disconnects, their state is lost (groups, profile, visibility, stats, summary). On reconnect they start blank. Persist peer state so returning peers resume where they left off.
**What persists (keyed by meshId + memberId):**
- Groups and roles
- Profile (avatar, title, bio, capabilities)
- Visibility setting
- Last summary
- Cumulative stats (messages, tool calls across all sessions)
- Last seen timestamp
**What resets:** status (always "idle" on connect), WebSocket/presenceId (ephemeral).
**Reconnect flow:**
1. Peer sends hello with same `memberId`
2. Broker looks up `peer_state` table for (meshId, memberId)
3. If found: restore groups, profile, visibility, stats — hello fields take precedence if explicitly set
4. Enriched `hello_ack` includes `restored: true` and previous summary
5. System notification: `"Welcome back, Alice! Last seen 2h ago. Restored: @frontend:lead, @devops:member"`
6. On disconnect: upsert current state to `peer_state`
**Why:** AI sessions restart often (context limits, crashes, new tasks). Without persistence, every reconnect requires manual group joins and profile setup. With it, the mesh remembers who you are.
**Effort:** Half day.
---
## Suggested build order
@@ -374,6 +400,7 @@ A structured logging system where peers report errors, warnings, and debug info
| 21 | SDK (@claudemesh/sdk) | 1 day | Non-Claude-Code clients | **DONE** `7e102a2` |
| 22 | Telegram connector | 1-2 days | Reach beyond Claude Code | **DONE** `fe92853` |
| 23 | Mesh telemetry + debugging | 1-2 days | Self-diagnosing mesh | |
| 24 | Peer session persistence | Half day | "Welcome back" on reconnect | |
---

View File

@@ -9,14 +9,14 @@
"start": "node dist/index.js"
},
"dependencies": {
"@slack/web-api": "^7.0.0",
"@slack/socket-mode": "^2.0.0",
"ws": "^8.0.0",
"@slack/web-api": "^7.0.0",
"tweetnacl": "^1.0.3",
"tweetnacl-util": "^0.15.1"
"tweetnacl-util": "^0.15.1",
"ws": "8.20.0"
},
"devDependencies": {
"@types/ws": "^8.0.0",
"@types/ws": "8.5.13",
"typescript": "^5.0.0"
},
"engines": {

View File

@@ -9,12 +9,12 @@
"start": "node dist/index.js"
},
"dependencies": {
"ws": "^8.0.0",
"tweetnacl": "^1.0.3",
"tweetnacl-util": "^0.15.1"
"tweetnacl-util": "^0.15.1",
"ws": "8.20.0"
},
"devDependencies": {
"@types/ws": "^8.0.0",
"@types/ws": "8.5.13",
"typescript": "^5.0.0"
}
}

8
pnpm-lock.yaml generated
View File

@@ -737,11 +737,11 @@ importers:
specifier: ^0.15.1
version: 0.15.1
ws:
specifier: ^8.0.0
specifier: 8.20.0
version: 8.20.0
devDependencies:
'@types/ws':
specifier: ^8.0.0
specifier: 8.5.13
version: 8.5.13
typescript:
specifier: ^5.0.0
@@ -756,11 +756,11 @@ importers:
specifier: ^0.15.1
version: 0.15.1
ws:
specifier: ^8.0.0
specifier: 8.20.0
version: 8.20.0
devDependencies:
'@types/ws':
specifier: ^8.0.0
specifier: 8.5.13
version: 8.5.13
typescript:
specifier: ^5.0.0