mirror of
https://github.com/Heretek-AI/opencode-harness.git
synced 2026-11-07 18:36:04 -10:00
Upstream reference scripts (NOT applied to this repo)
This directory vendors reference-only patch scripts that target the
upstream opencode-2 repository (packages/core, v2.0.26). They are
never executed against this harness repo and never applied here.
apply_opencode_v2_core_fixes.bash
- Scope: upstream-only. Applies 5 surgical core-quality patches to a
checkout of
opencode-2v2.0.26 underpackages/core:src/plugin/optimize.ts— remove compaction hook contamination.src/plugin/identity.ts— remove compaction hook contamination.src/plugin/system-prompt/meta.txt— include${OPENCODE_TOOL_GUIDANCE}and calibrate the subagent threshold.src/session/compaction.ts— structured<recent-context>formatting (no[Assistant tool call]:hallucination).src/tool/plugin/edit.ts— strip accidental ReadTool line-number prefixes and support relative indent matching.
- NOT applied to this repo.
src/inopencode-harnessis untouched by this script. Do not run it without an explicit upstream target path. - Reference: carried over from the Gemini Argon review.
- Byte-identical vendored copy of the reviewed source artifact
(shebang +
set -euo pipefail+PYEOFheredoc preserved).
Usage
bash scripts/upstream/apply_opencode_v2_core_fixes.bash /path/to/opencode-2
The script exits non-zero unless /path/to/opencode-2/packages/core/src
exists, so running it bare inside this repo fails closed without changing
anything.