@wong2kim/wmux 1.0.0 → 1.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.
- package/LICENSE +21 -0
- package/README.md +209 -157
- package/dist/cli/cli/client.js +1 -1
- package/dist/cli/cli/commands/browser.js +19 -19
- package/dist/cli/cli/index.js +58 -58
- package/dist/cli/shared/constants.js +17 -4
- package/dist/mcp/shared/constants.js +17 -4
- package/package.json +96 -84
- package/assets/icon.ico +0 -0
- package/assets/icon.svg +0 -6
- package/forge.config.ts +0 -61
- package/index.html +0 -12
- package/postcss.config.js +0 -6
- package/src/cli/client.ts +0 -76
- package/src/cli/commands/browser.ts +0 -128
- package/src/cli/commands/input.ts +0 -72
- package/src/cli/commands/notify.ts +0 -29
- package/src/cli/commands/pane.ts +0 -90
- package/src/cli/commands/surface.ts +0 -102
- package/src/cli/commands/system.ts +0 -95
- package/src/cli/commands/workspace.ts +0 -116
- package/src/cli/index.ts +0 -145
- package/src/cli/utils.ts +0 -44
- package/src/main/index.ts +0 -86
- package/src/main/ipc/handlers/clipboard.handler.ts +0 -20
- package/src/main/ipc/handlers/metadata.handler.ts +0 -56
- package/src/main/ipc/handlers/pty.handler.ts +0 -69
- package/src/main/ipc/handlers/session.handler.ts +0 -17
- package/src/main/ipc/handlers/shell.handler.ts +0 -11
- package/src/main/ipc/registerHandlers.ts +0 -31
- package/src/main/mcp/McpRegistrar.ts +0 -156
- package/src/main/metadata/MetadataCollector.ts +0 -58
- package/src/main/notification/ToastManager.ts +0 -32
- package/src/main/pipe/PipeServer.ts +0 -190
- package/src/main/pipe/RpcRouter.ts +0 -46
- package/src/main/pipe/handlers/_bridge.ts +0 -40
- package/src/main/pipe/handlers/browser.rpc.ts +0 -132
- package/src/main/pipe/handlers/input.rpc.ts +0 -120
- package/src/main/pipe/handlers/meta.rpc.ts +0 -59
- package/src/main/pipe/handlers/notify.rpc.ts +0 -53
- package/src/main/pipe/handlers/pane.rpc.ts +0 -39
- package/src/main/pipe/handlers/surface.rpc.ts +0 -43
- package/src/main/pipe/handlers/system.rpc.ts +0 -36
- package/src/main/pipe/handlers/workspace.rpc.ts +0 -52
- package/src/main/pty/AgentDetector.ts +0 -247
- package/src/main/pty/OscParser.ts +0 -81
- package/src/main/pty/PTYBridge.ts +0 -88
- package/src/main/pty/PTYManager.ts +0 -104
- package/src/main/pty/ShellDetector.ts +0 -63
- package/src/main/session/SessionManager.ts +0 -53
- package/src/main/updater/AutoUpdater.ts +0 -132
- package/src/main/window/createWindow.ts +0 -71
- package/src/mcp/README.md +0 -56
- package/src/mcp/index.ts +0 -153
- package/src/mcp/wmux-client.ts +0 -127
- package/src/preload/index.ts +0 -111
- package/src/preload/preload.ts +0 -108
- package/src/renderer/App.tsx +0 -5
- package/src/renderer/components/Browser/BrowserPanel.tsx +0 -219
- package/src/renderer/components/Browser/BrowserToolbar.tsx +0 -253
- package/src/renderer/components/Company/ApprovalDialog.tsx +0 -3
- package/src/renderer/components/Company/CompanyView.tsx +0 -7
- package/src/renderer/components/Company/MessageFeedPanel.tsx +0 -3
- package/src/renderer/components/Layout/AppLayout.tsx +0 -234
- package/src/renderer/components/Notification/NotificationPanel.tsx +0 -129
- package/src/renderer/components/Palette/CommandPalette.tsx +0 -409
- package/src/renderer/components/Palette/PaletteItem.tsx +0 -55
- package/src/renderer/components/Pane/Pane.tsx +0 -122
- package/src/renderer/components/Pane/PaneContainer.tsx +0 -41
- package/src/renderer/components/Pane/SurfaceTabs.tsx +0 -46
- package/src/renderer/components/Settings/SettingsPanel.tsx +0 -886
- package/src/renderer/components/Sidebar/MiniSidebar.tsx +0 -67
- package/src/renderer/components/Sidebar/Sidebar.tsx +0 -84
- package/src/renderer/components/Sidebar/WorkspaceItem.tsx +0 -241
- package/src/renderer/components/StatusBar/StatusBar.tsx +0 -93
- package/src/renderer/components/Terminal/SearchBar.tsx +0 -126
- package/src/renderer/components/Terminal/Terminal.tsx +0 -102
- package/src/renderer/components/Terminal/ViCopyMode.tsx +0 -104
- package/src/renderer/hooks/useKeyboard.ts +0 -310
- package/src/renderer/hooks/useNotificationListener.ts +0 -80
- package/src/renderer/hooks/useNotificationSound.ts +0 -75
- package/src/renderer/hooks/useRpcBridge.ts +0 -451
- package/src/renderer/hooks/useT.ts +0 -11
- package/src/renderer/hooks/useTerminal.ts +0 -349
- package/src/renderer/hooks/useViCopyMode.ts +0 -320
- package/src/renderer/i18n/index.ts +0 -69
- package/src/renderer/i18n/locales/en.ts +0 -157
- package/src/renderer/i18n/locales/ja.ts +0 -155
- package/src/renderer/i18n/locales/ko.ts +0 -155
- package/src/renderer/i18n/locales/zh.ts +0 -155
- package/src/renderer/index.tsx +0 -6
- package/src/renderer/stores/index.ts +0 -19
- package/src/renderer/stores/slices/notificationSlice.ts +0 -56
- package/src/renderer/stores/slices/paneSlice.ts +0 -141
- package/src/renderer/stores/slices/surfaceSlice.ts +0 -122
- package/src/renderer/stores/slices/uiSlice.ts +0 -247
- package/src/renderer/stores/slices/workspaceSlice.ts +0 -120
- package/src/renderer/styles/globals.css +0 -150
- package/src/renderer/themes.ts +0 -99
- package/src/shared/constants.ts +0 -53
- package/src/shared/electron.d.ts +0 -11
- package/src/shared/rpc.ts +0 -71
- package/src/shared/types.ts +0 -176
- package/tailwind.config.js +0 -11
- package/tsconfig.cli.json +0 -24
- package/tsconfig.json +0 -21
- package/tsconfig.mcp.json +0 -25
- package/vite.main.config.ts +0 -14
- package/vite.preload.config.ts +0 -9
- package/vite.renderer.config.ts +0 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 openwong2kim
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,157 +1,209 @@
|
|
|
1
|
-
# wmux
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
- **
|
|
42
|
-
- **
|
|
43
|
-
- **
|
|
44
|
-
- **
|
|
45
|
-
- **
|
|
46
|
-
- **
|
|
47
|
-
- **
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
|
82
|
-
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
|
126
|
-
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
| `
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
##
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
1
|
+
# wmux
|
|
2
|
+
|
|
3
|
+
**AI Agent Terminal for Windows**
|
|
4
|
+
|
|
5
|
+
Run Claude Code, Codex, Gemini CLI side by side — with built-in browser, smart notifications, and MCP integration.
|
|
6
|
+
|
|
7
|
+
Inspired by [cmux](https://github.com/manaflow-ai/cmux) (macOS), wmux brings the same philosophy to Windows: **a primitive, not a solution.** Composable building blocks for multi-agent workflows.
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+

|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
**Download:** [wmux-1.0.0 Setup.exe](https://github.com/openwong2kim/wmux/releases/latest)
|
|
18
|
+
|
|
19
|
+
Or build from source:
|
|
20
|
+
```powershell
|
|
21
|
+
irm https://raw.githubusercontent.com/openwong2kim/wmux/main/install.ps1 | iex
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Why wmux?
|
|
27
|
+
|
|
28
|
+
| Problem | wmux |
|
|
29
|
+
|---------|------|
|
|
30
|
+
| Windows has no cmux | Native Windows terminal multiplexer for AI agents |
|
|
31
|
+
| Agents can't see the browser | Built-in browser with MCP — Claude clicks, fills, evaluates JS |
|
|
32
|
+
| "Is it done yet?" | Smart activity-based notifications + taskbar flash |
|
|
33
|
+
| Can't compare agents | Multiview — Ctrl+click workspaces to view side by side |
|
|
34
|
+
| Hard to describe UI elements to LLM | Inspector — click any element, LLM-friendly context copied |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
### Terminal
|
|
41
|
+
- **xterm.js + WebGL** GPU-accelerated rendering
|
|
42
|
+
- **ConPTY** native Windows pseudo-terminal
|
|
43
|
+
- **Split panes** — `Ctrl+D` horizontal, `Ctrl+Shift+D` vertical
|
|
44
|
+
- **Tabs** — multiple surfaces per pane
|
|
45
|
+
- **Vi copy mode** — `Ctrl+Shift+X`
|
|
46
|
+
- **Search** — `Ctrl+F`
|
|
47
|
+
- **Unlimited scrollback** — 999,999 lines default
|
|
48
|
+
|
|
49
|
+
### Workspaces
|
|
50
|
+
- Sidebar with drag-and-drop reordering
|
|
51
|
+
- `Ctrl+1` ~ `Ctrl+9` quick switch
|
|
52
|
+
- **Multiview** — `Ctrl+click` workspaces to split-view them simultaneously
|
|
53
|
+
- `Ctrl+Shift+G` to exit multiview
|
|
54
|
+
- Session persistence — everything restored on restart
|
|
55
|
+
|
|
56
|
+
### Browser
|
|
57
|
+
- Built-in browser panel — `Ctrl+Shift+L`
|
|
58
|
+
- Navigation bar, DevTools, back/forward
|
|
59
|
+
- **Element Inspector** — magnifying glass button to inspect elements
|
|
60
|
+
- Hover to highlight, click to copy LLM-friendly context:
|
|
61
|
+
```
|
|
62
|
+
[Inspector] Google (https://www.google.com/)
|
|
63
|
+
selector: input.gLFyf
|
|
64
|
+
<input type="text" name="q" aria-label="Search">
|
|
65
|
+
text: ""
|
|
66
|
+
parent: div.RNNXgb > siblings: button"Google Search", button"I'm Feeling Lucky"
|
|
67
|
+
```
|
|
68
|
+
- Paste directly into Claude — it understands the element immediately
|
|
69
|
+
|
|
70
|
+
### Notifications
|
|
71
|
+
- **Activity-based detection** — monitors output throughput, no fragile pattern matching
|
|
72
|
+
- **Taskbar flash** — orange flash when notifications arrive while unfocused
|
|
73
|
+
- **Windows toast** — native OS notification with click-to-focus
|
|
74
|
+
- **Process exit alerts** — notifies on non-zero exit codes
|
|
75
|
+
- **Notification panel** — `Ctrl+I`, read/unread tracking, per-workspace filtering
|
|
76
|
+
- **Sound** — Web Audio synthesized tones per notification type
|
|
77
|
+
|
|
78
|
+
### MCP Server (Claude Code Integration)
|
|
79
|
+
wmux automatically registers its MCP server when launched. Claude Code can:
|
|
80
|
+
|
|
81
|
+
| Tool | What it does |
|
|
82
|
+
|------|-------------|
|
|
83
|
+
| `browser_open` | Open a new browser panel |
|
|
84
|
+
| `browser_navigate` | Go to URL |
|
|
85
|
+
| `browser_snapshot` | Get full page HTML |
|
|
86
|
+
| `browser_click` | Click element by CSS selector |
|
|
87
|
+
| `browser_fill` | Fill input field |
|
|
88
|
+
| `browser_eval` | Execute JavaScript |
|
|
89
|
+
| `terminal_read` | Read terminal screen |
|
|
90
|
+
| `terminal_send` | Send text to terminal |
|
|
91
|
+
| `terminal_send_key` | Send key (enter, ctrl+c, etc.) |
|
|
92
|
+
| `workspace_list` | List all workspaces |
|
|
93
|
+
| `surface_list` | List surfaces |
|
|
94
|
+
| `pane_list` | List panes |
|
|
95
|
+
|
|
96
|
+
**Multi-agent:** All browser tools accept `surfaceId` — each Claude Code session controls its own browser independently.
|
|
97
|
+
|
|
98
|
+
### Agent Status Detection
|
|
99
|
+
Gate-based detection for AI coding agents:
|
|
100
|
+
- Claude Code, Cursor, Aider, Codex CLI, Gemini CLI, OpenCode, GitHub Copilot CLI
|
|
101
|
+
- Detects agent startup → activates monitoring
|
|
102
|
+
- Critical action warnings (git push --force, rm -rf, DROP TABLE, etc.)
|
|
103
|
+
|
|
104
|
+
### Themes
|
|
105
|
+
Catppuccin, Tokyo Night, Dracula, Nord, Gruvbox, Solarized, One Dark, and more.
|
|
106
|
+
|
|
107
|
+
### i18n
|
|
108
|
+
English, 한국어, 日本語, 中文
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Keyboard Shortcuts
|
|
113
|
+
|
|
114
|
+
| Key | Action |
|
|
115
|
+
|-----|--------|
|
|
116
|
+
| `Ctrl+D` | Split right |
|
|
117
|
+
| `Ctrl+Shift+D` | Split down |
|
|
118
|
+
| `Ctrl+T` | New tab |
|
|
119
|
+
| `Ctrl+W` | Close tab |
|
|
120
|
+
| `Ctrl+N` | New workspace |
|
|
121
|
+
| `Ctrl+1~9` | Switch workspace |
|
|
122
|
+
| `Ctrl+click` | Add workspace to multiview |
|
|
123
|
+
| `Ctrl+Shift+G` | Exit multiview |
|
|
124
|
+
| `Ctrl+Shift+L` | Open browser |
|
|
125
|
+
| `Ctrl+B` | Toggle sidebar |
|
|
126
|
+
| `Ctrl+K` | Command palette |
|
|
127
|
+
| `Ctrl+I` | Notifications |
|
|
128
|
+
| `Ctrl+,` | Settings |
|
|
129
|
+
| `Ctrl+F` | Search terminal |
|
|
130
|
+
| `Ctrl+Shift+X` | Vi copy mode |
|
|
131
|
+
| `Ctrl+Shift+H` | Flash pane |
|
|
132
|
+
| `Alt+Ctrl+Arrow` | Focus adjacent pane |
|
|
133
|
+
| `F12` | Browser DevTools |
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## CLI
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
wmux workspace list
|
|
141
|
+
wmux workspace create "backend"
|
|
142
|
+
wmux pane split-right
|
|
143
|
+
wmux pane send-text "npm test"
|
|
144
|
+
wmux notify --title "Done" --body "Tests passed"
|
|
145
|
+
wmux browser snapshot
|
|
146
|
+
wmux browser click "#submit-btn"
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Development
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
git clone https://github.com/openwong2kim/wmux.git
|
|
155
|
+
cd wmux
|
|
156
|
+
npm install
|
|
157
|
+
npm start # Dev mode
|
|
158
|
+
npm run make # Build installer
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Requirements (development only)
|
|
162
|
+
- Node.js 18+
|
|
163
|
+
- Python 3.x (for node-gyp)
|
|
164
|
+
- Visual Studio Build Tools with C++ workload
|
|
165
|
+
|
|
166
|
+
The `install.ps1` script auto-installs Python and VS Build Tools if missing.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Architecture
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
Electron Main Process
|
|
174
|
+
├── PTYManager (node-pty)
|
|
175
|
+
├── PTYBridge (data forwarding + ActivityMonitor)
|
|
176
|
+
├── AgentDetector (gate-based agent status)
|
|
177
|
+
├── PipeServer (Named Pipe JSON-RPC)
|
|
178
|
+
├── McpRegistrar (auto-registers MCP in ~/.claude.json)
|
|
179
|
+
└── ToastManager (OS notifications + taskbar flash)
|
|
180
|
+
|
|
181
|
+
Renderer Process (React 19 + Zustand)
|
|
182
|
+
├── PaneContainer (recursive split layout)
|
|
183
|
+
├── Terminal (xterm.js + WebGL)
|
|
184
|
+
├── BrowserPanel (webview + Inspector)
|
|
185
|
+
├── NotificationPanel
|
|
186
|
+
└── Multiview grid
|
|
187
|
+
|
|
188
|
+
MCP Server (stdio)
|
|
189
|
+
└── Bridges Claude Code ↔ wmux via Named Pipe RPC
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Acknowledgments
|
|
195
|
+
|
|
196
|
+
- [cmux](https://github.com/manaflow-ai/cmux) — The macOS AI agent terminal that inspired wmux. Same philosophy: primitives over prescriptive workflows.
|
|
197
|
+
- [xterm.js](https://xtermjs.org/) — Terminal rendering
|
|
198
|
+
- [node-pty](https://github.com/microsoft/node-pty) — Pseudo-terminal
|
|
199
|
+
- [Electron](https://www.electronjs.org/) — Desktop framework
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Note on AI Agents
|
|
204
|
+
|
|
205
|
+
wmux detects AI coding agents for status display purposes only. It does not call any AI APIs, capture agent outputs, or automate agent interactions. Users are responsible for complying with their AI provider's Terms of Service.
|
|
206
|
+
|
|
207
|
+
## License
|
|
208
|
+
|
|
209
|
+
MIT
|
package/dist/cli/cli/client.js
CHANGED
|
@@ -37,7 +37,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.sendRequest = sendRequest;
|
|
38
38
|
const net = __importStar(require("net"));
|
|
39
39
|
const crypto = __importStar(require("crypto"));
|
|
40
|
-
const PIPE_NAME = process.env.WMUX_SOCKET_PATH || '\\\\.\\pipe\\wmux';
|
|
40
|
+
const PIPE_NAME = process.env.WMUX_SOCKET_PATH || (process.platform === 'win32' ? '\\\\.\\pipe\\wmux' : '/tmp/wmux.sock');
|
|
41
41
|
const TIMEOUT_MS = 5000;
|
|
42
42
|
function sendRequest(method, params = {}) {
|
|
43
43
|
return new Promise((resolve, reject) => {
|
|
@@ -3,25 +3,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.handleBrowser = handleBrowser;
|
|
4
4
|
const client_1 = require("../client");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
|
-
const BROWSER_HELP = `
|
|
7
|
-
wmux browser — Scriptable Browser API
|
|
8
|
-
|
|
9
|
-
USAGE
|
|
10
|
-
wmux browser <subcommand> [args]
|
|
11
|
-
|
|
12
|
-
SUBCOMMANDS
|
|
13
|
-
snapshot Return the full page HTML (document.documentElement.outerHTML)
|
|
14
|
-
click <selector> Click the first element matching the CSS selector
|
|
15
|
-
fill <selector> <text> Set the value of an input matching the CSS selector
|
|
16
|
-
eval <code> Execute arbitrary JavaScript in the page context
|
|
17
|
-
navigate <url> Navigate the active browser surface to a URL
|
|
18
|
-
|
|
19
|
-
EXAMPLES
|
|
20
|
-
wmux browser snapshot
|
|
21
|
-
wmux browser click "#submit-btn"
|
|
22
|
-
wmux browser fill "input[name=email]" "user@example.com"
|
|
23
|
-
wmux browser eval "document.title"
|
|
24
|
-
wmux browser navigate "https://example.com"
|
|
6
|
+
const BROWSER_HELP = `
|
|
7
|
+
wmux browser — Scriptable Browser API
|
|
8
|
+
|
|
9
|
+
USAGE
|
|
10
|
+
wmux browser <subcommand> [args]
|
|
11
|
+
|
|
12
|
+
SUBCOMMANDS
|
|
13
|
+
snapshot Return the full page HTML (document.documentElement.outerHTML)
|
|
14
|
+
click <selector> Click the first element matching the CSS selector
|
|
15
|
+
fill <selector> <text> Set the value of an input matching the CSS selector
|
|
16
|
+
eval <code> Execute arbitrary JavaScript in the page context
|
|
17
|
+
navigate <url> Navigate the active browser surface to a URL
|
|
18
|
+
|
|
19
|
+
EXAMPLES
|
|
20
|
+
wmux browser snapshot
|
|
21
|
+
wmux browser click "#submit-btn"
|
|
22
|
+
wmux browser fill "input[name=email]" "user@example.com"
|
|
23
|
+
wmux browser eval "document.title"
|
|
24
|
+
wmux browser navigate "https://example.com"
|
|
25
25
|
`.trimStart();
|
|
26
26
|
async function handleBrowser(args, jsonMode) {
|
|
27
27
|
const sub = args[0];
|
package/dist/cli/cli/index.js
CHANGED
|
@@ -12,64 +12,64 @@ const input_1 = require("./commands/input");
|
|
|
12
12
|
const notify_1 = require("./commands/notify");
|
|
13
13
|
const system_1 = require("./commands/system");
|
|
14
14
|
const browser_1 = require("./commands/browser");
|
|
15
|
-
const HELP_TEXT = `
|
|
16
|
-
wmux CLI
|
|
17
|
-
|
|
18
|
-
USAGE
|
|
19
|
-
wmux <command> [options]
|
|
20
|
-
|
|
21
|
-
WORKSPACE COMMANDS
|
|
22
|
-
list-workspaces List all workspaces
|
|
23
|
-
new-workspace [--name <name>] Create a new workspace
|
|
24
|
-
focus-workspace <id> Focus a workspace by ID
|
|
25
|
-
close-workspace <id> Close a workspace by ID
|
|
26
|
-
current-workspace Show the active workspace
|
|
27
|
-
|
|
28
|
-
SURFACE COMMANDS
|
|
29
|
-
list-surfaces List all surfaces in the active workspace
|
|
30
|
-
new-surface Open a new surface (terminal tab)
|
|
31
|
-
focus-surface <id> Focus a surface by ID
|
|
32
|
-
close-surface <id> Close a surface by ID
|
|
33
|
-
|
|
34
|
-
PANE COMMANDS
|
|
35
|
-
list-panes List all panes in the active workspace
|
|
36
|
-
focus-pane <id> Focus a pane by ID
|
|
37
|
-
split [--direction right|down] Split the active pane (default: right)
|
|
38
|
-
|
|
39
|
-
INPUT COMMANDS
|
|
40
|
-
send <text> Send text to the active terminal
|
|
41
|
-
send-key <keystroke> Send a key (e.g. Enter, ctrl-c, Tab)
|
|
42
|
-
read-screen Read the current terminal screen content
|
|
43
|
-
|
|
44
|
-
NOTIFICATION COMMANDS
|
|
45
|
-
notify --title <title> --body <body> Show a notification in wmux
|
|
46
|
-
|
|
47
|
-
SYSTEM COMMANDS
|
|
48
|
-
set-status <text> Set a status message on the active workspace
|
|
49
|
-
set-progress <0-100> Set a progress value on the active workspace
|
|
50
|
-
identify Show wmux app info
|
|
51
|
-
capabilities List all supported RPC methods
|
|
52
|
-
|
|
53
|
-
BROWSER COMMANDS
|
|
54
|
-
browser snapshot Return the full page HTML of the active browser surface
|
|
55
|
-
browser click <selector> Click an element by CSS selector
|
|
56
|
-
browser fill <selector> <text> Fill an input field by CSS selector
|
|
57
|
-
browser eval <code> Execute JavaScript in the browser context
|
|
58
|
-
browser navigate <url> Navigate the browser surface to a URL
|
|
59
|
-
|
|
60
|
-
GLOBAL FLAGS
|
|
61
|
-
--json Output raw JSON (useful for scripting)
|
|
62
|
-
--help Show this help text
|
|
63
|
-
|
|
64
|
-
EXAMPLES
|
|
65
|
-
wmux list-workspaces
|
|
66
|
-
wmux new-workspace --name dev
|
|
67
|
-
wmux send "echo hello"
|
|
68
|
-
wmux notify --title "Done" --body "Build finished"
|
|
69
|
-
wmux identify --json
|
|
70
|
-
wmux browser snapshot
|
|
71
|
-
wmux browser navigate "https://example.com"
|
|
72
|
-
wmux browser click "#login-btn"
|
|
15
|
+
const HELP_TEXT = `
|
|
16
|
+
wmux CLI
|
|
17
|
+
|
|
18
|
+
USAGE
|
|
19
|
+
wmux <command> [options]
|
|
20
|
+
|
|
21
|
+
WORKSPACE COMMANDS
|
|
22
|
+
list-workspaces List all workspaces
|
|
23
|
+
new-workspace [--name <name>] Create a new workspace
|
|
24
|
+
focus-workspace <id> Focus a workspace by ID
|
|
25
|
+
close-workspace <id> Close a workspace by ID
|
|
26
|
+
current-workspace Show the active workspace
|
|
27
|
+
|
|
28
|
+
SURFACE COMMANDS
|
|
29
|
+
list-surfaces List all surfaces in the active workspace
|
|
30
|
+
new-surface Open a new surface (terminal tab)
|
|
31
|
+
focus-surface <id> Focus a surface by ID
|
|
32
|
+
close-surface <id> Close a surface by ID
|
|
33
|
+
|
|
34
|
+
PANE COMMANDS
|
|
35
|
+
list-panes List all panes in the active workspace
|
|
36
|
+
focus-pane <id> Focus a pane by ID
|
|
37
|
+
split [--direction right|down] Split the active pane (default: right)
|
|
38
|
+
|
|
39
|
+
INPUT COMMANDS
|
|
40
|
+
send <text> Send text to the active terminal
|
|
41
|
+
send-key <keystroke> Send a key (e.g. Enter, ctrl-c, Tab)
|
|
42
|
+
read-screen Read the current terminal screen content
|
|
43
|
+
|
|
44
|
+
NOTIFICATION COMMANDS
|
|
45
|
+
notify --title <title> --body <body> Show a notification in wmux
|
|
46
|
+
|
|
47
|
+
SYSTEM COMMANDS
|
|
48
|
+
set-status <text> Set a status message on the active workspace
|
|
49
|
+
set-progress <0-100> Set a progress value on the active workspace
|
|
50
|
+
identify Show wmux app info
|
|
51
|
+
capabilities List all supported RPC methods
|
|
52
|
+
|
|
53
|
+
BROWSER COMMANDS
|
|
54
|
+
browser snapshot Return the full page HTML of the active browser surface
|
|
55
|
+
browser click <selector> Click an element by CSS selector
|
|
56
|
+
browser fill <selector> <text> Fill an input field by CSS selector
|
|
57
|
+
browser eval <code> Execute JavaScript in the browser context
|
|
58
|
+
browser navigate <url> Navigate the browser surface to a URL
|
|
59
|
+
|
|
60
|
+
GLOBAL FLAGS
|
|
61
|
+
--json Output raw JSON (useful for scripting)
|
|
62
|
+
--help Show this help text
|
|
63
|
+
|
|
64
|
+
EXAMPLES
|
|
65
|
+
wmux list-workspaces
|
|
66
|
+
wmux new-workspace --name dev
|
|
67
|
+
wmux send "echo hello"
|
|
68
|
+
wmux notify --title "Done" --body "Build finished"
|
|
69
|
+
wmux identify --json
|
|
70
|
+
wmux browser snapshot
|
|
71
|
+
wmux browser navigate "https://example.com"
|
|
72
|
+
wmux browser click "#login-btn"
|
|
73
73
|
`.trimStart();
|
|
74
74
|
const WORKSPACE_CMDS = new Set([
|
|
75
75
|
'list-workspaces',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ENV_KEYS = exports.
|
|
3
|
+
exports.ENV_KEYS = exports.IPC = void 0;
|
|
4
4
|
exports.getPipeName = getPipeName;
|
|
5
5
|
exports.getAuthTokenPath = getAuthTokenPath;
|
|
6
6
|
// IPC Channel names
|
|
@@ -11,6 +11,8 @@ exports.IPC = {
|
|
|
11
11
|
PTY_DISPOSE: 'pty:dispose',
|
|
12
12
|
PTY_DATA: 'pty:data',
|
|
13
13
|
PTY_EXIT: 'pty:exit',
|
|
14
|
+
PTY_LIST: 'pty:list',
|
|
15
|
+
PTY_RECONNECT: 'pty:reconnect',
|
|
14
16
|
SHELL_LIST: 'shell:list',
|
|
15
17
|
SESSION_SAVE: 'session:save',
|
|
16
18
|
SESSION_LOAD: 'session:load',
|
|
@@ -24,6 +26,8 @@ exports.IPC = {
|
|
|
24
26
|
// Clipboard (main process bridge)
|
|
25
27
|
CLIPBOARD_WRITE: 'clipboard:write',
|
|
26
28
|
CLIPBOARD_READ: 'clipboard:read',
|
|
29
|
+
CLIPBOARD_READ_IMAGE: 'clipboard:read-image',
|
|
30
|
+
CLIPBOARD_HAS_IMAGE: 'clipboard:has-image',
|
|
27
31
|
// Phase 4: Auto updater
|
|
28
32
|
UPDATE_CHECK: 'update:check',
|
|
29
33
|
UPDATE_AVAILABLE: 'update:available',
|
|
@@ -33,12 +37,21 @@ exports.IPC = {
|
|
|
33
37
|
UPDATE_INSTALL: 'update:install',
|
|
34
38
|
// Settings sync (renderer → main)
|
|
35
39
|
TOAST_ENABLED: 'settings:toast-enabled',
|
|
40
|
+
// Agent critical action approval
|
|
41
|
+
APPROVAL_REQUEST: 'approval:request',
|
|
42
|
+
// File system
|
|
43
|
+
FS_READ_DIR: 'fs:read-dir',
|
|
44
|
+
FS_READ_FILE: 'fs:read-file',
|
|
45
|
+
FS_WATCH: 'fs:watch',
|
|
46
|
+
FS_UNWATCH: 'fs:unwatch',
|
|
47
|
+
FS_CHANGED: 'fs:changed',
|
|
36
48
|
};
|
|
37
|
-
// Named Pipe path for wmux API
|
|
49
|
+
// Named Pipe / Unix socket path for wmux API
|
|
38
50
|
// Fixed name so MCP clients (e.g. Claude Code) can reconnect across wmux restarts
|
|
39
|
-
exports.PIPE_NAME = '\\\\.\\pipe\\wmux';
|
|
40
51
|
function getPipeName() {
|
|
41
|
-
|
|
52
|
+
if (process.platform === 'win32')
|
|
53
|
+
return '\\\\.\\pipe\\wmux';
|
|
54
|
+
return '/tmp/wmux.sock';
|
|
42
55
|
}
|
|
43
56
|
// Environment variable names injected into PTY sessions
|
|
44
57
|
exports.ENV_KEYS = {
|