From 354b92c156c20a38da8fa0326d49da2f74c47793 Mon Sep 17 00:00:00 2001 From: whatruon Date: Thu, 27 Aug 2026 19:46:29 +0300 Subject: [PATCH 1/2] fix: use 'plugins' (plural) config key instead of deprecated 'plugin' --- README.md | 4 ++-- opencode.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fa5b9ef..a629c12 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Add to your `opencode.json`: ```json { "$schema": "https://opencode.ai/config.json", - "plugin": ["opencode-throughput"] + "plugins": ["opencode-throughput"] } ``` @@ -89,7 +89,7 @@ The plugin hooks into OpenCode's event system: ```json { - "plugin": ["file:///absolute/path/to/opencode-throughput/src/index.ts"] + "plugins": ["file:///absolute/path/to/opencode-throughput/src/index.ts"] } ``` diff --git a/opencode.json b/opencode.json index 720ece5..4893b2a 100644 --- a/opencode.json +++ b/opencode.json @@ -1,3 +1,4 @@ { - "$schema": "https://opencode.ai/config.json" + "$schema": "https://opencode.ai/config.json", + "plugins": ["./src/index.ts"] } From d76aabceda7604b770eab7d3d4fb6f709ac9a043 Mon Sep 17 00:00:00 2001 From: whatruon Date: Thu, 27 Aug 2026 20:03:39 +0300 Subject: [PATCH 2/2] fix: publish correct function-style plugin (dist entry, version bump) - package.json: point main/exports to ./dist/index.js and ship dist/ in files so the published tarball exports the Plugin factory, not a stray TUI module - bump version to 2.2.0 (published 2.1.0 exported an invalid {id, tui} SolidJS component that OpenCode silently skips) --- opencode.json | 2 +- package.json | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/opencode.json b/opencode.json index 4893b2a..50a8268 100644 --- a/opencode.json +++ b/opencode.json @@ -1,4 +1,4 @@ { "$schema": "https://opencode.ai/config.json", - "plugins": ["./src/index.ts"] + "plugins": ["file:///tmp/opencode/opencode-throughput/src/index.ts"] } diff --git a/package.json b/package.json index 600ea46..840406f 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,14 @@ { "name": "opencode-throughput", - "version": "1.2.0", + "version": "2.2.0", "description": "Real-time LLM performance monitoring plugin for OpenCode. Tracks TTFT, TPS, latency, token usage and cost per model with toast notifications and JSONL logging.", "type": "module", - "main": "./src/index.ts", + "main": "./dist/index.js", "exports": { - ".": "./src/index.ts", - "./plugins/*": "./src/plugins/*" + ".": "./dist/index.js" }, "files": [ - "src" + "dist" ], "scripts": { "build": "bun build src/index.ts --outdir dist --target node",