mageagent-local 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,238 @@
1
+ # MageAgent Menu Bar App
2
+
3
+ A native macOS menu bar application for managing the MageAgent multi-model AI orchestration server.
4
+
5
+ ## Features
6
+
7
+ - **Server Control**: Start, stop, and restart the MageAgent server
8
+ - **Model Management**: Load individual models or all models into GPU memory
9
+ - **Pattern Selection**: Choose orchestration patterns with automatic model loading
10
+ - **Live Status**: Real-time server status and model availability
11
+ - **Test Runner**: Comprehensive test suite with streaming visual feedback
12
+ - **Quick Access**: Open API docs, view logs, and access settings
13
+
14
+ ## Screenshots
15
+
16
+ ### Main Menu
17
+ The menu bar icon provides quick access to all server controls:
18
+
19
+ ```
20
+ ┌─────────────────────────────────────────┐
21
+ │ Status: Running (v1.0.0) │
22
+ ├─────────────────────────────────────────┤
23
+ │ Start Server ⌘S │
24
+ │ Stop Server │
25
+ │ Restart Server ⌘R │
26
+ │ Warmup Models ⌘W │
27
+ ├─────────────────────────────────────────┤
28
+ │ Load Models ▸ │
29
+ │ Patterns ▸ │
30
+ ├─────────────────────────────────────────┤
31
+ │ Open API Docs ⌘D │
32
+ │ View Logs ⌘L │
33
+ │ Run Test ⌘T │
34
+ ├─────────────────────────────────────────┤
35
+ │ Settings... ⌘, │
36
+ ├─────────────────────────────────────────┤
37
+ │ Quit MageAgent Menu ⌘Q │
38
+ └─────────────────────────────────────────┘
39
+ ```
40
+
41
+ ### Load Models Submenu
42
+ Click individual models to load them into memory:
43
+
44
+ ```
45
+ ┌─────────────────────────────────────────────────┐
46
+ │ Click to load into memory: │
47
+ ├─────────────────────────────────────────────────┤
48
+ │ ✓ Qwen-72B Q8 (77GB) - Reasoning │
49
+ │ ✓ Hermes-3 8B Q8 (9GB) - Tool Calling │
50
+ │ Qwen-Coder 7B (5GB) - Fast Validation │
51
+ │ Qwen-Coder 32B (18GB) - Coding │
52
+ ├─────────────────────────────────────────────────┤
53
+ │ Load All Models ⌘W │
54
+ └─────────────────────────────────────────────────┘
55
+ ```
56
+
57
+ ### Patterns Submenu
58
+ Each pattern shows its required models:
59
+
60
+ ```
61
+ ┌───────────────────────────────────────────────────┐
62
+ │ auto ▸ │
63
+ │ execute ▸ │
64
+ │ hybrid ▸ │
65
+ │ validated ▸ │
66
+ │ compete ▸ │
67
+ └───────────────────────────────────────────────────┘
68
+
69
+
70
+ ┌───────────────────────────────────────────────────┐
71
+ │ Reasoning + tools - Qwen-72B for thinking, │
72
+ │ Hermes for tool extraction │
73
+ ├───────────────────────────────────────────────────┤
74
+ │ Required Models: │
75
+ │ • Qwen-72B Q8 (77GB) - Reasoning │
76
+ │ • Hermes-3 8B Q8 (9GB) - Tool Calling │
77
+ ├───────────────────────────────────────────────────┤
78
+ │ ✓ Use hybrid Pattern │
79
+ └───────────────────────────────────────────────────┘
80
+ ```
81
+
82
+ ### Test Results Window
83
+ Streaming test output with color-coded results:
84
+
85
+ ```
86
+ ┌─────────────────────────────────────────────────────┐
87
+ │ MageAgent Test Results ─□X│
88
+ ├─────────────────────────────────────────────────────┤
89
+ │ MageAgent Test Suite │
90
+ │ ================================================== │
91
+ │ │
92
+ │ [1/6] Testing: Server Health Check... PASS │
93
+ │ Status: healthy │
94
+ │ [2/6] Testing: Models Endpoint... PASS │
95
+ │ 12 models available │
96
+ │ [3/6] Testing: Validator Model (7B)... PASS │
97
+ │ "Test passed" (0.8s) │
98
+ │ [4/6] Testing: Tools Model (Hermes-3)... PASS │
99
+ │ "test passed" (1.2s) │
100
+ │ [5/6] Testing: Primary Model (72B)... PASS │
101
+ │ "Test passed." (8.4s) │
102
+ │ [6/6] Testing: Competitor Model (32B)... PASS │
103
+ │ "test passed" (3.1s) │
104
+ │ │
105
+ │ ================================================== │
106
+ │ All tests passed! │
107
+ ├─────────────────────────────────────────────────────┤
108
+ │ Results: 6/6 passed [ Close ] │
109
+ └─────────────────────────────────────────────────────┘
110
+ ```
111
+
112
+ ## Installation
113
+
114
+ ### Quick Install (Recommended)
115
+
116
+ ```bash
117
+ # From the nexus-local-mageagent repository
118
+ npm run install:menubar
119
+ ```
120
+
121
+ ### Manual Install
122
+
123
+ ```bash
124
+ # 1. Build the app
125
+ cd menubar-app
126
+ ./build.sh
127
+
128
+ # 2. The app is automatically installed to /Applications
129
+
130
+ # 3. (Optional) Enable auto-start on login
131
+ cp ~/Library/LaunchAgents/ai.adverant.mageagent.menubar.plist ~/Library/LaunchAgents/
132
+ launchctl load ~/Library/LaunchAgents/ai.adverant.mageagent.menubar.plist
133
+ ```
134
+
135
+ ## Requirements
136
+
137
+ - macOS 13.0 (Ventura) or later
138
+ - Apple Silicon (M1/M2/M3/M4) - required for MLX models
139
+ - MageAgent server dependencies installed
140
+
141
+ ## Configuration
142
+
143
+ The menu bar app uses these configuration paths:
144
+
145
+ | Item | Path |
146
+ |------|------|
147
+ | Server Script | `~/.claude/scripts/mageagent-server.sh` |
148
+ | Server URL | `http://localhost:3457` |
149
+ | Server Log | `~/.claude/debug/mageagent.log` |
150
+ | App Debug Log | `~/.claude/debug/mageagent-menubar-debug.log` |
151
+ | Menu Bar Icon | `~/.claude/mageagent-menubar/icons/icon_18x18@2x.png` |
152
+
153
+ ## Available Patterns
154
+
155
+ | Pattern | Models Required | Use Case |
156
+ |---------|-----------------|----------|
157
+ | **auto** | Validator (7B) | Intelligent task routing |
158
+ | **execute** | Primary (72B) + Tools (8B) | Real file/web/command access |
159
+ | **hybrid** | Primary (72B) + Tools (8B) | Complex reasoning + tool extraction |
160
+ | **validated** | Primary (72B) + Validator (7B) | Code that needs validation |
161
+ | **compete** | Primary (72B) + Competitor (32B) + Validator (7B) | Critical/security code |
162
+
163
+ ## Keyboard Shortcuts
164
+
165
+ | Action | Shortcut |
166
+ |--------|----------|
167
+ | Start Server | ⌘S |
168
+ | Restart Server | ⌘R |
169
+ | Warmup Models | ⌘W |
170
+ | Open API Docs | ⌘D |
171
+ | View Logs | ⌘L |
172
+ | Run Tests | ⌘T |
173
+ | Settings | ⌘, |
174
+ | Quit | ⌘Q |
175
+
176
+ ## Troubleshooting
177
+
178
+ ### Menu bar icon not appearing
179
+ 1. Check if the app is running: `pgrep MageAgentMenuBar`
180
+ 2. Restart the app: `pkill MageAgentMenuBar && open /Applications/MageAgentMenuBar.app`
181
+
182
+ ### Server won't start
183
+ 1. Check if port is in use: `lsof -i:3457`
184
+ 2. Check server logs: Click "View Logs" in menu
185
+ 3. Check debug log: `tail -50 ~/.claude/debug/mageagent-menubar-debug.log`
186
+
187
+ ### Models not loading
188
+ 1. Ensure server is running (green status)
189
+ 2. Check available memory: `top -l 1 | grep PhysMem`
190
+ 3. Models require significant RAM: 72B=77GB, 32B=18GB, 8B=9GB, 7B=5GB
191
+
192
+ ### Notifications not showing
193
+ The app uses system notifications with fallback to floating toast panels. If neither work:
194
+ 1. Check System Settings > Notifications > MageAgentMenuBar
195
+ 2. Grant notification permissions if prompted
196
+
197
+ ## Development
198
+
199
+ ### Building from Source
200
+
201
+ ```bash
202
+ cd menubar-app
203
+
204
+ # Compile Swift code
205
+ swiftc -o build/MageAgentMenuBar.app/Contents/MacOS/MageAgentMenuBar \
206
+ -framework Cocoa \
207
+ -framework UserNotifications \
208
+ -target arm64-apple-macos13.0 \
209
+ MageAgentMenuBar/main.swift \
210
+ MageAgentMenuBar/AppDelegate.swift
211
+
212
+ # Or use the build script
213
+ ./build.sh
214
+ ```
215
+
216
+ ### Project Structure
217
+
218
+ ```
219
+ menubar-app/
220
+ ├── MageAgentMenuBar/
221
+ │ ├── main.swift # App entry point
222
+ │ ├── AppDelegate.swift # Main app logic
223
+ │ └── Info.plist # App metadata
224
+ ├── build/
225
+ │ └── MageAgentMenuBar.app/ # Built application
226
+ ├── build.sh # Build script
227
+ └── Package.swift # Swift package definition
228
+ ```
229
+
230
+ ### Key Classes
231
+
232
+ - **AppDelegate**: Main application delegate handling all UI and server interactions
233
+ - **ModelInfo**: Struct defining available models (id, display name, memory size)
234
+ - **PatternInfo**: Struct defining patterns (id, name, required models, description)
235
+
236
+ ## License
237
+
238
+ MIT License - see main repository LICENSE file.