@bonginkan/maria 4.2.14 → 4.2.16

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
@@ -9,9 +9,9 @@ var os = require('os');
9
9
  var fsp = require('fs/promises');
10
10
  var crypto2 = require('crypto');
11
11
  var secretManager = require('@google-cloud/secret-manager');
12
+ var child_process = require('child_process');
12
13
  var http = require('http');
13
14
  var url = require('url');
14
- var open = require('open');
15
15
  var events = require('events');
16
16
  var Stream = require('stream');
17
17
  var util = require('util');
@@ -22,8 +22,6 @@ var zlib = require('zlib');
22
22
  var readline = require('readline');
23
23
  var fs8 = require('fs-extra');
24
24
  var zod = require('zod');
25
- require('strip-ansi');
26
- require('string-width');
27
25
  var process$1 = require('process');
28
26
  var ora = require('ora');
29
27
  var perf_hooks = require('perf_hooks');
@@ -58,7 +56,6 @@ var os__namespace = /*#__PURE__*/_interopNamespace(os);
58
56
  var fsp__namespace = /*#__PURE__*/_interopNamespace(fsp);
59
57
  var crypto2__default = /*#__PURE__*/_interopDefault(crypto2);
60
58
  var http__default = /*#__PURE__*/_interopDefault(http);
61
- var open__default = /*#__PURE__*/_interopDefault(open);
62
59
  var Stream__default = /*#__PURE__*/_interopDefault(Stream);
63
60
  var https__default = /*#__PURE__*/_interopDefault(https);
64
61
  var zlib__default = /*#__PURE__*/_interopDefault(zlib);
@@ -842,12 +839,46 @@ var init_AuthSecretManager = __esm({
842
839
  new AuthSecretManager();
843
840
  }
844
841
  });
842
+ async function openUrl(url) {
843
+ if (process.env.CI === "true" || process.env.SSH_CONNECTION || process.env.CONTAINER === "true") {
844
+ throw new Error("Headless environment");
845
+ }
846
+ const platform3 = process.platform;
847
+ if (platform3 === "win32") {
848
+ await execDetached("cmd", ["/c", "start", "", url.replace(/&/g, "^&")]);
849
+ return;
850
+ }
851
+ if (platform3 === "darwin") {
852
+ await execDetached("open", [url]);
853
+ return;
854
+ }
855
+ if (!process.env.DISPLAY) {
856
+ throw new Error("No DISPLAY");
857
+ }
858
+ await execDetached("xdg-open", [url]);
859
+ }
860
+ function execDetached(command, args) {
861
+ return new Promise((resolve4, reject) => {
862
+ const child2 = child_process.spawn(command, args, {
863
+ stdio: "ignore",
864
+ detached: true
865
+ });
866
+ child2.on("error", reject);
867
+ child2.unref();
868
+ resolve4();
869
+ });
870
+ }
871
+ var init_open_url = __esm({
872
+ "src/utils/open-url.ts"() {
873
+ }
874
+ });
845
875
  var AuthenticationManager, authManager;
846
876
  var init_AuthenticationManager = __esm({
847
877
  "src/services/cli-auth/AuthenticationManager.ts"() {
848
878
  init_types();
849
879
  init_TokenStorage();
850
880
  init_AuthSecretManager();
881
+ init_open_url();
851
882
  AuthenticationManager = class {
852
883
  tokenStorage;
853
884
  secretManager;
@@ -1170,7 +1201,7 @@ var init_AuthenticationManager = __esm({
1170
1201
  const authUrl = this.buildAuthUrl(pkceParams, redirectUri);
1171
1202
  console.log("\u{1F4F1} Opening browser for authentication...");
1172
1203
  try {
1173
- await open__default.default(authUrl);
1204
+ await openUrl(authUrl);
1174
1205
  } catch (error2) {
1175
1206
  server.close();
1176
1207
  console.error("Failed to open browser for authentication:", error2);
@@ -18815,6 +18846,8 @@ var init_ConfigCommand = __esm({
18815
18846
  };
18816
18847
  }
18817
18848
  });
18849
+
18850
+ // src/ui/integrated-cli/responsive-width.ts
18818
18851
  function getSafeTerminalWidth() {
18819
18852
  if (process.env.MARIA_FIXED_WIDTH) {
18820
18853
  const fixed = Number(process.env.MARIA_FIXED_WIDTH);
@@ -19218,10 +19251,10 @@ var init_llm_health_checker = __esm({
19218
19251
  }
19219
19252
  async startLMStudio() {
19220
19253
  try {
19221
- const { spawn } = await import('child_process');
19254
+ const { spawn: spawn2 } = await import('child_process');
19222
19255
  const _lmsPath = "/Users/bongin_max/.lmstudio/bin/lms";
19223
19256
  return new Promise((resolve4) => {
19224
- const _child = spawn(_lmsPath, ["server", "start"], {
19257
+ const _child = spawn2(_lmsPath, ["server", "start"], {
19225
19258
  stdio: "ignore",
19226
19259
  detached: true
19227
19260
  });
@@ -31659,8 +31692,8 @@ var init_package = __esm({
31659
31692
  "package.json"() {
31660
31693
  package_default = {
31661
31694
  name: "@bonginkan/maria",
31662
- version: "4.2.14",
31663
- description: "\u{1F680} MARIA v4.2.14 - 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.",
31695
+ version: "4.2.16",
31696
+ description: "\u{1F680} MARIA v4.2.16 - 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.",
31664
31697
  keywords: [
31665
31698
  "ai",
31666
31699
  "cli",
@@ -33424,8 +33457,8 @@ function createCLI2() {
33424
33457
  console.log(chalk17__default.default.green("\u{1F680} Starting MARIA server mode..."));
33425
33458
  try {
33426
33459
  const serverPath = path10__namespace.join(process.cwd(), "server.mjs");
33427
- const { spawn } = await import('child_process');
33428
- const serverProcess = spawn("node", [serverPath], {
33460
+ const { spawn: spawn2 } = await import('child_process');
33461
+ const serverProcess = spawn2("node", [serverPath], {
33429
33462
  stdio: "inherit",
33430
33463
  env: process.env
33431
33464
  });