Skip to content

Commit 10cd1fb

Browse files
docs(win): add Windows support matrix + test plan/models
Untracked working docs for the Windows-support effort. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016wZRqu5sTN3AR1x6csoZ65
1 parent 6759e12 commit 10cd1fb

3 files changed

Lines changed: 677 additions & 0 deletions

File tree

docs/WINDOWS_SUPPORT.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Off Grid AI — Core Feature Matrix for Windows
2+
3+
Tracking sheet for bringing the **core (free, open-source) app** to Windows on the
4+
`feat/windows-support` branch. This branch is our working `develop` for Windows —
5+
branch off it for every change.
6+
7+
**Scope: core only.** "Core" = the free studio + gateway (everything in
8+
[FEATURES.md](FEATURES.md)). The **Pro** "sees / remembers / acts" layer lives in the
9+
excluded `pro/` submodule (`!pro/**` in `electron-builder.yml`), ships macOS-signed
10+
binaries only, and is **out of scope here** — see the [Pro section](#pro-layer-out-of-scope)
11+
at the bottom.
12+
13+
> Statuses reflect **code inspection on this branch, not a verified run on Windows.**
14+
> Nothing below has been executed on real Windows hardware yet — "needs testing" is the
15+
> ceiling until someone runs the CI artifact on a Windows machine.
16+
17+
## Legend
18+
19+
| Status | Meaning |
20+
|---|---|
21+
| 🟢 **Present — needs testing** | Cross-platform code path exists and any Windows-specific handling is implemented. Not yet verified on a real Windows machine. |
22+
| 🟡 **At risk — needs testing** | Implemented, but there's a known Windows-specific gap or fragile spot to confirm during testing (details in notes). |
23+
| 🔴 **Not present** | Not built / not wired for Windows yet. Work required. |
24+
|**N/A — Apple-only by design** | Will never run on Windows (Apple Silicon / Core ML / macOS Vision). Feature degrades gracefully; a cross-platform fallback usually covers it. |
25+
26+
---
27+
28+
## 1. Build, packaging & distribution
29+
30+
| Item | Status | Notes / evidence |
31+
|---|---|---|
32+
| Windows CI build | 🟢 | `.github/workflows/windows-build.yml``windows-2022` runner, builds + packages on push to this branch. Uploads the installer as a **workflow artifact only** (`--publish never`); does not cut a release. Never run on a real machine yet. |
33+
| Native-module compile (node-gyp) | 🟢 | Pinned toolchain: `windows-2022` (VS 2022) + Python 3.12. `windows-latest`/VS 2026 + Python 3.13 break node-gyp 11 — documented in the workflow. Covers `better-sqlite3-multiple-ciphers`, `node-llama-cpp`, `sharp`. |
34+
| Windows runtime binaries fetch | 🟢 | `scripts/fetch-win-binaries.ps1` pulls win64 `llama-server` / `whisper-cli` / `sd-cli` / `ffmpeg` (+ DLLs) from upstream GitHub releases at build time — **versions resolved dynamically** (no longer stale). Repo LFS binaries are macOS-only and skipped (`lfs: false`). Fails loud if `llama-server.exe` is missing. |
35+
| NSIS installer | 🟢 | `electron-builder.yml``win.executableName`, `nsis` block (desktop shortcut, uninstall name). Untested end-to-end. |
36+
| Code signing | 🟡 | Optional via `WIN_CSC_LINK` / `WIN_CSC_KEY_PASSWORD` secrets; **unset → unsigned build → SmartScreen will warn** on install. No cert configured yet. |
37+
| Auto-update | 🟡 | `electron-updater` code is cross-platform (`src/main/updater.ts`), and NSIS is a supported target. But `windows-build.yml` publishes nothing, so **no Windows update feed (`latest.yml`) is published** — auto-update won't function until a windows job is folded into `release.yml`. |
38+
39+
---
40+
41+
## 2. Core runtime features (the studio)
42+
43+
| Feature | Status | Depends on | Notes / evidence |
44+
|---|---|---|---|
45+
| **The Gateway** (OpenAI-compatible API on `:7878`) | 🟢 | llama-server + Node HTTP | No platform-specific code; rides on chat. Headless `--server-only` path is pure Node. |
46+
| **Chat** (text + vision + reasoning, streaming) | 🟢 | `llama-server.exe` | `src/main/llm.ts` is the most Windows-hardened path: `exe()` suffix, DLL-dir prepended to `PATH`, and orphan-port cleanup via `netstat`/`tasklist`/`taskkill`. Highest-confidence runtime. |
47+
| **Model catalog + Hugging Face download** | 🟢 | Node fetch | `@offgrid/models` + `models-manager.ts` — pure JS, downloads into userData. Path handling is cross-platform. |
48+
| **Image generation — SD/SDXL/Z-Image (GGUF)** | 🟡 | `sd-cli.exe` | `src/main/imagegen.ts` uses `exe('sd-cli')` and the fetch script ships the win build + DLLs. **Gap to check:** the spawn only sets `cwd = binary dir` (`imagegen.ts:628`) and, unlike `llm.ts`, does **not** prepend the bin dir to `PATH`. Relies on Windows' default "load DLLs from the exe's own directory" behaviour — verify SD DLLs resolve. |
49+
| ↳ Image gen — **MLX / FLUX.2 / Z-Image-via-MLX** || mflux (Apple MLX) | `src/main/mflux.ts` is explicitly Apple-Silicon-only (`process.platform !== 'darwin'` gated off). On Windows, MLX models are simply not offered; **Z-Image still works via the `sd-cli` GGUF path.** |
50+
| ↳ Image gen — **Core ML / ANE acceleration** || `coreml-sd` (Swift) | macOS-only, gated off in `imagegen.ts`. Windows uses the standard `sd-cli` path. |
51+
| **Voice — Speech→Text** (whisper.cpp) | 🟢 | `whisper-cli.exe` + `ffmpeg.exe` | `src/main/rag/extractors.ts` uses `exe('whisper-cli')` / `exe('ffmpeg')`; both fetched by the PS1 script. ffmpeg is a self-contained static build. Untested. |
52+
| **Voice — Text→Speech** (Kokoro-82M) | 🟢 | onnxruntime-node worker | `src/main/tts.ts` runs the worker as Electron-as-Node (`ELECTRON_RUN_AS_NODE=1`) with a cross-platform prebuilt ORT. No platform branching. Untested. |
53+
| **Hands-free voice mode** | 🟢 | STT + TTS above | Renderer orchestration only; inherits STT/TTS status. |
54+
| **Embeddings** (`@xenova/transformers`) | 🟢 | onnxruntime-node | Prebuilt native runtime, cross-platform. Powers RAG + `/v1/embeddings`. |
55+
| **Projects / RAG** (docs, cited retrieval) | 🟢 | LanceDB + better-sqlite3 | Text/PDF/DOCX extraction is pure JS; vector store is `@lancedb/lancedb` (native, compiled in CI). Image docs are captioned by the **vision model** (not OCR), so they're cross-platform. Audio/video ingestion inherits whisper/ffmpeg status. |
56+
| **Artifacts / canvas** (HTML/React/SVG/Mermaid) | 🟢 | Renderer only | Sandboxed iframe, no platform code. Very high confidence. |
57+
| **Connectors (MCP)** | 🟢 | stdio / HTTP transports | HTTP/SSE connectors are platform-neutral. stdio connectors spawn via `StdioClientTransport` (`src/main/mcp.ts:114`), whose SDK uses **`cross-spawn`** — which resolves `npx``npx.cmd` via `cmd.exe /c` on Windows automatically. The classic gotcha is already handled by the dependency; still worth a live test. |
58+
| **Tools in chat** (calculator, datetime, web search) | 🟢 | Node | `src/main/tools.ts` — pure JS. Web search is the one intentionally-online feature (DuckDuckGo fetch). |
59+
| **Encryption at rest** | 🟢 | `better-sqlite3-multiple-ciphers` | Native module compiled in CI (node-gyp). Cross-platform SQLite cipher. |
60+
| **Onboarding / Settings / Command palette / theming** | 🟢 | Renderer only | Pure web UI, no platform code. |
61+
62+
---
63+
64+
## 3. Known Windows risks to confirm during testing
65+
66+
Ordered by likelihood of biting:
67+
68+
1. **Nothing has run on Windows yet.** Every 🟢 above is "code looks right," not "verified." First real test = download the CI artifact and launch it on Windows 10/11. No *known-required* runtime code fix exists — the coding below is either shipping plumbing or contingent on what this first run breaks.
69+
2. **`sd-cli` DLL resolution**`imagegen.ts:628` sets `cwd` but not `PATH` (chat's `llm.ts` does both). Windows searches the exe's own dir for DLLs by default, so this is *probably* fine; if SD fails to load its DLLs, mirror the `llm.ts` `PATH`-prepend fix (a few lines).
70+
3. **Upstream binary compatibility** — the fetched llama/whisper/sd builds are CPU/AVX2 x64 baselines; confirm they spawn (no missing VC++ redistributable, correct AVX level) on target hardware.
71+
4. **Unsigned installer / SmartScreen** — expected until a signing cert is added; will scare testers.
72+
5. **Auto-update feed not published** for Windows — installs won't self-update until a windows job lands in `release.yml`.
73+
74+
---
75+
76+
## 4. How to produce a Windows build
77+
78+
Push to `feat/windows-support` (or trigger `Windows Build (branch)` manually from the
79+
Actions tab) → download the `off-grid-ai-windows` artifact → install on a Windows machine.
80+
Do **not** expect it in GitHub Releases; this workflow deliberately doesn't publish.
81+
82+
---
83+
84+
## Pro layer (out of scope)
85+
86+
The Pro "sees / remembers / reflects / acts" layer is **not part of core** and is **not
87+
present on Windows** (🔴). Its native binaries are macOS-only:
88+
89+
- Screen capture watcher (Swift) and meeting recorder — macOS binaries added by the Pro build.
90+
- **OCR**`src/main/ocr.ts` shells out to a bundled **macOS Vision** binary; no Windows equivalent. (Note: this is *not* used by core image-RAG, which captions via the vision model.)
91+
- macOS permissions (screen recording / accessibility) — `src/main/permissions.ts` is fully `darwin`-gated and no-ops elsewhere.
92+
93+
Porting Pro to Windows is a separate effort and not tracked in this matrix.

docs/WINDOWS_TEST_MODELS.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Off Grid AI — Windows Test: Exact Models & Test Data
2+
3+
Companion to [WINDOWS_TEST_PLAN.md](WINDOWS_TEST_PLAN.md). This tells the tester **exactly
4+
which models to download** for each suite (by the name shown in the app), how big they are,
5+
and what test inputs to use. Model names below match the **Models** screen catalog verbatim.
6+
7+
> **How you download:** Sidebar → **Models**. The screen groups models by kind
8+
> (text / vision / image / voice / transcription). Find the exact **name** below, click its
9+
> **Download**, wait for it to finish and show as installed/active. Everything is on-device,
10+
> so each model is a one-time download.
11+
12+
---
13+
14+
## 0. First, check your RAM — it decides which sizes you can run
15+
16+
Press **Win + Pause** (or Task Manager → Performance) to see installed RAM, then use the
17+
smallest option that fits. Bigger = better quality but slower / needs more RAM.
18+
19+
| Your RAM | Use the "Light" picks below | Can also try "Standard" picks |
20+
|---|---|---|
21+
| 8 GB | ✅ required | ⚠️ only the ~4GB image model, one at a time |
22+
| 16 GB |||
23+
| 24 GB+ || ✅ (plus the large models if you want) |
24+
25+
**Only ONE large model loads at a time.** Chat and image generation can't both be resident —
26+
the app swaps them automatically, so don't be alarmed if starting an image generation pauses
27+
chat briefly.
28+
29+
---
30+
31+
## 1. Minimal download set (do this for the critical path A→D + core suites)
32+
33+
Download these **five** models first. Total ≈ **6.9 GB**.
34+
35+
| Suite | Kind | Model name (in app) | Size | Min RAM |
36+
|---|---|---|---|---|
37+
| C — Chat | text | **Qwen 3.5 0.8B** | 0.53 GB | 3 GB |
38+
| C — Chat (vision) | vision | **Qwen3-VL 2B** | 1.9 GB (incl. vision file) | 6 GB |
39+
| E — Image gen | image | **SDXL Lightning (4-step)** | 4.1 GB | 8 GB |
40+
| F — Voice (speak) | voice | **Kokoro TTS 82M** | ~0.1 GB | 3 GB |
41+
| F — Voice (dictate) | transcription | **Whisper Base** | 0.15 GB | 3 GB |
42+
43+
That set lets you run every core suite. Everything below is optional depth.
44+
45+
---
46+
47+
## 2. Per-suite model picks (with alternatives)
48+
49+
### Suite C — Chat (text)
50+
| Role | Model name | HF repo | Size | Notes |
51+
|---|---|---|---|---|
52+
| **Light (start here)** | **Qwen 3.5 0.8B** | `unsloth/Qwen3.5-0.8B-GGUF` | 0.53 GB | Tiny + fast; best first smoke test — proves `llama-server.exe` runs. |
53+
| Standard | Qwen 3.5 4B | `unsloth/Qwen3.5-4B-GGUF` | 2.7 GB | Better answers; use if you have ≥8 GB. |
54+
| Reasoning check (TC-CHAT-03) | Qwen 3.5 2B or 4B ||| These support "thinking" mode; use one of them for the reasoning test. |
55+
56+
### Suite C — Chat with images (vision) → also used by TC-CHAT-04 & TC-PROJ-04
57+
| Role | Model name | HF repo | Size | Notes |
58+
|---|---|---|---|---|
59+
| **Light (start here)** | **Qwen3-VL 2B** | `unsloth/Qwen3-VL-2B-Instruct-GGUF` | 1.9 GB | Downloads the vision add-on automatically. Lightest capable vision model. |
60+
| Alternative light | SmolVLM2 2.2B | `ggml-org/SmolVLM2-2.2B-Instruct-GGUF` | 2.0 GB | Equivalent; use if Qwen3-VL misbehaves. |
61+
| Standard | Gemma 4 E4B | `unsloth/gemma-4-E4B-it-GGUF` | 6.0 GB | Higher quality vision + thinking; needs more RAM. |
62+
63+
> A "vision" model is what lets chat **see attached images**. Without one, TC-CHAT-04 and the
64+
> image parts of Projects can't work — that's expected, not a bug.
65+
66+
### Suite E — Image generation
67+
| Role | Model name | HF repo | Size | Notes |
68+
|---|---|---|---|---|
69+
| **Start here** | **SDXL Lightning (4-step)** | `mzwing/SDXL-Lightning-GGUF` | 4.1 GB | Single file, "Recommended" — simplest path to prove `sd-cli.exe` + its DLLs load on Windows. **Do this one first.** |
70+
| Fastest drafts | SDXL Turbo (fast drafts) | `OlegSkutte/sdxl-turbo-GGUF` | 4.1 GB | 1–4 step quick drafts. |
71+
| **Advanced (test 2nd)** | Z-Image Turbo (2026) | `leejet/Z-Image-Turbo-GGUF` | ~6.7 GB total | Flagship, but uses a **multi-file** pipeline (downloads a text-encoder + VAE too). Because it's a more complex spawn, test it **after** SDXL Lightning succeeds — if Lightning works and Z-Image doesn't, note that difference. |
72+
| img2img (TC-IMG-03) | SDXL Lightning or any SDXL above ||| The SDXL models support image-to-image; Z-Image is txt2img only. |
73+
74+
> **Image gen is the #1 Windows risk area.** If generation fails, grab the console text
75+
> (per the test plan) — a `.dll` / library error here is exactly what we're hunting for.
76+
77+
### Suite F — Voice
78+
| Role | Model name | HF repo | Size | Notes |
79+
|---|---|---|---|---|
80+
| **Text-to-speech (speak)** | **Kokoro TTS 82M** | `onnx-community/Kokoro-82M-v1.0-ONNX` | ~0.1 GB | Default voice; used by TC-VOICE-01 / 03. |
81+
| TTS alternative | Piper – Lessac (English) | `rhasspy/piper-voices` | 0.06 GB | Use only if Kokoro fails. |
82+
| **Speech-to-text (dictate)** | **Whisper Base** | `ggerganov/whisper.cpp` (base) | 0.15 GB | Default for TC-VOICE-02 / 03. Proves `whisper-cli.exe` + `ffmpeg.exe`. |
83+
| STT lightest | Whisper Tiny | `ggerganov/whisper.cpp` (tiny) | 0.08 GB | Fastest, lower accuracy — fine for a functional test. |
84+
| STT best | Whisper Large v3 Turbo | `ggerganov/whisper.cpp` (large-v3-turbo) | 1.6 GB | Only if you want to check accuracy on ≥6 GB RAM. |
85+
86+
### Suites G/H/J/K (Projects, Artifacts, Tools, Settings)
87+
No extra models needed — they reuse the **text** model from Suite C (and the **vision** model
88+
for image documents in TC-PROJ-04). Web search (TC-TOOL-02) needs internet but no model.
89+
90+
---
91+
92+
## 3. Test input files to prepare (create these before you start)
93+
94+
Put these in a folder like `C:\OffGridTest\` so they're easy to find in file pickers.
95+
96+
| File | For test | How to make it |
97+
|---|---|---|
98+
| `budget.txt` | TC-PROJ-02 | A plain text file containing exactly: `The Q3 project budget is $5,000 and the deadline is March 14.` |
99+
| `budget.pdf` | TC-PROJ-02 (alt) | Same text saved/printed as a PDF (to test PDF extraction too). |
100+
| `photo.jpg` | TC-CHAT-04 / TC-PROJ-04 | Any clear photo — e.g. a picture of a **dog on grass**, or a screenshot with visible text. |
101+
| `sign.png` | TC-PROJ-04 | An image containing readable text (a sign, a slide) — checks the model reads text from images. |
102+
| short `speech.wav`/`.mp3` | TC-PROJ-04 (audio) | Record ~10 s of you saying a sentence, or grab any short clip. |
103+
104+
For the doc-grounding test (TC-PROJ-02), the expected AI answer to *"What is the budget?"* is
105+
**"$5,000"** with a cited source — that specific number is why we plant it in the file.
106+
107+
---
108+
109+
## 4. Suite I (Integrations / MCP) — exact connector to add
110+
111+
This tests the Windows-sensitive `npx` launch path. Use the official **filesystem** reference
112+
server — it's public and needs no login (first launch downloads the package, so keep internet
113+
on for this test).
114+
115+
**TC-INT-02 — add this stdio connector:**
116+
- Sidebar → **Integrations** → add connector → choose the **command** option.
117+
- **Name:** `Filesystem`
118+
- **command:** `npx`
119+
- **args:** `-y @modelcontextprotocol/server-filesystem C:\OffGridTest`
120+
- Save → **Connect**.
121+
- **Expected:** shows **Connected** (the app spawned `npx``npx.cmd` under the hood).
122+
- **Watch for:** a spawn / "command not found" error in the PowerShell console — capture it
123+
exactly; that's the specific Windows behavior we're verifying.
124+
125+
**TC-INT-03 — use it in chat:**
126+
- In a chat (with a text model loaded), ask: `List the files in C:\OffGridTest using your tools.`
127+
- **Expected:** the AI calls the filesystem tool and lists `budget.txt`, `photo.jpg`, etc.
128+
129+
> Requires **Node.js installed** on the test machine for `npx` to exist. If Node isn't
130+
> installed, note that and skip TC-INT-02/03 (or install Node first) — it's a prerequisite of
131+
> the connector, not an app bug.
132+
133+
**TC-INT-01 (HTTP connector)** — if you weren't given a real HTTP MCP endpoint, just verify
134+
the **URL** form opens and accepts input (`https://mcp.example.com/endpoint`) and that a bad
135+
URL fails gracefully. Don't file "couldn't connect" as a bug without a real endpoint.
136+
137+
---
138+
139+
## 5. Download-order cheat sheet
140+
141+
1. **Qwen 3.5 0.8B** (text) → immediately do Suite C chat + Suite D gateway.
142+
2. **SDXL Lightning** (image) → Suite E.
143+
3. **Whisper Base** + **Kokoro TTS 82M** (voice) → Suite F.
144+
4. **Qwen3-VL 2B** (vision) → TC-CHAT-04, TC-PROJ-04.
145+
5. (Optional) **Z-Image Turbo** → advanced image test.
146+
147+
If a download itself fails or hangs, that's a **Suite B (Models)** bug — report it with the
148+
model name and console output, and move on to whatever you *can* test.

0 commit comments

Comments
 (0)