Skip to content

Releases: drewsephski/opencodesdk

v0.7.1

Choose a tag to compare

@github-actions github-actions released this 04 Jun 11:14

Full Changelog: v0.7.0...v0.7.1

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 04 Jun 10:15

Full Changelog: v0.6.4...v0.7.0

Full Changelog: v0.6.4...v0.7.0

v0.6.4

Choose a tag to compare

@github-actions github-actions released this 04 Jun 02:14

Full Changelog: v0.6.0...v0.6.4

v0.6.0 — Always start fresh, lsof-based orphan cleanup

Choose a tag to compare

@drewsephski drewsephski released this 03 Jun 21:49

Major robustness rewrite

The problem

Squid-chat's opencode serve child process was becoming orphaned (PPID=1 reparented to init) when the parent Node.js process died, holding port 4096 with the old project directory locked. Subsequent runs found the port busy and silently reused the orphan — operating in the wrong project and continuing old conversations.

Additionally, the 'same-directory' detection relied on the cwd field in runtime state, which didn't exist in older versions, causing the fallback to always reopen the old instance.

The fix — complete startup redesign

  • Always start fresh: Eliminated the 'Using existing OpenCode server' path entirely. Every run starts its own opencode serve.
  • lsof-based orphan cleanup: If anything is listening on the OpenCode port, killProcessOnPort() uses lsof -ti :PORT to find the PID(s) and kills them with SIGTERM before waiting for the port to be released.
  • Safe fast-path: The only reuse is when the exact same squid-chat Node.js process (same PID + same cwd) is still running — then we just reopen the URL.
  • New helpers: checkPortFree() and killProcessOnPort() extract and improve the port-management logic.

Full Changelog: v0.5.1...v0.6.0

v0.5.1 — Fix workspace directory switching

Choose a tag to compare

@drewsephski drewsephski released this 03 Jun 21:41

Bug Fix

  • Fix: npx squid-chat from a NEW project directory while an old instance is still running now correctly starts in the new directory instead of reopening the old instance.

Behavior

When you run npx squid-chat in a directory that differs from the currently running instance:

  1. The old instance is gracefully stopped (SIGTERM)
  2. The code waits for the OpenCode server port to be released
  3. A fresh instance starts in your current directory

Previously it just re-opened the old URL and returned, ignoring the new project entirely.

Implementation

  • Uses the cwd field saved in runtime state to detect directory mismatch
  • Sends SIGTERM to old process on mismatch
  • New waitForPortFree() helper polls TCP port availability with 8s timeout

Full Changelog: v0.5.0...v0.5.1

v0.5.0 — Robust npx CWD handling

Choose a tag to compare

@drewsephski drewsephski released this 03 Jun 20:54

Fixes & Enhancements

  • Fix: OpenCode now correctly uses the directory where npx squid-chat was run as its working directory (restored process.chdir before spawning the OpenCode server — the SDK doesn't support cwd option)
  • Validate: Target directory existence and read permissions checked before starting
  • Binary check: Verifies OpenCode binary is executable; auto-redownloads if not
  • Cleaner shutdown: Uses AbortSignal for the OpenCode server process lifecycle
  • Port check: Fixed to properly await the test server close callback
  • State tracking: Runtime state now records cwd for diagnostics
  • Cleanup: State files are now properly deleted (unlink) instead of written with empty content

Full Changelog: v0.4.9...v0.5.0

v0.4.9

Choose a tag to compare

@github-actions github-actions released this 03 Jun 20:45

Full Changelog: v0.4.8...v0.4.9

v0.4.7

Choose a tag to compare

@github-actions github-actions released this 03 Jun 17:01

Full Changelog: v0.4.6...v0.4.7

v0.4.6

Choose a tag to compare

@github-actions github-actions released this 03 Jun 16:24

Full Changelog: v0.4.5...v0.4.6

v0.4.5

Choose a tag to compare

@github-actions github-actions released this 03 Jun 16:15

Full Changelog: v0.4.4...v0.4.5

Full Changelog: v0.4.4...v0.4.5