@ agent-forge/plugin-workspace- files- write (中文(简体) )
工作空间文件写能力插件 福吉探员,从
主持人的 src/plugins/workspace-files-write (D-075 S3) (英语). 它登记了一个全控工具, workspace_write,哪个
在原子上使用不透明的文件和文物参考文献替换或补丁主机拥有的文件;字节和本地路径从不
跨越能力边界.
插件在负载时间是故意惰性的. 没有寄件主机的书写连接,工具会报告一个明确的
unsupported 结果; 要写真字的主机绑定 createNodeWorkspaceFilesWriteHostAdapterV1 (散装箱根,
文物分辨率,经版本检查的原子承诺)通过其剖面机. 只读主机没有工具
登记.
安装
# from a local checkout
agent-forge plugin install ./plugins/workspace-files-write
# from npm
agent-forge plugin install @ai-agent-forge/plugin-workspace-files-write
货包船有两艘货单: agent-forge.json (确定性插件解析器显示的生态系统)和
plugin.json (主机载重清单 loadCapabilityPluginFromManifest条目 ./dist/entry.js) (中文(简体) ).
图书馆表面
import { createNodeWorkspaceFilesWriteHostAdapterV1, createWorkspaceFilesWriteCapabilityFactoryV1 } from "@agent-forge/plugin-workspace-files-write";
createNodeWorkspaceFilesWriteAdapterV1(options?)——主机注入适配器;需要主机write缝合,否则 返回时unsupported。 。 。 .createNodeWorkspaceFilesWriteHostAdapterV1({ root, resolveFileRef, readArtifact, ... })真正的沙盒主机 编剧:原子重命名、预期的Version检查、每道单飞行序列化、,committed报告.createWorkspaceFilesWriteCapabilityFactoryV1(adapter?)- 登记册workspace_write完全控制着CapabilityAPI(对无约束适配器的默认).- 默认导出
dist/entry.js——外部插件加载所使用的预编厂.
发展
npm install --ignore-scripts # repo root, creates the workspace symlink
npm run build # plugins/workspace-files-write (tsgo)
npm test # vitest; the entry fidelity test requires `npm run build` first