12 Commits

Author SHA1 Message Date
1385c0765a fix(plugin): added temporary noop for resources list 2026-06-06 21:28:40 -04:00
83f456f25b fix(plugin): guard against undefined output.output for MCP tools
MCP tools don't populate output.output in the tool.execute.after hook —
the MCP content flows through OpenCode's internal parts pipeline instead.
This caused a crash: undefined is not an object (evaluating 'text.length')
in the truncate function.
2026-06-06 02:11:24 -04:00
14c132a4c9 chore: fix .gitignore and commit package-lock.json 2026-05-23 15:15:39 -04:00
9544b4e2ab chore: wire exa mcp server into global vscode config via install.sh
install.sh now ensures both all-agents and exa are present in the VS
Code global mcp.json on every machine.
2026-05-23 15:02:55 -04:00
3738732156 docs(agents): document Jinja system-message constraint and session-start delivery
- Add forbidden pattern: using experimental.chat.system.transform for
  session-start injection causes Jinja 'System message must be at the
  beginning' on Qwen-family GGUF models when orchestrator spawns subagents
- Add note to session-start.sh section explaining OpenCode delivery via
  output.parts.unshift() on first chat.message turn (not system.transform)
2026-05-23 00:00:40 -04:00
2949981e43 fix(plugin): actually inject post-tool-use hook output into response
runHook() return value was being discarded. The hook was called but its
additionalContext was never appended to output.response, so reminders
never appeared in the model's tool result.
2026-05-22 23:48:03 -04:00
f0d21e9895 fix(plugin): move session-start to chat.message to fix Jinja system-message error
experimental.chat.system.transform fires for task-spawned subagent sessions
after the task prompt (user message) is already in the conversation. Pushing
to output.system at that point places a system message at a non-zero position,
which Qwen3.6's strict Jinja chat template rejects with 'System message must
be at the beginning.'

Move session-start.sh injection to chat.message (first turn guard via
initializedSessions). Injected as a synthetic text part via unshift(), which
has no position constraints.
2026-05-22 23:05:16 -04:00
5c1225744a fix(install): wire global opencode agents dir; add doc-check anti-pattern rule
install.sh step 3 now symlinks all agent .md files into
~/.config/opencode/agents/ so project repos no longer need
per-project .opencode/agents/ symlinks.

AGENTS.md: add anti-pattern rule — do not assert a third-party tool
lacks a feature without fetching the tool's current docs first.
2026-05-22 21:39:41 -04:00
f4017abf45 fix(install): generate copilot hooks with absolute paths
Instead of symlinking ~/.copilot/hooks/agent-support.json to dotfiles
hooks.json (which uses relative paths resolved from workspace root),
generate the file at install time with absolute paths to dotfiles hooks.

This means projects no longer need per-project hook stubs or symlinks.
A project only needs .agents/hooks/post-tool-use-remnant.sh (or similar)
for its own overlay, wired as a second PostToolUse in .github/hooks/.
2026-05-22 21:15:42 -04:00
88435d6b51 fix(hooks): add bash tool name to pre-tool-use hook for OpenCode support
OpenCode uses tool name 'bash' (not 'run_in_terminal') for shell execution.
The hook was early-exiting for 'bash' tool calls, leaving banned commands
unchecked. Added 'bash' to both the inspect allowlist and COMMAND extraction.
2026-05-22 16:42:04 -04:00
690178da96 fix: add mcp package.json and dep auto-install in install.sh
The MCP server requires @modelcontextprotocol/sdk and zod which are not
globally installed. Added .agents/mcp/package.json and updated install.sh
to run 'npm install --prefix' on first setup.
2026-05-22 16:19:16 -04:00
6b07e4ccb2 feat: add shared agent infrastructure (.agents/)
- AGENTS.md: design principles, enforcement hierarchy, deferred loading
- agents/: brainstorm, build, orchestrator, research (auto-discovered by MCP server)
- skills/: research methodology (auto-discovered by MCP server)
- hooks/: pre-tool-use, post-tool-use (BFF block removed), session-start,
  stop, pre-compact, user-prompt-submit
- frameworks/: opencode/plugin.ts (resolves hooks via import.meta.url — works
  as project-local or global plugin), github/hooks.json
- mcp/index.ts: auto-discovers agents/*.md and skills/*.md from frontmatter
  (replaces hand-maintained registry); server renamed all-agents
- docs/: agent-infrastructure.md (generalized), research docs (7 files),
  ai_architectures.md, llama-server-cuda-wsl2.md
- install.sh: idempotent setup — Copilot global hooks, OpenCode global plugin +
  AGENTS.md + MCP entry, VS Code global MCP config
2026-05-22 13:13:43 -04:00