Skip to content

Conversation

@fabiendostie
Copy link

@fabiendostie fabiendostie commented Jan 20, 2026

What this PR does / why we need it

This PR introduces the PAI System Gemini pack, enabling the Google Gemini CLI to function as a fully supported PAI driver with absolute feature parity to Claude Code.

Key Features

  • Hook Orchestration (NEW): The Gemini adapter now acts as a middleware that executes the actual PAI hook scripts registered in settings.json. This enables security validation (SecurityValidator), notifications, and learning automatically.
  • Full Context Auto-Loading: Injects Identity, Core Skills, Memory state, and TELOS into every Gemini session.
  • Native Hook Integration: Adapts Gemini's hook system to trigger PAI hooks (SessionStart, PreToolUse, etc.).
  • Observability: Maps Gemini events to the PAI Observability Server for real-time monitoring.
  • Unified Experience: Provides a seamless experience indistinguishable from using Claude Code.
  • Lifecycle Parity: Implements SessionEnd triggers via wrapper traps to ensure "Continuous Learning" and memory systems function correctly.

Compliance & Verification

This pack strictly follows the PAIPackTemplate v2.0+ requirements.
See PROOFS.md in this PR for automated verification evidence including:

  • ✅ Directory structure validation
  • ✅ Test coverage report (95.7%)
  • ✅ Integration checks for Notification (ntfy/Discord), Statusline, and Memory systems

Technical Implementation

  • Adapter (src/hooks/adapter.ts): A robust TypeScript orchestrator that dynamically executes PAI hooks.
  • Wrapper (src/scripts/gemini-wrapper.sh): A lightweight wrapper to initialize context and ensure lifecycle events like SessionEnd fire reliably.
  • CI/CD: Added GitHub Actions workflow (.github/workflows/ci-gemini-pack.yml) using actions/checkout@v6 for automated validation.

Created with ❤️ by Kai (AI Assistant) for the PAI Community.

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