Gemini provider for Jack — talks to the Google gemini CLI over the Agent Client Protocol (ACP) via stdio JSON-RPC.
Drop-in plugin: implements the @ottimis/jack-provider-sdk contract and exports a JackProvider object. The Jack host (or any other tool that drives the SDK) registers it and gets a working Gemini integration.
pnpm add @ottimis/jack-gemini @ottimis/jack-provider-sdk @ottimis/jack-chat-core@google/gemini-cli must be available on the user's PATH — the provider's detect() probes for it and surfaces an install hint when missing.
import { geminiProvider } from '@ottimis/jack-gemini'
import { registerProvider } from '@ottimis/jack-provider-sdk' // host-side registry
registerProvider(geminiProvider)That's it — geminiProvider is the same shape as Claude / Codex providers in Jack.
- ACP backend (
acpBackend.ts) — JSON-RPC pump overgemini --acpstdio, full session lifecycle (initialize→authenticate→session/new→session/prompt), translator from ACPsession/updatenotifications toNormalizedMessage[], permission bridge (session/request_permission↔ hostcanUseTool), client-tool handler routing (fs/*/terminal/*/tools/*). - Capability matrix — honest declaration of what ACP exposes today (planMode, mcp, structuredPatch, resumeSession, liveModelSwitch, livePermissionModeSwitch, callback-grain permissions; no askUserQuestion, no subagents, no liveEffortSwitch).
- Tool catalog — Gemini's native tool surface mapped to the canonical
ToolShapeset. - Slash commands — static catalog from
gemini-cliplus a wire-side bus foravailable_commands_updatenotifications. - Sessions on disk — list / fork over
~/.gemini/tmp/<project_slug>/chats/*.jsonl. - Usage — best-effort per-session token counts pulled from
_meta.quotaonsession/promptresponses; account-level surface deferred until the CLI pipes daily quotas.
pnpm install
pnpm typecheck
pnpm buildDual ESM (dist/) + CJS (dist/cjs/) output with declaration files.
- Minor bumps follow additive SDK changes (new optional capability fields, new wire kinds the translator now decodes).
- Major bumps follow
@ottimis/jack-provider-sdkmajor bumps, or breaking changes ingemini-cli's ACP wire that force the translator to drop the older shape.