feat(cli): relay PreToolUse and UserPromptSubmit on OpenCode and Kilo, and warn about hooks it skips
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- typescript
Piste de recherche
Start with the OpenCode bridge at cli/src/contexts/tools/domain/profiles/opencode/opencode-hooks-bridge.ts and the corresponding Kilo bridge; compare their event handling with the native tool.execute.before and chat.message events described in the issue. Check how the build reports unsupported hooks and update plugins/aidd-context/skills/08-hook-generate/references/tool-paths.md. Verify the acceptance criteria with probes, including whether PreToolUse can deny a tool call.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Problem
The OpenCode and Kilo hooks bridge relays only SessionStart, PostToolUse and Stop (cli/src/contexts/tools/domain/profiles/{opencode,kilo}/*-hooks-bridge.ts). PreToolUse and UserPromptSubmit hooks are skipped without a warning. Both tools expose a native equivalent that fires.
Measured on 2026-11-11 with a probe plugin in a disposable folder, non-interactive:
- OpenCode 1.19.3,
opencode run:tool.execute.beforefires forwriteandbash;chat.messagefires for the prompt. - Kilo 7.7.5,
kilo run: same two hooks fire.
So a framework hook declared on PreToolUse or UserPromptSubmit silently does nothing on these two tools. This is a bridge limit, not a tool limit.
Scope
- Relay
PreToolUsethroughtool.execute.beforeandUserPromptSubmitthroughchat.message, for OpenCode and Kilo. - Report an event the bridge does not relay (a warning at build time), instead of skipping it silently.
- Update
plugins/aidd-context/skills/08-hook-generate/references/tool-paths.md, which says OpenCode is not supported.
Acceptance criteria
- A
PreToolUsescript runs before a tool call on OpenCode and Kilo. - A
UserPromptSubmitscript runs on each user prompt on OpenCode and Kilo. - Whether a
PreToolUsescript can deny a tool call (throw, or changeargs) is verified by a probe and documented. It is not verified today. - A build warns about every hook event it does not relay.
Prior art in this repo
cli/src/contexts/tools/domain/profiles/opencode/opencode-hooks-bridge.ts(three relayed events).- #1191 (Stop continuation lost under
opencode run), #978 (verified tool compatibility), #676 (OpenCode through its plugin API).
Out of scope
The Stop continuation under opencode run (#1191). Adding other events (SubagentStop, SessionEnd).
- Langage dominant
- TypeScript
- Étoiles
- 481
- Forks
- 45
- Merge moyen
- 1 j 13 h
- PR mergées (30 j)
- 91
Préparer son environnement
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de ai-driven-dev/framework
-
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
ai-driven-dev/framework#1311 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 79/100
ai-driven-dev/framework#1244 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
ai-driven-dev/framework#1197 ·
Les mainteneurs répondent en général sous 1 jour
-
refactor(aidd-context): apply the new skill template to learnPeut-être pris @blafourcade l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
ai-driven-dev/framework#1186 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
ai-driven-dev/framework#1163 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de ai-driven-dev/framework
Issues similaires
-
Difficulté 1/5 1-3 heures Accessibilité débutants 87/100
Les mainteneurs répondent en général sous 1 jour
-
🛠️ dette technique
Difficulté 2/5 1-3 heures Accessibilité débutants 61/100
betagouv/mon-entreprise#4752 · 1 commentaire ·
Les mainteneurs répondent en général sous 5 jours
-
type: bug
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
franciscoBSalgueiro/en-croissant#1111 ·
Les mainteneurs répondent en général sous 2 jours
-
area/providers type/feature version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
anomalyco/opencode#64845 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour