Skip to content

ottimis/JACK-gemini

Repository files navigation

@ottimis/jack-gemini

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.

Install

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.

Use

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.

What this package owns

  • ACP backend (acpBackend.ts) — JSON-RPC pump over gemini --acp stdio, full session lifecycle (initializeauthenticatesession/newsession/prompt), translator from ACP session/update notifications to NormalizedMessage[], permission bridge (session/request_permission ↔ host canUseTool), 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 ToolShape set.
  • Slash commands — static catalog from gemini-cli plus a wire-side bus for available_commands_update notifications.
  • Sessions on disk — list / fork over ~/.gemini/tmp/<project_slug>/chats/*.jsonl.
  • Usage — best-effort per-session token counts pulled from _meta.quota on session/prompt responses; account-level surface deferred until the CLI pipes daily quotas.

Build

pnpm install
pnpm typecheck
pnpm build

Dual ESM (dist/) + CJS (dist/cjs/) output with declaration files.

Versioning

  • Minor bumps follow additive SDK changes (new optional capability fields, new wire kinds the translator now decodes).
  • Major bumps follow @ottimis/jack-provider-sdk major bumps, or breaking changes in gemini-cli's ACP wire that force the translator to drop the older shape.

About

Gemini provider for Jack — speaks ACP (Agent Client Protocol) over stdio JSON-RPC. Implements the @ottimis/jack-provider-sdk contract; consumed by the Jack host or any other tool that drives the SDK.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors