@mindfullabai/onda-mcp 0.3.0 → 0.3.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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  MCP server to control [Onda](https://onda.dev) terminal from AI agents (Claude Code, Cursor, Windsurf, etc.)
4
4
 
5
- 28 tools across 7 categories let AI agents split panes, run commands, manage tabs and workspaces, coordinate across multiple windows, and orchestrate multi-agent workflows -- all through the standard [Model Context Protocol](https://modelcontextprotocol.io/).
5
+ 31 tools across 7 categories let AI agents split panes, run commands, manage tabs and workspaces, coordinate across multiple windows, and orchestrate multi-agent workflows -- all through the standard [Model Context Protocol](https://modelcontextprotocol.io/).
6
6
 
7
7
  Since v0.2.0 Onda MCP is **multi-window aware**: agents can discover windows, locate workspaces, address terminals unambiguously (each entry carries `windowId` + `workspaceId` + `paneId`), and launch full Claude/agent sessions in one atomic call with the `onda_launch_session` macro.
8
8
 
@@ -94,6 +94,9 @@ Same MCP config format as above.
94
94
  |------|-------------|
95
95
  | `onda_window_list` | List Onda main windows. Each entry: `{windowId, isFocused, title, workspaceIds[], activeWorkspaceId, uiMode}`. |
96
96
  | `onda_window_new` | Open a fresh empty main window. Returns `{windowId}`. |
97
+ | `onda_window_focus` | Bring a window to the foreground (restore + raise + focus). When `windowId` is omitted, focuses the primary window. |
98
+ | `onda_window_mount_workspace` | Mount a workspace in a specific window. Idempotent; orchestrates an atomic transfer if the workspace is currently owned by another window. Returns `{success, workspaceId, windowId, transferred}`. |
99
+ | `onda_workspace_unmount` | Remove a workspace from whichever window currently hosts it. The workspace continues to exist globally — only its on-screen mounting is dropped. Returns `{success, workspaceId, windowId, alreadyUnmounted}`. |
97
100
 
98
101
  ### Macro
99
102
 
package/dist/index.js CHANGED
@@ -487,6 +487,48 @@ const TOOLS = [
487
487
  description: 'Open a fresh empty main window (analogue of File > New Window). Returns { windowId }. Useful when an agent needs to host a workspace in a brand new window without contaminating existing ones.',
488
488
  inputSchema: { type: 'object', properties: {} },
489
489
  },
490
+ {
491
+ name: 'onda_window_focus',
492
+ description: 'Bring a specific main window to the foreground (restore if minimized, raise, focus). When windowId is omitted, focuses the primary window. Returns { success, windowId }. Use after mounting a workspace remotely, or to wake Onda from a background CLI subagent.',
493
+ inputSchema: {
494
+ type: 'object',
495
+ properties: {
496
+ windowId: { type: 'string', description: 'Target window id. Omit to focus the primary window.' },
497
+ },
498
+ },
499
+ },
500
+ {
501
+ name: 'onda_window_mount_workspace',
502
+ description: 'Mount a workspace in a specific window. Idempotent when the workspace is already there. If the workspace is currently mounted in another window, orchestrates an atomic transfer via the unmount-request flow (same path the in-app "Move workspace here?" dialog uses). Returns { success, workspaceId, windowId, transferred }. Pass `direction` to control how the new tile is spliced into the mosaic (mirrors the Cmd+P picker: Enter = down, Cmd+Enter = right).',
503
+ inputSchema: {
504
+ type: 'object',
505
+ properties: {
506
+ workspaceId: { type: 'string', description: 'Workspace to mount.' },
507
+ windowId: { type: 'string', description: 'Destination window id.' },
508
+ direction: {
509
+ type: 'string',
510
+ enum: ['down', 'right'],
511
+ description: 'Optional. Where to splice the new tile relative to the anchor workspace in the mosaic. Default: "down".',
512
+ },
513
+ anchorWorkspaceId: {
514
+ type: 'string',
515
+ description: 'Optional. Workspace id to anchor the split next to. Default: currently active workspace in the target window.',
516
+ },
517
+ },
518
+ required: ['workspaceId', 'windowId'],
519
+ },
520
+ },
521
+ {
522
+ name: 'onda_workspace_unmount',
523
+ description: 'Remove a workspace from whichever window currently hosts it (drops it from that window\'s tiled mosaic and releases the mount registry slot). The workspace continues to exist in the global list — only its on-screen mounting is dropped. Returns { success, workspaceId, windowId, alreadyUnmounted }.',
524
+ inputSchema: {
525
+ type: 'object',
526
+ properties: {
527
+ workspaceId: { type: 'string', description: 'Workspace to unmount.' },
528
+ },
529
+ required: ['workspaceId'],
530
+ },
531
+ },
490
532
  // --- Advanced terminal spawn ---
491
533
  {
492
534
  name: 'onda_terminal_spawn',
@@ -629,6 +671,9 @@ const TOOL_MAP = {
629
671
  workspaceId: args.workspaceId || ONDA_CONTEXT.workspaceId || undefined,
630
672
  cwd: args.cwd,
631
673
  shell: args.shell,
674
+ waitForReady: args.waitForReady,
675
+ direction: args.direction,
676
+ relativeToPaneId: args.relativeToPaneId,
632
677
  }),
633
678
  },
634
679
  onda_workspace_tile: { method: 'workspace.setLayout' },
@@ -636,6 +681,9 @@ const TOOL_MAP = {
636
681
  // Window
637
682
  onda_window_list: { method: 'window.list' },
638
683
  onda_window_new: { method: 'window.new' },
684
+ onda_window_focus: { method: 'window.focus' },
685
+ onda_window_mount_workspace: { method: 'window.mountWorkspace' },
686
+ onda_workspace_unmount: { method: 'workspace.unmount' },
639
687
  // Advanced spawn + macro
640
688
  onda_terminal_spawn: {
641
689
  method: 'terminal.spawnInPane',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindfullabai/onda-mcp",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "MCP server for Onda terminal - control tabs, panes, terminals from AI agents",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",