Skip to content

Commit 0a1051a

Browse files
chore: sync version constant, backfill changelog, bump deps
Audit fixes for staleness found at v2.0.15: - PLUGIN_VERSION in index.ts was hardcoded "2.0.0" and never tracked package.json, so the startup log and morph_edit tool metadata reported 2.0.0 on every release since 2.0.0. Synced to 2.0.15 and updated release.yml to rewrite the constant during each version bump. Build now runs after the bump (so dist ships the correct value) and the commit includes index.ts; a grep guard fails the release if the sync misses. - CHANGELOG was stuck at 2.0.3 with an empty [Unreleased]. Backfilled accurate entries for 2.0.4-2.0.15 from the tagged history. - Dependencies were far behind: @morphllm/morphsdk 0.2.173 -> 0.2.180, and @opencode-ai/sdk + @opencode-ai/plugin -> ^1.17.7 (were ^1.2.22 and "latest", both frozen at 1.2.22 in the lockfiles). Regenerated bun.lock and package-lock.json. - README compaction note no longer pins a single OpenCode minor (1.14.x -> 1.14+). Typecheck, build, and the full 67-test suite pass on the bumped deps. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent aac111a commit 0a1051a

7 files changed

Lines changed: 3142 additions & 134 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ jobs:
5151
- name: Typecheck
5252
run: bun run typecheck
5353

54-
- name: Build
55-
run: bun run build
56-
57-
- name: Bump version
54+
- name: Bump version & sync plugin constant
5855
id: version
5956
run: |
6057
git config --global user.name "github-actions[bot]"
@@ -67,7 +64,21 @@ jobs:
6764
NEW_VERSION=$(node -p "require('./package.json').version")
6865
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
6966
70-
git add package.json
67+
# Keep the PLUGIN_VERSION constant in index.ts in sync with package.json
68+
# so logs and tool metadata report the real version (was frozen at 2.0.0
69+
# because the bump only touched package.json). Build runs after this.
70+
sed -i -E "s/(const PLUGIN_VERSION = \")[^\"]*(\";)/\1${NEW_VERSION}\2/" index.ts
71+
grep -q "const PLUGIN_VERSION = \"${NEW_VERSION}\";" index.ts || {
72+
echo "::error::Failed to sync PLUGIN_VERSION in index.ts to ${NEW_VERSION}"; exit 1;
73+
}
74+
75+
- name: Build
76+
run: bun run build
77+
78+
- name: Commit, tag & push
79+
run: |
80+
NEW_VERSION="${{ steps.version.outputs.new_version }}"
81+
git add package.json package-lock.json index.ts
7182
git commit -m "chore: bump to $NEW_VERSION [skip ci]"
7283
git tag -f "v$NEW_VERSION"
7384
git push origin main --tags --force

CHANGELOG.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,101 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- **Plugin version reporting**`PLUGIN_VERSION` was hardcoded at `2.0.0` and never tracked `package.json`, so the startup log (`Plugin vX loaded`) and `morph_edit` tool metadata reported `2.0.0` on every release since 2.0.0. Synced to the current version, and the release workflow now rewrites the constant during each version bump (and builds afterward) so `dist` ships the correct value.
13+
14+
### Changed
15+
16+
- **Dependencies**`@morphllm/morphsdk` 0.2.173 → 0.2.180; `@opencode-ai/sdk` and `@opencode-ai/plugin``^1.17.7` (previously `^1.2.22` and `latest`, both frozen at 1.2.22 in the lockfiles, ~15 minor versions behind OpenCode). Regenerated `bun.lock` and `package-lock.json`. Typecheck, build, and the full 67-test suite pass on the new versions.
17+
18+
### Documentation
19+
20+
- Backfilled changelog entries for 2.0.4 – 2.0.15.
21+
- Compaction note in the README no longer pins a single OpenCode minor (`1.14.x``1.14+`).
22+
23+
## [2.0.15] - 2026-06-17
24+
25+
### Fixed
26+
27+
- **Compaction is effective again** — the transform hook now mutates `output.messages` in place; previously it reassigned `output.messages`, which OpenCode ignored (it reads `msgs`, not `output`), so compaction was effectively a no-op. (#19)
28+
- **Per-session compaction state** — compaction state and the force-compact flag are now keyed by `sessionID` (a `Map`) instead of module-level globals. Previously, once a parent session compacted, subagents spawned via the `task` tool could be rehydrated with the parent's frozen block and answer the parent's topic instead of their own prompt. (#19)
29+
- **Threshold accounting** — reasoning tokens count toward the compaction trigger threshold but are dropped from the compaction input. (#19)
30+
31+
### Added
32+
33+
- **`/morph compact` slash command** — manually force compaction on the next transform for the current session; the LLM reply is silenced after a forced compaction. (#19)
34+
35+
## [2.0.14] - 2026-06-17
36+
37+
### Fixed
38+
39+
- **WarpGrep on Bun**`await` the async-generator return value in `warpgrep_codebase_search`. The SDK generator returns a Promise that Node auto-awaits but Bun does not, so results surfaced as `Search failed: search returned no error details.` (#24, #25)
40+
41+
## [2.0.13] - 2026-06-02
42+
43+
### Added
44+
45+
- **API key via OpenCode config**`morph.apiKey` can be set in `opencode.json` instead of the `MORPH_API_KEY` env var (the env var still takes precedence). (#11, #22)
46+
47+
## [2.0.12] - 2026-06-02
48+
49+
### Changed
50+
51+
- **Track `bun.lock` in version control** — it was gitignored, so the SDK bump in #20 only updated `package-lock.json`; bun users now get the pinned dependency tree too. (#21)
52+
53+
## [2.0.11] - 2026-06-02
54+
55+
### Fixed
56+
57+
- **WarpGrep failures** — bumped `@morphllm/morphsdk` to the latest release to fix WarpGrep. (#9, #20)
58+
59+
## [2.0.10] - 2026-06-01
60+
61+
### Fixed
62+
63+
- **OpenCode native compaction events** — handle OpenCode's `session.compacted` event and add Morph-aware instructions so the selected history is pre-compressed before OpenCode writes its persisted summary. (#13, #17)
64+
65+
## [2.0.9] - 2026-03-30
66+
67+
### Fixed
68+
69+
- **WarpGrep result robustness** — detect malformed WarpGrep results and harden error formatting; replace Windows-specific detection with general path validation. (#8)
70+
71+
### Changed
72+
73+
- Bumped `@morphllm/morphsdk` to 0.2.160.
74+
75+
## [2.0.8] - 2026-03-23
76+
77+
### Fixed
78+
79+
- **Fast Apply** — use `instruction` (singular) for the `applyEdit` call to match the SDK.
80+
81+
## [2.0.7] - 2026-03-19
82+
83+
### Changed
84+
85+
- **README rewrite** — setup, compaction configuration, and log-verification guidance.
86+
87+
## [2.0.6] - 2026-03-18
88+
89+
### Fixed
90+
91+
- **Compaction triggering** — compaction now triggers correctly and supports a fixed token limit via `MORPH_COMPACT_TOKEN_LIMIT`.
92+
93+
## [2.0.5] - 2026-03-16
94+
95+
### Changed
96+
97+
- **CI** — added a build step to the CI workflow.
98+
99+
## [2.0.4] - 2026-03-16
100+
101+
### Changed
102+
103+
- **Release pipeline** — switched npm publishing to OIDC trusted publishing with automatic version bumping.
104+
10105
## [2.0.3] - 2026-03-16
11106

12107
### Fixed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ You should see `morph_edit`, `warpgrep_codebase_search`, and `warpgrep_github_se
6969

7070
## Compaction
7171

72-
Context compression via the Morph Compact API. In current OpenCode 1.14.x releases, only OpenCode native compaction writes the persisted summary message that future turns and the sidebar use. This plugin handles that path by pre-compressing the selected history with Morph before OpenCode's native compaction model writes its summary.
72+
Context compression via the Morph Compact API. In current OpenCode releases (1.14+), only OpenCode native compaction writes the persisted summary message that future turns and the sidebar use. This plugin handles that path by pre-compressing the selected history with Morph before OpenCode's native compaction model writes its summary.
7373

7474
### How it works
7575

0 commit comments

Comments
 (0)