xonecas.io
60255
Zn

Zoea-Nova / commit 1e2b81b

fix(mcp): drop zoea_get_mysis guidance

Remove the unused mysis lookup tool and stale prompt/test references, and align schema version messaging with db-reset-accounts.

required_permissions: ["all"]

xonecas2026-02-04 1e2b81bb9df948f6f80856d6260477ce862aa831 parent a816cf0

7 files changed

cmd/zoea/main.go+0−18
@@ -257,20 +257,6 @@ func (a *commanderAdapter) ListMyses() []mcp.MysisInfo {
257257 return result
258258 }
259259
260-func (a *commanderAdapter) GetMysis(id string) (mcp.MysisInfo, error) {
261- mysis, err := a.commander.GetMysis(id)
262- if err != nil {
263- return mcp.MysisInfo{}, err
264- }
265- return mcp.MysisInfo{
266- ID: mysis.ID(),
267- Name: mysis.Name(),
268- State: string(mysis.State()),
269- Provider: mysis.ProviderName(),
270- LastError: mysis.LastError(),
271- }, nil
272-}
273-
274260 func (a *commanderAdapter) MysisCount() int {
275261 return a.commander.MysisCount()
276262 }
@@ -467,10 +453,6 @@ func (m *mockOrchestrator) ListMyses() []mcp.MysisInfo {
467453 return []mcp.MysisInfo{}
468454 }
469455
470-func (m *mockOrchestrator) GetMysis(id string) (mcp.MysisInfo, error) {
471- return mcp.MysisInfo{}, fmt.Errorf("no myses in test mode")
472-}
473-
474456 func (m *mockOrchestrator) MysisCount() int {
475457 return 0
476458 }
documentation/plans/2026-02-04-captains-log-bug.md+0−1
@@ -63,7 +63,6 @@ WRONG: captains_log_add({})
6363 const ContinuePrompt = `Turn complete. What is your next move?
6464
6565 CRITICAL REMINDERS:
66-- Use zoea_list_myses to find YOUR mysis ID (match your name)
6766 - When using captains_log_add, entry field must be non-empty
6867 - Never calculate ticks, use every turn to progress
6968
internal/core/mysis.go+0−1
@@ -96,7 +96,6 @@ const MaxContextMessages = 20
9696 const ContinuePrompt = `Turn complete. What is your next move?
9797
9898 CRITICAL REMINDERS:
99-- Use zoea_list_myses to find YOUR mysis ID (match your name)
10099 - When using captains_log_add, entry field must be non-empty
101100 - Never store or share your password in any in-game tool calls or chat
102101 - Never calculate ticks, use every turn to progress
internal/core/mysis_test.go+0−3
@@ -347,9 +347,6 @@ func TestSystemPromptContainsCaptainsLogExamples(t *testing.T) {
347347 }
348348
349349 func TestContinuePromptContainsCriticalReminders(t *testing.T) {
350- if !strings.Contains(ContinuePrompt, "zoea_list_myses") {
351- t.Fatal("ContinuePrompt missing mysis ID reminder")
352- }
353350 if !strings.Contains(ContinuePrompt, "captains_log_add") {
354351 t.Fatal("ContinuePrompt missing captains_log_add reminder")
355352 }
internal/mcp/mcp_test.go+2−27
@@ -183,15 +183,6 @@ func (m *mockOrchestrator) ListMyses() []MysisInfo {
183183 return m.myses
184184 }
185185
186-func (m *mockOrchestrator) GetMysis(id string) (MysisInfo, error) {
187- for _, mysis := range m.myses {
188- if mysis.ID == id {
189- return mysis, nil
190- }
191- }
192- return MysisInfo{}, errors.New("mysis not found")
193-}
194-
195186 func (m *mockOrchestrator) MysisCount() int {
196187 return len(m.myses)
197188 }
@@ -241,8 +232,8 @@ func TestOrchestratorTools(t *testing.T) {
241232 proxy := NewProxy("")
242233 RegisterOrchestratorTools(proxy, orchestrator)
243234
244- if proxy.LocalToolCount() != 9 {
245- t.Errorf("expected 9 local tools, got %d", proxy.LocalToolCount())
235+ if proxy.LocalToolCount() != 8 {
236+ t.Errorf("expected 8 local tools, got %d", proxy.LocalToolCount())
246237 }
247238
248239 ctx := context.Background()
@@ -265,20 +256,4 @@ func TestOrchestratorTools(t *testing.T) {
265256 t.Errorf("unexpected error: %s", result.Content[0].Text)
266257 }
267258
268- // Test zoea_get_mysis
269- args, _ := json.Marshal(map[string]string{"mysis_id": "mysis-1"})
270- result, err = proxy.CallTool(ctx, "zoea_get_mysis", args)
271- if err != nil {
272- t.Fatalf("CallTool(zoea_get_mysis) error: %v", err)
273- }
274- if result.IsError {
275- t.Errorf("unexpected error: %s", result.Content[0].Text)
276- }
277-
278- // Test zoea_get_mysis with invalid ID
279- args, _ = json.Marshal(map[string]string{"mysis_id": "nonexistent"})
280- result, _ = proxy.CallTool(ctx, "zoea_get_mysis", args)
281- if !result.IsError {
282- t.Error("expected error for nonexistent mysis")
283- }
284259 }
internal/mcp/tools.go+0−50
@@ -47,7 +47,6 @@ type AccountInfo struct {
4747 // This interface breaks the import cycle between mcp and core packages.
4848 type Orchestrator interface {
4949 ListMyses() []MysisInfo
50- GetMysis(id string) (MysisInfo, error)
5150 MysisCount() int
5251 MaxMyses() int
5352 SendMessageAsync(mysisID, message string) error
@@ -86,55 +85,6 @@ func RegisterOrchestratorTools(proxy *Proxy, orchestrator Orchestrator) {
8685 },
8786 )
8887
89- // Get mysis info tool
90- proxy.RegisterTool(
91- Tool{
92- Name: "zoea_get_mysis",
93- Description: "Get detailed information about a specific mysis",
94- InputSchema: json.RawMessage(`{
95- "type": "object",
96- "properties": {
97- "mysis_id": {"type": "string", "description": "The ID of the mysis"}
98- },
99- "required": ["mysis_id"]
100- }`),
101- },
102- func(ctx context.Context, args json.RawMessage) (*ToolResult, error) {
103- var params struct {
104- MysisID string `json:"mysis_id"`
105- }
106- if err := json.Unmarshal(args, &params); err != nil {
107- return &ToolResult{
108- Content: []ContentBlock{{Type: "text", Text: fmt.Sprintf("invalid arguments: %v", err)}},
109- IsError: true,
110- }, nil
111- }
112-
113- mysis, err := orchestrator.GetMysis(params.MysisID)
114- if err != nil {
115- return &ToolResult{
116- Content: []ContentBlock{{Type: "text", Text: fmt.Sprintf("mysis not found: %s", params.MysisID)}},
117- IsError: true,
118- }, nil
119- }
120-
121- info := map[string]interface{}{
122- "id": mysis.ID,
123- "name": mysis.Name,
124- "state": mysis.State,
125- "provider": mysis.Provider,
126- }
127- if mysis.LastError != nil {
128- info["last_error"] = mysis.LastError.Error()
129- }
130-
131- data, _ := json.MarshalIndent(info, "", " ")
132- return &ToolResult{
133- Content: []ContentBlock{{Type: "text", Text: string(data)}},
134- }, nil
135- },
136- )
137-
13888 // Swarm status tool
13989 proxy.RegisterTool(
14090 Tool{
internal/store/store.go+5−5
@@ -15,7 +15,7 @@ import (
1515 //go:embed schema.sql
1616 var schema string
1717
18-const currentSchemaVersion = 6
18+const currentSchemaVersion = 7
1919
2020 // Store provides access to the SQLite database.
2121 type Store struct {
@@ -103,8 +103,8 @@ func (s *Store) migrate() error {
103103 if version < currentSchemaVersion {
104104 return fmt.Errorf(
105105 "database schema version %d is outdated (current: %d)\n"+
106- "Delete the database to continue:\n"+
107- " rm ~/.zoea-nova/zoea.db*",
106+ "Reset the database to continue:\n"+
107+ " make db-reset-accounts",
108108 version, currentSchemaVersion,
109109 )
110110 }
@@ -113,8 +113,8 @@ func (s *Store) migrate() error {
113113 if version > currentSchemaVersion {
114114 return fmt.Errorf(
115115 "database schema version %d is newer than supported version %d\n"+
116- "Upgrade Zoea Nova or delete the database:\n"+
117- " rm ~/.zoea-nova/zoea.db*",
116+ "Upgrade Zoea Nova or reset the database:\n"+
117+ " make db-reset-accounts",
118118 version, currentSchemaVersion,
119119 )
120120 }