opencode-self-improvement 0.15.29 → 0.15.30

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/README.md CHANGED
@@ -83,6 +83,7 @@ Zero configuration is the default. To tune, use the object form of the plugin en
83
83
  | `OPENCODE_MEMORY_FRONTIER_BUDGET` | Fallback for `frontierBudget`. |
84
84
  | `OPENCODE_COMMANDS_DIR` | Where the plugin mirrors its slash commands (default `~/.config/opencode/commands`). |
85
85
  | `OPENCODE_CBM_BIN` | Path to a `codebase-memory-mcp` binary. See [Code graph](#code-graph-optional). |
86
+ | `OPENCODE_VIEWER_HOST` | Interface the editor binds to (default `127.0.0.1`). A non-loopback bind serves the store over plain HTTP with no authentication — only do it on a network you control. See [Surfaces](#surfaces). |
86
87
  | `OPENCODE_VIEWER_PORT` | Admin editor port (default `8787`). |
87
88
  | `OPENCODE_VIEWER_ALLOWED_HOSTS` | Comma-separated hosts beyond loopback. See [Surfaces](#surfaces). |
88
89
 
@@ -326,6 +327,8 @@ bun run format # apply the shared two-space TypeScript/TSX style
326
327
  bun run format:check # check formatting without changing files
327
328
  ```
328
329
 
330
+ `bun run typecheck` runs `tsc --noEmit` on its own. In CI it runs inside the job named `lint`, so a green `lint` check silently implies tsc. The rest of the mapping: `bun run test` is the `test` job (re-run in `test-windows`, which reports but cannot gate merges), and `bun run test:e2e` is the `smoke` job.
331
+
329
332
  `bun run lint` checks lint rules and TypeScript/TSX formatting; CI calls the same command. Lint warnings remain advisory, while formatting differences fail the check. Markdown commands, prose, JSON data and historical benchmark records are outside the formatter's scope.
330
333
 
331
334
  Use Bun **1.4.4** for development checks, matching CI. `bun run test` and `bun run test:e2e` run files across at most four worker processes with Bun's file isolation; cases inside each file stay sequential because fixtures share environment variables and module state. The local gate uses those same scripts. To diagnose order-dependent failures in the original shared-process mode, run `bun test ./test/` or `bun test ./e2e/ --timeout 240000` directly.
@@ -334,6 +337,8 @@ Use Bun **1.4.4** for development checks, matching CI. `bun run test` and `bun r
334
337
 
335
338
  `e2e/` boots the **real opencode CLI** against each candidate in a fully isolated instance (fresh config, fresh db, fresh memory store, empty `HOME`) driven by a scripted OpenAI-compatible fake model — no API keys. It covers loading from the source tree and from the packed npm artifact installed runtime-deps-only, plus BDD flows for remember, recall, exact and near duplicates, ungrounded claims, and forget. Needs `opencode` on `PATH` locally, or set `OPENCODE_BIN`. A `test-windows` leg also runs the suite on Windows; it reports without gating merges.
336
339
 
340
+ **The published surface is defined in `package.json`.** `exports` is the only import surface other code can reach (`.` → `index.ts`, `./tui` → `src/tui/panel.tsx`); `files` is the packaging list. `files` covers `src/`, so anything reachable from an `exports` target ships, but a new top-level file or directory — or anything the plugin reads at runtime outside those paths — must be added to `files` or it works from the checkout and vanishes from the npm artifact. The packed-artifact load in `e2e/` turns that miss red.
341
+
337
342
  ### Mutation sweep
338
343
 
339
344
  ```sh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-self-improvement",
3
- "version": "0.15.29",
3
+ "version": "0.15.30",
4
4
  "description": "Durable memory for opencode: remember facts, decisions, and commands across sessions, plus a one-command per-repo setup (/repo-init).",
5
5
  "main": "index.ts",
6
6
  "exports": {
package/src/tui/panel.tsx CHANGED
@@ -123,7 +123,7 @@ export default Plugin.define({
123
123
  w.on("error", () => {
124
124
  try {
125
125
  w.close();
126
- } catch {}
126
+ } catch {} // already closed; the null-out below is the real cleanup
127
127
  if (rootWatcher === w) rootWatcher = null;
128
128
  if (dirWatcher === w) dirWatcher = null;
129
129
  if (evWatcher === w) evWatcher = null;
@@ -230,7 +230,7 @@ export default Plugin.define({
230
230
  for (const w of [rootWatcher, dirWatcher, evWatcher]) {
231
231
  try {
232
232
  w?.close();
233
- } catch {}
233
+ } catch {} // unmount: a watcher already closed or broken has nothing left to release
234
234
  }
235
235
  };
236
236
  },
@@ -435,7 +435,9 @@ async function blockedRows(): Promise<Row[]> {
435
435
  }
436
436
 
437
437
  export interface ViewerServer {
438
- server: Server<any>;
438
+ // No websocket routes, so the WebSocketData generic is undefined — the
439
+ // default Bun.serve infers here. Was `any`, which hid the real shape.
440
+ server: Server<undefined>;
439
441
  url: string;
440
442
  /** The minted token when exposure requires auth; null on a loopback-only bind. */
441
443
  token: string | null;