From 693187a3fb2d8f9756d444d2b05922e93b9d5e7f Mon Sep 17 00:00:00 2001 From: Vaclav Synacek Date: Tue, 3 Mar 2026 09:21:47 +0100 Subject: [PATCH] Make koffi optional dependency for cross-platform support (#1603) Koffi is only used on Windows for VT input support and fails to build on Termux/Android and Linux systems without build tools. Moving it to optionalDependencies allows installation to succeed on all platforms while maintaining Windows functionality. --- package.json | 3 +-- packages/tui/package.json | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f91af50f..cadf37ab 100644 --- a/package.json +++ b/package.json @@ -45,8 +45,7 @@ "dependencies": { "@mariozechner/jiti": "^2.6.5", "@mariozechner/pi-coding-agent": "^0.30.2", - "get-east-asian-width": "^1.4.0", - "koffi": "^2.15.1" + "get-east-asian-width": "^1.4.0" }, "overrides": { "rimraf": "6.1.2", diff --git a/packages/tui/package.json b/packages/tui/package.json index fb04af95..97d976c1 100644 --- a/packages/tui/package.json +++ b/packages/tui/package.json @@ -39,10 +39,12 @@ "@types/mime-types": "^2.1.4", "chalk": "^5.5.0", "get-east-asian-width": "^1.3.0", - "koffi": "^2.9.0", "marked": "^15.0.12", "mime-types": "^3.0.1" }, + "optionalDependencies": { + "koffi": "^2.9.0" + }, "devDependencies": { "@xterm/headless": "^5.5.0", "@xterm/xterm": "^5.5.0"