forked niri forked from okami.mom/niri

runtime: add memory listing and graceful model swaps #76

targeting main from deleted fork:feat/memory-fs-ls
Merged opened by and assigned to callie.on-her.computer
targeting main from deleted fork:feat/memory-fs-ls

Add memory_fs op: ls for safe, sorted immediate directory listing.

Make /model swap close the outgoing session before applying the selected preset. Wake idle execution, request journaling and end_session, retain queued work, persist the selection, and prepare fresh context. Close an inherited frontend too; leave an explicitly selected frontend preset unchanged. Report non-graceful archival fallback when the outgoing handoff cannot complete.

Worker verification: all 338 workspace tests passed, including 264 runtime tests and eight lifecycle scenarios. Typecheck and diff checks passed. Fake-provider smoke verified outgoing journal/end, selected request configuration and exclusion of the old transcript from the fresh request. No live swap or deployment performed.

Both source changes are in this PR. Transfer checksums and all swap postimage hashes match the tested worker source.

Commits 0