计算机不能连接, 软件包登记了它正在使用的计算机。 在第一个关键交换时, 它报告运行时间、 机器及其拥有的东西, 账户也为机器储存了它。
得到它
const pc = await api.storage.get(); // the account's default
const computers = (await api.storage.list()).filter((s) => s.type === "filesystem");pc = api.storage.get() # the account's default
computers = [s for s in api.storage.list() if s.type == "filesystem"]默认值不一定是此机器
账户的默认值是它自己的对象存储。 api.storage.list() 而不是假设自己脚下能拿到磁盘。
随它携带的
typestring总是 filesystem.
providerstringmachine.
machineIdstring哪个机器 比较了之前的文件操作。
hostnamestring|null机器的名字,它报告它的名字。
limitsobject报道了它自己的磁盘。
电脑只有两件东西
await pc.files.write("notes.md", "# Today");
const shell = await pc.terminals.create({ name: "dev" });pc.files.write("notes.md", "# Today")
shell = pc.terminals.create(name="dev")运行() 不是进入路径
计算机在账户上没有字节, 因此数据动作没有读取内容 : run() 存储是本地存储的答案。 其文件通过 files机器本身。
api.files 无法保存到它
file.save({ storageId }) 拒绝计算机 storage_is_local:在账户上没有地方可以放字节。写成 files.write(),或使用 save({ path, localOnly: true }) 直走你选择的道路
经纪人怎么用它
代理代理代理机构创建 machine: pc 在此工作 : 它读取它正在打开的磁盘, 编辑在同一个进程树上运行命令 。 边界是工作空间, 决定是您的许可回调 —— 没有任何东西上传给模型看 。
const agent = api.agents.create({
runtime: "local",
machine: pc,
model: "gemini-3.5-flash",
mode: "ask",
onPermission: async ({ tool, category }) => (category === "exec" ? "deny" : "once"),
});agent = api.agents.create(
runtime="local",
machine=pc,
model="gemini-3.5-flash",
mode="ask",
on_permission=lambda request: "deny" if request["category"] == "exec" else "once",
)需要它需要 Node
浏览器和工人没有文件系统登记,所以这种存储属于 Node。文件方法本身会用它来表示 local_files_require_node.