diff --git a/.changeset/restore-bun-runtime.md b/.changeset/restore-bun-runtime.md new file mode 100644 index 0000000000..46878dd0ad --- /dev/null +++ b/.changeset/restore-bun-runtime.md @@ -0,0 +1,5 @@ +--- +"@kilocode/cli": patch +--- + +Restore reliable CLI terminal startup across release targets. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 895870a494..69612910fe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ The Kilo Community is [on Discord](https://kilo.ai/discord). ## Prerequisites -- **Bun 1.4.0+** — required for all packages. +- **Bun 1.3.14+** — required for all packages. - **Java 21** — required by the JetBrains plugin. The root `bun turbo typecheck` and `bun turbo test:ci` commands include `@kilocode/kilo-jetbrains` and will fail without Java 21. The preferred way to install Java is via [SDKMAN](https://sdkman.io/install): @@ -41,7 +41,7 @@ The Kilo Community is [on Discord](https://kilo.ai/discord). ## Developing Kilo CLI -- **Requirements:** Bun 1.4.0+, Java 21 (see [Prerequisites](#prerequisites) above) +- **Requirements:** Bun 1.3.14+, Java 21 (see [Prerequisites](#prerequisites) above) - Install dependencies and start the CLI from the repo root: ```bash diff --git a/bun.lock b/bun.lock index 0eaf7e2217..3451ba105b 100644 --- a/bun.lock +++ b/bun.lock @@ -1069,7 +1069,7 @@ "@tanstack/solid-virtual": "3.13.32", "@tsconfig/bun": "1.0.9", "@tsconfig/node22": "22.0.2", - "@types/bun": "1.4.0", + "@types/bun": "1.3.14", "@types/cross-spawn": "6.0.6", "@types/luxon": "3.7.1", "@types/node": "24.12.4", @@ -2536,7 +2536,7 @@ "@types/babel__traverse": ["@types/babel__traverse@7.28.0", "", { "dependencies": { "@babel/types": "^7.28.2" } }, "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q=="], - "@types/bun": ["@types/bun@1.4.0", "", { "dependencies": { "bun-types": "1.4.0" } }, "sha512-K+lZULY23vRgK/CfTjFIV+tyifaNdSMlPh9j+6mQ/cLfpOznLyAuzgV/JQysyECpkBQLVMSyvjlr2fBUSA9wFQ=="], + "@types/bun": ["@types/bun@1.3.14", "", { "dependencies": { "bun-types": "1.3.14" } }, "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw=="], "@types/cacache": ["@types/cacache@20.0.1", "", { "dependencies": { "@types/node": "*", "minipass": "*" } }, "sha512-QlKW3AFoFr/hvPHwFHMIVUH/ZCYeetBNou3PCmxu5LaNDvrtBlPJtIA6uhmU9JRt9oxj7IYoqoLcpxtzpPiTcw=="], @@ -2972,7 +2972,7 @@ "bun-pty": ["bun-pty@0.4.8", "", {}, "sha512-rO70Mrbr13+jxHHHu2YBkk2pNqrJE5cJn29WE++PUr+GFA0hq/VgtQPZANJ8dJo6d7XImvBk37Innt8GM7O28w=="], - "bun-types": ["bun-types@1.4.0", "", { "dependencies": { "@types/node": "*" } }, "sha512-iIKw23BspnQQYd3prITOBxeUsxBHnwzX6YJfGMuNOZzeNcMmVqzIIVGRm1l69ogaPQmb4wB6BN8mA5bE9YuC5Q=="], + "bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="], "bundle-name": ["bundle-name@4.1.0", "", { "dependencies": { "run-applescript": "^7.0.0" } }, "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q=="], diff --git a/bunfig.toml b/bunfig.toml index 2c85f59748..61bb6e0fdb 100644 --- a/bunfig.toml +++ b/bunfig.toml @@ -2,7 +2,7 @@ exact = true # Keep Kilo's longer supply-chain quarantine while allowing packages that must track coordinated releases. minimumReleaseAge = 410520 # seconds (~4.75 days / ~114 hours) -minimumReleaseAgeExcludes = ["mermaid", "@mermaid-js/parser", "@ai-sdk/amazon-bedrock", "@ai-sdk/anthropic", "@opentui/core", "@opentui/core-darwin-arm64", "@opentui/core-darwin-x64", "@opentui/core-linux-arm64", "@opentui/core-linux-arm64-musl", "@opentui/core-linux-x64", "@opentui/core-linux-x64-musl", "@opentui/core-win32-arm64", "@opentui/core-win32-x64", "@opentui/keymap", "@opentui/solid", "opentui-spinner", "gitlab-ai-provider", "opencode-gitlab-auth", "@ff-labs/fff-node", "@ff-labs/fff-bun", "@ff-labs/fff-bin-darwin-arm64", "@ff-labs/fff-bin-darwin-x64", "@ff-labs/fff-bin-linux-arm64-gnu", "@ff-labs/fff-bin-linux-arm64-musl", "@ff-labs/fff-bin-linux-x64-gnu", "@ff-labs/fff-bin-linux-x64-musl", "@ff-labs/fff-bin-win32-arm64", "@ff-labs/fff-bin-win32-x64", "@pierre/diffs", "@pierre/theming", "app-builder-lib", "dmg-builder", "electron-builder", "electron-publish", "@types/bun", "bun-types"] # kilocode_change +minimumReleaseAgeExcludes = ["mermaid", "@mermaid-js/parser", "@ai-sdk/amazon-bedrock", "@ai-sdk/anthropic", "@opentui/core", "@opentui/core-darwin-arm64", "@opentui/core-darwin-x64", "@opentui/core-linux-arm64", "@opentui/core-linux-arm64-musl", "@opentui/core-linux-x64", "@opentui/core-linux-x64-musl", "@opentui/core-win32-arm64", "@opentui/core-win32-x64", "@opentui/keymap", "@opentui/solid", "opentui-spinner", "gitlab-ai-provider", "opencode-gitlab-auth", "@ff-labs/fff-node", "@ff-labs/fff-bun", "@ff-labs/fff-bin-darwin-arm64", "@ff-labs/fff-bin-darwin-x64", "@ff-labs/fff-bin-linux-arm64-gnu", "@ff-labs/fff-bin-linux-arm64-musl", "@ff-labs/fff-bin-linux-x64-gnu", "@ff-labs/fff-bin-linux-x64-musl", "@ff-labs/fff-bin-win32-arm64", "@ff-labs/fff-bin-win32-x64", "@pierre/diffs", "@pierre/theming", "app-builder-lib", "dmg-builder", "electron-builder", "electron-publish"] [test] root = "./do-not-run-tests-from-root" diff --git a/nix/bun.nix b/nix/bun.nix index f9bc254337..a880895349 100644 --- a/nix/bun.nix +++ b/nix/bun.nix @@ -14,19 +14,19 @@ let sources = { "aarch64-linux" = { name = "bun-linux-aarch64"; - hash = "sha256-SxozLuhhmD65O8/m93D/+U4+MbLDiL2uo8jtNeWO7Q4="; + hash = "sha256-on/7Y6gxA3WDbg1vZorhf6jY0YuIw3yCHGUzGXOhmjs="; }; "x86_64-linux" = { name = "bun-linux-x64"; - hash = "sha256-LQP7X7g6yLVnrKCigbLOGhoZ1Ij1bClo2Iw/Jekv5FI="; + hash = "sha256-lR7iruhV8IWVruxiJSJqKY0/6oOj3NZGXAnLzN9+hI8="; }; "aarch64-darwin" = { name = "bun-darwin-aarch64"; - hash = "sha256-xmnpf2Fk4cluBwF0jbmN+ndJKQjL2DlMdVcTSnNd44E="; + hash = "sha256-2LliIYKK1vl6x6wKt+lYcjQa92MAHogD6CZ2UsJlJiA="; }; "x86_64-darwin" = { name = "bun-darwin-x64"; - hash = "sha256-HQIRuPHcmRGCNEaHrRXnLuhvFUhFpff6R3mUzTQd2bA="; + hash = "sha256-QYPfM3RiPlurMVxUfPoJdFM81FfYa3O2OfeoeXTNZjM="; }; }; source = diff --git a/package.json b/package.json index a211379204..5392f3e45d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "AI-powered development tool", "private": true, "type": "module", - "packageManager": "bun@1.4.0", + "packageManager": "bun@1.3.14", "scripts": { "dev": "KILO_CLIENT=cli bun run --cwd packages/opencode --conditions=node src/index.ts", "dev:stats": "bun sst shell --stage=production -- bun run --cwd packages/stats/app dev", @@ -35,7 +35,7 @@ "@effect/platform-node": "4.0.0-beta.83", "@anthropic-ai/sandbox-runtime": "0.0.63", "@npmcli/arborist": "9.4.0", - "@types/bun": "1.4.0", + "@types/bun": "1.3.14", "@types/cross-spawn": "6.0.6", "@octokit/rest": "22.0.0", "@opentui/core": "0.4.5", diff --git a/packages/containers/bun-node/Dockerfile b/packages/containers/bun-node/Dockerfile index ddfe934f20..8c93e45502 100644 --- a/packages/containers/bun-node/Dockerfile +++ b/packages/containers/bun-node/Dockerfile @@ -6,7 +6,7 @@ FROM ${REGISTRY}/build/base:24.04 SHELL ["/bin/bash", "-lc"] ARG NODE_VERSION=24.4.0 -ARG BUN_VERSION=1.4.0 +ARG BUN_VERSION=1.3.14 ENV BUN_INSTALL=/opt/bun ENV PATH=/opt/bun/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin diff --git a/packages/core/src/kilocode/pty/smoke.ts b/packages/core/src/kilocode/pty/smoke.ts index 9a2380fa52..fa5a4e01be 100644 --- a/packages/core/src/kilocode/pty/smoke.ts +++ b/packages/core/src/kilocode/pty/smoke.ts @@ -3,69 +3,6 @@ import { KiloPtyTermination } from "./termination" import { spawn } from "#pty" const TIMEOUT = 15_000 -const RENDER_TIMEOUT = 60_000 - -export function marker(output: string) { - const text = output - .replace(/\x1b\](?:[^\x07\x1b]|\x1b(?!\\))*(?:\x07|\x1b\\)/g, "") - .replace(/\x1b[P^_](?:[^\x1b]|\x1b(?!\\))*\x1b\\/g, "") - .replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, "") - .replace(/\x1b[@-_]/g, "") - return text.split(/\r?\n/).some((line) => line.trim() === "KILO_PTY_READY") -} - -async function render() { - const proc = spawn(process.execPath, ["--pure"], { - name: "xterm-256color", - cwd: process.cwd(), - env: { - ...process.env, - TERM: "xterm-256color", - KILO_TERMINAL: "1", - KILO_NO_DAEMON: "1", - KILO_DISABLE_AUTOUPDATE: "1", - KILO_DISABLE_MODELS_FETCH: "1", - KILO_DISABLE_PROJECT_CONFIG: "1", - KILO_DISABLE_DEFAULT_PLUGINS: "1", - KILO_DISABLE_TERMINAL_TITLE: "0", - KILO_CONFIG_CONTENT: "{}", - KILO_AUTH_CONTENT: "{}", - } as Record, - cols: 100, - rows: 40, - }) - const state = { output: "", exited: false } - const ready = Promise.withResolvers() - const data = proc.onData((chunk) => { - state.output = (state.output + chunk).slice(-20_000) - if (state.output.includes("Ask anything...")) ready.resolve() - }) - const exit = proc.onExit((event) => { - state.exited = true - ready.reject(new Error(`TUI exited before rendering (code ${event.exitCode}): ${JSON.stringify(state.output)}`)) - }) - const timeout = AbortSignal.timeout(RENDER_TIMEOUT) - - try { - await Promise.race([ - ready.promise, - new Promise((_, reject) => - timeout.addEventListener( - "abort", - () => - reject( - new Error(`TUI produced no rendered frame within ${RENDER_TIMEOUT}ms: ${JSON.stringify(state.output)}`), - ), - { once: true }, - ), - ), - ]) - } finally { - data.dispose() - exit.dispose() - if (!state.exited) await KiloPtyTermination.terminate(proc) - } -} export async function smoke() { const proc = spawn(Shell.preferred(), [], { @@ -80,7 +17,8 @@ export async function smoke() { const exited = Promise.withResolvers() const data = proc.onData((chunk) => { state.output += chunk - if (marker(state.output)) output.resolve() + const lines = state.output.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, "").split(/\r?\n/) + if (lines.some((line) => line.trim() === "KILO_PTY_READY")) output.resolve() }) const exit = proc.onExit((event) => { state.exited = true @@ -129,8 +67,6 @@ export async function smoke() { } finally { if (!stopped) active.kill() } - - await render() } export * as PtySmoke from "./smoke" diff --git a/packages/core/test/kilocode/pty-durability.test.ts b/packages/core/test/kilocode/pty-durability.test.ts index bc854ab245..bd0995da24 100644 --- a/packages/core/test/kilocode/pty-durability.test.ts +++ b/packages/core/test/kilocode/pty-durability.test.ts @@ -183,13 +183,7 @@ describe("durable PTY registry", () => { const info = yield* Effect.scoped( Effect.gen(function* () { const pty = yield* Pty.Service - return yield* pty.create({ command: "/bin/sh", cwd: dir.path }) - }).pipe(Effect.provide(locations.get(target))), - ) - yield* Effect.scoped( - Effect.gen(function* () { - const pty = yield* Pty.Service - yield* pty.write(info.id, "exit 7\r") + return yield* pty.create({ command: "/bin/sh", args: ["-c", "exit 7"], cwd: dir.path }) }).pipe(Effect.provide(locations.get(target))), ) const exited = yield* Queue.take(queue).pipe(Effect.timeout("5 seconds")) diff --git a/packages/core/test/kilocode/pty-smoke.test.ts b/packages/core/test/kilocode/pty-smoke.test.ts deleted file mode 100644 index 6103787d4d..0000000000 --- a/packages/core/test/kilocode/pty-smoke.test.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { describe, expect, test } from "bun:test" -import { marker } from "../../src/kilocode/pty/smoke" - -describe("PTY smoke output", () => { - test("detects a marker after PowerShell formatting", () => { - const output = - "\x1b[93mecho KILO_PTY_READY\r\n\x1b[mKILO_PTY_READY\r\n\x1b]0;Administrator: PowerShell\x07PS> " - - expect(marker(output)).toBe(true) - }) - - test("does not accept the echoed command", () => { - expect(marker("\x1b[93mecho KILO_PTY_READY\r\n\x1b[mPS> ")).toBe(false) - }) - - test("detects a marker around OSC and DCS sequences", () => { - const output = "\x1b]133;A\x07\x1bP+q4d73\x1b\\KILO_PTY_READY\r\n" - - expect(marker(output)).toBe(true) - }) -}) diff --git a/packages/kilo-docs/pages/contributing/development-environment.md b/packages/kilo-docs/pages/contributing/development-environment.md index a7c0c6830d..e2f77c6cc9 100644 --- a/packages/kilo-docs/pages/contributing/development-environment.md +++ b/packages/kilo-docs/pages/contributing/development-environment.md @@ -16,7 +16,7 @@ This document will help you set up your development environment and understand h Before you begin, make sure you have the following installed: 1. **Git** - For version control -2. **Bun 1.4.0+** - Required for installing dependencies and running scripts +2. **Bun 1.3.14+** - Required for installing dependencies and running scripts 3. **Visual Studio Code** - Our recommended IDE for development 4. **Java 21** - Required only when running JetBrains plugin checks or repo-level checks that include `@kilocode/kilo-jetbrains` diff --git a/packages/kilo-vscode/docs/mercury-next-edit-testing.html b/packages/kilo-vscode/docs/mercury-next-edit-testing.html index 599d30a4ba..5772426f25 100644 --- a/packages/kilo-vscode/docs/mercury-next-edit-testing.html +++ b/packages/kilo-vscode/docs/mercury-next-edit-testing.html @@ -276,7 +276,7 @@
  • VSCode ≥ 1.105.1 (matches kilocode's engines.vscode)
  • - Bun ≥ 1.4.0 (the build script checks the version) — install via + Bun ≥ 1.3.14 (the build script checks the version) — install via brew install bun or bun.sh
  • GitHub CLI (gh) — optional but makes the PR checkout one command
  • diff --git a/packages/opencode/script/build.ts b/packages/opencode/script/build.ts index b28e2ee196..dc246ffd65 100755 --- a/packages/opencode/script/build.ts +++ b/packages/opencode/script/build.ts @@ -24,7 +24,6 @@ import { stageBubblewrap } from "./kilocode/bubblewrap" import { LanceDBRuntime } from "../src/kilocode/lancedb" import { KiloSandboxWorker } from "./kilocode/kilo-sandbox-worker" import { KiloSandboxNetwork } from "./kilocode/kilo-sandbox-network" -import { KiloCliSmoke } from "./kilocode/cli-smoke" // kilocode_change end const singleFlag = process.argv.includes("--single") @@ -313,7 +312,7 @@ for (const item of targets) { // kilocode_change end format: "esm", minify: true, - // kilocode_change start - keep the compiled OpenTUI/Solid graph in one chunk to avoid blank startup frames. + // kilocode_change start - Bun 1.3.14 emits invalid cross-chunk exports in compiled binaries. splitting: false, // kilocode_change end compile: { @@ -396,9 +395,6 @@ for (const item of targets) { console.log("Models snapshot smoke test passed") await KiloSandboxWorker.smoke(binaryPath) console.log("Kilo sandbox mutation worker smoke test passed") - console.log(`Running smoke test: ${binaryPath} --pure __pty-smoke`) - await KiloCliSmoke.pty(binaryPath) - console.log("Packaged TUI smoke test passed") // kilocode_change end // kilocode_change start } catch (e) { diff --git a/packages/opencode/script/kilocode/cli-smoke.ts b/packages/opencode/script/kilocode/cli-smoke.ts deleted file mode 100644 index 7fdf834b4c..0000000000 --- a/packages/opencode/script/kilocode/cli-smoke.ts +++ /dev/null @@ -1,40 +0,0 @@ -import fs from "fs" -import os from "os" -import path from "path" - -export namespace KiloCliSmoke { - export async function pty(binary: string) { - const root = await fs.promises.mkdtemp(path.join(os.tmpdir(), "kilo-pty-")) - const env = { ...process.env } - delete env.KILO_MODELS_PATH - delete env.KILO_MODELS_URL - delete env.KILO_CONFIG - delete env.KILO_CONFIG_DIR - - try { - const proc = Bun.spawn([binary, "--pure", "__pty-smoke"], { - env: { - ...env, - HOME: root, - XDG_DATA_HOME: path.join(root, "data"), - XDG_CACHE_HOME: path.join(root, "cache"), - XDG_CONFIG_HOME: path.join(root, "config"), - XDG_STATE_HOME: path.join(root, "state"), - KILO_PTY_SMOKE: "1", - KILO_NO_DAEMON: "1", - KILO_DISABLE_MODELS_FETCH: "1", - KILO_DISABLE_PROJECT_CONFIG: "1", - KILO_CONFIG_CONTENT: "{}", - KILO_AUTH_CONTENT: "{}", - }, - stdout: "inherit", - stderr: "inherit", - windowsHide: true, - }) - const code = await proc.exited - if (code !== 0) throw new Error(`Compiled TUI smoke test exited with code ${code}`) - } finally { - await fs.promises.rm(root, { recursive: true, force: true }) - } - } -} diff --git a/packages/opencode/src/bun-compat.d.ts b/packages/opencode/src/bun-compat.d.ts deleted file mode 100644 index 03de3f4fc9..0000000000 --- a/packages/opencode/src/bun-compat.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -// kilocode_change - new file -// Bun 1.4 narrows NodeJS.Process event overloads. -declare global { - namespace NodeJS { - interface Process { - on(event: string | symbol, listener: (...args: never[]) => void): this - off(event: string | symbol, listener: (...args: never[]) => void): this - } - } -} - -export {} diff --git a/patches/@ff-labs%2Ffff-bun@0.9.4.patch b/patches/@ff-labs%2Ffff-bun@0.9.4.patch index 40d4cd8151..0216f860ca 100644 --- a/patches/@ff-labs%2Ffff-bun@0.9.4.patch +++ b/patches/@ff-labs%2Ffff-bun@0.9.4.patch @@ -29,109 +29,3 @@ index 3454256..6dca25a 100644 if (existsSync(binaryPath)) { return binaryPath; -diff --git a/src/ffi.ts b/src/ffi.ts ---- a/src/ffi.ts -+++ b/src/ffi.ts -@@ -328,6 +328,10 @@ - return new TextEncoder().encode(`${s}\0`); - } -- -+ -+function asResult(value: Pointer | bigint | null): Pointer | null { -+ return value as unknown as Pointer | null; -+} -+ - /** - * Convert snake_case keys to camelCase recursively - */ -@@ -1121,4 +1126,4 @@ - minComboCount, - ); -- return parseSearchResult(resultPtr); -+ return parseSearchResult(asResult(resultPtr)); - } -@@ -1145,4 +1150,4 @@ - pageSize, - ); -- return parseSearchResult(resultPtr); -+ return parseSearchResult(asResult(resultPtr)); - } -@@ -1168,4 +1173,4 @@ - pageSize, - ); -- return parseDirSearchResult(resultPtr); -+ return parseDirSearchResult(asResult(resultPtr)); - } -@@ -1195,4 +1200,4 @@ - minComboCount, - ); -- return parseMixedSearchResult(resultPtr); -+ return parseMixedSearchResult(asResult(resultPtr)); - } -@@ -1230,4 +1235,4 @@ - classifyDefinitions, - ); -- return parseGrepResult(resultPtr); -+ return parseGrepResult(asResult(resultPtr)); - } -@@ -1265,4 +1270,4 @@ - classifyDefinitions, - ); -- return parseGrepResult(resultPtr); -+ return parseGrepResult(asResult(resultPtr)); - } -@@ -1274,4 +1279,4 @@ - const library = loadLibrary(); - const resultPtr = library.symbols.fff_scan_files(handle); -- return parseVoidResult(resultPtr); -+ return parseVoidResult(asResult(resultPtr)); - } -@@ -1291,4 +1296,4 @@ - const library = loadLibrary(); - const resultPtr = library.symbols.fff_get_base_path(handle); -- return parseStringResult(resultPtr); -+ return parseStringResult(asResult(resultPtr)); - } -@@ -1336,4 +1341,4 @@ - const library = loadLibrary(); - const resultPtr = library.symbols.fff_wait_for_scan(handle, BigInt(timeoutMs)); -- return parseBoolResult(resultPtr); -+ return parseBoolResult(asResult(resultPtr)); - } -@@ -1351,4 +1356,4 @@ - const library = loadLibrary(); - const resultPtr = library.symbols.fff_restart_index(handle, ptr(encodeString(newPath))); -- return parseVoidResult(resultPtr); -+ return parseVoidResult(asResult(resultPtr)); - } -@@ -1360,4 +1365,4 @@ - const library = loadLibrary(); - const resultPtr = library.symbols.fff_refresh_git_status(handle); -- return parseIntResult(resultPtr); -+ return parseIntResult(asResult(resultPtr)); - } -@@ -1377,4 +1382,4 @@ - ptr(encodeString(filePath)), - ); -- return parseBoolResult(resultPtr); -+ return parseBoolResult(asResult(resultPtr)); - } -@@ -1392,4 +1397,4 @@ - const library = loadLibrary(); - const resultPtr = library.symbols.fff_get_historical_query(handle, BigInt(offset)); -- return parseStringResult(resultPtr); -+ return parseStringResult(asResult(resultPtr)); - } -@@ -1306,3 +1311,3 @@ - const library = loadLibrary(); - const resultPtr = library.symbols.fff_get_scan_progress(handle); -- const envelope = readResultEnvelope(resultPtr); -+ const envelope = readResultEnvelope(asResult(resultPtr)); -@@ -1406,6 +1411,6 @@ - const library = loadLibrary(); - const resultPtr = library.symbols.fff_health_check( - handle ?? (0 as unknown as Pointer), - ptr(encodeString(testPath)), - ); -- return parseJsonResult(resultPtr); -+ return parseJsonResult(asResult(resultPtr)); diff --git a/script/upstream/package.json b/script/upstream/package.json index 8d2f3dc1c8..ee3cc80c2b 100644 --- a/script/upstream/package.json +++ b/script/upstream/package.json @@ -22,7 +22,7 @@ "ts-morph": "^24.0.0" }, "devDependencies": { - "@types/bun": "1.4.0" + "@types/bun": "1.3.14" }, "peerDependencies": {} }