Skip to content

host: mac_fb_screenshot, fb_export cache, exact-bundle emulator launch, password-free etherhelper relaunch - #259

Open
LoetLuemmel wants to merge 4 commits into
mainfrom
feat/fb-screenshot
Open

host: mac_fb_screenshot, fb_export cache, exact-bundle emulator launch, password-free etherhelper relaunch#259
LoetLuemmel wants to merge 4 commits into
mainfrom
feat/fb-screenshot

Conversation

@LoetLuemmel

Copy link
Copy Markdown
Owner

Four host-side commits from the fb-screenshot work (2026-08-31 to 2026-09-02):

  • mac_fb_screenshot — the local emulator's framebuffer read host-side via the fb-export Basilisk build (12–31 ms/frame, zero bridge traffic, works while a tracking loop starves the daemon); verifies the running binary carries the patch before signalling and falls back to mac_screenshot when the fb path is unavailable (source in the reply says which answered). 32nd tool.
  • fb_export cache — marker verdict and emulator identity cached: 52 → 33 ms per tool capture.
  • start_stack — launches the emulator by exact bundle path (open <path>, never open -a: the bundle-id trap hit twice).
  • password-free etherhelper relaunches — skip the alias step when it is already placed; host/tools/setuid_etherhelper.sh documents the setuid route (two-file patch in the fork build).

Verified live on the fb-export Basilisk build; the fb path is what the THINK-C compile gate and the alert-frame capture of the training evaluation run on (xavier-eval).

🤖 Generated with Claude Code

https://claude.ai/code/session_017EM4V2zZkSxN5v5FK8yChs

Pit Förster and others added 4 commits August 31, 2026 11:08
… fallback (32nd tool)

host/fb_export.py wraps the fb-export spike (macemu branch fb-export,
a6e328b): SIGUSR1 the local Basilisk II, read the ABFB dump (pixels +
palette + last dirty-tile scan), decode to PNG host-side. 12-31 ms/frame
against ~140 ms/look on the bridge delta path; works while a tracking
loop starves the daemon.

The safety property carries the design: SIGUSR1 TERMINATES an emulator
without the handler, so the running pid's own executable is read for the
BASILISK_FB_DUMP marker before any signal — a published (unpatched)
bundle, or SheepShaver, is refused without being touched, and the MCP
tool falls back to mac_screenshot with the reason in the reply
(fallback=false to fail fast in a timing-sensitive loop).

Verified live against the running unpatched bundle: refusal + bridge
fallback + fail-fast arm, emulator untouched. The positive fb path was
measured in the spike (2026-08-30); it needs the fork build running.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Xfij6cRznRfVmKu6gyq1p
…3 ms per tool capture

The binary scan caches on (dev, ino, size, mtime); the (pid, exe) pair is
cached but re-verified with one ps spawn per capture — deliberately not
trusted blindly, since a reused pid would put SIGUSR1 into an unrelated
process. capture_png meta now echoes the region.

Positive fb path verified live (fork build, guest booted): bench 15-35 ms,
MCP tool 33.5 ms avg over 20 captures, region crop pixel-exact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Xfij6cRznRfVmKu6gyq1p
open -a resolves by bundle id; with two BasiliskII copies on disk
(published bundle + fb-export fork build) it launched the other one —
twice, 2026-08-31. A plain `open <path>` opens exactly the named bundle.
local.env stays untracked and now points at the fork build for the
operator's fb-export trial (started 2026-08-31).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Xfij6cRznRfVmKu6gyq1p
…p when it is already placed, add setuid_etherhelper.sh

start_stack.sh: on the etherhelper branch the only privileged act is
placing HOST_IP on the default-route interface. If the alias is already
there (and not stranded on the wired NIC) there is nothing to do, so the
admin dialog is skipped. The alias persists across BasiliskII relaunches,
so every relaunch within a login session is now password-free; only a
fresh macOS boot prompts once.

setuid_etherhelper.sh: makes a bundle's etherhelpertool setuid-root so the
patched runtool.c spawns it directly, without the authorization dialog.
Documents the App-Management trap: chown-to-root inside a bundle is
refused once any instance of that bundle id has been launched, so setuid
a FRESH build before its first launch and mv it into place.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017EM4V2zZkSxN5v5FK8yChs
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