[PR #213] [MERGED] feat(opencode): an OpenCode 2 plugin with one um tool and the fal MCP server #217

Closed
opened 2026-10-15 20:54:26 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rehan-remade/universal-modder/pull/213
Author: @Selene0623
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/11/2026
Merged by: @rehan-remade

Base: main ← Head: feat/opencode-plugin


📝 Commits (4)

  • bbb2600 feat(opencode): install path that is a plugin, not a clone
  • 79d160a opencode plugin: review fixes
  • 133593a opencode plugin: leave opencode.json alone
  • 1b6e9b1 Merge remote-tracking branch 'origin/main' into land/pr-213

📊 Changes

5 files changed (+271 additions, -2 deletions)

View changed files

📝 README.md (+7 -2)
➕ plugins/opencode/README.md (+54 -0)
➕ plugins/opencode/index.ts (+161 -0)
➕ plugins/opencode/package.json (+12 -0)
➕ tests/test_opencode_plugin.py (+37 -0)

📄 Description

Closes the ask in #144: OpenCode was the only agent in the README's install table with no real install path (clone-and-run). This adds one.

What's in it

  • plugins/opencode/ — tracked in the repo, so it moves with the CLI:
    • index.ts — the plugin: one passthrough tool (um_run) and the fal MCP registration.
    • package.json, README.md.
  • opencode.json — "plugins": ["./plugins/opencode"], so a clone still works unchanged.
  • README.md — the OpenCode install row now has the opencode plugin add line, plus a paragraph on what the plugin adds.
  • tests/test_opencode_plugin.py — asserts the group list in index.ts against GROUPS in um/cli.py.

The four answers from #144

  1. In this repo — plugins/opencode/, tracked, next to the CLI it drives.
  2. One passthrough tool. The plugin exposes um_run with an args array (and an optional cwd):
    ["scan"], ["scan", "--help"], ["kb", "search", "disrupt"], ["backup", "create"]. The tool
    description names the groups; a typo answers with the group list without spawning anything. The group
    list lives in the plugin only so it can be named and checked, and the test keeps it honest.
  3. Tools only. No /mod-game command and no ctx.skill.transform in this PR. Skills still arrive
    through skills.paths, as before.
  4. The check is kept (tests/test_opencode_plugin.py), so the next missed group fails a test.

The tool shells out to the same launcher a human would use — bin/um if the plugin sits inside a
checkout, otherwise um from PATH, overridable with options.root / options.command. The CLI is never
reimplemented.

Verification

  • node --experimental-strip-types --check plugins/opencode/index.ts — clean.
  • Harness with a stub @opencode/plugin: registers namespace um + tool um_run, registers the fal
    MCP entry, and three real invocations through the tool: um scan --help, um kb search disrupt,
    um scna → unknown group "scna". Groups: scan, fal, comfy, sprite, render3d, video, win, backup, publish, kb. …
  • uv run --with pytest pytest -q tests → 89 passed, 1 skipped (the new test included).
  • um kb check --index → PASS: 157 notes.
  • um publish check . → 476 files, 0 failures, 2 warnings (both pre-existing absolute-user-path
    warnings in other people's notes).

Supersedes the earlier branch of the same name, which was based on a 44-commit-stale main; this one is
off current main (5506516).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rehan-remade/universal-modder/pull/213 **Author:** [@Selene0623](https://github.com/Selene0623) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@rehan-remade](https://github.com/rehan-remade) **Base:** `main` ← **Head:** `feat/opencode-plugin` --- ### 📝 Commits (4) - [`bbb2600`](https://github.com/rehan-remade/universal-modder/commit/bbb2600282e1a2cec8a9615158b32b0b65b70401) feat(opencode): install path that is a plugin, not a clone - [`79d160a`](https://github.com/rehan-remade/universal-modder/commit/79d160a89862f5e199ca3a49dace7ff5995a1e1f) opencode plugin: review fixes - [`133593a`](https://github.com/rehan-remade/universal-modder/commit/133593a9528fca1d4951db851f0f6fdf5872d0c5) opencode plugin: leave opencode.json alone - [`1b6e9b1`](https://github.com/rehan-remade/universal-modder/commit/1b6e9b19a9e5a3060c354e321df8045dcf859826) Merge remote-tracking branch 'origin/main' into land/pr-213 ### 📊 Changes **5 files changed** (+271 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+7 -2) ➕ `plugins/opencode/README.md` (+54 -0) ➕ `plugins/opencode/index.ts` (+161 -0) ➕ `plugins/opencode/package.json` (+12 -0) ➕ `tests/test_opencode_plugin.py` (+37 -0) </details> ### 📄 Description Closes the ask in #144: OpenCode was the only agent in the README's install table with no real install path (clone-and-run). This adds one. ## What's in it - **`plugins/opencode/`** — tracked in the repo, so it moves with the CLI: - `index.ts` — the plugin: one passthrough tool (`um_run`) and the fal MCP registration. - `package.json`, `README.md`. - **`opencode.json`** — `"plugins": ["./plugins/opencode"]`, so a clone still works unchanged. - **`README.md`** — the OpenCode install row now has the `opencode plugin add` line, plus a paragraph on what the plugin adds. - **`tests/test_opencode_plugin.py`** — asserts the group list in `index.ts` against `GROUPS` in `um/cli.py`. ## The four answers from #144 1. **In this repo** — `plugins/opencode/`, tracked, next to the CLI it drives. 2. **One passthrough tool.** The plugin exposes `um_run` with an `args` array (and an optional `cwd`): `["scan"]`, `["scan", "--help"]`, `["kb", "search", "disrupt"]`, `["backup", "create"]`. The tool description names the groups; a typo answers with the group list without spawning anything. The group list lives in the plugin only so it can be named and checked, and the test keeps it honest. 3. **Tools only.** No `/mod-game` command and no `ctx.skill.transform` in this PR. Skills still arrive through `skills.paths`, as before. 4. **The check is kept** (`tests/test_opencode_plugin.py`), so the next missed group fails a test. The tool shells out to the same launcher a human would use — `bin/um` if the plugin sits inside a checkout, otherwise `um` from PATH, overridable with `options.root` / `options.command`. The CLI is never reimplemented. ## Verification - `node --experimental-strip-types --check plugins/opencode/index.ts` — clean. - Harness with a stub `@opencode/plugin`: registers namespace `um` + tool `um_run`, registers the `fal` MCP entry, and three real invocations through the tool: `um scan --help`, `um kb search disrupt`, `um scna` → `unknown group "scna". Groups: scan, fal, comfy, sprite, render3d, video, win, backup, publish, kb. …` - `uv run --with pytest pytest -q tests` → **89 passed, 1 skipped** (the new test included). - `um kb check --index` → **PASS: 157 notes**. - `um publish check .` → **476 files, 0 failures, 2 warnings** (both pre-existing absolute-user-path warnings in other people's notes). Supersedes the earlier branch of the same name, which was based on a 44-commit-stale `main`; this one is off current `main` (`5506516`). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 20:54:26 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rehan-remade/universal-modder#217
No description provided.