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

Abierto
#1,198 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
node.js, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
481
Forks
45
Merge medio
1 d 13 h
PR fusionados (30 d)
91

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ai-driven-dev/framework

Todos los issues de ai-driven-dev/framework

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.