@bonginkan/maria 3.1.2 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/maria.cjs +28 -27
- package/dist/bin/maria.cjs.map +1 -1
- package/dist/cli.cjs +3 -1
- package/dist/cli.cjs.map +1 -1
- package/package.json +1 -1
package/dist/bin/maria.cjs
CHANGED
|
@@ -10095,7 +10095,9 @@ var init_command_groups = __esm({
|
|
|
10095
10095
|
since: "v2.5.0",
|
|
10096
10096
|
replacedBy: "/mode",
|
|
10097
10097
|
message: "Use /mode for switching AI modes"
|
|
10098
|
-
}
|
|
10098
|
+
},
|
|
10099
|
+
hidden: true
|
|
10100
|
+
// Hidden from help display
|
|
10099
10101
|
},
|
|
10100
10102
|
"/init": {
|
|
10101
10103
|
name: "/init",
|
|
@@ -28559,10 +28561,10 @@ var init_unified_command_registry = __esm({
|
|
|
28559
28561
|
* Register a command in the unified registry
|
|
28560
28562
|
*/
|
|
28561
28563
|
register(commandInfo3) {
|
|
28562
|
-
this.
|
|
28563
|
-
if (commandInfo3.
|
|
28564
|
-
for (const alias2 of commandInfo3.
|
|
28565
|
-
this.
|
|
28564
|
+
this._commands.set(commandInfo3.name, commandInfo3);
|
|
28565
|
+
if (commandInfo3._aliases) {
|
|
28566
|
+
for (const alias2 of commandInfo3._aliases) {
|
|
28567
|
+
this._aliases.set(alias2, commandInfo3.name);
|
|
28566
28568
|
}
|
|
28567
28569
|
}
|
|
28568
28570
|
console.debug(import_chalk23.default.gray(`\u{1F4DD} Registered command: ${commandInfo3.name} (${commandInfo3.category})`));
|
|
@@ -28572,12 +28574,12 @@ var init_unified_command_registry = __esm({
|
|
|
28572
28574
|
*/
|
|
28573
28575
|
async execute(command2, args2 = [], maria2, memoryEngine2, memoryCoordinator2) {
|
|
28574
28576
|
const _cleanCommand = command2.startsWith("/") ? command2.slice(1) : command2;
|
|
28575
|
-
const _actualCommand = this.
|
|
28576
|
-
const _commandInfo = this.
|
|
28577
|
+
const _actualCommand = this._aliases.get(_cleanCommand) || _cleanCommand;
|
|
28578
|
+
const _commandInfo = this._commands.get(_actualCommand);
|
|
28577
28579
|
if (_commandInfo) {
|
|
28578
28580
|
try {
|
|
28579
28581
|
console.debug(import_chalk23.default.gray(`\u{1F527} Executing unified command: ${_actualCommand}`));
|
|
28580
|
-
return await
|
|
28582
|
+
return await _commandInfo.handler(args2, maria2, memoryEngine2, memoryCoordinator2);
|
|
28581
28583
|
} catch (error2) {
|
|
28582
28584
|
console.error(import_chalk23.default.red(`\u26A0\uFE0F Unified command error for '${_cleanCommand}':`), error2);
|
|
28583
28585
|
return true;
|
|
@@ -28595,7 +28597,7 @@ var init_unified_command_registry = __esm({
|
|
|
28595
28597
|
}
|
|
28596
28598
|
};
|
|
28597
28599
|
const _result = await this.slashCommandHandler.handleCommand(command2, args2, _context);
|
|
28598
|
-
return
|
|
28600
|
+
return _result.success;
|
|
28599
28601
|
} catch (error2) {
|
|
28600
28602
|
console.error(import_chalk23.default.red(`\u26A0\uFE0F Slash command error for '${command2}':`), error2);
|
|
28601
28603
|
return true;
|
|
@@ -28614,7 +28616,7 @@ var init_unified_command_registry = __esm({
|
|
|
28614
28616
|
*/
|
|
28615
28617
|
has(command2) {
|
|
28616
28618
|
const _cleanCommand = command2.startsWith("/") ? command2.slice(1) : command2;
|
|
28617
|
-
return this.
|
|
28619
|
+
return this._commands.has(_cleanCommand) || this._aliases.has(_cleanCommand) || this.legacyRegistry.has(_cleanCommand) || this.isSlashCommandAvailable(command2);
|
|
28618
28620
|
}
|
|
28619
28621
|
/**
|
|
28620
28622
|
* Check if slash command is available (simplified check)
|
|
@@ -28634,20 +28636,19 @@ var init_unified_command_registry = __esm({
|
|
|
28634
28636
|
"/config",
|
|
28635
28637
|
"/status",
|
|
28636
28638
|
"/doctor",
|
|
28637
|
-
"/brain",
|
|
28638
28639
|
"/mode",
|
|
28639
28640
|
"/setup",
|
|
28640
28641
|
"/upgrade",
|
|
28641
28642
|
"/login",
|
|
28642
28643
|
"/logout"
|
|
28643
28644
|
];
|
|
28644
|
-
return
|
|
28645
|
+
return _commonSlashCommands.includes(command2);
|
|
28645
28646
|
}
|
|
28646
28647
|
/**
|
|
28647
28648
|
* Get all available _commands
|
|
28648
28649
|
*/
|
|
28649
28650
|
getCommands() {
|
|
28650
|
-
return Array.from(this.
|
|
28651
|
+
return Array.from(this._commands.values()).sort(
|
|
28651
28652
|
(a2, b) => a2.category.localeCompare(b.category) || a2.name.localeCompare(b.name)
|
|
28652
28653
|
);
|
|
28653
28654
|
}
|
|
@@ -28655,7 +28656,7 @@ var init_unified_command_registry = __esm({
|
|
|
28655
28656
|
* Get _commands by category
|
|
28656
28657
|
*/
|
|
28657
28658
|
getCommandsByCategory(category2) {
|
|
28658
|
-
return Array.from(this.
|
|
28659
|
+
return Array.from(this._commands.values()).filter((cmd2) => cmd2.category === category2).sort((a2, b) => a2.name.localeCompare(b.name));
|
|
28659
28660
|
}
|
|
28660
28661
|
/**
|
|
28661
28662
|
* Get help information for a command
|
|
@@ -28667,16 +28668,16 @@ var init_unified_command_registry = __esm({
|
|
|
28667
28668
|
if (!_commandInfo) {
|
|
28668
28669
|
return import_chalk23.default.red(`Command '${_cleanCommand}' not found`);
|
|
28669
28670
|
}
|
|
28670
|
-
let help = import_chalk23.default.cyan(`/${
|
|
28671
|
-
if (
|
|
28672
|
-
help += "\n" + import_chalk23.default.gray("Usage: ") +
|
|
28671
|
+
let help = import_chalk23.default.cyan(`/${_commandInfo.name}`) + " - " + _commandInfo.description;
|
|
28672
|
+
if (_commandInfo.usage) {
|
|
28673
|
+
help += "\n" + import_chalk23.default.gray("Usage: ") + _commandInfo.usage;
|
|
28673
28674
|
}
|
|
28674
|
-
if (
|
|
28675
|
-
help += "\n" + import_chalk23.default.gray("Aliases: ") +
|
|
28675
|
+
if (_commandInfo._aliases && _commandInfo._aliases.length > 0) {
|
|
28676
|
+
help += "\n" + import_chalk23.default.gray("Aliases: ") + _commandInfo._aliases.map((a2) => `/${a2}`).join(", ");
|
|
28676
28677
|
}
|
|
28677
|
-
if (
|
|
28678
|
+
if (_commandInfo.examples && _commandInfo.examples.length > 0) {
|
|
28678
28679
|
help += "\n" + import_chalk23.default.gray("Examples:");
|
|
28679
|
-
for (const example of
|
|
28680
|
+
for (const example of _commandInfo.examples) {
|
|
28680
28681
|
help += "\n " + import_chalk23.default.dim(example);
|
|
28681
28682
|
}
|
|
28682
28683
|
}
|
|
@@ -28727,7 +28728,7 @@ var init_unified_command_registry = __esm({
|
|
|
28727
28728
|
usage: "/version",
|
|
28728
28729
|
examples: ["/version"],
|
|
28729
28730
|
handler: async () => {
|
|
28730
|
-
console.log(`MARIA
|
|
28731
|
+
console.log(`MARIA v3.1.2`);
|
|
28731
28732
|
return true;
|
|
28732
28733
|
}
|
|
28733
28734
|
});
|
|
@@ -28758,10 +28759,10 @@ var init_unified_command_registry = __esm({
|
|
|
28758
28759
|
const _commands = this.getCommands();
|
|
28759
28760
|
const _categories = /* @__PURE__ */ new Map();
|
|
28760
28761
|
for (const cmd2 of _commands) {
|
|
28761
|
-
if (!
|
|
28762
|
-
|
|
28762
|
+
if (!_categories.has(cmd2.category)) {
|
|
28763
|
+
_categories.set(cmd2.category, []);
|
|
28763
28764
|
}
|
|
28764
|
-
|
|
28765
|
+
_categories.get(cmd2.category).push(cmd2);
|
|
28765
28766
|
}
|
|
28766
28767
|
console.log(import_chalk23.default.cyan("\n\u{1F4DA} Available Commands:\n"));
|
|
28767
28768
|
for (const [category2, categoryCommands] of _categories) {
|
|
@@ -28771,7 +28772,7 @@ var init_unified_command_registry = __esm({
|
|
|
28771
28772
|
console.log(import_chalk23.default.bold.magenta(`${this.getCategoryIcon(category2)} ${this.getCategoryName(category2)}`));
|
|
28772
28773
|
for (const cmd2 of categoryCommands) {
|
|
28773
28774
|
if (cmd2.hidden) continue;
|
|
28774
|
-
const _aliases = cmd2.
|
|
28775
|
+
const _aliases = cmd2._aliases ? import_chalk23.default.gray(` (${cmd2._aliases.map((a2) => `/${a2}`).join(", ")})`) : "";
|
|
28775
28776
|
console.log(` ${import_chalk23.default.cyan(`/${cmd2.name}`)}${_aliases} - ${cmd2.description}`);
|
|
28776
28777
|
}
|
|
28777
28778
|
console.log();
|
|
@@ -37724,7 +37725,7 @@ var init_package = __esm({
|
|
|
37724
37725
|
"package.json"() {
|
|
37725
37726
|
package_default = {
|
|
37726
37727
|
name: "@bonginkan/maria",
|
|
37727
|
-
version: "3.1.
|
|
37728
|
+
version: "3.1.3",
|
|
37728
37729
|
description: "\u{1F680} MARIA v3.1.2 - Minimal API, Maximum Power. Fixed hardcoded Tetris template issue - now only generates on explicit request. Dynamic theme support added.",
|
|
37729
37730
|
keywords: [
|
|
37730
37731
|
"ai",
|