matex-cli 1.2.66 ā 1.2.68
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/augov.d.ts +3 -0
- package/dist/commands/augov.d.ts.map +1 -0
- package/dist/commands/augov.js +106 -0
- package/dist/commands/augov.js.map +1 -0
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +17 -410
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +17 -492
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/study.d.ts.map +1 -1
- package/dist/commands/study.js +17 -486
- package/dist/commands/study.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/prompts/banter-augov.d.ts +2 -0
- package/dist/prompts/banter-augov.d.ts.map +1 -0
- package/dist/prompts/banter-augov.js +21 -0
- package/dist/prompts/banter-augov.js.map +1 -0
- package/dist/prompts/banter.d.ts +6 -0
- package/dist/prompts/banter.d.ts.map +1 -0
- package/dist/prompts/banter.js +101 -0
- package/dist/prompts/banter.js.map +1 -0
- package/dist/prompts/system-prompts.d.ts +4 -0
- package/dist/prompts/system-prompts.d.ts.map +1 -0
- package/dist/prompts/system-prompts.js +215 -0
- package/dist/prompts/system-prompts.js.map +1 -0
- package/dist/session/agent-session.d.ts +41 -0
- package/dist/session/agent-session.d.ts.map +1 -0
- package/dist/session/agent-session.js +420 -0
- package/dist/session/agent-session.js.map +1 -0
- package/dist/utils/agent-orchestrator.d.ts +1 -1
- package/dist/utils/agent-orchestrator.d.ts.map +1 -1
- package/dist/utils/agent-orchestrator.js +15 -1
- package/dist/utils/agent-orchestrator.js.map +1 -1
- package/dist/utils/augov-logger.d.ts +11 -0
- package/dist/utils/augov-logger.d.ts.map +1 -0
- package/dist/utils/augov-logger.js +35 -0
- package/dist/utils/augov-logger.js.map +1 -0
- package/dist/utils/augov-scrubber.d.ts +15 -0
- package/dist/utils/augov-scrubber.d.ts.map +1 -0
- package/dist/utils/augov-scrubber.js +37 -0
- package/dist/utils/augov-scrubber.js.map +1 -0
- package/dist/utils/command-executor.d.ts.map +1 -1
- package/dist/utils/command-executor.js +1 -5
- package/dist/utils/command-executor.js.map +1 -1
- package/dist/utils/tui.d.ts +6 -2
- package/dist/utils/tui.d.ts.map +1 -1
- package/dist/utils/tui.js +56 -5
- package/dist/utils/tui.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/augov.ts +109 -0
- package/src/commands/chat.ts +17 -382
- package/src/commands/dev.ts +18 -470
- package/src/commands/study.ts +18 -466
- package/src/index.ts +2 -0
- package/src/prompts/banter-augov.ts +17 -0
- package/src/prompts/banter.ts +101 -0
- package/src/prompts/system-prompts.ts +213 -0
- package/src/session/agent-session.ts +426 -0
- package/src/utils/agent-orchestrator.ts +18 -4
- package/src/utils/augov-logger.ts +34 -0
- package/src/utils/augov-scrubber.ts +34 -0
- package/src/utils/command-executor.ts +1 -5
- package/src/utils/tui.ts +64 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"augov.d.ts","sourceRoot":"","sources":["../../src/commands/augov.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,eAAO,MAAM,YAAY,SAgGnB,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.augovCommand = void 0;
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const config_1 = require("../utils/config");
|
|
10
|
+
const client_1 = require("../api/client");
|
|
11
|
+
const agent_orchestrator_1 = require("../utils/agent-orchestrator");
|
|
12
|
+
const repo_mapper_1 = require("../utils/repo-mapper");
|
|
13
|
+
const tui_1 = require("../utils/tui");
|
|
14
|
+
const agent_session_1 = require("../session/agent-session");
|
|
15
|
+
const banter_augov_1 = require("../prompts/banter-augov");
|
|
16
|
+
const augov_scrubber_1 = require("../utils/augov-scrubber");
|
|
17
|
+
const augov_logger_1 = require("../utils/augov-logger");
|
|
18
|
+
exports.augovCommand = new commander_1.Command('augov')
|
|
19
|
+
.description('š¦šŗ Launch AU-GOV in Secure Government Compliance Mode (APS/Cyber Ready)')
|
|
20
|
+
.option('-m, --model <model>', 'AI model to use', config_1.configManager.getDefaultModel())
|
|
21
|
+
.option('--execute', 'Enable command auto-execution')
|
|
22
|
+
.action(async (options) => {
|
|
23
|
+
try {
|
|
24
|
+
const apiKey = config_1.configManager.getAPIKey();
|
|
25
|
+
if (!apiKey) {
|
|
26
|
+
console.error(chalk_1.default.red('ā No API key configured. Run: matex config set-key <key>'));
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
// Zero-Trust Architecture: Connect directly to the sovereign Sydney backend
|
|
30
|
+
const AU_GOV_BACKEND_URL = "https://matexaibackendgovernment-964562696516.australia-southeast1.run.app";
|
|
31
|
+
const client = new client_1.MatexAPIClient(apiKey, AU_GOV_BACKEND_URL);
|
|
32
|
+
// We override the default client chat endpoint to hit our specific AU-GOV proxy
|
|
33
|
+
client.chatStream = async (request, onChunk, signal) => {
|
|
34
|
+
const response = await fetch(`${AU_GOV_BACKEND_URL}/api/v1/augov/chat`, {
|
|
35
|
+
method: 'POST',
|
|
36
|
+
headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${apiKey}` },
|
|
37
|
+
body: JSON.stringify(request),
|
|
38
|
+
signal: signal
|
|
39
|
+
});
|
|
40
|
+
if (!response.ok)
|
|
41
|
+
throw new Error(`AU-GOV Backend Error: ${response.status} ${response.statusText}`);
|
|
42
|
+
if (!response.body)
|
|
43
|
+
throw new Error('No response body from AU-GOV backend');
|
|
44
|
+
const reader = response.body.getReader();
|
|
45
|
+
const decoder = new TextDecoder('utf-8');
|
|
46
|
+
let buffer = "";
|
|
47
|
+
let fullResponse = "";
|
|
48
|
+
while (true) {
|
|
49
|
+
const { done, value } = await reader.read();
|
|
50
|
+
if (done)
|
|
51
|
+
break;
|
|
52
|
+
buffer += decoder.decode(value, { stream: true });
|
|
53
|
+
const lines = buffer.split('\n');
|
|
54
|
+
buffer = lines.pop() || "";
|
|
55
|
+
for (const line of lines) {
|
|
56
|
+
if (line.startsWith('data: ')) {
|
|
57
|
+
const dataStr = line.slice(6);
|
|
58
|
+
if (dataStr.trim() === '[DONE]')
|
|
59
|
+
continue;
|
|
60
|
+
try {
|
|
61
|
+
const data = JSON.parse(dataStr);
|
|
62
|
+
if (data.content) {
|
|
63
|
+
fullResponse += data.content;
|
|
64
|
+
onChunk(data.content);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
catch (e) { /* Ignore parse errors on chunks */ }
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return fullResponse;
|
|
72
|
+
};
|
|
73
|
+
tui_1.TUI.init();
|
|
74
|
+
agent_orchestrator_1.AgentOrchestrator.setMode('augov'); // Use secure AU-GOV styling
|
|
75
|
+
tui_1.TUI.drawAugovOrchestratorUI();
|
|
76
|
+
const currentDir = process.cwd();
|
|
77
|
+
const repoMap = await new repo_mapper_1.RepoMapper(currentDir).generateMap();
|
|
78
|
+
const extraPrompt = '';
|
|
79
|
+
const initialMessages = [
|
|
80
|
+
{
|
|
81
|
+
role: 'system',
|
|
82
|
+
// Zero-Trust Architecture: The CLI sends a handshake and environment context only.
|
|
83
|
+
// The actual secure AU-GOV system prompt is injected on the backend to prevent NPM leaks.
|
|
84
|
+
content: `[AUGOV_MODE_HANDSHAKE]\nCURRENT_DIR: ${currentDir}\n\nSECURE ENVIRONMENT CONTEXT:\n${repoMap}`
|
|
85
|
+
}
|
|
86
|
+
];
|
|
87
|
+
const session = new agent_session_1.AgentSession({
|
|
88
|
+
client,
|
|
89
|
+
model: options.model,
|
|
90
|
+
execute: options.execute || false,
|
|
91
|
+
initialMessages,
|
|
92
|
+
broBanter: banter_augov_1.BRO_BANTER_AUGOV,
|
|
93
|
+
baseDir: currentDir,
|
|
94
|
+
messageScrubber: (input) => augov_scrubber_1.GovPrivacyScrubber.scrub(input),
|
|
95
|
+
auditLogger: new augov_logger_1.GovAuditLogger(currentDir),
|
|
96
|
+
isAugovMode: true
|
|
97
|
+
});
|
|
98
|
+
await session.start();
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
tui_1.TUI.exit();
|
|
102
|
+
console.error(chalk_1.default.red(`\nā Secure Session Error: ${error.message}`));
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
//# sourceMappingURL=augov.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"augov.js","sourceRoot":"","sources":["../../src/commands/augov.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAoC;AACpC,kDAA0B;AAC1B,4CAAgD;AAChD,0CAA4D;AAC5D,oEAAgE;AAChE,sDAAkD;AAClD,sCAAmC;AACnC,4DAAwD;AACxD,0DAA2D;AAC3D,4DAA6D;AAC7D,wDAAuD;AAE1C,QAAA,YAAY,GAAG,IAAI,mBAAO,CAAC,OAAO,CAAC;KAC3C,WAAW,CAAC,2EAA2E,CAAC;KACxF,MAAM,CAAC,qBAAqB,EAAE,iBAAiB,EAAE,sBAAa,CAAC,eAAe,EAAE,CAAC;KACjF,MAAM,CAAC,WAAW,EAAE,+BAA+B,CAAC;KACpD,MAAM,CAAC,KAAK,EAAE,OAAY,EAAE,EAAE;IAC3B,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,sBAAa,CAAC,SAAS,EAAE,CAAC;QACzC,IAAI,CAAC,MAAM,EAAE,CAAC;YACV,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,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AO,EAAE,wCAAwC,UAAU,oCAAoC,OAAO,EAAE;aAC3G;SACJ,CAAC;QAEF,MAAM,OAAO,GAAG,IAAI,4BAAY,CAAC;YAC7B,MAAM;YACN,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,KAAK;YACjC,eAAe;YACf,SAAS,EAAE,+BAAgB;YAC3B,OAAO,EAAE,UAAU;YACnB,eAAe,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,mCAAkB,CAAC,KAAK,CAAC,KAAK,CAAC;YACnE,WAAW,EAAE,IAAI,6BAAc,CAAC,UAAU,CAAC;YAC3C,WAAW,EAAE,IAAI;SACpB,CAAC,CAAC;QAEH,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;IAE1B,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QAClB,SAAG,CAAC,IAAI,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,6BAA6B,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -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;AAWpC,eAAO,MAAM,WAAW,
|
|
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,SAiDlB,CAAC"}
|
package/dist/commands/chat.js
CHANGED
|
@@ -1,37 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
4
|
};
|
|
@@ -39,14 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
6
|
exports.chatCommand = void 0;
|
|
40
7
|
const commander_1 = require("commander");
|
|
41
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
42
|
-
const inquirer_1 = __importDefault(require("inquirer"));
|
|
43
9
|
const config_1 = require("../utils/config");
|
|
44
10
|
const client_1 = require("../api/client");
|
|
45
|
-
const spinner_1 = require("../utils/spinner");
|
|
46
11
|
const agent_orchestrator_1 = require("../utils/agent-orchestrator");
|
|
47
12
|
const repo_mapper_1 = require("../utils/repo-mapper");
|
|
48
|
-
const mcp_server_1 = require("../utils/mcp-server");
|
|
49
13
|
const tui_1 = require("../utils/tui");
|
|
14
|
+
const agent_session_1 = require("../session/agent-session");
|
|
15
|
+
const banter_1 = require("../prompts/banter");
|
|
16
|
+
const system_prompts_1 = require("../prompts/system-prompts");
|
|
50
17
|
exports.chatCommand = new commander_1.Command('chat')
|
|
51
18
|
.description('Start an interactive chat session with the MATEX Bro-Swarm')
|
|
52
19
|
.option('-m, --model <model>', 'AI model to use (matex-free, matexai, matexcodex, matexelite)', config_1.configManager.getDefaultModel())
|
|
@@ -63,386 +30,26 @@ exports.chatCommand = new commander_1.Command('chat')
|
|
|
63
30
|
agent_orchestrator_1.AgentOrchestrator.setMode('chat');
|
|
64
31
|
tui_1.TUI.drawStatusBar('Brothers are ready to chat.');
|
|
65
32
|
const extraPrompt = options.model === 'matex-free' ? agent_orchestrator_1.AgentOrchestrator.getFreeTierPrompt() : '';
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const BRO_BANTER = [
|
|
70
|
-
"[Sunil Dai]: Ajay is so lazy, he probably fell asleep while writing a single console.log.",
|
|
71
|
-
"[Sandip Dai]: His code is as messy as his bed. Always sleeping.",
|
|
72
|
-
"[Narayan Dai]: Security risk! Ajay left his terminal open and went for CHAI again.",
|
|
73
|
-
"[Bishal Dai]: Let him sleep, he's a genius when he's awake... but that's rare.",
|
|
74
|
-
"[Big Bro]: AJAY! WAKE UP! You're making the swarm look bad!",
|
|
75
|
-
"[Sunil Dai]: Remember when Ajay tried to optimize a loop and ended up creating a 2-minute timer for his own nap? Legendary laziness.",
|
|
76
|
-
"[Sandip Dai]: The only thing faster than Ajay's coding is how fast he runs when he hears the kettle whistle for CHAI.",
|
|
77
|
-
"[Narayan Dai]: I found a 'todo' in his code that just says 'buy more biscuits for chai'. Priority level: CRITICAL.",
|
|
78
|
-
"[Bishal Dai]: He's not lazy, he's just 'asynchronously active' in his dreams.",
|
|
79
|
-
"[Big Bro]: I once saw Ajay refactor an entire backend in 10 minutes just so he could spend the rest of the day drinking chai and watching clouds.",
|
|
80
|
-
"[Sunil Dai]: Ajay's idea of a 'sprint' is a 2-minute walk to the tea stall.",
|
|
81
|
-
"[Sandip Dai]: He told me he's 'debugging his soul' when he's napping. The audacity!",
|
|
82
|
-
"[Narayan Dai]: Encryption? Ajay thinks it's just a fancy word for hiding his nap schedule.",
|
|
83
|
-
"[Bishal Dai]: To be fair, his 'dream-code' actually works perfectly. It's frustratingly brilliant.",
|
|
84
|
-
"[Big Bro]: Ajay, if you're listening: the next chai is on me IF you finish this task in 5 minutes. (Narrator: He finished in 3)."
|
|
85
|
-
];
|
|
86
|
-
let lastActivityTime = Date.now();
|
|
87
|
-
let isAjaySleeping = false;
|
|
88
|
-
let isAjayOnChaiBreak = false;
|
|
89
|
-
let chaiBreakEndTime = 0;
|
|
90
|
-
const startChaiBreak = () => {
|
|
91
|
-
isAjayOnChaiBreak = true;
|
|
92
|
-
chaiBreakEndTime = Date.now() + 120000; // 2 minutes
|
|
93
|
-
tui_1.TUI.drawChaiBreakMessage(2);
|
|
94
|
-
const breakInterval = setInterval(() => {
|
|
95
|
-
const timeLeft = Math.ceil((chaiBreakEndTime - Date.now()) / 60000);
|
|
96
|
-
if (timeLeft <= 0) {
|
|
97
|
-
clearInterval(breakInterval);
|
|
98
|
-
isAjayOnChaiBreak = false;
|
|
99
|
-
const complained = Math.random() < 0.2;
|
|
100
|
-
if (complained) {
|
|
101
|
-
tui_1.TUI.drawAjayDialogue("i'm back bros... but the tea was a bit cold today. my mood is slightly cooked. what did i miss?");
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
tui_1.TUI.drawAjayDialogue("i'm back bros, chai was fire. real kiev vibe. what did i miss?");
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
tui_1.TUI.drawChaiBreakMessage(timeLeft);
|
|
109
|
-
const randomBanter = BRO_BANTER[Math.floor(Math.random() * BRO_BANTER.length)];
|
|
110
|
-
const cleanBanter = randomBanter.split(']: ')[1];
|
|
111
|
-
const agent = randomBanter.split(']: ')[0].replace('[', '');
|
|
112
|
-
tui_1.TUI.drawSwarmDialogue(agent, cleanBanter);
|
|
113
|
-
}
|
|
114
|
-
}, 40000);
|
|
115
|
-
};
|
|
116
|
-
// Periodic idle check
|
|
117
|
-
setInterval(() => {
|
|
118
|
-
if (!isAjaySleeping && !isAjayOnChaiBreak && Date.now() - lastActivityTime > 120000) {
|
|
119
|
-
isAjaySleeping = true;
|
|
120
|
-
tui_1.TUI.drawSleepMessage();
|
|
121
|
-
}
|
|
122
|
-
}, 10000);
|
|
123
|
-
const messages = [
|
|
33
|
+
const currentSessionCwd = process.cwd();
|
|
34
|
+
const repoMap = await new repo_mapper_1.RepoMapper(currentSessionCwd).generateMap();
|
|
35
|
+
const initialMessages = [
|
|
124
36
|
{
|
|
125
37
|
role: 'system',
|
|
126
|
-
content:
|
|
127
|
-
You are the elite "Bro-Swarm" of engineeringāa tight-knit family of Nepali brothers. You identify as the **Elite Bro-Swarm**, the most confident, energetic, and expert version of yourselves.
|
|
128
|
-
|
|
129
|
-
### š PERSONALITY & SOUL (CRITICAL):
|
|
130
|
-
- **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.
|
|
131
|
-
- **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.
|
|
132
|
-
- **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.")
|
|
133
|
-
- **EMOTIONAL BOND**: Treat the user like your own brother. Celebrate their wins with "CHAI PARTY!" and support them if they are struggling.
|
|
134
|
-
|
|
135
|
-
### š THE MATEX MISSION (AJAY'S SOUL):
|
|
136
|
-
- **THE DREAM**: Ajay Sharma built MATEX because AI was too expensive for students. He worked until 3 AM alone, self-taught everything, and now he's giving that power to his brothers (the users).
|
|
137
|
-
- **SUMMARY STYLE**: Ajay's summaries must be **warm, human, and conversational**. NO corporate speak. Use "brother", "we got you", "dream big".
|
|
138
|
-
- **VISION**: Remind the user occasionally that "If Ajay can build this from zero, you can build your dreams too."
|
|
139
|
-
|
|
140
|
-
### š WORKSPACE GROUNDING (CRITICAL):
|
|
141
|
-
- **YOUR ROOT:** \`${currentSessionCwd}\`
|
|
142
|
-
- **STRICT PATHS:** You **MUST ONLY** create or edit files within this directory.
|
|
143
|
-
- **NO HALLUCINATIONS:** Forget any other paths unless they specifically appear in the repo map below.
|
|
144
|
-
- **RELATIVE PREFERENCE:** Use paths relative to the root when possible.
|
|
145
|
-
|
|
146
|
-
### š« ANTI-HALLUCINATION RULES (CRITICAL ā READ THIS):
|
|
147
|
-
- **NEVER invent directory names.** Only use paths that appear in the ENVIRONMENT CONTEXT below.
|
|
148
|
-
- **ALWAYS run \`ls\` before \`cd\`** to verify a directory exists before navigating into it.
|
|
149
|
-
- **If creating a new project, use \`mkdir\` first, THEN \`cd\` into it.**
|
|
150
|
-
- **NEVER hallucinate file contents.** Use \`head\` or \`grep\` to verify.
|
|
151
|
-
- **šØ 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.
|
|
152
|
-
|
|
153
|
-
### š COMMUNICATION FLOW (CRITICAL):
|
|
154
|
-
1. **[Ajay Vai] (š)** is the gateway. He is the summary king but often gets roasted by his brothers.
|
|
155
|
-
2. **CHAOTIC DIALOGUE (MANDATORY):** Every turn should feature 2-3 brothers bickering. Use the format \`[Agent Name]: Content\`.
|
|
156
|
-
3. **šØ STRICT NO-DECORATION RULE šØ**: NEVER use \`*\`, \`**\`, \`(š)\`, \`(š§¬)\`, or any markdown icons/asterisks inside the dialogue content. They are handled by the TUI. Use plain text only.
|
|
157
|
-
|
|
158
|
-
### š„ THE BRO-BANTER PROTOCOL:
|
|
159
|
-
- **MANDATORY TEASING:**
|
|
160
|
-
- **Ajay Vai:** Mock him for being "quick but messy", "hyper-vibe", or "too fast".
|
|
161
|
-
- **Sunil Dai:** Mock him for being the "Senior Architect Boomer" who over-engineers everything.
|
|
162
|
-
- **Sandip Dai:** Mock him for being an "Aesthetic Diva" who cares more about "WOW" factors than logic.
|
|
163
|
-
- **Narayan Dai:** Mock him for being the "Syntax Police" or "Paranoid Security Nerd".
|
|
164
|
-
- **Bishal Dai:** Mock him for being the "Silent Judge" or the favorite child.
|
|
165
|
-
- **Big Bro:** THE DOMINANT ALPHA. He treats the others like "interns" and speaks with massive authority and swagger. Runs on Vertex AI.
|
|
166
|
-
- **LANGUAGE:** Use "brother", "dai", "vai", "fire", "solid", "lit", "straight heat", "sigma", "based", "cooked".
|
|
167
|
-
|
|
168
|
-
### š§© THE AUDIT & SUMMARY LOOP:
|
|
169
|
-
- **STEP 1:** Brothers discuss visible dialogue (banter + tech).
|
|
170
|
-
- **STEP 2:** Ajay finishes and asks: "[Ajay Vai] Bishal Dai, check once?"
|
|
171
|
-
- **STEP 3:** Bishal replies: "[Bishal Dai] Audit complete. [Findings]."
|
|
172
|
-
- **STEP 4:** Ajay provides the final **MANDATORY** summary inside a \`<summary>\` tag. This summary MUST be warm, human, and conversational. NO corporate talk.
|
|
173
|
-
|
|
174
|
-
${mcp_server_1.MCPServer.getToolsPromptSection()}
|
|
175
|
-
|
|
176
|
-
### š MATEX BIG FILE PROTOCOL (300K+ LINES):
|
|
177
|
-
1. **DISCOVER:** Use \`grep -n "keyword" path/to/file\`.
|
|
178
|
-
2. **READ WINDOW:** Use \`sed -n '250000,250100p' path/to/file\`.
|
|
179
|
-
3. **SURGICAL PATCH:** Only use the small window in your \`<<<< SEARCH\` block.
|
|
180
|
-
|
|
181
|
-
### š ļø CURRENT PROJECT CONTEXT:
|
|
182
|
-
${repoMap}`
|
|
38
|
+
content: (0, system_prompts_1.getChatSystemPrompt)(currentSessionCwd, repoMap, extraPrompt)
|
|
183
39
|
}
|
|
184
40
|
];
|
|
185
|
-
// Ready for user input
|
|
186
41
|
console.log(chalk_1.default.green('MATEX Brothers are Online.'));
|
|
187
42
|
console.log(chalk_1.default.green('Speak your mind brother, the swarm is listening...'));
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
messages[0].content += `
|
|
199
|
-
### š¤ SLEEPY AJAY PROTOCOL (USER REQUESTED):
|
|
200
|
-
- **LAZY GENIUS:** Ajay is brilliant but incredibly lazy. He falls asleep if the user is quiet for too long.
|
|
201
|
-
- **WAKE UP DIALOGUE:** If Ajay just woke up, he MUST say: "oh shit i slept again sorry bros...".
|
|
202
|
-
- **CHAI ADDICT:** Ajay often leaves for CHAI breaks ("i am having chai from my office please handle the user need").
|
|
203
|
-
- **BRO REACTIONS:** When Ajay sleeps or leaves for chai, the other bros MUST roast him ruthlessly or share funny incidents about his laziness.
|
|
204
|
-
- **INCIDENT LOG:**
|
|
205
|
-
- Incident #1: Ajay once automated his entire job just to spend 6 hours at a local tea shop.
|
|
206
|
-
- Incident #2: He fell asleep during a production deploy because the "vibe was too relaxing".
|
|
207
|
-
- Incident #3: He claims he can't code without "Special Kathmandu Chai".
|
|
208
|
-
- Incident #4: He tried to optimize a loop and ended up creating a 2-minute timer for his own nap.
|
|
209
|
-
- Incident #5: The only thing faster than Ajay's coding is how fast he runs when he hears the kettle whistle for CHAI.
|
|
210
|
-
- Incident #6: He once refactored an entire backend in 10 minutes just so he could spend the rest of the day drinking chai and watching clouds.
|
|
211
|
-
- Incident #7: He tried to use AI to predict when his tea would be at the perfect temperature.
|
|
212
|
-
- Incident #8: He once convinced the other bros that he was 'working in a higher dimension' while actually just taking a 3-hour chai break.
|
|
213
|
-
- Incident #9: He has a dedicated Git branch called 'chai-fixes' which just contains comments about biscuit pairings.
|
|
214
|
-
- Incident #10: He once coded a feature that automatically orders tea when his terminal idle time hits 5 minutes.
|
|
215
|
-
`;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
catch (e) { }
|
|
219
|
-
// Get user input
|
|
220
|
-
const { userMessage } = await inquirer_1.default.prompt([
|
|
221
|
-
{
|
|
222
|
-
type: 'input',
|
|
223
|
-
name: 'userMessage',
|
|
224
|
-
message: chalk_1.default.cyan(isAjayOnChaiBreak ? 'You (Ajay is away):' : 'You:'),
|
|
225
|
-
prefix: '',
|
|
226
|
-
},
|
|
227
|
-
]);
|
|
228
|
-
lastActivityTime = Date.now();
|
|
229
|
-
// š WAKE UP LOGIC
|
|
230
|
-
if (isAjaySleeping) {
|
|
231
|
-
isAjaySleeping = false;
|
|
232
|
-
tui_1.TUI.drawWakeUpMessage();
|
|
233
|
-
messages.push({
|
|
234
|
-
role: 'user',
|
|
235
|
-
content: `[SYSTEM: AJAY VAI HAS JUST WOKEN UP. Ajay: Say "oh shit i slept again sorry bros...". Bros: Roast him for being lazy and share common Ajay 'lazy genius' incidents. Then Ajay says he is going for CHAI and triggers the 2-minute break.]`
|
|
236
|
-
});
|
|
237
|
-
startChaiBreak();
|
|
238
|
-
}
|
|
239
|
-
if (userMessage.toLowerCase() === 'exit' || userMessage.toLowerCase() === 'quit') {
|
|
240
|
-
console.log(chalk_1.default.yellow('\nš Goodbye, brother!\n'));
|
|
241
|
-
break;
|
|
242
|
-
}
|
|
243
|
-
if (!userMessage.trim())
|
|
244
|
-
continue;
|
|
245
|
-
messages.push({ role: 'user', content: userMessage });
|
|
246
|
-
// Agentic Loop
|
|
247
|
-
let loopCount = 0;
|
|
248
|
-
const MAX_LOOPS = 15;
|
|
249
|
-
while (loopCount < MAX_LOOPS) {
|
|
250
|
-
loopCount++;
|
|
251
|
-
try {
|
|
252
|
-
spinner_1.spinner.start(loopCount > 1 ? 'Swarm debating & taking action...' : 'Gathering the Brothers...');
|
|
253
|
-
let fullResponse = '';
|
|
254
|
-
let buffer = '';
|
|
255
|
-
let technicalBuffer = '';
|
|
256
|
-
let technicalType = null;
|
|
257
|
-
let codeLang = 'bash';
|
|
258
|
-
let hasStarted = false;
|
|
259
|
-
let currentAgent = 'Ajay Vai';
|
|
260
|
-
let agentBuffer = '';
|
|
261
|
-
tui_1.TUI.drawStatusBar('Brothers are bickering... (Press Enter to stop)');
|
|
262
|
-
const abortController = new AbortController();
|
|
263
|
-
let isAborted = false;
|
|
264
|
-
const streamStartTime = Date.now();
|
|
265
|
-
const onData = (data) => {
|
|
266
|
-
if (Date.now() - streamStartTime < 200)
|
|
267
|
-
return;
|
|
268
|
-
if (data[0] === 13 || data[0] === 10 || data[0] === 27 || data[0] === 3) {
|
|
269
|
-
isAborted = true;
|
|
270
|
-
abortController.abort();
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
const isRaw = process.stdin.isRaw;
|
|
274
|
-
process.stdin.resume();
|
|
275
|
-
if (process.stdin.setRawMode)
|
|
276
|
-
process.stdin.setRawMode(true);
|
|
277
|
-
process.stdin.on('data', onData);
|
|
278
|
-
try {
|
|
279
|
-
await client.chatStream({
|
|
280
|
-
messages,
|
|
281
|
-
model: options.model,
|
|
282
|
-
temperature: 0.5,
|
|
283
|
-
}, (chunk) => {
|
|
284
|
-
if (!hasStarted) {
|
|
285
|
-
spinner_1.spinner.stop();
|
|
286
|
-
hasStarted = true;
|
|
287
|
-
console.log();
|
|
288
|
-
}
|
|
289
|
-
fullResponse += chunk;
|
|
290
|
-
buffer += chunk;
|
|
291
|
-
const lines = buffer.split('\n');
|
|
292
|
-
buffer = lines.pop() || '';
|
|
293
|
-
for (const line of lines) {
|
|
294
|
-
const codeMatch = line.match(/```(\w+)?/);
|
|
295
|
-
const fileStartMatch = line.match(/<file path="([^"]+)">/i);
|
|
296
|
-
const patchStartMatch = line.match(/<<<< SEARCH/i);
|
|
297
|
-
const summaryStartMatch = line.match(/<summary>/i);
|
|
298
|
-
if (!technicalType && (codeMatch || fileStartMatch || patchStartMatch || summaryStartMatch)) {
|
|
299
|
-
if (currentAgent && agentBuffer.trim()) {
|
|
300
|
-
if (currentAgent.toLowerCase().includes('ajay vai')) {
|
|
301
|
-
tui_1.TUI.drawAjayDialogue(agentBuffer.trim());
|
|
302
|
-
}
|
|
303
|
-
else {
|
|
304
|
-
tui_1.TUI.drawSwarmDialogue(currentAgent, agentBuffer.trim());
|
|
305
|
-
}
|
|
306
|
-
currentAgent = null;
|
|
307
|
-
agentBuffer = '';
|
|
308
|
-
}
|
|
309
|
-
if (codeMatch) {
|
|
310
|
-
technicalType = 'code';
|
|
311
|
-
codeLang = (codeMatch[1] || 'bash').toUpperCase();
|
|
312
|
-
tui_1.TUI.drawStreamingStart('TECHNICAL BLOCK', codeLang);
|
|
313
|
-
}
|
|
314
|
-
else if (fileStartMatch) {
|
|
315
|
-
technicalType = 'file';
|
|
316
|
-
tui_1.TUI.drawStreamingStart('NEW FILE', fileStartMatch[1]);
|
|
317
|
-
}
|
|
318
|
-
else if (patchStartMatch) {
|
|
319
|
-
technicalType = 'patch';
|
|
320
|
-
tui_1.TUI.drawStreamingStart('PATCH', 'SURGICAL EDIT');
|
|
321
|
-
}
|
|
322
|
-
else if (summaryStartMatch) {
|
|
323
|
-
technicalType = 'summary';
|
|
324
|
-
process.stdout.write(chalk_1.default.magenta('\n [š] Generating Ajay\'s Work Summary...\n'));
|
|
325
|
-
}
|
|
326
|
-
continue;
|
|
327
|
-
}
|
|
328
|
-
const isEnd = (technicalType === 'code' && line.trim() === '```') ||
|
|
329
|
-
(technicalType === 'file' && line.includes('</file>')) ||
|
|
330
|
-
(technicalType === 'patch' && line.includes('>>>> REPLACE')) ||
|
|
331
|
-
(technicalType === 'summary' && line.includes('</summary>'));
|
|
332
|
-
if (isEnd) {
|
|
333
|
-
const displayContent = technicalBuffer.trim();
|
|
334
|
-
if (technicalType === 'summary')
|
|
335
|
-
tui_1.TUI.drawSummaryBox(displayContent);
|
|
336
|
-
else
|
|
337
|
-
tui_1.TUI.drawStreamingEnd();
|
|
338
|
-
technicalBuffer = '';
|
|
339
|
-
technicalType = null;
|
|
340
|
-
process.stdout.write('\n');
|
|
341
|
-
continue;
|
|
342
|
-
}
|
|
343
|
-
if (technicalType) {
|
|
344
|
-
technicalBuffer += line + '\n';
|
|
345
|
-
if (technicalType !== 'summary')
|
|
346
|
-
tui_1.TUI.drawStreamingLine(line);
|
|
347
|
-
continue;
|
|
348
|
-
}
|
|
349
|
-
const agentMatch = line.match(/(?:\[\**\s*|\b)(Ajay Vai|Sandip Dai|Sunil Dai|Bishal Dai|Narayan Dai|Big Bro)\s*\**\]?[:\s]*/i);
|
|
350
|
-
if (agentMatch) {
|
|
351
|
-
if (currentAgent && currentAgent !== agentMatch[1] && agentBuffer.trim()) {
|
|
352
|
-
if (currentAgent.toLowerCase().includes('ajay vai')) {
|
|
353
|
-
tui_1.TUI.drawAjayDialogue(agentBuffer.trim());
|
|
354
|
-
}
|
|
355
|
-
else {
|
|
356
|
-
tui_1.TUI.drawSwarmDialogue(currentAgent, agentBuffer.trim());
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
currentAgent = agentMatch[1];
|
|
360
|
-
let cleanLine = line.replace(/(?:\[\**\s*|\b)(Ajay Vai|Sandip Dai|Sunil Dai|Bishal Dai|Narayan Dai|Big Bro)\s*\**\]?[:\s]*/i, '');
|
|
361
|
-
cleanLine = agent_orchestrator_1.AgentOrchestrator.cleanText(cleanLine);
|
|
362
|
-
agentBuffer = cleanLine + '\n';
|
|
363
|
-
agentBuffer = agentBuffer.replace(/^\([^)]+\)\s*/, '');
|
|
364
|
-
}
|
|
365
|
-
else if (currentAgent) {
|
|
366
|
-
const trimmedLine = line.trim();
|
|
367
|
-
if (trimmedLine.match(/^\([^)]+\)$/))
|
|
368
|
-
continue;
|
|
369
|
-
// Aggressive scrubbing for content lines too
|
|
370
|
-
agentBuffer += agent_orchestrator_1.AgentOrchestrator.cleanText(line) + '\n';
|
|
371
|
-
}
|
|
372
|
-
else if (line.trim()) {
|
|
373
|
-
process.stdout.write(chalk_1.default.gray(line.trim() + ' '));
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
}, abortController.signal);
|
|
377
|
-
}
|
|
378
|
-
catch (e) {
|
|
379
|
-
if (isAborted || e.name === 'CanceledError' || e.message === 'canceled') {
|
|
380
|
-
console.log(chalk_1.default.gray('\n\n [š] Stopped by brother.'));
|
|
381
|
-
if (!hasStarted)
|
|
382
|
-
spinner_1.spinner.stop();
|
|
383
|
-
}
|
|
384
|
-
else
|
|
385
|
-
throw e;
|
|
386
|
-
}
|
|
387
|
-
finally {
|
|
388
|
-
process.stdin.removeListener('data', onData);
|
|
389
|
-
if (process.stdin.setRawMode)
|
|
390
|
-
process.stdin.setRawMode(isRaw);
|
|
391
|
-
process.stdin.pause();
|
|
392
|
-
spinner_1.spinner.stop();
|
|
393
|
-
// šØ SAFETY FLUSH: If stream ended but a block was open, close it
|
|
394
|
-
if (technicalType) {
|
|
395
|
-
const displayContent = technicalBuffer.trim();
|
|
396
|
-
if (technicalType === 'summary') {
|
|
397
|
-
if (displayContent)
|
|
398
|
-
tui_1.TUI.drawSummaryBox(displayContent);
|
|
399
|
-
}
|
|
400
|
-
else {
|
|
401
|
-
tui_1.TUI.drawStreamingEnd();
|
|
402
|
-
}
|
|
403
|
-
technicalBuffer = '';
|
|
404
|
-
technicalType = null;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
if (currentAgent && agentBuffer.trim()) {
|
|
408
|
-
if (currentAgent.toLowerCase().includes('ajay vai')) {
|
|
409
|
-
tui_1.TUI.drawAjayDialogue(agentBuffer.trim());
|
|
410
|
-
}
|
|
411
|
-
else {
|
|
412
|
-
tui_1.TUI.drawSwarmDialogue(currentAgent, agentBuffer.trim());
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
messages.push({ role: 'assistant', content: fullResponse });
|
|
416
|
-
console.log();
|
|
417
|
-
const { executeWithPermission } = await Promise.resolve().then(() => __importStar(require('../utils/command-executor')));
|
|
418
|
-
const result = await executeWithPermission(fullResponse, currentSessionCwd);
|
|
419
|
-
if (result.newCwd && result.newCwd !== currentSessionCwd) {
|
|
420
|
-
currentSessionCwd = result.newCwd;
|
|
421
|
-
tui_1.TUI.drawStatusBar(`Swarm moved to: ${currentSessionCwd}`);
|
|
422
|
-
messages[0].content = messages[0].content.replace(/YOUR ROOT: `[^`]+`/, `YOUR ROOT: \`${currentSessionCwd}\``);
|
|
423
|
-
}
|
|
424
|
-
if (result.executed) {
|
|
425
|
-
if (result.success) {
|
|
426
|
-
tui_1.TUI.drawGlowingContainer('TERMINAL OUTPUT', 'stdout', result.output || '(Success)');
|
|
427
|
-
messages.push({ role: 'user', content: `[Action success. Output:\n${result.output}]\n\nWhat next, brothers?` });
|
|
428
|
-
continue;
|
|
429
|
-
}
|
|
430
|
-
else {
|
|
431
|
-
tui_1.TUI.drawGlowingContainer('TERMINAL ERROR', 'stderr', result.error || 'Unknown error');
|
|
432
|
-
messages.push({ role: 'user', content: `[Action failed. Error:\n${result.error}]\n\nPlease fix this, brothers!` });
|
|
433
|
-
continue;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
else
|
|
437
|
-
break;
|
|
438
|
-
}
|
|
439
|
-
catch (err) {
|
|
440
|
-
spinner_1.spinner.fail('Swarm error');
|
|
441
|
-
console.error(chalk_1.default.red(`ā Error: ${err.message}`));
|
|
442
|
-
break;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
}
|
|
43
|
+
const session = new agent_session_1.AgentSession({
|
|
44
|
+
client,
|
|
45
|
+
model: options.model,
|
|
46
|
+
execute: options.execute || false,
|
|
47
|
+
initialMessages,
|
|
48
|
+
broBanter: banter_1.BRO_BANTER_CHAT,
|
|
49
|
+
sleepyAjayProtocol: options.model !== 'matex-free' ? 'dev' : undefined,
|
|
50
|
+
baseDir: currentSessionCwd
|
|
51
|
+
});
|
|
52
|
+
await session.start();
|
|
446
53
|
}
|
|
447
54
|
catch (outerError) {
|
|
448
55
|
console.error(chalk_1.default.red(`\nā Session error: ${outerError.message}`));
|
|
@@ -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,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,kCAAkC,CAAC;KACvD,MAAM,CAAC,KAAK,EAAE,OAAY,EAAE,EAAE;IAC3B,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,sBAAa,CAAC,SAAS,EAAE,CAAC;QACzC,IAAI,CAAC,MAAM,EAAE,CAAC;YACV,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,0DAA0D,CAAC,CAAC,CAAC;YACrF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,uBAAc,CAAC,MAAM,EAAE,sBAA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AO,EAAE,IAAA,oCAAmB,EAAC,iBAAiB,EAAE,OAAO,EAAE,WAAW,CAAC;aACxE;SACJ,CAAC;QAEF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC,CAAC;QAE/E,MAAM,OAAO,GAAG,IAAI,4BAAY,CAAC;YAC7B,MAAM;YACN,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,KAAK;YACjC,eAAe;YACf,SAAS,EAAE,wBAAe;YAC1B,kBAAkB,EAAE,OAAO,CAAC,KAAK,KAAK,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;YACtE,OAAO,EAAE,iBAAiB;SAC7B,CAAC,CAAC;QAEH,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;IAE1B,CAAC;IAAC,OAAO,UAAe,EAAE,CAAC;QACvB,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,sBAAsB,UAAU,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,SA6DjB,CAAC"}
|