Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add workspace SSH execution tool for AI SDK#18924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ThomasK33 wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromthomask33/07-20-feat_toolsdk_add_ssh_exec_tool

Conversation

ThomasK33
Copy link
Member

Add SSH Command Execution Tool for Coder Workspaces

This PR adds a new AI toolcoder_workspace_ssh_exec that allows executing commands in Coder workspaces via SSH. The tool provides functionality similar to thecoder ssh <workspace> <command> CLI command.

Key features:

  • Executes commands in workspaces via SSH and returns the output and exit code
  • Automatically starts workspaces if they're stopped
  • Waits for the agent to be ready before executing commands
  • Trims leading and trailing whitespace from command output
  • Supports various workspace identifier formats:
    • workspace (uses current user)
    • owner/workspace
    • owner--workspace
    • workspace.agent (specific agent)
    • owner/workspace.agent

The implementation includes:

  • A new tool definition with schema and handler
  • Helper functions for workspace and agent discovery
  • Workspace name normalization to handle different input formats
  • Comprehensive test coverage including integration tests

This tool enables AI assistants to execute commands in user workspaces, making it possible to automate tasks and provide more interactive assistance.

@ThomasK33Graphite App
Copy link
MemberAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@bpmct
Copy link
Member

It works! Seeing some weird errors though
image

@ThomasK33ThomasK33force-pushed thethomask33/07-20-feat_toolsdk_add_ssh_exec_tool branch from6c5f28f toe976eeaCompareJuly 20, 2025 14:35
Change-Id: I61f694a89e33c60ab6e5a68b6773755bff1840a4Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33ThomasK33force-pushed thethomask33/07-20-feat_toolsdk_add_ssh_exec_tool branch frome976eea to678cabcCompareJuly 21, 2025 11:57
@ThomasK33ThomasK33 marked this pull request as ready for reviewJuly 21, 2025 12:26
@ThomasK33ThomasK33 linked an issueJul 21, 2025 that may beclosed by this pull request
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@ThomasK33ThomasK33

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

MCP: Addexec tool to run commands in workspaces
2 participants
@ThomasK33@bpmct

[8]ページ先頭

©2009-2025 Movatter.jp