Commit Graph

8 Commits

Author SHA1 Message Date
4b21d30567 [Fix] Correct CoW logic and fix rm command fallout. 2025-09-27 18:33:45 +01:00
5f648440c5 [Add] Implement file I/O and remote CoW. 2025-09-26 23:50:01 +01:00
a80764a70e [Add] Implemented 'cat' command 2025-09-26 21:45:40 +01:00
bb17cf3473 [Add] Implement remote sessions and server exit. 2025-09-26 21:32:08 +01:00
388c6429cf [Change] Remove hybrid local/remote network model
Client architecture has been refactored to be fully
server-authoritative, remove the previous "hybrid" model that supported
both local and remote command execution, that was a stupid idea.

- Client now connects to server on startup.
- The local command processor and VFS have been removed from the
  Terminal class.
- All command processing is now handled by the server.
- The client is now just a thin client essentially

I'll in the future enable single player mode by running the server on
the local machine in a separate thread.
2025-09-23 20:54:39 +01:00
267d2477de [Add] Implemented Copy-on-Write and scriptable rm.
OK, this commit finally implements the Copy-on-Write architecure I spoke
about in previous commits.. It also refactors command execution to be
safer and more extensible.

To enable CoW and centralise state-changing, command scripts no longer
modify the VFS directly. Instead, they return a table describing their
intended action '{ action = "rm", target = "file.txt" }'. The C++
CommandProcessor is then responsible for interpreting this and executing
it safely.
2025-09-21 23:52:36 +01:00
b30c497769 [Add] CoW foundation and scriptable rm command.
Putting down the nessassary steps for the Copy-on-Write described in the
previous commit. Implemented the first script based write command, 'rm'
2025-09-21 22:39:16 +01:00
fbf70c43b3 [Add] Embedded Lua scripting language.
Over the past couple of commits, the build process now automates the
dependenices you'd normally compile from source.
This commit is focused on laying the foundation for scriptable in-game
commands using Lua.

- sol2 and lua5.4 are the new project dependencies.
- Created a new 'LuaProcessor' class to manage a Lua state and eecute
  scripts.
- The 'CommandProcessor' now contains a 'LuaProcessor' instance.
- Replaced the hardcoded c++ 'ls' command with a system that executes a
  '/bin/ls.lua' script from the Virtual File System.
- Implemented C++ -> Lua bindings for the 'vfs_node' struct, allowing
  Lua scripts to inspect the VFS and perform actions (i.e, list files).
2025-09-21 20:13:43 +01:00