mirror of
https://github.com/cline/cline.git
synced 2026-10-25 18:33:44 +08:00
* chore: upgrade Bun toolchain and embedded runtime to 1.4.2 Bun 1.4.1+ writes a valid ad-hoc Mach-O signature for bun build --compile output, so the CLI is no longer SIGKILLed on macOS 27, and 1.4 ships x64 runtimes as baseline-only, so compiled binaries run on pre-AVX2 CPUs. Pins engines.bun, packageManager, .tool-versions, every setup-bun step, and @types/bun. The lockfile only moves @types/bun/bun-types so the AI SDK hoisting is left untouched. * fix(core): swallow reader.cancel() rejection in web_fetch size guard Bun 1.4 rejects cancel() on an errored stream, which surfaced as an unhandled rejection right before the size-limit error was thrown. * build(cli): boot the hub from the compiled binary as a smoke test --version only proves the executable launches. Bun 1.4.1/1.4.2 have a compile-time chunk ordering regression with splitting: true that only shows up once real modules load, so start the hub daemon from the freshly compiled host binary in an isolated data dir and require a healthy status before the build is considered good. * test(core): stop asserting the forced-exit path in hub shutdown e2e Under Bun 1.3 http.Server.close() never settled while a WebSocket was open, so the daemon always exited through the 2s deadline and the e2e asserted the forced-exit log line. Bun 1.4 completes the graceful close (~50ms instead of ~2s in a side-by-side probe), so that line no longer appears. The exit code, timing, discovery cleanup, and endpoint checks still cover the behavior; the forced path stays covered by shutdown-coordinator.test.ts. * build(cli): isolate the smoke test hub from CLINE_HUB_DISCOVERY_PATH The env var overrides the data-dir-derived discovery record, so an inherited value would have pointed hub start/stop at a real hub.
Preview
Architecture Overview
Any Client (CLI, VS Code, agents)
│
│ ws:// ui.notify / ui.show_window commands
▼
Hub WebSocket Server (@cline/core/hub/server.ts)
│
│ broadcasts ui.notify / ui.show_window events to ALL subscribers
▼
Menu Bar Sidecar (apps/examples/menubar/sidecar/index.ts) ← TypeScript/Bun process
│
│ JSON lines on stdout: hub_state / notification / ready
▼
Rust Tauri App (apps/examples/menubar/src-tauri/src/main.rs)
│
├── Hub Monitor Window (ui/index.html)
│ ● Live hub status, uptime, clients, sessions
│ ● Running session tracker and inspector
│ ● Recent events and background-session launcher
│
│
├── System Tray Icon with dynamic menu
│ ● Hub Connected — 3 clients, 2 sessions
│ ─────────────────
│ 5 notifications
│ ─────────────────
│ Quit Cline Hub
│
└── Logs notifications to stderr (with severity)
Dev Commands
From apps/examples/menubar/:
bun run dev:ui- run only the Hub Monitor UI athttp://127.0.0.1:3466/with preview databun run dev- run the full Tauri app with the real hub sidecarbun run typecheck- TypeScript check
When the menubar starts the shared hub, it also supplies the CLI command used
to restore persisted connectors. Development builds use
apps/cli/src/index.ts when it is present; packaged builds use cline from
PATH, or the executable specified by CLINE_CLI_PATH.
