@heylemon/lemonade 0.0.3 → 0.0.4

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.3",
3
- "commit": "8e50eaf2ca7f01fbb0397deb3de3cb00f2708c6a",
4
- "builtAt": "2026-02-20T05:09:41.173Z"
2
+ "version": "0.0.4",
3
+ "commit": "a26b38261e6a55844b0eed17963361b8374e9742",
4
+ "builtAt": "2026-02-20T05:21:43.349Z"
5
5
  }
@@ -1 +1 @@
1
- 5ec7ab3a52d725f743100ac38ce0d8c9672f04988280eeecd179252ba58b11dd
1
+ d27c866a9f91a1bf3b7a29bef001583ee57f61540140511ed6840c4b5dfcd5eb
@@ -21,6 +21,7 @@ export function resolveSlackAllowListMatch(params) {
21
21
  }
22
22
  const id = params.id?.toLowerCase();
23
23
  const name = params.name?.toLowerCase();
24
+ const email = params.email?.toLowerCase();
24
25
  const slug = normalizeSlackSlug(name);
25
26
  const candidates = [
26
27
  { value: id, source: "id" },
@@ -29,6 +30,7 @@ export function resolveSlackAllowListMatch(params) {
29
30
  { value: name, source: "name" },
30
31
  { value: name ? `slack:${name}` : undefined, source: "prefixed-name" },
31
32
  { value: slug, source: "slug" },
33
+ { value: email, source: "email" },
32
34
  ];
33
35
  for (const candidate of candidates) {
34
36
  if (!candidate.value)
@@ -98,7 +98,8 @@ export function createSlackMonitorContext(params) {
98
98
  });
99
99
  const profile = info.user?.profile;
100
100
  const name = profile?.display_name || profile?.real_name || info.user?.name || undefined;
101
- const entry = { name };
101
+ const email = profile?.email || undefined;
102
+ const entry = { name, email };
102
103
  userCache.set(userId, entry);
103
104
  return entry;
104
105
  }
@@ -96,24 +96,26 @@ export async function prepareSlackMessage(params) {
96
96
  return null;
97
97
  }
98
98
  if (ctx.dmPolicy !== "open") {
99
+ const dmSender = await ctx.resolveUserName(directUserId);
100
+ const dmSenderEmail = dmSender?.email ?? undefined;
99
101
  const allowMatch = resolveSlackAllowListMatch({
100
102
  allowList: allowFromLower,
101
103
  id: directUserId,
104
+ email: dmSenderEmail,
102
105
  });
103
106
  const allowMatchMeta = formatAllowlistMatchMeta(allowMatch);
104
107
  if (!allowMatch.allowed) {
105
- // Check if sender is an approved guest (responses only, no tools)
106
108
  const guestMatch = resolveSlackAllowListMatch({
107
109
  allowList: guestFromLower,
108
110
  id: directUserId,
111
+ email: dmSenderEmail,
109
112
  });
110
113
  if (guestMatch.allowed) {
111
114
  isGuestSender = true;
112
115
  logVerbose(`slack: guest sender ${directUserId} allowed (responses only, no tools)`);
113
116
  }
114
117
  else if (ctx.dmPolicy === "pairing" || ctx.dmPolicy === "allowlist") {
115
- const sender = await ctx.resolveUserName(directUserId);
116
- const senderName = sender?.name ?? undefined;
118
+ const senderName = dmSender?.name ?? undefined;
117
119
  const { created } = await upsertChannelPairingRequest({
118
120
  channel: "slack",
119
121
  id: directUserId,
@@ -226,6 +228,7 @@ export async function prepareSlackMessage(params) {
226
228
  allowList: allowFromLower,
227
229
  id: senderId,
228
230
  name: senderName,
231
+ email: sender?.email,
229
232
  }).allowed;
230
233
  const channelUsersAllowlistConfigured = isRoom && Array.isArray(channelConfig?.users) && channelConfig.users.length > 0;
231
234
  const channelCommandAuthorized = isRoom && channelUsersAllowlistConfigured
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heylemon/lemonade",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "AI gateway CLI for Lemon - local AI assistant with integrations",
5
5
  "publishConfig": {
6
6
  "access": "restricted"