Releases: JRedeker/opencode-morph-fast-apply
Releases · JRedeker/opencode-morph-fast-apply
v1.8.2
docs: add tool exposure requirement for agent manifests morph_edit routing policy requires both the always-on instruction AND tool manifest exposure. Document this in instructions/morph-tools.md, README installation section, and test assertions. Also gitignore ADV plugin artifacts and lockfiles.
v1.8.0
Added
- Packaged always-on instruction —
instructions/morph-tools.mdnow ships with the plugin so OpenCode can load reliablemorph_edittool-selection guidance through theinstructionsarray. - Packaging coverage — package metadata now includes the
instructions/directory and tests verify the shipped instruction path is documented.
Changed
- Installation docs now recommend adding the packaged always-on instruction to global OpenCode config for more reliable
morph_editselection.
v1.7.0
Changed
- Self-contained tool description — All agent guidance (decision table, marker rules, disambiguation, fallback) is now embedded directly in the
morph_edittool description. No external skill or instructions file needed.
Removed
- Skill pattern — Deleted
skills/morph/SKILL.md. The skill added a round-trip and split-brain problem where guidance lived in multiple places. - Legacy instructions — Deleted
MORPH_INSTRUCTIONS.md. Redundant with the tool description; the README serves as human-readable docs. MORPH_SKILL_LOAD_HINTexport — Agents no longer need to load a skill before usingmorph_edit.
Migration
If you previously referenced MORPH_INSTRUCTIONS.md in your instructions config array, remove it — the tool description is now self-contained. If you installed the morph skill to ~/.config/opencode/skills/morph/, you can delete that directory.
v1.6.0
Added
- Input normalization:
normalizeCodeEditInput()strips markdown fences from LLM-wrappedcode_editto prevent Morph API confusion - Marker leakage guard: Post-merge validation detects when Morph treats
// ... existing code ...markers as literal text instead of expanding them — aborts file write and returns actionable error - Catastrophic truncation guard: Dual-metric validation (>60% char loss AND >50% line loss) prevents silent data loss from failed merges
- Structured error recovery: Guard failures include specific metrics, explanations, and 3 actionable recovery options
- TUI titles for guard failures:
tool.execute.afterhook now shows branded titles likeMorph: blocked (marker leakage)andMorph: blocked (truncation) - Test suite: 32 tests covering normalization, marker leakage logic, and truncation detection edge cases
- CI: GitHub Actions for test/typecheck on push and automated releases on tags
Changed
EXISTING_CODE_MARKERconstant: Extracted to module-level constant (no longer exported) for consistency and testability- Guard logging: Both post-merge guards emit diagnostic
warn-level logs before returning errors - Hardcoded marker strings: All references to
"// ... existing code ..."now use theEXISTING_CODE_MARKERconstant
Fixed
- Plugin loader crash: Removed unnecessary named exports (
EXISTING_CODE_MARKER,normalizeCodeEditInput,MorphFastApply) that caused OpenCode's plugin loader to crash when iterating exports and calling a string as a function. Onlyexport default MorphFastApplyremains. - Consistent formatting: Applied semicolons and trailing commas throughout for code style consistency
v1.3.0 - Pre-flight validation to prevent file corruption
Breaking Fix: Addresses file corruption reports from agents
This release fixes the issue where agents would report:
"File corruption during morph_edit - The test file appears to have lost code during the edit operations"
What's New
- Pre-flight validation prevents accidental deletions - Tool now returns an error if
code_editis missing markers for files >10 lines, preventing catastrophic code loss - Improved code_edit parameter description - Changed from "Only the changed lines" to "The code changes wrapped with markers" to emphasize wrapping
- Added explicit wrapping rule - Tool description now includes "ALWAYS wrap your changes with markers at the start AND end"
- Restored comprehensive examples -
MORPH_INSTRUCTIONS.mdnow includes all key examples (adding functions, modifying code, deletions) - Added Quick Reference - Aligned with Morph's official agent instructions format
- Added fetch timeout example - From official Morph documentation
Upgrade
cd /path/to/opencode-morph-fast-apply
git pull origin trunkThen restart OpenCode to pick up the changes.
Full Changelog
https://github.com/JRedeker/opencode-morph-fast-apply#changelog