@pheem49/mint 1.5.0 → 1.5.2
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/README.md +35 -1
- package/main.js +28 -14
- package/mint-cli-logic.js +3 -119
- package/mint-cli.js +201 -500
- package/models/Shiroko_Model/Shiroko/Shiroko_Core/72d86db84cfa9730b894c241fd24c0db.png +0 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core/items_pinned_to_model.json +14 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//345/221/206/347/214/253.exp3.json +40 -0
- 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
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//345/233/264/350/243/231.exp3.json +10 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//346/213/215/347/205/247.exp3.json +50 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//346/213/277/347/254/224.exp3.json +10 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//347/202/271/344/270/200/344/270/213.exp3.json +15 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//347/214/253/345/222/252/346/273/244/351/225/234.exp3.json +10 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//347/234/274/351/225/234.exp3.json +10 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.4096/texture_00.png +0 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.4096/texture_01.png +0 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.4096/texture_02.png +0 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.4096/texture_03.png +0 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.cdi3.json +1498 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.moc3 +0 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.model3.json +47 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.physics3.json +6658 -0
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.vtube.json +1299 -0
- 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
- package/package.json +40 -17
- package/src/AI_Brain/Gemini_API.js +147 -46
- package/src/AI_Brain/autonomous_brain.js +2 -1
- package/src/AI_Brain/memory_store.js +299 -3
- package/src/AI_Brain/proactive_engine.js +12 -2
- package/src/Automation_Layer/browser_automation.js +26 -24
- package/src/CLI/approval_handler.js +42 -0
- package/src/CLI/chat_router.js +18 -6
- package/src/CLI/chat_ui.js +583 -52
- package/src/CLI/cli_colors.js +32 -0
- package/src/CLI/cli_formatters.js +89 -0
- package/src/CLI/code_agent.js +369 -71
- package/src/CLI/image_input.js +90 -0
- package/src/CLI/intent_detectors.js +181 -0
- package/src/CLI/interactive_chat.js +479 -0
- package/src/CLI/list_features.js +3 -0
- package/src/CLI/onboarding.js +72 -15
- 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 +6 -4
- 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/action_executor.js +59 -10
- package/src/System/chat_history_manager.js +20 -12
- package/src/System/config_manager.js +31 -1
- package/src/System/granular_automation.js +122 -53
- package/src/System/optional_require.js +23 -0
- package/src/System/proactive_loop.js +19 -3
- package/src/System/safety_manager.js +108 -0
- package/src/System/sandbox_runner.js +182 -0
- package/src/System/system_automation.js +127 -81
- package/src/System/system_info.js +70 -0
- package/src/System/tool_registry.js +280 -0
- package/src/System/window_manager.js +4 -2
- package/src/UI/live2d_manager.js +566 -0
- package/src/UI/renderer.js +339 -21
- package/src/UI/settings.css +655 -420
- package/src/UI/settings.html +478 -432
- package/src/UI/settings.js +10 -8
- package/src/UI/styles.css +516 -31
- package/.codex +0 -0
- package/docs/assets/Agent_Mint.png +0 -0
- package/docs/assets/CLI_Screen.png +0 -0
- package/docs/assets/Settings.png +0 -0
- package/docs/assets/icon.png +0 -0
- package/docs/guide.html +0 -632
- package/docs/index.html +0 -133
- package/docs/style.css +0 -579
- package/index.html +0 -16
- package/src/UI/index.html +0 -126
- package/tech_news.txt +0 -3
- package/test_knowledge.txt +0 -3
- package/tests/action_executor_safety.test.js +0 -67
- package/tests/agent_orchestrator.test.js +0 -41
- package/tests/chat_router.test.js +0 -42
- package/tests/code_agent.test.js +0 -69
- package/tests/config_manager.test.js +0 -141
- package/tests/docker.test.js +0 -46
- package/tests/file_operations.test.js +0 -57
- package/tests/gmail.test.js +0 -135
- package/tests/gmail_auth.test.js +0 -129
- package/tests/google_calendar.test.js +0 -113
- package/tests/google_tts_urls.test.js +0 -24
- package/tests/memory_store.test.js +0 -185
- package/tests/notion.test.js +0 -121
- package/tests/provider_routing.test.js +0 -83
- package/tests/safety_manager.test.js +0 -40
- package/tests/spotify.test.js +0 -201
- package/tests/system_monitor.test.js +0 -37
- package/tests/updater.test.js +0 -32
- package/tests/workspace_manager.test.js +0 -56
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ANSI color constants for Mint CLI output.
|
|
5
|
+
*/
|
|
6
|
+
const colors = {
|
|
7
|
+
reset: '\x1b[0m',
|
|
8
|
+
bright: '\x1b[1m',
|
|
9
|
+
mint: '\x1b[38;5;121m',
|
|
10
|
+
pink: '\x1b[38;5;213m',
|
|
11
|
+
gray: '\x1b[90m',
|
|
12
|
+
cyan: '\x1b[36m',
|
|
13
|
+
yellow: '\x1b[33m'
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
let isExiting = false;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Restore terminal state, print goodbye, and exit.
|
|
20
|
+
* @param {number} [code=0]
|
|
21
|
+
*/
|
|
22
|
+
function exitWithGoodbye(code = 0) {
|
|
23
|
+
if (isExiting) return;
|
|
24
|
+
isExiting = true;
|
|
25
|
+
|
|
26
|
+
process.stdout.write('\x1b[?1000l\x1b[?1002l\x1b[?1003l\x1b[?1006l');
|
|
27
|
+
process.stdout.write('\x1b[?25h');
|
|
28
|
+
console.log(`\n${colors.pink}Goodbye! See you again soon!${colors.reset}\n`);
|
|
29
|
+
process.exit(code);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
module.exports = { colors, exitWithGoodbye };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { colors } = require('./cli_colors');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Formats a code-agent progress event into a console-friendly string.
|
|
7
|
+
* @param {string|object} info
|
|
8
|
+
* @returns {string}
|
|
9
|
+
*/
|
|
10
|
+
function formatProgress(info) {
|
|
11
|
+
if (typeof info === 'string') return `${colors.gray}[Mint Code] ${info}${colors.reset}`;
|
|
12
|
+
|
|
13
|
+
const { action, target, message } = info;
|
|
14
|
+
|
|
15
|
+
if (action === 'ask_user') {
|
|
16
|
+
return `\n${colors.mint}✓${colors.reset} ${colors.bright}Ask User${colors.reset}\n${colors.gray} ${target || message || ''}${colors.reset}`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let icon = `${colors.mint}✓${colors.reset}`;
|
|
20
|
+
let label = action || info.phase;
|
|
21
|
+
let color = colors.reset;
|
|
22
|
+
|
|
23
|
+
switch (action) {
|
|
24
|
+
case 'thinking':
|
|
25
|
+
return `\n${colors.yellow}* ${colors.bright}Thinking${colors.reset}`;
|
|
26
|
+
case 'web_search': label = 'WebSearch'; break;
|
|
27
|
+
case 'list_files':
|
|
28
|
+
case 'find_path': label = 'Explored'; break;
|
|
29
|
+
case 'read_file': label = 'ReadFile'; break;
|
|
30
|
+
case 'search_code': label = 'SearchText'; break;
|
|
31
|
+
case 'apply_patch':
|
|
32
|
+
case 'write_file': label = 'Edited'; break;
|
|
33
|
+
case 'run_shell': label = 'Ran command'; break;
|
|
34
|
+
case 'json_repair':
|
|
35
|
+
icon = '*';
|
|
36
|
+
label = 'Repairing JSON';
|
|
37
|
+
break;
|
|
38
|
+
case 'reviewer_start': label = 'Reviewing'; break;
|
|
39
|
+
default: break;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const content = target || message || '';
|
|
43
|
+
return ` ${icon} ${colors.bright}${label}${colors.reset} ${color}${content}${colors.reset}`;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Formats a list of memory interactions for display.
|
|
48
|
+
* @param {Array} interactions
|
|
49
|
+
* @param {string} [title]
|
|
50
|
+
* @returns {string}
|
|
51
|
+
*/
|
|
52
|
+
function formatMemoryInteractions(interactions, title = 'Remembered interactions') {
|
|
53
|
+
if (!Array.isArray(interactions) || interactions.length === 0) {
|
|
54
|
+
return `${title}:\n(no memories found)`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const lines = [`${title}:`];
|
|
58
|
+
interactions.forEach((item, index) => {
|
|
59
|
+
const when = item.created_at ? ` (${item.created_at})` : '';
|
|
60
|
+
const id = item.id ? `#${item.id} ` : '';
|
|
61
|
+
lines.push(`${index + 1}. ${id}User${when}: ${item.user_text}`);
|
|
62
|
+
lines.push(` Mint: ${item.ai_text}`);
|
|
63
|
+
});
|
|
64
|
+
return lines.join('\n');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Splits a response text into sentence-level chunks for streaming.
|
|
69
|
+
* @param {string} text
|
|
70
|
+
* @returns {string[]}
|
|
71
|
+
*/
|
|
72
|
+
function splitResponseSentences(text) {
|
|
73
|
+
const normalized = String(text || '').replace(/\r\n/g, '\n');
|
|
74
|
+
if (!normalized) return [];
|
|
75
|
+
|
|
76
|
+
const chunks = [];
|
|
77
|
+
let buffer = '';
|
|
78
|
+
for (const char of normalized) {
|
|
79
|
+
buffer += char;
|
|
80
|
+
if (char === '\n' || /[.!?。!?…]/u.test(char)) {
|
|
81
|
+
if (buffer.trim()) chunks.push(buffer);
|
|
82
|
+
buffer = '';
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (buffer.trim()) chunks.push(buffer);
|
|
86
|
+
return chunks.length > 0 ? chunks : [normalized];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
module.exports = { formatProgress, formatMemoryInteractions, splitResponseSentences };
|