@bonginkan/maria 4.2.6 → 4.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +301 -106
- package/README.md +1478 -1408
- package/dist/READY.manifest.json +77 -84
- package/dist/bin/maria.cjs +413 -1296
- package/dist/bin/maria.cjs.map +1 -1
- package/dist/cli.cjs +417 -1305
- package/dist/cli.cjs.map +1 -1
- package/dist/index.js +557 -1351
- package/dist/index.js.map +1 -1
- package/package.json +26 -23
- package/src/slash-commands/READY.manifest.json +77 -84
package/dist/bin/maria.cjs
CHANGED
|
@@ -155,13 +155,13 @@ function getPackageJson() {
|
|
|
155
155
|
)
|
|
156
156
|
];
|
|
157
157
|
let packageJsonPath = null;
|
|
158
|
-
for (const
|
|
159
|
-
if ((0, import_fs.existsSync)(
|
|
158
|
+
for (const path14 of possiblePaths) {
|
|
159
|
+
if ((0, import_fs.existsSync)(path14)) {
|
|
160
160
|
try {
|
|
161
|
-
const content = (0, import_fs.readFileSync)(
|
|
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 =
|
|
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
|
-
|
|
399
|
-
|
|
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
|
|
455
|
+
const meta4 = uri.substring(5, firstComma).split(";");
|
|
473
456
|
let charset = "";
|
|
474
457
|
let base64 = false;
|
|
475
|
-
const type =
|
|
458
|
+
const type = meta4[0] || "text/plain";
|
|
476
459
|
let typeFull = type;
|
|
477
|
-
for (let i2 = 1; i2 <
|
|
478
|
-
if (
|
|
460
|
+
for (let i2 = 1; i2 < meta4.length; i2++) {
|
|
461
|
+
if (meta4[i2] === "base64") {
|
|
479
462
|
base64 = true;
|
|
480
|
-
} else if (
|
|
481
|
-
typeFull += `;${
|
|
482
|
-
if (
|
|
483
|
-
charset =
|
|
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 (!
|
|
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 = (
|
|
5267
|
-
blobFrom = (
|
|
5268
|
-
fileFrom = (
|
|
5269
|
-
fileFromSync = (
|
|
5270
|
-
fromBlob = (stat2,
|
|
5271
|
-
path:
|
|
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,
|
|
5277
|
-
path:
|
|
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)(
|
|
5264
|
+
})], (0, import_node_path.basename)(path14), { type, lastModified: stat2.mtimeMs });
|
|
5282
5265
|
BlobDataItem = class _BlobDataItem {
|
|
5283
5266
|
#path;
|
|
5284
5267
|
#start;
|
|
@@ -7109,15 +7092,36 @@ var init_SecretManagerIntegration = __esm({
|
|
|
7109
7092
|
"src/services/intelligent-model-selector/SecretManagerIntegration.ts"() {
|
|
7110
7093
|
import_secret_manager = require("@google-cloud/secret-manager");
|
|
7111
7094
|
SecretManagerIntegration = class {
|
|
7112
|
-
// 1 hour
|
|
7113
7095
|
constructor(config2) {
|
|
7114
7096
|
this.config = config2;
|
|
7115
|
-
this.
|
|
7097
|
+
this.useGsm = this.shouldUseGsm();
|
|
7116
7098
|
}
|
|
7117
|
-
client;
|
|
7099
|
+
client = null;
|
|
7118
7100
|
cache = /* @__PURE__ */ new Map();
|
|
7119
7101
|
cacheExpiry = /* @__PURE__ */ new Map();
|
|
7120
7102
|
CACHE_TTL = 36e5;
|
|
7103
|
+
// 1 hour
|
|
7104
|
+
useGsm;
|
|
7105
|
+
/** Determine whether GSM should be used in this environment */
|
|
7106
|
+
shouldUseGsm() {
|
|
7107
|
+
if (process.env.MARIA_DISABLE_GSM === "true") return false;
|
|
7108
|
+
if (process.env.GOOGLE_APPLICATION_CREDENTIALS) return true;
|
|
7109
|
+
if (process.env.GOOGLE_CLOUD_PROJECT || process.env.GCLOUD_PROJECT) return true;
|
|
7110
|
+
if (process.env.CLOUD_RUN_SERVICE || process.env.K_SERVICE) return true;
|
|
7111
|
+
if (process.env.GCE_METADATA_HOST) return true;
|
|
7112
|
+
return false;
|
|
7113
|
+
}
|
|
7114
|
+
/** Lazily create Secret Manager client only when permitted */
|
|
7115
|
+
ensureClient() {
|
|
7116
|
+
if (!this.useGsm) return null;
|
|
7117
|
+
if (this.client) return this.client;
|
|
7118
|
+
try {
|
|
7119
|
+
this.client = new import_secret_manager.SecretManagerServiceClient();
|
|
7120
|
+
} catch {
|
|
7121
|
+
this.client = null;
|
|
7122
|
+
}
|
|
7123
|
+
return this.client;
|
|
7124
|
+
}
|
|
7121
7125
|
/**
|
|
7122
7126
|
* Get API key from Secret Manager with caching
|
|
7123
7127
|
*/
|
|
@@ -7126,13 +7130,17 @@ var init_SecretManagerIntegration = __esm({
|
|
|
7126
7130
|
if (!secretName) {
|
|
7127
7131
|
return void 0;
|
|
7128
7132
|
}
|
|
7133
|
+
const client = this.ensureClient();
|
|
7134
|
+
if (!client) {
|
|
7135
|
+
return this.getFallbackFromEnv(provider);
|
|
7136
|
+
}
|
|
7129
7137
|
const cached = this.getCachedSecret(secretName);
|
|
7130
7138
|
if (cached) {
|
|
7131
7139
|
return cached;
|
|
7132
7140
|
}
|
|
7133
7141
|
try {
|
|
7134
7142
|
const name2 = `projects/${this.config.projectId}/secrets/${secretName}/versions/latest`;
|
|
7135
|
-
const [version] = await
|
|
7143
|
+
const [version] = await client.accessSecretVersion({ name: name2 });
|
|
7136
7144
|
const payload = version.payload?.data;
|
|
7137
7145
|
if (!payload) {
|
|
7138
7146
|
return void 0;
|
|
@@ -7165,6 +7173,10 @@ var init_SecretManagerIntegration = __esm({
|
|
|
7165
7173
|
* Verify that required secrets exist
|
|
7166
7174
|
*/
|
|
7167
7175
|
async verifySecrets() {
|
|
7176
|
+
const client = this.ensureClient();
|
|
7177
|
+
if (!client) {
|
|
7178
|
+
return { available: [], missing: [] };
|
|
7179
|
+
}
|
|
7168
7180
|
const available = [];
|
|
7169
7181
|
const missing = [];
|
|
7170
7182
|
const providers = ["google", "openai", "anthropic", "groq"];
|
|
@@ -7173,7 +7185,7 @@ var init_SecretManagerIntegration = __esm({
|
|
|
7173
7185
|
if (!secretName) continue;
|
|
7174
7186
|
try {
|
|
7175
7187
|
const name2 = `projects/${this.config.projectId}/secrets/${secretName}`;
|
|
7176
|
-
await
|
|
7188
|
+
await client.getSecret({ name: name2 });
|
|
7177
7189
|
available.push(provider);
|
|
7178
7190
|
} catch (error2) {
|
|
7179
7191
|
missing.push(provider);
|
|
@@ -7189,17 +7201,21 @@ var init_SecretManagerIntegration = __esm({
|
|
|
7189
7201
|
if (!secretName) {
|
|
7190
7202
|
return false;
|
|
7191
7203
|
}
|
|
7204
|
+
const client = this.ensureClient();
|
|
7205
|
+
if (!client) {
|
|
7206
|
+
return false;
|
|
7207
|
+
}
|
|
7192
7208
|
const secretId = `projects/${this.config.projectId}/secrets/${secretName}`;
|
|
7193
7209
|
try {
|
|
7194
7210
|
let secretExists = false;
|
|
7195
7211
|
try {
|
|
7196
|
-
await
|
|
7212
|
+
await client.getSecret({ name: secretId });
|
|
7197
7213
|
secretExists = true;
|
|
7198
7214
|
} catch {
|
|
7199
7215
|
secretExists = false;
|
|
7200
7216
|
}
|
|
7201
7217
|
if (!secretExists) {
|
|
7202
|
-
await
|
|
7218
|
+
await client.createSecret({
|
|
7203
7219
|
parent: `projects/${this.config.projectId}`,
|
|
7204
7220
|
secretId: secretName,
|
|
7205
7221
|
secret: {
|
|
@@ -7213,7 +7229,7 @@ var init_SecretManagerIntegration = __esm({
|
|
|
7213
7229
|
}
|
|
7214
7230
|
});
|
|
7215
7231
|
}
|
|
7216
|
-
await
|
|
7232
|
+
await client.addSecretVersion({
|
|
7217
7233
|
parent: secretId,
|
|
7218
7234
|
payload: {
|
|
7219
7235
|
data: Buffer.from(apiKey, "utf8")
|
|
@@ -7565,6 +7581,7 @@ var init_groq_provider = __esm({
|
|
|
7565
7581
|
const _modelPricing = _pricing[_model] || _pricing["mixtral-8x7b-32768"];
|
|
7566
7582
|
return _tokens * 0.75 * _modelPricing.input + _tokens * 0.25 * _modelPricing.output;
|
|
7567
7583
|
}
|
|
7584
|
+
// Note: complete() and stream() methods are already implemented above (lines 105-200)
|
|
7568
7585
|
};
|
|
7569
7586
|
}
|
|
7570
7587
|
});
|
|
@@ -9079,12 +9096,12 @@ ${this.toYamlLike(value, indent + 1)}`;
|
|
|
9079
9096
|
}
|
|
9080
9097
|
static async loadFromFile(configPath) {
|
|
9081
9098
|
const { importNodeBuiltin: importNodeBuiltin2 } = await Promise.resolve().then(() => (init_import_helper(), import_helper_exports));
|
|
9082
|
-
const
|
|
9099
|
+
const fs13 = await importNodeBuiltin2("fs");
|
|
9083
9100
|
const _path = await importNodeBuiltin2("path");
|
|
9084
9101
|
const os9 = await importNodeBuiltin2("os");
|
|
9085
9102
|
const targetPath = configPath || _path.join(os9.homedir(), ".maria", "config.json");
|
|
9086
9103
|
try {
|
|
9087
|
-
const data2 = await
|
|
9104
|
+
const data2 = await fs13.promises.readFile(targetPath, "utf-8");
|
|
9088
9105
|
return JSON.parse(data2);
|
|
9089
9106
|
} catch (innerError) {
|
|
9090
9107
|
if (error?.code === "ENOENT") {
|
|
@@ -9098,25 +9115,25 @@ ${this.toYamlLike(value, indent + 1)}`;
|
|
|
9098
9115
|
}
|
|
9099
9116
|
async save(configPath, options) {
|
|
9100
9117
|
const { importNodeBuiltin: importNodeBuiltin2 } = await Promise.resolve().then(() => (init_import_helper(), import_helper_exports));
|
|
9101
|
-
const
|
|
9118
|
+
const fs13 = await importNodeBuiltin2("fs");
|
|
9102
9119
|
const _path = await importNodeBuiltin2("path");
|
|
9103
9120
|
const os9 = await importNodeBuiltin2("os");
|
|
9104
9121
|
const targetPath = configPath || _path.join(os9.homedir(), ".maria", "config.json");
|
|
9105
9122
|
try {
|
|
9106
9123
|
if (options?.backup) {
|
|
9107
9124
|
try {
|
|
9108
|
-
await
|
|
9125
|
+
await fs13.promises.access(targetPath);
|
|
9109
9126
|
const backupPath = `${targetPath}.backup.${Date.now()}`;
|
|
9110
|
-
await
|
|
9127
|
+
await fs13.promises.copyFile(targetPath, backupPath);
|
|
9111
9128
|
} catch {
|
|
9112
9129
|
}
|
|
9113
9130
|
}
|
|
9114
|
-
await
|
|
9131
|
+
await fs13.promises.mkdir(_path.dirname(targetPath), { recursive: true });
|
|
9115
9132
|
const dataToSave = this.getAll({
|
|
9116
9133
|
maskSensitive: options?.maskSensitive ?? true,
|
|
9117
9134
|
includeSourceMap: options?.includeSourceMap ?? false
|
|
9118
9135
|
});
|
|
9119
|
-
await
|
|
9136
|
+
await fs13.promises.writeFile(
|
|
9120
9137
|
targetPath,
|
|
9121
9138
|
JSON.stringify(dataToSave, null, 2),
|
|
9122
9139
|
{ mode: 384 }
|
|
@@ -9160,12 +9177,12 @@ ${this.toYamlLike(value, indent + 1)}`;
|
|
|
9160
9177
|
}
|
|
9161
9178
|
if (outputPath) {
|
|
9162
9179
|
const { importNodeBuiltin: importNodeBuiltin2 } = await Promise.resolve().then(() => (init_import_helper(), import_helper_exports));
|
|
9163
|
-
const
|
|
9180
|
+
const fs13 = await importNodeBuiltin2("fs");
|
|
9164
9181
|
const _path = await importNodeBuiltin2(
|
|
9165
9182
|
"path"
|
|
9166
9183
|
);
|
|
9167
|
-
await
|
|
9168
|
-
await
|
|
9184
|
+
await fs13.promises.mkdir(_path.dirname(outputPath), { recursive: true });
|
|
9185
|
+
await fs13.promises.writeFile(outputPath, content, "utf-8");
|
|
9169
9186
|
console.log(`\u2705 Configuration exported to ${outputPath}`);
|
|
9170
9187
|
}
|
|
9171
9188
|
return content;
|
|
@@ -9334,13 +9351,13 @@ async function loadEnvironmentConfig() {
|
|
|
9334
9351
|
}
|
|
9335
9352
|
try {
|
|
9336
9353
|
const { importNodeBuiltin: importNodeBuiltin2, safeDynamicImport: safeDynamicImport2 } = await Promise.resolve().then(() => (init_import_helper(), import_helper_exports));
|
|
9337
|
-
const
|
|
9354
|
+
const fs13 = await safeDynamicImport2("fs-extra").catch(
|
|
9338
9355
|
() => importNodeBuiltin2("fs")
|
|
9339
9356
|
);
|
|
9340
9357
|
const _path = await importNodeBuiltin2("path");
|
|
9341
9358
|
const _envPath = _path.join(process.cwd(), ".env.local");
|
|
9342
|
-
if (await
|
|
9343
|
-
const _envContent = await
|
|
9359
|
+
if (await fs13.pathExists(_envPath)) {
|
|
9360
|
+
const _envContent = await fs13.readFile(_envPath, "utf-8");
|
|
9344
9361
|
console.log("Loading environment from:", _envPath);
|
|
9345
9362
|
environmentLoaded = true;
|
|
9346
9363
|
const _lines = _envContent.split("\n");
|
|
@@ -15589,6 +15606,90 @@ var init_logger = __esm({
|
|
|
15589
15606
|
}
|
|
15590
15607
|
});
|
|
15591
15608
|
|
|
15609
|
+
// src/lib/command-groups.ts
|
|
15610
|
+
function getCommandInfo(command) {
|
|
15611
|
+
const normalizedCommand = command.startsWith("/") ? command.slice(1) : command;
|
|
15612
|
+
if (commandInfo[normalizedCommand]) {
|
|
15613
|
+
return {
|
|
15614
|
+
name: `/${normalizedCommand}`,
|
|
15615
|
+
...commandInfo[normalizedCommand]
|
|
15616
|
+
};
|
|
15617
|
+
}
|
|
15618
|
+
for (const [key2, info] of Object.entries(commandInfo)) {
|
|
15619
|
+
if (info.aliases?.includes(normalizedCommand)) {
|
|
15620
|
+
return {
|
|
15621
|
+
name: `/${key2}`,
|
|
15622
|
+
...info
|
|
15623
|
+
};
|
|
15624
|
+
}
|
|
15625
|
+
}
|
|
15626
|
+
return void 0;
|
|
15627
|
+
}
|
|
15628
|
+
var commandGroups, allCommands, categories, commandInfo;
|
|
15629
|
+
var init_command_groups = __esm({
|
|
15630
|
+
"src/lib/command-groups.ts"() {
|
|
15631
|
+
commandGroups = {
|
|
15632
|
+
core: [
|
|
15633
|
+
"about",
|
|
15634
|
+
"changelog",
|
|
15635
|
+
"config",
|
|
15636
|
+
"contact",
|
|
15637
|
+
"doctor",
|
|
15638
|
+
"examples",
|
|
15639
|
+
"help",
|
|
15640
|
+
"history",
|
|
15641
|
+
"list",
|
|
15642
|
+
"logout",
|
|
15643
|
+
"model",
|
|
15644
|
+
"ping",
|
|
15645
|
+
"plan",
|
|
15646
|
+
"plugins",
|
|
15647
|
+
"status",
|
|
15648
|
+
"tutorial",
|
|
15649
|
+
"usage",
|
|
15650
|
+
"verify",
|
|
15651
|
+
"version"
|
|
15652
|
+
],
|
|
15653
|
+
auth: ["login", "logout", "whoami"],
|
|
15654
|
+
code: ["code", "mm", "multimodal"],
|
|
15655
|
+
configuration: ["config", "hooks", "model", "permissions", "settings", "theme"],
|
|
15656
|
+
multimodal: ["face", "image", "mm", "multimodal", "screenshot", "video", "voice"],
|
|
15657
|
+
evolution: ["benchmark", "evolve", "quality"],
|
|
15658
|
+
memory: ["forget", "memory", "recall", "remember"],
|
|
15659
|
+
analysis: ["analyze", "diagram", "diff", "visualize"],
|
|
15660
|
+
system: ["doctor", "health", "manifest", "selftest"],
|
|
15661
|
+
workflow: ["nl", "nl-poc"],
|
|
15662
|
+
safety: ["check"],
|
|
15663
|
+
evaluation: ["run"],
|
|
15664
|
+
assistant: ["ask", "chat", "think"],
|
|
15665
|
+
data: ["db", "export", "import", "sync"],
|
|
15666
|
+
utilities: ["alias", "clear", "history", "reset"],
|
|
15667
|
+
experimental: ["preview", "test"],
|
|
15668
|
+
business: ["battlecard", "sales-dashboard", "tune", "pilot-setup"],
|
|
15669
|
+
plugins: ["plugins"],
|
|
15670
|
+
search: ["search"],
|
|
15671
|
+
enterprise: ["admin", "audit", "compliance", "security"],
|
|
15672
|
+
development: ["debug", "profile", "trace"]
|
|
15673
|
+
};
|
|
15674
|
+
allCommands = Object.values(commandGroups).flat();
|
|
15675
|
+
categories = Object.keys(commandGroups);
|
|
15676
|
+
commandInfo = {};
|
|
15677
|
+
for (const [category, commands] of Object.entries(commandGroups)) {
|
|
15678
|
+
for (const command of commands) {
|
|
15679
|
+
commandInfo[command] = {
|
|
15680
|
+
name: `/${command}`,
|
|
15681
|
+
category
|
|
15682
|
+
};
|
|
15683
|
+
}
|
|
15684
|
+
}
|
|
15685
|
+
commandInfo["model"] = { ...commandInfo["model"], aliases: ["/m", "/models"] };
|
|
15686
|
+
commandInfo["memory"] = { ...commandInfo["memory"], aliases: ["/mem"] };
|
|
15687
|
+
commandInfo["login"] = { ...commandInfo["login"], aliases: ["/signin"] };
|
|
15688
|
+
commandInfo["logout"] = { ...commandInfo["logout"], aliases: ["/signout"] };
|
|
15689
|
+
commandInfo["evolve"] = { ...commandInfo["evolve"], aliases: ["/evolution", "/auto-evolve"] };
|
|
15690
|
+
}
|
|
15691
|
+
});
|
|
15692
|
+
|
|
15592
15693
|
// src/index.ts
|
|
15593
15694
|
var init_src2 = __esm({
|
|
15594
15695
|
"src/index.ts"() {
|
|
@@ -15923,8 +16024,8 @@ var init_ConfigService = __esm({
|
|
|
15923
16024
|
/**
|
|
15924
16025
|
* ネストされた設定値の取得
|
|
15925
16026
|
*/
|
|
15926
|
-
getNestedValue(
|
|
15927
|
-
const keys =
|
|
16027
|
+
getNestedValue(path14) {
|
|
16028
|
+
const keys = path14.split(".");
|
|
15928
16029
|
let value = this._config;
|
|
15929
16030
|
for (const key2 of keys) {
|
|
15930
16031
|
if (value && typeof value === "object" && key2 in value) {
|
|
@@ -15954,8 +16055,8 @@ var init_ConfigService = __esm({
|
|
|
15954
16055
|
/**
|
|
15955
16056
|
* ネストされた設定値の更新
|
|
15956
16057
|
*/
|
|
15957
|
-
async setNestedValue(
|
|
15958
|
-
const keys =
|
|
16058
|
+
async setNestedValue(path14, value) {
|
|
16059
|
+
const keys = path14.split(".");
|
|
15959
16060
|
const lastKey = keys.pop();
|
|
15960
16061
|
let target = this._config;
|
|
15961
16062
|
for (const key2 of keys) {
|
|
@@ -15968,7 +16069,7 @@ var init_ConfigService = __esm({
|
|
|
15968
16069
|
target[lastKey] = value;
|
|
15969
16070
|
this.validateConfig();
|
|
15970
16071
|
this.emitChange({
|
|
15971
|
-
path:
|
|
16072
|
+
path: path14,
|
|
15972
16073
|
oldValue,
|
|
15973
16074
|
newValue: value,
|
|
15974
16075
|
timestamp: /* @__PURE__ */ new Date()
|
|
@@ -16013,8 +16114,8 @@ var init_ConfigService = __esm({
|
|
|
16013
16114
|
setupAutoSave() {
|
|
16014
16115
|
process.on("exit", () => {
|
|
16015
16116
|
if (this._isDirty) {
|
|
16016
|
-
const
|
|
16017
|
-
|
|
16117
|
+
const fs13 = require("fs");
|
|
16118
|
+
fs13.writeFileSync(
|
|
16018
16119
|
this._userConfigPath,
|
|
16019
16120
|
JSON.stringify(this._config, null, 2),
|
|
16020
16121
|
"utf-8"
|
|
@@ -16025,13 +16126,13 @@ var init_ConfigService = __esm({
|
|
|
16025
16126
|
/**
|
|
16026
16127
|
* 変更リスナーの登録
|
|
16027
16128
|
*/
|
|
16028
|
-
onChange(
|
|
16029
|
-
if (!this._listeners.has(
|
|
16030
|
-
this._listeners.set(
|
|
16129
|
+
onChange(path14, listener) {
|
|
16130
|
+
if (!this._listeners.has(path14)) {
|
|
16131
|
+
this._listeners.set(path14, []);
|
|
16031
16132
|
}
|
|
16032
|
-
this._listeners.get(
|
|
16133
|
+
this._listeners.get(path14).push(listener);
|
|
16033
16134
|
return () => {
|
|
16034
|
-
const listeners = this._listeners.get(
|
|
16135
|
+
const listeners = this._listeners.get(path14);
|
|
16035
16136
|
if (listeners) {
|
|
16036
16137
|
const index = listeners.indexOf(listener);
|
|
16037
16138
|
if (index !== -1) {
|
|
@@ -16523,7 +16624,7 @@ var init_ValidationService = __esm({
|
|
|
16523
16624
|
);
|
|
16524
16625
|
this._schemas.set(
|
|
16525
16626
|
"filePath",
|
|
16526
|
-
import_zod3.z.string().min(1).max(this._config.maxFilePathLength).refine((
|
|
16627
|
+
import_zod3.z.string().min(1).max(this._config.maxFilePathLength).refine((path14) => !this.containsPathTraversal(path14), {
|
|
16527
16628
|
message: "Path traversal detected"
|
|
16528
16629
|
})
|
|
16529
16630
|
);
|
|
@@ -16662,11 +16763,11 @@ var init_ValidationService = __esm({
|
|
|
16662
16763
|
/**
|
|
16663
16764
|
* ファイルパス検証
|
|
16664
16765
|
*/
|
|
16665
|
-
validateFilePath(
|
|
16766
|
+
validateFilePath(path14) {
|
|
16666
16767
|
try {
|
|
16667
16768
|
const schema = this._schemas.get("filePath");
|
|
16668
|
-
const result = schema.parse(
|
|
16669
|
-
if (this.isSystemPath(
|
|
16769
|
+
const result = schema.parse(path14);
|
|
16770
|
+
if (this.isSystemPath(path14)) {
|
|
16670
16771
|
return {
|
|
16671
16772
|
valid: false,
|
|
16672
16773
|
errors: [
|
|
@@ -16812,8 +16913,8 @@ var init_ValidationService = __esm({
|
|
|
16812
16913
|
/**
|
|
16813
16914
|
* パストラバーサルの検出
|
|
16814
16915
|
*/
|
|
16815
|
-
containsPathTraversal(
|
|
16816
|
-
return /\.\.[/\\]/.test(
|
|
16916
|
+
containsPathTraversal(path14) {
|
|
16917
|
+
return /\.\.[/\\]/.test(path14) || path14.includes("..\\") || path14.includes("../");
|
|
16817
16918
|
}
|
|
16818
16919
|
/**
|
|
16819
16920
|
* 危険なコマンドの判定
|
|
@@ -16840,7 +16941,7 @@ var init_ValidationService = __esm({
|
|
|
16840
16941
|
/**
|
|
16841
16942
|
* システムパスの判定
|
|
16842
16943
|
*/
|
|
16843
|
-
isSystemPath(
|
|
16944
|
+
isSystemPath(path14) {
|
|
16844
16945
|
const systemPaths = [
|
|
16845
16946
|
"/etc",
|
|
16846
16947
|
"/sys",
|
|
@@ -16854,7 +16955,7 @@ var init_ValidationService = __esm({
|
|
|
16854
16955
|
"/sbin"
|
|
16855
16956
|
];
|
|
16856
16957
|
return systemPaths.some(
|
|
16857
|
-
(sysPath) =>
|
|
16958
|
+
(sysPath) => path14.toLowerCase().startsWith(sysPath.toLowerCase())
|
|
16858
16959
|
);
|
|
16859
16960
|
}
|
|
16860
16961
|
/**
|
|
@@ -19627,13 +19728,13 @@ var init_CommandRegistry = __esm({
|
|
|
19627
19728
|
* @returns Array of unique categories
|
|
19628
19729
|
*/
|
|
19629
19730
|
getCategories() {
|
|
19630
|
-
const
|
|
19731
|
+
const categories2 = /* @__PURE__ */ new Set();
|
|
19631
19732
|
for (const registration of this.handlers.values()) {
|
|
19632
19733
|
if (registration.handler.category) {
|
|
19633
|
-
|
|
19734
|
+
categories2.add(registration.handler.category);
|
|
19634
19735
|
}
|
|
19635
19736
|
}
|
|
19636
|
-
return Array.from(
|
|
19737
|
+
return Array.from(categories2);
|
|
19637
19738
|
}
|
|
19638
19739
|
/**
|
|
19639
19740
|
* Get command help text
|
|
@@ -20524,14 +20625,14 @@ var init_CoreHandlers = __esm({
|
|
|
20524
20625
|
let message = import_chalk10.default.cyan(`\u{1F916} MARIA v3.5.0 - Available Commands
|
|
20525
20626
|
|
|
20526
20627
|
`);
|
|
20527
|
-
const
|
|
20628
|
+
const categories2 = {
|
|
20528
20629
|
core: ["/help", "/clear", "/exit", "/version", "/history"],
|
|
20529
20630
|
conversation: ["/chat", "/context", "/memory"],
|
|
20530
20631
|
development: ["/code", "/test", "/review", "/debug", "/deploy"],
|
|
20531
20632
|
business: ["/business", "/pilot", "/dashboard"],
|
|
20532
20633
|
system: ["/status", "/config", "/logs", "/approve"]
|
|
20533
20634
|
};
|
|
20534
|
-
for (const [category, cmds] of Object.entries(
|
|
20635
|
+
for (const [category, cmds] of Object.entries(categories2)) {
|
|
20535
20636
|
message += import_chalk10.default.yellow(`
|
|
20536
20637
|
${category.toUpperCase()}:
|
|
20537
20638
|
`);
|
|
@@ -20550,7 +20651,7 @@ Type '/help <command>' for detailed information about a specific command.`
|
|
|
20550
20651
|
return {
|
|
20551
20652
|
success: true,
|
|
20552
20653
|
message,
|
|
20553
|
-
data: { commands, categories },
|
|
20654
|
+
data: { commands, categories: categories2 },
|
|
20554
20655
|
metadata: {
|
|
20555
20656
|
processingTime,
|
|
20556
20657
|
timestamp: /* @__PURE__ */ new Date()
|
|
@@ -21699,15 +21800,15 @@ var init_SessionOrchestrator = __esm({
|
|
|
21699
21800
|
/**
|
|
21700
21801
|
* 設定の取得
|
|
21701
21802
|
*/
|
|
21702
|
-
getConfig(
|
|
21703
|
-
return this._configService?.getNestedValue(
|
|
21803
|
+
getConfig(path14) {
|
|
21804
|
+
return this._configService?.getNestedValue(path14);
|
|
21704
21805
|
}
|
|
21705
21806
|
/**
|
|
21706
21807
|
* 設定の更新
|
|
21707
21808
|
*/
|
|
21708
|
-
async setConfig(
|
|
21809
|
+
async setConfig(path14, value) {
|
|
21709
21810
|
if (this._configService) {
|
|
21710
|
-
await this._configService.setNestedValue(
|
|
21811
|
+
await this._configService.setNestedValue(path14, value);
|
|
21711
21812
|
}
|
|
21712
21813
|
}
|
|
21713
21814
|
/**
|
|
@@ -21825,11 +21926,11 @@ var init_interactive_session = __esm({
|
|
|
21825
21926
|
getStats() {
|
|
21826
21927
|
return this.orchestrator.getSessionStats();
|
|
21827
21928
|
}
|
|
21828
|
-
getConfig(
|
|
21829
|
-
return this.orchestrator.getConfig(
|
|
21929
|
+
getConfig(path14) {
|
|
21930
|
+
return this.orchestrator.getConfig(path14);
|
|
21830
21931
|
}
|
|
21831
|
-
async setConfig(
|
|
21832
|
-
await this.orchestrator.setConfig(
|
|
21932
|
+
async setConfig(path14, value) {
|
|
21933
|
+
await this.orchestrator.setConfig(path14, value);
|
|
21833
21934
|
}
|
|
21834
21935
|
};
|
|
21835
21936
|
}
|
|
@@ -21841,8 +21942,8 @@ var init_package = __esm({
|
|
|
21841
21942
|
"package.json"() {
|
|
21842
21943
|
package_default = {
|
|
21843
21944
|
name: "@bonginkan/maria",
|
|
21844
|
-
version: "4.2.
|
|
21845
|
-
description: "\u{1F680} MARIA v4.2.
|
|
21945
|
+
version: "4.2.8",
|
|
21946
|
+
description: "\u{1F680} MARIA v4.2.8 - 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
21947
|
keywords: [
|
|
21847
21948
|
"ai",
|
|
21848
21949
|
"cli",
|
|
@@ -22068,19 +22169,18 @@ var init_package = __esm({
|
|
|
22068
22169
|
node: ">=20.10.0"
|
|
22069
22170
|
},
|
|
22070
22171
|
scripts: {
|
|
22071
|
-
|
|
22072
|
-
"
|
|
22073
|
-
"
|
|
22074
|
-
|
|
22075
|
-
"
|
|
22076
|
-
"build:
|
|
22077
|
-
|
|
22078
|
-
|
|
22172
|
+
"ensure:manifest": "tsx scripts/generate-ready-manifest.ts",
|
|
22173
|
+
"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/');"`,
|
|
22174
|
+
"verify:manifest": "tsx scripts/verify-manifest-inclusion.ts",
|
|
22175
|
+
build: "pnpm ensure:manifest && cross-env NODE_ENV=production tsup && pnpm copy:manifest && pnpm verify:manifest",
|
|
22176
|
+
"build:dev": "pnpm ensure:manifest && cross-env NODE_ENV=development tsup && pnpm copy:manifest && pnpm verify:manifest",
|
|
22177
|
+
"build:analyze": "pnpm ensure:manifest && cross-env ANALYZE=true NODE_ENV=production tsup && pnpm copy:manifest && pnpm verify:manifest",
|
|
22178
|
+
"build:fast": "cross-env NODE_ENV=production tsup --minify false --sourcemap false",
|
|
22179
|
+
dev: "cross-env NODE_ENV=development tsup --watch",
|
|
22180
|
+
clean: "rimraf dist",
|
|
22079
22181
|
"gen:cmd-types": "tsx scripts/gen/command-types.mts",
|
|
22080
|
-
prebuild: "pnpm run clean && pnpm gen:cmd-types && pnpm
|
|
22081
|
-
"ensure:manifest": "test -f src/slash-commands/READY.manifest.json || npm run generate:manifest",
|
|
22182
|
+
prebuild: "pnpm run clean && pnpm gen:cmd-types && pnpm ensure:manifest && pnpm vscode:sync",
|
|
22082
22183
|
"build:docker": "NODE_ENV=production tsup",
|
|
22083
|
-
postbuild: "chmod +x dist/cli.cjs dist/bin/maria.cjs 2>/dev/null || true",
|
|
22084
22184
|
test: "vitest",
|
|
22085
22185
|
"test:coverage": "vitest --coverage",
|
|
22086
22186
|
"test:smoke": "vitest run src/__tests__/smoke.test.ts",
|
|
@@ -22091,7 +22191,7 @@ var init_package = __esm({
|
|
|
22091
22191
|
"test:integration:ci": "vitest run --config vitest.integration.config.ts --reporter=json --reporter=verbose",
|
|
22092
22192
|
"test:contract": "vitest run tests/contract/**/*.test.ts",
|
|
22093
22193
|
"test:deps": "cross-env MOCK_DEPS=true vitest run tests/contract/**/*.test.ts",
|
|
22094
|
-
"generate:manifest": "tsx scripts/generate-ready-manifest.ts",
|
|
22194
|
+
"generate:manifest": "tsx scripts/generate-ready-manifest.ts && tsx scripts/generate-enhanced-manifest.ts",
|
|
22095
22195
|
"health:report": "tsx scripts/command-health-report.ts",
|
|
22096
22196
|
"ims:deploy": "tsx scripts/deploy-ims-config.ts",
|
|
22097
22197
|
"ims:secrets": "tsx scripts/setup-ims-secrets.ts",
|
|
@@ -22099,19 +22199,19 @@ var init_package = __esm({
|
|
|
22099
22199
|
"ims:dashboard": "tsx scripts/ims-dashboard.ts",
|
|
22100
22200
|
"ci:smoke": "pnpm -s build && pnpm -s test:smoke",
|
|
22101
22201
|
"verify:build": "tsx scripts/verify-manifest-inclusion.ts",
|
|
22102
|
-
lint:
|
|
22103
|
-
"lint:errors-only":
|
|
22104
|
-
"lint:ci":
|
|
22105
|
-
"lint:fix":
|
|
22106
|
-
"lint:fix:errors":
|
|
22202
|
+
lint: 'eslint --cache "src/**/*.{ts,tsx}"',
|
|
22203
|
+
"lint:errors-only": 'eslint --cache --quiet "src/**/*.{ts,tsx}"',
|
|
22204
|
+
"lint:ci": 'eslint --cache --max-warnings=0 "src/**/*.{ts,tsx}"',
|
|
22205
|
+
"lint:fix": 'eslint --cache --fix "src/**/*.{ts,tsx}"',
|
|
22206
|
+
"lint:fix:errors": 'eslint --cache --quiet --fix "src/**/*.{ts,tsx}"',
|
|
22107
22207
|
"lint:report": "eslint src --ext .ts,.tsx --format json > lint-report.json",
|
|
22108
|
-
"lint:summary":
|
|
22208
|
+
"lint:summary": 'eslint --cache --format codeframe "src/**/*.{ts,tsx}"',
|
|
22109
22209
|
"lint:strict": "eslint src --ext .ts,.tsx --max-warnings 0",
|
|
22110
|
-
"type-check": "
|
|
22111
|
-
"type-check:syntax": "
|
|
22210
|
+
"type-check": "tsc -p tsconfig.json --noEmit",
|
|
22211
|
+
"type-check:syntax": "tsc -p tsconfig.json --noEmit",
|
|
22112
22212
|
"type-check:full": "tsc --noEmit",
|
|
22113
22213
|
precommit: "lint-staged",
|
|
22114
|
-
"quality-gate":
|
|
22214
|
+
"quality-gate": `pnpm lint:errors-only && pnpm type-check:syntax && node -e "console.log('\u2705 Quality gates passed')"`,
|
|
22115
22215
|
"quality-gate:ci": "pnpm lint:errors-only && pnpm type-check:syntax",
|
|
22116
22216
|
"quality-check": "bash scripts/check-quality-gates.sh",
|
|
22117
22217
|
"ready:baseline": "tsx scripts/check-ready-baseline.ts",
|
|
@@ -22157,6 +22257,7 @@ var init_package = __esm({
|
|
|
22157
22257
|
"release:alpha": "pnpm publish --tag alpha",
|
|
22158
22258
|
"release:beta": "pnpm publish --tag beta",
|
|
22159
22259
|
"version:sync": "node scripts/sync-versions.js",
|
|
22260
|
+
"vscode:sync": "tsx scripts/sync-vscode-version.ts",
|
|
22160
22261
|
"test:arch": "depcruise --config .dependency-cruiser.cjs 'src/**/*.ts?(x)'",
|
|
22161
22262
|
"check:public-api": 'grep -REn "export (\\*|\\{|default)" src | grep -v "^src/index.ts:" || true',
|
|
22162
22263
|
"check:deps": 'depcruise --config .dependency-cruiser.cjs "src/**/*.ts?(x)"',
|
|
@@ -22217,6 +22318,7 @@ var init_package = __esm({
|
|
|
22217
22318
|
"express-validator": "^7.2.1",
|
|
22218
22319
|
figlet: "^1.7.0",
|
|
22219
22320
|
"file-type": "^21.0.0",
|
|
22321
|
+
"firebase-admin": "^13.5.0",
|
|
22220
22322
|
"fs-extra": "^11.2.0",
|
|
22221
22323
|
"fuse.js": "^7.1.0",
|
|
22222
22324
|
globby: "^14.1.0",
|
|
@@ -22282,6 +22384,7 @@ var init_package = __esm({
|
|
|
22282
22384
|
"cli-highlight": "^2.1.11",
|
|
22283
22385
|
compression: "^1.8.1",
|
|
22284
22386
|
cors: "^2.8.5",
|
|
22387
|
+
"cross-env": "^10.0.0",
|
|
22285
22388
|
"dependency-cruiser": "^16.10.4",
|
|
22286
22389
|
eslint: "^8.56.0",
|
|
22287
22390
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -22300,6 +22403,7 @@ var init_package = __esm({
|
|
|
22300
22403
|
prettier: "^3.2.4",
|
|
22301
22404
|
"react-devtools-core": "^6.1.5",
|
|
22302
22405
|
recast: "^0.23.11",
|
|
22406
|
+
rimraf: "^6.0.1",
|
|
22303
22407
|
"rollup-plugin-visualizer": "^6.0.3",
|
|
22304
22408
|
sqlite: "^5.1.1",
|
|
22305
22409
|
sqlite3: "^5.1.7",
|
|
@@ -22855,15 +22959,34 @@ var init_AuthSecretManager = __esm({
|
|
|
22855
22959
|
"src/services/cli-auth/AuthSecretManager.ts"() {
|
|
22856
22960
|
import_secret_manager2 = require("@google-cloud/secret-manager");
|
|
22857
22961
|
AuthSecretManager = class {
|
|
22858
|
-
client;
|
|
22962
|
+
client = null;
|
|
22859
22963
|
cache = /* @__PURE__ */ new Map();
|
|
22860
22964
|
cacheExpiry = /* @__PURE__ */ new Map();
|
|
22861
22965
|
CACHE_TTL = 36e5;
|
|
22862
22966
|
// 1 hour
|
|
22863
22967
|
projectId;
|
|
22968
|
+
useGsm;
|
|
22864
22969
|
constructor() {
|
|
22865
22970
|
this.projectId = process.env.GCLOUD_PROJECT || "maria-code-470602";
|
|
22866
|
-
this.
|
|
22971
|
+
this.useGsm = this.shouldUseGsm();
|
|
22972
|
+
if (this.useGsm) {
|
|
22973
|
+
try {
|
|
22974
|
+
this.client = new import_secret_manager2.SecretManagerServiceClient();
|
|
22975
|
+
} catch {
|
|
22976
|
+
this.client = null;
|
|
22977
|
+
}
|
|
22978
|
+
}
|
|
22979
|
+
}
|
|
22980
|
+
/**
|
|
22981
|
+
* Determine whether to use Google Secret Manager in this environment
|
|
22982
|
+
*/
|
|
22983
|
+
shouldUseGsm() {
|
|
22984
|
+
if (process.env.MARIA_DISABLE_GSM === "true") return false;
|
|
22985
|
+
if (process.env.GOOGLE_APPLICATION_CREDENTIALS) return true;
|
|
22986
|
+
if (process.env.GOOGLE_CLOUD_PROJECT || process.env.GCLOUD_PROJECT) return true;
|
|
22987
|
+
if (process.env.CLOUD_RUN_SERVICE || process.env.K_SERVICE) return true;
|
|
22988
|
+
if (process.env.GCE_METADATA_HOST) return true;
|
|
22989
|
+
return false;
|
|
22867
22990
|
}
|
|
22868
22991
|
/**
|
|
22869
22992
|
* Get authentication configuration from Secret Manager
|
|
@@ -22884,6 +23007,9 @@ var init_AuthSecretManager = __esm({
|
|
|
22884
23007
|
* Get a specific secret from Secret Manager
|
|
22885
23008
|
*/
|
|
22886
23009
|
async getSecret(secretName) {
|
|
23010
|
+
if (!this.useGsm || !this.client) {
|
|
23011
|
+
return null;
|
|
23012
|
+
}
|
|
22887
23013
|
const cached = this.getCachedSecret(secretName);
|
|
22888
23014
|
if (cached) {
|
|
22889
23015
|
return cached;
|
|
@@ -22964,7 +23090,7 @@ var init_AuthSecretManager = __esm({
|
|
|
22964
23090
|
if (process.env.MARIA_AUTH_BASE) {
|
|
22965
23091
|
return process.env.MARIA_AUTH_BASE;
|
|
22966
23092
|
}
|
|
22967
|
-
const cloudRunUrl = "https://auth-
|
|
23093
|
+
const cloudRunUrl = "https://auth.maria-code.ai";
|
|
22968
23094
|
return cloudRunUrl;
|
|
22969
23095
|
}
|
|
22970
23096
|
/**
|
|
@@ -22977,7 +23103,7 @@ var init_AuthSecretManager = __esm({
|
|
|
22977
23103
|
if (process.env.MARIA_API_BASE) {
|
|
22978
23104
|
return process.env.MARIA_API_BASE;
|
|
22979
23105
|
}
|
|
22980
|
-
const cloudRunApiUrl = "https://maria-code
|
|
23106
|
+
const cloudRunApiUrl = "https://api.maria-code.ai";
|
|
22981
23107
|
return cloudRunApiUrl;
|
|
22982
23108
|
}
|
|
22983
23109
|
};
|
|
@@ -23042,7 +23168,7 @@ var init_AuthenticationManager = __esm({
|
|
|
23042
23168
|
if (process.env.MARIA_AUTH_MODE === "local") {
|
|
23043
23169
|
return "http://localhost:3001";
|
|
23044
23170
|
}
|
|
23045
|
-
const cloudRunUrl = "https://auth-
|
|
23171
|
+
const cloudRunUrl = "https://auth.maria-code.ai";
|
|
23046
23172
|
if (process.env.MARIA_USE_CUSTOM_DOMAIN === "true") {
|
|
23047
23173
|
return "https://auth.maria-code.ai";
|
|
23048
23174
|
}
|
|
@@ -23052,7 +23178,7 @@ var init_AuthenticationManager = __esm({
|
|
|
23052
23178
|
if (process.env.MARIA_AUTH_MODE === "local") {
|
|
23053
23179
|
return "http://localhost:3000/api";
|
|
23054
23180
|
}
|
|
23055
|
-
const cloudRunApiUrl = "https://maria-code
|
|
23181
|
+
const cloudRunApiUrl = "https://api.maria-code.ai";
|
|
23056
23182
|
if (process.env.MARIA_USE_CUSTOM_DOMAIN === "true") {
|
|
23057
23183
|
return "https://api.maria-code.ai";
|
|
23058
23184
|
}
|
|
@@ -25335,11 +25461,11 @@ export async function DELETE(
|
|
|
25335
25461
|
runCommands: isJapanese ? [
|
|
25336
25462
|
"Next.js \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306B\u914D\u7F6E",
|
|
25337
25463
|
"pnpm dev \u3067\u30B5\u30FC\u30D0\u30FC\u8D77\u52D5",
|
|
25338
|
-
"curl
|
|
25464
|
+
"curl https://maria-code.ai/api/users \u3067\u30C6\u30B9\u30C8"
|
|
25339
25465
|
] : [
|
|
25340
25466
|
"Place in Next.js project",
|
|
25341
25467
|
"Run server with npm run dev",
|
|
25342
|
-
"Test with curl
|
|
25468
|
+
"Test with curl https://maria-code.ai/api/users"
|
|
25343
25469
|
],
|
|
25344
25470
|
notes: isJapanese ? [
|
|
25345
25471
|
"App Router (Next.js 13+) \u3092\u4F7F\u7528",
|
|
@@ -26061,1037 +26187,6 @@ ${options.map((opt, i2) => `${i2 + 1}) ${opt}`).join("\n")}`;
|
|
|
26061
26187
|
}
|
|
26062
26188
|
});
|
|
26063
26189
|
|
|
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
26190
|
// src/services/autocomplete-dropdown.ts
|
|
27096
26191
|
var import_chalk15, AutocompleteDropdown;
|
|
27097
26192
|
var init_autocomplete_dropdown = __esm({
|
|
@@ -27184,8 +26279,11 @@ var init_autocomplete_dropdown = __esm({
|
|
|
27184
26279
|
const isSelected = index === this.selectedIndex;
|
|
27185
26280
|
const prefix = isSelected ? import_chalk15.default.cyan("\u25BA ") : " ";
|
|
27186
26281
|
const nameStyle = isSelected ? import_chalk15.default.inverse : (s2) => s2;
|
|
27187
|
-
const
|
|
27188
|
-
const
|
|
26282
|
+
const safeName = (suggestion?.name ?? "").toString();
|
|
26283
|
+
const safeDescRaw = suggestion?.description ?? "";
|
|
26284
|
+
const safeDesc = typeof safeDescRaw === "string" ? safeDescRaw : String(safeDescRaw ?? "");
|
|
26285
|
+
const displayName = safeName.padEnd(20);
|
|
26286
|
+
const displayDesc = safeDesc.length > 30 ? safeDesc.substring(0, 27) + "..." : safeDesc.padEnd(30);
|
|
27189
26287
|
const line = `\u2502${prefix}${nameStyle(import_chalk15.default.white(displayName) + " " + import_chalk15.default.gray(displayDesc))} \u2502`;
|
|
27190
26288
|
process.stdout.write("\x1B[K" + line + "\n");
|
|
27191
26289
|
});
|
|
@@ -28271,12 +27369,43 @@ async function loadBigQuery() {
|
|
|
28271
27369
|
}
|
|
28272
27370
|
return BigQuery;
|
|
28273
27371
|
}
|
|
28274
|
-
|
|
27372
|
+
async function loadFirebaseAdmin() {
|
|
27373
|
+
if (firebaseLoadAttempted) return { adminFirestore, FieldValue, Timestamp };
|
|
27374
|
+
firebaseLoadAttempted = true;
|
|
27375
|
+
try {
|
|
27376
|
+
const firebaseAdminModule = await import("firebase-admin/app");
|
|
27377
|
+
const firestoreModule = await import("firebase-admin/firestore");
|
|
27378
|
+
const keyPath = path9.join(process.cwd(), "config", "maria-cli-firestore-key.json");
|
|
27379
|
+
if (!adminApp && firebaseAdminModule.getApps().length === 0) {
|
|
27380
|
+
adminApp = firebaseAdminModule.initializeApp({
|
|
27381
|
+
credential: firebaseAdminModule.cert(keyPath),
|
|
27382
|
+
projectId: "maria-code-470602"
|
|
27383
|
+
});
|
|
27384
|
+
} else if (firebaseAdminModule.getApps().length > 0) {
|
|
27385
|
+
adminApp = firebaseAdminModule.getApps()[0];
|
|
27386
|
+
}
|
|
27387
|
+
if (adminApp) {
|
|
27388
|
+
adminFirestore = firestoreModule.getFirestore(adminApp);
|
|
27389
|
+
FieldValue = firestoreModule.FieldValue;
|
|
27390
|
+
Timestamp = firestoreModule.Timestamp;
|
|
27391
|
+
}
|
|
27392
|
+
} catch (error2) {
|
|
27393
|
+
console.warn("[Firestore] Firebase Admin not available for CLI telemetry:", error2.message);
|
|
27394
|
+
}
|
|
27395
|
+
return { adminFirestore, FieldValue, Timestamp };
|
|
27396
|
+
}
|
|
27397
|
+
var import_events, path9, BigQuery, bigQueryLoadAttempted, adminApp, adminFirestore, FieldValue, Timestamp, firebaseLoadAttempted, BigQueryTelemetryService, bigQueryTelemetry;
|
|
28275
27398
|
var init_bigquery_telemetry = __esm({
|
|
28276
27399
|
"src/services/telemetry/bigquery-telemetry.ts"() {
|
|
28277
27400
|
import_events = require("events");
|
|
27401
|
+
path9 = __toESM(require("path"), 1);
|
|
28278
27402
|
BigQuery = null;
|
|
28279
27403
|
bigQueryLoadAttempted = false;
|
|
27404
|
+
adminApp = null;
|
|
27405
|
+
adminFirestore = null;
|
|
27406
|
+
FieldValue = null;
|
|
27407
|
+
Timestamp = null;
|
|
27408
|
+
firebaseLoadAttempted = false;
|
|
28280
27409
|
BigQueryTelemetryService = class _BigQueryTelemetryService extends import_events.EventEmitter {
|
|
28281
27410
|
static instance;
|
|
28282
27411
|
bigquery = null;
|
|
@@ -28344,6 +27473,9 @@ var init_bigquery_telemetry = __esm({
|
|
|
28344
27473
|
args: data2.args?.slice(0, 3)
|
|
28345
27474
|
};
|
|
28346
27475
|
this.telemetryQueue.push(telemetryData);
|
|
27476
|
+
this.syncToFirestore(telemetryData).catch((error2) => {
|
|
27477
|
+
console.warn("[Firestore Sync] Failed:", error2.message);
|
|
27478
|
+
});
|
|
28347
27479
|
this.emit("command:tracked", telemetryData);
|
|
28348
27480
|
if (this.telemetryQueue.length >= this.config.batchSize) {
|
|
28349
27481
|
await this.flush();
|
|
@@ -28433,6 +27565,48 @@ var init_bigquery_telemetry = __esm({
|
|
|
28433
27565
|
throw new Error(`HTTP flush failed: ${response2.status}`);
|
|
28434
27566
|
}
|
|
28435
27567
|
}
|
|
27568
|
+
/**
|
|
27569
|
+
* Sync telemetry data to Firestore for real-time dashboard
|
|
27570
|
+
*/
|
|
27571
|
+
async syncToFirestore(data2) {
|
|
27572
|
+
if (!data2.userId) return;
|
|
27573
|
+
const { adminFirestore: adminFirestore2, FieldValue: FieldValue2, Timestamp: Timestamp2 } = await loadFirebaseAdmin();
|
|
27574
|
+
if (!adminFirestore2) return;
|
|
27575
|
+
try {
|
|
27576
|
+
const now = new Date(data2.timestamp);
|
|
27577
|
+
const periodId = `${now.getFullYear()}${String(now.getMonth() + 1).padStart(2, "0")}`;
|
|
27578
|
+
const userUsageRef = adminFirestore2.collection("users").doc(data2.userId).collection("usage").doc(periodId);
|
|
27579
|
+
const updateData = {
|
|
27580
|
+
lastUpdated: FieldValue2.serverTimestamp(),
|
|
27581
|
+
"used.requests": FieldValue2.increment(1)
|
|
27582
|
+
};
|
|
27583
|
+
if (data2.cmd === "code" || data2.cmd.includes("code")) {
|
|
27584
|
+
updateData["used.commands"] = FieldValue2.increment(1);
|
|
27585
|
+
}
|
|
27586
|
+
if (data2.quotaLeft) {
|
|
27587
|
+
const estimatedTokensUsed = Math.max(10, data2.latencyMs / 10);
|
|
27588
|
+
updateData["used.tokens"] = FieldValue2.increment(estimatedTokensUsed);
|
|
27589
|
+
}
|
|
27590
|
+
updateData["providers.maria-cli.requests"] = FieldValue2.increment(1);
|
|
27591
|
+
if (data2.quotaLeft) {
|
|
27592
|
+
const estimatedTokensUsed = Math.max(10, data2.latencyMs / 10);
|
|
27593
|
+
updateData["providers.maria-cli.tokens"] = FieldValue2.increment(estimatedTokensUsed);
|
|
27594
|
+
updateData["providers.maria-cli.cost"] = FieldValue2.increment(1e-4);
|
|
27595
|
+
}
|
|
27596
|
+
updateData["models.maria-cli.requests"] = FieldValue2.increment(1);
|
|
27597
|
+
if (data2.quotaLeft) {
|
|
27598
|
+
const estimatedTokensUsed = Math.max(10, data2.latencyMs / 10);
|
|
27599
|
+
updateData["models.maria-cli.tokens"] = FieldValue2.increment(estimatedTokensUsed);
|
|
27600
|
+
}
|
|
27601
|
+
updateData[`commands.${data2.cmd}`] = FieldValue2.increment(1);
|
|
27602
|
+
updateData["totalCost"] = FieldValue2.increment(1e-4);
|
|
27603
|
+
await userUsageRef.set(updateData, { merge: true });
|
|
27604
|
+
console.log(`[Firestore Sync] Updated usage for user ${data2.userId}, command ${data2.cmd}`);
|
|
27605
|
+
} catch (error2) {
|
|
27606
|
+
console.warn(`[Firestore Sync] Failed to update usage for user ${data2.userId}:`, error2);
|
|
27607
|
+
throw error2;
|
|
27608
|
+
}
|
|
27609
|
+
}
|
|
28436
27610
|
/**
|
|
28437
27611
|
* Start flush timer
|
|
28438
27612
|
*/
|
|
@@ -28567,8 +27741,30 @@ var init_bigquery_telemetry = __esm({
|
|
|
28567
27741
|
});
|
|
28568
27742
|
|
|
28569
27743
|
// src/slash-commands/shared/telemetry-helper.ts
|
|
27744
|
+
async function getUserContext() {
|
|
27745
|
+
try {
|
|
27746
|
+
const configDir = path10.join(process.env.HOME || process.env.USERPROFILE || "", ".maria");
|
|
27747
|
+
const authFile = path10.join(configDir, "auth.json");
|
|
27748
|
+
if (await fs9.pathExists(authFile)) {
|
|
27749
|
+
const authData = await fs9.readJson(authFile);
|
|
27750
|
+
return {
|
|
27751
|
+
userId: authData.userId || authData.user?.id,
|
|
27752
|
+
userEmail: authData.userEmail || authData.user?.email,
|
|
27753
|
+
sessionId: authData.sessionId || authData.token
|
|
27754
|
+
};
|
|
27755
|
+
}
|
|
27756
|
+
return {
|
|
27757
|
+
userId: process.env.MARIA_USER_ID,
|
|
27758
|
+
userEmail: process.env.MARIA_USER_EMAIL,
|
|
27759
|
+
sessionId: process.env.MARIA_SESSION_ID
|
|
27760
|
+
};
|
|
27761
|
+
} catch (error2) {
|
|
27762
|
+
return {};
|
|
27763
|
+
}
|
|
27764
|
+
}
|
|
28570
27765
|
async function trackCommand(data2) {
|
|
28571
27766
|
try {
|
|
27767
|
+
const userContext = await getUserContext();
|
|
28572
27768
|
await bigQueryTelemetry.trackCommandExecution({
|
|
28573
27769
|
cmd: data2.cmd,
|
|
28574
27770
|
status: data2.status,
|
|
@@ -28576,7 +27772,10 @@ async function trackCommand(data2) {
|
|
|
28576
27772
|
plan: data2.plan,
|
|
28577
27773
|
quotaLeft: data2.quotaLeft,
|
|
28578
27774
|
errorType: data2.errorType,
|
|
28579
|
-
args: data2.args
|
|
27775
|
+
args: data2.args,
|
|
27776
|
+
userId: data2.userId || userContext.userId,
|
|
27777
|
+
userEmail: data2.userEmail || userContext.userEmail,
|
|
27778
|
+
sessionId: data2.sessionId || userContext.sessionId
|
|
28580
27779
|
});
|
|
28581
27780
|
fetch("/v1/telemetry", {
|
|
28582
27781
|
method: "POST",
|
|
@@ -28605,9 +27804,12 @@ function getNextMonthStart() {
|
|
|
28605
27804
|
const nextMonth = new Date(now.getFullYear(), now.getMonth() + 1, 1);
|
|
28606
27805
|
return nextMonth.toISOString().split("T")[0];
|
|
28607
27806
|
}
|
|
27807
|
+
var fs9, path10;
|
|
28608
27808
|
var init_telemetry_helper = __esm({
|
|
28609
27809
|
"src/slash-commands/shared/telemetry-helper.ts"() {
|
|
28610
27810
|
init_bigquery_telemetry();
|
|
27811
|
+
fs9 = __toESM(require("fs-extra"), 1);
|
|
27812
|
+
path10 = __toESM(require("path"), 1);
|
|
28611
27813
|
}
|
|
28612
27814
|
});
|
|
28613
27815
|
|
|
@@ -29647,11 +28849,11 @@ var init_SlashCommandManager = __esm({
|
|
|
29647
28849
|
});
|
|
29648
28850
|
|
|
29649
28851
|
// src/services/help/ReadyCommandsService.ts
|
|
29650
|
-
var
|
|
28852
|
+
var fs10, path11, ReadyCommandsService;
|
|
29651
28853
|
var init_ReadyCommandsService = __esm({
|
|
29652
28854
|
"src/services/help/ReadyCommandsService.ts"() {
|
|
29653
|
-
|
|
29654
|
-
|
|
28855
|
+
fs10 = __toESM(require("fs/promises"), 1);
|
|
28856
|
+
path11 = __toESM(require("path"), 1);
|
|
29655
28857
|
ReadyCommandsService = class {
|
|
29656
28858
|
readyCommands = [];
|
|
29657
28859
|
commandsByName = /* @__PURE__ */ new Map();
|
|
@@ -29664,14 +28866,14 @@ var init_ReadyCommandsService = __esm({
|
|
|
29664
28866
|
} else {
|
|
29665
28867
|
const possiblePaths = [
|
|
29666
28868
|
// For bundled dist version
|
|
29667
|
-
|
|
29668
|
-
|
|
29669
|
-
|
|
28869
|
+
path11.join(__dirname, "READY.manifest.json"),
|
|
28870
|
+
path11.join(__dirname, "../READY.manifest.json"),
|
|
28871
|
+
path11.join(process.cwd(), "dist/READY.manifest.json"),
|
|
29670
28872
|
// For development/source version
|
|
29671
|
-
|
|
29672
|
-
|
|
29673
|
-
|
|
29674
|
-
|
|
28873
|
+
path11.join(__dirname, "../../../src/slash-commands/READY.manifest.json"),
|
|
28874
|
+
path11.join(__dirname, "../../slash-commands/READY.manifest.json"),
|
|
28875
|
+
path11.join(process.cwd(), "src/slash-commands/READY.manifest.json"),
|
|
28876
|
+
path11.join(process.cwd(), "READY.manifest.json")
|
|
29675
28877
|
];
|
|
29676
28878
|
this.manifestPath = possiblePaths[0];
|
|
29677
28879
|
}
|
|
@@ -29682,21 +28884,21 @@ var init_ReadyCommandsService = __esm({
|
|
|
29682
28884
|
async findManifestPath() {
|
|
29683
28885
|
const possiblePaths = [
|
|
29684
28886
|
// For bundled dist version
|
|
29685
|
-
|
|
29686
|
-
|
|
29687
|
-
|
|
28887
|
+
path11.join(__dirname, "READY.manifest.json"),
|
|
28888
|
+
path11.join(__dirname, "../READY.manifest.json"),
|
|
28889
|
+
path11.join(process.cwd(), "dist/READY.manifest.json"),
|
|
29688
28890
|
// For development/source version
|
|
29689
|
-
|
|
29690
|
-
|
|
29691
|
-
|
|
29692
|
-
|
|
28891
|
+
path11.join(__dirname, "../../../src/slash-commands/READY.manifest.json"),
|
|
28892
|
+
path11.join(__dirname, "../../slash-commands/READY.manifest.json"),
|
|
28893
|
+
path11.join(process.cwd(), "src/slash-commands/READY.manifest.json"),
|
|
28894
|
+
path11.join(process.cwd(), "READY.manifest.json"),
|
|
29693
28895
|
// Additional paths for different build scenarios
|
|
29694
|
-
|
|
29695
|
-
|
|
28896
|
+
path11.resolve(__dirname, "../../../src/slash-commands/READY.manifest.json"),
|
|
28897
|
+
path11.resolve(process.cwd(), "src/slash-commands/READY.manifest.json")
|
|
29696
28898
|
];
|
|
29697
28899
|
for (const testPath of possiblePaths) {
|
|
29698
28900
|
try {
|
|
29699
|
-
await
|
|
28901
|
+
await fs10.access(testPath);
|
|
29700
28902
|
this.manifestPath = testPath;
|
|
29701
28903
|
return;
|
|
29702
28904
|
} catch {
|
|
@@ -29710,7 +28912,7 @@ var init_ReadyCommandsService = __esm({
|
|
|
29710
28912
|
async loadReadyCommands() {
|
|
29711
28913
|
try {
|
|
29712
28914
|
await this.findManifestPath();
|
|
29713
|
-
const content = await
|
|
28915
|
+
const content = await fs10.readFile(this.manifestPath, "utf-8");
|
|
29714
28916
|
const manifest = JSON.parse(content);
|
|
29715
28917
|
if (manifest.commands && typeof manifest.commands === "object" && !Array.isArray(manifest.commands)) {
|
|
29716
28918
|
this.readyCommands = this.convertObjectToReadyCommands(manifest.commands);
|
|
@@ -29985,9 +29187,9 @@ var init_ReadyCommandsService = __esm({
|
|
|
29985
29187
|
if (this.readyCommands.length === 0) {
|
|
29986
29188
|
await this.loadReadyCommands();
|
|
29987
29189
|
}
|
|
29988
|
-
const
|
|
29190
|
+
const categories2 = [];
|
|
29989
29191
|
for (const [categoryName, commands] of this.commandsByCategory) {
|
|
29990
|
-
|
|
29192
|
+
categories2.push({
|
|
29991
29193
|
name: categoryName,
|
|
29992
29194
|
emoji: "",
|
|
29993
29195
|
// Remove emojis for simplicity
|
|
@@ -29995,7 +29197,7 @@ var init_ReadyCommandsService = __esm({
|
|
|
29995
29197
|
count: commands.length
|
|
29996
29198
|
});
|
|
29997
29199
|
}
|
|
29998
|
-
|
|
29200
|
+
categories2.sort((a2, b) => {
|
|
29999
29201
|
const aPriority = this.getCategoryPriority(a2.name);
|
|
30000
29202
|
const bPriority = this.getCategoryPriority(b.name);
|
|
30001
29203
|
if (aPriority !== bPriority) {
|
|
@@ -30003,7 +29205,7 @@ var init_ReadyCommandsService = __esm({
|
|
|
30003
29205
|
}
|
|
30004
29206
|
return a2.name.localeCompare(b.name);
|
|
30005
29207
|
});
|
|
30006
|
-
return
|
|
29208
|
+
return categories2;
|
|
30007
29209
|
}
|
|
30008
29210
|
/**
|
|
30009
29211
|
* Search commands with fuzzy matching
|
|
@@ -30339,7 +29541,7 @@ var init_HelpCommand = __esm({
|
|
|
30339
29541
|
* Show general help with READY commands only
|
|
30340
29542
|
*/
|
|
30341
29543
|
async showGeneralHelp() {
|
|
30342
|
-
const
|
|
29544
|
+
const categories2 = await this.readyService.getCategories();
|
|
30343
29545
|
const stats = await this.readyService.getStatistics();
|
|
30344
29546
|
const lines = [];
|
|
30345
29547
|
lines.push("\u2550".repeat(60));
|
|
@@ -30352,14 +29554,14 @@ var init_HelpCommand = __esm({
|
|
|
30352
29554
|
lines.push(" /help --search <term> - Search with fuzzy matching");
|
|
30353
29555
|
lines.push("");
|
|
30354
29556
|
let globalMaxNameLength = 0;
|
|
30355
|
-
for (const category of
|
|
29557
|
+
for (const category of categories2) {
|
|
30356
29558
|
const showCommands = category.commands.slice(0, 4);
|
|
30357
29559
|
for (const cmd of showCommands) {
|
|
30358
29560
|
globalMaxNameLength = Math.max(globalMaxNameLength, cmd.name.length);
|
|
30359
29561
|
}
|
|
30360
29562
|
}
|
|
30361
29563
|
globalMaxNameLength = Math.max(globalMaxNameLength, 18) + 1;
|
|
30362
|
-
for (const category of
|
|
29564
|
+
for (const category of categories2) {
|
|
30363
29565
|
lines.push(import_chalk17.default.bold(`${category.name.toUpperCase()} (${category.count})`));
|
|
30364
29566
|
const showCommands = category.commands.slice(0, 4);
|
|
30365
29567
|
for (const cmd of showCommands) {
|
|
@@ -30460,8 +29662,8 @@ var init_HelpCommand = __esm({
|
|
|
30460
29662
|
async showCategoryHelp(categoryName) {
|
|
30461
29663
|
const commands = await this.readyService.getCommandsByCategory(categoryName);
|
|
30462
29664
|
if (commands.length === 0) {
|
|
30463
|
-
const
|
|
30464
|
-
const availableCategories =
|
|
29665
|
+
const categories2 = await this.readyService.getCategories();
|
|
29666
|
+
const availableCategories = categories2.map((c) => c.name);
|
|
30465
29667
|
return this.error(
|
|
30466
29668
|
`No READY commands in category: ${categoryName}. Available: ${availableCategories.join(", ")}`,
|
|
30467
29669
|
"CATEGORY_NOT_FOUND"
|
|
@@ -30597,7 +29799,7 @@ var init_HelpCommand = __esm({
|
|
|
30597
29799
|
*/
|
|
30598
29800
|
async showStatistics() {
|
|
30599
29801
|
const stats = await this.readyService.getStatistics();
|
|
30600
|
-
const
|
|
29802
|
+
const categories2 = await this.readyService.getCategories();
|
|
30601
29803
|
const lines = [];
|
|
30602
29804
|
lines.push("");
|
|
30603
29805
|
lines.push(`\u{1F4CA} ${import_chalk17.default.bold("READY COMMANDS STATISTICS")}`);
|
|
@@ -30614,7 +29816,7 @@ var init_HelpCommand = __esm({
|
|
|
30614
29816
|
lines.push(` Slowest Command: /${stats.slowestCommand}`);
|
|
30615
29817
|
lines.push("");
|
|
30616
29818
|
lines.push(import_chalk17.default.bold("\u{1F4CB} By Category:"));
|
|
30617
|
-
for (const category of
|
|
29819
|
+
for (const category of categories2) {
|
|
30618
29820
|
const avgTime = Math.round(
|
|
30619
29821
|
category.commands.reduce((sum, cmd) => sum + cmd.contract.maxResponseTime, 0) / category.commands.length
|
|
30620
29822
|
);
|
|
@@ -30752,91 +29954,6 @@ Command: /voice ${args.join(" ")}`,
|
|
|
30752
29954
|
}
|
|
30753
29955
|
});
|
|
30754
29956
|
|
|
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
29957
|
// src/services/model-selector-ui.ts
|
|
30841
29958
|
var readline4, import_chalk18, ModelSelectorUI;
|
|
30842
29959
|
var init_model_selector_ui = __esm({
|
|
@@ -31050,9 +30167,9 @@ var init_model_selector_ui = __esm({
|
|
|
31050
30167
|
var ModelCommand_exports = {};
|
|
31051
30168
|
__export(ModelCommand_exports, {
|
|
31052
30169
|
ModelCommand: () => ModelCommand,
|
|
31053
|
-
meta: () =>
|
|
30170
|
+
meta: () => meta2
|
|
31054
30171
|
});
|
|
31055
|
-
var ModelCommand,
|
|
30172
|
+
var ModelCommand, meta2;
|
|
31056
30173
|
var init_ModelCommand = __esm({
|
|
31057
30174
|
"src/slash-commands/categories/configuration/handlers/ModelCommand.ts"() {
|
|
31058
30175
|
init_base_command();
|
|
@@ -32313,7 +31430,7 @@ ${model.description}
|
|
|
32313
31430
|
}
|
|
32314
31431
|
}
|
|
32315
31432
|
};
|
|
32316
|
-
|
|
31433
|
+
meta2 = {
|
|
32317
31434
|
name: "model",
|
|
32318
31435
|
category: "configuration",
|
|
32319
31436
|
description: "Manages AI model configuration and selection",
|
|
@@ -32504,9 +31621,9 @@ var init_BaseCommand = __esm({
|
|
|
32504
31621
|
var ConfigCommand_exports = {};
|
|
32505
31622
|
__export(ConfigCommand_exports, {
|
|
32506
31623
|
ConfigCommand: () => ConfigCommand,
|
|
32507
|
-
meta: () =>
|
|
31624
|
+
meta: () => meta3
|
|
32508
31625
|
});
|
|
32509
|
-
var import_promises3, import_path4, import_os3, ConfigCommand,
|
|
31626
|
+
var import_promises3, import_path4, import_os3, ConfigCommand, meta3;
|
|
32510
31627
|
var init_ConfigCommand = __esm({
|
|
32511
31628
|
"src/slash-commands/categories/configuration/handlers/ConfigCommand.ts"() {
|
|
32512
31629
|
init_BaseCommand();
|
|
@@ -33209,7 +32326,7 @@ var init_ConfigCommand = __esm({
|
|
|
33209
32326
|
};
|
|
33210
32327
|
}
|
|
33211
32328
|
};
|
|
33212
|
-
|
|
32329
|
+
meta3 = {
|
|
33213
32330
|
name: "config",
|
|
33214
32331
|
category: "configuration",
|
|
33215
32332
|
description: "Manages MARIA configuration settings",
|
|
@@ -33612,9 +32729,9 @@ Chat:
|
|
|
33612
32729
|
}
|
|
33613
32730
|
if (cmd === "login" || cmd === "signin" || cmd === "auth") {
|
|
33614
32731
|
try {
|
|
33615
|
-
const { LoginCommand
|
|
33616
|
-
if (
|
|
33617
|
-
const loginCmd = new
|
|
32732
|
+
const { LoginCommand } = await import("./slash-commands/categories/auth/LoginCommand.js").catch(() => ({}));
|
|
32733
|
+
if (LoginCommand) {
|
|
32734
|
+
const loginCmd = new LoginCommand();
|
|
33618
32735
|
const result = await loginCmd.execute();
|
|
33619
32736
|
return true;
|
|
33620
32737
|
} else {
|
|
@@ -34024,8 +33141,8 @@ async function handleCodeCommand(prompt) {
|
|
|
34024
33141
|
console.log(response2);
|
|
34025
33142
|
const { language, code, extension } = extractCodeInfo(response2);
|
|
34026
33143
|
const filename = generateCodeFilename(prompt, language, extension);
|
|
34027
|
-
const filepath =
|
|
34028
|
-
await
|
|
33144
|
+
const filepath = path13.resolve(process.cwd(), filename);
|
|
33145
|
+
await fs12.writeFile(filepath, code, "utf-8");
|
|
34029
33146
|
console.log(
|
|
34030
33147
|
import_chalk19.default.green("\n\u2705 **Code Saved**\n") + import_chalk19.default.white(`\u{1F4C1} **File (Click to open):**
|
|
34031
33148
|
`) + import_chalk19.default.cyan(`\u2022 [${filename}](file://${filepath})
|
|
@@ -34050,8 +33167,8 @@ async function handleCodeCommand(prompt) {
|
|
|
34050
33167
|
try {
|
|
34051
33168
|
const { language, code, extension } = extractCodeInfo(fallbackCode);
|
|
34052
33169
|
const filename = generateCodeFilename(prompt, language, extension);
|
|
34053
|
-
const filepath =
|
|
34054
|
-
await
|
|
33170
|
+
const filepath = path13.resolve(process.cwd(), filename);
|
|
33171
|
+
await fs12.writeFile(filepath, code, "utf-8");
|
|
34055
33172
|
console.log(
|
|
34056
33173
|
import_chalk19.default.green("\n\u2705 **Template Code Saved**\n") + import_chalk19.default.white(`\u{1F4C1} **File (Click to open):**
|
|
34057
33174
|
`) + import_chalk19.default.cyan(`\u2022 [${filename}](file://${filepath})
|
|
@@ -34403,7 +33520,7 @@ function createCLI() {
|
|
|
34403
33520
|
if (options.server) {
|
|
34404
33521
|
console.log(import_chalk19.default.green("\u{1F680} Starting MARIA server mode..."));
|
|
34405
33522
|
try {
|
|
34406
|
-
const serverPath =
|
|
33523
|
+
const serverPath = path13.join(process.cwd(), "server.mjs");
|
|
34407
33524
|
const { spawn } = await import("child_process");
|
|
34408
33525
|
const serverProcess = spawn("node", [serverPath], {
|
|
34409
33526
|
stdio: "inherit",
|
|
@@ -34447,15 +33564,15 @@ function createCLI() {
|
|
|
34447
33564
|
});
|
|
34448
33565
|
return program2;
|
|
34449
33566
|
}
|
|
34450
|
-
var import_commander, import_chalk19, readline5, import_node_process3,
|
|
33567
|
+
var import_commander, import_chalk19, readline5, import_node_process3, path13, fs12, AIResponseService2, ChatContextService2, ConversationPersistence2, InteractiveCLI2, ai, ctx, store, session, commandManager, startupDisplayed, program;
|
|
34451
33568
|
var init_cli = __esm({
|
|
34452
33569
|
"src/cli.ts"() {
|
|
34453
33570
|
import_commander = require("commander");
|
|
34454
33571
|
import_chalk19 = __toESM(require("chalk"), 1);
|
|
34455
33572
|
readline5 = __toESM(require("readline/promises"), 1);
|
|
34456
33573
|
import_node_process3 = require("process");
|
|
34457
|
-
|
|
34458
|
-
|
|
33574
|
+
path13 = __toESM(require("path"), 1);
|
|
33575
|
+
fs12 = __toESM(require("fs/promises"), 1);
|
|
34459
33576
|
init_env_loader();
|
|
34460
33577
|
init_version();
|
|
34461
33578
|
init_animations();
|