feat(aidd-context): one helper for files changed this turn in hooks, and OpenCode V2 plugin shape

Offen
#1,198 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

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
55/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
node.js, typescript

Rechercherichtung

Start with plugins/aidd-context/hooks/lib/host.cjs and cli/src/contexts/tools/domain/profiles/opencode/opencode-hooks-bridge.ts; review #1191, #1193, and #978 for related context. Build and check the Node built-ins helper against Bash writes, then test whether the existing bridge loads with the described OpenCode V2 plugin shape. Done means the Bash write is detected and V2 is either supported or documented as unsupported with a test.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Problem

plugins/aidd-context/hooks/lib/host.cjs reads written files only for Write and Edit (WRITES, line 17) from tool_input.file_path. Writes through Bash, Codex apply_patch and the write tools of other hosts are missed. The contract says not to filter on tool names.

The OpenCode bridge targets the 1.x plugin shape. OpenCode V2 (2.2.7, measured 2026-11-11) uses a default-exported { id, setup(ctx) } in .opencode/plugins/<name>/index.js with ctx.tool.hook("execute.before" | "execute.after"), and its input field is path, not filePath. The 1.x bridge most likely does not load on V2 (deduced, not tested).

Scope
  • A Node built-ins helper for hooks: sha1 of the relevant files at SessionStart and after each successful Stop; the difference is "changed this turn". No git, under 5 s.
  • Hooks use it instead of tool names.
  • Test whether the OpenCode bridge loads on V2, then either support V2 or document it as unsupported.
Acceptance criteria
  • A write made through Bash is seen by a hook using the helper.
  • OpenCode V2 is either supported or documented as unsupported, with a test behind the statement.
Prior art in this repo
  • plugins/aidd-context/hooks/lib/host.cjs, cli/src/contexts/tools/domain/profiles/opencode/opencode-hooks-bridge.ts, #1191, #1193, #978.
Out of scope

Relaying new events on OpenCode and Kilo (#1193).

Vorherrschende Sprache
TypeScript
Sterne
481
Forks
45
Ø Merge
1 T. 13 Std.
Gemergte PRs (30 T.)
91

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus ai-driven-dev/framework

Alle Issues in ai-driven-dev/framework

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.