Skip to content

Support native Windows ARM64 and validated offline image input - #2

Open
LexZeon wants to merge 3 commits into
Chetic:devfrom
LexZeon:codex/windows-arm64-offline
Open

LexZeon wants to merge 3 commits into
Chetic:devfrom
LexZeon:codex/windows-arm64-offline

Conversation

@LexZeon

@LexZeon LexZeon commented Nov 6, 2026 •

Copy link
Copy Markdown

Problem and resulting behavior

This makes the community fork usable natively on Windows ARM64 with a local model. The CLI could compile yet fail at OpenTUI FFI startup; offline fallback paths could retrieve remote resources; image decoding failures could return an unhelpful response or lose the draft. Windows image input also missed Explorer file-list clipboard data and quoted paths, while host terminals can intercept Ctrl+V.

The change adds the ARM64 build target and documents the tested Bun 1.4.4 runtime. Offline startup requires bundled dependencies and UI assets. JavaScript fetch guards allow loopback and local embedded resources while rejecting external destinations and redirects; the web UI receives a restrictive CSP. The two named file-edit MCP tools require a fresh approval per call.

Images share one validation/normalization boundary across prompts, files and tools. Bundled AVIF decoding produces PNG/JPEG locally; malformed data returns a readable HTTP 400 before message persistence and streaming headers. The TUI restores failed drafts.

Windows clipboard input now supports bitmap images, Explorer file lists and quoted image paths with spaces or Unicode. Local fixed-drive, resident-file and size checks precede reads. Clipboard helpers use hidden STA PowerShell with UTF-8 output, timeouts and output limits. Windows defaults include Alt+V, and the prompt displays a clickable image-paste action so terminal Ctrl+V bindings do not make the feature inaccessible.

Validation

  • Native Windows ARM64 CLI and bundled web builds passed with Bun 1.4.4.
  • Updated typecheck and 41 image tests / 106 assertions passed; the offline guard passed 35 checks with no requests reaching the blocked redirect destination.
  • Native Windows clipboard tests passed for public AVIF file lists, a synthetic PNG bitmap and quoted Unicode/space paths. Original clipboard data was restored.
  • The compiled TUI displayed an image attachment from a quoted path and returned the local vision model's answer. A malformed image produced a readable error; a valid attachment afterward succeeded.
  • Compiled API tests passed valid/invalid concurrent requests and subsequent recovery. Public AVIF and PNG fixtures reached the real local model.
  • The complete source patch reapplied against the pinned base and matched the built runtime source. Public test fixtures include provenance and required license notices.

Limits

Physical mouse dragging and terminal delivery of Alt+V were not automated. The visible binding, native clipboard reader and terminal path-input flow were checked separately. Failed-draft restoration was reviewed in source; backend rejection/recovery was exercised. These are functional checks, not performance, maximum-context or model-quality benchmarks.

The fetch guard and CSP are application controls, not an OS egress sandbox; raw sockets, child processes and independent workers can use other network stacks. Browser packet capture and the Linux container suite were not rerun. See docs/windows-arm64-offline.md for build steps and limits.

Only reusable community source, tests and documentation are included. No executables, model weights, private configuration, user images, chats or raw local logs are published.

@LexZeon LexZeon changed the title Add Windows ARM64 offline builds and guarded local runtime Support native Windows ARM64 and validated offline image input Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant