桥接

贝壳

shell: { run(command, { timeoutMs, signal }) }

一种功能, 并且撞击存在于除此机器以外的其他地方。 它可以取代电脑的外壳, 不论您在哪里提供 。

one functionexit code mattersalways asked
Using Python?

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

形状

const shell = {
  async run(command, { timeoutMs, signal } = {}) {
    // …run it somewhere…
    return { stdout: "", stderr: "", exitCode: 0 };
  },
};
# The Python engine runs bash itself, on a LocalFiles workspace (subprocess in the
# workspace folder). A machine without a local workspace gets no bash tool.
pc = api.storage.get()
api.agents.create(runtime="local", machine=pc, model=model, tools=["read", "list", "bash"])
commandstring

跑什么跑啊 跑什么跑啊 跑什么跑啊

timeoutMsinteger

尊重它 永不结束的命令 就能维持运行

signalAbortSignal

运行停止后开火, 停止进程 。

returnsobject

{ stdout, stderr, exitCode }。在创建时拒绝其他任何内容 invalid_shell.

退出代码是合同

代理指示检查并纠正错误

总是返回 0 的桥让每一个失败都看不见: 代理读取输出, 看不到失败, 继续。 返回真实代码 — — 保持指令循环诚实的唯一信号 。

仍有人问它

bash is exec whatever runs it, so it is asked in every mode but full. One difference: an « always » on a supplied shell lasts for the session only — it is never written to this computer's permanent list, because the command did not run on this computer.

说说贝壳是什么

系统提示描述机器的外壳: 手机得到“ 沙箱式的碎箱式外壳” 其限制有名; 云工作空间被告知, 外壳是Linux, 路径是 POSIX错误是昂贵的——一个代理人认为,另一个平台上写着命令,但所有命令都因一个原因而失败。

没有它

手机或云工作空间,没有 shell 表示无 bash 完全没有声明工具, 操作命令的指示也随之消失。 在计算机上, 机器自己的外壳被使用 。

背景命令需要终端

bash { background: true } 开始的东西 超越答案, 需要 终端终端光靠一个外壳,一个长运行的服务器就从前台开始运行, 超时会杀死它。