feat(providers): Gemini CLI provider — ModelProvider.GEMINI (#660)

* feat(providers): Gemini CLI provider — ModelProvider.GEMINI

Mirrors the grok blueprint with source-verified divergences (all facts
pinned against google-gemini/gemini-cli @ 9681621c): no refresher
daemon — Google's refresh tokens are reusable, so the RO host mount is
COPIED to a writable container-local ~/.gemini and each container
refreshes in-process independently (the write-back crash risk on RO
never triggers); settings.json renders security.auth.selectedType
'oauth-personal', experimental.enableAgents=false (subagent ban),
autoConfigureMemory=false with a bounded heap; tool scoping rides the
tiered TOML Policy Engine (deny-only rules that yolo mode structurally
cannot beat); gemini -p with --output-format stream-json; usage parsed
from the run's own stdout stats — the adversarial pass caught the
parser reading the json-mode nested shape while the entrypoint runs
stream-json's FLAT shape (every real run would have priced $0 forever,
hidden by fixtures sharing the assumption) — now flat-primary with the
nested shape as cited fallback; rate-limit classified from structured
error.type only (model-echo immune), native exit 41 auth passthrough;
per-model pricing for the three GA models; migrations 084 (enum) + 085
(seed) complete the 082-085 finale chain. V1 excludes interactive
intake/secretary. Stack-merge required two behavior-preserving
complexity refactors in the shared park/usage plumbing (a park-pair
loop; a usage-reader dispatch dict).

* fix(providers): route gemini usage read through the containment barrier

Mirrors the codex/grok fix — _gemini_usage_json now delegates to
_read_usage_json_contained, so CodeQL's path-injection alert on the
gemini read is resolved by the same resolve-and-contain guard.

---------

Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
Renzo F
2026-07-23 03:53:21 +02:00
committed by GitHub
co-authored by Renn F
parent 13abb2ece0
commit 21d6730400
24 changed files with 2664 additions and 56 deletions
+5
View File
@@ -117,6 +117,11 @@ jobs:
[roboco-agent-grok-prompter]=docker/agent-grok-prompter.Dockerfile
[roboco-agent-grok-secretary]=docker/agent-grok-secretary.Dockerfile
[roboco-agent-codex]=docker/agent-codex.Dockerfile
# Gemini (Google, official CLI) — one-shot delivery roles only (V1),
# no interactive prompter/secretary variant depends FROM it, so
# (unlike roboco-agent-grok above) it needs no special build-order
# carve-out and is just another entry here.
[roboco-agent-gemini]=docker/agent-gemini.Dockerfile
)
for name in "${!IMAGES[@]}"; do
echo "::group::build ${name}"