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

オープン
#1,198 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
node.js, typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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).

主要言語
TypeScript
スター
481
フォーク
45
平均マージ
1日 13時間
マージ済み PR(30日)
91

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ai-driven-dev/framework のほかの issue

ai-driven-dev/framework の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。