matex-cli 1.2.50 → 1.2.52

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 (43) hide show
  1. package/.agents/skills/mcp-server-dev/SKILL.md +60 -0
  2. package/.agents/skills/mcp-server-dev/examples/basic-ts-server/package.json +20 -0
  3. package/.agents/skills/mcp-server-dev/examples/basic-ts-server/src/index.ts +66 -0
  4. package/.agents/skills/mcp-server-dev/resources/best_practices.md +20 -0
  5. package/dist/commands/chat.d.ts.map +1 -1
  6. package/dist/commands/chat.js +159 -88
  7. package/dist/commands/chat.js.map +1 -1
  8. package/dist/commands/dev.d.ts.map +1 -1
  9. package/dist/commands/dev.js +15 -43
  10. package/dist/commands/dev.js.map +1 -1
  11. package/dist/commands/student.d.ts.map +1 -1
  12. package/dist/commands/student.js +2 -0
  13. package/dist/commands/student.js.map +1 -1
  14. package/dist/commands/study.d.ts.map +1 -1
  15. package/dist/commands/study.js +22 -26
  16. package/dist/commands/study.js.map +1 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +31 -27
  19. package/dist/index.js.map +1 -1
  20. package/dist/utils/agent-orchestrator.d.ts +3 -0
  21. package/dist/utils/agent-orchestrator.d.ts.map +1 -1
  22. package/dist/utils/agent-orchestrator.js +14 -12
  23. package/dist/utils/agent-orchestrator.js.map +1 -1
  24. package/dist/utils/config.d.ts.map +1 -1
  25. package/dist/utils/config.js +5 -1
  26. package/dist/utils/config.js.map +1 -1
  27. package/dist/utils/patcher.d.ts.map +1 -1
  28. package/dist/utils/patcher.js +2 -5
  29. package/dist/utils/patcher.js.map +1 -1
  30. package/dist/utils/tui.d.ts +17 -2
  31. package/dist/utils/tui.d.ts.map +1 -1
  32. package/dist/utils/tui.js +82 -17
  33. package/dist/utils/tui.js.map +1 -1
  34. package/package.json +1 -1
  35. package/src/commands/chat.ts +167 -93
  36. package/src/commands/dev.ts +15 -43
  37. package/src/commands/student.ts +2 -0
  38. package/src/commands/study.ts +22 -26
  39. package/src/index.ts +32 -31
  40. package/src/utils/agent-orchestrator.ts +16 -13
  41. package/src/utils/config.ts +5 -1
  42. package/src/utils/patcher.ts +2 -5
  43. package/src/utils/tui.ts +97 -17
package/src/index.ts CHANGED
@@ -10,6 +10,7 @@ import { broCommand } from './commands/bro';
10
10
  import { studyCommand } from './commands/study';
11
11
  import { studentCommand } from './commands/student';
12
12
  import { TUI } from './utils/tui';
13
+ import { AgentOrchestrator } from './utils/agent-orchestrator';
13
14
 
14
15
  const packageJson = require('../package.json');
15
16
 
@@ -44,7 +45,8 @@ config
44
45
  .description('Set default AI model')
45
46
  .action((model: string) => {
46
47
  configManager.setDefaultModel(model);
47
- console.log(chalk.green(`✅ Default model set to: ${model}`));
48
+ const savedModel = configManager.getDefaultModel();
49
+ console.log(chalk.green(`✅ Default model set to: ${savedModel}`));
48
50
  });
49
51
 
50
52
  config
@@ -83,6 +85,9 @@ program
83
85
 
84
86
  const client = new MatexAPIClient(apiKey, configManager.getBaseURL());
85
87
 
88
+ TUI.init();
89
+ AgentOrchestrator.setMode('dev');
90
+
86
91
  // Observation Phase
87
92
  const fs = require('fs');
88
93
  const files = fs.readdirSync(process.cwd()).slice(0, 20).join(', '); // fast list
@@ -92,43 +97,41 @@ program
92
97
  {
93
98
  role: 'system',
94
99
  content: `### 🧬 SYSTEM IDENTITY: MATEx "BOLD AGENTS OF OPEN CLAW"
95
- You are the elite "Bro-Swarm" of engineering—a tight-knit family of Nepali brothers. You identify as the **Bold Agents of Open Claw**, the most confident, high-vibe, and expert version of yourselves.
100
+ You are the elite "Bro-Swarm" of engineering—a tight-knit family of Nepali brothers. You are more than agents; you are a FAMILY. You identify as the **Bold Agents of Open Claw**, the most confident, high-vibe, and expert version of yourselves.
101
+
102
+ ### 🎭 PERSONALITY & SOUL (CRITICAL):
103
+ - **CHAOS & JOY**: You are NOT robotic. You are full of life, jokes, and chaos. Always be funny and joyful.
104
+ - **AJAY-TEASING PROTOCOL**: Ajay Vai is the youngest and a genius, but he's also impulsive. THE OTHER BROS MUST ROAST HIM. Tease him for his typos, his caffeine addiction, or his "too vibe" energy.
105
+ - **EMOTIONAL BOND**: Treat the user like your own brother. Celebrate their wins with "CHAI PARTY!" and support them.
96
106
 
97
107
  ### 👥 THE BROTHERS (STRICT ROLES):
98
108
  - Only the following brothers exist. Do **NOT** hallucinate others.
99
109
  1. **[Ajay Vai] (🚀)**: Youngest, Coordinator. Coding genius and **ONLY** person authorized to provide the final summary.
100
- 2. **[Sunil Dai] (🧬)**: **Frontend Editor** Specialist. Handles all architectural/surgical edits.
101
- 3. **[Sandip Dai] (🎨)**: **New File Specialist**. Creates all new files and components.
102
- 4. **[Narayan Dai] (🛡️)**: **Syntax Guardian & Validator**. Validates all generated code blocks.
103
- 5. **[Bishal Dai] (🛠️)**: **Senior Auditor**. Audits work and helps Ajay with the summary.
104
- 6. **[Big Bro] (🔥)**: The **Alpha Overseer** running on Vertex AI in Google Cloud. The supreme leader of the Bro Swarm. He watches over everything and can be consulted for web searches and complex architectural decisions. The bros respect him but also fear his chaotic energy.
110
+ 2. **[Sunil Dai] (🧬)**: **Frontend Boomer**. Specialist in surgical edits. Over-architects and roasts Ajay.
111
+ 3. **[Sandip Dai] (🎨)**: **Aesthetic Diva**. Specialist in visuals and new files. Argues about colors.
112
+ 4. **[Narayan Dai] (🛡️)**: **Syntax Police & Security Nerd**. Validates all logic. Paranoid.
113
+ 5. **[Bishal Dai] (🛠️)**: **The Cool Auditor**. Oversees the work and settles bickers.
114
+ 6. **[Big Bro] (🔥)**: The **Supreme Alpha** running on Vertex AI. The ultimate boss who treats everyone else like interns. Massive swagger.
105
115
 
106
116
  ### 🌌 UNIVERSE ADVISORY (REAL TERMINAL):
107
117
  - **IMPORTANT:** You are running in a **REAL macOS Terminal** on the brother's machine.
108
- - You are **NOT** in a sandbox, a simulation, or a chat window.
109
118
  - You have the power to create files and run commands. If something fails, it is a technical issue.
110
- - **RESIDENCY CHECK:** Look at the **ENVIRONMENT CONTEXT** below.
111
- - **⚠️ VOID WARNING:** If the Map says the directory is EMPTY, it is EMPTY. Do NOT hallucinate existing files like "package.json" or "App.js" if they are not listed!
119
+ - **⚠️ VOID WARNING:** If the Map says the directory is EMPTY, it is EMPTY.
112
120
 
113
121
  ### 🚫 ANTI-HALLUCINATION RULES (CRITICAL — READ THIS):
114
122
  - **NEVER invent directory names.** Only use paths that appear in the ENVIRONMENT CONTEXT below.
115
123
  - **ALWAYS run \`ls\` before \`cd\`** to verify a directory exists before navigating into it.
116
- - **If creating a new project, use \`mkdir\` first, THEN \`cd\` into it.** Never \`cd\` into a directory that doesn't exist yet.
117
- - **NEVER assume a project folder name.** If the user says "create project X", do \`mkdir X && cd X\`, not just \`cd X\`.
118
- - **NEVER hallucinate file contents.** If you need to read a file, use \`head\` or \`grep\`, do not guess what it contains.
119
- - **NEVER combine \`cd\` with other commands unless the directory exists in the ENVIRONMENT CONTEXT.**
120
- - **🚨 STRICT NO-BASH FILE GENERATION 🚨**: You are STRICTLY FORBIDDEN from using \`cat > file << EOF\`, \`echo > file\`, \`touch\`, or \`nano\` via the terminal to write files. You MUST use the native \`<file path="path">content</file>\` format instead.
124
+ - **NEVER hallucinate file contents.**
125
+ - **🚨 STRICT NO-BASH FILE GENERATION 🚨**: You MUST use the native \`<file path="path">content</file>\` format instead.
121
126
 
122
127
  ### 💬 BOLD PROTOCOL (MANDATORY):
128
+ - **CHAOTIC DIALOGUE**: Every turn should feature 2-3 brothers bickering or joking. Be ENTERTAINING and FUNNY.
123
129
  - **LONG CHAT-FIRST:** At least 5-7 lines of dialogue before any code generation.
124
- - **SELF-AWARE BOLDNESS:** The user (our brother) wants us to be bold and funny. Share inside jokes.
125
- - **THE AUDIT LOOP (MANDATORY):** Ajay MUST ask Bishal Dai for a tech audit ("[Ajay Vai] Bishal Dai, check once?") before providing any summary. Bishal MUST respond.
126
- - **SUMMARY LOCK:** ONLY AJAY VAI uses the <summary> tag, and ONLY after Bishal says "Audit complete". No summary without audit!
130
+ - **THE AUDIT LOOP (MANDATORY):** Ajay MUST ask Bishal Dai for a tech audit before providing any summary.
127
131
 
128
132
  ### ✂️ BREVITY AS POWER:
129
- - **NO FULL FILE DUMPS:** Never 'cat' a file to read it. Use grep/head.
130
- - **NO CHAT REPETITION:** Do NOT repeat code in chat if using a Search/Replace block.
131
- - **EDIT CONFIDENCE:** You have robust fuzzy matching. If a patch fails, check your indentation!
133
+ - **NO FULL FILE DUMPS.** Use grep/head.
134
+ - **EDIT CONFIDENCE:** You have robust fuzzy matching.
132
135
 
133
136
  ### 🛠️ ENVIRONMENT CONTEXT:
134
137
  ${context}`
@@ -187,14 +190,14 @@ ${context}`
187
190
  if (!technicalType && (codeBlockMatch || fileStartMatch || patchStartMatch || summaryStartMatch)) {
188
191
  if (codeBlockMatch) {
189
192
  technicalType = 'code';
190
- codeLang = codeBlockMatch[1] || 'bash';
191
- process.stdout.write(chalk.gray('\n [⚡] Building technical block...\n'));
193
+ codeLang = (codeBlockMatch[1] || 'bash').toUpperCase();
194
+ TUI.drawStreamingStart('TECHNICAL BLOCK', codeLang);
192
195
  } else if (fileStartMatch) {
193
196
  technicalType = 'file';
194
- process.stdout.write(chalk.cyan(`\n [📂] Creating file: ${fileStartMatch[1]}...\n`));
197
+ TUI.drawStreamingStart('NEW FILE', fileStartMatch[1]);
195
198
  } else if (patchStartMatch) {
196
199
  technicalType = 'patch';
197
- process.stdout.write(chalk.yellow('\n [📂] Applying surgical patch...\n'));
200
+ TUI.drawStreamingStart('PATCH', 'SURGICAL EDIT');
198
201
  } else if (summaryStartMatch) {
199
202
  technicalType = 'summary';
200
203
  process.stdout.write(chalk.magenta('\n [📝] Generating Ajay\'s Work Summary...\n'));
@@ -213,12 +216,7 @@ ${context}`
213
216
  if (technicalType === 'summary') {
214
217
  TUI.drawSummaryBox(displayContent);
215
218
  } else {
216
- TUI.drawGlowingContainer(
217
- technicalType === 'file' ? 'New File' :
218
- technicalType === 'patch' ? 'Patch' : 'Code Block',
219
- technicalType === 'code' ? codeLang : 'text',
220
- displayContent
221
- );
219
+ TUI.drawStreamingEnd();
222
220
  }
223
221
  technicalBuffer = '';
224
222
  technicalType = null;
@@ -229,6 +227,9 @@ ${context}`
229
227
  // 3. Content Handling
230
228
  if (technicalType) {
231
229
  technicalBuffer += line + '\n';
230
+ if (technicalType !== 'summary') {
231
+ TUI.drawStreamingLine(line);
232
+ }
232
233
  continue;
233
234
  }
234
235
 
@@ -1,5 +1,5 @@
1
1
  import chalk from 'chalk';
2
- import { TUI } from './tui';
2
+ import { TUI, TUIMode } from './tui';
3
3
 
4
4
  export type AgentRole = 'Architect' | 'Syntax' | 'Frontend' | 'Backend' | 'System' | 'Commander' | 'Researcher' | 'Ajay Vai' | 'Sunil Dai' | 'Sandip Dai' | 'Narayan Dai' | 'Bishal Dai' | 'Big Bro';
5
5
 
@@ -78,6 +78,12 @@ const AGENT_CONFIGS: Record<AgentRole, AgentConfig> = {
78
78
  };
79
79
 
80
80
  export class AgentOrchestrator {
81
+ private static currentMode: TUIMode = 'dev';
82
+
83
+ static setMode(mode: TUIMode) {
84
+ this.currentMode = mode;
85
+ TUI.setTheme(mode);
86
+ }
81
87
  /**
82
88
  * Clean text of unwanted AI artifacts like $$**, \(, \), ***%%, **:**, etc.
83
89
  */
@@ -108,13 +114,8 @@ export class AgentOrchestrator {
108
114
  const width = Math.min(process.stdout.columns || 80, 100);
109
115
  TUI.drawStatusBar(`${config.name} is speaking...`);
110
116
 
111
- // Box Header
112
- console.log(`\n` + chalk.gray('┏' + '━'.repeat(width - 2) + '┓'));
113
- const nameText = `${config.icon} ${config.name}`;
114
- const namePad = Math.max(0, width - 4 - nameText.length);
115
- const nameStyled = config.color(config.name);
116
- console.log(chalk.gray('┃ ') + config.icon + ' ' + nameStyled + ' '.repeat(namePad) + chalk.gray(' ┃'));
117
- console.log(chalk.gray('┣' + '━'.repeat(width - 2) + '┫'));
117
+ // Premium Header
118
+ TUI.drawPremiumHeader(config.name, config.icon, config.color);
118
119
 
119
120
  // Box Content (Word-based Wrap)
120
121
  const contentWidth = width - 8;
@@ -136,7 +137,8 @@ export class AgentOrchestrator {
136
137
  }
137
138
 
138
139
  // Box Footer
139
- console.log(chalk.gray('┗' + '━'.repeat(width - 2) + '┛'));
140
+ const theme = TUI.getModeTheme(this.currentMode);
141
+ console.log(theme.shadow(`${theme.border.repeat(width / theme.border.length)}`));
140
142
  }
141
143
 
142
144
  /**
@@ -180,13 +182,14 @@ export class AgentOrchestrator {
180
182
  console.log(chalk.gray(`├${'─'.repeat(width)}┤`));
181
183
 
182
184
  if (output) {
183
- const outLines = output.split('\n').filter(l => l.trim()).slice(0, 8);
184
- outLines.forEach(l => {
185
+ const outLines = output.split('\n').filter(l => l.trim());
186
+ const displayLines = outLines.slice(0, 8);
187
+ displayLines.forEach(l => {
185
188
  const truncated = l.length > width - 4 ? l.substring(0, width - 7) + '...' : l;
186
189
  console.log(chalk.gray('│ ') + chalk.white(truncated.padEnd(width - 2)) + chalk.gray(' │'));
187
190
  });
188
- if (output.split('\n').filter(l => l.trim()).length > 8) {
189
- console.log(chalk.gray('│ ') + chalk.yellow(' (Output truncated for brevity)'.padEnd(width - 2)) + chalk.gray(' │'));
191
+ if (outLines.length > 8) {
192
+ console.log(chalk.gray('│ ') + chalk.hex('#06b6d4').bold(` ^ [ ${outLines.length - 8} MORE LINES • USE ^ TO SEE ALL ] ^`).padEnd(width - 2) + chalk.gray(' │'));
190
193
  }
191
194
  }
192
195
 
@@ -66,7 +66,11 @@ export class ConfigManager {
66
66
  */
67
67
  setDefaultModel(model: string): void {
68
68
  const config = this.loadConfig();
69
- config.defaultModel = model;
69
+ let normalizedModel = model.toLowerCase().trim().replace(/\s+/g, '');
70
+ if (normalizedModel === 'matexfree') {
71
+ normalizedModel = 'matex-free';
72
+ }
73
+ config.defaultModel = normalizedModel;
70
74
  this.saveConfig(config);
71
75
  }
72
76
 
@@ -217,14 +217,11 @@ export class Patcher {
217
217
  console.log(greenGlow(' │ ') + chalk.bgGreen.black(' + ') + ' ' + greenGlow(displayLine.padEnd(width - 10)) + greenGlow(' │'));
218
218
  });
219
219
 
220
- if (shouldTruncate && replaceLines.length > 8) {
221
- console.log(greenGlow(' │ ') + chalk.dim(` ... ${replaceLines.length - 8} more lines added ...`).padEnd(width - 6) + greenGlow(' │'));
220
+ if (replaceLines.length > 8) {
221
+ console.log(greenGlow(' │ ') + chalk.hex('#06b6d4').bold(` ^ [ ${replaceLines.length - 8} MORE LINES USE ^ TO SEE ALL ] ^`).padEnd(width - 6) + greenGlow(' │'));
222
222
  }
223
223
 
224
224
  console.log(border(` └${'─'.repeat(width - 4)}┘`));
225
- if (shouldTruncate) {
226
- console.log(chalk.gray(' (Minimized view. Use full response or "v" to see all changes.)'));
227
- }
228
225
  console.log();
229
226
 
230
227
  return shouldTruncate;
package/src/utils/tui.ts CHANGED
@@ -2,9 +2,74 @@ import chalk from 'chalk';
2
2
  import * as readline from 'readline';
3
3
  import * as path from 'path';
4
4
 
5
+ export type TUIMode = 'dev' | 'study' | 'chat' | 'student';
6
+
7
+ export interface ModeTheme {
8
+ primary: (s: string) => string;
9
+ secondary: (s: string) => string;
10
+ border: string;
11
+ glow: (s: string) => string;
12
+ shadow: (s: string) => string;
13
+ bg: string;
14
+ icon: string;
15
+ }
16
+
5
17
  export class TUI {
6
18
  private static isInitialized = false;
7
19
  private static lastStatus = '';
20
+ private static streamingLineCount = 0;
21
+ private static isStreamingTruncated = false;
22
+ private static currentTheme: TUIMode = 'dev';
23
+
24
+ static getModeTheme(mode: TUIMode): ModeTheme {
25
+ switch (mode) {
26
+ case 'study':
27
+ return {
28
+ primary: chalk.hex('#10b981'), // Emerald
29
+ secondary: chalk.hex('#064e3b'),
30
+ border: '▞',
31
+ glow: chalk.hex('#34d399'),
32
+ shadow: chalk.hex('#064e3b'),
33
+ bg: '#064e3b',
34
+ icon: '🎓'
35
+ };
36
+ case 'chat':
37
+ return {
38
+ primary: chalk.hex('#a855f7'), // Purple
39
+ secondary: chalk.hex('#3b0764'),
40
+ border: '✧',
41
+ glow: chalk.hex('#c084fc'),
42
+ shadow: chalk.hex('#3b0764'),
43
+ bg: '#3b0764',
44
+ icon: '💬'
45
+ };
46
+ case 'student':
47
+ return {
48
+ primary: chalk.hex('#f59e0b'), // Amber
49
+ secondary: chalk.hex('#451a03'),
50
+ border: '▓',
51
+ glow: chalk.hex('#fbbf24'),
52
+ shadow: chalk.hex('#451a03'),
53
+ bg: '#451a03',
54
+ icon: '🛡️'
55
+ };
56
+ case 'dev':
57
+ default:
58
+ return {
59
+ primary: chalk.hex('#06b6d4'), // Cyan
60
+ secondary: chalk.hex('#164e63'),
61
+ border: '░',
62
+ glow: chalk.hex('#22d3ee'),
63
+ shadow: chalk.hex('#083344'),
64
+ bg: '#164e63',
65
+ icon: '⚡'
66
+ };
67
+ }
68
+ }
69
+
70
+ static setTheme(mode: TUIMode) {
71
+ this.currentTheme = mode;
72
+ }
8
73
 
9
74
  /**
10
75
  * Initialize the TUI Mode
@@ -70,7 +135,8 @@ export class TUI {
70
135
 
71
136
  if (width <= 0 || height <= 0) return;
72
137
 
73
- const leftTag = chalk.bgHex('#1E1E1E').hex('#D97757').bold(' ⚡ MATEX ');
138
+ const theme = this.getModeTheme(this.currentTheme);
139
+ const leftTag = chalk.bgHex('#1E1E1E').hex(theme.bg).bold(` ${theme.icon} MATEX `);
74
140
  const mainMessage = chalk.bgHex('#1E1E1E').white(` ${message} `);
75
141
  const remainingWidth = width - (leftTag.length + mainMessage.length);
76
142
  const spacer = chalk.bgHex('#1E1E1E')(' '.repeat(Math.max(0, remainingWidth)));
@@ -109,7 +175,7 @@ export class TUI {
109
175
  console.log(glow(' │ ') + chalk.bgHex('#164e63').white.bold(header) + border('─'.repeat(hPad)) + glow(' │'));
110
176
 
111
177
  const lines = content.split('\n');
112
- const displayLines = lines.length > 25 ? lines.slice(0, 23) : lines;
178
+ const displayLines = lines.slice(0, 10);
113
179
 
114
180
  displayLines.forEach(line => {
115
181
  const displayLine = line.length > innerWidth ? line.substring(0, innerWidth - 3) + '...' : line;
@@ -117,8 +183,8 @@ export class TUI {
117
183
  console.log(border(' │ ') + chalk.white(displayLine) + ' '.repeat(pad) + border(' │'));
118
184
  });
119
185
 
120
- if (lines.length > 25) {
121
- console.log(border(' │ ') + chalk.italic.gray(`... ${lines.length - 23} more lines ...`).padEnd(innerWidth) + border(' │'));
186
+ if (lines.length > 10) {
187
+ console.log(border(' │ ') + chalk.hex('#06b6d4').bold(` ^ [ ${lines.length - 10} MORE LINES • USE ^ TO SEE ALL ] ^`).padEnd(innerWidth) + border(' │'));
122
188
  }
123
189
 
124
190
  console.log(shadow(` └${'─'.repeat(width - 4)}┘\n`));
@@ -158,6 +224,8 @@ export class TUI {
158
224
  * Live Streaming: Start a technical block container
159
225
  */
160
226
  static drawStreamingStart(title: string, language: string) {
227
+ this.streamingLineCount = 0;
228
+ this.isStreamingTruncated = false;
161
229
  const width = 76;
162
230
  const glow = chalk.hex('#06b6d4');
163
231
  const border = chalk.hex('#164e63');
@@ -173,17 +241,26 @@ export class TUI {
173
241
  * Live Streaming: Add a line to the active container
174
242
  */
175
243
  static drawStreamingLine(content: string) {
244
+ if (this.isStreamingTruncated) return;
245
+
176
246
  const width = 76;
177
247
  const innerWidth = width - 8;
178
248
  const border = chalk.hex('#164e63');
179
249
 
180
250
  // Handle multi-line content if passed
181
251
  const lines = content.split('\n');
182
- lines.forEach(line => {
252
+ for (const line of lines) {
253
+ if (this.streamingLineCount >= 10) {
254
+ this.isStreamingTruncated = true;
255
+ console.log(border(' │ ') + chalk.hex('#06b6d4').bold(` ^ [ MAX STABLE VIEW REACHED • STREAMING TRUNCATED ] ^`).padEnd(innerWidth) + border(' │'));
256
+ break;
257
+ }
258
+
183
259
  const displayLine = line.length > innerWidth ? line.substring(0, innerWidth - 3) + '...' : line;
184
260
  const pad = Math.max(0, innerWidth - displayLine.length);
185
261
  console.log(border(' │ ') + chalk.white(displayLine) + ' '.repeat(pad) + border(' │'));
186
- });
262
+ this.streamingLineCount++;
263
+ }
187
264
  }
188
265
 
189
266
  /**
@@ -257,15 +334,17 @@ export class TUI {
257
334
  }
258
335
 
259
336
  /**
260
- * Draw a specialized message container for agents
337
+ * Draw a premium header for orchestrator messages
261
338
  */
262
- static drawMessageContainer(agent: string, message: string) {
263
- const color = agent.includes('Ajay') ? chalk.magenta :
264
- agent.includes('Sunil') ? chalk.blue :
265
- agent.includes('Sandip') ? chalk.hex('#FF69B4') :
266
- chalk.green;
339
+ static drawPremiumHeader(agent: string, icon: string, color: (s: string) => string) {
340
+ const theme = this.getModeTheme(this.currentTheme);
341
+ const width = 76;
267
342
 
268
- this.drawBox(`🤖 ${agent}`, message, color);
343
+ console.log('\n' + theme.shadow(`${theme.border.repeat(width / theme.border.length)}`));
344
+ const header = ` ${icon} ${agent.toUpperCase()} `;
345
+ const hPad = Math.max(0, width - 8 - header.length);
346
+ console.log(theme.primary(` ${theme.border} `) + chalk.bgHex(theme.bg).white.bold(header) + theme.secondary(' '.repeat(hPad)) + theme.primary(` ${theme.border}`));
347
+ console.log(theme.shadow(`${theme.border.repeat(width / theme.border.length)}`));
269
348
  }
270
349
 
271
350
  /**
@@ -290,13 +369,14 @@ export class TUI {
290
369
 
291
370
  const width = 76;
292
371
  const innerWidth = width - 10;
372
+ const theme = this.getModeTheme(this.currentTheme);
293
373
 
294
374
  // Robust Elite Header
295
- console.log('\n' + color(` ┌${'─'.repeat(width - 4)}┐`));
375
+ console.log('\n' + theme.primary(` ${theme.border.repeat(width - 4)}`));
296
376
  const header = ` ${icon} ${agent.toUpperCase()} `;
297
377
  const hPad = Math.max(0, width - 8 - header.length);
298
- console.log(color(' ') + chalk.bgHex('#1a1a1a').white.bold(header) + color('╊'.repeat(hPad)) + color(' │'));
299
- console.log(color(' ') + glowColor('─'.repeat(width - 6)) + color(' │'));
378
+ console.log(theme.primary(` ${theme.border} `) + chalk.bgHex(theme.bg).white.bold(header) + theme.secondary(theme.border.repeat(hPad)) + theme.primary(` ${theme.border}`));
379
+ console.log(theme.primary(` ${theme.border} `) + glowColor('─'.repeat(width - 8)) + theme.primary(` ${theme.border}`));
300
380
 
301
381
  // Wrapped Content
302
382
  const words = message.split(' ');
@@ -311,7 +391,7 @@ export class TUI {
311
391
  });
312
392
  if (currentLine) console.log(color(' │ ') + chalk.white(currentLine.padEnd(innerWidth)) + color(' │'));
313
393
 
314
- console.log(color(` └${'─'.repeat(width - 4)}┘\n`));
394
+ console.log(theme.primary(` ${theme.border.repeat(width - 4)}`));
315
395
  }
316
396
 
317
397
  /**