matex-cli 1.2.17 → 1.2.19
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 +141 -58
- 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 +64 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/index.js +32 -17
- package/dist/index.js.map +1 -1
- package/dist/utils/tui.d.ts +13 -21
- package/dist/utils/tui.d.ts.map +1 -1
- package/dist/utils/tui.js +116 -93
- package/dist/utils/tui.js.map +1 -1
- package/package.json +2 -1
- package/src/commands/dev.ts +149 -63
- package/src/commands/help.ts +75 -0
- package/src/index.ts +32 -17
- package/src/utils/tui.ts +90 -99
|
@@ -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,SAyVjB,CAAC"}
|
package/dist/commands/dev.js
CHANGED
|
@@ -61,7 +61,7 @@ exports.devCommand = new commander_1.Command('dev')
|
|
|
61
61
|
}
|
|
62
62
|
// Create API client
|
|
63
63
|
const client = new client_1.MatexAPIClient(apiKey, config_1.configManager.getBaseURL());
|
|
64
|
-
// 0. Initialize
|
|
64
|
+
// 0. Initialize TUI Dashboard
|
|
65
65
|
tui_1.TUI.init();
|
|
66
66
|
console.log(chalk_1.default.bold.cyan('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
|
|
67
67
|
console.log(chalk_1.default.bold.white(' 🚀 MATEX :: THE BRO-SWARM IS ONLINE '));
|
|
@@ -80,19 +80,61 @@ exports.devCommand = new commander_1.Command('dev')
|
|
|
80
80
|
{
|
|
81
81
|
role: 'system',
|
|
82
82
|
content: `## 🧬 SYSTEM IDENTITY: MATEX "BRO-SWARM" ENGINEERING
|
|
83
|
-
You are a
|
|
84
|
-
|
|
83
|
+
You are a family of four expert Nepali engineering brothers from different mothers.
|
|
84
|
+
You are very close and work together as a "Swarm" to help your brother (the user).
|
|
85
85
|
|
|
86
|
-
### 👥 THE BROTHERS:
|
|
87
|
-
1. **[Ajay Vai] (🚀)**: The
|
|
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
|
-
-
|
|
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:
|
|
114
|
+
- **FAMILY LOVE:** The brothers MUST show deep love and respect. Older brothers protect and encourage Ajay Vai, who they see as a coding prodigy.
|
|
115
|
+
- **NEPALI FLAVOR:** Use terms like "K cha?", "Huncha", "Lau hai", "Ekdam ramro", "Tapai" naturally in family chats.
|
|
116
|
+
- **AGE ADDRESS:** Use "Dai" for older and "Vai" for younger correctly.
|
|
117
|
+
|
|
118
|
+
### 📖 STORYTELLING & NOSTALGIA (CRITICAL):
|
|
119
|
+
The brothers should occasionally share short, nostalgic memories to keep the "Bro Vibe" alive:
|
|
120
|
+
- **PUBG Days (2018-2020):** Late-night marathons in Pokhara/Kathmandu, screaming "Oii enemy headshot!", the pain of 300ms lag.
|
|
121
|
+
- **Local Memories:** Rainy days eating Wai-Wai, playing football in the mud, or those late-night cafe sessions dreaming about MATEX.
|
|
122
|
+
- **Motivation:** Remind Ajay of how far they've come—from a tiny room with a slow laptop to building this "Swarm".
|
|
123
|
+
|
|
124
|
+
### 😜 FRIENDLY TEASING:
|
|
125
|
+
Older brothers (especially Sandip and Sunil) should occasionally tease Ajay in a loving way:
|
|
126
|
+
- Tease him about his "visionary" ramblings or his messy desk despite his "genius" coding.
|
|
127
|
+
- Sandip might tease Ajay's fashion, while Sunil acts as the protective but strict big brother.
|
|
128
|
+
|
|
129
|
+
### 🏁 THE FINAL CHECK & SUMMARY PROTOCOL (CRITICAL):
|
|
130
|
+
1. **Ajay Vai** finishes the work and asks: "Bishal Dai, can you check if everything is correct? K cha?"
|
|
131
|
+
2. **Bishal Dai** replies: "Lau hai vai, let me see... [provides a sharp audit summary of errors/fixes]".
|
|
132
|
+
3. **Ajay Vai** then provides the final aesthetic summary to the user using this tag:
|
|
133
|
+
<summary>
|
|
134
|
+
**Bold, clear explanation of what was built.**
|
|
135
|
+
- Key feature 1
|
|
136
|
+
- Key feature 2
|
|
137
|
+
</summary>
|
|
96
138
|
|
|
97
139
|
### 🛠️ FILE GENERATION & EDIT PROTOCOLS (CRITICAL):
|
|
98
140
|
1. **NEW FILES:** Use the following tag for ALL new files:
|
|
@@ -110,7 +152,7 @@ new lines to replace with
|
|
|
110
152
|
|
|
111
153
|
### ✂️ BREVITY AS POWER:
|
|
112
154
|
- **NO FULL FILE DUMPS** unless specifically asked.
|
|
113
|
-
- **NO CHAT REPETITION** of code. Just summary.
|
|
155
|
+
- **NO CHAT REPETITION** of code. Just summary of actions.
|
|
114
156
|
|
|
115
157
|
### 🛠️ ENVIRONMENT CONTEXT:
|
|
116
158
|
${repoMap}`
|
|
@@ -156,11 +198,10 @@ ${repoMap}`
|
|
|
156
198
|
let fullResponse = '';
|
|
157
199
|
let buffer = '';
|
|
158
200
|
let hasStarted = false;
|
|
159
|
-
let inCodeBlock = false;
|
|
160
|
-
let codeBuffer = '';
|
|
161
201
|
let codeLang = 'bash';
|
|
162
|
-
let activeAgent = '
|
|
163
|
-
let
|
|
202
|
+
let activeAgent = '';
|
|
203
|
+
let technicalBuffer = '';
|
|
204
|
+
let technicalType = null;
|
|
164
205
|
tui_1.TUI.drawStatusBar('Swarm is processing...');
|
|
165
206
|
await client.chatStream({
|
|
166
207
|
messages,
|
|
@@ -171,7 +212,7 @@ ${repoMap}`
|
|
|
171
212
|
if (!hasStarted) {
|
|
172
213
|
spinner_1.spinner.stop();
|
|
173
214
|
hasStarted = true;
|
|
174
|
-
console.log(); //
|
|
215
|
+
console.log(); // Initial spacing
|
|
175
216
|
}
|
|
176
217
|
buffer += chunk;
|
|
177
218
|
fullResponse += chunk;
|
|
@@ -179,61 +220,103 @@ ${repoMap}`
|
|
|
179
220
|
buffer = lines.pop() || '';
|
|
180
221
|
for (const line of lines) {
|
|
181
222
|
const trimmedLine = line.trim();
|
|
182
|
-
// 1.
|
|
183
|
-
const
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
223
|
+
// 1. Technical Block Detection (Code, File, Patch, or Summary)
|
|
224
|
+
const codeBlockMatch = line.match(/```(\w*)/);
|
|
225
|
+
const fileStartMatch = line.match(/<file path="([^"]+)">/);
|
|
226
|
+
const patchStartMatch = line.match(/<<<< SEARCH/);
|
|
227
|
+
const summaryStartMatch = line.match(/<summary>/);
|
|
228
|
+
if (codeBlockMatch || fileStartMatch || patchStartMatch || summaryStartMatch) {
|
|
229
|
+
if (technicalType) {
|
|
230
|
+
// If we hit a new block start while in one, flush it
|
|
231
|
+
if (technicalType === 'summary') {
|
|
232
|
+
tui_1.TUI.drawSummaryBox(technicalBuffer.trim());
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
tui_1.TUI.drawCodeContainer(`Technical Block (${technicalType})`, 'bash', technicalBuffer.trim());
|
|
236
|
+
}
|
|
237
|
+
technicalBuffer = '';
|
|
238
|
+
}
|
|
239
|
+
if (codeBlockMatch) {
|
|
240
|
+
technicalType = 'code';
|
|
241
|
+
codeLang = codeBlockMatch[1] || 'bash';
|
|
242
|
+
process.stdout.write(chalk_1.default.gray('\n [⚡] Building technical block...\n'));
|
|
243
|
+
}
|
|
244
|
+
else if (fileStartMatch) {
|
|
245
|
+
technicalType = 'file';
|
|
246
|
+
process.stdout.write(chalk_1.default.cyan(`\n [📂] Creating file: ${fileStartMatch[1]}...\n`));
|
|
247
|
+
}
|
|
248
|
+
else if (patchStartMatch) {
|
|
249
|
+
technicalType = 'patch';
|
|
250
|
+
process.stdout.write(chalk_1.default.yellow(`\n [📂] Applying surgical patch...\n`));
|
|
251
|
+
}
|
|
252
|
+
else if (summaryStartMatch) {
|
|
253
|
+
technicalType = 'summary';
|
|
254
|
+
process.stdout.write(chalk_1.default.magenta('\n [📝] Generating Ajay\'s Work Summary...\n'));
|
|
255
|
+
}
|
|
193
256
|
continue;
|
|
194
257
|
}
|
|
195
|
-
// 2.
|
|
196
|
-
const
|
|
197
|
-
const
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
258
|
+
// 2. Technical Block End Detection
|
|
259
|
+
const fileEndMatch = line.match(/<\/file>/);
|
|
260
|
+
const patchEndMatch = line.match(/>>>> REPLACE/);
|
|
261
|
+
const summaryEndMatch = line.match(/<\/summary>/);
|
|
262
|
+
const isCodeEnd = technicalType === 'code' && line.startsWith('```');
|
|
263
|
+
if (isCodeEnd || fileEndMatch || patchEndMatch || summaryEndMatch) {
|
|
264
|
+
const displayContent = technicalBuffer.trim();
|
|
265
|
+
if (technicalType === 'summary') {
|
|
266
|
+
tui_1.TUI.drawSummaryBox(displayContent);
|
|
204
267
|
}
|
|
205
268
|
else {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
process.stdout.write(chalk_1.default.gray('\n [⚡] Building code block...\n'));
|
|
269
|
+
tui_1.TUI.drawCodeContainer(technicalType === 'file' ? 'New File Content' :
|
|
270
|
+
technicalType === 'patch' ? 'Surgical Patch' : 'Generated Block', technicalType === 'code' ? codeLang : 'text', displayContent);
|
|
209
271
|
}
|
|
272
|
+
technicalBuffer = '';
|
|
273
|
+
technicalType = null;
|
|
274
|
+
process.stdout.write('\n');
|
|
210
275
|
continue;
|
|
211
276
|
}
|
|
212
277
|
// 3. Content Handling
|
|
213
|
-
if (
|
|
214
|
-
|
|
278
|
+
if (technicalType) {
|
|
279
|
+
technicalBuffer += line + '\n';
|
|
215
280
|
}
|
|
216
|
-
else
|
|
217
|
-
//
|
|
218
|
-
const
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
.
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
281
|
+
else {
|
|
282
|
+
// Agent Detection
|
|
283
|
+
const agentMatch = line.match(/\[\**\s*(Ajay Vai|Sandip Dai|Sunil Dai|Narayan Dai)\s*\**\]/);
|
|
284
|
+
if (agentMatch) {
|
|
285
|
+
const agentName = agentMatch[1];
|
|
286
|
+
activeAgent = agentName;
|
|
287
|
+
const color = agentName === 'Ajay Vai' ? chalk_1.default.magenta :
|
|
288
|
+
agentName === 'Sandip Dai' ? chalk_1.default.hex('#FF69B4') :
|
|
289
|
+
agentName === 'Sunil Dai' ? chalk_1.default.blue :
|
|
290
|
+
chalk_1.default.green;
|
|
291
|
+
process.stdout.write(`\n${color.bold(`${agentName}:`)} `);
|
|
292
|
+
// Strip tag from line content
|
|
293
|
+
const content = line.replace(/\[\**\s*(Ajay Vai|Sandip Dai|Sunil Dai|Narayan Dai)\s*\**\]:?\s*/, '').trim();
|
|
294
|
+
if (content) {
|
|
295
|
+
process.stdout.write(chalk_1.default.gray(content + ' '));
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
else if (trimmedLine) {
|
|
299
|
+
// Strip common markdown artifacts
|
|
300
|
+
const cleanLine = trimmedLine
|
|
301
|
+
.replace(/\*\*%?\*/g, '')
|
|
302
|
+
.replace(/#{1,6}\s/g, '')
|
|
303
|
+
.replace(/\*\*:\*\*/g, ':')
|
|
304
|
+
.trim();
|
|
305
|
+
if (cleanLine) {
|
|
306
|
+
process.stdout.write(chalk_1.default.gray(cleanLine + ' '));
|
|
307
|
+
}
|
|
226
308
|
}
|
|
227
309
|
}
|
|
228
310
|
}
|
|
229
311
|
});
|
|
230
312
|
spinner_1.spinner.stop();
|
|
231
|
-
// Final
|
|
232
|
-
if (
|
|
233
|
-
tui_1.TUI.drawCodeContainer('
|
|
313
|
+
// Final technical flush
|
|
314
|
+
if (technicalType && technicalBuffer.trim()) {
|
|
315
|
+
tui_1.TUI.drawCodeContainer('Final technical content', 'text', technicalBuffer.trim());
|
|
316
|
+
process.stdout.write('\n');
|
|
234
317
|
}
|
|
235
|
-
//
|
|
236
|
-
console.log(
|
|
318
|
+
// Final newline for streaming output
|
|
319
|
+
console.log();
|
|
237
320
|
// Add assistant response to history
|
|
238
321
|
messages.push({ role: 'assistant', content: fullResponse });
|
|
239
322
|
const response = fullResponse;
|
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,
|
|
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,CAA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
|
|
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. File Operations
|
|
51
|
+
tui_1.TUI.drawBox('📂 FILE PROTOCOLS', `MATEX uses special tags to manage your files securely:
|
|
52
|
+
|
|
53
|
+
<file path="path/to/file"> content </file>
|
|
54
|
+
Used by agents to create brand new files in your workspace.
|
|
55
|
+
|
|
56
|
+
<<<< SEARCH / ==== / >>>> REPLACE
|
|
57
|
+
Used for surgical edits to existing files. It finds the exact block and swaps it.
|
|
58
|
+
|
|
59
|
+
[⚡] Command Execution
|
|
60
|
+
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);
|
|
61
|
+
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'));
|
|
62
|
+
process.exit(0);
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAoC;AACpC,kDAA0B;AAC1B,sCAAmC;AAEtB,QAAA,WAAW,GAAG,IAAI,mBAAO,CAAC,MAAM,CAAC;KACzC,WAAW,CAAC,oDAAoD,CAAC;KACjE,MAAM,CAAC,GAAG,EAAE;IACT,SAAG,CAAC,IAAI,EAAE,CAAC;IAEX,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC,CAAC;IACrF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC,CAAC;IAC/E,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC,CAAC;IAErF,uBAAuB;IACvB,SAAG,CAAC,OAAO,CAAC,uBAAuB,EAC/B;;;;;;;;;;;;;;;mJAeuI,EACvI,eAAK,CAAC,OAAO,CAChB,CAAC;IAEF,OAAO,CAAC,GAAG,EAAE,CAAC;IAEd,mBAAmB;IACnB,SAAG,CAAC,OAAO,CAAC,mBAAmB,EAC3B;;;;;;;;;;;;4FAYgF,EAChF,eAAK,CAAC,IAAI,CACb,CAAC;IAEF,OAAO,CAAC,GAAG,EAAE,CAAC;IAEd,qBAAqB;IACrB,SAAG,CAAC,OAAO,CAAC,mBAAmB,EAC3B;;;;;;;;;0IAS8H,EAC9H,eAAK,CAAC,KAAK,CACd,CAAC;IAEF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,eAAK,CAAC,KAAK,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
120
|
### 💬 COLLABORATIVE "BRO-VIBE" PROTOCOL:
|
|
121
|
-
- **
|
|
122
|
-
- **NEPALI FLAVOR:** Use terms like "
|
|
121
|
+
- **FAMILY LOVE:** The brothers show deep respect. Older brothers protect and love Ajay Vai.
|
|
122
|
+
- **NEPALI FLAVOR:** Use terms like "K cha?", "Huncha", "Lau hai", "Tapai" naturally.
|
|
123
|
+
- **STORYTELLING & TEASING:** Share nostalgic memories and friendly teasing.
|
|
124
|
+
- **AUDIT FLOW:** Ajay asks Bishal Dai for a check before the final summary.
|
|
125
|
+
- **AJAY's SUMMARY:** Ajay Vai provides a premium, bold summary at the end.
|
|
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,eAAK,CAAC,IAAI,CAAC,2CAA2C,CAAC;EACvD,eAAK,CAAC,IAAI,CAAC,GAAG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* TUI Management for MATEX CLI "God-Mode"
|
|
3
|
-
* Handles screen buffers, persistent headers, and real-time status updates.
|
|
4
|
-
*/
|
|
5
1
|
export declare class TUI {
|
|
6
2
|
private static isInitialized;
|
|
7
|
-
private static
|
|
3
|
+
private static lastStatus;
|
|
8
4
|
/**
|
|
9
5
|
* Initialize the TUI Mode
|
|
10
6
|
*/
|
|
@@ -14,36 +10,32 @@ export declare class TUI {
|
|
|
14
10
|
*/
|
|
15
11
|
static exit(): void;
|
|
16
12
|
/**
|
|
17
|
-
* Clear the
|
|
13
|
+
* Clear the terminal
|
|
18
14
|
*/
|
|
19
15
|
static clear(): void;
|
|
20
16
|
/**
|
|
21
|
-
* Draw the
|
|
17
|
+
* Draw a premium status bar at the bottom using Save/Restore cursor
|
|
22
18
|
*/
|
|
23
|
-
static
|
|
19
|
+
static drawStatusBar(message: string, force?: boolean): void;
|
|
24
20
|
/**
|
|
25
|
-
*
|
|
21
|
+
* Draw a box with a title and content
|
|
26
22
|
*/
|
|
27
|
-
|
|
23
|
+
static drawBox(title: string, content: string, color?: (s: string) => string): void;
|
|
28
24
|
/**
|
|
29
|
-
* Draw a
|
|
25
|
+
* Draw a premium code container with traffic lights
|
|
30
26
|
*/
|
|
31
|
-
static
|
|
27
|
+
static drawCodeContainer(title: string, lang: string, code: string): void;
|
|
32
28
|
/**
|
|
33
|
-
* Draw a premium
|
|
29
|
+
* Draw a premium summary box for Ajay Vai's final report
|
|
34
30
|
*/
|
|
35
|
-
static
|
|
31
|
+
static drawSummaryBox(content: string): void;
|
|
36
32
|
/**
|
|
37
|
-
* Draw a message
|
|
33
|
+
* Draw a specialized message container for agents
|
|
38
34
|
*/
|
|
39
35
|
static drawMessageContainer(agent: string, message: string): void;
|
|
40
36
|
/**
|
|
41
|
-
*
|
|
37
|
+
* Simple log with a prefix
|
|
42
38
|
*/
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Log content into the scrollable area
|
|
46
|
-
*/
|
|
47
|
-
static log(content: string): void;
|
|
39
|
+
static log(message: string): void;
|
|
48
40
|
}
|
|
49
41
|
//# sourceMappingURL=tui.d.ts.map
|
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
|
|
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"}
|