@bonginkan/maria 4.2.25 → 4.2.27
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 +186 -42
- package/dist/bin/maria.cjs.map +1 -1
- package/dist/cli.cjs +256 -112
- 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/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# MARIA - AI Development Platform v4.2.
|
|
1
|
+
# MARIA - AI Development Platform v4.2.27
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@bonginkan/maria)
|
|
4
4
|
[](LICENSE)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
> **Enterprise-grade AI development platform with 100% command availability and comprehensive fallback support**
|
|
12
12
|
|
|
13
|
-
## 🚀 What's New in v4.2.
|
|
13
|
+
## 🚀 What's New in v4.2.27 (September 3, 2025)
|
|
14
14
|
|
|
15
15
|
### 🏗️ Build Status - All Systems Operational ✅
|
|
16
16
|
- **CLI NPM Package**: ESM + CJS builds successful (2.02MB/1.16MB)
|
|
@@ -748,10 +748,10 @@ await secureWorkflow.executeWithAuth(workflowDefinition, securityContext);
|
|
|
748
748
|
### Quick Installation
|
|
749
749
|
```bash
|
|
750
750
|
# Install globally (recommended)
|
|
751
|
-
npm install -g @bonginkan/maria@4.2.
|
|
751
|
+
npm install -g @bonginkan/maria@4.2.27
|
|
752
752
|
|
|
753
753
|
# Verify installation
|
|
754
|
-
maria --version # Should show v4.2.
|
|
754
|
+
maria --version # Should show v4.2.27
|
|
755
755
|
|
|
756
756
|
# Initialize with authentication
|
|
757
757
|
maria /login # Setup OAuth2.0 + PKCE authentication
|
|
@@ -952,7 +952,7 @@ MARIA CODE is distributed under a comprehensive licensing system designed for in
|
|
|
952
952
|
|
|
953
953
|
*MARIA v4.1.4 represents the pinnacle of multimodal AI development platform evolution - combining revolutionary voice-to-code capabilities, advanced memory systems, and comprehensive command ecosystems with enterprise-grade security and performance. This release establishes MARIA as the definitive choice for developers and Fortune 500 enterprises seeking intelligent, multimodal development experiences with GraphRAG intelligence, multilingual support, and zero-anxiety coding workflows.*
|
|
954
954
|
|
|
955
|
-
**Transform your development experience today**: `npm install -g @bonginkan/maria@4.2.
|
|
955
|
+
**Transform your development experience today**: `npm install -g @bonginkan/maria@4.2.27`
|
|
956
956
|
|
|
957
957
|
🌐 **Official Website**: [https://maria-code.ai](https://maria-code.ai)
|
|
958
958
|
💬 **Community**: [https://discord.gg/SMSmSGcEQy](https://discord.gg/SMSmSGcEQy)
|
package/dist/READY.manifest.json
CHANGED
package/dist/bin/maria.cjs
CHANGED
|
@@ -24329,8 +24329,8 @@ var require_package = __commonJS({
|
|
|
24329
24329
|
"package.json"(exports, module) {
|
|
24330
24330
|
module.exports = {
|
|
24331
24331
|
name: "@bonginkan/maria",
|
|
24332
|
-
version: "4.2.
|
|
24333
|
-
description: "\u{1F680} MARIA v4.2.
|
|
24332
|
+
version: "4.2.27",
|
|
24333
|
+
description: "\u{1F680} MARIA v4.2.27 - 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
24334
|
keywords: [
|
|
24335
24335
|
"ai",
|
|
24336
24336
|
"cli",
|
|
@@ -26536,7 +26536,7 @@ var init_AuthenticationManager = __esm({
|
|
|
26536
26536
|
const response2 = await fetch(`${this.apiBase}/api/user/profile`, {
|
|
26537
26537
|
headers: {
|
|
26538
26538
|
"Authorization": `Bearer ${tokens.accessToken}`,
|
|
26539
|
-
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.2.
|
|
26539
|
+
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.2.27"}`
|
|
26540
26540
|
}
|
|
26541
26541
|
});
|
|
26542
26542
|
if (response2.status === 401) {
|
|
@@ -28917,26 +28917,22 @@ var init_continuation = __esm({
|
|
|
28917
28917
|
|
|
28918
28918
|
// src/services/ai-response/responders/question.ts
|
|
28919
28919
|
function buildQuestionResponse(options2) {
|
|
28920
|
-
const { question,
|
|
28920
|
+
const { question, topics = [], includeExample = true } = options2;
|
|
28921
|
+
const isJapanese = false;
|
|
28921
28922
|
const parts = [];
|
|
28922
28923
|
if (process.env.MARIA_PLAIN_OUTPUT === "1" || process.env.MARIA_DISABLE_GUIDED_FLOW === "1") {
|
|
28923
28924
|
return "";
|
|
28924
28925
|
}
|
|
28925
28926
|
const cleanQuestion = cleanUserInput(question);
|
|
28926
28927
|
parts.push(
|
|
28927
|
-
|
|
28928
|
+
`Great question about "${cleanQuestion}". Let me explain.`
|
|
28928
28929
|
);
|
|
28929
28930
|
parts.push("");
|
|
28930
28931
|
parts.push(
|
|
28931
|
-
createSectionHeader(
|
|
28932
|
+
createSectionHeader("Answer Structure", 3)
|
|
28932
28933
|
);
|
|
28933
28934
|
parts.push("");
|
|
28934
|
-
const structure =
|
|
28935
|
-
"\u80CC\u666F\u3068\u57FA\u672C\u6982\u5FF5",
|
|
28936
|
-
"\u5B9F\u88C5\u65B9\u6CD5(\u6700\u5C0F\u4F8B)",
|
|
28937
|
-
"\u30D9\u30B9\u30C8\u30D7\u30E9\u30AF\u30C6\u30A3\u30B9\u3068\u6CE8\u610F\u70B9",
|
|
28938
|
-
"\u5B9F\u969B\u306E\u4F7F\u7528\u4F8B"
|
|
28939
|
-
] : [
|
|
28935
|
+
const structure = [
|
|
28940
28936
|
"Background & Concepts",
|
|
28941
28937
|
"Implementation (minimal example)",
|
|
28942
28938
|
"Best practices & pitfalls",
|
|
@@ -28945,14 +28941,14 @@ function buildQuestionResponse(options2) {
|
|
|
28945
28941
|
parts.push(formatList(structure, true));
|
|
28946
28942
|
parts.push("");
|
|
28947
28943
|
parts.push(
|
|
28948
|
-
createSectionHeader(
|
|
28944
|
+
createSectionHeader("Quick Answer", 3)
|
|
28949
28945
|
);
|
|
28950
28946
|
parts.push("");
|
|
28951
28947
|
parts.push(generateQuickAnswer(question, isJapanese, topics));
|
|
28952
28948
|
parts.push("");
|
|
28953
28949
|
if (includeExample && shouldIncludeCode(question)) {
|
|
28954
28950
|
parts.push(
|
|
28955
|
-
createSectionHeader(
|
|
28951
|
+
createSectionHeader("Code Example", 3)
|
|
28956
28952
|
);
|
|
28957
28953
|
parts.push("");
|
|
28958
28954
|
parts.push(generateExampleCode(topics));
|
|
@@ -28960,17 +28956,12 @@ function buildQuestionResponse(options2) {
|
|
|
28960
28956
|
}
|
|
28961
28957
|
parts.push(
|
|
28962
28958
|
createSectionHeader(
|
|
28963
|
-
|
|
28959
|
+
"Want to know more?",
|
|
28964
28960
|
3
|
|
28965
28961
|
)
|
|
28966
28962
|
);
|
|
28967
28963
|
parts.push("");
|
|
28968
|
-
const detailOptions =
|
|
28969
|
-
"\u8A73\u7D30\u306A\u5B9F\u88C5\u4F8B\u3092\u898B\u308B",
|
|
28970
|
-
"\u95A2\u9023\u3059\u308B\u6982\u5FF5\u3092\u5B66\u3076",
|
|
28971
|
-
"\u30C8\u30E9\u30D6\u30EB\u30B7\u30E5\u30FC\u30C6\u30A3\u30F3\u30B0",
|
|
28972
|
-
"\u5B9F\u969B\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3078\u306E\u9069\u7528"
|
|
28973
|
-
] : [
|
|
28964
|
+
const detailOptions = [
|
|
28974
28965
|
"See detailed implementation",
|
|
28975
28966
|
"Learn related concepts",
|
|
28976
28967
|
"Troubleshooting guide",
|
|
@@ -28979,7 +28970,7 @@ function buildQuestionResponse(options2) {
|
|
|
28979
28970
|
parts.push(formatList(detailOptions, true));
|
|
28980
28971
|
parts.push("");
|
|
28981
28972
|
parts.push(
|
|
28982
|
-
|
|
28973
|
+
"Choose a number for details or ask a follow-up question."
|
|
28983
28974
|
);
|
|
28984
28975
|
return parts.join("\n");
|
|
28985
28976
|
}
|
|
@@ -29060,7 +29051,6 @@ function solution(input: string): string {
|
|
|
29060
29051
|
function buildComprehensiveAnswer(question, detectedTopics, isJapanese) {
|
|
29061
29052
|
return buildQuestionResponse({
|
|
29062
29053
|
question,
|
|
29063
|
-
isJapanese,
|
|
29064
29054
|
topics: detectedTopics,
|
|
29065
29055
|
includeExample: true
|
|
29066
29056
|
});
|
|
@@ -29411,7 +29401,7 @@ ${prompt}`,
|
|
|
29411
29401
|
return generateNextAPITemplate(isJapanese);
|
|
29412
29402
|
return "";
|
|
29413
29403
|
case "QUESTION":
|
|
29414
|
-
return buildComprehensiveAnswer(userInput, topics
|
|
29404
|
+
return buildComprehensiveAnswer(userInput, topics);
|
|
29415
29405
|
case "CONTINUATION": {
|
|
29416
29406
|
const contextPreview = context2.recentMessages.slice(-3).map((m2) => m2.content).join(" ");
|
|
29417
29407
|
return buildSmartContinuation(contextPreview, topics, isJapanese);
|
|
@@ -29659,6 +29649,79 @@ var init_autocomplete_dropdown = __esm({
|
|
|
29659
29649
|
}
|
|
29660
29650
|
});
|
|
29661
29651
|
|
|
29652
|
+
// node_modules/.pnpm/string-width@8.0.0/node_modules/string-width/index.js
|
|
29653
|
+
function baseVisible(segment) {
|
|
29654
|
+
return segment.replace(leadingNonPrintingRegex, "");
|
|
29655
|
+
}
|
|
29656
|
+
function isZeroWidthCluster(segment) {
|
|
29657
|
+
return zeroWidthClusterRegex.test(segment);
|
|
29658
|
+
}
|
|
29659
|
+
function isDoubleWidthEmojiCluster(segment) {
|
|
29660
|
+
const visible = baseVisible(segment);
|
|
29661
|
+
const baseScalar = visible.codePointAt(0);
|
|
29662
|
+
const baseChar = String.fromCodePoint(baseScalar);
|
|
29663
|
+
const baseIsEmojiPresentation = emojiPresentationRegex.test(baseChar);
|
|
29664
|
+
const hasVs16 = segment.includes("\uFE0F");
|
|
29665
|
+
const hasVs15 = segment.includes("\uFE0E");
|
|
29666
|
+
const codePointCount = [...segment].length;
|
|
29667
|
+
const multiScalarMeaningful = codePointCount > 1 && !(codePointCount === 2 && hasVs15 && !hasVs16);
|
|
29668
|
+
return hasVs16 || baseIsEmojiPresentation && !hasVs15 || multiScalarMeaningful;
|
|
29669
|
+
}
|
|
29670
|
+
function trailingHalfwidthWidth(segment, eastAsianWidthOptions) {
|
|
29671
|
+
let extra = 0;
|
|
29672
|
+
if (segment.length > 1) {
|
|
29673
|
+
for (const char of segment.slice(1)) {
|
|
29674
|
+
if (char >= "\uFF00" && char <= "\uFFEF") {
|
|
29675
|
+
extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions);
|
|
29676
|
+
}
|
|
29677
|
+
}
|
|
29678
|
+
}
|
|
29679
|
+
return extra;
|
|
29680
|
+
}
|
|
29681
|
+
function stringWidth2(input3, options2 = {}) {
|
|
29682
|
+
if (typeof input3 !== "string" || input3.length === 0) {
|
|
29683
|
+
return 0;
|
|
29684
|
+
}
|
|
29685
|
+
const {
|
|
29686
|
+
ambiguousIsNarrow = true,
|
|
29687
|
+
countAnsiEscapeCodes = false
|
|
29688
|
+
} = options2;
|
|
29689
|
+
let string = input3;
|
|
29690
|
+
if (!countAnsiEscapeCodes) {
|
|
29691
|
+
string = stripAnsi(string);
|
|
29692
|
+
}
|
|
29693
|
+
if (string.length === 0) {
|
|
29694
|
+
return 0;
|
|
29695
|
+
}
|
|
29696
|
+
let width = 0;
|
|
29697
|
+
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
29698
|
+
for (const { segment } of segmenter2.segment(string)) {
|
|
29699
|
+
if (isZeroWidthCluster(segment)) {
|
|
29700
|
+
continue;
|
|
29701
|
+
}
|
|
29702
|
+
if (rgiEmojiRegex.test(segment) && isDoubleWidthEmojiCluster(segment)) {
|
|
29703
|
+
width += 2;
|
|
29704
|
+
continue;
|
|
29705
|
+
}
|
|
29706
|
+
const codePoint = baseVisible(segment).codePointAt(0);
|
|
29707
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
29708
|
+
width += trailingHalfwidthWidth(segment, eastAsianWidthOptions);
|
|
29709
|
+
}
|
|
29710
|
+
return width;
|
|
29711
|
+
}
|
|
29712
|
+
var segmenter2, zeroWidthClusterRegex, leadingNonPrintingRegex, rgiEmojiRegex, emojiPresentationRegex;
|
|
29713
|
+
var init_string_width2 = __esm({
|
|
29714
|
+
"node_modules/.pnpm/string-width@8.0.0/node_modules/string-width/index.js"() {
|
|
29715
|
+
init_strip_ansi();
|
|
29716
|
+
init_get_east_asian_width();
|
|
29717
|
+
segmenter2 = new Intl.Segmenter();
|
|
29718
|
+
zeroWidthClusterRegex = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$", "v");
|
|
29719
|
+
leadingNonPrintingRegex = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
|
|
29720
|
+
rgiEmojiRegex = new RegExp("^\\p{RGI_Emoji}$", "v");
|
|
29721
|
+
emojiPresentationRegex = new RegExp("^\\p{Emoji_Presentation}$", "v");
|
|
29722
|
+
}
|
|
29723
|
+
});
|
|
29724
|
+
|
|
29662
29725
|
// src/services/interactive-cli.ts
|
|
29663
29726
|
var interactive_cli_exports = {};
|
|
29664
29727
|
__export(interactive_cli_exports, {
|
|
@@ -29669,6 +29732,7 @@ var init_interactive_cli = __esm({
|
|
|
29669
29732
|
"src/services/interactive-cli.ts"() {
|
|
29670
29733
|
init_command_groups();
|
|
29671
29734
|
init_autocomplete_dropdown();
|
|
29735
|
+
init_string_width2();
|
|
29672
29736
|
InteractiveCLI = class {
|
|
29673
29737
|
rl;
|
|
29674
29738
|
currentInput = "";
|
|
@@ -29683,6 +29747,11 @@ var init_interactive_cli = __esm({
|
|
|
29683
29747
|
// Added: suspend overlays during /code execution
|
|
29684
29748
|
isWaitingForInput = false;
|
|
29685
29749
|
// Added: prevent duplicate enter handling
|
|
29750
|
+
segmenter = null;
|
|
29751
|
+
lastRenderLines = 0;
|
|
29752
|
+
// Track how many terminal lines the last render occupied
|
|
29753
|
+
lastCursorRowOffset = 0;
|
|
29754
|
+
// Row offset within the last rendered block where cursor ended
|
|
29686
29755
|
constructor(options2 = {}) {
|
|
29687
29756
|
this.options = {
|
|
29688
29757
|
maxSuggestions: options2.maxSuggestions || 5,
|
|
@@ -29695,6 +29764,11 @@ var init_interactive_cli = __esm({
|
|
|
29695
29764
|
terminal: true
|
|
29696
29765
|
});
|
|
29697
29766
|
this.dropdown = new AutocompleteDropdown();
|
|
29767
|
+
try {
|
|
29768
|
+
this.segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
29769
|
+
} catch {
|
|
29770
|
+
this.segmenter = null;
|
|
29771
|
+
}
|
|
29698
29772
|
if (process.stdin.isTTY) {
|
|
29699
29773
|
process.stdin.setRawMode(true);
|
|
29700
29774
|
}
|
|
@@ -29820,7 +29894,9 @@ var init_interactive_cli = __esm({
|
|
|
29820
29894
|
* Handle character input
|
|
29821
29895
|
*/
|
|
29822
29896
|
handleCharacter(char) {
|
|
29823
|
-
|
|
29897
|
+
const left = this.sliceByGraphemes(this.currentInput, 0, this.cursorPosition);
|
|
29898
|
+
const right = this.sliceByGraphemes(this.currentInput, this.cursorPosition);
|
|
29899
|
+
this.currentInput = left + char + right;
|
|
29824
29900
|
this.cursorPosition++;
|
|
29825
29901
|
void this.updateSuggestions();
|
|
29826
29902
|
this.render();
|
|
@@ -29830,7 +29906,9 @@ var init_interactive_cli = __esm({
|
|
|
29830
29906
|
*/
|
|
29831
29907
|
handleBackspace() {
|
|
29832
29908
|
if (this.cursorPosition > 0) {
|
|
29833
|
-
|
|
29909
|
+
const left = this.sliceByGraphemes(this.currentInput, 0, this.cursorPosition - 1);
|
|
29910
|
+
const right = this.sliceByGraphemes(this.currentInput, this.cursorPosition);
|
|
29911
|
+
this.currentInput = left + right;
|
|
29834
29912
|
this.cursorPosition--;
|
|
29835
29913
|
void this.updateSuggestions();
|
|
29836
29914
|
this.render();
|
|
@@ -29880,11 +29958,11 @@ var init_interactive_cli = __esm({
|
|
|
29880
29958
|
this.dropdown.hide();
|
|
29881
29959
|
this.isShowingSuggestions = false;
|
|
29882
29960
|
this.suggestions = [];
|
|
29883
|
-
|
|
29884
|
-
readline3__namespace.cursorTo(process.stdout, this.cursorPosition + promptLength);
|
|
29961
|
+
this.render();
|
|
29885
29962
|
} else {
|
|
29886
29963
|
this.currentInput = "";
|
|
29887
29964
|
this.cursorPosition = 0;
|
|
29965
|
+
this.lastRenderLines = 0;
|
|
29888
29966
|
this.render();
|
|
29889
29967
|
}
|
|
29890
29968
|
}
|
|
@@ -29917,7 +29995,7 @@ var init_interactive_cli = __esm({
|
|
|
29917
29995
|
* Move cursor right
|
|
29918
29996
|
*/
|
|
29919
29997
|
moveCursorRight() {
|
|
29920
|
-
if (this.cursorPosition < this.currentInput
|
|
29998
|
+
if (this.cursorPosition < this.countGraphemes(this.currentInput)) {
|
|
29921
29999
|
this.cursorPosition++;
|
|
29922
30000
|
this.render();
|
|
29923
30001
|
}
|
|
@@ -29954,14 +30032,75 @@ var init_interactive_cli = __esm({
|
|
|
29954
30032
|
if (this.overlaysSuspended) {
|
|
29955
30033
|
return;
|
|
29956
30034
|
}
|
|
29957
|
-
|
|
29958
|
-
|
|
30035
|
+
const stdout2 = process.stdout;
|
|
30036
|
+
const columns = Math.max(1, stdout2.columns || 80);
|
|
30037
|
+
readline3__namespace.cursorTo(stdout2, 0);
|
|
30038
|
+
if (this.lastRenderLines > 0) {
|
|
30039
|
+
if (this.lastCursorRowOffset > 0) {
|
|
30040
|
+
readline3__namespace.moveCursor(stdout2, 0, -this.lastCursorRowOffset);
|
|
30041
|
+
}
|
|
30042
|
+
if (this.lastRenderLines > 1) {
|
|
30043
|
+
readline3__namespace.moveCursor(stdout2, 0, this.lastRenderLines - 1);
|
|
30044
|
+
}
|
|
30045
|
+
for (let i2 = 0; i2 < this.lastRenderLines; i2++) {
|
|
30046
|
+
readline3__namespace.clearLine(stdout2, 0);
|
|
30047
|
+
if (i2 < this.lastRenderLines - 1) {
|
|
30048
|
+
readline3__namespace.moveCursor(stdout2, 0, -1);
|
|
30049
|
+
}
|
|
30050
|
+
}
|
|
30051
|
+
readline3__namespace.cursorTo(stdout2, 0);
|
|
30052
|
+
}
|
|
29959
30053
|
const prompt = chalk28__default.default.cyan("> ");
|
|
29960
30054
|
const displayInput = this.currentInput;
|
|
29961
|
-
|
|
29962
|
-
const
|
|
29963
|
-
const
|
|
29964
|
-
|
|
30055
|
+
stdout2.write(prompt + displayInput);
|
|
30056
|
+
const promptColumns = 2;
|
|
30057
|
+
const totalColumns = promptColumns + stringWidth2(displayInput);
|
|
30058
|
+
const newRenderLines = Math.max(1, Math.ceil(totalColumns / columns));
|
|
30059
|
+
const leftText = this.sliceByGraphemes(displayInput, 0, this.cursorPosition);
|
|
30060
|
+
const leftColumns = stringWidth2(leftText);
|
|
30061
|
+
const cursorAbsolute = promptColumns + leftColumns;
|
|
30062
|
+
const targetRowOffset = Math.floor(cursorAbsolute / columns);
|
|
30063
|
+
const targetCol = cursorAbsolute % columns;
|
|
30064
|
+
if (newRenderLines > 1) {
|
|
30065
|
+
readline3__namespace.moveCursor(stdout2, 0, -(newRenderLines - 1));
|
|
30066
|
+
}
|
|
30067
|
+
readline3__namespace.cursorTo(stdout2, 0);
|
|
30068
|
+
if (targetRowOffset > 0) {
|
|
30069
|
+
readline3__namespace.moveCursor(stdout2, 0, targetRowOffset);
|
|
30070
|
+
}
|
|
30071
|
+
readline3__namespace.cursorTo(stdout2, targetCol);
|
|
30072
|
+
this.lastRenderLines = newRenderLines;
|
|
30073
|
+
this.lastCursorRowOffset = targetRowOffset;
|
|
30074
|
+
}
|
|
30075
|
+
/**
|
|
30076
|
+
* Count graphemes (visible characters)
|
|
30077
|
+
*/
|
|
30078
|
+
countGraphemes(input3) {
|
|
30079
|
+
if (!input3) return 0;
|
|
30080
|
+
if (this.segmenter) {
|
|
30081
|
+
let count = 0;
|
|
30082
|
+
for (const _ of this.segmenter.segment(input3)) count++;
|
|
30083
|
+
return count;
|
|
30084
|
+
}
|
|
30085
|
+
return Array.from(input3).length;
|
|
30086
|
+
}
|
|
30087
|
+
/**
|
|
30088
|
+
* Slice string by grapheme indices [start, end)
|
|
30089
|
+
*/
|
|
30090
|
+
sliceByGraphemes(input3, start, end) {
|
|
30091
|
+
if (!input3) return "";
|
|
30092
|
+
if (start < 0) start = 0;
|
|
30093
|
+
if (end !== void 0 && end < start) end = start;
|
|
30094
|
+
if (this.segmenter) {
|
|
30095
|
+
const segs = Array.from(this.segmenter.segment(input3));
|
|
30096
|
+
const s3 = Math.min(start, segs.length);
|
|
30097
|
+
const e3 = end === void 0 ? segs.length : Math.min(end, segs.length);
|
|
30098
|
+
return segs.slice(s3, e3).map((seg) => seg.segment).join("");
|
|
30099
|
+
}
|
|
30100
|
+
const arr = Array.from(input3);
|
|
30101
|
+
const s2 = Math.min(start, arr.length);
|
|
30102
|
+
const e2 = end === void 0 ? arr.length : Math.min(end, arr.length);
|
|
30103
|
+
return arr.slice(s2, e2).join("");
|
|
29965
30104
|
}
|
|
29966
30105
|
/**
|
|
29967
30106
|
* Update only the selection indicator without redrawing the entire box
|
|
@@ -29970,8 +30109,9 @@ var init_interactive_cli = __esm({
|
|
|
29970
30109
|
if (!this.isShowingSuggestions || this.suggestions.length === 0) {
|
|
29971
30110
|
return;
|
|
29972
30111
|
}
|
|
29973
|
-
const
|
|
29974
|
-
const
|
|
30112
|
+
const promptColumns = 2;
|
|
30113
|
+
const leftText = this.sliceByGraphemes(this.currentInput, 0, this.cursorPosition);
|
|
30114
|
+
const savedX = promptColumns + stringWidth2(leftText);
|
|
29975
30115
|
readline3__namespace.moveCursor(process.stdout, 0, 2);
|
|
29976
30116
|
this.suggestions.forEach((suggestion, index2) => {
|
|
29977
30117
|
const isSelected = index2 === this.selectedIndex;
|
|
@@ -29995,8 +30135,9 @@ var init_interactive_cli = __esm({
|
|
|
29995
30135
|
* Render autocomplete suggestions - downward only
|
|
29996
30136
|
*/
|
|
29997
30137
|
renderSuggestionsDownward() {
|
|
29998
|
-
const
|
|
29999
|
-
const
|
|
30138
|
+
const promptColumns = 2;
|
|
30139
|
+
const leftText = this.sliceByGraphemes(this.currentInput, 0, this.cursorPosition);
|
|
30140
|
+
const savedX = promptColumns + stringWidth2(leftText);
|
|
30000
30141
|
process.stdout.write("\n");
|
|
30001
30142
|
process.stdout.write(chalk28__default.default.white("\u256D\u2500\u2500\u2500\u2500 Command Suggestions \u2500\u2500\u2500\u2500\u256E\n"));
|
|
30002
30143
|
this.suggestions.forEach((suggestion, index2) => {
|
|
@@ -30039,6 +30180,7 @@ var init_interactive_cli = __esm({
|
|
|
30039
30180
|
this.suggestions = [];
|
|
30040
30181
|
this.selectedIndex = 0;
|
|
30041
30182
|
this.previousSuggestionsCount = 0;
|
|
30183
|
+
this.lastRenderLines = 0;
|
|
30042
30184
|
readline3__namespace.cursorTo(process.stdout, 0);
|
|
30043
30185
|
readline3__namespace.clearLine(process.stdout, 0);
|
|
30044
30186
|
}
|
|
@@ -30052,6 +30194,7 @@ var init_interactive_cli = __esm({
|
|
|
30052
30194
|
this.selectedIndex = 0;
|
|
30053
30195
|
this.isShowingSuggestions = false;
|
|
30054
30196
|
this.isWaitingForInput = true;
|
|
30197
|
+
this.lastRenderLines = 0;
|
|
30055
30198
|
process.stdout.write(prompt);
|
|
30056
30199
|
return new Promise((resolve8) => {
|
|
30057
30200
|
const handler = (input3) => {
|
|
@@ -30068,6 +30211,7 @@ var init_interactive_cli = __esm({
|
|
|
30068
30211
|
prompt() {
|
|
30069
30212
|
this.currentInput = "";
|
|
30070
30213
|
this.cursorPosition = 0;
|
|
30214
|
+
this.lastRenderLines = 0;
|
|
30071
30215
|
this.render();
|
|
30072
30216
|
}
|
|
30073
30217
|
/**
|
|
@@ -30081,6 +30225,7 @@ var init_interactive_cli = __esm({
|
|
|
30081
30225
|
process.stdin.setRawMode(false);
|
|
30082
30226
|
}
|
|
30083
30227
|
this.rl.close();
|
|
30228
|
+
this.lastRenderLines = 0;
|
|
30084
30229
|
}
|
|
30085
30230
|
/**
|
|
30086
30231
|
* Get readline interface
|
|
@@ -48291,7 +48436,7 @@ var init_about_command = __esm({
|
|
|
48291
48436
|
async execute(args2, context2) {
|
|
48292
48437
|
const output3 = [];
|
|
48293
48438
|
output3.push("");
|
|
48294
|
-
output3.push(chalk28__default.default.cyan.bold("\u{1F916} About MARIA v4.2.
|
|
48439
|
+
output3.push(chalk28__default.default.cyan.bold("\u{1F916} About MARIA v4.2.27"));
|
|
48295
48440
|
output3.push(chalk28__default.default.gray("\u2550".repeat(40)));
|
|
48296
48441
|
output3.push("");
|
|
48297
48442
|
output3.push(chalk28__default.default.white.bold("MARIA - Minimal API, Maximum Power"));
|
|
@@ -59798,8 +59943,7 @@ async function startInteractiveSession() {
|
|
|
59798
59943
|
if (interactiveCLI) {
|
|
59799
59944
|
while (true) {
|
|
59800
59945
|
try {
|
|
59801
|
-
|
|
59802
|
-
process.stdout.write(prompt);
|
|
59946
|
+
interactiveCLI.prompt();
|
|
59803
59947
|
const line = await interactiveCLI.question("");
|
|
59804
59948
|
console.log();
|
|
59805
59949
|
if (line.toLowerCase() === "exit" || line.toLowerCase() === "quit") {
|