Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
refactor: move the canonical libghostty-vt vendor to the repository root (#5102)
Wout Stiens964cc279014f
diff --git a/apps/mobile/modules/t3-terminal/README.md b/apps/mobile/modules/t3-terminal/README.mdindex 768e3c070..32670b893 100644--- a/apps/mobile/modules/t3-terminal/README.md+++ b/apps/mobile/modules/t3-terminal/README.md@@ -40,7 +40,7 @@ fails, run `xcodebuild -downloadComponent MetalToolchain`.## Rebuilding libghostty-vt for AndroidThe checked-in Android shared libraries and headers are pinned to the revision recorded in-`Vendor/libghostty-vt/VERSION`. Set `ANDROID_NDK_HOME` and run:+`native/libghostty-vt/VERSION` at the repository root. Set `ANDROID_NDK_HOME` and run:```bashapps/mobile/modules/t3-terminal/scripts/build-libghostty-android.shdiff --git a/apps/mobile/modules/t3-terminal/THIRD_PARTY_NOTICES.md b/apps/mobile/modules/t3-terminal/THIRD_PARTY_NOTICES.mdindex 0af582c59..b06f18ead 100644--- a/apps/mobile/modules/t3-terminal/THIRD_PARTY_NOTICES.md+++ b/apps/mobile/modules/t3-terminal/THIRD_PARTY_NOTICES.md@@ -25,7 +25,7 @@ The web terminal vendors a WebAssembly build from the same revision and uses the- License: MITGhostty's MIT license applies to the vendored Android and web libraries. Keep this notice and both-artifacts in sync when updating `Vendor/libghostty-vt`.+artifacts in sync when updating the repository-root `native/libghostty-vt`.## MesloLGS NF (Android terminal font)diff --git a/apps/mobile/modules/t3-terminal/android/src/main/cpp/CMakeLists.txt b/apps/mobile/modules/t3-terminal/android/src/main/cpp/CMakeLists.txtindex 0273ff6c8..a43a2981b 100644--- a/apps/mobile/modules/t3-terminal/android/src/main/cpp/CMakeLists.txt+++ b/apps/mobile/modules/t3-terminal/android/src/main/cpp/CMakeLists.txt@@ -13,7 +13,7 @@ add_library(t3terminal SHARED t3_terminal_jni.cpp)target_include_directories(t3terminal- PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../../../Vendor/libghostty-vt/include"+ PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../../../native/libghostty-vt/include")target_link_options(diff --git a/apps/mobile/modules/t3-terminal/scripts/build-libghostty-android.sh b/apps/mobile/modules/t3-terminal/scripts/build-libghostty-android.shindex 7b9aa9b6d..55d994d3b 100755--- a/apps/mobile/modules/t3-terminal/scripts/build-libghostty-android.sh+++ b/apps/mobile/modules/t3-terminal/scripts/build-libghostty-android.sh@@ -4,7 +4,7 @@ set -euo pipefailSCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"MODULE_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"-VENDOR_DIR="${MODULE_DIR}/Vendor/libghostty-vt"+VENDOR_DIR="${MODULE_DIR}/../../../../native/libghostty-vt"PATCH_DIR="${SCRIPT_DIR}/libghostty-android-patches"GHOSTTY_REVISION="${GHOSTTY_REVISION:-9f62873bf195e4d8a762d768a1405a5f2f7b1697}"diff --git a/apps/web/scripts/build-libghostty-wasm.sh b/apps/web/scripts/build-libghostty-wasm.shindex bceb1218c..d4b1238bb 100755--- a/apps/web/scripts/build-libghostty-wasm.sh+++ b/apps/web/scripts/build-libghostty-wasm.sh@@ -5,10 +5,10 @@ set -euo pipefailSCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"WEB_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"REPO_DIR="$(cd "${WEB_DIR}/../.." && pwd)"-MOBILE_VENDOR_DIR="${REPO_DIR}/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt"+CANONICAL_VENDOR_DIR="${REPO_DIR}/native/libghostty-vt"VENDOR_DIR="${WEB_DIR}/src/terminal/ghostty/vendor"-GHOSTTY_REVISION="$(tr -d '[:space:]' < "${MOBILE_VENDOR_DIR}/VERSION")"+GHOSTTY_REVISION="$(tr -d '[:space:]' < "${CANONICAL_VENDOR_DIR}/VERSION")"GHOSTTY_SOURCE_DIR="${GHOSTTY_SOURCE_DIR:-${HOME}/.cache/t3code/ghostty-${GHOSTTY_REVISION:0:8}}"GHOSTTY_ZIG_VERSION="${GHOSTTY_ZIG_VERSION:-0.15.2}"GHOSTTY_ZIG="${GHOSTTY_ZIG:-}"diff --git a/apps/web/src/terminal/ghostty/README.md b/apps/web/src/terminal/ghostty/README.mdindex b563c6e83..37e1c52fb 100644--- a/apps/web/src/terminal/ghostty/README.md+++ b/apps/web/src/terminal/ghostty/README.md@@ -12,7 +12,7 @@ It is intentionally not an xterm compatibility layer.prompt glyphs render without a locally installed Nerd Font.- `vendor/` holds only the artifacts, reproducibly generated by`apps/web/scripts/build-libghostty-wasm.sh`. The upstream pin and license live once, at- `apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/`; the wasm embeds the pinned revision+ `native/libghostty-vt/` at the repository root; the wasm embeds the pinned revisionin its build info and the ABI test verifies it against mobile's `VERSION`.Keep browser behavior here and terminal transport in the existing client runtime. Do not add Reactdiff --git a/apps/web/src/terminal/ghostty/runtimeAbi.test.ts b/apps/web/src/terminal/ghostty/runtimeAbi.test.tsindex 0b3eac7f1..b77cfd32b 100644--- a/apps/web/src/terminal/ghostty/runtimeAbi.test.ts+++ b/apps/web/src/terminal/ghostty/runtimeAbi.test.ts@@ -2,7 +2,7 @@ import { describe, expect, it } from "vite-plus/test";import wasmDataUrl from "./vendor/ghostty-vt.wasm?inline";import writePtyWasmDataUrl from "./vendor/ghostty-write-pty.wasm?inline";-import mobileVersion from "../../../../mobile/modules/t3-terminal/Vendor/libghostty-vt/VERSION?raw";+import pinnedVersion from "../../../../../native/libghostty-vt/VERSION?raw";import { ghosttyKeyForCode } from "./keyCodes";type WasmFunction = (...args: number[]) => number;@@ -14,13 +14,13 @@ function decodeWasmDataUrl(dataUrl: string): Uint8Array {}describe("vendored libghostty-vt WebAssembly", () => {- it("stays pinned to mobile's canonical revision and size budget", async () => {+ it("stays pinned to the canonical revision and size budget", async () => {const wasm = decodeWasmDataUrl(wasmDataUrl);expect(wasm.byteLength).toBeLessThan(750_000);// The artifact carries its own provenance: the build embeds the pinned- // revision as semver build metadata, so mobile's VERSION file is the- // single source of truth and drift is caught here without a copy.+ // revision as semver build metadata, so the repository's canonical VERSION+ // file is the single source of truth and drift is caught here without a copy.const result = await WebAssembly.instantiate(wasm.buffer as ArrayBuffer, {env: { log: () => {} },});@@ -35,7 +35,7 @@ describe("vendored libghostty-vt WebAssembly", () => {new Uint8Array(memory.buffer, view.getUint32(0, true), view.getUint32(4, true)),);call("ghostty_wasm_free_u8_array", out, 8);- expect(embeddedRevision).toBe(mobileVersion.trim());+ expect(embeddedRevision).toBe(pinnedVersion.trim());});it("creates, writes multi-codepoint graphemes, and frees repeated terminals", async () => {diff --git a/docs/architecture/terminal-renderers.md b/docs/architecture/terminal-renderers.mdindex 483dd1644..4b66a13f6 100644--- a/docs/architecture/terminal-renderers.md+++ b/docs/architecture/terminal-renderers.md@@ -12,7 +12,7 @@ boundaries, keyboard encoding, selection, and scrollback:- Android links the native shared library and converts render state into a compact JNI snapshot.- Web loads a separately cached WebAssembly build and reads render state into a Canvas 2D surface.- Both artifacts are built from the revision in- `apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/VERSION`.+ `native/libghostty-vt/VERSION`.The platform adapters deliberately own only platform behavior. Android owns its Kotlin Canvas andtouch integration. Web owns browser font shaping, the hidden IME textarea, clipboard and DOM input,diff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/LICENSE b/native/libghostty-vt/LICENSEsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/LICENSErename to native/libghostty-vt/LICENSEdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/VERSION b/native/libghostty-vt/VERSIONsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/VERSIONrename to native/libghostty-vt/VERSIONdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt.h b/native/libghostty-vt/include/ghostty/vt.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt.hrename to native/libghostty-vt/include/ghostty/vt.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/allocator.h b/native/libghostty-vt/include/ghostty/vt/allocator.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/allocator.hrename to native/libghostty-vt/include/ghostty/vt/allocator.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/build_info.h b/native/libghostty-vt/include/ghostty/vt/build_info.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/build_info.hrename to native/libghostty-vt/include/ghostty/vt/build_info.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/color.h b/native/libghostty-vt/include/ghostty/vt/color.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/color.hrename to native/libghostty-vt/include/ghostty/vt/color.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/device.h b/native/libghostty-vt/include/ghostty/vt/device.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/device.hrename to native/libghostty-vt/include/ghostty/vt/device.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/focus.h b/native/libghostty-vt/include/ghostty/vt/focus.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/focus.hrename to native/libghostty-vt/include/ghostty/vt/focus.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/formatter.h b/native/libghostty-vt/include/ghostty/vt/formatter.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/formatter.hrename to native/libghostty-vt/include/ghostty/vt/formatter.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/grid_ref.h b/native/libghostty-vt/include/ghostty/vt/grid_ref.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/grid_ref.hrename to native/libghostty-vt/include/ghostty/vt/grid_ref.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/grid_ref_tracked.h b/native/libghostty-vt/include/ghostty/vt/grid_ref_tracked.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/grid_ref_tracked.hrename to native/libghostty-vt/include/ghostty/vt/grid_ref_tracked.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/key.h b/native/libghostty-vt/include/ghostty/vt/key.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/key.hrename to native/libghostty-vt/include/ghostty/vt/key.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/key/encoder.h b/native/libghostty-vt/include/ghostty/vt/key/encoder.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/key/encoder.hrename to native/libghostty-vt/include/ghostty/vt/key/encoder.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/key/event.h b/native/libghostty-vt/include/ghostty/vt/key/event.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/key/event.hrename to native/libghostty-vt/include/ghostty/vt/key/event.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/kitty_graphics.h b/native/libghostty-vt/include/ghostty/vt/kitty_graphics.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/kitty_graphics.hrename to native/libghostty-vt/include/ghostty/vt/kitty_graphics.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/modes.h b/native/libghostty-vt/include/ghostty/vt/modes.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/modes.hrename to native/libghostty-vt/include/ghostty/vt/modes.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/mouse.h b/native/libghostty-vt/include/ghostty/vt/mouse.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/mouse.hrename to native/libghostty-vt/include/ghostty/vt/mouse.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/mouse/encoder.h b/native/libghostty-vt/include/ghostty/vt/mouse/encoder.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/mouse/encoder.hrename to native/libghostty-vt/include/ghostty/vt/mouse/encoder.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/mouse/event.h b/native/libghostty-vt/include/ghostty/vt/mouse/event.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/mouse/event.hrename to native/libghostty-vt/include/ghostty/vt/mouse/event.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/osc.h b/native/libghostty-vt/include/ghostty/vt/osc.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/osc.hrename to native/libghostty-vt/include/ghostty/vt/osc.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/paste.h b/native/libghostty-vt/include/ghostty/vt/paste.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/paste.hrename to native/libghostty-vt/include/ghostty/vt/paste.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/point.h b/native/libghostty-vt/include/ghostty/vt/point.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/point.hrename to native/libghostty-vt/include/ghostty/vt/point.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/render.h b/native/libghostty-vt/include/ghostty/vt/render.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/render.hrename to native/libghostty-vt/include/ghostty/vt/render.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/screen.h b/native/libghostty-vt/include/ghostty/vt/screen.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/screen.hrename to native/libghostty-vt/include/ghostty/vt/screen.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/selection.h b/native/libghostty-vt/include/ghostty/vt/selection.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/selection.hrename to native/libghostty-vt/include/ghostty/vt/selection.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/sgr.h b/native/libghostty-vt/include/ghostty/vt/sgr.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/sgr.hrename to native/libghostty-vt/include/ghostty/vt/sgr.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/size_report.h b/native/libghostty-vt/include/ghostty/vt/size_report.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/size_report.hrename to native/libghostty-vt/include/ghostty/vt/size_report.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/style.h b/native/libghostty-vt/include/ghostty/vt/style.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/style.hrename to native/libghostty-vt/include/ghostty/vt/style.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/sys.h b/native/libghostty-vt/include/ghostty/vt/sys.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/sys.hrename to native/libghostty-vt/include/ghostty/vt/sys.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/terminal.h b/native/libghostty-vt/include/ghostty/vt/terminal.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/terminal.hrename to native/libghostty-vt/include/ghostty/vt/terminal.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/types.h b/native/libghostty-vt/include/ghostty/vt/types.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/types.hrename to native/libghostty-vt/include/ghostty/vt/types.hdiff --git a/apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/wasm.h b/native/libghostty-vt/include/ghostty/vt/wasm.hsimilarity index 100%rename from apps/mobile/modules/t3-terminal/Vendor/libghostty-vt/include/ghostty/vt/wasm.hrename to native/libghostty-vt/include/ghostty/vt/wasm.h