| Server IP : 85.155.190.233 / Your IP : 216.73.216.103 Web Server : nginx/1.24.0 System : Linux antigravity-cli 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 User : wp-moonbloom ( 1001) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/node_modules/@google/gemini-cli/bundle/ |
Upload File : |
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
import {
DEFAULT_PORT,
getBinaryPath,
isServerRunning
} from "./chunk-4IXP3BQP.js";
import "./chunk-VNPDB5AB.js";
import "./chunk-U6X4OPT5.js";
import {
debugLogger
} from "./chunk-UJ26GAE5.js";
import "./chunk-664ZODQF.js";
import "./chunk-RJTRUG2J.js";
import "./chunk-IUUIT4SU.js";
import "./chunk-34MYV7JD.js";
// packages/cli/src/services/liteRtServerManager.ts
import fs from "node:fs";
var LiteRtServerManager = class {
static async ensureRunning(gemmaSettings) {
if (!gemmaSettings?.enabled) return;
if (gemmaSettings.autoStartServer === false) return;
const binaryPath = getBinaryPath();
if (!binaryPath || !fs.existsSync(binaryPath)) {
debugLogger.log(
'[LiteRtServerManager] Binary not installed, skipping auto-start. Run "gemini gemma setup".'
);
return;
}
const port = parseInt(
gemmaSettings.classifier?.host?.match(/:(\d+)/)?.[1] ?? "",
10
) || DEFAULT_PORT;
const running = await isServerRunning(port);
if (running) {
debugLogger.log(
`[LiteRtServerManager] Server already running on port ${port}`
);
return;
}
debugLogger.log(
`[LiteRtServerManager] Auto-starting LiteRT server on port ${port}...`
);
try {
const { startServer } = await import("./start-ZXZSKJFC.js");
const started = await startServer(binaryPath, port);
if (started) {
debugLogger.log(`[LiteRtServerManager] Server started on port ${port}`);
} else {
debugLogger.warn(
`[LiteRtServerManager] Server may not have started correctly on port ${port}`
);
}
} catch (error) {
debugLogger.warn("[LiteRtServerManager] Auto-start failed:", error);
}
}
};
export {
LiteRtServerManager
};
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/