Skip to main content

dsh-file-reference/packages/context/file-referenceOfficial

175.3kStars19.0kForks0Issues752Watchers

File-reference discovery contract and shared @file grammar

Evidence3/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki

ⓘ This plugin is a sub-package of the deepseek-ai/deepseek-harness monorepo — stars and activity count the whole repository.

Language
TypeScript
License
MIT
Branch
master
ai-agentscordisdshdsh-plugin

Install

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

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin deepseek-ai/deepseek-harness/packages/context/file-reference for me: review the repository at https://github.com/deepseek-ai/deepseek-harness first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

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.

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

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)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory