@google/gemini-cli 0.41.0 → 0.41.1

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.
Files changed (59) hide show
  1. package/bundle/{chunk-CZW4D4RQ.js → chunk-2M535E4N.js} +1 -1
  2. package/bundle/{chunk-J7E7PI4S.js → chunk-3GXWDP2Z.js} +2 -2
  3. package/bundle/{chunk-7LNZOOC7.js → chunk-5ER6FL2Y.js} +6 -6
  4. package/bundle/{chunk-TOU7GDCS.js → chunk-7FNKSW4V.js} +3 -3
  5. package/bundle/{chunk-KHDD5ZQT.js → chunk-ADVHH43I.js} +1 -1
  6. package/bundle/{chunk-4CB5QYON.js → chunk-B54V2534.js} +1 -1
  7. package/bundle/{chunk-KYES7RJ6.js → chunk-BDY3Y2BR.js} +67 -54
  8. package/bundle/{chunk-5ZVQP4WN.js → chunk-C3LH3AWP.js} +1 -1
  9. package/bundle/chunk-CD2YCJUK.js +1571 -0
  10. package/bundle/{chunk-G2G5UOIR.js → chunk-ERP434XO.js} +2 -2
  11. package/bundle/{chunk-KMY2ICHB.js → chunk-GFBZBZM3.js} +1 -1
  12. package/bundle/chunk-GFQ7AKID.js +80034 -0
  13. package/bundle/{chunk-5ECQHX5C.js → chunk-HBHMDJOI.js} +2 -2
  14. package/bundle/{chunk-V7GQYOIO.js → chunk-KZLRP6TK.js} +14 -12
  15. package/bundle/{chunk-CWJ5KY34.js → chunk-MKCUVUHS.js} +1 -1
  16. package/bundle/chunk-MTG3QVUK.js +156 -0
  17. package/bundle/{chunk-CSDNDSTO.js → chunk-NET4RIEQ.js} +5 -6
  18. package/bundle/{chunk-RVECIZP6.js → chunk-NGEOWUR5.js} +1 -1
  19. package/bundle/{chunk-GLO32GZ3.js → chunk-QQRBSOY4.js} +6674 -12455
  20. package/bundle/chunk-RP6RRIFW.js +354495 -0
  21. package/bundle/chunk-WDKZY7RV.js +118 -0
  22. package/bundle/chunk-WKN2PII5.js +17656 -0
  23. package/bundle/{chunk-F6MNV4SZ.js → chunk-WYR3JYKD.js} +6 -6
  24. package/bundle/{chunk-B2LNN6KY.js → chunk-ZJ6QM64B.js} +5 -6
  25. package/bundle/{cleanup-KMEBTV6K.js → cleanup-4US6BQ7H.js} +2 -2
  26. package/bundle/{cleanup-OJM7LXCH.js → cleanup-AUMQFWYH.js} +2 -2
  27. package/bundle/{cleanup-PMJYRELA.js → cleanup-CCK65JHL.js} +3 -3
  28. package/bundle/cleanup-PDD4G7CM.js +33 -0
  29. package/bundle/{core-MMHOAGLI.js → core-IIYBYA3H.js} +1 -1
  30. package/bundle/{devtoolsService-BDOWEGHR.js → devtoolsService-5ERNFOME.js} +2 -2
  31. package/bundle/{devtoolsService-YPN2GRY7.js → devtoolsService-BI57Y3RH.js} +2 -2
  32. package/bundle/{devtoolsService-ARI22QWG.js → devtoolsService-G5DQ5SFK.js} +5 -4
  33. package/bundle/devtoolsService-V5XEJ55W.js +857 -0
  34. package/bundle/{dist-V6XXY2AS.js → dist-32N3LPNC.js} +1 -1
  35. package/bundle/{core-4PBU56P6.js → dist-5VLOJX4U.js} +2 -2
  36. package/bundle/dist-FEOGEVKF.js +2068 -0
  37. package/bundle/{gemini-RGSMPB6F.js → gemini-OHH6WLHR.js} +191 -175
  38. package/bundle/gemini-PXQLGA7D.js +15988 -0
  39. package/bundle/{gemini-GSCVWK7Y.js → gemini-ZGIV3WZZ.js} +11 -11
  40. package/bundle/{gemini-LDARUG77.js → gemini-ZQZBCZWU.js} +11 -11
  41. package/bundle/gemini.js +3 -3
  42. package/bundle/{interactiveCli-5JCJD3F5.js → interactiveCli-7ONNIC6E.js} +6 -6
  43. package/bundle/interactiveCli-FBIC3JEN.js +35052 -0
  44. package/bundle/{interactiveCli-KSSJ4M5C.js → interactiveCli-NFPPWAK4.js} +6 -6
  45. package/bundle/{interactiveCli-ZNAMZNEE.js → interactiveCli-UPXIMCUC.js} +290 -272
  46. package/bundle/{liteRtServerManager-I6PXKOCJ.js → liteRtServerManager-5Y2K46O6.js} +3 -3
  47. package/bundle/{liteRtServerManager-QZCLWSIV.js → liteRtServerManager-BYX3KONC.js} +4 -4
  48. package/bundle/{liteRtServerManager-PG57YSDR.js → liteRtServerManager-CGOJZBD4.js} +3 -3
  49. package/bundle/liteRtServerManager-X6WJ4JCX.js +65 -0
  50. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  51. package/bundle/{oauth2-provider-MV6Q65XJ.js → oauth2-provider-RRLKUWA6.js} +1 -1
  52. package/bundle/{oauth2-provider-356MTA5N.js → oauth2-provider-XEGUC3FK.js} +1 -1
  53. package/bundle/{oauth2-provider-SWABWSBH.js → oauth2-provider-XW4ECB2J.js} +39 -73
  54. package/bundle/oauth2-provider-YQK2OECL.js +237 -0
  55. package/bundle/{start-S2GPZKGW.js → start-D3TFWOXP.js} +5 -5
  56. package/bundle/{start-FWXRAXKY.js → start-EFBJ3Y46.js} +6 -6
  57. package/bundle/start-SYKO5XMN.js +18 -0
  58. package/bundle/{start-MWJKRZPA.js → start-XFACWOPQ.js} +5 -5
  59. package/package.json +1 -1
@@ -0,0 +1,118 @@
1
+ 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);
2
+ import {
3
+ exitCli,
4
+ require_source
5
+ } from "./chunk-2M535E4N.js";
6
+ import {
7
+ DEFAULT_PORT,
8
+ SERVER_START_WAIT_MS,
9
+ getBinaryPath,
10
+ getLiteRtBinDir,
11
+ getLogFilePath,
12
+ getPidFilePath,
13
+ isBinaryInstalled,
14
+ isServerRunning,
15
+ resolveGemmaConfig,
16
+ writeServerProcessInfo
17
+ } from "./chunk-GFBZBZM3.js";
18
+ import {
19
+ debugLogger
20
+ } from "./chunk-SAJ72M2G.js";
21
+ import {
22
+ __toESM
23
+ } from "./chunk-34MYV7JD.js";
24
+
25
+ // packages/cli/src/commands/gemma/start.ts
26
+ var import_chalk = __toESM(require_source(), 1);
27
+ import fs from "node:fs";
28
+ import path from "node:path";
29
+ import { spawn } from "node:child_process";
30
+ async function startServer(binaryPath, port) {
31
+ const alreadyRunning = await isServerRunning(port);
32
+ if (alreadyRunning) {
33
+ debugLogger.log(`LiteRT server already running on port ${port}`);
34
+ return true;
35
+ }
36
+ const logPath = getLogFilePath();
37
+ fs.mkdirSync(getLiteRtBinDir(), { recursive: true });
38
+ const tmpDir = path.dirname(getPidFilePath());
39
+ fs.mkdirSync(tmpDir, { recursive: true });
40
+ const logFd = fs.openSync(logPath, "a");
41
+ try {
42
+ const child = spawn(binaryPath, ["serve", `--port=${port}`, "--verbose"], {
43
+ detached: true,
44
+ stdio: ["ignore", logFd, logFd]
45
+ });
46
+ if (child.pid) {
47
+ writeServerProcessInfo({
48
+ pid: child.pid,
49
+ binaryPath,
50
+ port
51
+ });
52
+ }
53
+ child.unref();
54
+ } finally {
55
+ fs.closeSync(logFd);
56
+ }
57
+ await new Promise((resolve) => setTimeout(resolve, SERVER_START_WAIT_MS));
58
+ return isServerRunning(port);
59
+ }
60
+ var startCommand = {
61
+ command: "start",
62
+ describe: "Start the LiteRT-LM server",
63
+ builder: (yargs) => yargs.option("port", {
64
+ type: "number",
65
+ description: "Port for the LiteRT server"
66
+ }),
67
+ handler: async (argv) => {
68
+ let port;
69
+ if (argv["port"] !== void 0) {
70
+ port = Number(argv["port"]);
71
+ }
72
+ if (!port) {
73
+ const { configuredPort } = resolveGemmaConfig(DEFAULT_PORT);
74
+ port = configuredPort;
75
+ }
76
+ const binaryPath = getBinaryPath();
77
+ if (!binaryPath || !isBinaryInstalled(binaryPath)) {
78
+ debugLogger.error(
79
+ import_chalk.default.red(
80
+ 'LiteRT-LM binary not found. Run "gemini gemma setup" first.'
81
+ )
82
+ );
83
+ await exitCli(1);
84
+ return;
85
+ }
86
+ const alreadyRunning = await isServerRunning(port);
87
+ if (alreadyRunning) {
88
+ debugLogger.log(
89
+ import_chalk.default.green(`LiteRT server is already running on port ${port}.`)
90
+ );
91
+ await exitCli(0);
92
+ return;
93
+ }
94
+ debugLogger.log(`Starting LiteRT server on port ${port}...`);
95
+ const started = await startServer(binaryPath, port);
96
+ if (started) {
97
+ debugLogger.log(import_chalk.default.green(`LiteRT server started on port ${port}.`));
98
+ debugLogger.log(import_chalk.default.dim(`Logs: ${getLogFilePath()}`));
99
+ await exitCli(0);
100
+ } else {
101
+ debugLogger.error(
102
+ import_chalk.default.red("Server may not have started correctly. Check logs:")
103
+ );
104
+ debugLogger.error(import_chalk.default.dim(` ${getLogFilePath()}`));
105
+ await exitCli(1);
106
+ }
107
+ }
108
+ };
109
+
110
+ export {
111
+ startServer,
112
+ startCommand
113
+ };
114
+ /**
115
+ * @license
116
+ * Copyright 2026 Google LLC
117
+ * SPDX-License-Identifier: Apache-2.0
118
+ */