Add FakeOS: configurable character-mode OS simulator

BBS::FakeOS is a generic, teletype-style engine for simulating retro
operating systems: a scripted boot sequence (BIOS POST, memory test,
banners, typewriter output) followed by an interactive command shell.

Each simulated OS (MS-DOS, CP/M, AmigaDOS CLI, ...) is just a
FakeOS.define { ... } config — prompt, colors, boot block, command table
and an on_unknown fallback — so new OSes are added as configuration, not
code. on_unknown is the natural hook for a conversational/LLM-backed
shell. Exposed as a Flow step (`os <definition>`) alongside tui/app.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-05 20:04:59 +02:00
parent 6b320318ca
commit 4d38046c70
4 changed files with 251 additions and 0 deletions

View File

@@ -72,6 +72,7 @@ module BBS
when :output then run_output(step)
when :tui then run_tui(step)
when :app then run_app(step)
when :os then run_os(step)
end
end
@@ -359,6 +360,13 @@ module BBS
:halt
end
def run_os(step)
FakeOS::Runner.new(@session, step[:definition], context: @ctx).run
nil
rescue IOError, Errno::EPIPE, Errno::ECONNRESET
:halt
end
# ── helpers ────────────────────────────────────────────────────────────────
def strip_md(text)