opencode-plugboard 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "opencode-plugboard",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
- "description": "Use the ChatGPT, Claude, Copilot and OpenCode Go logins in your OpenCode server from any app. An OpenCode V2 plugin serving OpenAI-compatible Chat Completions, Responses and model endpoints.",
6
+ "description": "Use the ChatGPT, Claude, Copilot and OpenCode Go logins in your OpenCode server from any app: an OpenCode V2 plugin serving OpenAI, Anthropic and Gemini compatible APIs.",
7
7
  "keywords": ["opencode", "opencode-plugin", "openai", "openai-compatible", "chat-completions", "responses-api", "llm-gateway", "llm-proxy"],
8
8
  "repository": {
9
9
  "type": "git",
@@ -14,15 +14,26 @@
14
14
  },
15
15
  "homepage": "https://github.com/jjjermiah/opencode-plugboard#readme",
16
16
  "main": "./index.ts",
17
+ "types": "./index.ts",
17
18
  "exports": {
18
- ".": "./index.ts",
19
- "./rpc": "./src/rpc.ts"
19
+ ".": { "types": "./index.ts", "default": "./index.ts" },
20
+ "./rpc": { "types": "./rpc.ts", "default": "./rpc.ts" },
21
+ "./tui": { "types": "./tui.ts", "default": "./tui.ts" }
22
+ },
23
+ "files": ["index.ts", "rpc.ts", "tui.ts", "src/", "README.md", "LICENSE"],
24
+ "engines": {
25
+ "bun": ">=1.4.2"
20
26
  },
21
- "files": ["index.ts", "src/", "README.md", "LICENSE"],
22
27
  "scripts": {
23
- "typecheck": "tsc --noEmit && tsc --noEmit -p test",
28
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.tui.json && tsc --noEmit -p test",
24
29
  "test": "bun test",
30
+ "bench": "bun test/bench/request.bench.ts",
31
+ "mutations": "bun .github/scripts/mutation-check.ts",
32
+ "flake-hunt": "bun .github/scripts/flake-hunt.ts",
33
+ "coverage-manifest": "bun .github/scripts/coverage-manifest.ts",
25
34
  "smoke:pack": "bun .github/scripts/smoke-pack.ts",
35
+ "docs:dev": "vitepress dev docs",
36
+ "docs:build": "vitepress build docs",
26
37
  "release": "bun .github/scripts/release.ts"
27
38
  },
28
39
  "dependencies": {
@@ -32,7 +43,8 @@
32
43
  "lru-cache": "11.5.3",
33
44
  "p-queue": "9.3.5",
34
45
  "pino": "10.4.0",
35
- "safe-stable-stringify": "2.5.0"
46
+ "safe-stable-stringify": "2.5.0",
47
+ "uplot": "1.6.32"
36
48
  },
37
49
  "devDependencies": {
38
50
  "@ai-sdk/anthropic": "4.0.78",
@@ -47,10 +59,13 @@
47
59
  "@langchain/google-genai": "2.3.2",
48
60
  "@langchain/openai": "1.6.2",
49
61
  "@opencode/plugin": "2.0.26",
62
+ "@opentui/core": "0.5.17",
63
+ "@opentui/solid": "0.5.17",
50
64
  "@types/bun": "1.4.2",
51
65
  "@types/escape-html": "^1.0.4",
52
66
  "@types/lcov-parse": "1.0.2",
53
67
  "@types/node": "^26.6.2",
68
+ "@types/semver": "7.8.0",
54
69
  "ai": "7.0.137",
55
70
  "ajv": "8.20.0",
56
71
  "conventional-commits-parser": "7.1.3",
@@ -60,11 +75,23 @@
60
75
  "fast-xml-parser": "5.11.2",
61
76
  "lcov-parse": "1.0.0",
62
77
  "lefthook": "2.2.1",
78
+ "mitata": "1.0.34",
63
79
  "openai": "7.32.0",
64
- "typescript": "^5.9.3"
80
+ "semver": "7.8.5",
81
+ "solid-js": "1.9.15",
82
+ "typescript": "^5.9.3",
83
+ "vitepress": "1.6.4"
65
84
  },
66
85
  "peerDependencies": {
67
86
  "@opencode/plugin": ">=2.0.26 <2.1",
68
- "effect": "4.0.0-rc.112"
87
+ "@opentui/core": ">=0.5.17",
88
+ "@opentui/solid": ">=0.5.17",
89
+ "effect": "4.0.0-rc.112",
90
+ "solid-js": ">=1.9.0"
91
+ },
92
+ "peerDependenciesMeta": {
93
+ "@opentui/core": { "optional": true },
94
+ "@opentui/solid": { "optional": true },
95
+ "solid-js": { "optional": true }
69
96
  }
70
97
  }
package/rpc.ts ADDED
@@ -0,0 +1,3 @@
1
+ // The `./rpc` entrypoint, at the package root for the same reason as `tui.ts`: a plugin configured
2
+ // by local path is resolved as `<directory>/rpc`, without `exports`.
3
+ export * from "./src/rpc.ts"
@@ -0,0 +1,209 @@
1
+ /* plugboard usage dashboard (#141). Mobile first; light and dark follow prefers-color-scheme. */
2
+ :root {
3
+ color-scheme: light dark;
4
+ --bg: #f6f7f9;
5
+ --fg: #1b1f24;
6
+ --muted: #5b6470;
7
+ --card: #ffffff;
8
+ --line: #d8dde3;
9
+ --accent: #2f6fdb;
10
+ --bad: #b42318;
11
+ }
12
+
13
+ @media (prefers-color-scheme: dark) {
14
+ :root {
15
+ --bg: #0e1116;
16
+ --fg: #e6edf3;
17
+ --muted: #9aa4b2;
18
+ --card: #161b22;
19
+ --line: #30363d;
20
+ --accent: #6ea8ff;
21
+ --bad: #ff7b72;
22
+ }
23
+ }
24
+
25
+ * {
26
+ box-sizing: border-box;
27
+ }
28
+
29
+ [hidden] {
30
+ display: none !important;
31
+ }
32
+
33
+ body {
34
+ margin: 0;
35
+ font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
36
+ background: var(--bg);
37
+ color: var(--fg);
38
+ }
39
+
40
+ header.top,
41
+ main {
42
+ max-width: 64rem;
43
+ margin: 0 auto;
44
+ padding: 0 0.75rem;
45
+ }
46
+
47
+ header.top {
48
+ padding-top: 1rem;
49
+ }
50
+
51
+ main {
52
+ padding-bottom: 2rem;
53
+ }
54
+
55
+ h1 {
56
+ font-size: 1.4rem;
57
+ margin: 0.25rem 0;
58
+ }
59
+
60
+ h2 {
61
+ font-size: 1.05rem;
62
+ margin: 1.5rem 0 0.5rem;
63
+ }
64
+
65
+ .muted {
66
+ color: var(--muted);
67
+ font-size: 0.9rem;
68
+ }
69
+
70
+ .error {
71
+ color: var(--bad);
72
+ }
73
+
74
+ .card {
75
+ background: var(--card);
76
+ border: 1px solid var(--line);
77
+ border-radius: 0.6rem;
78
+ padding: 0.9rem 1rem;
79
+ margin-top: 0.75rem;
80
+ }
81
+
82
+ input,
83
+ button {
84
+ font: inherit;
85
+ min-height: 2.5rem;
86
+ }
87
+
88
+ input {
89
+ flex: 1;
90
+ min-width: 0;
91
+ padding: 0.5rem 0.6rem;
92
+ border: 1px solid var(--line);
93
+ border-radius: 0.4rem;
94
+ background: var(--bg);
95
+ color: var(--fg);
96
+ }
97
+
98
+ button {
99
+ padding: 0.5rem 0.8rem;
100
+ border: 1px solid var(--line);
101
+ border-radius: 0.4rem;
102
+ background: var(--card);
103
+ color: var(--fg);
104
+ cursor: pointer;
105
+ }
106
+
107
+ button.primary,
108
+ button[aria-pressed="true"] {
109
+ background: var(--accent);
110
+ border-color: var(--accent);
111
+ color: #fff;
112
+ }
113
+
114
+ label {
115
+ display: block;
116
+ margin-bottom: 0.4rem;
117
+ }
118
+
119
+ form p {
120
+ margin-bottom: 0;
121
+ }
122
+
123
+ .row,
124
+ .toolbar {
125
+ display: flex;
126
+ gap: 0.5rem;
127
+ flex-wrap: wrap;
128
+ align-items: center;
129
+ }
130
+
131
+ .toolbar {
132
+ justify-content: space-between;
133
+ margin-top: 0.75rem;
134
+ }
135
+
136
+ .ranges {
137
+ display: flex;
138
+ gap: 0.25rem;
139
+ flex-wrap: wrap;
140
+ }
141
+
142
+ .cards {
143
+ display: grid;
144
+ grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
145
+ gap: 0.6rem;
146
+ }
147
+
148
+ .stat {
149
+ margin-top: 0;
150
+ display: flex;
151
+ flex-direction: column;
152
+ gap: 0.15rem;
153
+ }
154
+
155
+ .stat strong {
156
+ font-size: 1.35rem;
157
+ font-variant-numeric: tabular-nums;
158
+ }
159
+
160
+ .label {
161
+ color: var(--muted);
162
+ font-size: 0.85rem;
163
+ }
164
+
165
+ .scroll {
166
+ overflow-x: auto;
167
+ -webkit-overflow-scrolling: touch;
168
+ }
169
+
170
+ table {
171
+ width: 100%;
172
+ border-collapse: collapse;
173
+ font-variant-numeric: tabular-nums;
174
+ font-size: 0.92rem;
175
+ }
176
+
177
+ th,
178
+ td {
179
+ padding: 0.4rem 0.5rem;
180
+ border-bottom: 1px solid var(--line);
181
+ text-align: left;
182
+ white-space: nowrap;
183
+ vertical-align: top;
184
+ }
185
+
186
+ th.num,
187
+ td.num {
188
+ text-align: right;
189
+ }
190
+
191
+ td.wrap {
192
+ white-space: normal;
193
+ word-break: break-word;
194
+ }
195
+
196
+ th button {
197
+ padding: 0;
198
+ min-height: 0;
199
+ border: 0;
200
+ background: none;
201
+ color: inherit;
202
+ font-weight: 600;
203
+ }
204
+
205
+ .chart {
206
+ min-height: 220px;
207
+ margin-top: 0.5rem;
208
+ overflow: hidden;
209
+ }