智能体工具

闪盘

bash({ command | commands, timeout_ms?, stop_on_error?, background?, port?, description? })

在工作空间运行 shell 命令, 并获得退出代码和输出。 具有最广范围的工具, 并且每个模式都要求使用该工具, 但要求使用完整 。

category: exec120 s, max 600 salways asked outside full
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

commandstring

只有一个命令。

commandsstring[]

几个,按顺序跑 一次呼叫.

timeout_msinteger120 000

命令最多600 000

stop_on_errorbooleantrue

停止第一个非零退出代码的序列 。

backgroundbooleanfalse

在一个超过答案的终端运行。只有一个命令。

portinteger

与 background:服务器收听的端口。终端公布并返回 URL.

descriptionstring

向用户展示五字摘要。

一次调用数个命令

每一单独的呼叫费用

命令 [“npm ci” 、 “npm run building” 是一个转弯; 两个调用是两个。批量指令在工具的描述中,在系统中是快速的,因为模型不独立操作。

序列被批准为顺序:用户看到三个命令按顺序排列,因此批准它们不会在日后单独批准其中任何一个。

哪个贝壳

何处壳牌
计算机运行窗口电电光板
其他地方一台计算机闪盘
A 提供 贝壳桥不论你们在什么桥上奔奔而奔而奔而奔而而奔而而奔而而奔而而奔而而奔而而奔而而奔而而而奔而而奔而而而奔而而奔而而奔而而奔而而奔而而而奔而而奔而而而奔而而而奔而而奔而而奔而而而奔而而奔而而而奔而而而奔而而奔而而奔而而而奔而而而奔而而而奔而而而奔而而而奔而而而奔而而奔而而而奔而奔而而而
一个云云工作空间bash, 提示语法明确

服务器进入背景

bash({ command: "npm run dev -- --host", background: true, port: 5173 })
// → the terminal id, its first output, and a URL
# The Python bash tool runs one command and returns when it ends:
#   bash {"command": "npm test", "timeout_ms": 120000}
#   → {"exitCode": 0, "stdout": "…", "stderr": ""}
# A server that must keep running goes through terminal {"action": "create", "command": "npm run dev"}
  • 前景中从来没有: 无法完成的服务器在超时时会死亡 。
  • 从未分离 nohup, & 或工作——它会运行到用户看不到或无法阻止它的地方。
  • 使服务器在所有界面上监听( )--host, -H 0.0.0.0) ,或 URL 没有任何答案。

退出密码是信号

代理商被要求检查和修正错误。 空壳桥总是返回零, 使每个失败都无法识别 。

并不总是有这种现象

手机或无 shell 桥梁,这一工具根本没有被宣布——没有任何东西会运行它。