@bonginkan/maria 4.3.24 → 4.3.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -1704,7 +1704,7 @@ var init_AuthenticationManager = __esm({
1704
1704
  const response = await fetch(`${this.apiBase}/api/user/profile`, {
1705
1705
  headers: {
1706
1706
  "Authorization": `Bearer ${tokens2.accessToken}`,
1707
- "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.24"}`
1707
+ "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.26"}`
1708
1708
  }
1709
1709
  });
1710
1710
  if (response.status === 401) {
@@ -2407,7 +2407,7 @@ async function callApi(path60, init3 = {}) {
2407
2407
  "Authorization": `Bearer ${token}`,
2408
2408
  "X-Device-Id": getDeviceId(),
2409
2409
  "X-Session-Id": getSessionId() || "",
2410
- "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.24"}`,
2410
+ "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.26"}`,
2411
2411
  "Content-Type": init3.headers?.["Content-Type"] || "application/json"
2412
2412
  });
2413
2413
  const doFetch = async (token) => {
@@ -16121,8 +16121,8 @@ var require_package = __commonJS({
16121
16121
  "package.json"(exports, module) {
16122
16122
  module.exports = {
16123
16123
  name: "@bonginkan/maria",
16124
- version: "4.3.24",
16125
- description: "\u{1F680} MARIA v4.3.24 - 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.",
16124
+ version: "4.3.26",
16125
+ description: "\u{1F680} MARIA v4.3.26 - 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
16126
  keywords: [
16127
16127
  "ai",
16128
16128
  "cli",
@@ -25753,7 +25753,7 @@ var init_about_command = __esm({
25753
25753
  async execute(args2, context2) {
25754
25754
  const output3 = [];
25755
25755
  output3.push("");
25756
- output3.push(chalk40__default.default.cyan.bold("\u{1F916} About MARIA v4.3.24"));
25756
+ output3.push(chalk40__default.default.cyan.bold("\u{1F916} About MARIA v4.3.26"));
25757
25757
  output3.push(chalk40__default.default.gray("\u2550".repeat(40)));
25758
25758
  output3.push("");
25759
25759
  output3.push(chalk40__default.default.white.bold("MARIA - Minimal API, Maximum Power"));
@@ -58649,7 +58649,7 @@ function analyzeIntent(userInputRaw, recentText = "") {
58649
58649
  }
58650
58650
  return {
58651
58651
  type: "GENERAL",
58652
- confidence: 0.3,
58652
+ confidence: 0.4,
58653
58653
  detail: "General conversation or unclear intent"
58654
58654
  };
58655
58655
  }
@@ -59650,6 +59650,7 @@ var init_ai_response_service = __esm({
59650
59650
  _conversationPersistence;
59651
59651
  telemetry;
59652
59652
  initialized = false;
59653
+ fallbackLowConfidence = 0.35;
59653
59654
  // providers
59654
59655
  providerManager;
59655
59656
  fallbackManager = null;
@@ -59692,8 +59693,25 @@ var init_ai_response_service = __esm({
59692
59693
  tokens: event.tokens,
59693
59694
  costUsd: event.costUsd
59694
59695
  });
59696
+ if (process.env.MARIA_TELEMETRY === "1") {
59697
+ try {
59698
+ console.log(
59699
+ JSON.stringify({
59700
+ ev: "chat_fallback",
59701
+ stage: event.source ?? "none",
59702
+ reason: event.reason,
59703
+ detail: event.detail,
59704
+ durationMs: event.durationMs,
59705
+ tokens: event.tokens,
59706
+ costUsd: event.costUsd
59707
+ })
59708
+ );
59709
+ } catch {
59710
+ }
59711
+ }
59695
59712
  });
59696
59713
  this.fallbackPolicySignature = signature;
59714
+ this.fallbackLowConfidence = typeof policy?.bands?.lowConfidence === "number" ? policy.bands.lowConfidence : this.fallbackLowConfidence;
59697
59715
  }
59698
59716
  return this.fallbackManager;
59699
59717
  }
@@ -59727,8 +59745,8 @@ var init_ai_response_service = __esm({
59727
59745
  temperature = 0.2,
59728
59746
  maxTokens = 32e3
59729
59747
  } = opts;
59730
- const apiBase = process.env.MARIA_API_BASE;
59731
- const preferApi = String(process.env.MARIA_USE_API || "1") === "1" && !!apiBase;
59748
+ process.env.MARIA_API_BASE || "https://api.maria-code.ai";
59749
+ const preferApi = String(process.env.MARIA_USE_API || "1") === "1";
59732
59750
  if (preferApi) {
59733
59751
  try {
59734
59752
  const { callAPI: callAPI2 } = await Promise.resolve().then(() => (init_api_caller(), api_caller_exports));
@@ -59932,6 +59950,24 @@ ${text}`;
59932
59950
  let aiResponse = outcome.data || "";
59933
59951
  const fallbackUsed = outcome.source !== "llm";
59934
59952
  const fallbackMessage = outcome.message;
59953
+ if (process.env.MARIA_TELEMETRY === "1") {
59954
+ try {
59955
+ console.log(
59956
+ JSON.stringify({
59957
+ ev: "chat_route",
59958
+ source: outcome.source,
59959
+ reason: outcome.reason,
59960
+ message: outcome.message,
59961
+ intent: intent.type,
59962
+ intentConfidence: intent.confidence,
59963
+ lowConfidenceThreshold: this.fallbackLowConfidence,
59964
+ plainOutput: PLAIN_OUTPUT,
59965
+ templateFallbackEnabled: TEMPLATE_FALLBACK_ENABLED
59966
+ })
59967
+ );
59968
+ } catch {
59969
+ }
59970
+ }
59935
59971
  if (!aiResponse || aiResponse.trim().length === 0) {
59936
59972
  aiResponse = this.generateFallbackResponse(request.userInput);
59937
59973
  }