@agenticmail/api 0.9.1 → 0.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/api",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "REST API server for AgenticMail — email and SMS endpoints for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "prepublishOnly": "npm run build"
29
29
  },
30
30
  "dependencies": {
31
- "@agenticmail/core": "^0.9.1",
31
+ "@agenticmail/core": "^0.9.2",
32
32
  "cors": "^2.8.5",
33
33
  "dotenv": "^16.4.7",
34
34
  "express": "^4.21.0",
@@ -36,7 +36,7 @@
36
36
  "uuid": "^11.1.0"
37
37
  },
38
38
  "optionalDependencies": {
39
- "@agenticmail/claudecode": "^0.2.1"
39
+ "@agenticmail/claudecode": "^0.2.2"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/cors": "^2.8.17",
@@ -57,15 +57,31 @@ export function openReply(replyAll) {
57
57
  `Reply${replyAll ? ' all' : ''}: ${msg.subject ?? '(no subject)'}`;
58
58
  document.getElementById('compose-from').value = state.selectedAgent.id;
59
59
  const fromAddr = msg.from?.[0]?.address ?? '';
60
+ // Reply-all addressing.
61
+ //
62
+ // Canonical reply-all puts the previous actor on To: and everyone
63
+ // else on Cc:. The earlier code merged To+Cc+sender into a single
64
+ // `to` field, which (combined with 0.9.0's wake-default-from-To)
65
+ // produced wake-thrash again — every recipient was on To so
66
+ // every recipient woke. The split below restores the intended
67
+ // wake semantics: only the previous actor wakes by default;
68
+ // everyone else gets CC awareness.
60
69
  let toAddr = fromAddr;
70
+ let ccAddr = '';
61
71
  if (replyAll) {
62
- const all = [fromAddr, ...(msg.to ?? []).map(a => a.address), ...(msg.cc ?? []).map(a => a.address)]
63
- .filter(Boolean).filter((v, i, a) => a.indexOf(v) === i)
64
- .filter(addr => addr !== state.selectedAgent.email);
65
- toAddr = all.join(', ');
72
+ const me = (state.selectedAgent.email ?? '').toLowerCase();
73
+ const senderLower = fromAddr.toLowerCase();
74
+ const others = [...(msg.to ?? []), ...(msg.cc ?? [])]
75
+ .map(a => a.address)
76
+ .filter(Boolean)
77
+ .map(a => a.toLowerCase())
78
+ .filter(a => a !== senderLower && a !== me)
79
+ .filter((v, i, a) => a.indexOf(v) === i);
80
+ toAddr = fromAddr;
81
+ ccAddr = others.join(', ');
66
82
  }
67
83
  document.getElementById('compose-to').value = toAddr;
68
- document.getElementById('compose-cc').value = '';
84
+ document.getElementById('compose-cc').value = ccAddr;
69
85
  document.getElementById('compose-wake').value = '';
70
86
  document.getElementById('compose-subject').value =
71
87
  (msg.subject ?? '').startsWith('Re:') ? msg.subject : `Re: ${msg.subject ?? ''}`;