@pheem49/mint 1.4.2 → 1.5.1

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.
Files changed (97) hide show
  1. package/GUIDE_TH.md +113 -0
  2. package/README.md +267 -78
  3. package/assets/CLI_Screen.png +0 -0
  4. package/main.js +76 -890
  5. package/mint-cli-logic.js +3 -107
  6. package/mint-cli.js +594 -29
  7. package/models/Shiroko_Model/Shiroko/Shiroko_Core/72d86db84cfa9730b894c241fd24c0db.png +0 -0
  8. package/models/Shiroko_Model/Shiroko/Shiroko_Core/items_pinned_to_model.json +14 -0
  9. package/models/Shiroko_Model/Shiroko/Shiroko_Core//345/221/206/347/214/253.exp3.json +10 -0
  10. package/models/Shiroko_Model/Shiroko/Shiroko_Core//345/221/206/347/214/253/347/234/274/347/217/240/346/221/207/346/231/203.exp3.json +15 -0
  11. package/models/Shiroko_Model/Shiroko/Shiroko_Core//345/233/264/350/243/231.exp3.json +10 -0
  12. package/models/Shiroko_Model/Shiroko/Shiroko_Core//346/213/215/347/205/247.exp3.json +50 -0
  13. package/models/Shiroko_Model/Shiroko/Shiroko_Core//346/213/277/347/254/224.exp3.json +10 -0
  14. package/models/Shiroko_Model/Shiroko/Shiroko_Core//347/202/271/344/270/200/344/270/213.exp3.json +10 -0
  15. package/models/Shiroko_Model/Shiroko/Shiroko_Core//347/214/253/345/222/252/346/273/244/351/225/234.exp3.json +10 -0
  16. package/models/Shiroko_Model/Shiroko/Shiroko_Core//347/234/274/351/225/234.exp3.json +10 -0
  17. package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.4096/texture_00.png +0 -0
  18. package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.4096/texture_01.png +0 -0
  19. package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.4096/texture_02.png +0 -0
  20. package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.4096/texture_03.png +0 -0
  21. package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.cdi3.json +1498 -0
  22. package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.moc3 +0 -0
  23. package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.model3.json +47 -0
  24. package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.physics3.json +6658 -0
  25. package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.vtube.json +1299 -0
  26. package/models/Shiroko_Model/Shiroko//342/232/241/351/253/230/344/272/256/342/232/241/344/275/277/347/224/250/346/225/231/347/250/213/344/270/216/346/263/250/346/204/217/344/272/213/351/241/271.txt +23 -0
  27. package/package.json +37 -4
  28. package/src/AI_Brain/Gemini_API.js +223 -65
  29. package/src/AI_Brain/autonomous_brain.js +11 -0
  30. package/src/AI_Brain/behavior_memory.js +26 -5
  31. package/src/AI_Brain/headless_agent.js +4 -0
  32. package/src/AI_Brain/knowledge_base.js +61 -8
  33. package/src/AI_Brain/memory_store.js +354 -10
  34. package/src/Automation_Layer/file_operations.js +1 -1
  35. package/src/CLI/chat_router.js +20 -7
  36. package/src/CLI/chat_ui.js +596 -825
  37. package/src/CLI/code_agent.js +347 -56
  38. package/src/CLI/gmail_auth.js +210 -0
  39. package/src/CLI/image_input.js +90 -0
  40. package/src/CLI/list_features.js +2 -0
  41. package/src/CLI/onboarding.js +364 -55
  42. package/src/CLI/updater.js +210 -0
  43. package/src/Channels/brave_search_bridge.js +35 -0
  44. package/src/Channels/discord_bridge.js +68 -0
  45. package/src/Channels/google_search_bridge.js +38 -0
  46. package/src/Channels/line_bridge.js +60 -0
  47. package/src/Channels/slack_bridge.js +53 -0
  48. package/src/Channels/telegram_bridge.js +49 -0
  49. package/src/Channels/whatsapp_bridge.js +55 -0
  50. package/src/Command_Parser/parser.js +12 -1
  51. package/src/Plugins/gmail.js +251 -0
  52. package/src/Plugins/google_calendar.js +245 -19
  53. package/src/Plugins/notion.js +256 -0
  54. package/src/System/action_executor.js +178 -0
  55. package/src/System/bridge_manager.js +76 -0
  56. package/src/System/chat_history_manager.js +23 -5
  57. package/src/System/config_manager.js +71 -7
  58. package/src/System/custom_workflows.js +31 -2
  59. package/src/System/google_tts_urls.js +51 -0
  60. package/src/System/granular_automation.js +122 -53
  61. package/src/System/ipc_handlers.js +238 -0
  62. package/src/System/proactive_loop.js +153 -0
  63. package/src/System/safety_manager.js +273 -0
  64. package/src/System/sandbox_runner.js +182 -0
  65. package/src/System/screen_capture.js +175 -0
  66. package/src/System/system_automation.js +127 -81
  67. package/src/System/system_info.js +70 -0
  68. package/src/System/task_manager.js +15 -5
  69. package/src/System/tool_registry.js +280 -0
  70. package/src/System/window_manager.js +212 -0
  71. package/src/UI/live2d_manager.js +368 -0
  72. package/src/UI/renderer.js +208 -24
  73. package/src/UI/settings.html +24 -0
  74. package/src/UI/settings.js +14 -4
  75. package/src/UI/styles.css +466 -32
  76. package/.codex +0 -0
  77. package/docs/assets/Agent_Mint.png +0 -0
  78. package/docs/assets/CLI_Screen.png +0 -0
  79. package/docs/assets/Settings.png +0 -0
  80. package/docs/assets/icon.png +0 -0
  81. package/docs/index.html +0 -132
  82. package/docs/style.css +0 -579
  83. package/index.html +0 -16
  84. package/src/UI/index.html +0 -126
  85. package/tech_news.txt +0 -3
  86. package/test_knowledge.txt +0 -3
  87. package/tests/agent_orchestrator.test.js +0 -41
  88. package/tests/chat_router.test.js +0 -42
  89. package/tests/code_agent.test.js +0 -69
  90. package/tests/config_manager.test.js +0 -141
  91. package/tests/docker.test.js +0 -46
  92. package/tests/file_operations.test.js +0 -57
  93. package/tests/memory_store.test.js +0 -185
  94. package/tests/provider_routing.test.js +0 -67
  95. package/tests/spotify.test.js +0 -201
  96. package/tests/system_monitor.test.js +0 -37
  97. package/tests/workspace_manager.test.js +0 -56
package/GUIDE_TH.md ADDED
@@ -0,0 +1,113 @@
1
+ # 🌿 Mint: คู่มือการใช้งานฉบับสมบูรณ์ (Official Guide)
2
+
3
+ ยินดีต้อนรับสู่ **Mint** ผู้ช่วย AI อัจฉริยะที่รวมพลังของ Desktop UI และ CLI Agent เข้าด้วยกัน เพื่อช่วยให้การทำงานและเขียนโค้ดของคุณง่ายขึ้น รวดเร็วขึ้น และสนุกยิ่งขึ้น!
4
+
5
+ ---
6
+
7
+ ## 📥 1. การติดตั้ง (Installation)
8
+
9
+ คุณสามารถติดตั้ง Mint ได้สองวิธีหลักๆ ดังนี้:
10
+
11
+ ### วิธีที่ 1: ติดตั้งผ่าน NPM (แนะนำสำหรับผู้ใช้ทั่วไป)
12
+ หากคุณต้องการใช้งานคำสั่ง `mint` ได้จากทุกที่ในเครื่อง:
13
+ ```bash
14
+ npm install -g @pheem49/mint@latest
15
+ ```
16
+
17
+ ### วิธีที่ 2: ติดตั้งจาก Source Code (สำหรับนักพัฒนา)
18
+ หากคุณต้องการแก้ไขโค้ดหรือลองฟีเจอร์ใหม่ๆ:
19
+ 1. Clone repository: `git clone https://github.com/Pheem49/Mint.git`
20
+ 2. เข้าไปที่โฟลเดอร์: `cd Mint`
21
+ 3. ติดตั้ง dependencies: `npm install`
22
+ 4. เรียกใช้งานผ่าน: `node mint-cli.js` หรือ `npm start` (สำหรับ GUI)
23
+
24
+ ---
25
+
26
+ ## ⚙️ 2. การตั้งค่าเริ่มต้น (Initial Setup)
27
+
28
+ หลังจากติดตั้งเสร็จ สิ่งแรกที่ควรทำคือการตั้งค่า API Key และบริการต่างๆ ผ่านระบบ Onboarding:
29
+
30
+ ```bash
31
+ mint onboard
32
+ ```
33
+
34
+ ### ขั้นตอนการ Onboard:
35
+ 1. **Gemini API Key**: กรอกคีย์จาก [Google AI Studio](https://aistudio.google.com/) (จำเป็นสำหรับการทำงานหลัก)
36
+ 2. **Select Model**: เลือกโมเดลที่ต้องการ (แนะนำ `gemini-1.5-flash` เพื่อความเร็ว หรือ `gemini-1.5-pro` เพื่อความฉลาด)
37
+ 3. **QuickStart Selection**: เลือกบริการที่ต้องการเปิดใช้งาน (ใช้ปุ่ม **Space** เพื่อเลือก/ยกเลิก และ **Enter** เพื่อยืนยัน)
38
+ - **Chat Bridges**: Telegram, Discord, WhatsApp, LINE, Slack
39
+ - **AI Providers**: Anthropic (Claude), OpenAI (GPT-4), Hugging Face, Local AI (Ollama/LM Studio)
40
+ - **Search APIs**: Google Search, Brave Search
41
+ 4. **กรอกรายละเอียด**: ระบบจะถามคีย์หรือ URL ตามบริการที่คุณเลือกไว้
42
+
43
+ ---
44
+
45
+ ## ⌨️ 3. การใช้งานผ่าน CLI (Terminal)
46
+
47
+ Mint CLI เป็นมากกว่าแค่แชท แต่มันคือ **Agent** ที่สามารถคิดและทำงานแทนคุณได้
48
+
49
+ ### การเริ่มแชทปกติ
50
+ ```bash
51
+ mint
52
+ ```
53
+ *หรือใช้คำสั่งเต็ม:* `mint chat`
54
+
55
+ ### คำสั่งพิเศษ (Slash Commands)
56
+ ขณะอยู่ในหน้าแชท คุณสามารถพิมพ์ `/` เพื่อเรียกใช้งานเมนูคำสั่งด่วน:
57
+ - `/help`: ดูรายการคำสั่งทั้งหมด
58
+ - `/code <งาน>`: บังคับเข้าโหมดเขียนโค้ด (Workspace Aware)
59
+ - `/cd <เส้นทาง>`: เปลี่ยนโฟลเดอร์ทำงานปัจจุบัน
60
+ - `/models`: ดูหรือสลับโมเดล AI
61
+ - `/config`: ดูการตั้งค่าปัจจุบัน
62
+ - `/clear` / `/reset`: ล้างประวัติการสนทนา
63
+ - `/agent <ชื่อ>`: สลับบุคลิกของ AI (เช่น `code`, `reviewer`)
64
+ - `/stats`: ดูสถานะทรัพยากรเครื่อง
65
+ - `/exit`: ออกจากโปรแกรม
66
+
67
+ ### การเขียนโค้ด (Agentic Coding)
68
+ คุณสามารถสั่งงานที่ซับซ้อนในโปรเจกต์ของคุณได้ เช่น:
69
+ ```bash
70
+ mint code "ช่วยเขียน Unit Test สำหรับไฟล์ src/System/config_manager.js ให้หน่อย"
71
+ ```
72
+ มิ้นท์จะทำการ:
73
+ 1. **คิด (Thinking)**: วางแผนการทำงาน
74
+ 2. **ใช้เครื่องมือ (Tools)**: อ่านไฟล์, ค้นหาโค้ด, เขียนไฟล์, รันคำสั่ง Shell
75
+ 3. **ขออนุมัติ (Approval)**: ถามคุณก่อนรันคำสั่งที่อาจเป็นอันตรายหรือแก้ไขไฟล์
76
+
77
+ ---
78
+
79
+ ## 🔌 4. การจัดการ MCP (Model Context Protocol)
80
+
81
+ MCP คือระบบที่ช่วยให้มิ้นท์สามารถ "ขยายร่าง" ไปใช้เครื่องมือภายนอกได้
82
+
83
+ ### เพิ่ม Server ใหม่
84
+ ```bash
85
+ # รูปแบบ: mint mcp add <ชื่อ> <คำสั่ง> --args <อาร์กิวเมนต์> --env <ตัวแปรสภาพแวดล้อม>
86
+
87
+ # ตัวอย่าง: เพิ่มความสามารถในการค้นหา Google Search
88
+ mint mcp add google-search npx --args -y @modelcontextprotocol/server-google-search --env GOOGLE_API_KEY=คีย์ของคุณ GOOGLE_SEARCH_ENGINE_ID=ไอดีของคุณ
89
+ ```
90
+
91
+ ### คำสั่งอื่นๆ ของ MCP:
92
+ - `mint mcp list`: ดูรายชื่อ Server ที่เชื่อมต่ออยู่
93
+ - `mint mcp remove <ชื่อ>`: ลบ Server ออก
94
+ - `mint mcp clear`: ล้าง Server ทั้งหมด
95
+
96
+ ---
97
+
98
+ ## 🖥️ 5. การใช้งาน Desktop UI (GUI)
99
+
100
+ หากคุณติดตั้งแบบ Source Code หรือเปิดแอป Mint ขึ้นมา:
101
+ - **Floating Widget**: หน้าต่างจิ๋วที่ลอยอยู่บนหน้าจอ กดเรียกแชทได้ทันที
102
+ - **Screen Vision**: คลิกที่ไอคอนกล้องเพื่อให้มิ้นท์ "มองเห็น" หน้าจอของคุณ และถามคำถามเกี่ยวกับสิ่งที่คุณเห็นได้
103
+ - **Proactive Engine**: มิ้นท์จะคอยสังเกตการณ์และแจ้งเตือนสิ่งที่เป็นประโยชน์ (ตั้งค่าเปิด/ปิดได้ใน Settings)
104
+ - **Settings**: ปรับแต่งสีธีม, ความเร็วเสียงอ่าน (TTS), และความถี่ในการตรวจจับหน้าจอ
105
+
106
+ ---
107
+
108
+ ## 🛡️ ความปลอดภัยและทางเลือก
109
+ - **Approval System**: มิ้นท์จะไม่รันคำสั่ง Shell หรือเขียนไฟล์โดยที่คุณไม่กด `y` ยืนยัน
110
+ - **Local First**: หากคุณต้องการความเป็นส่วนตัวสูงสุด สามารถเลือกใช้ **Ollama** หรือ **LM Studio** ร่วมกับ Mint ได้ 100%
111
+
112
+ ---
113
+ *จัดทำโดย มิ้นท์ (ผู้ช่วยส่วนตัวของคุณ) และ Pheem49* 💚✨
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  </p>
6
6
 
7
7
  <p align="center">
8
- <strong>The Unified AI Desktop Assistant & Agentic Coding CLI. Built for speed, power, and local control.</strong>
8
+ <strong>Unified AI Desktop Assistant, Agentic CLI, and local-first automation workspace.</strong>
9
9
  </p>
10
10
 
11
11
  <p align="center">
@@ -13,40 +13,134 @@
13
13
  <img src="https://img.shields.io/badge/Node.js-LTS-green?style=for-the-badge&logo=node.js" alt="Node.js">
14
14
  <img src="https://img.shields.io/badge/Electron-40.x-47848F?style=for-the-badge&logo=electron" alt="Electron">
15
15
  <img src="https://img.shields.io/badge/CLI-Unified_Agent-orange?style=for-the-badge" alt="CLI Agentic">
16
+ <a href="https://pheem49.github.io/Mint/guide.html"><img src="https://img.shields.io/badge/Documentation-View_Guide-00ffa3?style=for-the-badge" alt="Documentation"></a>
16
17
  </p>
17
18
 
18
- Mint is an advanced AI assistant designed to live in your workspace. It features a rich Electron desktop interface for day-to-day assistance and a powerful, unified CLI agent that seamlessly merges conversational chat with complex coding tasks.
19
+ Mint is an AI assistant built to live in your desktop and terminal. It combines a transparent Electron desktop assistant, a unified agentic CLI, project-aware coding tools, local memory, automation, multi-provider AI routing, MCP extensions, and safety controls.
20
+
21
+ ## What's New
22
+
23
+ - **Unified CLI Agent:** `mint` now routes every normal message through the same agent loop. It can think, answer conversationally, inspect projects, edit files, run tools, and finish directly for simple chat.
24
+ - **Fast Mode:** `/fast` switches the interactive CLI into a quieter `[Fast]` status that keeps the working indicator visible but hides internal `Thinking:` and tool-progress trace messages.
25
+ - **Live CLI Replies:** Mint responses now appear in one live-updating `Mint` message instead of waiting for the whole final answer to render at once.
26
+ - **Learned Skills:** `mint learn <path>` and `/learn <path>` import local `.md` or `.txt` files as persistent skill/instruction memory. Learned skills can be listed and deleted.
27
+ - **Provider Fallback:** The agent can fall back across supported providers, for example from local OpenAI-compatible backends to Gemini.
28
+ - **Provider Visibility:** Desktop and CLI responses show the provider/model that actually answered, including fallback results.
29
+ - **Live2D Assistant Model:** Desktop UI now supports a Live2D Shiroko model with expression cycling, lip sync while speaking, transparent interaction-area overlays, and click-to-chat reactions.
30
+ - **Google Workspace + Notion Integrations:** Gmail, Google Calendar, and Notion plugins can be configured from onboarding.
31
+ - **Safety Manager:** Central safety policy for shell commands and actions, including deterministic command blocking, permission tiers, path guards, and action logs.
32
+ - **Refactored Main Process:** Electron startup is split into focused modules for windows, IPC, proactive loop, screen capture, and action execution.
33
+ - **CI & Audit Baseline:** GitHub Actions runs install, tests, and security audit. Current local test baseline is `137` passing tests and `0` high vulnerabilities.
34
+ - **Dependency Hardening:** Removed vulnerable `google-tts-api` and `xlsx`; replaced with internal Google TTS URL generation and `read-excel-file`.
35
+
36
+ ## Key Features
37
+
38
+ ### Unified CLI Agent
39
+
40
+ Mint CLI is not just a chat wrapper. It is a workspace-aware agent loop.
41
+
42
+ - **Think Before Acting:** Every request goes through an agent decision step.
43
+ - **Fast Mode:** Toggle `/fast` to hide internal thought/progress messages while keeping the final answer, approvals, tools, and working indicator unchanged.
44
+ - **Live Answer Rendering:** Final answers are streamed into a single Mint message block as they arrive.
45
+ - **Conversational + Coding in One Flow:** Casual messages can finish directly; coding tasks can inspect, plan, edit, and verify.
46
+ - **Workspace Context:** Reads current path, git status, diff summary, package scripts, and previous workspace session memory.
47
+ - **Tool Use:** Supports web search, file listing, file reading, code search, path finding, shell commands, patch edits, file writes, opening folders, and asking the user.
48
+ - **Approval Flow:** Shell commands, patches, and full-file writes require user approval.
49
+ - **Provider Support:** Gemini, OpenAI, Anthropic, and local OpenAI-compatible endpoints for agent tasks.
50
+ - **Agent Collaboration Option:** Optional reviewer pass can be enabled for longer tasks.
51
+
52
+ ### Desktop Assistant
53
+
54
+ - **Electron Desktop UI:** Transparent desktop assistant window with tray support.
55
+ - **Live2D Model View:** Optional Live2D assistant panel with model show/hide persistence. New installs start with the model hidden until the user enables it.
56
+ - **Live2D Expressions:** Cycle model expressions from the toolbar and show an on-canvas expression toast for the active expression.
57
+ - **Click Reactions:** Named model interaction zones (`Head Pat`, `Cheek Poke`, `Hand Tap`, `Shoulder Tap`, and `Careful`) can trigger temporary expressions and send short contextual prompts into the normal chat flow.
58
+ - **Interaction Guide Overlay:** Toggle a transparent overlay that labels clickable model areas without blocking pointer input.
59
+ - **Voice Lip Sync:** When Mint speaks, Live2D mouth parameters animate during TTS playback and reset when speech ends.
60
+ - **Floating Widget:** Always-on-top quick access widget.
61
+ - **Spotlight Launcher:** `Alt+Space` quick prompt window.
62
+ - **Screen Vision:** Capture the screen and send selected regions to the AI.
63
+ - **Live Translation:** Continuously translate a selected screen area.
64
+ - **Proactive Suggestions:** Periodic screen/context analysis with behavior memory.
65
+ - **System Notifications:** Low battery, connection changes, and proactive notices.
66
+ - **Settings UI:** Configure provider, model, theme, keys, bridge options, MCP, and assistant behavior.
67
+
68
+ ### Automation
69
+
70
+ - **Apps and Websites:** Open local apps, URLs, search queries, files, and folders.
71
+ - **Browser Automation:** Use Puppeteer-driven browser workflows.
72
+ - **File Operations:** Create folders, find paths, open files/folders, and move files to trash.
73
+ - **System Automation:** Volume, mute, brightness, suspend, restart, shutdown, and window minimization helpers.
74
+ - **Granular Automation:** Mouse move, mouse click, typing, and key tap actions.
75
+ - **Custom Workflows:** Process-monitoring rules loaded from local config.
76
+ - **Headless Agent:** Queue background tasks with `mint task`.
77
+
78
+ ### Knowledge and Memory
79
+
80
+ - **Chat History:** Persistent local chat transcript.
81
+ - **Behavior Memory:** Stores recurring user context for proactive suggestions.
82
+ - **Long-Term Memory Store:** SQLite-backed user context, session memories, usage patterns, and response cache.
83
+ - **Learned Skill Files:** Import `.md` or `.txt` instruction files with `mint learn <path>` or `/learn <path>`. Mint remembers them as persistent skill/instruction context.
84
+ - **Knowledge Base / RAG:** Index and search local `.txt`, `.md`, `.pdf`, `.docx`, and `.xlsx` files.
85
+ - **Workspace Session Memory:** Remembers previous task summary and verification for each workspace.
86
+
87
+ ### Multi-Provider AI
88
+
89
+ - **Gemini:** Main default provider with model selection.
90
+ - **OpenAI:** GPT-compatible cloud provider.
91
+ - **Anthropic:** Claude-compatible provider.
92
+ - **Local OpenAI Compatible:** LM Studio or other local `/v1/chat/completions` servers.
93
+ - **Ollama / Hugging Face:** Available in general provider configuration where supported.
94
+ - **Fallback Routing:** Agent provider selection can fall back when local providers are offline.
95
+ - **Response Badges:** Chat surfaces show the provider/model that produced the final response, such as `gemini • gemini-3.1-flash-lite-preview`.
96
+
97
+ ### Messaging Bridges and Plugins
98
+
99
+ - **Discord Bridge**
100
+ - **Telegram Bridge**
101
+ - **Slack Bridge**
102
+ - **LINE Bridge**
103
+ - **WhatsApp Bridge**
104
+ - **Google Search and Brave Search Bridges**
105
+ - **Spotify Plugin**
106
+ - **Docker Plugin**
107
+ - **Obsidian Plugin**
108
+ - **System Monitor and Metrics Plugins**
109
+ - **Google Calendar Plugin:** List events and create calendar events via Google Calendar API, with browser fallback.
110
+ - **Gmail Plugin:** Search/read Gmail and create drafts safely. It does not send email automatically.
111
+ - **Notion Plugin:** Create notes/pages, read databases, and append page blocks through the Notion API.
112
+ - **MCP Manager**
113
+
114
+ ### MCP Extensions
115
+
116
+ Mint supports the **Model Context Protocol (MCP)** so external tools can be added without hardcoding them into Mint.
19
117
 
20
- ## 🌟 What's New in v1.4.1
118
+ ```bash
119
+ mint mcp add <name> <command> --args <args...> --env <KEY=VALUE>
120
+ mint mcp list
121
+ mint mcp remove <name>
122
+ mint mcp clear
123
+ ```
21
124
 
22
- - **Unified Agent Loop:** No more switching modes. Every interaction in the CLI is now handled by a sophisticated agent that can think, plan, and execute tools autonomously.
23
- - **Agentic Web Search:** Mint can now search the internet in real-time to answer questions with the latest information using integrated web tools.
24
- - **Upgraded TUI:** A redesigned terminal interface featuring a Braille spinner, thinking timer, and a cleaner "✓ ActionName" logging style.
25
- - **Interactive "Ask User":** The agent can now pause and ask you for clarification or preferences during complex multi-step tasks.
26
- - **Enhanced System Control:** Reliable multi-fallback support for opening files, folders, and applications on Linux (Pop!_OS/Ubuntu), macOS, and Windows.
125
+ Example:
27
126
 
28
- ## 🚀 Key Features
127
+ ```bash
128
+ mint mcp add google-search npx --args -y @modelcontextprotocol/server-google-search --env GOOGLE_API_KEY=your_key GOOGLE_SEARCH_ENGINE_ID=your_id
129
+ ```
29
130
 
30
- ### 💻 Unified CLI Agent
31
- Mint CLI is not just a chat wrapper; it's a full agentic workflow.
32
- - **Think & Plan:** Every response starts with a reasoning phase where Mint plans its next move.
33
- - **Autonomous Tools:** `web_search`, `list_files`, `read_file`, `search_code`, `run_shell`, `apply_patch`, `write_file`, `open_folder`, and more.
34
- - **User-in-the-Loop:** Safety first. Mint asks for your approval before running shell commands or making file edits.
35
- - **Workspace Aware:** Automatically understands your project structure, git status, and testing framework.
131
+ ## Safety System
36
132
 
37
- ### 🖥️ Desktop Assistant
38
- - **Screen Vision:** Capture and analyze your screen for instant help with what you're looking at.
39
- - **Real-time Translation:** Instantly translate text from your screen into Thai or English.
40
- - **Proactive Engine:** Mint monitors your system events to provide helpful suggestions before you even ask.
41
- - **System Tray & Floating Widgets:** Quick access to Mint from anywhere on your desktop.
133
+ Mint includes a central safety layer in `src/System/safety_manager.js`.
42
134
 
43
- ### 🛠️ Multi-Provider Support
44
- Mint supports the latest LLMs and local backends:
45
- - **Cloud:** Gemini 1.5/2.0 Pro & Flash, Anthropic Claude 3.5, OpenAI GPT-4o.
46
- - **Local:** Ollama, LM Studio, Hugging Face Inference API.
47
- - **MCP:** Full support for Model Context Protocol to extend Mint's capabilities with external tools.
135
+ - **Permission Tiers:** `safe`, `approval`, `dangerous`, and `blocked`.
136
+ - **Deterministic Command Blocking:** Blocks known dangerous shell commands regardless of what the AI requests.
137
+ - **Blocked Examples:** `rm -rf`, `git reset --hard`, `git clean -f`, `mkfs`, raw disk writes, `shutdown`, `reboot`, `sudo`, `chmod -R 777`, `curl | sh`, and `wget | bash`.
138
+ - **Dangerous Actions:** `delete_file` and destructive `system_automation` actions require explicit permission.
139
+ - **Path Guard:** Prevents path traversal outside an allowed root.
140
+ - **Action Logs:** Writes JSONL records to `~/.config/mint/action-log.jsonl`.
141
+ - **Test Coverage:** Safety tests verify destructive command blocking, dangerous action classification, path traversal protection, and action executor enforcement.
48
142
 
49
- ## 📸 Screenshots
143
+ ## Screenshots
50
144
 
51
145
  <p align="center">
52
146
  <img src="assets/Agent_Mint.png" alt="Mint Desktop UI" width="48%">
@@ -57,97 +151,192 @@ Mint supports the latest LLMs and local backends:
57
151
  <img src="assets/CLI_Screen.png" alt="Mint CLI" width="100%">
58
152
  </p>
59
153
 
60
- ## 📦 Installation
154
+ ## Installation
61
155
 
62
156
  ### Global Install
157
+
63
158
  ```bash
64
159
  npm install -g @pheem49/mint@latest
65
160
  ```
66
161
 
67
162
  ### Local Development
163
+
68
164
  ```bash
69
165
  git clone https://github.com/Pheem49/Mint.git
70
166
  cd Mint
71
167
  npm install
72
168
  ```
73
169
 
74
- ## Quick Start
75
-
76
- 1. **Setup Mint:**
77
- ```bash
78
- mint onboard
79
- ```
80
- 2. **Start Chatting:**
81
- ```bash
82
- mint
83
- ```
84
- 3. **Run the Desktop App:**
85
- ```bash
86
- npm start
87
- ```
170
+ ## Quick Start
88
171
 
89
- ## ⌨️ CLI Commands
172
+ ```bash
173
+ mint onboard
174
+ mint
175
+ npm start
176
+ ```
90
177
 
91
- - `mint` / `mint chat` : Start the unified interactive agent UI.
92
- - `mint code "<task>"` : Run a specific coding task in the current workspace.
93
- - `mint task "<task>"` : Queue a background task for the headless agent.
94
- - `mint mcp` : Manage Model Context Protocol (MCP) servers.
95
- - `mint list` : Display all available features and commands.
178
+ ## CLI Commands
179
+
180
+ - `mint` / `mint chat` - Start the unified interactive agent UI.
181
+ - `mint chat "<message>"` - Start with an initial message.
182
+ - `mint chat --image ./screenshot.png "What is on this screen?"` - Attach an image to the initial chat message.
183
+ - `/image ./screenshot.png What is on this screen?` - Attach an image while inside the interactive CLI, then press Enter to send.
184
+ - `Ctrl+V` or `/paste What is on this screen?` - Attach clipboard images inside the interactive CLI, then press Enter to send.
185
+ - `mint learn ./skill.md` - Read a local `.md` or `.txt` file and remember it as a persistent Mint skill/instruction.
186
+ - `mint learn --list` - List learned skill files.
187
+ - `mint learn --delete <id|path|name>` - Delete a learned skill by ID, path, or file name.
188
+ - `mint code "<task>"` - Run a specific coding task in the current workspace.
189
+ - `mint code --image ./mockup.png "Build this UI"` - Attach an image as visual context for a coding task.
190
+ - `mint gmail auth` - Open Google OAuth and save a Gmail refresh token.
191
+ - `mint gmail auth --no-open` - Print the Gmail OAuth link without opening a browser.
192
+ - `mint task "<task>"` - Queue a background task for the headless agent.
193
+ - `mint agent [task]` - Run the background/headless agent.
194
+ - `mint mcp` - Manage MCP servers.
195
+ - `mint update` - Check npm and install the latest Mint CLI version.
196
+ - `mint update --check` - Check for a newer version without installing it.
197
+ - `mint list` - Display available features and commands.
198
+ - `mint onboard` - Configure Mint for first use.
199
+
200
+ ## CLI Updates
201
+
202
+ Mint CLI checks for updates automatically on startup. The auto-check is enabled by default, uses a 24-hour cooldown, and updates from npm with `npm install -g @pheem49/mint@latest` when a newer package version is available.
203
+
204
+ Use manual update commands when you want direct control:
96
205
 
97
- ## 🔌 MCP Management (Extensions)
206
+ ```bash
207
+ mint update
208
+ mint update --check
209
+ mint update --dry-run
210
+ ```
98
211
 
99
- Mint supports the **Model Context Protocol (MCP)**, allowing you to extend its capabilities via the CLI without manual config editing.
212
+ You can skip the startup auto-check for one command:
100
213
 
101
- ### Add a New Server
102
214
  ```bash
103
- # Template
104
- mint mcp add <name> <command> --args <args...> --env <KEY=VALUE>
215
+ MINT_SKIP_AUTO_UPDATE=1 mint
216
+ ```
105
217
 
106
- # Example: Google Search
107
- mint mcp add google-search npx --args -y @modelcontextprotocol/server-google-search --env GOOGLE_API_KEY=your_key GOOGLE_SEARCH_ENGINE_ID=your_id
218
+ To disable automatic update checks, set `enableAutoUpdate` to `false` in your Mint config file.
108
219
 
109
- # Example: Filesystem Access
110
- mint mcp add my-files npx --args -y @modelcontextprotocol/server-filesystem /path/to/folder
111
- ```
220
+ ## Integration Setup
221
+
222
+ Most integrations can be configured from:
112
223
 
113
- ### List Configured Servers
114
224
  ```bash
115
- mint mcp list
225
+ mint onboard
116
226
  ```
117
227
 
118
- ### Remove a Server
228
+ ### Gmail
229
+
230
+ Gmail uses Google OAuth, not a plain Gmail address/password. Configure the OAuth Client ID and Client Secret in onboarding, leave the refresh token empty if you do not have one yet, and keep `Gmail User ID` as `me` for the signed-in account.
231
+
232
+ After onboarding, run one of:
233
+
119
234
  ```bash
120
- mint mcp remove google-search
235
+ mint gmail auth
236
+ mint gmail auth --no-open
121
237
  ```
122
238
 
123
- ### Clear All Servers
239
+ `mint gmail auth` opens the browser automatically. `mint gmail auth --no-open` prints the auth link for you to open manually. Both flows save `gmailRefreshToken` locally after Google redirects back to Mint. Recommended scopes are `gmail.readonly` and `gmail.compose`; Mint creates drafts only and does not send email automatically.
240
+
241
+ ### Google Calendar
242
+
243
+ Google Calendar uses OAuth credentials and a refresh token. Onboarding stores:
244
+
245
+ - `googleCalendarClientId`
246
+ - `googleCalendarClientSecret`
247
+ - `googleCalendarRefreshToken`
248
+ - `googleCalendarId`, usually `primary`
249
+
250
+ The plugin can list events and create events through the Calendar API. If OAuth is not configured, it falls back to opening Google Calendar in the browser.
251
+
252
+ ### Notion
253
+
254
+ Notion uses an internal integration secret. After creating an integration in Notion, share the target page or database with that integration, then configure:
255
+
256
+ - `notionApiKey`
257
+ - `notionDatabaseId`, optional default database
258
+ - `notionPageId`, optional default page
259
+ - `notionTitleProperty`, default `Name`
260
+
261
+ The plugin can create pages, query database pages, and append text blocks.
262
+
263
+ ## Interactive Slash Commands
264
+
265
+ Inside `mint`:
266
+
267
+ - `/help` - Show commands.
268
+ - `/fast [on|off|status]` - Toggle Fast Mode. Fast Mode shows `[Fast]`, keeps `Mint is thinking...`, and hides `Thinking:`/progress trace messages.
269
+ - `/learn <path>` - Read a local `.md` or `.txt` file and remember it as a persistent Mint skill/instruction.
270
+ - `/memory skills` - Show learned skill files.
271
+ - `/memory skills delete <id|path|name>` - Delete a learned skill.
272
+ - `/image <path> [prompt]` - Attach an image from disk.
273
+ - `/paste [prompt]` - Attach an image from the clipboard.
274
+ - `/code <task>` - Force Code Mode.
275
+ - `/cd <path>` - Change active workspace directory.
276
+ - `/models [name]` - Show or switch model/provider.
277
+ - `/memory [cmd]` - Manage long-term memory.
278
+ - `/config` - Show current configuration.
279
+ - `/copy` - Copy last response.
280
+ - `/clear` / `/reset` - Clear conversation history.
281
+ - `/agent <type>` - Switch specialized persona.
282
+ - `/workspace` - Manage registered workspaces.
283
+ - `/stats` - Show system statistics.
284
+ - `/review` - Ask reviewer persona to critique the last answer.
285
+ - `/exit` - Exit.
286
+
287
+ ## Development
288
+
124
289
  ```bash
125
- mint mcp clear
290
+ npm test
291
+ npm test -- --runInBand
292
+ npm audit --audit-level=high
293
+ npm start
294
+ npm run build:linux
126
295
  ```
127
296
 
128
- ## 🏗️ Project Structure
297
+ ## Project Structure
129
298
 
130
299
  ```text
131
300
  Mint/
301
+ ├── main.js # Electron bootstrap and wiring
302
+ ├── mint-cli.js # CLI entry point
303
+ ├── mint-cli-logic.js # CLI action executor bridge
132
304
  ├── src/
133
- │ ├── AI_Brain/ # Gemini API, Unified Agent Client, Memory Store
134
- │ ├── Automation_Layer/ # File Ops, Browser Automation, System Control
135
- │ ├── CLI/ # TUI logic, Chat Router, Code Agent
136
- │ ├── Plugins/ # MCP Manager, System Monitor, Third-party integrations
137
- │ ├── System/ # Config, Notifications, Daemons
138
- └── UI/ # Electron Renderer, Settings, Widgets
139
- ├── mint-cli.js # Main CLI entry point
305
+ │ ├── AI_Brain/ # Providers, memory, RAG, autonomous/headless agents
306
+ │ ├── Automation_Layer/ # File, app, website, and browser automation
307
+ │ ├── Channels/ # Messaging and search bridges
308
+ │ ├── CLI/ # Unified CLI UI, router, code agent, workspaces
309
+ │ ├── Command_Parser/ # Structured AI response parser
310
+ ├── Plugins/ # Plugin manager and integrations
311
+ ├── System/ # Config, IPC, safety, windows, screen capture, notifications
312
+ │ └── UI/ # Electron renderer, settings, widgets, spotlight
313
+ ├── tests/ # Jest tests
314
+ ├── docs/ # Documentation site
140
315
  └── package.json
141
316
  ```
142
317
 
143
- ## 🛡️ Security & Privacy
144
- - **Local Control:** Mint prioritizes local execution and user privacy.
145
- - **Approval System:** No destructive command or file change happens without your explicit `y/n` confirmation.
146
- - **Secure Config:** API keys are stored locally on your machine and never transmitted outside of the chosen AI provider.
318
+ ## Runtime Notes
319
+
320
+ - Mint is currently a **Node.js + CommonJS** project, not TypeScript.
321
+ - API keys are stored locally in Mint config or environment variables.
322
+ - Google OAuth refresh tokens for Gmail and Calendar are stored locally in Mint config.
323
+ - Local OpenAI-compatible providers require a running local server such as LM Studio.
324
+ - Some desktop features depend on Linux tools such as `xdg-open`, `gio`, `xdotool`, `amixer`, `pactl`, `brightnessctl`, or `xbacklight`.
325
+ - Electron GUI behavior should be smoke-tested manually after large UI or main-process changes.
326
+
327
+ ## Security & Privacy
328
+
329
+ - **Local Control:** Mint prioritizes local execution and local configuration.
330
+ - **User Approval:** Shell commands, patches, and file writes require explicit approval in the CLI agent.
331
+ - **Safety Manager:** Dangerous commands and actions are blocked or gated by deterministic policy.
332
+ - **Action Audit Trail:** Tool actions are logged locally for debugging and accountability.
333
+ - **Secure Config Practice:** Keys stay on the user's machine and are only sent to the selected AI/search provider.
334
+
335
+ ## License
147
336
 
148
- ## 📜 License
149
337
  Mint is licensed under the **GNU Affero General Public License v3.0**.
150
- See the [LICENSE](LICENSE) file for more details.
338
+ See the [LICENSE](LICENSE) file for details.
151
339
 
152
340
  ---
153
- <p align="center">Made with 💚 by <a href="https://github.com/Pheem49">Pheem49</a></p>
341
+
342
+ <p align="center">Made with love by <a href="https://github.com/Pheem49">Pheem49</a></p>
Binary file