Skip to content

feat: Add command execution API for terminal integration #5

Closed

Description

@dahai80

Background

Fusion Studio Code module has a Terminal tab in its three-column layout. It needs a backend API for executing shell commands and streaming output.

Request

Add JSON-RPC methods:

  1. Execute command — code.exec(command, cwd, timeout) runs a command and streams stdout/stderr
  2. List processes — code.processes() lists running child processes
  3. Kill process — code.kill(pid) terminates a running process

Use Case

When AI suggests running tests or build commands:

  1. User clicks "Run" on a suggested command
  2. Studio calls code.exec("swift test", cwd: projectPath)
  3. Output streams back to the Terminal panel
  4. AI can verify results automatically

API Design Sketch

{"method": "code.exec", "params": {"command": "swift test", "cwd": "/project", "timeout": 120}}
{"method": "code.processes", "params": {}}
{"method": "code.kill", "params": {"pid": 12345}}

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions