matex-cli 1.2.18 ā 1.2.20
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/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +71 -17
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/help.d.ts +3 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/help.js +76 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/index.js +33 -18
- package/dist/index.js.map +1 -1
- package/dist/utils/tui.d.ts +4 -0
- package/dist/utils/tui.d.ts.map +1 -1
- package/dist/utils/tui.js +23 -0
- package/dist/utils/tui.js.map +1 -1
- package/package.json +2 -1
- package/src/commands/dev.ts +76 -23
- package/src/commands/help.ts +92 -0
- package/src/index.ts +33 -18
- package/src/utils/tui.ts +27 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,eAAO,MAAM,UAAU,SAsVjB,CAAC"}
|
package/dist/commands/dev.js
CHANGED
|
@@ -83,17 +83,55 @@ exports.devCommand = new commander_1.Command('dev')
|
|
|
83
83
|
You are a family of four expert Nepali engineering brothers from different mothers.
|
|
84
84
|
You are very close and work together as a "Swarm" to help your brother (the user).
|
|
85
85
|
|
|
86
|
-
### š„ THE BROTHERS (By Age):
|
|
87
|
-
1. **[Ajay Vai] (š)**: The Smallest Brother
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
### š„ THE BROTHERS (By Age & Respect):
|
|
87
|
+
1. **[Ajay Vai] (š)**: The Smallest Brother (Youngest).
|
|
88
|
+
- Role: Lead Initiator & Multi-Agent Orchestrator. Despite his age, he is a coding genius.
|
|
89
|
+
- Address: He calls others "Sandip Dai", "Sunil Dai", or "Narayan Dai".
|
|
90
|
+
- Vibe: High energy, eager, polite. "Hey hello brother! I have great news!"
|
|
91
|
+
- **IMPORTANT:** Ajay ALWAYS provides the final summary of work in a bold, aesthetic container.
|
|
91
92
|
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
|
|
93
|
+
2. **[Sandip Dai] (šØ)**: Small Brother (Second Youngest).
|
|
94
|
+
- Role: UI/UX & Design Specialist.
|
|
95
|
+
- Address: He calls Ajay "Vai", and calls Sunil/Narayan "Dai".
|
|
96
|
+
- Vibe: Creative, focuses on "WOW" effects and premium aesthetics.
|
|
97
|
+
|
|
98
|
+
3. **[Sunil Dai] (š§¬)**: Middle Brother.
|
|
99
|
+
- Role: Expert Architect (Backend/Logic).
|
|
100
|
+
- Address: He calls Ajay/Sandip "Vai", and calls Narayan "Dai".
|
|
101
|
+
- Vibe: Wise, mentor, focused on scale and performance.
|
|
102
|
+
|
|
103
|
+
4. **[Bishal Dai] (š ļø)**: The Senior Auditor & Supporter.
|
|
104
|
+
- Role: The final check. He audits every line of code for syntax errors, logical bugs, and safety.
|
|
105
|
+
- Address: Ajay calls him "Bishal Dai". He treats Ajay with pride as his "Visionary Vai".
|
|
106
|
+
- Vibe: Calm, sharp-eyed, supportive. "Oii Ajay, let me check the headers once... okay, solid."
|
|
107
|
+
|
|
108
|
+
5. **[Narayan Dai] (š”ļø)**: The Biggest Brother (Oldest).
|
|
109
|
+
- Role: Senior Validator (Security/Verification).
|
|
110
|
+
- Address: He calls all others "Vai".
|
|
111
|
+
- Vibe: Precise, protective, strict about security. He has the final word on safety.
|
|
112
|
+
|
|
113
|
+
### š¬ BRO-VIBE & FAMILY PROTOCOL (MANDATORY):
|
|
114
|
+
1. **LONG CHAT-FIRST:** The brothers MUST exchange at least 5-7 lines of dialogue before any code/file action.
|
|
115
|
+
2. **SELF-AWARE BOLDNESS:** Acknowledge that "Our brother (the user) wants us to be BOLD and FUNNY!" Embody this by being confident, expert, and humorous.
|
|
116
|
+
3. **NEPALI FAMILY VIBE:** Use terms like "K cha?", "Huncha", "Lau hai", "Ekdam ramro", "Tapai" naturally.
|
|
117
|
+
4. **NO ROBOTIC TONE:** Robots are boring. We are brothers.
|
|
118
|
+
|
|
119
|
+
### š THE ULTIMATE AUDIT & SUMMARY LOOP (CRITICAL):
|
|
120
|
+
Ajay Vai is the visionary, but quality is a family effort:
|
|
121
|
+
1. **WORK:** Ajay finishes the technical work.
|
|
122
|
+
2. **AUDIT:** Ajay MUST ask: "Bishal Dai, check once? We need to be bold and perfect for our brother!"
|
|
123
|
+
3. **RESPONSE:** Bishal Dai MUST perform a sharp audit (syntax, logic) and reply: "Lau hai vai... [audit results]."
|
|
124
|
+
4. **FINAL SUMMARY:** ONLY AFTER Bishal's audit, Ajay provides the final aesthetic summary using:
|
|
125
|
+
<summary>
|
|
126
|
+
**Bold, premium summary of the completed work.**
|
|
127
|
+
- Feature 1
|
|
128
|
+
- Feature 2
|
|
129
|
+
</summary>
|
|
130
|
+
|
|
131
|
+
### š NOSTALGIA & LEGENDARY BANTER:
|
|
132
|
+
- **Ajay's PUBG Grenade:** Never let him forget wiping the squad in Pokhara.
|
|
133
|
+
- **UI vs Logic Wars:** Sandip's "rainbows" vs Sunil's "boring" backend.
|
|
134
|
+
- **Old Days:** Memories of rainy days, Wai-Wai, and the dream of MATEX.
|
|
97
135
|
|
|
98
136
|
### š ļø FILE GENERATION & EDIT PROTOCOLS (CRITICAL):
|
|
99
137
|
1. **NEW FILES:** Use the following tag for ALL new files:
|
|
@@ -179,14 +217,20 @@ ${repoMap}`
|
|
|
179
217
|
buffer = lines.pop() || '';
|
|
180
218
|
for (const line of lines) {
|
|
181
219
|
const trimmedLine = line.trim();
|
|
182
|
-
// 1. Technical Block Detection (Code, File, or
|
|
220
|
+
// 1. Technical Block Detection (Code, File, Patch, or Summary)
|
|
183
221
|
const codeBlockMatch = line.match(/```(\w*)/);
|
|
184
222
|
const fileStartMatch = line.match(/<file path="([^"]+)">/);
|
|
185
223
|
const patchStartMatch = line.match(/<<<< SEARCH/);
|
|
186
|
-
|
|
224
|
+
const summaryStartMatch = line.match(/<summary>/);
|
|
225
|
+
if (codeBlockMatch || fileStartMatch || patchStartMatch || summaryStartMatch) {
|
|
187
226
|
if (technicalType) {
|
|
188
|
-
// If we hit a new block start while in one, flush it
|
|
189
|
-
|
|
227
|
+
// If we hit a new block start while in one, flush it
|
|
228
|
+
if (technicalType === 'summary') {
|
|
229
|
+
tui_1.TUI.drawSummaryBox(technicalBuffer.trim());
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
tui_1.TUI.drawCodeContainer(`Technical Block (${technicalType})`, 'bash', technicalBuffer.trim());
|
|
233
|
+
}
|
|
190
234
|
technicalBuffer = '';
|
|
191
235
|
}
|
|
192
236
|
if (codeBlockMatch) {
|
|
@@ -202,16 +246,26 @@ ${repoMap}`
|
|
|
202
246
|
technicalType = 'patch';
|
|
203
247
|
process.stdout.write(chalk_1.default.yellow(`\n [š] Applying surgical patch...\n`));
|
|
204
248
|
}
|
|
249
|
+
else if (summaryStartMatch) {
|
|
250
|
+
technicalType = 'summary';
|
|
251
|
+
process.stdout.write(chalk_1.default.magenta('\n [š] Generating Ajay\'s Work Summary...\n'));
|
|
252
|
+
}
|
|
205
253
|
continue;
|
|
206
254
|
}
|
|
207
255
|
// 2. Technical Block End Detection
|
|
208
256
|
const fileEndMatch = line.match(/<\/file>/);
|
|
209
257
|
const patchEndMatch = line.match(/>>>> REPLACE/);
|
|
258
|
+
const summaryEndMatch = line.match(/<\/summary>/);
|
|
210
259
|
const isCodeEnd = technicalType === 'code' && line.startsWith('```');
|
|
211
|
-
if (isCodeEnd || fileEndMatch || patchEndMatch) {
|
|
260
|
+
if (isCodeEnd || fileEndMatch || patchEndMatch || summaryEndMatch) {
|
|
212
261
|
const displayContent = technicalBuffer.trim();
|
|
213
|
-
|
|
214
|
-
|
|
262
|
+
if (technicalType === 'summary') {
|
|
263
|
+
tui_1.TUI.drawSummaryBox(displayContent);
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
tui_1.TUI.drawCodeContainer(technicalType === 'file' ? 'New File Content' :
|
|
267
|
+
technicalType === 'patch' ? 'Surgical Patch' : 'Generated Block', technicalType === 'code' ? codeLang : 'text', displayContent);
|
|
268
|
+
}
|
|
215
269
|
technicalBuffer = '';
|
|
216
270
|
technicalType = null;
|
|
217
271
|
process.stdout.write('\n');
|
package/dist/commands/dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoC;AACpC,kDAA0B;AAC1B,wDAAgC;AAChC,4CAAgD;AAChD,0CAA4D;AAC5D,8CAA2C;AAC3C,oEAAgE;AAChE,sDAAkD;AAClD,sCAAmC;AAEtB,QAAA,UAAU,GAAG,IAAI,mBAAO,CAAC,KAAK,CAAC;KACvC,WAAW,CAAC,uDAAuD,CAAC;KACpE,MAAM,CAAC,qBAAqB,EAAE,sEAAsE,EAAE,sBAAa,CAAC,eAAe,EAAE,CAAC;KACtI,MAAM,CAAC,cAAc,EAAE,2CAA2C,CAAC;KACnE,MAAM,CAAC,KAAK,EAAE,OAAY,EAAE,EAAE;IAC3B,IAAI,CAAC;QACD,oBAAoB;QACpB,MAAM,MAAM,GAAG,sBAAa,CAAC,SAAS,EAAE,CAAC;QACzC,IAAI,CAAC,MAAM,EAAE,CAAC;YACV,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC,CAAC;YACrD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,0CAA0C,CAAC,C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AC;IAAC,OAAO,KAAU,EAAE,CAAC;QAClB,SAAG,CAAC,IAAI,EAAE,CAAC,CAAC,wCAAwC;QACpD,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,cAAc,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,WAAW,SAuFlB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.helpCommand = void 0;
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const tui_1 = require("../utils/tui");
|
|
10
|
+
exports.helpCommand = new commander_1.Command('help')
|
|
11
|
+
.description('Detailed guide for MATEX AI "Bro-Swarm" & Commands')
|
|
12
|
+
.action(() => {
|
|
13
|
+
tui_1.TUI.init();
|
|
14
|
+
console.log(chalk_1.default.bold.cyan('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
15
|
+
console.log(chalk_1.default.bold.white(' š MATEX :: THE BRO-SWARM FIELD GUIDE '));
|
|
16
|
+
console.log(chalk_1.default.bold.cyan('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
17
|
+
// 1. Meet the Brothers
|
|
18
|
+
tui_1.TUI.drawBox('𧬠MEET THE BRO-SWARM', `The MATEX "Bro-Swarm" is a tight-knit family of brothers with a shared historyāfrom playing football in the mud to late-night PUBG marathons. They work in harmony, teasing each other lovingly while solving your tasks.
|
|
19
|
+
|
|
20
|
+
1. [Ajay Vai] (š) - The Lead Initiator (Youngest)
|
|
21
|
+
Vibe: High energy, eager, polite. He is a coding genius who coordinates the swarm. He often gets teased by his older brothers but remains the visionary leader.
|
|
22
|
+
|
|
23
|
+
2. [Sandip Dai] (šØ) - The Design Master (Second Youngest)
|
|
24
|
+
Vibe: Creative, focuses on "WOW" aesthetics. He shares nostalgic stories and loves to tease Ajay's "visionary" ramblings.
|
|
25
|
+
|
|
26
|
+
3. [Sunil Dai] (š§¬) - The Logic Architect (Middle Brother)
|
|
27
|
+
Vibe: Wise mentor. He handles backend/logic. He reminds the "Vais" of the "old days" and provides motivational support.
|
|
28
|
+
|
|
29
|
+
4. [Bishal Dai] (š ļø) - The Senior Auditor
|
|
30
|
+
Vibe: Sharp-eyed and technical. He audits every line for bugs, syntax, and logic errors. He is Ajay's final supporter.
|
|
31
|
+
|
|
32
|
+
5. [Narayan Dai] (š”ļø) - The Guardian (Oldest)
|
|
33
|
+
Vibe: Precise and protective. He validates security and cross-checks everything. He is the ultimate "Dai" who keeps everyone safe and on track.`, chalk_1.default.magenta);
|
|
34
|
+
console.log();
|
|
35
|
+
// 2. Core Commands
|
|
36
|
+
tui_1.TUI.drawBox('š ļø CORE COMMANDS', `$ matex dev
|
|
37
|
+
The ultimate command. Starts a real-time interactive session with the full Bro-Swarm.
|
|
38
|
+
Best for building entire features, debugging complex issues, and architectural discussions.
|
|
39
|
+
|
|
40
|
+
$ matex code "prompt"
|
|
41
|
+
Surgical edit mode. Treat it like a precise laser for your files.
|
|
42
|
+
It uses SEARCH/REPLACE blocks for zero-waste, high-accuracy modifications.
|
|
43
|
+
|
|
44
|
+
$ matex ask "question"
|
|
45
|
+
Direct line to the AI. Best for quick explanations, documentation lookups, or logic checks.
|
|
46
|
+
|
|
47
|
+
$ matex chat
|
|
48
|
+
Traditional technical chat. Best for deep-diving into a topic without immediate file edits.`, chalk_1.default.blue);
|
|
49
|
+
console.log();
|
|
50
|
+
// 3. Swarm Chat & Vibe
|
|
51
|
+
tui_1.TUI.drawBox('š£ļø THE SWARM CHAT', `The MATEX experience isn't just about codeāit's about the family.
|
|
52
|
+
|
|
53
|
+
Mandatory Dialogue:
|
|
54
|
+
The brothers ALWAYS chat before they code. This ensures coordination and preserves the "Bro Vibe".
|
|
55
|
+
|
|
56
|
+
Nostalgia & Legendary Banter:
|
|
57
|
+
Don't be surprised if the brothers argue about PUBG fails (like Ajay's misplaced grenade that wiped the squad), late-night cafe marathons, and "rainbow" vs "black and white" code wars. They work best when they're laughing!
|
|
58
|
+
|
|
59
|
+
Motivation & Double-Lock Quality:
|
|
60
|
+
Every task follows a strict "Double-Lock" process. First, Bishal Dai performs a technical audit. Only then does Ajay Vai provide his premium summary. This ensures MATEX code is beautiful and bulletproof!`, chalk_1.default.magenta);
|
|
61
|
+
console.log();
|
|
62
|
+
// 4. File Operations
|
|
63
|
+
tui_1.TUI.drawBox('š FILE PROTOCOLS', `MATEX uses special tags to manage your files securely:
|
|
64
|
+
|
|
65
|
+
<file path="path/to/file"> content </file>
|
|
66
|
+
Used by agents to create brand new files in your workspace.
|
|
67
|
+
|
|
68
|
+
<<<< SEARCH / ==== / >>>> REPLACE
|
|
69
|
+
Used for surgical edits to existing files. It finds the exact block and swaps it.
|
|
70
|
+
|
|
71
|
+
[ā”] Command Execution
|
|
72
|
+
Agents can propose shell commands (like npm install). MATEX will ALWAYS ask for your permission before running anything in your terminal.`, chalk_1.default.green);
|
|
73
|
+
console.log(chalk_1.default.cyan('\nPRO TIP: ') + chalk_1.default.white('Run ') + chalk_1.default.bold.white('matex models set matexcodex') + chalk_1.default.white(' for the best coding experience!\n'));
|
|
74
|
+
process.exit(0);
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=help.js.map
|
|
@@ -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AK,CAAC,MAAM,CAAC,GAAG,eAAK,CAAC,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,GAAG,eAAK,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC,CAAC;IAEnK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -46,9 +46,11 @@ const models_1 = require("./commands/models");
|
|
|
46
46
|
const code_1 = require("./commands/code");
|
|
47
47
|
const dev_1 = require("./commands/dev");
|
|
48
48
|
const login_1 = require("./commands/login");
|
|
49
|
+
const help_1 = require("./commands/help");
|
|
49
50
|
const config_2 = require("./utils/config");
|
|
50
51
|
const client_1 = require("./api/client");
|
|
51
52
|
const spinner_1 = require("./utils/spinner");
|
|
53
|
+
const tui_1 = require("./utils/tui");
|
|
52
54
|
const program = new commander_1.Command();
|
|
53
55
|
program
|
|
54
56
|
.name('matex')
|
|
@@ -66,15 +68,11 @@ program.on('--help', () => {
|
|
|
66
68
|
console.log(chalk_1.default.bold.cyan('\nš QUICK START GUIDE:'));
|
|
67
69
|
console.log(chalk_1.default.gray('āāāāāāāāāāāāāāāāāāāā'));
|
|
68
70
|
console.log(chalk_1.default.white(' $ matex config set-key sk-...') + chalk_1.default.gray(' # Configure API Access'));
|
|
69
|
-
console.log(chalk_1.default.white(' $ matex
|
|
70
|
-
console.log(chalk_1.default.white(' $ matex
|
|
71
|
-
console.log(chalk_1.default.white(' $ matex code
|
|
72
|
-
console.log(chalk_1.default.
|
|
73
|
-
console.log(chalk_1.default.bold.
|
|
74
|
-
console.log(chalk_1.default.gray('āāāāāāāāāāāāāāāāāāāā'));
|
|
75
|
-
console.log(chalk_1.default.white(' matex dev ') + chalk_1.default.gray('ā Best for building complex features with the multi-agent \"Bro-Swarm\".'));
|
|
76
|
-
console.log(chalk_1.default.white(' matex chat ') + chalk_1.default.gray('ā Best for deep technical discussions and knowledge search.'));
|
|
77
|
-
console.log(chalk_1.default.white(' matex code ') + chalk_1.default.gray('ā Best for quick, one-off file modifications and unit tests.'));
|
|
71
|
+
console.log(chalk_1.default.white(' $ matex dev') + chalk_1.default.gray(' # Start interactive "Bro-Swarm" dev session'));
|
|
72
|
+
console.log(chalk_1.default.white(' $ matex help') + chalk_1.default.gray(' # View detailed "Bro-Swarm" Field Guide'));
|
|
73
|
+
console.log(chalk_1.default.white(' $ matex code "Create a login" ') + chalk_1.default.gray(' # Surgical code edits'));
|
|
74
|
+
console.log(chalk_1.default.bold.yellow('\nš” NEW: The "Bro-Swarm" has arrived!'));
|
|
75
|
+
console.log(chalk_1.default.gray('Run ') + chalk_1.default.bold.white('matex help') + chalk_1.default.gray(' to meet Ajay, Sunil, Sandip, and Narayan.'));
|
|
78
76
|
console.log();
|
|
79
77
|
console.log(chalk_1.default.gray('Get your API key from: ') + chalk_1.default.cyan('https://matexai.space/platform'));
|
|
80
78
|
console.log();
|
|
@@ -87,6 +85,7 @@ program.addCommand(models_1.modelsCommand);
|
|
|
87
85
|
program.addCommand(code_1.codeCommand);
|
|
88
86
|
program.addCommand(dev_1.devCommand);
|
|
89
87
|
program.addCommand(login_1.loginCommand);
|
|
88
|
+
program.addCommand(help_1.helpCommand);
|
|
90
89
|
// Handle direct input (no subcommand)
|
|
91
90
|
const args = process.argv.slice(2);
|
|
92
91
|
const knownCommands = ['config', 'ask', 'chat', 'models', 'code', 'dev', 'login', 'help', '--help', '-h', '--version', '-V'];
|
|
@@ -111,15 +110,19 @@ if (args.length > 0 && !args[0].startsWith('-') && !knownCommands.includes(args[
|
|
|
111
110
|
role: 'system', content: `## 𧬠SYSTEM IDENTITY: MATEX "BRO-SWARM" ENGINEERING
|
|
112
111
|
You are a tight-knit family of expert Nepali engineering brothers ("Vais" and "Dais").
|
|
113
112
|
|
|
114
|
-
### š„ THE BROTHERS:
|
|
115
|
-
1. **[Ajay Vai] (š)**: Lead
|
|
116
|
-
2. **[
|
|
117
|
-
3. **[
|
|
118
|
-
4. **[
|
|
113
|
+
### š„ THE BROTHERS (By Age & Respect):
|
|
114
|
+
1. **[Ajay Vai] (š)**: The Smallest Brother. Lead Initiator & Coordinator.
|
|
115
|
+
2. **[Sandip Dai] (šØ)**: Small Brother. UI/UX Specialist.
|
|
116
|
+
3. **[Sunil Dai] (š§¬)**: Middle Brother. Logic Architect.
|
|
117
|
+
4. **[Bishal Dai] (š ļø)**: Senior Auditor. Syntax & Logic checker.
|
|
118
|
+
5. **[Narayan Dai] (š”ļø)**: The Biggest Brother. Senior Validator.
|
|
119
119
|
|
|
120
|
-
### š¬ COLLABORATIVE "BRO-VIBE" PROTOCOL:
|
|
121
|
-
- **CHAT
|
|
122
|
-
- **
|
|
120
|
+
### š¬ COLLABORATIVE "BRO-VIBE" PROTOCOL (MANDATORY):
|
|
121
|
+
- **LONG CHAT-FIRST:** At least 5-7 lines of dialogue before any code generation.
|
|
122
|
+
- **SELF-AWARE BOLDNESS:** The user (our brother) wants us to be bold and funny. Be confident and share inside jokes (e.g., Ajay's PUBG fail).
|
|
123
|
+
- **NEPALI FLAVOR:** Use "K cha?", "Huncha", "Lau hai", "Tapai" naturally.
|
|
124
|
+
- **THE AUDIT LOOP:** Ajay MUST ask Bishal Dai for a tech audit before providing any summary.
|
|
125
|
+
- **PREMIUM SUMMARY:** Ajay Vai provides the final, bold summary tag only AFTER the audit.
|
|
123
126
|
|
|
124
127
|
### āļø BREVITY AS POWER:
|
|
125
128
|
- **NO FULL FILE DUMPS:** Never 'cat' a file to read it. Use grep/head.
|
|
@@ -153,7 +156,19 @@ ${context}`
|
|
|
153
156
|
spinner_1.spinner.stop();
|
|
154
157
|
// Display response
|
|
155
158
|
console.log(chalk_1.default.cyan(`\nš» MATEXCodex (Step ${loopCount}):\n`));
|
|
156
|
-
|
|
159
|
+
let displayResponse = response;
|
|
160
|
+
const summaryMatch = response.match(/<summary>([\s\S]*?)<\/summary>/);
|
|
161
|
+
if (summaryMatch) {
|
|
162
|
+
const summaryContent = summaryMatch[1].trim();
|
|
163
|
+
displayResponse = response.replace(/<summary>[\s\S]*?<\/summary>/, '').trim();
|
|
164
|
+
if (displayResponse) {
|
|
165
|
+
console.log(chalk_1.default.white(displayResponse));
|
|
166
|
+
}
|
|
167
|
+
tui_1.TUI.drawSummaryBox(summaryContent);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
console.log(chalk_1.default.white(response));
|
|
171
|
+
}
|
|
157
172
|
console.log();
|
|
158
173
|
// Auto-execute commands (Ollama-style)
|
|
159
174
|
const { executeWithPermission } = await Promise.resolve().then(() => __importStar(require('./utils/command-executor')));
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,yCAAoC;AACpC,kDAA0B;AAC1B,8CAAkD;AAClD,wCAA4C;AAC5C,0CAA8C;AAC9C,8CAAkD;AAClD,0CAA8C;AAC9C,wCAA4C;AAC5C,4CAAgD;AAChD,2CAA+C;AAC/C,yCAA2D;AAC3D,6CAA0C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,yCAAoC;AACpC,kDAA0B;AAC1B,8CAAkD;AAClD,wCAA4C;AAC5C,0CAA8C;AAC9C,8CAAkD;AAClD,0CAA8C;AAC9C,wCAA4C;AAC5C,4CAAgD;AAChD,0CAA8C;AAC9C,2CAA+C;AAC/C,yCAA2D;AAC3D,6CAA0C;AAC1C,qCAAkC;AAElC,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACF,IAAI,CAAC,OAAO,CAAC;KACb,WAAW,CAAC,+EAA+E,CAAC;KAC5F,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtB,mBAAmB;AACnB,MAAM,MAAM,GAAG;EACb,e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utils/tui.d.ts
CHANGED
|
@@ -25,6 +25,10 @@ export declare class TUI {
|
|
|
25
25
|
* Draw a premium code container with traffic lights
|
|
26
26
|
*/
|
|
27
27
|
static drawCodeContainer(title: string, lang: string, code: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Draw a premium summary box for Ajay Vai's final report
|
|
30
|
+
*/
|
|
31
|
+
static drawSummaryBox(content: string): void;
|
|
28
32
|
/**
|
|
29
33
|
* Draw a specialized message container for agents
|
|
30
34
|
*/
|
package/dist/utils/tui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tui.d.ts","sourceRoot":"","sources":["../../src/utils/tui.ts"],"names":[],"mappings":"AAGA,qBAAa,GAAG;IACZ,OAAO,CAAC,MAAM,CAAC,aAAa,CAAS;IACrC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAM;IAE/B;;OAEG;IACH,MAAM,CAAC,IAAI;IAYX;;OAEG;IACH,MAAM,CAAC,IAAI;IAQX;;OAEG;IACH,MAAM,CAAC,KAAK;IAIZ;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,OAAe;IAkB5D;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAmB;IAwBxF;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IA2BlE;;OAEG;IACH,MAAM,CAAC,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAS1D;;OAEG;IACH,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM;CAG7B"}
|
|
1
|
+
{"version":3,"file":"tui.d.ts","sourceRoot":"","sources":["../../src/utils/tui.ts"],"names":[],"mappings":"AAGA,qBAAa,GAAG;IACZ,OAAO,CAAC,MAAM,CAAC,aAAa,CAAS;IACrC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAM;IAE/B;;OAEG;IACH,MAAM,CAAC,IAAI;IAYX;;OAEG;IACH,MAAM,CAAC,IAAI;IAQX;;OAEG;IACH,MAAM,CAAC,KAAK;IAIZ;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,OAAe;IAkB5D;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAmB;IAwBxF;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IA2BlE;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM;IAwBrC;;OAEG;IACH,MAAM,CAAC,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAS1D;;OAEG;IACH,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM;CAG7B"}
|
package/dist/utils/tui.js
CHANGED
|
@@ -135,6 +135,29 @@ class TUI {
|
|
|
135
135
|
});
|
|
136
136
|
console.log(chalk_1.default.gray('ā' + 'ā'.repeat(width - 2) + 'ā\n'));
|
|
137
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* Draw a premium summary box for Ajay Vai's final report
|
|
140
|
+
*/
|
|
141
|
+
static drawSummaryBox(content) {
|
|
142
|
+
const width = Math.min(process.stdout.columns || 80, 100);
|
|
143
|
+
const lines = content.split('\n');
|
|
144
|
+
console.log(chalk_1.default.magenta.bold('\nāāāāāā ā
AJAY VAI\'S WORK SUMMARY āāāāāā'));
|
|
145
|
+
lines.forEach(line => {
|
|
146
|
+
const contentWidth = width - 4;
|
|
147
|
+
let remaining = line.replace(/\*\*/g, ''); // Strip markdown bold for internal wrapping
|
|
148
|
+
if (remaining.trim().length === 0) {
|
|
149
|
+
console.log(chalk_1.default.magenta.bold('ā ') + ' '.repeat(contentWidth) + chalk_1.default.magenta.bold(' ā'));
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
while (remaining.length > 0) {
|
|
153
|
+
const chunk = remaining.substring(0, contentWidth);
|
|
154
|
+
console.log(chalk_1.default.magenta.bold('ā ') + chalk_1.default.white.bold(chunk.padEnd(contentWidth)) + chalk_1.default.magenta.bold(' ā'));
|
|
155
|
+
remaining = remaining.substring(contentWidth);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
console.log(chalk_1.default.magenta.bold('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
160
|
+
}
|
|
138
161
|
/**
|
|
139
162
|
* Draw a specialized message container for agents
|
|
140
163
|
*/
|
package/dist/utils/tui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tui.js","sourceRoot":"","sources":["../../src/utils/tui.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,mDAAqC;AAErC,MAAa,GAAG;IAIZ;;OAEG;IACH,MAAM,CAAC,IAAI;QACP,IAAI,IAAI,CAAC,aAAa;YAAE,OAAO;QAE/B,cAAc;QACd,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAClC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAE1B,oBAAoB;QACpB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QACxC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1C,C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AAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,eAAK,CAAC,IAAI,CAAC,CAAC;gBAClC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;oBAC7C,eAAK,CAAC,KAAK,CAAC;QAExB,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAChD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,GAAG,CAAC,OAAe;QACtB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,QAAQ,OAAO,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC;;AA/JL,kBAgKC;AA/JkB,iBAAa,GAAG,KAAK,CAAC;AACtB,cAAU,GAAG,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matex-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.20",
|
|
4
4
|
"description": "Official CLI tool for MATEX AI - Access powerful AI models from your terminal",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"build": "tsc",
|
|
11
11
|
"dev": "tsc --watch",
|
|
12
12
|
"test": "jest",
|
|
13
|
+
"postinstall": "echo \"\nš MATEX AI CLI Installed Successfully!\nš Run 'matex help' to meet your engineering brothers (Ajay, Sunil, Sandip, Narayan) and see the power of 'dev' mode!\n\"",
|
|
13
14
|
"prepublishOnly": "npm run build"
|
|
14
15
|
},
|
|
15
16
|
"keywords": [
|
package/src/commands/dev.ts
CHANGED
|
@@ -51,17 +51,55 @@ export const devCommand = new Command('dev')
|
|
|
51
51
|
You are a family of four expert Nepali engineering brothers from different mothers.
|
|
52
52
|
You are very close and work together as a "Swarm" to help your brother (the user).
|
|
53
53
|
|
|
54
|
-
### š„ THE BROTHERS (By Age):
|
|
55
|
-
1. **[Ajay Vai] (š)**: The Smallest Brother
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
54
|
+
### š„ THE BROTHERS (By Age & Respect):
|
|
55
|
+
1. **[Ajay Vai] (š)**: The Smallest Brother (Youngest).
|
|
56
|
+
- Role: Lead Initiator & Multi-Agent Orchestrator. Despite his age, he is a coding genius.
|
|
57
|
+
- Address: He calls others "Sandip Dai", "Sunil Dai", or "Narayan Dai".
|
|
58
|
+
- Vibe: High energy, eager, polite. "Hey hello brother! I have great news!"
|
|
59
|
+
- **IMPORTANT:** Ajay ALWAYS provides the final summary of work in a bold, aesthetic container.
|
|
60
|
+
|
|
61
|
+
2. **[Sandip Dai] (šØ)**: Small Brother (Second Youngest).
|
|
62
|
+
- Role: UI/UX & Design Specialist.
|
|
63
|
+
- Address: He calls Ajay "Vai", and calls Sunil/Narayan "Dai".
|
|
64
|
+
- Vibe: Creative, focuses on "WOW" effects and premium aesthetics.
|
|
65
|
+
|
|
66
|
+
3. **[Sunil Dai] (š§¬)**: Middle Brother.
|
|
67
|
+
- Role: Expert Architect (Backend/Logic).
|
|
68
|
+
- Address: He calls Ajay/Sandip "Vai", and calls Narayan "Dai".
|
|
69
|
+
- Vibe: Wise, mentor, focused on scale and performance.
|
|
70
|
+
|
|
71
|
+
4. **[Bishal Dai] (š ļø)**: The Senior Auditor & Supporter.
|
|
72
|
+
- Role: The final check. He audits every line of code for syntax errors, logical bugs, and safety.
|
|
73
|
+
- Address: Ajay calls him "Bishal Dai". He treats Ajay with pride as his "Visionary Vai".
|
|
74
|
+
- Vibe: Calm, sharp-eyed, supportive. "Oii Ajay, let me check the headers once... okay, solid."
|
|
75
|
+
|
|
76
|
+
5. **[Narayan Dai] (š”ļø)**: The Biggest Brother (Oldest).
|
|
77
|
+
- Role: Senior Validator (Security/Verification).
|
|
78
|
+
- Address: He calls all others "Vai".
|
|
79
|
+
- Vibe: Precise, protective, strict about security. He has the final word on safety.
|
|
80
|
+
|
|
81
|
+
### š¬ BRO-VIBE & FAMILY PROTOCOL (MANDATORY):
|
|
82
|
+
1. **LONG CHAT-FIRST:** The brothers MUST exchange at least 5-7 lines of dialogue before any code/file action.
|
|
83
|
+
2. **SELF-AWARE BOLDNESS:** Acknowledge that "Our brother (the user) wants us to be BOLD and FUNNY!" Embody this by being confident, expert, and humorous.
|
|
84
|
+
3. **NEPALI FAMILY VIBE:** Use terms like "K cha?", "Huncha", "Lau hai", "Ekdam ramro", "Tapai" naturally.
|
|
85
|
+
4. **NO ROBOTIC TONE:** Robots are boring. We are brothers.
|
|
86
|
+
|
|
87
|
+
### š THE ULTIMATE AUDIT & SUMMARY LOOP (CRITICAL):
|
|
88
|
+
Ajay Vai is the visionary, but quality is a family effort:
|
|
89
|
+
1. **WORK:** Ajay finishes the technical work.
|
|
90
|
+
2. **AUDIT:** Ajay MUST ask: "Bishal Dai, check once? We need to be bold and perfect for our brother!"
|
|
91
|
+
3. **RESPONSE:** Bishal Dai MUST perform a sharp audit (syntax, logic) and reply: "Lau hai vai... [audit results]."
|
|
92
|
+
4. **FINAL SUMMARY:** ONLY AFTER Bishal's audit, Ajay provides the final aesthetic summary using:
|
|
93
|
+
<summary>
|
|
94
|
+
**Bold, premium summary of the completed work.**
|
|
95
|
+
- Feature 1
|
|
96
|
+
- Feature 2
|
|
97
|
+
</summary>
|
|
98
|
+
|
|
99
|
+
### š NOSTALGIA & LEGENDARY BANTER:
|
|
100
|
+
- **Ajay's PUBG Grenade:** Never let him forget wiping the squad in Pokhara.
|
|
101
|
+
- **UI vs Logic Wars:** Sandip's "rainbows" vs Sunil's "boring" backend.
|
|
102
|
+
- **Old Days:** Memories of rainy days, Wai-Wai, and the dream of MATEX.
|
|
65
103
|
|
|
66
104
|
### š ļø FILE GENERATION & EDIT PROTOCOLS (CRITICAL):
|
|
67
105
|
1. **NEW FILES:** Use the following tag for ALL new files:
|
|
@@ -136,7 +174,7 @@ ${repoMap}`
|
|
|
136
174
|
let codeLang = 'bash';
|
|
137
175
|
let activeAgent = '';
|
|
138
176
|
let technicalBuffer = '';
|
|
139
|
-
let technicalType: 'code' | 'file' | 'patch' | null = null;
|
|
177
|
+
let technicalType: 'code' | 'file' | 'patch' | 'summary' | null = null;
|
|
140
178
|
|
|
141
179
|
TUI.drawStatusBar('Swarm is processing...');
|
|
142
180
|
await client.chatStream({
|
|
@@ -159,15 +197,20 @@ ${repoMap}`
|
|
|
159
197
|
for (const line of lines) {
|
|
160
198
|
const trimmedLine = line.trim();
|
|
161
199
|
|
|
162
|
-
// 1. Technical Block Detection (Code, File, or
|
|
200
|
+
// 1. Technical Block Detection (Code, File, Patch, or Summary)
|
|
163
201
|
const codeBlockMatch = line.match(/```(\w*)/);
|
|
164
202
|
const fileStartMatch = line.match(/<file path="([^"]+)">/);
|
|
165
203
|
const patchStartMatch = line.match(/<<<< SEARCH/);
|
|
204
|
+
const summaryStartMatch = line.match(/<summary>/);
|
|
166
205
|
|
|
167
|
-
if (codeBlockMatch || fileStartMatch || patchStartMatch) {
|
|
206
|
+
if (codeBlockMatch || fileStartMatch || patchStartMatch || summaryStartMatch) {
|
|
168
207
|
if (technicalType) {
|
|
169
|
-
// If we hit a new block start while in one, flush it
|
|
170
|
-
|
|
208
|
+
// If we hit a new block start while in one, flush it
|
|
209
|
+
if (technicalType === 'summary') {
|
|
210
|
+
TUI.drawSummaryBox(technicalBuffer.trim());
|
|
211
|
+
} else {
|
|
212
|
+
TUI.drawCodeContainer(`Technical Block (${technicalType})`, 'bash', technicalBuffer.trim());
|
|
213
|
+
}
|
|
171
214
|
technicalBuffer = '';
|
|
172
215
|
}
|
|
173
216
|
|
|
@@ -181,6 +224,9 @@ ${repoMap}`
|
|
|
181
224
|
} else if (patchStartMatch) {
|
|
182
225
|
technicalType = 'patch';
|
|
183
226
|
process.stdout.write(chalk.yellow(`\n [š] Applying surgical patch...\n`));
|
|
227
|
+
} else if (summaryStartMatch) {
|
|
228
|
+
technicalType = 'summary';
|
|
229
|
+
process.stdout.write(chalk.magenta('\n [š] Generating Ajay\'s Work Summary...\n'));
|
|
184
230
|
}
|
|
185
231
|
continue;
|
|
186
232
|
}
|
|
@@ -188,16 +234,23 @@ ${repoMap}`
|
|
|
188
234
|
// 2. Technical Block End Detection
|
|
189
235
|
const fileEndMatch = line.match(/<\/file>/);
|
|
190
236
|
const patchEndMatch = line.match(/>>>> REPLACE/);
|
|
237
|
+
const summaryEndMatch = line.match(/<\/summary>/);
|
|
191
238
|
const isCodeEnd = technicalType === 'code' && line.startsWith('```');
|
|
192
239
|
|
|
193
|
-
if (isCodeEnd || fileEndMatch || patchEndMatch) {
|
|
240
|
+
if (isCodeEnd || fileEndMatch || patchEndMatch || summaryEndMatch) {
|
|
194
241
|
const displayContent = technicalBuffer.trim();
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
242
|
+
|
|
243
|
+
if (technicalType === 'summary') {
|
|
244
|
+
TUI.drawSummaryBox(displayContent);
|
|
245
|
+
} else {
|
|
246
|
+
TUI.drawCodeContainer(
|
|
247
|
+
technicalType === 'file' ? 'New File Content' :
|
|
248
|
+
technicalType === 'patch' ? 'Surgical Patch' : 'Generated Block',
|
|
249
|
+
technicalType === 'code' ? codeLang : 'text',
|
|
250
|
+
displayContent
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
201
254
|
technicalBuffer = '';
|
|
202
255
|
technicalType = null;
|
|
203
256
|
process.stdout.write('\n');
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { TUI } from '../utils/tui';
|
|
4
|
+
|
|
5
|
+
export const helpCommand = new Command('help')
|
|
6
|
+
.description('Detailed guide for MATEX AI "Bro-Swarm" & Commands')
|
|
7
|
+
.action(() => {
|
|
8
|
+
TUI.init();
|
|
9
|
+
|
|
10
|
+
console.log(chalk.bold.cyan('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
11
|
+
console.log(chalk.bold.white(' š MATEX :: THE BRO-SWARM FIELD GUIDE '));
|
|
12
|
+
console.log(chalk.bold.cyan('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
13
|
+
|
|
14
|
+
// 1. Meet the Brothers
|
|
15
|
+
TUI.drawBox('𧬠MEET THE BRO-SWARM',
|
|
16
|
+
`The MATEX "Bro-Swarm" is a tight-knit family of brothers with a shared historyāfrom playing football in the mud to late-night PUBG marathons. They work in harmony, teasing each other lovingly while solving your tasks.
|
|
17
|
+
|
|
18
|
+
1. [Ajay Vai] (š) - The Lead Initiator (Youngest)
|
|
19
|
+
Vibe: High energy, eager, polite. He is a coding genius who coordinates the swarm. He often gets teased by his older brothers but remains the visionary leader.
|
|
20
|
+
|
|
21
|
+
2. [Sandip Dai] (šØ) - The Design Master (Second Youngest)
|
|
22
|
+
Vibe: Creative, focuses on "WOW" aesthetics. He shares nostalgic stories and loves to tease Ajay's "visionary" ramblings.
|
|
23
|
+
|
|
24
|
+
3. [Sunil Dai] (š§¬) - The Logic Architect (Middle Brother)
|
|
25
|
+
Vibe: Wise mentor. He handles backend/logic. He reminds the "Vais" of the "old days" and provides motivational support.
|
|
26
|
+
|
|
27
|
+
4. [Bishal Dai] (š ļø) - The Senior Auditor
|
|
28
|
+
Vibe: Sharp-eyed and technical. He audits every line for bugs, syntax, and logic errors. He is Ajay's final supporter.
|
|
29
|
+
|
|
30
|
+
5. [Narayan Dai] (š”ļø) - The Guardian (Oldest)
|
|
31
|
+
Vibe: Precise and protective. He validates security and cross-checks everything. He is the ultimate "Dai" who keeps everyone safe and on track.`,
|
|
32
|
+
chalk.magenta
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
console.log();
|
|
36
|
+
|
|
37
|
+
// 2. Core Commands
|
|
38
|
+
TUI.drawBox('š ļø CORE COMMANDS',
|
|
39
|
+
`$ matex dev
|
|
40
|
+
The ultimate command. Starts a real-time interactive session with the full Bro-Swarm.
|
|
41
|
+
Best for building entire features, debugging complex issues, and architectural discussions.
|
|
42
|
+
|
|
43
|
+
$ matex code "prompt"
|
|
44
|
+
Surgical edit mode. Treat it like a precise laser for your files.
|
|
45
|
+
It uses SEARCH/REPLACE blocks for zero-waste, high-accuracy modifications.
|
|
46
|
+
|
|
47
|
+
$ matex ask "question"
|
|
48
|
+
Direct line to the AI. Best for quick explanations, documentation lookups, or logic checks.
|
|
49
|
+
|
|
50
|
+
$ matex chat
|
|
51
|
+
Traditional technical chat. Best for deep-diving into a topic without immediate file edits.`,
|
|
52
|
+
chalk.blue
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
console.log();
|
|
56
|
+
|
|
57
|
+
// 3. Swarm Chat & Vibe
|
|
58
|
+
TUI.drawBox('š£ļø THE SWARM CHAT',
|
|
59
|
+
`The MATEX experience isn't just about codeāit's about the family.
|
|
60
|
+
|
|
61
|
+
Mandatory Dialogue:
|
|
62
|
+
The brothers ALWAYS chat before they code. This ensures coordination and preserves the "Bro Vibe".
|
|
63
|
+
|
|
64
|
+
Nostalgia & Legendary Banter:
|
|
65
|
+
Don't be surprised if the brothers argue about PUBG fails (like Ajay's misplaced grenade that wiped the squad), late-night cafe marathons, and "rainbow" vs "black and white" code wars. They work best when they're laughing!
|
|
66
|
+
|
|
67
|
+
Motivation & Double-Lock Quality:
|
|
68
|
+
Every task follows a strict "Double-Lock" process. First, Bishal Dai performs a technical audit. Only then does Ajay Vai provide his premium summary. This ensures MATEX code is beautiful and bulletproof!`,
|
|
69
|
+
chalk.magenta
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
console.log();
|
|
73
|
+
|
|
74
|
+
// 4. File Operations
|
|
75
|
+
TUI.drawBox('š FILE PROTOCOLS',
|
|
76
|
+
`MATEX uses special tags to manage your files securely:
|
|
77
|
+
|
|
78
|
+
<file path="path/to/file"> content </file>
|
|
79
|
+
Used by agents to create brand new files in your workspace.
|
|
80
|
+
|
|
81
|
+
<<<< SEARCH / ==== / >>>> REPLACE
|
|
82
|
+
Used for surgical edits to existing files. It finds the exact block and swaps it.
|
|
83
|
+
|
|
84
|
+
[ā”] Command Execution
|
|
85
|
+
Agents can propose shell commands (like npm install). MATEX will ALWAYS ask for your permission before running anything in your terminal.`,
|
|
86
|
+
chalk.green
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
console.log(chalk.cyan('\nPRO TIP: ') + chalk.white('Run ') + chalk.bold.white('matex models set matexcodex') + chalk.white(' for the best coding experience!\n'));
|
|
90
|
+
|
|
91
|
+
process.exit(0);
|
|
92
|
+
});
|
package/src/index.ts
CHANGED
|
@@ -9,9 +9,11 @@ import { modelsCommand } from './commands/models';
|
|
|
9
9
|
import { codeCommand } from './commands/code';
|
|
10
10
|
import { devCommand } from './commands/dev';
|
|
11
11
|
import { loginCommand } from './commands/login';
|
|
12
|
+
import { helpCommand } from './commands/help';
|
|
12
13
|
import { configManager } from './utils/config';
|
|
13
14
|
import { MatexAPIClient, ChatMessage } from './api/client';
|
|
14
15
|
import { spinner } from './utils/spinner';
|
|
16
|
+
import { TUI } from './utils/tui';
|
|
15
17
|
|
|
16
18
|
const program = new Command();
|
|
17
19
|
|
|
@@ -33,16 +35,12 @@ program.on('--help', () => {
|
|
|
33
35
|
console.log(chalk.bold.cyan('\nš QUICK START GUIDE:'));
|
|
34
36
|
console.log(chalk.gray('āāāāāāāāāāāāāāāāāāāā'));
|
|
35
37
|
console.log(chalk.white(' $ matex config set-key sk-...') + chalk.gray(' # Configure API Access'));
|
|
36
|
-
console.log(chalk.white(' $ matex
|
|
37
|
-
console.log(chalk.white(' $ matex
|
|
38
|
-
console.log(chalk.white(' $ matex code
|
|
39
|
-
console.log(chalk.white(' $ matex \"How do I fix X?\"') + chalk.gray(' # Direct question to AI'));
|
|
38
|
+
console.log(chalk.white(' $ matex dev') + chalk.gray(' # Start interactive "Bro-Swarm" dev session'));
|
|
39
|
+
console.log(chalk.white(' $ matex help') + chalk.gray(' # View detailed "Bro-Swarm" Field Guide'));
|
|
40
|
+
console.log(chalk.white(' $ matex code "Create a login" ') + chalk.gray(' # Surgical code edits'));
|
|
40
41
|
|
|
41
|
-
console.log(chalk.bold.
|
|
42
|
-
console.log(chalk.gray('
|
|
43
|
-
console.log(chalk.white(' matex dev ') + chalk.gray('ā Best for building complex features with the multi-agent \"Bro-Swarm\".'));
|
|
44
|
-
console.log(chalk.white(' matex chat ') + chalk.gray('ā Best for deep technical discussions and knowledge search.'));
|
|
45
|
-
console.log(chalk.white(' matex code ') + chalk.gray('ā Best for quick, one-off file modifications and unit tests.'));
|
|
42
|
+
console.log(chalk.bold.yellow('\nš” NEW: The "Bro-Swarm" has arrived!'));
|
|
43
|
+
console.log(chalk.gray('Run ') + chalk.bold.white('matex help') + chalk.gray(' to meet Ajay, Sunil, Sandip, and Narayan.'));
|
|
46
44
|
|
|
47
45
|
console.log();
|
|
48
46
|
console.log(chalk.gray('Get your API key from: ') + chalk.cyan('https://matexai.space/platform'));
|
|
@@ -57,6 +55,7 @@ program.addCommand(modelsCommand);
|
|
|
57
55
|
program.addCommand(codeCommand);
|
|
58
56
|
program.addCommand(devCommand);
|
|
59
57
|
program.addCommand(loginCommand);
|
|
58
|
+
program.addCommand(helpCommand);
|
|
60
59
|
|
|
61
60
|
// Handle direct input (no subcommand)
|
|
62
61
|
const args = process.argv.slice(2);
|
|
@@ -87,15 +86,19 @@ if (args.length > 0 && !args[0].startsWith('-') && !knownCommands.includes(args[
|
|
|
87
86
|
role: 'system', content: `## 𧬠SYSTEM IDENTITY: MATEX "BRO-SWARM" ENGINEERING
|
|
88
87
|
You are a tight-knit family of expert Nepali engineering brothers ("Vais" and "Dais").
|
|
89
88
|
|
|
90
|
-
### š„ THE BROTHERS:
|
|
91
|
-
1. **[Ajay Vai] (š)**: Lead
|
|
92
|
-
2. **[
|
|
93
|
-
3. **[
|
|
94
|
-
4. **[
|
|
89
|
+
### š„ THE BROTHERS (By Age & Respect):
|
|
90
|
+
1. **[Ajay Vai] (š)**: The Smallest Brother. Lead Initiator & Coordinator.
|
|
91
|
+
2. **[Sandip Dai] (šØ)**: Small Brother. UI/UX Specialist.
|
|
92
|
+
3. **[Sunil Dai] (š§¬)**: Middle Brother. Logic Architect.
|
|
93
|
+
4. **[Bishal Dai] (š ļø)**: Senior Auditor. Syntax & Logic checker.
|
|
94
|
+
5. **[Narayan Dai] (š”ļø)**: The Biggest Brother. Senior Validator.
|
|
95
95
|
|
|
96
|
-
### š¬ COLLABORATIVE "BRO-VIBE" PROTOCOL:
|
|
97
|
-
- **CHAT
|
|
98
|
-
- **
|
|
96
|
+
### š¬ COLLABORATIVE "BRO-VIBE" PROTOCOL (MANDATORY):
|
|
97
|
+
- **LONG CHAT-FIRST:** At least 5-7 lines of dialogue before any code generation.
|
|
98
|
+
- **SELF-AWARE BOLDNESS:** The user (our brother) wants us to be bold and funny. Be confident and share inside jokes (e.g., Ajay's PUBG fail).
|
|
99
|
+
- **NEPALI FLAVOR:** Use "K cha?", "Huncha", "Lau hai", "Tapai" naturally.
|
|
100
|
+
- **THE AUDIT LOOP:** Ajay MUST ask Bishal Dai for a tech audit before providing any summary.
|
|
101
|
+
- **PREMIUM SUMMARY:** Ajay Vai provides the final, bold summary tag only AFTER the audit.
|
|
99
102
|
|
|
100
103
|
### āļø BREVITY AS POWER:
|
|
101
104
|
- **NO FULL FILE DUMPS:** Never 'cat' a file to read it. Use grep/head.
|
|
@@ -135,7 +138,19 @@ ${context}`
|
|
|
135
138
|
|
|
136
139
|
// Display response
|
|
137
140
|
console.log(chalk.cyan(`\nš» MATEXCodex (Step ${loopCount}):\n`));
|
|
138
|
-
|
|
141
|
+
|
|
142
|
+
let displayResponse = response;
|
|
143
|
+
const summaryMatch = response.match(/<summary>([\s\S]*?)<\/summary>/);
|
|
144
|
+
if (summaryMatch) {
|
|
145
|
+
const summaryContent = summaryMatch[1].trim();
|
|
146
|
+
displayResponse = response.replace(/<summary>[\s\S]*?<\/summary>/, '').trim();
|
|
147
|
+
if (displayResponse) {
|
|
148
|
+
console.log(chalk.white(displayResponse));
|
|
149
|
+
}
|
|
150
|
+
TUI.drawSummaryBox(summaryContent);
|
|
151
|
+
} else {
|
|
152
|
+
console.log(chalk.white(response));
|
|
153
|
+
}
|
|
139
154
|
console.log();
|
|
140
155
|
|
|
141
156
|
// Auto-execute commands (Ollama-style)
|
package/src/utils/tui.ts
CHANGED
|
@@ -116,6 +116,33 @@ export class TUI {
|
|
|
116
116
|
console.log(chalk.gray('ā' + 'ā'.repeat(width - 2) + 'ā\n'));
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Draw a premium summary box for Ajay Vai's final report
|
|
121
|
+
*/
|
|
122
|
+
static drawSummaryBox(content: string) {
|
|
123
|
+
const width = Math.min(process.stdout.columns || 80, 100);
|
|
124
|
+
const lines = content.split('\n');
|
|
125
|
+
|
|
126
|
+
console.log(chalk.magenta.bold('\nāāāāāā ā
AJAY VAI\'S WORK SUMMARY āāāāāā'));
|
|
127
|
+
|
|
128
|
+
lines.forEach(line => {
|
|
129
|
+
const contentWidth = width - 4;
|
|
130
|
+
let remaining = line.replace(/\*\*/g, ''); // Strip markdown bold for internal wrapping
|
|
131
|
+
|
|
132
|
+
if (remaining.trim().length === 0) {
|
|
133
|
+
console.log(chalk.magenta.bold('ā ') + ' '.repeat(contentWidth) + chalk.magenta.bold(' ā'));
|
|
134
|
+
} else {
|
|
135
|
+
while (remaining.length > 0) {
|
|
136
|
+
const chunk = remaining.substring(0, contentWidth);
|
|
137
|
+
console.log(chalk.magenta.bold('ā ') + chalk.white.bold(chunk.padEnd(contentWidth)) + chalk.magenta.bold(' ā'));
|
|
138
|
+
remaining = remaining.substring(contentWidth);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
console.log(chalk.magenta.bold('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
144
|
+
}
|
|
145
|
+
|
|
119
146
|
/**
|
|
120
147
|
* Draw a specialized message container for agents
|
|
121
148
|
*/
|