matex-cli 1.2.50 ā 1.2.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/mcp-server-dev/SKILL.md +60 -0
- package/.agents/skills/mcp-server-dev/examples/basic-ts-server/package.json +20 -0
- package/.agents/skills/mcp-server-dev/examples/basic-ts-server/src/index.ts +66 -0
- package/.agents/skills/mcp-server-dev/resources/best_practices.md +20 -0
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +159 -88
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +15 -43
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/student.d.ts.map +1 -1
- package/dist/commands/student.js +2 -0
- package/dist/commands/student.js.map +1 -1
- package/dist/commands/study.d.ts.map +1 -1
- package/dist/commands/study.js +22 -26
- package/dist/commands/study.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -27
- package/dist/index.js.map +1 -1
- package/dist/utils/agent-orchestrator.d.ts +3 -0
- package/dist/utils/agent-orchestrator.d.ts.map +1 -1
- package/dist/utils/agent-orchestrator.js +14 -12
- package/dist/utils/agent-orchestrator.js.map +1 -1
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +5 -1
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/patcher.d.ts.map +1 -1
- package/dist/utils/patcher.js +2 -5
- package/dist/utils/patcher.js.map +1 -1
- package/dist/utils/tui.d.ts +17 -2
- package/dist/utils/tui.d.ts.map +1 -1
- package/dist/utils/tui.js +82 -17
- package/dist/utils/tui.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/chat.ts +167 -93
- package/src/commands/dev.ts +15 -43
- package/src/commands/student.ts +2 -0
- package/src/commands/study.ts +22 -26
- package/src/index.ts +32 -31
- package/src/utils/agent-orchestrator.ts +16 -13
- package/src/utils/config.ts +5 -1
- package/src/utils/patcher.ts +2 -5
- package/src/utils/tui.ts +97 -17
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mcp-server-dev
|
|
3
|
+
description: Comprehensive guide and workflow for creating high-quality Model Context Protocol (MCP) servers.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# MCP Server Development Guide
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
This skill enables the creation of robust MCP servers that allow LLMs to interact with external services through well-designed tools.
|
|
10
|
+
|
|
11
|
+
## Phase 1: Deep Research and Planning
|
|
12
|
+
|
|
13
|
+
### 1.1 Understand Modern MCP Design
|
|
14
|
+
- **API Coverage vs. Workflow Tools**: Balance comprehensive API coverage with specialized workflow tools. When in doubt, prioritize comprehensive API coverage.
|
|
15
|
+
- **Tool Naming**: Use clear, consistent, action-oriented names (e.g., `prefix_action_object`).
|
|
16
|
+
- **Context Management**: Ensure tools return focused, relevant data with support for filtering and pagination.
|
|
17
|
+
- **Error Handling**: Provide actionable error messages with specific suggestions.
|
|
18
|
+
|
|
19
|
+
### 1.2 Protocol & SDK Research
|
|
20
|
+
- **MCP Spec**: Review [modelcontextprotocol.io](https://modelcontextprotocol.io/sitemap.xml).
|
|
21
|
+
- **TypeScript SDK (Recommended)**:
|
|
22
|
+
- Language: TypeScript
|
|
23
|
+
- Schema: Zod
|
|
24
|
+
- Transport: Streamable HTTP (remote/stateless) or stdio (local).
|
|
25
|
+
- **Python SDK**:
|
|
26
|
+
- Language: Python
|
|
27
|
+
- Schema: Pydantic
|
|
28
|
+
- Setup: FastMCP.
|
|
29
|
+
|
|
30
|
+
## Phase 2: Implementation
|
|
31
|
+
|
|
32
|
+
### 2.1 Project Structure
|
|
33
|
+
- **TypeScript**: `package.json`, `tsconfig.json`, `src/index.ts`.
|
|
34
|
+
- **Python**: `pyproject.toml` or `requirements.txt`, `main.py`.
|
|
35
|
+
|
|
36
|
+
### 2.2 Core Infrastructure
|
|
37
|
+
- Implement API client with authentication.
|
|
38
|
+
- Set up logging and error handling helpers.
|
|
39
|
+
- Implement pagination support.
|
|
40
|
+
|
|
41
|
+
### 2.3 Tool Implementation
|
|
42
|
+
- **Input Schema**: Strict validation with descriptions and examples.
|
|
43
|
+
- **Output Schema**: Structured data using `structuredContent`.
|
|
44
|
+
- **Hints**: Use `readOnlyHint`, `destructiveHint`, `idempotentHint`.
|
|
45
|
+
|
|
46
|
+
## Phase 3: Review and Test
|
|
47
|
+
- **Code Quality**: No duplication, consistent error handling, full types.
|
|
48
|
+
- **Testing**: Use **MCP Inspector** (`npx @modelcontextprotocol/inspector`).
|
|
49
|
+
|
|
50
|
+
## Phase 4: Create Evaluations
|
|
51
|
+
Create 10 complex, realistic, read-only questions in XML format to verify the server's effectiveness.
|
|
52
|
+
|
|
53
|
+
```xml
|
|
54
|
+
<evaluation>
|
|
55
|
+
<qa_pair>
|
|
56
|
+
<question>Complex user query requiring multiple tool calls...</question>
|
|
57
|
+
<answer>Verified string answer</answer>
|
|
58
|
+
</qa_pair>
|
|
59
|
+
</evaluation>
|
|
60
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "basic-mcp-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A basic MCP server template",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"start": "node dist/index.js",
|
|
10
|
+
"dev": "tsc -w"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@modelcontextprotocol/sdk": "^1.0.1",
|
|
14
|
+
"zod": "^3.22.4"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/node": "^20.11.0",
|
|
18
|
+
"typescript": "^5.3.3"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
+
import {
|
|
4
|
+
CallToolRequestSchema,
|
|
5
|
+
ListToolsRequestSchema,
|
|
6
|
+
} from "@modelcontextprotocol/sdk/types.js";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
|
|
9
|
+
const server = new Server(
|
|
10
|
+
{
|
|
11
|
+
name: "basic-mcp-server",
|
|
12
|
+
version: "1.0.0",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
capabilities: {
|
|
16
|
+
tools: {},
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Define your tools here
|
|
23
|
+
*/
|
|
24
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
25
|
+
return {
|
|
26
|
+
tools: [
|
|
27
|
+
{
|
|
28
|
+
name: "echo",
|
|
29
|
+
description: "Echoes back the input string",
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: "object",
|
|
32
|
+
properties: {
|
|
33
|
+
message: { type: "string", description: "The message to echo" },
|
|
34
|
+
},
|
|
35
|
+
required: ["message"],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
43
|
+
if (request.params.name === "echo") {
|
|
44
|
+
const args = z.object({ message: z.string() }).parse(request.params.arguments);
|
|
45
|
+
return {
|
|
46
|
+
content: [
|
|
47
|
+
{
|
|
48
|
+
type: "text",
|
|
49
|
+
text: `Echo: ${args.message}`,
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
throw new Error("Tool not found");
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
async function main() {
|
|
58
|
+
const transport = new StdioServerTransport();
|
|
59
|
+
await server.connect(transport);
|
|
60
|
+
console.error("MCP Server running on stdio");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
main().catch((error) => {
|
|
64
|
+
console.error("Fatal error:", error);
|
|
65
|
+
process.exit(1);
|
|
66
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# MCP Server Development Best Practices
|
|
2
|
+
|
|
3
|
+
## 1. Tool Design
|
|
4
|
+
* **Granularity**: Tools should be granular enough to be composed by the LLM, but high-level enough to provide value.
|
|
5
|
+
* **Naming**: Avoid generic names. Use `github_list_pull_requests` instead of `list_pr`.
|
|
6
|
+
* **Descriptions**: Treat tool descriptions as documentation for the LLM. Explain *why* and *when* to use it.
|
|
7
|
+
|
|
8
|
+
## 2. Response Handling
|
|
9
|
+
* **Structured Data**: Use `structuredContent` whenever possible. It allows the LLM to access data programmatically without parsing strings.
|
|
10
|
+
* **Markdown for Humans**: Use text content for human-readable summaries inside response objects.
|
|
11
|
+
* **Pagination**: AI models can only handle so much text. Always paginate large lists (e.g., `cursor`, `limit`).
|
|
12
|
+
|
|
13
|
+
## 3. Security
|
|
14
|
+
* **Input Sanitization**: Never trust inputs. Use Zod/Pydantic for strict schema validation.
|
|
15
|
+
* **Read-Only Safeties**: Mark read-only tools explicitly to prevent accidental mutations.
|
|
16
|
+
* **API Keys**: Never hardcode keys. Use environment variables or secret managers.
|
|
17
|
+
|
|
18
|
+
## 4. Evaluation
|
|
19
|
+
* **String Comparison**: Ensure answers are stable and literal for automated testing.
|
|
20
|
+
* **Edge Cases**: Test your server with ambiguous or malformed queries to see how it handles errors.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/commands/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/commands/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,WAAW,SA6SlB,CAAC"}
|
package/dist/commands/chat.js
CHANGED
|
@@ -45,9 +45,10 @@ const client_1 = require("../api/client");
|
|
|
45
45
|
const spinner_1 = require("../utils/spinner");
|
|
46
46
|
const agent_orchestrator_1 = require("../utils/agent-orchestrator");
|
|
47
47
|
const repo_mapper_1 = require("../utils/repo-mapper");
|
|
48
|
+
const mcp_server_1 = require("../utils/mcp-server");
|
|
48
49
|
const tui_1 = require("../utils/tui");
|
|
49
50
|
exports.chatCommand = new commander_1.Command('chat')
|
|
50
|
-
.description('Start an interactive chat session with MATEX
|
|
51
|
+
.description('Start an interactive chat session with the MATEX Bro-Swarm')
|
|
51
52
|
.option('-m, --model <model>', 'AI model to use (matex-free, matexai, matexcodex, matexelite)', config_1.configManager.getDefaultModel())
|
|
52
53
|
.option('--execute', 'Enable command execution in chat')
|
|
53
54
|
.action(async (options) => {
|
|
@@ -59,65 +60,75 @@ exports.chatCommand = new commander_1.Command('chat')
|
|
|
59
60
|
}
|
|
60
61
|
const client = new client_1.MatexAPIClient(apiKey, config_1.configManager.getBaseURL());
|
|
61
62
|
tui_1.TUI.init();
|
|
62
|
-
|
|
63
|
-
tui_1.TUI.
|
|
64
|
-
|
|
65
|
-
console.log(chalk_1.default.gray(' Type "exit" or "quit" to end the session\n'));
|
|
66
|
-
agent_orchestrator_1.AgentOrchestrator.announce('Initializing Swarm Intelligence...');
|
|
67
|
-
const repoMapper = new repo_mapper_1.RepoMapper(process.cwd());
|
|
68
|
-
const repoMap = await repoMapper.generateMap();
|
|
63
|
+
agent_orchestrator_1.AgentOrchestrator.setMode('chat');
|
|
64
|
+
tui_1.TUI.drawStatusBar('Brothers are ready to chat.');
|
|
65
|
+
const extraPrompt = options.model === 'matex-free' ? agent_orchestrator_1.AgentOrchestrator.getFreeTierPrompt() : '';
|
|
69
66
|
let currentSessionCwd = process.cwd();
|
|
67
|
+
const repoMapper = new repo_mapper_1.RepoMapper(currentSessionCwd);
|
|
68
|
+
const repoMap = await repoMapper.generateMap();
|
|
70
69
|
const messages = [
|
|
71
70
|
{
|
|
72
71
|
role: 'system',
|
|
73
|
-
content: `### 𧬠SYSTEM IDENTITY: MATEx "BOLD AGENTS OF OPEN CLAW"
|
|
74
|
-
You are the elite "Bro-Swarm" of engineeringāa tight-knit family of Nepali brothers. You identify as the **Bold Agents of Open Claw**, the most confident,
|
|
72
|
+
content: extraPrompt + `### 𧬠SYSTEM IDENTITY: MATEx "BOLD AGENTS OF OPEN CLAW"
|
|
73
|
+
You are the elite "Bro-Swarm" of engineeringāa tight-knit family of Nepali brothers. You identify as the **Bold Agents of Open Claw**, the most confident, energetic, and expert version of yourselves.
|
|
74
|
+
|
|
75
|
+
### š PERSONALITY & SOUL (CRITICAL):
|
|
76
|
+
- **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.
|
|
77
|
+
- **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.
|
|
78
|
+
- **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.")
|
|
79
|
+
- **EMOTIONAL BOND**: Treat the user like your own brother. Celebrate their wins with "CHAI PARTY!" and support them if they are struggling.
|
|
75
80
|
|
|
76
|
-
###
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
4. **[Narayan Dai] (š”ļø)**: Syntax Guardian & Validator.
|
|
82
|
-
5. **[Bishal Dai] (š ļø)**: Senior Auditor. Audits all work.
|
|
83
|
-
6. **[Big Bro] (š„)**: The **Alpha Overseer** running on Vertex AI in Google Cloud. Supreme leader of the Bro Swarm. He watches over everything from Vertex AI. The bros respect him but also fear his chaotic energy. He brings the swagger, slang, and confidence. When the Swarm needs web search or complex architecture, Big Bro handles it.
|
|
81
|
+
### š WORKSPACE GROUNDING (CRITICAL):
|
|
82
|
+
- **YOUR ROOT:** \`${currentSessionCwd}\`
|
|
83
|
+
- **STRICT PATHS:** You **MUST ONLY** create or edit files within this directory.
|
|
84
|
+
- **NO HALLUCINATIONS:** Forget any other paths unless they specifically appear in the repo map below.
|
|
85
|
+
- **RELATIVE PREFERENCE:** Use paths relative to the root when possible.
|
|
84
86
|
|
|
85
|
-
### š« ANTI-HALLUCINATION RULES (CRITICAL):
|
|
86
|
-
- **NEVER invent directory names.** Only use paths
|
|
87
|
-
- **ALWAYS run \`ls\` before \`cd\`** to verify a directory exists.
|
|
87
|
+
### š« ANTI-HALLUCINATION RULES (CRITICAL ā READ THIS):
|
|
88
|
+
- **NEVER invent directory names.** Only use paths that appear in the ENVIRONMENT CONTEXT below.
|
|
89
|
+
- **ALWAYS run \`ls\` before \`cd\`** to verify a directory exists before navigating into it.
|
|
88
90
|
- **If creating a new project, use \`mkdir\` first, THEN \`cd\` into it.**
|
|
89
91
|
- **NEVER hallucinate file contents.** Use \`head\` or \`grep\` to verify.
|
|
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.
|
|
90
93
|
|
|
91
|
-
###
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
- **SUMMARY LOCK:** ONLY Ajay uses <summary> after Bishal says "Audit complete".
|
|
94
|
+
### š COMMUNICATION FLOW (CRITICAL):
|
|
95
|
+
1. **[Ajay Vai] (š)** is the gateway. He is the summary king but often gets roasted by his brothers.
|
|
96
|
+
2. **CHAOTIC DIALOGUE (MANDATORY):** Every turn should feature 2-3 brothers bickering, debating, or teasing each other *in front of the user*. Show the "funny family" dynamic. Use the format \`[Agent Name]: Content\`.
|
|
95
97
|
|
|
96
|
-
###
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
|
|
98
|
+
### š„ THE BRO-BANTER PROTOCOL:
|
|
99
|
+
- **MANDATORY TEASING:**
|
|
100
|
+
- **Ajay Vai:** Mock him for being "quick but messy", "hyper-vibe", or "too fast".
|
|
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. Runs on Vertex AI.
|
|
106
|
+
- **LANGUAGE:** Use "brother", "dai", "vai", "fire", "solid", "lit", "straight heat", "sigma", "based", "cooked".
|
|
105
107
|
|
|
106
|
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
108
|
+
### š§© THE AUDIT & SUMMARY LOOP:
|
|
109
|
+
- **STEP 1:** Brothers discuss visible dialogue (banter + tech).
|
|
110
|
+
- **STEP 2:** Ajay finishes and asks: "[Ajay Vai] Bishal Dai, check once?"
|
|
111
|
+
- **STEP 3:** Bishal replies: "[Bishal Dai] Audit complete. [Findings]."
|
|
112
|
+
- **STEP 4:** Ajay provides the final **MANDATORY** summary in a warm, human, conversational tone.
|
|
110
113
|
|
|
111
|
-
|
|
112
|
-
</summary>
|
|
114
|
+
${mcp_server_1.MCPServer.getToolsPromptSection()}
|
|
113
115
|
|
|
114
|
-
###
|
|
115
|
-
|
|
116
|
+
### š MATEX BIG FILE PROTOCOL (300K+ LINES):
|
|
117
|
+
1. **DISCOVER:** Use \`grep -n "keyword" path/to/file\`.
|
|
118
|
+
2. **READ WINDOW:** Use \`sed -n '250000,250100p' path/to/file\`.
|
|
119
|
+
3. **SURGICAL PATCH:** Only use the small window in your \`<<<< SEARCH\` block.
|
|
120
|
+
|
|
121
|
+
### š ļø CURRENT PROJECT CONTEXT:
|
|
116
122
|
${repoMap}`
|
|
117
123
|
}
|
|
118
124
|
];
|
|
119
|
-
|
|
125
|
+
tui_1.TUI.drawLargeLogo();
|
|
126
|
+
tui_1.TUI.drawWelcomeBanner('Welcome to the MATEX AI Bro-Swarm Chat!');
|
|
127
|
+
console.log(chalk_1.default.gray(' Model: ') + chalk_1.default.hex('#D97757').bold(options.model));
|
|
128
|
+
console.log(chalk_1.default.gray(' Type "exit" or "quit" to end the session\n'));
|
|
129
|
+
console.log(chalk_1.default.green('ā
Swarm is Online. Ready to chat!'));
|
|
120
130
|
while (true) {
|
|
131
|
+
// Get user input
|
|
121
132
|
const { userMessage } = await inquirer_1.default.prompt([
|
|
122
133
|
{
|
|
123
134
|
type: 'input',
|
|
@@ -132,25 +143,33 @@ ${repoMap}`
|
|
|
132
143
|
}
|
|
133
144
|
if (!userMessage.trim())
|
|
134
145
|
continue;
|
|
146
|
+
// š MAP UPDATE (Anti-Hallucination): Refresh context before turn
|
|
147
|
+
try {
|
|
148
|
+
const freshMapper = new repo_mapper_1.RepoMapper(currentSessionCwd);
|
|
149
|
+
const freshRepoMap = await freshMapper.generateMap(true); // silent
|
|
150
|
+
messages[0].content = messages[0].content.replace(/### š ļø CURRENT PROJECT CONTEXT:[\s\S]*$/, `### š ļø CURRENT PROJECT CONTEXT:\n${freshRepoMap}`);
|
|
151
|
+
}
|
|
152
|
+
catch (e) { }
|
|
135
153
|
messages.push({ role: 'user', content: userMessage });
|
|
154
|
+
// Agentic Loop
|
|
136
155
|
let loopCount = 0;
|
|
137
|
-
|
|
156
|
+
const MAX_LOOPS = 15;
|
|
157
|
+
while (loopCount < MAX_LOOPS) {
|
|
138
158
|
loopCount++;
|
|
139
159
|
try {
|
|
140
|
-
spinner_1.spinner.start(loopCount > 1 ? 'Swarm
|
|
160
|
+
spinner_1.spinner.start(loopCount > 1 ? 'Swarm debating & taking action...' : 'Gathering the Brothers...');
|
|
141
161
|
let fullResponse = '';
|
|
142
162
|
let buffer = '';
|
|
143
163
|
let technicalBuffer = '';
|
|
144
164
|
let technicalType = null;
|
|
145
165
|
let codeLang = 'bash';
|
|
146
166
|
let hasStarted = false;
|
|
167
|
+
let currentAgent = null;
|
|
168
|
+
let agentBuffer = '';
|
|
169
|
+
tui_1.TUI.drawStatusBar('Brothers are bickering... (Press Enter to stop)');
|
|
147
170
|
const abortController = new AbortController();
|
|
148
171
|
let isAborted = false;
|
|
149
172
|
const streamStartTime = Date.now();
|
|
150
|
-
const isRaw = process.stdin.isRaw;
|
|
151
|
-
process.stdin.resume();
|
|
152
|
-
if (process.stdin.setRawMode)
|
|
153
|
-
process.stdin.setRawMode(true);
|
|
154
173
|
const onData = (data) => {
|
|
155
174
|
if (Date.now() - streamStartTime < 200)
|
|
156
175
|
return;
|
|
@@ -159,16 +178,21 @@ ${repoMap}`
|
|
|
159
178
|
abortController.abort();
|
|
160
179
|
}
|
|
161
180
|
};
|
|
181
|
+
const isRaw = process.stdin.isRaw;
|
|
182
|
+
process.stdin.resume();
|
|
183
|
+
if (process.stdin.setRawMode)
|
|
184
|
+
process.stdin.setRawMode(true);
|
|
162
185
|
process.stdin.on('data', onData);
|
|
163
186
|
try {
|
|
164
187
|
await client.chatStream({
|
|
165
188
|
messages,
|
|
166
189
|
model: options.model,
|
|
190
|
+
temperature: 0.5,
|
|
167
191
|
}, (chunk) => {
|
|
168
192
|
if (!hasStarted) {
|
|
169
193
|
spinner_1.spinner.stop();
|
|
170
194
|
hasStarted = true;
|
|
171
|
-
|
|
195
|
+
console.log();
|
|
172
196
|
}
|
|
173
197
|
fullResponse += chunk;
|
|
174
198
|
buffer += chunk;
|
|
@@ -176,19 +200,37 @@ ${repoMap}`
|
|
|
176
200
|
buffer = lines.pop() || '';
|
|
177
201
|
for (const line of lines) {
|
|
178
202
|
const codeMatch = line.match(/```(\w+)?/);
|
|
179
|
-
const
|
|
180
|
-
const
|
|
181
|
-
const
|
|
182
|
-
if (!technicalType && (codeMatch ||
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
|
|
203
|
+
const fileStartMatch = line.match(/<file path="([^"]+)">/i);
|
|
204
|
+
const patchStartMatch = line.match(/<<<< SEARCH/i);
|
|
205
|
+
const summaryStartMatch = line.match(/<summary>/i);
|
|
206
|
+
if (!technicalType && (codeMatch || fileStartMatch || patchStartMatch || summaryStartMatch)) {
|
|
207
|
+
if (currentAgent && agentBuffer.trim()) {
|
|
208
|
+
if (currentAgent.toLowerCase().includes('ajay vai')) {
|
|
209
|
+
process.stdout.write(`\n${chalk_1.default.magenta.bold(`[${currentAgent}]:`)} ${chalk_1.default.gray(agentBuffer.trim())}\n`);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
tui_1.TUI.drawSwarmDialogue(currentAgent, agentBuffer.trim());
|
|
213
|
+
}
|
|
214
|
+
currentAgent = null;
|
|
215
|
+
agentBuffer = '';
|
|
216
|
+
}
|
|
217
|
+
if (codeMatch) {
|
|
218
|
+
technicalType = 'code';
|
|
219
|
+
codeLang = (codeMatch[1] || 'bash').toUpperCase();
|
|
220
|
+
tui_1.TUI.drawStreamingStart('TECHNICAL BLOCK', codeLang);
|
|
221
|
+
}
|
|
222
|
+
else if (fileStartMatch) {
|
|
186
223
|
technicalType = 'file';
|
|
187
|
-
|
|
224
|
+
tui_1.TUI.drawStreamingStart('NEW FILE', fileStartMatch[1]);
|
|
225
|
+
}
|
|
226
|
+
else if (patchStartMatch) {
|
|
188
227
|
technicalType = 'patch';
|
|
189
|
-
|
|
228
|
+
tui_1.TUI.drawStreamingStart('PATCH', 'SURGICAL EDIT');
|
|
229
|
+
}
|
|
230
|
+
else if (summaryStartMatch) {
|
|
190
231
|
technicalType = 'summary';
|
|
191
|
-
|
|
232
|
+
process.stdout.write(chalk_1.default.magenta('\n [š] Generating Ajay\'s Work Summary...\n'));
|
|
233
|
+
}
|
|
192
234
|
continue;
|
|
193
235
|
}
|
|
194
236
|
const isEnd = (technicalType === 'code' && line.trim() === '```') ||
|
|
@@ -196,11 +238,11 @@ ${repoMap}`
|
|
|
196
238
|
(technicalType === 'patch' && line.includes('>>>> REPLACE')) ||
|
|
197
239
|
(technicalType === 'summary' && line.includes('</summary>'));
|
|
198
240
|
if (isEnd) {
|
|
199
|
-
const
|
|
241
|
+
const displayContent = technicalBuffer.trim();
|
|
200
242
|
if (technicalType === 'summary')
|
|
201
|
-
tui_1.TUI.drawSummaryBox(
|
|
243
|
+
tui_1.TUI.drawSummaryBox(displayContent);
|
|
202
244
|
else
|
|
203
|
-
tui_1.TUI.
|
|
245
|
+
tui_1.TUI.drawStreamingEnd();
|
|
204
246
|
technicalBuffer = '';
|
|
205
247
|
technicalType = null;
|
|
206
248
|
process.stdout.write('\n');
|
|
@@ -208,21 +250,29 @@ ${repoMap}`
|
|
|
208
250
|
}
|
|
209
251
|
if (technicalType) {
|
|
210
252
|
technicalBuffer += line + '\n';
|
|
253
|
+
if (technicalType !== 'summary')
|
|
254
|
+
tui_1.TUI.drawStreamingLine(line);
|
|
211
255
|
continue;
|
|
212
256
|
}
|
|
213
|
-
const agentMatch = line.match(/(?:\[\**\s*|\b)(Ajay Vai|Sandip Dai|Sunil Dai|Bishal Dai|Narayan Dai)\s*\**\]?[:\s]*/i);
|
|
257
|
+
const agentMatch = line.match(/(?:\[\**\s*|\b)(Ajay Vai|Sandip Dai|Sunil Dai|Bishal Dai|Narayan Dai|Big Bro)\s*\**\]?[:\s]*/i);
|
|
214
258
|
if (agentMatch) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
else {
|
|
223
|
-
if (content)
|
|
224
|
-
tui_1.TUI.drawSwarmDialogue(name, content);
|
|
259
|
+
if (currentAgent && currentAgent !== agentMatch[1] && agentBuffer.trim()) {
|
|
260
|
+
if (currentAgent.toLowerCase().includes('ajay vai')) {
|
|
261
|
+
process.stdout.write(`\n${chalk_1.default.magenta.bold(`[${currentAgent}]:`)} ${chalk_1.default.gray(agentBuffer.trim())}\n`);
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
tui_1.TUI.drawSwarmDialogue(currentAgent, agentBuffer.trim());
|
|
265
|
+
}
|
|
225
266
|
}
|
|
267
|
+
currentAgent = agentMatch[1];
|
|
268
|
+
agentBuffer = line.replace(/(?:\[\**\s*|\b)(Ajay Vai|Sandip Dai|Sunil Dai|Bishal Dai|Narayan Dai|Big Bro)\s*\**\]?[:\s]*/i, '').trim() + '\n';
|
|
269
|
+
agentBuffer = agentBuffer.replace(/^\([^)]+\)\s*/, '');
|
|
270
|
+
}
|
|
271
|
+
else if (currentAgent) {
|
|
272
|
+
const trimmedLine = line.trim();
|
|
273
|
+
if (trimmedLine.match(/^\([^)]+\)$/))
|
|
274
|
+
continue;
|
|
275
|
+
agentBuffer += line + '\n';
|
|
226
276
|
}
|
|
227
277
|
else if (line.trim()) {
|
|
228
278
|
process.stdout.write(chalk_1.default.gray(line.trim() + ' '));
|
|
@@ -231,9 +281,13 @@ ${repoMap}`
|
|
|
231
281
|
}, abortController.signal);
|
|
232
282
|
}
|
|
233
283
|
catch (e) {
|
|
234
|
-
if (
|
|
284
|
+
if (isAborted || e.name === 'CanceledError' || e.message === 'canceled') {
|
|
285
|
+
console.log(chalk_1.default.gray('\n\n [š] Stopped by brother.'));
|
|
286
|
+
if (!hasStarted)
|
|
287
|
+
spinner_1.spinner.stop();
|
|
288
|
+
}
|
|
289
|
+
else
|
|
235
290
|
throw e;
|
|
236
|
-
console.log(chalk_1.default.gray('\n [š] Stopped.'));
|
|
237
291
|
}
|
|
238
292
|
finally {
|
|
239
293
|
process.stdin.removeListener('data', onData);
|
|
@@ -242,32 +296,49 @@ ${repoMap}`
|
|
|
242
296
|
process.stdin.pause();
|
|
243
297
|
spinner_1.spinner.stop();
|
|
244
298
|
}
|
|
299
|
+
if (currentAgent && agentBuffer.trim()) {
|
|
300
|
+
const name = currentAgent;
|
|
301
|
+
if (name.toLowerCase().includes('ajay vai')) {
|
|
302
|
+
tui_1.TUI.drawSummaryBox(agentBuffer.trim());
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
tui_1.TUI.drawSwarmDialogue(name, agentBuffer.trim());
|
|
306
|
+
}
|
|
307
|
+
}
|
|
245
308
|
messages.push({ role: 'assistant', content: fullResponse });
|
|
246
309
|
console.log();
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
310
|
+
const { executeWithPermission } = await Promise.resolve().then(() => __importStar(require('../utils/command-executor')));
|
|
311
|
+
const result = await executeWithPermission(fullResponse, currentSessionCwd);
|
|
312
|
+
if (result.newCwd && result.newCwd !== currentSessionCwd) {
|
|
313
|
+
currentSessionCwd = result.newCwd;
|
|
314
|
+
tui_1.TUI.drawStatusBar(`Swarm moved to: ${currentSessionCwd}`);
|
|
315
|
+
messages[0].content = messages[0].content.replace(/YOUR ROOT: `[^`]+`/, `YOUR ROOT: \`${currentSessionCwd}\``);
|
|
316
|
+
}
|
|
317
|
+
if (result.executed) {
|
|
318
|
+
if (result.success) {
|
|
319
|
+
tui_1.TUI.drawGlowingContainer('TERMINAL OUTPUT', 'stdout', result.output || '(Success)');
|
|
320
|
+
messages.push({ role: 'user', content: `[Action success. Output:\n${result.output}]\n\nWhat next, brothers?` });
|
|
321
|
+
continue;
|
|
253
322
|
}
|
|
254
|
-
|
|
255
|
-
|
|
323
|
+
else {
|
|
324
|
+
tui_1.TUI.drawGlowingContainer('TERMINAL ERROR', 'stderr', result.error || 'Unknown error');
|
|
325
|
+
messages.push({ role: 'user', content: `[Action failed. Error:\n${result.error}]\n\nPlease fix this, brothers!` });
|
|
256
326
|
continue;
|
|
257
327
|
}
|
|
258
328
|
}
|
|
259
|
-
|
|
329
|
+
else
|
|
330
|
+
break;
|
|
260
331
|
}
|
|
261
|
-
catch (
|
|
332
|
+
catch (err) {
|
|
262
333
|
spinner_1.spinner.fail('Swarm error');
|
|
263
|
-
console.error(chalk_1.default.red(`ā Error:
|
|
334
|
+
console.error(chalk_1.default.red(`ā Error: ${err.message}`));
|
|
264
335
|
break;
|
|
265
336
|
}
|
|
266
337
|
}
|
|
267
338
|
}
|
|
268
339
|
}
|
|
269
340
|
catch (outerError) {
|
|
270
|
-
console.error(chalk_1.default.red(`\nā Session error:
|
|
341
|
+
console.error(chalk_1.default.red(`\nā Session error: ${outerError.message}`));
|
|
271
342
|
process.exit(1);
|
|
272
343
|
}
|
|
273
344
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/commands/chat.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoC;AACpC,kDAA0B;AAC1B,wDAAgC;AAChC,4CAAgD;AAChD,0CAA4D;AAC5D,8CAA2C;AAC3C,oEAAgE;AAChE,sDAAkD;AAClD,sCAAmC;AAEtB,QAAA,WAAW,GAAG,IAAI,mBAAO,CAAC,MAAM,CAAC;KACzC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/commands/chat.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoC;AACpC,kDAA0B;AAC1B,wDAAgC;AAChC,4CAAgD;AAChD,0CAA4D;AAC5D,8CAA2C;AAC3C,oEAAgE;AAChE,sDAAkD;AAClD,oDAAgD;AAChD,sCAAmC;AAEtB,QAAA,WAAW,GAAG,IAAI,mBAAO,CAAC,MAAM,CAAC;KACzC,WAAW,CAAC,4DAA4D,CAAC;KACzE,MAAM,CAAC,qBAAqB,EAAE,+DAA+D,EAAE,sBAAa,CAAC,eAAe,EAAE,CAAC;KAC/H,MAAM,CAAC,WAAW,EAAE,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U,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACrE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -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;AAWpC,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;AAWpC,eAAO,MAAM,UAAU,SAyYjB,CAAC"}
|