@bonginkan/maria 4.2.6 → 4.2.7

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.
@@ -155,13 +155,13 @@ function getPackageJson() {
155
155
  )
156
156
  ];
157
157
  let packageJsonPath = null;
158
- for (const path12 of possiblePaths) {
159
- if ((0, import_fs.existsSync)(path12)) {
158
+ for (const path14 of possiblePaths) {
159
+ if ((0, import_fs.existsSync)(path14)) {
160
160
  try {
161
- const content = (0, import_fs.readFileSync)(path12, "utf-8");
161
+ const content = (0, import_fs.readFileSync)(path14, "utf-8");
162
162
  const parsed = JSON.parse(content);
163
163
  if (parsed.name === "@bonginkan/maria") {
164
- packageJsonPath = path12;
164
+ packageJsonPath = path14;
165
165
  break;
166
166
  }
167
167
  } catch {
@@ -395,25 +395,8 @@ async function displayFinalStartupScreen(_selectedProvider, _selectedModel) {
395
395
  );
396
396
  const cwd = systemInfo.cwd.replace(os.homedir(), "~");
397
397
  console.log(import_chalk.default.gray("cwd: ") + import_chalk.default.white(cwd));
398
- try {
399
- const { authManager: authManager2 } = await import("../cli-auth/index.js").catch(() => ({ authManager: null }));
400
- if (authManager2 && await authManager2.isAuthenticated()) {
401
- try {
402
- const user = await authManager2.getCurrentUser();
403
- console.log(import_chalk.default.green(`Signed in: ${user.email}`));
404
- console.log(import_chalk.default.yellow("Tip: /help \xB7 /help code \xB7 /usage"));
405
- } catch {
406
- console.log(import_chalk.default.green("Signed in"));
407
- console.log(import_chalk.default.yellow("Tip: /help \xB7 /help code \xB7 /usage"));
408
- }
409
- } else {
410
- console.log(import_chalk.default.gray("Not signed in"));
411
- console.log(import_chalk.default.yellow("Tip: /login \xB7 /help \xB7 /help code"));
412
- }
413
- } catch {
414
- console.log(import_chalk.default.gray("Not signed in"));
415
- console.log(import_chalk.default.yellow("Tip: /login \xB7 /help \xB7 /help code"));
416
- }
398
+ console.log(import_chalk.default.gray("Not signed in"));
399
+ console.log(import_chalk.default.yellow("Tip: /login \xB7 /help \xB7 /help code"));
417
400
  console.log("");
418
401
  }
419
402
  function displayRoundedInputBox() {
@@ -469,22 +452,22 @@ function dataUriToBuffer(uri) {
469
452
  if (firstComma === -1 || firstComma <= 4) {
470
453
  throw new TypeError("malformed data: URI");
471
454
  }
472
- const meta5 = uri.substring(5, firstComma).split(";");
455
+ const meta4 = uri.substring(5, firstComma).split(";");
473
456
  let charset = "";
474
457
  let base64 = false;
475
- const type = meta5[0] || "text/plain";
458
+ const type = meta4[0] || "text/plain";
476
459
  let typeFull = type;
477
- for (let i2 = 1; i2 < meta5.length; i2++) {
478
- if (meta5[i2] === "base64") {
460
+ for (let i2 = 1; i2 < meta4.length; i2++) {
461
+ if (meta4[i2] === "base64") {
479
462
  base64 = true;
480
- } else if (meta5[i2]) {
481
- typeFull += `;${meta5[i2]}`;
482
- if (meta5[i2].indexOf("charset=") === 0) {
483
- charset = meta5[i2].substring(8);
463
+ } else if (meta4[i2]) {
464
+ typeFull += `;${meta4[i2]}`;
465
+ if (meta4[i2].indexOf("charset=") === 0) {
466
+ charset = meta4[i2].substring(8);
484
467
  }
485
468
  }
486
469
  }
487
- if (!meta5[0] && !charset.length) {
470
+ if (!meta4[0] && !charset.length) {
488
471
  typeFull += ";charset=US-ASCII";
489
472
  charset = "US-ASCII";
490
473
  }
@@ -5263,22 +5246,22 @@ var init_from = __esm({
5263
5246
  init_file();
5264
5247
  init_fetch_blob();
5265
5248
  ({ stat } = import_node_fs.promises);
5266
- blobFromSync = (path12, type) => fromBlob((0, import_node_fs.statSync)(path12), path12, type);
5267
- blobFrom = (path12, type) => stat(path12).then((stat2) => fromBlob(stat2, path12, type));
5268
- fileFrom = (path12, type) => stat(path12).then((stat2) => fromFile(stat2, path12, type));
5269
- fileFromSync = (path12, type) => fromFile((0, import_node_fs.statSync)(path12), path12, type);
5270
- fromBlob = (stat2, path12, type = "") => new fetch_blob_default([new BlobDataItem({
5271
- path: path12,
5249
+ blobFromSync = (path14, type) => fromBlob((0, import_node_fs.statSync)(path14), path14, type);
5250
+ blobFrom = (path14, type) => stat(path14).then((stat2) => fromBlob(stat2, path14, type));
5251
+ fileFrom = (path14, type) => stat(path14).then((stat2) => fromFile(stat2, path14, type));
5252
+ fileFromSync = (path14, type) => fromFile((0, import_node_fs.statSync)(path14), path14, type);
5253
+ fromBlob = (stat2, path14, type = "") => new fetch_blob_default([new BlobDataItem({
5254
+ path: path14,
5272
5255
  size: stat2.size,
5273
5256
  lastModified: stat2.mtimeMs,
5274
5257
  start: 0
5275
5258
  })], { type });
5276
- fromFile = (stat2, path12, type = "") => new file_default([new BlobDataItem({
5277
- path: path12,
5259
+ fromFile = (stat2, path14, type = "") => new file_default([new BlobDataItem({
5260
+ path: path14,
5278
5261
  size: stat2.size,
5279
5262
  lastModified: stat2.mtimeMs,
5280
5263
  start: 0
5281
- })], (0, import_node_path.basename)(path12), { type, lastModified: stat2.mtimeMs });
5264
+ })], (0, import_node_path.basename)(path14), { type, lastModified: stat2.mtimeMs });
5282
5265
  BlobDataItem = class _BlobDataItem {
5283
5266
  #path;
5284
5267
  #start;
@@ -7565,6 +7548,7 @@ var init_groq_provider = __esm({
7565
7548
  const _modelPricing = _pricing[_model] || _pricing["mixtral-8x7b-32768"];
7566
7549
  return _tokens * 0.75 * _modelPricing.input + _tokens * 0.25 * _modelPricing.output;
7567
7550
  }
7551
+ // Note: complete() and stream() methods are already implemented above (lines 105-200)
7568
7552
  };
7569
7553
  }
7570
7554
  });
@@ -9079,12 +9063,12 @@ ${this.toYamlLike(value, indent + 1)}`;
9079
9063
  }
9080
9064
  static async loadFromFile(configPath) {
9081
9065
  const { importNodeBuiltin: importNodeBuiltin2 } = await Promise.resolve().then(() => (init_import_helper(), import_helper_exports));
9082
- const fs12 = await importNodeBuiltin2("fs");
9066
+ const fs13 = await importNodeBuiltin2("fs");
9083
9067
  const _path = await importNodeBuiltin2("path");
9084
9068
  const os9 = await importNodeBuiltin2("os");
9085
9069
  const targetPath = configPath || _path.join(os9.homedir(), ".maria", "config.json");
9086
9070
  try {
9087
- const data2 = await fs12.promises.readFile(targetPath, "utf-8");
9071
+ const data2 = await fs13.promises.readFile(targetPath, "utf-8");
9088
9072
  return JSON.parse(data2);
9089
9073
  } catch (innerError) {
9090
9074
  if (error?.code === "ENOENT") {
@@ -9098,25 +9082,25 @@ ${this.toYamlLike(value, indent + 1)}`;
9098
9082
  }
9099
9083
  async save(configPath, options) {
9100
9084
  const { importNodeBuiltin: importNodeBuiltin2 } = await Promise.resolve().then(() => (init_import_helper(), import_helper_exports));
9101
- const fs12 = await importNodeBuiltin2("fs");
9085
+ const fs13 = await importNodeBuiltin2("fs");
9102
9086
  const _path = await importNodeBuiltin2("path");
9103
9087
  const os9 = await importNodeBuiltin2("os");
9104
9088
  const targetPath = configPath || _path.join(os9.homedir(), ".maria", "config.json");
9105
9089
  try {
9106
9090
  if (options?.backup) {
9107
9091
  try {
9108
- await fs12.promises.access(targetPath);
9092
+ await fs13.promises.access(targetPath);
9109
9093
  const backupPath = `${targetPath}.backup.${Date.now()}`;
9110
- await fs12.promises.copyFile(targetPath, backupPath);
9094
+ await fs13.promises.copyFile(targetPath, backupPath);
9111
9095
  } catch {
9112
9096
  }
9113
9097
  }
9114
- await fs12.promises.mkdir(_path.dirname(targetPath), { recursive: true });
9098
+ await fs13.promises.mkdir(_path.dirname(targetPath), { recursive: true });
9115
9099
  const dataToSave = this.getAll({
9116
9100
  maskSensitive: options?.maskSensitive ?? true,
9117
9101
  includeSourceMap: options?.includeSourceMap ?? false
9118
9102
  });
9119
- await fs12.promises.writeFile(
9103
+ await fs13.promises.writeFile(
9120
9104
  targetPath,
9121
9105
  JSON.stringify(dataToSave, null, 2),
9122
9106
  { mode: 384 }
@@ -9160,12 +9144,12 @@ ${this.toYamlLike(value, indent + 1)}`;
9160
9144
  }
9161
9145
  if (outputPath) {
9162
9146
  const { importNodeBuiltin: importNodeBuiltin2 } = await Promise.resolve().then(() => (init_import_helper(), import_helper_exports));
9163
- const fs12 = await importNodeBuiltin2("fs");
9147
+ const fs13 = await importNodeBuiltin2("fs");
9164
9148
  const _path = await importNodeBuiltin2(
9165
9149
  "path"
9166
9150
  );
9167
- await fs12.promises.mkdir(_path.dirname(outputPath), { recursive: true });
9168
- await fs12.promises.writeFile(outputPath, content, "utf-8");
9151
+ await fs13.promises.mkdir(_path.dirname(outputPath), { recursive: true });
9152
+ await fs13.promises.writeFile(outputPath, content, "utf-8");
9169
9153
  console.log(`\u2705 Configuration exported to ${outputPath}`);
9170
9154
  }
9171
9155
  return content;
@@ -9334,13 +9318,13 @@ async function loadEnvironmentConfig() {
9334
9318
  }
9335
9319
  try {
9336
9320
  const { importNodeBuiltin: importNodeBuiltin2, safeDynamicImport: safeDynamicImport2 } = await Promise.resolve().then(() => (init_import_helper(), import_helper_exports));
9337
- const fs12 = await safeDynamicImport2("fs-extra").catch(
9321
+ const fs13 = await safeDynamicImport2("fs-extra").catch(
9338
9322
  () => importNodeBuiltin2("fs")
9339
9323
  );
9340
9324
  const _path = await importNodeBuiltin2("path");
9341
9325
  const _envPath = _path.join(process.cwd(), ".env.local");
9342
- if (await fs12.pathExists(_envPath)) {
9343
- const _envContent = await fs12.readFile(_envPath, "utf-8");
9326
+ if (await fs13.pathExists(_envPath)) {
9327
+ const _envContent = await fs13.readFile(_envPath, "utf-8");
9344
9328
  console.log("Loading environment from:", _envPath);
9345
9329
  environmentLoaded = true;
9346
9330
  const _lines = _envContent.split("\n");
@@ -15589,6 +15573,90 @@ var init_logger = __esm({
15589
15573
  }
15590
15574
  });
15591
15575
 
15576
+ // src/lib/command-groups.ts
15577
+ function getCommandInfo(command) {
15578
+ const normalizedCommand = command.startsWith("/") ? command.slice(1) : command;
15579
+ if (commandInfo[normalizedCommand]) {
15580
+ return {
15581
+ name: `/${normalizedCommand}`,
15582
+ ...commandInfo[normalizedCommand]
15583
+ };
15584
+ }
15585
+ for (const [key2, info] of Object.entries(commandInfo)) {
15586
+ if (info.aliases?.includes(normalizedCommand)) {
15587
+ return {
15588
+ name: `/${key2}`,
15589
+ ...info
15590
+ };
15591
+ }
15592
+ }
15593
+ return void 0;
15594
+ }
15595
+ var commandGroups, allCommands, categories, commandInfo;
15596
+ var init_command_groups = __esm({
15597
+ "src/lib/command-groups.ts"() {
15598
+ commandGroups = {
15599
+ core: [
15600
+ "about",
15601
+ "changelog",
15602
+ "config",
15603
+ "contact",
15604
+ "doctor",
15605
+ "examples",
15606
+ "help",
15607
+ "history",
15608
+ "list",
15609
+ "logout",
15610
+ "model",
15611
+ "ping",
15612
+ "plan",
15613
+ "plugins",
15614
+ "status",
15615
+ "tutorial",
15616
+ "usage",
15617
+ "verify",
15618
+ "version"
15619
+ ],
15620
+ auth: ["login", "logout", "whoami"],
15621
+ code: ["code", "mm", "multimodal"],
15622
+ configuration: ["config", "hooks", "model", "permissions", "settings", "theme"],
15623
+ multimodal: ["face", "image", "mm", "multimodal", "screenshot", "video", "voice"],
15624
+ evolution: ["benchmark", "evolve", "quality"],
15625
+ memory: ["forget", "memory", "recall", "remember"],
15626
+ analysis: ["analyze", "diagram", "diff", "visualize"],
15627
+ system: ["doctor", "health", "manifest", "selftest"],
15628
+ workflow: ["nl", "nl-poc"],
15629
+ safety: ["check"],
15630
+ evaluation: ["run"],
15631
+ assistant: ["ask", "chat", "think"],
15632
+ data: ["db", "export", "import", "sync"],
15633
+ utilities: ["alias", "clear", "history", "reset"],
15634
+ experimental: ["preview", "test"],
15635
+ business: ["battlecard", "sales-dashboard", "tune", "pilot-setup"],
15636
+ plugins: ["plugins"],
15637
+ search: ["search"],
15638
+ enterprise: ["admin", "audit", "compliance", "security"],
15639
+ development: ["debug", "profile", "trace"]
15640
+ };
15641
+ allCommands = Object.values(commandGroups).flat();
15642
+ categories = Object.keys(commandGroups);
15643
+ commandInfo = {};
15644
+ for (const [category, commands] of Object.entries(commandGroups)) {
15645
+ for (const command of commands) {
15646
+ commandInfo[command] = {
15647
+ name: `/${command}`,
15648
+ category
15649
+ };
15650
+ }
15651
+ }
15652
+ commandInfo["model"] = { ...commandInfo["model"], aliases: ["/m", "/models"] };
15653
+ commandInfo["memory"] = { ...commandInfo["memory"], aliases: ["/mem"] };
15654
+ commandInfo["login"] = { ...commandInfo["login"], aliases: ["/signin"] };
15655
+ commandInfo["logout"] = { ...commandInfo["logout"], aliases: ["/signout"] };
15656
+ commandInfo["evolve"] = { ...commandInfo["evolve"], aliases: ["/evolution", "/auto-evolve"] };
15657
+ }
15658
+ });
15659
+
15592
15660
  // src/index.ts
15593
15661
  var init_src2 = __esm({
15594
15662
  "src/index.ts"() {
@@ -15923,8 +15991,8 @@ var init_ConfigService = __esm({
15923
15991
  /**
15924
15992
  * ネストされた設定値の取得
15925
15993
  */
15926
- getNestedValue(path12) {
15927
- const keys = path12.split(".");
15994
+ getNestedValue(path14) {
15995
+ const keys = path14.split(".");
15928
15996
  let value = this._config;
15929
15997
  for (const key2 of keys) {
15930
15998
  if (value && typeof value === "object" && key2 in value) {
@@ -15954,8 +16022,8 @@ var init_ConfigService = __esm({
15954
16022
  /**
15955
16023
  * ネストされた設定値の更新
15956
16024
  */
15957
- async setNestedValue(path12, value) {
15958
- const keys = path12.split(".");
16025
+ async setNestedValue(path14, value) {
16026
+ const keys = path14.split(".");
15959
16027
  const lastKey = keys.pop();
15960
16028
  let target = this._config;
15961
16029
  for (const key2 of keys) {
@@ -15968,7 +16036,7 @@ var init_ConfigService = __esm({
15968
16036
  target[lastKey] = value;
15969
16037
  this.validateConfig();
15970
16038
  this.emitChange({
15971
- path: path12,
16039
+ path: path14,
15972
16040
  oldValue,
15973
16041
  newValue: value,
15974
16042
  timestamp: /* @__PURE__ */ new Date()
@@ -16013,8 +16081,8 @@ var init_ConfigService = __esm({
16013
16081
  setupAutoSave() {
16014
16082
  process.on("exit", () => {
16015
16083
  if (this._isDirty) {
16016
- const fs12 = require("fs");
16017
- fs12.writeFileSync(
16084
+ const fs13 = require("fs");
16085
+ fs13.writeFileSync(
16018
16086
  this._userConfigPath,
16019
16087
  JSON.stringify(this._config, null, 2),
16020
16088
  "utf-8"
@@ -16025,13 +16093,13 @@ var init_ConfigService = __esm({
16025
16093
  /**
16026
16094
  * 変更リスナーの登録
16027
16095
  */
16028
- onChange(path12, listener) {
16029
- if (!this._listeners.has(path12)) {
16030
- this._listeners.set(path12, []);
16096
+ onChange(path14, listener) {
16097
+ if (!this._listeners.has(path14)) {
16098
+ this._listeners.set(path14, []);
16031
16099
  }
16032
- this._listeners.get(path12).push(listener);
16100
+ this._listeners.get(path14).push(listener);
16033
16101
  return () => {
16034
- const listeners = this._listeners.get(path12);
16102
+ const listeners = this._listeners.get(path14);
16035
16103
  if (listeners) {
16036
16104
  const index = listeners.indexOf(listener);
16037
16105
  if (index !== -1) {
@@ -16523,7 +16591,7 @@ var init_ValidationService = __esm({
16523
16591
  );
16524
16592
  this._schemas.set(
16525
16593
  "filePath",
16526
- import_zod3.z.string().min(1).max(this._config.maxFilePathLength).refine((path12) => !this.containsPathTraversal(path12), {
16594
+ import_zod3.z.string().min(1).max(this._config.maxFilePathLength).refine((path14) => !this.containsPathTraversal(path14), {
16527
16595
  message: "Path traversal detected"
16528
16596
  })
16529
16597
  );
@@ -16662,11 +16730,11 @@ var init_ValidationService = __esm({
16662
16730
  /**
16663
16731
  * ファイルパス検証
16664
16732
  */
16665
- validateFilePath(path12) {
16733
+ validateFilePath(path14) {
16666
16734
  try {
16667
16735
  const schema = this._schemas.get("filePath");
16668
- const result = schema.parse(path12);
16669
- if (this.isSystemPath(path12)) {
16736
+ const result = schema.parse(path14);
16737
+ if (this.isSystemPath(path14)) {
16670
16738
  return {
16671
16739
  valid: false,
16672
16740
  errors: [
@@ -16812,8 +16880,8 @@ var init_ValidationService = __esm({
16812
16880
  /**
16813
16881
  * パストラバーサルの検出
16814
16882
  */
16815
- containsPathTraversal(path12) {
16816
- return /\.\.[/\\]/.test(path12) || path12.includes("..\\") || path12.includes("../");
16883
+ containsPathTraversal(path14) {
16884
+ return /\.\.[/\\]/.test(path14) || path14.includes("..\\") || path14.includes("../");
16817
16885
  }
16818
16886
  /**
16819
16887
  * 危険なコマンドの判定
@@ -16840,7 +16908,7 @@ var init_ValidationService = __esm({
16840
16908
  /**
16841
16909
  * システムパスの判定
16842
16910
  */
16843
- isSystemPath(path12) {
16911
+ isSystemPath(path14) {
16844
16912
  const systemPaths = [
16845
16913
  "/etc",
16846
16914
  "/sys",
@@ -16854,7 +16922,7 @@ var init_ValidationService = __esm({
16854
16922
  "/sbin"
16855
16923
  ];
16856
16924
  return systemPaths.some(
16857
- (sysPath) => path12.toLowerCase().startsWith(sysPath.toLowerCase())
16925
+ (sysPath) => path14.toLowerCase().startsWith(sysPath.toLowerCase())
16858
16926
  );
16859
16927
  }
16860
16928
  /**
@@ -19627,13 +19695,13 @@ var init_CommandRegistry = __esm({
19627
19695
  * @returns Array of unique categories
19628
19696
  */
19629
19697
  getCategories() {
19630
- const categories = /* @__PURE__ */ new Set();
19698
+ const categories2 = /* @__PURE__ */ new Set();
19631
19699
  for (const registration of this.handlers.values()) {
19632
19700
  if (registration.handler.category) {
19633
- categories.add(registration.handler.category);
19701
+ categories2.add(registration.handler.category);
19634
19702
  }
19635
19703
  }
19636
- return Array.from(categories);
19704
+ return Array.from(categories2);
19637
19705
  }
19638
19706
  /**
19639
19707
  * Get command help text
@@ -20524,14 +20592,14 @@ var init_CoreHandlers = __esm({
20524
20592
  let message = import_chalk10.default.cyan(`\u{1F916} MARIA v3.5.0 - Available Commands
20525
20593
 
20526
20594
  `);
20527
- const categories = {
20595
+ const categories2 = {
20528
20596
  core: ["/help", "/clear", "/exit", "/version", "/history"],
20529
20597
  conversation: ["/chat", "/context", "/memory"],
20530
20598
  development: ["/code", "/test", "/review", "/debug", "/deploy"],
20531
20599
  business: ["/business", "/pilot", "/dashboard"],
20532
20600
  system: ["/status", "/config", "/logs", "/approve"]
20533
20601
  };
20534
- for (const [category, cmds] of Object.entries(categories)) {
20602
+ for (const [category, cmds] of Object.entries(categories2)) {
20535
20603
  message += import_chalk10.default.yellow(`
20536
20604
  ${category.toUpperCase()}:
20537
20605
  `);
@@ -20550,7 +20618,7 @@ Type '/help <command>' for detailed information about a specific command.`
20550
20618
  return {
20551
20619
  success: true,
20552
20620
  message,
20553
- data: { commands, categories },
20621
+ data: { commands, categories: categories2 },
20554
20622
  metadata: {
20555
20623
  processingTime,
20556
20624
  timestamp: /* @__PURE__ */ new Date()
@@ -21699,15 +21767,15 @@ var init_SessionOrchestrator = __esm({
21699
21767
  /**
21700
21768
  * 設定の取得
21701
21769
  */
21702
- getConfig(path12) {
21703
- return this._configService?.getNestedValue(path12);
21770
+ getConfig(path14) {
21771
+ return this._configService?.getNestedValue(path14);
21704
21772
  }
21705
21773
  /**
21706
21774
  * 設定の更新
21707
21775
  */
21708
- async setConfig(path12, value) {
21776
+ async setConfig(path14, value) {
21709
21777
  if (this._configService) {
21710
- await this._configService.setNestedValue(path12, value);
21778
+ await this._configService.setNestedValue(path14, value);
21711
21779
  }
21712
21780
  }
21713
21781
  /**
@@ -21825,11 +21893,11 @@ var init_interactive_session = __esm({
21825
21893
  getStats() {
21826
21894
  return this.orchestrator.getSessionStats();
21827
21895
  }
21828
- getConfig(path12) {
21829
- return this.orchestrator.getConfig(path12);
21896
+ getConfig(path14) {
21897
+ return this.orchestrator.getConfig(path14);
21830
21898
  }
21831
- async setConfig(path12, value) {
21832
- await this.orchestrator.setConfig(path12, value);
21899
+ async setConfig(path14, value) {
21900
+ await this.orchestrator.setConfig(path14, value);
21833
21901
  }
21834
21902
  };
21835
21903
  }
@@ -21841,7 +21909,7 @@ var init_package = __esm({
21841
21909
  "package.json"() {
21842
21910
  package_default = {
21843
21911
  name: "@bonginkan/maria",
21844
- version: "4.2.6",
21912
+ version: "4.2.7",
21845
21913
  description: "\u{1F680} MARIA v4.2.0 - 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.",
21846
21914
  keywords: [
21847
21915
  "ai",
@@ -22068,19 +22136,18 @@ var init_package = __esm({
22068
22136
  node: ">=20.10.0"
22069
22137
  },
22070
22138
  scripts: {
22071
- build: "NODE_ENV=production tsup && npm run copy:manifest && npm run verify:manifest",
22072
- "build:dev": "NODE_ENV=development tsup && npm run copy:manifest && npm run verify:manifest",
22073
- "build:analyze": "ANALYZE=true NODE_ENV=production tsup && npm run copy:manifest && npm run verify:manifest",
22074
- "copy:manifest": "cp src/slash-commands/READY.manifest.json dist/READY.manifest.json || (echo '\u274C READY.manifest.json not found! Generating...' && npm run generate:manifest && cp src/slash-commands/READY.manifest.json dist/READY.manifest.json)",
22075
- "verify:manifest": "test -f dist/READY.manifest.json && echo '\u2705 READY.manifest.json included in build' || (echo '\u274C READY.manifest.json missing from build!' && exit 1)",
22076
- "build:fast": "NODE_ENV=production tsup --minify false --sourcemap false",
22077
- dev: "NODE_ENV=development tsup --watch",
22078
- clean: "rm -rf dist",
22139
+ "ensure:manifest": "tsx scripts/generate-ready-manifest.ts",
22140
+ "copy:manifest": `node -e "const{copyFileSync,existsSync,mkdirSync}=require('fs');const{join,dirname}=require('path');const s=join(process.cwd(),'src/slash-commands/READY.manifest.json');const d=join(process.cwd(),'dist/READY.manifest.json');if(!existsSync(s)){console.error('\u274C READY.manifest.json not found. Run: pnpm generate:manifest');process.exit(1);}mkdirSync(dirname(d),{recursive:true});copyFileSync(s,d);console.log('\u2705 READY.manifest.json copied to dist/');"`,
22141
+ "verify:manifest": "tsx scripts/verify-manifest-inclusion.ts",
22142
+ build: "pnpm ensure:manifest && cross-env NODE_ENV=production tsup && pnpm copy:manifest && pnpm verify:manifest",
22143
+ "build:dev": "pnpm ensure:manifest && cross-env NODE_ENV=development tsup && pnpm copy:manifest && pnpm verify:manifest",
22144
+ "build:analyze": "pnpm ensure:manifest && cross-env ANALYZE=true NODE_ENV=production tsup && pnpm copy:manifest && pnpm verify:manifest",
22145
+ "build:fast": "cross-env NODE_ENV=production tsup --minify false --sourcemap false",
22146
+ dev: "cross-env NODE_ENV=development tsup --watch",
22147
+ clean: "rimraf dist",
22079
22148
  "gen:cmd-types": "tsx scripts/gen/command-types.mts",
22080
- prebuild: "pnpm run clean && pnpm gen:cmd-types && pnpm run ensure:manifest",
22081
- "ensure:manifest": "test -f src/slash-commands/READY.manifest.json || npm run generate:manifest",
22149
+ prebuild: "pnpm run clean && pnpm gen:cmd-types && pnpm ensure:manifest && pnpm vscode:sync",
22082
22150
  "build:docker": "NODE_ENV=production tsup",
22083
- postbuild: "chmod +x dist/cli.cjs dist/bin/maria.cjs 2>/dev/null || true",
22084
22151
  test: "vitest",
22085
22152
  "test:coverage": "vitest --coverage",
22086
22153
  "test:smoke": "vitest run src/__tests__/smoke.test.ts",
@@ -22091,7 +22158,7 @@ var init_package = __esm({
22091
22158
  "test:integration:ci": "vitest run --config vitest.integration.config.ts --reporter=json --reporter=verbose",
22092
22159
  "test:contract": "vitest run tests/contract/**/*.test.ts",
22093
22160
  "test:deps": "cross-env MOCK_DEPS=true vitest run tests/contract/**/*.test.ts",
22094
- "generate:manifest": "tsx scripts/generate-ready-manifest.ts",
22161
+ "generate:manifest": "tsx scripts/generate-ready-manifest.ts && tsx scripts/generate-enhanced-manifest.ts",
22095
22162
  "health:report": "tsx scripts/command-health-report.ts",
22096
22163
  "ims:deploy": "tsx scripts/deploy-ims-config.ts",
22097
22164
  "ims:secrets": "tsx scripts/setup-ims-secrets.ts",
@@ -22099,19 +22166,19 @@ var init_package = __esm({
22099
22166
  "ims:dashboard": "tsx scripts/ims-dashboard.ts",
22100
22167
  "ci:smoke": "pnpm -s build && pnpm -s test:smoke",
22101
22168
  "verify:build": "tsx scripts/verify-manifest-inclusion.ts",
22102
- lint: "eslint --cache 'src/**/*.{ts,tsx}'",
22103
- "lint:errors-only": "eslint --cache --quiet 'src/**/*.{ts,tsx}'",
22104
- "lint:ci": "eslint --cache --max-warnings=0 'src/**/*.{ts,tsx}'",
22105
- "lint:fix": "eslint --cache --fix 'src/**/*.{ts,tsx}'",
22106
- "lint:fix:errors": "eslint --cache --quiet --fix 'src/**/*.{ts,tsx}'",
22169
+ lint: 'eslint --cache "src/**/*.{ts,tsx}"',
22170
+ "lint:errors-only": 'eslint --cache --quiet "src/**/*.{ts,tsx}"',
22171
+ "lint:ci": 'eslint --cache --max-warnings=0 "src/**/*.{ts,tsx}"',
22172
+ "lint:fix": 'eslint --cache --fix "src/**/*.{ts,tsx}"',
22173
+ "lint:fix:errors": 'eslint --cache --quiet --fix "src/**/*.{ts,tsx}"',
22107
22174
  "lint:report": "eslint src --ext .ts,.tsx --format json > lint-report.json",
22108
- "lint:summary": "eslint --cache --format codeframe 'src/**/*.{ts,tsx}' | head -50",
22175
+ "lint:summary": 'eslint --cache --format codeframe "src/**/*.{ts,tsx}"',
22109
22176
  "lint:strict": "eslint src --ext .ts,.tsx --max-warnings 0",
22110
- "type-check": "./scripts/type-check-syntax.sh",
22111
- "type-check:syntax": "./scripts/type-check-syntax.sh",
22177
+ "type-check": "tsc -p tsconfig.json --noEmit",
22178
+ "type-check:syntax": "tsc -p tsconfig.json --noEmit",
22112
22179
  "type-check:full": "tsc --noEmit",
22113
22180
  precommit: "lint-staged",
22114
- "quality-gate": "pnpm lint:errors-only && pnpm type-check:syntax && echo '\u2705 Quality gates passed'",
22181
+ "quality-gate": `pnpm lint:errors-only && pnpm type-check:syntax && node -e "console.log('\u2705 Quality gates passed')"`,
22115
22182
  "quality-gate:ci": "pnpm lint:errors-only && pnpm type-check:syntax",
22116
22183
  "quality-check": "bash scripts/check-quality-gates.sh",
22117
22184
  "ready:baseline": "tsx scripts/check-ready-baseline.ts",
@@ -22157,6 +22224,7 @@ var init_package = __esm({
22157
22224
  "release:alpha": "pnpm publish --tag alpha",
22158
22225
  "release:beta": "pnpm publish --tag beta",
22159
22226
  "version:sync": "node scripts/sync-versions.js",
22227
+ "vscode:sync": "tsx scripts/sync-vscode-version.ts",
22160
22228
  "test:arch": "depcruise --config .dependency-cruiser.cjs 'src/**/*.ts?(x)'",
22161
22229
  "check:public-api": 'grep -REn "export (\\*|\\{|default)" src | grep -v "^src/index.ts:" || true',
22162
22230
  "check:deps": 'depcruise --config .dependency-cruiser.cjs "src/**/*.ts?(x)"',
@@ -22217,6 +22285,7 @@ var init_package = __esm({
22217
22285
  "express-validator": "^7.2.1",
22218
22286
  figlet: "^1.7.0",
22219
22287
  "file-type": "^21.0.0",
22288
+ "firebase-admin": "^13.5.0",
22220
22289
  "fs-extra": "^11.2.0",
22221
22290
  "fuse.js": "^7.1.0",
22222
22291
  globby: "^14.1.0",
@@ -22282,6 +22351,7 @@ var init_package = __esm({
22282
22351
  "cli-highlight": "^2.1.11",
22283
22352
  compression: "^1.8.1",
22284
22353
  cors: "^2.8.5",
22354
+ "cross-env": "^10.0.0",
22285
22355
  "dependency-cruiser": "^16.10.4",
22286
22356
  eslint: "^8.56.0",
22287
22357
  "eslint-config-prettier": "^9.1.0",
@@ -22300,6 +22370,7 @@ var init_package = __esm({
22300
22370
  prettier: "^3.2.4",
22301
22371
  "react-devtools-core": "^6.1.5",
22302
22372
  recast: "^0.23.11",
22373
+ rimraf: "^6.0.1",
22303
22374
  "rollup-plugin-visualizer": "^6.0.3",
22304
22375
  sqlite: "^5.1.1",
22305
22376
  sqlite3: "^5.1.7",
@@ -22855,15 +22926,34 @@ var init_AuthSecretManager = __esm({
22855
22926
  "src/services/cli-auth/AuthSecretManager.ts"() {
22856
22927
  import_secret_manager2 = require("@google-cloud/secret-manager");
22857
22928
  AuthSecretManager = class {
22858
- client;
22929
+ client = null;
22859
22930
  cache = /* @__PURE__ */ new Map();
22860
22931
  cacheExpiry = /* @__PURE__ */ new Map();
22861
22932
  CACHE_TTL = 36e5;
22862
22933
  // 1 hour
22863
22934
  projectId;
22935
+ useGsm;
22864
22936
  constructor() {
22865
22937
  this.projectId = process.env.GCLOUD_PROJECT || "maria-code-470602";
22866
- this.client = new import_secret_manager2.SecretManagerServiceClient();
22938
+ this.useGsm = this.shouldUseGsm();
22939
+ if (this.useGsm) {
22940
+ try {
22941
+ this.client = new import_secret_manager2.SecretManagerServiceClient();
22942
+ } catch {
22943
+ this.client = null;
22944
+ }
22945
+ }
22946
+ }
22947
+ /**
22948
+ * Determine whether to use Google Secret Manager in this environment
22949
+ */
22950
+ shouldUseGsm() {
22951
+ if (process.env.MARIA_DISABLE_GSM === "true") return false;
22952
+ if (process.env.GOOGLE_APPLICATION_CREDENTIALS) return true;
22953
+ if (process.env.GOOGLE_CLOUD_PROJECT || process.env.GCLOUD_PROJECT) return true;
22954
+ if (process.env.CLOUD_RUN_SERVICE || process.env.K_SERVICE) return true;
22955
+ if (process.env.GCE_METADATA_HOST) return true;
22956
+ return false;
22867
22957
  }
22868
22958
  /**
22869
22959
  * Get authentication configuration from Secret Manager
@@ -22884,6 +22974,9 @@ var init_AuthSecretManager = __esm({
22884
22974
  * Get a specific secret from Secret Manager
22885
22975
  */
22886
22976
  async getSecret(secretName) {
22977
+ if (!this.useGsm || !this.client) {
22978
+ return null;
22979
+ }
22887
22980
  const cached = this.getCachedSecret(secretName);
22888
22981
  if (cached) {
22889
22982
  return cached;
@@ -22964,7 +23057,7 @@ var init_AuthSecretManager = __esm({
22964
23057
  if (process.env.MARIA_AUTH_BASE) {
22965
23058
  return process.env.MARIA_AUTH_BASE;
22966
23059
  }
22967
- const cloudRunUrl = "https://auth-server-i227ftjidq-uc.a.run.app";
23060
+ const cloudRunUrl = "https://auth.maria-code.ai";
22968
23061
  return cloudRunUrl;
22969
23062
  }
22970
23063
  /**
@@ -22977,7 +23070,7 @@ var init_AuthSecretManager = __esm({
22977
23070
  if (process.env.MARIA_API_BASE) {
22978
23071
  return process.env.MARIA_API_BASE;
22979
23072
  }
22980
- const cloudRunApiUrl = "https://maria-code-i227ftjidq-uc.a.run.app";
23073
+ const cloudRunApiUrl = "https://api.maria-code.ai";
22981
23074
  return cloudRunApiUrl;
22982
23075
  }
22983
23076
  };
@@ -23042,7 +23135,7 @@ var init_AuthenticationManager = __esm({
23042
23135
  if (process.env.MARIA_AUTH_MODE === "local") {
23043
23136
  return "http://localhost:3001";
23044
23137
  }
23045
- const cloudRunUrl = "https://auth-server-i227ftjidq-uc.a.run.app";
23138
+ const cloudRunUrl = "https://auth.maria-code.ai";
23046
23139
  if (process.env.MARIA_USE_CUSTOM_DOMAIN === "true") {
23047
23140
  return "https://auth.maria-code.ai";
23048
23141
  }
@@ -23052,7 +23145,7 @@ var init_AuthenticationManager = __esm({
23052
23145
  if (process.env.MARIA_AUTH_MODE === "local") {
23053
23146
  return "http://localhost:3000/api";
23054
23147
  }
23055
- const cloudRunApiUrl = "https://maria-code-i227ftjidq-uc.a.run.app";
23148
+ const cloudRunApiUrl = "https://api.maria-code.ai";
23056
23149
  if (process.env.MARIA_USE_CUSTOM_DOMAIN === "true") {
23057
23150
  return "https://api.maria-code.ai";
23058
23151
  }
@@ -25335,11 +25428,11 @@ export async function DELETE(
25335
25428
  runCommands: isJapanese ? [
25336
25429
  "Next.js \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306B\u914D\u7F6E",
25337
25430
  "pnpm dev \u3067\u30B5\u30FC\u30D0\u30FC\u8D77\u52D5",
25338
- "curl http://localhost:3000/api/users \u3067\u30C6\u30B9\u30C8"
25431
+ "curl https://maria-code.ai/api/users \u3067\u30C6\u30B9\u30C8"
25339
25432
  ] : [
25340
25433
  "Place in Next.js project",
25341
25434
  "Run server with npm run dev",
25342
- "Test with curl http://localhost:3000/api/users"
25435
+ "Test with curl https://maria-code.ai/api/users"
25343
25436
  ],
25344
25437
  notes: isJapanese ? [
25345
25438
  "App Router (Next.js 13+) \u3092\u4F7F\u7528",
@@ -26061,1037 +26154,6 @@ ${options.map((opt, i2) => `${i2 + 1}) ${opt}`).join("\n")}`;
26061
26154
  }
26062
26155
  });
26063
26156
 
26064
- // src/lib/command-groups.ts
26065
- function assertRegistry() {
26066
- for (const [key2, info] of Object.entries(commandInfo)) {
26067
- if (key2 !== info.name) {
26068
- throw new Error(`key/name mismatch: ${key2} !== ${info.name}`);
26069
- }
26070
- }
26071
- const brain = commandInfo["/brain"];
26072
- if (!brain?.deprecated) {
26073
- throw new Error("/brain must be deprecated");
26074
- }
26075
- for (const [alias, _info] of _ALIAS_MAP) {
26076
- if (_NAME_MAP.has(alias)) {
26077
- throw new Error(`alias conflicts with command name: ${alias}`);
26078
- }
26079
- }
26080
- for (const [cat, list] of _CATEGORY_MAP) {
26081
- if (list.length === 0) {
26082
- console.warn(`category defined but unused: ${cat}`);
26083
- }
26084
- }
26085
- }
26086
- function getCommandInfo(commandName) {
26087
- const key2 = _keyOf(commandName.trim());
26088
- return _NAME_MAP.get(key2) ?? _ALIAS_MAP.get(key2);
26089
- }
26090
- var commandInfo, _normToken, _withSlash, _keyOf, _NAME_MAP, _ALIAS_MAP, _CATEGORY_MAP;
26091
- var init_command_groups = __esm({
26092
- "src/lib/command-groups.ts"() {
26093
- commandInfo = {
26094
- // Core commands
26095
- "/help": {
26096
- name: "/help",
26097
- description: "Show help information and command list",
26098
- category: "core",
26099
- usage: "/help [category|command]",
26100
- examples: ["/help", "/help generation", "/help /code"]
26101
- },
26102
- "/clear": {
26103
- name: "/clear",
26104
- description: "Clear screen and conversation context",
26105
- category: "core",
26106
- usage: "/clear",
26107
- examples: ["/clear"]
26108
- },
26109
- "/exit": {
26110
- name: "/exit",
26111
- description: "Exit the application",
26112
- category: "core",
26113
- usage: "/exit",
26114
- examples: ["/exit"]
26115
- },
26116
- "/version": {
26117
- name: "/version",
26118
- description: "Show version information",
26119
- category: "core",
26120
- usage: "/version",
26121
- examples: ["/version"]
26122
- },
26123
- // Content Generation
26124
- "/code": {
26125
- name: "/code",
26126
- description: "Intelligent code operations - create, modify, fix, refactor",
26127
- category: "generation",
26128
- usage: "/code <intent> [options]",
26129
- examples: [
26130
- "/code fix errors in src/index.ts",
26131
- "/code create new service AuthService",
26132
- "/code refactor function calculateTotal to use async",
26133
- "/code add validation to user input"
26134
- ]
26135
- },
26136
- "/test": {
26137
- name: "/test",
26138
- description: "Generate tests for code",
26139
- category: "generation",
26140
- usage: "/test [file|function]",
26141
- examples: ["/test src/utils.ts", "/test calculateTotal function"]
26142
- },
26143
- "/paper": {
26144
- name: "/paper",
26145
- description: "Process research papers and generate code",
26146
- category: "generation",
26147
- usage: "/paper [content] [--source type] [--language lang]",
26148
- examples: ['/paper "Implement QuickSort algorithm"', "/paper --source pdf paper.pdf"]
26149
- },
26150
- // Multimodal Generation (Cloud-Ready)
26151
- "/image": {
26152
- name: "/image",
26153
- description: "Generate images using AI (cloud-only, FREE tier)",
26154
- category: "multimodal",
26155
- usage: "/image <prompt> [--style=realistic|artistic|cartoon] [--size=1024x1024]",
26156
- examples: ["/image sunset over mountains --style=realistic", "/image Logo design for tech company --style=artistic", "/image Abstract art --size=512x512"]
26157
- },
26158
- "/video": {
26159
- name: "/video",
26160
- description: "Generate videos using AI (cloud-only, PRO+ required)",
26161
- category: "multimodal",
26162
- usage: "/video <prompt> [--duration=5|10|15] [--style=cinematic|documentary|cartoon]",
26163
- examples: ['/video "A cat playing piano" --duration=10', '/video "Sunset timelapse" --style=cinematic']
26164
- },
26165
- "/voice": {
26166
- name: "/voice",
26167
- description: "Generate speech from text (cloud-only, STARTER+ required)",
26168
- category: "multimodal",
26169
- usage: "/voice <text> [--voice=alloy|echo|fable|nova] [--speed=0.5-2.0]",
26170
- examples: ['/voice "Hello world" --voice=nova', '/voice "Welcome to MARIA" --speed=1.2']
26171
- },
26172
- "/avatar": {
26173
- name: "/avatar",
26174
- description: "Interactive ASCII avatar",
26175
- category: "media",
26176
- usage: "/avatar",
26177
- examples: ["/avatar"]
26178
- },
26179
- // Analysis & Review
26180
- "/review": {
26181
- name: "/review",
26182
- description: "Review code or pull requests",
26183
- category: "analysis",
26184
- usage: "/review [file|url]",
26185
- examples: ["/review src/app.ts", "/review https://github.com/user/repo/pull/123"]
26186
- },
26187
- "/pr-comments": {
26188
- name: "/pr-comments",
26189
- description: "Generate PR comments",
26190
- category: "analysis",
26191
- usage: "/pr-comments [pr-url]",
26192
- examples: ["/pr-comments https://github.com/user/repo/pull/123"]
26193
- },
26194
- // Code Quality
26195
- "/bug": {
26196
- name: "/bug",
26197
- description: "AI-powered error analysis and solution recommendation system (Enhanced POC #4)",
26198
- category: "quality",
26199
- usage: '/bug "<error message>" [--from-output] [--solution-id <id>] [--dry-run] [--verbose]',
26200
- examples: [
26201
- `/bug "Property 'name' does not exist on type 'User'"`,
26202
- `/bug "Cannot read property 'id' of undefined" --file src/user.ts`,
26203
- "/bug --from-output --verbose",
26204
- "/bug --solution-id typescript-fix-0 --dry-run"
26205
- ]
26206
- },
26207
- "/lint": {
26208
- name: "/lint",
26209
- description: "ESLint analysis and auto-fix",
26210
- category: "quality",
26211
- usage: "/lint [file]",
26212
- examples: ["/lint src/app.ts", "/lint"]
26213
- },
26214
- "/typecheck": {
26215
- name: "/typecheck",
26216
- description: "TypeScript type safety analysis",
26217
- category: "quality",
26218
- usage: "/typecheck [file]",
26219
- examples: ["/typecheck src/app.ts", "/typecheck"]
26220
- },
26221
- "/security-review": {
26222
- name: "/security-review",
26223
- description: "Security vulnerability assessment",
26224
- category: "quality",
26225
- usage: "/security-review [file]",
26226
- examples: ["/security-review src/auth.ts"]
26227
- },
26228
- // Configuration & Setup
26229
- "/config": {
26230
- name: "/config",
26231
- description: "Show configuration settings",
26232
- category: "configuration",
26233
- usage: "/config [key] [value]",
26234
- examples: ["/config", "/config model gpt-4"]
26235
- },
26236
- "/init": {
26237
- name: "/init",
26238
- description: "Initialize MARIA configuration and analyze project",
26239
- category: "configuration",
26240
- usage: "/init [--force] [--scan] [--graph-rag]",
26241
- examples: ["/init", "/init --force", "/init --scan"]
26242
- },
26243
- "/setup": {
26244
- name: "/setup",
26245
- description: "First-time environment setup wizard",
26246
- category: "configuration",
26247
- usage: "/setup",
26248
- examples: ["/setup"]
26249
- },
26250
- "/settings": {
26251
- name: "/settings",
26252
- description: "Environment variable setup",
26253
- category: "configuration",
26254
- usage: "/settings",
26255
- examples: ["/settings"]
26256
- },
26257
- "/brain": {
26258
- name: "/brain",
26259
- description: "Switch between cognitive & operation modes",
26260
- category: "configuration",
26261
- usage: "/brain [mode-name]",
26262
- examples: ["/brain", "/brain creative", "/brain analytical"],
26263
- deprecated: {
26264
- since: "v2.5.0",
26265
- replacedBy: "/mode",
26266
- message: "Use /mode for switching AI modes"
26267
- },
26268
- hidden: true
26269
- // Hidden from help display
26270
- },
26271
- "/model": {
26272
- name: "/model",
26273
- description: "Interactive AI model selector",
26274
- category: "configuration",
26275
- aliases: ["/m", "/models"],
26276
- usage: "/model [list|set|info|test|benchmark|cost|current] [model-id] [options]",
26277
- examples: [
26278
- "/model",
26279
- "/model list",
26280
- "/model set claude-3-sonnet",
26281
- "/model info gpt-4"
26282
- ]
26283
- },
26284
- "/add-dir": {
26285
- name: "/add-dir",
26286
- description: "Add directory to project",
26287
- category: "configuration",
26288
- usage: "/add-dir [path]",
26289
- examples: ["/add-dir src", "/add-dir lib/utils"]
26290
- },
26291
- // Authentication
26292
- "/login": {
26293
- name: "/login",
26294
- description: "Login to services",
26295
- category: "auth",
26296
- usage: "/login [service]",
26297
- examples: ["/login", "/login github"]
26298
- },
26299
- "/logout": {
26300
- name: "/logout",
26301
- description: "Logout from services",
26302
- category: "auth",
26303
- usage: "/logout [service]",
26304
- examples: ["/logout", "/logout github"]
26305
- },
26306
- "/permissions": {
26307
- name: "/permissions",
26308
- description: "Manage permissions",
26309
- category: "auth",
26310
- usage: "/permissions [permission] [value]",
26311
- examples: ["/permissions", "/permissions fileAccess true"]
26312
- },
26313
- "/auth": {
26314
- name: "/auth",
26315
- description: "Authentication management hub",
26316
- category: "auth",
26317
- usage: "/auth [action]",
26318
- examples: ["/auth", "/auth status"]
26319
- },
26320
- "/signin": {
26321
- name: "/signin",
26322
- description: "Sign in to services (alias for /login)",
26323
- category: "auth",
26324
- usage: "/signin [service]",
26325
- examples: ["/signin", "/signin github"]
26326
- },
26327
- "/signout": {
26328
- name: "/signout",
26329
- description: "Sign out from services (alias for /logout)",
26330
- category: "auth",
26331
- usage: "/signout [service]",
26332
- examples: ["/signout", "/signout github"]
26333
- },
26334
- // Workflow Automation
26335
- "/nl": {
26336
- name: "/nl",
26337
- description: "Natural language command translation - Convert plain English to executable commands (POC)",
26338
- category: "workflow",
26339
- usage: '/nl "<natural language description>" [options]',
26340
- examples: [
26341
- '/nl "commit my changes and run tests"',
26342
- '/nl "fix typescript errors" --dry-run',
26343
- '/nl "show system status" --explain'
26344
- ]
26345
- },
26346
- "/chain": {
26347
- name: "/chain",
26348
- description: "Execute command chains",
26349
- category: "workflow",
26350
- usage: "/chain [chain-name] [--interactive]",
26351
- examples: ["/chain projectSetup", "/chain analysis --interactive"]
26352
- },
26353
- "/suggest": {
26354
- name: "/suggest",
26355
- description: "Get intelligent command suggestions",
26356
- category: "workflow",
26357
- usage: "/suggest",
26358
- examples: ["/suggest"]
26359
- },
26360
- "/alias": {
26361
- name: "/alias",
26362
- description: "Manage command aliases",
26363
- category: "workflow",
26364
- usage: "/alias [add|remove|list] [alias] [command]",
26365
- examples: ['/alias add /gs "/git status"', "/alias list"]
26366
- },
26367
- "/template": {
26368
- name: "/template",
26369
- description: "Command templates management",
26370
- category: "workflow",
26371
- usage: "/template [run|save|list] [name] [commands]",
26372
- examples: ["/template list", "/template run myTemplate"]
26373
- },
26374
- "/batch": {
26375
- name: "/batch",
26376
- description: "Execute multiple commands",
26377
- category: "workflow",
26378
- usage: "/batch [commands...]",
26379
- examples: ["/batch /status /model /config"]
26380
- },
26381
- "/hotkey": {
26382
- name: "/hotkey",
26383
- description: "Manage keyboard shortcuts",
26384
- category: "workflow",
26385
- usage: "/hotkey [add|remove|list] [key] [command]",
26386
- examples: ["/hotkey add ctrl+s /status", "/hotkey list"]
26387
- },
26388
- "/compact": {
26389
- name: "/compact",
26390
- description: "Compact session data",
26391
- category: "workflow",
26392
- usage: "/compact",
26393
- examples: ["/compact"]
26394
- },
26395
- "/resume": {
26396
- name: "/resume",
26397
- description: "Resume previous session",
26398
- category: "workflow",
26399
- usage: "/resume [session-id]",
26400
- examples: ["/resume", "/resume last"]
26401
- },
26402
- // Development Tools
26403
- "/memory": {
26404
- name: "/memory",
26405
- description: "Show memory usage statistics and health",
26406
- category: "development",
26407
- usage: "/memory",
26408
- examples: ["/memory"]
26409
- },
26410
- "/remember": {
26411
- name: "/remember",
26412
- description: "Store important information in persistent memory",
26413
- category: "memory",
26414
- usage: "/remember <content> [--tag=<tag>] [--importance=<level>]",
26415
- examples: ['/remember "API endpoint is /api/v1/users"', '/remember "Database password is in .env" --importance=high --tag=security']
26416
- },
26417
- "/recall": {
26418
- name: "/recall",
26419
- description: "Retrieve stored memories from persistent storage",
26420
- category: "memory",
26421
- usage: "/recall [query] [--tag=<tag>] [--limit=<n>]",
26422
- examples: ["/recall API", "/recall --tag=security", "/recall database --limit=5"]
26423
- },
26424
- "/forget": {
26425
- name: "/forget",
26426
- description: "Remove memories from persistent storage",
26427
- category: "memory",
26428
- usage: "/forget <pattern> [--tag=<tag>] [--older-than=<days>] [--confirm]",
26429
- examples: ['/forget "old data"', "/forget --tag=temp --confirm", "/forget --older-than=30 --confirm"]
26430
- },
26431
- "/memory-status": {
26432
- name: "/memory-status",
26433
- description: "Show memory usage statistics and health",
26434
- category: "memory",
26435
- aliases: ["/mem-status"],
26436
- usage: "/memory-status",
26437
- examples: ["/memory-status"]
26438
- },
26439
- "/export": {
26440
- name: "/export",
26441
- description: "Export project data",
26442
- category: "development",
26443
- usage: "/export [format] [--clipboard]",
26444
- examples: ["/export json", "/export --clipboard"]
26445
- },
26446
- // Learning & Training
26447
- "/l2r": {
26448
- name: "/l2r",
26449
- description: "Learning-to-Rank operations with 44-dimension feature system *GPU needed - Local LLM only (Pro+ members only)",
26450
- category: "learning",
26451
- aliases: ["/ltr", "/rank", "/learn"],
26452
- usage: "/l2r [train|predict|status|features|explain] [options]",
26453
- examples: [
26454
- "/l2r status",
26455
- "/l2r train --interactions 1000",
26456
- '/l2r predict "API documentation security"',
26457
- "/l2r features --top 10 --category semantic"
26458
- ]
26459
- },
26460
- // GraphRAG Operations
26461
- "/search": {
26462
- name: "/search",
26463
- description: "GraphRAG-powered semantic search across codebase *GPU needed - Local LLM only (Pro+ members only)",
26464
- category: "graphrag",
26465
- usage: "/search <query> [--limit=<n>] [--threshold=<score>]",
26466
- examples: [
26467
- '/search "authentication implementation"',
26468
- '/search "database connection" --limit 5',
26469
- '/search "error handling" --threshold 0.8'
26470
- ]
26471
- },
26472
- // Language Operations
26473
- "/language": {
26474
- name: "/language",
26475
- description: "Multilingual operations and translation",
26476
- category: "multimodal",
26477
- usage: "/language [translate|detect|switch] [options]",
26478
- examples: [
26479
- '/language translate "Hello world" --to=ja',
26480
- '/language detect "Bonjour le monde"',
26481
- "/language switch ja"
26482
- ]
26483
- },
26484
- // File Operations
26485
- "/save": {
26486
- name: "/save",
26487
- description: "Save last AI response to a file",
26488
- category: "file",
26489
- aliases: ["/write"],
26490
- usage: "/save <filename>",
26491
- examples: ["/save tetris.html", "/save code.js", "/save output.txt"]
26492
- },
26493
- "/saveto": {
26494
- name: "/saveto",
26495
- description: "Save response to specified directory",
26496
- category: "file",
26497
- aliases: ["/writeto"],
26498
- usage: "/saveto <path/to/filename>",
26499
- examples: ["/saveto ~/Documents/code.js", "/saveto ./output/report.md"]
26500
- },
26501
- "/hooks": {
26502
- name: "/hooks",
26503
- description: "Manage Git hooks integration",
26504
- category: "development",
26505
- usage: "/hooks [list|add|remove]",
26506
- examples: ["/hooks list", "/hooks add pre-commit"]
26507
- },
26508
- "/terminal-setup": {
26509
- name: "/terminal-setup",
26510
- description: "Setup terminal integration",
26511
- category: "development",
26512
- usage: "/terminal-setup",
26513
- examples: ["/terminal-setup"]
26514
- },
26515
- "/vim": {
26516
- name: "/vim",
26517
- description: "Vim editor integration",
26518
- category: "development",
26519
- usage: "/vim [file]",
26520
- examples: ["/vim src/app.ts", "/vim"]
26521
- },
26522
- "/release-notes": {
26523
- name: "/release-notes",
26524
- description: "Generate release notes",
26525
- category: "development",
26526
- usage: "/release-notes [version]",
26527
- examples: ["/release-notes v1.2.0", "/release-notes"]
26528
- },
26529
- // Integration
26530
- "/agents": {
26531
- name: "/agents",
26532
- description: "Manage AI agents",
26533
- category: "integration",
26534
- usage: "/agents [list|start|stop] [agent-name]",
26535
- examples: ["/agents list", "/agents start codeReview"]
26536
- },
26537
- "/mcp": {
26538
- name: "/mcp",
26539
- description: "MCP integrations",
26540
- category: "integration",
26541
- usage: "/mcp [status|start|stop] [server]",
26542
- examples: ["/mcp status", "/mcp start myServer"]
26543
- },
26544
- "/migrate-installer": {
26545
- name: "/migrate-installer",
26546
- description: "Migrate installer configuration",
26547
- category: "integration",
26548
- usage: "/migrate-installer",
26549
- examples: ["/migrate-installer"]
26550
- },
26551
- // System & Diagnostics (Enhanced)
26552
- "/status": {
26553
- name: "/status",
26554
- description: "System health monitoring with API connectivity checks",
26555
- category: "system",
26556
- usage: "/status [--json] [--exit-code]",
26557
- examples: ["/status", "/status --json", "/status --exit-code"]
26558
- },
26559
- "/doctor": {
26560
- name: "/doctor",
26561
- description: "Comprehensive system diagnostics with actionable fixes",
26562
- category: "system",
26563
- usage: "/doctor [--verbose] [--fix]",
26564
- examples: ["/doctor", "/doctor --verbose", "/doctor --fix"]
26565
- },
26566
- "/cost": {
26567
- name: "/cost",
26568
- description: "Show usage costs",
26569
- category: "system",
26570
- usage: "/cost",
26571
- examples: ["/cost"]
26572
- },
26573
- "/upgrade": {
26574
- name: "/upgrade",
26575
- description: "Upgrade MARIA to latest version",
26576
- category: "system",
26577
- usage: "/upgrade",
26578
- examples: ["/upgrade"]
26579
- },
26580
- "/shell": {
26581
- name: "/shell",
26582
- description: "Execute natural language shell operations safely (Phase B: with patch support)",
26583
- category: "system",
26584
- aliases: ["/sh"],
26585
- usage: '/shell "<natural language instruction>" [--dry] [--phase B]',
26586
- examples: [
26587
- '/shell "show README file"',
26588
- '/shell "list TypeScript files in src"',
26589
- '/shell "search for TODO in package.json"',
26590
- '/shell "find all .md files" --dry',
26591
- `/shell "replace 'old' with 'new' in test.txt" --phase B`
26592
- ]
26593
- },
26594
- "/approval": {
26595
- name: "/approval",
26596
- description: "Review and approve pending patch operations (Phase B)",
26597
- category: "system",
26598
- aliases: ["/approve"],
26599
- usage: "/approval [--auto] [--colorize] [--line-numbers]",
26600
- examples: [
26601
- "/approval",
26602
- "/approval --auto",
26603
- "/approval --colorize --line-numbers"
26604
- ]
26605
- },
26606
- // Math and Computational Commands
26607
- "/calc": {
26608
- name: "/calc",
26609
- description: "Calculate mathematical expressions safely without eval()",
26610
- category: "development",
26611
- aliases: [],
26612
- usage: '/calc "<expression>" [--vars <variables>]',
26613
- examples: [
26614
- '/calc "2 + 3 * 4"',
26615
- '/calc "sin(pi/4) + cos(pi/4)"',
26616
- '/calc "sqrt(x^2 + y^2)" --vars x=3 y=4'
26617
- ]
26618
- },
26619
- "/solve": {
26620
- name: "/solve",
26621
- description: "Solve equations and systems of equations using numerical methods",
26622
- category: "development",
26623
- aliases: [],
26624
- usage: '/solve "<equation>" [--vars <variables>] [--x0 <initial>]',
26625
- examples: [
26626
- '/solve "x^2 - 4" --vars x --x0 2',
26627
- '/solve "x^2 + y^2 - 25" "x + y - 7" --vars x y'
26628
- ]
26629
- },
26630
- "/plot": {
26631
- name: "/plot",
26632
- description: "Plot and visualize mathematical functions",
26633
- category: "development",
26634
- aliases: [],
26635
- usage: '/plot "<function>" [--range <min> <max>] [--svg <file>]',
26636
- examples: [
26637
- '/plot "sin(x)" --range -3 3',
26638
- '/plot "x^2 - 4*x + 3" --range -2 6 --svg output.svg'
26639
- ]
26640
- },
26641
- // Performance Optimization Commands
26642
- "/benchmark": {
26643
- name: "/benchmark",
26644
- description: "Performance analysis and benchmarking",
26645
- category: "optimization",
26646
- usage: "/benchmark [code] [--options]",
26647
- examples: [
26648
- "/benchmark quicksort",
26649
- '/benchmark compare "bubble sort" vs "merge sort"',
26650
- "/benchmark --profile complex-algorithm"
26651
- ]
26652
- },
26653
- // Creative Tools Commands
26654
- "/diagram": {
26655
- name: "/diagram",
26656
- description: "Generate visual diagrams and charts",
26657
- category: "creative",
26658
- usage: "/diagram [type] [description]",
26659
- examples: [
26660
- "/diagram flowchart login process",
26661
- "/diagram architecture microservices",
26662
- "/diagram er user database",
26663
- "/diagram sequence API request"
26664
- ]
26665
- },
26666
- // Implementation Utilities Commands
26667
- "/snippet": {
26668
- name: "/snippet",
26669
- description: "Code snippet management",
26670
- category: "implementation",
26671
- usage: "/snippet [command] [args]",
26672
- examples: [
26673
- '/snippet save "quicksort" "function quicksort..."',
26674
- "/snippet search authentication",
26675
- "/snippet list --tags=react",
26676
- "/snippet export ./my-snippets.json"
26677
- ]
26678
- },
26679
- // GPU Management Commands
26680
- "/gpu": {
26681
- name: "/gpu",
26682
- description: "\u{1F3AE} GPU management and monitoring for AI acceleration *GPU needed - Local LLM only (Pro+ members only)",
26683
- category: "ai",
26684
- aliases: ["/graphics", "/device"],
26685
- usage: "/gpu [status|benchmark|devices|memory] [options]",
26686
- examples: [
26687
- "/gpu status",
26688
- "/gpu benchmark",
26689
- "/gpu devices",
26690
- "/gpu memory"
26691
- ]
26692
- },
26693
- // LLM Management Commands - Phase 10 v2.0
26694
- "/llm": {
26695
- name: "/llm",
26696
- description: "Advanced LLM management and model operations *GPU needed - Local LLM only (Pro+ members only)",
26697
- category: "ai",
26698
- usage: "/llm <command> [options]",
26699
- examples: [
26700
- "/llm list",
26701
- "/llm use gpt-oss-20b",
26702
- "/llm bench --detailed",
26703
- "/llm coop run --iterations 5",
26704
- "/llm studio status"
26705
- ]
26706
- },
26707
- // RL Evolution Commands
26708
- "/evolve": {
26709
- name: "/evolve",
26710
- description: "Autonomous system evolution and optimization controls *GPU needed - Local LLM only (Pro+ members only)",
26711
- category: "evolution",
26712
- aliases: ["/evolution", "/auto-evolve"],
26713
- usage: "/evolve <on|off|status|plan|history|revert|approve|reject> [options]",
26714
- examples: [
26715
- "/evolve on nightly",
26716
- "/evolve status",
26717
- "/evolve plan",
26718
- "/evolve history 30",
26719
- "/evolve approve approval_123",
26720
- "/evolve revert v1.0.5",
26721
- "/evolve run canary",
26722
- "/evolve off"
26723
- ]
26724
- },
26725
- // Real-time Monitoring Commands
26726
- "/monitor": {
26727
- name: "/monitor",
26728
- description: "Start real-time monitoring dashboard",
26729
- category: "monitoring",
26730
- usage: "/monitor [options]",
26731
- examples: [
26732
- "/monitor --format ascii --refresh 5",
26733
- "/monitor system --template system-overview",
26734
- "/monitor --port 3001 --auth"
26735
- ]
26736
- },
26737
- "/dashboard": {
26738
- name: "/dashboard",
26739
- description: "Create and manage monitoring dashboards",
26740
- category: "monitoring",
26741
- aliases: ["/dash"],
26742
- usage: "/dashboard <action> [options]",
26743
- examples: [
26744
- "/dashboard create --template system-overview",
26745
- "/dashboard list",
26746
- "/dashboard show my-dashboard --format html",
26747
- "/dashboard export my-dashboard"
26748
- ]
26749
- },
26750
- "/stream": {
26751
- name: "/stream",
26752
- description: "Manage real-time data streams",
26753
- category: "monitoring",
26754
- usage: "/stream <action> [channel] [options]",
26755
- examples: [
26756
- "/stream start system:metrics",
26757
- "/stream list",
26758
- "/stream subscribe app:logs --filter error",
26759
- "/stream stop system:metrics"
26760
- ]
26761
- },
26762
- "/chart": {
26763
- name: "/chart",
26764
- description: "Create and display charts from data",
26765
- category: "monitoring",
26766
- usage: "/chart <type> [data] [options]",
26767
- examples: [
26768
- '/chart line --data "./metrics.json" --format ascii',
26769
- '/chart bar --data "cpu,memory,disk" --format html',
26770
- "/chart gauge system.cpu --threshold 80"
26771
- ]
26772
- },
26773
- "/templates": {
26774
- name: "/templates",
26775
- description: "Manage dashboard templates",
26776
- category: "monitoring",
26777
- usage: "/templates <action> [options]",
26778
- examples: [
26779
- "/templates list",
26780
- "/templates show system-overview",
26781
- "/templates create --name my-template",
26782
- "/templates generate --from-data metrics.json"
26783
- ]
26784
- },
26785
- // AI Coding Agent Commands
26786
- "/create-feature": {
26787
- name: "/create-feature",
26788
- description: "Generate complete feature with all necessary files and folders",
26789
- category: "coding-agent",
26790
- usage: "/create-feature [feature-description]",
26791
- examples: [
26792
- '/create-feature "user authentication"',
26793
- '/create-feature "shopping cart functionality"',
26794
- '/create-feature "file upload system"'
26795
- ]
26796
- },
26797
- "/setup-project": {
26798
- name: "/setup-project",
26799
- description: "Automatically setup project structure and dependencies",
26800
- category: "coding-agent",
26801
- usage: "/setup-project [project-type]",
26802
- examples: [
26803
- '/setup-project "react-typescript"',
26804
- '/setup-project "node-express-api"',
26805
- '/setup-project "python-flask"'
26806
- ]
26807
- },
26808
- "/auto-organize": {
26809
- name: "/auto-organize",
26810
- description: "Automatically organize files and folders following best practices",
26811
- category: "coding-agent",
26812
- usage: "/auto-organize [--dry-run]",
26813
- examples: [
26814
- "/auto-organize",
26815
- "/auto-organize --dry-run"
26816
- ]
26817
- },
26818
- "/generate-docs": {
26819
- name: "/generate-docs",
26820
- description: "Generate comprehensive documentation for the project",
26821
- category: "coding-agent",
26822
- usage: "/generate-docs [--type] [--format]",
26823
- examples: [
26824
- "/generate-docs",
26825
- "/generate-docs --type api",
26826
- "/generate-docs --format markdown"
26827
- ]
26828
- },
26829
- "/optimize-structure": {
26830
- name: "/optimize-structure",
26831
- description: "Analyze and optimize project structure for better maintainability",
26832
- category: "coding-agent",
26833
- usage: "/optimize-structure [--suggestions] [--apply]",
26834
- examples: [
26835
- "/optimize-structure",
26836
- "/optimize-structure --suggestions",
26837
- "/optimize-structure --apply"
26838
- ]
26839
- },
26840
- // Business Operations (Enhanced)
26841
- "/battlecard": {
26842
- name: "/battlecard",
26843
- description: "Generate competitive battlecards with talk scripts (PRO+ required)",
26844
- category: "business",
26845
- usage: "/battlecard --competitor <name> [--customer <company>] [--industry <type>] [--size <enterprise|mid-market|smb>]",
26846
- examples: [
26847
- '/battlecard --competitor "CompetitorX"',
26848
- '/battlecard -c "CompetitorY" --customer "ABC Manufacturing" --industry manufacturing',
26849
- '/battlecard -c "CompetitorZ" --size enterprise'
26850
- ]
26851
- },
26852
- "/tune": {
26853
- name: "/tune",
26854
- description: "Natural language reward tuning - Optimize AI agent behavior patterns",
26855
- category: "business",
26856
- usage: '/tune "<adjustment_description>" [options]',
26857
- examples: [
26858
- '/tune "Prioritize customer relationship building to improve sales"',
26859
- '/tune "Focus on cost reduction while maintaining quality" --intensity high',
26860
- "/tune --metric conversion_rate --direction increase --scope team"
26861
- ]
26862
- },
26863
- "/sales-dashboard": {
26864
- name: "/sales-dashboard",
26865
- description: "Interactive TUI sales dashboard with real-time updates (STARTER+ required)",
26866
- category: "business",
26867
- usage: "/sales-dashboard [--profile=executive|manager|rep] [--theme=light|dark] [--format=tui|json|slack]",
26868
- examples: [
26869
- "/sales-dashboard",
26870
- "/sales-dashboard --profile executive --theme light",
26871
- "/sales-dashboard --format json",
26872
- "/sales-dashboard --format slack"
26873
- ]
26874
- },
26875
- "/pilot-setup": {
26876
- name: "/pilot-setup",
26877
- description: "Sales team pilot setup - Supports 5-person teams",
26878
- category: "business",
26879
- usage: "/pilot-setup [action] [options]",
26880
- examples: [
26881
- "/pilot-setup template",
26882
- "/pilot-setup setup --config ./pilot-config.json",
26883
- "/pilot-setup onboard --pilot-id pilot_123 --member-id member_001",
26884
- "/pilot-setup start --pilot-id pilot_123"
26885
- ]
26886
- },
26887
- // Project Management Commands
26888
- "/pm": {
26889
- name: "/pm",
26890
- description: "Project Management Suite - SOW and Gantt chart generation from natural language",
26891
- category: "business",
26892
- usage: "/pm <command> [options]",
26893
- examples: [
26894
- "/pm analyze --source all --days 30",
26895
- '/pm sow "Improve search latency by 20% with GPU acceleration"',
26896
- "/pm gantt --sow docs/SOW_AUTO.md --ics out/schedule.ics",
26897
- "/pm update --since 2025-08-01 --create-pr",
26898
- "/pm export --format mermaid"
26899
- ]
26900
- },
26901
- "/pm analyze": {
26902
- name: "/pm analyze",
26903
- description: "Analyze repository for PM insights (WBS, risks, dependencies)",
26904
- category: "business",
26905
- usage: "/pm analyze [--source repo|issues|notes|all] [--days N] [--json]",
26906
- examples: [
26907
- "/pm analyze",
26908
- "/pm analyze --source issues --days 7",
26909
- "/pm analyze --json > analysis.json"
26910
- ]
26911
- },
26912
- "/pm sow": {
26913
- name: "/pm sow",
26914
- description: "Generate Statement of Work from natural language description",
26915
- category: "business",
26916
- usage: '/pm sow "<description>" [--out path]',
26917
- examples: [
26918
- '/pm sow "Implement GPU acceleration for search reranking"',
26919
- '/pm sow "Improve API latency by 20%" --out docs/Q4_SOW.md'
26920
- ]
26921
- },
26922
- "/pm gantt": {
26923
- name: "/pm gantt",
26924
- description: "Generate Mermaid Gantt chart and optional ICS calendar from SOW",
26925
- category: "business",
26926
- usage: "/pm gantt [--sow path] [--out path] [--ics path]",
26927
- examples: [
26928
- "/pm gantt",
26929
- "/pm gantt --sow docs/SOW_Q4.md --ics out/timeline.ics"
26930
- ]
26931
- },
26932
- "/pm update": {
26933
- name: "/pm update",
26934
- description: "Update SOW/Gantt with recent repository changes",
26935
- category: "business",
26936
- usage: "/pm update [--since date] [--create-pr]",
26937
- examples: [
26938
- "/pm update --since 2025-08-01",
26939
- "/pm update --create-pr"
26940
- ]
26941
- },
26942
- "/pm export": {
26943
- name: "/pm export",
26944
- description: "Export PM artifacts in various formats (mermaid, ics, json)",
26945
- category: "business",
26946
- usage: "/pm export --format <format> [--out path]",
26947
- examples: [
26948
- "/pm export --format mermaid",
26949
- "/pm export --format ics --out calendar.ics",
26950
- "/pm export --format json"
26951
- ]
26952
- },
26953
- // System Update Commands
26954
- "/update": {
26955
- name: "/update",
26956
- description: "Update project dependencies, configurations, and system components",
26957
- category: "configuration",
26958
- usage: "/update [target] [options]",
26959
- examples: [
26960
- "/update",
26961
- "/update --deps",
26962
- "/update --config",
26963
- "/update --system"
26964
- ]
26965
- },
26966
- // Design System Commands
26967
- "/design": {
26968
- name: "/design",
26969
- description: "Design System Suite - Creative brief, analysis, and asset generation",
26970
- category: "creative",
26971
- usage: "/design <command> [options]",
26972
- examples: [
26973
- '/design brief "Modern B2B SaaS landing page"',
26974
- "/design analyze --brand ./brand.md --competitor ./competitors.txt",
26975
- "/design web --profile=landing --a11y --perf",
26976
- "/design wireframe --pages Home,Pricing,Contact"
26977
- ]
26978
- },
26979
- "/design brief": {
26980
- name: "/design brief",
26981
- description: "Generate creative brief from natural language prompt",
26982
- category: "creative",
26983
- usage: '/design brief "<description>"',
26984
- examples: [
26985
- '/design brief "Professional B2B SaaS landing page"',
26986
- '/design brief "Minimal e-commerce product showcase"'
26987
- ]
26988
- },
26989
- "/design analyze": {
26990
- name: "/design analyze",
26991
- description: "Analyze brand guidelines and competitor designs",
26992
- category: "creative",
26993
- usage: "/design analyze [--brand path] [--competitor path]",
26994
- examples: [
26995
- "/design analyze --brand ./brand-guide.md",
26996
- "/design analyze --competitor ./competitors.txt",
26997
- "/design analyze --brand ./brand.md --competitor ./competitors.txt"
26998
- ]
26999
- },
27000
- "/design web": {
27001
- name: "/design web",
27002
- description: "Generate Web SOW with accessibility and performance options",
27003
- category: "creative",
27004
- usage: "/design web [--profile type] [--a11y] [--perf] [--out path]",
27005
- examples: [
27006
- "/design web --profile=landing --a11y --perf",
27007
- "/design web --profile=site --out ./docs/web-sow.md"
27008
- ]
27009
- },
27010
- // POC Commands (Production Ready)
27011
- "/nl-poc": {
27012
- name: "/nl-poc",
27013
- description: "Natural Language Command Translation (POC #1) - Production ready with 0.2ms response time",
27014
- category: "workflow",
27015
- usage: '/nl-poc "<natural language description>" [options]',
27016
- examples: [
27017
- '/nl-poc "commit my changes and run tests"',
27018
- '/nl-poc "fix typescript errors" --dry-run',
27019
- '/nl-poc "show system status" --explain --verbose'
27020
- ]
27021
- },
27022
- "/bug-poc": {
27023
- name: "/bug-poc",
27024
- description: "AI-powered error analysis and solution system (POC #4) - 80% accuracy, 0.2ms response time",
27025
- category: "quality",
27026
- usage: '/bug-poc "<error message>" [options]',
27027
- examples: [
27028
- `/bug-poc "Property 'name' does not exist on type 'User'"`,
27029
- `/bug-poc "Cannot read property 'id' of undefined" --file src/user.ts`,
27030
- "/bug-poc --from-output --verbose",
27031
- "/bug-poc --solution-id typescript-fix-0 --dry-run"
27032
- ]
27033
- },
27034
- // Intelligence System Commands
27035
- "/intelligence-dashboard": {
27036
- name: "/intelligence-dashboard",
27037
- description: "Start real-time MARIA Intelligence monitoring dashboard",
27038
- category: "intelligence",
27039
- usage: "/intelligence-dashboard [--format=ascii|html|json] [--duration=<minutes>] [--export=<file>]",
27040
- examples: [
27041
- "/intelligence-dashboard",
27042
- "/intelligence-dashboard --format html --export report.html",
27043
- "/intelligence-dashboard --duration 5 --format ascii"
27044
- ]
27045
- },
27046
- "/canary": {
27047
- name: "/canary",
27048
- description: "Manage MARIA Intelligence canary deployments for zero-downtime releases",
27049
- category: "intelligence",
27050
- usage: "/canary <action> [options]",
27051
- examples: [
27052
- "/canary deploy v4.2.0 --traffic 20 --duration 15",
27053
- "/canary status",
27054
- "/canary stop",
27055
- "/canary test"
27056
- ]
27057
- },
27058
- "/quality-gate": {
27059
- name: "/quality-gate",
27060
- description: "Run MARIA Intelligence quality gate validation with automated testing",
27061
- category: "intelligence",
27062
- usage: "/quality-gate [--threshold=<score>] [--verbose] [--report=<file>]",
27063
- examples: [
27064
- "/quality-gate",
27065
- "/quality-gate --threshold 85 --verbose",
27066
- "/quality-gate --report results.json"
27067
- ]
27068
- }
27069
- };
27070
- _normToken = (s2) => s2.trim().toLowerCase();
27071
- _withSlash = (s2) => s2.startsWith("/") ? s2 : `/${s2}`;
27072
- _keyOf = (s2) => _withSlash(_normToken(s2));
27073
- _NAME_MAP = /* @__PURE__ */ new Map();
27074
- _ALIAS_MAP = /* @__PURE__ */ new Map();
27075
- _CATEGORY_MAP = /* @__PURE__ */ new Map();
27076
- (function buildIndexes() {
27077
- for (const key2 of Object.keys(commandInfo)) {
27078
- const info = commandInfo[key2];
27079
- const canonical = _withSlash(info.name || key2);
27080
- _NAME_MAP.set(_keyOf(canonical), info);
27081
- const arr = _CATEGORY_MAP.get(info.category) ?? [];
27082
- arr.push(info);
27083
- _CATEGORY_MAP.set(info.category, arr);
27084
- if (info.aliases?.length) {
27085
- for (const a2 of info.aliases) {
27086
- _ALIAS_MAP.set(_keyOf(a2), info);
27087
- }
27088
- }
27089
- }
27090
- assertRegistry();
27091
- })();
27092
- }
27093
- });
27094
-
27095
26157
  // src/services/autocomplete-dropdown.ts
27096
26158
  var import_chalk15, AutocompleteDropdown;
27097
26159
  var init_autocomplete_dropdown = __esm({
@@ -28271,12 +27333,43 @@ async function loadBigQuery() {
28271
27333
  }
28272
27334
  return BigQuery;
28273
27335
  }
28274
- var import_events, BigQuery, bigQueryLoadAttempted, BigQueryTelemetryService, bigQueryTelemetry;
27336
+ async function loadFirebaseAdmin() {
27337
+ if (firebaseLoadAttempted) return { adminFirestore, FieldValue, Timestamp };
27338
+ firebaseLoadAttempted = true;
27339
+ try {
27340
+ const firebaseAdminModule = await import("firebase-admin/app");
27341
+ const firestoreModule = await import("firebase-admin/firestore");
27342
+ const keyPath = path9.join(process.cwd(), "config", "maria-cli-firestore-key.json");
27343
+ if (!adminApp && firebaseAdminModule.getApps().length === 0) {
27344
+ adminApp = firebaseAdminModule.initializeApp({
27345
+ credential: firebaseAdminModule.cert(keyPath),
27346
+ projectId: "maria-code-470602"
27347
+ });
27348
+ } else if (firebaseAdminModule.getApps().length > 0) {
27349
+ adminApp = firebaseAdminModule.getApps()[0];
27350
+ }
27351
+ if (adminApp) {
27352
+ adminFirestore = firestoreModule.getFirestore(adminApp);
27353
+ FieldValue = firestoreModule.FieldValue;
27354
+ Timestamp = firestoreModule.Timestamp;
27355
+ }
27356
+ } catch (error2) {
27357
+ console.warn("[Firestore] Firebase Admin not available for CLI telemetry:", error2.message);
27358
+ }
27359
+ return { adminFirestore, FieldValue, Timestamp };
27360
+ }
27361
+ var import_events, path9, BigQuery, bigQueryLoadAttempted, adminApp, adminFirestore, FieldValue, Timestamp, firebaseLoadAttempted, BigQueryTelemetryService, bigQueryTelemetry;
28275
27362
  var init_bigquery_telemetry = __esm({
28276
27363
  "src/services/telemetry/bigquery-telemetry.ts"() {
28277
27364
  import_events = require("events");
27365
+ path9 = __toESM(require("path"), 1);
28278
27366
  BigQuery = null;
28279
27367
  bigQueryLoadAttempted = false;
27368
+ adminApp = null;
27369
+ adminFirestore = null;
27370
+ FieldValue = null;
27371
+ Timestamp = null;
27372
+ firebaseLoadAttempted = false;
28280
27373
  BigQueryTelemetryService = class _BigQueryTelemetryService extends import_events.EventEmitter {
28281
27374
  static instance;
28282
27375
  bigquery = null;
@@ -28344,6 +27437,9 @@ var init_bigquery_telemetry = __esm({
28344
27437
  args: data2.args?.slice(0, 3)
28345
27438
  };
28346
27439
  this.telemetryQueue.push(telemetryData);
27440
+ this.syncToFirestore(telemetryData).catch((error2) => {
27441
+ console.warn("[Firestore Sync] Failed:", error2.message);
27442
+ });
28347
27443
  this.emit("command:tracked", telemetryData);
28348
27444
  if (this.telemetryQueue.length >= this.config.batchSize) {
28349
27445
  await this.flush();
@@ -28433,6 +27529,48 @@ var init_bigquery_telemetry = __esm({
28433
27529
  throw new Error(`HTTP flush failed: ${response2.status}`);
28434
27530
  }
28435
27531
  }
27532
+ /**
27533
+ * Sync telemetry data to Firestore for real-time dashboard
27534
+ */
27535
+ async syncToFirestore(data2) {
27536
+ if (!data2.userId) return;
27537
+ const { adminFirestore: adminFirestore2, FieldValue: FieldValue2, Timestamp: Timestamp2 } = await loadFirebaseAdmin();
27538
+ if (!adminFirestore2) return;
27539
+ try {
27540
+ const now = new Date(data2.timestamp);
27541
+ const periodId = `${now.getFullYear()}${String(now.getMonth() + 1).padStart(2, "0")}`;
27542
+ const userUsageRef = adminFirestore2.collection("users").doc(data2.userId).collection("usage").doc(periodId);
27543
+ const updateData = {
27544
+ lastUpdated: FieldValue2.serverTimestamp(),
27545
+ "used.requests": FieldValue2.increment(1)
27546
+ };
27547
+ if (data2.cmd === "code" || data2.cmd.includes("code")) {
27548
+ updateData["used.commands"] = FieldValue2.increment(1);
27549
+ }
27550
+ if (data2.quotaLeft) {
27551
+ const estimatedTokensUsed = Math.max(10, data2.latencyMs / 10);
27552
+ updateData["used.tokens"] = FieldValue2.increment(estimatedTokensUsed);
27553
+ }
27554
+ updateData["providers.maria-cli.requests"] = FieldValue2.increment(1);
27555
+ if (data2.quotaLeft) {
27556
+ const estimatedTokensUsed = Math.max(10, data2.latencyMs / 10);
27557
+ updateData["providers.maria-cli.tokens"] = FieldValue2.increment(estimatedTokensUsed);
27558
+ updateData["providers.maria-cli.cost"] = FieldValue2.increment(1e-4);
27559
+ }
27560
+ updateData["models.maria-cli.requests"] = FieldValue2.increment(1);
27561
+ if (data2.quotaLeft) {
27562
+ const estimatedTokensUsed = Math.max(10, data2.latencyMs / 10);
27563
+ updateData["models.maria-cli.tokens"] = FieldValue2.increment(estimatedTokensUsed);
27564
+ }
27565
+ updateData[`commands.${data2.cmd}`] = FieldValue2.increment(1);
27566
+ updateData["totalCost"] = FieldValue2.increment(1e-4);
27567
+ await userUsageRef.set(updateData, { merge: true });
27568
+ console.log(`[Firestore Sync] Updated usage for user ${data2.userId}, command ${data2.cmd}`);
27569
+ } catch (error2) {
27570
+ console.warn(`[Firestore Sync] Failed to update usage for user ${data2.userId}:`, error2);
27571
+ throw error2;
27572
+ }
27573
+ }
28436
27574
  /**
28437
27575
  * Start flush timer
28438
27576
  */
@@ -28567,8 +27705,30 @@ var init_bigquery_telemetry = __esm({
28567
27705
  });
28568
27706
 
28569
27707
  // src/slash-commands/shared/telemetry-helper.ts
27708
+ async function getUserContext() {
27709
+ try {
27710
+ const configDir = path10.join(process.env.HOME || process.env.USERPROFILE || "", ".maria");
27711
+ const authFile = path10.join(configDir, "auth.json");
27712
+ if (await fs9.pathExists(authFile)) {
27713
+ const authData = await fs9.readJson(authFile);
27714
+ return {
27715
+ userId: authData.userId || authData.user?.id,
27716
+ userEmail: authData.userEmail || authData.user?.email,
27717
+ sessionId: authData.sessionId || authData.token
27718
+ };
27719
+ }
27720
+ return {
27721
+ userId: process.env.MARIA_USER_ID,
27722
+ userEmail: process.env.MARIA_USER_EMAIL,
27723
+ sessionId: process.env.MARIA_SESSION_ID
27724
+ };
27725
+ } catch (error2) {
27726
+ return {};
27727
+ }
27728
+ }
28570
27729
  async function trackCommand(data2) {
28571
27730
  try {
27731
+ const userContext = await getUserContext();
28572
27732
  await bigQueryTelemetry.trackCommandExecution({
28573
27733
  cmd: data2.cmd,
28574
27734
  status: data2.status,
@@ -28576,7 +27736,10 @@ async function trackCommand(data2) {
28576
27736
  plan: data2.plan,
28577
27737
  quotaLeft: data2.quotaLeft,
28578
27738
  errorType: data2.errorType,
28579
- args: data2.args
27739
+ args: data2.args,
27740
+ userId: data2.userId || userContext.userId,
27741
+ userEmail: data2.userEmail || userContext.userEmail,
27742
+ sessionId: data2.sessionId || userContext.sessionId
28580
27743
  });
28581
27744
  fetch("/v1/telemetry", {
28582
27745
  method: "POST",
@@ -28605,9 +27768,12 @@ function getNextMonthStart() {
28605
27768
  const nextMonth = new Date(now.getFullYear(), now.getMonth() + 1, 1);
28606
27769
  return nextMonth.toISOString().split("T")[0];
28607
27770
  }
27771
+ var fs9, path10;
28608
27772
  var init_telemetry_helper = __esm({
28609
27773
  "src/slash-commands/shared/telemetry-helper.ts"() {
28610
27774
  init_bigquery_telemetry();
27775
+ fs9 = __toESM(require("fs-extra"), 1);
27776
+ path10 = __toESM(require("path"), 1);
28611
27777
  }
28612
27778
  });
28613
27779
 
@@ -29647,11 +28813,11 @@ var init_SlashCommandManager = __esm({
29647
28813
  });
29648
28814
 
29649
28815
  // src/services/help/ReadyCommandsService.ts
29650
- var fs9, path9, ReadyCommandsService;
28816
+ var fs10, path11, ReadyCommandsService;
29651
28817
  var init_ReadyCommandsService = __esm({
29652
28818
  "src/services/help/ReadyCommandsService.ts"() {
29653
- fs9 = __toESM(require("fs/promises"), 1);
29654
- path9 = __toESM(require("path"), 1);
28819
+ fs10 = __toESM(require("fs/promises"), 1);
28820
+ path11 = __toESM(require("path"), 1);
29655
28821
  ReadyCommandsService = class {
29656
28822
  readyCommands = [];
29657
28823
  commandsByName = /* @__PURE__ */ new Map();
@@ -29664,14 +28830,14 @@ var init_ReadyCommandsService = __esm({
29664
28830
  } else {
29665
28831
  const possiblePaths = [
29666
28832
  // For bundled dist version
29667
- path9.join(__dirname, "READY.manifest.json"),
29668
- path9.join(__dirname, "../READY.manifest.json"),
29669
- path9.join(process.cwd(), "dist/READY.manifest.json"),
28833
+ path11.join(__dirname, "READY.manifest.json"),
28834
+ path11.join(__dirname, "../READY.manifest.json"),
28835
+ path11.join(process.cwd(), "dist/READY.manifest.json"),
29670
28836
  // For development/source version
29671
- path9.join(__dirname, "../../../src/slash-commands/READY.manifest.json"),
29672
- path9.join(__dirname, "../../slash-commands/READY.manifest.json"),
29673
- path9.join(process.cwd(), "src/slash-commands/READY.manifest.json"),
29674
- path9.join(process.cwd(), "READY.manifest.json")
28837
+ path11.join(__dirname, "../../../src/slash-commands/READY.manifest.json"),
28838
+ path11.join(__dirname, "../../slash-commands/READY.manifest.json"),
28839
+ path11.join(process.cwd(), "src/slash-commands/READY.manifest.json"),
28840
+ path11.join(process.cwd(), "READY.manifest.json")
29675
28841
  ];
29676
28842
  this.manifestPath = possiblePaths[0];
29677
28843
  }
@@ -29682,21 +28848,21 @@ var init_ReadyCommandsService = __esm({
29682
28848
  async findManifestPath() {
29683
28849
  const possiblePaths = [
29684
28850
  // For bundled dist version
29685
- path9.join(__dirname, "READY.manifest.json"),
29686
- path9.join(__dirname, "../READY.manifest.json"),
29687
- path9.join(process.cwd(), "dist/READY.manifest.json"),
28851
+ path11.join(__dirname, "READY.manifest.json"),
28852
+ path11.join(__dirname, "../READY.manifest.json"),
28853
+ path11.join(process.cwd(), "dist/READY.manifest.json"),
29688
28854
  // For development/source version
29689
- path9.join(__dirname, "../../../src/slash-commands/READY.manifest.json"),
29690
- path9.join(__dirname, "../../slash-commands/READY.manifest.json"),
29691
- path9.join(process.cwd(), "src/slash-commands/READY.manifest.json"),
29692
- path9.join(process.cwd(), "READY.manifest.json"),
28855
+ path11.join(__dirname, "../../../src/slash-commands/READY.manifest.json"),
28856
+ path11.join(__dirname, "../../slash-commands/READY.manifest.json"),
28857
+ path11.join(process.cwd(), "src/slash-commands/READY.manifest.json"),
28858
+ path11.join(process.cwd(), "READY.manifest.json"),
29693
28859
  // Additional paths for different build scenarios
29694
- path9.resolve(__dirname, "../../../src/slash-commands/READY.manifest.json"),
29695
- path9.resolve(process.cwd(), "src/slash-commands/READY.manifest.json")
28860
+ path11.resolve(__dirname, "../../../src/slash-commands/READY.manifest.json"),
28861
+ path11.resolve(process.cwd(), "src/slash-commands/READY.manifest.json")
29696
28862
  ];
29697
28863
  for (const testPath of possiblePaths) {
29698
28864
  try {
29699
- await fs9.access(testPath);
28865
+ await fs10.access(testPath);
29700
28866
  this.manifestPath = testPath;
29701
28867
  return;
29702
28868
  } catch {
@@ -29710,7 +28876,7 @@ var init_ReadyCommandsService = __esm({
29710
28876
  async loadReadyCommands() {
29711
28877
  try {
29712
28878
  await this.findManifestPath();
29713
- const content = await fs9.readFile(this.manifestPath, "utf-8");
28879
+ const content = await fs10.readFile(this.manifestPath, "utf-8");
29714
28880
  const manifest = JSON.parse(content);
29715
28881
  if (manifest.commands && typeof manifest.commands === "object" && !Array.isArray(manifest.commands)) {
29716
28882
  this.readyCommands = this.convertObjectToReadyCommands(manifest.commands);
@@ -29985,9 +29151,9 @@ var init_ReadyCommandsService = __esm({
29985
29151
  if (this.readyCommands.length === 0) {
29986
29152
  await this.loadReadyCommands();
29987
29153
  }
29988
- const categories = [];
29154
+ const categories2 = [];
29989
29155
  for (const [categoryName, commands] of this.commandsByCategory) {
29990
- categories.push({
29156
+ categories2.push({
29991
29157
  name: categoryName,
29992
29158
  emoji: "",
29993
29159
  // Remove emojis for simplicity
@@ -29995,7 +29161,7 @@ var init_ReadyCommandsService = __esm({
29995
29161
  count: commands.length
29996
29162
  });
29997
29163
  }
29998
- categories.sort((a2, b) => {
29164
+ categories2.sort((a2, b) => {
29999
29165
  const aPriority = this.getCategoryPriority(a2.name);
30000
29166
  const bPriority = this.getCategoryPriority(b.name);
30001
29167
  if (aPriority !== bPriority) {
@@ -30003,7 +29169,7 @@ var init_ReadyCommandsService = __esm({
30003
29169
  }
30004
29170
  return a2.name.localeCompare(b.name);
30005
29171
  });
30006
- return categories;
29172
+ return categories2;
30007
29173
  }
30008
29174
  /**
30009
29175
  * Search commands with fuzzy matching
@@ -30339,7 +29505,7 @@ var init_HelpCommand = __esm({
30339
29505
  * Show general help with READY commands only
30340
29506
  */
30341
29507
  async showGeneralHelp() {
30342
- const categories = await this.readyService.getCategories();
29508
+ const categories2 = await this.readyService.getCategories();
30343
29509
  const stats = await this.readyService.getStatistics();
30344
29510
  const lines = [];
30345
29511
  lines.push("\u2550".repeat(60));
@@ -30352,14 +29518,14 @@ var init_HelpCommand = __esm({
30352
29518
  lines.push(" /help --search <term> - Search with fuzzy matching");
30353
29519
  lines.push("");
30354
29520
  let globalMaxNameLength = 0;
30355
- for (const category of categories) {
29521
+ for (const category of categories2) {
30356
29522
  const showCommands = category.commands.slice(0, 4);
30357
29523
  for (const cmd of showCommands) {
30358
29524
  globalMaxNameLength = Math.max(globalMaxNameLength, cmd.name.length);
30359
29525
  }
30360
29526
  }
30361
29527
  globalMaxNameLength = Math.max(globalMaxNameLength, 18) + 1;
30362
- for (const category of categories) {
29528
+ for (const category of categories2) {
30363
29529
  lines.push(import_chalk17.default.bold(`${category.name.toUpperCase()} (${category.count})`));
30364
29530
  const showCommands = category.commands.slice(0, 4);
30365
29531
  for (const cmd of showCommands) {
@@ -30460,8 +29626,8 @@ var init_HelpCommand = __esm({
30460
29626
  async showCategoryHelp(categoryName) {
30461
29627
  const commands = await this.readyService.getCommandsByCategory(categoryName);
30462
29628
  if (commands.length === 0) {
30463
- const categories = await this.readyService.getCategories();
30464
- const availableCategories = categories.map((c) => c.name);
29629
+ const categories2 = await this.readyService.getCategories();
29630
+ const availableCategories = categories2.map((c) => c.name);
30465
29631
  return this.error(
30466
29632
  `No READY commands in category: ${categoryName}. Available: ${availableCategories.join(", ")}`,
30467
29633
  "CATEGORY_NOT_FOUND"
@@ -30597,7 +29763,7 @@ var init_HelpCommand = __esm({
30597
29763
  */
30598
29764
  async showStatistics() {
30599
29765
  const stats = await this.readyService.getStatistics();
30600
- const categories = await this.readyService.getCategories();
29766
+ const categories2 = await this.readyService.getCategories();
30601
29767
  const lines = [];
30602
29768
  lines.push("");
30603
29769
  lines.push(`\u{1F4CA} ${import_chalk17.default.bold("READY COMMANDS STATISTICS")}`);
@@ -30614,7 +29780,7 @@ var init_HelpCommand = __esm({
30614
29780
  lines.push(` Slowest Command: /${stats.slowestCommand}`);
30615
29781
  lines.push("");
30616
29782
  lines.push(import_chalk17.default.bold("\u{1F4CB} By Category:"));
30617
- for (const category of categories) {
29783
+ for (const category of categories2) {
30618
29784
  const avgTime = Math.round(
30619
29785
  category.commands.reduce((sum, cmd) => sum + cmd.contract.maxResponseTime, 0) / category.commands.length
30620
29786
  );
@@ -30752,91 +29918,6 @@ Command: /voice ${args.join(" ")}`,
30752
29918
  }
30753
29919
  });
30754
29920
 
30755
- // src/slash-commands/categories/auth/LoginCommand.ts
30756
- var LoginCommand_exports = {};
30757
- __export(LoginCommand_exports, {
30758
- LoginCommand: () => LoginCommand,
30759
- meta: () => meta2
30760
- });
30761
- var LoginCommand, meta2;
30762
- var init_LoginCommand = __esm({
30763
- "src/slash-commands/categories/auth/LoginCommand.ts"() {
30764
- init_base_command();
30765
- init_cli_auth();
30766
- init_telemetry_helper();
30767
- init_subscription_manager();
30768
- LoginCommand = class extends BaseCommand {
30769
- name = "login";
30770
- category = "auth";
30771
- description = "Sign in to MARIA";
30772
- aliases = ["signin"];
30773
- usage = "";
30774
- examples = [
30775
- {
30776
- input: "/login",
30777
- description: "Sign in to MARIA",
30778
- output: "Logged in with plan and quota info"
30779
- }
30780
- ];
30781
- async execute(args, context2) {
30782
- const startTime = Date.now();
30783
- try {
30784
- const isAuthenticated = await authManager.isAuthenticated();
30785
- if (isAuthenticated) {
30786
- try {
30787
- const user = await authManager.getCurrentUser();
30788
- const plan2 = user.plan || "Free";
30789
- const quotaLeft2 = user.usage?.requestsRemaining || 100;
30790
- return this.success(`Already logged in \xB7 Plan: ${plan2} \xB7 ${quotaLeft2} req left`);
30791
- } catch {
30792
- }
30793
- }
30794
- const authResult = await authManager.login();
30795
- if (!authResult.success) {
30796
- return this.error(authResult.error || "Authentication failed \xB7 Try again", void 0, void 0, 2);
30797
- }
30798
- const userInfo2 = authResult.user;
30799
- const plan = userInfo2?.plan || "Free";
30800
- const quotaLeft = userInfo2?.usage?.requestsRemaining || 100;
30801
- const email = userInfo2?.email || "user";
30802
- await trackCommand({
30803
- cmd: "login",
30804
- status: "success",
30805
- latencyMs: Date.now() - startTime,
30806
- plan,
30807
- quotaLeft
30808
- });
30809
- const message = `\u2705 Logged in as ${email} \xB7 Plan: ${plan} \xB7 ${quotaLeft} req left`;
30810
- return this.success(withQuotaFooter(message, quotaLeft));
30811
- } catch (error2) {
30812
- await trackCommand({
30813
- cmd: "login",
30814
- status: "error",
30815
- latencyMs: Date.now() - startTime,
30816
- plan: getUserPlan(),
30817
- quotaLeft: 999
30818
- });
30819
- if (error2.message?.includes("User cancelled")) {
30820
- return this.success("Login cancelled");
30821
- }
30822
- return this.error("Login failed \xB7 Check your connection and try again", void 0, void 0, 2);
30823
- }
30824
- }
30825
- };
30826
- meta2 = {
30827
- name: "login",
30828
- category: "auth",
30829
- description: "Sign in to MARIA",
30830
- aliases: ["signin"],
30831
- usage: "",
30832
- examples: [
30833
- "/login"
30834
- ],
30835
- deps: []
30836
- };
30837
- }
30838
- });
30839
-
30840
29921
  // src/services/model-selector-ui.ts
30841
29922
  var readline4, import_chalk18, ModelSelectorUI;
30842
29923
  var init_model_selector_ui = __esm({
@@ -31050,9 +30131,9 @@ var init_model_selector_ui = __esm({
31050
30131
  var ModelCommand_exports = {};
31051
30132
  __export(ModelCommand_exports, {
31052
30133
  ModelCommand: () => ModelCommand,
31053
- meta: () => meta3
30134
+ meta: () => meta2
31054
30135
  });
31055
- var ModelCommand, meta3;
30136
+ var ModelCommand, meta2;
31056
30137
  var init_ModelCommand = __esm({
31057
30138
  "src/slash-commands/categories/configuration/handlers/ModelCommand.ts"() {
31058
30139
  init_base_command();
@@ -32313,7 +31394,7 @@ ${model.description}
32313
31394
  }
32314
31395
  }
32315
31396
  };
32316
- meta3 = {
31397
+ meta2 = {
32317
31398
  name: "model",
32318
31399
  category: "configuration",
32319
31400
  description: "Manages AI model configuration and selection",
@@ -32504,9 +31585,9 @@ var init_BaseCommand = __esm({
32504
31585
  var ConfigCommand_exports = {};
32505
31586
  __export(ConfigCommand_exports, {
32506
31587
  ConfigCommand: () => ConfigCommand,
32507
- meta: () => meta4
31588
+ meta: () => meta3
32508
31589
  });
32509
- var import_promises3, import_path4, import_os3, ConfigCommand, meta4;
31590
+ var import_promises3, import_path4, import_os3, ConfigCommand, meta3;
32510
31591
  var init_ConfigCommand = __esm({
32511
31592
  "src/slash-commands/categories/configuration/handlers/ConfigCommand.ts"() {
32512
31593
  init_BaseCommand();
@@ -33209,7 +32290,7 @@ var init_ConfigCommand = __esm({
33209
32290
  };
33210
32291
  }
33211
32292
  };
33212
- meta4 = {
32293
+ meta3 = {
33213
32294
  name: "config",
33214
32295
  category: "configuration",
33215
32296
  description: "Manages MARIA configuration settings",
@@ -33612,9 +32693,9 @@ Chat:
33612
32693
  }
33613
32694
  if (cmd === "login" || cmd === "signin" || cmd === "auth") {
33614
32695
  try {
33615
- const { LoginCommand: LoginCommand2 } = await Promise.resolve().then(() => (init_LoginCommand(), LoginCommand_exports)).catch(() => ({}));
33616
- if (LoginCommand2) {
33617
- const loginCmd = new LoginCommand2();
32696
+ const { LoginCommand } = await import("./slash-commands/categories/auth/LoginCommand.js").catch(() => ({}));
32697
+ if (LoginCommand) {
32698
+ const loginCmd = new LoginCommand();
33618
32699
  const result = await loginCmd.execute();
33619
32700
  return true;
33620
32701
  } else {
@@ -34024,8 +33105,8 @@ async function handleCodeCommand(prompt) {
34024
33105
  console.log(response2);
34025
33106
  const { language, code, extension } = extractCodeInfo(response2);
34026
33107
  const filename = generateCodeFilename(prompt, language, extension);
34027
- const filepath = path11.resolve(process.cwd(), filename);
34028
- await fs11.writeFile(filepath, code, "utf-8");
33108
+ const filepath = path13.resolve(process.cwd(), filename);
33109
+ await fs12.writeFile(filepath, code, "utf-8");
34029
33110
  console.log(
34030
33111
  import_chalk19.default.green("\n\u2705 **Code Saved**\n") + import_chalk19.default.white(`\u{1F4C1} **File (Click to open):**
34031
33112
  `) + import_chalk19.default.cyan(`\u2022 [${filename}](file://${filepath})
@@ -34050,8 +33131,8 @@ async function handleCodeCommand(prompt) {
34050
33131
  try {
34051
33132
  const { language, code, extension } = extractCodeInfo(fallbackCode);
34052
33133
  const filename = generateCodeFilename(prompt, language, extension);
34053
- const filepath = path11.resolve(process.cwd(), filename);
34054
- await fs11.writeFile(filepath, code, "utf-8");
33134
+ const filepath = path13.resolve(process.cwd(), filename);
33135
+ await fs12.writeFile(filepath, code, "utf-8");
34055
33136
  console.log(
34056
33137
  import_chalk19.default.green("\n\u2705 **Template Code Saved**\n") + import_chalk19.default.white(`\u{1F4C1} **File (Click to open):**
34057
33138
  `) + import_chalk19.default.cyan(`\u2022 [${filename}](file://${filepath})
@@ -34403,7 +33484,7 @@ function createCLI() {
34403
33484
  if (options.server) {
34404
33485
  console.log(import_chalk19.default.green("\u{1F680} Starting MARIA server mode..."));
34405
33486
  try {
34406
- const serverPath = path11.join(process.cwd(), "server.mjs");
33487
+ const serverPath = path13.join(process.cwd(), "server.mjs");
34407
33488
  const { spawn } = await import("child_process");
34408
33489
  const serverProcess = spawn("node", [serverPath], {
34409
33490
  stdio: "inherit",
@@ -34447,15 +33528,15 @@ function createCLI() {
34447
33528
  });
34448
33529
  return program2;
34449
33530
  }
34450
- var import_commander, import_chalk19, readline5, import_node_process3, path11, fs11, AIResponseService2, ChatContextService2, ConversationPersistence2, InteractiveCLI2, ai, ctx, store, session, commandManager, startupDisplayed, program;
33531
+ var import_commander, import_chalk19, readline5, import_node_process3, path13, fs12, AIResponseService2, ChatContextService2, ConversationPersistence2, InteractiveCLI2, ai, ctx, store, session, commandManager, startupDisplayed, program;
34451
33532
  var init_cli = __esm({
34452
33533
  "src/cli.ts"() {
34453
33534
  import_commander = require("commander");
34454
33535
  import_chalk19 = __toESM(require("chalk"), 1);
34455
33536
  readline5 = __toESM(require("readline/promises"), 1);
34456
33537
  import_node_process3 = require("process");
34457
- path11 = __toESM(require("path"), 1);
34458
- fs11 = __toESM(require("fs/promises"), 1);
33538
+ path13 = __toESM(require("path"), 1);
33539
+ fs12 = __toESM(require("fs/promises"), 1);
34459
33540
  init_env_loader();
34460
33541
  init_version();
34461
33542
  init_animations();