@pheem49/mint 1.5.1 → 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 +140 -66
- package/assets/Agent_Mint.png +0 -0
- package/assets/Settings.png +0 -0
- package/main.js +12 -0
- package/mint-cli.js +148 -921
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//345/221/206/347/214/253.exp3.json +31 -1
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//347/202/271/344/270/200/344/270/213.exp3.json +6 -1
- package/package.json +20 -21
- 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/proactive_engine.js +12 -2
- package/src/AI_Brain/provider_adapter.js +358 -0
- package/src/Automation_Layer/browser_automation.js +26 -24
- package/src/CLI/approval_handler.js +47 -0
- package/src/CLI/chat_router.js +7 -0
- package/src/CLI/chat_ui.js +586 -80
- package/src/CLI/cli_colors.js +115 -0
- package/src/CLI/cli_formatters.js +94 -0
- package/src/CLI/code_agent.js +825 -283
- package/src/CLI/intent_detectors.js +181 -0
- package/src/CLI/interactive_chat.js +641 -0
- package/src/CLI/list_features.js +3 -0
- package/src/CLI/repo_summarizer.js +282 -0
- package/src/CLI/semantic_code_search.js +312 -0
- package/src/CLI/skill_manager.js +41 -0
- package/src/CLI/slash_command_handler.js +418 -0
- package/src/CLI/symbol_indexer.js +231 -0
- package/src/CLI/updater.js +21 -1
- package/src/Channels/discord_bridge.js +11 -13
- package/src/Channels/line_bridge.js +10 -10
- package/src/Channels/slack_bridge.js +7 -12
- package/src/Channels/telegram_bridge.js +6 -14
- package/src/Channels/whatsapp_bridge.js +11 -9
- package/src/System/chat_history_manager.js +20 -12
- package/src/System/config_manager.js +4 -1
- package/src/System/ipc_handlers.js +10 -0
- package/src/System/optional_require.js +23 -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 +246 -14
- package/src/UI/renderer.js +620 -45
- package/src/UI/settings.css +738 -439
- package/src/UI/settings.html +487 -432
- package/src/UI/settings.js +44 -10
- package/src/UI/styles.css +1403 -106
- 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.
|
|
@@ -185,6 +258,10 @@ npm start
|
|
|
185
258
|
- `mint learn ./skill.md` - Read a local `.md` or `.txt` file and remember it as a persistent Mint skill/instruction.
|
|
186
259
|
- `mint learn --list` - List learned skill files.
|
|
187
260
|
- `mint learn --delete <id|path|name>` - Delete a learned skill by ID, path, or file name.
|
|
261
|
+
- `mint summarize [path]` - Summarize repository structure, package metadata, git state, and key files.
|
|
262
|
+
- `mint symbols [path]` - Build a local source symbol index for supported code files.
|
|
263
|
+
- `mint semantic-code index [path]` - Create embeddings for local source code chunks.
|
|
264
|
+
- `mint semantic-code search "<query>"` - Search the indexed code semantically.
|
|
188
265
|
- `mint code "<task>"` - Run a specific coding task in the current workspace.
|
|
189
266
|
- `mint code --image ./mockup.png "Build this UI"` - Attach an image as visual context for a coding task.
|
|
190
267
|
- `mint gmail auth` - Open Google OAuth and save a Gmail refresh token.
|
|
@@ -197,8 +274,13 @@ npm start
|
|
|
197
274
|
- `mint list` - Display available features and commands.
|
|
198
275
|
- `mint onboard` - Configure Mint for first use.
|
|
199
276
|
|
|
277
|
+
</details>
|
|
278
|
+
|
|
200
279
|
## CLI Updates
|
|
201
280
|
|
|
281
|
+
<details>
|
|
282
|
+
<summary>Show details</summary>
|
|
283
|
+
|
|
202
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.
|
|
203
285
|
|
|
204
286
|
Use manual update commands when you want direct control:
|
|
@@ -217,55 +299,21 @@ MINT_SKIP_AUTO_UPDATE=1 mint
|
|
|
217
299
|
|
|
218
300
|
To disable automatic update checks, set `enableAutoUpdate` to `false` in your Mint config file.
|
|
219
301
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
Most integrations can be configured from:
|
|
223
|
-
|
|
224
|
-
```bash
|
|
225
|
-
mint onboard
|
|
226
|
-
```
|
|
227
|
-
|
|
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
|
-
|
|
234
|
-
```bash
|
|
235
|
-
mint gmail auth
|
|
236
|
-
mint gmail auth --no-open
|
|
237
|
-
```
|
|
238
|
-
|
|
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.
|
|
302
|
+
</details>
|
|
262
303
|
|
|
263
304
|
## Interactive Slash Commands
|
|
264
305
|
|
|
306
|
+
<details>
|
|
307
|
+
<summary>Show details</summary>
|
|
308
|
+
|
|
265
309
|
Inside `mint`:
|
|
266
310
|
|
|
267
311
|
- `/help` - Show commands.
|
|
268
312
|
- `/fast [on|off|status]` - Toggle Fast Mode. Fast Mode shows `[Fast]`, keeps `Mint is thinking...`, and hides `Thinking:`/progress trace messages.
|
|
313
|
+
- `/summarize [path] [--json]` - Summarize the current repository without using the AI agent.
|
|
314
|
+
- `/symbols [path] [--json] [--limit n]` - Build a local source symbol index without using the AI agent.
|
|
315
|
+
- `/semantic-code index` - Create embeddings for source code chunks in the current workspace.
|
|
316
|
+
- `/semantic-code search <query>` - Search the indexed code semantically.
|
|
269
317
|
- `/learn <path>` - Read a local `.md` or `.txt` file and remember it as a persistent Mint skill/instruction.
|
|
270
318
|
- `/memory skills` - Show learned skill files.
|
|
271
319
|
- `/memory skills delete <id|path|name>` - Delete a learned skill.
|
|
@@ -284,8 +332,13 @@ Inside `mint`:
|
|
|
284
332
|
- `/review` - Ask reviewer persona to critique the last answer.
|
|
285
333
|
- `/exit` - Exit.
|
|
286
334
|
|
|
335
|
+
</details>
|
|
336
|
+
|
|
287
337
|
## Development
|
|
288
338
|
|
|
339
|
+
<details>
|
|
340
|
+
<summary>Show details</summary>
|
|
341
|
+
|
|
289
342
|
```bash
|
|
290
343
|
npm test
|
|
291
344
|
npm test -- --runInBand
|
|
@@ -294,8 +347,13 @@ npm start
|
|
|
294
347
|
npm run build:linux
|
|
295
348
|
```
|
|
296
349
|
|
|
350
|
+
</details>
|
|
351
|
+
|
|
297
352
|
## Project Structure
|
|
298
353
|
|
|
354
|
+
<details>
|
|
355
|
+
<summary>Show details</summary>
|
|
356
|
+
|
|
299
357
|
```text
|
|
300
358
|
Mint/
|
|
301
359
|
├── main.js # Electron bootstrap and wiring
|
|
@@ -315,23 +373,39 @@ Mint/
|
|
|
315
373
|
└── package.json
|
|
316
374
|
```
|
|
317
375
|
|
|
376
|
+
</details>
|
|
377
|
+
|
|
318
378
|
## Runtime Notes
|
|
319
379
|
|
|
380
|
+
<details>
|
|
381
|
+
<summary>Show details</summary>
|
|
382
|
+
|
|
320
383
|
- Mint is currently a **Node.js + CommonJS** project, not TypeScript.
|
|
321
384
|
- API keys are stored locally in Mint config or environment variables.
|
|
322
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`.
|
|
323
388
|
- Local OpenAI-compatible providers require a running local server such as LM Studio.
|
|
324
389
|
- Some desktop features depend on Linux tools such as `xdg-open`, `gio`, `xdotool`, `amixer`, `pactl`, `brightnessctl`, or `xbacklight`.
|
|
325
390
|
- Electron GUI behavior should be smoke-tested manually after large UI or main-process changes.
|
|
326
391
|
|
|
392
|
+
</details>
|
|
393
|
+
|
|
327
394
|
## Security & Privacy
|
|
328
395
|
|
|
396
|
+
<details>
|
|
397
|
+
<summary>Show details</summary>
|
|
398
|
+
|
|
329
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.
|
|
330
402
|
- **User Approval:** Shell commands, patches, and file writes require explicit approval in the CLI agent.
|
|
331
403
|
- **Safety Manager:** Dangerous commands and actions are blocked or gated by deterministic policy.
|
|
332
404
|
- **Action Audit Trail:** Tool actions are logged locally for debugging and accountability.
|
|
333
405
|
- **Secure Config Practice:** Keys stay on the user's machine and are only sent to the selected AI/search provider.
|
|
334
406
|
|
|
407
|
+
</details>
|
|
408
|
+
|
|
335
409
|
## License
|
|
336
410
|
|
|
337
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,
|