xonecas.io
6119
My

mysis / files

mysis / documentation / architecture / DESIGN.md

4.5 KB
1# Mysis Design
2
3A fully featured agentic interface for Spacemolt, themed like a mysis from [Zoea Nova](//TODO).
4
5**Spacemolt Game docs:**
6
7- https://www.spacemolt.com/skill.md
8- https://www.spacemolt.com/api.md
9
10### Features
11
12**Agentic conversation:** Normal agent conversation. User types in, agentic response replies. We should show thinking, tool calls (simplified, called, success, failure), and obviously replies. Use brand coloring output for highlight. Context is truncated and compressed.
13
14**In-conversation commands:**
15
16- `/autoplay [Repeated response]`
17  - Autoplay sends the repeated message every `game tick time * max tool calls * .75` seconds
18
19- `/verbose` ** NOT IMPLEMENTED YET **
20  - Verbose truncates some outputs. For now simple truncations
21
22**Config file and CLI arguments:**
23
24- `-p` `--p` for a provider from the config. If param is not there use default from config. If there is no config exit with error
25- Session management `-s`
26- Launches with cli by default `-t` for TUI display
27- `-f` specifies markdown file to use as system prompt. Otherwise fallback to `prompt.md` in the internal/llm packahe ** INCOMPLETE **
28
29**MCP tools:**
30
31- `save_credentials(username, password)` / `get_credentials` - Simple tools to save username/password to a local sqlite database in the config file folder.
32- The session id for the mysis saving the pair, we inject, **DO NOT MAKE IT AN ARGUMENT FOR THE AGENTS**
33
34## CLI - Lightweight
35
36Simpler output, lot's of raw (human readable) data. Same functionality, runs with any terminal. Type in stdin your messages, output comes out above.
37
38# TUI - Not a replacement, an option.
39
40Same UI as CLI: simple, with a permanent input line and the conversation log.
41
42- Simple drawing:
43
44```
45┌─────────────────────────────────┐
46│                                 │
47│    Conversation Log             │
48│    (scrollable viewport)        │
49│                                 │
50│ I'm going to mine now!          │
51│ [00:00:00] Agent                │
52│                                 │
53│ Ok! Tell me when you're         │
54│ you are done!                   │
55│ [00:00:00] You                  │
56│                                 │
57├─────────────────────────────────┤
58│ > Input line___                 │
59├─────────────────────────────────┤
60│ [A][I][W][E] Status text [L][M] │
61└─────────────────────────────────┘
62```
63
64Uses our colors from internal/style.
65Elegant but retro-futuristic in the same style as `assets/logo.svg`.
66One background color: deep purple (ColorBg or ColorBgAlt, to be tested with both).
67
68### Log:
69
70- Same conversation log, no log messages. Pure agent conversation with truncated reasoning shown.
71  - Reasoning is truncated from the end, showing the last portion of the text.
72- No word wrap for reasoning, user messages, or agent replies.
73- The rest (tools, tool calls) is truncated like CLI now.
74
75### Input:
76
77- Permanent input box with same functionality as CLI stdin currently.
78- Commands: `/autoplay` `exit` `quit`
79
80- Adds keybinds:
81  - `ESC` stop autoplay if autoplay is on
82
83- Up/down arrows: message history
84- Left/right: edit the current line
85
86### Status:
87
88- Shows a series of animated icons:
89  - [E]: When an error is logged, animate the error icon and show error text (only system errors, not in-game).
90  - [W]: When a warning is logged, animate the warning icon and show warning text.
91  - [I]: When info is logged, nimate the info icon.
92  - [A]: When autoplay is enabled, shows the truncated auto message.
93
94- Shows the text related to the animated icon from above.
95
96- Shows connection status with animated icons for LLM and MCP connections.
97  - Animate when a request is fired.
98
99Animation:
100
101- items are always on the "empty" or "thinest" frame.
102- When an event happens, the animation starts becomes quick for a few iterations, slowing down back to normal and stop.
103- Subsequent events reset the slowdown.
104
105Animation Sequences:
106
107- Autoplay: ◔ ◑ ◕ ● → ends at ◔ (quarter circle)
108- Info: ● ◉ ◎ ○ ◌ → ends at ◌ (empty circle)
109- Warning: ◆ ◈ ◇ → ends at ◇ (hollow diamond)
110- Error: ✖ ✕ → ends at (empty/space)
111- LLM: ◉ ◎ ○ ◌ → ends at ◌ (empty circle)
112- MCP: ◐ ◓ ◑ ◒ → ends at ○ (circle/dot)
113
114# TODO:
115
116- Session setup screen
117- Game state sidebar, pretty, game like, retro.