Repository navigation
feat(opencode): report from opencode 2 through the module's default export - #98
Merged
Merged
Conversation
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
opencode 2 loads plugins through a new door and renamed every event the card reads, so under it an opencode card had no spinner, ring, bell or title.
opencode/lich.jsnow serves both generations from one file:LichPlugin, now also reached through the default export'sserver(). 1.18.23 and 1.19.4 initialize it once per run with both exports present.idandsetup(ctx). The reports ridesession.execution.started(session start, then busy),session.execution.succeeded,failedandinterrupted(done),session.renamed(title),permission.asked(waiting, reason =action),ctx.tool.hook("execute.before")(tool line) andwrite,editandpatchfinishing (touched).ctx.session.getand dropped when it has aparentID.setup(), with a context that has neithereventnorsession; the 2.x half stands down there, and outside lich.opencode 2 reads global plugins from
~/.config/opencode/plugins/only. The companion lich change installs the module there and removes the copy an older lich left inplugin/(lichdotdev/lich,feat/opencode-2).No endpoint, field or accepted value changes: this is a patch release (0.20.9), inside the range every current lich installs.
Test plan
node --test tests/*.test.mjs: 481 pass, including the newtests/opencode2.test.mjsdriven by event payloads taken off a probe plugin underopencode run --standalone2.2.5.plugins/and inplugin/:LichPlugininitializes once per run,setup()returns without subscribing.@opencode/pluginimport) loads, sees the spawn's environment, andctx.session.getreturnsparentIDfor asubagentchild.