@bonginkan/maria 4.2.28 → 4.2.30
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/README.md +5 -5
- package/dist/READY.manifest.json +1 -1
- package/dist/bin/maria.cjs +638 -635
- package/dist/bin/maria.cjs.map +1 -1
- package/dist/cli.cjs +631 -628
- package/dist/cli.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/server/express-server.cjs +2 -2
- package/dist/server/express-server.cjs.map +1 -1
- package/package.json +2 -2
- package/src/slash-commands/READY.manifest.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var fs2 = require('fs');
|
|
5
5
|
var path8 = require('path');
|
|
6
6
|
var dotenv = require('dotenv');
|
|
7
|
-
var
|
|
7
|
+
var chalk28 = require('chalk');
|
|
8
8
|
var crypto3 = require('crypto');
|
|
9
9
|
var http2 = require('http');
|
|
10
10
|
var url2 = require('url');
|
|
@@ -51,7 +51,7 @@ function _interopNamespace(e) {
|
|
|
51
51
|
var fs2__namespace = /*#__PURE__*/_interopNamespace(fs2);
|
|
52
52
|
var path8__namespace = /*#__PURE__*/_interopNamespace(path8);
|
|
53
53
|
var dotenv__namespace = /*#__PURE__*/_interopNamespace(dotenv);
|
|
54
|
-
var
|
|
54
|
+
var chalk28__default = /*#__PURE__*/_interopDefault(chalk28);
|
|
55
55
|
var crypto3__namespace = /*#__PURE__*/_interopNamespace(crypto3);
|
|
56
56
|
var http2__namespace = /*#__PURE__*/_interopNamespace(http2);
|
|
57
57
|
var url2__namespace = /*#__PURE__*/_interopNamespace(url2);
|
|
@@ -252,7 +252,7 @@ var init_animations = __esm({
|
|
|
252
252
|
start() {
|
|
253
253
|
this.interval = setInterval(() => {
|
|
254
254
|
process.stdout.write(
|
|
255
|
-
`\r${
|
|
255
|
+
`\r${chalk28__default.default.cyan(this.frames[this.currentFrame])} ${chalk28__default.default.gray(this.message)}...`
|
|
256
256
|
);
|
|
257
257
|
this.currentFrame = (this.currentFrame + 1) % this.frames.length;
|
|
258
258
|
}, 80);
|
|
@@ -290,7 +290,7 @@ var init_animations = __esm({
|
|
|
290
290
|
const elapsed = Math.floor((Date.now() - this.startTime) / 1e3);
|
|
291
291
|
const stage = this.stages[this.currentStage];
|
|
292
292
|
process.stdout.write(
|
|
293
|
-
`\r${
|
|
293
|
+
`\r${chalk28__default.default.cyan(this.spinnerFrames[this.currentFrame])} ${stage.icon} ${chalk28__default.default.gray(stage.message)}... ${chalk28__default.default.dim(`[${elapsed}s]`)}`
|
|
294
294
|
);
|
|
295
295
|
this.currentFrame = (this.currentFrame + 1) % this.spinnerFrames.length;
|
|
296
296
|
}, 80);
|
|
@@ -352,11 +352,11 @@ var init_animations = __esm({
|
|
|
352
352
|
const stage = stages[this.currentStage];
|
|
353
353
|
if (this.isComplex) {
|
|
354
354
|
process.stdout.write(
|
|
355
|
-
`\r${
|
|
355
|
+
`\r${chalk28__default.default.cyan(this.spinnerFrames[this.currentFrame])} ${stage} ${chalk28__default.default.dim(`[${elapsed}s]`)}`
|
|
356
356
|
);
|
|
357
357
|
} else {
|
|
358
358
|
process.stdout.write(
|
|
359
|
-
`\r${
|
|
359
|
+
`\r${chalk28__default.default.cyan(this.spinnerFrames[this.currentFrame])} ${chalk28__default.default.gray(stage)}...`
|
|
360
360
|
);
|
|
361
361
|
}
|
|
362
362
|
this.currentFrame = (this.currentFrame + 1) % this.spinnerFrames.length;
|
|
@@ -399,7 +399,7 @@ var init_animations = __esm({
|
|
|
399
399
|
start() {
|
|
400
400
|
this.interval = setInterval(() => {
|
|
401
401
|
process.stdout.write(
|
|
402
|
-
`\r${
|
|
402
|
+
`\r${chalk28__default.default.cyan(this.message)}${this.dots[this.currentDot]}`
|
|
403
403
|
);
|
|
404
404
|
this.currentDot = (this.currentDot + 1) % this.dots.length;
|
|
405
405
|
}, 300);
|
|
@@ -428,7 +428,7 @@ var init_animations = __esm({
|
|
|
428
428
|
const frame = this.frames[this.currentFrame];
|
|
429
429
|
const message = this.messages[this.currentFrame];
|
|
430
430
|
process.stdout.write(
|
|
431
|
-
`\r${frame} ${
|
|
431
|
+
`\r${frame} ${chalk28__default.default.cyan(message)}...`
|
|
432
432
|
);
|
|
433
433
|
this.currentFrame = (this.currentFrame + 1) % this.frames.length;
|
|
434
434
|
}, 1e3);
|
|
@@ -456,7 +456,7 @@ var init_animations = __esm({
|
|
|
456
456
|
const percentage = Math.floor(this.current / this.total * 100);
|
|
457
457
|
const filled = Math.floor(this.current / this.total * this.width);
|
|
458
458
|
const empty = this.width - filled;
|
|
459
|
-
const bar =
|
|
459
|
+
const bar = chalk28__default.default.green("\u2588").repeat(filled) + chalk28__default.default.gray("\u2591").repeat(empty);
|
|
460
460
|
process.stdout.write(`\r${this.label}: [${bar}] ${percentage}%`);
|
|
461
461
|
if (this.current >= this.total) {
|
|
462
462
|
process.stdout.write("\n");
|
|
@@ -1893,7 +1893,7 @@ var init_AuthenticationManager = __esm({
|
|
|
1893
1893
|
const response2 = await fetch(`${this.apiBase}/api/user/profile`, {
|
|
1894
1894
|
headers: {
|
|
1895
1895
|
"Authorization": `Bearer ${tokens.accessToken}`,
|
|
1896
|
-
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.2.
|
|
1896
|
+
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.2.30"}`
|
|
1897
1897
|
}
|
|
1898
1898
|
});
|
|
1899
1899
|
if (response2.status === 401) {
|
|
@@ -2436,7 +2436,7 @@ function withAuth(fn) {
|
|
|
2436
2436
|
try {
|
|
2437
2437
|
const tokens = await authManager.getValidTokens();
|
|
2438
2438
|
if (!tokens) {
|
|
2439
|
-
console.log(
|
|
2439
|
+
console.log(chalk28__default.default.red("\u{1F510} Authentication required \xB7 Run: maria /login"));
|
|
2440
2440
|
if (!testMode) process.exit(AUTH_EXIT_CODES.AUTH_REQUIRED);
|
|
2441
2441
|
return { success: false, message: "AUTH_REQUIRED" };
|
|
2442
2442
|
}
|
|
@@ -2446,33 +2446,33 @@ function withAuth(fn) {
|
|
|
2446
2446
|
return await fn(...args2);
|
|
2447
2447
|
} catch (error2) {
|
|
2448
2448
|
if (error2.code === "AUTH_REQUIRED") {
|
|
2449
|
-
console.log(
|
|
2449
|
+
console.log(chalk28__default.default.red("\u{1F510} Authentication required \xB7 Run: maria /login"));
|
|
2450
2450
|
if (!testMode) process.exit(AUTH_EXIT_CODES.AUTH_REQUIRED);
|
|
2451
2451
|
return { success: false, message: "AUTH_REQUIRED" };
|
|
2452
2452
|
}
|
|
2453
2453
|
if (error2.code === "REAUTH_REQUIRED" || error2.code === "TOKEN_EXPIRED") {
|
|
2454
|
-
console.log(
|
|
2454
|
+
console.log(chalk28__default.default.yellow("\u{1F504} Please re-authenticate \xB7 Run: maria /login"));
|
|
2455
2455
|
if (!testMode) process.exit(AUTH_EXIT_CODES.REAUTH_REQUIRED);
|
|
2456
2456
|
return { success: false, message: "REAUTH_REQUIRED" };
|
|
2457
2457
|
}
|
|
2458
2458
|
if (error2.code === "QUOTA_EXCEEDED") {
|
|
2459
|
-
console.log(
|
|
2459
|
+
console.log(chalk28__default.default.yellow("\u26A0 Quota exceeded \xB7 Run: maria /billing"));
|
|
2460
2460
|
if (!testMode) process.exit(AUTH_EXIT_CODES.QUOTA_EXCEEDED);
|
|
2461
2461
|
return { success: false, message: "QUOTA_EXCEEDED" };
|
|
2462
2462
|
}
|
|
2463
2463
|
if (error2.code === "PLAN_RESTRICTED") {
|
|
2464
|
-
console.log(
|
|
2464
|
+
console.log(chalk28__default.default.yellow("\u{1F512} Not available in current plan"));
|
|
2465
2465
|
if (!testMode) process.exit(AUTH_EXIT_CODES.PLAN_RESTRICTED);
|
|
2466
2466
|
return { success: false, message: "PLAN_RESTRICTED" };
|
|
2467
2467
|
}
|
|
2468
2468
|
if (error2.code === "RATE_LIMITED") {
|
|
2469
2469
|
const retryAfter = error2.retryAfter || 5;
|
|
2470
|
-
console.log(
|
|
2470
|
+
console.log(chalk28__default.default.yellow(`\u23F1\uFE0F Rate limit: wait ${retryAfter}s`));
|
|
2471
2471
|
if (!testMode) process.exit(AUTH_EXIT_CODES.RATE_LIMITED);
|
|
2472
2472
|
return { success: false, message: "RATE_LIMITED" };
|
|
2473
2473
|
}
|
|
2474
2474
|
if (error2.code === "NETWORK_ERROR") {
|
|
2475
|
-
console.log(
|
|
2475
|
+
console.log(chalk28__default.default.red("\u{1F310} Network error, check connection"));
|
|
2476
2476
|
if (!testMode) process.exit(AUTH_EXIT_CODES.NETWORK_ERROR);
|
|
2477
2477
|
return { success: false, message: "NETWORK_ERROR" };
|
|
2478
2478
|
}
|
|
@@ -3814,7 +3814,7 @@ var DEFAULT_PROVIDER2, DEFAULT_MODEL2;
|
|
|
3814
3814
|
var init_config = __esm({
|
|
3815
3815
|
"src/providers/config.ts"() {
|
|
3816
3816
|
DEFAULT_PROVIDER2 = process.env.DEFAULT_PROVIDER || "openai";
|
|
3817
|
-
DEFAULT_MODEL2 = process.env.
|
|
3817
|
+
DEFAULT_MODEL2 = process.env.OPENAI_MODEL || process.env.MARIA_DEFAULT_MODEL || "gpt-5-mini";
|
|
3818
3818
|
}
|
|
3819
3819
|
});
|
|
3820
3820
|
|
|
@@ -11064,8 +11064,8 @@ var init_manager = __esm({
|
|
|
11064
11064
|
/** Legacy sync method kept for backward compatibility (minimal) */
|
|
11065
11065
|
getAvailableModels() {
|
|
11066
11066
|
const out = [];
|
|
11067
|
-
if (this.available.has("openai")) out.push("gpt-
|
|
11068
|
-
if (this.available.has("anthropic")) out.push("claude-
|
|
11067
|
+
if (this.available.has("openai")) out.push("gpt-5", "gpt-5-mini", "gpt-4o", "gpt-4o-mini");
|
|
11068
|
+
if (this.available.has("anthropic")) out.push("claude-opus-4-1-20250805", "claude-opus-4-20250514", "claude-sonnet-4-20250514");
|
|
11069
11069
|
if (this.available.has("google")) out.push("gemini-2.5-pro", "gemini-2.5-flash");
|
|
11070
11070
|
if (this.available.has("grok")) out.push("grok-4", "grok-beta");
|
|
11071
11071
|
return out;
|
|
@@ -11191,12 +11191,15 @@ var init_manager = __esm({
|
|
|
11191
11191
|
if (!apiKey) throw new Error("OpenAI API key not configured");
|
|
11192
11192
|
const controller = new AbortController();
|
|
11193
11193
|
const timeout = setTimeout(() => controller.abort(), 3e5);
|
|
11194
|
-
const modelName = req.model || "gpt-5-mini
|
|
11195
|
-
const isGPT5 = modelName.
|
|
11194
|
+
const modelName = req.model || process.env.OPENAI_MODEL || "gpt-5-mini";
|
|
11195
|
+
const isGPT5 = /\bgpt-5\b/i.test(modelName) || modelName.toLowerCase().startsWith("gpt-5");
|
|
11196
11196
|
const bodyParams = {
|
|
11197
11197
|
model: modelName,
|
|
11198
11198
|
messages: [
|
|
11199
|
-
{
|
|
11199
|
+
{
|
|
11200
|
+
role: "system",
|
|
11201
|
+
content: "You are a helpful assistant. Always respond in English. Provide direct, clear answers without menus or numbered options."
|
|
11202
|
+
},
|
|
11200
11203
|
{ role: "user", content: prompt }
|
|
11201
11204
|
]
|
|
11202
11205
|
};
|
|
@@ -11221,7 +11224,7 @@ var init_manager = __esm({
|
|
|
11221
11224
|
throw new Error(`OpenAI ${res.status}: ${txt}`);
|
|
11222
11225
|
}
|
|
11223
11226
|
const json = await res.json();
|
|
11224
|
-
return { content: json.choices?.[0]?.message?.content ?? "" };
|
|
11227
|
+
return { content: json.choices?.[0]?.message?.content ?? "", model: json.model };
|
|
11225
11228
|
} catch (error2) {
|
|
11226
11229
|
clearTimeout(timeout);
|
|
11227
11230
|
if (error2.name === "AbortError" || error2.message?.includes("abort")) {
|
|
@@ -12101,8 +12104,6 @@ var init_continuation = __esm({
|
|
|
12101
12104
|
init_common();
|
|
12102
12105
|
}
|
|
12103
12106
|
});
|
|
12104
|
-
|
|
12105
|
-
// src/services/ai-response/responders/question.ts
|
|
12106
12107
|
function buildQuestionResponse(options2) {
|
|
12107
12108
|
const { question, topics = [], includeExample = true } = options2;
|
|
12108
12109
|
const isJapanese = false;
|
|
@@ -12159,7 +12160,8 @@ function buildQuestionResponse(options2) {
|
|
|
12159
12160
|
parts.push(
|
|
12160
12161
|
"Choose a number for details or ask a follow-up question."
|
|
12161
12162
|
);
|
|
12162
|
-
|
|
12163
|
+
const output3 = parts.join("\n");
|
|
12164
|
+
return chalk28__default.default.green(output3);
|
|
12163
12165
|
}
|
|
12164
12166
|
function generateQuickAnswer(question, isJapanese, topics) {
|
|
12165
12167
|
const lowerQuestion = question.toLowerCase();
|
|
@@ -12444,7 +12446,7 @@ var init_ai_response_service = __esm({
|
|
|
12444
12446
|
*/
|
|
12445
12447
|
async callLLM(prompt, opts = {}) {
|
|
12446
12448
|
const {
|
|
12447
|
-
system = PLAIN_OUTPUT ? "Return ONLY the answer (or ONLY code). No menus, no lists, no guided flows." : "You are a helpful senior engineer. Provide direct, production-quality answers.",
|
|
12449
|
+
system = PLAIN_OUTPUT ? "Return ONLY the answer (or ONLY code). No menus, no lists, no guided flows. Always respond in English." : "You are a helpful senior engineer. Always respond in English. Provide direct, production-quality answers.",
|
|
12448
12450
|
model = DEFAULT_MODEL2,
|
|
12449
12451
|
provider = DEFAULT_PROVIDER2,
|
|
12450
12452
|
temperature = 0.2,
|
|
@@ -12711,27 +12713,27 @@ var init_logger = __esm({
|
|
|
12711
12713
|
}
|
|
12712
12714
|
debug(...args2) {
|
|
12713
12715
|
if (this.level <= 0 /* DEBUG */) {
|
|
12714
|
-
console.log(
|
|
12716
|
+
console.log(chalk28__default.default.magenta(`${this.prefix} [DEBUG]`), ...args2);
|
|
12715
12717
|
}
|
|
12716
12718
|
}
|
|
12717
12719
|
info(...args2) {
|
|
12718
12720
|
if (this.level <= 1 /* INFO */) {
|
|
12719
|
-
console.log(
|
|
12721
|
+
console.log(chalk28__default.default.bold.magenta(`${this.prefix} [INFO]`), ...args2);
|
|
12720
12722
|
}
|
|
12721
12723
|
}
|
|
12722
12724
|
warn(...args2) {
|
|
12723
12725
|
if (this.level <= 2 /* WARN */) {
|
|
12724
|
-
console.warn(
|
|
12726
|
+
console.warn(chalk28__default.default.bold.magenta(`${this.prefix} [WARN]`), ...args2);
|
|
12725
12727
|
}
|
|
12726
12728
|
}
|
|
12727
12729
|
error(...args2) {
|
|
12728
12730
|
if (this.level <= 3 /* ERROR */) {
|
|
12729
|
-
console.error(
|
|
12731
|
+
console.error(chalk28__default.default.bold.magenta(`${this.prefix} [ERROR]`), ...args2);
|
|
12730
12732
|
}
|
|
12731
12733
|
}
|
|
12732
12734
|
success(...args2) {
|
|
12733
12735
|
if (this.level <= 1 /* INFO */) {
|
|
12734
|
-
console.log(
|
|
12736
|
+
console.log(chalk28__default.default.bold.magenta(`${this.prefix} [SUCCESS]`), ...args2);
|
|
12735
12737
|
}
|
|
12736
12738
|
}
|
|
12737
12739
|
task(taskName, status, message) {
|
|
@@ -12745,10 +12747,10 @@ var init_logger = __esm({
|
|
|
12745
12747
|
error: "\u274C"
|
|
12746
12748
|
};
|
|
12747
12749
|
const statusColors = {
|
|
12748
|
-
start:
|
|
12749
|
-
progress:
|
|
12750
|
-
complete:
|
|
12751
|
-
error:
|
|
12750
|
+
start: chalk28__default.default.bold.magenta,
|
|
12751
|
+
progress: chalk28__default.default.magenta,
|
|
12752
|
+
complete: chalk28__default.default.bold.magenta,
|
|
12753
|
+
error: chalk28__default.default.bold.magenta
|
|
12752
12754
|
};
|
|
12753
12755
|
const icon = statusIcons[status];
|
|
12754
12756
|
const color = statusColors[status];
|
|
@@ -12765,14 +12767,14 @@ var init_logger = __esm({
|
|
|
12765
12767
|
if (this.level > 0 /* DEBUG */) {
|
|
12766
12768
|
return;
|
|
12767
12769
|
}
|
|
12768
|
-
console.log(
|
|
12770
|
+
console.log(chalk28__default.default.magenta(`${this.prefix} [JSON]`));
|
|
12769
12771
|
console.log(pretty ? JSON.stringify(obj, null, 2) : JSON.stringify(obj));
|
|
12770
12772
|
}
|
|
12771
12773
|
divider() {
|
|
12772
12774
|
if (this.level > 1 /* INFO */) {
|
|
12773
12775
|
return;
|
|
12774
12776
|
}
|
|
12775
|
-
console.log(
|
|
12777
|
+
console.log(chalk28__default.default.magenta("\u2500".repeat(60)));
|
|
12776
12778
|
}
|
|
12777
12779
|
clear() {
|
|
12778
12780
|
console.clear();
|
|
@@ -12792,7 +12794,7 @@ var init_logger = __esm({
|
|
|
12792
12794
|
const progressText = `${current}/${total}`;
|
|
12793
12795
|
const labelText = label ? ` ${label}` : "";
|
|
12794
12796
|
process.stdout.write(
|
|
12795
|
-
`\r${
|
|
12797
|
+
`\r${chalk28__default.default.bold.magenta(bar)} ${percentage}% ${progressText}${labelText}`
|
|
12796
12798
|
);
|
|
12797
12799
|
if (current === total) {
|
|
12798
12800
|
process.stdout.write("\n");
|
|
@@ -14485,9 +14487,9 @@ var init_HelpCommand = __esm({
|
|
|
14485
14487
|
const stats = await this.readyService.getStatistics();
|
|
14486
14488
|
const lines = [];
|
|
14487
14489
|
lines.push("\u2550".repeat(60));
|
|
14488
|
-
lines.push(
|
|
14490
|
+
lines.push(chalk28__default.default.bold(`${stats.totalReady} READY Commands | ${stats.categoriesCount} Categories`));
|
|
14489
14491
|
lines.push("");
|
|
14490
|
-
lines.push(
|
|
14492
|
+
lines.push(chalk28__default.default.bold("Quick Access:"));
|
|
14491
14493
|
lines.push(" /help <command> - Detailed help for specific command");
|
|
14492
14494
|
lines.push(" /help --quickstart - Essential commands for new users");
|
|
14493
14495
|
lines.push(" /help --stats - Performance statistics");
|
|
@@ -14502,7 +14504,7 @@ var init_HelpCommand = __esm({
|
|
|
14502
14504
|
}
|
|
14503
14505
|
globalMaxNameLength = Math.max(globalMaxNameLength, 18) + 1;
|
|
14504
14506
|
for (const category of categories2) {
|
|
14505
|
-
lines.push(
|
|
14507
|
+
lines.push(chalk28__default.default.bold(`${category.name.toUpperCase()} (${category.count})`));
|
|
14506
14508
|
const showCommands = category.commands.slice(0, 4);
|
|
14507
14509
|
for (const cmd of showCommands) {
|
|
14508
14510
|
const needsGpu = this.hasGpuRequirement(cmd.description);
|
|
@@ -14522,7 +14524,7 @@ var init_HelpCommand = __esm({
|
|
|
14522
14524
|
}
|
|
14523
14525
|
lines.push("");
|
|
14524
14526
|
}
|
|
14525
|
-
lines.push(
|
|
14527
|
+
lines.push(chalk28__default.default.bold("Pro Tips:"));
|
|
14526
14528
|
lines.push(" \u2022 All listed commands are production-ready");
|
|
14527
14529
|
lines.push(" \u2022 Use fuzzy search: /help --search config \u2192 finds /config");
|
|
14528
14530
|
lines.push(" \u2022 Categories ordered by importance");
|
|
@@ -14561,33 +14563,33 @@ var init_HelpCommand = __esm({
|
|
|
14561
14563
|
formatCommandHelp(command) {
|
|
14562
14564
|
const lines = [];
|
|
14563
14565
|
lines.push("");
|
|
14564
|
-
lines.push(`\u{1F4D6} ${
|
|
14566
|
+
lines.push(`\u{1F4D6} ${chalk28__default.default.bold(`/${command.name}`)} - ${command.description}`);
|
|
14565
14567
|
lines.push("\u2550".repeat(50));
|
|
14566
14568
|
lines.push("");
|
|
14567
|
-
lines.push(
|
|
14569
|
+
lines.push(chalk28__default.default.bold("\u2139\uFE0F Information:"));
|
|
14568
14570
|
lines.push(` Category: ${this.readyService["getCategoryEmoji"](command.category)} ${command.category}`);
|
|
14569
14571
|
lines.push(` Status: \u2705 READY (contract validated)`);
|
|
14570
14572
|
if (command.aliases && command.aliases.length > 0) {
|
|
14571
14573
|
lines.push(` Aliases: ${command.aliases.map((a2) => `/${a2}`).join(", ")}`);
|
|
14572
14574
|
}
|
|
14573
14575
|
lines.push("");
|
|
14574
|
-
lines.push(
|
|
14576
|
+
lines.push(chalk28__default.default.bold("\u{1F3AF} Usage:"));
|
|
14575
14577
|
lines.push(` ${command.usage}`);
|
|
14576
14578
|
lines.push("");
|
|
14577
|
-
lines.push(
|
|
14579
|
+
lines.push(chalk28__default.default.bold("\u{1F4CB} Contract Validation:"));
|
|
14578
14580
|
lines.push(` \u26A1 Performance: ${command.contract.maxResponseTime}ms (tested)`);
|
|
14579
14581
|
lines.push(` \u{1F4BB} TTY Mode: ${command.contract.tty ? "\u2705 Supported" : "\u274C Not supported"}`);
|
|
14580
14582
|
lines.push(` \u{1F527} Non-TTY Mode: ${command.contract.nonTty ? "\u2705 Supported" : "\u274C Not supported"}`);
|
|
14581
14583
|
lines.push(` \u{1F500} Pipe Mode: ${command.contract.pipe ? "\u2705 Supported" : "\u274C Not supported"}`);
|
|
14582
14584
|
lines.push("");
|
|
14583
14585
|
if (command.examples && command.examples.length > 0) {
|
|
14584
|
-
lines.push(
|
|
14586
|
+
lines.push(chalk28__default.default.bold("\u{1F4DD} Examples:"));
|
|
14585
14587
|
for (const example of command.examples) {
|
|
14586
14588
|
lines.push(` ${example}`);
|
|
14587
14589
|
}
|
|
14588
14590
|
lines.push("");
|
|
14589
14591
|
}
|
|
14590
|
-
lines.push(
|
|
14592
|
+
lines.push(chalk28__default.default.bold("\u{1F4A1} Quick Tips:"));
|
|
14591
14593
|
lines.push(` \u2022 This command is production-ready and fully tested`);
|
|
14592
14594
|
lines.push(` \u2022 Try /${command.name} --help for additional options`);
|
|
14593
14595
|
if (command.category !== "core") {
|
|
@@ -14638,7 +14640,7 @@ var init_HelpCommand = __esm({
|
|
|
14638
14640
|
};
|
|
14639
14641
|
const emoji = emojiMap[categoryName.toLowerCase()] || "\u{1F4CB}";
|
|
14640
14642
|
lines.push("");
|
|
14641
|
-
lines.push(`${emoji} ${
|
|
14643
|
+
lines.push(`${emoji} ${chalk28__default.default.bold(categoryName.toUpperCase() + " COMMANDS")} (${commands.length} READY)`);
|
|
14642
14644
|
lines.push("\u2550".repeat(50));
|
|
14643
14645
|
lines.push("");
|
|
14644
14646
|
const maxNameLength = Math.max(...commands.map((c) => c.name.length)) + 1;
|
|
@@ -14672,7 +14674,7 @@ var init_HelpCommand = __esm({
|
|
|
14672
14674
|
formatSearchResults(searchTerm, results) {
|
|
14673
14675
|
const lines = [];
|
|
14674
14676
|
lines.push("");
|
|
14675
|
-
lines.push(`\u{1F50D} ${
|
|
14677
|
+
lines.push(`\u{1F50D} ${chalk28__default.default.bold("SEARCH RESULTS")} for "${searchTerm}" (${results.length} matches)`);
|
|
14676
14678
|
lines.push("\u2550".repeat(50));
|
|
14677
14679
|
lines.push("");
|
|
14678
14680
|
for (const result2 of results) {
|
|
@@ -14685,7 +14687,7 @@ var init_HelpCommand = __esm({
|
|
|
14685
14687
|
}
|
|
14686
14688
|
lines.push("");
|
|
14687
14689
|
}
|
|
14688
|
-
lines.push(
|
|
14690
|
+
lines.push(chalk28__default.default.bold("\u{1F4A1} Tip:") + " Higher scores indicate better matches");
|
|
14689
14691
|
lines.push("");
|
|
14690
14692
|
return lines.join("\n");
|
|
14691
14693
|
}
|
|
@@ -14696,38 +14698,38 @@ var init_HelpCommand = __esm({
|
|
|
14696
14698
|
const quickCommands = await this.readyService.getQuickStartCommands();
|
|
14697
14699
|
const lines = [];
|
|
14698
14700
|
lines.push("");
|
|
14699
|
-
lines.push(`\u{1F680} ${
|
|
14701
|
+
lines.push(`\u{1F680} ${chalk28__default.default.bold("MARIA QUICKSTART")} - Essential Commands`);
|
|
14700
14702
|
lines.push("\u2550".repeat(50));
|
|
14701
14703
|
lines.push("");
|
|
14702
|
-
lines.push(
|
|
14704
|
+
lines.push(chalk28__default.default.bold("\u{1F3AF} Get Started in 3 Steps:"));
|
|
14703
14705
|
lines.push("");
|
|
14704
|
-
lines.push(
|
|
14706
|
+
lines.push(chalk28__default.default.bold("1\uFE0F\u20E3 Configure Your AI Provider"));
|
|
14705
14707
|
const modelCmd = quickCommands.find((c) => c.name === "model");
|
|
14706
14708
|
if (modelCmd) {
|
|
14707
14709
|
lines.push(` /${modelCmd.name} - ${modelCmd.description}`);
|
|
14708
14710
|
lines.push(` Try: /model set provider=openai key=sk-...`);
|
|
14709
14711
|
}
|
|
14710
14712
|
lines.push("");
|
|
14711
|
-
lines.push(
|
|
14713
|
+
lines.push(chalk28__default.default.bold("2\uFE0F\u20E3 Check System Status"));
|
|
14712
14714
|
const statusCmd = quickCommands.find((c) => c.name === "status");
|
|
14713
14715
|
if (statusCmd) {
|
|
14714
14716
|
lines.push(` /${statusCmd.name} - ${statusCmd.description}`);
|
|
14715
14717
|
lines.push(` Try: /status`);
|
|
14716
14718
|
}
|
|
14717
14719
|
lines.push("");
|
|
14718
|
-
lines.push(
|
|
14720
|
+
lines.push(chalk28__default.default.bold("3\uFE0F\u20E3 Start Coding"));
|
|
14719
14721
|
const codeCmd = quickCommands.find((c) => c.name === "code");
|
|
14720
14722
|
if (codeCmd) {
|
|
14721
14723
|
lines.push(` /${codeCmd.name} - ${codeCmd.description}`);
|
|
14722
14724
|
lines.push(` Try: /code create a hello world function`);
|
|
14723
14725
|
}
|
|
14724
14726
|
lines.push("");
|
|
14725
|
-
lines.push(
|
|
14727
|
+
lines.push(chalk28__default.default.bold("\u{1F527} Essential Commands:"));
|
|
14726
14728
|
for (const cmd of quickCommands) {
|
|
14727
14729
|
lines.push(` /${cmd.name.padEnd(12)} - ${cmd.description}`);
|
|
14728
14730
|
}
|
|
14729
14731
|
lines.push("");
|
|
14730
|
-
lines.push(
|
|
14732
|
+
lines.push(chalk28__default.default.bold("\u{1F4A1} Next Steps:"));
|
|
14731
14733
|
lines.push(" \u2022 /help --category <name> - Explore command categories");
|
|
14732
14734
|
lines.push(" \u2022 /help --search <term> - Find specific functionality");
|
|
14733
14735
|
lines.push(" \u2022 /help <command> - Get detailed command help");
|
|
@@ -14742,20 +14744,20 @@ var init_HelpCommand = __esm({
|
|
|
14742
14744
|
const categories2 = await this.readyService.getCategories();
|
|
14743
14745
|
const lines = [];
|
|
14744
14746
|
lines.push("");
|
|
14745
|
-
lines.push(`\u{1F4CA} ${
|
|
14747
|
+
lines.push(`\u{1F4CA} ${chalk28__default.default.bold("READY COMMANDS STATISTICS")}`);
|
|
14746
14748
|
lines.push("\u2550".repeat(40));
|
|
14747
14749
|
lines.push("");
|
|
14748
|
-
lines.push(
|
|
14750
|
+
lines.push(chalk28__default.default.bold("\u{1F3AF} Overall:"));
|
|
14749
14751
|
lines.push(` Total READY Commands: ${stats.totalReady}`);
|
|
14750
14752
|
lines.push(` Categories: ${stats.categoriesCount}`);
|
|
14751
14753
|
lines.push(` Last Updated: ${stats.lastUpdated?.toLocaleString() || "Unknown"}`);
|
|
14752
14754
|
lines.push("");
|
|
14753
|
-
lines.push(
|
|
14755
|
+
lines.push(chalk28__default.default.bold("\u26A1 Performance:"));
|
|
14754
14756
|
lines.push(` Average Response Time: ${stats.avgResponseTime}ms`);
|
|
14755
14757
|
lines.push(` Fastest Command: /${stats.fastestCommand}`);
|
|
14756
14758
|
lines.push(` Slowest Command: /${stats.slowestCommand}`);
|
|
14757
14759
|
lines.push("");
|
|
14758
|
-
lines.push(
|
|
14760
|
+
lines.push(chalk28__default.default.bold("\u{1F4CB} By Category:"));
|
|
14759
14761
|
for (const category of categories2) {
|
|
14760
14762
|
const avgTime = Math.round(
|
|
14761
14763
|
category.commands.reduce((sum, cmd) => sum + cmd.contract.maxResponseTime, 0) / category.commands.length
|
|
@@ -14763,7 +14765,7 @@ var init_HelpCommand = __esm({
|
|
|
14763
14765
|
lines.push(` ${category.emoji} ${category.name.padEnd(15)}: ${category.count.toString().padStart(2)} commands (${avgTime}ms avg)`);
|
|
14764
14766
|
}
|
|
14765
14767
|
lines.push("");
|
|
14766
|
-
lines.push(
|
|
14768
|
+
lines.push(chalk28__default.default.bold("\u2705 Contract Validation:"));
|
|
14767
14769
|
lines.push(" All commands tested for:");
|
|
14768
14770
|
lines.push(" \u2022 Basic execution without crashes");
|
|
14769
14771
|
lines.push(" \u2022 TTY/non-TTY/pipe compatibility");
|
|
@@ -14826,7 +14828,7 @@ var init_VersionCommand = __esm({
|
|
|
14826
14828
|
if (context2.apiVersion) {
|
|
14827
14829
|
apiBuild = ` \xB7 API: ${context2.apiVersion}`;
|
|
14828
14830
|
}
|
|
14829
|
-
const output3 = `${
|
|
14831
|
+
const output3 = `${chalk28__default.default.bold("MARIA")} v${version}${apiBuild} \xB7 Node: ${process.version}`;
|
|
14830
14832
|
await trackCommand({
|
|
14831
14833
|
cmd: "version",
|
|
14832
14834
|
status: "success",
|
|
@@ -14843,7 +14845,7 @@ var init_VersionCommand = __esm({
|
|
|
14843
14845
|
plan: getUserPlan(),
|
|
14844
14846
|
quotaLeft: context2.quotaLeft || 999
|
|
14845
14847
|
});
|
|
14846
|
-
return this.success(`${
|
|
14848
|
+
return this.success(`${chalk28__default.default.bold("MARIA")} v${getVersion()}`);
|
|
14847
14849
|
}
|
|
14848
14850
|
}
|
|
14849
14851
|
};
|
|
@@ -15293,7 +15295,7 @@ var init_setup_command = __esm({
|
|
|
15293
15295
|
errors: [],
|
|
15294
15296
|
warnings: []
|
|
15295
15297
|
});
|
|
15296
|
-
const message =
|
|
15298
|
+
const message = chalk28__default.default.green(
|
|
15297
15299
|
'\u26A1 Quick setup completed in under 2 minutes!\n \u2022 Configured: OpenAI GPT-4, Environment variables, Git ignore\n \u2022 Next: Run `maria chat` or try `maria code "Hello World function"`'
|
|
15298
15300
|
);
|
|
15299
15301
|
return this.success(message);
|
|
@@ -15488,37 +15490,37 @@ Estimated time: 3-5 minutes
|
|
|
15488
15490
|
const providers = result2.providersConfigured.length > 0 ? result2.providersConfigured.join(", ") : "none";
|
|
15489
15491
|
const files = result2.filesGenerated.length > 0 ? result2.filesGenerated.join(", ") : "none";
|
|
15490
15492
|
lines.push("");
|
|
15491
|
-
lines.push(
|
|
15493
|
+
lines.push(chalk28__default.default.green.bold("\u{1F389} Setup Complete! Welcome to MARIA CODE!"));
|
|
15492
15494
|
lines.push("");
|
|
15493
|
-
lines.push(
|
|
15494
|
-
lines.push(
|
|
15495
|
+
lines.push(chalk28__default.default.white(`\u2022 Status: ${chalk28__default.default.green("success")}`));
|
|
15496
|
+
lines.push(chalk28__default.default.white(`\u2022 Duration: ${chalk28__default.default.cyan(`${durationSec}s`)}`));
|
|
15495
15497
|
lines.push(
|
|
15496
|
-
|
|
15497
|
-
`\u2022 Steps: ${
|
|
15498
|
+
chalk28__default.default.white(
|
|
15499
|
+
`\u2022 Steps: ${chalk28__default.default.cyan(
|
|
15498
15500
|
result2.stepsCompleted.map((s2) => s2.replace(/^_/, "")).join(", ") || "none"
|
|
15499
15501
|
)}`
|
|
15500
15502
|
)
|
|
15501
15503
|
);
|
|
15502
|
-
lines.push(
|
|
15503
|
-
lines.push(
|
|
15504
|
+
lines.push(chalk28__default.default.white(`\u2022 Providers: ${chalk28__default.default.cyan(providers)}`));
|
|
15505
|
+
lines.push(chalk28__default.default.white(`\u2022 Files: ${chalk28__default.default.cyan(files)}`));
|
|
15504
15506
|
if (result2.warnings.length > 0) {
|
|
15505
15507
|
lines.push(
|
|
15506
|
-
|
|
15508
|
+
chalk28__default.default.yellow(
|
|
15507
15509
|
`\u2022 Warnings: ${result2.warnings.map((w) => w.replace(/^_/, "")).join(", ")}`
|
|
15508
15510
|
)
|
|
15509
15511
|
);
|
|
15510
15512
|
}
|
|
15511
15513
|
if (result2.errors.length > 0) {
|
|
15512
|
-
lines.push(
|
|
15514
|
+
lines.push(chalk28__default.default.red(`\u2022 Errors: ${result2.errors.join(", ")}`));
|
|
15513
15515
|
}
|
|
15514
15516
|
lines.push("");
|
|
15515
|
-
lines.push(
|
|
15516
|
-
lines.push(
|
|
15517
|
-
lines.push(
|
|
15518
|
-
lines.push(
|
|
15519
|
-
lines.push(
|
|
15517
|
+
lines.push(chalk28__default.default.white("\u{1F680} Ready to start! Try:"));
|
|
15518
|
+
lines.push(chalk28__default.default.white(" - maria chat \xB7 Start interactive mode"));
|
|
15519
|
+
lines.push(chalk28__default.default.white(' - maria code "create a React component"'));
|
|
15520
|
+
lines.push(chalk28__default.default.white(" - maria test \xB7 Generate tests"));
|
|
15521
|
+
lines.push(chalk28__default.default.white(" - maria help \xB7 View all commands"));
|
|
15520
15522
|
lines.push("");
|
|
15521
|
-
lines.push(
|
|
15523
|
+
lines.push(chalk28__default.default.green(`Setup completed in ${durationSec}s \xB7 Happy coding! \u{1F680}`));
|
|
15522
15524
|
logger.info(lines.join("\n"));
|
|
15523
15525
|
}
|
|
15524
15526
|
/**
|
|
@@ -15530,23 +15532,23 @@ Estimated time: 3-5 minutes
|
|
|
15530
15532
|
const files = result2.filesGenerated.length > 0 ? result2.filesGenerated.join(", ") : "none";
|
|
15531
15533
|
const steps = result2.stepsCompleted.map((s2) => s2.replace(/^_/, "")).join(", ") || "none";
|
|
15532
15534
|
const lines = [];
|
|
15533
|
-
lines.push(
|
|
15535
|
+
lines.push(chalk28__default.default.green.bold("\u{1F389} Setup completed successfully!"));
|
|
15534
15536
|
lines.push("");
|
|
15535
|
-
lines.push(
|
|
15536
|
-
lines.push(
|
|
15537
|
-
lines.push(
|
|
15538
|
-
lines.push(
|
|
15539
|
-
lines.push(
|
|
15537
|
+
lines.push(chalk28__default.default.green(`\u2022 Status: success`));
|
|
15538
|
+
lines.push(chalk28__default.default.green(`\u2022 Duration: ${durationSec}s`));
|
|
15539
|
+
lines.push(chalk28__default.default.green(`\u2022 Steps: ${steps}`));
|
|
15540
|
+
lines.push(chalk28__default.default.green(`\u2022 Providers: ${providers}`));
|
|
15541
|
+
lines.push(chalk28__default.default.green(`\u2022 Files: ${files}`));
|
|
15540
15542
|
if (result2.warnings.length > 0) {
|
|
15541
|
-
lines.push(
|
|
15543
|
+
lines.push(chalk28__default.default.yellow(`\u2022 Warnings: ${result2.warnings.map((w) => w.replace(/^_/, "")).join(", ")}`));
|
|
15542
15544
|
}
|
|
15543
15545
|
if (result2.errors.length > 0) {
|
|
15544
|
-
lines.push(
|
|
15546
|
+
lines.push(chalk28__default.default.red(`\u2022 Errors: ${result2.errors.join(", ")}`));
|
|
15545
15547
|
}
|
|
15546
15548
|
if (nextSteps.length > 0) {
|
|
15547
15549
|
lines.push("");
|
|
15548
|
-
lines.push(
|
|
15549
|
-
nextSteps.forEach((s2) => lines.push(
|
|
15550
|
+
lines.push(chalk28__default.default.green("Next steps:"));
|
|
15551
|
+
nextSteps.forEach((s2) => lines.push(chalk28__default.default.green(` - ${s2}`)));
|
|
15550
15552
|
}
|
|
15551
15553
|
return lines.join("\n");
|
|
15552
15554
|
}
|
|
@@ -19128,8 +19130,8 @@ var require_package = __commonJS({
|
|
|
19128
19130
|
"package.json"(exports, module) {
|
|
19129
19131
|
module.exports = {
|
|
19130
19132
|
name: "@bonginkan/maria",
|
|
19131
|
-
version: "4.2.
|
|
19132
|
-
description: "\u{1F680} MARIA v4.2.
|
|
19133
|
+
version: "4.2.30",
|
|
19134
|
+
description: "\u{1F680} MARIA v4.2.30 - Enterprise AI Development Platform with 100% Command Availability. Features 74 production-ready commands with comprehensive fallback implementation, local LLM support, and zero external dependencies. Includes natural language coding, AI safety evaluation, intelligent evolution system, episodic memory with PII masking, and real-time monitoring dashboard. Built with TypeScript AST-powered code generation, OAuth2.0 + PKCE authentication, quantum-resistant cryptography, and enterprise-grade performance.",
|
|
19133
19135
|
keywords: [
|
|
19134
19136
|
"ai",
|
|
19135
19137
|
"cli",
|
|
@@ -30509,7 +30511,7 @@ var init_clear_command = __esm({
|
|
|
30509
30511
|
plan: getUserPlan(),
|
|
30510
30512
|
quotaLeft: context2.quotaLeft || 999
|
|
30511
30513
|
});
|
|
30512
|
-
const message =
|
|
30514
|
+
const message = chalk28__default.default.green("\u2705 Cleared") + chalk28__default.default.gray(" \xB7 context reset");
|
|
30513
30515
|
return this.success(withQuotaFooter(message, context2.quotaLeft));
|
|
30514
30516
|
} catch (error2) {
|
|
30515
30517
|
await trackCommand({
|
|
@@ -30520,7 +30522,7 @@ var init_clear_command = __esm({
|
|
|
30520
30522
|
quotaLeft: context2.quotaLeft || 999
|
|
30521
30523
|
});
|
|
30522
30524
|
process.stdout.write("\x1B[2J\x1B[3J\x1B[H");
|
|
30523
|
-
return this.success(
|
|
30525
|
+
return this.success(chalk28__default.default.green("\u2705 Cleared"));
|
|
30524
30526
|
}
|
|
30525
30527
|
}
|
|
30526
30528
|
};
|
|
@@ -31552,18 +31554,18 @@ var init_WhoAmICommand = __esm({
|
|
|
31552
31554
|
});
|
|
31553
31555
|
}
|
|
31554
31556
|
const lines = [];
|
|
31555
|
-
lines.push(
|
|
31557
|
+
lines.push(chalk28__default.default.green("\u2705 Authenticated"));
|
|
31556
31558
|
if (user.name) {
|
|
31557
|
-
lines.push(
|
|
31559
|
+
lines.push(chalk28__default.default.white(`\u{1F464} Name: ${chalk28__default.default.cyan(user.name)}`));
|
|
31558
31560
|
}
|
|
31559
31561
|
if (user.email) {
|
|
31560
|
-
lines.push(
|
|
31562
|
+
lines.push(chalk28__default.default.white(`\u{1F4E7} Email: ${chalk28__default.default.cyan(user.email)}`));
|
|
31561
31563
|
}
|
|
31562
31564
|
if (user.provider) {
|
|
31563
|
-
lines.push(
|
|
31565
|
+
lines.push(chalk28__default.default.white(`\u{1F511} Provider: ${chalk28__default.default.cyan(user.provider)}`));
|
|
31564
31566
|
}
|
|
31565
31567
|
if (user.plan) {
|
|
31566
|
-
lines.push(
|
|
31568
|
+
lines.push(chalk28__default.default.white(`\u{1F48E} Plan: ${chalk28__default.default.cyan(user.plan)}`));
|
|
31567
31569
|
}
|
|
31568
31570
|
return this.success(lines.join("\n"), { authenticated: true, user });
|
|
31569
31571
|
}
|
|
@@ -31590,40 +31592,40 @@ var init_about_command = __esm({
|
|
|
31590
31592
|
async execute(args2, context2) {
|
|
31591
31593
|
const output3 = [];
|
|
31592
31594
|
output3.push("");
|
|
31593
|
-
output3.push(
|
|
31594
|
-
output3.push(
|
|
31595
|
+
output3.push(chalk28__default.default.cyan.bold("\u{1F916} About MARIA v4.2.30"));
|
|
31596
|
+
output3.push(chalk28__default.default.gray("\u2550".repeat(40)));
|
|
31595
31597
|
output3.push("");
|
|
31596
|
-
output3.push(
|
|
31598
|
+
output3.push(chalk28__default.default.white.bold("MARIA - Minimal API, Maximum Power"));
|
|
31597
31599
|
output3.push("");
|
|
31598
|
-
output3.push(
|
|
31600
|
+
output3.push(chalk28__default.default.white("\u{1F3AF} Revolutionary AI Development Platform:"));
|
|
31599
31601
|
output3.push(" \u2022 Natural Language Code Operations");
|
|
31600
31602
|
output3.push(" \u2022 Graph RAG Knowledge System");
|
|
31601
31603
|
output3.push(" \u2022 Dual Memory Architecture");
|
|
31602
31604
|
output3.push(" \u2022 Enterprise-Grade Security");
|
|
31603
31605
|
output3.push(" \u2022 Multimodal AI Generation");
|
|
31604
31606
|
output3.push("");
|
|
31605
|
-
output3.push(
|
|
31607
|
+
output3.push(chalk28__default.default.white("\u{1F31F} Key Features:"));
|
|
31606
31608
|
output3.push(" \u2022 /code - Natural language coding");
|
|
31607
31609
|
output3.push(" \u2022 68+ Slash Commands");
|
|
31608
31610
|
output3.push(" \u2022 8 AI Provider Support");
|
|
31609
31611
|
output3.push(" \u2022 Business Operations Suite");
|
|
31610
31612
|
output3.push(" \u2022 Real-time Streaming");
|
|
31611
31613
|
output3.push("");
|
|
31612
|
-
output3.push(
|
|
31614
|
+
output3.push(chalk28__default.default.white("\u{1F468}\u200D\u{1F4BB} Created by:"));
|
|
31613
31615
|
output3.push(" \u2022 Bonginkan Team");
|
|
31614
31616
|
output3.push(" \u2022 Enterprise AI Solutions");
|
|
31615
31617
|
output3.push("");
|
|
31616
|
-
output3.push(
|
|
31617
|
-
output3.push(
|
|
31618
|
-
output3.push(
|
|
31619
|
-
output3.push(
|
|
31620
|
-
output3.push(
|
|
31621
|
-
output3.push(
|
|
31618
|
+
output3.push(chalk28__default.default.white("\u{1F517} Links:"));
|
|
31619
|
+
output3.push(chalk28__default.default.blue(" Website: https://maria-code.ai"));
|
|
31620
|
+
output3.push(chalk28__default.default.blue(" Company: https://bonginkan.ai"));
|
|
31621
|
+
output3.push(chalk28__default.default.blue(" Discord: https://discord.gg/SMSmSGcEQy"));
|
|
31622
|
+
output3.push(chalk28__default.default.blue(" GitHub: https://github.com/bonginkan/maria"));
|
|
31623
|
+
output3.push(chalk28__default.default.blue(" NPM: https://www.npmjs.com/package/@bonginkan/maria"));
|
|
31622
31624
|
output3.push("");
|
|
31623
|
-
output3.push(
|
|
31624
|
-
output3.push(
|
|
31625
|
+
output3.push(chalk28__default.default.white("\u{1F4C4} License: MIT"));
|
|
31626
|
+
output3.push(chalk28__default.default.white("\u{1F3D7}\uFE0F Built with: TypeScript, Node.js, React"));
|
|
31625
31627
|
output3.push("");
|
|
31626
|
-
output3.push(
|
|
31628
|
+
output3.push(chalk28__default.default.green("Thank you for using MARIA! \u{1F680}"));
|
|
31627
31629
|
output3.push("");
|
|
31628
31630
|
return {
|
|
31629
31631
|
success: true,
|
|
@@ -33642,8 +33644,8 @@ var init_ConfigCLI = __esm({
|
|
|
33642
33644
|
// Default to interactive
|
|
33643
33645
|
});
|
|
33644
33646
|
if (options2.verbose) {
|
|
33645
|
-
console.log(
|
|
33646
|
-
console.log(
|
|
33647
|
+
console.log(chalk28__default.default.gray(`Executing: ${operation} ${args2.join(" ")}`));
|
|
33648
|
+
console.log(chalk28__default.default.gray(`Options: ${JSON.stringify(options2, null, 2)}`));
|
|
33647
33649
|
}
|
|
33648
33650
|
const result2 = await command.execute();
|
|
33649
33651
|
if (result2.endReason === "success") {
|
|
@@ -33669,10 +33671,10 @@ var init_ConfigCLI = __esm({
|
|
|
33669
33671
|
await this.displayPreview(data2.preview);
|
|
33670
33672
|
if (data2.dryRun) {
|
|
33671
33673
|
console.log(
|
|
33672
|
-
|
|
33674
|
+
chalk28__default.default.blue("\n\u{1F4CB} This was a dry run - no changes were applied.")
|
|
33673
33675
|
);
|
|
33674
33676
|
console.log(
|
|
33675
|
-
|
|
33677
|
+
chalk28__default.default.gray(
|
|
33676
33678
|
"To apply changes, run the same command without --dry-run"
|
|
33677
33679
|
)
|
|
33678
33680
|
);
|
|
@@ -33680,30 +33682,30 @@ var init_ConfigCLI = __esm({
|
|
|
33680
33682
|
}
|
|
33681
33683
|
}
|
|
33682
33684
|
if (data2.message) {
|
|
33683
|
-
console.log(
|
|
33685
|
+
console.log(chalk28__default.default.green(data2.message));
|
|
33684
33686
|
}
|
|
33685
33687
|
if (data2.key && data2.value !== void 0) {
|
|
33686
|
-
console.log(
|
|
33688
|
+
console.log(chalk28__default.default.green(`\u2705 Configuration updated:`));
|
|
33687
33689
|
console.log(
|
|
33688
|
-
` ${
|
|
33690
|
+
` ${chalk28__default.default.bold(data2.key)}: ${chalk28__default.default.cyan(this.formatValue(data2.value))}`
|
|
33689
33691
|
);
|
|
33690
33692
|
if (data2.layer) {
|
|
33691
|
-
console.log(` Layer: ${
|
|
33693
|
+
console.log(` Layer: ${chalk28__default.default.magenta(data2.layer)}`);
|
|
33692
33694
|
}
|
|
33693
33695
|
}
|
|
33694
33696
|
if (data2.deleted) {
|
|
33695
33697
|
console.log(
|
|
33696
|
-
|
|
33698
|
+
chalk28__default.default.green(`\u2705 Configuration deleted: ${chalk28__default.default.bold(data2.key)}`)
|
|
33697
33699
|
);
|
|
33698
33700
|
}
|
|
33699
33701
|
if (data2.templateId) {
|
|
33700
33702
|
console.log(
|
|
33701
|
-
|
|
33703
|
+
chalk28__default.default.green(`\u2705 Template applied: ${chalk28__default.default.bold(data2.templateId)}`)
|
|
33702
33704
|
);
|
|
33703
33705
|
}
|
|
33704
33706
|
if (data2.rolledBack) {
|
|
33705
33707
|
console.log(
|
|
33706
|
-
|
|
33708
|
+
chalk28__default.default.green(`\u2705 Rolled back to entry: ${chalk28__default.default.bold(data2.entryId)}`)
|
|
33707
33709
|
);
|
|
33708
33710
|
}
|
|
33709
33711
|
if (data2.layers) {
|
|
@@ -33718,62 +33720,62 @@ var init_ConfigCLI = __esm({
|
|
|
33718
33720
|
console.log(JSON.stringify({ error: error2 }, null, 2));
|
|
33719
33721
|
return;
|
|
33720
33722
|
}
|
|
33721
|
-
console.error(
|
|
33723
|
+
console.error(chalk28__default.default.red(`\u274C Error: ${error2}`));
|
|
33722
33724
|
if (error2.includes("not found")) {
|
|
33723
33725
|
console.log(
|
|
33724
|
-
|
|
33726
|
+
chalk28__default.default.gray("\nTry: /config list # to see available configurations")
|
|
33725
33727
|
);
|
|
33726
33728
|
}
|
|
33727
33729
|
if (error2.includes("required")) {
|
|
33728
|
-
console.log(
|
|
33730
|
+
console.log(chalk28__default.default.gray("\nTry: /config help # to see command syntax"));
|
|
33729
33731
|
}
|
|
33730
33732
|
}
|
|
33731
33733
|
async displayPreview(preview) {
|
|
33732
|
-
console.log(
|
|
33733
|
-
console.log(`${
|
|
33734
|
+
console.log(chalk28__default.default.bold.cyan("\n\u{1F50D} Configuration Preview\n"));
|
|
33735
|
+
console.log(`${chalk28__default.default.bold("Operation:")} ${chalk28__default.default.cyan(preview.operation)}`);
|
|
33734
33736
|
if (preview.key) {
|
|
33735
|
-
console.log(`${
|
|
33737
|
+
console.log(`${chalk28__default.default.bold("Key:")} ${chalk28__default.default.yellow(preview.key)}`);
|
|
33736
33738
|
}
|
|
33737
33739
|
if (preview.value !== void 0) {
|
|
33738
33740
|
console.log(
|
|
33739
|
-
`${
|
|
33741
|
+
`${chalk28__default.default.bold("Value:")} ${chalk28__default.default.green(this.formatValue(preview.value))}`
|
|
33740
33742
|
);
|
|
33741
33743
|
}
|
|
33742
33744
|
if (preview.changes.length > 0) {
|
|
33743
|
-
console.log(
|
|
33745
|
+
console.log(chalk28__default.default.bold("\n\u{1F4DD} Changes:"));
|
|
33744
33746
|
for (const change of preview.changes) {
|
|
33745
33747
|
this.displayChange(change);
|
|
33746
33748
|
}
|
|
33747
33749
|
}
|
|
33748
33750
|
if (preview.affected.length > 0) {
|
|
33749
|
-
console.log(
|
|
33751
|
+
console.log(chalk28__default.default.bold("\n\u{1F517} Affected Configurations:"));
|
|
33750
33752
|
for (const affected of preview.affected) {
|
|
33751
33753
|
this.displayAffectedConfig(affected);
|
|
33752
33754
|
}
|
|
33753
33755
|
}
|
|
33754
33756
|
if (preview.risks.length > 0) {
|
|
33755
|
-
console.log(
|
|
33757
|
+
console.log(chalk28__default.default.bold("\n\u26A0\uFE0F Safety Analysis:"));
|
|
33756
33758
|
for (const risk of preview.risks) {
|
|
33757
33759
|
this.displaySafetyRisk(risk);
|
|
33758
33760
|
}
|
|
33759
33761
|
}
|
|
33760
33762
|
if (!preview.validation.ok) {
|
|
33761
|
-
console.log(
|
|
33763
|
+
console.log(chalk28__default.default.bold.red("\n\u274C Validation Errors:"));
|
|
33762
33764
|
if (preview.validation.errors) {
|
|
33763
33765
|
for (const error2 of preview.validation.errors) {
|
|
33764
|
-
console.log(` \u2022 ${
|
|
33766
|
+
console.log(` \u2022 ${chalk28__default.default.red(error2)}`);
|
|
33765
33767
|
}
|
|
33766
33768
|
}
|
|
33767
33769
|
} else if (preview.validation.warnings && preview.validation.warnings.length > 0) {
|
|
33768
|
-
console.log(
|
|
33770
|
+
console.log(chalk28__default.default.bold.yellow("\n\u26A0\uFE0F Validation Warnings:"));
|
|
33769
33771
|
for (const warning of preview.validation.warnings) {
|
|
33770
|
-
console.log(` \u2022 ${
|
|
33772
|
+
console.log(` \u2022 ${chalk28__default.default.yellow(warning)}`);
|
|
33771
33773
|
}
|
|
33772
33774
|
}
|
|
33773
33775
|
if (preview.requiresConfirmation && !preview.validation.dryRun) {
|
|
33774
33776
|
const confirmed = await this.promptConfirmation();
|
|
33775
33777
|
if (!confirmed) {
|
|
33776
|
-
console.log(
|
|
33778
|
+
console.log(chalk28__default.default.yellow("\n\u274C Operation cancelled"));
|
|
33777
33779
|
process.exit(0);
|
|
33778
33780
|
}
|
|
33779
33781
|
}
|
|
@@ -33785,42 +33787,42 @@ var init_ConfigCLI = __esm({
|
|
|
33785
33787
|
delete: "\u{1F5D1}\uFE0F"
|
|
33786
33788
|
};
|
|
33787
33789
|
const typeColor = {
|
|
33788
|
-
add:
|
|
33789
|
-
modify:
|
|
33790
|
-
delete:
|
|
33790
|
+
add: chalk28__default.default.green,
|
|
33791
|
+
modify: chalk28__default.default.yellow,
|
|
33792
|
+
delete: chalk28__default.default.red
|
|
33791
33793
|
};
|
|
33792
33794
|
console.log(
|
|
33793
|
-
` ${typeIcon[change.type]} ${typeColor[change.type](change.type.toUpperCase())}: ${
|
|
33795
|
+
` ${typeIcon[change.type]} ${typeColor[change.type](change.type.toUpperCase())}: ${chalk28__default.default.bold(change.key)}`
|
|
33794
33796
|
);
|
|
33795
33797
|
if (change.oldValue !== void 0) {
|
|
33796
33798
|
console.log(
|
|
33797
|
-
` ${
|
|
33799
|
+
` ${chalk28__default.default.gray("Old:")} ${chalk28__default.default.gray(this.formatValue(change.oldValue))}`
|
|
33798
33800
|
);
|
|
33799
33801
|
}
|
|
33800
33802
|
if (change.newValue !== void 0) {
|
|
33801
33803
|
console.log(
|
|
33802
|
-
` ${
|
|
33804
|
+
` ${chalk28__default.default.gray("New:")} ${chalk28__default.default.cyan(this.formatValue(change.newValue))}`
|
|
33803
33805
|
);
|
|
33804
33806
|
}
|
|
33805
|
-
console.log(` ${
|
|
33806
|
-
console.log(` ${
|
|
33807
|
+
console.log(` ${chalk28__default.default.gray("Layer:")} ${chalk28__default.default.magenta(change.layer)}`);
|
|
33808
|
+
console.log(` ${chalk28__default.default.gray(change.description)}`);
|
|
33807
33809
|
console.log();
|
|
33808
33810
|
}
|
|
33809
33811
|
displayAffectedConfig(affected) {
|
|
33810
33812
|
const impactColor = {
|
|
33811
|
-
low:
|
|
33812
|
-
medium:
|
|
33813
|
-
high:
|
|
33814
|
-
critical:
|
|
33813
|
+
low: chalk28__default.default.gray,
|
|
33814
|
+
medium: chalk28__default.default.yellow,
|
|
33815
|
+
high: chalk28__default.default.red,
|
|
33816
|
+
critical: chalk28__default.default.red.bold
|
|
33815
33817
|
};
|
|
33816
33818
|
console.log(
|
|
33817
|
-
` \u2022 ${
|
|
33819
|
+
` \u2022 ${chalk28__default.default.bold(affected.key)} (${chalk28__default.default.magenta(affected.layer)})`
|
|
33818
33820
|
);
|
|
33819
33821
|
console.log(
|
|
33820
33822
|
` Impact: ${impactColor[affected.impact](affected.impact.toUpperCase())}`
|
|
33821
33823
|
);
|
|
33822
|
-
console.log(` Relationship: ${
|
|
33823
|
-
console.log(` ${
|
|
33824
|
+
console.log(` Relationship: ${chalk28__default.default.cyan(affected.relationship)}`);
|
|
33825
|
+
console.log(` ${chalk28__default.default.gray(affected.description)}`);
|
|
33824
33826
|
console.log();
|
|
33825
33827
|
}
|
|
33826
33828
|
displaySafetyRisk(risk) {
|
|
@@ -33831,78 +33833,78 @@ var init_ConfigCLI = __esm({
|
|
|
33831
33833
|
critical: "\u{1F6A8}"
|
|
33832
33834
|
};
|
|
33833
33835
|
const levelColor = {
|
|
33834
|
-
info:
|
|
33835
|
-
warning:
|
|
33836
|
-
error:
|
|
33837
|
-
critical:
|
|
33836
|
+
info: chalk28__default.default.blue,
|
|
33837
|
+
warning: chalk28__default.default.yellow,
|
|
33838
|
+
error: chalk28__default.default.red,
|
|
33839
|
+
critical: chalk28__default.default.red.bold
|
|
33838
33840
|
};
|
|
33839
33841
|
console.log(
|
|
33840
33842
|
` ${levelIcon[risk.level]} ${levelColor[risk.level](risk.level.toUpperCase())}: ${risk.message}`
|
|
33841
33843
|
);
|
|
33842
33844
|
if (risk.recommendation) {
|
|
33843
33845
|
console.log(
|
|
33844
|
-
` ${
|
|
33846
|
+
` ${chalk28__default.default.gray("Recommendation:")} ${risk.recommendation}`
|
|
33845
33847
|
);
|
|
33846
33848
|
}
|
|
33847
33849
|
if (risk.autoFixable) {
|
|
33848
|
-
console.log(` ${
|
|
33850
|
+
console.log(` ${chalk28__default.default.green("Auto-fixable: Yes")}`);
|
|
33849
33851
|
}
|
|
33850
33852
|
console.log();
|
|
33851
33853
|
}
|
|
33852
33854
|
displayLayeredConfig(data2) {
|
|
33853
|
-
console.log(
|
|
33855
|
+
console.log(chalk28__default.default.bold(`
|
|
33854
33856
|
\u{1F4CB} ${data2.key} Configuration
|
|
33855
33857
|
`));
|
|
33856
33858
|
console.log(
|
|
33857
|
-
`${
|
|
33859
|
+
`${chalk28__default.default.bold("Effective Value:")} ${chalk28__default.default.cyan(this.formatValue(data2.value))}`
|
|
33858
33860
|
);
|
|
33859
|
-
console.log(`${
|
|
33861
|
+
console.log(`${chalk28__default.default.bold("Source Layer:")} ${chalk28__default.default.magenta(data2.source)}`);
|
|
33860
33862
|
console.log(
|
|
33861
|
-
`${
|
|
33863
|
+
`${chalk28__default.default.bold("Merged:")} ${data2.merged ? chalk28__default.default.yellow("Yes") : chalk28__default.default.gray("No")}`
|
|
33862
33864
|
);
|
|
33863
33865
|
if (data2.layers) {
|
|
33864
|
-
console.log(
|
|
33866
|
+
console.log(chalk28__default.default.bold("\nLayer Values:"));
|
|
33865
33867
|
const layers = ["runtime", "project", "user", "global"];
|
|
33866
33868
|
for (const layer of layers) {
|
|
33867
33869
|
const value = data2.layers[layer];
|
|
33868
33870
|
if (value !== void 0) {
|
|
33869
33871
|
const isActive = layer === data2.source;
|
|
33870
|
-
const layerDisplay = isActive ?
|
|
33872
|
+
const layerDisplay = isActive ? chalk28__default.default.bold.magenta(`${layer} (active)`) : chalk28__default.default.gray(layer);
|
|
33871
33873
|
console.log(
|
|
33872
|
-
` ${layerDisplay}: ${
|
|
33874
|
+
` ${layerDisplay}: ${chalk28__default.default.cyan(this.formatValue(value))}`
|
|
33873
33875
|
);
|
|
33874
33876
|
}
|
|
33875
33877
|
}
|
|
33876
33878
|
}
|
|
33877
33879
|
}
|
|
33878
33880
|
displayConfigList(configs) {
|
|
33879
|
-
console.log(
|
|
33881
|
+
console.log(chalk28__default.default.bold("\n\u2699\uFE0F Configuration Settings\n"));
|
|
33880
33882
|
if (Object.keys(configs).length === 0) {
|
|
33881
|
-
console.log(
|
|
33883
|
+
console.log(chalk28__default.default.gray("No configurations found."));
|
|
33882
33884
|
return;
|
|
33883
33885
|
}
|
|
33884
33886
|
const categorized = this.categorizeConfigs(configs);
|
|
33885
33887
|
for (const [category, items] of Object.entries(categorized)) {
|
|
33886
33888
|
if (Object.keys(items).length === 0) continue;
|
|
33887
33889
|
console.log(
|
|
33888
|
-
|
|
33890
|
+
chalk28__default.default.bold.cyan(`${this.getCategoryIcon(category)} ${category}`)
|
|
33889
33891
|
);
|
|
33890
|
-
console.log(
|
|
33892
|
+
console.log(chalk28__default.default.gray("\u2500".repeat(category.length + 4)));
|
|
33891
33893
|
for (const [key2, value] of Object.entries(items)) {
|
|
33892
33894
|
console.log(
|
|
33893
|
-
` ${
|
|
33895
|
+
` ${chalk28__default.default.bold(key2)}: ${chalk28__default.default.cyan(this.formatValue(value))}`
|
|
33894
33896
|
);
|
|
33895
33897
|
}
|
|
33896
33898
|
console.log();
|
|
33897
33899
|
}
|
|
33898
33900
|
console.log(
|
|
33899
|
-
|
|
33901
|
+
chalk28__default.default.gray(`Total: ${Object.keys(configs).length} configuration(s)`)
|
|
33900
33902
|
);
|
|
33901
33903
|
}
|
|
33902
33904
|
async promptConfirmation() {
|
|
33903
33905
|
return new Promise((resolve8) => {
|
|
33904
33906
|
this.rl.question(
|
|
33905
|
-
|
|
33907
|
+
chalk28__default.default.bold("\nDo you want to proceed? [y/N]: "),
|
|
33906
33908
|
(answer) => {
|
|
33907
33909
|
resolve8(["y", "yes", "Y", "YES"].includes(answer.trim()));
|
|
33908
33910
|
}
|
|
@@ -33911,20 +33913,20 @@ var init_ConfigCLI = __esm({
|
|
|
33911
33913
|
}
|
|
33912
33914
|
formatValue(value) {
|
|
33913
33915
|
if (value === null || value === void 0) {
|
|
33914
|
-
return
|
|
33916
|
+
return chalk28__default.default.gray("null");
|
|
33915
33917
|
}
|
|
33916
33918
|
if (typeof value === "string") {
|
|
33917
33919
|
const isSensitive = this.isSensitiveValue(value);
|
|
33918
33920
|
if (isSensitive) {
|
|
33919
|
-
return
|
|
33921
|
+
return chalk28__default.default.gray("********");
|
|
33920
33922
|
}
|
|
33921
33923
|
return `"${value}"`;
|
|
33922
33924
|
}
|
|
33923
33925
|
if (typeof value === "boolean") {
|
|
33924
|
-
return value ?
|
|
33926
|
+
return value ? chalk28__default.default.green("true") : chalk28__default.default.red("false");
|
|
33925
33927
|
}
|
|
33926
33928
|
if (typeof value === "number") {
|
|
33927
|
-
return
|
|
33929
|
+
return chalk28__default.default.blue(value.toString());
|
|
33928
33930
|
}
|
|
33929
33931
|
if (Array.isArray(value)) {
|
|
33930
33932
|
return `[${value.map((v) => this.formatValue(v)).join(", ")}]`;
|
|
@@ -35399,8 +35401,8 @@ var init_api_caller = __esm({
|
|
|
35399
35401
|
});
|
|
35400
35402
|
function handleRateLimitError(error2) {
|
|
35401
35403
|
console.log();
|
|
35402
|
-
console.log(
|
|
35403
|
-
console.log(
|
|
35404
|
+
console.log(chalk28__default.default.yellow("\u23F1\uFE0F Rate Limit Exceeded"));
|
|
35405
|
+
console.log(chalk28__default.default.gray("\u2501".repeat(50)));
|
|
35404
35406
|
const route = error2.route || error2.details?.endpoint || "API";
|
|
35405
35407
|
const plan = error2.plan || error2.details?.plan || "Unknown";
|
|
35406
35408
|
const limit = error2.limit || (error2.details?.limit ? parseInt(error2.details.limit) : null);
|
|
@@ -35418,24 +35420,24 @@ function handleRateLimitError(error2) {
|
|
|
35418
35420
|
resetTime = `at ${resetDate.toLocaleTimeString()}`;
|
|
35419
35421
|
}
|
|
35420
35422
|
}
|
|
35421
|
-
console.log(
|
|
35422
|
-
console.log(
|
|
35423
|
+
console.log(chalk28__default.default.white(`Plan: ${chalk28__default.default.bold(plan)}`));
|
|
35424
|
+
console.log(chalk28__default.default.white(`Endpoint: ${chalk28__default.default.bold(route)}`));
|
|
35423
35425
|
if (limit !== null) {
|
|
35424
|
-
console.log(
|
|
35426
|
+
console.log(chalk28__default.default.white(`Limit: ${chalk28__default.default.bold(limit)} requests`));
|
|
35425
35427
|
}
|
|
35426
35428
|
if (error2.remaining !== void 0) {
|
|
35427
|
-
console.log(
|
|
35429
|
+
console.log(chalk28__default.default.white(`Remaining: ${chalk28__default.default.bold(error2.remaining)} requests`));
|
|
35428
35430
|
}
|
|
35429
35431
|
console.log();
|
|
35430
|
-
console.log(
|
|
35432
|
+
console.log(chalk28__default.default.cyan(`Please wait ${chalk28__default.default.bold(waitTime)} before trying again`));
|
|
35431
35433
|
if (resetTime) {
|
|
35432
|
-
console.log(
|
|
35434
|
+
console.log(chalk28__default.default.gray(`Rate limit resets ${resetTime}`));
|
|
35433
35435
|
}
|
|
35434
35436
|
if (error2.hint) {
|
|
35435
35437
|
console.log();
|
|
35436
|
-
console.log(
|
|
35438
|
+
console.log(chalk28__default.default.magenta("\u{1F4A1} " + error2.hint));
|
|
35437
35439
|
}
|
|
35438
|
-
console.log(
|
|
35440
|
+
console.log(chalk28__default.default.gray("\u2501".repeat(50)));
|
|
35439
35441
|
console.log();
|
|
35440
35442
|
}
|
|
35441
35443
|
async function parseRateLimitResponse(response2) {
|
|
@@ -40346,7 +40348,7 @@ var init_model_selector_ui = __esm({
|
|
|
40346
40348
|
output: process.stdout,
|
|
40347
40349
|
terminal: true
|
|
40348
40350
|
});
|
|
40349
|
-
console.log(
|
|
40351
|
+
console.log(chalk28__default.default.green(
|
|
40350
40352
|
"\u250C\u2500[ MODEL MATRIX ]\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"
|
|
40351
40353
|
));
|
|
40352
40354
|
process.stdout.write("\x1B7");
|
|
@@ -40414,14 +40416,14 @@ var init_model_selector_ui = __esm({
|
|
|
40414
40416
|
}
|
|
40415
40417
|
renderFromSavedPosition() {
|
|
40416
40418
|
if (this.isDestroyed) return;
|
|
40417
|
-
console.log(
|
|
40418
|
-
"\u2502 " +
|
|
40419
|
+
console.log(chalk28__default.default.green(
|
|
40420
|
+
"\u2502 " + chalk28__default.default.greenBright("SELECT MODEL:") + " ".repeat(62) + "\u2502"
|
|
40419
40421
|
));
|
|
40420
40422
|
this.renderContent();
|
|
40421
40423
|
const scrollInfo = `[${this.selectedIndex + 1}/${this.models.length}]`;
|
|
40422
40424
|
const helpText = `\u2193:NEXT \u2191:PREV ENTER:EXEC ESC:ABORT ${scrollInfo}`;
|
|
40423
|
-
console.log(
|
|
40424
|
-
console.log(
|
|
40425
|
+
console.log(chalk28__default.default.green("\u2502 ") + chalk28__default.default.dim.green(helpText.padEnd(76)) + chalk28__default.default.green(" \u2502"));
|
|
40426
|
+
console.log(chalk28__default.default.green(
|
|
40425
40427
|
"\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"
|
|
40426
40428
|
));
|
|
40427
40429
|
}
|
|
@@ -40462,19 +40464,19 @@ var init_model_selector_ui = __esm({
|
|
|
40462
40464
|
const item = displayItems[i2];
|
|
40463
40465
|
if (item.type === "group") {
|
|
40464
40466
|
console.log(
|
|
40465
|
-
|
|
40467
|
+
chalk28__default.default.green("\u2502") + chalk28__default.default.dim.green(" \u2501\u2501\u2501 ") + chalk28__default.default.greenBright(item.content.substring(2, item.content.indexOf(" \u2500"))) + chalk28__default.default.dim.green(" " + "\u2501".repeat(71 - item.content.indexOf(" \u2500"))) + chalk28__default.default.green("\u2502")
|
|
40466
40468
|
);
|
|
40467
40469
|
} else {
|
|
40468
40470
|
const isSelected = item.modelIndex === this.selectedIndex;
|
|
40469
|
-
const prefix = isSelected ?
|
|
40471
|
+
const prefix = isSelected ? chalk28__default.default.greenBright("\u25B6 ") : " ";
|
|
40470
40472
|
const modelText = item.content;
|
|
40471
40473
|
if (isSelected) {
|
|
40472
40474
|
console.log(
|
|
40473
|
-
|
|
40475
|
+
chalk28__default.default.green("\u2502") + prefix + chalk28__default.default.black.bgGreen(modelText.padEnd(75)) + chalk28__default.default.green("\u2502")
|
|
40474
40476
|
);
|
|
40475
40477
|
} else {
|
|
40476
40478
|
console.log(
|
|
40477
|
-
|
|
40479
|
+
chalk28__default.default.green("\u2502") + prefix + chalk28__default.default.green(modelText.substring(0, 75).padEnd(75)) + chalk28__default.default.green("\u2502")
|
|
40478
40480
|
);
|
|
40479
40481
|
}
|
|
40480
40482
|
}
|
|
@@ -42619,129 +42621,129 @@ function displayStartupLogo() {
|
|
|
42619
42621
|
process.stdout.write("\x1B[2J\x1B[3J\x1B[H");
|
|
42620
42622
|
console.log("");
|
|
42621
42623
|
console.log(
|
|
42622
|
-
|
|
42624
|
+
chalk28__default.default.magentaBright(
|
|
42623
42625
|
"\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"
|
|
42624
42626
|
)
|
|
42625
42627
|
);
|
|
42626
42628
|
console.log(
|
|
42627
|
-
|
|
42629
|
+
chalk28__default.default.magentaBright(
|
|
42628
42630
|
"\u2551 \u2551"
|
|
42629
42631
|
)
|
|
42630
42632
|
);
|
|
42631
42633
|
console.log(
|
|
42632
|
-
|
|
42634
|
+
chalk28__default.default.magentaBright(
|
|
42633
42635
|
"\u2551 \u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2551"
|
|
42634
42636
|
)
|
|
42635
42637
|
);
|
|
42636
42638
|
console.log(
|
|
42637
|
-
|
|
42639
|
+
chalk28__default.default.magentaBright(
|
|
42638
42640
|
"\u2551 \u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u2551"
|
|
42639
42641
|
)
|
|
42640
42642
|
);
|
|
42641
42643
|
console.log(
|
|
42642
|
-
|
|
42644
|
+
chalk28__default.default.magentaBright(
|
|
42643
42645
|
"\u2551 \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2551"
|
|
42644
42646
|
)
|
|
42645
42647
|
);
|
|
42646
42648
|
console.log(
|
|
42647
|
-
|
|
42649
|
+
chalk28__default.default.magentaBright(
|
|
42648
42650
|
"\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551 \u2551"
|
|
42649
42651
|
)
|
|
42650
42652
|
);
|
|
42651
42653
|
console.log(
|
|
42652
|
-
|
|
42654
|
+
chalk28__default.default.magentaBright(
|
|
42653
42655
|
"\u2551 \u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2551"
|
|
42654
42656
|
)
|
|
42655
42657
|
);
|
|
42656
42658
|
console.log(
|
|
42657
|
-
|
|
42659
|
+
chalk28__default.default.magentaBright(
|
|
42658
42660
|
"\u2551 \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u2551"
|
|
42659
42661
|
)
|
|
42660
42662
|
);
|
|
42661
42663
|
console.log(
|
|
42662
|
-
|
|
42664
|
+
chalk28__default.default.magentaBright(
|
|
42663
42665
|
"\u2551 \u2551"
|
|
42664
42666
|
)
|
|
42665
42667
|
);
|
|
42666
42668
|
console.log(
|
|
42667
|
-
|
|
42669
|
+
chalk28__default.default.magentaBright(
|
|
42668
42670
|
"\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2551"
|
|
42669
42671
|
)
|
|
42670
42672
|
);
|
|
42671
42673
|
console.log(
|
|
42672
|
-
|
|
42674
|
+
chalk28__default.default.magentaBright(
|
|
42673
42675
|
"\u2551 \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2551"
|
|
42674
42676
|
)
|
|
42675
42677
|
);
|
|
42676
42678
|
console.log(
|
|
42677
|
-
|
|
42679
|
+
chalk28__default.default.magentaBright(
|
|
42678
42680
|
"\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2551"
|
|
42679
42681
|
)
|
|
42680
42682
|
);
|
|
42681
42683
|
console.log(
|
|
42682
|
-
|
|
42684
|
+
chalk28__default.default.magentaBright(
|
|
42683
42685
|
"\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2551"
|
|
42684
42686
|
)
|
|
42685
42687
|
);
|
|
42686
42688
|
console.log(
|
|
42687
|
-
|
|
42689
|
+
chalk28__default.default.magentaBright(
|
|
42688
42690
|
"\u2551 \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2551"
|
|
42689
42691
|
)
|
|
42690
42692
|
);
|
|
42691
42693
|
console.log(
|
|
42692
|
-
|
|
42694
|
+
chalk28__default.default.magentaBright(
|
|
42693
42695
|
"\u2551 \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u2551"
|
|
42694
42696
|
)
|
|
42695
42697
|
);
|
|
42696
42698
|
console.log(
|
|
42697
|
-
|
|
42699
|
+
chalk28__default.default.magentaBright(
|
|
42698
42700
|
"\u2551 \u2551"
|
|
42699
42701
|
)
|
|
42700
42702
|
);
|
|
42701
42703
|
console.log(
|
|
42702
|
-
|
|
42704
|
+
chalk28__default.default.magentaBright(
|
|
42703
42705
|
"\u2551 AI-Powered Development Platform \u2551"
|
|
42704
42706
|
)
|
|
42705
42707
|
);
|
|
42706
42708
|
console.log(
|
|
42707
|
-
|
|
42709
|
+
chalk28__default.default.magentaBright(
|
|
42708
42710
|
"\u2551 (c) 2025 Bonginkan Inc. \u2551"
|
|
42709
42711
|
)
|
|
42710
42712
|
);
|
|
42711
42713
|
console.log(
|
|
42712
|
-
|
|
42714
|
+
chalk28__default.default.magentaBright(
|
|
42713
42715
|
"\u2551 \u2551"
|
|
42714
42716
|
)
|
|
42715
42717
|
);
|
|
42716
42718
|
console.log(
|
|
42717
|
-
|
|
42719
|
+
chalk28__default.default.magentaBright(
|
|
42718
42720
|
"\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"
|
|
42719
42721
|
)
|
|
42720
42722
|
);
|
|
42721
42723
|
console.log("");
|
|
42722
42724
|
console.log(
|
|
42723
|
-
|
|
42725
|
+
chalk28__default.default.cyan.bold(`MARIA CODE v${getVersion()}`) + chalk28__default.default.gray(" \u2014 Ready")
|
|
42724
42726
|
);
|
|
42725
42727
|
console.log(
|
|
42726
|
-
|
|
42728
|
+
chalk28__default.default.yellow("Type /login to get started \xB7 /help for commands")
|
|
42727
42729
|
);
|
|
42728
42730
|
console.log("");
|
|
42729
42731
|
}
|
|
42730
42732
|
function displayCompactLogo() {
|
|
42731
42733
|
process.stdout.write("\x1B[2J\x1B[H");
|
|
42732
42734
|
console.log(
|
|
42733
|
-
|
|
42735
|
+
chalk28__default.default.cyan.bold(`MARIA CODE v${getVersion()}`) + chalk28__default.default.gray(" \u2014 Ready")
|
|
42734
42736
|
);
|
|
42735
42737
|
console.log(
|
|
42736
|
-
|
|
42738
|
+
chalk28__default.default.yellow("Type /login to get started \xB7 /help for commands")
|
|
42737
42739
|
);
|
|
42738
42740
|
console.log("");
|
|
42739
42741
|
}
|
|
42740
42742
|
function displayDashboardHeader() {
|
|
42741
42743
|
process.stdout.write("\x1B[2J\x1B[H");
|
|
42742
|
-
const version =
|
|
42743
|
-
const commands =
|
|
42744
|
-
const providers =
|
|
42744
|
+
const version = chalk28__default.default.cyan.bold(`MARIA CODE v${getVersion()}`);
|
|
42745
|
+
const commands = chalk28__default.default.gray(" | /help /status /model");
|
|
42746
|
+
const providers = chalk28__default.default.gray(
|
|
42745
42747
|
"Providers: 8/8 OK (openai, anthropic, google, groq, lmstudio, ollama, vllm)"
|
|
42746
42748
|
);
|
|
42747
42749
|
console.log(version + commands);
|
|
@@ -42750,8 +42752,8 @@ function displayDashboardHeader() {
|
|
|
42750
42752
|
}
|
|
42751
42753
|
function displayLogsBox(logs) {
|
|
42752
42754
|
const width = getResponsiveWidth({ marginLeft: 5, marginRight: 5, maxWidth: 120 });
|
|
42753
|
-
const borderColor =
|
|
42754
|
-
const titleColor =
|
|
42755
|
+
const borderColor = chalk28__default.default.white;
|
|
42756
|
+
const titleColor = chalk28__default.default.cyan;
|
|
42755
42757
|
const topLeft = "\u250C";
|
|
42756
42758
|
const topRight = "\u2510";
|
|
42757
42759
|
const bottomLeft = "\u2514";
|
|
@@ -42784,7 +42786,7 @@ function displayLogsBox(logs) {
|
|
|
42784
42786
|
function displaySpinner(text = "Processing") {
|
|
42785
42787
|
const spinnerFrames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
42786
42788
|
const frame = spinnerFrames[Math.floor(Date.now() / 80) % spinnerFrames.length];
|
|
42787
|
-
process.stdout.write(`\r[${
|
|
42789
|
+
process.stdout.write(`\r[${chalk28__default.default.cyan(frame)}] ${text}...`);
|
|
42788
42790
|
}
|
|
42789
42791
|
function getCurrentPath() {
|
|
42790
42792
|
return process.cwd();
|
|
@@ -42802,18 +42804,18 @@ async function displayFinalStartupScreen(_selectedProvider, _selectedModel) {
|
|
|
42802
42804
|
const version = getVersion();
|
|
42803
42805
|
const systemInfo = getSystemInfo();
|
|
42804
42806
|
console.log(
|
|
42805
|
-
|
|
42807
|
+
chalk28__default.default.cyan.bold(`MARIA CODE v${version}`) + chalk28__default.default.gray(" \u2014 Ready")
|
|
42806
42808
|
);
|
|
42807
42809
|
const cwd2 = systemInfo.cwd.replace(os12__namespace.homedir(), "~");
|
|
42808
|
-
console.log(
|
|
42809
|
-
console.log(
|
|
42810
|
-
console.log(
|
|
42810
|
+
console.log(chalk28__default.default.gray("cwd: ") + chalk28__default.default.white(cwd2));
|
|
42811
|
+
console.log(chalk28__default.default.gray("Not signed in"));
|
|
42812
|
+
console.log(chalk28__default.default.yellow("Tip: /login \xB7 /help \xB7 /help code"));
|
|
42811
42813
|
console.log("");
|
|
42812
42814
|
}
|
|
42813
42815
|
function displayRoundedInputBox() {
|
|
42814
42816
|
const width = getResponsiveWidth({ marginLeft: 5, marginRight: 5, maxWidth: 90 });
|
|
42815
|
-
const borderColor =
|
|
42816
|
-
const promptColor =
|
|
42817
|
+
const borderColor = chalk28__default.default.white;
|
|
42818
|
+
const promptColor = chalk28__default.default.cyan;
|
|
42817
42819
|
const topLeft = "\u256D";
|
|
42818
42820
|
const topRight = "\u256E";
|
|
42819
42821
|
const bottomLeft = "\u2570";
|
|
@@ -42823,7 +42825,7 @@ function displayRoundedInputBox() {
|
|
|
42823
42825
|
const lines = [];
|
|
42824
42826
|
lines.push(borderColor(topLeft + horizontal.repeat(width - 2) + topRight));
|
|
42825
42827
|
const promptStr = promptColor("> ");
|
|
42826
|
-
const placeholder =
|
|
42828
|
+
const placeholder = chalk28__default.default.gray("");
|
|
42827
42829
|
const inputLine = promptStr + placeholder;
|
|
42828
42830
|
const padding = width - 4;
|
|
42829
42831
|
lines.push(
|
|
@@ -42977,29 +42979,29 @@ var init_provider_selector = __esm({
|
|
|
42977
42979
|
const inquirer = await import('inquirer');
|
|
42978
42980
|
const prompt = inquirer.default?.prompt || inquirer.prompt;
|
|
42979
42981
|
const providers = await this.getAvailableProviders();
|
|
42980
|
-
console.log(
|
|
42981
|
-
console.log(
|
|
42982
|
+
console.log(chalk28__default.default.cyan("\nAvailable AI Providers:"));
|
|
42983
|
+
console.log(chalk28__default.default.gray("\u2500".repeat(50)));
|
|
42982
42984
|
const _cloudProviders = providers.filter((p) => p.type === "cloud");
|
|
42983
42985
|
const _localProviders = providers.filter((p) => p.type === "local");
|
|
42984
42986
|
if (_cloudProviders.length > 0) {
|
|
42985
|
-
console.log(
|
|
42987
|
+
console.log(chalk28__default.default.yellow("\n\u2601\uFE0F Cloud AI:"));
|
|
42986
42988
|
_cloudProviders.forEach((p) => {
|
|
42987
42989
|
if (p.available) {
|
|
42988
42990
|
console.log(
|
|
42989
|
-
` ${
|
|
42991
|
+
` ${chalk28__default.default.green("*")} ${chalk28__default.default.white(p.name.split(" ")[0])}`
|
|
42990
42992
|
);
|
|
42991
42993
|
} else {
|
|
42992
|
-
console.log(` ${
|
|
42994
|
+
console.log(` ${chalk28__default.default.gray(p.name.split(" ")[0])}`);
|
|
42993
42995
|
}
|
|
42994
42996
|
});
|
|
42995
42997
|
}
|
|
42996
42998
|
if (_localProviders.length > 0) {
|
|
42997
|
-
console.log(
|
|
42999
|
+
console.log(chalk28__default.default.cyan("\n\u{1F4BB} Local AI:"));
|
|
42998
43000
|
_localProviders.forEach((p) => {
|
|
42999
43001
|
if (p.available) {
|
|
43000
|
-
console.log(` ${
|
|
43002
|
+
console.log(` ${chalk28__default.default.green("*")} ${chalk28__default.default.white(p.name)}`);
|
|
43001
43003
|
} else {
|
|
43002
|
-
console.log(` ${
|
|
43004
|
+
console.log(` ${chalk28__default.default.green("*")} ${chalk28__default.default.gray(p.name)}`);
|
|
43003
43005
|
}
|
|
43004
43006
|
});
|
|
43005
43007
|
}
|
|
@@ -43014,20 +43016,20 @@ var init_provider_selector = __esm({
|
|
|
43014
43016
|
});
|
|
43015
43017
|
if (selectableProviders.length === 0) {
|
|
43016
43018
|
console.log(
|
|
43017
|
-
|
|
43019
|
+
chalk28__default.default.yellow("\n\u26A0\uFE0F No AI providers are currently available.")
|
|
43018
43020
|
);
|
|
43019
|
-
console.log(
|
|
43021
|
+
console.log(chalk28__default.default.gray("\nTo use MARIA, you need to:"));
|
|
43020
43022
|
console.log(
|
|
43021
|
-
|
|
43023
|
+
chalk28__default.default.gray(
|
|
43022
43024
|
"1. Set up API keys for cloud providers (OpenAI, Anthropic, Google, etc.)"
|
|
43023
43025
|
)
|
|
43024
43026
|
);
|
|
43025
|
-
console.log(
|
|
43027
|
+
console.log(chalk28__default.default.gray(" Example: export OPENAI_API_KEY=your_api_key"));
|
|
43026
43028
|
console.log(
|
|
43027
|
-
|
|
43029
|
+
chalk28__default.default.gray("2. Or start a local AI service (Ollama, LM Studio, vLLM)")
|
|
43028
43030
|
);
|
|
43029
|
-
console.log(
|
|
43030
|
-
console.log(
|
|
43031
|
+
console.log(chalk28__default.default.gray(" Example: maria setup-ollama"));
|
|
43032
|
+
console.log(chalk28__default.default.gray("\nFor more information, run: maria --help"));
|
|
43031
43033
|
process.exit(1);
|
|
43032
43034
|
}
|
|
43033
43035
|
const choices = selectableProviders.map((p) => ({
|
|
@@ -43048,29 +43050,29 @@ var init_provider_selector = __esm({
|
|
|
43048
43050
|
const provider = providers.find((p) => p.value === selectedProvider);
|
|
43049
43051
|
if (provider && provider.type === "local" && !provider.available) {
|
|
43050
43052
|
console.log(
|
|
43051
|
-
|
|
43053
|
+
chalk28__default.default.yellow(`
|
|
43052
43054
|
\u26A0\uFE0F ${provider.name} is not currently running.`)
|
|
43053
43055
|
);
|
|
43054
|
-
console.log(
|
|
43056
|
+
console.log(chalk28__default.default.gray(`
|
|
43055
43057
|
To use ${provider.name}, you need to:`));
|
|
43056
43058
|
if (selectedProvider === "ollama") {
|
|
43057
|
-
console.log(
|
|
43058
|
-
console.log(
|
|
43059
|
-
console.log(
|
|
43059
|
+
console.log(chalk28__default.default.gray("1. Install Ollama: brew install ollama"));
|
|
43060
|
+
console.log(chalk28__default.default.gray("2. Start Ollama: ollama serve"));
|
|
43061
|
+
console.log(chalk28__default.default.gray("3. Pull a model: ollama pull llama3.2:3b"));
|
|
43060
43062
|
console.log(
|
|
43061
|
-
|
|
43063
|
+
chalk28__default.default.gray("\nOr use the setup command: maria setup-ollama")
|
|
43062
43064
|
);
|
|
43063
43065
|
} else if (selectedProvider === "lmstudio") {
|
|
43064
43066
|
console.log(
|
|
43065
|
-
|
|
43067
|
+
chalk28__default.default.gray("1. Download LM Studio from https://lmstudio.ai")
|
|
43066
43068
|
);
|
|
43067
|
-
console.log(
|
|
43068
|
-
console.log(
|
|
43069
|
-
console.log(
|
|
43069
|
+
console.log(chalk28__default.default.gray("2. Start LM Studio application"));
|
|
43070
|
+
console.log(chalk28__default.default.gray("3. Load a model in LM Studio"));
|
|
43071
|
+
console.log(chalk28__default.default.gray("4. Start the local server in LM Studio"));
|
|
43070
43072
|
} else if (selectedProvider === "vllm") {
|
|
43071
|
-
console.log(
|
|
43072
|
-
console.log(
|
|
43073
|
-
console.log(
|
|
43073
|
+
console.log(chalk28__default.default.gray("1. Install vLLM: pip install vllm"));
|
|
43074
|
+
console.log(chalk28__default.default.gray("2. Start vLLM server with a model"));
|
|
43075
|
+
console.log(chalk28__default.default.gray("\nOr use the setup command: maria setup-vllm"));
|
|
43074
43076
|
}
|
|
43075
43077
|
process.exit(1);
|
|
43076
43078
|
}
|
|
@@ -46325,7 +46327,7 @@ var init_IntelligentRouterService = __esm({
|
|
|
46325
46327
|
this.emit("initialized");
|
|
46326
46328
|
} catch (_error) {
|
|
46327
46329
|
console._error(
|
|
46328
|
-
|
|
46330
|
+
chalk28__default.default.red("Failed to initialize Intelligent Router:"),
|
|
46329
46331
|
_error
|
|
46330
46332
|
);
|
|
46331
46333
|
throw _error;
|
|
@@ -46379,7 +46381,7 @@ var init_IntelligentRouterService = __esm({
|
|
|
46379
46381
|
} catch (_error) {
|
|
46380
46382
|
this.metrics.failedRoutes++;
|
|
46381
46383
|
this.emit("route:_error", { input: input3, _error });
|
|
46382
|
-
console._error(
|
|
46384
|
+
console._error(chalk28__default.default.red("Routing _error:"), _error);
|
|
46383
46385
|
return null;
|
|
46384
46386
|
}
|
|
46385
46387
|
}
|
|
@@ -49118,16 +49120,16 @@ var init_log_symbols = __esm({
|
|
|
49118
49120
|
"node_modules/.pnpm/log-symbols@6.0.0/node_modules/log-symbols/index.js"() {
|
|
49119
49121
|
init_is_unicode_supported();
|
|
49120
49122
|
main = {
|
|
49121
|
-
info:
|
|
49122
|
-
success:
|
|
49123
|
-
warning:
|
|
49124
|
-
error:
|
|
49123
|
+
info: chalk28__default.default.blue("\u2139"),
|
|
49124
|
+
success: chalk28__default.default.green("\u2714"),
|
|
49125
|
+
warning: chalk28__default.default.yellow("\u26A0"),
|
|
49126
|
+
error: chalk28__default.default.red("\u2716")
|
|
49125
49127
|
};
|
|
49126
49128
|
fallback = {
|
|
49127
|
-
info:
|
|
49128
|
-
success:
|
|
49129
|
-
warning:
|
|
49130
|
-
error:
|
|
49129
|
+
info: chalk28__default.default.blue("i"),
|
|
49130
|
+
success: chalk28__default.default.green("\u221A"),
|
|
49131
|
+
warning: chalk28__default.default.yellow("\u203C"),
|
|
49132
|
+
error: chalk28__default.default.red("\xD7")
|
|
49131
49133
|
};
|
|
49132
49134
|
logSymbols = isUnicodeSupported() ? main : fallback;
|
|
49133
49135
|
log_symbols_default = logSymbols;
|
|
@@ -49524,7 +49526,7 @@ var init_ora = __esm({
|
|
|
49524
49526
|
const { frames } = this.#spinner;
|
|
49525
49527
|
let frame = frames[this.#frameIndex];
|
|
49526
49528
|
if (this.color) {
|
|
49527
|
-
frame =
|
|
49529
|
+
frame = chalk28__default.default[this.color](frame);
|
|
49528
49530
|
}
|
|
49529
49531
|
const fullPrefixText = typeof this.#prefixText === "string" && this.#prefixText !== "" ? this.#prefixText + " " : "";
|
|
49530
49532
|
const fullText = typeof this.text === "string" ? " " + this.text : "";
|
|
@@ -49644,28 +49646,28 @@ var init_ChalkAdapter = __esm({
|
|
|
49644
49646
|
spinnerId = 0;
|
|
49645
49647
|
async showWelcome() {
|
|
49646
49648
|
console.log(
|
|
49647
|
-
|
|
49649
|
+
chalk28__default.default.cyan.bold("\n\u{1F916} Welcome to MARIA Interactive Session v3.5.0")
|
|
49648
49650
|
);
|
|
49649
|
-
console.log(
|
|
49651
|
+
console.log(chalk28__default.default.gray("Type /help for available commands\n"));
|
|
49650
49652
|
}
|
|
49651
49653
|
showGoodbye() {
|
|
49652
49654
|
this.stopAllSpinners();
|
|
49653
|
-
console.log(
|
|
49655
|
+
console.log(chalk28__default.default.green("\n\u{1F44B} Goodbye! Thank you for using MARIA.\n"));
|
|
49654
49656
|
}
|
|
49655
49657
|
async print(message) {
|
|
49656
49658
|
console.log(message);
|
|
49657
49659
|
}
|
|
49658
49660
|
error(message) {
|
|
49659
|
-
console.error(
|
|
49661
|
+
console.error(chalk28__default.default.red(`\u274C ${message}`));
|
|
49660
49662
|
}
|
|
49661
49663
|
success(message) {
|
|
49662
|
-
console.log(
|
|
49664
|
+
console.log(chalk28__default.default.green(`\u2705 ${message}`));
|
|
49663
49665
|
}
|
|
49664
49666
|
warning(message) {
|
|
49665
|
-
console.warn(
|
|
49667
|
+
console.warn(chalk28__default.default.yellow(`\u26A0\uFE0F ${message}`));
|
|
49666
49668
|
}
|
|
49667
49669
|
info(message) {
|
|
49668
|
-
console.info(
|
|
49670
|
+
console.info(chalk28__default.default.blue(`\u2139\uFE0F ${message}`));
|
|
49669
49671
|
}
|
|
49670
49672
|
startSpinner(message) {
|
|
49671
49673
|
const id = `spinner-${++this.spinnerId}`;
|
|
@@ -49715,12 +49717,12 @@ var init_ChalkAdapter = __esm({
|
|
|
49715
49717
|
* Format helpers for consistent styling
|
|
49716
49718
|
*/
|
|
49717
49719
|
static format = {
|
|
49718
|
-
command: (text) =>
|
|
49719
|
-
keyword: (text) =>
|
|
49720
|
-
value: (text) =>
|
|
49721
|
-
dim: (text) =>
|
|
49722
|
-
bold: (text) =>
|
|
49723
|
-
code: (text) =>
|
|
49720
|
+
command: (text) => chalk28__default.default.cyan(text),
|
|
49721
|
+
keyword: (text) => chalk28__default.default.magenta(text),
|
|
49722
|
+
value: (text) => chalk28__default.default.green(text),
|
|
49723
|
+
dim: (text) => chalk28__default.default.gray(text),
|
|
49724
|
+
bold: (text) => chalk28__default.default.bold(text),
|
|
49725
|
+
code: (text) => chalk28__default.default.bgGray.white(` ${text} `)
|
|
49724
49726
|
};
|
|
49725
49727
|
};
|
|
49726
49728
|
}
|
|
@@ -54870,26 +54872,26 @@ var init_QuickApprovalInterface = __esm({
|
|
|
54870
54872
|
const _lang = options2.language || "en";
|
|
54871
54873
|
const _labels = LANGUAGE_LABELS[_lang] || LANGUAGE_LABELS.en;
|
|
54872
54874
|
console.log("");
|
|
54873
|
-
console.log(
|
|
54875
|
+
console.log(chalk28__default.default.gray("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"));
|
|
54874
54876
|
console.log(
|
|
54875
|
-
|
|
54877
|
+
chalk28__default.default.gray("\u2502") + chalk28__default.default.white(
|
|
54876
54878
|
` ${_labels.approvalRequest}${" ".repeat(Math.max(0, 43 - _labels.approvalRequest.length))}`
|
|
54877
|
-
) +
|
|
54879
|
+
) + chalk28__default.default.gray("\u2502")
|
|
54878
54880
|
);
|
|
54879
|
-
console.log(
|
|
54881
|
+
console.log(chalk28__default.default.gray("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"));
|
|
54880
54882
|
const _requestId = `AP-${(/* @__PURE__ */ new Date()).getFullYear()}-${String((/* @__PURE__ */ new Date()).getMonth() + 1).padStart(2, "0")}${String((/* @__PURE__ */ new Date()).getDate()).padStart(2, "0")}-${String(Math.floor(Math.random() * 999)).padStart(3, "0")}`;
|
|
54881
54883
|
console.log(
|
|
54882
|
-
|
|
54883
|
-
` > ${_labels.id}: ${
|
|
54884
|
-
) +
|
|
54884
|
+
chalk28__default.default.gray("\u2502") + chalk28__default.default.white(
|
|
54885
|
+
` > ${_labels.id}: ${chalk28__default.default.yellow(_requestId)}${" ".repeat(Math.max(0, 35 - _requestId.length - _labels.id.length))}`
|
|
54886
|
+
) + chalk28__default.default.gray("\u2502")
|
|
54885
54887
|
);
|
|
54886
54888
|
const _title = _request.context?.description || _request.themeId || "API Cache Improvement";
|
|
54887
54889
|
const _titleDisplay = _title.length > 25 ? _title.substring(0, 22) + "..." : _title;
|
|
54888
54890
|
const _titleLabel = ` ${_labels._title}:`;
|
|
54889
54891
|
console.log(
|
|
54890
|
-
|
|
54892
|
+
chalk28__default.default.gray("\u2502") + chalk28__default.default.white(
|
|
54891
54893
|
`${_titleLabel} ${_titleDisplay}${" ".repeat(Math.max(0, 42 - _titleLabel.length - _titleDisplay.length))}`
|
|
54892
|
-
) +
|
|
54894
|
+
) + chalk28__default.default.gray("\u2502")
|
|
54893
54895
|
);
|
|
54894
54896
|
const _riskLevel = this.formatRiskLevelSimple(_request.riskAssessment);
|
|
54895
54897
|
const _approvalsCount = _riskLevel === "HIGH" || _riskLevel === "CRITICAL" ? "2" : "1";
|
|
@@ -54897,37 +54899,37 @@ var init_QuickApprovalInterface = __esm({
|
|
|
54897
54899
|
const _levelLabel = ` ${_labels.level}:`;
|
|
54898
54900
|
const _levelDisplay = `${_riskLevel} ${_approvalsText}`;
|
|
54899
54901
|
console.log(
|
|
54900
|
-
|
|
54902
|
+
chalk28__default.default.gray("\u2502") + chalk28__default.default.white(
|
|
54901
54903
|
`${_levelLabel} ${_levelDisplay}${" ".repeat(Math.max(0, 42 - _levelLabel.length - _levelDisplay.length))}`
|
|
54902
|
-
) +
|
|
54904
|
+
) + chalk28__default.default.gray("\u2502")
|
|
54903
54905
|
);
|
|
54904
54906
|
const _impact = _request.estimatedTime || "p95 latency -20%";
|
|
54905
54907
|
const _impactLabel = ` ${_labels._impact}:`;
|
|
54906
54908
|
console.log(
|
|
54907
|
-
|
|
54909
|
+
chalk28__default.default.gray("\u2502") + chalk28__default.default.white(
|
|
54908
54910
|
`${_impactLabel} ${_impact}${" ".repeat(Math.max(0, 42 - _impactLabel.length - _impact.length))}`
|
|
54909
|
-
) +
|
|
54911
|
+
) + chalk28__default.default.gray("\u2502")
|
|
54910
54912
|
);
|
|
54911
54913
|
const _approversLabel = ` ${_labels.approvers}:`;
|
|
54912
54914
|
const _approversStatus = "[x] Lead [ ] QA";
|
|
54913
54915
|
console.log(
|
|
54914
|
-
|
|
54916
|
+
chalk28__default.default.gray("\u2502") + chalk28__default.default.white(
|
|
54915
54917
|
`${_approversLabel} ${_approversStatus}${" ".repeat(Math.max(0, 42 - _approversLabel.length - _approversStatus.length))}`
|
|
54916
|
-
) +
|
|
54918
|
+
) + chalk28__default.default.gray("\u2502")
|
|
54917
54919
|
);
|
|
54918
54920
|
const _deadline = new Date(Date.now() + 30 * 60 * 1e3);
|
|
54919
54921
|
const _timeStr = `${_deadline.getFullYear()}-${String(_deadline.getMonth() + 1).padStart(2, "0")}-${String(_deadline.getDate()).padStart(2, "0")} ${String(_deadline.getHours()).padStart(2, "0")}:${String(_deadline.getMinutes()).padStart(2, "0")}`;
|
|
54920
54922
|
const _deadlineLabel = ` ${_labels._deadline}:`;
|
|
54921
54923
|
console.log(
|
|
54922
|
-
|
|
54924
|
+
chalk28__default.default.gray("\u2502") + chalk28__default.default.white(
|
|
54923
54925
|
`${_deadlineLabel} ${_timeStr}${" ".repeat(Math.max(0, 42 - _deadlineLabel.length - _timeStr.length))}`
|
|
54924
|
-
) +
|
|
54926
|
+
) + chalk28__default.default.gray("\u2502")
|
|
54925
54927
|
);
|
|
54926
|
-
console.log(
|
|
54928
|
+
console.log(chalk28__default.default.gray("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"));
|
|
54927
54929
|
console.log(
|
|
54928
|
-
|
|
54930
|
+
chalk28__default.default.gray("\u2502") + chalk28__default.default.white(
|
|
54929
54931
|
` ${_labels.actions}:${" ".repeat(Math.max(0, 42 - _labels.actions.length))}`
|
|
54930
|
-
) +
|
|
54932
|
+
) + chalk28__default.default.gray("\u2502")
|
|
54931
54933
|
);
|
|
54932
54934
|
this.menuOptions.forEach((option, _index) => {
|
|
54933
54935
|
const _isSelected = _index === this.selectedIndex;
|
|
@@ -54938,32 +54940,32 @@ var init_QuickApprovalInterface = __esm({
|
|
|
54938
54940
|
switch (option) {
|
|
54939
54941
|
case "approve":
|
|
54940
54942
|
label = _labels.approve;
|
|
54941
|
-
color =
|
|
54943
|
+
color = chalk28__default.default.green;
|
|
54942
54944
|
break;
|
|
54943
54945
|
case "reject":
|
|
54944
54946
|
label = _labels.reject;
|
|
54945
|
-
color =
|
|
54947
|
+
color = chalk28__default.default.red;
|
|
54946
54948
|
break;
|
|
54947
54949
|
case "cancel":
|
|
54948
54950
|
label = _labels.cancel;
|
|
54949
|
-
color =
|
|
54951
|
+
color = chalk28__default.default.yellow;
|
|
54950
54952
|
break;
|
|
54951
54953
|
}
|
|
54952
54954
|
const _optionText = `${_prefix}[${_key}] ${label}`;
|
|
54953
54955
|
const _colorFunc = _isSelected ? color.bold : color;
|
|
54954
54956
|
console.log(
|
|
54955
|
-
|
|
54957
|
+
chalk28__default.default.gray("\u2502") + _colorFunc(
|
|
54956
54958
|
`${_optionText}${" ".repeat(Math.max(0, 43 - _optionText.length))}`
|
|
54957
|
-
) +
|
|
54959
|
+
) + chalk28__default.default.gray("\u2502")
|
|
54958
54960
|
);
|
|
54959
54961
|
});
|
|
54960
|
-
console.log(
|
|
54962
|
+
console.log(chalk28__default.default.gray("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"));
|
|
54961
54963
|
console.log(
|
|
54962
|
-
|
|
54964
|
+
chalk28__default.default.gray("\u2502") + chalk28__default.default.white(
|
|
54963
54965
|
` ${_labels.moveInstruction}${" ".repeat(Math.max(0, 43 - _labels.moveInstruction.length))}`
|
|
54964
|
-
) +
|
|
54966
|
+
) + chalk28__default.default.gray("\u2502")
|
|
54965
54967
|
);
|
|
54966
|
-
console.log(
|
|
54968
|
+
console.log(chalk28__default.default.gray("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"));
|
|
54967
54969
|
console.log("");
|
|
54968
54970
|
}
|
|
54969
54971
|
/**
|
|
@@ -54979,13 +54981,13 @@ var init_QuickApprovalInterface = __esm({
|
|
|
54979
54981
|
};
|
|
54980
54982
|
const _formatted = keyMap[_key] || _key;
|
|
54981
54983
|
const colorMap = {
|
|
54982
|
-
"shift+tab":
|
|
54983
|
-
"ctrl+y":
|
|
54984
|
-
"ctrl+n":
|
|
54985
|
-
"ctrl+t":
|
|
54986
|
-
"ctrl+r":
|
|
54984
|
+
"shift+tab": chalk28__default.default.bgGreen.black.bold,
|
|
54985
|
+
"ctrl+y": chalk28__default.default.bgBlue.white.bold,
|
|
54986
|
+
"ctrl+n": chalk28__default.default.bgRed.white.bold,
|
|
54987
|
+
"ctrl+t": chalk28__default.default.bgMagenta.white.bold,
|
|
54988
|
+
"ctrl+r": chalk28__default.default.bgYellow.black.bold
|
|
54987
54989
|
};
|
|
54988
|
-
const _colorFunc = colorMap[_key] ||
|
|
54990
|
+
const _colorFunc = colorMap[_key] || chalk28__default.default.bgCyan.black.bold;
|
|
54989
54991
|
return _colorFunc(` ${_formatted} `);
|
|
54990
54992
|
}
|
|
54991
54993
|
/**
|
|
@@ -54994,15 +54996,15 @@ var init_QuickApprovalInterface = __esm({
|
|
|
54994
54996
|
formatRiskLevel(risk) {
|
|
54995
54997
|
switch (risk.toLowerCase()) {
|
|
54996
54998
|
case "critical":
|
|
54997
|
-
return
|
|
54999
|
+
return chalk28__default.default.red.bold("CRITICAL");
|
|
54998
55000
|
case "high":
|
|
54999
|
-
return
|
|
55001
|
+
return chalk28__default.default.red("HIGH");
|
|
55000
55002
|
case "medium":
|
|
55001
|
-
return
|
|
55003
|
+
return chalk28__default.default.yellow("MEDIUM");
|
|
55002
55004
|
case "low":
|
|
55003
|
-
return
|
|
55005
|
+
return chalk28__default.default.green("LOW");
|
|
55004
55006
|
default:
|
|
55005
|
-
return
|
|
55007
|
+
return chalk28__default.default.white(risk);
|
|
55006
55008
|
}
|
|
55007
55009
|
}
|
|
55008
55010
|
/**
|
|
@@ -55072,7 +55074,7 @@ var init_QuickApprovalInterface = __esm({
|
|
|
55072
55074
|
}
|
|
55073
55075
|
if (_key === "") {
|
|
55074
55076
|
console.log(`
|
|
55075
|
-
${
|
|
55077
|
+
${chalk28__default.default.red("Approval cancelled by user")}`);
|
|
55076
55078
|
this.emit("approval-cancelled", this.currentRequest.id);
|
|
55077
55079
|
return;
|
|
55078
55080
|
}
|
|
@@ -55129,20 +55131,20 @@ ${chalk27__default.default.red("Approval cancelled by user")}`);
|
|
|
55129
55131
|
}
|
|
55130
55132
|
console.clear();
|
|
55131
55133
|
console.log(`
|
|
55132
|
-
${
|
|
55134
|
+
${chalk28__default.default.bgGreen.black.bold(`\u250C${"\u2500".repeat(78)}\u2510`)}`);
|
|
55133
55135
|
console.log(
|
|
55134
|
-
|
|
55136
|
+
chalk28__default.default.bgGreen.black.bold("\u2502") + chalk28__default.default.bgGreen.black.bold(
|
|
55135
55137
|
` \u2713 CHOICE SELECTED / \u9078\u629E\u5B8C\u4E86:${" ".repeat(47)}`
|
|
55136
|
-
) +
|
|
55138
|
+
) + chalk28__default.default.bgGreen.black.bold("\u2502")
|
|
55137
55139
|
);
|
|
55138
|
-
console.log(
|
|
55140
|
+
console.log(chalk28__default.default.bgGreen.black.bold(`\u251C${"\u2500".repeat(78)}\u2524`));
|
|
55139
55141
|
const _choiceText = `${_choice.label} (${_choice.labelJa})`;
|
|
55140
55142
|
const _padding = " ".repeat(Math.max(0, 76 - _choiceText.length));
|
|
55141
55143
|
console.log(
|
|
55142
|
-
|
|
55144
|
+
chalk28__default.default.bgGreen.black.bold("\u2502") + chalk28__default.default.bgGreen.black.bold(` ${_choiceText}${_padding}`) + chalk28__default.default.bgGreen.black.bold("\u2502")
|
|
55143
55145
|
);
|
|
55144
|
-
console.log(
|
|
55145
|
-
console.log(
|
|
55146
|
+
console.log(chalk28__default.default.bgGreen.black.bold(`\u2514${"\u2500".repeat(78)}\u2518`));
|
|
55147
|
+
console.log(chalk28__default.default.yellow("\n\u{1F504} Processing your approval decision..."));
|
|
55146
55148
|
try {
|
|
55147
55149
|
const _response = await this.approvalEngine.processApprovalResponse(
|
|
55148
55150
|
this.currentRequest.id,
|
|
@@ -55152,30 +55154,30 @@ ${chalk27__default.default.bgGreen.black.bold(`\u250C${"\u2500".repeat(78)}\u251
|
|
|
55152
55154
|
);
|
|
55153
55155
|
response.quickDecision = true;
|
|
55154
55156
|
console.log(`
|
|
55155
|
-
${
|
|
55157
|
+
${chalk28__default.default.bgGreen.black(`\u250C${"\u2500".repeat(78)}\u2510`)}`);
|
|
55156
55158
|
console.log(
|
|
55157
|
-
|
|
55159
|
+
chalk28__default.default.bgGreen.black("\u2502") + chalk28__default.default.bgGreen.black(
|
|
55158
55160
|
` \u{1F389} APPROVAL PROCESSED SUCCESSFULLY / \u627F\u8A8D\u51E6\u7406\u5B8C\u4E86!${" ".repeat(32)}`
|
|
55159
|
-
) +
|
|
55161
|
+
) + chalk28__default.default.bgGreen.black("\u2502")
|
|
55160
55162
|
);
|
|
55161
|
-
console.log(
|
|
55163
|
+
console.log(chalk28__default.default.bgGreen.black(`\u2514${"\u2500".repeat(78)}\u2518`));
|
|
55162
55164
|
if (_choice.trustLevel) {
|
|
55163
55165
|
console.log(
|
|
55164
|
-
|
|
55166
|
+
chalk28__default.default.blue(`
|
|
55165
55167
|
\u2728 Trust level updated: ${_choice.trustLevel}`)
|
|
55166
55168
|
);
|
|
55167
55169
|
}
|
|
55168
55170
|
this.emit("approval-_response", _response);
|
|
55169
55171
|
} catch (_error) {
|
|
55170
55172
|
console.log(`
|
|
55171
|
-
${
|
|
55173
|
+
${chalk28__default.default.bgRed.white.bold(`\u250C${"\u2500".repeat(78)}\u2510`)}`);
|
|
55172
55174
|
console.log(
|
|
55173
|
-
|
|
55175
|
+
chalk28__default.default.bgRed.white.bold("\u2502") + chalk28__default.default.bgRed.white.bold(
|
|
55174
55176
|
` \u274C ERROR PROCESSING APPROVAL / \u627F\u8A8D\u51E6\u7406\u30A8\u30E9\u30FC${" ".repeat(35)}`
|
|
55175
|
-
) +
|
|
55177
|
+
) + chalk28__default.default.bgRed.white.bold("\u2502")
|
|
55176
55178
|
);
|
|
55177
|
-
console.log(
|
|
55178
|
-
console._error(
|
|
55179
|
+
console.log(chalk28__default.default.bgRed.white.bold(`\u2514${"\u2500".repeat(78)}\u2518`));
|
|
55180
|
+
console._error(chalk28__default.default.red("\nError details:"), _error);
|
|
55179
55181
|
this.emit("approval-_error", _error);
|
|
55180
55182
|
}
|
|
55181
55183
|
}
|
|
@@ -55189,7 +55191,7 @@ ${chalk27__default.default.bgRed.white.bold(`\u250C${"\u2500".repeat(78)}\u2510`
|
|
|
55189
55191
|
timeoutId = setTimeout(() => {
|
|
55190
55192
|
console.log(
|
|
55191
55193
|
`
|
|
55192
|
-
${
|
|
55194
|
+
${chalk28__default.default.yellow("\u23F0 Approval request timed out - auto-approving...")}`
|
|
55193
55195
|
);
|
|
55194
55196
|
this.handleTimeoutResponse(resolve);
|
|
55195
55197
|
}, timeout);
|
|
@@ -55233,7 +55235,7 @@ ${chalk27__default.default.yellow("\u23F0 Approval request timed out - auto-appr
|
|
|
55233
55235
|
response.quickDecision = true;
|
|
55234
55236
|
resolve(_response);
|
|
55235
55237
|
} catch (_error) {
|
|
55236
|
-
console._error(
|
|
55238
|
+
console._error(chalk28__default.default.red("Error processing timeout approval:"), _error);
|
|
55237
55239
|
}
|
|
55238
55240
|
}
|
|
55239
55241
|
/**
|
|
@@ -55248,11 +55250,11 @@ ${chalk27__default.default.yellow("\u23F0 Approval request timed out - auto-appr
|
|
|
55248
55250
|
);
|
|
55249
55251
|
this.approvalEngine.on("trust-level-changed", (event) => {
|
|
55250
55252
|
console.log(
|
|
55251
|
-
|
|
55253
|
+
chalk28__default.default.blue(
|
|
55252
55254
|
`\u2728 Trust level changed: ${event.oldLevel} \u2192 ${event.newLevel}`
|
|
55253
55255
|
)
|
|
55254
55256
|
);
|
|
55255
|
-
console.log(
|
|
55257
|
+
console.log(chalk28__default.default.gray(`Reason: ${event.reason}`));
|
|
55256
55258
|
});
|
|
55257
55259
|
}
|
|
55258
55260
|
/**
|
|
@@ -56039,22 +56041,22 @@ function formatProgressBar(current, total, width = 20) {
|
|
|
56039
56041
|
}
|
|
56040
56042
|
function formatError2(message, code) {
|
|
56041
56043
|
const prefix = "";
|
|
56042
|
-
return
|
|
56044
|
+
return chalk28__default.default.red(`\u274C ${prefix}${message}`);
|
|
56043
56045
|
}
|
|
56044
56046
|
function formatSuccess(message) {
|
|
56045
|
-
return
|
|
56047
|
+
return chalk28__default.default.green(`\u2705 ${message}`);
|
|
56046
56048
|
}
|
|
56047
56049
|
function formatWarning(message) {
|
|
56048
|
-
return
|
|
56050
|
+
return chalk28__default.default.yellow(`\u26A0\uFE0F ${message}`);
|
|
56049
56051
|
}
|
|
56050
56052
|
function formatInfo(message) {
|
|
56051
|
-
return
|
|
56053
|
+
return chalk28__default.default.blue(`\u2139\uFE0F ${message}`);
|
|
56052
56054
|
}
|
|
56053
56055
|
function formatTable(headers, rows, options2 = {}) {
|
|
56054
56056
|
const {
|
|
56055
56057
|
columnWidths = headers.map(() => 20),
|
|
56056
56058
|
separator = " | ",
|
|
56057
|
-
headerColor =
|
|
56059
|
+
headerColor = chalk28__default.default.cyan.bold
|
|
56058
56060
|
} = options2;
|
|
56059
56061
|
const headerRow = headers.map((h2, i2) => headerColor(h2.padEnd(columnWidths[i2]))).join(separator);
|
|
56060
56062
|
const separatorLine = columnWidths.map((w) => "-".repeat(w)).join(separator);
|
|
@@ -56066,8 +56068,8 @@ function formatTable(headers, rows, options2 = {}) {
|
|
|
56066
56068
|
function formatKeyValue(data2, options2 = {}) {
|
|
56067
56069
|
const {
|
|
56068
56070
|
keyWidth = 20,
|
|
56069
|
-
keyColor =
|
|
56070
|
-
valueColor =
|
|
56071
|
+
keyColor = chalk28__default.default.gray,
|
|
56072
|
+
valueColor = chalk28__default.default.white,
|
|
56071
56073
|
separator = ": "
|
|
56072
56074
|
} = options2;
|
|
56073
56075
|
return Object.entries(data2).map(([key2, value]) => {
|
|
@@ -56117,7 +56119,7 @@ var init_DisplayManager = __esm({
|
|
|
56117
56119
|
theme: options2.theme ?? "auto"
|
|
56118
56120
|
};
|
|
56119
56121
|
if (!this.options.enableColors) {
|
|
56120
|
-
|
|
56122
|
+
chalk28__default.default.level = 0;
|
|
56121
56123
|
}
|
|
56122
56124
|
this.setupCleanupHandlers();
|
|
56123
56125
|
}
|
|
@@ -56234,7 +56236,7 @@ var init_DisplayManager = __esm({
|
|
|
56234
56236
|
const {
|
|
56235
56237
|
padding = 1,
|
|
56236
56238
|
borderStyle = "single",
|
|
56237
|
-
borderColor =
|
|
56239
|
+
borderColor = chalk28__default.default.gray
|
|
56238
56240
|
} = options2;
|
|
56239
56241
|
const lines = content2.split("\n");
|
|
56240
56242
|
const maxLength = Math.max(...lines.map((l) => l.length));
|
|
@@ -56292,7 +56294,7 @@ var init_DisplayManager = __esm({
|
|
|
56292
56294
|
*/
|
|
56293
56295
|
startSpinner(text) {
|
|
56294
56296
|
if (!this.options.enableAnimations) {
|
|
56295
|
-
this.writeLine(
|
|
56297
|
+
this.writeLine(chalk28__default.default.gray(`\u2299 ${text || "Processing..."}`));
|
|
56296
56298
|
return "no-animation";
|
|
56297
56299
|
}
|
|
56298
56300
|
return this.spinnerManager.start({ text });
|
|
@@ -56396,11 +56398,11 @@ var init_StatusDisplay = __esm({
|
|
|
56396
56398
|
*/
|
|
56397
56399
|
static renderSystemStatus(status, detailed = false) {
|
|
56398
56400
|
const lines = [];
|
|
56399
|
-
lines.push(
|
|
56401
|
+
lines.push(chalk28__default.default.cyan.bold("\u{1F4CA} System Status"));
|
|
56400
56402
|
lines.push("");
|
|
56401
56403
|
const statusIcon = status.operational ? "\u2705" : "\u274C";
|
|
56402
56404
|
const statusText = status.operational ? "Operational" : "Issues Detected";
|
|
56403
|
-
const statusColor = status.operational ?
|
|
56405
|
+
const statusColor = status.operational ? chalk28__default.default.green : chalk28__default.default.red;
|
|
56404
56406
|
lines.push(`${statusIcon} Status: ${statusColor(statusText)}`);
|
|
56405
56407
|
lines.push(
|
|
56406
56408
|
`\u23F1\uFE0F Uptime: ${formatDuration(status.uptime * 1e3)}`
|
|
@@ -56421,15 +56423,15 @@ var init_StatusDisplay = __esm({
|
|
|
56421
56423
|
if (status.errors > 0 || status.warnings > 0) {
|
|
56422
56424
|
lines.push("");
|
|
56423
56425
|
if (status.errors > 0) {
|
|
56424
|
-
lines.push(
|
|
56426
|
+
lines.push(chalk28__default.default.red(`\u274C Errors: ${status.errors}`));
|
|
56425
56427
|
}
|
|
56426
56428
|
if (status.warnings > 0) {
|
|
56427
|
-
lines.push(
|
|
56429
|
+
lines.push(chalk28__default.default.yellow(`\u26A0\uFE0F Warnings: ${status.warnings}`));
|
|
56428
56430
|
}
|
|
56429
56431
|
}
|
|
56430
56432
|
if (detailed) {
|
|
56431
56433
|
lines.push("");
|
|
56432
|
-
lines.push(
|
|
56434
|
+
lines.push(chalk28__default.default.gray("Detailed Information:"));
|
|
56433
56435
|
const details = formatKeyValue(
|
|
56434
56436
|
{
|
|
56435
56437
|
"Process ID": process.pid,
|
|
@@ -56439,8 +56441,8 @@ var init_StatusDisplay = __esm({
|
|
|
56439
56441
|
"Working Directory": process.cwd()
|
|
56440
56442
|
},
|
|
56441
56443
|
{
|
|
56442
|
-
keyColor:
|
|
56443
|
-
valueColor:
|
|
56444
|
+
keyColor: chalk28__default.default.gray,
|
|
56445
|
+
valueColor: chalk28__default.default.white
|
|
56444
56446
|
}
|
|
56445
56447
|
);
|
|
56446
56448
|
lines.push(details);
|
|
@@ -56454,9 +56456,9 @@ var init_StatusDisplay = __esm({
|
|
|
56454
56456
|
*/
|
|
56455
56457
|
static renderMemoryStatus(status) {
|
|
56456
56458
|
const lines = [];
|
|
56457
|
-
lines.push(
|
|
56459
|
+
lines.push(chalk28__default.default.cyan.bold("\u{1F9E0} Memory Status"));
|
|
56458
56460
|
lines.push("");
|
|
56459
|
-
lines.push(
|
|
56461
|
+
lines.push(chalk28__default.default.yellow("System 1 (Fast):"));
|
|
56460
56462
|
const s1NodeBar = formatProgressBar(
|
|
56461
56463
|
status.system1.nodes,
|
|
56462
56464
|
status.system1.maxNodes,
|
|
@@ -56474,7 +56476,7 @@ var init_StatusDisplay = __esm({
|
|
|
56474
56476
|
` \u2022 Tokens: ${status.system1.tokens}/${status.system1.maxTokens} ${s1TokenBar}`
|
|
56475
56477
|
);
|
|
56476
56478
|
lines.push("");
|
|
56477
|
-
lines.push(
|
|
56479
|
+
lines.push(chalk28__default.default.blue("System 2 (Deep):"));
|
|
56478
56480
|
const s2TraceBar = formatProgressBar(
|
|
56479
56481
|
status.system2.traces,
|
|
56480
56482
|
status.system2.maxTraces,
|
|
@@ -56492,7 +56494,7 @@ var init_StatusDisplay = __esm({
|
|
|
56492
56494
|
` \u2022 Tokens: ${status.system2.tokens}/${status.system2.maxTokens} ${s2TokenBar}`
|
|
56493
56495
|
);
|
|
56494
56496
|
lines.push("");
|
|
56495
|
-
lines.push(
|
|
56497
|
+
lines.push(chalk28__default.default.green("Total:"));
|
|
56496
56498
|
const totalBar = formatProgressBar(
|
|
56497
56499
|
status.total.tokens,
|
|
56498
56500
|
status.total.maxTokens,
|
|
@@ -56501,7 +56503,7 @@ var init_StatusDisplay = __esm({
|
|
|
56501
56503
|
lines.push(` \u2022 Tokens: ${status.total.tokens}/${status.total.maxTokens}`);
|
|
56502
56504
|
lines.push(` \u2022 Usage: ${totalBar}`);
|
|
56503
56505
|
const usage = status.total.tokens / status.total.maxTokens * 100;
|
|
56504
|
-
const usageColor = usage > 80 ?
|
|
56506
|
+
const usageColor = usage > 80 ? chalk28__default.default.red : usage > 60 ? chalk28__default.default.yellow : chalk28__default.default.green;
|
|
56505
56507
|
lines.push(
|
|
56506
56508
|
` \u2022 ${usageColor(formatPercentage(usage / 100, 1))} utilized`
|
|
56507
56509
|
);
|
|
@@ -56514,9 +56516,9 @@ var init_StatusDisplay = __esm({
|
|
|
56514
56516
|
*/
|
|
56515
56517
|
static renderModelStatus(status) {
|
|
56516
56518
|
const lines = [];
|
|
56517
|
-
lines.push(
|
|
56519
|
+
lines.push(chalk28__default.default.cyan.bold("\u{1F916} Model Status"));
|
|
56518
56520
|
lines.push("");
|
|
56519
|
-
lines.push(
|
|
56521
|
+
lines.push(chalk28__default.default.green(`Current: ${chalk28__default.default.bold(status.current)}`));
|
|
56520
56522
|
lines.push("");
|
|
56521
56523
|
lines.push("Available Models:");
|
|
56522
56524
|
const headers = ["Model", "Provider", "Status", "Capabilities"];
|
|
@@ -56528,7 +56530,7 @@ var init_StatusDisplay = __esm({
|
|
|
56528
56530
|
const table = formatTable(headers, rows, {
|
|
56529
56531
|
columnWidths: [20, 15, 8, 30],
|
|
56530
56532
|
separator: " \u2502 ",
|
|
56531
|
-
headerColor:
|
|
56533
|
+
headerColor: chalk28__default.default.gray
|
|
56532
56534
|
});
|
|
56533
56535
|
lines.push(table);
|
|
56534
56536
|
return lines.join("\n");
|
|
@@ -56540,19 +56542,19 @@ var init_StatusDisplay = __esm({
|
|
|
56540
56542
|
*/
|
|
56541
56543
|
static renderHealthChecks(checks) {
|
|
56542
56544
|
const lines = [];
|
|
56543
|
-
lines.push(
|
|
56545
|
+
lines.push(chalk28__default.default.cyan.bold("\u{1F3E5} Health Checks"));
|
|
56544
56546
|
lines.push("");
|
|
56545
56547
|
for (const check of checks) {
|
|
56546
56548
|
const icon = check.status === "ok" ? "\u2705" : check.status === "warning" ? "\u26A0\uFE0F" : "\u274C";
|
|
56547
|
-
const statusColor = check.status === "ok" ?
|
|
56549
|
+
const statusColor = check.status === "ok" ? chalk28__default.default.green : check.status === "warning" ? chalk28__default.default.yellow : chalk28__default.default.red;
|
|
56548
56550
|
let line = `${icon} ${check.name.padEnd(25)} ${statusColor(check.status.toUpperCase())}`;
|
|
56549
56551
|
if (check.latency !== void 0) {
|
|
56550
|
-
const latencyColor = check.latency < 100 ?
|
|
56552
|
+
const latencyColor = check.latency < 100 ? chalk28__default.default.green : check.latency < 500 ? chalk28__default.default.yellow : chalk28__default.default.red;
|
|
56551
56553
|
line += ` ${latencyColor(`(${check.latency}ms)`)}`;
|
|
56552
56554
|
}
|
|
56553
56555
|
lines.push(line);
|
|
56554
56556
|
if (check.message) {
|
|
56555
|
-
lines.push(
|
|
56557
|
+
lines.push(chalk28__default.default.gray(` ${check.message}`));
|
|
56556
56558
|
}
|
|
56557
56559
|
}
|
|
56558
56560
|
lines.push("");
|
|
@@ -56561,16 +56563,16 @@ var init_StatusDisplay = __esm({
|
|
|
56561
56563
|
const errorCount = checks.filter((c) => c.status === "error").length;
|
|
56562
56564
|
if (errorCount > 0) {
|
|
56563
56565
|
lines.push(
|
|
56564
|
-
|
|
56566
|
+
chalk28__default.default.red(
|
|
56565
56567
|
`\u26A0\uFE0F System has ${errorCount} error(s) - intervention required`
|
|
56566
56568
|
)
|
|
56567
56569
|
);
|
|
56568
56570
|
} else if (warningCount > 0) {
|
|
56569
56571
|
lines.push(
|
|
56570
|
-
|
|
56572
|
+
chalk28__default.default.yellow(`\u26A0\uFE0F System operational with ${warningCount} warning(s)`)
|
|
56571
56573
|
);
|
|
56572
56574
|
} else {
|
|
56573
|
-
lines.push(
|
|
56575
|
+
lines.push(chalk28__default.default.green("\u2705 All systems operational"));
|
|
56574
56576
|
}
|
|
56575
56577
|
return lines.join("\n");
|
|
56576
56578
|
}
|
|
@@ -56581,7 +56583,7 @@ var init_StatusDisplay = __esm({
|
|
|
56581
56583
|
*/
|
|
56582
56584
|
static renderSessionStats(stats) {
|
|
56583
56585
|
const lines = [];
|
|
56584
|
-
lines.push(
|
|
56586
|
+
lines.push(chalk28__default.default.cyan.bold("\u{1F4C8} Session Statistics"));
|
|
56585
56587
|
lines.push("");
|
|
56586
56588
|
const data2 = formatKeyValue(
|
|
56587
56589
|
{
|
|
@@ -56594,14 +56596,14 @@ var init_StatusDisplay = __esm({
|
|
|
56594
56596
|
},
|
|
56595
56597
|
{
|
|
56596
56598
|
keyWidth: 20,
|
|
56597
|
-
keyColor:
|
|
56598
|
-
valueColor:
|
|
56599
|
+
keyColor: chalk28__default.default.gray,
|
|
56600
|
+
valueColor: chalk28__default.default.white
|
|
56599
56601
|
}
|
|
56600
56602
|
);
|
|
56601
56603
|
lines.push(data2);
|
|
56602
56604
|
lines.push("");
|
|
56603
56605
|
const performance3 = stats.avgResponseTime < 100 ? "Excellent" : stats.avgResponseTime < 500 ? "Good" : stats.avgResponseTime < 1e3 ? "Fair" : "Poor";
|
|
56604
|
-
const perfColor = performance3 === "Excellent" ?
|
|
56606
|
+
const perfColor = performance3 === "Excellent" ? chalk28__default.default.green : performance3 === "Good" ? chalk28__default.default.blue : performance3 === "Fair" ? chalk28__default.default.yellow : chalk28__default.default.red;
|
|
56605
56607
|
lines.push(`Performance: ${perfColor(performance3)}`);
|
|
56606
56608
|
return lines.join("\n");
|
|
56607
56609
|
}
|
|
@@ -56613,22 +56615,22 @@ var init_StatusDisplay = __esm({
|
|
|
56613
56615
|
static renderStatusBar(data2) {
|
|
56614
56616
|
const segments = [];
|
|
56615
56617
|
if (data2.mode) {
|
|
56616
|
-
segments.push(
|
|
56618
|
+
segments.push(chalk28__default.default.cyan(`[${data2.mode}]`));
|
|
56617
56619
|
}
|
|
56618
56620
|
if (data2.model) {
|
|
56619
|
-
segments.push(
|
|
56621
|
+
segments.push(chalk28__default.default.blue(`\u{1F916} ${data2.model}`));
|
|
56620
56622
|
}
|
|
56621
56623
|
if (data2.memory !== void 0) {
|
|
56622
|
-
const memoryColor = data2.memory > 80 ?
|
|
56624
|
+
const memoryColor = data2.memory > 80 ? chalk28__default.default.red : data2.memory > 60 ? chalk28__default.default.yellow : chalk28__default.default.green;
|
|
56623
56625
|
segments.push(memoryColor(`\u{1F4BE} ${data2.memory}%`));
|
|
56624
56626
|
}
|
|
56625
56627
|
if (data2.latency !== void 0) {
|
|
56626
|
-
const latencyColor = data2.latency < 100 ?
|
|
56628
|
+
const latencyColor = data2.latency < 100 ? chalk28__default.default.green : data2.latency < 500 ? chalk28__default.default.yellow : chalk28__default.default.red;
|
|
56627
56629
|
segments.push(latencyColor(`\u26A1 ${data2.latency}ms`));
|
|
56628
56630
|
}
|
|
56629
56631
|
if (data2.time) {
|
|
56630
56632
|
segments.push(
|
|
56631
|
-
|
|
56633
|
+
chalk28__default.default.gray(formatTimestamp(data2.time, "short"))
|
|
56632
56634
|
);
|
|
56633
56635
|
}
|
|
56634
56636
|
return segments.join(" \u2502 ");
|
|
@@ -56647,7 +56649,7 @@ var init_CoreHandlers = __esm({
|
|
|
56647
56649
|
async execute(args2) {
|
|
56648
56650
|
const startTime = perf_hooks.performance.now();
|
|
56649
56651
|
const commands = this.registry.getCommands();
|
|
56650
|
-
let message =
|
|
56652
|
+
let message = chalk28__default.default.cyan(`\u{1F916} MARIA v3.5.0 - Available Commands
|
|
56651
56653
|
|
|
56652
56654
|
`);
|
|
56653
56655
|
const categories2 = {
|
|
@@ -56658,17 +56660,17 @@ var init_CoreHandlers = __esm({
|
|
|
56658
56660
|
system: ["/status", "/config", "/logs", "/approve"]
|
|
56659
56661
|
};
|
|
56660
56662
|
for (const [category, cmds] of Object.entries(categories2)) {
|
|
56661
|
-
message +=
|
|
56663
|
+
message += chalk28__default.default.yellow(`
|
|
56662
56664
|
${category.toUpperCase()}:
|
|
56663
56665
|
`);
|
|
56664
56666
|
for (const cmd of cmds) {
|
|
56665
56667
|
if (commands.includes(cmd)) {
|
|
56666
|
-
message += ` ${
|
|
56668
|
+
message += ` ${chalk28__default.default.green(cmd.padEnd(15))} - ${this.getCommandDescription(cmd)}
|
|
56667
56669
|
`;
|
|
56668
56670
|
}
|
|
56669
56671
|
}
|
|
56670
56672
|
}
|
|
56671
|
-
message +=
|
|
56673
|
+
message += chalk28__default.default.gray(
|
|
56672
56674
|
`
|
|
56673
56675
|
Type '/help <command>' for detailed information about a specific command.`
|
|
56674
56676
|
);
|
|
@@ -56716,7 +56718,7 @@ Type '/help <command>' for detailed information about a specific command.`
|
|
|
56716
56718
|
const processingTime = perf_hooks.performance.now() - startTime;
|
|
56717
56719
|
return {
|
|
56718
56720
|
success: true,
|
|
56719
|
-
message:
|
|
56721
|
+
message: chalk28__default.default.gray("Terminal cleared."),
|
|
56720
56722
|
metadata: {
|
|
56721
56723
|
processingTime,
|
|
56722
56724
|
timestamp: /* @__PURE__ */ new Date()
|
|
@@ -56727,7 +56729,7 @@ Type '/help <command>' for detailed information about a specific command.`
|
|
|
56727
56729
|
ExitHandler = class {
|
|
56728
56730
|
async execute(args2) {
|
|
56729
56731
|
const startTime = perf_hooks.performance.now();
|
|
56730
|
-
const message =
|
|
56732
|
+
const message = chalk28__default.default.green("\u{1F44B} Goodbye! Thank you for using MARIA.\n");
|
|
56731
56733
|
process.emit("SIGTERM");
|
|
56732
56734
|
const processingTime = perf_hooks.performance.now() - startTime;
|
|
56733
56735
|
return {
|
|
@@ -56751,23 +56753,23 @@ Type '/help <command>' for detailed information about a specific command.`
|
|
|
56751
56753
|
platform: process.platform,
|
|
56752
56754
|
arch: process.arch
|
|
56753
56755
|
};
|
|
56754
|
-
let message =
|
|
56755
|
-
message +=
|
|
56756
|
+
let message = chalk28__default.default.cyan("\u{1F680} MARIA System Information\n\n");
|
|
56757
|
+
message += chalk28__default.default.white(` Version: ${chalk28__default.default.green(packageInfo.version)}
|
|
56756
56758
|
`);
|
|
56757
|
-
message +=
|
|
56759
|
+
message += chalk28__default.default.white(` Package: ${chalk28__default.default.green(packageInfo.name)}
|
|
56758
56760
|
`);
|
|
56759
|
-
message +=
|
|
56761
|
+
message += chalk28__default.default.white(` Node: ${chalk28__default.default.green(packageInfo.node)}
|
|
56760
56762
|
`);
|
|
56761
|
-
message +=
|
|
56762
|
-
` Platform: ${
|
|
56763
|
+
message += chalk28__default.default.white(
|
|
56764
|
+
` Platform: ${chalk28__default.default.green(packageInfo.platform)}
|
|
56763
56765
|
`
|
|
56764
56766
|
);
|
|
56765
|
-
message +=
|
|
56767
|
+
message += chalk28__default.default.white(` Arch: ${chalk28__default.default.green(packageInfo.arch)}
|
|
56766
56768
|
`);
|
|
56767
|
-
message +=
|
|
56769
|
+
message += chalk28__default.default.gray(`
|
|
56768
56770
|
Build: Production
|
|
56769
56771
|
`);
|
|
56770
|
-
message +=
|
|
56772
|
+
message += chalk28__default.default.gray(` License: MIT
|
|
56771
56773
|
`);
|
|
56772
56774
|
const processingTime = perf_hooks.performance.now() - startTime;
|
|
56773
56775
|
return {
|
|
@@ -56792,15 +56794,15 @@ Type '/help <command>' for detailed information about a specific command.`
|
|
|
56792
56794
|
this.history.push("/history");
|
|
56793
56795
|
}
|
|
56794
56796
|
const recent = this.history.slice(-limit);
|
|
56795
|
-
let message =
|
|
56797
|
+
let message = chalk28__default.default.cyan(`\u{1F4DC} Command History (last ${recent.length}):
|
|
56796
56798
|
|
|
56797
56799
|
`);
|
|
56798
56800
|
recent.forEach((cmd, index2) => {
|
|
56799
56801
|
const num = this.history.length - recent.length + index2 + 1;
|
|
56800
|
-
message +=
|
|
56802
|
+
message += chalk28__default.default.gray(` ${num.toString().padStart(3)}: `) + chalk28__default.default.white(cmd) + "\n";
|
|
56801
56803
|
});
|
|
56802
56804
|
if (recent.length === 0) {
|
|
56803
|
-
message =
|
|
56805
|
+
message = chalk28__default.default.gray("No command history available.");
|
|
56804
56806
|
}
|
|
56805
56807
|
const processingTime = perf_hooks.performance.now() - startTime;
|
|
56806
56808
|
return {
|
|
@@ -56846,13 +56848,13 @@ var init_DevHandlers = __esm({
|
|
|
56846
56848
|
if (!prompt) {
|
|
56847
56849
|
return {
|
|
56848
56850
|
ok: false,
|
|
56849
|
-
message:
|
|
56851
|
+
message: chalk28__default.default.red("\u274C Please provide a code generation request.\n") + chalk28__default.default.gray("Usage: /code <description>\n") + chalk28__default.default.gray("Example: /code create a React button component")
|
|
56850
56852
|
};
|
|
56851
56853
|
}
|
|
56852
56854
|
if (signal?.aborted) {
|
|
56853
56855
|
return {
|
|
56854
56856
|
ok: false,
|
|
56855
|
-
message:
|
|
56857
|
+
message: chalk28__default.default.yellow("Code generation canceled")
|
|
56856
56858
|
};
|
|
56857
56859
|
}
|
|
56858
56860
|
try {
|
|
@@ -56863,9 +56865,9 @@ var init_DevHandlers = __esm({
|
|
|
56863
56865
|
if (dryRun) {
|
|
56864
56866
|
return {
|
|
56865
56867
|
ok: true,
|
|
56866
|
-
message:
|
|
56867
|
-
`) +
|
|
56868
|
-
`) +
|
|
56868
|
+
message: chalk28__default.default.cyan("\u{1F50D} Dry run mode - would generate:\n") + chalk28__default.default.gray(`Language: ${language}
|
|
56869
|
+
`) + chalk28__default.default.gray(`Framework: ${framework || "none"}
|
|
56870
|
+
`) + chalk28__default.default.gray(`Prompt: ${cleanPrompt}`)
|
|
56869
56871
|
};
|
|
56870
56872
|
}
|
|
56871
56873
|
const generatedCode = `// Generated code for: ${cleanPrompt}
|
|
@@ -56877,7 +56879,7 @@ function generated() {
|
|
|
56877
56879
|
export { generated };`;
|
|
56878
56880
|
return {
|
|
56879
56881
|
ok: true,
|
|
56880
|
-
message:
|
|
56882
|
+
message: chalk28__default.default.green("\u2705 Code generated successfully:\n\n") + chalk28__default.default.gray("```" + language + "\n") + generatedCode + chalk28__default.default.gray("\n```"),
|
|
56881
56883
|
data: {
|
|
56882
56884
|
code: generatedCode,
|
|
56883
56885
|
language,
|
|
@@ -56890,7 +56892,7 @@ export { generated };`;
|
|
|
56890
56892
|
} catch (error2) {
|
|
56891
56893
|
return {
|
|
56892
56894
|
ok: false,
|
|
56893
|
-
message:
|
|
56895
|
+
message: chalk28__default.default.red(`Code generation failed: ${error2}`)
|
|
56894
56896
|
};
|
|
56895
56897
|
}
|
|
56896
56898
|
}
|
|
@@ -56904,7 +56906,7 @@ export { generated };`;
|
|
|
56904
56906
|
if (signal?.aborted) {
|
|
56905
56907
|
return {
|
|
56906
56908
|
ok: false,
|
|
56907
|
-
message:
|
|
56909
|
+
message: chalk28__default.default.yellow("Test operation canceled")
|
|
56908
56910
|
};
|
|
56909
56911
|
}
|
|
56910
56912
|
const subcommand = args2[0] || "run";
|
|
@@ -56920,8 +56922,8 @@ export { generated };`;
|
|
|
56920
56922
|
default:
|
|
56921
56923
|
return {
|
|
56922
56924
|
ok: false,
|
|
56923
|
-
message:
|
|
56924
|
-
`) +
|
|
56925
|
+
message: chalk28__default.default.red(`Unknown test subcommand: ${subcommand}
|
|
56926
|
+
`) + chalk28__default.default.gray("Available: generate, run, coverage")
|
|
56925
56927
|
};
|
|
56926
56928
|
}
|
|
56927
56929
|
}
|
|
@@ -56929,7 +56931,7 @@ export { generated };`;
|
|
|
56929
56931
|
if (!target) {
|
|
56930
56932
|
return {
|
|
56931
56933
|
ok: false,
|
|
56932
|
-
message:
|
|
56934
|
+
message: chalk28__default.default.red(
|
|
56933
56935
|
"Please specify a file or function to generate tests for"
|
|
56934
56936
|
)
|
|
56935
56937
|
};
|
|
@@ -56946,9 +56948,9 @@ describe("${target}", () => {
|
|
|
56946
56948
|
});`;
|
|
56947
56949
|
return {
|
|
56948
56950
|
ok: true,
|
|
56949
|
-
message:
|
|
56951
|
+
message: chalk28__default.default.green(`\u2705 Tests generated for ${target}:
|
|
56950
56952
|
|
|
56951
|
-
`) +
|
|
56953
|
+
`) + chalk28__default.default.gray("```typescript\n") + testCode + chalk28__default.default.gray("\n```"),
|
|
56952
56954
|
data: { testCode, framework, target }
|
|
56953
56955
|
};
|
|
56954
56956
|
}
|
|
@@ -56961,23 +56963,23 @@ describe("${target}", () => {
|
|
|
56961
56963
|
if (coverage) command += " --coverage";
|
|
56962
56964
|
return {
|
|
56963
56965
|
ok: true,
|
|
56964
|
-
message:
|
|
56965
|
-
`) +
|
|
56966
|
+
message: chalk28__default.default.cyan(`\u{1F9EA} Running tests...
|
|
56967
|
+
`) + chalk28__default.default.gray(`Command: ${command}
|
|
56966
56968
|
|
|
56967
|
-
`) +
|
|
56969
|
+
`) + chalk28__default.default.green("\u2705 All tests passed!"),
|
|
56968
56970
|
data: { command, passed: true }
|
|
56969
56971
|
};
|
|
56970
56972
|
}
|
|
56971
56973
|
async showCoverage(options2) {
|
|
56972
56974
|
return {
|
|
56973
56975
|
ok: true,
|
|
56974
|
-
message:
|
|
56976
|
+
message: chalk28__default.default.cyan("\u{1F4CA} Test Coverage Report:\n\n") + chalk28__default.default.gray("File".padEnd(40) + "% Stmts".padEnd(10) + "% Lines\n") + chalk28__default.default.gray("-".repeat(60) + "\n") + chalk28__default.default.green(
|
|
56975
56977
|
"SessionStateMachine.ts".padEnd(40) + "100.00".padEnd(10) + "100.00\n"
|
|
56976
|
-
) +
|
|
56978
|
+
) + chalk28__default.default.green(
|
|
56977
56979
|
"InputController.ts".padEnd(40) + "95.50".padEnd(10) + "94.20\n"
|
|
56978
|
-
) +
|
|
56980
|
+
) + chalk28__default.default.yellow(
|
|
56979
56981
|
"SessionManager.ts".padEnd(40) + "78.30".padEnd(10) + "76.50\n"
|
|
56980
|
-
) +
|
|
56982
|
+
) + chalk28__default.default.gray("-".repeat(60) + "\n") + chalk28__default.default.cyan("Total".padEnd(40) + "85.60".padEnd(10) + "84.30")
|
|
56981
56983
|
};
|
|
56982
56984
|
}
|
|
56983
56985
|
};
|
|
@@ -56991,33 +56993,33 @@ describe("${target}", () => {
|
|
|
56991
56993
|
if (!file) {
|
|
56992
56994
|
return {
|
|
56993
56995
|
ok: false,
|
|
56994
|
-
message:
|
|
56996
|
+
message: chalk28__default.default.red("Please specify a file to review\n") + chalk28__default.default.gray("Usage: /review <file> [--security] [--performance]")
|
|
56995
56997
|
};
|
|
56996
56998
|
}
|
|
56997
56999
|
const checkSecurity = args2.includes("--security");
|
|
56998
57000
|
const checkPerformance = args2.includes("--performance");
|
|
56999
|
-
let message =
|
|
57001
|
+
let message = chalk28__default.default.cyan(`\u{1F50D} Code Review for ${file}
|
|
57000
57002
|
|
|
57001
57003
|
`);
|
|
57002
|
-
message +=
|
|
57003
|
-
message +=
|
|
57004
|
-
message +=
|
|
57005
|
-
message +=
|
|
57004
|
+
message += chalk28__default.default.yellow("\u26A0\uFE0F Issues Found (3):\n");
|
|
57005
|
+
message += chalk28__default.default.gray(" 1. Line 42: ") + chalk28__default.default.yellow("Missing error handling in async function\n");
|
|
57006
|
+
message += chalk28__default.default.gray(" 2. Line 89: ") + chalk28__default.default.yellow("Potential memory leak - event listener not removed\n");
|
|
57007
|
+
message += chalk28__default.default.gray(" 3. Line 156: ") + chalk28__default.default.yellow(
|
|
57006
57008
|
"Complex function - consider refactoring (cyclomatic complexity: 12)\n\n"
|
|
57007
57009
|
);
|
|
57008
57010
|
if (checkSecurity) {
|
|
57009
|
-
message +=
|
|
57010
|
-
message +=
|
|
57011
|
+
message += chalk28__default.default.red("\u{1F512} Security Issues (1):\n");
|
|
57012
|
+
message += chalk28__default.default.gray(" 1. Line 67: ") + chalk28__default.default.red("Potential XSS vulnerability - user input not sanitized\n\n");
|
|
57011
57013
|
}
|
|
57012
57014
|
if (checkPerformance) {
|
|
57013
|
-
message +=
|
|
57014
|
-
message +=
|
|
57015
|
-
message +=
|
|
57016
|
-
}
|
|
57017
|
-
message +=
|
|
57018
|
-
message +=
|
|
57019
|
-
message +=
|
|
57020
|
-
message +=
|
|
57015
|
+
message += chalk28__default.default.blue("\u26A1 Performance Suggestions (2):\n");
|
|
57016
|
+
message += chalk28__default.default.gray(" 1. Line 23: ") + chalk28__default.default.blue("Consider memoization for expensive calculation\n");
|
|
57017
|
+
message += chalk28__default.default.gray(" 2. Line 145: ") + chalk28__default.default.blue("Use virtualization for large list rendering\n\n");
|
|
57018
|
+
}
|
|
57019
|
+
message += chalk28__default.default.green("\u2705 Positive Findings:\n");
|
|
57020
|
+
message += chalk28__default.default.gray(" \u2022 Good TypeScript type coverage (92%)\n");
|
|
57021
|
+
message += chalk28__default.default.gray(" \u2022 Consistent code style\n");
|
|
57022
|
+
message += chalk28__default.default.gray(" \u2022 Well-documented functions\n");
|
|
57021
57023
|
return {
|
|
57022
57024
|
ok: true,
|
|
57023
57025
|
message,
|
|
@@ -57047,8 +57049,8 @@ describe("${target}", () => {
|
|
|
57047
57049
|
default:
|
|
57048
57050
|
return {
|
|
57049
57051
|
ok: false,
|
|
57050
|
-
message:
|
|
57051
|
-
`) +
|
|
57052
|
+
message: chalk28__default.default.red(`Unknown bug subcommand: ${subcommand}
|
|
57053
|
+
`) + chalk28__default.default.gray("Available: report, list, analyze")
|
|
57052
57054
|
};
|
|
57053
57055
|
}
|
|
57054
57056
|
}
|
|
@@ -57057,18 +57059,18 @@ describe("${target}", () => {
|
|
|
57057
57059
|
if (!description) {
|
|
57058
57060
|
return {
|
|
57059
57061
|
ok: false,
|
|
57060
|
-
message:
|
|
57062
|
+
message: chalk28__default.default.red("Please provide a bug description")
|
|
57061
57063
|
};
|
|
57062
57064
|
}
|
|
57063
57065
|
const bugId = `BUG-${Date.now().toString(36).toUpperCase()}`;
|
|
57064
57066
|
return {
|
|
57065
57067
|
ok: true,
|
|
57066
|
-
message:
|
|
57068
|
+
message: chalk28__default.default.green(`\u{1F41B} Bug reported successfully!
|
|
57067
57069
|
|
|
57068
|
-
`) +
|
|
57069
|
-
`) +
|
|
57070
|
-
`) +
|
|
57071
|
-
`) +
|
|
57070
|
+
`) + chalk28__default.default.cyan(`Bug ID: ${bugId}
|
|
57071
|
+
`) + chalk28__default.default.gray(`Description: ${description}
|
|
57072
|
+
`) + chalk28__default.default.gray(`Status: Open
|
|
57073
|
+
`) + chalk28__default.default.gray(`Priority: To be determined
|
|
57072
57074
|
`),
|
|
57073
57075
|
data: { bugId, description, status: "open" }
|
|
57074
57076
|
};
|
|
@@ -57076,23 +57078,23 @@ describe("${target}", () => {
|
|
|
57076
57078
|
async listBugs() {
|
|
57077
57079
|
return {
|
|
57078
57080
|
ok: true,
|
|
57079
|
-
message:
|
|
57081
|
+
message: chalk28__default.default.cyan("\u{1F41B} Active Bugs:\n\n") + chalk28__default.default.yellow("1. BUG-A1B2C3: ") + chalk28__default.default.gray("Session timeout not handled properly\n") + chalk28__default.default.yellow("2. BUG-D4E5F6: ") + chalk28__default.default.gray("Memory leak in streaming responses\n") + chalk28__default.default.yellow("3. BUG-G7H8I9: ") + chalk28__default.default.gray("Spinner not stopping on error\n\n") + chalk28__default.default.gray("Total: 3 open bugs")
|
|
57080
57082
|
};
|
|
57081
57083
|
}
|
|
57082
57084
|
async analyzeBug(bugId) {
|
|
57083
57085
|
if (!bugId) {
|
|
57084
57086
|
return {
|
|
57085
57087
|
ok: false,
|
|
57086
|
-
message:
|
|
57088
|
+
message: chalk28__default.default.red("Please provide a bug ID to analyze")
|
|
57087
57089
|
};
|
|
57088
57090
|
}
|
|
57089
57091
|
return {
|
|
57090
57092
|
ok: true,
|
|
57091
|
-
message:
|
|
57093
|
+
message: chalk28__default.default.cyan(`\u{1F50D} Bug Analysis for ${bugId}:
|
|
57092
57094
|
|
|
57093
|
-
`) +
|
|
57095
|
+
`) + chalk28__default.default.yellow("Summary: ") + chalk28__default.default.gray("Session timeout not handled properly\n") + chalk28__default.default.yellow("Severity: ") + chalk28__default.default.orange("Medium\n") + chalk28__default.default.yellow("Component: ") + chalk28__default.default.gray("SessionManager\n") + chalk28__default.default.yellow("Reported: ") + chalk28__default.default.gray("2 days ago\n\n") + chalk28__default.default.cyan("Possible Causes:\n") + chalk28__default.default.gray(
|
|
57094
57096
|
" 1. AbortSignal not propagated to all async operations\n"
|
|
57095
|
-
) +
|
|
57097
|
+
) + chalk28__default.default.gray(" 2. Deadline timer not cleared on completion\n") + chalk28__default.default.gray(" 3. Race condition in state transitions\n\n") + chalk28__default.default.green("Suggested Fix:\n") + chalk28__default.default.gray(" Ensure all async operations respect the AbortSignal\n") + chalk28__default.default.gray(" Add finally block to clear timers\n")
|
|
57096
57098
|
};
|
|
57097
57099
|
}
|
|
57098
57100
|
};
|
|
@@ -57116,7 +57118,7 @@ var init_SystemHandlers = __esm({
|
|
|
57116
57118
|
if (signal?.aborted) {
|
|
57117
57119
|
return {
|
|
57118
57120
|
ok: false,
|
|
57119
|
-
message:
|
|
57121
|
+
message: chalk28__default.default.yellow("Status check canceled")
|
|
57120
57122
|
};
|
|
57121
57123
|
}
|
|
57122
57124
|
const verbose = args2.includes("--verbose") || args2.includes("-v");
|
|
@@ -57127,44 +57129,44 @@ var init_SystemHandlers = __esm({
|
|
|
57127
57129
|
cpu: os12__namespace.cpus()[0],
|
|
57128
57130
|
platform: process.platform
|
|
57129
57131
|
};
|
|
57130
|
-
let message =
|
|
57131
|
-
message +=
|
|
57132
|
-
message +=
|
|
57132
|
+
let message = chalk28__default.default.cyan.bold("\u{1F4CA} System Status\n\n");
|
|
57133
|
+
message += chalk28__default.default.green("\u2705 System: Operational\n");
|
|
57134
|
+
message += chalk28__default.default.gray(
|
|
57133
57135
|
`\u23F1\uFE0F Uptime: ${Math.floor(status.uptime / 60)}m ${Math.floor(status.uptime % 60)}s
|
|
57134
57136
|
`
|
|
57135
57137
|
);
|
|
57136
|
-
message +=
|
|
57138
|
+
message += chalk28__default.default.gray(
|
|
57137
57139
|
`\u{1F4BE} Memory: ${Math.round(status.memory.heapUsed / 1024 / 1024)}MB / ${Math.round(status.memory.heapTotal / 1024 / 1024)}MB
|
|
57138
57140
|
`
|
|
57139
57141
|
);
|
|
57140
57142
|
if (verbose) {
|
|
57141
|
-
message +=
|
|
57142
|
-
message +=
|
|
57143
|
+
message += chalk28__default.default.gray("\nDetailed Information:\n");
|
|
57144
|
+
message += chalk28__default.default.gray(` \u2022 CPU: ${status.cpu.model}
|
|
57143
57145
|
`);
|
|
57144
|
-
message +=
|
|
57146
|
+
message += chalk28__default.default.gray(
|
|
57145
57147
|
` \u2022 Platform: ${status.platform} (${os12__namespace.arch()})
|
|
57146
57148
|
`
|
|
57147
57149
|
);
|
|
57148
|
-
message +=
|
|
57150
|
+
message += chalk28__default.default.gray(` \u2022 Node.js: ${process.version}
|
|
57149
57151
|
`);
|
|
57150
|
-
message +=
|
|
57152
|
+
message += chalk28__default.default.gray(` \u2022 Process ID: ${process.pid}
|
|
57151
57153
|
`);
|
|
57152
|
-
message +=
|
|
57154
|
+
message += chalk28__default.default.gray(` \u2022 Working Directory: ${process.cwd()}
|
|
57153
57155
|
`);
|
|
57154
|
-
message +=
|
|
57155
|
-
message +=
|
|
57156
|
+
message += chalk28__default.default.gray("\nMemory Details:\n");
|
|
57157
|
+
message += chalk28__default.default.gray(
|
|
57156
57158
|
` \u2022 RSS: ${Math.round(status.memory.rss / 1024 / 1024)}MB
|
|
57157
57159
|
`
|
|
57158
57160
|
);
|
|
57159
|
-
message +=
|
|
57161
|
+
message += chalk28__default.default.gray(
|
|
57160
57162
|
` \u2022 Heap Used: ${Math.round(status.memory.heapUsed / 1024 / 1024)}MB
|
|
57161
57163
|
`
|
|
57162
57164
|
);
|
|
57163
|
-
message +=
|
|
57165
|
+
message += chalk28__default.default.gray(
|
|
57164
57166
|
` \u2022 Heap Total: ${Math.round(status.memory.heapTotal / 1024 / 1024)}MB
|
|
57165
57167
|
`
|
|
57166
57168
|
);
|
|
57167
|
-
message +=
|
|
57169
|
+
message += chalk28__default.default.gray(
|
|
57168
57170
|
` \u2022 External: ${Math.round(status.memory.external / 1024 / 1024)}MB
|
|
57169
57171
|
`
|
|
57170
57172
|
);
|
|
@@ -57193,7 +57195,7 @@ var init_SystemHandlers = __esm({
|
|
|
57193
57195
|
if (signal?.aborted) {
|
|
57194
57196
|
return {
|
|
57195
57197
|
ok: false,
|
|
57196
|
-
message:
|
|
57198
|
+
message: chalk28__default.default.yellow("Model operation canceled")
|
|
57197
57199
|
};
|
|
57198
57200
|
}
|
|
57199
57201
|
if (args2.length === 0) {
|
|
@@ -57213,17 +57215,17 @@ var init_SystemHandlers = __esm({
|
|
|
57213
57215
|
}
|
|
57214
57216
|
}
|
|
57215
57217
|
async listModels() {
|
|
57216
|
-
let message =
|
|
57217
|
-
message +=
|
|
57218
|
+
let message = chalk28__default.default.cyan.bold("\u{1F916} Available Models\n\n");
|
|
57219
|
+
message += chalk28__default.default.green(`Current: ${this.currentModel}
|
|
57218
57220
|
|
|
57219
57221
|
`);
|
|
57220
57222
|
for (const model of this.availableModels) {
|
|
57221
|
-
const status = model.available ?
|
|
57222
|
-
const name2 = model.id === this.currentModel ?
|
|
57223
|
-
message += `${status} ${name2.padEnd(20)} ${
|
|
57223
|
+
const status = model.available ? chalk28__default.default.green("\u2705") : chalk28__default.default.red("\u274C");
|
|
57224
|
+
const name2 = model.id === this.currentModel ? chalk28__default.default.green.bold(model.id) : chalk28__default.default.cyan(model.id);
|
|
57225
|
+
message += `${status} ${name2.padEnd(20)} ${chalk28__default.default.gray(`[${model.provider}]`)}
|
|
57224
57226
|
`;
|
|
57225
57227
|
}
|
|
57226
|
-
message +=
|
|
57228
|
+
message += chalk28__default.default.gray("\nUse /model <name> to switch models");
|
|
57227
57229
|
return {
|
|
57228
57230
|
ok: true,
|
|
57229
57231
|
message,
|
|
@@ -57234,27 +57236,27 @@ var init_SystemHandlers = __esm({
|
|
|
57234
57236
|
if (!modelId) {
|
|
57235
57237
|
return {
|
|
57236
57238
|
ok: false,
|
|
57237
|
-
message:
|
|
57239
|
+
message: chalk28__default.default.red("Please specify a model to switch to")
|
|
57238
57240
|
};
|
|
57239
57241
|
}
|
|
57240
57242
|
const model = this.availableModels.find((m2) => m2.id === modelId);
|
|
57241
57243
|
if (!model) {
|
|
57242
57244
|
return {
|
|
57243
57245
|
ok: false,
|
|
57244
|
-
message:
|
|
57245
|
-
`) +
|
|
57246
|
+
message: chalk28__default.default.red(`Unknown model: ${modelId}
|
|
57247
|
+
`) + chalk28__default.default.gray("Use /model list to see available models")
|
|
57246
57248
|
};
|
|
57247
57249
|
}
|
|
57248
57250
|
if (!model.available) {
|
|
57249
57251
|
return {
|
|
57250
57252
|
ok: false,
|
|
57251
|
-
message:
|
|
57253
|
+
message: chalk28__default.default.yellow(`Model ${modelId} is not currently available`)
|
|
57252
57254
|
};
|
|
57253
57255
|
}
|
|
57254
57256
|
this.currentModel = modelId;
|
|
57255
57257
|
return {
|
|
57256
57258
|
ok: true,
|
|
57257
|
-
message:
|
|
57259
|
+
message: chalk28__default.default.green(`\u2705 Switched to ${modelId}`),
|
|
57258
57260
|
data: { model: modelId }
|
|
57259
57261
|
};
|
|
57260
57262
|
}
|
|
@@ -57263,27 +57265,27 @@ var init_SystemHandlers = __esm({
|
|
|
57263
57265
|
if (!model) {
|
|
57264
57266
|
return {
|
|
57265
57267
|
ok: false,
|
|
57266
|
-
message:
|
|
57268
|
+
message: chalk28__default.default.red(`Unknown model: ${modelId}`)
|
|
57267
57269
|
};
|
|
57268
57270
|
}
|
|
57269
|
-
let message =
|
|
57271
|
+
let message = chalk28__default.default.cyan(`\u{1F4CB} Model Information: ${modelId}
|
|
57270
57272
|
|
|
57271
57273
|
`);
|
|
57272
|
-
message +=
|
|
57274
|
+
message += chalk28__default.default.gray(`Provider: ${model.provider}
|
|
57273
57275
|
`);
|
|
57274
|
-
message +=
|
|
57276
|
+
message += chalk28__default.default.gray(
|
|
57275
57277
|
`Status: ${model.available ? "Available" : "Unavailable"}
|
|
57276
57278
|
`
|
|
57277
57279
|
);
|
|
57278
|
-
message +=
|
|
57280
|
+
message += chalk28__default.default.gray(
|
|
57279
57281
|
`Current: ${model.id === this.currentModel ? "Yes" : "No"}
|
|
57280
57282
|
`
|
|
57281
57283
|
);
|
|
57282
|
-
message +=
|
|
57283
|
-
message +=
|
|
57284
|
-
message +=
|
|
57285
|
-
message +=
|
|
57286
|
-
message +=
|
|
57284
|
+
message += chalk28__default.default.gray("\nCapabilities:\n");
|
|
57285
|
+
message += chalk28__default.default.gray(" \u2022 Context: 128K tokens\n");
|
|
57286
|
+
message += chalk28__default.default.gray(" \u2022 Languages: 95+\n");
|
|
57287
|
+
message += chalk28__default.default.gray(" \u2022 Code: Yes\n");
|
|
57288
|
+
message += chalk28__default.default.gray(" \u2022 Vision: ") + (modelId.includes("gpt-4") ? "Yes\n" : "No\n");
|
|
57287
57289
|
return {
|
|
57288
57290
|
ok: true,
|
|
57289
57291
|
message,
|
|
@@ -57315,39 +57317,39 @@ var init_SystemHandlers = __esm({
|
|
|
57315
57317
|
default:
|
|
57316
57318
|
return {
|
|
57317
57319
|
ok: false,
|
|
57318
|
-
message:
|
|
57319
|
-
`) +
|
|
57320
|
+
message: chalk28__default.default.red(`Unknown memory subcommand: ${subcommand}
|
|
57321
|
+
`) + chalk28__default.default.gray("Available: status, clear, export, compact")
|
|
57320
57322
|
};
|
|
57321
57323
|
}
|
|
57322
57324
|
}
|
|
57323
57325
|
async showStatus() {
|
|
57324
|
-
let message =
|
|
57325
|
-
message +=
|
|
57326
|
-
message +=
|
|
57326
|
+
let message = chalk28__default.default.cyan.bold("\u{1F9E0} Memory Status\n\n");
|
|
57327
|
+
message += chalk28__default.default.yellow("System 1 (Fast):\n");
|
|
57328
|
+
message += chalk28__default.default.gray(
|
|
57327
57329
|
` \u2022 Knowledge Nodes: ${this.memoryStats.system1.nodes}
|
|
57328
57330
|
`
|
|
57329
57331
|
);
|
|
57330
|
-
message +=
|
|
57332
|
+
message += chalk28__default.default.gray(` \u2022 Tokens: ${this.memoryStats.system1.tokens}
|
|
57331
57333
|
|
|
57332
57334
|
`);
|
|
57333
|
-
message +=
|
|
57334
|
-
message +=
|
|
57335
|
+
message += chalk28__default.default.blue("System 2 (Deep):\n");
|
|
57336
|
+
message += chalk28__default.default.gray(
|
|
57335
57337
|
` \u2022 Reasoning Traces: ${this.memoryStats.system2.traces}
|
|
57336
57338
|
`
|
|
57337
57339
|
);
|
|
57338
|
-
message +=
|
|
57340
|
+
message += chalk28__default.default.gray(` \u2022 Tokens: ${this.memoryStats.system2.tokens}
|
|
57339
57341
|
|
|
57340
57342
|
`);
|
|
57341
|
-
message +=
|
|
57342
|
-
message +=
|
|
57343
|
+
message += chalk28__default.default.green("Total:\n");
|
|
57344
|
+
message += chalk28__default.default.gray(` \u2022 Entries: ${this.memoryStats.total.entries}
|
|
57343
57345
|
`);
|
|
57344
|
-
message +=
|
|
57346
|
+
message += chalk28__default.default.gray(
|
|
57345
57347
|
` \u2022 Tokens: ${this.memoryStats.total.tokens} / 128000
|
|
57346
57348
|
`
|
|
57347
57349
|
);
|
|
57348
57350
|
const usage = Math.round(this.memoryStats.total.tokens / 128e3 * 100);
|
|
57349
57351
|
const bar = "\u2588".repeat(Math.floor(usage / 5)) + "\u2591".repeat(20 - Math.floor(usage / 5));
|
|
57350
|
-
message +=
|
|
57352
|
+
message += chalk28__default.default.gray(` \u2022 Usage: [${bar}] ${usage}%
|
|
57351
57353
|
`);
|
|
57352
57354
|
return {
|
|
57353
57355
|
ok: true,
|
|
@@ -57361,14 +57363,14 @@ var init_SystemHandlers = __esm({
|
|
|
57361
57363
|
this.memoryStats.system1 = { nodes: 0, tokens: 0 };
|
|
57362
57364
|
return {
|
|
57363
57365
|
ok: true,
|
|
57364
|
-
message:
|
|
57366
|
+
message: chalk28__default.default.green("\u2705 System 1 memory cleared")
|
|
57365
57367
|
};
|
|
57366
57368
|
}
|
|
57367
57369
|
if (system === "system2") {
|
|
57368
57370
|
this.memoryStats.system2 = { traces: 0, tokens: 0 };
|
|
57369
57371
|
return {
|
|
57370
57372
|
ok: true,
|
|
57371
|
-
message:
|
|
57373
|
+
message: chalk28__default.default.green("\u2705 System 2 memory cleared")
|
|
57372
57374
|
};
|
|
57373
57375
|
}
|
|
57374
57376
|
this.memoryStats = {
|
|
@@ -57378,15 +57380,15 @@ var init_SystemHandlers = __esm({
|
|
|
57378
57380
|
};
|
|
57379
57381
|
return {
|
|
57380
57382
|
ok: true,
|
|
57381
|
-
message:
|
|
57383
|
+
message: chalk28__default.default.green("\u{1F9F9} All memory cleared")
|
|
57382
57384
|
};
|
|
57383
57385
|
}
|
|
57384
57386
|
async exportMemory() {
|
|
57385
57387
|
const filename = `memory-export-${Date.now()}.json`;
|
|
57386
57388
|
return {
|
|
57387
57389
|
ok: true,
|
|
57388
|
-
message:
|
|
57389
|
-
`) +
|
|
57390
|
+
message: chalk28__default.default.green(`\u{1F4E6} Memory exported to ${filename}
|
|
57391
|
+
`) + chalk28__default.default.gray(
|
|
57390
57392
|
`Size: ${Math.round(JSON.stringify(this.memoryStats).length / 1024)}KB`
|
|
57391
57393
|
),
|
|
57392
57394
|
data: { filename, stats: this.memoryStats }
|
|
@@ -57404,9 +57406,9 @@ var init_SystemHandlers = __esm({
|
|
|
57404
57406
|
);
|
|
57405
57407
|
return {
|
|
57406
57408
|
ok: true,
|
|
57407
|
-
message:
|
|
57408
|
-
`) +
|
|
57409
|
-
`) +
|
|
57409
|
+
message: chalk28__default.default.green("\u2728 Memory compacted successfully\n") + chalk28__default.default.gray(`Before: ${before} tokens
|
|
57410
|
+
`) + chalk28__default.default.gray(`After: ${after} tokens
|
|
57411
|
+
`) + chalk28__default.default.gray(
|
|
57410
57412
|
`Saved: ${before - after} tokens (${Math.round((1 - after / before) * 100)}%)`
|
|
57411
57413
|
),
|
|
57412
57414
|
data: { before, after, saved: before - after }
|
|
@@ -57422,11 +57424,11 @@ var init_SystemHandlers = __esm({
|
|
|
57422
57424
|
if (signal?.aborted) {
|
|
57423
57425
|
return {
|
|
57424
57426
|
ok: false,
|
|
57425
|
-
message:
|
|
57427
|
+
message: chalk28__default.default.yellow("Health check canceled")
|
|
57426
57428
|
};
|
|
57427
57429
|
}
|
|
57428
57430
|
const detailed = args2.includes("--detailed");
|
|
57429
|
-
let message =
|
|
57431
|
+
let message = chalk28__default.default.cyan.bold("\u{1F3E5} System Health Check\n\n");
|
|
57430
57432
|
const checks = [
|
|
57431
57433
|
{ name: "Core Services", status: "ok", latency: 12 },
|
|
57432
57434
|
{ name: "Memory System", status: "ok", latency: 8 },
|
|
@@ -57435,11 +57437,11 @@ var init_SystemHandlers = __esm({
|
|
|
57435
57437
|
{ name: "Network", status: "warning", latency: 250 }
|
|
57436
57438
|
];
|
|
57437
57439
|
for (const check of checks) {
|
|
57438
|
-
const icon = check.status === "ok" ?
|
|
57439
|
-
const status = check.status === "ok" ?
|
|
57440
|
+
const icon = check.status === "ok" ? chalk28__default.default.green("\u2705") : check.status === "warning" ? chalk28__default.default.yellow("\u26A0\uFE0F") : chalk28__default.default.red("\u274C");
|
|
57441
|
+
const status = check.status === "ok" ? chalk28__default.default.green("OK") : check.status === "warning" ? chalk28__default.default.yellow("WARNING") : chalk28__default.default.red("ERROR");
|
|
57440
57442
|
message += `${icon} ${check.name.padEnd(20)} ${status}`;
|
|
57441
57443
|
if (detailed) {
|
|
57442
|
-
message +=
|
|
57444
|
+
message += chalk28__default.default.gray(` (${check.latency}ms)`);
|
|
57443
57445
|
}
|
|
57444
57446
|
message += "\n";
|
|
57445
57447
|
}
|
|
@@ -57447,11 +57449,11 @@ var init_SystemHandlers = __esm({
|
|
|
57447
57449
|
const hasErrors = checks.some((c) => c.status === "error");
|
|
57448
57450
|
message += "\n";
|
|
57449
57451
|
if (hasErrors) {
|
|
57450
|
-
message +=
|
|
57452
|
+
message += chalk28__default.default.red("\u26A0\uFE0F System has errors - intervention required");
|
|
57451
57453
|
} else if (hasWarnings) {
|
|
57452
|
-
message +=
|
|
57454
|
+
message += chalk28__default.default.yellow("\u26A0\uFE0F System operational with warnings");
|
|
57453
57455
|
} else {
|
|
57454
|
-
message +=
|
|
57456
|
+
message += chalk28__default.default.green("\u2705 All systems operational");
|
|
57455
57457
|
}
|
|
57456
57458
|
return {
|
|
57457
57459
|
ok: true,
|
|
@@ -57469,12 +57471,12 @@ var init_SystemHandlers = __esm({
|
|
|
57469
57471
|
if (signal?.aborted) {
|
|
57470
57472
|
return {
|
|
57471
57473
|
ok: false,
|
|
57472
|
-
message:
|
|
57474
|
+
message: chalk28__default.default.yellow("Doctor check canceled")
|
|
57473
57475
|
};
|
|
57474
57476
|
}
|
|
57475
57477
|
const autoFix = args2.includes("--fix");
|
|
57476
|
-
let message =
|
|
57477
|
-
message +=
|
|
57478
|
+
let message = chalk28__default.default.cyan.bold("\u{1F468}\u2695\uFE0F System Doctor\n\n");
|
|
57479
|
+
message += chalk28__default.default.gray("Running diagnostics...\n\n");
|
|
57478
57480
|
const issues = [
|
|
57479
57481
|
{
|
|
57480
57482
|
severity: "warning",
|
|
@@ -57496,20 +57498,20 @@ var init_SystemHandlers = __esm({
|
|
|
57496
57498
|
}
|
|
57497
57499
|
];
|
|
57498
57500
|
if (issues.length === 0) {
|
|
57499
|
-
message +=
|
|
57501
|
+
message += chalk28__default.default.green("\u2705 No issues found - system is healthy!");
|
|
57500
57502
|
return { ok: true, message };
|
|
57501
57503
|
}
|
|
57502
|
-
message +=
|
|
57504
|
+
message += chalk28__default.default.yellow(`Found ${issues.length} issue(s):
|
|
57503
57505
|
|
|
57504
57506
|
`);
|
|
57505
57507
|
for (const issue of issues) {
|
|
57506
|
-
const icon = issue.severity === "error" ?
|
|
57508
|
+
const icon = issue.severity === "error" ? chalk28__default.default.red("\u274C") : issue.severity === "warning" ? chalk28__default.default.yellow("\u26A0\uFE0F") : chalk28__default.default.blue("\u2139\uFE0F");
|
|
57507
57509
|
message += `${icon} ${issue.issue}
|
|
57508
57510
|
`;
|
|
57509
|
-
message +=
|
|
57511
|
+
message += chalk28__default.default.gray(` Solution: ${issue.solution}
|
|
57510
57512
|
`);
|
|
57511
57513
|
if (autoFix && issue.fixable) {
|
|
57512
|
-
message +=
|
|
57514
|
+
message += chalk28__default.default.green(` \u2705 Auto-fixed
|
|
57513
57515
|
`);
|
|
57514
57516
|
}
|
|
57515
57517
|
message += "\n";
|
|
@@ -57517,7 +57519,7 @@ var init_SystemHandlers = __esm({
|
|
|
57517
57519
|
if (!autoFix) {
|
|
57518
57520
|
const fixableCount = issues.filter((i2) => i2.fixable).length;
|
|
57519
57521
|
if (fixableCount > 0) {
|
|
57520
|
-
message +=
|
|
57522
|
+
message += chalk28__default.default.gray(
|
|
57521
57523
|
`
|
|
57522
57524
|
Run /doctor --fix to automatically fix ${fixableCount} issue(s)`
|
|
57523
57525
|
);
|
|
@@ -57980,14 +57982,14 @@ function createCLI() {
|
|
|
57980
57982
|
}
|
|
57981
57983
|
});
|
|
57982
57984
|
program2.command("setup-ollama").description("Setup Ollama for local AI").action(async () => {
|
|
57983
|
-
console.log(
|
|
57985
|
+
console.log(chalk28__default.default.cyan("Setting up Ollama..."));
|
|
57984
57986
|
console.log(
|
|
57985
|
-
|
|
57987
|
+
chalk28__default.default.yellow("Please run: brew install ollama && ollama serve")
|
|
57986
57988
|
);
|
|
57987
57989
|
});
|
|
57988
57990
|
program2.command("setup-vllm").description("Setup vLLM for local AI").action(async () => {
|
|
57989
|
-
console.log(
|
|
57990
|
-
console.log(
|
|
57991
|
+
console.log(chalk28__default.default.cyan("Setting up vLLM..."));
|
|
57992
|
+
console.log(chalk28__default.default.yellow("Please run: pip install vllm"));
|
|
57991
57993
|
});
|
|
57992
57994
|
return program2;
|
|
57993
57995
|
}
|
|
@@ -58015,13 +58017,13 @@ var init_maria_ai = __esm({
|
|
|
58015
58017
|
await this.providerSelector.initialize();
|
|
58016
58018
|
const { provider, model } = await this.providerSelector.selectProvider();
|
|
58017
58019
|
console.log(
|
|
58018
|
-
|
|
58020
|
+
chalk28__default.default.green(`
|
|
58019
58021
|
\u2705 Selected: ${provider} with model ${model}`)
|
|
58020
58022
|
);
|
|
58021
58023
|
this.config.set("currentProvider", provider);
|
|
58022
58024
|
this.config.set("currentModel", model);
|
|
58023
58025
|
await this.config.save();
|
|
58024
|
-
console.log(
|
|
58026
|
+
console.log(chalk28__default.default.cyan("\n\u{1F9E0} Initializing Intelligent Router..."));
|
|
58025
58027
|
this.router = new IntelligentRouterService({
|
|
58026
58028
|
confidenceThreshold: 0.85,
|
|
58027
58029
|
enableLearning: true,
|
|
@@ -58029,12 +58031,12 @@ var init_maria_ai = __esm({
|
|
|
58029
58031
|
});
|
|
58030
58032
|
await this.router.initialize();
|
|
58031
58033
|
console.log(
|
|
58032
|
-
|
|
58034
|
+
chalk28__default.default.green("\u2705 Intelligent Router initialized successfully\n")
|
|
58033
58035
|
);
|
|
58034
58036
|
this.session = createInteractiveSession(this);
|
|
58035
58037
|
await this.session.start();
|
|
58036
58038
|
} catch (error2) {
|
|
58037
|
-
console.error(
|
|
58039
|
+
console.error(chalk28__default.default.red("\n\u274C Initialization failed:"), error2);
|
|
58038
58040
|
process.exit(1);
|
|
58039
58041
|
}
|
|
58040
58042
|
}
|
|
@@ -58042,7 +58044,7 @@ var init_maria_ai = __esm({
|
|
|
58042
58044
|
if (this.session) {
|
|
58043
58045
|
await this.session.stop();
|
|
58044
58046
|
}
|
|
58045
|
-
console.log(
|
|
58047
|
+
console.log(chalk28__default.default.green("\n\u{1F44B} Goodbye!"));
|
|
58046
58048
|
}
|
|
58047
58049
|
};
|
|
58048
58050
|
}
|
|
@@ -58086,8 +58088,8 @@ async function loadServices() {
|
|
|
58086
58088
|
try {
|
|
58087
58089
|
const commandName = command.startsWith("/") ? command.slice(1) : command;
|
|
58088
58090
|
if (commandName === "battlecard") {
|
|
58089
|
-
console.log(
|
|
58090
|
-
console.log(
|
|
58091
|
+
console.log(chalk28__default.default.yellow("\u{1F512} /battlecard is not available on Free plan"));
|
|
58092
|
+
console.log(chalk28__default.default.gray(" Join the waitlist for business features: https://maria-code.ai/waitlist"));
|
|
58091
58093
|
return {
|
|
58092
58094
|
success: false,
|
|
58093
58095
|
message: "Command not available on Free plan"
|
|
@@ -58148,7 +58150,7 @@ async function loadServices() {
|
|
|
58148
58150
|
commandManager.setLegacyHandler(legacyHandlerAdapter);
|
|
58149
58151
|
}
|
|
58150
58152
|
} catch (e2) {
|
|
58151
|
-
console.warn(
|
|
58153
|
+
console.warn(chalk28__default.default.yellow("\u26A0 Some services unavailable, using fallbacks"));
|
|
58152
58154
|
}
|
|
58153
58155
|
}
|
|
58154
58156
|
async function init() {
|
|
@@ -58270,17 +58272,17 @@ async function enforceAuth(cmd) {
|
|
|
58270
58272
|
try {
|
|
58271
58273
|
const tokens = await authManager.getValidTokens();
|
|
58272
58274
|
if (!tokens) {
|
|
58273
|
-
console.log(
|
|
58275
|
+
console.log(chalk28__default.default.red("\u{1F510} Authentication required \xB7 Run: maria /login"));
|
|
58274
58276
|
return false;
|
|
58275
58277
|
}
|
|
58276
58278
|
return true;
|
|
58277
58279
|
} catch (error2) {
|
|
58278
58280
|
if (error2.code === "AUTH_REQUIRED") {
|
|
58279
|
-
console.log(
|
|
58281
|
+
console.log(chalk28__default.default.red("\u{1F510} Authentication required \xB7 Run: maria /login"));
|
|
58280
58282
|
} else if (error2.code === "REAUTH_REQUIRED") {
|
|
58281
|
-
console.log(
|
|
58283
|
+
console.log(chalk28__default.default.yellow("\u{1F504} Please re-authenticate \xB7 Run: maria /login"));
|
|
58282
58284
|
} else {
|
|
58283
|
-
console.log(
|
|
58285
|
+
console.log(chalk28__default.default.red("\u{1F310} Network error, check connection"));
|
|
58284
58286
|
}
|
|
58285
58287
|
return false;
|
|
58286
58288
|
}
|
|
@@ -58319,7 +58321,7 @@ async function handleSlash(input3) {
|
|
|
58319
58321
|
console.log(JSON.stringify(result2.data, null, 2));
|
|
58320
58322
|
}
|
|
58321
58323
|
} else {
|
|
58322
|
-
console.log(
|
|
58324
|
+
console.log(chalk28__default.default.red(`Help Error: ${result2.message}`));
|
|
58323
58325
|
}
|
|
58324
58326
|
return true;
|
|
58325
58327
|
}
|
|
@@ -58327,7 +58329,7 @@ async function handleSlash(input3) {
|
|
|
58327
58329
|
if (process.env.MARIA_DEBUG === "1") {
|
|
58328
58330
|
console.error("HelpCommand error:", helpError);
|
|
58329
58331
|
}
|
|
58330
|
-
console.log(
|
|
58332
|
+
console.log(chalk28__default.default.yellow("\u26A0 Dynamic help unavailable, using fallback"));
|
|
58331
58333
|
}
|
|
58332
58334
|
const help = `
|
|
58333
58335
|
\u{1F4D6} MARIA CLI Help
|
|
@@ -58357,7 +58359,7 @@ Chat:
|
|
|
58357
58359
|
session.length = 0;
|
|
58358
58360
|
if (ctx?.clearContext) ctx.clearContext();
|
|
58359
58361
|
console.clear();
|
|
58360
|
-
console.log(
|
|
58362
|
+
console.log(chalk28__default.default.green("\u2728 Session cleared"));
|
|
58361
58363
|
return true;
|
|
58362
58364
|
}
|
|
58363
58365
|
if (cmd === "code") {
|
|
@@ -58366,7 +58368,7 @@ Chat:
|
|
|
58366
58368
|
const prompt = args2.join(" ").trim();
|
|
58367
58369
|
if (!prompt) {
|
|
58368
58370
|
console.log(
|
|
58369
|
-
|
|
58371
|
+
chalk28__default.default.red("Usage: /code <request> e.g. /code build a REST API")
|
|
58370
58372
|
);
|
|
58371
58373
|
return true;
|
|
58372
58374
|
}
|
|
@@ -58379,7 +58381,7 @@ Chat:
|
|
|
58379
58381
|
const prompt = args2.join(" ").trim();
|
|
58380
58382
|
if (!prompt) {
|
|
58381
58383
|
console.log(
|
|
58382
|
-
|
|
58384
|
+
chalk28__default.default.cyan("\u{1F3A8} **Image Generation**\n") + chalk28__default.default.white("Usage: /image <prompt>\n") + chalk28__default.default.gray("Example: /image \u5BCC\u58EB\u5C71\u306E\u65E5\u306E\u51FA")
|
|
58383
58385
|
);
|
|
58384
58386
|
return true;
|
|
58385
58387
|
}
|
|
@@ -58391,14 +58393,14 @@ Chat:
|
|
|
58391
58393
|
options: {},
|
|
58392
58394
|
logger: {
|
|
58393
58395
|
info: (msg) => console.log(msg),
|
|
58394
|
-
error: (msg) => console.error(
|
|
58395
|
-
warn: (msg) => console.warn(
|
|
58396
|
+
error: (msg) => console.error(chalk28__default.default.red(msg)),
|
|
58397
|
+
warn: (msg) => console.warn(chalk28__default.default.yellow(msg))
|
|
58396
58398
|
}
|
|
58397
58399
|
};
|
|
58398
58400
|
await imageCommand2.execute(context2);
|
|
58399
58401
|
}
|
|
58400
58402
|
} catch (error2) {
|
|
58401
|
-
console.error(
|
|
58403
|
+
console.error(chalk28__default.default.red("Image generation failed:"), error2.message);
|
|
58402
58404
|
}
|
|
58403
58405
|
return true;
|
|
58404
58406
|
}
|
|
@@ -58408,7 +58410,7 @@ Chat:
|
|
|
58408
58410
|
const prompt = args2.join(" ").trim();
|
|
58409
58411
|
if (!prompt) {
|
|
58410
58412
|
console.log(
|
|
58411
|
-
|
|
58413
|
+
chalk28__default.default.cyan("\u{1F3AC} **Video Generation**\n") + chalk28__default.default.white("Usage: /video <prompt>\n") + chalk28__default.default.gray("Example: /video \u6D77\u306E\u6CE2\u304C\u6253\u3061\u5BC4\u305B\u308B\u69D8\u5B50")
|
|
58412
58414
|
);
|
|
58413
58415
|
return true;
|
|
58414
58416
|
}
|
|
@@ -58420,14 +58422,14 @@ Chat:
|
|
|
58420
58422
|
options: {},
|
|
58421
58423
|
logger: {
|
|
58422
58424
|
info: (msg) => console.log(msg),
|
|
58423
|
-
error: (msg) => console.error(
|
|
58424
|
-
warn: (msg) => console.warn(
|
|
58425
|
+
error: (msg) => console.error(chalk28__default.default.red(msg)),
|
|
58426
|
+
warn: (msg) => console.warn(chalk28__default.default.yellow(msg))
|
|
58425
58427
|
}
|
|
58426
58428
|
};
|
|
58427
58429
|
await videoCommand2.execute(context2);
|
|
58428
58430
|
}
|
|
58429
58431
|
} catch (error2) {
|
|
58430
|
-
console.error(
|
|
58432
|
+
console.error(chalk28__default.default.red("Video generation failed:"), error2.message);
|
|
58431
58433
|
}
|
|
58432
58434
|
return true;
|
|
58433
58435
|
}
|
|
@@ -58437,7 +58439,7 @@ Chat:
|
|
|
58437
58439
|
const prompt = args2.join(" ").trim();
|
|
58438
58440
|
if (!prompt) {
|
|
58439
58441
|
console.log(
|
|
58440
|
-
|
|
58442
|
+
chalk28__default.default.cyan("\u{1F399}\uFE0F **Voice Synthesis**\n") + chalk28__default.default.white("Usage: /voice <text>\n") + chalk28__default.default.gray("Example: /voice \u3053\u3093\u306B\u3061\u306F\u3001\u5143\u6C17\u3067\u3059\u304B\uFF1F")
|
|
58441
58443
|
);
|
|
58442
58444
|
return true;
|
|
58443
58445
|
}
|
|
@@ -58449,14 +58451,14 @@ Chat:
|
|
|
58449
58451
|
options: {},
|
|
58450
58452
|
logger: {
|
|
58451
58453
|
info: (msg) => console.log(msg),
|
|
58452
|
-
error: (msg) => console.error(
|
|
58453
|
-
warn: (msg) => console.warn(
|
|
58454
|
+
error: (msg) => console.error(chalk28__default.default.red(msg)),
|
|
58455
|
+
warn: (msg) => console.warn(chalk28__default.default.yellow(msg))
|
|
58454
58456
|
}
|
|
58455
58457
|
};
|
|
58456
58458
|
await voiceCommand2.execute(context2);
|
|
58457
58459
|
}
|
|
58458
58460
|
} catch (error2) {
|
|
58459
|
-
console.error(
|
|
58461
|
+
console.error(chalk28__default.default.red("Voice synthesis failed:"), error2.message);
|
|
58460
58462
|
}
|
|
58461
58463
|
return true;
|
|
58462
58464
|
}
|
|
@@ -58475,49 +58477,49 @@ Chat:
|
|
|
58475
58477
|
if (args2.includes("status")) {
|
|
58476
58478
|
if (await authManager.isAuthenticated()) {
|
|
58477
58479
|
const user = await authManager.getCurrentUser();
|
|
58478
|
-
console.log(
|
|
58480
|
+
console.log(chalk28__default.default.green("\u2705 Authenticated"));
|
|
58479
58481
|
if (user.name) {
|
|
58480
|
-
console.log(
|
|
58482
|
+
console.log(chalk28__default.default.white(`\u{1F464} Name: ${chalk28__default.default.cyan(user.name)}`));
|
|
58481
58483
|
}
|
|
58482
|
-
console.log(
|
|
58484
|
+
console.log(chalk28__default.default.white(`\u{1F4E7} Email: ${chalk28__default.default.cyan(user.email)}`));
|
|
58483
58485
|
if (user.provider) {
|
|
58484
|
-
console.log(
|
|
58486
|
+
console.log(chalk28__default.default.white(`\u{1F511} Provider: ${chalk28__default.default.cyan(user.provider)}`));
|
|
58485
58487
|
}
|
|
58486
|
-
console.log(
|
|
58488
|
+
console.log(chalk28__default.default.white(`\u{1F4CA} Plan: ${chalk28__default.default.cyan(user.plan)}`));
|
|
58487
58489
|
} else {
|
|
58488
|
-
console.log(
|
|
58489
|
-
console.log(
|
|
58490
|
+
console.log(chalk28__default.default.yellow("\u26A0\uFE0F Not authenticated"));
|
|
58491
|
+
console.log(chalk28__default.default.gray("Use /login to sign in"));
|
|
58490
58492
|
}
|
|
58491
58493
|
} else {
|
|
58492
58494
|
const result2 = await authManager.login(options3);
|
|
58493
58495
|
if (result2.success && result2.user) {
|
|
58494
|
-
console.log(
|
|
58496
|
+
console.log(chalk28__default.default.green("\u2705 Successfully logged in!"));
|
|
58495
58497
|
const u = result2.user;
|
|
58496
58498
|
if (u.name) {
|
|
58497
|
-
console.log(
|
|
58499
|
+
console.log(chalk28__default.default.white(`\u{1F464} Name: ${chalk28__default.default.cyan(u.name)}`));
|
|
58498
58500
|
}
|
|
58499
|
-
console.log(
|
|
58501
|
+
console.log(chalk28__default.default.white(`\u{1F4E7} Email: ${chalk28__default.default.cyan(u.email)}`));
|
|
58500
58502
|
if (u.provider) {
|
|
58501
|
-
console.log(
|
|
58503
|
+
console.log(chalk28__default.default.white(`\u{1F511} Provider: ${chalk28__default.default.cyan(u.provider)}`));
|
|
58502
58504
|
}
|
|
58503
|
-
console.log(
|
|
58505
|
+
console.log(chalk28__default.default.white(`\u{1F4CA} Plan: ${chalk28__default.default.cyan(u.plan)}`));
|
|
58504
58506
|
} else {
|
|
58505
|
-
console.log(
|
|
58506
|
-
if (result2.error) console.log(
|
|
58507
|
+
console.log(chalk28__default.default.red("\u274C Login failed"));
|
|
58508
|
+
if (result2.error) console.log(chalk28__default.default.gray(result2.error));
|
|
58507
58509
|
}
|
|
58508
58510
|
}
|
|
58509
58511
|
}
|
|
58510
58512
|
} catch (error2) {
|
|
58511
|
-
console.error(
|
|
58513
|
+
console.error(chalk28__default.default.red("Login error:"), error2.message);
|
|
58512
58514
|
}
|
|
58513
58515
|
return true;
|
|
58514
58516
|
}
|
|
58515
58517
|
if (cmd === "logout" || cmd === "signout") {
|
|
58516
58518
|
try {
|
|
58517
58519
|
await authManager.logout();
|
|
58518
|
-
console.log(
|
|
58520
|
+
console.log(chalk28__default.default.green("\u{1F44B} Signed out. Local credentials removed."));
|
|
58519
58521
|
} catch (error2) {
|
|
58520
|
-
console.error(
|
|
58522
|
+
console.error(chalk28__default.default.red("Logout error:"), error2.message);
|
|
58521
58523
|
}
|
|
58522
58524
|
return true;
|
|
58523
58525
|
}
|
|
@@ -58658,7 +58660,7 @@ Chat:
|
|
|
58658
58660
|
} else if (result2.message) {
|
|
58659
58661
|
console.log(result2.message);
|
|
58660
58662
|
} else if (result2.success) {
|
|
58661
|
-
console.log(
|
|
58663
|
+
console.log(chalk28__default.default.green("\u2705 Command executed successfully"));
|
|
58662
58664
|
}
|
|
58663
58665
|
if (result2.data && process.env.MARIA_DEBUG === "1") {
|
|
58664
58666
|
console.log(JSON.stringify(result2.data, null, 2));
|
|
@@ -58672,11 +58674,11 @@ Chat:
|
|
|
58672
58674
|
}
|
|
58673
58675
|
}
|
|
58674
58676
|
if (!["battlecard", "sales-dashboard", "tune", "pilot-setup"].includes(cmd)) {
|
|
58675
|
-
console.log(
|
|
58676
|
-
console.log(
|
|
58677
|
-
console.log(
|
|
58678
|
-
console.log(
|
|
58679
|
-
console.log(
|
|
58677
|
+
console.log(chalk28__default.default.red(`\u274C Unknown command: /${cmd}`));
|
|
58678
|
+
console.log(chalk28__default.default.yellow("\n\u{1F4A1} Suggestions:"));
|
|
58679
|
+
console.log(chalk28__default.default.gray(" \u2022 Try /help to see available commands"));
|
|
58680
|
+
console.log(chalk28__default.default.gray(" \u2022 Check if you need to /login first"));
|
|
58681
|
+
console.log(chalk28__default.default.gray(` \u2022 Try similar commands: /help --search ${cmd}`));
|
|
58680
58682
|
}
|
|
58681
58683
|
return true;
|
|
58682
58684
|
}
|
|
@@ -58938,17 +58940,17 @@ async function handleCodeCommand(prompt) {
|
|
|
58938
58940
|
const response2 = await generateStrictCode(prompt);
|
|
58939
58941
|
spinner.stop();
|
|
58940
58942
|
if (response2) {
|
|
58941
|
-
console.log(response2);
|
|
58943
|
+
console.log(chalk28__default.default.green(response2));
|
|
58942
58944
|
const { language, code, extension } = extractCodeInfo(response2);
|
|
58943
58945
|
const filename = generateCodeFilename(prompt, language, extension);
|
|
58944
58946
|
const filepath = path8__namespace.resolve(process.cwd(), filename);
|
|
58945
58947
|
await fsp__namespace.writeFile(filepath, code, "utf-8");
|
|
58946
58948
|
console.log(
|
|
58947
|
-
|
|
58948
|
-
`) +
|
|
58949
|
-
`) +
|
|
58950
|
-
`) +
|
|
58951
|
-
`) +
|
|
58949
|
+
chalk28__default.default.green("\n\u2705 Code Saved\n") + chalk28__default.default.green(`\u{1F4C1} File (Click to open):
|
|
58950
|
+
`) + chalk28__default.default.green(`\u2022 [${filename}](file://${filepath})
|
|
58951
|
+
`) + chalk28__default.default.green(` \u{1F4CD} Path: \`${filepath}\`
|
|
58952
|
+
`) + chalk28__default.default.green(` \u{1F4DD} Language: ${language}
|
|
58953
|
+
`) + chalk28__default.default.green(`
|
|
58952
58954
|
\u{1F4A1} Tip: Command+Click (Mac) or Ctrl+Click (Windows/Linux) to open file`)
|
|
58953
58955
|
);
|
|
58954
58956
|
} else {
|
|
@@ -58957,27 +58959,28 @@ async function handleCodeCommand(prompt) {
|
|
|
58957
58959
|
} catch (e2) {
|
|
58958
58960
|
spinner.stop();
|
|
58959
58961
|
if (process.env.MARIA_DEBUG === "1") {
|
|
58960
|
-
console.error(
|
|
58962
|
+
console.error(chalk28__default.default.red("Code generation error:"), e2.message || e2);
|
|
58961
58963
|
}
|
|
58962
58964
|
const fallbackCode = templateFallback(prompt);
|
|
58963
58965
|
console.log(
|
|
58964
|
-
|
|
58966
|
+
chalk28__default.default.yellow("\u26A0 AI unavailable, using template fallback:\n")
|
|
58965
58967
|
);
|
|
58966
|
-
console.log(fallbackCode);
|
|
58968
|
+
console.log(chalk28__default.default.green(fallbackCode));
|
|
58967
58969
|
try {
|
|
58968
58970
|
const { language, code, extension } = extractCodeInfo(fallbackCode);
|
|
58969
58971
|
const filename = generateCodeFilename(prompt, language, extension);
|
|
58970
58972
|
const filepath = path8__namespace.resolve(process.cwd(), filename);
|
|
58971
58973
|
await fsp__namespace.writeFile(filepath, code, "utf-8");
|
|
58972
58974
|
console.log(
|
|
58973
|
-
|
|
58974
|
-
`) +
|
|
58975
|
-
`) +
|
|
58976
|
-
`) +
|
|
58975
|
+
chalk28__default.default.green("\n\u2705 Template Code Saved\n") + chalk28__default.default.green(`\u{1F4C1} File (Click to open):
|
|
58976
|
+
`) + chalk28__default.default.green(`\u2022 [${filename}](file://${filepath})
|
|
58977
|
+
`) + chalk28__default.default.green(` \u{1F4CD} Path: \`${filepath}\`
|
|
58978
|
+
`) + chalk28__default.default.green(` \u{1F4DD} Language: ${language}
|
|
58979
|
+
`) + chalk28__default.default.green(`
|
|
58977
58980
|
\u{1F4A1} Tip: Command+Click (Mac) or Ctrl+Click (Windows/Linux) to open file`)
|
|
58978
58981
|
);
|
|
58979
58982
|
} catch (saveError) {
|
|
58980
|
-
console.error(
|
|
58983
|
+
console.error(chalk28__default.default.red("Failed to save code:"), saveError);
|
|
58981
58984
|
}
|
|
58982
58985
|
}
|
|
58983
58986
|
}
|
|
@@ -59033,7 +59036,7 @@ ${userPrompt}`;
|
|
|
59033
59036
|
(seq) => response2.includes(seq)
|
|
59034
59037
|
);
|
|
59035
59038
|
if (guidedFlowDetected) {
|
|
59036
|
-
console.log(
|
|
59039
|
+
console.log(chalk28__default.default.yellow("\u26A0 Guided flow detected, switching to fallback"));
|
|
59037
59040
|
return null;
|
|
59038
59041
|
}
|
|
59039
59042
|
const codeMatch = response2.match(/```[\s\S]*?```/);
|
|
@@ -59192,23 +59195,23 @@ async function streamAnswer(text) {
|
|
|
59192
59195
|
});
|
|
59193
59196
|
animation.stop();
|
|
59194
59197
|
if (ai.streamResponse) {
|
|
59195
|
-
await ai.streamResponse(resp, (line) => console.log(line));
|
|
59198
|
+
await ai.streamResponse(resp, (line) => console.log(chalk28__default.default.green(line)));
|
|
59196
59199
|
} else {
|
|
59197
|
-
console.log(resp);
|
|
59200
|
+
console.log(chalk28__default.default.green(resp));
|
|
59198
59201
|
}
|
|
59199
59202
|
const msg = { role: "assistant", content: resp, timestamp: /* @__PURE__ */ new Date() };
|
|
59200
59203
|
session.push(msg);
|
|
59201
59204
|
if (store?.addMessage) await store.addMessage(msg);
|
|
59202
59205
|
} else {
|
|
59203
59206
|
animation.stop();
|
|
59204
|
-
console.log(
|
|
59207
|
+
console.log(chalk28__default.default.yellow("AI service unavailable. Please check your configuration."));
|
|
59205
59208
|
}
|
|
59206
59209
|
} catch (e2) {
|
|
59207
59210
|
animation.stop();
|
|
59208
59211
|
if (e2.message?.includes("timeout") || e2.message?.includes("\u23F1\uFE0F")) {
|
|
59209
|
-
console.log(
|
|
59212
|
+
console.log(chalk28__default.default.yellow(e2.message));
|
|
59210
59213
|
} else {
|
|
59211
|
-
console.log(
|
|
59214
|
+
console.log(chalk28__default.default.red("Error generating response:"), e2.message || e2);
|
|
59212
59215
|
}
|
|
59213
59216
|
}
|
|
59214
59217
|
}
|
|
@@ -59223,9 +59226,9 @@ async function handleLine(line) {
|
|
|
59223
59226
|
if (consumed) return;
|
|
59224
59227
|
const isAuthenticated = await authManager.isAuthenticated();
|
|
59225
59228
|
if (!isAuthenticated) {
|
|
59226
|
-
console.log(
|
|
59227
|
-
console.log(
|
|
59228
|
-
console.log(
|
|
59229
|
+
console.log(chalk28__default.default.yellow("\n\u26A0\uFE0F Authentication required for chat features"));
|
|
59230
|
+
console.log(chalk28__default.default.yellow("Please run: /login"));
|
|
59231
|
+
console.log(chalk28__default.default.yellow("Or use slash commands like /help, /version"));
|
|
59229
59232
|
return;
|
|
59230
59233
|
}
|
|
59231
59234
|
const user = { role: "user", content: input3, timestamp: /* @__PURE__ */ new Date() };
|
|
@@ -59247,7 +59250,7 @@ async function startInteractiveSession() {
|
|
|
59247
59250
|
}
|
|
59248
59251
|
}
|
|
59249
59252
|
const stop = async () => {
|
|
59250
|
-
console.log(
|
|
59253
|
+
console.log(chalk28__default.default.green("\n\u{1F44B} Goodbye!"));
|
|
59251
59254
|
if (store?.close) await store.close().catch(() => {
|
|
59252
59255
|
});
|
|
59253
59256
|
if (interactiveCLI?.cleanup) interactiveCLI.cleanup();
|
|
@@ -59261,7 +59264,7 @@ async function startInteractiveSession() {
|
|
|
59261
59264
|
process.once("SIGINT", stop);
|
|
59262
59265
|
process.once("SIGTERM", stop);
|
|
59263
59266
|
if (!isTTY) {
|
|
59264
|
-
console.log(
|
|
59267
|
+
console.log(chalk28__default.default.gray("[Pipe mode detected - streaming input/output]"));
|
|
59265
59268
|
const rl = readline5__namespace.createInterface({
|
|
59266
59269
|
input: process6.stdin,
|
|
59267
59270
|
output: process6.stdout,
|
|
@@ -59290,14 +59293,14 @@ async function startInteractiveSession() {
|
|
|
59290
59293
|
await stop();
|
|
59291
59294
|
return;
|
|
59292
59295
|
}
|
|
59293
|
-
console.error(
|
|
59296
|
+
console.error(chalk28__default.default.red("Error:"), error2?.message || error2);
|
|
59294
59297
|
}
|
|
59295
59298
|
}
|
|
59296
59299
|
} else {
|
|
59297
59300
|
const rl = readline5__namespace.createInterface({ input: process6.stdin, output: process6.stdout });
|
|
59298
59301
|
while (true) {
|
|
59299
59302
|
try {
|
|
59300
|
-
const prompt =
|
|
59303
|
+
const prompt = chalk28__default.default.cyan("> ");
|
|
59301
59304
|
const line = await rl.question(prompt);
|
|
59302
59305
|
console.log();
|
|
59303
59306
|
if (line.toLowerCase() === "exit" || line.toLowerCase() === "quit") {
|
|
@@ -59311,7 +59314,7 @@ async function startInteractiveSession() {
|
|
|
59311
59314
|
await stop();
|
|
59312
59315
|
return;
|
|
59313
59316
|
}
|
|
59314
|
-
console.error(
|
|
59317
|
+
console.error(chalk28__default.default.red("Error:"), error2?.message || error2);
|
|
59315
59318
|
}
|
|
59316
59319
|
}
|
|
59317
59320
|
}
|
|
@@ -59321,7 +59324,7 @@ function createCLI2() {
|
|
|
59321
59324
|
program2.name("maria").description(`\u{1F680} MARIA v${getVersion()} - Intelligent AI Assistant`).version(getVersion()).option("--v3-session", "Use v3 session architecture").option("--no-interactive", "Disable interactive mode for CI/CD").action(async (options2) => {
|
|
59322
59325
|
loadEnvironmentVariables();
|
|
59323
59326
|
if (options2.server) {
|
|
59324
|
-
console.log(
|
|
59327
|
+
console.log(chalk28__default.default.green("\u{1F680} Starting MARIA server mode..."));
|
|
59325
59328
|
try {
|
|
59326
59329
|
const distDir = path8__namespace.dirname(process.argv[1] || process.cwd());
|
|
59327
59330
|
const candidateNames = [
|
|
@@ -59351,9 +59354,9 @@ function createCLI2() {
|
|
|
59351
59354
|
if (serverPath) break;
|
|
59352
59355
|
}
|
|
59353
59356
|
if (!serverPath) {
|
|
59354
|
-
console.error(
|
|
59355
|
-
console.error(
|
|
59356
|
-
console.error(
|
|
59357
|
+
console.error(chalk28__default.default.red("\u274C Could not locate server-express entry file"));
|
|
59358
|
+
console.error(chalk28__default.default.gray("Searched names: " + candidateNames.join(", ")));
|
|
59359
|
+
console.error(chalk28__default.default.gray("Searched dirs: " + candidateDirs.join(" | ")));
|
|
59357
59360
|
process.exit(1);
|
|
59358
59361
|
}
|
|
59359
59362
|
const { spawn: spawn3 } = await import('child_process');
|
|
@@ -59400,7 +59403,7 @@ function createCLI2() {
|
|
|
59400
59403
|
process.once("SIGINT", () => forwardAndExit("SIGINT"));
|
|
59401
59404
|
process.once("SIGTERM", () => forwardAndExit("SIGTERM"));
|
|
59402
59405
|
serverProcess.on("error", (error2) => {
|
|
59403
|
-
console.error(
|
|
59406
|
+
console.error(chalk28__default.default.red("\u274C Server process error:"), error2);
|
|
59404
59407
|
process.exit(1);
|
|
59405
59408
|
});
|
|
59406
59409
|
serverProcess.on("exit", (code, _signal) => {
|
|
@@ -59413,7 +59416,7 @@ function createCLI2() {
|
|
|
59413
59416
|
});
|
|
59414
59417
|
return;
|
|
59415
59418
|
} catch (error2) {
|
|
59416
|
-
console.error(
|
|
59419
|
+
console.error(chalk28__default.default.red("\u274C Failed to start server mode:"), error2);
|
|
59417
59420
|
process.exit(1);
|
|
59418
59421
|
}
|
|
59419
59422
|
}
|
|
@@ -59438,7 +59441,7 @@ function createCLI2() {
|
|
|
59438
59441
|
displayStartupLogo2();
|
|
59439
59442
|
startupDisplayed = true;
|
|
59440
59443
|
} catch {
|
|
59441
|
-
console.log(
|
|
59444
|
+
console.log(chalk28__default.default.cyan(`
|
|
59442
59445
|
\u{1F680} MARIA v${getVersion()}
|
|
59443
59446
|
`));
|
|
59444
59447
|
startupDisplayed = true;
|
|
@@ -59447,13 +59450,13 @@ function createCLI2() {
|
|
|
59447
59450
|
const useV3 = options2.v3Session || process.env.MARIA_USE_V3_SESSION === "1";
|
|
59448
59451
|
if (useV3) {
|
|
59449
59452
|
try {
|
|
59450
|
-
console.log(
|
|
59453
|
+
console.log(chalk28__default.default.cyan("\u{1F680} Starting MARIA v3 session..."));
|
|
59451
59454
|
const { MariaAI: MariaAI2 } = await Promise.resolve().then(() => (init_maria_ai(), maria_ai_exports));
|
|
59452
59455
|
const maria = new MariaAI2();
|
|
59453
59456
|
await maria.initialize();
|
|
59454
59457
|
return;
|
|
59455
59458
|
} catch (e2) {
|
|
59456
|
-
console.warn(
|
|
59459
|
+
console.warn(chalk28__default.default.yellow("\u26A0 V3 session unavailable, using standard mode"));
|
|
59457
59460
|
}
|
|
59458
59461
|
}
|
|
59459
59462
|
await startInteractiveSession();
|