Skip to content

Releases: JRedeker/opencode-morph-fast-apply

v1.8.2

07 Mar 22:37

Choose a tag to compare

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

06 Mar 21:43

Choose a tag to compare

Added

  • Packaged always-on instructioninstructions/morph-tools.md now ships with the plugin so OpenCode can load reliable morph_edit tool-selection guidance through the instructions array.
  • 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_edit selection.

v1.7.0

05 Mar 20:20

Choose a tag to compare

Changed

  • Self-contained tool description — All agent guidance (decision table, marker rules, disambiguation, fallback) is now embedded directly in the morph_edit tool 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_HINT export — Agents no longer need to load a skill before using morph_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

22 Feb 08:19

Choose a tag to compare

Added

  • Input normalization: normalizeCodeEditInput() strips markdown fences from LLM-wrapped code_edit to 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.after hook now shows branded titles like Morph: blocked (marker leakage) and Morph: 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_MARKER constant: 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 the EXISTING_CODE_MARKER constant

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. Only export default MorphFastApply remains.
  • Consistent formatting: Applied semicolons and trailing commas throughout for code style consistency

v1.3.0 - Pre-flight validation to prevent file corruption

25 Jan 22:08

Choose a tag to compare

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_edit is 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.md now 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 trunk

Then restart OpenCode to pick up the changes.

Full Changelog

https://github.com/JRedeker/opencode-morph-fast-apply#changelog