minovative-mind-cli 2.14.1 → 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.
Files changed (35) hide show
  1. package/README.md +35 -54
  2. package/dist/services/agent/slashCommands.js +35 -1
  3. package/dist/services/agent/toolLoop.js +3 -1
  4. package/dist/services/agent-tools.d.ts +18 -0
  5. package/dist/services/agent-tools.js +220 -43
  6. package/dist/services/agent.js +6 -3
  7. package/dist/services/ai.d.ts +3 -0
  8. package/dist/services/ai.js +63 -19
  9. package/dist/services/contextAgent.d.ts +10 -4
  10. package/dist/services/contextAgent.js +33 -9
  11. package/dist/services/orchestration/investigationAgent.js +31 -7
  12. package/dist/services/orchestration/investigationCache.js +19 -9
  13. package/dist/services/orchestration/readCache.d.ts +1 -0
  14. package/dist/services/orchestration/readCache.js +5 -2
  15. package/dist/services/orchestration/scopedTools.js +37 -10
  16. package/dist/services/orchestration/subAgent.js +16 -2
  17. package/dist/services/proxyClient.d.ts +6 -0
  18. package/dist/services/proxyClient.js +24 -10
  19. package/dist/services/userProfileService.d.ts +14 -0
  20. package/dist/services/userProfileService.js +105 -3
  21. package/dist/utils/analysisRunner.d.ts +120 -8
  22. package/dist/utils/analysisRunner.js +946 -125
  23. package/dist/utils/contextPrompts.d.ts +39 -0
  24. package/dist/utils/contextPrompts.js +81 -9
  25. package/dist/utils/contextRanker.d.ts +216 -0
  26. package/dist/utils/contextRanker.js +603 -0
  27. package/dist/utils/dependencyTracer/modules/graph.d.ts +4 -1
  28. package/dist/utils/dependencyTracer/modules/graph.js +11 -0
  29. package/dist/utils/dependencyTracer/modules/types.d.ts +10 -0
  30. package/dist/utils/dependencyTracer.d.ts +25 -0
  31. package/dist/utils/dependencyTracer.js +34 -0
  32. package/dist/utils/systemPrompts.d.ts +1 -1
  33. package/dist/utils/systemPrompts.js +13 -2
  34. package/oclif.manifest.json +1 -1
  35. 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** and **2-tier context compression**, execute code, verify compilation, execute Property-Based Testing (PBT) suites and diff-scoped mutation audits, and self-correct (if it even needs to), until
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
  [![License](https://img.shields.io/npm/l/minovative-mind-cli.svg)](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
- Create a free account at [minovativemind.dev](https://www.minovativemind.dev),
42
- then:
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
- - **Configuration:** Use `/config-key` in the chat session to set and manage your API key.
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
- ### Auxiliary Model Routing Defaults & Reasoning Invariants
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
- Background tasks automatically route to dedicated auxiliary models with native `responseSchema` constraints, AST symbol extractors, persistent caches, and deterministic reasoning invariants for optimal latency, cost efficiency, and structured output reliability:
142
+ ### 🧠 Adaptive Persona & Pair Programming Memory Bank
131
143
 
132
- - **Intent Routing (`routeIntent`)**: `Gemini 3.7 Flash` (Temp 0, native `responseSchema`, `MINIMAL` invariant) — permissive zero-temperature classification into `SEARCH` vs `SKIP` and `CHAT` vs `EXECUTE` with resilient fallback to repository exploration.
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** dynamically inherit your configured model thinking level (default: `MEDIUM`) 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
- > You pay for auxiliary model background AI operations and for your selected model during chat and code execution. Use `/debug` to inspect real-time routing diagnostics.
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,10 +169,6 @@ 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:
@@ -200,31 +199,12 @@ When typing `@`, the interactive terminal autocomplete popup immediately renders
200
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`). |
201
200
  | `@<alias>` | `[ws]` | **Workspace Summary** | Injects configuration, manifest overview, and path details for a registered external workspace. |
202
201
 
203
- ### Visual Terminal Indicators & Status Tracking
204
-
205
- When a prompt with `@` context mentions is submitted, the CLI provides real-time, high-contrast visual confirmation indicators in the terminal:
206
-
207
- - **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)`).
208
- - **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)`).
209
- - **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.
210
-
211
- ### Context Resolution & Safety Architecture
212
-
213
- - **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.
214
- - **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.
215
- - **Multi-Workspace Path Resolution**: Automatically validates boundaries across registered workspaces via `resolveAndValidateMultiWorkspacePath`, preventing directory traversal escapes (`../`).
216
-
217
202
  ---
218
203
 
219
204
  ## 🌐 Multi-Workspace, Sub-Path Focusing & Security Guardrails
220
205
 
221
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`).
222
207
 
223
- - **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.
224
- - **Multi-Workspace Path Security Boundaries**: Strictly enforces workspace and profile containment via `resolveAndValidateMultiWorkspacePath`, preventing directory traversal (`../`), null-byte injections (`\0`), and absolute path escapes.
225
- - **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.
226
- - **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.
227
-
228
208
  ---
229
209
 
230
210
  ## 🌐 Supported Languages
@@ -248,13 +228,13 @@ However, the PCV engine features deep, context-aware analysis across **12 major
248
228
  | **Swift** | `.swift` | ✅ | ✅ | ❌ | ❌ |
249
229
  | **Dart** | `.dart` | ✅ | ✅ | ❌ | ❌ |
250
230
 
251
- _⚠️\*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._
252
232
 
253
233
  ### Why do some features only support specific languages?
254
234
 
255
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.
256
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).
257
- 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`).
258
238
 
259
239
  ---
260
240
 
@@ -262,7 +242,8 @@ _⚠️\*Support is limited or requires custom local system tooling/environment
262
242
 
263
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:
264
244
 
265
- - **Ephemeral Scratch Isolation (`os.tmpdir()`)**: Diagnostic probes, validation scripts, and benchmark tests execute in 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.
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.
266
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.
267
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.
268
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.
@@ -1222,15 +1222,49 @@ Strict Formatting Rules:
1222
1222
  profile.cognitiveTraits?.delegationDepth ||
1223
1223
  profile.cognitiveTraits?.debuggingStyle ||
1224
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);
1225
1233
  const hasStrengths = profile.technicalPreferences?.strengths && profile.technicalPreferences.strengths.length > 0;
1226
1234
  const hasConventions = profile.technicalPreferences?.conventions && profile.technicalPreferences.conventions.length > 0;
1227
1235
  const hasNotes = profile.agentNotes && profile.agentNotes.length > 0;
1228
1236
  console.log(`\n${pc.bold(pc.cyan('🧠 Global Adaptive User Profile & Persona Memory'))}`);
1229
1237
  console.log(`${pc.dim('Storage:')} ${pc.dim(getUserProfilePath())}\n`);
1230
- if (!hasStyle && !hasCognitive && !hasStrengths && !hasConventions && !hasNotes) {
1238
+ if (!hasStyle && !hasCognitive && !hasPersona && !hasStrengths && !hasConventions && !hasNotes) {
1231
1239
  p.log.info(pc.yellow('No personalized observations recorded yet. Mino will learn your communication style and preferences organically as you chat.'));
1232
1240
  }
1233
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
+ }
1234
1268
  if (hasStyle) {
1235
1269
  console.log(pc.bold('Communication Style:'));
1236
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.