16 Commits

Author SHA1 Message Date
vasyansk 60383cd543 feat(daemon): snapshot ticker + writer wiring + stopped-attach reads disk + cleanup on close
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 16:00:39 +07:00
vasyansk bd36a83db2 feat(daemon): per-surface JSON snapshot store (atomic write, corrupt-tolerant)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 15:36:21 +07:00
vasyansk 6a3875670a feat(spaceshd): configurable default shell
Add a config.rs module that loads optional ~/.spacesh/config.toml and a
default_shell() resolver: SPACESH_SHELL env -> config.toml default_shell ->
login shell from the passwd DB -> $SHELL -> /bin/sh. The passwd lookup
matters under launchd where $SHELL is absent. All plain-panel spawn sites in
server.rs now use the resolver. Adds toml + libc deps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 08:01:04 +07:00
vasyansk f7bf9fc5c6 wire(daemon): thread EventLog + EventPersister through serve/router
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 07:40:54 +07:00
vasyansk ac2d5ca1db feat(daemon): JsonEventStore + debounced EventPersister
Adds disk persistence for the event log: atomic temp+fsync+rename write,
corrupt-file backup, and a debounced coalescing persister task mirroring
state_store/persist patterns. 4 tests: round-trip, missing, corrupt, burst.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 07:27:23 +07:00
vasyansk 56ba1723b9 feat(daemon): EventLog ring model with read-flags
Add event_log.rs with EventLog (capped VecDeque, monotonic ids, mark_read,
snapshot/restore) and EventLogState. Register mod in main.rs. Stub
Cmd::EventLog and Cmd::MarkRead arms in server.rs to keep the exhaustive
match compiling; full wiring follows in Task 4.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 07:21:26 +07:00
vasyansk 255fa27271 feat(daemon): versioned Claude Code hook adapter (per-surface CLAUDE_CONFIG_DIR)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 23:00:40 +07:00
vasyansk 62a65b691d feat(daemon): M2 command dispatch, layout events, cold-start restore, persistence wiring
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:25:35 +07:00
vasyansk 4f7ed2a5a3 feat(daemon): StateStore trait + atomic JSON store with corrupt-file backup
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:20:51 +07:00
vasyansk f1630633e5 test(daemon): serialize heavy socket/PTY integration tests
Process-wide serial lock around the socket-binding and PTY-spawning
integration tests in spaceshd. Running several at once on a many-core
box starved each other's async tasks and tripped timing assumptions,
causing ~1/10 flakes under cargo test --workspace. Unit tests stay
parallel. 0/20 spaceshd + 0/5 workspace runs after the change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 20:39:24 +07:00
vasyansk 4b1a544923 feat(daemon): entrypoint with single-instance lock and lazy socket bind
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 20:00:41 +07:00
vasyansk 531f89eb73 feat(daemon): socket server with router task, command dispatch, event fan-out (M0)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:59:58 +07:00
vasyansk 2aedc6924d feat(daemon): registry for workspaces and surfaces with idempotent open
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:58:28 +07:00
vasyansk 32560ea364 feat(daemon): surface actor owning pty + broadcast fan-out (M0, no grid)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:57:53 +07:00
vasyansk cd1fe1dfd5 feat(daemon): lifecycle paths, single-instance lock, stale-socket cleanup
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:57:11 +07:00
vasyansk 31dddb3b6c chore: scaffold cargo workspace and crate skeletons
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:54:38 +07:00