@maind-dev/mcp-bridge 0.114.2 → 0.116.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/README.md CHANGED
@@ -115,6 +115,7 @@ again unless you re-pair).
115
115
  | GitHub Copilot (VS Code) | user-profile `mcp.json` (per-OS path, `servers` shape) | VS Code is installed, or `--client copilot` |
116
116
  | Cline | `~/.cline/data/settings/cline_mcp_settings.json` — one file for Cline in every editor, its CLI and Cline Desktop | Cline is installed, or `--client cline` |
117
117
  | Continue | `~/.continue/mcpServers/maind.json` — a file of its own; `config.yaml` is never touched | Continue is installed, or `--client continue` |
118
+ | Gemini CLI (MAIND-883) | `mcpServers.maind` in `~/.gemini/settings.json` (`$GEMINI_CLI_HOME/.gemini/` when set) — the same file holds its hooks, see "Gemini CLI" | Gemini CLI is installed, or `--client gemini-cli` |
118
119
  | Codex CLI | `config.toml` in Codex's home — `~/.codex/`, or `$CODEX_HOME` when set (absolute paths only); the Codex IDE extension and the ChatGPT desktop app share it | Codex is installed, or `--client codex`; `--skip-codex` leaves an installed Codex out |
119
120
 
120
121
  Only Claude Code's user file is written on every machine. A client that is not
@@ -137,6 +138,7 @@ Claude Desktop's and Codex's files):
137
138
  | Cline | `~/.cline/data` holds more than `settings/`, an editor (Code, Code - Insiders, Cursor, VSCodium, Windsurf, Devin, AgentComposer) has Cline's `User/globalStorage/saoudrizwan.claude-dev`, or Cline's extension folder (`saoudrizwan.claude-dev-<version>`) is in an editor's extensions dir — see below |
138
139
  | Continue | `~/.continue` holds more than `mcpServers/`, or Continue's extension folder (`continue.continue-<version>`) is in an editor's extensions dir — see below |
139
140
  | Codex | its home (`$CODEX_HOME`, else `~/.codex`) holds more than `config.toml` — Codex keeps `auth.json`, `sessions/`, `history.jsonl`, … there; with `CODEX_HOME` set, a `~/.codex` beyond `config.toml` counts too |
141
+ | Gemini CLI | `~/.gemini` (or `$GEMINI_CLI_HOME/.gemini`) holds more than `settings.json` — Gemini keeps `installation_id`, `oauth_creds.json`, `tmp/`, … there |
140
142
 
141
143
  An agent that ships as an editor extension counts as installed once its folder
142
144
  is there, before it ever ran (since **0.95.0**): the editors' per-user
@@ -152,8 +154,9 @@ not found (no Cursor app data, nothing of Cursor's in ~/.cursor)`); when a
152
154
  leftover file sits there, the row says so. The exit code stays 0.
153
155
  Naming the family with `--client` is the explicit request that overrides the
154
156
  probe. `CLINE_DIR`, `CLINE_DATA_DIR`, `CLINE_MCP_SETTINGS_PATH`,
155
- `CONTINUE_GLOBAL_DIR` and `CODEX_HOME` move the Cline, Continue and Codex files
156
- the way the clients resolve them (absolute paths only).
157
+ `CONTINUE_GLOBAL_DIR`, `CODEX_HOME` and `GEMINI_CLI_HOME` move the Cline,
158
+ Continue, Codex and Gemini CLI files the way the clients resolve them (absolute
159
+ paths only).
157
160
 
158
161
  ### Nothing in your repository — the channel per client (since 0.100.0)
159
162
 
@@ -175,11 +178,12 @@ names it:
175
178
  | Devin Desktop | Claude Code's hooks (it loads `~/.claude/settings.json`) | — no own entry |
176
179
  | Cursor | `sessionStart` hook (a race Cursor confirms can drop its context — see "The team option") | `~/.cursor/hooks.json` |
177
180
  | GitHub Copilot (VS Code, Copilot CLI) | hooks, one entry per event (see "Codex and GitHub Copilot"); user instructions, `applyTo: "**"` | `~/.copilot/hooks/maind.json`; `~/.copilot/instructions/maind.instructions.md` |
181
+ | Gemini CLI | hooks: session briefing at `SessionStart`, prompt context at `BeforeAgent`; the tool events are gaps (see "Gemini CLI") | `hooks` in `~/.gemini/settings.json` |
178
182
  | Cline | global rule (always active without frontmatter) | `<Documents>/Cline/Rules/maind.md` |
179
183
  | Continue | global rule, `alwaysApply: true` | `~/.continue/rules/maind.md` (or `$CONTINUE_GLOBAL_DIR/rules/`) |
180
184
  | Claude Desktop | the MCP `instructions` only | — |
181
185
 
182
- `--no-hook` leaves out every hook (Claude Code's, Cursor's, Codex's, Copilot's),
186
+ `--no-hook` leaves out every hook (Claude Code's, Cursor's, Codex's, Copilot's, Gemini CLI's),
183
187
  `--no-rules` every rule file. `--no-preamble` is accepted for old scripts and
184
188
  does nothing. `install --hooks-only` sets up the channels an existing install is
185
189
  missing. Blocks an earlier install wrote into a repository stay effective until
@@ -402,6 +406,7 @@ prints what that host can take:
402
406
  | Devin Local | Claude Code's JSON where Devin documents it: `additionalContext` at `SessionStart`, `UserPromptSubmit` and `PostToolUse`, `decision: "block"` for a refusal. Nothing at `PreToolUse`, never plain text |
403
407
  | Codex (since 0.100.0; every core hook since 0.105.0) | Runs `on-hook --host=codex …` from its own `config.toml`; gets exactly Claude Code's JSON shapes — `hookSpecificOutput.additionalContext`, the PreToolUse deny — and nothing more, because Codex rejects an output with an unknown field. Session-start text as JSON too: Codex parses plain text that starts with `[` as JSON. Recognised by the `--host=codex` the installer writes, else by a Codex rollout transcript (`…/sessions/YYYY/MM/DD/rollout-….jsonl`) |
404
408
  | GitHub Copilot (since 0.105.0) | Runs `on-hook --host=copilot …` from `~/.copilot/hooks/maind.json`, in VS Code's agent and in the Copilot CLI. Every answer carries its context twice — in `hookSpecificOutput` (VS Code reads only that) and as a top-level `additionalContext` (the Copilot CLI reads that for SessionStart, prompts and PostToolUse) — so each reads it once. Recognised by `--host=copilot`, else by VS Code's transcript path (`…/GitHub.copilot-chat/transcripts/…`), `COPILOT_PROJECT_DIR`, or an ISO `timestamp` with `hook_event_name` |
409
+ | Gemini CLI (MAIND-883) | Runs `on-hook --host=gemini …` from `hooks` in `~/.gemini/settings.json`; gets `hookSpecificOutput.additionalContext` at `SessionStart` (injected as the first turn) and at `BeforeAgent` (appended to the prompt), nothing else. Always one JSON object, `{}` when nothing is said: Gemini reads an empty stdout as "use stderr" and shows that to you. Recognised by `--host=gemini`, else by `GEMINI_SESSION_ID` — before the `CLAUDE_PROJECT_DIR` alias Gemini also sets |
405
410
 
406
411
  Whether the context reaches the model in Devin Local is **not measured**. To
407
412
  keep every hook silent there, set `MAIND_DEVIN_HOOK_OUTPUT=off`, or
@@ -419,6 +424,38 @@ own on that file stays as it is and is named with its replacement. `doctor`
419
424
  reports an old `cat` (`hook-hosts`, a warning when Cursor is installed), and
420
425
  the session-start line names the command while Cursor is installed.
421
426
 
427
+ ## Gemini CLI (MAIND-883)
428
+
429
+ Gemini CLI keeps its MCP servers and its hooks in one user `settings.json`
430
+ (geminicli.com/docs/hooks; read against `@google/gemini-cli-core` 0.64.0).
431
+ Where Gemini is installed (or with `--client gemini-cli`), `install` writes the
432
+ `maind` server there and, with your consent per hook, one group per event:
433
+
434
+ ```json
435
+ "hooks": {
436
+ "SessionStart": [{ "hooks": [{ "name": "maind-session-start", "type": "command",
437
+ "command": "<bridge> on-hook --host=gemini on-session-reminder on-session-start on-session-briefing || true",
438
+ "timeout": 20000 }] }],
439
+ "BeforeAgent": [{ "hooks": [{ "name": "maind-before-agent", "type": "command",
440
+ "command": "<bridge> on-hook --host=gemini on-prompt-context || true", "timeout": 5000 }] }]
441
+ }
442
+ ```
443
+
444
+ Timeouts are milliseconds there. Everything else in the file stays: your
445
+ settings, other MCP servers, your own hooks and other events. User hooks need
446
+ no trust step (Gemini fingerprints project hooks only). `hooksConfig.enabled:
447
+ false`, or `maind-session-start` / `maind-before-agent` in
448
+ `hooksConfig.disabled`, is your switch — reported, never flipped. A
449
+ `settings.json` with comments (Gemini allows them) is left untouched; the row
450
+ says so.
451
+
452
+ **Not wired yet, and said:** the tool hooks (edit guards, read context, write
453
+ health) and the turn end. Gemini's `BeforeTool`/`AfterTool` payloads use their
454
+ own tool names (`write_file`, `replace`, `read_file`, `run_shell_command`) that
455
+ the hooks do not read yet; `install` and `doctor` show them as gap rows. The MCP
456
+ clientInfo name is `gemini-cli-mcp-client`; the client family is `gemini-cli`.
457
+ Whether the session briefing reaches the model in Gemini is **not measured** yet.
458
+
422
459
  ## Codex and GitHub Copilot: the core hooks (since 0.105.0)
423
460
 
424
461
  Codex (learn.chatgpt.com/docs/hooks) and GitHub Copilot — VS Code's agent and