@pheem49/mint 1.5.2 → 1.5.3
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/GUIDE_TH.md +7 -7
- package/README.md +132 -66
- package/assets/Agent_Mint.png +0 -0
- package/assets/Settings.png +0 -0
- package/main.js +12 -0
- package/package.json +3 -2
- package/preload.js +2 -0
- package/scripts/install_linux_desktop_entry.js +48 -0
- package/src/AI_Brain/Gemini_API.js +194 -491
- package/src/AI_Brain/autonomous_brain.js +46 -19
- package/src/AI_Brain/headless_agent.js +21 -2
- package/src/AI_Brain/provider_adapter.js +358 -0
- package/src/CLI/approval_handler.js +5 -0
- package/src/CLI/chat_router.js +7 -0
- package/src/CLI/chat_ui.js +397 -76
- package/src/CLI/cli_colors.js +86 -3
- package/src/CLI/cli_formatters.js +6 -1
- package/src/CLI/code_agent.js +706 -273
- package/src/CLI/interactive_chat.js +311 -149
- package/src/CLI/slash_command_handler.js +2 -2
- package/src/CLI/updater.js +21 -1
- package/src/System/config_manager.js +4 -1
- package/src/System/ipc_handlers.js +10 -0
- package/src/System/picture_store.js +109 -0
- package/src/System/task_manager.js +127 -0
- package/src/System/tool_registry.js +13 -0
- package/src/System/window_manager.js +16 -8
- package/src/UI/live2d_manager.js +42 -8
- package/src/UI/renderer.js +457 -42
- package/src/UI/settings.css +160 -96
- package/src/UI/settings.html +9 -0
- package/src/UI/settings.js +34 -2
- package/src/UI/styles.css +1350 -117
- package/privacy.txt +0 -1
package/GUIDE_TH.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Mint: คู่มือการใช้งานฉบับสมบูรณ์ (Official Guide)
|
|
2
2
|
|
|
3
3
|
ยินดีต้อนรับสู่ **Mint** ผู้ช่วย AI อัจฉริยะที่รวมพลังของ Desktop UI และ CLI Agent เข้าด้วยกัน เพื่อช่วยให้การทำงานและเขียนโค้ดของคุณง่ายขึ้น รวดเร็วขึ้น และสนุกยิ่งขึ้น!
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 1. การติดตั้ง (Installation)
|
|
8
8
|
|
|
9
9
|
คุณสามารถติดตั้ง Mint ได้สองวิธีหลักๆ ดังนี้:
|
|
10
10
|
|
|
@@ -23,7 +23,7 @@ npm install -g @pheem49/mint@latest
|
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
##
|
|
26
|
+
## 2. การตั้งค่าเริ่มต้น (Initial Setup)
|
|
27
27
|
|
|
28
28
|
หลังจากติดตั้งเสร็จ สิ่งแรกที่ควรทำคือการตั้งค่า API Key และบริการต่างๆ ผ่านระบบ Onboarding:
|
|
29
29
|
|
|
@@ -42,7 +42,7 @@ mint onboard
|
|
|
42
42
|
|
|
43
43
|
---
|
|
44
44
|
|
|
45
|
-
##
|
|
45
|
+
## 3. การใช้งานผ่าน CLI (Terminal)
|
|
46
46
|
|
|
47
47
|
Mint CLI เป็นมากกว่าแค่แชท แต่มันคือ **Agent** ที่สามารถคิดและทำงานแทนคุณได้
|
|
48
48
|
|
|
@@ -76,7 +76,7 @@ mint code "ช่วยเขียน Unit Test สำหรับไฟล์
|
|
|
76
76
|
|
|
77
77
|
---
|
|
78
78
|
|
|
79
|
-
##
|
|
79
|
+
## 4. การจัดการ MCP (Model Context Protocol)
|
|
80
80
|
|
|
81
81
|
MCP คือระบบที่ช่วยให้มิ้นท์สามารถ "ขยายร่าง" ไปใช้เครื่องมือภายนอกได้
|
|
82
82
|
|
|
@@ -95,7 +95,7 @@ mint mcp add google-search npx --args -y @modelcontextprotocol/server-google-sea
|
|
|
95
95
|
|
|
96
96
|
---
|
|
97
97
|
|
|
98
|
-
##
|
|
98
|
+
## 5. การใช้งาน Desktop UI (GUI)
|
|
99
99
|
|
|
100
100
|
หากคุณติดตั้งแบบ Source Code หรือเปิดแอป Mint ขึ้นมา:
|
|
101
101
|
- **Floating Widget**: หน้าต่างจิ๋วที่ลอยอยู่บนหน้าจอ กดเรียกแชทได้ทันที
|
|
@@ -110,4 +110,4 @@ mint mcp add google-search npx --args -y @modelcontextprotocol/server-google-sea
|
|
|
110
110
|
- **Local First**: หากคุณต้องการความเป็นส่วนตัวสูงสุด สามารถเลือกใช้ **Ollama** หรือ **LM Studio** ร่วมกับ Mint ได้ 100%
|
|
111
111
|
|
|
112
112
|
---
|
|
113
|
-
*จัดทำโดย มิ้นท์ (ผู้ช่วยส่วนตัวของคุณ) และ Pheem49*
|
|
113
|
+
*จัดทำโดย มิ้นท์ (ผู้ช่วยส่วนตัวของคุณ) และ Pheem49*
|
package/README.md
CHANGED
|
@@ -20,6 +20,10 @@ Mint is an AI assistant built to live in your desktop and terminal. It combines
|
|
|
20
20
|
|
|
21
21
|
## What's New
|
|
22
22
|
|
|
23
|
+
- **Antigravity-style Desktop Layout:** Desktop UI now has a collapsible sidebar, Chat/Pictures navigation, smoother page transitions, startup loading polish, and clearer destructive-action confirmations.
|
|
24
|
+
- **Local Pictures Library:** Images sent from the desktop chat are saved locally under `~/.config/mint/Pictures` after the user sends the message, with an in-app Pictures gallery and local metadata index.
|
|
25
|
+
- **Image Privacy Hardening:** Chat history no longer stores raw image base64 data for saved images; history keeps a text placeholder while the actual file stays in the local Pictures folder.
|
|
26
|
+
- **Theme & UI Controls:** Settings now include theme, accent color, system text color, glass blur, font family, and font size controls that apply to the desktop interface.
|
|
23
27
|
- **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
28
|
- **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
29
|
- **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.
|
|
@@ -33,8 +37,76 @@ Mint is an AI assistant built to live in your desktop and terminal. It combines
|
|
|
33
37
|
- **CI & Audit Baseline:** GitHub Actions runs install, tests, and security audit. Current local test baseline is `137` passing tests and `0` high vulnerabilities.
|
|
34
38
|
- **Dependency Hardening:** Removed vulnerable `google-tts-api` and `xlsx`; replaced with internal Google TTS URL generation and `read-excel-file`.
|
|
35
39
|
|
|
40
|
+
## Installation & Setup
|
|
41
|
+
|
|
42
|
+
### Global Install
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm install -g @pheem49/mint@latest
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Local Development
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
git clone https://github.com/Pheem49/Mint.git
|
|
52
|
+
cd Mint
|
|
53
|
+
npm install
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Quick Start
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
mint onboard
|
|
60
|
+
mint
|
|
61
|
+
npm start
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Most integrations can be configured from:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
mint onboard
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Gmail
|
|
71
|
+
|
|
72
|
+
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.
|
|
73
|
+
|
|
74
|
+
After onboarding, run one of:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
mint gmail auth
|
|
78
|
+
mint gmail auth --no-open
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`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.
|
|
82
|
+
|
|
83
|
+
### Google Calendar
|
|
84
|
+
|
|
85
|
+
Google Calendar uses OAuth credentials and a refresh token. Onboarding stores:
|
|
86
|
+
|
|
87
|
+
- `googleCalendarClientId`
|
|
88
|
+
- `googleCalendarClientSecret`
|
|
89
|
+
- `googleCalendarRefreshToken`
|
|
90
|
+
- `googleCalendarId`, usually `primary`
|
|
91
|
+
|
|
92
|
+
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.
|
|
93
|
+
|
|
94
|
+
### Notion
|
|
95
|
+
|
|
96
|
+
Notion uses an internal integration secret. After creating an integration in Notion, share the target page or database with that integration, then configure:
|
|
97
|
+
|
|
98
|
+
- `notionApiKey`
|
|
99
|
+
- `notionDatabaseId`, optional default database
|
|
100
|
+
- `notionPageId`, optional default page
|
|
101
|
+
- `notionTitleProperty`, default `Name`
|
|
102
|
+
|
|
103
|
+
The plugin can create pages, query database pages, and append text blocks.
|
|
104
|
+
|
|
36
105
|
## Key Features
|
|
37
106
|
|
|
107
|
+
<details>
|
|
108
|
+
<summary>Show details</summary>
|
|
109
|
+
|
|
38
110
|
### Unified CLI Agent
|
|
39
111
|
|
|
40
112
|
Mint CLI is not just a chat wrapper. It is a workspace-aware agent loop.
|
|
@@ -44,7 +116,7 @@ Mint CLI is not just a chat wrapper. It is a workspace-aware agent loop.
|
|
|
44
116
|
- **Live Answer Rendering:** Final answers are streamed into a single Mint message block as they arrive.
|
|
45
117
|
- **Conversational + Coding in One Flow:** Casual messages can finish directly; coding tasks can inspect, plan, edit, and verify.
|
|
46
118
|
- **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.
|
|
119
|
+
- **Tool Use:** Supports web search, file listing, file reading, scoped code search, path finding, shell commands, patch edits, file writes, opening folders, and asking the user.
|
|
48
120
|
- **Approval Flow:** Shell commands, patches, and full-file writes require user approval.
|
|
49
121
|
- **Provider Support:** Gemini, OpenAI, Anthropic, and local OpenAI-compatible endpoints for agent tasks.
|
|
50
122
|
- **Agent Collaboration Option:** Optional reviewer pass can be enabled for longer tasks.
|
|
@@ -52,6 +124,9 @@ Mint CLI is not just a chat wrapper. It is a workspace-aware agent loop.
|
|
|
52
124
|
### Desktop Assistant
|
|
53
125
|
|
|
54
126
|
- **Electron Desktop UI:** Transparent desktop assistant window with tray support.
|
|
127
|
+
- **Collapsible Workspace Sidebar:** Desktop navigation starts collapsed on app launch and can be expanded for Chat, Pictures, model controls, and settings.
|
|
128
|
+
- **Chat Navigation Safety:** `New Chat` and `Clear` ask for confirmation before clearing the current conversation history.
|
|
129
|
+
- **Pictures Gallery:** Sent images are available in a local-only Pictures view inside the desktop app.
|
|
55
130
|
- **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
131
|
- **Live2D Expressions:** Cycle model expressions from the toolbar and show an on-canvas expression toast for the active expression.
|
|
57
132
|
- **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.
|
|
@@ -64,6 +139,7 @@ Mint CLI is not just a chat wrapper. It is a workspace-aware agent loop.
|
|
|
64
139
|
- **Proactive Suggestions:** Periodic screen/context analysis with behavior memory.
|
|
65
140
|
- **System Notifications:** Low battery, connection changes, and proactive notices.
|
|
66
141
|
- **Settings UI:** Configure provider, model, theme, keys, bridge options, MCP, and assistant behavior.
|
|
142
|
+
- **Appearance Controls:** Customize theme, accent color, text color, glass blur, font family, and UI font size.
|
|
67
143
|
|
|
68
144
|
### Automation
|
|
69
145
|
|
|
@@ -78,6 +154,8 @@ Mint CLI is not just a chat wrapper. It is a workspace-aware agent loop.
|
|
|
78
154
|
### Knowledge and Memory
|
|
79
155
|
|
|
80
156
|
- **Chat History:** Persistent local chat transcript.
|
|
157
|
+
- **Timestamp Preservation:** Desktop chat history keeps original message timestamps across app restarts and history syncs.
|
|
158
|
+
- **Local Sent-Image Storage:** Desktop image attachments are saved as local files only after sending, under `~/.config/mint/Pictures`.
|
|
81
159
|
- **Behavior Memory:** Stores recurring user context for proactive suggestions.
|
|
82
160
|
- **Long-Term Memory Store:** SQLite-backed user context, session memories, usage patterns, and response cache.
|
|
83
161
|
- **Learned Skill Files:** Import `.md` or `.txt` instruction files with `mint learn <path>` or `/learn <path>`. Mint remembers them as persistent skill/instruction context.
|
|
@@ -128,8 +206,13 @@ Example:
|
|
|
128
206
|
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
207
|
```
|
|
130
208
|
|
|
209
|
+
</details>
|
|
210
|
+
|
|
131
211
|
## Safety System
|
|
132
212
|
|
|
213
|
+
<details>
|
|
214
|
+
<summary>Show details</summary>
|
|
215
|
+
|
|
133
216
|
Mint includes a central safety layer in `src/System/safety_manager.js`.
|
|
134
217
|
|
|
135
218
|
- **Permission Tiers:** `safe`, `approval`, `dangerous`, and `blocked`.
|
|
@@ -140,43 +223,33 @@ Mint includes a central safety layer in `src/System/safety_manager.js`.
|
|
|
140
223
|
- **Action Logs:** Writes JSONL records to `~/.config/mint/action-log.jsonl`.
|
|
141
224
|
- **Test Coverage:** Safety tests verify destructive command blocking, dangerous action classification, path traversal protection, and action executor enforcement.
|
|
142
225
|
|
|
226
|
+
</details>
|
|
227
|
+
|
|
143
228
|
## Screenshots
|
|
144
229
|
|
|
230
|
+
<details>
|
|
231
|
+
<summary>Show screenshots</summary>
|
|
232
|
+
|
|
145
233
|
<p align="center">
|
|
146
234
|
<img src="assets/Agent_Mint.png" alt="Mint Desktop UI" width="48%">
|
|
147
235
|
<img src="assets/Settings.png" alt="Mint Settings" width="48%">
|
|
236
|
+
<br>
|
|
237
|
+
<sub><strong>Desktop Assistant UI</strong> with Live2D model, chat panel, sidebar navigation, and local Pictures view. <strong>Settings UI</strong> for providers, automation, theme, voice, plugins, and MCP configuration.</sub>
|
|
148
238
|
</p>
|
|
149
239
|
|
|
150
240
|
<p align="center">
|
|
151
241
|
<img src="assets/CLI_Screen.png" alt="Mint CLI" width="100%">
|
|
242
|
+
<br>
|
|
243
|
+
<sub><strong>Unified CLI Agent</strong> for chat, coding tasks, tool use, workspace context, image input, and command workflows.</sub>
|
|
152
244
|
</p>
|
|
153
245
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
### Global Install
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
npm install -g @pheem49/mint@latest
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### Local Development
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
git clone https://github.com/Pheem49/Mint.git
|
|
166
|
-
cd Mint
|
|
167
|
-
npm install
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
## Quick Start
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
mint onboard
|
|
174
|
-
mint
|
|
175
|
-
npm start
|
|
176
|
-
```
|
|
246
|
+
</details>
|
|
177
247
|
|
|
178
248
|
## CLI Commands
|
|
179
249
|
|
|
250
|
+
<details>
|
|
251
|
+
<summary>Show details</summary>
|
|
252
|
+
|
|
180
253
|
- `mint` / `mint chat` - Start the unified interactive agent UI.
|
|
181
254
|
- `mint chat "<message>"` - Start with an initial message.
|
|
182
255
|
- `mint chat --image ./screenshot.png "What is on this screen?"` - Attach an image to the initial chat message.
|
|
@@ -201,8 +274,13 @@ npm start
|
|
|
201
274
|
- `mint list` - Display available features and commands.
|
|
202
275
|
- `mint onboard` - Configure Mint for first use.
|
|
203
276
|
|
|
277
|
+
</details>
|
|
278
|
+
|
|
204
279
|
## CLI Updates
|
|
205
280
|
|
|
281
|
+
<details>
|
|
282
|
+
<summary>Show details</summary>
|
|
283
|
+
|
|
206
284
|
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.
|
|
207
285
|
|
|
208
286
|
Use manual update commands when you want direct control:
|
|
@@ -221,51 +299,13 @@ MINT_SKIP_AUTO_UPDATE=1 mint
|
|
|
221
299
|
|
|
222
300
|
To disable automatic update checks, set `enableAutoUpdate` to `false` in your Mint config file.
|
|
223
301
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
Most integrations can be configured from:
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
mint onboard
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
### Gmail
|
|
233
|
-
|
|
234
|
-
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.
|
|
235
|
-
|
|
236
|
-
After onboarding, run one of:
|
|
237
|
-
|
|
238
|
-
```bash
|
|
239
|
-
mint gmail auth
|
|
240
|
-
mint gmail auth --no-open
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
`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.
|
|
244
|
-
|
|
245
|
-
### Google Calendar
|
|
246
|
-
|
|
247
|
-
Google Calendar uses OAuth credentials and a refresh token. Onboarding stores:
|
|
248
|
-
|
|
249
|
-
- `googleCalendarClientId`
|
|
250
|
-
- `googleCalendarClientSecret`
|
|
251
|
-
- `googleCalendarRefreshToken`
|
|
252
|
-
- `googleCalendarId`, usually `primary`
|
|
253
|
-
|
|
254
|
-
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.
|
|
255
|
-
|
|
256
|
-
### Notion
|
|
257
|
-
|
|
258
|
-
Notion uses an internal integration secret. After creating an integration in Notion, share the target page or database with that integration, then configure:
|
|
259
|
-
|
|
260
|
-
- `notionApiKey`
|
|
261
|
-
- `notionDatabaseId`, optional default database
|
|
262
|
-
- `notionPageId`, optional default page
|
|
263
|
-
- `notionTitleProperty`, default `Name`
|
|
264
|
-
|
|
265
|
-
The plugin can create pages, query database pages, and append text blocks.
|
|
302
|
+
</details>
|
|
266
303
|
|
|
267
304
|
## Interactive Slash Commands
|
|
268
305
|
|
|
306
|
+
<details>
|
|
307
|
+
<summary>Show details</summary>
|
|
308
|
+
|
|
269
309
|
Inside `mint`:
|
|
270
310
|
|
|
271
311
|
- `/help` - Show commands.
|
|
@@ -292,8 +332,13 @@ Inside `mint`:
|
|
|
292
332
|
- `/review` - Ask reviewer persona to critique the last answer.
|
|
293
333
|
- `/exit` - Exit.
|
|
294
334
|
|
|
335
|
+
</details>
|
|
336
|
+
|
|
295
337
|
## Development
|
|
296
338
|
|
|
339
|
+
<details>
|
|
340
|
+
<summary>Show details</summary>
|
|
341
|
+
|
|
297
342
|
```bash
|
|
298
343
|
npm test
|
|
299
344
|
npm test -- --runInBand
|
|
@@ -302,8 +347,13 @@ npm start
|
|
|
302
347
|
npm run build:linux
|
|
303
348
|
```
|
|
304
349
|
|
|
350
|
+
</details>
|
|
351
|
+
|
|
305
352
|
## Project Structure
|
|
306
353
|
|
|
354
|
+
<details>
|
|
355
|
+
<summary>Show details</summary>
|
|
356
|
+
|
|
307
357
|
```text
|
|
308
358
|
Mint/
|
|
309
359
|
├── main.js # Electron bootstrap and wiring
|
|
@@ -323,23 +373,39 @@ Mint/
|
|
|
323
373
|
└── package.json
|
|
324
374
|
```
|
|
325
375
|
|
|
376
|
+
</details>
|
|
377
|
+
|
|
326
378
|
## Runtime Notes
|
|
327
379
|
|
|
380
|
+
<details>
|
|
381
|
+
<summary>Show details</summary>
|
|
382
|
+
|
|
328
383
|
- Mint is currently a **Node.js + CommonJS** project, not TypeScript.
|
|
329
384
|
- API keys are stored locally in Mint config or environment variables.
|
|
330
385
|
- Google OAuth refresh tokens for Gmail and Calendar are stored locally in Mint config.
|
|
386
|
+
- Desktop chat images sent by the user are stored locally in `~/.config/mint/Pictures`, with metadata in `~/.config/mint/Pictures/pictures.json`.
|
|
387
|
+
- Desktop chat history is stored locally in `~/.config/mint/mint-chat-history.json`.
|
|
331
388
|
- Local OpenAI-compatible providers require a running local server such as LM Studio.
|
|
332
389
|
- Some desktop features depend on Linux tools such as `xdg-open`, `gio`, `xdotool`, `amixer`, `pactl`, `brightnessctl`, or `xbacklight`.
|
|
333
390
|
- Electron GUI behavior should be smoke-tested manually after large UI or main-process changes.
|
|
334
391
|
|
|
392
|
+
</details>
|
|
393
|
+
|
|
335
394
|
## Security & Privacy
|
|
336
395
|
|
|
396
|
+
<details>
|
|
397
|
+
<summary>Show details</summary>
|
|
398
|
+
|
|
337
399
|
- **Local Control:** Mint prioritizes local execution and local configuration.
|
|
400
|
+
- **Local Picture Storage:** Desktop images are saved only on the user's machine, under `~/.config/mint/Pictures`, after the user sends a message with an image.
|
|
401
|
+
- **No Raw Image History:** Saved desktop images are omitted from chat history as raw base64 and replaced with a text placeholder.
|
|
338
402
|
- **User Approval:** Shell commands, patches, and file writes require explicit approval in the CLI agent.
|
|
339
403
|
- **Safety Manager:** Dangerous commands and actions are blocked or gated by deterministic policy.
|
|
340
404
|
- **Action Audit Trail:** Tool actions are logged locally for debugging and accountability.
|
|
341
405
|
- **Secure Config Practice:** Keys stay on the user's machine and are only sent to the selected AI/search provider.
|
|
342
406
|
|
|
407
|
+
</details>
|
|
408
|
+
|
|
343
409
|
## License
|
|
344
410
|
|
|
345
411
|
Mint is licensed under the **GNU Affero General Public License v3.0**.
|
package/assets/Agent_Mint.png
CHANGED
|
Binary file
|
package/assets/Settings.png
CHANGED
|
Binary file
|
package/main.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
const { app, BrowserWindow, ipcMain, shell, globalShortcut, clipboard } = require('electron');
|
|
2
2
|
require('dotenv').config();
|
|
3
3
|
|
|
4
|
+
// Linux docks match running windows to a .desktop file through WM_CLASS.
|
|
5
|
+
app.setName('Mint');
|
|
6
|
+
if (process.platform === 'linux') {
|
|
7
|
+
app.commandLine.appendSwitch('class', 'Mint');
|
|
8
|
+
if (typeof app.setDesktopName === 'function') {
|
|
9
|
+
app.setDesktopName('mint-ai.desktop');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
4
13
|
const { getSystemInfo, getWeather } = require('./src/System/system_info');
|
|
5
14
|
const { readConfig, writeConfig } = require('./src/System/config_manager');
|
|
6
15
|
const { parseCommand } = require('./src/Command_Parser/parser');
|
|
@@ -9,6 +18,7 @@ const { createWindowManager } = require('./src/System/window_manager');
|
|
|
9
18
|
const { createProactiveLoop } = require('./src/System/proactive_loop');
|
|
10
19
|
const { createScreenCaptureController } = require('./src/System/screen_capture');
|
|
11
20
|
const { registerIpcHandlers } = require('./src/System/ipc_handlers');
|
|
21
|
+
const { saveChatImages, listSavedPictures } = require('./src/System/picture_store');
|
|
12
22
|
|
|
13
23
|
const systemEvents = require('./src/System/system_events');
|
|
14
24
|
const customWorkflows = require('./src/System/custom_workflows');
|
|
@@ -57,6 +67,8 @@ registerIpcHandlers({
|
|
|
57
67
|
getWeather,
|
|
58
68
|
readConfig,
|
|
59
69
|
writeConfig,
|
|
70
|
+
saveChatImages,
|
|
71
|
+
listSavedPictures,
|
|
60
72
|
parseCommand,
|
|
61
73
|
executeAction: (...args) => getActionExecutor().executeAction(...args),
|
|
62
74
|
getGoogleTtsUrls,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pheem49/mint",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "A powerful Electron-based AI desktop assistant powered by Google Gemini, featuring screen vision, web automation, and proactive suggestions.",
|
|
5
5
|
"main": "main.js",
|
|
6
6
|
"scripts": {
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"build:mac": "electron-builder --mac",
|
|
12
12
|
"build:win": "electron-builder --win",
|
|
13
13
|
"build:all": "electron-builder --linux --mac --win",
|
|
14
|
-
"cli": "node mint-cli.js"
|
|
14
|
+
"cli": "node mint-cli.js",
|
|
15
|
+
"install:desktop": "node scripts/install_linux_desktop_entry.js"
|
|
15
16
|
},
|
|
16
17
|
"jest": {
|
|
17
18
|
"testEnvironment": "node",
|
package/preload.js
CHANGED
|
@@ -8,6 +8,7 @@ contextBridge.exposeInMainWorld('api', {
|
|
|
8
8
|
maximizeWindow: () => ipcRenderer.send('maximize-window'),
|
|
9
9
|
resetChat: () => ipcRenderer.invoke('reset-chat'),
|
|
10
10
|
getChatHistory: () => ipcRenderer.invoke('get-chat-history'),
|
|
11
|
+
listSavedPictures: () => ipcRenderer.invoke('list-saved-pictures'),
|
|
11
12
|
openSettings: () => ipcRenderer.invoke('open-settings'),
|
|
12
13
|
// Clipboard
|
|
13
14
|
readClipboard: () => ipcRenderer.invoke('clipboard-read'),
|
|
@@ -17,6 +18,7 @@ contextBridge.exposeInMainWorld('api', {
|
|
|
17
18
|
getWeather: (city) => ipcRenderer.invoke('get-weather', city),
|
|
18
19
|
// Settings
|
|
19
20
|
getSettings: () => ipcRenderer.invoke('get-settings'),
|
|
21
|
+
saveSettings: (config) => ipcRenderer.invoke('save-settings', config),
|
|
20
22
|
// Listen for settings changes from other window
|
|
21
23
|
onSettingsChanged: (callback) => ipcRenderer.on('settings-changed', (event, data) => callback(data)),
|
|
22
24
|
// Vision
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const os = require('os');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
if (process.platform !== 'linux') {
|
|
8
|
+
console.log('Desktop entry installation is only needed on Linux.');
|
|
9
|
+
process.exit(0);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const projectRoot = path.resolve(__dirname, '..');
|
|
13
|
+
const home = os.homedir();
|
|
14
|
+
const iconSource = path.join(projectRoot, 'assets', 'icon.png');
|
|
15
|
+
const iconTargets = [16, 24, 32, 48, 64, 128, 256, 512].map(size =>
|
|
16
|
+
path.join(home, '.local', 'share', 'icons', 'hicolor', `${size}x${size}`, 'apps', 'mint-ai.png')
|
|
17
|
+
);
|
|
18
|
+
const desktopTarget = path.join(home, '.local', 'share', 'applications', 'mint-ai.desktop');
|
|
19
|
+
|
|
20
|
+
if (!fs.existsSync(iconSource)) {
|
|
21
|
+
throw new Error(`Missing icon: ${iconSource}`);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
fs.mkdirSync(path.dirname(desktopTarget), { recursive: true });
|
|
25
|
+
for (const iconTarget of iconTargets) {
|
|
26
|
+
fs.mkdirSync(path.dirname(iconTarget), { recursive: true });
|
|
27
|
+
fs.copyFileSync(iconSource, iconTarget);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const desktopEntry = [
|
|
31
|
+
'[Desktop Entry]',
|
|
32
|
+
'Type=Application',
|
|
33
|
+
'Name=Mint',
|
|
34
|
+
'Comment=Mint AI desktop assistant',
|
|
35
|
+
`Exec=${process.execPath} ${path.join(projectRoot, 'node_modules', 'electron', 'cli.js')} ${projectRoot}`,
|
|
36
|
+
'Icon=mint-ai',
|
|
37
|
+
'Terminal=false',
|
|
38
|
+
'Categories=Utility;',
|
|
39
|
+
'StartupNotify=true',
|
|
40
|
+
'StartupWMClass=Mint',
|
|
41
|
+
''
|
|
42
|
+
].join('\n');
|
|
43
|
+
|
|
44
|
+
fs.writeFileSync(desktopTarget, desktopEntry, 'utf8');
|
|
45
|
+
fs.chmodSync(desktopTarget, 0o755);
|
|
46
|
+
|
|
47
|
+
console.log(`Installed ${desktopTarget}`);
|
|
48
|
+
console.log(`Installed ${iconTargets.length} icon sizes as mint-ai`);
|