Skip to content

feat: live stack-state injection via agent harness hook (#304) - #306

Draft
aarontrowbridge wants to merge 1 commit into
mainfrom
304-feat-live-stack-state-injection-via-agent-harness-hook
Draft

feat: live stack-state injection via agent harness hook (#304)#306
aarontrowbridge wants to merge 1 commit into
mainfrom
304-feat-live-stack-state-injection-via-agent-harness-hook

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

Implements #304.

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.

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 hook
  • src/opencode_config.ts — solver/routing no longer appended to AGENTS.md; buildOpencodeConfigContent accepts extraPluginPaths
  • src/extension.ts — boot + solver-switch register the context plugin; solver-switch projectDir asymmetry fixed
  • ~/.amico/server/opencode-config-content.json — context plugin registered for launchd server
  • packages/extension/AGENTS.md — recovery pointer so the agent can self-heal if the hook fails

Verification: typecheck clean, all 908 tests pass (85 test files).

@aarontrowbridge aarontrowbridge linked an issue Aug 9, 2026 that may be closed by this pull request
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.
@aarontrowbridge
aarontrowbridge force-pushed the 304-feat-live-stack-state-injection-via-agent-harness-hook branch from a91ada6 to a37166a Compare August 20, 2026 08:48
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0a6e383d-2866-4372-9c8b-6b76a635c686

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: live stack-state injection via agent harness hook

1 participant