@leo000001/opencode-quota-sidebar 4.1.0 → 4.1.2

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
@@ -297,9 +297,11 @@ OpenCode main pricing config candidates are read from these locations:
297
297
 
298
298
  ## Linux CLI Notes
299
299
 
300
- - `opencode-quota` will auto-start a temporary `opencode serve` when no local server is already reachable
301
- - recent releases clean up that temporary server more aggressively on Linux/Unix so the CLI can exit normally after printing the report
302
- - if the CLI still hangs on Linux, upgrade to a version that includes the server-process cleanup fix
300
+ - `opencode-quota` auto-starts a temporary `opencode serve` when no local server is reachable and `OPENCODE_BASE_URL` is not set
301
+ - the temporary server prefers `127.0.0.1:4096`; if that port is busy, the CLI retries on another local port automatically
302
+ - the CLI waits up to 60 seconds for the temporary server to finish booting
303
+ - the temporary server is closed on normal completion and best-effort cleanup paths (`exit`, `SIGINT`, `SIGTERM`, `uncaughtExceptionMonitor`), and a detached watchdog kills it after 10 minutes if it is somehow left behind
304
+ - if the CLI still hangs or temp-server startup keeps failing, run `opencode serve` manually to inspect logs or set `OPENCODE_BASE_URL`
303
305
 
304
306
  ## Persistence And Aggregation
305
307
 
@@ -443,11 +445,15 @@ This means the current bucket has `12.3k` requests, and the bar rows below show
443
445
 
444
446
  - The CLI talks to the local OpenCode API at `http://localhost:4096` by default
445
447
  - Set `OPENCODE_BASE_URL` to override (e.g. `http://192.168.1.10:4096`)
446
- - If no server is running and `OPENCODE_BASE_URL` is not set, the CLI attempts to start one:
447
- - **Linux/macOS**: runs `opencode serve --hostname=127.0.0.1 --port=4096`
448
+ - If no server is running and `OPENCODE_BASE_URL` is not set, the CLI attempts to start a temporary local server:
449
+ - **Linux/macOS**: runs `opencode serve --hostname=127.0.0.1 --port=<chosen-port>`
448
450
  - **Windows**: tries `opencode.cmd`, then `opencode` via `shell: true`, then `bash -lc opencode`
449
- - The auto-start waits up to 10 seconds for the server to print `opencode server listening on <url>`
451
+ - Auto-start prefers `127.0.0.1:4096` and retries on another local port if `4096` is already in use
452
+ - The auto-start waits up to 60 seconds for the server to print `opencode server listening on <url>`
453
+ - The temporary server is closed on normal CLI completion and best-effort cleanup hooks (`exit`, `SIGINT`, `SIGTERM`, uncaught exception monitoring)
454
+ - A detached watchdog also enforces a max lifetime of 10 minutes for that temporary server
450
455
  - If auto-start fails, check that `opencode` is in your `PATH`
456
+ - If the temporary server later errors after startup, the CLI prints a short hint to run `opencode serve` manually for logs or set `OPENCODE_BASE_URL`
451
457
  - On Windows, the `shell: true` path is usually the most reliable when `opencode.cmd` is not directly spawnable from Node
452
458
 
453
459
  ### Platform notes