dsh-file-reference/packages/context/file-reference官方

175.3kStar19.0kFork0Issue752Watching

提供文件引用发现契约和浏览器安全的 `@file` 语法,host-backed 界面可通过 `ctx.fileReferences.list` 获取路径候选,远程调用 `fileReferences/list` 供浏览器使用,仅返回路径不读取内容,需配合 `read` 工具才能访问文件实际内容

机审证据安装命令仓库已核验dsh-plugin Topic许可证READMEAI 百科

此插件是大仓库 deepseek-ai/deepseek-harness 的子包,星数与活跃度统计的是整个仓库。

语言
TypeScript
License
MIT
分支
master
ai-agentscordisdshdsh-plugin

安装

$ dsh plugin --profile web add npm:@deepseek-ai/dsh-file-reference

在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程

对话式安装

帮我安装 DeepSeek Harness 插件 deepseek-ai/deepseek-harness/packages/context/file-reference:先查看仓库 https://github.com/deepseek-ai/deepseek-harness 确认安全性,然后执行安装命令并验证插件加载成功。

把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。

English | 中文

File-reference discovery seam and browser-safe @file grammar shared by host-backed user interfaces. ctx.fileReferences.list(agent, query, signal) returns path-only file or directory candidates for the addressed agent; concrete providers own namespace access, ranking, caching, and invalidation. The same contract is remotely callable as the unary fileReferences/list Remote method (@Remote on the Service Definition, cancelled through the reserved trailing signal), so browser consumers call ctx.remote.fileReferences.list without an API Proxy route.

activeAtToken() recognizes an @path or open @"path with spaces token only at the start of input or after whitespace, so email-like text does not open completion. formatFileMention() emits the matching prompt spelling, appends / to directory candidates, preserves an explicitly opened quote, and rejects control characters or embedded quotes that the editor grammar cannot represent safely.

Selecting a candidate does not read or attach file contents. The exported FILE_REFERENCE_PROMPT is stable guidance that a provider may install when the addressed agent can call read.

Model Experience

Indirectly, through @deepseek-ai/dsh-file-reference-local, which conditionally contributes this package's stable file-reference guidance.

KV Cache effect

The interface and grammar add no request tokens themselves; a provider-owned prompt section determines cache behavior.

Known Limitations and Deferred Work

  • Path candidates are advisory — the seam does not prove that a later model-facing filesystem tool can access the same namespace; deployments must align the provider with the effective read implementation.
  • No file-content reference object — selected files remain ordinary prompt text and require an explicit model tool call before their contents become model-visible.

收录徽章

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/deepseek-ai/deepseek-harness/packages/context/file-reference)

把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。

返回插件目录
dsh-file-reference/packages/context/file-reference — DeepSeek Harness 插件 | deepseek-plugin.org