description: "通过 present 声明交付可访问的文件;配置、Session 归属与源文件打开。"
English | 中文
使用 present 声明交付Session 文件系统可访问的最终文件,包括通过 shell 命令创建的文件。用户使用默认应用打开当前源文件。工具记录路径和可选说明,不复制文件内容。
standard、ptc 与 cordis Agent preset 挂载本插件。创建文件后,以 files: [{ path, description? }] 调用 present。文件必须是 Session 文件系统可访问的普通文件。相对路径按 Session 工作目录解析;绝对路径可以指向工作区外的文件,包括 /tmp 或 Downloads。文件缺失、为目录、最终路径为符号链接或提供方拒绝访问时,调用失败。Shell 沙箱私有 /tmp 中的文件需要先写入 Session 文件系统可访问的位置。
在 Agent 的 Cordis 组合中挂载,并提供 tools、fs 和 turnBoundary Session 投影:
- name: '@deepseek-ai/dsh-tool-present'
config:
maxFiles: 8
| 字段 | 默认值 | 含义 |
|---|---|---|
maxFiles |
8 |
每次调用的最大文件数,为正整数 |
挂载时校验文件数量上限。工具要求 Agent Session 具有工作区和尚未结束的轮次。交付归调用方 Session 所有;父 Session 如需声明交付子 Agent 创建的文件,必须自行调用 present。
present schema要求已有且可访问的文件:“Declare existing files accessible through the Session filesystem as final deliverables. When a file you create or update is an output the user asked to receive, you must call present after writing it and before your final response, including files created through Bash or code execution. Mentioning its path in your reply does not replace this call. The files must already exist. The user opens the current source files; their contents are not copied or preserved.” 每个文件的结果为 Presented <path>;程序结果和持久事件包含路径及可选说明。
每个挂载的 Agent 增加一个工具 schema,每个交付文件增加一行结果。文件字节不进入模型消息。
工具 schema 在挂载期间保持静态。交付结果文本扩展对话,不重写提示词前缀。