fix(KB-151): lazy-load node-pty to fix packaged binary execution

- Convert static node-pty import to dynamic import in TerminalService\n- Only load native PTY module when terminal session is actually created\n- Fix Bun-compiled binary failures on commands like --help, task list\n- Add changeset documenting the lazy-loading fix
This commit is contained in:
gsxdsm
2026-03-30 08:37:31 -07:00
parent e35c745fc2
commit 8b4ac5d43e
2 changed files with 29 additions and 8 deletions

View File

@@ -0,0 +1,7 @@
---
"@dustinbyrne/kb": patch
---
Fix packaged binary tests by lazy-loading node-pty
The Bun-compiled `kb` binary was failing to run `--help`, `task list`, and `dashboard` commands due to eager loading of the native `node-pty` module. The fix converts the static import to a dynamic import that only executes when a terminal session is actually being created. This allows CLI commands that don't use the terminal to work without loading the native module, while preserving full dashboard terminal functionality when running from source.