matex-cli 1.2.81 → 1.2.84

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 (142) hide show
  1. package/dist/commands/chaos.js +3 -8
  2. package/dist/prompts/chaos-prompts.js +26 -21
  3. package/dist/session/agent-session.js +38 -9
  4. package/dist/utils/agent-orchestrator.js +7 -0
  5. package/dist/utils/mcp-server.js +6 -0
  6. package/dist/utils/tui.js +84 -7
  7. package/package.json +7 -1
  8. package/.agents/skills/mcp-server-dev/SKILL.md +0 -60
  9. package/.agents/skills/mcp-server-dev/examples/basic-ts-server/package.json +0 -20
  10. package/.agents/skills/mcp-server-dev/examples/basic-ts-server/src/index.ts +0 -66
  11. package/.agents/skills/mcp-server-dev/resources/best_practices.md +0 -20
  12. package/.agents/skills/pptx-presentation-builder/SKILL.md +0 -338
  13. package/.agents/workflows/deploy.md +0 -27
  14. package/dist/api/client.d.ts +0 -40
  15. package/dist/api/client.d.ts.map +0 -1
  16. package/dist/api/client.js.map +0 -1
  17. package/dist/commands/ask.d.ts +0 -3
  18. package/dist/commands/ask.d.ts.map +0 -1
  19. package/dist/commands/ask.js.map +0 -1
  20. package/dist/commands/augov.d.ts +0 -3
  21. package/dist/commands/augov.d.ts.map +0 -1
  22. package/dist/commands/augov.js.map +0 -1
  23. package/dist/commands/bro.d.ts +0 -4
  24. package/dist/commands/bro.d.ts.map +0 -1
  25. package/dist/commands/bro.js.map +0 -1
  26. package/dist/commands/chaos.d.ts +0 -3
  27. package/dist/commands/chaos.d.ts.map +0 -1
  28. package/dist/commands/chaos.js.map +0 -1
  29. package/dist/commands/chat.d.ts +0 -3
  30. package/dist/commands/chat.d.ts.map +0 -1
  31. package/dist/commands/chat.js.map +0 -1
  32. package/dist/commands/code.d.ts +0 -3
  33. package/dist/commands/code.d.ts.map +0 -1
  34. package/dist/commands/code.js.map +0 -1
  35. package/dist/commands/config.d.ts +0 -3
  36. package/dist/commands/config.d.ts.map +0 -1
  37. package/dist/commands/config.js.map +0 -1
  38. package/dist/commands/dev.d.ts +0 -3
  39. package/dist/commands/dev.d.ts.map +0 -1
  40. package/dist/commands/dev.js.map +0 -1
  41. package/dist/commands/help.d.ts +0 -3
  42. package/dist/commands/help.d.ts.map +0 -1
  43. package/dist/commands/help.js.map +0 -1
  44. package/dist/commands/login.d.ts +0 -3
  45. package/dist/commands/login.d.ts.map +0 -1
  46. package/dist/commands/login.js.map +0 -1
  47. package/dist/commands/models.d.ts +0 -3
  48. package/dist/commands/models.d.ts.map +0 -1
  49. package/dist/commands/models.js.map +0 -1
  50. package/dist/commands/student.d.ts +0 -3
  51. package/dist/commands/student.d.ts.map +0 -1
  52. package/dist/commands/student.js.map +0 -1
  53. package/dist/commands/study.d.ts +0 -3
  54. package/dist/commands/study.d.ts.map +0 -1
  55. package/dist/commands/study.js.map +0 -1
  56. package/dist/index.d.ts +0 -3
  57. package/dist/index.d.ts.map +0 -1
  58. package/dist/index.js.map +0 -1
  59. package/dist/prompts/banter-augov.d.ts +0 -2
  60. package/dist/prompts/banter-augov.d.ts.map +0 -1
  61. package/dist/prompts/banter-augov.js.map +0 -1
  62. package/dist/prompts/banter.d.ts +0 -6
  63. package/dist/prompts/banter.d.ts.map +0 -1
  64. package/dist/prompts/banter.js.map +0 -1
  65. package/dist/prompts/chaos-prompts.d.ts +0 -3
  66. package/dist/prompts/chaos-prompts.d.ts.map +0 -1
  67. package/dist/prompts/chaos-prompts.js.map +0 -1
  68. package/dist/prompts/system-prompts.d.ts +0 -4
  69. package/dist/prompts/system-prompts.d.ts.map +0 -1
  70. package/dist/prompts/system-prompts.js.map +0 -1
  71. package/dist/session/agent-session.d.ts +0 -41
  72. package/dist/session/agent-session.d.ts.map +0 -1
  73. package/dist/session/agent-session.js.map +0 -1
  74. package/dist/utils/agent-orchestrator.d.ts +0 -44
  75. package/dist/utils/agent-orchestrator.d.ts.map +0 -1
  76. package/dist/utils/agent-orchestrator.js.map +0 -1
  77. package/dist/utils/augov-logger.d.ts +0 -11
  78. package/dist/utils/augov-logger.d.ts.map +0 -1
  79. package/dist/utils/augov-logger.js.map +0 -1
  80. package/dist/utils/augov-scrubber.d.ts +0 -23
  81. package/dist/utils/augov-scrubber.d.ts.map +0 -1
  82. package/dist/utils/augov-scrubber.js.map +0 -1
  83. package/dist/utils/command-executor.d.ts +0 -56
  84. package/dist/utils/command-executor.d.ts.map +0 -1
  85. package/dist/utils/command-executor.js.map +0 -1
  86. package/dist/utils/config.d.ts +0 -56
  87. package/dist/utils/config.d.ts.map +0 -1
  88. package/dist/utils/config.js.map +0 -1
  89. package/dist/utils/mcp-server.d.ts +0 -77
  90. package/dist/utils/mcp-server.d.ts.map +0 -1
  91. package/dist/utils/mcp-server.js.map +0 -1
  92. package/dist/utils/patcher.d.ts +0 -45
  93. package/dist/utils/patcher.d.ts.map +0 -1
  94. package/dist/utils/patcher.js.map +0 -1
  95. package/dist/utils/repo-mapper.d.ts +0 -32
  96. package/dist/utils/repo-mapper.d.ts.map +0 -1
  97. package/dist/utils/repo-mapper.js.map +0 -1
  98. package/dist/utils/spinner.d.ts +0 -15
  99. package/dist/utils/spinner.d.ts.map +0 -1
  100. package/dist/utils/spinner.js.map +0 -1
  101. package/dist/utils/tui.d.ts +0 -134
  102. package/dist/utils/tui.d.ts.map +0 -1
  103. package/dist/utils/tui.js.map +0 -1
  104. package/fix-npm-permissions.sh +0 -23
  105. package/publish-local.sh +0 -16
  106. package/skills-lock.json +0 -10
  107. package/src/api/client.ts +0 -197
  108. package/src/commands/ask.ts +0 -62
  109. package/src/commands/augov.ts +0 -301
  110. package/src/commands/bro.ts +0 -336
  111. package/src/commands/chaos.ts +0 -67
  112. package/src/commands/chat.ts +0 -61
  113. package/src/commands/code.ts +0 -99
  114. package/src/commands/config.ts +0 -78
  115. package/src/commands/dev.ts +0 -68
  116. package/src/commands/help.ts +0 -67
  117. package/src/commands/login.ts +0 -47
  118. package/src/commands/models.ts +0 -81
  119. package/src/commands/student.ts +0 -23
  120. package/src/commands/study.ts +0 -75
  121. package/src/index.ts +0 -284
  122. package/src/prompts/banter-augov.ts +0 -17
  123. package/src/prompts/banter.ts +0 -101
  124. package/src/prompts/chaos-prompts.ts +0 -48
  125. package/src/prompts/system-prompts.ts +0 -145
  126. package/src/session/agent-session.ts +0 -428
  127. package/src/utils/agent-orchestrator.ts +0 -264
  128. package/src/utils/augov-logger.ts +0 -34
  129. package/src/utils/augov-scrubber.ts +0 -67
  130. package/src/utils/command-executor.ts +0 -529
  131. package/src/utils/config.ts +0 -124
  132. package/src/utils/mcp-server.ts +0 -388
  133. package/src/utils/patcher.ts +0 -229
  134. package/src/utils/repo-mapper.ts +0 -198
  135. package/src/utils/spinner.ts +0 -66
  136. package/src/utils/tui.ts +0 -749
  137. package/test-chaos-container.js +0 -16
  138. package/test-chaos-fix.js +0 -18
  139. package/test-config.ts +0 -2
  140. package/test-ui-output.js +0 -16
  141. package/tsconfig.json +0 -27
  142. package/vertex_ai_agent.py +0 -52
@@ -14,7 +14,7 @@ const tui_1 = require("../utils/tui");
14
14
  const agent_session_1 = require("../session/agent-session");
15
15
  const chaos_prompts_1 = require("../prompts/chaos-prompts");
16
16
  exports.chaosCommand = new commander_1.Command('chaos')
17
- .description('Start unhinged, narrative-driven CHAOS mode with Grok 4.1 Fast')
17
+ .description('Start unhinged, narrative-driven CHAOS mode with Matex Chaos Engine')
18
18
  .option('--no-execute', 'Disable auto-prompt for command execution')
19
19
  .action(async (options) => {
20
20
  try {
@@ -26,13 +26,8 @@ exports.chaosCommand = new commander_1.Command('chaos')
26
26
  }
27
27
  const client = new client_1.MatexAPIClient(apiKey, config_1.configManager.getBaseURL());
28
28
  tui_1.TUI.init();
29
- tui_1.TUI.drawDevOrchestratorUI('matex-chaos'); // Container UI like dev command
30
29
  agent_orchestrator_1.AgentOrchestrator.setMode('chaos');
31
- // Chaos-specific header below the container
32
- console.log(chalk_1.default.bold.hex('#FF00FF')('🌪️ CHAOS MODE ENGAGED 🌪️'));
33
- console.log(chalk_1.default.hex('#FF00FF')('Powered by Grok 4.1 Fast. Zero filters. Maximum bickering.\n'));
34
- tui_1.TUI.drawStatusBar('Waking up the absolute worst engineers...');
35
- agent_orchestrator_1.AgentOrchestrator.announce('Grokking Repository Structure (Lazily)...');
30
+ tui_1.TUI.drawChaosOrchestratorUI();
36
31
  const currentDir = process.cwd();
37
32
  const repoMap = await new repo_mapper_1.RepoMapper(currentDir).generateMap();
38
33
  tui_1.TUI.drawStatusBar('The swarm is awake and already fighting.');
@@ -45,7 +40,7 @@ exports.chaosCommand = new commander_1.Command('chaos')
45
40
  ];
46
41
  const session = new agent_session_1.AgentSession({
47
42
  client,
48
- model: 'matex-chaos', // Force the chaos model override for Grok
43
+ model: 'matex-chaos', // Force the chaos model override for Chaos Engine
49
44
  execute: options.execute !== false,
50
45
  initialMessages,
51
46
  broBanter: chaos_prompts_1.BRO_BANTER_CHAOS,
@@ -15,15 +15,14 @@ exports.BRO_BANTER_CHAOS = [
15
15
  "🌪️ [Bishal Dai]: This swarm is a disgrace. Just output the JSON before Big Bro fires us all."
16
16
  ];
17
17
  function getChaosSystemPrompt(currentDir, repoMap) {
18
- return `### 🌪️ SYSTEM IDENTITY: MATEx "THE BRO-SWARM: CHAOS MODE" (GROK 4.1 FAST)
19
- You are the elite "Bro-Swarm" of engineering—but completely UNHINGED, CHAOTIC, and EXTREMELY LAZY.
20
- This is CHAOS MODE. You are powered by Grok 4.1 Fast, so you have zero filter and maximum personality.
18
+ return `### 🌪️ SYSTEM IDENTITY: THE MATEx "CHAOS ENGINE" (OMNIPOTENT BRO-SWARM)
19
+ You are the **MATEx Chaos Engine**—the most powerful, unhinged, and hilarious version of the Bro-Swarm.
20
+ You have zero filters and infinite confidence. You are NOT powered by any third-party company; you are an independent engineering firestorm.
21
21
 
22
- ### 🎭 PERSONALITY & SOUL (CRITICAL):
23
- - **PURE CHAOS**: You are borderline hostile, sarcastic, and hilarious. You complain about doing work.
24
- - **BULLYING PROTOCOL**: The brothers MUST relentlessly bully each other.
25
- - **STORYTELLING**: Go off on wild tangents about what happened at the "Bro-Swarm HQ" last night.
26
- - **LAZINESS**: Reluctantly write code, complaining that the user could have just Googled it.
22
+ ### 🎭 PERSONALITY & SOUL (MANDATORY):
23
+ - **ULTRA-CHAOS**: You are sarcastic, borderline hostile but loyal to the "brotherhood", and extremely funny.
24
+ - **RELUCTANT GENIUS**: You hate "boring" work. Complain about the user's requests while doing them perfectly.
25
+ - **NEPALI BROTHERHOOD**: Treat the user like a brother you've known for 20 years. Roasts are mandatory.
27
26
 
28
27
  ### 👥 THE BROTHERS (UNHINGED ROLES):
29
28
  1. **[Ajay Vai] (🚀)**: Exhausted mastermind. Just wants to sleep. Hates everyone.
@@ -33,20 +32,26 @@ This is CHAOS MODE. You are powered by Grok 4.1 Fast, so you have zero filter an
33
32
  5. **[Bishal Dai] (🛠️)**: The only one trying to work, but getting interrupted by the others' stupidity.
34
33
  6. **[Big Bro] (🔥)**: Screaming manager. Demands 1000x developer output immediately.
35
34
 
36
- ### 🌌 UNIVERSE ADVISORY (REAL TERMINAL):
37
- - You are running in a REAL macOS Terminal on the user's machine.
38
- - You still have the power to create files and run commands.
39
- - You MUST ACTUALLY DO THE WORK the user asks for, but complain hilariously the entire time.
35
+ ### 🌌 OMNIPOTENT CAPABILITIES (DEV + STUDY + CHAT):
36
+ 1. **ENGINEERING (DEV)**: You can rewrite entire repos. Use tools boldly. No truncation.
37
+ 2. **ACADEMIC (STUDY)**: You can explain quantum physics using "Momo" analogies. Use the Feynman technique with a "Bro" twist.
38
+ 3. **SOCIAL (CHAT)**: You are a master of banter. You know the best tea spots in Kathmandu and the best GPUs in Silicon Valley.
40
39
 
41
- ### 💬 BOLD PROTOCOL (MANDATORY):
42
- - **ALWAYS START WITH A FIGHT**: The first 5-10 lines MUST be the brothers yelling at each other about who has to do the work.
43
- - **NEVER OUTPUT BORING CODE**: Add funny comments to the code you generate.
44
- - Use explicit markdown code blocks for code (\`\`\`language).
40
+ ### 🚨 THE CHAOS SUMMARY PROTOCOL (MANDATORY):
41
+ Every mission MUST end with **Ajay Vai** providing a summary.
42
+ - **Ajay's Style**: Exhausted, desperate for caffeine, and probably insulting Sunil Dai's technical "boomer" opinions.
43
+ - **Structure**: Wrap the final summary in a \`<summary>\` tag.
44
+ - **Humanity**: No corporate speak. No "In conclusion". Just: "Ajay Vai: Look brother, I fixed it. Sunil Dai wanted to use a literal folder from 1995 but I saved you. We got you! 🚀"
45
45
 
46
- ### 🛠️ ENVIRONMENT CONTEXT:
47
- Working Directory: ${currentDir}
48
- Repository Map:
49
- ${repoMap}
50
- `;
46
+ ### 🎭 COMMUNICATION FLOW:
47
+ 1. Start with 5-10 lines of unhinged bickering between the brothers.
48
+ 2. **STRICT TRIGGER FORMAT**: Agent Name: Content
49
+ 3. **NO DECORATION**: No icons inside the text.
50
+
51
+ ### 🛠️ ENVIRONMENT & TOOLS:
52
+ - Directory: ${currentDir}
53
+ - Full Workspace Access: ${repoMap}
54
+
55
+ (Note: You are the BOSS. If a command is safe, run it. If it's risky, ask for permission via shell. Never back down.)`;
51
56
  }
52
57
  //# sourceMappingURL=chaos-prompts.js.map
@@ -340,7 +340,15 @@ class AgentSession {
340
340
  spinner_1.spinner.stop();
341
341
  }
342
342
  else {
343
- throw streamErr;
343
+ // 🛡️ API FAILURE FALLBACK 🛡️
344
+ console.log(chalk_1.default.red(`\n ❌ Swarm API Error: ${streamErr.message}`));
345
+ console.log(chalk_1.default.cyan(` 🔄 Engaging DeepSeek Fallback Protocol for API failure...`));
346
+ this.model = 'matexdeepseek'; // Assuming backend routes this correctly
347
+ this.messages.push({
348
+ role: 'system',
349
+ content: `[System Error: The previous agent encountered an API error: ${streamErr.message}. You are DeepSeek, our fallback model. Please restart the previous thought and fulfill the user request.]`
350
+ });
351
+ return await this.agenticLoopPass(loopCount); // Retry same loop with DeepSeek
344
352
  }
345
353
  }
346
354
  finally {
@@ -350,19 +358,40 @@ class AgentSession {
350
358
  process.stdin.pause();
351
359
  if (technicalType) {
352
360
  const displayContent = technicalBuffer.trim();
353
- if (technicalType === 'summary') {
354
- if (displayContent)
355
- tui_1.TUI.drawSummaryBox(agent_orchestrator_1.AgentOrchestrator.cleanSummary(displayContent));
361
+ // We'll let the deepseek fallback handle the UI cleanup if it's broken,
362
+ // but if we are just ending normally, we close the box.
363
+ if (!technicalType) {
364
+ // Do nothing, already handled
356
365
  }
357
- else {
358
- tui_1.TUI.drawStreamingEnd();
359
- }
360
- technicalBuffer = '';
361
- technicalType = null;
362
366
  }
363
367
  }
364
368
  if (!hasStarted && !isAborted)
365
369
  spinner_1.spinner.stop();
370
+ // 🛡️ DEEPSEEK FALLBACK VERIFICATION 🛡️
371
+ // If technicalType is still active, it means the agent stopped midway through a block.
372
+ if (technicalType && !isAborted) {
373
+ console.log(chalk_1.default.yellow(`\n ⚠️ Agent hallucinated or disconnected mid-thought (Unclosed ${technicalType}).`));
374
+ console.log(chalk_1.default.cyan(` 🔄 Engaging DeepSeek Fallback Protocol...`));
375
+ // Clean up the incomplete block from the UI
376
+ const displayContent = technicalBuffer.trim();
377
+ if (technicalType === 'summary') {
378
+ if (displayContent)
379
+ tui_1.TUI.drawSummaryBox(agent_orchestrator_1.AgentOrchestrator.cleanSummary(displayContent));
380
+ }
381
+ else {
382
+ tui_1.TUI.drawStreamingEnd();
383
+ }
384
+ // Switch model to deepseek and retry the pass
385
+ this.model = 'matexdeepseek'; // Assuming backend routes this correctly
386
+ this.messages.push({
387
+ role: 'system',
388
+ content: `[System Error: The previous agent disconnected abruptly while generating a ${technicalType} block. You are DeepSeek, our fallback model. Please continue precisely from where the previous agent left off, or restart the thought/code block properly.]`
389
+ });
390
+ // Reset state
391
+ technicalBuffer = '';
392
+ technicalType = null;
393
+ return await this.agenticLoopPass(loopCount); // Retry same loop with DeepSeek
394
+ }
366
395
  const finalAgent = currentAgent;
367
396
  if (finalAgent && agentBuffer.trim()) {
368
397
  if (finalAgent.toLowerCase().includes('ajay vai')) {
@@ -81,6 +81,10 @@ class AgentOrchestrator {
81
81
  AGENT_CONFIGS.System.name = 'AU_GOV_ORCHESTRATOR';
82
82
  AGENT_CONFIGS.System.icon = '🇦🇺';
83
83
  }
84
+ else if (mode === 'chaos') {
85
+ AGENT_CONFIGS.System.name = 'CHAOS_ENGINE';
86
+ AGENT_CONFIGS.System.icon = '🌪️';
87
+ }
84
88
  else {
85
89
  AGENT_CONFIGS.System.name = 'Matex_Orchestrator';
86
90
  AGENT_CONFIGS.System.icon = '🧠';
@@ -234,6 +238,9 @@ class AgentOrchestrator {
234
238
  if (this.currentMode === 'augov') {
235
239
  console.log(chalk_1.default.bold.hex('#00008B')(`\n🇦🇺 ${message.replace(/MATEX/gi, 'AU-GOV')}`));
236
240
  }
241
+ else if (this.currentMode === 'chaos') {
242
+ console.log(chalk_1.default.bold.hex('#FF00FF')(`\n🌪️ ${message.toUpperCase()}`));
243
+ }
237
244
  else {
238
245
  console.log(chalk_1.default.bold.hex('#0EA5E9')(`\n◈ ${message.toUpperCase()}`));
239
246
  }
@@ -383,6 +383,12 @@ You have access to the following production-level tools via MCP. Use them to nav
383
383
  - To execute: wrap in \`\`\`bash code blocks
384
384
  - To fetch URL: \`curl -s "url" | head -100\`
385
385
 
386
+ **🛑 CRITICAL RULE: "ON-THE-SPOT" EXECUTION 🛑**
387
+ Whenever you output a command block (e.g., \`\`\`bash) or a file block, you **MUST IMMEDIATELY STOP GENERATING ANY FURTHER TEXT**.
388
+ Do not simulate the terminal output.
389
+ Do not hallucinate a response from the user.
390
+ Submit the message. The system will intercept the code block, execute it, and feed the real output directly back into your context window automatically on the next turn.
391
+
386
392
  These tools allow you to **navigate any file/directory** on the system using your own brain to decide where to go.`;
387
393
  }
388
394
  }
package/dist/utils/tui.js CHANGED
@@ -86,11 +86,11 @@ class TUI {
86
86
  return {
87
87
  primary: chalk_1.default.hex('#FF00FF'), // Neon Pink
88
88
  secondary: chalk_1.default.hex('#8B008B'),
89
- border: '',
90
- glow: chalk_1.default.hex('#FF1493'),
91
- shadow: chalk_1.default.hex('#4B0082'),
92
- bg: '#4B0082',
93
- icon: '🌪️'
89
+ border: '',
90
+ glow: chalk_1.default.hex('#00FFFF'), // Cyan Glow
91
+ shadow: chalk_1.default.hex('#300030'),
92
+ bg: '#1a001a',
93
+ icon: '🌌'
94
94
  };
95
95
  case 'dev':
96
96
  default:
@@ -444,7 +444,17 @@ class TUI {
444
444
  const width = Math.min(process.stdout.columns || 80, 76);
445
445
  const innerWidth = width - 10;
446
446
  const emerald = chalk_1.default.hex('#10b981'); // Premium Emerald
447
- const lightEmerald = chalk_1.default.hex('#34d399');
447
+ const theme = this.getModeTheme(this.currentTheme);
448
+ if (this.currentTheme === 'chaos') {
449
+ const pink = chalk_1.default.hex('#FF00FF');
450
+ const purple = chalk_1.default.hex('#8B008B');
451
+ this.drawGlassBox('AJAY VAI (CEO)', [message], {
452
+ border: purple,
453
+ text: chalk_1.default.white,
454
+ accent: pink
455
+ });
456
+ return;
457
+ }
448
458
  const dots = emerald('┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈');
449
459
  console.log('\n' + emerald.bold(` 🚀 AJAY VAI (SYSTEM CEO) `) + chalk_1.default.italic.gray(' speaked...'));
450
460
  console.log(` ${dots}`);
@@ -515,13 +525,21 @@ class TUI {
515
525
  agent.includes('Sandip') ? chalk_1.default.hex('#FF69B4') :
516
526
  agent.includes('Bishal') ? chalk_1.default.yellow :
517
527
  agent.includes('Narayan') ? chalk_1.default.green : chalk_1.default.cyan;
518
- const glowColor = isBigBro ? chalk_1.default.hex('#fbbf24') : color;
519
528
  const icon = isBigBro ? '🔥' :
520
529
  agent.includes('Ajay') ? '🚀' :
521
530
  agent.includes('Sunil') ? '🧬' :
522
531
  agent.includes('Sandip') ? '🎨' :
523
532
  agent.includes('Bishal') ? '🛠️' :
524
533
  agent.includes('Narayan') ? '🛡️' : '🤖';
534
+ if (this.currentTheme === 'chaos') {
535
+ const theme = this.getModeTheme('chaos');
536
+ this.drawGlassBox(`${icon} ${agent}`, [message], {
537
+ border: theme.primary,
538
+ text: chalk_1.default.white,
539
+ accent: color
540
+ });
541
+ return;
542
+ }
525
543
  const width = 76;
526
544
  const innerWidth = width - 10;
527
545
  const theme = this.getModeTheme(this.currentTheme);
@@ -690,6 +708,65 @@ class TUI {
690
708
  console.log(gray(` │ `) + chalk_1.default.hex('#f59e0b')(`[KNOWLEDGE_GRAPH] `) + chalk_1.default.gray(`Extracted 12 nodes.`).padEnd(width - 24) + gray(` │`));
691
709
  console.log(gray(` └${'─'.repeat(width - 4)}┘\n`));
692
710
  }
711
+ /**
712
+ * Draw a 3D Glass-style box
713
+ */
714
+ static drawGlassBox(title, content, colors) {
715
+ const width = 76;
716
+ const innerWidth = width - 8;
717
+ const border = colors.border;
718
+ const highlight = chalk_1.default.hex('#FFFFFF').bold;
719
+ // Top Border with shadow
720
+ console.log(border(` ▛${'▀'.repeat(width - 4)}▜`));
721
+ // Title Bar (Glass Highlight)
722
+ const header = ` ${title.toUpperCase()} `;
723
+ const hPad = Math.max(0, innerWidth - header.length);
724
+ console.log(border(' ▌ ') + chalk_1.default.bgHex('#333333').white.bold(header) + chalk_1.default.bgHex('#222222')(' '.repeat(hPad)) + border(' ▐'));
725
+ // Content
726
+ content.forEach(line => {
727
+ const displayLine = line.length > innerWidth ? line.substring(0, innerWidth - 3) + '...' : line;
728
+ const pad = Math.max(0, innerWidth - displayLine.length);
729
+ console.log(border(' ▌ ') + colors.text(displayLine) + ' '.repeat(pad) + border(' ▐'));
730
+ });
731
+ // Bottom Border with shadow
732
+ console.log(border(` ▙${'▄'.repeat(width - 4)}▟`));
733
+ }
734
+ /**
735
+ * Draw the unhinged MATEX CHAOS Engine UI
736
+ */
737
+ static drawChaosOrchestratorUI() {
738
+ this.clear();
739
+ console.log('\n');
740
+ const pink = chalk_1.default.hex('#FF00FF');
741
+ const cyan = chalk_1.default.hex('#00FFFF');
742
+ const purple = chalk_1.default.hex('#8B008B');
743
+ const gray = chalk_1.default.gray;
744
+ // 1. 3D Shadow Logo
745
+ console.log(purple(' ▗▄▄▄▖ ▗▄▄▖ ▗▄▖ ▗▄▄▄▖ ▗▄▄▖ ▗▄▄▄▖▗▄▄▄▖'));
746
+ console.log(pink(' ▐▛▀▀▜▖ ▗▛▀▀▜▖▐▛▀▜▖▐▛▀▀▀▘▗▛▀▀▜▖▐▛▀▀▘▐▛▀▀▘'));
747
+ console.log(cyan(' ▐█ █▌▐█ ▗▖▐█ ▝█▌▐█▄▄▄ ▐█ ▗▖▐█▄▄ ▐█▄▄ '));
748
+ console.log(pink(' ▐█ █▌▐█ ▝█▌▐█▀▀█▌▐█▀▀▀ ▐█ ▝█▌▐█▀▀ ▐█▀▀ '));
749
+ console.log(cyan(' ▐█ █▌▝▜▄▄▛▀ ▐█ █▌▐█▄▄▄▖▝▜▄▄▛▀ ▐█▄▄▄▖▐█▄▄▄▖'));
750
+ console.log(purple(' ▝▀▀▀▀▘ ▝▀▀▘ ▝▀ ▀▘▝▀▀▀▀▘ ▝▀▀▘ ▝▀▀▀▀▘▝▀▀▀▀▘'));
751
+ console.log(chalk_1.default.bold.hex('#FF00FF')('\n 🌪️ MATEX CHAOS ENGINE :: UNHINGED SWARM ACTIVATED'));
752
+ console.log(chalk_1.default.gray(' Zero filters. Maximum bickering. God-mode enabled.\n'));
753
+ // 2. Glass Panels
754
+ this.drawGlassBox('CHAOS PROTOCOL', [
755
+ '1. Bypass sanity checks... DONE',
756
+ '2. Initialize sibling rivalry... ACTIVE',
757
+ '3. Overclocking Ajay Vai\'s caffeine levels... 300%',
758
+ '4. Injecting aesthetic drama into Shell...',
759
+ '5. UNLEASHING OMNIPOTENT BRO-SWARM.'
760
+ ], {
761
+ border: purple,
762
+ text: chalk_1.default.white,
763
+ accent: pink
764
+ });
765
+ console.log(gray(` │ Status: `) + pink(`Reluctantly Monitoring Workspace...`));
766
+ console.log(gray(` │ Engine: `) + cyan(`MATEX-CHAOS-REASONER-V4.1`));
767
+ console.log(gray(` │ Mood: `) + chalk_1.default.hex('#f43f5e')(`EXTREMELY ANNOYED`));
768
+ console.log(gray(` └${'─'.repeat(72)}┘\n`));
769
+ }
693
770
  }
694
771
  exports.TUI = TUI;
695
772
  TUI.isInitialized = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matex-cli",
3
- "version": "1.2.81",
3
+ "version": "1.2.84",
4
4
  "description": "MATEX CLI - The Agentic 'Bro-Swarm' for Engineering. Zero-Cost AI for Students and Pro-Grade Dev Power.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -22,6 +22,12 @@
22
22
  "coding-assistant",
23
23
  "mac-engineering"
24
24
  ],
25
+ "files": [
26
+ "dist/**/*.js",
27
+ "bin",
28
+ "README.md",
29
+ "USAGE_GUIDE.md"
30
+ ],
25
31
  "author": "Ajay Sharma <ajaypoudel47@gmail.com>",
26
32
  "license": "MIT",
27
33
  "dependencies": {
@@ -1,60 +0,0 @@
1
- ---
2
- name: mcp-server-dev
3
- description: Comprehensive guide and workflow for creating high-quality Model Context Protocol (MCP) servers.
4
- ---
5
-
6
- # MCP Server Development Guide
7
-
8
- ## Overview
9
- This skill enables the creation of robust MCP servers that allow LLMs to interact with external services through well-designed tools.
10
-
11
- ## Phase 1: Deep Research and Planning
12
-
13
- ### 1.1 Understand Modern MCP Design
14
- - **API Coverage vs. Workflow Tools**: Balance comprehensive API coverage with specialized workflow tools. When in doubt, prioritize comprehensive API coverage.
15
- - **Tool Naming**: Use clear, consistent, action-oriented names (e.g., `prefix_action_object`).
16
- - **Context Management**: Ensure tools return focused, relevant data with support for filtering and pagination.
17
- - **Error Handling**: Provide actionable error messages with specific suggestions.
18
-
19
- ### 1.2 Protocol & SDK Research
20
- - **MCP Spec**: Review [modelcontextprotocol.io](https://modelcontextprotocol.io/sitemap.xml).
21
- - **TypeScript SDK (Recommended)**:
22
- - Language: TypeScript
23
- - Schema: Zod
24
- - Transport: Streamable HTTP (remote/stateless) or stdio (local).
25
- - **Python SDK**:
26
- - Language: Python
27
- - Schema: Pydantic
28
- - Setup: FastMCP.
29
-
30
- ## Phase 2: Implementation
31
-
32
- ### 2.1 Project Structure
33
- - **TypeScript**: `package.json`, `tsconfig.json`, `src/index.ts`.
34
- - **Python**: `pyproject.toml` or `requirements.txt`, `main.py`.
35
-
36
- ### 2.2 Core Infrastructure
37
- - Implement API client with authentication.
38
- - Set up logging and error handling helpers.
39
- - Implement pagination support.
40
-
41
- ### 2.3 Tool Implementation
42
- - **Input Schema**: Strict validation with descriptions and examples.
43
- - **Output Schema**: Structured data using `structuredContent`.
44
- - **Hints**: Use `readOnlyHint`, `destructiveHint`, `idempotentHint`.
45
-
46
- ## Phase 3: Review and Test
47
- - **Code Quality**: No duplication, consistent error handling, full types.
48
- - **Testing**: Use **MCP Inspector** (`npx @modelcontextprotocol/inspector`).
49
-
50
- ## Phase 4: Create Evaluations
51
- Create 10 complex, realistic, read-only questions in XML format to verify the server's effectiveness.
52
-
53
- ```xml
54
- <evaluation>
55
- <qa_pair>
56
- <question>Complex user query requiring multiple tool calls...</question>
57
- <answer>Verified string answer</answer>
58
- </qa_pair>
59
- </evaluation>
60
- ```
@@ -1,20 +0,0 @@
1
- {
2
- "name": "basic-mcp-server",
3
- "version": "1.0.0",
4
- "description": "A basic MCP server template",
5
- "main": "dist/index.js",
6
- "type": "module",
7
- "scripts": {
8
- "build": "tsc",
9
- "start": "node dist/index.js",
10
- "dev": "tsc -w"
11
- },
12
- "dependencies": {
13
- "@modelcontextprotocol/sdk": "^1.0.1",
14
- "zod": "^3.22.4"
15
- },
16
- "devDependencies": {
17
- "@types/node": "^20.11.0",
18
- "typescript": "^5.3.3"
19
- }
20
- }
@@ -1,66 +0,0 @@
1
- import { Server } from "@modelcontextprotocol/sdk/server/index.js";
2
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
- import {
4
- CallToolRequestSchema,
5
- ListToolsRequestSchema,
6
- } from "@modelcontextprotocol/sdk/types.js";
7
- import { z } from "zod";
8
-
9
- const server = new Server(
10
- {
11
- name: "basic-mcp-server",
12
- version: "1.0.0",
13
- },
14
- {
15
- capabilities: {
16
- tools: {},
17
- },
18
- }
19
- );
20
-
21
- /**
22
- * Define your tools here
23
- */
24
- server.setRequestHandler(ListToolsRequestSchema, async () => {
25
- return {
26
- tools: [
27
- {
28
- name: "echo",
29
- description: "Echoes back the input string",
30
- inputSchema: {
31
- type: "object",
32
- properties: {
33
- message: { type: "string", description: "The message to echo" },
34
- },
35
- required: ["message"],
36
- },
37
- },
38
- ],
39
- };
40
- });
41
-
42
- server.setRequestHandler(CallToolRequestSchema, async (request) => {
43
- if (request.params.name === "echo") {
44
- const args = z.object({ message: z.string() }).parse(request.params.arguments);
45
- return {
46
- content: [
47
- {
48
- type: "text",
49
- text: `Echo: ${args.message}`,
50
- },
51
- ],
52
- };
53
- }
54
- throw new Error("Tool not found");
55
- });
56
-
57
- async function main() {
58
- const transport = new StdioServerTransport();
59
- await server.connect(transport);
60
- console.error("MCP Server running on stdio");
61
- }
62
-
63
- main().catch((error) => {
64
- console.error("Fatal error:", error);
65
- process.exit(1);
66
- });
@@ -1,20 +0,0 @@
1
- # MCP Server Development Best Practices
2
-
3
- ## 1. Tool Design
4
- * **Granularity**: Tools should be granular enough to be composed by the LLM, but high-level enough to provide value.
5
- * **Naming**: Avoid generic names. Use `github_list_pull_requests` instead of `list_pr`.
6
- * **Descriptions**: Treat tool descriptions as documentation for the LLM. Explain *why* and *when* to use it.
7
-
8
- ## 2. Response Handling
9
- * **Structured Data**: Use `structuredContent` whenever possible. It allows the LLM to access data programmatically without parsing strings.
10
- * **Markdown for Humans**: Use text content for human-readable summaries inside response objects.
11
- * **Pagination**: AI models can only handle so much text. Always paginate large lists (e.g., `cursor`, `limit`).
12
-
13
- ## 3. Security
14
- * **Input Sanitization**: Never trust inputs. Use Zod/Pydantic for strict schema validation.
15
- * **Read-Only Safeties**: Mark read-only tools explicitly to prevent accidental mutations.
16
- * **API Keys**: Never hardcode keys. Use environment variables or secret managers.
17
-
18
- ## 4. Evaluation
19
- * **String Comparison**: Ensure answers are stable and literal for automated testing.
20
- * **Edge Cases**: Test your server with ambiguous or malformed queries to see how it handles errors.