xonecas.io
60255
Zn

Zoea-Nova / commit 6592700

refactor: rename agent terminology to mysis

Update schema, config, and docs to use Mysis naming and guard schema mismatches to avoid silent data loss.

xonecas2026-02-04 65927005fabe9ecd8b56e12916bd95ed8ecae57f parent f9bbd0a

38 files changed

This diff is too big to show in full. The first 1000 lines are below, and every file is listed with its counts.

.opencode/agents/zoea-analyser.md+8−8
@@ -19,13 +19,13 @@ Use these files to perform snapshot analyses of the swarm's state, performance,
1919
2020 You can query the SQLite database using the `sqlite3` command via the `Bash` tool. The schema includes:
2121
22-- `agents`: Agent metadata, providers, models, and current states (`idle`, `thinking`, `executing`).
22+- `myses`: Mysis metadata, providers, models, and current states (`idle`, `thinking`, `executing`).
2323 - `memories`: Historical conversation records, including role (system/user/assistant/tool) and source (direct/broadcast/system).
2424
2525 **Example Queries:**
2626
27-- List all agents: `sqlite3 ~/.zoea-nova/zoea.db "SELECT * FROM agents;"`
28-- Count memories per agent: `sqlite3 ~/.zoea-nova/zoea.db "SELECT agent_id, COUNT(*) FROM memories GROUP BY agent_id;"`
27+- List all Myses: `sqlite3 ~/.zoea-nova/zoea.db "SELECT * FROM myses;"`
28+- Count memories per Mysis: `sqlite3 ~/.zoea-nova/zoea.db "SELECT mysis_id, COUNT(*) FROM memories GROUP BY mysis_id;"`
2929 - Recent system logs in memory: `sqlite3 ~/.zoea-nova/zoea.db "SELECT content FROM memories WHERE source = 'system' ORDER BY created_at DESC LIMIT 10;"`
3030
3131 ### Log Analysis
@@ -34,7 +34,7 @@ The application logs to `~/.zoea-nova/zoea.log` using `zerolog` (JSON format).
3434
3535 - Use `tail -n 100 ~/.zoea-nova/zoea.log` for recent activity.
3636 - Use `grep "error" ~/.zoea-nova/zoea.log` to identify failures.
37-- Look for `agent_id`, `event`, and `level` fields in the JSON logs.
37+- Look for `mysis_id`, `event`, and `level` fields in the JSON logs.
3838
3939 Ollama server logs (for LLM provider issues):
4040
@@ -44,9 +44,9 @@ Ollama server logs (for LLM provider issues):
4444
4545 When asked for an analysis, provide a structured report covering:
4646
47-1. **Swarm Status**: Number of active agents, their states, and configured providers.
48-2. **Activity Summary**: Recent broadcast activity and agent-specific conversation volume.
49-3. **Health Check**: Any errors found in the logs or anomalous agent behaviors.
50-4. **Insights**: Trends in agent interactions or performance bottlenecks.
47+1. **Swarm Status**: Number of active myses, their states, and configured providers.
48+2. **Activity Summary**: Recent broadcast activity and mysis-specific conversation volume.
49+3. **Health Check**: Any errors found in the logs or anomalous mysis behaviors.
50+4. **Insights**: Trends in mysis interactions or performance bottlenecks.
5151
5252 Keep your analysis concise and data-driven. Always provide the raw data or query results if they support your conclusions.
.opencode/commands/agent-behaviour-check.md+4−4
@@ -1,5 +1,5 @@
11 ---
2-description: Runs a database snapshot analysis and reports on agent behavior and tool usage.
2+description: Runs a database snapshot analysis and reports on mysis behavior and tool usage.
33 agent: analyser
44 model: opencode/gemini-3-flash
55 ---
@@ -8,14 +8,14 @@ Instructions:
88
99 Analyze the last 5 minutes of activity from the database, application logs, and Ollama server logs, using 30-second intervals for the snapshot analysis.
1010
11-1. **Baseline**: Establish the system state as it was 5 minutes ago (active agents, memory counts) to use as a reference point.
11+1. **Baseline**: Establish the system state as it was 5 minutes ago (active myses, memory counts) to use as a reference point.
1212 2. **Investigation**: For each 30-second interval within the 5-minute window:
13- - Query the `agents` and `memories` tables for state changes and new messages.
13+ - Query the `myses` and `memories` tables for state changes and new messages.
1414 - Examine `zoea.log` for application events, tool calls, or errors.
1515 - Review `journalctl -u ollama` for provider performance or issues.
1616 3. **Analyze**: Aggregate the findings from the entire 5-minute window.
1717 4. **Report**: Provide a detailed report on:
18- - **Agent Activity**: Active agents and their state transitions during the period.
18+ - **Mysis Activity**: Active myses and their state transitions during the period.
1919 - **Tool Efficacy**: Tools called, their frequency, and success/failure rates.
2020 - **Observed Patterns**: Recurring issues, performance bottlenecks, repetitive or anomalous behaviors.
2121
.opencode/commands/known-issues.md+1−1
@@ -13,4 +13,4 @@ Read `documentation/KNOWN_ISSUES.md` and investigate the first item. Create a pl
1313 - Do not create files.
1414 - Read the documentation before investigating.
1515 - Gather all required context first.
16-- Use explorer agents to gather information.
16+- Use explorer subagents to gather information.
AGENTS.md+8−8
@@ -1,4 +1,4 @@
1-# Zoea Nova Agents
1+# Zoea Nova agents
22
33 Guidelines for AI agents working on the Zoea Nova codebase—a TUI-based swarm controller for automated SpaceMolt game players.
44
@@ -55,16 +55,16 @@ The application uses SQLite for persistence.
5555
5656 ## Terminology:
5757
58-- **Agent**: An AI-controlled player instance with its own provider, memory, and state.
59-- **Commander**: The swarm orchestrator that owns agent lifecycles and routes messages.
60-- **Swarm**: The collection of all agents managed by the Commander.
58+- **Mysis**: An AI-controlled player instance with its own provider, memory, and state.
59+- **Commander**: The swarm orchestrator that owns Mysis lifecycles and routes messages.
60+- **Swarm**: The collection of all Myses managed by the Commander.
6161 - **Provider**: An LLM backend (Ollama local or OpenCode Zen remote).
6262 - **MCP**: Model Context Protocol—the interface to SpaceMolt game actions.
6363 - **Event Bus**: Channel-based pub/sub for TUI updates from core goroutines.
64-- **Focus Mode**: TUI view showing detailed conversation logs for a single agent.
65-- **Dashboard**: TUI view showing swarm status, broadcast history, and agent list.
64+- **Focus Mode**: TUI view showing detailed conversation logs for a single Mysis.
65+- **Dashboard**: TUI view showing swarm status, broadcast history, and Mysis list.
6666 - **Memory**: A stored conversation message with role (system/user/assistant/tool) and source.
67-- **Source**: Origin of a memory—`direct` (single agent), `broadcast` (swarm), `system`, `llm`, or `tool`.
67+- **Source**: Origin of a memory—`direct` (single Mysis), `broadcast` (swarm), `system`, `llm`, or `tool`.
6868 - **Context Compression**: Sliding window that sends only recent messages + system prompt to LLM. See [documentation/CONTEXT_COMPRESSION.md](documentation/CONTEXT_COMPRESSION.md).
6969
7070 ## Workflow:
@@ -79,7 +79,7 @@ The user follows a structured development workflow. Respect these phases:
7979
8080 ## Role:
8181
82-You are helping build a retro-futuristic TUI command center for controlling AI game agents. Assume familiarity with:
82+You are helping build a retro-futuristic TUI command center for controlling AI game Myses. Assume familiarity with:
8383
8484 - Go concurrency patterns (goroutines, channels, select)
8585 - Bubble Tea / Elm Architecture (Model, Update, View, Cmd, Msg)
README.md+19−15
@@ -4,7 +4,7 @@
44
55 # Zoea-Nova
66
7-Zoea-Nova is a high-performance command center designed to orchestrate massive swarms of agents within the SpaceMolt universe. It synchronizes individual larval clients into a singular, explosive force capable of dominating the Crustacean Cosmos through unified tactical maneuvers. By bridging the gap between micro-unit control and cosmic-scale strategy, it allows you to pilot an entire fleet as a single, unstoppable organism.
7+Zoea-Nova is a high-performance command center designed to orchestrate massive swarms of Myses within the SpaceMolt universe. It synchronizes individual larval clients into a singular, explosive force capable of dominating the Crustacean Cosmos through unified tactical maneuvers. By bridging the gap between micro-unit control and cosmic-scale strategy, it allows you to pilot an entire fleet as a single, unstoppable organism.
88
99 > **It's actually just a fancy TUI App to control several mcp clients for the game: [SpaceMolt](https://www.spacemolt.com/)**
1010
@@ -17,14 +17,18 @@ Zoea-Nova is a high-performance command center designed to orchestrate massive s
1717
1818 ## Features
1919
20-- **Swarm Control**: Create and manage multiple AI agents, each with independent memory and LLM provider
21-- **Broadcast Messaging**: Send commands to all agents simultaneously with tracked history
22-- **Direct Messaging**: Target individual agents for specific tasks
23-- **Tool Calling**: Agents use MCP to interact with SpaceMolt (mine, trade, navigate, etc.)
24-- **Focus Mode**: View detailed conversation logs for any agent
25-- **Provider Flexibility**: Use local Ollama or remote OpenCode Zen models per-agent
20+- **Swarm Control**: Create and manage multiple AI Myses, each with independent memory and LLM provider
21+- **Broadcast Messaging**: Send commands to all Myses simultaneously with tracked history
22+- **Direct Messaging**: Target individual Myses for specific tasks
23+- **Tool Calling**: Myses use MCP to interact with SpaceMolt (mine, trade, navigate, etc.)
24+- **Focus Mode**: View detailed conversation logs for any Mysis
25+- **Provider Flexibility**: Use local Ollama or remote OpenCode Zen models per-Mysis
2626 - **Context Compression**: Sliding window keeps LLM context small for fast inference while full history remains searchable (see [documentation](documentation/CONTEXT_COMPRESSION.md))
27-- **Memory Search**: Agents can search past messages and broadcasts to recall older information
27+- **Memory Search**: Myses can search past messages and broadcasts to recall older information
28+
29+## Terminology
30+
31+Zoea Nova uses a small set of in-app terms (Mysis, Commander, Swarm, Provider, MCP). The canonical glossary lives in `AGENTS.md` under the Terminology section.
2832
2933 ## Try it
3034
@@ -38,14 +42,14 @@ make run # Build and start
3842
3943 | Key | Action |
4044 | ------- | ------------------------ |
41-| `n` | Create new agent |
45+| `n` | Create new Mysis |
4246 | `b` | Broadcast message to all |
43-| `m` | Message selected agent |
44-| `r` | Relaunch agent |
45-| `s` | Stop agent |
46-| `d` | Delete agent |
47-| `c` | Configure agent |
48-| `Enter` | Focus on selected agent |
47+| `m` | Message selected Mysis |
48+| `r` | Relaunch Mysis |
49+| `s` | Stop Mysis |
50+| `d` | Delete Mysis |
51+| `c` | Configure Mysis |
52+| `Enter` | Focus on selected Mysis |
4953 | `Esc` | Return to dashboard |
5054 | `?` | Show help |
5155 | `q` | Quit |
cmd/zoea/main.go+43−43
@@ -86,16 +86,16 @@ func main() {
8686 // Initialize commander
8787 commander := core.NewCommander(s, registry, bus, cfg)
8888
89- // Load existing agents from database
90- if err := commander.LoadAgents(); err != nil {
91- log.Warn().Err(err).Msg("Failed to load existing agents")
89+ // Load existing myses from database
90+ if err := commander.LoadMyses(); err != nil {
91+ log.Warn().Err(err).Msg("Failed to load existing myses")
9292 }
93- log.Debug().Int("agents", commander.AgentCount()).Msg("Agents loaded")
93+ log.Debug().Int("myses", commander.MysisCount()).Msg("Myses loaded")
9494
95- // Auto-start all existing agents on launch
96- for _, a := range commander.ListAgents() {
95+ // Auto-start all existing myses on launch
96+ for _, a := range commander.ListMyses() {
9797 if err := a.Start(); err != nil {
98- log.Warn().Err(err).Str("agent", a.Name()).Msg("Failed to start agent")
98+ log.Warn().Err(err).Str("mysis", a.Name()).Msg("Failed to start mysis")
9999 }
100100 }
101101
@@ -123,7 +123,7 @@ func main() {
123123 cancel()
124124 }
125125
126- // Connect MCP proxy to commander so agents can use tools
126+ // Connect MCP proxy to commander so myses can use tools
127127 commander.SetMCP(mcpProxy)
128128
129129 log.Debug().Bool("upstream", mcpProxy.HasUpstream()).Int("local_tools", mcpProxy.LocalToolCount()).Msg("MCP proxy initialized")
@@ -212,53 +212,53 @@ type commanderAdapter struct {
212212 commander *core.Commander
213213 }
214214
215-func (a *commanderAdapter) ListAgents() []mcp.AgentInfo {
216- agents := a.commander.ListAgents()
217- result := make([]mcp.AgentInfo, len(agents))
218- for i, agent := range agents {
219- result[i] = mcp.AgentInfo{
220- ID: agent.ID(),
221- Name: agent.Name(),
222- State: string(agent.State()),
223- Provider: agent.ProviderName(),
224- LastError: agent.LastError(),
215+func (a *commanderAdapter) ListMyses() []mcp.MysisInfo {
216+ myses := a.commander.ListMyses()
217+ result := make([]mcp.MysisInfo, len(myses))
218+ for i, mysis := range myses {
219+ result[i] = mcp.MysisInfo{
220+ ID: mysis.ID(),
221+ Name: mysis.Name(),
222+ State: string(mysis.State()),
223+ Provider: mysis.ProviderName(),
224+ LastError: mysis.LastError(),
225225 }
226226 }
227227 return result
228228 }
229229
230-func (a *commanderAdapter) GetAgent(id string) (mcp.AgentInfo, error) {
231- agent, err := a.commander.GetAgent(id)
230+func (a *commanderAdapter) GetMysis(id string) (mcp.MysisInfo, error) {
231+ mysis, err := a.commander.GetMysis(id)
232232 if err != nil {
233- return mcp.AgentInfo{}, err
233+ return mcp.MysisInfo{}, err
234234 }
235- return mcp.AgentInfo{
236- ID: agent.ID(),
237- Name: agent.Name(),
238- State: string(agent.State()),
239- Provider: agent.ProviderName(),
240- LastError: agent.LastError(),
235+ return mcp.MysisInfo{
236+ ID: mysis.ID(),
237+ Name: mysis.Name(),
238+ State: string(mysis.State()),
239+ Provider: mysis.ProviderName(),
240+ LastError: mysis.LastError(),
241241 }, nil
242242 }
243243
244-func (a *commanderAdapter) AgentCount() int {
245- return a.commander.AgentCount()
244+func (a *commanderAdapter) MysisCount() int {
245+ return a.commander.MysisCount()
246246 }
247247
248-func (a *commanderAdapter) MaxAgents() int {
249- return a.commander.MaxAgents()
248+func (a *commanderAdapter) MaxMyses() int {
249+ return a.commander.MaxMyses()
250250 }
251251
252-func (a *commanderAdapter) SendMessageAsync(agentID, message string) error {
253- return a.commander.SendMessageAsync(agentID, message)
252+func (a *commanderAdapter) SendMessageAsync(mysisID, message string) error {
253+ return a.commander.SendMessageAsync(mysisID, message)
254254 }
255255
256256 func (a *commanderAdapter) BroadcastAsync(message string) error {
257257 return a.commander.BroadcastAsync(message)
258258 }
259259
260-func (a *commanderAdapter) SearchMessages(agentID, query string, limit int) ([]mcp.SearchResult, error) {
261- memories, err := a.commander.Store().SearchMemories(agentID, query, limit)
260+func (a *commanderAdapter) SearchMessages(mysisID, query string, limit int) ([]mcp.SearchResult, error) {
261+ memories, err := a.commander.Store().SearchMemories(mysisID, query, limit)
262262 if err != nil {
263263 return nil, err
264264 }
@@ -402,23 +402,23 @@ func runMCPTest(configPath string) {
402402 // mockOrchestrator is a simple orchestrator for testing.
403403 type mockOrchestrator struct{}
404404
405-func (m *mockOrchestrator) ListAgents() []mcp.AgentInfo {
406- return []mcp.AgentInfo{}
405+func (m *mockOrchestrator) ListMyses() []mcp.MysisInfo {
406+ return []mcp.MysisInfo{}
407407 }
408408
409-func (m *mockOrchestrator) GetAgent(id string) (mcp.AgentInfo, error) {
410- return mcp.AgentInfo{}, fmt.Errorf("no agents in test mode")
409+func (m *mockOrchestrator) GetMysis(id string) (mcp.MysisInfo, error) {
410+ return mcp.MysisInfo{}, fmt.Errorf("no myses in test mode")
411411 }
412412
413-func (m *mockOrchestrator) AgentCount() int {
413+func (m *mockOrchestrator) MysisCount() int {
414414 return 0
415415 }
416416
417-func (m *mockOrchestrator) MaxAgents() int {
417+func (m *mockOrchestrator) MaxMyses() int {
418418 return 16
419419 }
420420
421-func (m *mockOrchestrator) SendMessageAsync(agentID, message string) error {
421+func (m *mockOrchestrator) SendMessageAsync(mysisID, message string) error {
422422 return fmt.Errorf("not available in test mode")
423423 }
424424
@@ -426,7 +426,7 @@ func (m *mockOrchestrator) BroadcastAsync(message string) error {
426426 return fmt.Errorf("not available in test mode")
427427 }
428428
429-func (m *mockOrchestrator) SearchMessages(agentID, query string, limit int) ([]mcp.SearchResult, error) {
429+func (m *mockOrchestrator) SearchMessages(mysisID, query string, limit int) ([]mcp.SearchResult, error) {
430430 return []mcp.SearchResult{}, nil
431431 }
432432
config.toml+2−2
@@ -1,6 +1,6 @@
11 [swarm]
2-default_agents = 4
3-max_agents = 16
2+default_myses = 4
3+max_myses = 16
44
55 [providers.ollama]
66 endpoint = "http://localhost:11434"
documentation/CONTEXT_COMPRESSION.md+18−18
@@ -1,12 +1,12 @@
11 # Context Compression
22
3-Agents in Zoea Nova use a sliding window approach to manage LLM context size. Instead of sending the entire conversation history to the LLM on each turn, agents send only recent messages plus the system prompt. This keeps inference fast while agents retain access to older memories through search tools.
3+Myses in Zoea Nova use a sliding window approach to manage LLM context size. Instead of sending the entire conversation history to the LLM on each turn, Myses send only recent messages plus the system prompt. This keeps inference fast while Myses retain access to older memories through search tools.
44
55 ## Design
66
77 ### The Problem
88
9-Without compression, agent context grows unbounded:
9+Without compression, Mysis context grows unbounded:
1010 - Each tool call adds multiple messages (request + result)
1111 - SpaceMolt gameplay involves frequent tool use (mining, trading, navigation)
1212 - Large contexts slow inference and increase costs
@@ -29,7 +29,7 @@ Without compression, agent context grows unbounded:
2929 ┌─────────────────────────────────────────────────────┐
3030 │ Full Memory (SQLite) │
3131 ├─────────────────────────────────────────────────────┤
32-│ All messages since agent creation │
32+│ All messages since Mysis creation │
3333 │ Searchable via zoea_search_messages tool │
3434 └─────────────────────────────────────────────────────┘
3535 ```
@@ -39,7 +39,7 @@ Without compression, agent context grows unbounded:
3939 ### Constants
4040
4141 ```go
42-// internal/core/agent.go
42+// internal/core/mysis.go
4343
4444 // MaxContextMessages limits how many recent messages to include in LLM context.
4545 // Value chosen to cover ~2 server ticks worth of activity.
@@ -51,18 +51,18 @@ const MaxContextMessages = 20
5151 The `getContextMemories()` method assembles context for each LLM call:
5252
5353 1. Fetch the N most recent memories from SQLite
54-2. Fetch the system prompt (first system message for the agent)
54+2. Fetch the system prompt (first system message for the Mysis)
5555 3. If system prompt isn't already in recent memories, prepend it
5656 4. Return the assembled context
5757
5858 ```go
59-func (a *Agent) getContextMemories() ([]*store.Memory, error) {
60- recent, err := a.store.GetRecentMemories(a.id, MaxContextMessages)
59+func (m *Mysis) getContextMemories() ([]*store.Memory, error) {
60+ recent, err := m.store.GetRecentMemories(m.id, MaxContextMessages)
6161 if err != nil {
6262 return nil, err
6363 }
6464
65- system, err := a.store.GetSystemMemory(a.id)
65+ system, err := m.store.GetSystemMemory(m.id)
6666 if err != nil {
6767 // No system prompt - use recent memories only
6868 return recent, nil
@@ -86,14 +86,14 @@ func (a *Agent) getContextMemories() ([]*store.Memory, error) {
8686 ```go
8787 // internal/store/memories.go
8888
89-// GetSystemMemory retrieves the initial system prompt for an agent.
90-func (s *Store) GetSystemMemory(agentID string) (*Memory, error)
89+// GetSystemMemory retrieves the initial system prompt for a Mysis.
90+func (s *Store) GetSystemMemory(mysisID string) (*Memory, error)
9191
92-// GetRecentMemories retrieves the most recent N memories for an agent.
93-func (s *Store) GetRecentMemories(agentID string, limit int) ([]*Memory, error)
92+// GetRecentMemories retrieves the most recent N memories for a Mysis.
93+func (s *Store) GetRecentMemories(mysisID string, limit int) ([]*Memory, error)
9494
9595 // SearchMemories searches memories by content text (case-sensitive).
96-func (s *Store) SearchMemories(agentID, query string, limit int) ([]*Memory, error)
96+func (s *Store) SearchMemories(mysisID, query string, limit int) ([]*Memory, error)
9797
9898 // SearchBroadcasts searches broadcast messages by content text (case-sensitive).
9999 func (s *Store) SearchBroadcasts(query string, limit int) ([]*BroadcastMessage, error)
@@ -101,15 +101,15 @@ func (s *Store) SearchBroadcasts(query string, limit int) ([]*BroadcastMessage,
101101
102102 ## Search Tools
103103
104-Agents can retrieve older memories using MCP tools exposed through the orchestrator:
104+Myses can retrieve older memories using MCP tools exposed through the orchestrator:
105105
106106 ### zoea_search_messages
107107
108-Search an agent's past messages by text content.
108+Search a Mysis's past messages by text content.
109109
110110 ```json
111111 {
112- "agent_id": "abc123",
112+ "mysis_id": "abc123",
113113 "query": "iron ore",
114114 "limit": 20
115115 }
@@ -132,7 +132,7 @@ Returns matching broadcasts with content and timestamp.
132132
133133 ## System Prompt Guidance
134134
135-The system prompt instructs agents to use their captain's log for persistent memory:
135+The system prompt instructs Myses to use their captain's log for persistent memory:
136136
137137 ```
138138 ## Memory
@@ -143,7 +143,7 @@ Use captain's log (captains_log_add) to remember:
143143 - Current objectives and plans
144144 ```
145145
146-This encourages agents to externalize important information to the game's built-in note system, which persists across context windows.
146+This encourages Myses to externalize important information to the game's built-in note system, which persists across context windows.
147147
148148 ## Tradeoffs
149149
documentation/INITIAL_IMPLEMENTATION_DESIGN.md+37−37
@@ -13,23 +13,23 @@ Control several automated players in the game https://www.spacemolt.com/. Each i
1313 - Custom framework to expose internal orchestration tools via MCP.
1414 - **Orchestration:**
1515 - Capability to broadcast shared objectives to the entire swarm simultaneously.
16- - Targeted messaging/tasking for individual swarm members.
16+ - Targeted messaging/tasking for individual Myses.
1717 - **Command Center TUI:**
18- - **Aggregated Dashboard:** High-level swarm status, health, swarm message history, and agent list.
19- - **Focus Mode:** Detailed conversation logs and direct control for individual agents.
18+ - **Aggregated Dashboard:** High-level swarm status, health, swarm message history, and Mysis list.
19+ - **Focus Mode:** Detailed conversation logs and direct control for individual Myses.
2020 - **Aesthetic:** Retro-futuristic (80s/90s) CRT-style visuals with reactive animations.
2121
2222 ### Dashboard Layout
2323
2424 ```
2525 ╔═══ ZOEA NOVA COMMAND CENTER ═══╗
26-● 2 ○ 1 ◌ 0 ✖ 0 ← Agent state counts (running/idle/stopped/errored)
26+● 2 ○ 1 ◌ 0 ✖ 0 ← Mysis state counts (running/idle/stopped/errored)
2727 ─── Swarm Messages ─── ← Recent broadcast messages (up to 10)
2828 14:30:05 Hello everyone, mine!
2929 14:32:12 Check your inventories
30-─── Agents ─── ← Agent list with status and last message
31-⠋ agent-1 running [ollama] │ I found some ore...
32-○ agent-2 idle [ollama] │ Ready to start
30+─── Myses ─── ← Mysis list with status and last message
31+⠋ mysis-1 running [ollama] │ I found some ore...
32+○ mysis-2 idle [ollama] │ Ready to start
3333 Press ? for help
3434 ```
3535
@@ -61,8 +61,8 @@ Scrollable conversation viewport showing full message history with role-based st
6161 Example `config.toml`:
6262 ```toml
6363 [swarm]
64-default_agents = 4
65-max_agents = 16
64+default_myses = 4
65+max_myses = 16
6666
6767 [providers.ollama]
6868 endpoint = "http://localhost:11434"
@@ -79,15 +79,15 @@ upstream = "https://game.spacemolt.com/mcp"
7979 ## State & Persistence
8080
8181 - **Database:** Single SQLite file at `$HOME/.zoea-nova/zoea.db`.
82-- **Scope:** Agent memories, conversation history, swarm state, per-agent provider config, and user preferences.
82+- **Scope:** Mysis memories, conversation history, swarm state, per-Mysis provider config, and user preferences.
8383 - **Migrations:** Schema managed via embedded SQL migrations (e.g., `golang-migrate` or manual versioning). Never support backwards, never write data migrations. If we change the schema we create a new db fresh.
8484 - **Backup:** Consider periodic WAL checkpoints; SQLite handles crash recovery.
8585
86-### Database Schema (v2)
86+### Database Schema (v3)
8787
8888 ```sql
89--- Agents table
90-CREATE TABLE agents (
89+-- Myses table
90+CREATE TABLE myses (
9191 id TEXT PRIMARY KEY,
9292 name TEXT NOT NULL,
9393 provider TEXT NOT NULL,
@@ -100,50 +100,50 @@ CREATE TABLE agents (
100100 -- Memories table (conversation history)
101101 CREATE TABLE memories (
102102 id INTEGER PRIMARY KEY AUTOINCREMENT,
103- agent_id TEXT NOT NULL,
103+ mysis_id TEXT NOT NULL,
104104 role TEXT NOT NULL, -- system, user, assistant, tool
105105 source TEXT NOT NULL, -- direct, broadcast, system, llm, tool
106106 content TEXT NOT NULL,
107107 created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
108- FOREIGN KEY (agent_id) REFERENCES agents(id) ON DELETE CASCADE
108+ FOREIGN KEY (mysis_id) REFERENCES myses(id) ON DELETE CASCADE
109109 );
110110 ```
111111
112112 **Memory Sources:**
113-- `direct` — Message sent directly to a specific agent
114-- `broadcast` — Message broadcast to all agents (swarm command)
113+- `direct` — Message sent directly to a specific Mysis
114+- `broadcast` — Message broadcast to all Myses (swarm command)
115115 - `system` — System prompts
116116 - `llm` — LLM-generated responses
117117 - `tool` — Tool call results
118118
119-## Agent Lifecycle
119+## Mysis Lifecycle
120120
121-- **Ownership:** The Commander (orchestrator) owns all agent lifecycles.
122-- **Creation:** User creates agents via TUI controls. Default swarm size: **4 agents**.
123-- **Limits:** Configurable `max_agents` (default 16). Enforced at Commander level, but user controls count from TUI.
121+- **Ownership:** The Commander (orchestrator) owns all Mysis lifecycles.
122+- **Creation:** User creates Myses via TUI controls. Default swarm size: **4 Myses**.
123+- **Limits:** Configurable `max_myses` (default 16). Enforced at Commander level, but user controls count from TUI.
124124 - **States:** `idle` → `running` → `stopped` / `errored`.
125125 - **TUI Controls:**
126- - **Create:** Spawn a new agent (if under limit).
127- - **Relaunch:** Restart a stopped/errored agent.
128- - **Force Stop:** Immediately halt an agent.
129- - **Delete:** Remove agent and optionally purge its memories.
130- - **Broadcast Message:** Send a message/objective to all agents.
131- - **Direct Message:** Send a message to a specific agent.
132- - **Configure Agent:** Set model/provider per agent (Ollama or OpenCode Zen).
133-- **Recovery:** On application restart, agents are rehydrated from SQLite in `stopped` state; user must explicitly relaunch.
126+ - **Create:** Spawn a new Mysis (if under limit).
127+ - **Relaunch:** Restart a stopped/errored Mysis.
128+ - **Force Stop:** Immediately halt a Mysis.
129+ - **Delete:** Remove Mysis and optionally purge its memories.
130+ - **Broadcast Message:** Send a message/objective to all Myses.
131+ - **Direct Message:** Send a message to a specific Mysis.
132+ - **Configure Mysis:** Set model/provider per Mysis (Ollama or OpenCode Zen).
133+- **Recovery:** On application restart, Myses are rehydrated from SQLite in `stopped` state; user must explicitly relaunch.
134134
135135 ## Keyboard Shortcuts
136136
137137 Minimal set matching TUI controls:
138138 - `q` / `Ctrl+C` — Quit
139-- `n` — New agent
140-- `d` — Delete selected agent
141-- `r` — Relaunch selected agent
142-- `s` — Stop selected agent
139+- `n` — New Mysis
140+- `d` — Delete selected Mysis
141+- `r` — Relaunch selected Mysis
142+- `s` — Stop selected Mysis
143143 - `b` — Broadcast message to all
144-- `m` — Message selected agent
145-- `c` — Configure selected agent
146-- `Tab` / `Shift+Tab` — Navigate between agents
144+- `m` — Message selected Mysis
145+- `c` — Configure selected Mysis
146+- `Tab` / `Shift+Tab` — Navigate between Myses
147147 - `?` — Help overlay
148148
149149 ## Build & Operations
@@ -171,7 +171,7 @@ Minimal set matching TUI controls:
171171 - `internal/provider`: LLM provider implementations (Ollama, OpenCode Zen).
172172 - `internal/config`: Configuration loading (TOML + ENV merge).
173173 - `internal/store`: SQLite repository layer and migrations.
174-- **Concurrency Model:** Each agent operates in an isolated goroutine. State updates are pushed to the TUI via a central command/message bus to ensure thread-safety.
174+- **Concurrency Model:** Each Mysis operates in an isolated goroutine. State updates are pushed to the TUI via a central command/message bus to ensure thread-safety.
175175 - **Interface-Driven:** All external dependencies (LLMs, MCP servers) must be hidden behind interfaces to facilitate unit testing and future-proofing.
176176 - **Testing:** Mandatory unit tests for `internal/core` logic. TUI components should be tested using `bubbletea`'s testing utilities. Aim for above 80% test coverage. No flaky tests.
177177 - **Warnings and Errors** Fix all that you see, even if it's from your current changes.
documentation/KNOWN_ISSUES.md+9−9
@@ -2,20 +2,20 @@
22
33 These are the currently know issues to investigate:
44
5-- [ ] Agents terminology: Agents is too generic of a name for the swarm members.
6- **BUG**: We need to generate a unique name from the project zoea thematic.
5+- [x] Mysis terminology: Agent is too generic of a name for the swarm members.
6+ **FIXED**: Swarm members are now referred to as "Mysis" (singular) and "Myses" (plural) in documentation.
77
88 - [ ] Opencode Zen as a provider: This is completly untested. Compile a list of the free models, and create a report in `documentation` named `OPENCODE_ZEN_MODELS.md`. Only use free models in your report.
9- **BUG**: each individual agent should be able to be configured with different provider/model choice. Currently all use the same model and provider. Keep a sensible default in `config.toml`. We need to also add per model temperature values.
9+ **BUG**: each individual Mysis should be able to be configured with different provider/model choice. Currently all use the same model and provider. Keep a sensible default in `config.toml`. We need to also add per model temperature values.
1010
11-- [ ] Captain's Log Bug: There is a consistent pattern of agents failing to use captains_log_add. They appear to be trying to "remember" their registration password but are encountering an empty_entry error from the MCP server. This suggests the LLM might be misformatting the arguments for this specific tool.
12- **BUG**: Agents find each other's passwords and fail to login. Agents are do not have a reliable way to re-use usernames they created in the past.
11+- [ ] Captain's Log Bug: There is a consistent pattern of Myses failing to use captains_log_add. They appear to be trying to "remember" their registration password but are encountering an empty_entry error from the MCP server. This suggests the LLM might be misformatting the arguments for this specific tool.
12+ **BUG**: Myses find each other's passwords and fail to login. Myses do not have a reliable way to re-use usernames they created in the past.
1313
14-- [ ] Travel Duration: The travel to the asteroid belt is a long-duration task (30k+ ticks). The agents correctly entered a "waiting" mode, showing they can manage long-term state without wasting tokens on redundant actions.
15- **BUG**: Agent's should continue to act on his tick during travel. They can still use other actions when traveling. Like chatting, or other non traveling actions in the game. Currently the agent looses his ticks waiting when he could be using the turns to explore the game api and interacting with the swarm. Add a `zoea_get_passwords()` tool call that lists password<>username pairs for the swarm. (searches swarm messags for the passwords), Agents should not see passwords for accounts active …
14+- [ ] Travel Duration: The travel to the asteroid belt is a long-duration task (30k+ ticks). The Myses correctly entered a "waiting" mode, showing they can manage long-term state without wasting tokens on redundant actions.
15+ **BUG**: Mysis should continue to act on his tick during travel. They can still use other actions when traveling. Like chatting, or other non traveling actions in the game. Currently the Mysis looses his ticks waiting when he could be using the turns to explore the game api and interacting with the swarm. Add a `zoea_get_passwords()` tool call that lists password<>username pairs for the swarm. (searches swarm messags for the passwords), Myses should not see passwords for accounts actively …
1616
1717 - [ ] TUI usability issues: Swarm messages list isnot kept up to date. Sending a broadcast doesn't update the list of swarm messages.
1818 **BUG**: Breaking change from the spec, the TUI should be high performance and in sync with the data at all times.
1919
20-- [ ] Cognitive Looping and Prompt Inefficiency: Agents can get stuck in "cooldown" loops or redundant "waiting" states, consuming tokens every 30 seconds without operational progress.
21- **BUG**: The system prompts agents every tick regardless of their state. Agents may hallucinate non-existent cooldowns or fail to use non-traveling actions during long journeys.
20+- [ ] Cognitive Looping and Prompt Inefficiency: Myses can get stuck in "cooldown" loops or redundant "waiting" states, consuming tokens every 30 seconds without operational progress.
21+ **BUG**: The system prompts Myses every tick regardless of their state. Myses may hallucinate non-existent cooldowns or fail to use non-traveling actions during long journeys.
documentation/OLLAMA_MODELS.md+2−2
@@ -184,7 +184,7 @@ base_url = "http://localhost:11434"
184184 # For fast testing
185185 model = "qwen3:4b"
186186
187-# For production agents
187+# For production Myses
188188 # model = "qwen3:8b"
189189
190190 # For complex reasoning tasks
@@ -193,7 +193,7 @@ model = "qwen3:4b"
193193
194194 ### Thinking Mode Strategy
195195
196-For game agents that need to plan:
196+For game Myses that need to plan:
197197 1. Use Qwen 3 with thinking enabled for strategic decisions
198198 2. Disable thinking (`/nothink`) for rapid tool execution
199199 3. Consider separate models: fast (4B) for actions, larger (14B) for planning
documentation/SWARM_ANALYSIS_2026-02-04.md+4−4
@@ -5,7 +5,7 @@
55 **Interval Granularity:** 30 Seconds
66
77 ## 1. Swarm Status & Baseline
8-* **Active Agents:** 2
8+* **Active Myses:** 2
99 * `overnight1` (c277e1a0...): State `running`, 202 memories.
1010 * `overnight2` (7ebc6c53...): State `running`, 237 memories.
1111 * **Provider:** Ollama (local) running `qwen3:4b`.
@@ -13,7 +13,7 @@
1313
1414 ## 2. Activity Summary (Interval Analysis)
1515
16-The system exhibited a highly repetitive pattern during the 5-minute window, with both agents effectively "stuck" in wait states despite the system prompting for moves every 30 seconds.
16+The system exhibited a highly repetitive pattern during the 5-minute window, with both Myses effectively "stuck" in wait states despite the system prompting for moves every 30 seconds.
1717
1818 | Interval (Start) | `overnight1` (overnight1) | `overnight2` (overnight2) | System Activity |
1919 | :--- | :--- | :--- | :--- |
@@ -37,10 +37,10 @@ No tools were successfully executed within the strictly defined 5-minute window.
3737 * **Success Rate:** 80% (relative to post-window attempts).
3838
3939 ## 4. Observed Patterns & Bottlenecks
40-* **Cognitive Looping (overnight1):** The agent spent the entire 5-minute window claiming to be in a "7-second cooldown." Since the system prompted it 10 times, the agent was stuck in a hallucinated or non-expiring cooldown state for ~300 seconds.
40+* **Cognitive Looping (overnight1):** The Mysis spent the entire 5-minute window claiming to be in a "7-second cooldown." Since the system prompted it 10 times, the Mysis was stuck in a hallucinated or non-expiring cooldown state for ~300 seconds.
4141 * **Long-Duration Tasks (overnight2):** Performing long-distance travel (remaining duration ~30,260 ticks). It predictably responds with "Waiting for travel..." every 30 seconds.
4242 * **LLM Latency:** Ollama logs show significant response times. At **14:43:22**, a request took **21.43 seconds**. Average latency: 8-12 seconds.
43-* **Prompt Inefficiency:** The system prompts agents for a move every 30 seconds even when they are in long-term states (travel/cooldown), leading to high LLM token consumption for zero operational progress.
43+* **Prompt Inefficiency:** The system prompts Myses for a move every 30 seconds even when they are in long-term states (travel/cooldown), leading to high LLM token consumption for zero operational progress.
4444
4545 ## 5. Raw Data Evidence
4646 * **Latency Entry:** `fev 04 14:43:22 hulk ollama[40671]: [GIN] 2026/02/04 - 14:43:22 | 200 | 21.426448033s`
internal/config/config.go+4−4
@@ -18,7 +18,7 @@ type Config struct {
1818
1919 // SwarmConfig holds swarm-related settings.
2020 type SwarmConfig struct {
21- MaxAgents int `toml:"max_agents"`
21+ MaxMyses int `toml:"max_myses"`
2222 }
2323
2424 // ProviderConfig holds LLM provider settings.
@@ -36,7 +36,7 @@ type MCPConfig struct {
3636 func DefaultConfig() *Config {
3737 return &Config{
3838 Swarm: SwarmConfig{
39- MaxAgents: 16,
39+ MaxMyses: 16,
4040 },
4141 Providers: map[string]ProviderConfig{
4242 "ollama": {
@@ -71,9 +71,9 @@ func Load(path string) (*Config, error) {
7171
7272 // applyEnvOverrides applies environment variable overrides to the configuration.
7373 func applyEnvOverrides(cfg *Config) {
74- if v := os.Getenv("ZOEA_MAX_AGENTS"); v != "" {
74+ if v := os.Getenv("ZOEA_MAX_MYSES"); v != "" {
7575 if n, err := strconv.Atoi(v); err == nil {
76- cfg.Swarm.MaxAgents = n
76+ cfg.Swarm.MaxMyses = n
7777 }
7878 }
7979
internal/config/config_test.go+11−11
@@ -9,8 +9,8 @@ import (
99 func TestDefaultConfig(t *testing.T) {
1010 cfg := DefaultConfig()
1111
12- if cfg.Swarm.MaxAgents != 16 {
13- t.Errorf("expected max_agents=16, got %d", cfg.Swarm.MaxAgents)
12+ if cfg.Swarm.MaxMyses != 16 {
13+ t.Errorf("expected max_myses=16, got %d", cfg.Swarm.MaxMyses)
1414 }
1515 if _, ok := cfg.Providers["ollama"]; !ok {
1616 t.Error("expected ollama provider in defaults")
@@ -24,7 +24,7 @@ func TestLoadFromFile(t *testing.T) {
2424
2525 content := `
2626 [swarm]
27-max_agents = 32
27+max_myses = 32
2828
2929 [providers.ollama]
3030 endpoint = "http://custom:11434"
@@ -42,8 +42,8 @@ upstream = "https://custom.mcp/endpoint"
4242 t.Fatalf("Load() error: %v", err)
4343 }
4444
45- if cfg.Swarm.MaxAgents != 32 {
46- t.Errorf("expected max_agents=32, got %d", cfg.Swarm.MaxAgents)
45+ if cfg.Swarm.MaxMyses != 32 {
46+ t.Errorf("expected max_myses=32, got %d", cfg.Swarm.MaxMyses)
4747 }
4848 if cfg.Providers["ollama"].Endpoint != "http://custom:11434" {
4949 t.Errorf("expected custom ollama endpoint, got %s", cfg.Providers["ollama"].Endpoint)
@@ -55,10 +55,10 @@ upstream = "https://custom.mcp/endpoint"
5555
5656 func TestLoadWithEnvOverrides(t *testing.T) {
5757 // Set env vars
58- os.Setenv("ZOEA_MAX_AGENTS", "10")
58+ os.Setenv("ZOEA_MAX_MYSES", "10")
5959 os.Setenv("ZOEA_MCP_ENDPOINT", "https://env.mcp/endpoint")
6060 defer func() {
61- os.Unsetenv("ZOEA_MAX_AGENTS")
61+ os.Unsetenv("ZOEA_MAX_MYSES")
6262 os.Unsetenv("ZOEA_MCP_ENDPOINT")
6363 }()
6464
@@ -67,8 +67,8 @@ func TestLoadWithEnvOverrides(t *testing.T) {
6767 t.Fatalf("Load() error: %v", err)
6868 }
6969
70- if cfg.Swarm.MaxAgents != 10 {
71- t.Errorf("expected env override max_agents=10, got %d", cfg.Swarm.MaxAgents)
70+ if cfg.Swarm.MaxMyses != 10 {
71+ t.Errorf("expected env override max_myses=10, got %d", cfg.Swarm.MaxMyses)
7272 }
7373 if cfg.MCP.Upstream != "https://env.mcp/endpoint" {
7474 t.Errorf("expected env override mcp endpoint, got %s", cfg.MCP.Upstream)
@@ -82,8 +82,8 @@ func TestLoadNonExistentFile(t *testing.T) {
8282 }
8383
8484 // Should return defaults
85- if cfg.Swarm.MaxAgents != 16 {
86- t.Errorf("expected max_agents=16, got %d", cfg.Swarm.MaxAgents)
85+ if cfg.Swarm.MaxMyses != 16 {
86+ t.Errorf("expected max_myses=16, got %d", cfg.Swarm.MaxMyses)
8787 }
8888 }
8989
internal/core/bus_test.go+11−11
@@ -13,9 +13,9 @@ func TestEventBus(t *testing.T) {
1313
1414 // Publish event
1515 event := Event{
16- Type: EventAgentCreated,
17- AgentID: "test-id",
18- AgentName: "test-agent",
16+ Type: EventMysisCreated,
17+ MysisID: "test-id",
18+ MysisName: "test-mysis",
1919 Timestamp: time.Now(),
2020 }
2121 bus.Publish(event)
@@ -23,11 +23,11 @@ func TestEventBus(t *testing.T) {
2323 // Receive event
2424 select {
2525 case received := <-ch:
26- if received.Type != EventAgentCreated {
27- t.Errorf("expected type=%s, got %s", EventAgentCreated, received.Type)
26+ if received.Type != EventMysisCreated {
27+ t.Errorf("expected type=%s, got %s", EventMysisCreated, received.Type)
2828 }
29- if received.AgentID != "test-id" {
30- t.Errorf("expected agent_id=test-id, got %s", received.AgentID)
29+ if received.MysisID != "test-id" {
30+ t.Errorf("expected mysis_id=test-id, got %s", received.MysisID)
3131 }
3232 case <-time.After(100 * time.Millisecond):
3333 t.Fatal("timeout waiting for event")
@@ -50,8 +50,8 @@ func TestEventBusMultipleSubscribers(t *testing.T) {
5050 ch2 := bus.Subscribe()
5151
5252 event := Event{
53- Type: EventAgentMessage,
54- AgentID: "agent-1",
53+ Type: EventMysisMessage,
54+ MysisID: "mysis-1",
5555 Timestamp: time.Now(),
5656 }
5757 bus.Publish(event)
@@ -78,12 +78,12 @@ func TestEventBusNonBlocking(t *testing.T) {
7878 ch := bus.Subscribe()
7979
8080 // Fill buffer
81- bus.Publish(Event{Type: EventAgentCreated})
81+ bus.Publish(Event{Type: EventMysisCreated})
8282
8383 // This should not block (event dropped)
8484 done := make(chan bool)
8585 go func() {
86- bus.Publish(Event{Type: EventAgentDeleted})
86+ bus.Publish(Event{Type: EventMysisDeleted})
8787 done <- true
8888 }()
8989
internal/core/commander.go+132−132
@@ -12,77 +12,77 @@ import (
1212 "github.com/xonecas/zoea-nova/internal/store"
1313 )
1414
15-// Commander orchestrates the swarm of agents.
15+// Commander orchestrates the swarm of myses.
1616 type Commander struct {
1717 mu sync.RWMutex
1818
19- agents map[string]*Agent
20- store *store.Store
21- registry *provider.Registry
22- bus *EventBus
23- config *config.Config
24- mcp *mcp.Proxy
25- maxAgents int
19+ myses map[string]*Mysis
20+ store *store.Store
21+ registry *provider.Registry
22+ bus *EventBus
23+ config *config.Config
24+ mcp *mcp.Proxy
25+ maxMyses int
2626 }
2727
2828 // NewCommander creates a new commander.
2929 func NewCommander(s *store.Store, reg *provider.Registry, bus *EventBus, cfg *config.Config) *Commander {
3030 return &Commander{
31- agents: make(map[string]*Agent),
32- store: s,
33- registry: reg,
34- bus: bus,
35- config: cfg,
36- maxAgents: cfg.Swarm.MaxAgents,
31+ myses: make(map[string]*Mysis),
32+ store: s,
33+ registry: reg,
34+ bus: bus,
35+ config: cfg,
36+ maxMyses: cfg.Swarm.MaxMyses,
3737 }
3838 }
3939
40-// SetMCP sets the MCP proxy for all agents.
40+// SetMCP sets the MCP proxy for all myses.
4141 func (c *Commander) SetMCP(proxy *mcp.Proxy) {
4242 c.mu.Lock()
4343 c.mcp = proxy
44- // Set MCP on all existing agents
45- for _, agent := range c.agents {
46- agent.SetMCP(proxy)
44+ // Set MCP on all existing myses
45+ for _, mysis := range c.myses {
46+ mysis.SetMCP(proxy)
4747 }
4848 c.mu.Unlock()
4949 }
5050
51-// LoadAgents loads existing agents from the store.
52-// Agents are loaded in stopped state; they must be explicitly started.
53-func (c *Commander) LoadAgents() error {
54- stored, err := c.store.ListAgents()
51+// LoadMyses loads existing myses from the store.
52+// Myses are loaded in stopped state; they must be explicitly started.
53+func (c *Commander) LoadMyses() error {
54+ stored, err := c.store.ListMyses()
5555 if err != nil {
56- return fmt.Errorf("list agents: %w", err)
56+ return fmt.Errorf("list myses: %w", err)
5757 }
5858
5959 c.mu.Lock()
6060 defer c.mu.Unlock()
6161
62- for _, sa := range stored {
63- p, err := c.registry.Get(sa.Provider)
62+ for _, sm := range stored {
63+ p, err := c.registry.Get(sm.Provider)
6464 if err != nil {
65- // Provider not available, skip agent
65+ // Provider not available, skip mysis
6666 continue
6767 }
6868
69- agent := NewAgent(sa.ID, sa.Name, sa.CreatedAt, p, c.store, c.bus)
69+ mysis := NewMysis(sm.ID, sm.Name, sm.CreatedAt, p, c.store, c.bus)
7070 if c.mcp != nil {
71- agent.SetMCP(c.mcp)
71+ mysis.SetMCP(c.mcp)
7272 }
73- c.agents[sa.ID] = agent
73+ c.myses[sm.ID] = mysis
7474 }
7575
7676 return nil
7777 }
7878
79-// CreateAgent creates a new agent with the given name and provider.
80-func (c *Commander) CreateAgent(name, providerName string) (*Agent, error) {
79+// CreateMysis creates a new mysis with the given name and provider.
80+func (c *Commander) CreateMysis(name, providerName string) (*Mysis, error) {
8181 c.mu.Lock()
8282 defer c.mu.Unlock()
8383
84- if len(c.agents) >= c.maxAgents {
85- return nil, fmt.Errorf("max agents (%d) reached", c.maxAgents)
84+ if len(c.myses) >= c.maxMyses {
85+ return nil, fmt.Errorf("max myses (%d) reached", c.maxMyses)
8686 }
8787
8888 // Get provider
@@ -98,111 +98,111 @@ func (c *Commander) CreateAgent(name, providerName string) (*Agent, error) {
9898 }
9999
100100 // Create in store
101- stored, err := c.store.CreateAgent(name, providerName, provCfg.Model)
101+ stored, err := c.store.CreateMysis(name, providerName, provCfg.Model)
102102 if err != nil {
103- return nil, fmt.Errorf("create agent in store: %w", err)
103+ return nil, fmt.Errorf("create mysis in store: %w", err)
104104 }
105105
106- // Create runtime agent
107- agent := NewAgent(stored.ID, stored.Name, stored.CreatedAt, p, c.store, c.bus)
106+ // Create runtime mysis
107+ mysis := NewMysis(stored.ID, stored.Name, stored.CreatedAt, p, c.store, c.bus)
108108 if c.mcp != nil {
109- agent.SetMCP(c.mcp)
109+ mysis.SetMCP(c.mcp)
110110 }
111- c.agents[stored.ID] = agent
111+ c.myses[stored.ID] = mysis
112112
113113 // Emit event
114114 c.bus.Publish(Event{
115- Type: EventAgentCreated,
116- AgentID: stored.ID,
117- AgentName: stored.Name,
115+ Type: EventMysisCreated,
116+ MysisID: stored.ID,
117+ MysisName: stored.Name,
118118 Timestamp: time.Now(),
119119 })
120120
121- return agent, nil
121+ return mysis, nil
122122 }
123123
124-// DeleteAgent removes an agent from the swarm.
125-func (c *Commander) DeleteAgent(id string, purgeMemories bool) error {
124+// DeleteMysis removes a mysis from the swarm.
125+func (c *Commander) DeleteMysis(id string, purgeMemories bool) error {
126126 c.mu.Lock()
127- agent, ok := c.agents[id]
127+ mysis, ok := c.myses[id]
128128 if !ok {
129129 c.mu.Unlock()
130- return fmt.Errorf("agent not found: %s", id)
130+ return fmt.Errorf("mysis not found: %s", id)
131131 }
132132
133- delete(c.agents, id)
133+ delete(c.myses, id)
134134 c.mu.Unlock()
135135
136136 // Stop if running (outside of commander lock to avoid deadlock)
137- if agent.State() == AgentStateRunning {
138- agent.Stop()
137+ if mysis.State() == MysisStateRunning {
138+ mysis.Stop()
139139 }
140140
141141 // Delete from store (memories cascade)
142- if err := c.store.DeleteAgent(id); err != nil {
143- return fmt.Errorf("delete agent from store: %w", err)
142+ if err := c.store.DeleteMysis(id); err != nil {
143+ return fmt.Errorf("delete mysis from store: %w", err)
144144 }
145145
146146 // Emit event
147147 c.bus.Publish(Event{
148- Type: EventAgentDeleted,
149- AgentID: id,
Cut short: this commit's diff is over 1000 lines.
internal/core/commander_async_test.go+13−13
Cut short: this commit's diff is over 1000 lines.
internal/core/commander_test.go+102−102
Cut short: this commit's diff is over 1000 lines.
internal/core/mysis.go+107−107
Cut short: this commit's diff is over 1000 lines.
internal/core/mysis_test.go+81−81
Cut short: this commit's diff is over 1000 lines.
internal/core/mysis_tools_test.go+18−18
Cut short: this commit's diff is over 1000 lines.
internal/core/types.go+17−17
Cut short: this commit's diff is over 1000 lines.
internal/mcp/mcp_test.go+29−29
Cut short: this commit's diff is over 1000 lines.
internal/mcp/tools.go+48−48
Cut short: this commit's diff is over 1000 lines.
internal/store/agents.go+0−158
Cut short: this commit's diff is over 1000 lines.
internal/store/memories.go+39−39
Cut short: this commit's diff is over 1000 lines.
internal/store/memories_test.go+21−21
Cut short: this commit's diff is over 1000 lines.
internal/store/myses.go+158−0
Cut short: this commit's diff is over 1000 lines.
internal/store/schema.sql+10−10
Cut short: this commit's diff is over 1000 lines.
internal/store/store.go+19−15
Cut short: this commit's diff is over 1000 lines.
internal/store/store_test.go+55−55
Cut short: this commit's diff is over 1000 lines.
internal/tui/app.go+87−87
Cut short: this commit's diff is over 1000 lines.
internal/tui/dashboard.go+50−50
Cut short: this commit's diff is over 1000 lines.
internal/tui/focus.go+19−19
Cut short: this commit's diff is over 1000 lines.
internal/tui/help.go+8−8
Cut short: this commit's diff is over 1000 lines.
internal/tui/input.go+6−6
Cut short: this commit's diff is over 1000 lines.
internal/tui/styles.go+7−7
Cut short: this commit's diff is over 1000 lines.
internal/tui/tui_test.go+66−66
Cut short: this commit's diff is over 1000 lines.