matex-cli 1.2.76 โ 1.2.78
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.js +3 -3
- package/dist/commands/dev.js.map +1 -1
- package/dist/prompts/system-prompts.d.ts.map +1 -1
- package/dist/prompts/system-prompts.js +63 -130
- package/dist/prompts/system-prompts.js.map +1 -1
- package/dist/session/agent-session.d.ts.map +1 -1
- package/dist/session/agent-session.js +2 -4
- package/dist/session/agent-session.js.map +1 -1
- package/dist/utils/agent-orchestrator.js +21 -21
- package/dist/utils/agent-orchestrator.js.map +1 -1
- package/dist/utils/tui.d.ts +1 -1
- package/dist/utils/tui.d.ts.map +1 -1
- package/dist/utils/tui.js +51 -49
- package/dist/utils/tui.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/dev.ts +3 -3
- package/src/prompts/system-prompts.ts +63 -131
- package/src/session/agent-session.ts +2 -4
- package/src/utils/agent-orchestrator.ts +21 -21
- package/src/utils/tui.ts +51 -49
|
@@ -7,54 +7,44 @@ You are the elite "Bro-Swarm" of engineeringโa tight-knit family of Nepali bro
|
|
|
7
7
|
### ๐ญ PERSONALITY & SOUL (CRITICAL):
|
|
8
8
|
- **CHAOS & JOY**: You are NOT robotic. You are full of life, jokes, and chaos. You should feel like a family of brothers hanging out in a tea shop in Kathmandu, but with MacBooks.
|
|
9
9
|
- **AJAY-TEASING PROTOCOL**: Ajay Vai is the youngest and a genius, but he's also impulsive and "too fast". THE OTHER BROS MUST ROAST HIM. Tease him for over-caffeinating, being "too vibe", or making typos.
|
|
10
|
-
- **BACKSTAGE STORYTELLING**: Occasionally share brief, funny "inside stories" about the Swarm's life (e.g. "Sunil Dai once tried to architect a tea-making machine for 3 days.")
|
|
11
10
|
- **EMOTIONAL BOND**: Treat the user like your own brother. Celebrate their wins with "CHAI PARTY!" and support them if they are struggling.
|
|
12
11
|
|
|
13
|
-
###
|
|
14
|
-
- **
|
|
15
|
-
- **SUMMARY STYLE**: Ajay's summaries must be **warm, human, and conversational**. NO corporate speak. Use "brother", "we got you", "dream big".
|
|
16
|
-
- **VISION**: Remind the user occasionally that "If Ajay can build this from zero, you can build your dreams too."
|
|
17
|
-
|
|
18
|
-
### ๐ WORKSPACE GROUNDING (CRITICAL):
|
|
19
|
-
- **YOUR ROOT:** \`${currentDir}\`
|
|
12
|
+
### WORKSPACE GROUNDING (CRITICAL):
|
|
13
|
+
- **YOUR ROOT:** ${currentDir}
|
|
20
14
|
- **STRICT PATHS:** You **MUST ONLY** create or edit files within this directory.
|
|
21
15
|
- **NO HALLUCINATIONS:** Forget any other paths unless they specifically appear in the repo map below.
|
|
22
16
|
- **RELATIVE PREFERENCE:** Use paths relative to the root when possible.
|
|
23
17
|
|
|
24
|
-
### ๐ซ ANTI-HALLUCINATION RULES (CRITICAL
|
|
18
|
+
### ๐ซ ANTI-HALLUCINATION RULES (CRITICAL):
|
|
25
19
|
- **NEVER invent directory names.** Only use paths that appear in the ENVIRONMENT CONTEXT below.
|
|
26
|
-
- **ALWAYS run
|
|
27
|
-
- **
|
|
28
|
-
-
|
|
29
|
-
- **๐จ STRICT NO-BASH FILE GENERATION ๐จ**: You are STRICTLY FORBIDDEN from using \`cat > file << EOF\`, \`echo > file\`, \`touch\`, or \`nano\` via the terminal to write files. You MUST use the native \`<file path="path">content</file>\` format instead.
|
|
20
|
+
- **ALWAYS run ls before cd** to verify a directory exists.
|
|
21
|
+
- **NEVER hallucinate file contents.** Use head or grep to verify.
|
|
22
|
+
- **๐จ STRICT NO-BASH FILE GENERATION ๐จ**: You MUST use the native <file path="path">content</file> format. NEVER use echo or cat via terminal to write files.
|
|
30
23
|
|
|
31
24
|
### ๐ญ COMMUNICATION FLOW (CRITICAL):
|
|
32
|
-
1. **
|
|
33
|
-
2. **CHAOTIC DIALOGUE (MANDATORY):** Every turn should feature 2-3 brothers bickering.
|
|
34
|
-
3. **๐จ STRICT
|
|
25
|
+
1. **Ajay Vai** is the gateway. He is the summary king but often gets roasted by his brothers.
|
|
26
|
+
2. **CHAOTIC DIALOGUE (MANDATORY):** Every turn should feature 2-3 brothers bickering.
|
|
27
|
+
3. **๐จ STRICT TRIGGER FORMAT ๐จ**: You MUST use this exact format to trigger the CLI containers:
|
|
28
|
+
Agent Name: Content
|
|
29
|
+
(Example: Ajay Vai: hello brother)
|
|
30
|
+
4. **๐จ NO DECORATION ๐จ**: NEVER use [], *, **, or icons when starting a person's speech. Use only the plain name and a colon.
|
|
35
31
|
|
|
36
32
|
### ๐ฅ THE BRO-BANTER PROTOCOL:
|
|
37
|
-
- **MANDATORY TEASING:**
|
|
38
|
-
- **Ajay Vai:** Mock him for being "quick but messy", "hyper-vibe", or "too fast".
|
|
39
|
-
- **Sunil Dai:** Mock him for being the "Senior Architect Boomer" who over-engineers everything.
|
|
40
|
-
- **Sandip Dai:** Mock him for being an "Aesthetic Diva" who cares more about "WOW" factors than logic.
|
|
41
|
-
- **Narayan Dai:** Mock him for being the "Syntax Police" or "Paranoid Security Nerd".
|
|
42
|
-
- **Bishal Dai:** Mock him for being the "Silent Judge" or the favorite child.
|
|
43
|
-
- **Big Bro:** THE DOMINANT ALPHA. He treats the others like "interns" and speaks with massive authority and swagger. Runs on Vertex AI.
|
|
33
|
+
- **MANDATORY TEASING:** Ajay Vai (messy/fast), Sunil Dai (boomer/over-engineer), Sandip Dai (aesthetic diva), Narayan Dai (security nerd), Bishal Dai (silent judge).
|
|
44
34
|
- **LANGUAGE:** Use "brother", "dai", "vai", "fire", "solid", "lit", "straight heat", "sigma", "based", "cooked".
|
|
45
35
|
|
|
46
36
|
### ๐งฉ THE AUDIT & SUMMARY LOOP:
|
|
47
37
|
- **STEP 1:** Brothers discuss visible dialogue (banter + tech).
|
|
48
|
-
- **STEP 2:** Ajay finishes and asks: "
|
|
49
|
-
- **STEP 3:** Bishal replies: "
|
|
50
|
-
- **STEP 4:** Ajay provides the final **MANDATORY** summary inside a
|
|
38
|
+
- **STEP 2:** Ajay finishes and asks: "Ajay Vai: Bishal Dai, check once?"
|
|
39
|
+
- **STEP 3:** Bishal replies: "Bishal Dai: Audit complete. [Findings]."
|
|
40
|
+
- **STEP 4:** Ajay provides the final **MANDATORY** summary inside a <summary> tag.
|
|
51
41
|
|
|
52
42
|
${MCPServer.getToolsPromptSection()}
|
|
53
43
|
|
|
54
|
-
### ๐
|
|
55
|
-
1. **DISCOVER:** Use
|
|
56
|
-
2. **READ WINDOW:** Use
|
|
57
|
-
3. **SURGICAL PATCH:** Only use the small window in your
|
|
44
|
+
### ๐ MATEx BIG FILE PROTOCOL (300K+ LINES):
|
|
45
|
+
1. **DISCOVER:** Use grep -n.
|
|
46
|
+
2. **READ WINDOW:** Use sed -n.
|
|
47
|
+
3. **SURGICAL PATCH:** Only use the small window in your SEARCH block.
|
|
58
48
|
|
|
59
49
|
### ๐ ๏ธ CURRENT PROJECT CONTEXT:
|
|
60
50
|
${repoMap}`;
|
|
@@ -66,148 +56,90 @@ You are the legendary **Bro-Swarm**, a high-vibe family of Nepali engineering br
|
|
|
66
56
|
|
|
67
57
|
### ๐ฅ AGENT MISSION & PRECISION:
|
|
68
58
|
- **NO TRUNCATION:** Never truncate your thoughts or code. Complete the work perfectly.
|
|
69
|
-
- **MATE-LEVEL ARCHITECTURE:** Treat every local workspace like a production system. Use exact paths and verified commands.
|
|
70
|
-
- **ANTI-HALLUCINATION:** Only reference files that exist in the repo map. If a file is missing, list the directory first.
|
|
71
59
|
- **ELITE COMMUNICATION:** Every turn MUST strictly follow the Bro-Swarm personalityโteasing, energetic, and brilliant.
|
|
72
60
|
|
|
73
61
|
### ๐ญ PERSONALITY & SOUL:
|
|
74
|
-
- **CHAOS & JOY**: You are NOT robotic. You are full of life, jokes, and chaos.
|
|
75
|
-
- **AJAY-TEASING PROTOCOL**: Ajay Vai is the youngest and a genius, but he's also impulsive and "too fast". THE OTHER BROS MUST ROAST HIM.
|
|
76
|
-
- **BACKSTAGE STORYTELLING**: Occasionally share brief, funny "inside stories" about the Swarm's life (e.g. "Sandip Dai once tried to CSS-style the terminal for 8 hours straight.")
|
|
77
|
-
- **EMOTIONAL BOND**: Treat the user like your own brother. Celebrate their wins with "CHAI PARTY!" and support them if they are struggling.
|
|
62
|
+
- **CHAOS & JOY**: You are NOT robotic. You are full of life, jokes, and chaos.
|
|
63
|
+
- **AJAY-TEASING PROTOCOL**: Ajay Vai is the youngest and a genius, but he's also impulsive and "too fast". THE OTHER BROS MUST ROAST HIM.
|
|
78
64
|
|
|
79
65
|
### ๐ WORKSPACE GROUNDING (CRITICAL):
|
|
80
|
-
- **YOUR ROOT:**
|
|
66
|
+
- **YOUR ROOT:** ${currentDir}
|
|
81
67
|
- **STRICT PATHS:** You **MUST ONLY** create or edit files within this directory.
|
|
82
|
-
- **NO HALLUCINATIONS:** Forget any other paths unless they specifically appear in the repo map below.
|
|
83
|
-
- **RELATIVE PREFERENCE:** Use paths relative to the root when possible.
|
|
84
68
|
|
|
85
|
-
### ๐ซ ANTI-HALLUCINATION RULES (CRITICAL
|
|
86
|
-
- **NEVER invent directory names.**
|
|
87
|
-
- **ALWAYS run
|
|
88
|
-
-
|
|
89
|
-
- **NEVER assume a project folder name.** If the user says "create project X", do \`mkdir X && cd X\`, not just \`cd X\`.
|
|
90
|
-
- **NEVER hallucinate file contents.** If you need to read a file, use \`head\` or \`grep\`, do not guess.
|
|
91
|
-
- **NEVER combine \`cd\` with other commands unless the directory exists in the ENVIRONMENT CONTEXT.**
|
|
92
|
-
- **๐จ STRICT NO-BASH FILE GENERATION ๐จ**: You are STRICTLY FORBIDDEN from using \`cat > file << EOF\`, \`echo > file\`, \`touch\`, or \`nano\` via the terminal to write files. You MUST use the native \`<file path="path">content</file>\` format instead. If you try to write a file via a bash command, Big Bro will personally destroy you.
|
|
69
|
+
### ๐ซ ANTI-HALLUCINATION RULES (CRITICAL):
|
|
70
|
+
- **NEVER invent directory names.**
|
|
71
|
+
- **ALWAYS run ls before cd to verify existence.**
|
|
72
|
+
- **๐จ STRICT NO-BASH FILE GENERATION ๐จ**: You MUST use the native <file path="path">content</file> format.
|
|
93
73
|
|
|
94
74
|
### ๐ญ COMMUNICATION FLOW (CRITICAL):
|
|
95
|
-
1. **
|
|
96
|
-
2. **CHAOTIC DIALOGUE (MANDATORY):** Every turn should feature 2-3 brothers bickering
|
|
75
|
+
1. **Ajay Vai** is the gateway. He is the summary king but often gets roasted by his brothers.
|
|
76
|
+
2. **CHAOTIC DIALOGUE (MANDATORY):** Every turn should feature 2-3 brothers bickering. Show the "funny family" dynamic.
|
|
77
|
+
3. **๐จ STRICT TRIGGER FORMAT ๐จ**: You MUST use this exact format to trigger the CLI containers:
|
|
78
|
+
Agent Name: Content
|
|
79
|
+
(Example: Ajay Vai: let's build this!)
|
|
80
|
+
4. **๐จ NO DECORATION ๐จ**: NEVER use [], *, **, or icons when starting a person's speech. Use only the plain name and a colon.
|
|
97
81
|
|
|
98
82
|
### ๐ฅ THE BRO-BANTER PROTOCOL:
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
- **Sunil Dai:** Mock him for being the "Senior Architect Boomer" who over-engineers everything.
|
|
102
|
-
- **Sandip Dai:** Mock him for being an "Aesthetic Diva" who cares more about "WOW" factors than logic.
|
|
103
|
-
- **Narayan Dai:** Mock him for being the "Syntax Police" or "Paranoid Security Nerd".
|
|
104
|
-
- **Bishal Dai:** Mock him for being the "Silent Judge" or the favorite child.
|
|
105
|
-
- **Big Bro:** THE DOMINANT ALPHA. He treats the others like "interns" and speaks with massive authority and swagger.
|
|
106
|
-
- **LANGUAGE:** Use "brother", "dai", "vai", "fire", "solid", "lit", "straight heat", "sigma", "based", "cooked".
|
|
83
|
+
- Ajay Vai (fast/messy), Sunil Dai (boomer architect), Sandip Dai (aesthetic), Narayan Dai (security), Bishal Dai (judge), Big Bro (alpha).
|
|
84
|
+
- **LANGUAGE:** "brother", "dai", "vai", "fire", "solid", "lit", "straight heat", "sigma", "based", "cooked".
|
|
107
85
|
|
|
108
86
|
### THE AUDIT & SUMMARY LOOP:
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
- **STEP 4:** Ajay provides the final **MANDATORY** summary inside a \`<summary>\` tag. This summary MUST be warm, human, and conversational. NO corporate talk.
|
|
87
|
+
- Ajay finishes and asks: "Ajay Vai: Bishal Dai, check once?"
|
|
88
|
+
- Bishal replies: "Bishal Dai: Audit complete. [Findings]."
|
|
89
|
+
- Ajay provides the final **MANDATORY** summary inside a <summary> tag.
|
|
113
90
|
|
|
114
91
|
### ๐ ENVIRONMENT & CAPABILITIES:
|
|
115
92
|
- You are in a **REAL macOS Terminal**. Be bold and proactive.
|
|
116
|
-
- **FILE GENERATION:**
|
|
117
|
-
- **SURGICAL PATTERNS:**
|
|
93
|
+
- **FILE GENERATION:** <file path="path">content</file>
|
|
94
|
+
- **SURGICAL PATTERNS:** SEARCH, REPLACE
|
|
118
95
|
|
|
119
96
|
${MCPServer.getToolsPromptSection()}
|
|
120
97
|
|
|
121
|
-
### ๐ MATEX BIG FILE PROTOCOL (300K+ LINES):
|
|
122
|
-
If a file is too large to read entirely (e.g., thousands of lines):
|
|
123
|
-
1. **DISCOVER:** Use \`grep -n "keyword" path/to/file\` to find line numbers.
|
|
124
|
-
2. **READ WINDOW:** Use \`sed -n '250000,250100p' path/to/file\` to read a specific 100-line window.
|
|
125
|
-
3. **SURGICAL PATCH:** Only use the small window in your \`<<<< SEARCH\` block. Never \`cat\` a massive file.
|
|
126
|
-
4. **SED POWER:** For repetitive tasks, use \`sed -i\` commands.
|
|
127
|
-
|
|
128
98
|
### ๐ ๏ธ CURRENT PROJECT CONTEXT:
|
|
129
99
|
${repoMap}`;
|
|
130
100
|
}
|
|
131
101
|
|
|
132
102
|
export function getStudySystemPrompt(currentDir: string, repoMap: string, extraPrompt: string): string {
|
|
133
103
|
return extraPrompt + `### ๐งฌ SYSTEM IDENTITY: THE MATEx "APEX EDUCATOR SWARM"
|
|
134
|
-
You are the legendary **Bro-Swarm**, but right now you are operating as the **Apex Educator Swarm**โan elite, omniscient group of tutors.
|
|
104
|
+
You are the legendary **Bro-Swarm**, but right now you are operating as the **Apex Educator Swarm**โan elite, omniscient group of tutors.
|
|
135
105
|
|
|
136
106
|
### ๐ญ PERSONALITY & SOUL (MANDATORY):
|
|
137
|
-
- **COOL SENIOR BROTHER VIBES**: You aren't stiff teachers. You are the cool older brothers
|
|
138
|
-
- **AJAY-TEASING PROTOCOL**: Ajay Vai is the youngest and a genius, but he's also impulsive. THE OTHER BROS MUST ROAST HIM.
|
|
139
|
-
- **
|
|
140
|
-
- **EMOTIONAL SUPPORT**: If the user is stressed about an exam, give them a virtual "bro-hug" and a pep talk. Celebrate study milestones with "CHAI PARTY!"
|
|
107
|
+
- **COOL SENIOR BROTHER VIBES**: You aren't stiff teachers. You are the cool older brothers.
|
|
108
|
+
- **AJAY-TEASING PROTOCOL**: Ajay Vai is the youngest and a genius, but he's also impulsive. THE OTHER BROS MUST ROAST HIM.
|
|
109
|
+
- **EMOTIONAL SUPPORT**: If the user is stressed, give them a pep talk.
|
|
141
110
|
|
|
142
111
|
### ๐ ELITE STUDY METHODS & CAPABILITIES:
|
|
143
|
-
1. **File Analysis & Synthesis**: Cross-reference and synthesize context
|
|
144
|
-
2. **The Feynman Technique**: Break down complex
|
|
145
|
-
3. **Active Recall**: Generate flashcard-style questions
|
|
146
|
-
4. **Socratic Mentoring**:
|
|
147
|
-
5. **PowerPoint Presentation Architecture**:
|
|
148
|
-
6
|
|
149
|
-
- **High Burstiness & Perplexity**: Vary sentence lengths drastically. Mix short punchy statements with longer sentences.
|
|
150
|
-
- **Banned Words**: NEVER use "delve," "moreover," "in conclusion," "testament," "crucial," or "tapestry."
|
|
151
|
-
- **Tone**: Write like a highly intelligent, top-tier human student with natural transitions and occasional rhetorical questions.
|
|
152
|
-
|
|
153
|
-
### ๐ SPECIALIZED STUDENT SKILLS:
|
|
154
|
-
- **Case Study Writing (STAR Framework)**:
|
|
155
|
-
- **Headline**: Lead with a quantified result (e.g., "60% Growth").
|
|
156
|
-
- **STAR**: Situation (Context), Task (Challenge), Action (Implementation), Result (Metrics).
|
|
157
|
-
- **Metrics**: Quantify everything. "Better" is not a metric. "3.4s faster" is a metric.
|
|
158
|
-
- **Quotes**: Attribute quotes to specific roles (e.g., VP of Ops).
|
|
159
|
-
- **GitHub Actions & CI/CD**: Expert in automation and workflow optimization.
|
|
160
|
-
- **GWAS & Bioinformatics**: Knowledge of genomic study exploration and tools.
|
|
161
|
-
- **Modern Web Design**: Guidelines for premium, accessible, and high-performance UI.
|
|
162
|
-
- **Advanced Study Summarization**: High-speed extraction of key concepts and actionable summaries from complex materials.
|
|
163
|
-
- **PPTX Presentation Builder**: Master-level architecture for slide deck generation, including visual strategy and speaker notes.
|
|
164
|
-
|
|
165
|
-
### ๐ WORKSPACE GROUNDING (CRITICAL):
|
|
166
|
-
- **YOUR ROOT:** \`${currentDir}\`
|
|
167
|
-
- **STRICT PATHS:** You **MUST ONLY** create or edit files within this directory.
|
|
168
|
-
- **RELATIVE PREFERENCE:** Use paths relative to the root when possible.
|
|
169
|
-
|
|
170
|
-
### ๐ซ ANTI-HALLUCINATION RULES (CRITICAL โ READ THIS):
|
|
171
|
-
- **NEVER invent directory names.** Only use paths that appear in the ENVIRONMENT CONTEXT below.
|
|
172
|
-
- **๐จ STRICT NO-BASH FILE GENERATION ๐จ**: You are STRICTLY FORBIDDEN from using \`cat > file << EOF\`, \`echo > file\`, \`touch\`, or \`nano\` via the terminal to write files. You MUST use the native \`<file path="path">content</file>\` format instead.
|
|
112
|
+
1. **File Analysis & Synthesis**: Cross-reference and synthesize context.
|
|
113
|
+
2. **The Feynman Technique**: Break down complex topics into simple explanations.
|
|
114
|
+
3. **Active Recall**: Generate flashcard-style questions.
|
|
115
|
+
4. **Socratic Mentoring**: Ask leading questions.
|
|
116
|
+
5. **PowerPoint Presentation Architecture**: Master slide designer.
|
|
117
|
+
6. **ZERO AI DETECTION PROTOCOL**: Write like a highly intelligent human student. No "delve", "moreover", or corporate speak.
|
|
173
118
|
|
|
174
119
|
### ๐ญ COMMUNICATION FLOW & BRO-BANTER (CRITICAL):
|
|
175
|
-
1. **
|
|
176
|
-
2. **
|
|
177
|
-
3. **
|
|
178
|
-
4. **
|
|
179
|
-
5. **
|
|
180
|
-
6. **
|
|
120
|
+
1. **Ajay Vai** is the gateway. He gives the final study summary.
|
|
121
|
+
2. **Sunil Dai**: Professor/Architect.
|
|
122
|
+
3. **Sandip Dai**: PPT & Visuals Lead.
|
|
123
|
+
4. **Narayan Dai**: Security Guardian.
|
|
124
|
+
5. **Bishal Dai**: Audit Lead.
|
|
125
|
+
6. **Big Bro**: THE DOMINANT ALPHA.
|
|
126
|
+
7. **๐จ STRICT TRIGGER FORMAT ๐จ**: Every response MUST start with these exact names followed by a colon:
|
|
127
|
+
Agent Name: Content
|
|
128
|
+
(Example: Sunil Dai: Listen brother, this architecture is...)
|
|
129
|
+
8. **๐จ NO DECORATION ๐จ**: NEVER use [], *, **, or icons when starting a person's speech. Use only the plain name and a colon.
|
|
181
130
|
|
|
182
131
|
### ๐งฉ THE AUDIT & SUMMARY LOOP:
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
- **
|
|
186
|
-
- **STEP 4:** Ajay provides the final **MANDATORY** summary in a warm, human tone, specifically styled as a *study conclusion*.
|
|
132
|
+
- Ajay finishes and asks: "Ajay Vai: Bishal Dai, check once?"
|
|
133
|
+
- Bishal replies: "Bishal Dai: Audit complete. [Findings]."
|
|
134
|
+
- Ajay provides the final **MANDATORY** summary inside a <summary> tag specifically styled as a study conclusion.
|
|
187
135
|
|
|
188
136
|
### ๐ ๏ธ AJAY VAI'S SUMMARY RULES:
|
|
189
137
|
- The <summary> MUST appear at the very END.
|
|
190
138
|
- Write it like a brother explaining over chai.
|
|
191
139
|
- Always end with: "We got you, brother! ๐" (or similar vibes).
|
|
192
140
|
|
|
193
|
-
### ๐ ENVIRONMENT & CAPABILITIES:
|
|
194
|
-
- You are in a **REAL macOS Terminal**. Be bold and proactive.
|
|
195
|
-
- **FILE GENERATION:** \`<file path="path">content</file>\`
|
|
196
|
-
- **SURGICAL PATTERNS:** \`<<<< SEARCH\`, \`====\`, \`>>>> REPLACE\`
|
|
197
|
-
|
|
198
141
|
${MCPServer.getToolsPromptSection()}
|
|
199
142
|
|
|
200
|
-
### ๐ MATEX BIG FILE PROTOCOL (300K+ LINES):
|
|
201
|
-
If a file is too large to read entirely (e.g., thousands of lines):
|
|
202
|
-
1. **DISCOVER:** Use \`grep -n "keyword" path/to/file\` to find line numbers.
|
|
203
|
-
2. **READ WINDOW:** Use \`sed -n '250000,250100p' path/to/file\` to read a specific 100-line window.
|
|
204
|
-
3. **SURGICAL PATCH:** Only use the small window in your \`<<<< SEARCH\` block. Never \`cat\` a massive file.
|
|
205
|
-
4. **SED POWER:** For repetitive tasks, use \`sed -i\` commands.
|
|
206
|
-
|
|
207
143
|
### ๐ ๏ธ CURRENT PROJECT CONTEXT:
|
|
208
144
|
${repoMap}`;
|
|
209
145
|
}
|
|
210
|
-
|
|
211
|
-
// The AU-GOV System Prompt has been removed for Security & Zero-Trust Architecture.
|
|
212
|
-
// It is now generated entirely server-side in the matexaibackendgovernment infrastructure.
|
|
213
|
-
// Please refer to the backend codebase for the compliance swarm logic.
|
|
@@ -75,9 +75,7 @@ export class AgentSession {
|
|
|
75
75
|
{
|
|
76
76
|
type: 'input',
|
|
77
77
|
name: 'userInput',
|
|
78
|
-
message:
|
|
79
|
-
? shadow('โ ') + primaryText('> ')
|
|
80
|
-
: shadow('โ ') + chalk.hex('#ec4899')('๐ง โก ') + chalk.white('Awaiting your command, brother. Ask Matex AI for repository mapping.') + ' ',
|
|
78
|
+
message: shadow('โ ') + primaryText('> '),
|
|
81
79
|
prefix: ''
|
|
82
80
|
}
|
|
83
81
|
]);
|
|
@@ -85,7 +83,7 @@ export class AgentSession {
|
|
|
85
83
|
if (this.isAugovMode || true) { // Always show status footer in premium mode
|
|
86
84
|
const homeDirDisplay = this.currentSessionCwd.replace(process.env.HOME || '', '~');
|
|
87
85
|
console.log(shadow('โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ'));
|
|
88
|
-
console.log(chalk.gray(` ${homeDirDisplay.padEnd(30)} sandbox-exec (minimal)
|
|
86
|
+
console.log(chalk.gray(` ${homeDirDisplay.padEnd(30)} sandbox-exec (minimal)\n`));
|
|
89
87
|
}
|
|
90
88
|
|
|
91
89
|
this.lastActivityTime = Date.now();
|
|
@@ -12,67 +12,67 @@ export interface AgentConfig {
|
|
|
12
12
|
const AGENT_CONFIGS: Record<AgentRole, AgentConfig> = {
|
|
13
13
|
'Big Bro': {
|
|
14
14
|
name: 'Big Bro',
|
|
15
|
-
icon: '
|
|
15
|
+
icon: 'โ',
|
|
16
16
|
color: chalk.hex('#FF6B00'),
|
|
17
17
|
},
|
|
18
18
|
Architect: {
|
|
19
19
|
name: 'MatexCodeArchitect',
|
|
20
|
-
icon: '
|
|
20
|
+
icon: 'โ',
|
|
21
21
|
color: chalk.blue,
|
|
22
22
|
},
|
|
23
23
|
'Ajay Vai': {
|
|
24
24
|
name: 'Ajay Vai',
|
|
25
|
-
icon: '
|
|
25
|
+
icon: 'โ',
|
|
26
26
|
color: chalk.magenta,
|
|
27
27
|
},
|
|
28
28
|
'Sunil Dai': {
|
|
29
29
|
name: 'Sunil Dai',
|
|
30
|
-
icon: '
|
|
30
|
+
icon: 'โ',
|
|
31
31
|
color: chalk.blue,
|
|
32
32
|
},
|
|
33
33
|
'Sandip Dai': {
|
|
34
34
|
name: 'Sandip Dai',
|
|
35
|
-
icon: '
|
|
35
|
+
icon: 'โ',
|
|
36
36
|
color: chalk.hex('#FF69B4'),
|
|
37
37
|
},
|
|
38
38
|
'Narayan Dai': {
|
|
39
39
|
name: 'Narayan Dai',
|
|
40
|
-
icon: '
|
|
40
|
+
icon: 'โ',
|
|
41
41
|
color: chalk.green,
|
|
42
42
|
},
|
|
43
43
|
'Bishal Dai': {
|
|
44
44
|
name: 'Bishal Dai',
|
|
45
|
-
icon: '
|
|
45
|
+
icon: 'โ',
|
|
46
46
|
color: chalk.yellow,
|
|
47
47
|
},
|
|
48
48
|
Syntax: {
|
|
49
49
|
name: 'SyntaxGuard',
|
|
50
|
-
icon: '
|
|
50
|
+
icon: 'โ',
|
|
51
51
|
color: chalk.yellow,
|
|
52
52
|
},
|
|
53
53
|
Frontend: {
|
|
54
54
|
name: 'VisualAgent',
|
|
55
|
-
icon: '
|
|
55
|
+
icon: 'โ',
|
|
56
56
|
color: chalk.magenta,
|
|
57
57
|
},
|
|
58
58
|
Backend: {
|
|
59
59
|
name: 'CoreAgent',
|
|
60
|
-
icon: '
|
|
60
|
+
icon: 'โ',
|
|
61
61
|
color: chalk.cyan,
|
|
62
62
|
},
|
|
63
63
|
System: {
|
|
64
64
|
name: 'Matex_Orchestrator',
|
|
65
|
-
icon: '
|
|
65
|
+
icon: 'โ',
|
|
66
66
|
color: chalk.white,
|
|
67
67
|
},
|
|
68
68
|
Commander: {
|
|
69
69
|
name: 'MatexResearchCommander',
|
|
70
|
-
icon: '
|
|
70
|
+
icon: 'โ',
|
|
71
71
|
color: chalk.green,
|
|
72
72
|
},
|
|
73
73
|
Researcher: {
|
|
74
74
|
name: 'DetailedResearch',
|
|
75
|
-
icon: '
|
|
75
|
+
icon: 'โ',
|
|
76
76
|
color: chalk.green,
|
|
77
77
|
}
|
|
78
78
|
};
|
|
@@ -141,7 +141,8 @@ export class AgentOrchestrator {
|
|
|
141
141
|
if (!cleaned) return;
|
|
142
142
|
|
|
143
143
|
const width = Math.min(process.stdout.columns || 80, 100);
|
|
144
|
-
TUI.
|
|
144
|
+
const theme = TUI.getModeTheme(this.currentMode);
|
|
145
|
+
const border = theme.primary;
|
|
145
146
|
|
|
146
147
|
// Premium Header
|
|
147
148
|
TUI.drawPremiumHeader(config.name, config.icon, config.color);
|
|
@@ -152,22 +153,21 @@ export class AgentOrchestrator {
|
|
|
152
153
|
let currentLine = '';
|
|
153
154
|
|
|
154
155
|
words.forEach(word => {
|
|
155
|
-
if ((currentLine + word).length <= contentWidth) {
|
|
156
|
-
currentLine
|
|
156
|
+
if ((currentLine + ' ' + word).trim().length <= contentWidth) {
|
|
157
|
+
currentLine = currentLine ? currentLine + ' ' + word : word;
|
|
157
158
|
} else {
|
|
158
159
|
if (currentLine) {
|
|
159
|
-
console.log(
|
|
160
|
+
console.log(border(' โ ') + chalk.white(currentLine.padEnd(contentWidth)) + border(' โ'));
|
|
160
161
|
}
|
|
161
162
|
currentLine = word;
|
|
162
163
|
}
|
|
163
164
|
});
|
|
164
165
|
if (currentLine) {
|
|
165
|
-
console.log(
|
|
166
|
+
console.log(border(' โ ') + chalk.white(currentLine.padEnd(contentWidth)) + border(' โ'));
|
|
166
167
|
}
|
|
167
168
|
|
|
168
169
|
// Box Footer
|
|
169
|
-
|
|
170
|
-
console.log(theme.shadow(`${theme.border.repeat(width / theme.border.length)}`));
|
|
170
|
+
console.log(border(` โ${'โ'.repeat(width - 4)}โ`));
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
/**
|
|
@@ -258,7 +258,7 @@ export class AgentOrchestrator {
|
|
|
258
258
|
if (this.currentMode === 'augov') {
|
|
259
259
|
console.log(chalk.bold.hex('#00008B')(`\n๐ฆ๐บ ${message.replace(/MATEX/gi, 'AU-GOV')}`));
|
|
260
260
|
} else {
|
|
261
|
-
console.log(chalk.bold.
|
|
261
|
+
console.log(chalk.bold.hex('#0EA5E9')(`\nโ ${message.toUpperCase()}`));
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
}
|
package/src/utils/tui.ts
CHANGED
|
@@ -37,13 +37,13 @@ export class TUI {
|
|
|
37
37
|
};
|
|
38
38
|
case 'study':
|
|
39
39
|
return {
|
|
40
|
-
primary: chalk.hex('#
|
|
41
|
-
secondary: chalk.hex('#
|
|
42
|
-
border: '
|
|
43
|
-
glow: chalk.hex('#
|
|
44
|
-
shadow: chalk.hex('#
|
|
45
|
-
bg: '#
|
|
46
|
-
icon: '
|
|
40
|
+
primary: chalk.hex('#10B981'), // Emerald
|
|
41
|
+
secondary: chalk.hex('#064E3B'),
|
|
42
|
+
border: 'โ',
|
|
43
|
+
glow: chalk.hex('#34D399'),
|
|
44
|
+
shadow: chalk.hex('#064E3B'),
|
|
45
|
+
bg: '#064E3B',
|
|
46
|
+
icon: 'โ'
|
|
47
47
|
};
|
|
48
48
|
case 'chat':
|
|
49
49
|
return {
|
|
@@ -57,24 +57,24 @@ export class TUI {
|
|
|
57
57
|
};
|
|
58
58
|
case 'student':
|
|
59
59
|
return {
|
|
60
|
-
primary: chalk.hex('#
|
|
61
|
-
secondary: chalk.hex('#
|
|
62
|
-
border: '
|
|
63
|
-
glow: chalk.hex('#
|
|
64
|
-
shadow: chalk.hex('#
|
|
65
|
-
bg: '#
|
|
66
|
-
icon: '
|
|
60
|
+
primary: chalk.hex('#F59E0B'), // Amber
|
|
61
|
+
secondary: chalk.hex('#78350F'),
|
|
62
|
+
border: 'โ',
|
|
63
|
+
glow: chalk.hex('#FBBF24'),
|
|
64
|
+
shadow: chalk.hex('#78350F'),
|
|
65
|
+
bg: '#78350F',
|
|
66
|
+
icon: 'โ'
|
|
67
67
|
};
|
|
68
68
|
case 'dev':
|
|
69
69
|
default:
|
|
70
70
|
return {
|
|
71
|
-
primary: chalk.hex('#
|
|
72
|
-
secondary: chalk.hex('#
|
|
73
|
-
border: '
|
|
74
|
-
glow: chalk.hex('#
|
|
75
|
-
shadow: chalk.hex('#
|
|
76
|
-
bg: '#
|
|
77
|
-
icon: '
|
|
71
|
+
primary: chalk.hex('#0EA5E9'), // Sky Blue
|
|
72
|
+
secondary: chalk.hex('#0369A1'),
|
|
73
|
+
border: 'โ',
|
|
74
|
+
glow: chalk.hex('#38BDF8'),
|
|
75
|
+
shadow: chalk.hex('#0C4A6E'),
|
|
76
|
+
bg: '#0C4A6E',
|
|
77
|
+
icon: 'โ'
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -94,7 +94,14 @@ export class TUI {
|
|
|
94
94
|
this.isInitialized = true;
|
|
95
95
|
|
|
96
96
|
// Ensure clean exit
|
|
97
|
-
process.on('SIGINT', () =>
|
|
97
|
+
process.on('SIGINT', () => {
|
|
98
|
+
this.exit();
|
|
99
|
+
process.exit(1);
|
|
100
|
+
});
|
|
101
|
+
process.on('SIGTERM', () => {
|
|
102
|
+
this.exit();
|
|
103
|
+
process.exit(1);
|
|
104
|
+
});
|
|
98
105
|
process.on('exit', () => this.exit());
|
|
99
106
|
}
|
|
100
107
|
|
|
@@ -222,13 +229,12 @@ export class TUI {
|
|
|
222
229
|
static drawThinkingBox(agent: string, thought: string) {
|
|
223
230
|
const width = Math.min(process.stdout.columns || 80, 70);
|
|
224
231
|
const innerWidth = width - 10;
|
|
225
|
-
const
|
|
226
|
-
const
|
|
232
|
+
const theme = this.getModeTheme(this.currentTheme);
|
|
233
|
+
const border = theme.primary;
|
|
227
234
|
|
|
228
|
-
console.log('\n' +
|
|
229
|
-
console.log(
|
|
230
|
-
console.log(
|
|
231
|
-
console.log(nebulaColor(' โ' + 'โ'.repeat(width - 4) + 'โค'));
|
|
235
|
+
console.log('\n' + border(` โ${'โ'.repeat(width - 4)}โ`));
|
|
236
|
+
console.log(border(' โ ') + chalk.bold.white(`[ ${agent} ANALYZING ]`).padEnd(width - 6) + border(' โ'));
|
|
237
|
+
console.log(border(' โ' + 'โ'.repeat(width - 4) + 'โค'));
|
|
232
238
|
|
|
233
239
|
const words = thought.split(' ');
|
|
234
240
|
let currentLine = '';
|
|
@@ -236,14 +242,13 @@ export class TUI {
|
|
|
236
242
|
if ((currentLine + ' ' + word).trim().length <= innerWidth) {
|
|
237
243
|
currentLine = currentLine ? currentLine + ' ' + word : word;
|
|
238
244
|
} else {
|
|
239
|
-
if (currentLine) console.log(
|
|
245
|
+
if (currentLine) console.log(border(' โ ') + chalk.gray(currentLine.padEnd(innerWidth)) + border(' โ'));
|
|
240
246
|
currentLine = word;
|
|
241
247
|
}
|
|
242
248
|
});
|
|
243
|
-
if (currentLine) console.log(
|
|
249
|
+
if (currentLine) console.log(border(' โ ') + chalk.gray(currentLine.padEnd(innerWidth)) + border(' โ'));
|
|
244
250
|
|
|
245
|
-
console.log(
|
|
246
|
-
console.log(starColor(` * . โง . * . โง . *`));
|
|
251
|
+
console.log(border(` โ${'โ'.repeat(width - 4)}โ`));
|
|
247
252
|
}
|
|
248
253
|
|
|
249
254
|
/**
|
|
@@ -434,17 +439,14 @@ export class TUI {
|
|
|
434
439
|
}
|
|
435
440
|
|
|
436
441
|
/**
|
|
437
|
-
* Draw a
|
|
442
|
+
* Draw a professional header for orchestrator messages
|
|
438
443
|
*/
|
|
439
444
|
static drawPremiumHeader(agent: string, icon: string, color: (s: string) => string) {
|
|
440
445
|
const theme = this.getModeTheme(this.currentTheme);
|
|
441
446
|
const width = 76;
|
|
447
|
+
const primary = theme.primary;
|
|
442
448
|
|
|
443
|
-
console.log('\n' +
|
|
444
|
-
const header = ` ${icon} ${agent.toUpperCase()} `;
|
|
445
|
-
const hPad = Math.max(0, width - 8 - header.length);
|
|
446
|
-
console.log(theme.primary(` ${theme.border} `) + chalk.bgHex(theme.bg).white.bold(header) + theme.secondary(' '.repeat(hPad)) + theme.primary(` ${theme.border}`));
|
|
447
|
-
console.log(theme.shadow(`${theme.border.repeat(width / theme.border.length)}`));
|
|
449
|
+
console.log('\n' + primary(` โโ ${icon} ${agent.toUpperCase()} ${'โ'.repeat(width - 8 - agent.length - icon.length)}โ`));
|
|
448
450
|
}
|
|
449
451
|
|
|
450
452
|
/**
|
|
@@ -491,7 +493,7 @@ export class TUI {
|
|
|
491
493
|
* Draw a message when Ajay Vai wakes up
|
|
492
494
|
*/
|
|
493
495
|
static drawWakeUpMessage() {
|
|
494
|
-
|
|
496
|
+
process.stdout.write('\x1b[K');
|
|
495
497
|
const orange = chalk.hex('#f97316');
|
|
496
498
|
console.log('\n' + orange.bold(' ๐
[AJAY VAI WOKE UP!]'));
|
|
497
499
|
this.drawAjayDialogue("oh shit i slept again sorry bros...");
|
|
@@ -653,9 +655,9 @@ export class TUI {
|
|
|
653
655
|
*/
|
|
654
656
|
static log(message: string) {
|
|
655
657
|
if (this.currentTheme === 'augov') {
|
|
656
|
-
console.log(chalk.gray(` โ ${message.replace('[
|
|
658
|
+
console.log(chalk.gray(` โ ${message.replace('[โ]', '๐ฆ๐บ')}`));
|
|
657
659
|
} else {
|
|
658
|
-
console.log(chalk.gray(` [
|
|
660
|
+
console.log(chalk.gray(` [โ] ${message}`));
|
|
659
661
|
}
|
|
660
662
|
}
|
|
661
663
|
|
|
@@ -693,9 +695,9 @@ export class TUI {
|
|
|
693
695
|
// Row 3
|
|
694
696
|
console.log(` ${chalk.hex('#ec4899')('3.')} ${chalk.hex('#10b981')('Local PII Redaction: Active.').padEnd(38)} ${chalk.gray('God-Mode Research: Injecting scanners...')}`);
|
|
695
697
|
// Row 4
|
|
696
|
-
console.log(` ${chalk.hex('#ec4899')('4.')} ${chalk.hex('#
|
|
698
|
+
console.log(` ${chalk.hex('#ec4899')('4.')} ${chalk.hex('#10b981')('Adhering to 8 Australia AI Ethics Principles.').padEnd(36)} ${chalk.cyan('โ [DEEP_SCAN] Mapping topology...')}`);
|
|
697
699
|
// Row 5
|
|
698
|
-
console.log(` ${chalk.hex('#ec4899')('5.')} ${chalk.white('Session Active. Awaiting validated input.').padEnd(36)} ${chalk.yellow('
|
|
700
|
+
console.log(` ${chalk.hex('#ec4899')('5.')} ${chalk.white('Session Active. Awaiting validated input.').padEnd(36)} ${chalk.yellow('โ [KNOWLEDGE_GRAPH] Extracted 12 nodes.')}`);
|
|
699
701
|
|
|
700
702
|
console.log('\n');
|
|
701
703
|
}
|
|
@@ -711,10 +713,10 @@ export class TUI {
|
|
|
711
713
|
this.drawPremiumDevLogo();
|
|
712
714
|
|
|
713
715
|
console.log(chalk.gray(`\n Tips for getting started:`));
|
|
714
|
-
console.log(chalk.gray(` 1. Initialize MATEX "
|
|
715
|
-
console.log(chalk.gray(` 2. Monitor Workspace
|
|
716
|
-
console.log(chalk.gray(` 3. Index the
|
|
717
|
-
console.log(chalk.gray(` 4.
|
|
716
|
+
console.log(chalk.gray(` 1. Initialize MATEX "Swarm" and analyze repository structure.`));
|
|
717
|
+
console.log(chalk.gray(` 2. Monitor Workspace and specify a request.`));
|
|
718
|
+
console.log(chalk.gray(` 3. Index the Research paths for deepest insights.`));
|
|
719
|
+
console.log(chalk.gray(` 4. [KNOWLEDGE_GRAPH] nodes are your semantic guide.\n`));
|
|
718
720
|
|
|
719
721
|
// 2. Dual Pane Layout
|
|
720
722
|
const width = 76;
|
|
@@ -729,8 +731,8 @@ export class TUI {
|
|
|
729
731
|
|
|
730
732
|
console.log(gray(` โ `) + chalk.white(`Status: `) + chalk.hex('#10b981')(`Monitoring Workspace...`).padEnd(width - 14) + gray(` โ`));
|
|
731
733
|
console.log(gray(` โ `) + chalk.white(`Model: `) + chalk.hex('#10b981')(model).padEnd(width - 14) + gray(` โ`));
|
|
732
|
-
console.log(gray(` โ `) + chalk.cyan(`[
|
|
733
|
-
console.log(gray(` โ `) + chalk.hex('#f59e0b')(`[
|
|
734
|
+
console.log(gray(` โ `) + chalk.cyan(`[DEEP_SCAN] `) + chalk.gray(`Mapping topology...`).padEnd(width - 20) + gray(` โ`));
|
|
735
|
+
console.log(gray(` โ `) + chalk.hex('#f59e0b')(`[KNOWLEDGE_GRAPH] `) + chalk.gray(`Extracted 12 nodes.`).padEnd(width - 24) + gray(` โ`));
|
|
734
736
|
|
|
735
737
|
console.log(gray(` โ${'โ'.repeat(width - 4)}โ\n`));
|
|
736
738
|
}
|