跳到主内容
@wquguru
精选88Cloudflare Agents SDK(Changelog)AI 编程与模型

Cloudflare Think弃用@cloudflare/shell

Agents, Workers - Think agents now use a @cloudflare/computer workspace

原文
发到 X
推荐理由

涉及核心 AI Agent 框架的破坏性变更与接口弃用,直接改变现有代码结构与数据存储逻辑。请依赖 Cloudflare Think 的开发者务必在升级前完成工作区数据的手动迁移,避免服务中断。

Think and Agent Skills now use the workspace from @cloudflare/computer ↗︎ as well as the filesystem tools. A JavaScript execution environment can be configured by adding the JavaScriptWorkerBackend.

Think 和 Agent Skills 现在使用来自 @cloudflare/computer ↗︎ 的工作区以及文件系统工具。可以通过添加 JavaScriptWorkerBackend 来配置 JavaScript 执行环境。

@cloudflare/shell is deprecated, and so is Think's createExecuteTool. These will no longer be developed nor supported from today onwards.

@cloudflare/shell 已弃用,Think 的 createExecuteTool 也已弃用。从今天起,这些功能将不再进行开发或支持。

代码 · 11 行
import { Think } from "@cloudflare/think";
import { Workspace } from "@cloudflare/computer";
import { WorkerJavaScriptBackend } from "@cloudflare/computer/backends/worker-javascript";
export class MyAgent extends Think {
	workspace = new Workspace({
		storage: this.ctx.storage,
		backends: [
			new WorkerJavaScriptBackend({ id: "js", loader: this.env.LOADER }),
		],
	});
}
代码 · 11 行
import { Think } from "@cloudflare/think";
import { Workspace } from "@cloudflare/computer";
import { WorkerJavaScriptBackend } from "@cloudflare/computer/backends/worker-javascript";
export class MyAgent extends Think<Env> {
	override workspace = new Workspace({
		storage: this.ctx.storage,
		backends: [
			new WorkerJavaScriptBackend({ id: "js", loader: this.env.LOADER }),
		],
	});
}

Migrate your workspace data

迁移您的工作区数据

This is a breaking change. @cloudflare/computer stores files in different tables from @cloudflare/shell, and there is no automatic data migration between workspace formats. To keep an existing workspace, copy its files with the script in Migrating from @cloudflare/shell to @cloudflare/computer ↗︎. Otherwise your agent will start with an empty workspace, though the original data will still be present in the existing tables.

这是一个破坏性变更。@cloudflare/computer 将文件存储在不同于 @cloudflare/shell 的表中,且工作区格式之间没有自动数据迁移。若要保留现有工作区,请使用《从 @cloudflare/shell 迁移到 @cloudflare/computer》↗︎ 中的脚本复制其文件。否则,您的代理将从一个空工作区开始启动,尽管原始数据仍会存在于现有的表中。

For more information, refer to Think tools.

更多信息,请参阅 Think 工具。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件