# Introduction

TOMAS (Tony's Managed Operating System) is a modular hobby operating system written in C# using the COSMOS framework. It comes with a respective terminal emulator using for Core testing.

Both the kernel and terminal emulator will eventually support programs and plugins, respectfully. With the former allowing for running of native .NET executables and the latter Lua plugins, while taking advantage of the existing interface architecture.

# Changelog

## 23.1

- With the help of ChatGPT, the `IProgram` interface has been rewritten to handle command line arguments. Being ChatGPT derived, it's still rough around the edges (not sure what to do with `IArguments` right now), but it's one hell of a jumping start!
- Speaking of, the CST parser has been rewritten to finally support arguments with the help of ChatGPT too. While I could have always looked at FreeSO's implantation for reference, that code is just awful. It will be ported back upstream ASAP!

## 23.0

- Split versioning systems between kernal and terminal
  - Calendar versioning, `YY.MINOR.MICRO`, for kernal
  - Semantic versioning for terminal
- If the file system is activate, system activity will be logged
- Build number based on commit hash

Due to the huge time skip and architectural changes, I've (retroactively) switched to calendar versioning with `v0.1` now known as `v20.1` as well.

## 20.1

- Filesystem (based on the Cosmos Wiki guide)
- Semantic versioning
- Replaced BasicApp with AboutApp
- Removd TerminalCancelEventArgs and everything related to it

# Support Policy

Although a hobby, I have wanted to test the idea of some sort of support policy for my projects. In my experience, it provides a nice fallback. For example, a bug in the unzipping process when I switched APIs in my former Blue Rose launcher and updater forced me to create an LTS out of a version that lacked the change while I searched for the cause of the problem. With the current development speed of COSMOS, a hypothetical LTS would possibly last one year.

# Interfaces

Since 19.1, TOMAS uses a modular interface design for writing and executing programs. At the moment, the operating system doesn't yet support loading assemblies that would take advantage of this API, but it is being looked into.

## Design

`IProgram` is used to create the actual program while `IShell` executes the respective program from a dictionary. While still early in development, the approach has allowed for easy migration from one major release of COSMOS to another with little to no modifications of the code itself.

    public interface IProgram
    {
        string Name { get; }

        string Description { get; }

        bool Entry(IShell shell, IEnumerable<KeyValuePair<string, object>> arguments);
    }

    public interface IShell
    {
        string ReadLine { get; }

        Dictionary<string, IProgram> Programs { get; }

        IEnumerable<KeyValuePair<string, object>>? ParseArguments(IProgram program, string[] arguments);
    }