minovative-mind-cli 2.14.0 → 2.14.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 +51 -68
- package/dist/services/agent/slashCommands.js +74 -31
- package/dist/services/agent/toolLoop.js +3 -1
- package/dist/services/agent-tools.d.ts +18 -0
- package/dist/services/agent-tools.js +220 -43
- package/dist/services/agent.js +6 -3
- package/dist/services/ai.d.ts +3 -0
- package/dist/services/ai.js +65 -20
- package/dist/services/contextAgent.d.ts +10 -4
- package/dist/services/contextAgent.js +33 -9
- package/dist/services/orchestration/investigationAgent.js +34 -9
- package/dist/services/orchestration/investigationCache.js +19 -9
- package/dist/services/orchestration/readCache.d.ts +1 -0
- package/dist/services/orchestration/readCache.js +5 -2
- package/dist/services/orchestration/scopedTools.js +37 -10
- package/dist/services/orchestration/subAgent.js +16 -2
- package/dist/services/proxyClient.d.ts +6 -0
- package/dist/services/proxyClient.js +24 -10
- package/dist/services/userProfileService.d.ts +14 -0
- package/dist/services/userProfileService.js +105 -3
- package/dist/utils/analysisRunner.d.ts +120 -8
- package/dist/utils/analysisRunner.js +946 -125
- package/dist/utils/contextPrompts.d.ts +39 -0
- package/dist/utils/contextPrompts.js +81 -9
- package/dist/utils/contextRanker.d.ts +216 -0
- package/dist/utils/contextRanker.js +603 -0
- package/dist/utils/dependencyTracer/modules/graph.d.ts +4 -1
- package/dist/utils/dependencyTracer/modules/graph.js +11 -0
- package/dist/utils/dependencyTracer/modules/types.d.ts +10 -0
- package/dist/utils/dependencyTracer.d.ts +25 -0
- package/dist/utils/dependencyTracer.js +34 -0
- package/dist/utils/systemPrompts.d.ts +1 -1
- package/dist/utils/systemPrompts.js +13 -2
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ and hope for the best.
|
|
|
7
7
|
|
|
8
8
|
This CLI does the opposite — it uses a custom built agentic system called,
|
|
9
9
|
**Precision-Context Verification (PCV)** engine to feed lightweight Flash models
|
|
10
|
-
exactly the right context via **AST-level targeted reads
|
|
10
|
+
exactly the right context via **3-tier IR/graph context ranking**, **AST-level targeted reads**, and **asymmetric outline injection**, execute code, verify compilation, execute Property-Based Testing (PBT) suites and diff-scoped mutation audits, and self-correct (if it even needs to), until
|
|
11
11
|
the build/performance metrics are green.
|
|
12
12
|
|
|
13
13
|
> The result: **Genuine Pro reasoning accuracy at Flash-level speed and efficiency.**
|
|
@@ -20,6 +20,7 @@ the build/performance metrics are green.
|
|
|
20
20
|
[](https://github.com/quarantiine/minovative-mind-cli/blob/main/LICENSE.md)
|
|
21
21
|
|
|
22
22
|
- Official Website: [Main Website](https://www.minovativemind.dev/)
|
|
23
|
+
- Pricing & BYOK: [Pricing](https://www.minovativemind.dev/pricing)
|
|
23
24
|
- Latest Updates: [Updates](https://www.minovativemind.dev/updates)
|
|
24
25
|
|
|
25
26
|
---
|
|
@@ -38,13 +39,23 @@ npm install -g minovative-mind-cli
|
|
|
38
39
|
npm install -g minovative-mind-cli
|
|
39
40
|
```
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
### 1. Subscribe to BYOK ($3.99/mo)
|
|
43
|
+
|
|
44
|
+
Minovative Mind CLI operates on a transparent Bring Your Own Key (BYOK) subscription for **$3.99/month** with **0% token markup**.
|
|
45
|
+
|
|
46
|
+
- Subscribe at [minovativemind.dev/pricing](https://www.minovativemind.dev/pricing)
|
|
47
|
+
- 🎉 **Launch Special**: Use promo code **`MMCLI`** at checkout for **1 Month 100% Free** (limited to the first 1,000 developers).
|
|
48
|
+
|
|
49
|
+
### 2. Get your Google AI Studio API Key
|
|
50
|
+
|
|
51
|
+
- Generate your free or paid API key at [Google AI Studio](https://aistudio.google.com).
|
|
52
|
+
|
|
53
|
+
### 3. Login & Start Coding
|
|
43
54
|
|
|
44
55
|
```bash
|
|
45
|
-
minovative-mind-cli login # One-click GitHub sign-in
|
|
56
|
+
minovative-mind-cli login # One-click GitHub or Google sign-in with your subscribed account
|
|
46
57
|
cd your-project
|
|
47
|
-
minovative-mind-cli chat # Start coding
|
|
58
|
+
minovative-mind-cli chat # Start coding (set your key when prompted or via /config-key)
|
|
48
59
|
```
|
|
49
60
|
|
|
50
61
|
Works in any terminal — SSH, Docker, CI pipelines, Vim, Windows Command Prompt, PowerShell, anywhere Node runs.
|
|
@@ -92,7 +103,7 @@ minovative-mind-cli eval -i test_instances.jsonl -o predictions.jsonl -r evaluat
|
|
|
92
103
|
minovative-mind-cli eval -i instances.jsonl --repo astropy/astropy --concurrency 2
|
|
93
104
|
```
|
|
94
105
|
|
|
95
|
-
> **Token Economics & Efficiency**: With AST-level symbol chunking (`targetElements`), SHA-256 context caching, and in-place historical tool response pruning, benchmark evaluations achieve up to **85%–95% lower token usage per instance**, eliminating token-per-minute (TPM) rate limit thrashing while preserving deep reasoning fidelity.
|
|
106
|
+
> **Token Economics & Efficiency**: With deterministic 3-tier IR context ranking, AST-level symbol chunking (`targetElements`), asymmetric outline injection, SHA-256 context caching, and in-place historical tool response pruning, benchmark evaluations achieve up to **85%–95% lower token usage per instance**, eliminating token-per-minute (TPM) rate limit thrashing while preserving deep reasoning fidelity.
|
|
96
107
|
|
|
97
108
|
---
|
|
98
109
|
|
|
@@ -118,39 +129,31 @@ Gemini 3.x models support native provider-level reasoning control via `thinking_
|
|
|
118
129
|
|
|
119
130
|
_(Note: Internal `Minimal` reasoning is strictly reserved for lightweight background micro-agents and is excluded from user-facing selection to ensure optimal coding performance.)_
|
|
120
131
|
|
|
121
|
-
### BYOK (Bring Your Own Key)
|
|
122
|
-
|
|
123
|
-
If you prefer to use your own API key instead of credits, you can configure it via the `/config-key` slash command. **Only API keys from [Google AI Studio](https://aistudio.google.com) are supported** — Vertex AI, OpenAI, and Anthropic keys are not compatible.
|
|
132
|
+
### 🔑 BYOK (Bring Your Own Key) All-Access
|
|
124
133
|
|
|
125
|
-
|
|
126
|
-
- **Error Handling:** If your key is invalid, expired, or you hit rate limits, the CLI will report a `BYOK AI Error`. Please check your API key status in the [Google AI Studio dashboard](https://aistudio.google.com).
|
|
134
|
+
Minovative Mind CLI operates exclusively on a **Bring Your Own Key (BYOK)** model ($3.99/month flat developer subscription with **zero token markups**):
|
|
127
135
|
|
|
128
|
-
|
|
136
|
+
- **Wholesale AI Pricing:** You pay Google AI Studio directly at pure wholesale rates (or $0 on their generous free tier) with no middleman markup or expiring credit packs.
|
|
137
|
+
- **Supported Provider:** **Only API keys from [Google AI Studio](https://aistudio.google.com) are supported** (all Gemini 3.x Flash, Pro, Lite, Thinking, and Experimental models). Vertex AI, OpenAI, and Anthropic keys are not compatible.
|
|
138
|
+
- **Secure Keychain Storage:** Your API key is encrypted and stored locally in your operating system keychain (`keytar` / local secure storage) and is never sent to Minovative Mind servers.
|
|
139
|
+
- **Configuration:** Set or update your key anytime in the chat session via `/config-key`.
|
|
140
|
+
- **Error Handling:** If your key is invalid, expired, or you hit rate limits, the CLI will report a `BYOK AI Error`. Check your key and quota status in the [Google AI Studio dashboard](https://aistudio.google.com).
|
|
129
141
|
|
|
130
|
-
|
|
142
|
+
### 🧠 Adaptive Persona & Pair Programming Memory Bank
|
|
131
143
|
|
|
132
|
-
|
|
133
|
-
- **Complexity Evaluators (`evaluateInvestigationComplexity`)**: `Gemini 3.7 Flash` (Temp 0, native `responseSchema`, `MINIMAL` invariant) — permissive parallel domain partitioning, global override detection, primary sub-path auto-focusing, and dynamic agent assignment recovery.
|
|
134
|
-
- **Context Compressor & Caching**: `Gemini 3.7 Flash` (Temp 0.2, `MINIMAL` invariant) — surgical code distillation for files exceeding 2,000 characters backed by a persistent 2-tier SHA-256 disk cache (`context_cache.json`) capped at 5MB LRU. Files under 2,000 characters retain 100% full fidelity without compression overhead.
|
|
135
|
-
- **AST Symbol Extraction & Targeted Reads**: Polyglot AST declaration extractor (`symbolExtractor.ts`) enabling granular `targetElements` symbol chunking in `read_file`, slashing input token bloat by up to 85%–95%.
|
|
136
|
-
- **In-Place Tool History Pruning**: Active working memory management preserving raw workspace file blocks while compacting historical command/test outputs across multi-turn reasoning loops.
|
|
137
|
-
- **Session Titling**: `Gemini 3.7 Flash` (Temp 0.7, native `responseSchema`, `MINIMAL` invariant) — automated concise chat session titling.
|
|
138
|
-
- **Semantic Cache Classifier**: `Gemini 3.5 Flash Lite` (Temp 0, native `responseSchema`, `MINIMAL` invariant) — intent and topic classification for cache hits.
|
|
139
|
-
- **History Summarizer**: `Gemini 3.7 Flash` (Temp 0.2, `MINIMAL` invariant) — 3-part structured conversation compression preserving recent history.
|
|
140
|
-
- **Commit Generator**: `Gemini 3.5 Flash Lite` (`MINIMAL` invariant) — conventional commit message synthesis.
|
|
141
|
-
- **Micro-Agent Safety Invariants & Normalization**: All internal background micro-agents enforce a hardcoded `MINIMAL` invariant to guarantee zero-latency execution without conversational token burn. The generation pipeline's `normalizeGenerationConfig` automatically strips unsupported internal minimal payloads before dispatching to Google's API, preventing `400 Bad Request` schema errors while ensuring user-selected thinking levels never pollute lightweight background micro-agents.
|
|
142
|
-
- **Subsystem Reasoning Budgets**: Orchestrated subsystems maintain tailored reasoning allocations: **PM Kernel Task Decomposition** operates at `HIGH` reasoning depth for optimal topological dependency sorting; **Investigation & Context Sub-Agents** operate at `MEDIUM` reasoning depth for comprehensive repository reconnaissance; **Syntax Repair Agents** operate at `LOW` reasoning depth for precise AST corrections; and **Execution Sub-Agents / Main Agent** dynamically inherit your configured model thinking level (`LOW` | `MEDIUM` | `HIGH`).
|
|
144
|
+
Minovative Mind CLI continuously adapts to your unique developer personality and working habits without adding latency or telemetry bloat:
|
|
143
145
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
- **Conversational Wavelength & Pairing Dynamics:** Learns your relationship model (collaborative peer vs. direct operator), banter and humor affinity, speech formality, apology tolerance, and conversational quirks (e.g. catchphrases like _"lgtm"_ and _"ship it"_).
|
|
147
|
+
- **Cognitive & Decision Spectrums:** Adapts to your architectural preferences (top-down vs. bottom-up), decision autonomy, risk tolerance, and debugging style.
|
|
148
|
+
- **Zero-Latency Flash-Lite Profiling:** A dedicated background `gemini-3.5-flash-lite` agent classifies turns and reconciles behavioral drift asynchronously.
|
|
149
|
+
- **100% Client-Side Privacy:** Stored globally at `~/.minovativemind/user_profile.json` (`0600` permissions), never synced to cloud databases, and fully manageable via `/profile`.
|
|
147
150
|
|
|
148
151
|
## Session Commands
|
|
149
152
|
|
|
150
153
|
| Command | What it does |
|
|
151
154
|
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
152
155
|
| `/config-key` | Configure custom Google AI Studio API key (BYOK mode) |
|
|
153
|
-
| `/profile` | View, inspect, delete, or reset global adaptive persona memory and AI side-notes
|
|
156
|
+
| `/profile` | View, inspect, delete, or reset global adaptive persona memory, pairing dynamics, and AI side-notes |
|
|
154
157
|
| `/models` | Hot-swap the active model or configure its native reasoning thinking level (`Low`, `Medium`, `High`) |
|
|
155
158
|
| `/paste` | Multi-line input mode (cancel with Ctrl+C) |
|
|
156
159
|
| `/clear` | Clear conversation history |
|
|
@@ -166,13 +169,10 @@ Background tasks automatically route to dedicated auxiliary models with native `
|
|
|
166
169
|
|
|
167
170
|
---
|
|
168
171
|
|
|
169
|
-
## 🏷️ @ Context Mentions & Interactive Autocomplete
|
|
170
|
-
|
|
171
|
-
Minovative Mind CLI features real-time, interactive **@ Context Mentions** directly in your terminal prompt. Type `@` anywhere while writing a prompt to trigger fuzzy-filtered autocomplete and inject targeted codebase context, AST symbols, Git status/diffs, diagnostics, or cross-workspace files directly into the model's reasoning loop without manual copy-pasting or extra discovery tool turns.
|
|
172
|
-
|
|
173
172
|
### Interactive Autocomplete & Keyboard Navigation
|
|
174
173
|
|
|
175
174
|
When typing `@`, the interactive terminal autocomplete popup immediately renders:
|
|
175
|
+
|
|
176
176
|
- **10-Option Pagination**: Displays up to 10 ranked suggestions per page with dynamic page indexing `(1/10)`.
|
|
177
177
|
- **Cyan Navigation Helper**: Highlights the action footer in light blue (`Tab to insert • ↑/↓ navigate • Esc dismiss`) for clear guidance.
|
|
178
178
|
- **Keyboard Controls**:
|
|
@@ -183,34 +183,21 @@ When typing `@`, the interactive terminal autocomplete popup immediately renders
|
|
|
183
183
|
|
|
184
184
|
### Supported Mention Types
|
|
185
185
|
|
|
186
|
-
| Mention Syntax
|
|
187
|
-
|
|
|
188
|
-
| `@<path>` or `@file:<path>`
|
|
189
|
-
| `@<path>:<start>-<end>`
|
|
190
|
-
| `@symbol:<name>` or `@#<name>`
|
|
191
|
-
| `@symbol:<path>:<name>`
|
|
192
|
-
| `@git:diff` or `@diff`
|
|
193
|
-
| `@git:staged`
|
|
194
|
-
| `@git:status`
|
|
195
|
-
| `@git:branch`
|
|
196
|
-
| `@git:log`
|
|
197
|
-
| `@diagnostics` / `@problems` / `@errors` | `[diag]` / `[prob]` | **Diagnostics**
|
|
198
|
-
| `@terminal` / `@console`
|
|
199
|
-
| `@<alias>/<path>`
|
|
200
|
-
| `@<alias>`
|
|
201
|
-
|
|
202
|
-
### Visual Terminal Indicators & Status Tracking
|
|
203
|
-
|
|
204
|
-
When a prompt with `@` context mentions is submitted, the CLI provides real-time, high-contrast visual confirmation indicators in the terminal:
|
|
205
|
-
- **Success Indicators (`✔`)**: High-contrast green checkmark with dim status summary confirming successful extraction (e.g. `✔ Context @src/index.ts:1-25 (lines 1-25, 420 chars)`, `✔ Context @symbol:startServer (src/index.ts, 12 lines)`, `✔ Context @git:status (short status, clean)`, `✔ Context @diagnostics (syntax scan clean)`, `✔ Context @terminal (Darwin arm64, node v20.x)`, `✔ Context @backend (external workspace)`).
|
|
206
|
-
- **Failure Indicators (`✖`)**: Clear red indicator with explicit error reasoning when resolution fails (e.g. `✖ Context @missing.ts (File does not exist)`, `✖ Context @symbol:unknownFunc (Could not find declaration for symbol)`).
|
|
207
|
-
- **Structured Metadata Status Tracking**: Every resolved mention produces a rich `metadata` envelope (capturing line counts, char counts, symbol kind, git diff stats, and syntax scan metrics) powering both visual indicators and token-budgeted prompt injection.
|
|
208
|
-
|
|
209
|
-
### Context Resolution & Safety Architecture
|
|
210
|
-
|
|
211
|
-
- **Token Budgeting & Safety Allocation**: All parsed mentions are resolved into structured XML blocks (`<context_mentions>`) wrapped in CDATA sections with strict token budgeting and prompt injection defenses.
|
|
212
|
-
- **Read-Guard Pre-Registration (`fileReadGuard`)**: Files referenced via `@` mentions are automatically registered in the system's `fileReadGuard`. This allows the AI agent to immediately invoke file modifications (`modify_file`, `write_file`) without redundant `read_file` roundtrips, accelerating execution speed.
|
|
213
|
-
- **Multi-Workspace Path Resolution**: Automatically validates boundaries across registered workspaces via `resolveAndValidateMultiWorkspacePath`, preventing directory traversal escapes (`../`).
|
|
186
|
+
| Mention Syntax | Category Badge | Type | What it Resolves & Injects |
|
|
187
|
+
| :--------------------------------------- | :------------------ | :----------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
188
|
+
| `@<path>` or `@file:<path>` | `[file]` | **File** | Injects the complete content of a workspace file (e.g. `@src/index.ts` or `@file:package.json`). |
|
|
189
|
+
| `@<path>:<start>-<end>` | `[lines]` | **Line Range Slicing** | Surgically slices and injects only the specified line numbers (e.g. `@src/utils/config.ts:10-50`), saving tokens. |
|
|
190
|
+
| `@symbol:<name>` or `@#<name>` | `[sym]` | **AST Symbol** | Injects exact definitions of functions, classes, interfaces, types, methods, or structs (e.g. `@symbol:getUser` or `@#AuthService`) using polyglot AST extraction. |
|
|
191
|
+
| `@symbol:<path>:<name>` | `[sym]` | **Scoped Symbol** | Injects a specific symbol definition directly from a designated source file (e.g. `@symbol:src/services/auth.ts:validateToken`). |
|
|
192
|
+
| `@git:diff` or `@diff` | `[git]` | **Git Diff** | Injects the active unstaged working tree diff. |
|
|
193
|
+
| `@git:staged` | `[git]` | **Git Staged** | Injects currently staged git changes (`git diff --staged`). |
|
|
194
|
+
| `@git:status` | `[git]` | **Git Status** | Injects the current branch state and working tree status (`git status --short`). |
|
|
195
|
+
| `@git:branch` | `[git]` | **Git Branch** | Injects the current active Git branch and upstream tracking info. |
|
|
196
|
+
| `@git:log` | `[git]` | **Git Commit Log** | Injects the recent commit history (last 10 commits with hashes, authors, and messages). |
|
|
197
|
+
| `@diagnostics` / `@problems` / `@errors` | `[diag]` / `[prob]` | **Diagnostics** | Injects active compiler, linter, or syntax error diagnostics. |
|
|
198
|
+
| `@terminal` / `@console` | `[term]` | **Terminal Context** | Injects recent terminal environment context, shell environment, and command execution state. |
|
|
199
|
+
| `@<alias>/<path>` | `[ws]` | **Cross-Workspace File** | Injects file contents from registered external workspaces (e.g. `@backend/src/routes.ts` or `@frontend/src/App.tsx`). |
|
|
200
|
+
| `@<alias>` | `[ws]` | **Workspace Summary** | Injects configuration, manifest overview, and path details for a registered external workspace. |
|
|
214
201
|
|
|
215
202
|
---
|
|
216
203
|
|
|
@@ -218,11 +205,6 @@ When a prompt with `@` context mentions is submitted, the CLI provides real-time
|
|
|
218
205
|
|
|
219
206
|
Minovative Mind CLI doesn't restrict you to a single repository. You can logically group multiple external repositories into **Master Workspaces** (Profiles) containing dedicated **Sub-Workspaces** (mapped to short aliases like `@backend` or `@frontend`).
|
|
220
207
|
|
|
221
|
-
- **Primary Sub-Path Auto-Focusing & Global Override Detection**: Workspaces can designate a default primary sub-path (e.g. `src/` or `packages/core`), automatically scoping file operations and context turns without repetitive prefixing. If global override search phrases (e.g., "across the codebase", "entire project", "global", "end to end") or root monorepo configurations are detected, sub-path auto-focusing is dynamically bypassed to evaluate the entire repository.
|
|
222
|
-
- **Multi-Workspace Path Security Boundaries**: Strictly enforces workspace and profile containment via `resolveAndValidateMultiWorkspacePath`, preventing directory traversal (`../`), null-byte injections (`\0`), and absolute path escapes.
|
|
223
|
-
- **Canonical Lock Path Resolution in Scoped Tool Execution**: In parallel multi-agent workflows (MMAAK), file mutation tools automatically resolve relative paths, auto-focused sub-paths, and `@alias/` cross-repo prefixes to canonical absolute filesystem paths before acquiring mutexes in `FileLockRegistry`, preventing race conditions and lock collisions across concurrent agents.
|
|
224
|
-
- **Cross-Repo Coordination**: Prefix file paths with `@alias/` (e.g., `@backend/src/api.ts` and `@frontend/src/App.tsx`) to investigate, refactor, and coordinate changes across your entire stack in a single prompt. The terminal highlights cross-workspace actions with a blue `[alias]` visual tag. Use `/workspaces` to create profiles, link sub-workspaces, or switch active environments.
|
|
225
|
-
|
|
226
208
|
---
|
|
227
209
|
|
|
228
210
|
## 🌐 Supported Languages
|
|
@@ -246,13 +228,13 @@ However, the PCV engine features deep, context-aware analysis across **12 major
|
|
|
246
228
|
| **Swift** | `.swift` | ✅ | ✅ | ❌ | ❌ |
|
|
247
229
|
| **Dart** | `.dart` | ✅ | ✅ | ❌ | ❌ |
|
|
248
230
|
|
|
249
|
-
_⚠️\*Support is limited or requires custom local system tooling/environment setup._
|
|
231
|
+
_⚠️\*Support is limited or requires custom local system tooling/environment setup from the developer's end._
|
|
250
232
|
|
|
251
233
|
### Why do some features only support specific languages?
|
|
252
234
|
|
|
253
235
|
1. **Dependency Tracing & AST Symbol Extraction:** Fully supported across major language families. It uses lightning-fast static regex pattern matching and AST outline parsers to resolve local import structures, extract targeted symbol definitions (`targetElements`), and determine the "blast radius" of code changes without requiring heavy compilations.
|
|
254
236
|
2. **Performance Auditing:** Executed natively across 9 major language families (JavaScript/TypeScript, Python, Go, Rust, PHP, C#, Java, C/C++, and Ruby). It uses zero-dependency, ultra-fast (<50ms) language-aware regex heuristics with comment/string stripping and line-preserving offset tracking to detect severe runtime anti-patterns (such as unbounded loops, synchronous I/O, chained array allocations, unnecessary allocations, and unclosed resources).
|
|
255
|
-
3. **Ephemeral Analysis & Property-Based Probing:** Defaults to Node.js as a safe baseline, but natively leverages host-installed runtimes (Python, Rust, Go compilers) and standard libraries whenever available in the workspace.
|
|
237
|
+
3. **Ephemeral Analysis & Property-Based Probing:** Defaults to Node.js as a safe baseline, but natively leverages host-installed runtimes (Python, Rust, Go compilers) and standard libraries whenever available in the workspace. Features direct binary subprocess spawning without shell overhead, zero-disk stdin streaming for interpreted scripts, per-workspace LRU environment caching, 1:1 stack trace line preservation, and dedicated FD-3 out-of-band telemetry streaming for high-precision diagnostic and property-based verification tools (`run_debug_script`, `run_fuzz_probe`, `check_heap_delta`, `check_behavioral_drift`).
|
|
256
238
|
|
|
257
239
|
---
|
|
258
240
|
|
|
@@ -260,7 +242,8 @@ _⚠️\*Support is limited or requires custom local system tooling/environment
|
|
|
260
242
|
|
|
261
243
|
During heavy, multi-turn AI agent sessions, Minovative Mind CLI includes built-in architectural optimizations to eliminate IDE lag, CPU spikes, and dev-server interference:
|
|
262
244
|
|
|
263
|
-
- **Ephemeral Scratch Isolation (`os.tmpdir()`)**: Diagnostic probes, validation scripts, and benchmark tests execute
|
|
245
|
+
- **Ephemeral Scratch Isolation (`os.tmpdir()`) & Zero-Disk Stdin Streaming**: Diagnostic probes, validation scripts, and benchmark tests execute via direct subprocess spawning with zero-disk stdin streaming (for Node.js, Python, Bash, Ruby, and PHP) or within a sandboxed OS temp directory (`os.tmpdir()`) rather than writing disposable files into your workspace root. This prevents file watcher churn (`fsevents`, `inotify`), avoids Language Server Protocol (LSP) re-indexing storms (TSServer, Pyright, rust-analyzer), and prevents running dev servers (Vite, Turbopack, Nodemon) from triggering unneeded full-page reloads.
|
|
246
|
+
- **Per-Workspace LRU Environment Caching & Out-of-Band FD-3 Telemetry**: The sandboxed execution engine caches runner binaries, virtual environments, and module types in an LRU cache (30s TTL) to minimize process startup latency, while streaming structured `emitResult` telemetry over a dedicated FD 3 pipe (`stdio: ['pipe', 'pipe', 'pipe', 'pipe']`) without polluting console standard output or altering 1:1 stack trace line numbers.
|
|
264
247
|
- **Automatic IDE Watcher Exclusions (`.vscode/settings.json`)**: On session startup, the CLI automatically and non-destructively ensures that `.minovativemind/**`, `.tmp/**`, and `scratch/**` are added to `files.watcherExclude` and `search.exclude`. This stops IDE background processes from burning CPU on internal telemetry, chat session logs, and cache files.
|
|
265
248
|
- **Clean Git Status Synchronization**: The CLI automatically ensures `.minovativemind/`, `.tmp/`, and `scratch/` are excluded from `.gitignore`, `.dockerignore`, and `.npmignore`, keeping your IDE's Source Control pane fast and responsive.
|
|
266
249
|
- **Terminal Render Efficiency**: For long-running evaluation sweeps (`eval`) or massive test outputs, minimizing the terminal pane or running it in the background pauses Electron/xterm.js GPU canvas repaints and frees up system resources.
|
|
@@ -15,7 +15,7 @@ import { readPaste } from '../../utils/paste.js';
|
|
|
15
15
|
import { setApprovalMode, getApprovalMode, isSubAgentsEnabled, setSubAgentsEnabled } from '../agent-tools.js';
|
|
16
16
|
import { ProxyClient, getAndResetTurnUsage } from '../proxyClient.js';
|
|
17
17
|
import { checkByokSubscription } from '../auth.js';
|
|
18
|
-
import { GEMINI_MODELS, isByokEnabled } from '../../utils/config.js';
|
|
18
|
+
import { GEMINI_MODELS, isByokEnabled, DEFAULT_MODEL_THINKING_LEVELS } from '../../utils/config.js';
|
|
19
19
|
import { loadCredentials, updateCredentialField } from '../../utils/credentialStore.js';
|
|
20
20
|
import { getGlobalActiveModel, setGlobalActiveModel, getModelThinkingLevel, setModelThinkingLevel, ProxyChatSession } from '../ai.js';
|
|
21
21
|
import { loadUserProfile, deleteSideNote, clearUserProfile, getUserProfilePath } from '../userProfileService.js';
|
|
@@ -139,40 +139,49 @@ export async function handleSlashCommand(command, context) {
|
|
|
139
139
|
if (!p.isCancel(selectedModel)) {
|
|
140
140
|
chat.setModel(selectedModel);
|
|
141
141
|
setGlobalActiveModel(selectedModel);
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
message: `Configure Thinking Level for ${pc.cyan(selectedModel)} (Current: ${pc.cyan(activeModelThinking)})`,
|
|
145
|
-
initialValue: activeModelThinking,
|
|
146
|
-
options: [
|
|
147
|
-
{
|
|
148
|
-
value: 'LOW',
|
|
149
|
-
label: 'Low',
|
|
150
|
-
hint: 'Quick reasoning with low token overhead',
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
value: 'MEDIUM',
|
|
154
|
-
label: 'Medium',
|
|
155
|
-
hint: 'Balanced reasoning for everyday coding and debugging',
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
value: 'HIGH',
|
|
159
|
-
label: 'High',
|
|
160
|
-
hint: 'Deepest reasoning for complex architectural tasks',
|
|
161
|
-
},
|
|
162
|
-
],
|
|
163
|
-
});
|
|
164
|
-
if (!p.isCancel(selectedThinking)) {
|
|
165
|
-
setModelThinkingLevel(selectedModel, selectedThinking);
|
|
142
|
+
if (selectedModel === 'auto') {
|
|
143
|
+
const defaultAutoThinking = DEFAULT_MODEL_THINKING_LEVELS[GEMINI_MODELS.AUTO] || 'MEDIUM';
|
|
166
144
|
if (typeof chat.setThinkingLevel === 'function') {
|
|
167
|
-
chat.setThinkingLevel(
|
|
145
|
+
chat.setThinkingLevel(defaultAutoThinking);
|
|
168
146
|
}
|
|
169
|
-
p.log.success(`Model successfully switched to ${pc.cyan(
|
|
147
|
+
p.log.success(`Model successfully switched to ${pc.cyan('Auto (Smart Routing & Reasoning)')}`);
|
|
170
148
|
}
|
|
171
149
|
else {
|
|
172
|
-
|
|
173
|
-
|
|
150
|
+
const activeModelThinking = getModelThinkingLevel(selectedModel);
|
|
151
|
+
const selectedThinking = await p['select']({
|
|
152
|
+
message: `Configure Thinking Level for ${pc.cyan(selectedModel)} (Current: ${pc.cyan(activeModelThinking)})`,
|
|
153
|
+
initialValue: activeModelThinking,
|
|
154
|
+
options: [
|
|
155
|
+
{
|
|
156
|
+
value: 'LOW',
|
|
157
|
+
label: 'Low',
|
|
158
|
+
hint: 'Quick reasoning with low token overhead',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
value: 'MEDIUM',
|
|
162
|
+
label: 'Medium',
|
|
163
|
+
hint: 'Balanced reasoning for everyday coding and debugging',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
value: 'HIGH',
|
|
167
|
+
label: 'High',
|
|
168
|
+
hint: 'Deepest reasoning for complex architectural tasks',
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
});
|
|
172
|
+
if (!p.isCancel(selectedThinking)) {
|
|
173
|
+
setModelThinkingLevel(selectedModel, selectedThinking);
|
|
174
|
+
if (typeof chat.setThinkingLevel === 'function') {
|
|
175
|
+
chat.setThinkingLevel(selectedThinking);
|
|
176
|
+
}
|
|
177
|
+
p.log.success(`Model successfully switched to ${pc.cyan(selectedModel)} with thinking level ${pc.cyan(selectedThinking)}`);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
if (typeof chat.setThinkingLevel === 'function') {
|
|
181
|
+
chat.setThinkingLevel(activeModelThinking);
|
|
182
|
+
}
|
|
183
|
+
p.log.success(`Model successfully switched to ${pc.cyan(selectedModel)}`);
|
|
174
184
|
}
|
|
175
|
-
p.log.success(`Model successfully switched to ${pc.cyan(selectedModel)}`);
|
|
176
185
|
}
|
|
177
186
|
}
|
|
178
187
|
return { shouldContinue: true };
|
|
@@ -1213,15 +1222,49 @@ Strict Formatting Rules:
|
|
|
1213
1222
|
profile.cognitiveTraits?.delegationDepth ||
|
|
1214
1223
|
profile.cognitiveTraits?.debuggingStyle ||
|
|
1215
1224
|
profile.cognitiveTraits?.explanationFormat;
|
|
1225
|
+
const hasPersona = profile.conversationalPersona?.relationshipModel ||
|
|
1226
|
+
profile.conversationalPersona?.banterAffinity ||
|
|
1227
|
+
profile.conversationalPersona?.formalityLevel ||
|
|
1228
|
+
profile.conversationalPersona?.apologyTolerance ||
|
|
1229
|
+
profile.conversationalPersona?.stressCadence ||
|
|
1230
|
+
profile.conversationalPersona?.promptingHabit ||
|
|
1231
|
+
(profile.conversationalPersona?.conversationalQuirks &&
|
|
1232
|
+
profile.conversationalPersona.conversationalQuirks.length > 0);
|
|
1216
1233
|
const hasStrengths = profile.technicalPreferences?.strengths && profile.technicalPreferences.strengths.length > 0;
|
|
1217
1234
|
const hasConventions = profile.technicalPreferences?.conventions && profile.technicalPreferences.conventions.length > 0;
|
|
1218
1235
|
const hasNotes = profile.agentNotes && profile.agentNotes.length > 0;
|
|
1219
1236
|
console.log(`\n${pc.bold(pc.cyan('🧠 Global Adaptive User Profile & Persona Memory'))}`);
|
|
1220
1237
|
console.log(`${pc.dim('Storage:')} ${pc.dim(getUserProfilePath())}\n`);
|
|
1221
|
-
if (!hasStyle && !hasCognitive && !hasStrengths && !hasConventions && !hasNotes) {
|
|
1238
|
+
if (!hasStyle && !hasCognitive && !hasPersona && !hasStrengths && !hasConventions && !hasNotes) {
|
|
1222
1239
|
p.log.info(pc.yellow('No personalized observations recorded yet. Mino will learn your communication style and preferences organically as you chat.'));
|
|
1223
1240
|
}
|
|
1224
1241
|
else {
|
|
1242
|
+
if (hasPersona) {
|
|
1243
|
+
console.log(pc.bold('Conversational Persona & Teammate Dynamics:'));
|
|
1244
|
+
if (profile.conversationalPersona?.relationshipModel) {
|
|
1245
|
+
console.log(` ${pc.dim('•')} Pairing Dynamic: ${pc.blue(profile.conversationalPersona.relationshipModel)}`);
|
|
1246
|
+
}
|
|
1247
|
+
if (profile.conversationalPersona?.banterAffinity) {
|
|
1248
|
+
console.log(` ${pc.dim('•')} Banter & Humor: ${pc.blue(profile.conversationalPersona.banterAffinity)}`);
|
|
1249
|
+
}
|
|
1250
|
+
if (profile.conversationalPersona?.formalityLevel) {
|
|
1251
|
+
console.log(` ${pc.dim('•')} Formality & Demeanor: ${pc.blue(profile.conversationalPersona.formalityLevel)}`);
|
|
1252
|
+
}
|
|
1253
|
+
if (profile.conversationalPersona?.apologyTolerance) {
|
|
1254
|
+
console.log(` ${pc.dim('•')} Apology Reaction: ${pc.blue(profile.conversationalPersona.apologyTolerance)}`);
|
|
1255
|
+
}
|
|
1256
|
+
if (profile.conversationalPersona?.stressCadence) {
|
|
1257
|
+
console.log(` ${pc.dim('•')} Stress Cadence: ${pc.blue(profile.conversationalPersona.stressCadence)}`);
|
|
1258
|
+
}
|
|
1259
|
+
if (profile.conversationalPersona?.promptingHabit) {
|
|
1260
|
+
console.log(` ${pc.dim('•')} Prompting Habit: ${pc.blue(profile.conversationalPersona.promptingHabit)}`);
|
|
1261
|
+
}
|
|
1262
|
+
if (profile.conversationalPersona?.conversationalQuirks &&
|
|
1263
|
+
profile.conversationalPersona.conversationalQuirks.length > 0) {
|
|
1264
|
+
console.log(` ${pc.dim('•')} Catchphrases & Quirks: ${pc.blue(profile.conversationalPersona.conversationalQuirks.join(', '))}`);
|
|
1265
|
+
}
|
|
1266
|
+
console.log('');
|
|
1267
|
+
}
|
|
1225
1268
|
if (hasStyle) {
|
|
1226
1269
|
console.log(pc.bold('Communication Style:'));
|
|
1227
1270
|
if (profile.communicationStyle?.tonePreference) {
|
|
@@ -3,7 +3,7 @@ import * as p from '@clack/prompts';
|
|
|
3
3
|
import pc from 'picocolors';
|
|
4
4
|
import { debugLog } from '../../utils/logger.js';
|
|
5
5
|
import { executeTool } from '../agent-tools.js';
|
|
6
|
-
import { getPlanExecutionConfig } from '../ai.js';
|
|
6
|
+
import { getPlanExecutionConfig, HISTORICAL_TOOL_OUTPUT_THRESHOLD } from '../ai.js';
|
|
7
7
|
import { routeIntent } from '../contextAgent.js';
|
|
8
8
|
import { requestCommandApproval } from './commandApproval.js';
|
|
9
9
|
import { getMetricCollector, recordRecoveryCircuitBreakerTrip } from '../metrics.js';
|
|
@@ -276,6 +276,8 @@ export async function processResponse(chat, result, workspaceRoot, inputHandler,
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
|
+
// Apply in-place history pruning to collapse oversized tool responses older than 1 turn
|
|
280
|
+
chat.pruneToolOutputHistory(HISTORICAL_TOOL_OUTPUT_THRESHOLD, 1);
|
|
279
281
|
// Feed tool results and potential interruption text back to the model
|
|
280
282
|
let followUp;
|
|
281
283
|
try {
|
|
@@ -25,6 +25,8 @@ export interface ToolResult {
|
|
|
25
25
|
mimeType: string;
|
|
26
26
|
data: string;
|
|
27
27
|
};
|
|
28
|
+
/** Optional structured JSON result extracted from the script execution. */
|
|
29
|
+
structuredResult?: unknown;
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
30
32
|
* Returns the list of available function declarations for Gemini function calling.
|
|
@@ -138,6 +140,22 @@ export declare function modifyFile(workspaceRoot: string, filePath: string, edit
|
|
|
138
140
|
* @returns A promise resolving to a {@link ToolResult} containing the formatted tree output.
|
|
139
141
|
*/
|
|
140
142
|
export declare function listDirectory(workspaceRoot: string, dirPath: string, maxDepth?: number): Promise<ToolResult>;
|
|
143
|
+
/**
|
|
144
|
+
* Truncates large string output using bounded head and tail windows with a structured metadata receipt.
|
|
145
|
+
* Preserves early context (e.g. invocation, build targets) and late context (e.g. error summaries, exit codes)
|
|
146
|
+
* while bounding total character and line count.
|
|
147
|
+
*
|
|
148
|
+
* @param text - The raw output text to truncate.
|
|
149
|
+
* @param options - Configuration options for character/line limits and custom receipt notices.
|
|
150
|
+
* @returns The windowed text containing head, structured metadata receipt, and tail.
|
|
151
|
+
*/
|
|
152
|
+
export declare function truncateWithHeadTailWindow(text: string, options?: {
|
|
153
|
+
maxChars?: number;
|
|
154
|
+
maxLines?: number;
|
|
155
|
+
headRatio?: number;
|
|
156
|
+
receiptLabel?: string;
|
|
157
|
+
hint?: string;
|
|
158
|
+
}): string;
|
|
141
159
|
/**
|
|
142
160
|
* Condenses verbose command and test failure outputs into high-signal diagnostic error logs
|
|
143
161
|
* with dynamic tail sizing and stack trace boundary snapping.
|