@google/gemini-cli 0.69.0-preview.0 → 0.70.0-preview.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.
- package/bundle/{chunk-LYKP3S67.js → chunk-65MRMUKB.js} +625 -22
- package/bundle/{chunk-CGQSFR2I.js → chunk-6XLLXGZQ.js} +1 -1
- package/bundle/{chunk-U5FJ6OGB.js → chunk-AMGYQYS7.js} +35 -29
- package/bundle/{chunk-SYOIMUZI.js → chunk-BCL7DJOQ.js} +1165 -21669
- package/bundle/{chunk-6KCLIS6W.js → chunk-BOYVA4SV.js} +1 -1
- package/bundle/{chunk-YODS6HR2.js → chunk-CJ7YZ55P.js} +3 -3
- package/bundle/{chunk-BRHBBQC5.js → chunk-CMUPNBQQ.js} +35 -29
- package/bundle/{chunk-V7L3FMBE.js → chunk-ECLDXLDB.js} +3 -3
- package/bundle/{chunk-VQTELFV3.js → chunk-F6P6PQSG.js} +1 -1
- package/bundle/{chunk-CWHEOJXF.js → chunk-FDIF7V5C.js} +1 -1
- package/bundle/{chunk-UW3ZS3BH.js → chunk-FGTABIOQ.js} +1 -1
- package/bundle/{chunk-2ONJU4V7.js → chunk-HBTS2REO.js} +1 -1
- package/bundle/{chunk-DWMZSQYG.js → chunk-I5QSCSQU.js} +65559 -51236
- package/bundle/{chunk-4SOPZCNA.js → chunk-IS5SQ7HP.js} +625 -22
- package/bundle/{chunk-RBDD6IBU.js → chunk-L5UVIFFB.js} +1165 -21669
- package/bundle/{chunk-IUUIT4SU.js → chunk-N7J54YNL.js} +1 -0
- package/bundle/{chunk-PH5XENTH.js → chunk-NFAJ5FW5.js} +1 -1
- package/bundle/{chunk-GQ7FZNO2.js → chunk-NFBC76U4.js} +1 -1
- package/bundle/{chunk-KUXCUQKX.js → chunk-O2DXIYZO.js} +65411 -51125
- package/bundle/{chunk-C5BED6L6.js → chunk-O5EBPO5F.js} +35 -29
- package/bundle/{chunk-2KKDGWF2.js → chunk-RTIGPATB.js} +1 -1
- package/bundle/{chunk-JJWPYMIO.js → chunk-RVYQZ73V.js} +3 -3
- package/bundle/{chunk-MP4TVGOP.js → chunk-SA2VIQNQ.js} +65559 -51236
- package/bundle/{chunk-GDCMMKZ2.js → chunk-STY67ND2.js} +1 -1
- package/bundle/{chunk-3HEOCQDN.js → chunk-SXOGAWDG.js} +1 -1
- package/bundle/{chunk-UAHZWXSG.js → chunk-T7277DWX.js} +1 -1
- package/bundle/{chunk-U3FFDEKY.js → chunk-TX3SX2WI.js} +625 -22
- package/bundle/{chunk-664ZODQF.js → chunk-W2AJR23G.js} +137 -58
- package/bundle/{chunk-YP5TA33N.js → chunk-ZUQTNDGH.js} +1165 -21669
- package/bundle/{cleanup-3T2KXSP4.js → cleanup-44LV7E4R.js} +4 -4
- package/bundle/{cleanup-NNQCI4KC.js → cleanup-O4QBMRVU.js} +4 -4
- package/bundle/{cleanup-TA4VYDXQ.js → cleanup-WMYSWXJR.js} +4 -4
- package/bundle/{core-TUJHM7E7.js → core-DJ7VMWCC.js} +13 -3
- package/bundle/{core-6XF5EO7Z.js → core-LJXCBOFM.js} +13 -3
- package/bundle/{devtools-TYCPOPV3.js → devtools-WUGMIOCT.js} +1 -1
- package/bundle/devtoolsService-D4VCGQMJ.js +919 -0
- package/bundle/devtoolsService-EBOCEFTO.js +918 -0
- package/bundle/devtoolsService-G4CPAW3U.js +918 -0
- package/bundle/{dist-OSQFIX7F.js → dist-QSS2VWMY.js} +13 -3
- package/bundle/docs/changelogs/index.md +22 -0
- package/bundle/docs/changelogs/latest.md +100 -92
- package/bundle/docs/changelogs/preview.md +116 -104
- package/bundle/docs/cli/enterprise.md +23 -5
- package/bundle/docs/ide-integration/ide-companion-spec.md +10 -4
- package/bundle/docs/reference/policy-engine.md +45 -6
- package/bundle/docs/tools/shell.md +2 -1
- package/bundle/{formatError-LJFIC7G3.js → formatError-3QIVJAE5.js} +4 -4
- package/bundle/{formatError-MIUNQEYE.js → formatError-I5Q2HGMN.js} +4 -4
- package/bundle/{formatError-KEQ3HU3Y.js → formatError-NLKMYJNL.js} +4 -4
- package/bundle/{gemini-ZZZEFPSK.js → gemini-4325ARIU.js} +676 -288
- package/bundle/{gemini-22ON2CZG.js → gemini-J7ZRUAXR.js} +676 -288
- package/bundle/{gemini-HLS52ZNZ.js → gemini-LOYZXP6I.js} +676 -288
- package/bundle/gemini.js +35 -17
- package/bundle/{getMachineId-bsd-TXG52NKR.js → getMachineId-bsd-3TGNBDZQ.js} +1 -1
- package/bundle/{getMachineId-darwin-7OE4DDZ6.js → getMachineId-darwin-2CFT4JKO.js} +1 -1
- package/bundle/{getMachineId-linux-SHIFKOOX.js → getMachineId-linux-BXATTKN2.js} +1 -1
- package/bundle/{getMachineId-unsupported-5U5DOEYY.js → getMachineId-unsupported-VHPOSMKR.js} +1 -1
- package/bundle/{getMachineId-win-6KLLGOI4.js → getMachineId-win-IGXROMTR.js} +1 -1
- package/bundle/{interactiveCli-5HMWVTK2.js → interactiveCli-AQ67IY7V.js} +36 -18
- package/bundle/{interactiveCli-NKFQZXB5.js → interactiveCli-CEIWZCYF.js} +36 -18
- package/bundle/{interactiveCli-HQBE3C3C.js → interactiveCli-O2L63RLG.js} +36 -18
- package/bundle/{liteRtServerManager-AG4Y5JMZ.js → liteRtServerManager-EZFHT2B3.js} +6 -6
- package/bundle/{liteRtServerManager-OFNVXXQ4.js → liteRtServerManager-HMCB6A65.js} +6 -6
- package/bundle/{liteRtServerManager-2IOXWO76.js → liteRtServerManager-MH32CAZ5.js} +6 -6
- package/bundle/{oauth2-provider-2DHNJ2S3.js → oauth2-provider-3TFNA7VY.js} +3 -3
- package/bundle/{oauth2-provider-YDNSNN32.js → oauth2-provider-NPOZQDQO.js} +3 -3
- package/bundle/{oauth2-provider-OEGXLWIL.js → oauth2-provider-UXC7XFV6.js} +3 -3
- package/bundle/{src-XZYPU6PJ.js → src-MVBNXN6P.js} +3 -3504
- package/bundle/{start-JSVKPUTV.js → start-I2GOKFKQ.js} +8 -8
- package/bundle/{start-N33LF5WK.js → start-JIKLB3S3.js} +8 -8
- package/bundle/{start-7GJH3MKY.js → start-NSYEL7UE.js} +8 -8
- package/package.json +1 -1
- package/bundle/devtoolsService-7EMPANTX.js +0 -4421
- package/bundle/devtoolsService-I7WFRUEA.js +0 -4422
- package/bundle/devtoolsService-RCBUZGYD.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,
|
|
373
|
-
|
|
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
|
|
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
|
|
381
|
-
|
|
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:
|
|
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
|
|
38
|
-
`os.tmpdir()/gemini
|
|
39
|
-
|
|
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
|
|
310
|
-
|
|
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
|
|
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>"}`).
|
|
321
|
-
#
|
|
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-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-FGTABIOQ.js";
|
|
6
|
+
import "./chunk-O2DXIYZO.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-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-F6P6PQSG.js";
|
|
6
|
+
import "./chunk-SA2VIQNQ.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-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-SXOGAWDG.js";
|
|
6
|
+
import "./chunk-I5QSCSQU.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 {
|