You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -221,15 +221,16 @@ When a connection is revoked (either side):
221
221
222
222
## Implementation Phases
223
223
224
-
### Phase 0: SDK Evaluation (prerequisite)
224
+
### Phase 0: SDK Evaluation ✅ COMPLETE
225
225
226
226
**Goal**: Confirm `peer.chat(query, { target })` is available and plan upgrade if needed.
227
227
228
-
1. Check current `@honcho-ai/sdk` version in `package.json` against latest v3.x
229
-
2. Test if `peer.chat(query, { target })` (dialectic API) works with our version
230
-
3. If upgrade needed, plan a separate PR for SDK migration
231
-
4. Verify backward compatibility with existing `getContext()` / `addMessages()` patterns
232
-
5.**Decision gate**: If dialectic API is unavailable, we need an alternative approach (manual context merging via `getContext()` on both peers)
228
+
**Result**: Our `@honcho-ai/sdk@1.6.0` already supports the full v3 dialectic API including `peer.chat(query, { target })` for cross-peer queries. No SDK upgrade needed.
### Phase 1: Connections (Convex only, no Honcho changes)
235
236
@@ -272,14 +273,19 @@ When a connection is revoked (either side):
272
273
3. Update `InterpretEmailReply` prompt for attributed cross-peer weaving
273
274
4. Test: Ajay replies to an email note about a topic Sarah has discussed, her perspective enriches the reply
274
275
275
-
### Phase 4: Advanced Cross-Peer Features (future)
276
+
### Phase 4: Advanced Cross-Peer Features ✅ COMPLETE
276
277
277
278
**Goal**: Deeper cross-peer reasoning and additional surfaces.
278
279
279
-
1. Use `session.working_rep(peerA, peerB)` for pre-computed cross-peer representations (faster than per-query `peer.chat`)
280
-
2. Extend to real-time glasses responses (MemoryRecall handler) for "What does Sarah think about X?" queries
281
-
3. Add cross-peer context to web chat (`chat.ts``sendMessage`) for daily recap conversations
282
-
4. Group connections (3+ users, e.g., a team sharing context)
280
+
**Result**: All four sub-tasks implemented.
281
+
282
+
1.**Optimized with `peer.representation()`**: Replaced `peer.chat()` with `peer.representation({ target, searchQuery, searchTopK: 5, maxConclusions: 10 })` in `followupsChat.ts` and `emailReply.ts`. The `representation()` method returns pre-computed representations without agentic reasoning, which is faster since BAML handles interpretation. Applied across all integration surfaces.
283
+
284
+
2.**Extended MemoryRecall for glasses**: Added cross-peer support to `apps/application/src/handlers/memory.ts`. Uses public query `connections.getActiveSharedMemoryConnectionsByMentraId` (since the app layer can't access internal queries), queries up to 3 connected peers via `peer.representation()`, gates through `b.CheckSensitivity()` directly, and passes `crossPeerPerspectives` to `b.SynthesizeMemory()`. Updated `baml_src/synthesis.baml` with cross-peer context in `MemoryContext` class and prompt.
285
+
286
+
3.**Added cross-peer to web chat**: Extended `packages/convex/chat.ts``sendMessage` with the same cross-peer query pattern (connections → representation → sensitivity gate → BAML). Updated `baml_src/chat.baml``ChatContext` class with `crossPeerPerspectives` field and prompt section. Updated `bamlActions.ts``interpretChatMessage` args.
287
+
288
+
4.**Group connections**: Added `connectionGroups` and `connectionGroupMembers` tables to schema. Added mutations (`createConnectionGroup`, `acceptGroupInvite`, `leaveConnectionGroup`, `toggleGroupSharedMemory`, `updateGroupMemberLabel`), public query (`getGroupsForUser`), and internal query (`getActiveSharedMemoryGroupMembers`) to `connections.ts`.
0 commit comments