Skip to content

OpenCode plugin 0.2.0 (OpenCode 2.x support)

Choose a tag to compare

@wojciechwiesner wojciechwiesner released this 23 Oct 22:39
· 1 commit to master since this release

OpenCode plugin for JIT Context OS, now compatible with OpenCode 2.x.

Install (OpenCode 2.x)

mkdir -p ~/.config/opencode/plugins
curl -fsSL -o ~/.config/opencode/plugins/jit-context.js \
  https://github.com/wojciechwiesner/jit-context/releases/download/opencode-v0.2.0/jit-context-opencode-v2.js
opencode plugin list   # shows: jit-context  local

OpenCode 1.x: use jit-context-opencode-v1.js instead (unchanged V1 entry).

Added

  • V2 entry ({ id, setup }). Tools get_jit_context, record_jit_observation and get_project_state are registered via ctx.tool.transform with JSON Schema inputs. Nothing from effect or @opencode/plugin is needed at runtime.
  • The capsule is injected via the session context hook. The edit trail is recorded via tool execute.after, including V2 FileDiff metadata.

Fixed

  • OpenCode 2.x rejected the V1 module. Plugin activation never finished and every server request returned 503.

Verification

  • CI green on the release commit (typecheck + 24 tests + build).
  • A real opencode run on OpenCode 2.1.4 called get_project_state, which returned status completed with the correct STATE.md heading.

Checksums: SHA256SUMS.txt.