feat: live stack-state injection via agent harness hook (#304) - #306
Draft
aarontrowbridge wants to merge 1 commit into
Draft
feat: live stack-state injection via agent harness hook (#304)#306aarontrowbridge wants to merge 1 commit into
aarontrowbridge wants to merge 1 commit into
Conversation
Adds a second opencode plugin (amicode_context.ts) implementing experimental.chat.system.transform that reads solver mode, routing, active problem, and live runs on every prompt build and injects them as the final system[] entry. - opencode-plugin/stack_state.ts — standalone state readers + builders - opencode-plugin/amicode_context.ts — system.transform hook plugin - src/opencode_config — removed solver/routing from file splice; buildOpencodeConfigContent accepts extraPluginPaths param - src/extension.ts — registers context plugin in boot + solver-switch; fixes mkdtemp asymmetry in solver-switch re-prep - AGENTS.md — one-line recovery pointer appended Closes #304.
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.
Implements #304.
Adds a second opencode plugin (
amicode_context.ts) implementingexperimental.chat.system.transformthat reads solver mode, routing, active problem, and live runs on every prompt build and injects them as the finalsystem[]entry.Key changes:
opencode-plugin/stack_state.ts— standalone state readers + markdown builders (node-builtins only for Bun runtime)opencode-plugin/amicode_context.ts— new plugin, single export, one hooksrc/opencode_config.ts— solver/routing no longer appended to AGENTS.md;buildOpencodeConfigContentacceptsextraPluginPathssrc/extension.ts— boot + solver-switch register the context plugin; solver-switchprojectDirasymmetry fixed~/.amico/server/opencode-config-content.json— context plugin registered for launchd serverpackages/extension/AGENTS.md— recovery pointer so the agent can self-heal if the hook failsVerification: typecheck clean, all 908 tests pass (85 test files).