@deepseek-ai/dsh-file-reference 0.1.5-rc.2 → 0.1.6-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -3,4 +3,4 @@
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/context/file-reference/README.md
5
5
  README.md: ce84a91e96988fb662ee665707d1ce2ad1651327
6
- README.zh.md: f4840179cebce060cc95cb4308b42d0715d1d5e5
6
+ README.zh.md: ffdce668dd1b4a5a39a076d6abc998ec6db2ce92
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-reference"
9
9
 
10
10
  ## 概述
11
11
 
12
- 宿主驱动 UI 使用 `dsh-file-reference` 提供 `@file` 补全:UI 为指定 agent 请求路径候选,模型输入 `@path` 或 `@"path with spaces"`,选中候选后,匹配的 mention 作为普通提示词文本插入。seam 本身不拥有文件系统访问——具体提供方(如 `@deepseek-ai/dsh-file-reference-local`)负责提供候选、排序、缓存与失效。选中候选绝不读取或附带文件内容;模型必须调用文件系统工具才能查看文件。Session Controller 通过 `fileReferences/list` Remote 向浏览器消费方暴露同一发现能力。
12
+ 宿主驱动 UI 使用 `dsh-file-reference` 提供 `@file` 补全:UI 为指定 agent(智能体)请求路径候选,模型输入 `@path` 或 `@"path with spaces"`,选中候选后,匹配的 mention 作为普通提示词文本插入。seam 本身不拥有文件系统访问——具体提供方(如 `@deepseek-ai/dsh-file-reference-local`)负责提供候选、排序、缓存与失效。选中候选绝不读取或附带文件内容;模型必须调用文件系统工具才能查看文件。Session Controller 通过 `fileReferences/list` Remote 向浏览器消费方暴露同一发现能力。
13
13
 
14
14
  ## 目录
15
15
 
@@ -29,11 +29,11 @@ kind: "package-reference"
29
29
 
30
30
  ### mention 语法
31
31
 
32
- 输入开头或空白后的 `@path` token 会触发补全;其他 token 内部的 `@`(如电子邮件地址)不会。`@"path with spaces"` 打开带引号的 mention,目录候选在其尾斜杠后保持引号打开,使补全可以继续深入下一层。格式化器会拒绝语法无法安全表示的控制字符或内嵌引号路径。
32
+ 输入开头或空白后的 `@path` token 会触发补全;其他 token 内部的 `@`(如电子邮件地址)不会。`@"path with spaces"` 打开带引号的 mention,目录候选在其尾斜杠后保持引号打开,使补全可以继续深入下一层。格式化器会拒绝含有语法无法安全表示的控制字符或内嵌引号的路径。
33
33
 
34
34
  ### 获取候选
35
35
 
36
- `ctx.fileReferences.list(agent, query, signal)` 返回指定 agent 工作目录中仅含路径的文件与目录候选,由提供方确定性地排序。目录 mention 呈现时带尾随 `/`,使补全可以继续深入下一层。浏览器消费方通过 Session Controller adapter 的 `ctx.remote.fileReferences.list` 调用同一发现能力;末位 signal 参数可取消慢速自动补全。
36
+ `ctx.fileReferences.list(agent, query, signal)` 返回指定 agent 工作目录中仅含路径的文件与目录候选,由提供方确定性地排序。目录 mention 呈现时带尾随 `/`,使补全可以继续深入下一层。浏览器消费方通过 Session Controller 适配器的 `ctx.remote.fileReferences.list` 调用同一发现能力;末位 signal 参数可取消慢速自动补全。
37
37
 
38
38
  ### 搭配提供方
39
39
 
@@ -51,7 +51,7 @@ kind: "package-reference"
51
51
 
52
52
  ### 设计理念
53
53
 
54
- 本包把抽象发现服务与共享、浏览器安全的 mention 语法分开,由提供方负责命名空间访问、排序、缓存与失效。该服务保持 wire 中立;`dsh-api-session-controller` 持有 `fileReferences/list` Remote adapter,并在解析 Agent 后委派给当前 provider。
54
+ 本包把抽象发现服务与共享、浏览器安全的 mention 语法分开,由提供方负责命名空间访问、排序、缓存与失效。该服务保持 wire 中立;`dsh-api-session-controller` 持有 `fileReferences/list` Remote 适配器,并在解析 Agent 后委派给当前提供方。
55
55
 
56
56
  ### 源码地图
57
57
 
@@ -60,7 +60,7 @@ kind: "package-reference"
60
60
  | [`src/index.ts`](src/index.ts) | 抽象 `FileReferenceService` 与 `FILE_REFERENCE_PROMPT` |
61
61
  | [`src/grammar.ts`](src/grammar.ts) | `activeAtToken` 识别与 `formatFileMention` 渲染 |
62
62
  | [`src/types.ts`](src/types.ts) | 仅含路径的结果类型 `FileReferenceCandidate` |
63
- | — | 不发布运行时不变式伴生入口;接口不保留 candidate 或 lifecycle 状态;具体 provider 负责自己的 cache 与 invalidation 关系。 |
63
+ | — | 不发布运行时不变式伴生入口;接口不保留 candidate 或 lifecycle 状态;具体提供方负责自己的 cache 与 invalidation 关系。 |
64
64
 
65
65
  ### 主要流程
66
66
 
@@ -77,7 +77,7 @@ UI 通过 `activeAtToken` 识别活动 `@` token,用查询文本调用 `list`
77
77
 
78
78
  - [本地文件引用提供方](../file-reference-local/README.zh.md)——本 seam 的随附本地工作区实现。
79
79
  - [会话引用子系统](../../../docs/subsystems/session-reference.zh.md)——宿主 UI 背后的共享文件引用与会话引用约定。
80
- - [context 组地图](../README.zh.md)——相邻的请求上下文包。
80
+ - [上下文组地图](../README.zh.md)——相邻的请求上下文包。
81
81
  - [文件系统工具目录](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-fs)——被引用路径所对应的 `read` 工具。
82
82
 
83
83
  -----
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-file-reference",
3
3
  "description": "File-reference discovery contract and shared @file grammar",
4
- "version": "0.1.5-rc.2",
4
+ "version": "0.1.6-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -36,11 +36,11 @@
36
36
  ],
37
37
  "license": "MIT",
38
38
  "peerDependencies": {
39
- "@deepseek-ai/dsh-agent": "^0.1.5-rc.2",
39
+ "@deepseek-ai/dsh-agent": "^0.1.6-alpha.2",
40
40
  "@deepseek-ai/cordis": "^4.0.2"
41
41
  },
42
42
  "devDependencies": {
43
- "@deepseek-ai/dsh-agent": "^0.1.5-rc.2",
44
- "@deepseek-ai/cordis": "^4.0.2"
43
+ "@deepseek-ai/cordis": "^4.0.2",
44
+ "@deepseek-ai/dsh-agent": "^0.1.6-alpha.2"
45
45
  }
46
46
  }