@google/gemini-cli 0.69.0 → 0.70.0

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 (75) hide show
  1. package/bundle/{chunk-TPD3RZ2B.js → chunk-37D3S3FZ.js} +65559 -51236
  2. package/bundle/{chunk-MJHJIOO6.js → chunk-3VGGGCOZ.js} +35 -29
  3. package/bundle/{chunk-RRELGD6D.js → chunk-4BWP3TDK.js} +1 -1
  4. package/bundle/{chunk-76IL5AQS.js → chunk-5VFAWK3F.js} +1 -1
  5. package/bundle/{chunk-2NIO2MYP.js → chunk-6IKD2NB3.js} +1 -1
  6. package/bundle/{chunk-FZXMW23P.js → chunk-7JS2T75Z.js} +1 -1
  7. package/bundle/{chunk-TEYXLQ5H.js → chunk-AMHNNZY2.js} +1165 -21669
  8. package/bundle/{chunk-SM722TVE.js → chunk-BOIBJEIO.js} +3 -3
  9. package/bundle/{chunk-XXN6WBQW.js → chunk-CB37EK5Y.js} +3 -3
  10. package/bundle/{chunk-BBQ3J3KD.js → chunk-CMKRWIX6.js} +1165 -21669
  11. package/bundle/{chunk-66UT6FAS.js → chunk-EG2BSKPF.js} +1 -1
  12. package/bundle/{chunk-5WVS3LFE.js → chunk-FHK4RNCX.js} +1165 -21669
  13. package/bundle/{chunk-6CG4XKVB.js → chunk-FXAACYC3.js} +1 -1
  14. package/bundle/{chunk-6MSIVBAV.js → chunk-G6SC5BOV.js} +1 -1
  15. package/bundle/{chunk-HFG3LZOT.js → chunk-GFBMTAPD.js} +625 -22
  16. package/bundle/{chunk-2NWFKUZR.js → chunk-JLKRLYZG.js} +35 -29
  17. package/bundle/{chunk-KZYASN6P.js → chunk-KV6XIC2Z.js} +1 -1
  18. package/bundle/{chunk-Y4PW6PYG.js → chunk-LMBUPWFC.js} +65559 -51236
  19. package/bundle/{chunk-RPOY63FV.js → chunk-LMNAB62M.js} +625 -22
  20. package/bundle/{chunk-IUUIT4SU.js → chunk-N7J54YNL.js} +1 -0
  21. package/bundle/{chunk-E2O7673V.js → chunk-QYKA4YD7.js} +3 -3
  22. package/bundle/{chunk-4ICD47UK.js → chunk-RFQXG324.js} +1 -1
  23. package/bundle/{chunk-CU3LIREC.js → chunk-SPAMAY26.js} +1 -1
  24. package/bundle/{chunk-X4P3RZYU.js → chunk-UF44X63P.js} +65411 -51125
  25. package/bundle/{chunk-7JVLRJNT.js → chunk-V4HIE5G5.js} +1 -1
  26. package/bundle/{chunk-TO7WASPI.js → chunk-VHXUWMGE.js} +35 -29
  27. package/bundle/{chunk-664ZODQF.js → chunk-W2AJR23G.js} +137 -58
  28. package/bundle/{chunk-VWFWPAOZ.js → chunk-WRWAVEME.js} +1 -1
  29. package/bundle/{chunk-L7UQY2JQ.js → chunk-YOEWNBDC.js} +625 -22
  30. package/bundle/{cleanup-4RG2PSND.js → cleanup-BMYAIPAL.js} +4 -4
  31. package/bundle/{cleanup-QM4BFPJ4.js → cleanup-CWOSCK57.js} +4 -4
  32. package/bundle/{cleanup-XYZT64H7.js → cleanup-JTPRPYIQ.js} +4 -4
  33. package/bundle/{core-JN57UMDL.js → core-HYVGBZPP.js} +13 -3
  34. package/bundle/{dist-RVQZS637.js → core-XZECNCR2.js} +13 -3
  35. package/bundle/{devtools-TYCPOPV3.js → devtools-WUGMIOCT.js} +1 -1
  36. package/bundle/devtoolsService-ER22TM2Y.js +919 -0
  37. package/bundle/devtoolsService-O5VD5YWD.js +918 -0
  38. package/bundle/devtoolsService-WNJOZ7ZT.js +918 -0
  39. package/bundle/{core-3UXW77KZ.js → dist-75NDR3EX.js} +13 -3
  40. package/bundle/docs/changelogs/index.md +22 -0
  41. package/bundle/docs/changelogs/latest.md +100 -92
  42. package/bundle/docs/changelogs/preview.md +116 -104
  43. package/bundle/docs/cli/enterprise.md +23 -5
  44. package/bundle/docs/ide-integration/ide-companion-spec.md +10 -4
  45. package/bundle/docs/reference/policy-engine.md +45 -6
  46. package/bundle/docs/tools/shell.md +2 -1
  47. package/bundle/{formatError-I6YST2IJ.js → formatError-FYLLVZDF.js} +4 -4
  48. package/bundle/{formatError-R5NIXYBT.js → formatError-M4GLDFGE.js} +4 -4
  49. package/bundle/{formatError-5QTHC2BU.js → formatError-QOZLAZ32.js} +4 -4
  50. package/bundle/{gemini-SS7CDNKE.js → gemini-AYDYW6NZ.js} +676 -288
  51. package/bundle/{gemini-VN2552TI.js → gemini-FRSP6LA3.js} +676 -288
  52. package/bundle/{gemini-BCCY3LUV.js → gemini-PG2FEK5D.js} +676 -288
  53. package/bundle/gemini.js +35 -17
  54. package/bundle/{getMachineId-bsd-TXG52NKR.js → getMachineId-bsd-3TGNBDZQ.js} +1 -1
  55. package/bundle/{getMachineId-darwin-7OE4DDZ6.js → getMachineId-darwin-2CFT4JKO.js} +1 -1
  56. package/bundle/{getMachineId-linux-SHIFKOOX.js → getMachineId-linux-BXATTKN2.js} +1 -1
  57. package/bundle/{getMachineId-unsupported-5U5DOEYY.js → getMachineId-unsupported-VHPOSMKR.js} +1 -1
  58. package/bundle/{getMachineId-win-6KLLGOI4.js → getMachineId-win-IGXROMTR.js} +1 -1
  59. package/bundle/{interactiveCli-X6WWC2C6.js → interactiveCli-6TVFB4R5.js} +36 -18
  60. package/bundle/{interactiveCli-SGZ2VGTY.js → interactiveCli-76LAQB3B.js} +36 -18
  61. package/bundle/{interactiveCli-MX4SNKPZ.js → interactiveCli-BYWR7IEK.js} +36 -18
  62. package/bundle/{liteRtServerManager-CAJIW3PE.js → liteRtServerManager-BYJWS5BO.js} +6 -6
  63. package/bundle/{liteRtServerManager-FQPKIHVD.js → liteRtServerManager-GIRVSE6M.js} +6 -6
  64. package/bundle/{liteRtServerManager-6PM4BXYU.js → liteRtServerManager-KZ62KJW3.js} +6 -6
  65. package/bundle/{oauth2-provider-T3DF3FTA.js → oauth2-provider-SFFQQ6OE.js} +3 -3
  66. package/bundle/{oauth2-provider-RIS25NZW.js → oauth2-provider-SRH6I6G7.js} +3 -3
  67. package/bundle/{oauth2-provider-D4UNDFN3.js → oauth2-provider-ZBFFAIQE.js} +3 -3
  68. package/bundle/{src-XZYPU6PJ.js → src-MVBNXN6P.js} +3 -3504
  69. package/bundle/{start-FVNQP7EB.js → start-OLEVDFQS.js} +8 -8
  70. package/bundle/{start-WSOZZWBK.js → start-PLK5XHJC.js} +8 -8
  71. package/bundle/{start-76F65FZ5.js → start-Q66LTS3Y.js} +8 -8
  72. package/package.json +1 -1
  73. package/bundle/devtoolsService-K3FKQFZP.js +0 -4422
  74. package/bundle/devtoolsService-QLI75YCI.js +0 -4421
  75. package/bundle/devtoolsService-XZRXARUU.js +0 -4421
@@ -369,16 +369,22 @@ third-party MCP server, even if the server offers other tools like
369
369
 
370
370
  #### More secure pattern: Define and add to allowlist in system settings
371
371
 
372
- To create a secure, centrally-managed catalog of tools, the system administrator
373
- **must** do both of the following in the system-level `settings.json` file:
372
+ To create a secure, centrally-managed catalog of tools, you **must** complete
373
+ all of the following steps when configuring the system-level `settings.json`
374
+ file:
374
375
 
375
376
  1. **Define the full configuration** for every approved server in the
376
377
  `mcpServers` object. This ensures that even if a user defines a server with
377
- the same name, the secure system-level definition will take precedence.
378
+ the same name, the secure system-level definition takes precedence.
378
379
  2. **Add the names** of those servers to an allowlist using the `mcp.allowed`
379
380
  setting. This is a critical security step that prevents users from running
380
- any servers that are not on this list. If this setting is omitted, the CLI
381
- will merge and allow any server defined by the user.
381
+ any servers that aren't on this list. If you omit this setting, Gemini CLI
382
+ merges and runs any server defined by the user.
383
+ 3. **Lock down executable and directory permissions** for every local command
384
+ referenced in `mcpServers`. Each executable script or binary, its parent
385
+ directories, and any scripts or dependencies it invokes **must** be owned by
386
+ `root` (or `SYSTEM` or `Administrators` on Windows) and **must not** be
387
+ writable by non-administrative users or shared user groups.
382
388
 
383
389
  **Example system `settings.json`:**
384
390
 
@@ -409,6 +415,18 @@ Any server a user defines will either be overridden by the system definition (if
409
415
  it has the same name) or blocked because its name is not in the `mcp.allowed`
410
416
  list.
411
417
 
418
+ <!-- prettier-ignore -->
419
+ > [!WARNING]
420
+ > Gemini CLI skips system-configured MCP servers whose local command or script
421
+ > path fails ownership or write-permission checks and logs a startup security
422
+ > warning. Ensure any secondary scripts, binaries, and dependencies invoked
423
+ > inside wrapper scripts are also locked down. Because `mcp.allowed`
424
+ > automatically approves tool calls from listed servers, we recommend
425
+ > restricting exposed tools with `includeTools`, pinning absolute binary paths
426
+ > inside wrapper scripts, or enforcing remote (`sse` or `http`) server
427
+ > allowlists with
428
+ > [Enterprise Admin Controls](../admin/enterprise-controls.md).
429
+
412
430
  ### Less secure pattern: Omitting the allowlist
413
431
 
414
432
  If the administrator defines the `mcpServers` object but fails to also specify
@@ -1,6 +1,6 @@
1
1
  # Gemini CLI companion plugin: Interface specification
2
2
 
3
- > Last Updated: September 15, 2025
3
+ > Last Updated: November 17, 2026
4
4
 
5
5
  This document defines the contract for building a companion plugin to enable
6
6
  Gemini CLI's IDE mode. For VS Code, these features (native diffing, context
@@ -34,9 +34,15 @@ creating a "discovery file."
34
34
  - **How the CLI finds the file:** The CLI determines the Process ID (PID) of the
35
35
  IDE it's running in by traversing the process tree. It then looks for a
36
36
  discovery file that contains this PID in its name.
37
- - **File location:** The file must be created in a specific directory:
38
- `os.tmpdir()/gemini/ide/`. Your plugin must create this directory if it
39
- doesn't exist.
37
+ - **File location and permissions:** On POSIX systems (Linux and macOS), you
38
+ **MUST** create the file in `os.tmpdir()/gemini-ide-${UID}/` (where `${UID}`
39
+ is the numeric user ID of the current process). Your plugin **MUST** create
40
+ this directory with `0700` permissions, verify with `lstat` that it isn't a
41
+ symbolic link and is owned by `${UID}`, and write the discovery file
42
+ atomically with `0600` permissions (for example, opening a temporary file in
43
+ that directory with exclusive creation `wx` and mode `0600`, then renaming it
44
+ into place). On Windows, where `%TEMP%` is already scoped to the current user,
45
+ create the file in `os.tmpdir()\gemini\ide\`.
40
46
  - **File naming convention:** The filename is critical and **MUST** follow the
41
47
  pattern: `gemini-ide-server-${PID}-${PORT}.json`
42
48
  - `${PID}`: The process ID of the parent IDE process. Your plugin must
@@ -93,6 +93,41 @@ the arguments don't match the pattern, the rule does not apply. For a list of
93
93
  argument keys available for each tool, see the **Parameters** in the
94
94
  [Tools reference](/docs/reference/tools#available-tools).
95
95
 
96
+ In the stable JSON string, each top-level argument is delimited by the `\x00`
97
+ character, while nested objects and array items aren't. To match only a
98
+ top-level argument, start the pattern with `\x00`, for example
99
+ `'\x00"command":"git '`.
100
+
101
+ Patterns use [RE2 syntax](https://github.com/google/re2/wiki/Syntax). Gemini CLI
102
+ matches them in time proportional to the length of the arguments, so evaluation
103
+ time stays predictable for large arguments. RE2 differs from JavaScript regular
104
+ expressions in the following ways:
105
+
106
+ - Lookahead (`(?=...)`, `(?!...)`), lookbehind (`(?<=...)`, `(?<!...)`), and
107
+ backreferences (`\1`) aren't supported.
108
+ - `\uXXXX` escapes aren't supported. Use `\x{XXXX}` instead.
109
+ - A backslash in front of a non-ASCII character isn't supported. Write the
110
+ character itself.
111
+ - A repetition count can't exceed 1,000. For example, `a{1001}` is rejected.
112
+ - `\s` matches ASCII whitespace only. It doesn't match a no-break space or other
113
+ Unicode spaces.
114
+ - `.` matches every character except a newline, including a carriage return.
115
+
116
+ Gemini CLI also limits the compiled size of a pattern to 2,000 instructions.
117
+ Repetition counts multiply the compiled size, so large counts are the usual
118
+ reason a pattern exceeds this limit. For example, `.{1000}` is accepted, but
119
+ `.{1000}.{1000}` and `.{0,1000}` aren't. We recommend keeping repetition counts
120
+ small.
121
+
122
+ If a pattern doesn't compile or exceeds the size limit, Gemini CLI skips that
123
+ rule and reports the error when it starts.
124
+
125
+ <!-- prettier-ignore -->
126
+ > [!NOTE]
127
+ > Earlier versions of Gemini CLI evaluated patterns as JavaScript regular
128
+ > expressions. If a rule that used to load now reports an invalid pattern,
129
+ > rewrite the pattern without the unsupported constructs.
130
+
96
131
  #### Execution environment
97
132
 
98
133
  If `interactive` is specified, the rule will only apply if the CLI's execution
@@ -306,19 +341,22 @@ mcpName = "my-custom-server"
306
341
  # key-value pairs provided here are present in the tool's annotations.
307
342
  toolAnnotations = { readOnlyHint = true }
308
343
 
309
- # (Optional) A regex to match against the tool's arguments.
310
- argsPattern = '"command":"(git|npm)'
344
+ # (Optional) A regular expression in RE2 syntax to match against the tool's
345
+ # arguments.
346
+ argsPattern = '\x00"command":"(?:git|npm)'
311
347
 
312
348
  # (Optional) A string or array of strings that a shell command must start with.
313
349
  # This is syntactic sugar for `toolName = "run_shell_command"` and an
314
350
  # `argsPattern`.
315
351
  commandPrefix = "git"
316
352
 
317
- # (Optional) A regex to match against the entire shell command.
353
+ # (Optional) A regular expression in RE2 syntax to match against the entire
354
+ # shell command.
318
355
  # This is also syntactic sugar for `toolName = "run_shell_command"`.
319
356
  # Note: This pattern is tested against the JSON representation of the arguments
320
- # (e.g., `{"command":"<your_command>"}`). Because it prepends `"command":"`,
321
- # it effectively matches from the start of the command.
357
+ # (e.g., `{"command":"<your_command>"}`). It matches only the top-level
358
+ # `command` argument and starts at the beginning of the command, so
359
+ # alternatives such as `ls|pwd` also apply from the start of the command.
322
360
  # Anchors like `^` or `$` apply to the full JSON string,
323
361
  # so `^` should usually be avoided here.
324
362
  # You cannot use commandPrefix and commandRegex in the same rule.
@@ -386,7 +424,8 @@ and [Tools reference](/docs/reference/tools#available-tools).
386
424
  - `commandPrefix`: Matches if the `command` argument starts with the given
387
425
  string.
388
426
  - `commandRegex`: Matches if the `command` argument matches the given regular
389
- expression.
427
+ expression. The pattern uses the same RE2 syntax as
428
+ [`argsPattern`](#arguments-pattern).
390
429
 
391
430
  **Example:**
392
431
 
@@ -26,7 +26,8 @@ fields for writing rules that target shell commands:
26
26
 
27
27
  - `commandPrefix`: Matches if the `command` argument starts with a given string.
28
28
  - `commandRegex`: Matches if the `command` argument matches a given regular
29
- expression.
29
+ expression. Patterns use RE2 syntax, which is described in
30
+ [Arguments pattern](../reference/policy-engine.md#arguments-pattern).
30
31
 
31
32
  These are syntactic sugar for combining `toolName = "run_shell_command"` with an
32
33
  `argsPattern` in a policy TOML file. They are **not** arguments of
@@ -2,10 +2,10 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  formatCliError,
4
4
  isCliDebugEnabled
5
- } from "./chunk-CU3LIREC.js";
6
- import "./chunk-Y4PW6PYG.js";
7
- import "./chunk-664ZODQF.js";
8
- import "./chunk-IUUIT4SU.js";
5
+ } from "./chunk-G6SC5BOV.js";
6
+ import "./chunk-UF44X63P.js";
7
+ import "./chunk-W2AJR23G.js";
8
+ import "./chunk-N7J54YNL.js";
9
9
  import "./chunk-L6PII3GR.js";
10
10
  import "./chunk-34MYV7JD.js";
11
11
  export {
@@ -2,10 +2,10 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  formatCliError,
4
4
  isCliDebugEnabled
5
- } from "./chunk-6MSIVBAV.js";
6
- import "./chunk-TPD3RZ2B.js";
7
- import "./chunk-664ZODQF.js";
8
- import "./chunk-IUUIT4SU.js";
5
+ } from "./chunk-FXAACYC3.js";
6
+ import "./chunk-37D3S3FZ.js";
7
+ import "./chunk-W2AJR23G.js";
8
+ import "./chunk-N7J54YNL.js";
9
9
  import "./chunk-L6PII3GR.js";
10
10
  import "./chunk-34MYV7JD.js";
11
11
  export {
@@ -2,10 +2,10 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  formatCliError,
4
4
  isCliDebugEnabled
5
- } from "./chunk-6CG4XKVB.js";
6
- import "./chunk-X4P3RZYU.js";
7
- import "./chunk-664ZODQF.js";
8
- import "./chunk-IUUIT4SU.js";
5
+ } from "./chunk-SPAMAY26.js";
6
+ import "./chunk-LMBUPWFC.js";
7
+ import "./chunk-W2AJR23G.js";
8
+ import "./chunk-N7J54YNL.js";
9
9
  import "./chunk-L6PII3GR.js";
10
10
  import "./chunk-34MYV7JD.js";
11
11
  export {