Asia/Shanghai
ProjectsMay 7, 2026

opencode-plugin-fixes

image
Archived historical project. The repository is read-only. opencode-plugin-fixes was never published to npm, so it is not a valid OpenCode package entry.
opencode-plugin-fixes is a small dependency-free source bundle for OpenCode. It explores four boring but expensive tool-call failure modes: malformed question arguments, over-broad MCP object coercion, DCP compress range payload shape failures, and repeated question prompts while the user is still answering.
  • FixQuestionSchema - normalizes stringified questions, bare question objects, and stringified options before OpenCode validates the question tool call.
  • FixMcpNestedObject - parses only selected schema-like MCP fields such as metadata, arguments, and queries, while leaving JSON-looking file bodies and user content untouched.
  • FixDcpCompressFlat - accepts flat DCP range payloads such as { topic, startId, endId, summary }, parses stringified native range arrays, and restores DCP's native content: [{ startId, endId, summary }] shape.
  • BlockRepeatQuestion - holds a per-session lock so (no answer) placeholders do not trigger retry spam before the user replies.
Frontier models usually call tools correctly. When they do not, the failure is often just one level of JSON stringification or one nested array away from valid input. The source bundle fixes that narrow, recoverable class without pretending every malformed call is safe to rewrite. The DCP guardrail exists because compress range mode expects content: [{ startId, endId, summary }]. Some models reliably preserve the same information as flat fields, but keep breaking the array shape. FixDcpCompressFlat restores the native shape before validation while leaving native nested calls unchanged. The repeat-question blocker addresses a separate UI behavior: OpenCode can render (no answer) while the user is still typing. Some models read that as a decline and ask again. The plugin turns that into an explicit stop condition. The final main branch preserves all four guardrails for reference, but the project is no longer maintained or part of the author's OpenCode setup. No npm package was published. Do not add "opencode-plugin-fixes" to OpenCode's plugin array. The initial v0.1.0 tag predates FixDcpCompressFlat; the fourth guardrail exists only in the final archived source tree. The final archived source tree can be checked with:
Bash
npm test
npm pack --dry-run
The driver exercises all four hooks end-to-end, including the regression that arbitrary JSON-looking filesystem_write_file.content must remain unchanged.
opencode-plugin-fixes 是一组零依赖 OpenCode 插件,用来保护长上下文 agent 运行中最烦人的四类小故障:question 参数形状错误、MCP nested object 被字符串化、DCP compress 的 range 参数形状失败、以及用户还没回答完时模型反复追问。 它不会泛化地重写所有 JSON-looking 字符串;FixMcpNestedObject 只处理明确的 schema-like 字段,避免把文件正文、命令或用户内容误解析成对象。新增的 FixDcpCompressFlat 也只碰 compress 工具,把 flat { topic, startId, endId, summary } 还原成 DCP 原生的 content 数组形态。 本项目已经归档,不再维护,也不属于作者当前的 OpenCode 配置。npm 包从未发布,"opencode-plugin-fixes" 不是可用的 package entry。最终 main 分支保留四个护栏;初始 v0.1.0 tag 只有前三个,FixDcpCompressFlat 是后续补入的源码。

Related projects

Clean Design

Clean Design

A local-first visual creation studio for Apple Silicon Macs, powered by the AI tools you already use.
Codex Minus

Codex Minus

面向 macOS 与 Windows 的精简 Codex 管理工具:安全切换供应商,管理官方与自定义模型目录,并保护 OAuth 与 Context。
JumpOTP

JumpOTP

面向授权 SSH/JumpServer 会话的按需 TOTP 助手。仅在严格匹配提示后调用已解锁的 Bitwarden CLI,每条连接最多自动提交一次,并保留可见手输回退。
Codex Doubao Pets

Codex Doubao Pets

六个可以直接安装到 Codex Desktop 的豆包桌宠。用真实角色图完成选择,用一条 npm 命令完成安装。
loop

loop

一次显式触发,按产物就绪状态自动连接 deep-grill、deep-design 和 deep-build,持续推进到已确认规格或可验证结果。
Slash Saver

Slash Saver

一个只为物理斜杠键做一件事的原生 macOS 工具:在原始按键进入当前应用前,切到用户指定的 ASCII 输入源。
deep-grill

deep-grill

同一个 Agent Skill,用探索模式把原始想法变成已确认 Product Brief,用审查模式压力测试成形方案,并在普通回复中持续当前会话。
Mingjian AI Services

Mingjian AI Services

A focused collaboration entry for teams moving from AI ideas to working products, Agent systems, and operable business workflows.
opencode-sub2api-haiku-fix

opencode-sub2api-haiku-fix

A focused OpenCode plugin that fixes Claude Haiku extra-usage failures through Sub2API while preserving thinking and leaving Sub2API, OpenCode, and OMO untouched.
opencode-metrics

opencode-metrics

OpenCode TUI 的分会话侧边栏指标插件。按 sessionID 记录速度、TTFT、token、缓存、计时,只显示你当前 attach 的会话,而不是 serve 模式下的全局汇总。
opencode-vibe-island-plugin

opencode-vibe-island-plugin

让 Vibe Island 在装了 oh-my-openagent 时仍然把 OpenCode 会话当成 OpenCode。修好 source 误标和 Ghostty 点击跳转。
OpenCode Themes

OpenCode Themes

Terminal-inspired dark themes for Obsidian, Typora, and Ghostty, all synced to the official OpenCode TUI palette.
wechat-mp-publisher

wechat-mp-publisher

从个人公众号 Skill 到可公开安装的 npm 包:本地校验与沙箱预览在前,用户确认后只创建草稿。
SIGINT

SIGINT

已归档的内容情报实验:曾把小红书/抖音采集、AI 分析、n8n 编排与实时仪表盘接成一条完整链路。
MdictLive

MdictLive

Modern web reader for MDict dictionaries with React 19 SPA, dark mode, and faithful rendering.
SiliconLM

SiliconLM

Local LLM dashboard for Apple Silicon Macs, currently preserved without an active local deployment.
mdx2apple

mdx2apple

Convert MDict (.mdx/.mdd) dictionaries to macOS Apple Dictionary format with one command.