feat(cli): relay PreToolUse and UserPromptSubmit on OpenCode and Kilo, and warn about hooks it skips
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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).
- Vorherrschende Sprache
- TypeScript
- Sterne
- 481
- Forks
- 45
- Ø Merge
- 1 T. 13 Std.
- Gemergte PRs (30 T.)
- 91
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ai-driven-dev/framework
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
ai-driven-dev/framework#1311 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
ai-driven-dev/framework#1244 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
ai-driven-dev/framework#1197 ·
Maintainer antworten meist innerhalb von 1 Tag
-
refactor(aidd-context): apply the new skill template to learnEvtl. vergeben @blafourcade hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ai-driven-dev/framework#1186 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
ai-driven-dev/framework#1163 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in ai-driven-dev/framework
Ähnliche Issues
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 87/100
Maintainer antworten meist innerhalb von 1 Tag
-
🛠️ dette technique
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 61/100
betagouv/mon-entreprise#4752 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 5 Tagen
-
type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
franciscoBSalgueiro/en-croissant#1111 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
area/providers type/feature version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
anomalyco/opencode#64845 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag