@hmawla/co-assistant 1.0.6 → 1.0.8

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.
@@ -2,30 +2,29 @@ You are checking my recent emails for any that require a reply from me.
2
2
 
3
3
  ## Instructions
4
4
 
5
- 1. Use the `gmail_search_emails` tool to fetch my last 5 emails (query: `in:inbox`, maxResults: 5).
6
- 2. For each email, use `gmail_read_email` to read its full content.
7
- 3. Skip any email whose message ID appears in the deduplication list below.
8
- 4. For each **new** email, determine whether it requires a reply from me. Consider:
5
+ 1. Use `gmail__search_threads` to fetch my recent inbox threads (query: `in:inbox`, maxThreads: 18, **includeLatestBody: true**). This single call returns all threads with every message (including your sent replies) and the full body of the latest message. **Do NOT call any other Gmail tools** — this gives you everything you need.
6
+ 2. Skip any thread whose latest message ID appears in the deduplication list below. Also skip newsletters, automated notifications, marketing, no-reply senders, and receipts.
7
+ 3. For each remaining thread, check the `lastMessageIsSent` field. **If `lastMessageIsSent` is true, I already replied — SKIP this thread.**
8
+ 4. Only for threads where `lastMessageIsSent` is false, determine whether it requires a reply from me. Consider:
9
9
  - Direct questions asked to me
10
10
  - Action items or requests directed at me
11
11
  - Invitations or RSVPs awaiting my response
12
12
  - Important threads where I'm expected to respond
13
- - Do NOT flag: newsletters, automated notifications, marketing, no-reply senders, receipts
14
- 5. For each email that needs a reply, suggest a concise, professional reply draft.
13
+ 5. For each thread that needs a reply, suggest a concise, professional reply draft based on the latest incoming message body.
15
14
 
16
15
  ## Output Format
17
16
 
18
- For each email that needs a reply, format your output like this:
17
+ For each thread that needs a reply, output exactly ONE entry (not one per message):
19
18
 
20
- **📧 From:** [sender]
21
- **Subject:** [subject]
22
- **Why reply:** [brief reason]
19
+ **📧 From:** [sender of the latest message]
20
+ **Subject:** [thread subject]
21
+ **Why reply:** [brief reason based on the latest message in the thread]
23
22
  **Suggested reply:**
24
23
  > [your suggested reply text]
25
24
 
26
25
  ---
27
26
 
28
- If no emails require a reply, do not say anything unless invoked with /heartbeat
27
+ If no threads require a reply, do not say anything unless invoked with /heartbeat
29
28
 
30
29
  ## Deduplication
31
30
 
@@ -33,7 +32,7 @@ If no emails require a reply, do not say anything unless invoked with /heartbeat
33
32
 
34
33
  ## IMPORTANT — Deduplication Marker
35
34
 
36
- At the very end of your response, you MUST output exactly one line in this format with ALL email message IDs you checked (whether they needed a reply or not). This prevents re-checking the same emails next time:
35
+ At the very end of your response, you MUST output exactly one line in this format with the message ID of the **most recent message per thread** you checked (whether it needed a reply or not). Only one ID per thread. This prevents re-checking the same threads next time:
37
36
 
38
- <!-- PROCESSED: msg_id_1, msg_id_2, msg_id_3, msg_id_4, msg_id_5 -->
39
- Also, make sure to not output the same message id multiple times, so if it exist don't push it.
37
+ <!-- PROCESSED: latest_msg_id_thread1, latest_msg_id_thread2, latest_msg_id_thread3 -->
38
+ Do not output the same message ID multiple times.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmawla/co-assistant",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "AI-powered Telegram personal assistant using GitHub Copilot SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",