rtk-ai/rtk

feat: add transparent hook support for Mistral Vibe (BeforeTool)

Open

#800 建立於 2026年3月24日

在 GitHub 查看
 (4 留言) (3 反應) (0 負責人)Rust (2,914 fork)batch import
area:clieffort-mediumenhancementhelp wantedpriority:medium

倉庫指標

Star
 (48,085 star)
PR 合併指標
 (平均合併 11天 1小時) (30 天內合併 45 個 PR)

描述

Context

rtk init --agent vibe is already implemented and installs:

  • ~/.vibe/prompts/rtk.md — system prompt instructing Vibe to use rtk commands
  • Patches ~/.vibe/config.toml — sets system_prompt_id = "rtk" and adds rtk to bash allowlist

Problem

Vibe currently has no hook mechanism to intercept bash commands before execution (unlike Claude Code's PreToolUse and Gemini's BeforeTool). This means RTK integration relies on the model following the system prompt — which is less reliable than a real hook.

We opened a feature request on the Vibe repo to add this: mistralai/mistral-vibe#531

Current State (prompt-only approach)

What Status
rtk init --agent vibe ✅ Implemented
System prompt (~/.vibe/prompts/rtk.md) ✅ Installed
Config patch (system_prompt_id, allowlist) ✅ Patched
Transparent hook (BeforeTool) ❌ Blocked on mistralai/mistral-vibe#531

Plan

Once mistralai/mistral-vibe#531 is implemented:

  1. Add ~/.vibe/hooks/rtk-hook-vibe.sh (rewrite bash commands to rtk)
  2. Update run_vibe_mode() to also install the hook and patch [hooks] section in config.toml
  3. Same pattern as the existing Gemini hook (hooks/rtk-hook-gemini.sh)

References

貢獻者指南