refactor(opencode): update plugin templates for v1 hooks#159
Open
Adamcf123 wants to merge 9 commits intomindfold-ai:mainfrom
Open
refactor(opencode): update plugin templates for v1 hooks#159Adamcf123 wants to merge 9 commits intomindfold-ai:mainfrom
Adamcf123 wants to merge 9 commits intomindfold-ai:mainfrom
Conversation
e95a380 to
0ad9470
Compare
0ad9470 to
87b7ced
Compare
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
Updates the OpenCode plugin templates under
packages/cli/src/templates/opencode/to match the current v1 plugin API and remove outdated OMO assumptions.Adds a follow-up fix so template
session-startcontext is deduped using OpenCode-managed session history instead of process-local or temp-file state, which prevents reinjection after reopening the same session.Changes
export default { id, server })idfields to the template pluginstrellis-context.jstasktool prompt mutation pattern in the templateinject-subagent-context.jsby using in-placeargs.prompt = newPromptsession-start.jsinjection flow to usechat.messageoutput mutation instead of the non-persistentexperimental.chat.messages.transformpathContextCollectorby removing unused cross-hook methodssession-startdedupe by checking persisted session history through the OpenCode SDKScope
packages/cli/src/templates/opencode/lib/trellis-context.jspackages/cli/src/templates/opencode/plugins/inject-subagent-context.jspackages/cli/src/templates/opencode/plugins/session-start.jspackages/cli/test/templates/opencode.test.tsVerification
pnpm lintpassespnpm typecheckpassespnpm testpasses