@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/bin/maria.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
var fs4 = require('fs');
|
|
5
5
|
var path9 = require('path');
|
|
6
|
-
var
|
|
6
|
+
var chalk27 = require('chalk');
|
|
7
7
|
var os15 = require('os');
|
|
8
8
|
var Stream = require('stream');
|
|
9
9
|
var util = require('util');
|
|
@@ -51,7 +51,7 @@ function _interopNamespace(e) {
|
|
|
51
51
|
|
|
52
52
|
var fs4__namespace = /*#__PURE__*/_interopNamespace(fs4);
|
|
53
53
|
var path9__namespace = /*#__PURE__*/_interopNamespace(path9);
|
|
54
|
-
var
|
|
54
|
+
var chalk27__default = /*#__PURE__*/_interopDefault(chalk27);
|
|
55
55
|
var os15__namespace = /*#__PURE__*/_interopNamespace(os15);
|
|
56
56
|
var Stream__default = /*#__PURE__*/_interopDefault(Stream);
|
|
57
57
|
var http__namespace = /*#__PURE__*/_interopNamespace(http);
|
|
@@ -273,129 +273,129 @@ function displayStartupLogo() {
|
|
|
273
273
|
process.stdout.write("\x1B[2J\x1B[3J\x1B[H");
|
|
274
274
|
console.log("");
|
|
275
275
|
console.log(
|
|
276
|
-
|
|
276
|
+
chalk27__default.default.magentaBright(
|
|
277
277
|
"\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"
|
|
278
278
|
)
|
|
279
279
|
);
|
|
280
280
|
console.log(
|
|
281
|
-
|
|
281
|
+
chalk27__default.default.magentaBright(
|
|
282
282
|
"\u2551 \u2551"
|
|
283
283
|
)
|
|
284
284
|
);
|
|
285
285
|
console.log(
|
|
286
|
-
|
|
286
|
+
chalk27__default.default.magentaBright(
|
|
287
287
|
"\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"
|
|
288
288
|
)
|
|
289
289
|
);
|
|
290
290
|
console.log(
|
|
291
|
-
|
|
291
|
+
chalk27__default.default.magentaBright(
|
|
292
292
|
"\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"
|
|
293
293
|
)
|
|
294
294
|
);
|
|
295
295
|
console.log(
|
|
296
|
-
|
|
296
|
+
chalk27__default.default.magentaBright(
|
|
297
297
|
"\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"
|
|
298
298
|
)
|
|
299
299
|
);
|
|
300
300
|
console.log(
|
|
301
|
-
|
|
301
|
+
chalk27__default.default.magentaBright(
|
|
302
302
|
"\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"
|
|
303
303
|
)
|
|
304
304
|
);
|
|
305
305
|
console.log(
|
|
306
|
-
|
|
306
|
+
chalk27__default.default.magentaBright(
|
|
307
307
|
"\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"
|
|
308
308
|
)
|
|
309
309
|
);
|
|
310
310
|
console.log(
|
|
311
|
-
|
|
311
|
+
chalk27__default.default.magentaBright(
|
|
312
312
|
"\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"
|
|
313
313
|
)
|
|
314
314
|
);
|
|
315
315
|
console.log(
|
|
316
|
-
|
|
316
|
+
chalk27__default.default.magentaBright(
|
|
317
317
|
"\u2551 \u2551"
|
|
318
318
|
)
|
|
319
319
|
);
|
|
320
320
|
console.log(
|
|
321
|
-
|
|
321
|
+
chalk27__default.default.magentaBright(
|
|
322
322
|
"\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"
|
|
323
323
|
)
|
|
324
324
|
);
|
|
325
325
|
console.log(
|
|
326
|
-
|
|
326
|
+
chalk27__default.default.magentaBright(
|
|
327
327
|
"\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"
|
|
328
328
|
)
|
|
329
329
|
);
|
|
330
330
|
console.log(
|
|
331
|
-
|
|
331
|
+
chalk27__default.default.magentaBright(
|
|
332
332
|
"\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2551"
|
|
333
333
|
)
|
|
334
334
|
);
|
|
335
335
|
console.log(
|
|
336
|
-
|
|
336
|
+
chalk27__default.default.magentaBright(
|
|
337
337
|
"\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2551"
|
|
338
338
|
)
|
|
339
339
|
);
|
|
340
340
|
console.log(
|
|
341
|
-
|
|
341
|
+
chalk27__default.default.magentaBright(
|
|
342
342
|
"\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"
|
|
343
343
|
)
|
|
344
344
|
);
|
|
345
345
|
console.log(
|
|
346
|
-
|
|
346
|
+
chalk27__default.default.magentaBright(
|
|
347
347
|
"\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"
|
|
348
348
|
)
|
|
349
349
|
);
|
|
350
350
|
console.log(
|
|
351
|
-
|
|
351
|
+
chalk27__default.default.magentaBright(
|
|
352
352
|
"\u2551 \u2551"
|
|
353
353
|
)
|
|
354
354
|
);
|
|
355
355
|
console.log(
|
|
356
|
-
|
|
356
|
+
chalk27__default.default.magentaBright(
|
|
357
357
|
"\u2551 AI-Powered Development Platform \u2551"
|
|
358
358
|
)
|
|
359
359
|
);
|
|
360
360
|
console.log(
|
|
361
|
-
|
|
361
|
+
chalk27__default.default.magentaBright(
|
|
362
362
|
"\u2551 (c) 2025 Bonginkan Inc. \u2551"
|
|
363
363
|
)
|
|
364
364
|
);
|
|
365
365
|
console.log(
|
|
366
|
-
|
|
366
|
+
chalk27__default.default.magentaBright(
|
|
367
367
|
"\u2551 \u2551"
|
|
368
368
|
)
|
|
369
369
|
);
|
|
370
370
|
console.log(
|
|
371
|
-
|
|
371
|
+
chalk27__default.default.magentaBright(
|
|
372
372
|
"\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"
|
|
373
373
|
)
|
|
374
374
|
);
|
|
375
375
|
console.log("");
|
|
376
376
|
console.log(
|
|
377
|
-
|
|
377
|
+
chalk27__default.default.cyan.bold(`MARIA CODE v${getVersion()}`) + chalk27__default.default.gray(" \u2014 Ready")
|
|
378
378
|
);
|
|
379
379
|
console.log(
|
|
380
|
-
|
|
380
|
+
chalk27__default.default.yellow("Type /login to get started \xB7 /help for commands")
|
|
381
381
|
);
|
|
382
382
|
console.log("");
|
|
383
383
|
}
|
|
384
384
|
function displayCompactLogo() {
|
|
385
385
|
process.stdout.write("\x1B[2J\x1B[H");
|
|
386
386
|
console.log(
|
|
387
|
-
|
|
387
|
+
chalk27__default.default.cyan.bold(`MARIA CODE v${getVersion()}`) + chalk27__default.default.gray(" \u2014 Ready")
|
|
388
388
|
);
|
|
389
389
|
console.log(
|
|
390
|
-
|
|
390
|
+
chalk27__default.default.yellow("Type /login to get started \xB7 /help for commands")
|
|
391
391
|
);
|
|
392
392
|
console.log("");
|
|
393
393
|
}
|
|
394
394
|
function displayDashboardHeader() {
|
|
395
395
|
process.stdout.write("\x1B[2J\x1B[H");
|
|
396
|
-
const version =
|
|
397
|
-
const commands =
|
|
398
|
-
const providers =
|
|
396
|
+
const version = chalk27__default.default.cyan.bold(`MARIA CODE v${getVersion()}`);
|
|
397
|
+
const commands = chalk27__default.default.gray(" | /help /status /model");
|
|
398
|
+
const providers = chalk27__default.default.gray(
|
|
399
399
|
"Providers: 8/8 OK (openai, anthropic, google, groq, lmstudio, ollama, vllm)"
|
|
400
400
|
);
|
|
401
401
|
console.log(version + commands);
|
|
@@ -404,8 +404,8 @@ function displayDashboardHeader() {
|
|
|
404
404
|
}
|
|
405
405
|
function displayLogsBox(logs) {
|
|
406
406
|
const width = getResponsiveWidth({ marginLeft: 5, marginRight: 5, maxWidth: 120 });
|
|
407
|
-
const borderColor =
|
|
408
|
-
const titleColor =
|
|
407
|
+
const borderColor = chalk27__default.default.white;
|
|
408
|
+
const titleColor = chalk27__default.default.cyan;
|
|
409
409
|
const topLeft = "\u250C";
|
|
410
410
|
const topRight = "\u2510";
|
|
411
411
|
const bottomLeft = "\u2514";
|
|
@@ -438,7 +438,7 @@ function displayLogsBox(logs) {
|
|
|
438
438
|
function displaySpinner(text = "Processing") {
|
|
439
439
|
const spinnerFrames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
440
440
|
const frame = spinnerFrames[Math.floor(Date.now() / 80) % spinnerFrames.length];
|
|
441
|
-
process.stdout.write(`\r[${
|
|
441
|
+
process.stdout.write(`\r[${chalk27__default.default.cyan(frame)}] ${text}...`);
|
|
442
442
|
}
|
|
443
443
|
function getCurrentPath() {
|
|
444
444
|
return process.cwd();
|
|
@@ -456,18 +456,18 @@ async function displayFinalStartupScreen(_selectedProvider, _selectedModel) {
|
|
|
456
456
|
const version = getVersion();
|
|
457
457
|
const systemInfo = getSystemInfo();
|
|
458
458
|
console.log(
|
|
459
|
-
|
|
459
|
+
chalk27__default.default.cyan.bold(`MARIA CODE v${version}`) + chalk27__default.default.gray(" \u2014 Ready")
|
|
460
460
|
);
|
|
461
461
|
const cwd2 = systemInfo.cwd.replace(os15__namespace.homedir(), "~");
|
|
462
|
-
console.log(
|
|
463
|
-
console.log(
|
|
464
|
-
console.log(
|
|
462
|
+
console.log(chalk27__default.default.gray("cwd: ") + chalk27__default.default.white(cwd2));
|
|
463
|
+
console.log(chalk27__default.default.gray("Not signed in"));
|
|
464
|
+
console.log(chalk27__default.default.yellow("Tip: /login \xB7 /help \xB7 /help code"));
|
|
465
465
|
console.log("");
|
|
466
466
|
}
|
|
467
467
|
function displayRoundedInputBox() {
|
|
468
468
|
const width = getResponsiveWidth({ marginLeft: 5, marginRight: 5, maxWidth: 90 });
|
|
469
|
-
const borderColor =
|
|
470
|
-
const promptColor =
|
|
469
|
+
const borderColor = chalk27__default.default.white;
|
|
470
|
+
const promptColor = chalk27__default.default.cyan;
|
|
471
471
|
const topLeft = "\u256D";
|
|
472
472
|
const topRight = "\u256E";
|
|
473
473
|
const bottomLeft = "\u2570";
|
|
@@ -477,7 +477,7 @@ function displayRoundedInputBox() {
|
|
|
477
477
|
const lines = [];
|
|
478
478
|
lines.push(borderColor(topLeft + horizontal.repeat(width - 2) + topRight));
|
|
479
479
|
const promptStr = promptColor("> ");
|
|
480
|
-
const placeholder =
|
|
480
|
+
const placeholder = chalk27__default.default.gray("");
|
|
481
481
|
const inputLine = promptStr + placeholder;
|
|
482
482
|
const padding = width - 4;
|
|
483
483
|
lines.push(
|
|
@@ -500,7 +500,7 @@ var DEFAULT_PROVIDER2, DEFAULT_MODEL2;
|
|
|
500
500
|
var init_config = __esm({
|
|
501
501
|
"src/providers/config.ts"() {
|
|
502
502
|
DEFAULT_PROVIDER2 = process.env.DEFAULT_PROVIDER || "openai";
|
|
503
|
-
DEFAULT_MODEL2 = process.env.
|
|
503
|
+
DEFAULT_MODEL2 = process.env.OPENAI_MODEL || process.env.MARIA_DEFAULT_MODEL || "gpt-5-mini";
|
|
504
504
|
}
|
|
505
505
|
});
|
|
506
506
|
|
|
@@ -7750,8 +7750,8 @@ var init_manager = __esm({
|
|
|
7750
7750
|
/** Legacy sync method kept for backward compatibility (minimal) */
|
|
7751
7751
|
getAvailableModels() {
|
|
7752
7752
|
const out = [];
|
|
7753
|
-
if (this.available.has("openai")) out.push("gpt-
|
|
7754
|
-
if (this.available.has("anthropic")) out.push("claude-
|
|
7753
|
+
if (this.available.has("openai")) out.push("gpt-5", "gpt-5-mini", "gpt-4o", "gpt-4o-mini");
|
|
7754
|
+
if (this.available.has("anthropic")) out.push("claude-opus-4-1-20250805", "claude-opus-4-20250514", "claude-sonnet-4-20250514");
|
|
7755
7755
|
if (this.available.has("google")) out.push("gemini-2.5-pro", "gemini-2.5-flash");
|
|
7756
7756
|
if (this.available.has("grok")) out.push("grok-4", "grok-beta");
|
|
7757
7757
|
return out;
|
|
@@ -7877,12 +7877,15 @@ var init_manager = __esm({
|
|
|
7877
7877
|
if (!apiKey) throw new Error("OpenAI API key not configured");
|
|
7878
7878
|
const controller = new AbortController();
|
|
7879
7879
|
const timeout = setTimeout(() => controller.abort(), 3e5);
|
|
7880
|
-
const modelName = req.model || "gpt-5-mini
|
|
7881
|
-
const isGPT5 = modelName.
|
|
7880
|
+
const modelName = req.model || process.env.OPENAI_MODEL || "gpt-5-mini";
|
|
7881
|
+
const isGPT5 = /\bgpt-5\b/i.test(modelName) || modelName.toLowerCase().startsWith("gpt-5");
|
|
7882
7882
|
const bodyParams = {
|
|
7883
7883
|
model: modelName,
|
|
7884
7884
|
messages: [
|
|
7885
|
-
{
|
|
7885
|
+
{
|
|
7886
|
+
role: "system",
|
|
7887
|
+
content: "You are a helpful assistant. Always respond in English. Provide direct, clear answers without menus or numbered options."
|
|
7888
|
+
},
|
|
7886
7889
|
{ role: "user", content: prompt }
|
|
7887
7890
|
]
|
|
7888
7891
|
};
|
|
@@ -7907,7 +7910,7 @@ var init_manager = __esm({
|
|
|
7907
7910
|
throw new Error(`OpenAI ${res.status}: ${txt}`);
|
|
7908
7911
|
}
|
|
7909
7912
|
const json = await res.json();
|
|
7910
|
-
return { content: json.choices?.[0]?.message?.content ?? "" };
|
|
7913
|
+
return { content: json.choices?.[0]?.message?.content ?? "", model: json.model };
|
|
7911
7914
|
} catch (error2) {
|
|
7912
7915
|
clearTimeout(timeout);
|
|
7913
7916
|
if (error2.name === "AbortError" || error2.message?.includes("abort")) {
|
|
@@ -8390,29 +8393,29 @@ var init_provider_selector = __esm({
|
|
|
8390
8393
|
const inquirer = await import('inquirer');
|
|
8391
8394
|
const prompt = inquirer.default?.prompt || inquirer.prompt;
|
|
8392
8395
|
const providers = await this.getAvailableProviders();
|
|
8393
|
-
console.log(
|
|
8394
|
-
console.log(
|
|
8396
|
+
console.log(chalk27__default.default.cyan("\nAvailable AI Providers:"));
|
|
8397
|
+
console.log(chalk27__default.default.gray("\u2500".repeat(50)));
|
|
8395
8398
|
const _cloudProviders = providers.filter((p) => p.type === "cloud");
|
|
8396
8399
|
const _localProviders = providers.filter((p) => p.type === "local");
|
|
8397
8400
|
if (_cloudProviders.length > 0) {
|
|
8398
|
-
console.log(
|
|
8401
|
+
console.log(chalk27__default.default.yellow("\n\u2601\uFE0F Cloud AI:"));
|
|
8399
8402
|
_cloudProviders.forEach((p) => {
|
|
8400
8403
|
if (p.available) {
|
|
8401
8404
|
console.log(
|
|
8402
|
-
` ${
|
|
8405
|
+
` ${chalk27__default.default.green("*")} ${chalk27__default.default.white(p.name.split(" ")[0])}`
|
|
8403
8406
|
);
|
|
8404
8407
|
} else {
|
|
8405
|
-
console.log(` ${
|
|
8408
|
+
console.log(` ${chalk27__default.default.gray(p.name.split(" ")[0])}`);
|
|
8406
8409
|
}
|
|
8407
8410
|
});
|
|
8408
8411
|
}
|
|
8409
8412
|
if (_localProviders.length > 0) {
|
|
8410
|
-
console.log(
|
|
8413
|
+
console.log(chalk27__default.default.cyan("\n\u{1F4BB} Local AI:"));
|
|
8411
8414
|
_localProviders.forEach((p) => {
|
|
8412
8415
|
if (p.available) {
|
|
8413
|
-
console.log(` ${
|
|
8416
|
+
console.log(` ${chalk27__default.default.green("*")} ${chalk27__default.default.white(p.name)}`);
|
|
8414
8417
|
} else {
|
|
8415
|
-
console.log(` ${
|
|
8418
|
+
console.log(` ${chalk27__default.default.green("*")} ${chalk27__default.default.gray(p.name)}`);
|
|
8416
8419
|
}
|
|
8417
8420
|
});
|
|
8418
8421
|
}
|
|
@@ -8427,20 +8430,20 @@ var init_provider_selector = __esm({
|
|
|
8427
8430
|
});
|
|
8428
8431
|
if (selectableProviders.length === 0) {
|
|
8429
8432
|
console.log(
|
|
8430
|
-
|
|
8433
|
+
chalk27__default.default.yellow("\n\u26A0\uFE0F No AI providers are currently available.")
|
|
8431
8434
|
);
|
|
8432
|
-
console.log(
|
|
8435
|
+
console.log(chalk27__default.default.gray("\nTo use MARIA, you need to:"));
|
|
8433
8436
|
console.log(
|
|
8434
|
-
|
|
8437
|
+
chalk27__default.default.gray(
|
|
8435
8438
|
"1. Set up API keys for cloud providers (OpenAI, Anthropic, Google, etc.)"
|
|
8436
8439
|
)
|
|
8437
8440
|
);
|
|
8438
|
-
console.log(
|
|
8441
|
+
console.log(chalk27__default.default.gray(" Example: export OPENAI_API_KEY=your_api_key"));
|
|
8439
8442
|
console.log(
|
|
8440
|
-
|
|
8443
|
+
chalk27__default.default.gray("2. Or start a local AI service (Ollama, LM Studio, vLLM)")
|
|
8441
8444
|
);
|
|
8442
|
-
console.log(
|
|
8443
|
-
console.log(
|
|
8445
|
+
console.log(chalk27__default.default.gray(" Example: maria setup-ollama"));
|
|
8446
|
+
console.log(chalk27__default.default.gray("\nFor more information, run: maria --help"));
|
|
8444
8447
|
process.exit(1);
|
|
8445
8448
|
}
|
|
8446
8449
|
const choices = selectableProviders.map((p) => ({
|
|
@@ -8461,29 +8464,29 @@ var init_provider_selector = __esm({
|
|
|
8461
8464
|
const provider = providers.find((p) => p.value === selectedProvider);
|
|
8462
8465
|
if (provider && provider.type === "local" && !provider.available) {
|
|
8463
8466
|
console.log(
|
|
8464
|
-
|
|
8467
|
+
chalk27__default.default.yellow(`
|
|
8465
8468
|
\u26A0\uFE0F ${provider.name} is not currently running.`)
|
|
8466
8469
|
);
|
|
8467
|
-
console.log(
|
|
8470
|
+
console.log(chalk27__default.default.gray(`
|
|
8468
8471
|
To use ${provider.name}, you need to:`));
|
|
8469
8472
|
if (selectedProvider === "ollama") {
|
|
8470
|
-
console.log(
|
|
8471
|
-
console.log(
|
|
8472
|
-
console.log(
|
|
8473
|
+
console.log(chalk27__default.default.gray("1. Install Ollama: brew install ollama"));
|
|
8474
|
+
console.log(chalk27__default.default.gray("2. Start Ollama: ollama serve"));
|
|
8475
|
+
console.log(chalk27__default.default.gray("3. Pull a model: ollama pull llama3.2:3b"));
|
|
8473
8476
|
console.log(
|
|
8474
|
-
|
|
8477
|
+
chalk27__default.default.gray("\nOr use the setup command: maria setup-ollama")
|
|
8475
8478
|
);
|
|
8476
8479
|
} else if (selectedProvider === "lmstudio") {
|
|
8477
8480
|
console.log(
|
|
8478
|
-
|
|
8481
|
+
chalk27__default.default.gray("1. Download LM Studio from https://lmstudio.ai")
|
|
8479
8482
|
);
|
|
8480
|
-
console.log(
|
|
8481
|
-
console.log(
|
|
8482
|
-
console.log(
|
|
8483
|
+
console.log(chalk27__default.default.gray("2. Start LM Studio application"));
|
|
8484
|
+
console.log(chalk27__default.default.gray("3. Load a model in LM Studio"));
|
|
8485
|
+
console.log(chalk27__default.default.gray("4. Start the local server in LM Studio"));
|
|
8483
8486
|
} else if (selectedProvider === "vllm") {
|
|
8484
|
-
console.log(
|
|
8485
|
-
console.log(
|
|
8486
|
-
console.log(
|
|
8487
|
+
console.log(chalk27__default.default.gray("1. Install vLLM: pip install vllm"));
|
|
8488
|
+
console.log(chalk27__default.default.gray("2. Start vLLM server with a model"));
|
|
8489
|
+
console.log(chalk27__default.default.gray("\nOr use the setup command: maria setup-vllm"));
|
|
8487
8490
|
}
|
|
8488
8491
|
process.exit(1);
|
|
8489
8492
|
}
|
|
@@ -12426,7 +12429,7 @@ var init_IntelligentRouterService = __esm({
|
|
|
12426
12429
|
this.emit("initialized");
|
|
12427
12430
|
} catch (_error) {
|
|
12428
12431
|
console._error(
|
|
12429
|
-
|
|
12432
|
+
chalk27__default.default.red("Failed to initialize Intelligent Router:"),
|
|
12430
12433
|
_error
|
|
12431
12434
|
);
|
|
12432
12435
|
throw _error;
|
|
@@ -12480,7 +12483,7 @@ var init_IntelligentRouterService = __esm({
|
|
|
12480
12483
|
} catch (_error) {
|
|
12481
12484
|
this.metrics.failedRoutes++;
|
|
12482
12485
|
this.emit("route:_error", { input: input3, _error });
|
|
12483
|
-
console._error(
|
|
12486
|
+
console._error(chalk27__default.default.red("Routing _error:"), _error);
|
|
12484
12487
|
return null;
|
|
12485
12488
|
}
|
|
12486
12489
|
}
|
|
@@ -15219,16 +15222,16 @@ var init_log_symbols = __esm({
|
|
|
15219
15222
|
"node_modules/.pnpm/log-symbols@6.0.0/node_modules/log-symbols/index.js"() {
|
|
15220
15223
|
init_is_unicode_supported();
|
|
15221
15224
|
main = {
|
|
15222
|
-
info:
|
|
15223
|
-
success:
|
|
15224
|
-
warning:
|
|
15225
|
-
error:
|
|
15225
|
+
info: chalk27__default.default.blue("\u2139"),
|
|
15226
|
+
success: chalk27__default.default.green("\u2714"),
|
|
15227
|
+
warning: chalk27__default.default.yellow("\u26A0"),
|
|
15228
|
+
error: chalk27__default.default.red("\u2716")
|
|
15226
15229
|
};
|
|
15227
15230
|
fallback = {
|
|
15228
|
-
info:
|
|
15229
|
-
success:
|
|
15230
|
-
warning:
|
|
15231
|
-
error:
|
|
15231
|
+
info: chalk27__default.default.blue("i"),
|
|
15232
|
+
success: chalk27__default.default.green("\u221A"),
|
|
15233
|
+
warning: chalk27__default.default.yellow("\u203C"),
|
|
15234
|
+
error: chalk27__default.default.red("\xD7")
|
|
15232
15235
|
};
|
|
15233
15236
|
logSymbols = isUnicodeSupported() ? main : fallback;
|
|
15234
15237
|
log_symbols_default = logSymbols;
|
|
@@ -15625,7 +15628,7 @@ var init_ora = __esm({
|
|
|
15625
15628
|
const { frames } = this.#spinner;
|
|
15626
15629
|
let frame = frames[this.#frameIndex];
|
|
15627
15630
|
if (this.color) {
|
|
15628
|
-
frame =
|
|
15631
|
+
frame = chalk27__default.default[this.color](frame);
|
|
15629
15632
|
}
|
|
15630
15633
|
const fullPrefixText = typeof this.#prefixText === "string" && this.#prefixText !== "" ? this.#prefixText + " " : "";
|
|
15631
15634
|
const fullText = typeof this.text === "string" ? " " + this.text : "";
|
|
@@ -15745,28 +15748,28 @@ var init_ChalkAdapter = __esm({
|
|
|
15745
15748
|
spinnerId = 0;
|
|
15746
15749
|
async showWelcome() {
|
|
15747
15750
|
console.log(
|
|
15748
|
-
|
|
15751
|
+
chalk27__default.default.cyan.bold("\n\u{1F916} Welcome to MARIA Interactive Session v3.5.0")
|
|
15749
15752
|
);
|
|
15750
|
-
console.log(
|
|
15753
|
+
console.log(chalk27__default.default.gray("Type /help for available commands\n"));
|
|
15751
15754
|
}
|
|
15752
15755
|
showGoodbye() {
|
|
15753
15756
|
this.stopAllSpinners();
|
|
15754
|
-
console.log(
|
|
15757
|
+
console.log(chalk27__default.default.green("\n\u{1F44B} Goodbye! Thank you for using MARIA.\n"));
|
|
15755
15758
|
}
|
|
15756
15759
|
async print(message) {
|
|
15757
15760
|
console.log(message);
|
|
15758
15761
|
}
|
|
15759
15762
|
error(message) {
|
|
15760
|
-
console.error(
|
|
15763
|
+
console.error(chalk27__default.default.red(`\u274C ${message}`));
|
|
15761
15764
|
}
|
|
15762
15765
|
success(message) {
|
|
15763
|
-
console.log(
|
|
15766
|
+
console.log(chalk27__default.default.green(`\u2705 ${message}`));
|
|
15764
15767
|
}
|
|
15765
15768
|
warning(message) {
|
|
15766
|
-
console.warn(
|
|
15769
|
+
console.warn(chalk27__default.default.yellow(`\u26A0\uFE0F ${message}`));
|
|
15767
15770
|
}
|
|
15768
15771
|
info(message) {
|
|
15769
|
-
console.info(
|
|
15772
|
+
console.info(chalk27__default.default.blue(`\u2139\uFE0F ${message}`));
|
|
15770
15773
|
}
|
|
15771
15774
|
startSpinner(message) {
|
|
15772
15775
|
const id = `spinner-${++this.spinnerId}`;
|
|
@@ -15816,12 +15819,12 @@ var init_ChalkAdapter = __esm({
|
|
|
15816
15819
|
* Format helpers for consistent styling
|
|
15817
15820
|
*/
|
|
15818
15821
|
static format = {
|
|
15819
|
-
command: (text) =>
|
|
15820
|
-
keyword: (text) =>
|
|
15821
|
-
value: (text) =>
|
|
15822
|
-
dim: (text) =>
|
|
15823
|
-
bold: (text) =>
|
|
15824
|
-
code: (text) =>
|
|
15822
|
+
command: (text) => chalk27__default.default.cyan(text),
|
|
15823
|
+
keyword: (text) => chalk27__default.default.magenta(text),
|
|
15824
|
+
value: (text) => chalk27__default.default.green(text),
|
|
15825
|
+
dim: (text) => chalk27__default.default.gray(text),
|
|
15826
|
+
bold: (text) => chalk27__default.default.bold(text),
|
|
15827
|
+
code: (text) => chalk27__default.default.bgGray.white(` ${text} `)
|
|
15825
15828
|
};
|
|
15826
15829
|
};
|
|
15827
15830
|
}
|
|
@@ -17942,27 +17945,27 @@ var init_logger = __esm({
|
|
|
17942
17945
|
}
|
|
17943
17946
|
debug(...args2) {
|
|
17944
17947
|
if (this.level <= 0 /* DEBUG */) {
|
|
17945
|
-
console.log(
|
|
17948
|
+
console.log(chalk27__default.default.magenta(`${this.prefix} [DEBUG]`), ...args2);
|
|
17946
17949
|
}
|
|
17947
17950
|
}
|
|
17948
17951
|
info(...args2) {
|
|
17949
17952
|
if (this.level <= 1 /* INFO */) {
|
|
17950
|
-
console.log(
|
|
17953
|
+
console.log(chalk27__default.default.bold.magenta(`${this.prefix} [INFO]`), ...args2);
|
|
17951
17954
|
}
|
|
17952
17955
|
}
|
|
17953
17956
|
warn(...args2) {
|
|
17954
17957
|
if (this.level <= 2 /* WARN */) {
|
|
17955
|
-
console.warn(
|
|
17958
|
+
console.warn(chalk27__default.default.bold.magenta(`${this.prefix} [WARN]`), ...args2);
|
|
17956
17959
|
}
|
|
17957
17960
|
}
|
|
17958
17961
|
error(...args2) {
|
|
17959
17962
|
if (this.level <= 3 /* ERROR */) {
|
|
17960
|
-
console.error(
|
|
17963
|
+
console.error(chalk27__default.default.bold.magenta(`${this.prefix} [ERROR]`), ...args2);
|
|
17961
17964
|
}
|
|
17962
17965
|
}
|
|
17963
17966
|
success(...args2) {
|
|
17964
17967
|
if (this.level <= 1 /* INFO */) {
|
|
17965
|
-
console.log(
|
|
17968
|
+
console.log(chalk27__default.default.bold.magenta(`${this.prefix} [SUCCESS]`), ...args2);
|
|
17966
17969
|
}
|
|
17967
17970
|
}
|
|
17968
17971
|
task(taskName, status, message) {
|
|
@@ -17976,10 +17979,10 @@ var init_logger = __esm({
|
|
|
17976
17979
|
error: "\u274C"
|
|
17977
17980
|
};
|
|
17978
17981
|
const statusColors = {
|
|
17979
|
-
start:
|
|
17980
|
-
progress:
|
|
17981
|
-
complete:
|
|
17982
|
-
error:
|
|
17982
|
+
start: chalk27__default.default.bold.magenta,
|
|
17983
|
+
progress: chalk27__default.default.magenta,
|
|
17984
|
+
complete: chalk27__default.default.bold.magenta,
|
|
17985
|
+
error: chalk27__default.default.bold.magenta
|
|
17983
17986
|
};
|
|
17984
17987
|
const icon = statusIcons[status];
|
|
17985
17988
|
const color = statusColors[status];
|
|
@@ -17996,14 +17999,14 @@ var init_logger = __esm({
|
|
|
17996
17999
|
if (this.level > 0 /* DEBUG */) {
|
|
17997
18000
|
return;
|
|
17998
18001
|
}
|
|
17999
|
-
console.log(
|
|
18002
|
+
console.log(chalk27__default.default.magenta(`${this.prefix} [JSON]`));
|
|
18000
18003
|
console.log(pretty ? JSON.stringify(obj, null, 2) : JSON.stringify(obj));
|
|
18001
18004
|
}
|
|
18002
18005
|
divider() {
|
|
18003
18006
|
if (this.level > 1 /* INFO */) {
|
|
18004
18007
|
return;
|
|
18005
18008
|
}
|
|
18006
|
-
console.log(
|
|
18009
|
+
console.log(chalk27__default.default.magenta("\u2500".repeat(60)));
|
|
18007
18010
|
}
|
|
18008
18011
|
clear() {
|
|
18009
18012
|
console.clear();
|
|
@@ -18023,7 +18026,7 @@ var init_logger = __esm({
|
|
|
18023
18026
|
const progressText = `${current}/${total}`;
|
|
18024
18027
|
const labelText = label ? ` ${label}` : "";
|
|
18025
18028
|
process.stdout.write(
|
|
18026
|
-
`\r${
|
|
18029
|
+
`\r${chalk27__default.default.bold.magenta(bar)} ${percentage}% ${progressText}${labelText}`
|
|
18027
18030
|
);
|
|
18028
18031
|
if (current === total) {
|
|
18029
18032
|
process.stdout.write("\n");
|
|
@@ -21240,26 +21243,26 @@ var init_QuickApprovalInterface = __esm({
|
|
|
21240
21243
|
const _lang = options2.language || "en";
|
|
21241
21244
|
const _labels = LANGUAGE_LABELS[_lang] || LANGUAGE_LABELS.en;
|
|
21242
21245
|
console.log("");
|
|
21243
|
-
console.log(
|
|
21246
|
+
console.log(chalk27__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"));
|
|
21244
21247
|
console.log(
|
|
21245
|
-
|
|
21248
|
+
chalk27__default.default.gray("\u2502") + chalk27__default.default.white(
|
|
21246
21249
|
` ${_labels.approvalRequest}${" ".repeat(Math.max(0, 43 - _labels.approvalRequest.length))}`
|
|
21247
|
-
) +
|
|
21250
|
+
) + chalk27__default.default.gray("\u2502")
|
|
21248
21251
|
);
|
|
21249
|
-
console.log(
|
|
21252
|
+
console.log(chalk27__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"));
|
|
21250
21253
|
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")}`;
|
|
21251
21254
|
console.log(
|
|
21252
|
-
|
|
21253
|
-
` > ${_labels.id}: ${
|
|
21254
|
-
) +
|
|
21255
|
+
chalk27__default.default.gray("\u2502") + chalk27__default.default.white(
|
|
21256
|
+
` > ${_labels.id}: ${chalk27__default.default.yellow(_requestId)}${" ".repeat(Math.max(0, 35 - _requestId.length - _labels.id.length))}`
|
|
21257
|
+
) + chalk27__default.default.gray("\u2502")
|
|
21255
21258
|
);
|
|
21256
21259
|
const _title = _request.context?.description || _request.themeId || "API Cache Improvement";
|
|
21257
21260
|
const _titleDisplay = _title.length > 25 ? _title.substring(0, 22) + "..." : _title;
|
|
21258
21261
|
const _titleLabel = ` ${_labels._title}:`;
|
|
21259
21262
|
console.log(
|
|
21260
|
-
|
|
21263
|
+
chalk27__default.default.gray("\u2502") + chalk27__default.default.white(
|
|
21261
21264
|
`${_titleLabel} ${_titleDisplay}${" ".repeat(Math.max(0, 42 - _titleLabel.length - _titleDisplay.length))}`
|
|
21262
|
-
) +
|
|
21265
|
+
) + chalk27__default.default.gray("\u2502")
|
|
21263
21266
|
);
|
|
21264
21267
|
const _riskLevel = this.formatRiskLevelSimple(_request.riskAssessment);
|
|
21265
21268
|
const _approvalsCount = _riskLevel === "HIGH" || _riskLevel === "CRITICAL" ? "2" : "1";
|
|
@@ -21267,37 +21270,37 @@ var init_QuickApprovalInterface = __esm({
|
|
|
21267
21270
|
const _levelLabel = ` ${_labels.level}:`;
|
|
21268
21271
|
const _levelDisplay = `${_riskLevel} ${_approvalsText}`;
|
|
21269
21272
|
console.log(
|
|
21270
|
-
|
|
21273
|
+
chalk27__default.default.gray("\u2502") + chalk27__default.default.white(
|
|
21271
21274
|
`${_levelLabel} ${_levelDisplay}${" ".repeat(Math.max(0, 42 - _levelLabel.length - _levelDisplay.length))}`
|
|
21272
|
-
) +
|
|
21275
|
+
) + chalk27__default.default.gray("\u2502")
|
|
21273
21276
|
);
|
|
21274
21277
|
const _impact = _request.estimatedTime || "p95 latency -20%";
|
|
21275
21278
|
const _impactLabel = ` ${_labels._impact}:`;
|
|
21276
21279
|
console.log(
|
|
21277
|
-
|
|
21280
|
+
chalk27__default.default.gray("\u2502") + chalk27__default.default.white(
|
|
21278
21281
|
`${_impactLabel} ${_impact}${" ".repeat(Math.max(0, 42 - _impactLabel.length - _impact.length))}`
|
|
21279
|
-
) +
|
|
21282
|
+
) + chalk27__default.default.gray("\u2502")
|
|
21280
21283
|
);
|
|
21281
21284
|
const _approversLabel = ` ${_labels.approvers}:`;
|
|
21282
21285
|
const _approversStatus = "[x] Lead [ ] QA";
|
|
21283
21286
|
console.log(
|
|
21284
|
-
|
|
21287
|
+
chalk27__default.default.gray("\u2502") + chalk27__default.default.white(
|
|
21285
21288
|
`${_approversLabel} ${_approversStatus}${" ".repeat(Math.max(0, 42 - _approversLabel.length - _approversStatus.length))}`
|
|
21286
|
-
) +
|
|
21289
|
+
) + chalk27__default.default.gray("\u2502")
|
|
21287
21290
|
);
|
|
21288
21291
|
const _deadline = new Date(Date.now() + 30 * 60 * 1e3);
|
|
21289
21292
|
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")}`;
|
|
21290
21293
|
const _deadlineLabel = ` ${_labels._deadline}:`;
|
|
21291
21294
|
console.log(
|
|
21292
|
-
|
|
21295
|
+
chalk27__default.default.gray("\u2502") + chalk27__default.default.white(
|
|
21293
21296
|
`${_deadlineLabel} ${_timeStr}${" ".repeat(Math.max(0, 42 - _deadlineLabel.length - _timeStr.length))}`
|
|
21294
|
-
) +
|
|
21297
|
+
) + chalk27__default.default.gray("\u2502")
|
|
21295
21298
|
);
|
|
21296
|
-
console.log(
|
|
21299
|
+
console.log(chalk27__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"));
|
|
21297
21300
|
console.log(
|
|
21298
|
-
|
|
21301
|
+
chalk27__default.default.gray("\u2502") + chalk27__default.default.white(
|
|
21299
21302
|
` ${_labels.actions}:${" ".repeat(Math.max(0, 42 - _labels.actions.length))}`
|
|
21300
|
-
) +
|
|
21303
|
+
) + chalk27__default.default.gray("\u2502")
|
|
21301
21304
|
);
|
|
21302
21305
|
this.menuOptions.forEach((option, _index) => {
|
|
21303
21306
|
const _isSelected = _index === this.selectedIndex;
|
|
@@ -21308,32 +21311,32 @@ var init_QuickApprovalInterface = __esm({
|
|
|
21308
21311
|
switch (option) {
|
|
21309
21312
|
case "approve":
|
|
21310
21313
|
label = _labels.approve;
|
|
21311
|
-
color =
|
|
21314
|
+
color = chalk27__default.default.green;
|
|
21312
21315
|
break;
|
|
21313
21316
|
case "reject":
|
|
21314
21317
|
label = _labels.reject;
|
|
21315
|
-
color =
|
|
21318
|
+
color = chalk27__default.default.red;
|
|
21316
21319
|
break;
|
|
21317
21320
|
case "cancel":
|
|
21318
21321
|
label = _labels.cancel;
|
|
21319
|
-
color =
|
|
21322
|
+
color = chalk27__default.default.yellow;
|
|
21320
21323
|
break;
|
|
21321
21324
|
}
|
|
21322
21325
|
const _optionText = `${_prefix}[${_key}] ${label}`;
|
|
21323
21326
|
const _colorFunc = _isSelected ? color.bold : color;
|
|
21324
21327
|
console.log(
|
|
21325
|
-
|
|
21328
|
+
chalk27__default.default.gray("\u2502") + _colorFunc(
|
|
21326
21329
|
`${_optionText}${" ".repeat(Math.max(0, 43 - _optionText.length))}`
|
|
21327
|
-
) +
|
|
21330
|
+
) + chalk27__default.default.gray("\u2502")
|
|
21328
21331
|
);
|
|
21329
21332
|
});
|
|
21330
|
-
console.log(
|
|
21333
|
+
console.log(chalk27__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"));
|
|
21331
21334
|
console.log(
|
|
21332
|
-
|
|
21335
|
+
chalk27__default.default.gray("\u2502") + chalk27__default.default.white(
|
|
21333
21336
|
` ${_labels.moveInstruction}${" ".repeat(Math.max(0, 43 - _labels.moveInstruction.length))}`
|
|
21334
|
-
) +
|
|
21337
|
+
) + chalk27__default.default.gray("\u2502")
|
|
21335
21338
|
);
|
|
21336
|
-
console.log(
|
|
21339
|
+
console.log(chalk27__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"));
|
|
21337
21340
|
console.log("");
|
|
21338
21341
|
}
|
|
21339
21342
|
/**
|
|
@@ -21349,13 +21352,13 @@ var init_QuickApprovalInterface = __esm({
|
|
|
21349
21352
|
};
|
|
21350
21353
|
const _formatted = keyMap[_key] || _key;
|
|
21351
21354
|
const colorMap = {
|
|
21352
|
-
"shift+tab":
|
|
21353
|
-
"ctrl+y":
|
|
21354
|
-
"ctrl+n":
|
|
21355
|
-
"ctrl+t":
|
|
21356
|
-
"ctrl+r":
|
|
21355
|
+
"shift+tab": chalk27__default.default.bgGreen.black.bold,
|
|
21356
|
+
"ctrl+y": chalk27__default.default.bgBlue.white.bold,
|
|
21357
|
+
"ctrl+n": chalk27__default.default.bgRed.white.bold,
|
|
21358
|
+
"ctrl+t": chalk27__default.default.bgMagenta.white.bold,
|
|
21359
|
+
"ctrl+r": chalk27__default.default.bgYellow.black.bold
|
|
21357
21360
|
};
|
|
21358
|
-
const _colorFunc = colorMap[_key] ||
|
|
21361
|
+
const _colorFunc = colorMap[_key] || chalk27__default.default.bgCyan.black.bold;
|
|
21359
21362
|
return _colorFunc(` ${_formatted} `);
|
|
21360
21363
|
}
|
|
21361
21364
|
/**
|
|
@@ -21364,15 +21367,15 @@ var init_QuickApprovalInterface = __esm({
|
|
|
21364
21367
|
formatRiskLevel(risk) {
|
|
21365
21368
|
switch (risk.toLowerCase()) {
|
|
21366
21369
|
case "critical":
|
|
21367
|
-
return
|
|
21370
|
+
return chalk27__default.default.red.bold("CRITICAL");
|
|
21368
21371
|
case "high":
|
|
21369
|
-
return
|
|
21372
|
+
return chalk27__default.default.red("HIGH");
|
|
21370
21373
|
case "medium":
|
|
21371
|
-
return
|
|
21374
|
+
return chalk27__default.default.yellow("MEDIUM");
|
|
21372
21375
|
case "low":
|
|
21373
|
-
return
|
|
21376
|
+
return chalk27__default.default.green("LOW");
|
|
21374
21377
|
default:
|
|
21375
|
-
return
|
|
21378
|
+
return chalk27__default.default.white(risk);
|
|
21376
21379
|
}
|
|
21377
21380
|
}
|
|
21378
21381
|
/**
|
|
@@ -21442,7 +21445,7 @@ var init_QuickApprovalInterface = __esm({
|
|
|
21442
21445
|
}
|
|
21443
21446
|
if (_key === "") {
|
|
21444
21447
|
console.log(`
|
|
21445
|
-
${
|
|
21448
|
+
${chalk27__default.default.red("Approval cancelled by user")}`);
|
|
21446
21449
|
this.emit("approval-cancelled", this.currentRequest.id);
|
|
21447
21450
|
return;
|
|
21448
21451
|
}
|
|
@@ -21499,20 +21502,20 @@ ${chalk26__default.default.red("Approval cancelled by user")}`);
|
|
|
21499
21502
|
}
|
|
21500
21503
|
console.clear();
|
|
21501
21504
|
console.log(`
|
|
21502
|
-
${
|
|
21505
|
+
${chalk27__default.default.bgGreen.black.bold(`\u250C${"\u2500".repeat(78)}\u2510`)}`);
|
|
21503
21506
|
console.log(
|
|
21504
|
-
|
|
21507
|
+
chalk27__default.default.bgGreen.black.bold("\u2502") + chalk27__default.default.bgGreen.black.bold(
|
|
21505
21508
|
` \u2713 CHOICE SELECTED / \u9078\u629E\u5B8C\u4E86:${" ".repeat(47)}`
|
|
21506
|
-
) +
|
|
21509
|
+
) + chalk27__default.default.bgGreen.black.bold("\u2502")
|
|
21507
21510
|
);
|
|
21508
|
-
console.log(
|
|
21511
|
+
console.log(chalk27__default.default.bgGreen.black.bold(`\u251C${"\u2500".repeat(78)}\u2524`));
|
|
21509
21512
|
const _choiceText = `${_choice.label} (${_choice.labelJa})`;
|
|
21510
21513
|
const _padding = " ".repeat(Math.max(0, 76 - _choiceText.length));
|
|
21511
21514
|
console.log(
|
|
21512
|
-
|
|
21515
|
+
chalk27__default.default.bgGreen.black.bold("\u2502") + chalk27__default.default.bgGreen.black.bold(` ${_choiceText}${_padding}`) + chalk27__default.default.bgGreen.black.bold("\u2502")
|
|
21513
21516
|
);
|
|
21514
|
-
console.log(
|
|
21515
|
-
console.log(
|
|
21517
|
+
console.log(chalk27__default.default.bgGreen.black.bold(`\u2514${"\u2500".repeat(78)}\u2518`));
|
|
21518
|
+
console.log(chalk27__default.default.yellow("\n\u{1F504} Processing your approval decision..."));
|
|
21516
21519
|
try {
|
|
21517
21520
|
const _response = await this.approvalEngine.processApprovalResponse(
|
|
21518
21521
|
this.currentRequest.id,
|
|
@@ -21522,30 +21525,30 @@ ${chalk26__default.default.bgGreen.black.bold(`\u250C${"\u2500".repeat(78)}\u251
|
|
|
21522
21525
|
);
|
|
21523
21526
|
response.quickDecision = true;
|
|
21524
21527
|
console.log(`
|
|
21525
|
-
${
|
|
21528
|
+
${chalk27__default.default.bgGreen.black(`\u250C${"\u2500".repeat(78)}\u2510`)}`);
|
|
21526
21529
|
console.log(
|
|
21527
|
-
|
|
21530
|
+
chalk27__default.default.bgGreen.black("\u2502") + chalk27__default.default.bgGreen.black(
|
|
21528
21531
|
` \u{1F389} APPROVAL PROCESSED SUCCESSFULLY / \u627F\u8A8D\u51E6\u7406\u5B8C\u4E86!${" ".repeat(32)}`
|
|
21529
|
-
) +
|
|
21532
|
+
) + chalk27__default.default.bgGreen.black("\u2502")
|
|
21530
21533
|
);
|
|
21531
|
-
console.log(
|
|
21534
|
+
console.log(chalk27__default.default.bgGreen.black(`\u2514${"\u2500".repeat(78)}\u2518`));
|
|
21532
21535
|
if (_choice.trustLevel) {
|
|
21533
21536
|
console.log(
|
|
21534
|
-
|
|
21537
|
+
chalk27__default.default.blue(`
|
|
21535
21538
|
\u2728 Trust level updated: ${_choice.trustLevel}`)
|
|
21536
21539
|
);
|
|
21537
21540
|
}
|
|
21538
21541
|
this.emit("approval-_response", _response);
|
|
21539
21542
|
} catch (_error) {
|
|
21540
21543
|
console.log(`
|
|
21541
|
-
${
|
|
21544
|
+
${chalk27__default.default.bgRed.white.bold(`\u250C${"\u2500".repeat(78)}\u2510`)}`);
|
|
21542
21545
|
console.log(
|
|
21543
|
-
|
|
21546
|
+
chalk27__default.default.bgRed.white.bold("\u2502") + chalk27__default.default.bgRed.white.bold(
|
|
21544
21547
|
` \u274C ERROR PROCESSING APPROVAL / \u627F\u8A8D\u51E6\u7406\u30A8\u30E9\u30FC${" ".repeat(35)}`
|
|
21545
|
-
) +
|
|
21548
|
+
) + chalk27__default.default.bgRed.white.bold("\u2502")
|
|
21546
21549
|
);
|
|
21547
|
-
console.log(
|
|
21548
|
-
console._error(
|
|
21550
|
+
console.log(chalk27__default.default.bgRed.white.bold(`\u2514${"\u2500".repeat(78)}\u2518`));
|
|
21551
|
+
console._error(chalk27__default.default.red("\nError details:"), _error);
|
|
21549
21552
|
this.emit("approval-_error", _error);
|
|
21550
21553
|
}
|
|
21551
21554
|
}
|
|
@@ -21559,7 +21562,7 @@ ${chalk26__default.default.bgRed.white.bold(`\u250C${"\u2500".repeat(78)}\u2510`
|
|
|
21559
21562
|
timeoutId = setTimeout(() => {
|
|
21560
21563
|
console.log(
|
|
21561
21564
|
`
|
|
21562
|
-
${
|
|
21565
|
+
${chalk27__default.default.yellow("\u23F0 Approval request timed out - auto-approving...")}`
|
|
21563
21566
|
);
|
|
21564
21567
|
this.handleTimeoutResponse(resolve);
|
|
21565
21568
|
}, timeout);
|
|
@@ -21603,7 +21606,7 @@ ${chalk26__default.default.yellow("\u23F0 Approval request timed out - auto-appr
|
|
|
21603
21606
|
response.quickDecision = true;
|
|
21604
21607
|
resolve(_response);
|
|
21605
21608
|
} catch (_error) {
|
|
21606
|
-
console._error(
|
|
21609
|
+
console._error(chalk27__default.default.red("Error processing timeout approval:"), _error);
|
|
21607
21610
|
}
|
|
21608
21611
|
}
|
|
21609
21612
|
/**
|
|
@@ -21618,11 +21621,11 @@ ${chalk26__default.default.yellow("\u23F0 Approval request timed out - auto-appr
|
|
|
21618
21621
|
);
|
|
21619
21622
|
this.approvalEngine.on("trust-level-changed", (event) => {
|
|
21620
21623
|
console.log(
|
|
21621
|
-
|
|
21624
|
+
chalk27__default.default.blue(
|
|
21622
21625
|
`\u2728 Trust level changed: ${event.oldLevel} \u2192 ${event.newLevel}`
|
|
21623
21626
|
)
|
|
21624
21627
|
);
|
|
21625
|
-
console.log(
|
|
21628
|
+
console.log(chalk27__default.default.gray(`Reason: ${event.reason}`));
|
|
21626
21629
|
});
|
|
21627
21630
|
}
|
|
21628
21631
|
/**
|
|
@@ -22409,22 +22412,22 @@ function formatProgressBar(current, total, width = 20) {
|
|
|
22409
22412
|
}
|
|
22410
22413
|
function formatError(message, code) {
|
|
22411
22414
|
const prefix = "";
|
|
22412
|
-
return
|
|
22415
|
+
return chalk27__default.default.red(`\u274C ${prefix}${message}`);
|
|
22413
22416
|
}
|
|
22414
22417
|
function formatSuccess(message) {
|
|
22415
|
-
return
|
|
22418
|
+
return chalk27__default.default.green(`\u2705 ${message}`);
|
|
22416
22419
|
}
|
|
22417
22420
|
function formatWarning(message) {
|
|
22418
|
-
return
|
|
22421
|
+
return chalk27__default.default.yellow(`\u26A0\uFE0F ${message}`);
|
|
22419
22422
|
}
|
|
22420
22423
|
function formatInfo(message) {
|
|
22421
|
-
return
|
|
22424
|
+
return chalk27__default.default.blue(`\u2139\uFE0F ${message}`);
|
|
22422
22425
|
}
|
|
22423
22426
|
function formatTable(headers, rows, options2 = {}) {
|
|
22424
22427
|
const {
|
|
22425
22428
|
columnWidths = headers.map(() => 20),
|
|
22426
22429
|
separator = " | ",
|
|
22427
|
-
headerColor =
|
|
22430
|
+
headerColor = chalk27__default.default.cyan.bold
|
|
22428
22431
|
} = options2;
|
|
22429
22432
|
const headerRow = headers.map((h2, i2) => headerColor(h2.padEnd(columnWidths[i2]))).join(separator);
|
|
22430
22433
|
const separatorLine = columnWidths.map((w) => "-".repeat(w)).join(separator);
|
|
@@ -22436,8 +22439,8 @@ function formatTable(headers, rows, options2 = {}) {
|
|
|
22436
22439
|
function formatKeyValue(data2, options2 = {}) {
|
|
22437
22440
|
const {
|
|
22438
22441
|
keyWidth = 20,
|
|
22439
|
-
keyColor =
|
|
22440
|
-
valueColor =
|
|
22442
|
+
keyColor = chalk27__default.default.gray,
|
|
22443
|
+
valueColor = chalk27__default.default.white,
|
|
22441
22444
|
separator = ": "
|
|
22442
22445
|
} = options2;
|
|
22443
22446
|
return Object.entries(data2).map(([key2, value]) => {
|
|
@@ -22487,7 +22490,7 @@ var init_DisplayManager = __esm({
|
|
|
22487
22490
|
theme: options2.theme ?? "auto"
|
|
22488
22491
|
};
|
|
22489
22492
|
if (!this.options.enableColors) {
|
|
22490
|
-
|
|
22493
|
+
chalk27__default.default.level = 0;
|
|
22491
22494
|
}
|
|
22492
22495
|
this.setupCleanupHandlers();
|
|
22493
22496
|
}
|
|
@@ -22604,7 +22607,7 @@ var init_DisplayManager = __esm({
|
|
|
22604
22607
|
const {
|
|
22605
22608
|
padding = 1,
|
|
22606
22609
|
borderStyle = "single",
|
|
22607
|
-
borderColor =
|
|
22610
|
+
borderColor = chalk27__default.default.gray
|
|
22608
22611
|
} = options2;
|
|
22609
22612
|
const lines = content2.split("\n");
|
|
22610
22613
|
const maxLength = Math.max(...lines.map((l) => l.length));
|
|
@@ -22662,7 +22665,7 @@ var init_DisplayManager = __esm({
|
|
|
22662
22665
|
*/
|
|
22663
22666
|
startSpinner(text) {
|
|
22664
22667
|
if (!this.options.enableAnimations) {
|
|
22665
|
-
this.writeLine(
|
|
22668
|
+
this.writeLine(chalk27__default.default.gray(`\u2299 ${text || "Processing..."}`));
|
|
22666
22669
|
return "no-animation";
|
|
22667
22670
|
}
|
|
22668
22671
|
return this.spinnerManager.start({ text });
|
|
@@ -22766,11 +22769,11 @@ var init_StatusDisplay = __esm({
|
|
|
22766
22769
|
*/
|
|
22767
22770
|
static renderSystemStatus(status, detailed = false) {
|
|
22768
22771
|
const lines = [];
|
|
22769
|
-
lines.push(
|
|
22772
|
+
lines.push(chalk27__default.default.cyan.bold("\u{1F4CA} System Status"));
|
|
22770
22773
|
lines.push("");
|
|
22771
22774
|
const statusIcon = status.operational ? "\u2705" : "\u274C";
|
|
22772
22775
|
const statusText = status.operational ? "Operational" : "Issues Detected";
|
|
22773
|
-
const statusColor = status.operational ?
|
|
22776
|
+
const statusColor = status.operational ? chalk27__default.default.green : chalk27__default.default.red;
|
|
22774
22777
|
lines.push(`${statusIcon} Status: ${statusColor(statusText)}`);
|
|
22775
22778
|
lines.push(
|
|
22776
22779
|
`\u23F1\uFE0F Uptime: ${formatDuration(status.uptime * 1e3)}`
|
|
@@ -22791,15 +22794,15 @@ var init_StatusDisplay = __esm({
|
|
|
22791
22794
|
if (status.errors > 0 || status.warnings > 0) {
|
|
22792
22795
|
lines.push("");
|
|
22793
22796
|
if (status.errors > 0) {
|
|
22794
|
-
lines.push(
|
|
22797
|
+
lines.push(chalk27__default.default.red(`\u274C Errors: ${status.errors}`));
|
|
22795
22798
|
}
|
|
22796
22799
|
if (status.warnings > 0) {
|
|
22797
|
-
lines.push(
|
|
22800
|
+
lines.push(chalk27__default.default.yellow(`\u26A0\uFE0F Warnings: ${status.warnings}`));
|
|
22798
22801
|
}
|
|
22799
22802
|
}
|
|
22800
22803
|
if (detailed) {
|
|
22801
22804
|
lines.push("");
|
|
22802
|
-
lines.push(
|
|
22805
|
+
lines.push(chalk27__default.default.gray("Detailed Information:"));
|
|
22803
22806
|
const details = formatKeyValue(
|
|
22804
22807
|
{
|
|
22805
22808
|
"Process ID": process.pid,
|
|
@@ -22809,8 +22812,8 @@ var init_StatusDisplay = __esm({
|
|
|
22809
22812
|
"Working Directory": process.cwd()
|
|
22810
22813
|
},
|
|
22811
22814
|
{
|
|
22812
|
-
keyColor:
|
|
22813
|
-
valueColor:
|
|
22815
|
+
keyColor: chalk27__default.default.gray,
|
|
22816
|
+
valueColor: chalk27__default.default.white
|
|
22814
22817
|
}
|
|
22815
22818
|
);
|
|
22816
22819
|
lines.push(details);
|
|
@@ -22824,9 +22827,9 @@ var init_StatusDisplay = __esm({
|
|
|
22824
22827
|
*/
|
|
22825
22828
|
static renderMemoryStatus(status) {
|
|
22826
22829
|
const lines = [];
|
|
22827
|
-
lines.push(
|
|
22830
|
+
lines.push(chalk27__default.default.cyan.bold("\u{1F9E0} Memory Status"));
|
|
22828
22831
|
lines.push("");
|
|
22829
|
-
lines.push(
|
|
22832
|
+
lines.push(chalk27__default.default.yellow("System 1 (Fast):"));
|
|
22830
22833
|
const s1NodeBar = formatProgressBar(
|
|
22831
22834
|
status.system1.nodes,
|
|
22832
22835
|
status.system1.maxNodes,
|
|
@@ -22844,7 +22847,7 @@ var init_StatusDisplay = __esm({
|
|
|
22844
22847
|
` \u2022 Tokens: ${status.system1.tokens}/${status.system1.maxTokens} ${s1TokenBar}`
|
|
22845
22848
|
);
|
|
22846
22849
|
lines.push("");
|
|
22847
|
-
lines.push(
|
|
22850
|
+
lines.push(chalk27__default.default.blue("System 2 (Deep):"));
|
|
22848
22851
|
const s2TraceBar = formatProgressBar(
|
|
22849
22852
|
status.system2.traces,
|
|
22850
22853
|
status.system2.maxTraces,
|
|
@@ -22862,7 +22865,7 @@ var init_StatusDisplay = __esm({
|
|
|
22862
22865
|
` \u2022 Tokens: ${status.system2.tokens}/${status.system2.maxTokens} ${s2TokenBar}`
|
|
22863
22866
|
);
|
|
22864
22867
|
lines.push("");
|
|
22865
|
-
lines.push(
|
|
22868
|
+
lines.push(chalk27__default.default.green("Total:"));
|
|
22866
22869
|
const totalBar = formatProgressBar(
|
|
22867
22870
|
status.total.tokens,
|
|
22868
22871
|
status.total.maxTokens,
|
|
@@ -22871,7 +22874,7 @@ var init_StatusDisplay = __esm({
|
|
|
22871
22874
|
lines.push(` \u2022 Tokens: ${status.total.tokens}/${status.total.maxTokens}`);
|
|
22872
22875
|
lines.push(` \u2022 Usage: ${totalBar}`);
|
|
22873
22876
|
const usage = status.total.tokens / status.total.maxTokens * 100;
|
|
22874
|
-
const usageColor = usage > 80 ?
|
|
22877
|
+
const usageColor = usage > 80 ? chalk27__default.default.red : usage > 60 ? chalk27__default.default.yellow : chalk27__default.default.green;
|
|
22875
22878
|
lines.push(
|
|
22876
22879
|
` \u2022 ${usageColor(formatPercentage(usage / 100, 1))} utilized`
|
|
22877
22880
|
);
|
|
@@ -22884,9 +22887,9 @@ var init_StatusDisplay = __esm({
|
|
|
22884
22887
|
*/
|
|
22885
22888
|
static renderModelStatus(status) {
|
|
22886
22889
|
const lines = [];
|
|
22887
|
-
lines.push(
|
|
22890
|
+
lines.push(chalk27__default.default.cyan.bold("\u{1F916} Model Status"));
|
|
22888
22891
|
lines.push("");
|
|
22889
|
-
lines.push(
|
|
22892
|
+
lines.push(chalk27__default.default.green(`Current: ${chalk27__default.default.bold(status.current)}`));
|
|
22890
22893
|
lines.push("");
|
|
22891
22894
|
lines.push("Available Models:");
|
|
22892
22895
|
const headers = ["Model", "Provider", "Status", "Capabilities"];
|
|
@@ -22898,7 +22901,7 @@ var init_StatusDisplay = __esm({
|
|
|
22898
22901
|
const table = formatTable(headers, rows, {
|
|
22899
22902
|
columnWidths: [20, 15, 8, 30],
|
|
22900
22903
|
separator: " \u2502 ",
|
|
22901
|
-
headerColor:
|
|
22904
|
+
headerColor: chalk27__default.default.gray
|
|
22902
22905
|
});
|
|
22903
22906
|
lines.push(table);
|
|
22904
22907
|
return lines.join("\n");
|
|
@@ -22910,19 +22913,19 @@ var init_StatusDisplay = __esm({
|
|
|
22910
22913
|
*/
|
|
22911
22914
|
static renderHealthChecks(checks) {
|
|
22912
22915
|
const lines = [];
|
|
22913
|
-
lines.push(
|
|
22916
|
+
lines.push(chalk27__default.default.cyan.bold("\u{1F3E5} Health Checks"));
|
|
22914
22917
|
lines.push("");
|
|
22915
22918
|
for (const check of checks) {
|
|
22916
22919
|
const icon = check.status === "ok" ? "\u2705" : check.status === "warning" ? "\u26A0\uFE0F" : "\u274C";
|
|
22917
|
-
const statusColor = check.status === "ok" ?
|
|
22920
|
+
const statusColor = check.status === "ok" ? chalk27__default.default.green : check.status === "warning" ? chalk27__default.default.yellow : chalk27__default.default.red;
|
|
22918
22921
|
let line = `${icon} ${check.name.padEnd(25)} ${statusColor(check.status.toUpperCase())}`;
|
|
22919
22922
|
if (check.latency !== void 0) {
|
|
22920
|
-
const latencyColor = check.latency < 100 ?
|
|
22923
|
+
const latencyColor = check.latency < 100 ? chalk27__default.default.green : check.latency < 500 ? chalk27__default.default.yellow : chalk27__default.default.red;
|
|
22921
22924
|
line += ` ${latencyColor(`(${check.latency}ms)`)}`;
|
|
22922
22925
|
}
|
|
22923
22926
|
lines.push(line);
|
|
22924
22927
|
if (check.message) {
|
|
22925
|
-
lines.push(
|
|
22928
|
+
lines.push(chalk27__default.default.gray(` ${check.message}`));
|
|
22926
22929
|
}
|
|
22927
22930
|
}
|
|
22928
22931
|
lines.push("");
|
|
@@ -22931,16 +22934,16 @@ var init_StatusDisplay = __esm({
|
|
|
22931
22934
|
const errorCount = checks.filter((c) => c.status === "error").length;
|
|
22932
22935
|
if (errorCount > 0) {
|
|
22933
22936
|
lines.push(
|
|
22934
|
-
|
|
22937
|
+
chalk27__default.default.red(
|
|
22935
22938
|
`\u26A0\uFE0F System has ${errorCount} error(s) - intervention required`
|
|
22936
22939
|
)
|
|
22937
22940
|
);
|
|
22938
22941
|
} else if (warningCount > 0) {
|
|
22939
22942
|
lines.push(
|
|
22940
|
-
|
|
22943
|
+
chalk27__default.default.yellow(`\u26A0\uFE0F System operational with ${warningCount} warning(s)`)
|
|
22941
22944
|
);
|
|
22942
22945
|
} else {
|
|
22943
|
-
lines.push(
|
|
22946
|
+
lines.push(chalk27__default.default.green("\u2705 All systems operational"));
|
|
22944
22947
|
}
|
|
22945
22948
|
return lines.join("\n");
|
|
22946
22949
|
}
|
|
@@ -22951,7 +22954,7 @@ var init_StatusDisplay = __esm({
|
|
|
22951
22954
|
*/
|
|
22952
22955
|
static renderSessionStats(stats) {
|
|
22953
22956
|
const lines = [];
|
|
22954
|
-
lines.push(
|
|
22957
|
+
lines.push(chalk27__default.default.cyan.bold("\u{1F4C8} Session Statistics"));
|
|
22955
22958
|
lines.push("");
|
|
22956
22959
|
const data2 = formatKeyValue(
|
|
22957
22960
|
{
|
|
@@ -22964,14 +22967,14 @@ var init_StatusDisplay = __esm({
|
|
|
22964
22967
|
},
|
|
22965
22968
|
{
|
|
22966
22969
|
keyWidth: 20,
|
|
22967
|
-
keyColor:
|
|
22968
|
-
valueColor:
|
|
22970
|
+
keyColor: chalk27__default.default.gray,
|
|
22971
|
+
valueColor: chalk27__default.default.white
|
|
22969
22972
|
}
|
|
22970
22973
|
);
|
|
22971
22974
|
lines.push(data2);
|
|
22972
22975
|
lines.push("");
|
|
22973
22976
|
const performance3 = stats.avgResponseTime < 100 ? "Excellent" : stats.avgResponseTime < 500 ? "Good" : stats.avgResponseTime < 1e3 ? "Fair" : "Poor";
|
|
22974
|
-
const perfColor = performance3 === "Excellent" ?
|
|
22977
|
+
const perfColor = performance3 === "Excellent" ? chalk27__default.default.green : performance3 === "Good" ? chalk27__default.default.blue : performance3 === "Fair" ? chalk27__default.default.yellow : chalk27__default.default.red;
|
|
22975
22978
|
lines.push(`Performance: ${perfColor(performance3)}`);
|
|
22976
22979
|
return lines.join("\n");
|
|
22977
22980
|
}
|
|
@@ -22983,22 +22986,22 @@ var init_StatusDisplay = __esm({
|
|
|
22983
22986
|
static renderStatusBar(data2) {
|
|
22984
22987
|
const segments = [];
|
|
22985
22988
|
if (data2.mode) {
|
|
22986
|
-
segments.push(
|
|
22989
|
+
segments.push(chalk27__default.default.cyan(`[${data2.mode}]`));
|
|
22987
22990
|
}
|
|
22988
22991
|
if (data2.model) {
|
|
22989
|
-
segments.push(
|
|
22992
|
+
segments.push(chalk27__default.default.blue(`\u{1F916} ${data2.model}`));
|
|
22990
22993
|
}
|
|
22991
22994
|
if (data2.memory !== void 0) {
|
|
22992
|
-
const memoryColor = data2.memory > 80 ?
|
|
22995
|
+
const memoryColor = data2.memory > 80 ? chalk27__default.default.red : data2.memory > 60 ? chalk27__default.default.yellow : chalk27__default.default.green;
|
|
22993
22996
|
segments.push(memoryColor(`\u{1F4BE} ${data2.memory}%`));
|
|
22994
22997
|
}
|
|
22995
22998
|
if (data2.latency !== void 0) {
|
|
22996
|
-
const latencyColor = data2.latency < 100 ?
|
|
22999
|
+
const latencyColor = data2.latency < 100 ? chalk27__default.default.green : data2.latency < 500 ? chalk27__default.default.yellow : chalk27__default.default.red;
|
|
22997
23000
|
segments.push(latencyColor(`\u26A1 ${data2.latency}ms`));
|
|
22998
23001
|
}
|
|
22999
23002
|
if (data2.time) {
|
|
23000
23003
|
segments.push(
|
|
23001
|
-
|
|
23004
|
+
chalk27__default.default.gray(formatTimestamp(data2.time, "short"))
|
|
23002
23005
|
);
|
|
23003
23006
|
}
|
|
23004
23007
|
return segments.join(" \u2502 ");
|
|
@@ -23017,7 +23020,7 @@ var init_CoreHandlers = __esm({
|
|
|
23017
23020
|
async execute(args2) {
|
|
23018
23021
|
const startTime = perf_hooks.performance.now();
|
|
23019
23022
|
const commands = this.registry.getCommands();
|
|
23020
|
-
let message =
|
|
23023
|
+
let message = chalk27__default.default.cyan(`\u{1F916} MARIA v3.5.0 - Available Commands
|
|
23021
23024
|
|
|
23022
23025
|
`);
|
|
23023
23026
|
const categories2 = {
|
|
@@ -23028,17 +23031,17 @@ var init_CoreHandlers = __esm({
|
|
|
23028
23031
|
system: ["/status", "/config", "/logs", "/approve"]
|
|
23029
23032
|
};
|
|
23030
23033
|
for (const [category, cmds] of Object.entries(categories2)) {
|
|
23031
|
-
message +=
|
|
23034
|
+
message += chalk27__default.default.yellow(`
|
|
23032
23035
|
${category.toUpperCase()}:
|
|
23033
23036
|
`);
|
|
23034
23037
|
for (const cmd of cmds) {
|
|
23035
23038
|
if (commands.includes(cmd)) {
|
|
23036
|
-
message += ` ${
|
|
23039
|
+
message += ` ${chalk27__default.default.green(cmd.padEnd(15))} - ${this.getCommandDescription(cmd)}
|
|
23037
23040
|
`;
|
|
23038
23041
|
}
|
|
23039
23042
|
}
|
|
23040
23043
|
}
|
|
23041
|
-
message +=
|
|
23044
|
+
message += chalk27__default.default.gray(
|
|
23042
23045
|
`
|
|
23043
23046
|
Type '/help <command>' for detailed information about a specific command.`
|
|
23044
23047
|
);
|
|
@@ -23086,7 +23089,7 @@ Type '/help <command>' for detailed information about a specific command.`
|
|
|
23086
23089
|
const processingTime = perf_hooks.performance.now() - startTime;
|
|
23087
23090
|
return {
|
|
23088
23091
|
success: true,
|
|
23089
|
-
message:
|
|
23092
|
+
message: chalk27__default.default.gray("Terminal cleared."),
|
|
23090
23093
|
metadata: {
|
|
23091
23094
|
processingTime,
|
|
23092
23095
|
timestamp: /* @__PURE__ */ new Date()
|
|
@@ -23097,7 +23100,7 @@ Type '/help <command>' for detailed information about a specific command.`
|
|
|
23097
23100
|
ExitHandler = class {
|
|
23098
23101
|
async execute(args2) {
|
|
23099
23102
|
const startTime = perf_hooks.performance.now();
|
|
23100
|
-
const message =
|
|
23103
|
+
const message = chalk27__default.default.green("\u{1F44B} Goodbye! Thank you for using MARIA.\n");
|
|
23101
23104
|
process.emit("SIGTERM");
|
|
23102
23105
|
const processingTime = perf_hooks.performance.now() - startTime;
|
|
23103
23106
|
return {
|
|
@@ -23121,23 +23124,23 @@ Type '/help <command>' for detailed information about a specific command.`
|
|
|
23121
23124
|
platform: process.platform,
|
|
23122
23125
|
arch: process.arch
|
|
23123
23126
|
};
|
|
23124
|
-
let message =
|
|
23125
|
-
message +=
|
|
23127
|
+
let message = chalk27__default.default.cyan("\u{1F680} MARIA System Information\n\n");
|
|
23128
|
+
message += chalk27__default.default.white(` Version: ${chalk27__default.default.green(packageInfo.version)}
|
|
23126
23129
|
`);
|
|
23127
|
-
message +=
|
|
23130
|
+
message += chalk27__default.default.white(` Package: ${chalk27__default.default.green(packageInfo.name)}
|
|
23128
23131
|
`);
|
|
23129
|
-
message +=
|
|
23132
|
+
message += chalk27__default.default.white(` Node: ${chalk27__default.default.green(packageInfo.node)}
|
|
23130
23133
|
`);
|
|
23131
|
-
message +=
|
|
23132
|
-
` Platform: ${
|
|
23134
|
+
message += chalk27__default.default.white(
|
|
23135
|
+
` Platform: ${chalk27__default.default.green(packageInfo.platform)}
|
|
23133
23136
|
`
|
|
23134
23137
|
);
|
|
23135
|
-
message +=
|
|
23138
|
+
message += chalk27__default.default.white(` Arch: ${chalk27__default.default.green(packageInfo.arch)}
|
|
23136
23139
|
`);
|
|
23137
|
-
message +=
|
|
23140
|
+
message += chalk27__default.default.gray(`
|
|
23138
23141
|
Build: Production
|
|
23139
23142
|
`);
|
|
23140
|
-
message +=
|
|
23143
|
+
message += chalk27__default.default.gray(` License: MIT
|
|
23141
23144
|
`);
|
|
23142
23145
|
const processingTime = perf_hooks.performance.now() - startTime;
|
|
23143
23146
|
return {
|
|
@@ -23162,15 +23165,15 @@ Type '/help <command>' for detailed information about a specific command.`
|
|
|
23162
23165
|
this.history.push("/history");
|
|
23163
23166
|
}
|
|
23164
23167
|
const recent = this.history.slice(-limit);
|
|
23165
|
-
let message =
|
|
23168
|
+
let message = chalk27__default.default.cyan(`\u{1F4DC} Command History (last ${recent.length}):
|
|
23166
23169
|
|
|
23167
23170
|
`);
|
|
23168
23171
|
recent.forEach((cmd, index2) => {
|
|
23169
23172
|
const num = this.history.length - recent.length + index2 + 1;
|
|
23170
|
-
message +=
|
|
23173
|
+
message += chalk27__default.default.gray(` ${num.toString().padStart(3)}: `) + chalk27__default.default.white(cmd) + "\n";
|
|
23171
23174
|
});
|
|
23172
23175
|
if (recent.length === 0) {
|
|
23173
|
-
message =
|
|
23176
|
+
message = chalk27__default.default.gray("No command history available.");
|
|
23174
23177
|
}
|
|
23175
23178
|
const processingTime = perf_hooks.performance.now() - startTime;
|
|
23176
23179
|
return {
|
|
@@ -23216,13 +23219,13 @@ var init_DevHandlers = __esm({
|
|
|
23216
23219
|
if (!prompt) {
|
|
23217
23220
|
return {
|
|
23218
23221
|
ok: false,
|
|
23219
|
-
message:
|
|
23222
|
+
message: chalk27__default.default.red("\u274C Please provide a code generation request.\n") + chalk27__default.default.gray("Usage: /code <description>\n") + chalk27__default.default.gray("Example: /code create a React button component")
|
|
23220
23223
|
};
|
|
23221
23224
|
}
|
|
23222
23225
|
if (signal?.aborted) {
|
|
23223
23226
|
return {
|
|
23224
23227
|
ok: false,
|
|
23225
|
-
message:
|
|
23228
|
+
message: chalk27__default.default.yellow("Code generation canceled")
|
|
23226
23229
|
};
|
|
23227
23230
|
}
|
|
23228
23231
|
try {
|
|
@@ -23233,9 +23236,9 @@ var init_DevHandlers = __esm({
|
|
|
23233
23236
|
if (dryRun) {
|
|
23234
23237
|
return {
|
|
23235
23238
|
ok: true,
|
|
23236
|
-
message:
|
|
23237
|
-
`) +
|
|
23238
|
-
`) +
|
|
23239
|
+
message: chalk27__default.default.cyan("\u{1F50D} Dry run mode - would generate:\n") + chalk27__default.default.gray(`Language: ${language}
|
|
23240
|
+
`) + chalk27__default.default.gray(`Framework: ${framework || "none"}
|
|
23241
|
+
`) + chalk27__default.default.gray(`Prompt: ${cleanPrompt}`)
|
|
23239
23242
|
};
|
|
23240
23243
|
}
|
|
23241
23244
|
const generatedCode = `// Generated code for: ${cleanPrompt}
|
|
@@ -23247,7 +23250,7 @@ function generated() {
|
|
|
23247
23250
|
export { generated };`;
|
|
23248
23251
|
return {
|
|
23249
23252
|
ok: true,
|
|
23250
|
-
message:
|
|
23253
|
+
message: chalk27__default.default.green("\u2705 Code generated successfully:\n\n") + chalk27__default.default.gray("```" + language + "\n") + generatedCode + chalk27__default.default.gray("\n```"),
|
|
23251
23254
|
data: {
|
|
23252
23255
|
code: generatedCode,
|
|
23253
23256
|
language,
|
|
@@ -23260,7 +23263,7 @@ export { generated };`;
|
|
|
23260
23263
|
} catch (error2) {
|
|
23261
23264
|
return {
|
|
23262
23265
|
ok: false,
|
|
23263
|
-
message:
|
|
23266
|
+
message: chalk27__default.default.red(`Code generation failed: ${error2}`)
|
|
23264
23267
|
};
|
|
23265
23268
|
}
|
|
23266
23269
|
}
|
|
@@ -23274,7 +23277,7 @@ export { generated };`;
|
|
|
23274
23277
|
if (signal?.aborted) {
|
|
23275
23278
|
return {
|
|
23276
23279
|
ok: false,
|
|
23277
|
-
message:
|
|
23280
|
+
message: chalk27__default.default.yellow("Test operation canceled")
|
|
23278
23281
|
};
|
|
23279
23282
|
}
|
|
23280
23283
|
const subcommand = args2[0] || "run";
|
|
@@ -23290,8 +23293,8 @@ export { generated };`;
|
|
|
23290
23293
|
default:
|
|
23291
23294
|
return {
|
|
23292
23295
|
ok: false,
|
|
23293
|
-
message:
|
|
23294
|
-
`) +
|
|
23296
|
+
message: chalk27__default.default.red(`Unknown test subcommand: ${subcommand}
|
|
23297
|
+
`) + chalk27__default.default.gray("Available: generate, run, coverage")
|
|
23295
23298
|
};
|
|
23296
23299
|
}
|
|
23297
23300
|
}
|
|
@@ -23299,7 +23302,7 @@ export { generated };`;
|
|
|
23299
23302
|
if (!target) {
|
|
23300
23303
|
return {
|
|
23301
23304
|
ok: false,
|
|
23302
|
-
message:
|
|
23305
|
+
message: chalk27__default.default.red(
|
|
23303
23306
|
"Please specify a file or function to generate tests for"
|
|
23304
23307
|
)
|
|
23305
23308
|
};
|
|
@@ -23316,9 +23319,9 @@ describe("${target}", () => {
|
|
|
23316
23319
|
});`;
|
|
23317
23320
|
return {
|
|
23318
23321
|
ok: true,
|
|
23319
|
-
message:
|
|
23322
|
+
message: chalk27__default.default.green(`\u2705 Tests generated for ${target}:
|
|
23320
23323
|
|
|
23321
|
-
`) +
|
|
23324
|
+
`) + chalk27__default.default.gray("```typescript\n") + testCode + chalk27__default.default.gray("\n```"),
|
|
23322
23325
|
data: { testCode, framework, target }
|
|
23323
23326
|
};
|
|
23324
23327
|
}
|
|
@@ -23331,23 +23334,23 @@ describe("${target}", () => {
|
|
|
23331
23334
|
if (coverage) command += " --coverage";
|
|
23332
23335
|
return {
|
|
23333
23336
|
ok: true,
|
|
23334
|
-
message:
|
|
23335
|
-
`) +
|
|
23337
|
+
message: chalk27__default.default.cyan(`\u{1F9EA} Running tests...
|
|
23338
|
+
`) + chalk27__default.default.gray(`Command: ${command}
|
|
23336
23339
|
|
|
23337
|
-
`) +
|
|
23340
|
+
`) + chalk27__default.default.green("\u2705 All tests passed!"),
|
|
23338
23341
|
data: { command, passed: true }
|
|
23339
23342
|
};
|
|
23340
23343
|
}
|
|
23341
23344
|
async showCoverage(options2) {
|
|
23342
23345
|
return {
|
|
23343
23346
|
ok: true,
|
|
23344
|
-
message:
|
|
23347
|
+
message: chalk27__default.default.cyan("\u{1F4CA} Test Coverage Report:\n\n") + chalk27__default.default.gray("File".padEnd(40) + "% Stmts".padEnd(10) + "% Lines\n") + chalk27__default.default.gray("-".repeat(60) + "\n") + chalk27__default.default.green(
|
|
23345
23348
|
"SessionStateMachine.ts".padEnd(40) + "100.00".padEnd(10) + "100.00\n"
|
|
23346
|
-
) +
|
|
23349
|
+
) + chalk27__default.default.green(
|
|
23347
23350
|
"InputController.ts".padEnd(40) + "95.50".padEnd(10) + "94.20\n"
|
|
23348
|
-
) +
|
|
23351
|
+
) + chalk27__default.default.yellow(
|
|
23349
23352
|
"SessionManager.ts".padEnd(40) + "78.30".padEnd(10) + "76.50\n"
|
|
23350
|
-
) +
|
|
23353
|
+
) + chalk27__default.default.gray("-".repeat(60) + "\n") + chalk27__default.default.cyan("Total".padEnd(40) + "85.60".padEnd(10) + "84.30")
|
|
23351
23354
|
};
|
|
23352
23355
|
}
|
|
23353
23356
|
};
|
|
@@ -23361,33 +23364,33 @@ describe("${target}", () => {
|
|
|
23361
23364
|
if (!file) {
|
|
23362
23365
|
return {
|
|
23363
23366
|
ok: false,
|
|
23364
|
-
message:
|
|
23367
|
+
message: chalk27__default.default.red("Please specify a file to review\n") + chalk27__default.default.gray("Usage: /review <file> [--security] [--performance]")
|
|
23365
23368
|
};
|
|
23366
23369
|
}
|
|
23367
23370
|
const checkSecurity = args2.includes("--security");
|
|
23368
23371
|
const checkPerformance = args2.includes("--performance");
|
|
23369
|
-
let message =
|
|
23372
|
+
let message = chalk27__default.default.cyan(`\u{1F50D} Code Review for ${file}
|
|
23370
23373
|
|
|
23371
23374
|
`);
|
|
23372
|
-
message +=
|
|
23373
|
-
message +=
|
|
23374
|
-
message +=
|
|
23375
|
-
message +=
|
|
23375
|
+
message += chalk27__default.default.yellow("\u26A0\uFE0F Issues Found (3):\n");
|
|
23376
|
+
message += chalk27__default.default.gray(" 1. Line 42: ") + chalk27__default.default.yellow("Missing error handling in async function\n");
|
|
23377
|
+
message += chalk27__default.default.gray(" 2. Line 89: ") + chalk27__default.default.yellow("Potential memory leak - event listener not removed\n");
|
|
23378
|
+
message += chalk27__default.default.gray(" 3. Line 156: ") + chalk27__default.default.yellow(
|
|
23376
23379
|
"Complex function - consider refactoring (cyclomatic complexity: 12)\n\n"
|
|
23377
23380
|
);
|
|
23378
23381
|
if (checkSecurity) {
|
|
23379
|
-
message +=
|
|
23380
|
-
message +=
|
|
23382
|
+
message += chalk27__default.default.red("\u{1F512} Security Issues (1):\n");
|
|
23383
|
+
message += chalk27__default.default.gray(" 1. Line 67: ") + chalk27__default.default.red("Potential XSS vulnerability - user input not sanitized\n\n");
|
|
23381
23384
|
}
|
|
23382
23385
|
if (checkPerformance) {
|
|
23383
|
-
message +=
|
|
23384
|
-
message +=
|
|
23385
|
-
message +=
|
|
23386
|
-
}
|
|
23387
|
-
message +=
|
|
23388
|
-
message +=
|
|
23389
|
-
message +=
|
|
23390
|
-
message +=
|
|
23386
|
+
message += chalk27__default.default.blue("\u26A1 Performance Suggestions (2):\n");
|
|
23387
|
+
message += chalk27__default.default.gray(" 1. Line 23: ") + chalk27__default.default.blue("Consider memoization for expensive calculation\n");
|
|
23388
|
+
message += chalk27__default.default.gray(" 2. Line 145: ") + chalk27__default.default.blue("Use virtualization for large list rendering\n\n");
|
|
23389
|
+
}
|
|
23390
|
+
message += chalk27__default.default.green("\u2705 Positive Findings:\n");
|
|
23391
|
+
message += chalk27__default.default.gray(" \u2022 Good TypeScript type coverage (92%)\n");
|
|
23392
|
+
message += chalk27__default.default.gray(" \u2022 Consistent code style\n");
|
|
23393
|
+
message += chalk27__default.default.gray(" \u2022 Well-documented functions\n");
|
|
23391
23394
|
return {
|
|
23392
23395
|
ok: true,
|
|
23393
23396
|
message,
|
|
@@ -23417,8 +23420,8 @@ describe("${target}", () => {
|
|
|
23417
23420
|
default:
|
|
23418
23421
|
return {
|
|
23419
23422
|
ok: false,
|
|
23420
|
-
message:
|
|
23421
|
-
`) +
|
|
23423
|
+
message: chalk27__default.default.red(`Unknown bug subcommand: ${subcommand}
|
|
23424
|
+
`) + chalk27__default.default.gray("Available: report, list, analyze")
|
|
23422
23425
|
};
|
|
23423
23426
|
}
|
|
23424
23427
|
}
|
|
@@ -23427,18 +23430,18 @@ describe("${target}", () => {
|
|
|
23427
23430
|
if (!description) {
|
|
23428
23431
|
return {
|
|
23429
23432
|
ok: false,
|
|
23430
|
-
message:
|
|
23433
|
+
message: chalk27__default.default.red("Please provide a bug description")
|
|
23431
23434
|
};
|
|
23432
23435
|
}
|
|
23433
23436
|
const bugId = `BUG-${Date.now().toString(36).toUpperCase()}`;
|
|
23434
23437
|
return {
|
|
23435
23438
|
ok: true,
|
|
23436
|
-
message:
|
|
23439
|
+
message: chalk27__default.default.green(`\u{1F41B} Bug reported successfully!
|
|
23437
23440
|
|
|
23438
|
-
`) +
|
|
23439
|
-
`) +
|
|
23440
|
-
`) +
|
|
23441
|
-
`) +
|
|
23441
|
+
`) + chalk27__default.default.cyan(`Bug ID: ${bugId}
|
|
23442
|
+
`) + chalk27__default.default.gray(`Description: ${description}
|
|
23443
|
+
`) + chalk27__default.default.gray(`Status: Open
|
|
23444
|
+
`) + chalk27__default.default.gray(`Priority: To be determined
|
|
23442
23445
|
`),
|
|
23443
23446
|
data: { bugId, description, status: "open" }
|
|
23444
23447
|
};
|
|
@@ -23446,23 +23449,23 @@ describe("${target}", () => {
|
|
|
23446
23449
|
async listBugs() {
|
|
23447
23450
|
return {
|
|
23448
23451
|
ok: true,
|
|
23449
|
-
message:
|
|
23452
|
+
message: chalk27__default.default.cyan("\u{1F41B} Active Bugs:\n\n") + chalk27__default.default.yellow("1. BUG-A1B2C3: ") + chalk27__default.default.gray("Session timeout not handled properly\n") + chalk27__default.default.yellow("2. BUG-D4E5F6: ") + chalk27__default.default.gray("Memory leak in streaming responses\n") + chalk27__default.default.yellow("3. BUG-G7H8I9: ") + chalk27__default.default.gray("Spinner not stopping on error\n\n") + chalk27__default.default.gray("Total: 3 open bugs")
|
|
23450
23453
|
};
|
|
23451
23454
|
}
|
|
23452
23455
|
async analyzeBug(bugId) {
|
|
23453
23456
|
if (!bugId) {
|
|
23454
23457
|
return {
|
|
23455
23458
|
ok: false,
|
|
23456
|
-
message:
|
|
23459
|
+
message: chalk27__default.default.red("Please provide a bug ID to analyze")
|
|
23457
23460
|
};
|
|
23458
23461
|
}
|
|
23459
23462
|
return {
|
|
23460
23463
|
ok: true,
|
|
23461
|
-
message:
|
|
23464
|
+
message: chalk27__default.default.cyan(`\u{1F50D} Bug Analysis for ${bugId}:
|
|
23462
23465
|
|
|
23463
|
-
`) +
|
|
23466
|
+
`) + chalk27__default.default.yellow("Summary: ") + chalk27__default.default.gray("Session timeout not handled properly\n") + chalk27__default.default.yellow("Severity: ") + chalk27__default.default.orange("Medium\n") + chalk27__default.default.yellow("Component: ") + chalk27__default.default.gray("SessionManager\n") + chalk27__default.default.yellow("Reported: ") + chalk27__default.default.gray("2 days ago\n\n") + chalk27__default.default.cyan("Possible Causes:\n") + chalk27__default.default.gray(
|
|
23464
23467
|
" 1. AbortSignal not propagated to all async operations\n"
|
|
23465
|
-
) +
|
|
23468
|
+
) + chalk27__default.default.gray(" 2. Deadline timer not cleared on completion\n") + chalk27__default.default.gray(" 3. Race condition in state transitions\n\n") + chalk27__default.default.green("Suggested Fix:\n") + chalk27__default.default.gray(" Ensure all async operations respect the AbortSignal\n") + chalk27__default.default.gray(" Add finally block to clear timers\n")
|
|
23466
23469
|
};
|
|
23467
23470
|
}
|
|
23468
23471
|
};
|
|
@@ -23486,7 +23489,7 @@ var init_SystemHandlers = __esm({
|
|
|
23486
23489
|
if (signal?.aborted) {
|
|
23487
23490
|
return {
|
|
23488
23491
|
ok: false,
|
|
23489
|
-
message:
|
|
23492
|
+
message: chalk27__default.default.yellow("Status check canceled")
|
|
23490
23493
|
};
|
|
23491
23494
|
}
|
|
23492
23495
|
const verbose = args2.includes("--verbose") || args2.includes("-v");
|
|
@@ -23497,44 +23500,44 @@ var init_SystemHandlers = __esm({
|
|
|
23497
23500
|
cpu: os15__namespace.cpus()[0],
|
|
23498
23501
|
platform: process.platform
|
|
23499
23502
|
};
|
|
23500
|
-
let message =
|
|
23501
|
-
message +=
|
|
23502
|
-
message +=
|
|
23503
|
+
let message = chalk27__default.default.cyan.bold("\u{1F4CA} System Status\n\n");
|
|
23504
|
+
message += chalk27__default.default.green("\u2705 System: Operational\n");
|
|
23505
|
+
message += chalk27__default.default.gray(
|
|
23503
23506
|
`\u23F1\uFE0F Uptime: ${Math.floor(status.uptime / 60)}m ${Math.floor(status.uptime % 60)}s
|
|
23504
23507
|
`
|
|
23505
23508
|
);
|
|
23506
|
-
message +=
|
|
23509
|
+
message += chalk27__default.default.gray(
|
|
23507
23510
|
`\u{1F4BE} Memory: ${Math.round(status.memory.heapUsed / 1024 / 1024)}MB / ${Math.round(status.memory.heapTotal / 1024 / 1024)}MB
|
|
23508
23511
|
`
|
|
23509
23512
|
);
|
|
23510
23513
|
if (verbose) {
|
|
23511
|
-
message +=
|
|
23512
|
-
message +=
|
|
23514
|
+
message += chalk27__default.default.gray("\nDetailed Information:\n");
|
|
23515
|
+
message += chalk27__default.default.gray(` \u2022 CPU: ${status.cpu.model}
|
|
23513
23516
|
`);
|
|
23514
|
-
message +=
|
|
23517
|
+
message += chalk27__default.default.gray(
|
|
23515
23518
|
` \u2022 Platform: ${status.platform} (${os15__namespace.arch()})
|
|
23516
23519
|
`
|
|
23517
23520
|
);
|
|
23518
|
-
message +=
|
|
23521
|
+
message += chalk27__default.default.gray(` \u2022 Node.js: ${process.version}
|
|
23519
23522
|
`);
|
|
23520
|
-
message +=
|
|
23523
|
+
message += chalk27__default.default.gray(` \u2022 Process ID: ${process.pid}
|
|
23521
23524
|
`);
|
|
23522
|
-
message +=
|
|
23525
|
+
message += chalk27__default.default.gray(` \u2022 Working Directory: ${process.cwd()}
|
|
23523
23526
|
`);
|
|
23524
|
-
message +=
|
|
23525
|
-
message +=
|
|
23527
|
+
message += chalk27__default.default.gray("\nMemory Details:\n");
|
|
23528
|
+
message += chalk27__default.default.gray(
|
|
23526
23529
|
` \u2022 RSS: ${Math.round(status.memory.rss / 1024 / 1024)}MB
|
|
23527
23530
|
`
|
|
23528
23531
|
);
|
|
23529
|
-
message +=
|
|
23532
|
+
message += chalk27__default.default.gray(
|
|
23530
23533
|
` \u2022 Heap Used: ${Math.round(status.memory.heapUsed / 1024 / 1024)}MB
|
|
23531
23534
|
`
|
|
23532
23535
|
);
|
|
23533
|
-
message +=
|
|
23536
|
+
message += chalk27__default.default.gray(
|
|
23534
23537
|
` \u2022 Heap Total: ${Math.round(status.memory.heapTotal / 1024 / 1024)}MB
|
|
23535
23538
|
`
|
|
23536
23539
|
);
|
|
23537
|
-
message +=
|
|
23540
|
+
message += chalk27__default.default.gray(
|
|
23538
23541
|
` \u2022 External: ${Math.round(status.memory.external / 1024 / 1024)}MB
|
|
23539
23542
|
`
|
|
23540
23543
|
);
|
|
@@ -23563,7 +23566,7 @@ var init_SystemHandlers = __esm({
|
|
|
23563
23566
|
if (signal?.aborted) {
|
|
23564
23567
|
return {
|
|
23565
23568
|
ok: false,
|
|
23566
|
-
message:
|
|
23569
|
+
message: chalk27__default.default.yellow("Model operation canceled")
|
|
23567
23570
|
};
|
|
23568
23571
|
}
|
|
23569
23572
|
if (args2.length === 0) {
|
|
@@ -23583,17 +23586,17 @@ var init_SystemHandlers = __esm({
|
|
|
23583
23586
|
}
|
|
23584
23587
|
}
|
|
23585
23588
|
async listModels() {
|
|
23586
|
-
let message =
|
|
23587
|
-
message +=
|
|
23589
|
+
let message = chalk27__default.default.cyan.bold("\u{1F916} Available Models\n\n");
|
|
23590
|
+
message += chalk27__default.default.green(`Current: ${this.currentModel}
|
|
23588
23591
|
|
|
23589
23592
|
`);
|
|
23590
23593
|
for (const model of this.availableModels) {
|
|
23591
|
-
const status = model.available ?
|
|
23592
|
-
const name2 = model.id === this.currentModel ?
|
|
23593
|
-
message += `${status} ${name2.padEnd(20)} ${
|
|
23594
|
+
const status = model.available ? chalk27__default.default.green("\u2705") : chalk27__default.default.red("\u274C");
|
|
23595
|
+
const name2 = model.id === this.currentModel ? chalk27__default.default.green.bold(model.id) : chalk27__default.default.cyan(model.id);
|
|
23596
|
+
message += `${status} ${name2.padEnd(20)} ${chalk27__default.default.gray(`[${model.provider}]`)}
|
|
23594
23597
|
`;
|
|
23595
23598
|
}
|
|
23596
|
-
message +=
|
|
23599
|
+
message += chalk27__default.default.gray("\nUse /model <name> to switch models");
|
|
23597
23600
|
return {
|
|
23598
23601
|
ok: true,
|
|
23599
23602
|
message,
|
|
@@ -23604,27 +23607,27 @@ var init_SystemHandlers = __esm({
|
|
|
23604
23607
|
if (!modelId) {
|
|
23605
23608
|
return {
|
|
23606
23609
|
ok: false,
|
|
23607
|
-
message:
|
|
23610
|
+
message: chalk27__default.default.red("Please specify a model to switch to")
|
|
23608
23611
|
};
|
|
23609
23612
|
}
|
|
23610
23613
|
const model = this.availableModels.find((m2) => m2.id === modelId);
|
|
23611
23614
|
if (!model) {
|
|
23612
23615
|
return {
|
|
23613
23616
|
ok: false,
|
|
23614
|
-
message:
|
|
23615
|
-
`) +
|
|
23617
|
+
message: chalk27__default.default.red(`Unknown model: ${modelId}
|
|
23618
|
+
`) + chalk27__default.default.gray("Use /model list to see available models")
|
|
23616
23619
|
};
|
|
23617
23620
|
}
|
|
23618
23621
|
if (!model.available) {
|
|
23619
23622
|
return {
|
|
23620
23623
|
ok: false,
|
|
23621
|
-
message:
|
|
23624
|
+
message: chalk27__default.default.yellow(`Model ${modelId} is not currently available`)
|
|
23622
23625
|
};
|
|
23623
23626
|
}
|
|
23624
23627
|
this.currentModel = modelId;
|
|
23625
23628
|
return {
|
|
23626
23629
|
ok: true,
|
|
23627
|
-
message:
|
|
23630
|
+
message: chalk27__default.default.green(`\u2705 Switched to ${modelId}`),
|
|
23628
23631
|
data: { model: modelId }
|
|
23629
23632
|
};
|
|
23630
23633
|
}
|
|
@@ -23633,27 +23636,27 @@ var init_SystemHandlers = __esm({
|
|
|
23633
23636
|
if (!model) {
|
|
23634
23637
|
return {
|
|
23635
23638
|
ok: false,
|
|
23636
|
-
message:
|
|
23639
|
+
message: chalk27__default.default.red(`Unknown model: ${modelId}`)
|
|
23637
23640
|
};
|
|
23638
23641
|
}
|
|
23639
|
-
let message =
|
|
23642
|
+
let message = chalk27__default.default.cyan(`\u{1F4CB} Model Information: ${modelId}
|
|
23640
23643
|
|
|
23641
23644
|
`);
|
|
23642
|
-
message +=
|
|
23645
|
+
message += chalk27__default.default.gray(`Provider: ${model.provider}
|
|
23643
23646
|
`);
|
|
23644
|
-
message +=
|
|
23647
|
+
message += chalk27__default.default.gray(
|
|
23645
23648
|
`Status: ${model.available ? "Available" : "Unavailable"}
|
|
23646
23649
|
`
|
|
23647
23650
|
);
|
|
23648
|
-
message +=
|
|
23651
|
+
message += chalk27__default.default.gray(
|
|
23649
23652
|
`Current: ${model.id === this.currentModel ? "Yes" : "No"}
|
|
23650
23653
|
`
|
|
23651
23654
|
);
|
|
23652
|
-
message +=
|
|
23653
|
-
message +=
|
|
23654
|
-
message +=
|
|
23655
|
-
message +=
|
|
23656
|
-
message +=
|
|
23655
|
+
message += chalk27__default.default.gray("\nCapabilities:\n");
|
|
23656
|
+
message += chalk27__default.default.gray(" \u2022 Context: 128K tokens\n");
|
|
23657
|
+
message += chalk27__default.default.gray(" \u2022 Languages: 95+\n");
|
|
23658
|
+
message += chalk27__default.default.gray(" \u2022 Code: Yes\n");
|
|
23659
|
+
message += chalk27__default.default.gray(" \u2022 Vision: ") + (modelId.includes("gpt-4") ? "Yes\n" : "No\n");
|
|
23657
23660
|
return {
|
|
23658
23661
|
ok: true,
|
|
23659
23662
|
message,
|
|
@@ -23685,39 +23688,39 @@ var init_SystemHandlers = __esm({
|
|
|
23685
23688
|
default:
|
|
23686
23689
|
return {
|
|
23687
23690
|
ok: false,
|
|
23688
|
-
message:
|
|
23689
|
-
`) +
|
|
23691
|
+
message: chalk27__default.default.red(`Unknown memory subcommand: ${subcommand}
|
|
23692
|
+
`) + chalk27__default.default.gray("Available: status, clear, export, compact")
|
|
23690
23693
|
};
|
|
23691
23694
|
}
|
|
23692
23695
|
}
|
|
23693
23696
|
async showStatus() {
|
|
23694
|
-
let message =
|
|
23695
|
-
message +=
|
|
23696
|
-
message +=
|
|
23697
|
+
let message = chalk27__default.default.cyan.bold("\u{1F9E0} Memory Status\n\n");
|
|
23698
|
+
message += chalk27__default.default.yellow("System 1 (Fast):\n");
|
|
23699
|
+
message += chalk27__default.default.gray(
|
|
23697
23700
|
` \u2022 Knowledge Nodes: ${this.memoryStats.system1.nodes}
|
|
23698
23701
|
`
|
|
23699
23702
|
);
|
|
23700
|
-
message +=
|
|
23703
|
+
message += chalk27__default.default.gray(` \u2022 Tokens: ${this.memoryStats.system1.tokens}
|
|
23701
23704
|
|
|
23702
23705
|
`);
|
|
23703
|
-
message +=
|
|
23704
|
-
message +=
|
|
23706
|
+
message += chalk27__default.default.blue("System 2 (Deep):\n");
|
|
23707
|
+
message += chalk27__default.default.gray(
|
|
23705
23708
|
` \u2022 Reasoning Traces: ${this.memoryStats.system2.traces}
|
|
23706
23709
|
`
|
|
23707
23710
|
);
|
|
23708
|
-
message +=
|
|
23711
|
+
message += chalk27__default.default.gray(` \u2022 Tokens: ${this.memoryStats.system2.tokens}
|
|
23709
23712
|
|
|
23710
23713
|
`);
|
|
23711
|
-
message +=
|
|
23712
|
-
message +=
|
|
23714
|
+
message += chalk27__default.default.green("Total:\n");
|
|
23715
|
+
message += chalk27__default.default.gray(` \u2022 Entries: ${this.memoryStats.total.entries}
|
|
23713
23716
|
`);
|
|
23714
|
-
message +=
|
|
23717
|
+
message += chalk27__default.default.gray(
|
|
23715
23718
|
` \u2022 Tokens: ${this.memoryStats.total.tokens} / 128000
|
|
23716
23719
|
`
|
|
23717
23720
|
);
|
|
23718
23721
|
const usage = Math.round(this.memoryStats.total.tokens / 128e3 * 100);
|
|
23719
23722
|
const bar = "\u2588".repeat(Math.floor(usage / 5)) + "\u2591".repeat(20 - Math.floor(usage / 5));
|
|
23720
|
-
message +=
|
|
23723
|
+
message += chalk27__default.default.gray(` \u2022 Usage: [${bar}] ${usage}%
|
|
23721
23724
|
`);
|
|
23722
23725
|
return {
|
|
23723
23726
|
ok: true,
|
|
@@ -23731,14 +23734,14 @@ var init_SystemHandlers = __esm({
|
|
|
23731
23734
|
this.memoryStats.system1 = { nodes: 0, tokens: 0 };
|
|
23732
23735
|
return {
|
|
23733
23736
|
ok: true,
|
|
23734
|
-
message:
|
|
23737
|
+
message: chalk27__default.default.green("\u2705 System 1 memory cleared")
|
|
23735
23738
|
};
|
|
23736
23739
|
}
|
|
23737
23740
|
if (system === "system2") {
|
|
23738
23741
|
this.memoryStats.system2 = { traces: 0, tokens: 0 };
|
|
23739
23742
|
return {
|
|
23740
23743
|
ok: true,
|
|
23741
|
-
message:
|
|
23744
|
+
message: chalk27__default.default.green("\u2705 System 2 memory cleared")
|
|
23742
23745
|
};
|
|
23743
23746
|
}
|
|
23744
23747
|
this.memoryStats = {
|
|
@@ -23748,15 +23751,15 @@ var init_SystemHandlers = __esm({
|
|
|
23748
23751
|
};
|
|
23749
23752
|
return {
|
|
23750
23753
|
ok: true,
|
|
23751
|
-
message:
|
|
23754
|
+
message: chalk27__default.default.green("\u{1F9F9} All memory cleared")
|
|
23752
23755
|
};
|
|
23753
23756
|
}
|
|
23754
23757
|
async exportMemory() {
|
|
23755
23758
|
const filename = `memory-export-${Date.now()}.json`;
|
|
23756
23759
|
return {
|
|
23757
23760
|
ok: true,
|
|
23758
|
-
message:
|
|
23759
|
-
`) +
|
|
23761
|
+
message: chalk27__default.default.green(`\u{1F4E6} Memory exported to ${filename}
|
|
23762
|
+
`) + chalk27__default.default.gray(
|
|
23760
23763
|
`Size: ${Math.round(JSON.stringify(this.memoryStats).length / 1024)}KB`
|
|
23761
23764
|
),
|
|
23762
23765
|
data: { filename, stats: this.memoryStats }
|
|
@@ -23774,9 +23777,9 @@ var init_SystemHandlers = __esm({
|
|
|
23774
23777
|
);
|
|
23775
23778
|
return {
|
|
23776
23779
|
ok: true,
|
|
23777
|
-
message:
|
|
23778
|
-
`) +
|
|
23779
|
-
`) +
|
|
23780
|
+
message: chalk27__default.default.green("\u2728 Memory compacted successfully\n") + chalk27__default.default.gray(`Before: ${before} tokens
|
|
23781
|
+
`) + chalk27__default.default.gray(`After: ${after} tokens
|
|
23782
|
+
`) + chalk27__default.default.gray(
|
|
23780
23783
|
`Saved: ${before - after} tokens (${Math.round((1 - after / before) * 100)}%)`
|
|
23781
23784
|
),
|
|
23782
23785
|
data: { before, after, saved: before - after }
|
|
@@ -23792,11 +23795,11 @@ var init_SystemHandlers = __esm({
|
|
|
23792
23795
|
if (signal?.aborted) {
|
|
23793
23796
|
return {
|
|
23794
23797
|
ok: false,
|
|
23795
|
-
message:
|
|
23798
|
+
message: chalk27__default.default.yellow("Health check canceled")
|
|
23796
23799
|
};
|
|
23797
23800
|
}
|
|
23798
23801
|
const detailed = args2.includes("--detailed");
|
|
23799
|
-
let message =
|
|
23802
|
+
let message = chalk27__default.default.cyan.bold("\u{1F3E5} System Health Check\n\n");
|
|
23800
23803
|
const checks = [
|
|
23801
23804
|
{ name: "Core Services", status: "ok", latency: 12 },
|
|
23802
23805
|
{ name: "Memory System", status: "ok", latency: 8 },
|
|
@@ -23805,11 +23808,11 @@ var init_SystemHandlers = __esm({
|
|
|
23805
23808
|
{ name: "Network", status: "warning", latency: 250 }
|
|
23806
23809
|
];
|
|
23807
23810
|
for (const check of checks) {
|
|
23808
|
-
const icon = check.status === "ok" ?
|
|
23809
|
-
const status = check.status === "ok" ?
|
|
23811
|
+
const icon = check.status === "ok" ? chalk27__default.default.green("\u2705") : check.status === "warning" ? chalk27__default.default.yellow("\u26A0\uFE0F") : chalk27__default.default.red("\u274C");
|
|
23812
|
+
const status = check.status === "ok" ? chalk27__default.default.green("OK") : check.status === "warning" ? chalk27__default.default.yellow("WARNING") : chalk27__default.default.red("ERROR");
|
|
23810
23813
|
message += `${icon} ${check.name.padEnd(20)} ${status}`;
|
|
23811
23814
|
if (detailed) {
|
|
23812
|
-
message +=
|
|
23815
|
+
message += chalk27__default.default.gray(` (${check.latency}ms)`);
|
|
23813
23816
|
}
|
|
23814
23817
|
message += "\n";
|
|
23815
23818
|
}
|
|
@@ -23817,11 +23820,11 @@ var init_SystemHandlers = __esm({
|
|
|
23817
23820
|
const hasErrors = checks.some((c) => c.status === "error");
|
|
23818
23821
|
message += "\n";
|
|
23819
23822
|
if (hasErrors) {
|
|
23820
|
-
message +=
|
|
23823
|
+
message += chalk27__default.default.red("\u26A0\uFE0F System has errors - intervention required");
|
|
23821
23824
|
} else if (hasWarnings) {
|
|
23822
|
-
message +=
|
|
23825
|
+
message += chalk27__default.default.yellow("\u26A0\uFE0F System operational with warnings");
|
|
23823
23826
|
} else {
|
|
23824
|
-
message +=
|
|
23827
|
+
message += chalk27__default.default.green("\u2705 All systems operational");
|
|
23825
23828
|
}
|
|
23826
23829
|
return {
|
|
23827
23830
|
ok: true,
|
|
@@ -23839,12 +23842,12 @@ var init_SystemHandlers = __esm({
|
|
|
23839
23842
|
if (signal?.aborted) {
|
|
23840
23843
|
return {
|
|
23841
23844
|
ok: false,
|
|
23842
|
-
message:
|
|
23845
|
+
message: chalk27__default.default.yellow("Doctor check canceled")
|
|
23843
23846
|
};
|
|
23844
23847
|
}
|
|
23845
23848
|
const autoFix = args2.includes("--fix");
|
|
23846
|
-
let message =
|
|
23847
|
-
message +=
|
|
23849
|
+
let message = chalk27__default.default.cyan.bold("\u{1F468}\u2695\uFE0F System Doctor\n\n");
|
|
23850
|
+
message += chalk27__default.default.gray("Running diagnostics...\n\n");
|
|
23848
23851
|
const issues = [
|
|
23849
23852
|
{
|
|
23850
23853
|
severity: "warning",
|
|
@@ -23866,20 +23869,20 @@ var init_SystemHandlers = __esm({
|
|
|
23866
23869
|
}
|
|
23867
23870
|
];
|
|
23868
23871
|
if (issues.length === 0) {
|
|
23869
|
-
message +=
|
|
23872
|
+
message += chalk27__default.default.green("\u2705 No issues found - system is healthy!");
|
|
23870
23873
|
return { ok: true, message };
|
|
23871
23874
|
}
|
|
23872
|
-
message +=
|
|
23875
|
+
message += chalk27__default.default.yellow(`Found ${issues.length} issue(s):
|
|
23873
23876
|
|
|
23874
23877
|
`);
|
|
23875
23878
|
for (const issue of issues) {
|
|
23876
|
-
const icon = issue.severity === "error" ?
|
|
23879
|
+
const icon = issue.severity === "error" ? chalk27__default.default.red("\u274C") : issue.severity === "warning" ? chalk27__default.default.yellow("\u26A0\uFE0F") : chalk27__default.default.blue("\u2139\uFE0F");
|
|
23877
23880
|
message += `${icon} ${issue.issue}
|
|
23878
23881
|
`;
|
|
23879
|
-
message +=
|
|
23882
|
+
message += chalk27__default.default.gray(` Solution: ${issue.solution}
|
|
23880
23883
|
`);
|
|
23881
23884
|
if (autoFix && issue.fixable) {
|
|
23882
|
-
message +=
|
|
23885
|
+
message += chalk27__default.default.green(` \u2705 Auto-fixed
|
|
23883
23886
|
`);
|
|
23884
23887
|
}
|
|
23885
23888
|
message += "\n";
|
|
@@ -23887,7 +23890,7 @@ var init_SystemHandlers = __esm({
|
|
|
23887
23890
|
if (!autoFix) {
|
|
23888
23891
|
const fixableCount = issues.filter((i2) => i2.fixable).length;
|
|
23889
23892
|
if (fixableCount > 0) {
|
|
23890
|
-
message +=
|
|
23893
|
+
message += chalk27__default.default.gray(
|
|
23891
23894
|
`
|
|
23892
23895
|
Run /doctor --fix to automatically fix ${fixableCount} issue(s)`
|
|
23893
23896
|
);
|
|
@@ -24329,8 +24332,8 @@ var require_package = __commonJS({
|
|
|
24329
24332
|
"package.json"(exports, module) {
|
|
24330
24333
|
module.exports = {
|
|
24331
24334
|
name: "@bonginkan/maria",
|
|
24332
|
-
version: "4.2.
|
|
24333
|
-
description: "\u{1F680} MARIA v4.2.
|
|
24335
|
+
version: "4.2.30",
|
|
24336
|
+
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.",
|
|
24334
24337
|
keywords: [
|
|
24335
24338
|
"ai",
|
|
24336
24339
|
"cli",
|
|
@@ -24895,7 +24898,7 @@ var init_animations = __esm({
|
|
|
24895
24898
|
start() {
|
|
24896
24899
|
this.interval = setInterval(() => {
|
|
24897
24900
|
process.stdout.write(
|
|
24898
|
-
`\r${
|
|
24901
|
+
`\r${chalk27__default.default.cyan(this.frames[this.currentFrame])} ${chalk27__default.default.gray(this.message)}...`
|
|
24899
24902
|
);
|
|
24900
24903
|
this.currentFrame = (this.currentFrame + 1) % this.frames.length;
|
|
24901
24904
|
}, 80);
|
|
@@ -24933,7 +24936,7 @@ var init_animations = __esm({
|
|
|
24933
24936
|
const elapsed = Math.floor((Date.now() - this.startTime) / 1e3);
|
|
24934
24937
|
const stage = this.stages[this.currentStage];
|
|
24935
24938
|
process.stdout.write(
|
|
24936
|
-
`\r${
|
|
24939
|
+
`\r${chalk27__default.default.cyan(this.spinnerFrames[this.currentFrame])} ${stage.icon} ${chalk27__default.default.gray(stage.message)}... ${chalk27__default.default.dim(`[${elapsed}s]`)}`
|
|
24937
24940
|
);
|
|
24938
24941
|
this.currentFrame = (this.currentFrame + 1) % this.spinnerFrames.length;
|
|
24939
24942
|
}, 80);
|
|
@@ -24995,11 +24998,11 @@ var init_animations = __esm({
|
|
|
24995
24998
|
const stage = stages[this.currentStage];
|
|
24996
24999
|
if (this.isComplex) {
|
|
24997
25000
|
process.stdout.write(
|
|
24998
|
-
`\r${
|
|
25001
|
+
`\r${chalk27__default.default.cyan(this.spinnerFrames[this.currentFrame])} ${stage} ${chalk27__default.default.dim(`[${elapsed}s]`)}`
|
|
24999
25002
|
);
|
|
25000
25003
|
} else {
|
|
25001
25004
|
process.stdout.write(
|
|
25002
|
-
`\r${
|
|
25005
|
+
`\r${chalk27__default.default.cyan(this.spinnerFrames[this.currentFrame])} ${chalk27__default.default.gray(stage)}...`
|
|
25003
25006
|
);
|
|
25004
25007
|
}
|
|
25005
25008
|
this.currentFrame = (this.currentFrame + 1) % this.spinnerFrames.length;
|
|
@@ -25042,7 +25045,7 @@ var init_animations = __esm({
|
|
|
25042
25045
|
start() {
|
|
25043
25046
|
this.interval = setInterval(() => {
|
|
25044
25047
|
process.stdout.write(
|
|
25045
|
-
`\r${
|
|
25048
|
+
`\r${chalk27__default.default.cyan(this.message)}${this.dots[this.currentDot]}`
|
|
25046
25049
|
);
|
|
25047
25050
|
this.currentDot = (this.currentDot + 1) % this.dots.length;
|
|
25048
25051
|
}, 300);
|
|
@@ -25071,7 +25074,7 @@ var init_animations = __esm({
|
|
|
25071
25074
|
const frame = this.frames[this.currentFrame];
|
|
25072
25075
|
const message = this.messages[this.currentFrame];
|
|
25073
25076
|
process.stdout.write(
|
|
25074
|
-
`\r${frame} ${
|
|
25077
|
+
`\r${frame} ${chalk27__default.default.cyan(message)}...`
|
|
25075
25078
|
);
|
|
25076
25079
|
this.currentFrame = (this.currentFrame + 1) % this.frames.length;
|
|
25077
25080
|
}, 1e3);
|
|
@@ -25099,7 +25102,7 @@ var init_animations = __esm({
|
|
|
25099
25102
|
const percentage = Math.floor(this.current / this.total * 100);
|
|
25100
25103
|
const filled = Math.floor(this.current / this.total * this.width);
|
|
25101
25104
|
const empty = this.width - filled;
|
|
25102
|
-
const bar =
|
|
25105
|
+
const bar = chalk27__default.default.green("\u2588").repeat(filled) + chalk27__default.default.gray("\u2591").repeat(empty);
|
|
25103
25106
|
process.stdout.write(`\r${this.label}: [${bar}] ${percentage}%`);
|
|
25104
25107
|
if (this.current >= this.total) {
|
|
25105
25108
|
process.stdout.write("\n");
|
|
@@ -26536,7 +26539,7 @@ var init_AuthenticationManager = __esm({
|
|
|
26536
26539
|
const response2 = await fetch(`${this.apiBase}/api/user/profile`, {
|
|
26537
26540
|
headers: {
|
|
26538
26541
|
"Authorization": `Bearer ${tokens.accessToken}`,
|
|
26539
|
-
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.2.
|
|
26542
|
+
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.2.30"}`
|
|
26540
26543
|
}
|
|
26541
26544
|
});
|
|
26542
26545
|
if (response2.status === 401) {
|
|
@@ -27079,7 +27082,7 @@ function withAuth(fn) {
|
|
|
27079
27082
|
try {
|
|
27080
27083
|
const tokens = await authManager.getValidTokens();
|
|
27081
27084
|
if (!tokens) {
|
|
27082
|
-
console.log(
|
|
27085
|
+
console.log(chalk27__default.default.red("\u{1F510} Authentication required \xB7 Run: maria /login"));
|
|
27083
27086
|
if (!testMode) process.exit(AUTH_EXIT_CODES.AUTH_REQUIRED);
|
|
27084
27087
|
return { success: false, message: "AUTH_REQUIRED" };
|
|
27085
27088
|
}
|
|
@@ -27089,33 +27092,33 @@ function withAuth(fn) {
|
|
|
27089
27092
|
return await fn(...args2);
|
|
27090
27093
|
} catch (error2) {
|
|
27091
27094
|
if (error2.code === "AUTH_REQUIRED") {
|
|
27092
|
-
console.log(
|
|
27095
|
+
console.log(chalk27__default.default.red("\u{1F510} Authentication required \xB7 Run: maria /login"));
|
|
27093
27096
|
if (!testMode) process.exit(AUTH_EXIT_CODES.AUTH_REQUIRED);
|
|
27094
27097
|
return { success: false, message: "AUTH_REQUIRED" };
|
|
27095
27098
|
}
|
|
27096
27099
|
if (error2.code === "REAUTH_REQUIRED" || error2.code === "TOKEN_EXPIRED") {
|
|
27097
|
-
console.log(
|
|
27100
|
+
console.log(chalk27__default.default.yellow("\u{1F504} Please re-authenticate \xB7 Run: maria /login"));
|
|
27098
27101
|
if (!testMode) process.exit(AUTH_EXIT_CODES.REAUTH_REQUIRED);
|
|
27099
27102
|
return { success: false, message: "REAUTH_REQUIRED" };
|
|
27100
27103
|
}
|
|
27101
27104
|
if (error2.code === "QUOTA_EXCEEDED") {
|
|
27102
|
-
console.log(
|
|
27105
|
+
console.log(chalk27__default.default.yellow("\u26A0 Quota exceeded \xB7 Run: maria /billing"));
|
|
27103
27106
|
if (!testMode) process.exit(AUTH_EXIT_CODES.QUOTA_EXCEEDED);
|
|
27104
27107
|
return { success: false, message: "QUOTA_EXCEEDED" };
|
|
27105
27108
|
}
|
|
27106
27109
|
if (error2.code === "PLAN_RESTRICTED") {
|
|
27107
|
-
console.log(
|
|
27110
|
+
console.log(chalk27__default.default.yellow("\u{1F512} Not available in current plan"));
|
|
27108
27111
|
if (!testMode) process.exit(AUTH_EXIT_CODES.PLAN_RESTRICTED);
|
|
27109
27112
|
return { success: false, message: "PLAN_RESTRICTED" };
|
|
27110
27113
|
}
|
|
27111
27114
|
if (error2.code === "RATE_LIMITED") {
|
|
27112
27115
|
const retryAfter = error2.retryAfter || 5;
|
|
27113
|
-
console.log(
|
|
27116
|
+
console.log(chalk27__default.default.yellow(`\u23F1\uFE0F Rate limit: wait ${retryAfter}s`));
|
|
27114
27117
|
if (!testMode) process.exit(AUTH_EXIT_CODES.RATE_LIMITED);
|
|
27115
27118
|
return { success: false, message: "RATE_LIMITED" };
|
|
27116
27119
|
}
|
|
27117
27120
|
if (error2.code === "NETWORK_ERROR") {
|
|
27118
|
-
console.log(
|
|
27121
|
+
console.log(chalk27__default.default.red("\u{1F310} Network error, check connection"));
|
|
27119
27122
|
if (!testMode) process.exit(AUTH_EXIT_CODES.NETWORK_ERROR);
|
|
27120
27123
|
return { success: false, message: "NETWORK_ERROR" };
|
|
27121
27124
|
}
|
|
@@ -28914,8 +28917,6 @@ var init_continuation = __esm({
|
|
|
28914
28917
|
init_common();
|
|
28915
28918
|
}
|
|
28916
28919
|
});
|
|
28917
|
-
|
|
28918
|
-
// src/services/ai-response/responders/question.ts
|
|
28919
28920
|
function buildQuestionResponse(options2) {
|
|
28920
28921
|
const { question, topics = [], includeExample = true } = options2;
|
|
28921
28922
|
const isJapanese = false;
|
|
@@ -28972,7 +28973,8 @@ function buildQuestionResponse(options2) {
|
|
|
28972
28973
|
parts.push(
|
|
28973
28974
|
"Choose a number for details or ask a follow-up question."
|
|
28974
28975
|
);
|
|
28975
|
-
|
|
28976
|
+
const output3 = parts.join("\n");
|
|
28977
|
+
return chalk27__default.default.green(output3);
|
|
28976
28978
|
}
|
|
28977
28979
|
function generateQuickAnswer(question, isJapanese, topics) {
|
|
28978
28980
|
const lowerQuestion = question.toLowerCase();
|
|
@@ -29257,7 +29259,7 @@ var init_ai_response_service = __esm({
|
|
|
29257
29259
|
*/
|
|
29258
29260
|
async callLLM(prompt, opts = {}) {
|
|
29259
29261
|
const {
|
|
29260
|
-
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.",
|
|
29262
|
+
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.",
|
|
29261
29263
|
model = DEFAULT_MODEL2,
|
|
29262
29264
|
provider = DEFAULT_PROVIDER2,
|
|
29263
29265
|
temperature = 0.2,
|
|
@@ -31100,9 +31102,9 @@ var init_HelpCommand = __esm({
|
|
|
31100
31102
|
const stats = await this.readyService.getStatistics();
|
|
31101
31103
|
const lines = [];
|
|
31102
31104
|
lines.push("\u2550".repeat(60));
|
|
31103
|
-
lines.push(
|
|
31105
|
+
lines.push(chalk27__default.default.bold(`${stats.totalReady} READY Commands | ${stats.categoriesCount} Categories`));
|
|
31104
31106
|
lines.push("");
|
|
31105
|
-
lines.push(
|
|
31107
|
+
lines.push(chalk27__default.default.bold("Quick Access:"));
|
|
31106
31108
|
lines.push(" /help <command> - Detailed help for specific command");
|
|
31107
31109
|
lines.push(" /help --quickstart - Essential commands for new users");
|
|
31108
31110
|
lines.push(" /help --stats - Performance statistics");
|
|
@@ -31117,7 +31119,7 @@ var init_HelpCommand = __esm({
|
|
|
31117
31119
|
}
|
|
31118
31120
|
globalMaxNameLength = Math.max(globalMaxNameLength, 18) + 1;
|
|
31119
31121
|
for (const category of categories2) {
|
|
31120
|
-
lines.push(
|
|
31122
|
+
lines.push(chalk27__default.default.bold(`${category.name.toUpperCase()} (${category.count})`));
|
|
31121
31123
|
const showCommands = category.commands.slice(0, 4);
|
|
31122
31124
|
for (const cmd of showCommands) {
|
|
31123
31125
|
const needsGpu = this.hasGpuRequirement(cmd.description);
|
|
@@ -31137,7 +31139,7 @@ var init_HelpCommand = __esm({
|
|
|
31137
31139
|
}
|
|
31138
31140
|
lines.push("");
|
|
31139
31141
|
}
|
|
31140
|
-
lines.push(
|
|
31142
|
+
lines.push(chalk27__default.default.bold("Pro Tips:"));
|
|
31141
31143
|
lines.push(" \u2022 All listed commands are production-ready");
|
|
31142
31144
|
lines.push(" \u2022 Use fuzzy search: /help --search config \u2192 finds /config");
|
|
31143
31145
|
lines.push(" \u2022 Categories ordered by importance");
|
|
@@ -31176,33 +31178,33 @@ var init_HelpCommand = __esm({
|
|
|
31176
31178
|
formatCommandHelp(command) {
|
|
31177
31179
|
const lines = [];
|
|
31178
31180
|
lines.push("");
|
|
31179
|
-
lines.push(`\u{1F4D6} ${
|
|
31181
|
+
lines.push(`\u{1F4D6} ${chalk27__default.default.bold(`/${command.name}`)} - ${command.description}`);
|
|
31180
31182
|
lines.push("\u2550".repeat(50));
|
|
31181
31183
|
lines.push("");
|
|
31182
|
-
lines.push(
|
|
31184
|
+
lines.push(chalk27__default.default.bold("\u2139\uFE0F Information:"));
|
|
31183
31185
|
lines.push(` Category: ${this.readyService["getCategoryEmoji"](command.category)} ${command.category}`);
|
|
31184
31186
|
lines.push(` Status: \u2705 READY (contract validated)`);
|
|
31185
31187
|
if (command.aliases && command.aliases.length > 0) {
|
|
31186
31188
|
lines.push(` Aliases: ${command.aliases.map((a2) => `/${a2}`).join(", ")}`);
|
|
31187
31189
|
}
|
|
31188
31190
|
lines.push("");
|
|
31189
|
-
lines.push(
|
|
31191
|
+
lines.push(chalk27__default.default.bold("\u{1F3AF} Usage:"));
|
|
31190
31192
|
lines.push(` ${command.usage}`);
|
|
31191
31193
|
lines.push("");
|
|
31192
|
-
lines.push(
|
|
31194
|
+
lines.push(chalk27__default.default.bold("\u{1F4CB} Contract Validation:"));
|
|
31193
31195
|
lines.push(` \u26A1 Performance: ${command.contract.maxResponseTime}ms (tested)`);
|
|
31194
31196
|
lines.push(` \u{1F4BB} TTY Mode: ${command.contract.tty ? "\u2705 Supported" : "\u274C Not supported"}`);
|
|
31195
31197
|
lines.push(` \u{1F527} Non-TTY Mode: ${command.contract.nonTty ? "\u2705 Supported" : "\u274C Not supported"}`);
|
|
31196
31198
|
lines.push(` \u{1F500} Pipe Mode: ${command.contract.pipe ? "\u2705 Supported" : "\u274C Not supported"}`);
|
|
31197
31199
|
lines.push("");
|
|
31198
31200
|
if (command.examples && command.examples.length > 0) {
|
|
31199
|
-
lines.push(
|
|
31201
|
+
lines.push(chalk27__default.default.bold("\u{1F4DD} Examples:"));
|
|
31200
31202
|
for (const example of command.examples) {
|
|
31201
31203
|
lines.push(` ${example}`);
|
|
31202
31204
|
}
|
|
31203
31205
|
lines.push("");
|
|
31204
31206
|
}
|
|
31205
|
-
lines.push(
|
|
31207
|
+
lines.push(chalk27__default.default.bold("\u{1F4A1} Quick Tips:"));
|
|
31206
31208
|
lines.push(` \u2022 This command is production-ready and fully tested`);
|
|
31207
31209
|
lines.push(` \u2022 Try /${command.name} --help for additional options`);
|
|
31208
31210
|
if (command.category !== "core") {
|
|
@@ -31253,7 +31255,7 @@ var init_HelpCommand = __esm({
|
|
|
31253
31255
|
};
|
|
31254
31256
|
const emoji = emojiMap[categoryName.toLowerCase()] || "\u{1F4CB}";
|
|
31255
31257
|
lines.push("");
|
|
31256
|
-
lines.push(`${emoji} ${
|
|
31258
|
+
lines.push(`${emoji} ${chalk27__default.default.bold(categoryName.toUpperCase() + " COMMANDS")} (${commands.length} READY)`);
|
|
31257
31259
|
lines.push("\u2550".repeat(50));
|
|
31258
31260
|
lines.push("");
|
|
31259
31261
|
const maxNameLength = Math.max(...commands.map((c) => c.name.length)) + 1;
|
|
@@ -31287,7 +31289,7 @@ var init_HelpCommand = __esm({
|
|
|
31287
31289
|
formatSearchResults(searchTerm, results) {
|
|
31288
31290
|
const lines = [];
|
|
31289
31291
|
lines.push("");
|
|
31290
|
-
lines.push(`\u{1F50D} ${
|
|
31292
|
+
lines.push(`\u{1F50D} ${chalk27__default.default.bold("SEARCH RESULTS")} for "${searchTerm}" (${results.length} matches)`);
|
|
31291
31293
|
lines.push("\u2550".repeat(50));
|
|
31292
31294
|
lines.push("");
|
|
31293
31295
|
for (const result2 of results) {
|
|
@@ -31300,7 +31302,7 @@ var init_HelpCommand = __esm({
|
|
|
31300
31302
|
}
|
|
31301
31303
|
lines.push("");
|
|
31302
31304
|
}
|
|
31303
|
-
lines.push(
|
|
31305
|
+
lines.push(chalk27__default.default.bold("\u{1F4A1} Tip:") + " Higher scores indicate better matches");
|
|
31304
31306
|
lines.push("");
|
|
31305
31307
|
return lines.join("\n");
|
|
31306
31308
|
}
|
|
@@ -31311,38 +31313,38 @@ var init_HelpCommand = __esm({
|
|
|
31311
31313
|
const quickCommands = await this.readyService.getQuickStartCommands();
|
|
31312
31314
|
const lines = [];
|
|
31313
31315
|
lines.push("");
|
|
31314
|
-
lines.push(`\u{1F680} ${
|
|
31316
|
+
lines.push(`\u{1F680} ${chalk27__default.default.bold("MARIA QUICKSTART")} - Essential Commands`);
|
|
31315
31317
|
lines.push("\u2550".repeat(50));
|
|
31316
31318
|
lines.push("");
|
|
31317
|
-
lines.push(
|
|
31319
|
+
lines.push(chalk27__default.default.bold("\u{1F3AF} Get Started in 3 Steps:"));
|
|
31318
31320
|
lines.push("");
|
|
31319
|
-
lines.push(
|
|
31321
|
+
lines.push(chalk27__default.default.bold("1\uFE0F\u20E3 Configure Your AI Provider"));
|
|
31320
31322
|
const modelCmd = quickCommands.find((c) => c.name === "model");
|
|
31321
31323
|
if (modelCmd) {
|
|
31322
31324
|
lines.push(` /${modelCmd.name} - ${modelCmd.description}`);
|
|
31323
31325
|
lines.push(` Try: /model set provider=openai key=sk-...`);
|
|
31324
31326
|
}
|
|
31325
31327
|
lines.push("");
|
|
31326
|
-
lines.push(
|
|
31328
|
+
lines.push(chalk27__default.default.bold("2\uFE0F\u20E3 Check System Status"));
|
|
31327
31329
|
const statusCmd = quickCommands.find((c) => c.name === "status");
|
|
31328
31330
|
if (statusCmd) {
|
|
31329
31331
|
lines.push(` /${statusCmd.name} - ${statusCmd.description}`);
|
|
31330
31332
|
lines.push(` Try: /status`);
|
|
31331
31333
|
}
|
|
31332
31334
|
lines.push("");
|
|
31333
|
-
lines.push(
|
|
31335
|
+
lines.push(chalk27__default.default.bold("3\uFE0F\u20E3 Start Coding"));
|
|
31334
31336
|
const codeCmd = quickCommands.find((c) => c.name === "code");
|
|
31335
31337
|
if (codeCmd) {
|
|
31336
31338
|
lines.push(` /${codeCmd.name} - ${codeCmd.description}`);
|
|
31337
31339
|
lines.push(` Try: /code create a hello world function`);
|
|
31338
31340
|
}
|
|
31339
31341
|
lines.push("");
|
|
31340
|
-
lines.push(
|
|
31342
|
+
lines.push(chalk27__default.default.bold("\u{1F527} Essential Commands:"));
|
|
31341
31343
|
for (const cmd of quickCommands) {
|
|
31342
31344
|
lines.push(` /${cmd.name.padEnd(12)} - ${cmd.description}`);
|
|
31343
31345
|
}
|
|
31344
31346
|
lines.push("");
|
|
31345
|
-
lines.push(
|
|
31347
|
+
lines.push(chalk27__default.default.bold("\u{1F4A1} Next Steps:"));
|
|
31346
31348
|
lines.push(" \u2022 /help --category <name> - Explore command categories");
|
|
31347
31349
|
lines.push(" \u2022 /help --search <term> - Find specific functionality");
|
|
31348
31350
|
lines.push(" \u2022 /help <command> - Get detailed command help");
|
|
@@ -31357,20 +31359,20 @@ var init_HelpCommand = __esm({
|
|
|
31357
31359
|
const categories2 = await this.readyService.getCategories();
|
|
31358
31360
|
const lines = [];
|
|
31359
31361
|
lines.push("");
|
|
31360
|
-
lines.push(`\u{1F4CA} ${
|
|
31362
|
+
lines.push(`\u{1F4CA} ${chalk27__default.default.bold("READY COMMANDS STATISTICS")}`);
|
|
31361
31363
|
lines.push("\u2550".repeat(40));
|
|
31362
31364
|
lines.push("");
|
|
31363
|
-
lines.push(
|
|
31365
|
+
lines.push(chalk27__default.default.bold("\u{1F3AF} Overall:"));
|
|
31364
31366
|
lines.push(` Total READY Commands: ${stats.totalReady}`);
|
|
31365
31367
|
lines.push(` Categories: ${stats.categoriesCount}`);
|
|
31366
31368
|
lines.push(` Last Updated: ${stats.lastUpdated?.toLocaleString() || "Unknown"}`);
|
|
31367
31369
|
lines.push("");
|
|
31368
|
-
lines.push(
|
|
31370
|
+
lines.push(chalk27__default.default.bold("\u26A1 Performance:"));
|
|
31369
31371
|
lines.push(` Average Response Time: ${stats.avgResponseTime}ms`);
|
|
31370
31372
|
lines.push(` Fastest Command: /${stats.fastestCommand}`);
|
|
31371
31373
|
lines.push(` Slowest Command: /${stats.slowestCommand}`);
|
|
31372
31374
|
lines.push("");
|
|
31373
|
-
lines.push(
|
|
31375
|
+
lines.push(chalk27__default.default.bold("\u{1F4CB} By Category:"));
|
|
31374
31376
|
for (const category of categories2) {
|
|
31375
31377
|
const avgTime = Math.round(
|
|
31376
31378
|
category.commands.reduce((sum, cmd) => sum + cmd.contract.maxResponseTime, 0) / category.commands.length
|
|
@@ -31378,7 +31380,7 @@ var init_HelpCommand = __esm({
|
|
|
31378
31380
|
lines.push(` ${category.emoji} ${category.name.padEnd(15)}: ${category.count.toString().padStart(2)} commands (${avgTime}ms avg)`);
|
|
31379
31381
|
}
|
|
31380
31382
|
lines.push("");
|
|
31381
|
-
lines.push(
|
|
31383
|
+
lines.push(chalk27__default.default.bold("\u2705 Contract Validation:"));
|
|
31382
31384
|
lines.push(" All commands tested for:");
|
|
31383
31385
|
lines.push(" \u2022 Basic execution without crashes");
|
|
31384
31386
|
lines.push(" \u2022 TTY/non-TTY/pipe compatibility");
|
|
@@ -31441,7 +31443,7 @@ var init_VersionCommand = __esm({
|
|
|
31441
31443
|
if (context2.apiVersion) {
|
|
31442
31444
|
apiBuild = ` \xB7 API: ${context2.apiVersion}`;
|
|
31443
31445
|
}
|
|
31444
|
-
const output3 = `${
|
|
31446
|
+
const output3 = `${chalk27__default.default.bold("MARIA")} v${version}${apiBuild} \xB7 Node: ${process.version}`;
|
|
31445
31447
|
await trackCommand({
|
|
31446
31448
|
cmd: "version",
|
|
31447
31449
|
status: "success",
|
|
@@ -31458,7 +31460,7 @@ var init_VersionCommand = __esm({
|
|
|
31458
31460
|
plan: getUserPlan(),
|
|
31459
31461
|
quotaLeft: context2.quotaLeft || 999
|
|
31460
31462
|
});
|
|
31461
|
-
return this.success(`${
|
|
31463
|
+
return this.success(`${chalk27__default.default.bold("MARIA")} v${getVersion()}`);
|
|
31462
31464
|
}
|
|
31463
31465
|
}
|
|
31464
31466
|
};
|
|
@@ -31908,7 +31910,7 @@ var init_setup_command = __esm({
|
|
|
31908
31910
|
errors: [],
|
|
31909
31911
|
warnings: []
|
|
31910
31912
|
});
|
|
31911
|
-
const message =
|
|
31913
|
+
const message = chalk27__default.default.green(
|
|
31912
31914
|
'\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"`'
|
|
31913
31915
|
);
|
|
31914
31916
|
return this.success(message);
|
|
@@ -32103,37 +32105,37 @@ Estimated time: 3-5 minutes
|
|
|
32103
32105
|
const providers = result2.providersConfigured.length > 0 ? result2.providersConfigured.join(", ") : "none";
|
|
32104
32106
|
const files = result2.filesGenerated.length > 0 ? result2.filesGenerated.join(", ") : "none";
|
|
32105
32107
|
lines.push("");
|
|
32106
|
-
lines.push(
|
|
32108
|
+
lines.push(chalk27__default.default.green.bold("\u{1F389} Setup Complete! Welcome to MARIA CODE!"));
|
|
32107
32109
|
lines.push("");
|
|
32108
|
-
lines.push(
|
|
32109
|
-
lines.push(
|
|
32110
|
+
lines.push(chalk27__default.default.white(`\u2022 Status: ${chalk27__default.default.green("success")}`));
|
|
32111
|
+
lines.push(chalk27__default.default.white(`\u2022 Duration: ${chalk27__default.default.cyan(`${durationSec}s`)}`));
|
|
32110
32112
|
lines.push(
|
|
32111
|
-
|
|
32112
|
-
`\u2022 Steps: ${
|
|
32113
|
+
chalk27__default.default.white(
|
|
32114
|
+
`\u2022 Steps: ${chalk27__default.default.cyan(
|
|
32113
32115
|
result2.stepsCompleted.map((s2) => s2.replace(/^_/, "")).join(", ") || "none"
|
|
32114
32116
|
)}`
|
|
32115
32117
|
)
|
|
32116
32118
|
);
|
|
32117
|
-
lines.push(
|
|
32118
|
-
lines.push(
|
|
32119
|
+
lines.push(chalk27__default.default.white(`\u2022 Providers: ${chalk27__default.default.cyan(providers)}`));
|
|
32120
|
+
lines.push(chalk27__default.default.white(`\u2022 Files: ${chalk27__default.default.cyan(files)}`));
|
|
32119
32121
|
if (result2.warnings.length > 0) {
|
|
32120
32122
|
lines.push(
|
|
32121
|
-
|
|
32123
|
+
chalk27__default.default.yellow(
|
|
32122
32124
|
`\u2022 Warnings: ${result2.warnings.map((w) => w.replace(/^_/, "")).join(", ")}`
|
|
32123
32125
|
)
|
|
32124
32126
|
);
|
|
32125
32127
|
}
|
|
32126
32128
|
if (result2.errors.length > 0) {
|
|
32127
|
-
lines.push(
|
|
32129
|
+
lines.push(chalk27__default.default.red(`\u2022 Errors: ${result2.errors.join(", ")}`));
|
|
32128
32130
|
}
|
|
32129
32131
|
lines.push("");
|
|
32130
|
-
lines.push(
|
|
32131
|
-
lines.push(
|
|
32132
|
-
lines.push(
|
|
32133
|
-
lines.push(
|
|
32134
|
-
lines.push(
|
|
32132
|
+
lines.push(chalk27__default.default.white("\u{1F680} Ready to start! Try:"));
|
|
32133
|
+
lines.push(chalk27__default.default.white(" - maria chat \xB7 Start interactive mode"));
|
|
32134
|
+
lines.push(chalk27__default.default.white(' - maria code "create a React component"'));
|
|
32135
|
+
lines.push(chalk27__default.default.white(" - maria test \xB7 Generate tests"));
|
|
32136
|
+
lines.push(chalk27__default.default.white(" - maria help \xB7 View all commands"));
|
|
32135
32137
|
lines.push("");
|
|
32136
|
-
lines.push(
|
|
32138
|
+
lines.push(chalk27__default.default.green(`Setup completed in ${durationSec}s \xB7 Happy coding! \u{1F680}`));
|
|
32137
32139
|
logger.info(lines.join("\n"));
|
|
32138
32140
|
}
|
|
32139
32141
|
/**
|
|
@@ -32145,23 +32147,23 @@ Estimated time: 3-5 minutes
|
|
|
32145
32147
|
const files = result2.filesGenerated.length > 0 ? result2.filesGenerated.join(", ") : "none";
|
|
32146
32148
|
const steps = result2.stepsCompleted.map((s2) => s2.replace(/^_/, "")).join(", ") || "none";
|
|
32147
32149
|
const lines = [];
|
|
32148
|
-
lines.push(
|
|
32150
|
+
lines.push(chalk27__default.default.green.bold("\u{1F389} Setup completed successfully!"));
|
|
32149
32151
|
lines.push("");
|
|
32150
|
-
lines.push(
|
|
32151
|
-
lines.push(
|
|
32152
|
-
lines.push(
|
|
32153
|
-
lines.push(
|
|
32154
|
-
lines.push(
|
|
32152
|
+
lines.push(chalk27__default.default.green(`\u2022 Status: success`));
|
|
32153
|
+
lines.push(chalk27__default.default.green(`\u2022 Duration: ${durationSec}s`));
|
|
32154
|
+
lines.push(chalk27__default.default.green(`\u2022 Steps: ${steps}`));
|
|
32155
|
+
lines.push(chalk27__default.default.green(`\u2022 Providers: ${providers}`));
|
|
32156
|
+
lines.push(chalk27__default.default.green(`\u2022 Files: ${files}`));
|
|
32155
32157
|
if (result2.warnings.length > 0) {
|
|
32156
|
-
lines.push(
|
|
32158
|
+
lines.push(chalk27__default.default.yellow(`\u2022 Warnings: ${result2.warnings.map((w) => w.replace(/^_/, "")).join(", ")}`));
|
|
32157
32159
|
}
|
|
32158
32160
|
if (result2.errors.length > 0) {
|
|
32159
|
-
lines.push(
|
|
32161
|
+
lines.push(chalk27__default.default.red(`\u2022 Errors: ${result2.errors.join(", ")}`));
|
|
32160
32162
|
}
|
|
32161
32163
|
if (nextSteps.length > 0) {
|
|
32162
32164
|
lines.push("");
|
|
32163
|
-
lines.push(
|
|
32164
|
-
nextSteps.forEach((s2) => lines.push(
|
|
32165
|
+
lines.push(chalk27__default.default.green("Next steps:"));
|
|
32166
|
+
nextSteps.forEach((s2) => lines.push(chalk27__default.default.green(` - ${s2}`)));
|
|
32165
32167
|
}
|
|
32166
32168
|
return lines.join("\n");
|
|
32167
32169
|
}
|
|
@@ -46623,7 +46625,7 @@ var init_clear_command = __esm({
|
|
|
46623
46625
|
plan: getUserPlan(),
|
|
46624
46626
|
quotaLeft: context2.quotaLeft || 999
|
|
46625
46627
|
});
|
|
46626
|
-
const message =
|
|
46628
|
+
const message = chalk27__default.default.green("\u2705 Cleared") + chalk27__default.default.gray(" \xB7 context reset");
|
|
46627
46629
|
return this.success(withQuotaFooter(message, context2.quotaLeft));
|
|
46628
46630
|
} catch (error2) {
|
|
46629
46631
|
await trackCommand({
|
|
@@ -46634,7 +46636,7 @@ var init_clear_command = __esm({
|
|
|
46634
46636
|
quotaLeft: context2.quotaLeft || 999
|
|
46635
46637
|
});
|
|
46636
46638
|
process.stdout.write("\x1B[2J\x1B[3J\x1B[H");
|
|
46637
|
-
return this.success(
|
|
46639
|
+
return this.success(chalk27__default.default.green("\u2705 Cleared"));
|
|
46638
46640
|
}
|
|
46639
46641
|
}
|
|
46640
46642
|
};
|
|
@@ -47666,18 +47668,18 @@ var init_WhoAmICommand = __esm({
|
|
|
47666
47668
|
});
|
|
47667
47669
|
}
|
|
47668
47670
|
const lines = [];
|
|
47669
|
-
lines.push(
|
|
47671
|
+
lines.push(chalk27__default.default.green("\u2705 Authenticated"));
|
|
47670
47672
|
if (user.name) {
|
|
47671
|
-
lines.push(
|
|
47673
|
+
lines.push(chalk27__default.default.white(`\u{1F464} Name: ${chalk27__default.default.cyan(user.name)}`));
|
|
47672
47674
|
}
|
|
47673
47675
|
if (user.email) {
|
|
47674
|
-
lines.push(
|
|
47676
|
+
lines.push(chalk27__default.default.white(`\u{1F4E7} Email: ${chalk27__default.default.cyan(user.email)}`));
|
|
47675
47677
|
}
|
|
47676
47678
|
if (user.provider) {
|
|
47677
|
-
lines.push(
|
|
47679
|
+
lines.push(chalk27__default.default.white(`\u{1F511} Provider: ${chalk27__default.default.cyan(user.provider)}`));
|
|
47678
47680
|
}
|
|
47679
47681
|
if (user.plan) {
|
|
47680
|
-
lines.push(
|
|
47682
|
+
lines.push(chalk27__default.default.white(`\u{1F48E} Plan: ${chalk27__default.default.cyan(user.plan)}`));
|
|
47681
47683
|
}
|
|
47682
47684
|
return this.success(lines.join("\n"), { authenticated: true, user });
|
|
47683
47685
|
}
|
|
@@ -47704,40 +47706,40 @@ var init_about_command = __esm({
|
|
|
47704
47706
|
async execute(args2, context2) {
|
|
47705
47707
|
const output3 = [];
|
|
47706
47708
|
output3.push("");
|
|
47707
|
-
output3.push(
|
|
47708
|
-
output3.push(
|
|
47709
|
+
output3.push(chalk27__default.default.cyan.bold("\u{1F916} About MARIA v4.2.30"));
|
|
47710
|
+
output3.push(chalk27__default.default.gray("\u2550".repeat(40)));
|
|
47709
47711
|
output3.push("");
|
|
47710
|
-
output3.push(
|
|
47712
|
+
output3.push(chalk27__default.default.white.bold("MARIA - Minimal API, Maximum Power"));
|
|
47711
47713
|
output3.push("");
|
|
47712
|
-
output3.push(
|
|
47714
|
+
output3.push(chalk27__default.default.white("\u{1F3AF} Revolutionary AI Development Platform:"));
|
|
47713
47715
|
output3.push(" \u2022 Natural Language Code Operations");
|
|
47714
47716
|
output3.push(" \u2022 Graph RAG Knowledge System");
|
|
47715
47717
|
output3.push(" \u2022 Dual Memory Architecture");
|
|
47716
47718
|
output3.push(" \u2022 Enterprise-Grade Security");
|
|
47717
47719
|
output3.push(" \u2022 Multimodal AI Generation");
|
|
47718
47720
|
output3.push("");
|
|
47719
|
-
output3.push(
|
|
47721
|
+
output3.push(chalk27__default.default.white("\u{1F31F} Key Features:"));
|
|
47720
47722
|
output3.push(" \u2022 /code - Natural language coding");
|
|
47721
47723
|
output3.push(" \u2022 68+ Slash Commands");
|
|
47722
47724
|
output3.push(" \u2022 8 AI Provider Support");
|
|
47723
47725
|
output3.push(" \u2022 Business Operations Suite");
|
|
47724
47726
|
output3.push(" \u2022 Real-time Streaming");
|
|
47725
47727
|
output3.push("");
|
|
47726
|
-
output3.push(
|
|
47728
|
+
output3.push(chalk27__default.default.white("\u{1F468}\u200D\u{1F4BB} Created by:"));
|
|
47727
47729
|
output3.push(" \u2022 Bonginkan Team");
|
|
47728
47730
|
output3.push(" \u2022 Enterprise AI Solutions");
|
|
47729
47731
|
output3.push("");
|
|
47730
|
-
output3.push(
|
|
47731
|
-
output3.push(
|
|
47732
|
-
output3.push(
|
|
47733
|
-
output3.push(
|
|
47734
|
-
output3.push(
|
|
47735
|
-
output3.push(
|
|
47732
|
+
output3.push(chalk27__default.default.white("\u{1F517} Links:"));
|
|
47733
|
+
output3.push(chalk27__default.default.blue(" Website: https://maria-code.ai"));
|
|
47734
|
+
output3.push(chalk27__default.default.blue(" Company: https://bonginkan.ai"));
|
|
47735
|
+
output3.push(chalk27__default.default.blue(" Discord: https://discord.gg/SMSmSGcEQy"));
|
|
47736
|
+
output3.push(chalk27__default.default.blue(" GitHub: https://github.com/bonginkan/maria"));
|
|
47737
|
+
output3.push(chalk27__default.default.blue(" NPM: https://www.npmjs.com/package/@bonginkan/maria"));
|
|
47736
47738
|
output3.push("");
|
|
47737
|
-
output3.push(
|
|
47738
|
-
output3.push(
|
|
47739
|
+
output3.push(chalk27__default.default.white("\u{1F4C4} License: MIT"));
|
|
47740
|
+
output3.push(chalk27__default.default.white("\u{1F3D7}\uFE0F Built with: TypeScript, Node.js, React"));
|
|
47739
47741
|
output3.push("");
|
|
47740
|
-
output3.push(
|
|
47742
|
+
output3.push(chalk27__default.default.green("Thank you for using MARIA! \u{1F680}"));
|
|
47741
47743
|
output3.push("");
|
|
47742
47744
|
return {
|
|
47743
47745
|
success: true,
|
|
@@ -49756,8 +49758,8 @@ var init_ConfigCLI = __esm({
|
|
|
49756
49758
|
// Default to interactive
|
|
49757
49759
|
});
|
|
49758
49760
|
if (options2.verbose) {
|
|
49759
|
-
console.log(
|
|
49760
|
-
console.log(
|
|
49761
|
+
console.log(chalk27__default.default.gray(`Executing: ${operation} ${args2.join(" ")}`));
|
|
49762
|
+
console.log(chalk27__default.default.gray(`Options: ${JSON.stringify(options2, null, 2)}`));
|
|
49761
49763
|
}
|
|
49762
49764
|
const result2 = await command.execute();
|
|
49763
49765
|
if (result2.endReason === "success") {
|
|
@@ -49783,10 +49785,10 @@ var init_ConfigCLI = __esm({
|
|
|
49783
49785
|
await this.displayPreview(data2.preview);
|
|
49784
49786
|
if (data2.dryRun) {
|
|
49785
49787
|
console.log(
|
|
49786
|
-
|
|
49788
|
+
chalk27__default.default.blue("\n\u{1F4CB} This was a dry run - no changes were applied.")
|
|
49787
49789
|
);
|
|
49788
49790
|
console.log(
|
|
49789
|
-
|
|
49791
|
+
chalk27__default.default.gray(
|
|
49790
49792
|
"To apply changes, run the same command without --dry-run"
|
|
49791
49793
|
)
|
|
49792
49794
|
);
|
|
@@ -49794,30 +49796,30 @@ var init_ConfigCLI = __esm({
|
|
|
49794
49796
|
}
|
|
49795
49797
|
}
|
|
49796
49798
|
if (data2.message) {
|
|
49797
|
-
console.log(
|
|
49799
|
+
console.log(chalk27__default.default.green(data2.message));
|
|
49798
49800
|
}
|
|
49799
49801
|
if (data2.key && data2.value !== void 0) {
|
|
49800
|
-
console.log(
|
|
49802
|
+
console.log(chalk27__default.default.green(`\u2705 Configuration updated:`));
|
|
49801
49803
|
console.log(
|
|
49802
|
-
` ${
|
|
49804
|
+
` ${chalk27__default.default.bold(data2.key)}: ${chalk27__default.default.cyan(this.formatValue(data2.value))}`
|
|
49803
49805
|
);
|
|
49804
49806
|
if (data2.layer) {
|
|
49805
|
-
console.log(` Layer: ${
|
|
49807
|
+
console.log(` Layer: ${chalk27__default.default.magenta(data2.layer)}`);
|
|
49806
49808
|
}
|
|
49807
49809
|
}
|
|
49808
49810
|
if (data2.deleted) {
|
|
49809
49811
|
console.log(
|
|
49810
|
-
|
|
49812
|
+
chalk27__default.default.green(`\u2705 Configuration deleted: ${chalk27__default.default.bold(data2.key)}`)
|
|
49811
49813
|
);
|
|
49812
49814
|
}
|
|
49813
49815
|
if (data2.templateId) {
|
|
49814
49816
|
console.log(
|
|
49815
|
-
|
|
49817
|
+
chalk27__default.default.green(`\u2705 Template applied: ${chalk27__default.default.bold(data2.templateId)}`)
|
|
49816
49818
|
);
|
|
49817
49819
|
}
|
|
49818
49820
|
if (data2.rolledBack) {
|
|
49819
49821
|
console.log(
|
|
49820
|
-
|
|
49822
|
+
chalk27__default.default.green(`\u2705 Rolled back to entry: ${chalk27__default.default.bold(data2.entryId)}`)
|
|
49821
49823
|
);
|
|
49822
49824
|
}
|
|
49823
49825
|
if (data2.layers) {
|
|
@@ -49832,62 +49834,62 @@ var init_ConfigCLI = __esm({
|
|
|
49832
49834
|
console.log(JSON.stringify({ error: error2 }, null, 2));
|
|
49833
49835
|
return;
|
|
49834
49836
|
}
|
|
49835
|
-
console.error(
|
|
49837
|
+
console.error(chalk27__default.default.red(`\u274C Error: ${error2}`));
|
|
49836
49838
|
if (error2.includes("not found")) {
|
|
49837
49839
|
console.log(
|
|
49838
|
-
|
|
49840
|
+
chalk27__default.default.gray("\nTry: /config list # to see available configurations")
|
|
49839
49841
|
);
|
|
49840
49842
|
}
|
|
49841
49843
|
if (error2.includes("required")) {
|
|
49842
|
-
console.log(
|
|
49844
|
+
console.log(chalk27__default.default.gray("\nTry: /config help # to see command syntax"));
|
|
49843
49845
|
}
|
|
49844
49846
|
}
|
|
49845
49847
|
async displayPreview(preview) {
|
|
49846
|
-
console.log(
|
|
49847
|
-
console.log(`${
|
|
49848
|
+
console.log(chalk27__default.default.bold.cyan("\n\u{1F50D} Configuration Preview\n"));
|
|
49849
|
+
console.log(`${chalk27__default.default.bold("Operation:")} ${chalk27__default.default.cyan(preview.operation)}`);
|
|
49848
49850
|
if (preview.key) {
|
|
49849
|
-
console.log(`${
|
|
49851
|
+
console.log(`${chalk27__default.default.bold("Key:")} ${chalk27__default.default.yellow(preview.key)}`);
|
|
49850
49852
|
}
|
|
49851
49853
|
if (preview.value !== void 0) {
|
|
49852
49854
|
console.log(
|
|
49853
|
-
`${
|
|
49855
|
+
`${chalk27__default.default.bold("Value:")} ${chalk27__default.default.green(this.formatValue(preview.value))}`
|
|
49854
49856
|
);
|
|
49855
49857
|
}
|
|
49856
49858
|
if (preview.changes.length > 0) {
|
|
49857
|
-
console.log(
|
|
49859
|
+
console.log(chalk27__default.default.bold("\n\u{1F4DD} Changes:"));
|
|
49858
49860
|
for (const change of preview.changes) {
|
|
49859
49861
|
this.displayChange(change);
|
|
49860
49862
|
}
|
|
49861
49863
|
}
|
|
49862
49864
|
if (preview.affected.length > 0) {
|
|
49863
|
-
console.log(
|
|
49865
|
+
console.log(chalk27__default.default.bold("\n\u{1F517} Affected Configurations:"));
|
|
49864
49866
|
for (const affected of preview.affected) {
|
|
49865
49867
|
this.displayAffectedConfig(affected);
|
|
49866
49868
|
}
|
|
49867
49869
|
}
|
|
49868
49870
|
if (preview.risks.length > 0) {
|
|
49869
|
-
console.log(
|
|
49871
|
+
console.log(chalk27__default.default.bold("\n\u26A0\uFE0F Safety Analysis:"));
|
|
49870
49872
|
for (const risk of preview.risks) {
|
|
49871
49873
|
this.displaySafetyRisk(risk);
|
|
49872
49874
|
}
|
|
49873
49875
|
}
|
|
49874
49876
|
if (!preview.validation.ok) {
|
|
49875
|
-
console.log(
|
|
49877
|
+
console.log(chalk27__default.default.bold.red("\n\u274C Validation Errors:"));
|
|
49876
49878
|
if (preview.validation.errors) {
|
|
49877
49879
|
for (const error2 of preview.validation.errors) {
|
|
49878
|
-
console.log(` \u2022 ${
|
|
49880
|
+
console.log(` \u2022 ${chalk27__default.default.red(error2)}`);
|
|
49879
49881
|
}
|
|
49880
49882
|
}
|
|
49881
49883
|
} else if (preview.validation.warnings && preview.validation.warnings.length > 0) {
|
|
49882
|
-
console.log(
|
|
49884
|
+
console.log(chalk27__default.default.bold.yellow("\n\u26A0\uFE0F Validation Warnings:"));
|
|
49883
49885
|
for (const warning of preview.validation.warnings) {
|
|
49884
|
-
console.log(` \u2022 ${
|
|
49886
|
+
console.log(` \u2022 ${chalk27__default.default.yellow(warning)}`);
|
|
49885
49887
|
}
|
|
49886
49888
|
}
|
|
49887
49889
|
if (preview.requiresConfirmation && !preview.validation.dryRun) {
|
|
49888
49890
|
const confirmed = await this.promptConfirmation();
|
|
49889
49891
|
if (!confirmed) {
|
|
49890
|
-
console.log(
|
|
49892
|
+
console.log(chalk27__default.default.yellow("\n\u274C Operation cancelled"));
|
|
49891
49893
|
process.exit(0);
|
|
49892
49894
|
}
|
|
49893
49895
|
}
|
|
@@ -49899,42 +49901,42 @@ var init_ConfigCLI = __esm({
|
|
|
49899
49901
|
delete: "\u{1F5D1}\uFE0F"
|
|
49900
49902
|
};
|
|
49901
49903
|
const typeColor = {
|
|
49902
|
-
add:
|
|
49903
|
-
modify:
|
|
49904
|
-
delete:
|
|
49904
|
+
add: chalk27__default.default.green,
|
|
49905
|
+
modify: chalk27__default.default.yellow,
|
|
49906
|
+
delete: chalk27__default.default.red
|
|
49905
49907
|
};
|
|
49906
49908
|
console.log(
|
|
49907
|
-
` ${typeIcon[change.type]} ${typeColor[change.type](change.type.toUpperCase())}: ${
|
|
49909
|
+
` ${typeIcon[change.type]} ${typeColor[change.type](change.type.toUpperCase())}: ${chalk27__default.default.bold(change.key)}`
|
|
49908
49910
|
);
|
|
49909
49911
|
if (change.oldValue !== void 0) {
|
|
49910
49912
|
console.log(
|
|
49911
|
-
` ${
|
|
49913
|
+
` ${chalk27__default.default.gray("Old:")} ${chalk27__default.default.gray(this.formatValue(change.oldValue))}`
|
|
49912
49914
|
);
|
|
49913
49915
|
}
|
|
49914
49916
|
if (change.newValue !== void 0) {
|
|
49915
49917
|
console.log(
|
|
49916
|
-
` ${
|
|
49918
|
+
` ${chalk27__default.default.gray("New:")} ${chalk27__default.default.cyan(this.formatValue(change.newValue))}`
|
|
49917
49919
|
);
|
|
49918
49920
|
}
|
|
49919
|
-
console.log(` ${
|
|
49920
|
-
console.log(` ${
|
|
49921
|
+
console.log(` ${chalk27__default.default.gray("Layer:")} ${chalk27__default.default.magenta(change.layer)}`);
|
|
49922
|
+
console.log(` ${chalk27__default.default.gray(change.description)}`);
|
|
49921
49923
|
console.log();
|
|
49922
49924
|
}
|
|
49923
49925
|
displayAffectedConfig(affected) {
|
|
49924
49926
|
const impactColor = {
|
|
49925
|
-
low:
|
|
49926
|
-
medium:
|
|
49927
|
-
high:
|
|
49928
|
-
critical:
|
|
49927
|
+
low: chalk27__default.default.gray,
|
|
49928
|
+
medium: chalk27__default.default.yellow,
|
|
49929
|
+
high: chalk27__default.default.red,
|
|
49930
|
+
critical: chalk27__default.default.red.bold
|
|
49929
49931
|
};
|
|
49930
49932
|
console.log(
|
|
49931
|
-
` \u2022 ${
|
|
49933
|
+
` \u2022 ${chalk27__default.default.bold(affected.key)} (${chalk27__default.default.magenta(affected.layer)})`
|
|
49932
49934
|
);
|
|
49933
49935
|
console.log(
|
|
49934
49936
|
` Impact: ${impactColor[affected.impact](affected.impact.toUpperCase())}`
|
|
49935
49937
|
);
|
|
49936
|
-
console.log(` Relationship: ${
|
|
49937
|
-
console.log(` ${
|
|
49938
|
+
console.log(` Relationship: ${chalk27__default.default.cyan(affected.relationship)}`);
|
|
49939
|
+
console.log(` ${chalk27__default.default.gray(affected.description)}`);
|
|
49938
49940
|
console.log();
|
|
49939
49941
|
}
|
|
49940
49942
|
displaySafetyRisk(risk) {
|
|
@@ -49945,78 +49947,78 @@ var init_ConfigCLI = __esm({
|
|
|
49945
49947
|
critical: "\u{1F6A8}"
|
|
49946
49948
|
};
|
|
49947
49949
|
const levelColor = {
|
|
49948
|
-
info:
|
|
49949
|
-
warning:
|
|
49950
|
-
error:
|
|
49951
|
-
critical:
|
|
49950
|
+
info: chalk27__default.default.blue,
|
|
49951
|
+
warning: chalk27__default.default.yellow,
|
|
49952
|
+
error: chalk27__default.default.red,
|
|
49953
|
+
critical: chalk27__default.default.red.bold
|
|
49952
49954
|
};
|
|
49953
49955
|
console.log(
|
|
49954
49956
|
` ${levelIcon[risk.level]} ${levelColor[risk.level](risk.level.toUpperCase())}: ${risk.message}`
|
|
49955
49957
|
);
|
|
49956
49958
|
if (risk.recommendation) {
|
|
49957
49959
|
console.log(
|
|
49958
|
-
` ${
|
|
49960
|
+
` ${chalk27__default.default.gray("Recommendation:")} ${risk.recommendation}`
|
|
49959
49961
|
);
|
|
49960
49962
|
}
|
|
49961
49963
|
if (risk.autoFixable) {
|
|
49962
|
-
console.log(` ${
|
|
49964
|
+
console.log(` ${chalk27__default.default.green("Auto-fixable: Yes")}`);
|
|
49963
49965
|
}
|
|
49964
49966
|
console.log();
|
|
49965
49967
|
}
|
|
49966
49968
|
displayLayeredConfig(data2) {
|
|
49967
|
-
console.log(
|
|
49969
|
+
console.log(chalk27__default.default.bold(`
|
|
49968
49970
|
\u{1F4CB} ${data2.key} Configuration
|
|
49969
49971
|
`));
|
|
49970
49972
|
console.log(
|
|
49971
|
-
`${
|
|
49973
|
+
`${chalk27__default.default.bold("Effective Value:")} ${chalk27__default.default.cyan(this.formatValue(data2.value))}`
|
|
49972
49974
|
);
|
|
49973
|
-
console.log(`${
|
|
49975
|
+
console.log(`${chalk27__default.default.bold("Source Layer:")} ${chalk27__default.default.magenta(data2.source)}`);
|
|
49974
49976
|
console.log(
|
|
49975
|
-
`${
|
|
49977
|
+
`${chalk27__default.default.bold("Merged:")} ${data2.merged ? chalk27__default.default.yellow("Yes") : chalk27__default.default.gray("No")}`
|
|
49976
49978
|
);
|
|
49977
49979
|
if (data2.layers) {
|
|
49978
|
-
console.log(
|
|
49980
|
+
console.log(chalk27__default.default.bold("\nLayer Values:"));
|
|
49979
49981
|
const layers = ["runtime", "project", "user", "global"];
|
|
49980
49982
|
for (const layer of layers) {
|
|
49981
49983
|
const value = data2.layers[layer];
|
|
49982
49984
|
if (value !== void 0) {
|
|
49983
49985
|
const isActive = layer === data2.source;
|
|
49984
|
-
const layerDisplay = isActive ?
|
|
49986
|
+
const layerDisplay = isActive ? chalk27__default.default.bold.magenta(`${layer} (active)`) : chalk27__default.default.gray(layer);
|
|
49985
49987
|
console.log(
|
|
49986
|
-
` ${layerDisplay}: ${
|
|
49988
|
+
` ${layerDisplay}: ${chalk27__default.default.cyan(this.formatValue(value))}`
|
|
49987
49989
|
);
|
|
49988
49990
|
}
|
|
49989
49991
|
}
|
|
49990
49992
|
}
|
|
49991
49993
|
}
|
|
49992
49994
|
displayConfigList(configs) {
|
|
49993
|
-
console.log(
|
|
49995
|
+
console.log(chalk27__default.default.bold("\n\u2699\uFE0F Configuration Settings\n"));
|
|
49994
49996
|
if (Object.keys(configs).length === 0) {
|
|
49995
|
-
console.log(
|
|
49997
|
+
console.log(chalk27__default.default.gray("No configurations found."));
|
|
49996
49998
|
return;
|
|
49997
49999
|
}
|
|
49998
50000
|
const categorized = this.categorizeConfigs(configs);
|
|
49999
50001
|
for (const [category, items] of Object.entries(categorized)) {
|
|
50000
50002
|
if (Object.keys(items).length === 0) continue;
|
|
50001
50003
|
console.log(
|
|
50002
|
-
|
|
50004
|
+
chalk27__default.default.bold.cyan(`${this.getCategoryIcon(category)} ${category}`)
|
|
50003
50005
|
);
|
|
50004
|
-
console.log(
|
|
50006
|
+
console.log(chalk27__default.default.gray("\u2500".repeat(category.length + 4)));
|
|
50005
50007
|
for (const [key2, value] of Object.entries(items)) {
|
|
50006
50008
|
console.log(
|
|
50007
|
-
` ${
|
|
50009
|
+
` ${chalk27__default.default.bold(key2)}: ${chalk27__default.default.cyan(this.formatValue(value))}`
|
|
50008
50010
|
);
|
|
50009
50011
|
}
|
|
50010
50012
|
console.log();
|
|
50011
50013
|
}
|
|
50012
50014
|
console.log(
|
|
50013
|
-
|
|
50015
|
+
chalk27__default.default.gray(`Total: ${Object.keys(configs).length} configuration(s)`)
|
|
50014
50016
|
);
|
|
50015
50017
|
}
|
|
50016
50018
|
async promptConfirmation() {
|
|
50017
50019
|
return new Promise((resolve8) => {
|
|
50018
50020
|
this.rl.question(
|
|
50019
|
-
|
|
50021
|
+
chalk27__default.default.bold("\nDo you want to proceed? [y/N]: "),
|
|
50020
50022
|
(answer) => {
|
|
50021
50023
|
resolve8(["y", "yes", "Y", "YES"].includes(answer.trim()));
|
|
50022
50024
|
}
|
|
@@ -50025,20 +50027,20 @@ var init_ConfigCLI = __esm({
|
|
|
50025
50027
|
}
|
|
50026
50028
|
formatValue(value) {
|
|
50027
50029
|
if (value === null || value === void 0) {
|
|
50028
|
-
return
|
|
50030
|
+
return chalk27__default.default.gray("null");
|
|
50029
50031
|
}
|
|
50030
50032
|
if (typeof value === "string") {
|
|
50031
50033
|
const isSensitive = this.isSensitiveValue(value);
|
|
50032
50034
|
if (isSensitive) {
|
|
50033
|
-
return
|
|
50035
|
+
return chalk27__default.default.gray("********");
|
|
50034
50036
|
}
|
|
50035
50037
|
return `"${value}"`;
|
|
50036
50038
|
}
|
|
50037
50039
|
if (typeof value === "boolean") {
|
|
50038
|
-
return value ?
|
|
50040
|
+
return value ? chalk27__default.default.green("true") : chalk27__default.default.red("false");
|
|
50039
50041
|
}
|
|
50040
50042
|
if (typeof value === "number") {
|
|
50041
|
-
return
|
|
50043
|
+
return chalk27__default.default.blue(value.toString());
|
|
50042
50044
|
}
|
|
50043
50045
|
if (Array.isArray(value)) {
|
|
50044
50046
|
return `[${value.map((v) => this.formatValue(v)).join(", ")}]`;
|
|
@@ -50867,8 +50869,8 @@ var init_api_caller = __esm({
|
|
|
50867
50869
|
});
|
|
50868
50870
|
function handleRateLimitError(error2) {
|
|
50869
50871
|
console.log();
|
|
50870
|
-
console.log(
|
|
50871
|
-
console.log(
|
|
50872
|
+
console.log(chalk27__default.default.yellow("\u23F1\uFE0F Rate Limit Exceeded"));
|
|
50873
|
+
console.log(chalk27__default.default.gray("\u2501".repeat(50)));
|
|
50872
50874
|
const route = error2.route || error2.details?.endpoint || "API";
|
|
50873
50875
|
const plan = error2.plan || error2.details?.plan || "Unknown";
|
|
50874
50876
|
const limit = error2.limit || (error2.details?.limit ? parseInt(error2.details.limit) : null);
|
|
@@ -50886,24 +50888,24 @@ function handleRateLimitError(error2) {
|
|
|
50886
50888
|
resetTime = `at ${resetDate.toLocaleTimeString()}`;
|
|
50887
50889
|
}
|
|
50888
50890
|
}
|
|
50889
|
-
console.log(
|
|
50890
|
-
console.log(
|
|
50891
|
+
console.log(chalk27__default.default.white(`Plan: ${chalk27__default.default.bold(plan)}`));
|
|
50892
|
+
console.log(chalk27__default.default.white(`Endpoint: ${chalk27__default.default.bold(route)}`));
|
|
50891
50893
|
if (limit !== null) {
|
|
50892
|
-
console.log(
|
|
50894
|
+
console.log(chalk27__default.default.white(`Limit: ${chalk27__default.default.bold(limit)} requests`));
|
|
50893
50895
|
}
|
|
50894
50896
|
if (error2.remaining !== void 0) {
|
|
50895
|
-
console.log(
|
|
50897
|
+
console.log(chalk27__default.default.white(`Remaining: ${chalk27__default.default.bold(error2.remaining)} requests`));
|
|
50896
50898
|
}
|
|
50897
50899
|
console.log();
|
|
50898
|
-
console.log(
|
|
50900
|
+
console.log(chalk27__default.default.cyan(`Please wait ${chalk27__default.default.bold(waitTime)} before trying again`));
|
|
50899
50901
|
if (resetTime) {
|
|
50900
|
-
console.log(
|
|
50902
|
+
console.log(chalk27__default.default.gray(`Rate limit resets ${resetTime}`));
|
|
50901
50903
|
}
|
|
50902
50904
|
if (error2.hint) {
|
|
50903
50905
|
console.log();
|
|
50904
|
-
console.log(
|
|
50906
|
+
console.log(chalk27__default.default.magenta("\u{1F4A1} " + error2.hint));
|
|
50905
50907
|
}
|
|
50906
|
-
console.log(
|
|
50908
|
+
console.log(chalk27__default.default.gray("\u2501".repeat(50)));
|
|
50907
50909
|
console.log();
|
|
50908
50910
|
}
|
|
50909
50911
|
async function parseRateLimitResponse(response2) {
|
|
@@ -55814,7 +55816,7 @@ var init_model_selector_ui = __esm({
|
|
|
55814
55816
|
output: process.stdout,
|
|
55815
55817
|
terminal: true
|
|
55816
55818
|
});
|
|
55817
|
-
console.log(
|
|
55819
|
+
console.log(chalk27__default.default.green(
|
|
55818
55820
|
"\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"
|
|
55819
55821
|
));
|
|
55820
55822
|
process.stdout.write("\x1B7");
|
|
@@ -55882,14 +55884,14 @@ var init_model_selector_ui = __esm({
|
|
|
55882
55884
|
}
|
|
55883
55885
|
renderFromSavedPosition() {
|
|
55884
55886
|
if (this.isDestroyed) return;
|
|
55885
|
-
console.log(
|
|
55886
|
-
"\u2502 " +
|
|
55887
|
+
console.log(chalk27__default.default.green(
|
|
55888
|
+
"\u2502 " + chalk27__default.default.greenBright("SELECT MODEL:") + " ".repeat(62) + "\u2502"
|
|
55887
55889
|
));
|
|
55888
55890
|
this.renderContent();
|
|
55889
55891
|
const scrollInfo = `[${this.selectedIndex + 1}/${this.models.length}]`;
|
|
55890
55892
|
const helpText = `\u2193:NEXT \u2191:PREV ENTER:EXEC ESC:ABORT ${scrollInfo}`;
|
|
55891
|
-
console.log(
|
|
55892
|
-
console.log(
|
|
55893
|
+
console.log(chalk27__default.default.green("\u2502 ") + chalk27__default.default.dim.green(helpText.padEnd(76)) + chalk27__default.default.green(" \u2502"));
|
|
55894
|
+
console.log(chalk27__default.default.green(
|
|
55893
55895
|
"\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"
|
|
55894
55896
|
));
|
|
55895
55897
|
}
|
|
@@ -55930,19 +55932,19 @@ var init_model_selector_ui = __esm({
|
|
|
55930
55932
|
const item = displayItems[i2];
|
|
55931
55933
|
if (item.type === "group") {
|
|
55932
55934
|
console.log(
|
|
55933
|
-
|
|
55935
|
+
chalk27__default.default.green("\u2502") + chalk27__default.default.dim.green(" \u2501\u2501\u2501 ") + chalk27__default.default.greenBright(item.content.substring(2, item.content.indexOf(" \u2500"))) + chalk27__default.default.dim.green(" " + "\u2501".repeat(71 - item.content.indexOf(" \u2500"))) + chalk27__default.default.green("\u2502")
|
|
55934
55936
|
);
|
|
55935
55937
|
} else {
|
|
55936
55938
|
const isSelected = item.modelIndex === this.selectedIndex;
|
|
55937
|
-
const prefix = isSelected ?
|
|
55939
|
+
const prefix = isSelected ? chalk27__default.default.greenBright("\u25B6 ") : " ";
|
|
55938
55940
|
const modelText = item.content;
|
|
55939
55941
|
if (isSelected) {
|
|
55940
55942
|
console.log(
|
|
55941
|
-
|
|
55943
|
+
chalk27__default.default.green("\u2502") + prefix + chalk27__default.default.black.bgGreen(modelText.padEnd(75)) + chalk27__default.default.green("\u2502")
|
|
55942
55944
|
);
|
|
55943
55945
|
} else {
|
|
55944
55946
|
console.log(
|
|
55945
|
-
|
|
55947
|
+
chalk27__default.default.green("\u2502") + prefix + chalk27__default.default.green(modelText.substring(0, 75).padEnd(75)) + chalk27__default.default.green("\u2502")
|
|
55946
55948
|
);
|
|
55947
55949
|
}
|
|
55948
55950
|
}
|
|
@@ -58036,8 +58038,8 @@ async function loadServices() {
|
|
|
58036
58038
|
try {
|
|
58037
58039
|
const commandName = command.startsWith("/") ? command.slice(1) : command;
|
|
58038
58040
|
if (commandName === "battlecard") {
|
|
58039
|
-
console.log(
|
|
58040
|
-
console.log(
|
|
58041
|
+
console.log(chalk27__default.default.yellow("\u{1F512} /battlecard is not available on Free plan"));
|
|
58042
|
+
console.log(chalk27__default.default.gray(" Join the waitlist for business features: https://maria-code.ai/waitlist"));
|
|
58041
58043
|
return {
|
|
58042
58044
|
success: false,
|
|
58043
58045
|
message: "Command not available on Free plan"
|
|
@@ -58098,7 +58100,7 @@ async function loadServices() {
|
|
|
58098
58100
|
commandManager.setLegacyHandler(legacyHandlerAdapter);
|
|
58099
58101
|
}
|
|
58100
58102
|
} catch (e2) {
|
|
58101
|
-
console.warn(
|
|
58103
|
+
console.warn(chalk27__default.default.yellow("\u26A0 Some services unavailable, using fallbacks"));
|
|
58102
58104
|
}
|
|
58103
58105
|
}
|
|
58104
58106
|
async function init() {
|
|
@@ -58220,17 +58222,17 @@ async function enforceAuth(cmd) {
|
|
|
58220
58222
|
try {
|
|
58221
58223
|
const tokens = await authManager.getValidTokens();
|
|
58222
58224
|
if (!tokens) {
|
|
58223
|
-
console.log(
|
|
58225
|
+
console.log(chalk27__default.default.red("\u{1F510} Authentication required \xB7 Run: maria /login"));
|
|
58224
58226
|
return false;
|
|
58225
58227
|
}
|
|
58226
58228
|
return true;
|
|
58227
58229
|
} catch (error2) {
|
|
58228
58230
|
if (error2.code === "AUTH_REQUIRED") {
|
|
58229
|
-
console.log(
|
|
58231
|
+
console.log(chalk27__default.default.red("\u{1F510} Authentication required \xB7 Run: maria /login"));
|
|
58230
58232
|
} else if (error2.code === "REAUTH_REQUIRED") {
|
|
58231
|
-
console.log(
|
|
58233
|
+
console.log(chalk27__default.default.yellow("\u{1F504} Please re-authenticate \xB7 Run: maria /login"));
|
|
58232
58234
|
} else {
|
|
58233
|
-
console.log(
|
|
58235
|
+
console.log(chalk27__default.default.red("\u{1F310} Network error, check connection"));
|
|
58234
58236
|
}
|
|
58235
58237
|
return false;
|
|
58236
58238
|
}
|
|
@@ -58269,7 +58271,7 @@ async function handleSlash(input3) {
|
|
|
58269
58271
|
console.log(JSON.stringify(result2.data, null, 2));
|
|
58270
58272
|
}
|
|
58271
58273
|
} else {
|
|
58272
|
-
console.log(
|
|
58274
|
+
console.log(chalk27__default.default.red(`Help Error: ${result2.message}`));
|
|
58273
58275
|
}
|
|
58274
58276
|
return true;
|
|
58275
58277
|
}
|
|
@@ -58277,7 +58279,7 @@ async function handleSlash(input3) {
|
|
|
58277
58279
|
if (process.env.MARIA_DEBUG === "1") {
|
|
58278
58280
|
console.error("HelpCommand error:", helpError);
|
|
58279
58281
|
}
|
|
58280
|
-
console.log(
|
|
58282
|
+
console.log(chalk27__default.default.yellow("\u26A0 Dynamic help unavailable, using fallback"));
|
|
58281
58283
|
}
|
|
58282
58284
|
const help = `
|
|
58283
58285
|
\u{1F4D6} MARIA CLI Help
|
|
@@ -58307,7 +58309,7 @@ Chat:
|
|
|
58307
58309
|
session.length = 0;
|
|
58308
58310
|
if (ctx?.clearContext) ctx.clearContext();
|
|
58309
58311
|
console.clear();
|
|
58310
|
-
console.log(
|
|
58312
|
+
console.log(chalk27__default.default.green("\u2728 Session cleared"));
|
|
58311
58313
|
return true;
|
|
58312
58314
|
}
|
|
58313
58315
|
if (cmd === "code") {
|
|
@@ -58316,7 +58318,7 @@ Chat:
|
|
|
58316
58318
|
const prompt = args2.join(" ").trim();
|
|
58317
58319
|
if (!prompt) {
|
|
58318
58320
|
console.log(
|
|
58319
|
-
|
|
58321
|
+
chalk27__default.default.red("Usage: /code <request> e.g. /code build a REST API")
|
|
58320
58322
|
);
|
|
58321
58323
|
return true;
|
|
58322
58324
|
}
|
|
@@ -58329,7 +58331,7 @@ Chat:
|
|
|
58329
58331
|
const prompt = args2.join(" ").trim();
|
|
58330
58332
|
if (!prompt) {
|
|
58331
58333
|
console.log(
|
|
58332
|
-
|
|
58334
|
+
chalk27__default.default.cyan("\u{1F3A8} **Image Generation**\n") + chalk27__default.default.white("Usage: /image <prompt>\n") + chalk27__default.default.gray("Example: /image \u5BCC\u58EB\u5C71\u306E\u65E5\u306E\u51FA")
|
|
58333
58335
|
);
|
|
58334
58336
|
return true;
|
|
58335
58337
|
}
|
|
@@ -58341,14 +58343,14 @@ Chat:
|
|
|
58341
58343
|
options: {},
|
|
58342
58344
|
logger: {
|
|
58343
58345
|
info: (msg) => console.log(msg),
|
|
58344
|
-
error: (msg) => console.error(
|
|
58345
|
-
warn: (msg) => console.warn(
|
|
58346
|
+
error: (msg) => console.error(chalk27__default.default.red(msg)),
|
|
58347
|
+
warn: (msg) => console.warn(chalk27__default.default.yellow(msg))
|
|
58346
58348
|
}
|
|
58347
58349
|
};
|
|
58348
58350
|
await imageCommand2.execute(context2);
|
|
58349
58351
|
}
|
|
58350
58352
|
} catch (error2) {
|
|
58351
|
-
console.error(
|
|
58353
|
+
console.error(chalk27__default.default.red("Image generation failed:"), error2.message);
|
|
58352
58354
|
}
|
|
58353
58355
|
return true;
|
|
58354
58356
|
}
|
|
@@ -58358,7 +58360,7 @@ Chat:
|
|
|
58358
58360
|
const prompt = args2.join(" ").trim();
|
|
58359
58361
|
if (!prompt) {
|
|
58360
58362
|
console.log(
|
|
58361
|
-
|
|
58363
|
+
chalk27__default.default.cyan("\u{1F3AC} **Video Generation**\n") + chalk27__default.default.white("Usage: /video <prompt>\n") + chalk27__default.default.gray("Example: /video \u6D77\u306E\u6CE2\u304C\u6253\u3061\u5BC4\u305B\u308B\u69D8\u5B50")
|
|
58362
58364
|
);
|
|
58363
58365
|
return true;
|
|
58364
58366
|
}
|
|
@@ -58370,14 +58372,14 @@ Chat:
|
|
|
58370
58372
|
options: {},
|
|
58371
58373
|
logger: {
|
|
58372
58374
|
info: (msg) => console.log(msg),
|
|
58373
|
-
error: (msg) => console.error(
|
|
58374
|
-
warn: (msg) => console.warn(
|
|
58375
|
+
error: (msg) => console.error(chalk27__default.default.red(msg)),
|
|
58376
|
+
warn: (msg) => console.warn(chalk27__default.default.yellow(msg))
|
|
58375
58377
|
}
|
|
58376
58378
|
};
|
|
58377
58379
|
await videoCommand2.execute(context2);
|
|
58378
58380
|
}
|
|
58379
58381
|
} catch (error2) {
|
|
58380
|
-
console.error(
|
|
58382
|
+
console.error(chalk27__default.default.red("Video generation failed:"), error2.message);
|
|
58381
58383
|
}
|
|
58382
58384
|
return true;
|
|
58383
58385
|
}
|
|
@@ -58387,7 +58389,7 @@ Chat:
|
|
|
58387
58389
|
const prompt = args2.join(" ").trim();
|
|
58388
58390
|
if (!prompt) {
|
|
58389
58391
|
console.log(
|
|
58390
|
-
|
|
58392
|
+
chalk27__default.default.cyan("\u{1F399}\uFE0F **Voice Synthesis**\n") + chalk27__default.default.white("Usage: /voice <text>\n") + chalk27__default.default.gray("Example: /voice \u3053\u3093\u306B\u3061\u306F\u3001\u5143\u6C17\u3067\u3059\u304B\uFF1F")
|
|
58391
58393
|
);
|
|
58392
58394
|
return true;
|
|
58393
58395
|
}
|
|
@@ -58399,14 +58401,14 @@ Chat:
|
|
|
58399
58401
|
options: {},
|
|
58400
58402
|
logger: {
|
|
58401
58403
|
info: (msg) => console.log(msg),
|
|
58402
|
-
error: (msg) => console.error(
|
|
58403
|
-
warn: (msg) => console.warn(
|
|
58404
|
+
error: (msg) => console.error(chalk27__default.default.red(msg)),
|
|
58405
|
+
warn: (msg) => console.warn(chalk27__default.default.yellow(msg))
|
|
58404
58406
|
}
|
|
58405
58407
|
};
|
|
58406
58408
|
await voiceCommand2.execute(context2);
|
|
58407
58409
|
}
|
|
58408
58410
|
} catch (error2) {
|
|
58409
|
-
console.error(
|
|
58411
|
+
console.error(chalk27__default.default.red("Voice synthesis failed:"), error2.message);
|
|
58410
58412
|
}
|
|
58411
58413
|
return true;
|
|
58412
58414
|
}
|
|
@@ -58425,49 +58427,49 @@ Chat:
|
|
|
58425
58427
|
if (args2.includes("status")) {
|
|
58426
58428
|
if (await authManager.isAuthenticated()) {
|
|
58427
58429
|
const user = await authManager.getCurrentUser();
|
|
58428
|
-
console.log(
|
|
58430
|
+
console.log(chalk27__default.default.green("\u2705 Authenticated"));
|
|
58429
58431
|
if (user.name) {
|
|
58430
|
-
console.log(
|
|
58432
|
+
console.log(chalk27__default.default.white(`\u{1F464} Name: ${chalk27__default.default.cyan(user.name)}`));
|
|
58431
58433
|
}
|
|
58432
|
-
console.log(
|
|
58434
|
+
console.log(chalk27__default.default.white(`\u{1F4E7} Email: ${chalk27__default.default.cyan(user.email)}`));
|
|
58433
58435
|
if (user.provider) {
|
|
58434
|
-
console.log(
|
|
58436
|
+
console.log(chalk27__default.default.white(`\u{1F511} Provider: ${chalk27__default.default.cyan(user.provider)}`));
|
|
58435
58437
|
}
|
|
58436
|
-
console.log(
|
|
58438
|
+
console.log(chalk27__default.default.white(`\u{1F4CA} Plan: ${chalk27__default.default.cyan(user.plan)}`));
|
|
58437
58439
|
} else {
|
|
58438
|
-
console.log(
|
|
58439
|
-
console.log(
|
|
58440
|
+
console.log(chalk27__default.default.yellow("\u26A0\uFE0F Not authenticated"));
|
|
58441
|
+
console.log(chalk27__default.default.gray("Use /login to sign in"));
|
|
58440
58442
|
}
|
|
58441
58443
|
} else {
|
|
58442
58444
|
const result2 = await authManager.login(options3);
|
|
58443
58445
|
if (result2.success && result2.user) {
|
|
58444
|
-
console.log(
|
|
58446
|
+
console.log(chalk27__default.default.green("\u2705 Successfully logged in!"));
|
|
58445
58447
|
const u = result2.user;
|
|
58446
58448
|
if (u.name) {
|
|
58447
|
-
console.log(
|
|
58449
|
+
console.log(chalk27__default.default.white(`\u{1F464} Name: ${chalk27__default.default.cyan(u.name)}`));
|
|
58448
58450
|
}
|
|
58449
|
-
console.log(
|
|
58451
|
+
console.log(chalk27__default.default.white(`\u{1F4E7} Email: ${chalk27__default.default.cyan(u.email)}`));
|
|
58450
58452
|
if (u.provider) {
|
|
58451
|
-
console.log(
|
|
58453
|
+
console.log(chalk27__default.default.white(`\u{1F511} Provider: ${chalk27__default.default.cyan(u.provider)}`));
|
|
58452
58454
|
}
|
|
58453
|
-
console.log(
|
|
58455
|
+
console.log(chalk27__default.default.white(`\u{1F4CA} Plan: ${chalk27__default.default.cyan(u.plan)}`));
|
|
58454
58456
|
} else {
|
|
58455
|
-
console.log(
|
|
58456
|
-
if (result2.error) console.log(
|
|
58457
|
+
console.log(chalk27__default.default.red("\u274C Login failed"));
|
|
58458
|
+
if (result2.error) console.log(chalk27__default.default.gray(result2.error));
|
|
58457
58459
|
}
|
|
58458
58460
|
}
|
|
58459
58461
|
}
|
|
58460
58462
|
} catch (error2) {
|
|
58461
|
-
console.error(
|
|
58463
|
+
console.error(chalk27__default.default.red("Login error:"), error2.message);
|
|
58462
58464
|
}
|
|
58463
58465
|
return true;
|
|
58464
58466
|
}
|
|
58465
58467
|
if (cmd === "logout" || cmd === "signout") {
|
|
58466
58468
|
try {
|
|
58467
58469
|
await authManager.logout();
|
|
58468
|
-
console.log(
|
|
58470
|
+
console.log(chalk27__default.default.green("\u{1F44B} Signed out. Local credentials removed."));
|
|
58469
58471
|
} catch (error2) {
|
|
58470
|
-
console.error(
|
|
58472
|
+
console.error(chalk27__default.default.red("Logout error:"), error2.message);
|
|
58471
58473
|
}
|
|
58472
58474
|
return true;
|
|
58473
58475
|
}
|
|
@@ -58608,7 +58610,7 @@ Chat:
|
|
|
58608
58610
|
} else if (result2.message) {
|
|
58609
58611
|
console.log(result2.message);
|
|
58610
58612
|
} else if (result2.success) {
|
|
58611
|
-
console.log(
|
|
58613
|
+
console.log(chalk27__default.default.green("\u2705 Command executed successfully"));
|
|
58612
58614
|
}
|
|
58613
58615
|
if (result2.data && process.env.MARIA_DEBUG === "1") {
|
|
58614
58616
|
console.log(JSON.stringify(result2.data, null, 2));
|
|
@@ -58622,11 +58624,11 @@ Chat:
|
|
|
58622
58624
|
}
|
|
58623
58625
|
}
|
|
58624
58626
|
if (!["battlecard", "sales-dashboard", "tune", "pilot-setup"].includes(cmd)) {
|
|
58625
|
-
console.log(
|
|
58626
|
-
console.log(
|
|
58627
|
-
console.log(
|
|
58628
|
-
console.log(
|
|
58629
|
-
console.log(
|
|
58627
|
+
console.log(chalk27__default.default.red(`\u274C Unknown command: /${cmd}`));
|
|
58628
|
+
console.log(chalk27__default.default.yellow("\n\u{1F4A1} Suggestions:"));
|
|
58629
|
+
console.log(chalk27__default.default.gray(" \u2022 Try /help to see available commands"));
|
|
58630
|
+
console.log(chalk27__default.default.gray(" \u2022 Check if you need to /login first"));
|
|
58631
|
+
console.log(chalk27__default.default.gray(` \u2022 Try similar commands: /help --search ${cmd}`));
|
|
58630
58632
|
}
|
|
58631
58633
|
return true;
|
|
58632
58634
|
}
|
|
@@ -58888,17 +58890,17 @@ async function handleCodeCommand(prompt) {
|
|
|
58888
58890
|
const response2 = await generateStrictCode(prompt);
|
|
58889
58891
|
spinner.stop();
|
|
58890
58892
|
if (response2) {
|
|
58891
|
-
console.log(response2);
|
|
58893
|
+
console.log(chalk27__default.default.green(response2));
|
|
58892
58894
|
const { language, code, extension } = extractCodeInfo(response2);
|
|
58893
58895
|
const filename = generateCodeFilename(prompt, language, extension);
|
|
58894
58896
|
const filepath = path9__namespace.resolve(process.cwd(), filename);
|
|
58895
58897
|
await fsp__namespace.writeFile(filepath, code, "utf-8");
|
|
58896
58898
|
console.log(
|
|
58897
|
-
|
|
58898
|
-
`) +
|
|
58899
|
-
`) +
|
|
58900
|
-
`) +
|
|
58901
|
-
`) +
|
|
58899
|
+
chalk27__default.default.green("\n\u2705 Code Saved\n") + chalk27__default.default.green(`\u{1F4C1} File (Click to open):
|
|
58900
|
+
`) + chalk27__default.default.green(`\u2022 [${filename}](file://${filepath})
|
|
58901
|
+
`) + chalk27__default.default.green(` \u{1F4CD} Path: \`${filepath}\`
|
|
58902
|
+
`) + chalk27__default.default.green(` \u{1F4DD} Language: ${language}
|
|
58903
|
+
`) + chalk27__default.default.green(`
|
|
58902
58904
|
\u{1F4A1} Tip: Command+Click (Mac) or Ctrl+Click (Windows/Linux) to open file`)
|
|
58903
58905
|
);
|
|
58904
58906
|
} else {
|
|
@@ -58907,27 +58909,28 @@ async function handleCodeCommand(prompt) {
|
|
|
58907
58909
|
} catch (e2) {
|
|
58908
58910
|
spinner.stop();
|
|
58909
58911
|
if (process.env.MARIA_DEBUG === "1") {
|
|
58910
|
-
console.error(
|
|
58912
|
+
console.error(chalk27__default.default.red("Code generation error:"), e2.message || e2);
|
|
58911
58913
|
}
|
|
58912
58914
|
const fallbackCode = templateFallback(prompt);
|
|
58913
58915
|
console.log(
|
|
58914
|
-
|
|
58916
|
+
chalk27__default.default.yellow("\u26A0 AI unavailable, using template fallback:\n")
|
|
58915
58917
|
);
|
|
58916
|
-
console.log(fallbackCode);
|
|
58918
|
+
console.log(chalk27__default.default.green(fallbackCode));
|
|
58917
58919
|
try {
|
|
58918
58920
|
const { language, code, extension } = extractCodeInfo(fallbackCode);
|
|
58919
58921
|
const filename = generateCodeFilename(prompt, language, extension);
|
|
58920
58922
|
const filepath = path9__namespace.resolve(process.cwd(), filename);
|
|
58921
58923
|
await fsp__namespace.writeFile(filepath, code, "utf-8");
|
|
58922
58924
|
console.log(
|
|
58923
|
-
|
|
58924
|
-
`) +
|
|
58925
|
-
`) +
|
|
58926
|
-
`) +
|
|
58925
|
+
chalk27__default.default.green("\n\u2705 Template Code Saved\n") + chalk27__default.default.green(`\u{1F4C1} File (Click to open):
|
|
58926
|
+
`) + chalk27__default.default.green(`\u2022 [${filename}](file://${filepath})
|
|
58927
|
+
`) + chalk27__default.default.green(` \u{1F4CD} Path: \`${filepath}\`
|
|
58928
|
+
`) + chalk27__default.default.green(` \u{1F4DD} Language: ${language}
|
|
58929
|
+
`) + chalk27__default.default.green(`
|
|
58927
58930
|
\u{1F4A1} Tip: Command+Click (Mac) or Ctrl+Click (Windows/Linux) to open file`)
|
|
58928
58931
|
);
|
|
58929
58932
|
} catch (saveError) {
|
|
58930
|
-
console.error(
|
|
58933
|
+
console.error(chalk27__default.default.red("Failed to save code:"), saveError);
|
|
58931
58934
|
}
|
|
58932
58935
|
}
|
|
58933
58936
|
}
|
|
@@ -58983,7 +58986,7 @@ ${userPrompt}`;
|
|
|
58983
58986
|
(seq) => response2.includes(seq)
|
|
58984
58987
|
);
|
|
58985
58988
|
if (guidedFlowDetected) {
|
|
58986
|
-
console.log(
|
|
58989
|
+
console.log(chalk27__default.default.yellow("\u26A0 Guided flow detected, switching to fallback"));
|
|
58987
58990
|
return null;
|
|
58988
58991
|
}
|
|
58989
58992
|
const codeMatch = response2.match(/```[\s\S]*?```/);
|
|
@@ -59142,23 +59145,23 @@ async function streamAnswer(text) {
|
|
|
59142
59145
|
});
|
|
59143
59146
|
animation.stop();
|
|
59144
59147
|
if (ai.streamResponse) {
|
|
59145
|
-
await ai.streamResponse(resp, (line) => console.log(line));
|
|
59148
|
+
await ai.streamResponse(resp, (line) => console.log(chalk27__default.default.green(line)));
|
|
59146
59149
|
} else {
|
|
59147
|
-
console.log(resp);
|
|
59150
|
+
console.log(chalk27__default.default.green(resp));
|
|
59148
59151
|
}
|
|
59149
59152
|
const msg = { role: "assistant", content: resp, timestamp: /* @__PURE__ */ new Date() };
|
|
59150
59153
|
session.push(msg);
|
|
59151
59154
|
if (store?.addMessage) await store.addMessage(msg);
|
|
59152
59155
|
} else {
|
|
59153
59156
|
animation.stop();
|
|
59154
|
-
console.log(
|
|
59157
|
+
console.log(chalk27__default.default.yellow("AI service unavailable. Please check your configuration."));
|
|
59155
59158
|
}
|
|
59156
59159
|
} catch (e2) {
|
|
59157
59160
|
animation.stop();
|
|
59158
59161
|
if (e2.message?.includes("timeout") || e2.message?.includes("\u23F1\uFE0F")) {
|
|
59159
|
-
console.log(
|
|
59162
|
+
console.log(chalk27__default.default.yellow(e2.message));
|
|
59160
59163
|
} else {
|
|
59161
|
-
console.log(
|
|
59164
|
+
console.log(chalk27__default.default.red("Error generating response:"), e2.message || e2);
|
|
59162
59165
|
}
|
|
59163
59166
|
}
|
|
59164
59167
|
}
|
|
@@ -59173,9 +59176,9 @@ async function handleLine(line) {
|
|
|
59173
59176
|
if (consumed) return;
|
|
59174
59177
|
const isAuthenticated = await authManager.isAuthenticated();
|
|
59175
59178
|
if (!isAuthenticated) {
|
|
59176
|
-
console.log(
|
|
59177
|
-
console.log(
|
|
59178
|
-
console.log(
|
|
59179
|
+
console.log(chalk27__default.default.yellow("\n\u26A0\uFE0F Authentication required for chat features"));
|
|
59180
|
+
console.log(chalk27__default.default.yellow("Please run: /login"));
|
|
59181
|
+
console.log(chalk27__default.default.yellow("Or use slash commands like /help, /version"));
|
|
59179
59182
|
return;
|
|
59180
59183
|
}
|
|
59181
59184
|
const user = { role: "user", content: input3, timestamp: /* @__PURE__ */ new Date() };
|
|
@@ -59197,7 +59200,7 @@ async function startInteractiveSession() {
|
|
|
59197
59200
|
}
|
|
59198
59201
|
}
|
|
59199
59202
|
const stop = async () => {
|
|
59200
|
-
console.log(
|
|
59203
|
+
console.log(chalk27__default.default.green("\n\u{1F44B} Goodbye!"));
|
|
59201
59204
|
if (store?.close) await store.close().catch(() => {
|
|
59202
59205
|
});
|
|
59203
59206
|
if (interactiveCLI?.cleanup) interactiveCLI.cleanup();
|
|
@@ -59211,7 +59214,7 @@ async function startInteractiveSession() {
|
|
|
59211
59214
|
process.once("SIGINT", stop);
|
|
59212
59215
|
process.once("SIGTERM", stop);
|
|
59213
59216
|
if (!isTTY) {
|
|
59214
|
-
console.log(
|
|
59217
|
+
console.log(chalk27__default.default.gray("[Pipe mode detected - streaming input/output]"));
|
|
59215
59218
|
const rl = readline5__namespace.createInterface({
|
|
59216
59219
|
input: process5.stdin,
|
|
59217
59220
|
output: process5.stdout,
|
|
@@ -59240,14 +59243,14 @@ async function startInteractiveSession() {
|
|
|
59240
59243
|
await stop();
|
|
59241
59244
|
return;
|
|
59242
59245
|
}
|
|
59243
|
-
console.error(
|
|
59246
|
+
console.error(chalk27__default.default.red("Error:"), error2?.message || error2);
|
|
59244
59247
|
}
|
|
59245
59248
|
}
|
|
59246
59249
|
} else {
|
|
59247
59250
|
const rl = readline5__namespace.createInterface({ input: process5.stdin, output: process5.stdout });
|
|
59248
59251
|
while (true) {
|
|
59249
59252
|
try {
|
|
59250
|
-
const prompt =
|
|
59253
|
+
const prompt = chalk27__default.default.cyan("> ");
|
|
59251
59254
|
const line = await rl.question(prompt);
|
|
59252
59255
|
console.log();
|
|
59253
59256
|
if (line.toLowerCase() === "exit" || line.toLowerCase() === "quit") {
|
|
@@ -59261,7 +59264,7 @@ async function startInteractiveSession() {
|
|
|
59261
59264
|
await stop();
|
|
59262
59265
|
return;
|
|
59263
59266
|
}
|
|
59264
|
-
console.error(
|
|
59267
|
+
console.error(chalk27__default.default.red("Error:"), error2?.message || error2);
|
|
59265
59268
|
}
|
|
59266
59269
|
}
|
|
59267
59270
|
}
|
|
@@ -59271,7 +59274,7 @@ function createCLI() {
|
|
|
59271
59274
|
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) => {
|
|
59272
59275
|
loadEnvironmentVariables();
|
|
59273
59276
|
if (options2.server) {
|
|
59274
|
-
console.log(
|
|
59277
|
+
console.log(chalk27__default.default.green("\u{1F680} Starting MARIA server mode..."));
|
|
59275
59278
|
try {
|
|
59276
59279
|
const distDir = path9__namespace.dirname(process.argv[1] || process.cwd());
|
|
59277
59280
|
const candidateNames = [
|
|
@@ -59301,9 +59304,9 @@ function createCLI() {
|
|
|
59301
59304
|
if (serverPath) break;
|
|
59302
59305
|
}
|
|
59303
59306
|
if (!serverPath) {
|
|
59304
|
-
console.error(
|
|
59305
|
-
console.error(
|
|
59306
|
-
console.error(
|
|
59307
|
+
console.error(chalk27__default.default.red("\u274C Could not locate server-express entry file"));
|
|
59308
|
+
console.error(chalk27__default.default.gray("Searched names: " + candidateNames.join(", ")));
|
|
59309
|
+
console.error(chalk27__default.default.gray("Searched dirs: " + candidateDirs.join(" | ")));
|
|
59307
59310
|
process.exit(1);
|
|
59308
59311
|
}
|
|
59309
59312
|
const { spawn: spawn3 } = await import('child_process');
|
|
@@ -59350,7 +59353,7 @@ function createCLI() {
|
|
|
59350
59353
|
process.once("SIGINT", () => forwardAndExit("SIGINT"));
|
|
59351
59354
|
process.once("SIGTERM", () => forwardAndExit("SIGTERM"));
|
|
59352
59355
|
serverProcess.on("error", (error2) => {
|
|
59353
|
-
console.error(
|
|
59356
|
+
console.error(chalk27__default.default.red("\u274C Server process error:"), error2);
|
|
59354
59357
|
process.exit(1);
|
|
59355
59358
|
});
|
|
59356
59359
|
serverProcess.on("exit", (code, _signal) => {
|
|
@@ -59363,7 +59366,7 @@ function createCLI() {
|
|
|
59363
59366
|
});
|
|
59364
59367
|
return;
|
|
59365
59368
|
} catch (error2) {
|
|
59366
|
-
console.error(
|
|
59369
|
+
console.error(chalk27__default.default.red("\u274C Failed to start server mode:"), error2);
|
|
59367
59370
|
process.exit(1);
|
|
59368
59371
|
}
|
|
59369
59372
|
}
|
|
@@ -59388,7 +59391,7 @@ function createCLI() {
|
|
|
59388
59391
|
displayStartupLogo2();
|
|
59389
59392
|
startupDisplayed = true;
|
|
59390
59393
|
} catch {
|
|
59391
|
-
console.log(
|
|
59394
|
+
console.log(chalk27__default.default.cyan(`
|
|
59392
59395
|
\u{1F680} MARIA v${getVersion()}
|
|
59393
59396
|
`));
|
|
59394
59397
|
startupDisplayed = true;
|
|
@@ -59397,13 +59400,13 @@ function createCLI() {
|
|
|
59397
59400
|
const useV3 = options2.v3Session || process.env.MARIA_USE_V3_SESSION === "1";
|
|
59398
59401
|
if (useV3) {
|
|
59399
59402
|
try {
|
|
59400
|
-
console.log(
|
|
59403
|
+
console.log(chalk27__default.default.cyan("\u{1F680} Starting MARIA v3 session..."));
|
|
59401
59404
|
const { MariaAI: MariaAI2 } = await Promise.resolve().then(() => (init_maria_ai(), maria_ai_exports));
|
|
59402
59405
|
const maria = new MariaAI2();
|
|
59403
59406
|
await maria.initialize();
|
|
59404
59407
|
return;
|
|
59405
59408
|
} catch (e2) {
|
|
59406
|
-
console.warn(
|
|
59409
|
+
console.warn(chalk27__default.default.yellow("\u26A0 V3 session unavailable, using standard mode"));
|
|
59407
59410
|
}
|
|
59408
59411
|
}
|
|
59409
59412
|
await startInteractiveSession();
|
|
@@ -59451,14 +59454,14 @@ function createCLI2() {
|
|
|
59451
59454
|
}
|
|
59452
59455
|
});
|
|
59453
59456
|
program2.command("setup-ollama").description("Setup Ollama for local AI").action(async () => {
|
|
59454
|
-
console.log(
|
|
59457
|
+
console.log(chalk27__default.default.cyan("Setting up Ollama..."));
|
|
59455
59458
|
console.log(
|
|
59456
|
-
|
|
59459
|
+
chalk27__default.default.yellow("Please run: brew install ollama && ollama serve")
|
|
59457
59460
|
);
|
|
59458
59461
|
});
|
|
59459
59462
|
program2.command("setup-vllm").description("Setup vLLM for local AI").action(async () => {
|
|
59460
|
-
console.log(
|
|
59461
|
-
console.log(
|
|
59463
|
+
console.log(chalk27__default.default.cyan("Setting up vLLM..."));
|
|
59464
|
+
console.log(chalk27__default.default.yellow("Please run: pip install vllm"));
|
|
59462
59465
|
});
|
|
59463
59466
|
return program2;
|
|
59464
59467
|
}
|
|
@@ -59486,13 +59489,13 @@ var init_maria_ai = __esm({
|
|
|
59486
59489
|
await this.providerSelector.initialize();
|
|
59487
59490
|
const { provider, model } = await this.providerSelector.selectProvider();
|
|
59488
59491
|
console.log(
|
|
59489
|
-
|
|
59492
|
+
chalk27__default.default.green(`
|
|
59490
59493
|
\u2705 Selected: ${provider} with model ${model}`)
|
|
59491
59494
|
);
|
|
59492
59495
|
this.config.set("currentProvider", provider);
|
|
59493
59496
|
this.config.set("currentModel", model);
|
|
59494
59497
|
await this.config.save();
|
|
59495
|
-
console.log(
|
|
59498
|
+
console.log(chalk27__default.default.cyan("\n\u{1F9E0} Initializing Intelligent Router..."));
|
|
59496
59499
|
this.router = new IntelligentRouterService({
|
|
59497
59500
|
confidenceThreshold: 0.85,
|
|
59498
59501
|
enableLearning: true,
|
|
@@ -59500,12 +59503,12 @@ var init_maria_ai = __esm({
|
|
|
59500
59503
|
});
|
|
59501
59504
|
await this.router.initialize();
|
|
59502
59505
|
console.log(
|
|
59503
|
-
|
|
59506
|
+
chalk27__default.default.green("\u2705 Intelligent Router initialized successfully\n")
|
|
59504
59507
|
);
|
|
59505
59508
|
this.session = createInteractiveSession(this);
|
|
59506
59509
|
await this.session.start();
|
|
59507
59510
|
} catch (error2) {
|
|
59508
|
-
console.error(
|
|
59511
|
+
console.error(chalk27__default.default.red("\n\u274C Initialization failed:"), error2);
|
|
59509
59512
|
process.exit(1);
|
|
59510
59513
|
}
|
|
59511
59514
|
}
|
|
@@ -59513,7 +59516,7 @@ var init_maria_ai = __esm({
|
|
|
59513
59516
|
if (this.session) {
|
|
59514
59517
|
await this.session.stop();
|
|
59515
59518
|
}
|
|
59516
|
-
console.log(
|
|
59519
|
+
console.log(chalk27__default.default.green("\n\u{1F44B} Goodbye!"));
|
|
59517
59520
|
}
|
|
59518
59521
|
};
|
|
59519
59522
|
}
|
|
@@ -59527,25 +59530,25 @@ function checkNodeVersion() {
|
|
|
59527
59530
|
const currentVersion = process.version;
|
|
59528
59531
|
if (!semver__default.default.satisfies(currentVersion, `>=${MINIMUM_NODE_VERSION}`)) {
|
|
59529
59532
|
console.error(
|
|
59530
|
-
|
|
59533
|
+
chalk27__default.default.red(`
|
|
59531
59534
|
\u274C Node.js version ${currentVersion} is not supported.`)
|
|
59532
59535
|
);
|
|
59533
59536
|
console.error(
|
|
59534
|
-
|
|
59537
|
+
chalk27__default.default.yellow(`Minimum required version: ${MINIMUM_NODE_VERSION}`)
|
|
59535
59538
|
);
|
|
59536
59539
|
console.error(
|
|
59537
|
-
|
|
59540
|
+
chalk27__default.default.yellow(
|
|
59538
59541
|
`Recommended version: ${RECOMMENDED_NODE_VERSION} or higher`
|
|
59539
59542
|
)
|
|
59540
59543
|
);
|
|
59541
|
-
console.error(
|
|
59542
|
-
console.error(
|
|
59544
|
+
console.error(chalk27__default.default.cyan("\nPlease upgrade Node.js:"));
|
|
59545
|
+
console.error(chalk27__default.default.gray(" \u2022 Using nvm: nvm install 20 && nvm use 20"));
|
|
59543
59546
|
console.error(
|
|
59544
|
-
|
|
59547
|
+
chalk27__default.default.gray(
|
|
59545
59548
|
" \u2022 Using nodenv: nodenv install 20.0.0 && nodenv global 20.0.0"
|
|
59546
59549
|
)
|
|
59547
59550
|
);
|
|
59548
|
-
console.error(
|
|
59551
|
+
console.error(chalk27__default.default.gray(" \u2022 Download from: https://nodejs.org/"));
|
|
59549
59552
|
process.exit(1);
|
|
59550
59553
|
}
|
|
59551
59554
|
}
|