Skip to content

feat(gemini): integrate gemini cli as runtime - #1199

Draft
sjyangkevin wants to merge 1 commit into
apache:mainfrom
sjyangkevin:feat/gemini-cli-runtime-integration
Draft

feat(gemini): integrate gemini cli as runtime#1199
sjyangkevin wants to merge 1 commit into
apache:mainfrom
sjyangkevin:feat/gemini-cli-runtime-integration

Conversation

@sjyangkevin

Copy link
Copy Markdown

Summary

  • Connect Gemini CLI shell calls to Magpie's existing action guard through a BeforeTool adapter and project .gemini/settings.json. The hook uses a portable path and preserves the shared guard decisions.
  • Import AGENTS.md from GEMINI.md and forward the requested output format through the existing Gemini spec-loop profile, reusing the canonical skill sources.
  • Document the implemented runtime contract and update the runtime declarations and specs. Snapshot adopters still register the hook in their own settings; full policy and sandbox parity remain open.

Type of change

  • Skill change (.claude/skills/<name>/) — eval fixtures updated below
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators)
  • Other:

Test plan

  • prek run --all-files passes
  • For Python packages touched: uv run pytest / ruff check / mypy passes
  • For Groovy bridges touched: command-line invocation tested end-to-end
  • For skill changes: eval suite passes for the affected skill
    (PYTHONPATH=tools/skill-evals/src python3 -m skill_evals.runner tools/skill-evals/evals/<skill>/)
  • For skill behaviour changes: a new or updated eval fixture is included in this PR
    (a regression test for the bug fixed / the behaviour added — see CONTRIBUTING.md)
  • Other:

RFC-AI-0004 compliance

  • HITL — any new mutation is gated on explicit user confirmation
  • Sandbox — no new unrestricted host access; network reach declared in the adapter
  • Vendor neutrality — placeholders (<PROJECT>, <tracker>, <upstream>, <security-list>) used in all skill / tool prose (the check-placeholders prek hook is the mechanical gate)
  • Conversational + correctable — agentic-override path documented if behaviour is adopter-tunable
  • Write-access discipline — no autonomous outbound messages; drafts only, sent on confirmation
  • Privacy LLM — private content does not reach a non-approved LLM; redactor invoked where needed

Linked issues

Refs #314.

Notes for reviewers (optional)

Metadata validation reports 38 existing advisory warnings. The workspace test run used temporary jq dependencies and a clean temporary directory to avoid an existing /tmp/.git in the local environment.

Generative AI disclosure: Codex (GPT-6) assisted with implementation, documentation, tests, and preparation of this PR description.

Gemini already discovers Magpie skills, but its shell calls do not
reach the action guard and its spec-loop profile ignores the requested
output format.

Add a BeforeTool adapter for the existing dispatch core and register
it in project settings using a portable path. Import AGENTS.md from
GEMINI.md and forward the output format in the Gemini runner profile.

Document the implemented runtime contract and manual hook registration
for snapshot adopters. Cover the hook protocol, project configuration,
and runner arguments with tests. Policy distribution and sandbox parity
remain follow-up work for issue apache#314.

Refs: apache#314
Generated-by: Codex (GPT-6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant