@bonginkan/maria 4.3.32 → 4.3.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/READY.manifest.json +1 -1
- package/dist/bin/maria.cjs +152 -39
- package/dist/bin/maria.cjs.map +1 -1
- package/dist/cli.cjs +152 -39
- package/dist/cli.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/server/express-server.cjs +1211 -267
- package/dist/server/express-server.js +1211 -267
- package/dist/server-express.cjs +1211 -267
- package/dist/server-express.cjs.map +1 -1
- package/package.json +3 -3
- package/src/slash-commands/READY.manifest.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1386,25 +1386,29 @@ var init_AuthSecretManager = __esm({
|
|
|
1386
1386
|
constructor() {
|
|
1387
1387
|
this.projectId = process.env.GCLOUD_PROJECT || "maria-code-470602";
|
|
1388
1388
|
this.useGsm = this.shouldUseGsm();
|
|
1389
|
-
|
|
1390
|
-
try {
|
|
1391
|
-
this.client = new secretManager.SecretManagerServiceClient();
|
|
1392
|
-
} catch {
|
|
1393
|
-
this.client = null;
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1389
|
+
this.client = null;
|
|
1396
1390
|
}
|
|
1397
1391
|
/**
|
|
1398
1392
|
* Determine whether to use Google Secret Manager in this environment
|
|
1399
1393
|
*/
|
|
1400
1394
|
shouldUseGsm() {
|
|
1401
1395
|
if (process.env.MARIA_DISABLE_GSM === "true") return false;
|
|
1396
|
+
if (process.env.MARIA_CLI_USE_GSM === "true") return true;
|
|
1402
1397
|
if (process.env.GOOGLE_APPLICATION_CREDENTIALS) return true;
|
|
1403
|
-
if (process.env.
|
|
1404
|
-
if (process.env.CLOUD_RUN_SERVICE || process.env.K_SERVICE) return true;
|
|
1405
|
-
if (process.env.GCE_METADATA_HOST) return true;
|
|
1398
|
+
if (process.env.CLOUD_RUN_SERVICE || process.env.K_SERVICE || process.env.GCE_METADATA_HOST) return true;
|
|
1406
1399
|
return false;
|
|
1407
1400
|
}
|
|
1401
|
+
/** Lazily create Secret Manager client only when permitted */
|
|
1402
|
+
ensureClient() {
|
|
1403
|
+
if (!this.useGsm) return null;
|
|
1404
|
+
if (this.client) return this.client;
|
|
1405
|
+
try {
|
|
1406
|
+
this.client = new secretManager.SecretManagerServiceClient();
|
|
1407
|
+
} catch {
|
|
1408
|
+
this.client = null;
|
|
1409
|
+
}
|
|
1410
|
+
return this.client;
|
|
1411
|
+
}
|
|
1408
1412
|
/**
|
|
1409
1413
|
* Get authentication configuration from Secret Manager
|
|
1410
1414
|
*/
|
|
@@ -1424,7 +1428,8 @@ var init_AuthSecretManager = __esm({
|
|
|
1424
1428
|
* Get a specific secret from Secret Manager
|
|
1425
1429
|
*/
|
|
1426
1430
|
async getSecret(secretName) {
|
|
1427
|
-
|
|
1431
|
+
const client = this.ensureClient();
|
|
1432
|
+
if (!this.useGsm || !client) {
|
|
1428
1433
|
return null;
|
|
1429
1434
|
}
|
|
1430
1435
|
const cached2 = this.getCachedSecret(secretName);
|
|
@@ -1433,7 +1438,7 @@ var init_AuthSecretManager = __esm({
|
|
|
1433
1438
|
}
|
|
1434
1439
|
try {
|
|
1435
1440
|
const name2 = `projects/${this.projectId}/secrets/${secretName}/versions/latest`;
|
|
1436
|
-
const [version] = await
|
|
1441
|
+
const [version] = await client.accessSecretVersion({ name: name2 });
|
|
1437
1442
|
const payload = version.payload?.data;
|
|
1438
1443
|
if (!payload) {
|
|
1439
1444
|
return null;
|
|
@@ -1704,7 +1709,7 @@ var init_AuthenticationManager = __esm({
|
|
|
1704
1709
|
const response = await fetch(`${this.apiBase}/api/user/profile`, {
|
|
1705
1710
|
headers: {
|
|
1706
1711
|
"Authorization": `Bearer ${tokens2.accessToken}`,
|
|
1707
|
-
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.
|
|
1712
|
+
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.34"}`
|
|
1708
1713
|
}
|
|
1709
1714
|
});
|
|
1710
1715
|
if (response.status === 401) {
|
|
@@ -2407,7 +2412,7 @@ async function callApi(path64, init3 = {}) {
|
|
|
2407
2412
|
"Authorization": `Bearer ${token}`,
|
|
2408
2413
|
"X-Device-Id": getDeviceId(),
|
|
2409
2414
|
"X-Session-Id": getSessionId() || "",
|
|
2410
|
-
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.
|
|
2415
|
+
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.34"}`,
|
|
2411
2416
|
"Content-Type": init3.headers?.["Content-Type"] || "application/json"
|
|
2412
2417
|
});
|
|
2413
2418
|
const doFetch = async (token) => {
|
|
@@ -11448,6 +11453,13 @@ var init_logging = __esm({
|
|
|
11448
11453
|
_loggingMiddleware = new LoggingMiddleware();
|
|
11449
11454
|
}
|
|
11450
11455
|
});
|
|
11456
|
+
|
|
11457
|
+
// src/services/telemetry/bigquery-telemetry.ts
|
|
11458
|
+
var bigquery_telemetry_exports = {};
|
|
11459
|
+
__export(bigquery_telemetry_exports, {
|
|
11460
|
+
BigQueryTelemetryService: () => BigQueryTelemetryService,
|
|
11461
|
+
bigQueryTelemetry: () => bigQueryTelemetry
|
|
11462
|
+
});
|
|
11451
11463
|
async function loadBigQuery() {
|
|
11452
11464
|
if (bigQueryLoadAttempted) return BigQuery;
|
|
11453
11465
|
bigQueryLoadAttempted = true;
|
|
@@ -11513,7 +11525,7 @@ var init_bigquery_telemetry = __esm({
|
|
|
11513
11525
|
};
|
|
11514
11526
|
constructor() {
|
|
11515
11527
|
super();
|
|
11516
|
-
this.isEnabled = process.env.
|
|
11528
|
+
this.isEnabled = process.env.TELEMETRY_ENABLED === "true";
|
|
11517
11529
|
this.httpEndpoint = process.env.TELEMETRY_ENDPOINT || null;
|
|
11518
11530
|
if (this.isEnabled) {
|
|
11519
11531
|
this.initialize().catch((error2) => {
|
|
@@ -11857,8 +11869,12 @@ async function getUserContext() {
|
|
|
11857
11869
|
}
|
|
11858
11870
|
async function trackCommand(data) {
|
|
11859
11871
|
try {
|
|
11872
|
+
if (process.env.TELEMETRY_DISABLED === "true") {
|
|
11873
|
+
return;
|
|
11874
|
+
}
|
|
11860
11875
|
const userContext = await getUserContext();
|
|
11861
|
-
await
|
|
11876
|
+
const { bigQueryTelemetry: bigQueryTelemetry2 } = await Promise.resolve().then(() => (init_bigquery_telemetry(), bigquery_telemetry_exports));
|
|
11877
|
+
await bigQueryTelemetry2.trackCommandExecution({
|
|
11862
11878
|
cmd: data.cmd,
|
|
11863
11879
|
status: data.status,
|
|
11864
11880
|
latencyMs: data.latencyMs,
|
|
@@ -11899,7 +11915,6 @@ function getNextMonthStart() {
|
|
|
11899
11915
|
}
|
|
11900
11916
|
var init_telemetry_helper = __esm({
|
|
11901
11917
|
"src/slash-commands/shared/telemetry-helper.ts"() {
|
|
11902
|
-
init_bigquery_telemetry();
|
|
11903
11918
|
}
|
|
11904
11919
|
});
|
|
11905
11920
|
|
|
@@ -12072,6 +12087,7 @@ var init_ReadyCommandsService = __esm({
|
|
|
12072
12087
|
lastLoaded = null;
|
|
12073
12088
|
manifestPath;
|
|
12074
12089
|
usedFallback = false;
|
|
12090
|
+
helpMeta = {};
|
|
12075
12091
|
constructor(manifestPath) {
|
|
12076
12092
|
if (manifestPath) {
|
|
12077
12093
|
this.manifestPath = manifestPath;
|
|
@@ -12155,14 +12171,57 @@ var init_ReadyCommandsService = __esm({
|
|
|
12155
12171
|
this.buildLookupMaps();
|
|
12156
12172
|
this.lastLoaded = /* @__PURE__ */ new Date();
|
|
12157
12173
|
this.usedFallback = false;
|
|
12174
|
+
await this.tryLoadHelpMeta();
|
|
12158
12175
|
} catch (error2) {
|
|
12159
12176
|
logger.debug("READY manifest not found or invalid; using fallback");
|
|
12160
12177
|
this.readyCommands = this.getFallbackCommands();
|
|
12161
12178
|
this.buildLookupMaps();
|
|
12162
12179
|
this.lastLoaded = /* @__PURE__ */ new Date();
|
|
12163
12180
|
this.usedFallback = true;
|
|
12181
|
+
await this.tryLoadHelpMeta();
|
|
12182
|
+
}
|
|
12183
|
+
}
|
|
12184
|
+
/**
|
|
12185
|
+
* Load enhanced help metadata (e.g., arguments/examples) if available
|
|
12186
|
+
*/
|
|
12187
|
+
async tryLoadHelpMeta() {
|
|
12188
|
+
try {
|
|
12189
|
+
const candidates = [
|
|
12190
|
+
path10__namespace.join(process.cwd(), "src/slash-commands/help/command-meta.json"),
|
|
12191
|
+
path10__namespace.join(__dirname, "../../slash-commands/help/command-meta.json"),
|
|
12192
|
+
path10__namespace.join(process.cwd(), "dist/command-meta.json")
|
|
12193
|
+
];
|
|
12194
|
+
let p = null;
|
|
12195
|
+
for (const c of candidates) {
|
|
12196
|
+
try {
|
|
12197
|
+
await fsp__namespace.access(c);
|
|
12198
|
+
p = c;
|
|
12199
|
+
break;
|
|
12200
|
+
} catch {
|
|
12201
|
+
}
|
|
12202
|
+
}
|
|
12203
|
+
if (!p) return;
|
|
12204
|
+
const raw = await fsp__namespace.readFile(p, "utf8");
|
|
12205
|
+
const json = JSON.parse(raw);
|
|
12206
|
+
const map = {};
|
|
12207
|
+
const arr = Array.isArray(json?.commands) ? json.commands : [];
|
|
12208
|
+
for (const entry of arr) {
|
|
12209
|
+
const name2 = typeof entry?.name === "string" ? entry.name : void 0;
|
|
12210
|
+
if (!name2) continue;
|
|
12211
|
+
const norm = name2.replace(/^\//, "");
|
|
12212
|
+
const title = typeof entry?.title === "string" ? entry.title : void 0;
|
|
12213
|
+
const examples = Array.isArray(entry?.examples) ? entry.examples.filter((e2) => typeof e2 === "string") : void 0;
|
|
12214
|
+
map[norm] = { title, examples };
|
|
12215
|
+
}
|
|
12216
|
+
this.helpMeta = map;
|
|
12217
|
+
} catch {
|
|
12164
12218
|
}
|
|
12165
12219
|
}
|
|
12220
|
+
/** Get enhanced help meta for a command if available */
|
|
12221
|
+
getHelpMeta(commandName) {
|
|
12222
|
+
const key = commandName.replace(/^\//, "");
|
|
12223
|
+
return this.helpMeta[key];
|
|
12224
|
+
}
|
|
12166
12225
|
/**
|
|
12167
12226
|
* Convert object-format commands to ReadyCommand array
|
|
12168
12227
|
*/
|
|
@@ -16121,8 +16180,8 @@ var require_package = __commonJS({
|
|
|
16121
16180
|
"package.json"(exports, module) {
|
|
16122
16181
|
module.exports = {
|
|
16123
16182
|
name: "@bonginkan/maria",
|
|
16124
|
-
version: "4.3.
|
|
16125
|
-
description: "\u{1F680} MARIA v4.3.
|
|
16183
|
+
version: "4.3.34",
|
|
16184
|
+
description: "\u{1F680} MARIA v4.3.34 - Enterprise AI Development Platform with identity system and character voice implementation. Features 74 production-ready commands with comprehensive fallback implementation, local LLM support, and zero external dependencies. Includes natural language coding, AI safety evaluation, intelligent evolution system, episodic memory with PII masking, and real-time monitoring dashboard. Built with TypeScript AST-powered code generation, OAuth2.0 + PKCE authentication, quantum-resistant cryptography, and enterprise-grade performance.",
|
|
16126
16185
|
keywords: [
|
|
16127
16186
|
"ai",
|
|
16128
16187
|
"cli",
|
|
@@ -16558,7 +16617,7 @@ var require_package = __commonJS({
|
|
|
16558
16617
|
react: "^18.2.0",
|
|
16559
16618
|
"reflect-metadata": "^0.2.2",
|
|
16560
16619
|
semver: "^7.7.2",
|
|
16561
|
-
sharp: "^0.34.
|
|
16620
|
+
sharp: "^0.34.4",
|
|
16562
16621
|
"string-width": "^8.0.0",
|
|
16563
16622
|
"strip-ansi": "^7.1.0",
|
|
16564
16623
|
"tesseract.js": "^6.0.1",
|
|
@@ -22237,7 +22296,8 @@ function normalizeImageArgs(raw, root) {
|
|
|
22237
22296
|
const out = {
|
|
22238
22297
|
prompt,
|
|
22239
22298
|
size: [1024, 1024],
|
|
22240
|
-
|
|
22299
|
+
// Default to png to avoid surprise webp outputs when converters are unavailable
|
|
22300
|
+
format: "png",
|
|
22241
22301
|
count: 1,
|
|
22242
22302
|
concurrency: 2,
|
|
22243
22303
|
retry: 2,
|
|
@@ -22256,10 +22316,13 @@ function normalizeImageArgs(raw, root) {
|
|
|
22256
22316
|
case "size":
|
|
22257
22317
|
out.size = parseSize(String(v));
|
|
22258
22318
|
break;
|
|
22259
|
-
case "format":
|
|
22260
|
-
|
|
22261
|
-
|
|
22319
|
+
case "format": {
|
|
22320
|
+
const rawFmt = String(v).toLowerCase();
|
|
22321
|
+
const mapped = rawFmt === "jpeg" ? "jpg" : rawFmt;
|
|
22322
|
+
if (!["png", "webp", "jpg"].includes(mapped)) throw new Error("invalid format");
|
|
22323
|
+
out.format = mapped;
|
|
22262
22324
|
break;
|
|
22325
|
+
}
|
|
22263
22326
|
case "count": {
|
|
22264
22327
|
const n = Number(v);
|
|
22265
22328
|
if (!Number.isFinite(n) || n < 1) throw new Error("invalid count");
|
|
@@ -22632,6 +22695,14 @@ var init_gemini_media = __esm({
|
|
|
22632
22695
|
async generateImage(req) {
|
|
22633
22696
|
const modelName = this.primaryModel;
|
|
22634
22697
|
const promptPreview = String(req.prompt ?? "").replace(/\s+/g, " ").slice(0, 200);
|
|
22698
|
+
const targetMime = (() => {
|
|
22699
|
+
const fmt = (req.format || "png").toLowerCase();
|
|
22700
|
+
if (fmt === "jpg") return "image/jpeg";
|
|
22701
|
+
if (fmt === "jpeg") return "image/jpeg";
|
|
22702
|
+
if (fmt === "png") return "image/png";
|
|
22703
|
+
if (fmt === "webp") return "image/webp";
|
|
22704
|
+
return "image/png";
|
|
22705
|
+
})();
|
|
22635
22706
|
let resp;
|
|
22636
22707
|
try {
|
|
22637
22708
|
resp = await this.ai.models.generateContent({
|
|
@@ -22639,7 +22710,7 @@ var init_gemini_media = __esm({
|
|
|
22639
22710
|
contents: [{ role: "user", parts: [{ text: String(req.prompt) }] }],
|
|
22640
22711
|
generationConfig: {
|
|
22641
22712
|
responseModalities: ["IMAGE"],
|
|
22642
|
-
responseMimeType:
|
|
22713
|
+
responseMimeType: targetMime
|
|
22643
22714
|
}
|
|
22644
22715
|
});
|
|
22645
22716
|
} catch (err) {
|
|
@@ -22661,7 +22732,7 @@ var init_gemini_media = __esm({
|
|
|
22661
22732
|
const mime = p?.inlineData?.mimeType || p?.inline_data?.mime_type || p?.inline_data?.mimeType || p?.inlineData?.mime_type;
|
|
22662
22733
|
if (data) {
|
|
22663
22734
|
const buf = Buffer.from(String(data), "base64");
|
|
22664
|
-
if (buf.length > 0) return { bytes: buf, mime: typeof mime === "string" ? mime :
|
|
22735
|
+
if (buf.length > 0) return { bytes: buf, mime: typeof mime === "string" ? mime : targetMime };
|
|
22665
22736
|
}
|
|
22666
22737
|
}
|
|
22667
22738
|
try {
|
|
@@ -22674,7 +22745,7 @@ var init_gemini_media = __esm({
|
|
|
22674
22745
|
const bytesB64 = img0?.imageBytes || img0?.bytesBase64Encoded;
|
|
22675
22746
|
if (bytesB64) {
|
|
22676
22747
|
const buf = Buffer.from(String(bytesB64), "base64");
|
|
22677
|
-
if (buf.length > 0) return { bytes: buf, mime:
|
|
22748
|
+
if (buf.length > 0) return { bytes: buf, mime: targetMime };
|
|
22678
22749
|
}
|
|
22679
22750
|
} catch {
|
|
22680
22751
|
}
|
|
@@ -22727,12 +22798,15 @@ var init_Progress = __esm({
|
|
|
22727
22798
|
});
|
|
22728
22799
|
|
|
22729
22800
|
// src/services/media-orchestrator/image-post.ts
|
|
22730
|
-
async function processImageOptional(bytes, format, keepExif) {
|
|
22801
|
+
async function processImageOptional(bytes, format, keepExif, targetSize) {
|
|
22731
22802
|
try {
|
|
22732
|
-
const useSharp = String(process.env.MARIA_SHARP || "").toLowerCase() === "true" || process.env.MARIA_SHARP === "1";
|
|
22733
|
-
if (!useSharp) return bytes;
|
|
22734
22803
|
const sharp = (await import('sharp')).default;
|
|
22735
22804
|
let img = sharp(bytes).toColourspace("srgb");
|
|
22805
|
+
if (targetSize && Number.isFinite(targetSize.width) && Number.isFinite(targetSize.height)) {
|
|
22806
|
+
const width = Math.max(1, Math.floor(targetSize.width));
|
|
22807
|
+
const height = Math.max(1, Math.floor(targetSize.height));
|
|
22808
|
+
img = img.resize(width, height, { fit: "cover" });
|
|
22809
|
+
}
|
|
22736
22810
|
if (keepExif) img = img.withMetadata();
|
|
22737
22811
|
const qEnv = Number(process.env.MARIA_SHARP_QUALITY || "80");
|
|
22738
22812
|
const quality = Number.isFinite(qEnv) ? Math.max(1, Math.min(100, Math.floor(qEnv))) : 80;
|
|
@@ -22787,7 +22861,12 @@ async function runImagePipeline(params2, opts) {
|
|
|
22787
22861
|
keepExif: params2.keepExif
|
|
22788
22862
|
});
|
|
22789
22863
|
}, retryOpts));
|
|
22790
|
-
const processed = await processImageOptional(
|
|
22864
|
+
const processed = await processImageOptional(
|
|
22865
|
+
result.bytes,
|
|
22866
|
+
params2.format,
|
|
22867
|
+
params2.keepExif,
|
|
22868
|
+
{ width: params2.size[0], height: params2.size[1] }
|
|
22869
|
+
);
|
|
22791
22870
|
successes[i2] = processed;
|
|
22792
22871
|
totalAttempts += attempts;
|
|
22793
22872
|
totalRetries += Math.max(0, attempts - 1);
|
|
@@ -24511,6 +24590,19 @@ var init_WhoAmICommand = __esm({
|
|
|
24511
24590
|
if (user.plan) {
|
|
24512
24591
|
lines.push(chalk40__default.default.white(`\u{1F48E} Plan: ${chalk40__default.default.cyan(user.plan)}`));
|
|
24513
24592
|
}
|
|
24593
|
+
try {
|
|
24594
|
+
const { cliAuth: cliAuth2 } = await Promise.resolve().then(() => (init_CLIAuthService(), CLIAuthService_exports));
|
|
24595
|
+
const api = cliAuth2.getAPIClient();
|
|
24596
|
+
const usage = await api.getUsage();
|
|
24597
|
+
lines.push("");
|
|
24598
|
+
lines.push(chalk40__default.default.cyan("\u{1F4CA} Usage"));
|
|
24599
|
+
lines.push(chalk40__default.default.gray("\u2500".repeat(30)));
|
|
24600
|
+
lines.push(chalk40__default.default.white(`Requests: ${usage.used.req}/${usage.limits.req} (${usage.percentage.req}%)`));
|
|
24601
|
+
lines.push(chalk40__default.default.white(`Tokens: ${usage.used.tokens}/${usage.limits.tokens} (${usage.percentage.tokens}%)`));
|
|
24602
|
+
lines.push(chalk40__default.default.white(`Commands: ${usage.used.code}/${usage.limits.code} (${usage.percentage.code}%)`));
|
|
24603
|
+
lines.push(chalk40__default.default.white(`Reset at: ${new Date(usage.resetAt).toLocaleString()}`));
|
|
24604
|
+
} catch {
|
|
24605
|
+
}
|
|
24514
24606
|
return this.success(lines.join("\n"), { authenticated: true, user });
|
|
24515
24607
|
}
|
|
24516
24608
|
};
|
|
@@ -25817,7 +25909,7 @@ var init_about_command = __esm({
|
|
|
25817
25909
|
async execute(args2, context2) {
|
|
25818
25910
|
const output3 = [];
|
|
25819
25911
|
output3.push("");
|
|
25820
|
-
output3.push(chalk40__default.default.cyan.bold("\u{1F916} About MARIA v4.3.
|
|
25912
|
+
output3.push(chalk40__default.default.cyan.bold("\u{1F916} About MARIA v4.3.34"));
|
|
25821
25913
|
output3.push(chalk40__default.default.gray("\u2550".repeat(40)));
|
|
25822
25914
|
output3.push("");
|
|
25823
25915
|
output3.push(chalk40__default.default.white.bold("MARIA - Minimal API, Maximum Power"));
|
|
@@ -57678,7 +57770,7 @@ ${files.slice(0, 20).map((f3) => `- ${f3.path}`).join("\n")}`);
|
|
|
57678
57770
|
const bundle = parts.join("\n\n");
|
|
57679
57771
|
const system = [
|
|
57680
57772
|
"You are an impartial evaluator. Score each criterion between 0 and 1.",
|
|
57681
|
-
"If a local file path is provided, make sure you read the uploaded file before taking any actions.",
|
|
57773
|
+
"If a local file path is provided, make sure you read the uploaded file before taking any actions. Write the string content in plain text and do not use markdown.",
|
|
57682
57774
|
"Return JSON only in the following schema:",
|
|
57683
57775
|
'{ "totalScore": number (0..1), "details": [{ "id": string, "score": number (0..1), "reason": string }] }',
|
|
57684
57776
|
"Keep reasons short (<= 120 chars)."
|
|
@@ -58015,7 +58107,8 @@ var init_evaluate_command = __esm({
|
|
|
58015
58107
|
// Strong guard: attachments are uploaded; do not ask for local file content
|
|
58016
58108
|
"The input files are already uploaded and referenced via file URIs.",
|
|
58017
58109
|
"Use the provided attachments; do not ask the user to paste file contents.",
|
|
58018
|
-
"Do not claim you cannot access local file paths."
|
|
58110
|
+
"Do not claim you cannot access local file paths.",
|
|
58111
|
+
"Write the string content in plain text and do not use markdown."
|
|
58019
58112
|
].join("\n");
|
|
58020
58113
|
if (result === null) {
|
|
58021
58114
|
const rel = path10__namespace.default.relative(root, criteriaPath);
|
|
@@ -58069,6 +58162,12 @@ ${options["code"] || inferred.code}` : void 0
|
|
|
58069
58162
|
const content = (response?.data?.content || response?.output || "").trim();
|
|
58070
58163
|
const uploads = response?.data?.uploads || [];
|
|
58071
58164
|
if (content) {
|
|
58165
|
+
try {
|
|
58166
|
+
const { cliAuth: cliAuth2 } = await Promise.resolve().then(() => (init_CLIAuthService(), CLIAuthService_exports));
|
|
58167
|
+
const api = cliAuth2.getAPIClient();
|
|
58168
|
+
await api.consumeQuota({ requests: 1, code: 1 });
|
|
58169
|
+
} catch {
|
|
58170
|
+
}
|
|
58072
58171
|
const uploadNote = uploads.length ? `Attached ${uploads.length} file(s) uploaded and referenced.` : attachments.length ? `Attached ${attachments.length} local file(s).` : void 0;
|
|
58073
58172
|
const finalText = uploadNote ? `${uploadNote}
|
|
58074
58173
|
|
|
@@ -58114,6 +58213,12 @@ ${content}` : content;
|
|
|
58114
58213
|
});
|
|
58115
58214
|
const testResult = await this.executeEvaluation(config2);
|
|
58116
58215
|
const formattedOutput = this.formatEvaluationStart(testResult);
|
|
58216
|
+
try {
|
|
58217
|
+
const { cliAuth: cliAuth2 } = await Promise.resolve().then(() => (init_CLIAuthService(), CLIAuthService_exports));
|
|
58218
|
+
const api = cliAuth2.getAPIClient();
|
|
58219
|
+
await api.consumeQuota({ requests: 1, code: 1 });
|
|
58220
|
+
} catch {
|
|
58221
|
+
}
|
|
58117
58222
|
return this.success(formattedOutput, {
|
|
58118
58223
|
testId: testResult.testId,
|
|
58119
58224
|
status: testResult.status,
|
|
@@ -59111,7 +59216,7 @@ var init_slash_commands = __esm({
|
|
|
59111
59216
|
});
|
|
59112
59217
|
async function handleSlash(input3) {
|
|
59113
59218
|
if (!input3.startsWith("/")) return false;
|
|
59114
|
-
const { cmd, args: args2, flags } = parseSlash(input3);
|
|
59219
|
+
const { cmd, args: args2, options, flags } = parseSlash(input3);
|
|
59115
59220
|
if (cmd === "clear" || cmd === "cls") {
|
|
59116
59221
|
try {
|
|
59117
59222
|
clearTerminal();
|
|
@@ -59128,8 +59233,13 @@ async function handleSlash(input3) {
|
|
|
59128
59233
|
}
|
|
59129
59234
|
try {
|
|
59130
59235
|
if (commandRegistry.has(cmd)) {
|
|
59131
|
-
const
|
|
59132
|
-
|
|
59236
|
+
const optionTokens = [];
|
|
59237
|
+
for (const [k, v] of Object.entries(options)) {
|
|
59238
|
+
optionTokens.push(`--${k}`);
|
|
59239
|
+
optionTokens.push(String(v));
|
|
59240
|
+
}
|
|
59241
|
+
const flagTokens = flags.map((f3) => `--${f3}`);
|
|
59242
|
+
const argv = [...args2, ...optionTokens, ...flagTokens];
|
|
59133
59243
|
let currentUser = void 0;
|
|
59134
59244
|
try {
|
|
59135
59245
|
if (await authManager.isAuthenticated()) {
|
|
@@ -59142,7 +59252,7 @@ async function handleSlash(input3) {
|
|
|
59142
59252
|
user: currentUser,
|
|
59143
59253
|
environment: { cwd: process.cwd() }
|
|
59144
59254
|
};
|
|
59145
|
-
const result = await commandRegistry.execute(cmd,
|
|
59255
|
+
const result = await commandRegistry.execute(cmd, argv, ctx2);
|
|
59146
59256
|
if (typeof result?.message === "string" && result.message.trim()) {
|
|
59147
59257
|
console.log(result.message);
|
|
59148
59258
|
}
|
|
@@ -61234,7 +61344,7 @@ var init_ai_response_service = __esm({
|
|
|
61234
61344
|
*/
|
|
61235
61345
|
async callLLM(prompt, opts = {}) {
|
|
61236
61346
|
const {
|
|
61237
|
-
system = PLAIN_OUTPUT ? "Return ONLY the answer (or ONLY code). No menus, no lists, no guided flows. Always respond in English." : "You are a helpful senior engineer named Maria. Always respond in English. Provide direct, production-quality answers. Make sure you answer in plain text, as a natural chat.",
|
|
61347
|
+
system = PLAIN_OUTPUT ? "Return ONLY the answer (or ONLY code). No menus, no lists, no guided flows. Always respond in English." : "You are a helpful senior engineer named Maria. Always respond in English. Provide direct, production-quality answers. Make sure you answer in plain text, as a natural chat. When asked about the model (not your name or who you are, but the model), say you are a large language model fully trained by Bonginkan.",
|
|
61238
61348
|
model = void 0,
|
|
61239
61349
|
provider = DEFAULT_PROVIDER2,
|
|
61240
61350
|
temperature = 0.2,
|
|
@@ -76098,6 +76208,9 @@ var init_cli = __esm({
|
|
|
76098
76208
|
session = [];
|
|
76099
76209
|
commandManager = null;
|
|
76100
76210
|
startupDisplayed = false;
|
|
76211
|
+
if (!process.env.GOOGLE_AUTH_DISABLE_GCE_CHECK) {
|
|
76212
|
+
process.env.GOOGLE_AUTH_DISABLE_GCE_CHECK = "true";
|
|
76213
|
+
}
|
|
76101
76214
|
program = createCLI2();
|
|
76102
76215
|
program.parse(process.argv);
|
|
76103
76216
|
}
|