@bonginkan/maria 4.3.34 → 4.3.35

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/cli.cjs CHANGED
@@ -1709,7 +1709,7 @@ var init_AuthenticationManager = __esm({
1709
1709
  const response = await fetch(`${this.apiBase}/api/user/profile`, {
1710
1710
  headers: {
1711
1711
  "Authorization": `Bearer ${tokens2.accessToken}`,
1712
- "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.34"}`
1712
+ "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.35"}`
1713
1713
  }
1714
1714
  });
1715
1715
  if (response.status === 401) {
@@ -2412,7 +2412,7 @@ async function callApi(path64, init3 = {}) {
2412
2412
  "Authorization": `Bearer ${token}`,
2413
2413
  "X-Device-Id": getDeviceId(),
2414
2414
  "X-Session-Id": getSessionId() || "",
2415
- "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.34"}`,
2415
+ "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.35"}`,
2416
2416
  "Content-Type": init3.headers?.["Content-Type"] || "application/json"
2417
2417
  });
2418
2418
  const doFetch = async (token) => {
@@ -12237,8 +12237,10 @@ var init_ReadyCommandsService = __esm({
12237
12237
  category,
12238
12238
  aliases: [],
12239
12239
  description: cmd.description || descriptions[commandName] || "No description available",
12240
- usage: `/${commandName} [options]`,
12241
- examples: [`/${commandName}`],
12240
+ usage: typeof cmd.usage === "string" ? cmd.usage : `/${commandName} [options]`,
12241
+ examples: Array.isArray(cmd.examples) ? cmd.examples : [`/${commandName}`],
12242
+ // flags is optional; keep it if present to power /help details
12243
+ ...cmd.flags && typeof cmd.flags === "object" ? { flags: cmd.flags } : {},
12242
12244
  status: "READY" /* READY */,
12243
12245
  contract: {
12244
12246
  tty: true,
@@ -12745,40 +12747,30 @@ var init_HelpCommand = __esm({
12745
12747
  examples = [
12746
12748
  {
12747
12749
  input: "/help",
12748
- _description: "Show READY commands with GPU labels",
12750
+ description: "Show READY commands with GPU labels",
12749
12751
  output: "Contract-validated commands with performance info"
12750
12752
  },
12751
12753
  {
12752
12754
  input: "/help code",
12753
- _description: "Show detailed help for specific command",
12755
+ description: "Show detailed help for specific command",
12754
12756
  output: "Usage, examples, and contract info for /code"
12755
12757
  },
12756
12758
  {
12757
12759
  input: "/help --category ai",
12758
- _description: "Show all READY commands in AI category",
12760
+ description: "Show all READY commands in AI category",
12759
12761
  output: "List of AI READY commands with GPU labels"
12760
12762
  },
12761
12763
  {
12762
12764
  input: '/help --search "config"',
12763
- _description: "Search READY commands for configuration",
12765
+ description: "Search READY commands for configuration",
12764
12766
  output: 'READY commands matching "config" with match scores'
12765
- },
12766
- {
12767
- input: "/help --stats",
12768
- _description: "Show READY command statistics",
12769
- output: "Performance stats and command counts"
12770
- },
12771
- {
12772
- input: "/help --quickstart",
12773
- _description: "Show essential commands for getting started",
12774
- output: "Most important READY commands for new users"
12775
12767
  }
12776
12768
  ];
12777
12769
  async execute(args2, context2) {
12778
12770
  const startTime = Date.now();
12779
12771
  try {
12780
12772
  const { parsed, options } = args2;
12781
- const _positional = parsed["_positional"] || [];
12773
+ const _positional = parsed["positional"] || parsed["_positional"] || [];
12782
12774
  if (options && options["stats"]) {
12783
12775
  const result2 = await this.showStatistics();
12784
12776
  await this.trackSuccess(startTime, context2);
@@ -12803,7 +12795,9 @@ var init_HelpCommand = __esm({
12803
12795
  return result2;
12804
12796
  }
12805
12797
  if (options && options["search"]) {
12806
- const result2 = await this.searchCommands(options["search"]);
12798
+ const proxy = (process.env.HELP_SEARCH_PROXY ?? "1").toLowerCase();
12799
+ const shouldProxy = proxy !== "0" && proxy !== "false";
12800
+ const result2 = shouldProxy ? await this.showGeneralHelp() : await this.searchCommands(options["search"]);
12807
12801
  await this.trackSuccess(startTime, context2);
12808
12802
  return result2;
12809
12803
  }
@@ -12815,7 +12809,7 @@ var init_HelpCommand = __esm({
12815
12809
  cmd: "help",
12816
12810
  status: "error",
12817
12811
  latencyMs: Date.now() - startTime,
12818
- plan: getUserPlan(),
12812
+ plan: await getUserPlan(),
12819
12813
  quotaLeft: context2.quotaLeft || 999
12820
12814
  });
12821
12815
  return this.error(
@@ -12833,7 +12827,7 @@ var init_HelpCommand = __esm({
12833
12827
  cmd: "help",
12834
12828
  status: "success",
12835
12829
  latencyMs: Date.now() - startTime,
12836
- plan: getUserPlan(),
12830
+ plan: await getUserPlan(),
12837
12831
  quotaLeft: context2.quotaLeft || 999
12838
12832
  });
12839
12833
  }
@@ -12863,9 +12857,6 @@ var init_HelpCommand = __esm({
12863
12857
  lines.push("");
12864
12858
  lines.push(chalk40__default.default.bold("Quick Access:"));
12865
12859
  lines.push(" /help <command> - Detailed help for specific command");
12866
- lines.push(" /help --quickstart - Essential commands for new users");
12867
- lines.push(" /help --stats - Performance statistics");
12868
- lines.push(" /help --search <term> - Search with fuzzy matching");
12869
12860
  lines.push("");
12870
12861
  let globalMaxNameLength = 0;
12871
12862
  for (const category of categories2) {
@@ -12987,49 +12978,50 @@ var init_HelpCommand = __esm({
12987
12978
  }
12988
12979
  );
12989
12980
  }
12990
- const lines = this.formatCommandHelp(command);
12981
+ const lines = this.formatMinimalUsage(command);
12991
12982
  return this.success(lines);
12992
12983
  }
12993
12984
  /**
12994
12985
  * Format detailed help for a command
12995
12986
  */
12996
- formatCommandHelp(command) {
12987
+ formatMinimalUsage(command) {
12997
12988
  const lines = [];
12989
+ lines.push(`Usage: ${command.usage}`);
12998
12990
  lines.push("");
12999
- lines.push(`\u{1F4D6} ${chalk40__default.default.bold(`/${command.name}`)} - ${command.description}`);
13000
- lines.push("\u2550".repeat(50));
13001
- lines.push("");
13002
- lines.push(chalk40__default.default.bold("\u2139\uFE0F Information:"));
13003
- lines.push(` Category: ${this.readyService["getCategoryEmoji"](command.category)} ${command.category}`);
13004
- lines.push(` Status: \u2705 READY (contract validated)`);
13005
- if (command.aliases && command.aliases.length > 0) {
13006
- lines.push(` Aliases: ${command.aliases.map((a) => `/${a}`).join(", ")}`);
12991
+ const flags = command.flags;
12992
+ const effective = flags && Object.keys(flags).length > 0 ? flags : this.extractFlagsFromUsage(command.usage);
12993
+ if (effective && Object.keys(effective).length > 0) {
12994
+ lines.push("Flags:");
12995
+ const entries = Object.entries(effective).sort(([a], [b]) => a.localeCompare(b));
12996
+ for (const [k, v] of entries) {
12997
+ const hint = v ? ` ${v}` : "";
12998
+ lines.push(` --${k}${hint}`);
12999
+ }
13007
13000
  }
13008
- lines.push("");
13009
- lines.push(chalk40__default.default.bold("\u{1F3AF} Usage:"));
13010
- lines.push(` ${command.usage}`);
13011
- lines.push("");
13012
- lines.push(chalk40__default.default.bold("\u{1F4CB} Contract Validation:"));
13013
- lines.push(` \u26A1 Performance: ${command.contract.maxResponseTime}ms (tested)`);
13014
- lines.push(` \u{1F4BB} TTY Mode: ${command.contract.tty ? "\u2705 Supported" : "\u274C Not supported"}`);
13015
- lines.push(` \u{1F527} Non-TTY Mode: ${command.contract.nonTty ? "\u2705 Supported" : "\u274C Not supported"}`);
13016
- lines.push(` \u{1F500} Pipe Mode: ${command.contract.pipe ? "\u2705 Supported" : "\u274C Not supported"}`);
13017
- lines.push("");
13018
- if (command.examples && command.examples.length > 0) {
13019
- lines.push(chalk40__default.default.bold("\u{1F4DD} Examples:"));
13020
- for (const example of command.examples) {
13021
- lines.push(` ${example}`);
13001
+ return lines.join("\n");
13002
+ }
13003
+ extractFlagsFromUsage(usage) {
13004
+ if (!usage || typeof usage !== "string") return void 0;
13005
+ const out = {};
13006
+ const pattern = /--([a-zA-Z0-9][a-zA-Z0-9\-]*)\s*([^\]\s][^\]]*)?/g;
13007
+ const blocks = usage.match(/\[[^\]]+\]/g) || [];
13008
+ for (const b of blocks) {
13009
+ let m3;
13010
+ pattern.lastIndex = 0;
13011
+ while ((m3 = pattern.exec(b)) !== null) {
13012
+ const key = m3[1];
13013
+ const hint = (m3[2] || "").trim();
13014
+ out[key] = hint;
13022
13015
  }
13023
- lines.push("");
13024
13016
  }
13025
- lines.push(chalk40__default.default.bold("\u{1F4A1} Quick Tips:"));
13026
- lines.push(` \u2022 This command is production-ready and fully tested`);
13027
- lines.push(` \u2022 Try /${command.name} --help for additional options`);
13028
- if (command.category !== "core") {
13029
- lines.push(` \u2022 See more ${command.category} commands: /help --category ${command.category}`);
13017
+ let m2;
13018
+ pattern.lastIndex = 0;
13019
+ while ((m2 = pattern.exec(usage)) !== null) {
13020
+ const key = m2[1];
13021
+ const hint = (m2[2] || "").trim();
13022
+ if (!(key in out)) out[key] = hint;
13030
13023
  }
13031
- lines.push("");
13032
- return lines.join("\n");
13024
+ return Object.keys(out).length ? out : void 0;
13033
13025
  }
13034
13026
  /**
13035
13027
  * Show category help
@@ -13163,8 +13155,6 @@ var init_HelpCommand = __esm({
13163
13155
  }
13164
13156
  lines.push("");
13165
13157
  lines.push(chalk40__default.default.bold("\u{1F4A1} Next Steps:"));
13166
- lines.push(" \u2022 /help --category <name> - Explore command categories");
13167
- lines.push(" \u2022 /help --search <term> - Find specific functionality");
13168
13158
  lines.push(" \u2022 /help <command> - Get detailed command help");
13169
13159
  lines.push("");
13170
13160
  return this.success(lines.join("\n"));
@@ -13218,9 +13208,7 @@ var init_HelpCommand = __esm({
13218
13208
  "/help",
13219
13209
  "/help code",
13220
13210
  "/help --category ai",
13221
- "/help --search config",
13222
- "/help --quickstart",
13223
- "/help --stats"
13211
+ "/help --search config"
13224
13212
  ],
13225
13213
  deps: []
13226
13214
  };
@@ -16180,8 +16168,8 @@ var require_package = __commonJS({
16180
16168
  "package.json"(exports, module) {
16181
16169
  module.exports = {
16182
16170
  name: "@bonginkan/maria",
16183
- version: "4.3.34",
16184
- description: "\u{1F680} MARIA v4.3.34 - Enterprise AI Development Platform with identity system and character voice implementation. 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.",
16171
+ version: "4.3.35",
16172
+ description: "\u{1F680} MARIA v4.3.35 - Enterprise AI Development Platform with identity system and character voice implementation. 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.",
16185
16173
  keywords: [
16186
16174
  "ai",
16187
16175
  "cli",
@@ -25909,7 +25897,7 @@ var init_about_command = __esm({
25909
25897
  async execute(args2, context2) {
25910
25898
  const output3 = [];
25911
25899
  output3.push("");
25912
- output3.push(chalk40__default.default.cyan.bold("\u{1F916} About MARIA v4.3.34"));
25900
+ output3.push(chalk40__default.default.cyan.bold("\u{1F916} About MARIA v4.3.35"));
25913
25901
  output3.push(chalk40__default.default.gray("\u2550".repeat(40)));
25914
25902
  output3.push("");
25915
25903
  output3.push(chalk40__default.default.white.bold("MARIA - Minimal API, Maximum Power"));