Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

companion: address first review findings

Barack Sokullu60cc51d71579
diff --git a/webbrain-systray/README.md b/webbrain-systray/README.md
index 532ee0f58..6adaf5abc 100644
--- a/webbrain-systray/README.md
+++ b/webbrain-systray/README.md
@@ -21,7 +21,8 @@ WebBrain's d1 decision model natively.
Apple Silicon. The companion sizes it to your machine and decides whether the
vision projector runs on the GPU, on the CPU, or not at all.
- **d1 decision model.** `webbrain-one/d1-browser-decision-fp32` on ONNX Runtime,
- answering the same requests as WebBrain's in-browser WebGPU adapter.
+ answering the same requests as WebBrain's in-browser WebGPU adapter on
+ Windows, Linux and Apple Silicon Macs. The Intel Mac build does not include d1.
## Install
@@ -39,7 +40,7 @@ language, network access, the port, the log file and *Quit*.
| System | Package | First start |
|---|---|---|
| Windows 10/11 (x64, Arm64) | `WebBrain-Companion-*-windows-setup.exe` | One installer for both architectures. It installs for the current user (no administrator prompt) into `%LOCALAPPDATA%\Programs\WebBrain Companion`, adds a Start menu entry and an uninstaller in *Settings, Apps*. Until it is code-signed, SmartScreen says *Windows protected your PC*: *More info*, *Run anyway*. |
-| macOS 12+ (Apple Silicon and Intel) | `WebBrain-Companion-*-macos-universal.zip` | Move *WebBrain Companion.app* to Applications first (run from Downloads, macOS uses a temporary copy and start at login cannot work). The build is ad-hoc signed, not notarized: allow it once in *System Settings, Privacy & Security* (*Open Anyway*); on macOS 14 and earlier Control-click it and choose *Open*. If the menu bar is full, macOS hides the icon; the panel says so, and opening the app again always brings the panel back. |
+| macOS 12+ (Apple Silicon and Intel; d1 requires Apple Silicon) | `WebBrain-Companion-*-macos-universal.zip` | Move *WebBrain Companion.app* to Applications first (run from Downloads, macOS uses a temporary copy and start at login cannot work). The build is ad-hoc signed, not notarized: allow it once in *System Settings, Privacy & Security* (*Open Anyway*); on macOS 14 and earlier Control-click it and choose *Open*. If the menu bar is full, macOS hides the icon; the panel says so, and opening the app again always brings the panel back. |
| Linux (x64, Arm64) | `WebBrain-Companion-*-linux-*.tar.gz` | Run `webbrain-companion`. The tray uses StatusNotifierItem (KDE, XFCE, GNOME with the AppIndicator extension). |
`--headless` runs the proxy and APIs without a tray icon, `--background` starts
@@ -100,6 +101,11 @@ SHA-256; interrupted downloads resume.
## Decision model (d1)
+The native d1 model is available on Windows and Linux (x64 and Arm64) and on
+Apple Silicon Macs. The Intel Mac app runs the proxy, tray and local Bonsai
+model, but cannot install d1 because the pinned ONNX Runtime release has no
+Intel macOS archive.
+
```bash
curl http://127.0.0.1:8327/companion/v1/decide \
-H "Content-Type: application/json" \
diff --git a/webbrain-systray/internal/d1/manager.go b/webbrain-systray/internal/d1/manager.go
index 96407184c..520963d32 100644
--- a/webbrain-systray/internal/d1/manager.go
+++ b/webbrain-systray/internal/d1/manager.go
@@ -6,9 +6,12 @@ package d1
import (
"context"
+ "crypto/sha256"
+ "encoding/hex"
"encoding/json"
"errors"
"fmt"
+ "io"
"os"
"path/filepath"
"runtime"
@@ -122,10 +125,18 @@ type Manager struct {
cancel context.CancelFunc
eng *engine
evalMu sync.Mutex
+ verifyMu sync.Mutex
+ verified map[string]verifiedFile
requests int64
latency float64
}
+type verifiedFile struct {
+ size int64
+ modTime time.Time
+ sha string
+}
+
func NewManager(store *settings.Store, onChange func()) *Manager {
return &Manager{store: store, onChange: onChange, phase: PhaseIdle}
}
@@ -141,13 +152,52 @@ func okFile(path string, size int64) bool {
return err == nil && st.Size() == size
}
+// validFile checks the pinned hash once per unchanged file in this process.
+// Status calls this often, so rehashing the 1.9 GB model on every refresh
+// would make the panel unusable.
+func (m *Manager) validFile(path string, size int64, sha string) bool {
+ m.verifyMu.Lock()
+ defer m.verifyMu.Unlock()
+ st, err := os.Stat(path)
+ if err != nil || !st.Mode().IsRegular() || st.Size() != size {
+ delete(m.verified, path)
+ return false
+ }
+ if sha == "" {
+ return true
+ }
+ if v, ok := m.verified[path]; ok && v.size == size && v.modTime.Equal(st.ModTime()) && v.sha == sha {
+ return true
+ }
+ delete(m.verified, path)
+ f, err := os.Open(path)
+ if err != nil {
+ return false
+ }
+ h := sha256.New()
+ _, err = io.Copy(h, f)
+ _ = f.Close()
+ if err != nil || !strings.EqualFold(hex.EncodeToString(h.Sum(nil)), sha) {
+ return false
+ }
+ after, err := os.Stat(path)
+ if err != nil || after.Size() != size || !after.ModTime().Equal(st.ModTime()) {
+ return false
+ }
+ if m.verified == nil {
+ m.verified = make(map[string]verifiedFile)
+ }
+ m.verified[path] = verifiedFile{size: size, modTime: st.ModTime(), sha: sha}
+ return true
+}
+
// Installed reports whether the model files and runtime are present.
func (m *Manager) Installed() bool {
if _, ok := ortForPlatform(); !ok {
return false
}
for _, f := range modelFiles {
- if !okFile(filepath.Join(modelDir(), filepath.FromSlash(f.name)), f.size) {
+ if !m.validFile(filepath.Join(modelDir(), filepath.FromSlash(f.name)), f.size, f.sha) {
return false
}
}
@@ -161,7 +211,7 @@ func (m *Manager) Status() Status {
License: "LFM Open License v1.0"}
for _, f := range modelFiles {
p := filepath.Join(modelDir(), filepath.FromSlash(f.name))
- if okFile(p, f.size) {
+ if m.validFile(p, f.size, f.sha) {
st.DiskBytes += f.size
continue
}
@@ -265,12 +315,12 @@ func (m *Manager) install(ctx context.Context, asset ortAsset) error {
}
var total, done int64
for _, it := range items {
- if !okFile(it.dest, it.size) {
+ if !m.validFile(it.dest, it.size, it.sha) {
total += it.size
}
}
for _, it := range items {
- if okFile(it.dest, it.size) {
+ if m.validFile(it.dest, it.size, it.sha) {
continue
}
var before int64
diff --git a/webbrain-systray/internal/d1/manager_files_test.go b/webbrain-systray/internal/d1/manager_files_test.go
new file mode 100644
index 000000000..5fa41bf97
--- /dev/null
+++ b/webbrain-systray/internal/d1/manager_files_test.go
@@ -0,0 +1,42 @@
+package d1
+
+import (
+ "crypto/sha256"
+ "encoding/hex"
+ "os"
+ "path/filepath"
+ "testing"
+ "time"
+)
+
+func TestValidFileRejectsSameSizeCorruption(t *testing.T) {
+ path := filepath.Join(t.TempDir(), "model.data")
+ good := []byte("pinned model contents")
+ sum := sha256.Sum256(good)
+ want := hex.EncodeToString(sum[:])
+ m := NewManager(nil, nil)
+ bad := []byte("xinned model contents")
+ if err := os.WriteFile(path, bad, 0o600); err != nil {
+ t.Fatal(err)
+ }
+ if m.validFile(path, int64(len(good)), want) {
+ t.Fatal("same-sized corrupt file passed checksum verification")
+ }
+ if err := os.WriteFile(path, good, 0o600); err != nil {
+ t.Fatal(err)
+ }
+ if !m.validFile(path, int64(len(good)), want) {
+ t.Fatal("valid file did not pass checksum verification")
+ }
+ // A modified cached file must be rehashed on the next status or load.
+ if err := os.WriteFile(path, bad, 0o600); err != nil {
+ t.Fatal(err)
+ }
+ modified := time.Now().Add(time.Minute)
+ if err := os.Chtimes(path, modified, modified); err != nil {
+ t.Fatal(err)
+ }
+ if m.validFile(path, int64(len(good)), want) {
+ t.Fatal("changed file reused a previous successful checksum")
+ }
+}
diff --git a/webbrain-systray/internal/instance/lock.go b/webbrain-systray/internal/instance/lock.go
new file mode 100644
index 000000000..dc42f108d
--- /dev/null
+++ b/webbrain-systray/internal/instance/lock.go
@@ -0,0 +1,45 @@
+// Package instance keeps one companion process per user data directory.
+package instance
+
+import (
+ "errors"
+ "os"
+)
+
+// ErrHeld means another process owns the lock. The file itself is left in
+// place: the operating system releases the lock if that process exits.
+var ErrHeld = errors.New("another companion instance holds the lock")
+
+type Lock struct {
+ file *os.File
+}
+
+// TryAcquire takes an exclusive, non-blocking OS lock on a persistent file.
+func TryAcquire(path string) (*Lock, error) {
+ f, err := os.OpenFile(path, os.O_CREATE|os.O_RDWR, 0o600)
+ if err != nil {
+ return nil, err
+ }
+ held, err := lock(f)
+ if err != nil || !held {
+ _ = f.Close()
+ if err != nil {
+ return nil, err
+ }
+ return nil, ErrHeld
+ }
+ return &Lock{file: f}, nil
+}
+
+func (l *Lock) Close() error {
+ if l == nil || l.file == nil {
+ return nil
+ }
+ err := unlock(l.file)
+ closeErr := l.file.Close()
+ l.file = nil
+ if err != nil {
+ return err
+ }
+ return closeErr
+}
diff --git a/webbrain-systray/internal/instance/lock_test.go b/webbrain-systray/internal/instance/lock_test.go
new file mode 100644
index 000000000..937c1501a
--- /dev/null
+++ b/webbrain-systray/internal/instance/lock_test.go
@@ -0,0 +1,30 @@
+package instance
+
+import (
+ "errors"
+ "path/filepath"
+ "testing"
+)
+
+func TestExclusiveLockAndRelease(t *testing.T) {
+ path := filepath.Join(t.TempDir(), "companion.lock")
+ first, err := TryAcquire(path)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer first.Close()
+ if second, err := TryAcquire(path); !errors.Is(err, ErrHeld) {
+ if second != nil {
+ second.Close()
+ }
+ t.Fatalf("second acquisition: got %v, want ErrHeld", err)
+ }
+ if err := first.Close(); err != nil {
+ t.Fatal(err)
+ }
+ third, err := TryAcquire(path)
+ if err != nil {
+ t.Fatalf("could not acquire after release: %v", err)
+ }
+ defer third.Close()
+}
diff --git a/webbrain-systray/internal/instance/lock_unix.go b/webbrain-systray/internal/instance/lock_unix.go
new file mode 100644
index 000000000..1e95a1814
--- /dev/null
+++ b/webbrain-systray/internal/instance/lock_unix.go
@@ -0,0 +1,21 @@
+//go:build !windows
+
+package instance
+
+import (
+ "errors"
+ "os"
+ "syscall"
+)
+
+func lock(f *os.File) (bool, error) {
+ err := syscall.Flock(int(f.Fd()), syscall.LOCK_EX|syscall.LOCK_NB)
+ if errors.Is(err, syscall.EWOULDBLOCK) || errors.Is(err, syscall.EAGAIN) {
+ return false, nil
+ }
+ return err == nil, err
+}
+
+func unlock(f *os.File) error {
+ return syscall.Flock(int(f.Fd()), syscall.LOCK_UN)
+}
diff --git a/webbrain-systray/internal/instance/lock_windows.go b/webbrain-systray/internal/instance/lock_windows.go
new file mode 100644
index 000000000..918d91da5
--- /dev/null
+++ b/webbrain-systray/internal/instance/lock_windows.go
@@ -0,0 +1,24 @@
+//go:build windows
+
+package instance
+
+import (
+ "errors"
+ "os"
+
+ "golang.org/x/sys/windows"
+)
+
+func lock(f *os.File) (bool, error) {
+ var offset windows.Overlapped
+ err := windows.LockFileEx(windows.Handle(f.Fd()), windows.LOCKFILE_EXCLUSIVE_LOCK|windows.LOCKFILE_FAIL_IMMEDIATELY, 0, 1, 0, &offset)
+ if errors.Is(err, windows.ERROR_LOCK_VIOLATION) {
+ return false, nil
+ }
+ return err == nil, err
+}
+
+func unlock(f *os.File) error {
+ var offset windows.Overlapped
+ return windows.UnlockFileEx(windows.Handle(f.Fd()), 0, 1, 0, &offset)
+}
diff --git a/webbrain-systray/main.go b/webbrain-systray/main.go
index 9cfa562fe..04acbe772 100644
--- a/webbrain-systray/main.go
+++ b/webbrain-systray/main.go
@@ -6,6 +6,7 @@ package main
import (
"encoding/json"
+ "errors"
"flag"
"fmt"
"net/http"
@@ -19,6 +20,7 @@ import (
"github.com/esokullu/webbrain-systray/internal/app"
"github.com/esokullu/webbrain-systray/internal/icons"
+ "github.com/esokullu/webbrain-systray/internal/instance"
"github.com/esokullu/webbrain-systray/internal/logx"
"github.com/esokullu/webbrain-systray/internal/osutil"
"github.com/esokullu/webbrain-systray/internal/paths"
@@ -36,8 +38,8 @@ type runtimeInfo struct {
func runtimeFile() string { return filepath.Join(paths.Config(), "companion.runtime.json") }
// existingInstance finds a companion that is already running for this user.
-func existingInstance(store *settings.Store) (int, bool) {
- ports := []int{store.Get().Port}
+func existingInstance(s settings.Settings) (int, bool) {
+ ports := []int{s.Port}
if data, err := os.ReadFile(runtimeFile()); err == nil {
var ri runtimeInfo
if json.Unmarshal(data, &ri) == nil && ri.Port > 0 && ri.Port != ports[0] {
@@ -62,6 +64,27 @@ func existingInstance(store *settings.Store) (int, bool) {
return 0, false
}
+// A second launch waits for the lock holder to finish starting, then opens
+// its panel. Reading settings here must stay read-only: the owner may still
+// be creating its settings and proxy files.
+func waitForInstance(timeout time.Duration) (int, settings.Settings, bool) {
+ deadline := time.Now().Add(timeout)
+ for {
+ if data, err := os.ReadFile(paths.Settings()); err == nil {
+ var s settings.Settings
+ if json.Unmarshal(data, &s) == nil && s.PanelToken != "" {
+ if port, ok := existingInstance(s); ok {
+ return port, s, true
+ }
+ }
+ }
+ if time.Now().After(deadline) {
+ return 0, settings.Settings{}, false
+ }
+ time.Sleep(250 * time.Millisecond)
+ }
+}
+
func isTerminal() bool {
st, err := os.Stdout.Stat()
return err == nil && st.Mode()&os.ModeCharDevice != 0
@@ -81,6 +104,23 @@ func main() {
fmt.Fprintln(os.Stderr, "cannot create data folders:", err)
os.Exit(1)
}
+ instanceLock, err := instance.TryAcquire(paths.LockFile())
+ if errors.Is(err, instance.ErrHeld) {
+ if port, s, ok := waitForInstance(15 * time.Second); ok {
+ if !*background {
+ url := fmt.Sprintf("http://127.0.0.1:%d/companion/#k=%s", port, s.PanelToken)
+ _ = osutil.OpenAppWindow(url, 460, 820)
+ }
+ return
+ }
+ fmt.Fprintln(os.Stderr, "another companion instance is starting; try opening the app again")
+ os.Exit(1)
+ }
+ if err != nil {
+ fmt.Fprintln(os.Stderr, "cannot lock companion data:", err)
+ os.Exit(1)
+ }
+ defer instanceLock.Close()
// logx redirects os.Stdout/os.Stderr into the log file when no terminal is
// attached; keep the originals for the headless banner and fatal errors.
stdout, stderr := os.Stdout, os.Stderr
@@ -91,7 +131,7 @@ func main() {
fmt.Fprintln(stderr, "cannot read settings:", err)
os.Exit(1)
}
- if port, ok := existingInstance(store); ok {
+ if port, ok := existingInstance(store.Get()); ok {
url := fmt.Sprintf("http://127.0.0.1:%d/companion/#k=%s", port, store.Get().PanelToken)
if !*background {
_ = osutil.OpenAppWindow(url, 460, 820)
diff --git a/webbrain-systray/main_test.go b/webbrain-systray/main_test.go
new file mode 100644
index 000000000..701e24efa
--- /dev/null
+++ b/webbrain-systray/main_test.go
@@ -0,0 +1,50 @@
+package main
+
+import (
+ "encoding/json"
+ "net"
+ "net/http"
+ "net/http/httptest"
+ "os"
+ "strconv"
+ "testing"
+ "time"
+
+ "github.com/esokullu/webbrain-systray/internal/paths"
+ "github.com/esokullu/webbrain-systray/internal/settings"
+)
+
+func TestWaitForStartingInstance(t *testing.T) {
+ t.Setenv("WBC_HOME", t.TempDir())
+ s := settings.Settings{Port: 0, PanelToken: "test-panel-token"}
+ data, err := json.Marshal(s)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err := os.WriteFile(paths.Settings(), data, 0o600); err != nil {
+ t.Fatal(err)
+ }
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ if r.URL.Path == "/companion/v1/info" {
+ _, _ = w.Write([]byte(`{"app":"webbrain-companion"}`))
+ }
+ }))
+ defer server.Close()
+ _, rawPort, err := net.SplitHostPort(server.Listener.Addr().String())
+ if err != nil {
+ t.Fatal(err)
+ }
+ port, err := strconv.Atoi(rawPort)
+ if err != nil {
+ t.Fatal(err)
+ }
+ go func() {
+ time.Sleep(100 * time.Millisecond)
+ data, _ := json.Marshal(runtimeInfo{Port: port})
+ _ = os.WriteFile(runtimeFile(), data, 0o600)
+ }()
+ gotPort, gotSettings, ok := waitForInstance(2 * time.Second)
+ if !ok || gotPort != port || gotSettings.PanelToken != s.PanelToken {
+ t.Fatalf("waitForInstance: got port %d, token %q, found %v", gotPort, gotSettings.PanelToken, ok)
+ }
+}
diff --git a/webbrain-systray/web/build.py b/webbrain-systray/web/build.py
index c33f42a73..59246ac5c 100644
--- a/webbrain-systray/web/build.py
+++ b/webbrain-systray/web/build.py
@@ -113,7 +113,7 @@ T = {
"tokens": "{} tokens",
"local_note": "Worked out by the companion's planner from total and free memory; the numbers on your machine at install time decide. On Apple Silicon the MLX pack carries its own vision tower, so images are always on.",
"d1_h": "WebBrain's decision model, outside the browser",
- "d1_p": "WebBrain's d1 model answers yes/no, choice and score questions about a page and up to four screenshots, such as whether a task is finished. The companion runs it on ONNX Runtime and answers over HTTP, so a browser tab doesn't have to load 1.9 GB. Its Go port returns the same tokens and probabilities as WebBrain's JavaScript adapter.",
+ "d1_p": "WebBrain's d1 model answers yes/no, choice and score questions about a page and up to four screenshots, such as whether a task is finished. The companion runs it on ONNX Runtime and answers over HTTP, so a browser tab doesn't have to load 1.9 GB. Its Go port returns the same tokens and probabilities as WebBrain's JavaScript adapter. Native d1 is available on Windows, Linux and Apple Silicon Macs; it is unavailable on Intel Macs.",
"d1_ask": "Ask",
"d1_answer": "Answer (273 ms on the CPU runtime)",
"connect_h": "Connect WebBrain",
@@ -126,7 +126,7 @@ T = {
"download_h": "Download",
"download_p": f"Version {VERSION}. Each package holds a single program; your settings and logins live in your user folder.",
"yours": "Your system",
- "mac_req": "macOS 12 or later, Apple Silicon and Intel",
+ "mac_req": "macOS 12 or later, Apple Silicon and Intel (d1 requires Apple Silicon)",
"mac_file": "Universal app",
"mac_how": "Move WebBrain Companion to Applications. The build is not notarized by Apple: the first time, allow it in System Settings, Privacy & Security (Open Anyway). On macOS 14 and earlier, Control-click it and choose Open.",
"win_req": "Windows 10 and 11, x64 and Arm64",
@@ -200,7 +200,7 @@ T = {
"tokens": "{} token",
"local_note": "Companion'ın planlayıcısı toplam ve boş belleğe bakarak hesaplar; son kararı kurulum anında makinendeki değerler verir. Apple Silicon'da MLX paketi kendi görsel katmanını taşır, görsel girdi her zaman açıktır.",
"d1_h": "WebBrain'in karar modeli, tarayıcının dışında",
- "d1_p": "WebBrain'in d1 modeli bir sayfa ve en fazla dört ekran görüntüsü hakkında evet/hayır, seçim ve puan sorularını yanıtlar; örneğin bir görevin bitip bitmediğini. Companion modeli ONNX Runtime ile çalıştırır ve HTTP üzerinden yanıtlar; böylece 1,9 GB'lık modeli bir tarayıcı sekmesi yüklemek zorunda kalmaz. Go'ya taşınan sürüm, WebBrain'in JavaScript adaptörüyle aynı token'ları ve olasılıkları verir.",
+ "d1_p": "WebBrain'in d1 modeli bir sayfa ve en fazla dört ekran görüntüsü hakkında evet/hayır, seçim ve puan sorularını yanıtlar; örneğin bir görevin bitip bitmediğini. Companion modeli ONNX Runtime ile çalıştırır ve HTTP üzerinden yanıtlar; böylece 1,9 GB'lık modeli bir tarayıcı sekmesi yüklemek zorunda kalmaz. Go'ya taşınan sürüm, WebBrain'in JavaScript adaptörüyle aynı token'ları ve olasılıkları verir. Yerel d1 Windows, Linux ve Apple Silicon Mac'lerde kullanılabilir; Intel Mac'lerde kullanılamaz.",
"d1_ask": "Soru",
"d1_answer": "Yanıt (CPU'da 273 ms)",
"connect_h": "WebBrain'i bağla",
@@ -213,7 +213,7 @@ T = {
"download_h": "İndir",
"download_p": f"Sürüm {VERSION}. Her paket tek bir program içerir; ayarların ve girişlerin kullanıcı klasöründe durur.",
"yours": "Senin sistemin",
- "mac_req": "macOS 12 ve sonrası, Apple Silicon ve Intel",
+ "mac_req": "macOS 12 ve sonrası, Apple Silicon ve Intel (d1 için Apple Silicon gerekli)",
"mac_file": "Universal uygulama",
"mac_how": "WebBrain Companion'ı Uygulamalar klasörüne taşı. Sürüm Apple onayından (notarization) geçmedi: ilk açılışta Sistem Ayarları, Gizlilik ve Güvenlik bölümünden izin ver (Yine de Aç). macOS 14 ve öncesinde Control tuşuyla tıklayıp Aç'ı seçmen yeterli.",
"win_req": "Windows 10 ve 11, x64 ve Arm64",
diff --git a/webbrain-systray/web/index.html b/webbrain-systray/web/index.html
index 3152dc814..788c0fd75 100644
--- a/webbrain-systray/web/index.html
+++ b/webbrain-systray/web/index.html
@@ -122,7 +122,7 @@
<div class="wrap">
<h2 id="d1-h">WebBrain&#x27;s decision model, outside the browser</h2>
<div class="split">
- <p class="intro">WebBrain&#x27;s d1 model answers yes/no, choice and score questions about a page and up to four screenshots, such as whether a task is finished. The companion runs it on ONNX Runtime and answers over HTTP, so a browser tab doesn&#x27;t have to load 1.9 GB. Its Go port returns the same tokens and probabilities as WebBrain&#x27;s JavaScript adapter.</p>
+ <p class="intro">WebBrain&#x27;s d1 model answers yes/no, choice and score questions about a page and up to four screenshots, such as whether a task is finished. The companion runs it on ONNX Runtime and answers over HTTP, so a browser tab doesn&#x27;t have to load 1.9 GB. Its Go port returns the same tokens and probabilities as WebBrain&#x27;s JavaScript adapter. Native d1 is available on Windows, Linux and Apple Silicon Macs; it is unavailable on Intel Macs.</p>
<div>
<p class="code-label">Ask</p>
<pre><code>curl http://127.0.0.1:8327/companion/v1/decide \
@@ -167,7 +167,7 @@
<p class="intro">Version 0.1.2. Each package holds a single program; your settings and logins live in your user folder.</p>
<div class="downloads">
<div class="dl" data-os="mac">
- <div><h3>macOS</h3><p class="req">macOS 12 or later, Apple Silicon and Intel</p><span class="yours">Your system</span></div>
+ <div><h3>macOS</h3><p class="req">macOS 12 or later, Apple Silicon and Intel (d1 requires Apple Silicon)</p><span class="yours">Your system</span></div>
<ul class="files"><li><a href="https://github.com/esokullu/webbrain-systray/releases/download/v0.1.2/WebBrain-Companion-0.1.2-macos-universal.zip">Universal app <small>zip, 36 MB</small></a></li></ul>
<p class="how">Move WebBrain Companion to Applications. The build is not notarized by Apple: the first time, allow it in System Settings, Privacy &amp; Security (Open Anyway). On macOS 14 and earlier, Control-click it and choose Open.</p>
</div>
diff --git a/webbrain-systray/web/tr/index.html b/webbrain-systray/web/tr/index.html
index 16eaaed60..73760505d 100644
--- a/webbrain-systray/web/tr/index.html
+++ b/webbrain-systray/web/tr/index.html
@@ -122,7 +122,7 @@
<div class="wrap">
<h2 id="d1-h">WebBrain&#x27;in karar modeli, tarayıcının dışında</h2>
<div class="split">
- <p class="intro">WebBrain&#x27;in d1 modeli bir sayfa ve en fazla dört ekran görüntüsü hakkında evet/hayır, seçim ve puan sorularını yanıtlar; örneğin bir görevin bitip bitmediğini. Companion modeli ONNX Runtime ile çalıştırır ve HTTP üzerinden yanıtlar; böylece 1,9 GB&#x27;lık modeli bir tarayıcı sekmesi yüklemek zorunda kalmaz. Go&#x27;ya taşınan sürüm, WebBrain&#x27;in JavaScript adaptörüyle aynı token&#x27;ları ve olasılıkları verir.</p>
+ <p class="intro">WebBrain&#x27;in d1 modeli bir sayfa ve en fazla dört ekran görüntüsü hakkında evet/hayır, seçim ve puan sorularını yanıtlar; örneğin bir görevin bitip bitmediğini. Companion modeli ONNX Runtime ile çalıştırır ve HTTP üzerinden yanıtlar; böylece 1,9 GB&#x27;lık modeli bir tarayıcı sekmesi yüklemek zorunda kalmaz. Go&#x27;ya taşınan sürüm, WebBrain&#x27;in JavaScript adaptörüyle aynı token&#x27;ları ve olasılıkları verir. Yerel d1 Windows, Linux ve Apple Silicon Mac&#x27;lerde kullanılabilir; Intel Mac&#x27;lerde kullanılamaz.</p>
<div>
<p class="code-label">Soru</p>
<pre><code>curl http://127.0.0.1:8327/companion/v1/decide \
@@ -167,7 +167,7 @@
<p class="intro">Sürüm 0.1.2. Her paket tek bir program içerir; ayarların ve girişlerin kullanıcı klasöründe durur.</p>
<div class="downloads">
<div class="dl" data-os="mac">
- <div><h3>macOS</h3><p class="req">macOS 12 ve sonrası, Apple Silicon ve Intel</p><span class="yours">Senin sistemin</span></div>
+ <div><h3>macOS</h3><p class="req">macOS 12 ve sonrası, Apple Silicon ve Intel (d1 için Apple Silicon gerekli)</p><span class="yours">Senin sistemin</span></div>
<ul class="files"><li><a href="https://github.com/esokullu/webbrain-systray/releases/download/v0.1.2/WebBrain-Companion-0.1.2-macos-universal.zip">Universal uygulama <small>zip, 36 MB</small></a></li></ul>
<p class="how">WebBrain Companion&#x27;ı Uygulamalar klasörüne taşı. Sürüm Apple onayından (notarization) geçmedi: ilk açılışta Sistem Ayarları, Gizlilik ve Güvenlik bölümünden izin ver (Yine de Aç). macOS 14 ve öncesinde Control tuşuyla tıklayıp Aç&#x27;ı seçmen yeterli.</p>
</div>