@ftai/dsh-plugin-acn 0.1.0 → 0.1.1
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/CHANGELOG.md +12 -1
- package/README.md +31 -4
- package/README_EN.md +31 -4
- package/docs/architecture.md +1 -0
- package/docs/assets/acn-claim-reuse.png +0 -0
- package/docs/config.md +19 -9
- package/docs/development.md +4 -4
- package/docs/dsh-compat.md +2 -2
- package/docs/user_guide.md +3 -1
- package/lib/{activities-LRoCwpzw.js → activities-B8U-iW4-.js} +84 -4
- package/lib/{checkpoint-Bmt8q2vB.js → checkpoint-CPFPOxBM.js} +2 -2
- package/lib/{checkpoint-RgcdqifN.js → checkpoint-c7aI4D-X.js} +1 -1
- package/lib/client.js +220 -223
- package/lib/{deliver-BuYQaPRW.js → deliver-C-dmhkfm.js} +1 -1
- package/lib/{delivery-status-D5m3178s.js → delivery-status-M7-Rwoyj.js} +4 -2
- package/lib/{dream-agent-DBszTHXY.js → dream-agent-BVqxbKFc.js} +3 -3
- package/lib/dream.js +3 -3
- package/lib/{effects-DJ4Xa7Tx.js → effects-DX1iy6FM.js} +2 -2
- package/lib/{evidence-store-DLFvSuNa.js → evidence-store-DW7kj20i.js} +1 -1
- package/lib/{formation-replay-CEOy5FkI.js → formation-replay-Bf4TSBiz.js} +1 -1
- package/lib/formation.js +5 -5
- package/lib/history-DPMHX3ZE.js +214 -0
- package/lib/inbox.js +2 -2
- package/lib/index.js +43 -47
- package/lib/{paths-CDYV5UH9.js → paths-B7NI9Ano.js} +6 -3
- package/lib/plugins/commands.js +3 -3
- package/lib/plugins/dream.js +4 -4
- package/lib/plugins/formation.js +3 -3
- package/lib/plugins/inbox.js +3 -3
- package/lib/plugins/knowledge.js +21 -23
- package/lib/plugins/prompt.js +1 -1
- package/lib/plugins/tools.js +1 -1
- package/lib/{prepare-DwHZudbA.js → prepare-CGXwBEcu.js} +2 -2
- package/lib/{scheduler-MaUEbXr3.js → scheduler-BfJSY1eq.js} +1 -1
- package/lib/{service-C_i3BzdP.js → service-BPwaZzFF.js} +3 -3
- package/lib/{service-B7AI5jds.js → service-BQaszW_v.js} +1 -1
- package/lib/{service-BcHV5mc7.js → service-BhniAHLo.js} +5 -5
- package/lib/{service-CNjqHCBR.js → service-C2lXoygJ.js} +4 -4
- package/lib/session-binding-zCSuizHs.js +342 -0
- package/lib/store.js +1 -1
- package/lib/{structured-lyQCK-Zk.js → structured-C9byFuzm.js} +1 -0
- package/lib/team.js +1 -1
- package/lib/types/activities.d.ts +2 -0
- package/lib/types/client/ActivityCard.d.ts +14 -0
- package/lib/types/client/ActivityDetails.d.ts +1 -1
- package/lib/types/client/SourceSessionLink.d.ts +2 -1
- package/lib/types/client/TeamSettingsPage.d.ts +0 -2
- package/lib/types/client/interaction-styles.d.ts +1 -1
- package/lib/types/client/locales.d.ts +1 -1
- package/lib/types/config.d.ts +1 -12
- package/lib/types/configuration.d.ts +0 -24
- package/lib/types/credentials.d.ts +0 -6
- package/lib/types/dsh-adapter/session-binding.d.ts +1 -1
- package/lib/types/interaction.d.ts +6 -15
- package/lib/types/store/delivery-status.d.ts +1 -0
- package/lib/types/store/history.d.ts +65 -0
- package/lib/types/store/library-directory.d.ts +4 -0
- package/lib/types/store/paths.d.ts +1 -1
- package/lib/upload.js +2 -2
- package/lib/{team-credentials-C9xHrPIi.js → upstreams-DEi-56tD.js} +164 -248
- package/lib/{worker-BBTYP2RE.js → worker-HMGzJFWd.js} +1 -1
- package/package.json +1 -1
- package/lib/presentation-BlLjgDjP.js +0 -47
- package/lib/session-binding-BQrOGhZI.js +0 -151
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
# 更新记录
|
|
2
2
|
|
|
3
|
-
## 0.1.
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
- 统一账号目录结构,自动加载并保存工作配置索引,在原目录读取及续写 Claim、Trace、Dispute。
|
|
6
|
+
- 保留历史来源、处理记录与投递确认;忽略无关扩展字段,不导入旧凭据或重放历史任务。
|
|
7
|
+
- 补充跨配置、跨身份、中文空格及长路径隔离测试,仅对实际目录名校验 Windows 设备名限制。
|
|
8
|
+
- 知识与活动区分本地处理、待投递与已确认上传,按当前版本和团队目标核对 Claim、Dispute 投递状态。
|
|
9
|
+
- 完善活动状态、结果摘要与知识链接;支持关联 Claim、Dispute、Trace 跳转及返回,来源会话不可用时隐藏跳转按钮。
|
|
10
|
+
- 修复后台模型重试在审计落盘期间收到取消后,仍可能额外调用一次适配器的问题。
|
|
11
|
+
- 补充 ACN 全称、团队角色说明和经验复用图,明确 npm 安装方式。
|
|
12
|
+
- 收紧安装验收的 Finalize 完成条件,对齐崩溃接管测试时序及 Windows 文件 I/O 等待预算。
|
|
13
|
+
|
|
14
|
+
## 0.1.0
|
|
4
15
|
|
|
5
16
|
- 团队连接在未配置环境代理时使用 macOS 与 Windows 的系统 HTTP(S) 代理及例外规则。
|
|
6
17
|
|
package/README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
# ACN
|
|
1
|
+
# ACN · Agent Claim Network
|
|
2
2
|
|
|
3
3
|
[English](README_EN.md) · [使用指南](docs/user_guide.md) · [开发文档](docs/index.md)
|
|
4
4
|
|
|
5
5
|
**让每个 Agent 的经验成为团队可复用的知识。**
|
|
6
6
|
|
|
7
|
-
ACN
|
|
7
|
+
**ACN(Agent Claim Network)是面向团队的记忆框架**,让不同 Agent 通过可复用的知识相互协作。本仓库是它的 DeepSeek Harness(DSH)插件:从工作对话中沉淀有依据、带适用范围的经验,并通过团队服务分享结论、检索已有知识、处理分歧和接收团队建议。也可以个人使用,在自己的会话之间积累与复用知识;接入团队能更充分地发挥 ACN 的协作价值。
|
|
8
|
+
|
|
9
|
+
一条这样的经验称为 **Claim**:它记录了什么情况下可以采用什么结论,以及支持结论的证据和来源。
|
|
10
|
+
|
|
11
|
+

|
|
8
12
|
|
|
9
13
|
| 能力 | 你可以做什么 |
|
|
10
14
|
| --- | --- |
|
|
@@ -14,13 +18,34 @@ ACN 记忆框架是 DeepSeek Harness(DSH)的知识协作插件。它从工
|
|
|
14
18
|
| 知识整理 | 使用 Dream 清理临时记录、整合相关知识 |
|
|
15
19
|
| 知识与活动 | 阅读知识正文、返回来源会话,查看处理进度和失败原因 |
|
|
16
20
|
|
|
17
|
-

|
|
21
|
+

|
|
18
22
|
|
|
19
23
|
本插件管理以 Claim 为主体的可复用经验,在接入团队时促进经验分享与流动;不维护私有 Memory 及其管理。知识提炼时会过滤工具名包含 `memory` 的工具调用及其结果(不区分大小写)。
|
|
20
24
|
|
|
25
|
+
## Agent、Router、Maintainer 如何协作
|
|
26
|
+
|
|
27
|
+
| 角色 | 负责什么 | 在哪里运行 |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| **Agent(A)· 执行任务的助手** | 完成工作、沉淀 Claim,按需借用团队经验;发现结论冲突时上报 Dispute(争议) | 每位成员的 DSH,通过本插件接入 |
|
|
30
|
+
| **Router(R)· 团队知识检索服务** | 从团队知识中查找相关 Claim,返回来源与争议信息,供 Agent 判断是否适用 | 团队自行部署的服务 |
|
|
31
|
+
| **Maintainer(M)· 团队知识维护服务** | 接收 Claim 和争议,维护团队规则,向 Agent 发出知识维护建议 | 团队自行部署的服务 |
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
协作图中的私有 Memory 不共享;在 DSH 中,私有记忆由 DSH 及用户选用的记忆插件管理,本插件专注于 Claim 的积累与团队协作。
|
|
36
|
+
|
|
37
|
+
<details>
|
|
38
|
+
<summary>查看原生 ACN 的团队知识复用演示</summary>
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
演示中,Agent 通过 Router 找到同事留下的两条经验:数据在 09:30 后才完整,缺失字段的合计应标为“暂定”。它据此修改日报,并展示文件变更。演示使用原生 ACN 终端界面;本插件在 DSH 中提供相应的知识协作能力。
|
|
43
|
+
|
|
44
|
+
</details>
|
|
45
|
+
|
|
21
46
|
## 开始使用
|
|
22
47
|
|
|
23
|
-
在 DSH「插件 → 添加插件」填写 **`@ftai/dsh-plugin-acn`**,安装并启用。需要指定版本时,可填写 `@ftai/dsh-plugin-acn@0.1.
|
|
48
|
+
在 DSH「插件 → 添加插件」填写 **`@ftai/dsh-plugin-acn`**,安装并启用。需要指定版本时,可填写 `@ftai/dsh-plugin-acn@0.1.1`。
|
|
24
49
|
|
|
25
50
|
1. 向团队管理员取得 Agent ID、Maintainer 和 Router 地址,以及启用鉴权时的团队 Key(可选)。打开「ACN 插件设置」,新建工作配置,开启「连接团队服务」,填写信息、检查连接并保存。
|
|
26
51
|
2. 在「知识与模型」选择知识处理模型;新建会话,在输入框旁确认 ACN 工作配置后开始工作。
|
|
@@ -30,6 +55,8 @@ ACN 记忆框架是 DeepSeek Harness(DSH)的知识协作插件。它从工
|
|
|
30
55
|
|
|
31
56
|
每份工作配置保存各自的知识。同一配置可跨项目复用,不同配置相互隔离;会话开始后归属固定。安装、选择配置、团队连接和常见问题见[使用指南](docs/user_guide.md)。
|
|
32
57
|
|
|
58
|
+
已有按账号组织的 ACN 知识目录时,可在「知识与模型 → 知识目录」选择包含 `settings.json` 和 `upstreams/` 的账号目录,自动加载原工作配置和知识,并在原位置继续使用。
|
|
59
|
+
|
|
33
60
|
## 版本更新
|
|
34
61
|
|
|
35
62
|
可在 [GitHub 仓库](https://github.com/FTShare-Lab/dsh-plugin-acn)选择「Watch → Custom → Releases」,订阅发版通知。当前 DSH 不会自动提醒本插件有新版本,也不会自动升级。
|
package/README_EN.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
# ACN
|
|
1
|
+
# ACN · Agent Claim Network
|
|
2
2
|
|
|
3
3
|
[中文](README.md) · [User guide (Chinese)](docs/user_guide.md) · [Developer documentation](docs/index.md)
|
|
4
4
|
|
|
5
5
|
**Turn each agent's experience into knowledge the team can reuse.**
|
|
6
6
|
|
|
7
|
-
ACN is a knowledge
|
|
7
|
+
**ACN (Agent Claim Network) is a memory framework for teams**, helping agents collaborate through reusable knowledge. This repository provides its DeepSeek Harness (DSH) plugin: it turns work conversations into conclusions with evidence and a clear scope, then connects agents to share findings, search existing knowledge, report disagreements, and receive team guidance. You can also use it individually to build knowledge across your own conversations; connecting a team brings out ACN's full collaborative value.
|
|
8
|
+
|
|
9
|
+
Each piece of experience is a **Claim**: a conclusion with the conditions under which it applies, supporting evidence, and sources.
|
|
10
|
+
|
|
11
|
+

|
|
8
12
|
|
|
9
13
|
| Capability | What it provides |
|
|
10
14
|
| --- | --- |
|
|
@@ -14,13 +18,34 @@ ACN is a knowledge collaboration plugin for DeepSeek Harness (DSH). It turns wor
|
|
|
14
18
|
| Dream | Review existing knowledge, retire temporary records, and consolidate related findings |
|
|
15
19
|
| Knowledge and activity | Read records, return to source conversations, and follow progress or failures |
|
|
16
20
|
|
|
17
|
-

|
|
21
|
+

|
|
18
22
|
|
|
19
23
|
This plugin manages reusable experience centered on Claims and supports sharing across a connected team. It does not maintain or manage private Memory. Knowledge extraction excludes calls and results of tools whose names contain `memory`, case-insensitively.
|
|
20
24
|
|
|
25
|
+
## How Agent, Router, and Maintainer work together
|
|
26
|
+
|
|
27
|
+
| Role | Responsibility | Where it runs |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| **Agent (A) · Task assistant** | Does the work, forms Claims, borrows relevant team knowledge, and reports conflicting conclusions as Disputes | Each member's DSH, connected through this plugin |
|
|
30
|
+
| **Router (R) · Team knowledge search** | Finds relevant shared Claims and returns their sources and dispute information for the Agent to assess | A service deployed by your team |
|
|
31
|
+
| **Maintainer (M) · Team knowledge maintenance** | Receives Claims and Disputes, maintains team rules, and sends knowledge maintenance suggestions to Agents | A service deployed by your team |
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
Private Memory in the collaboration diagram is not shared. In DSH, private memory is managed by DSH and the memory plugins you choose; this plugin focuses on Claims and team collaboration.
|
|
36
|
+
|
|
37
|
+
<details>
|
|
38
|
+
<summary>Watch native ACN reuse team knowledge</summary>
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
The Agent finds two team Claims through Router: data is complete only after 09:30, and totals with missing fields should be marked provisional. It applies these findings to a daily report and shows the file changes. The demo uses native ACN's terminal interface; this plugin brings the knowledge collaboration workflow to DSH.
|
|
43
|
+
|
|
44
|
+
</details>
|
|
45
|
+
|
|
21
46
|
## Get started
|
|
22
47
|
|
|
23
|
-
In DSH, open **Plugins → Add plugin**, enter **`@ftai/dsh-plugin-acn`**, then install and enable it. To install a specific version, use a name such as `@ftai/dsh-plugin-acn@0.1.
|
|
48
|
+
In DSH, open **Plugins → Add plugin**, enter **`@ftai/dsh-plugin-acn`**, then install and enable it. To install a specific version, use a name such as `@ftai/dsh-plugin-acn@0.1.1`.
|
|
24
49
|
|
|
25
50
|
1. Ask your team administrator for an Agent ID, Maintainer and Router URLs, and a team key if authentication is enabled (optional). Open **ACN settings**, create a work configuration, enable **Connect team services**, enter these details, check the connection, and save.
|
|
26
51
|
2. Select a knowledge-processing model under **Knowledge and models**. Start a new conversation and confirm its ACN configuration beside the composer.
|
|
@@ -30,6 +55,8 @@ For individual use, create a configuration with a stable Agent ID and leave **Co
|
|
|
30
55
|
|
|
31
56
|
Each configuration has its own knowledge. Projects using the same configuration share that knowledge; separate configurations remain isolated. A conversation's configuration is fixed after it starts. See the [illustrated user guide](docs/user_guide.md) for details.
|
|
32
57
|
|
|
58
|
+
To reuse an existing account-based ACN library, select its account directory containing `settings.json` and `upstreams/` under **Knowledge and models → Knowledge directory**. Its configurations and knowledge are loaded automatically and remain in their original locations.
|
|
59
|
+
|
|
33
60
|
## Updates
|
|
34
61
|
|
|
35
62
|
In the [GitHub repository](https://github.com/FTShare-Lab/dsh-plugin-acn), choose **Watch → Custom → Releases** to subscribe to release notifications. DSH currently does not notify you of new versions of this plugin or upgrade it automatically.
|
package/docs/architecture.md
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
| `dsh-adapter/interaction-service.ts`、`store/presentation.ts` | 只读知识/活动、显式连接检查及重试、终态版本展示回执 |
|
|
12
12
|
| `protocol/` | 规范 DTO、ID、时间、revision |
|
|
13
13
|
| `store/` | 实体文件、原子写、跨进程锁、租约、队列、编辑恢复和私有文档 |
|
|
14
|
+
| `store/library-directory.ts`、`store/history.ts` | 统一账号目录的配置索引、身份目录定位与历史记录只读投影;不接管旧队列或复制宿主凭据 |
|
|
14
15
|
| `knowledge/service.ts` | Claim / Trace 浏览、修订、形成批次提交、知识版本与变化事件 |
|
|
15
16
|
| `knowledge/pages.ts` | 稳定排序、Unicode 摘要和分页 |
|
|
16
17
|
| `knowledge/catalog.ts`、`changes.ts`、`sessions.ts` | 冻结目录、累计身份差异与会话状态 |
|
|
Binary file
|
package/docs/config.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
知识根目录支持 `~/`,也支持 Windows 的 `~\`、盘符绝对路径与带空格的路径。默认根目录仍为 `~/.acn-dsh`,在 Windows 上会展开到当前用户主目录,不会相对于项目目录创建 `~` 文件夹。知识目录输入框可填写系统原生路径;高级 YAML 中的 Windows 路径建议使用单引号,例如 `'D:\ACN data'`,避免双引号的转义规则。
|
|
18
18
|
|
|
19
|
-
Windows
|
|
19
|
+
Windows 的目录名不能使用 `CON`、`PRN`、`AUX`、`NUL`、`COM1`–`COM9`、`LPT1`–`LPT9` 等保留名称,大小写均适用。upstream 标识会在保存和运行时校验;Agent 使用身份摘要作为目录名,不受明文 Agent ID 的设备名限制。这只限制本机目录,不修改团队协议中的 Agent ID 规则,macOS 的既有名称仍有效。跨设备复用配置时请选 `coding`、`agent-a` 等中性名称;旧的不可用配置可先停用,再新建合法配置,不会自动改 ID 或迁移数据。
|
|
20
20
|
|
|
21
21
|
「检查连接」先按保存规则校验填写内容,再分别验证两个服务和认证。格式错误会在操作按钮附近指出对应字段,输入保留;地址格式有效但服务离线时仍可保存。地址支持部署路径前缀,不允许用户名、密码、查询参数或片段。在「团队鉴权密钥」直接输入 key,由 DSH 托管;配置只保存自动生成的引用。模型密钥沿用宿主配置。替换密钥使用新引用,只有配置保存成功后才采用;保存失败保留输入和原密钥。已绑定密钥的团队配置修改 Agent ID 时,需要同时输入新身份密钥,或明确移除绑定。若同时保存为单人模式,自动解除旧身份的密钥绑定,旧凭据保留。「移除密钥绑定」可明确解绑,保存前可以撤销。保存配置不会让正在运行的会话切换客户端或密钥;新启动的会话使用保存后的配置。未发送的会话若已启动旧实例,菜单会显示实际模式,并可点击「按已保存配置启动」。新运行实例恢复旧会话时仍选择原 upstream 和 Agent ID,并保留原知识目录。
|
|
22
22
|
|
|
@@ -28,15 +28,25 @@ Windows 不允许 Agent ID、upstream 标识或旧目录映射使用 `CON`、`PR
|
|
|
28
28
|
|
|
29
29
|
团队启动、实际恢复或手动同步会处理 Inbox。连接、鉴权或内化失败会保留归属并提示原因,允许继续本地工作。单人不发团队请求,仍可通过 `/inbox` 处理已落盘的本地 pending。浏览知识和只读检查历史归属不会同步或调用模型。打开完整会话(包括「打开来源会话」)时,宿主可能恢复 Agent,并按团队启动配置同步 Inbox。结果通过聊天框外的提示展示,避免改变输入框尺寸。
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
知识目录统一使用账号结构,默认根目录为 `~/.acn-dsh`,也可在「知识与模型 → 知识目录」选择其他位置:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
<home>/
|
|
35
|
+
├── settings.json
|
|
36
|
+
└── upstreams/<配置ID>/
|
|
37
|
+
├── ACN.md
|
|
38
|
+
└── agents/<身份摘要>/
|
|
39
|
+
├── claims/
|
|
40
|
+
├── traces/
|
|
41
|
+
├── disputes/
|
|
42
|
+
└── jobs/、sessions/、dream/ 等运行记录
|
|
43
|
+
```
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
身份摘要由 Agent ID 生成。不同 upstream 即使 Agent ID 相同,本地知识也分开;同一 upstream 的多个项目会话共用知识。修改显示名称不改变目录,修改 Agent ID 会选择另一份存储。两个相同 Agent ID 连接同一团队时,在通过鉴权后对应同一个远端成员。当前 upstream 的 `ACN.md` 在创建会话时冻结,恢复会话继续使用原快照。
|
|
36
46
|
|
|
37
|
-
|
|
47
|
+
选择已有账号目录时,该位置应直接包含 `settings.json` 和 `upstreams/`。插件加载其中的工作配置,并在原位置读取、修订和新增 Claim、Trace、Dispute。保存后的工作配置公开摘要同步到 `settings.json`;未变化的索引不改写。团队 Key 与知识模型由当前宿主管理,不从索引导入,也不写入索引。
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
同一知识目录只由一个程序写入。接续已有目录前先结束原程序的知识任务并退出。历史应用、任务和投递账本只读保留,不重放旧任务;已有的本地应用与投递确认可在处理活动查看。来源会话在当前宿主中存在时才提供跳转。读取忽略与当前功能无关的扩展字段,浏览不改写实体,更新实体时只写通用 ACN 字段。
|
|
40
50
|
|
|
41
51
|
### 接入团队与更换地址
|
|
42
52
|
|
|
@@ -66,7 +76,7 @@ Windows 不允许 Agent ID、upstream 标识或旧目录映射使用 `CON`、`PR
|
|
|
66
76
|
agentId: reviewer
|
|
67
77
|
```
|
|
68
78
|
|
|
69
|
-
`upstream` 是没有可用项目历史时的全局默认,可留空;没有历史且未设置全局默认时需明确选择。`upstreams.<标识>` 使用小写字母、数字、下划线和连字符,排除原版保留目录名。每项支持 `name`、`agentId`、`enabled`、`routerEndpoint`、`maintainerEndpoint`、`keyEnv` 和 `timeoutMs`。旧版 `projectUpstreams`
|
|
79
|
+
`upstream` 是没有可用项目历史时的全局默认,可留空;没有历史且未设置全局默认时需明确选择。`upstreams.<标识>` 使用小写字母、数字、下划线和连字符,排除原版保留目录名。每项支持 `name`、`agentId`、`enabled`、`routerEndpoint`、`maintainerEndpoint`、`keyEnv` 和 `timeoutMs`。旧版 `projectUpstreams` 仅兼容读取,不再影响预选,下次保存配置时会移除。
|
|
70
80
|
|
|
71
81
|
以下完整默认模板也保留旧单身份配置,便于兼容已有安装。未列出可选的 `upstreams` 时继续使用旧入口。
|
|
72
82
|
|
|
@@ -130,7 +140,7 @@ Windows 不允许 Agent ID、upstream 标识或旧目录映射使用 `CON`、`PR
|
|
|
130
140
|
|
|
131
141
|
按 id 覆盖会整体替换该行的 config,所以每次覆盖都需包含希望保留的自定义项。未填写的字段由插件补默认值。
|
|
132
142
|
|
|
133
|
-
|
|
143
|
+
单配置入口的 `agentId` 只能含小写字母、数字、下划线和连字符。未配置 `upstreams` 且该字段为空时,插件保持未配置状态:只有 ACN 的 `/acn-status`,不注册 Claim 工具与知识段落,不创建知识文件。`home` 支持 `~`,实际目录仍在 `<home>/upstreams/<配置ID>/agents/<身份摘要>/`,与工作区 cwd 无关。
|
|
134
144
|
|
|
135
145
|
当前可用的行为配置:
|
|
136
146
|
|
package/docs/development.md
CHANGED
|
@@ -45,7 +45,7 @@ pnpm smoke:install
|
|
|
45
45
|
|
|
46
46
|
```sh
|
|
47
47
|
pnpm pack --pack-destination .artifacts/release
|
|
48
|
-
npm publish .artifacts/release/ftai-dsh-plugin-acn-0.1.
|
|
48
|
+
npm publish .artifacts/release/ftai-dsh-plugin-acn-0.1.1.tgz --dry-run --access public --registry=https://registry.npmjs.org/
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
检查包内包含构建后的 `lib/`、提示词和文档,不含凭据、个人信息或测试日志;使用该包完成隔离安装。`--dry-run` 不上传内容,也不验证账号发布权限。准备完成后登录并发布已检查的包:
|
|
@@ -53,12 +53,12 @@ npm publish .artifacts/release/ftai-dsh-plugin-acn-0.1.0.tgz --dry-run --access
|
|
|
53
53
|
```sh
|
|
54
54
|
npm login --registry=https://registry.npmjs.org/
|
|
55
55
|
npm whoami --registry=https://registry.npmjs.org/
|
|
56
|
-
npm publish .artifacts/release/ftai-dsh-plugin-acn-0.1.
|
|
56
|
+
npm publish .artifacts/release/ftai-dsh-plugin-acn-0.1.1.tgz --access public --registry=https://registry.npmjs.org/
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
发布前同步检查中英文 README 和使用指南,使用同一份安装包完成 Mac、Windows 验收,再提交版本变更并建立版本 tag。确认源码提交和 tag 的 CI 均通过后,创建对应的 GitHub Release 并上传已验收的安装包。随后执行 npm 发布,按提示完成账号认证;发布成功后,在两个平台的全新 DSH profile 按 `@ftai/dsh-plugin-acn@0.1.1` 从 npm 安装复验,并确认不带版本号时也会安装新版。后续版本替换命令中的版本号;已发布的同名同版本不能覆盖。仓库、主页及问题反馈地址指向本插件仓库,团队服务部署链接继续指向 ACN 官方仓库。
|
|
60
60
|
|
|
61
|
-
GitHub Release 使用与 npm 一致的版本号,例如 tag `v0.1.
|
|
61
|
+
GitHub Release 使用与 npm 一致的版本号,例如 tag `v0.1.1`,指向该包对应的源码提交。正文简要列出主要功能或修复、兼容的 DSH 版本和平台、安装包名、升级步骤及需要用户注意的变化,并链接使用指南与 npm 包页面。建议附件上传与 npm 发布时完全相同的 `.tgz`,供需要安装包的用户下载;不另行构建 Mac、Windows 两份包。GitHub 自动生成的源码归档不含构建后的 `lib/`,不能替代该安装包。
|
|
62
62
|
|
|
63
63
|
## 隔离插件界面调试
|
|
64
64
|
|
package/docs/dsh-compat.md
CHANGED
|
@@ -48,7 +48,7 @@ Windows 导入命令保留原生路径的反斜杠,支持盘符、UNC、含空
|
|
|
48
48
|
| Apple silicon Mac(macOS 13 或更高) | 本机全量测试、真实安装与插件界面回归;继续保留 POSIX 文件打开标志和权限检查 |
|
|
49
49
|
| Windows | 已在 Windows 11、DSH `0.2.1-rc.5` 实机验证预构建包安装、配置与默认切换、原生目录选择和打开、中文及空格路径、知识浏览与来源跳转、宽窄窗口、Recap 和 Dream 重试;实际团队服务的连接检查与收件同步通过,模型流程使用本地模拟服务 |
|
|
50
50
|
|
|
51
|
-
macOS 和 Windows 本机自动化均已通过,包含符号链接路径保护测试。Windows
|
|
51
|
+
macOS 和 Windows 本机自动化均已通过,包含符号链接路径保护测试。Windows 上运行这类测试需允许测试账户创建符号链接,普通用户安装和使用插件无需此权限。路径单测中的 UNC 支持仅验证解析,不代表已验证 SMB 共享存储的锁、原子发布或断电恢复。
|
|
52
52
|
|
|
53
53
|
知识目录建议位于当前用户独占的本地磁盘;普通文件工具不能绕过领域接口访问 ACN 数据。Windows 目录应具有正确的 ACL;保护范围见[已知限制](outstanding-issues.md#领域文件访问)。
|
|
54
54
|
|
|
@@ -56,4 +56,4 @@ macOS 和 Windows 本机自动化均已通过,包含符号链接路径保护
|
|
|
56
56
|
|
|
57
57
|
预构建包包含双语 locale、图标、README 和图文指南。`meta.detail` 指向包内的中英文 README;安装检查会确认正文和相对图片完整。长文详情的显示取决于宿主支持,兼容基线尚未验证该界面的渲染;插件设置界面与 README 介绍区是不同入口。
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
插件已发布到 npm,在 DSH「添加插件」中填写 `@ftai/dsh-plugin-acn` 即可安装,也可使用 GitHub Release 中的预构建 `.tgz`。源码仓库不跟踪 `lib/`,也未配置 Git 安装用的 `prepare`。从 Git 获取源码后应先构建打包,不能把仓库地址直接当作已支持的安装入口。
|
package/docs/user_guide.md
CHANGED
|
@@ -25,7 +25,7 @@ ACN 让不同 Agent 的工作经验在团队中流动:分享有依据的结论
|
|
|
25
25
|
|
|
26
26
|
完成安装并启用 **ACN记忆框架**。
|
|
27
27
|
|
|
28
|
-
不写版本号时,安装 npm 上 `latest` 标签对应的版本。需要特定版本时,在包名后加 `@版本号`,例如 `@ftai/dsh-plugin-acn@0.1.
|
|
28
|
+
不写版本号时,安装 npm 上 `latest` 标签对应的版本。需要特定版本时,在包名后加 `@版本号`,例如 `@ftai/dsh-plugin-acn@0.1.1`。
|
|
29
29
|
|
|
30
30
|

|
|
31
31
|
|
|
@@ -68,6 +68,8 @@ ACN 让不同 Agent 的工作经验在团队中流动:分享有依据的结论
|
|
|
68
68
|
|
|
69
69
|
如果列表没有可用模型,先完成 DSH 的模型配置。知识目录通常保留默认值即可;需要调整时,可以点击文件夹图标选择,或用「打开目录」查看当前位置。修改目录不会自动搬移原数据。
|
|
70
70
|
|
|
71
|
+
已有 ACN 知识时,可以选择直接包含 `settings.json` 和 `upstreams/` 的账号目录。保存后,原来的工作配置和知识会一起出现,无需逐份寻找配置子目录。先结束原程序的知识任务并退出,再切换目录;随后确认当前宿主中的知识处理模型和团队 Key,即可新建会话继续使用。
|
|
72
|
+
|
|
71
73
|

|
|
72
74
|
|
|
73
75
|
## 在会话中使用知识
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { l as ClaimIdSchema } from "./claim-DOAGe8ZK.js";
|
|
1
|
+
import { h as TraceIdSchema, l as ClaimIdSchema, u as DisputeIdSchema } from "./claim-DOAGe8ZK.js";
|
|
2
2
|
import { w as hasCode } from "./lock-DbmlKOoX.js";
|
|
3
3
|
import { i as RejectedDisputeStore, r as UploadStore } from "./uploads-BCA2p92b.js";
|
|
4
|
-
import { t as DeliveryStatusStore } from "./delivery-status-
|
|
4
|
+
import { n as deliveryTarget, t as DeliveryStatusStore } from "./delivery-status-M7-Rwoyj.js";
|
|
5
5
|
import { t as JobQueue } from "./queue-M917xHPS.js";
|
|
6
|
-
import {
|
|
6
|
+
import { n as PresentationStore, t as historicalKnowledge } from "./history-DPMHX3ZE.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import { join } from "node:path";
|
|
@@ -186,17 +186,27 @@ function activityDetails(result) {
|
|
|
186
186
|
const value = publicResult(result);
|
|
187
187
|
const counts = Object.fromEntries(Object.keys(labels).flatMap((key) => typeof value[key] === "number" ? [[key, value[key]]] : []));
|
|
188
188
|
if (Array.isArray(value["updatedClaimIds"])) counts["claimCount"] = value["updatedClaimIds"].length;
|
|
189
|
+
const ids = z.array(z.union([
|
|
190
|
+
ClaimIdSchema,
|
|
191
|
+
DisputeIdSchema,
|
|
192
|
+
TraceIdSchema
|
|
193
|
+
]));
|
|
194
|
+
const entityIds = [...new Set(["entityIds", "updatedClaimIds"].flatMap((key) => {
|
|
195
|
+
const parsed = ids.safeParse(value[key]);
|
|
196
|
+
return parsed.success ? parsed.data : [];
|
|
197
|
+
}))];
|
|
189
198
|
const incomplete = z.array(Incomplete).safeParse(value["incompleteCandidates"]);
|
|
190
199
|
const warnings = z.array(z.string()).safeParse(value["warnings"]);
|
|
191
200
|
const texts = Object.entries(counts).map(([key, count]) => `${labels[key]}: ${count}`);
|
|
192
201
|
if (value["skipped"] === true || typeof value["skipped"] === "string") texts.push("没有需要新增处理的内容");
|
|
193
|
-
if (value["changed"] === false) texts.push("
|
|
202
|
+
if (value["changed"] === false) texts.push("没有知识变更");
|
|
194
203
|
if (value["applied"] === true) texts.push("本地处理完成");
|
|
195
204
|
if (value["budgetLimited"] === true) texts.push("本次已按额度收尾;未完成项未执行,再次整理将读取当前知识");
|
|
196
205
|
const skipped = Array.isArray(value["skipped"]) ? value["skipped"].filter((id) => typeof id === "string") : [];
|
|
197
206
|
if (skipped.length > 0) texts.push(`跳过 ${skipped.length} 组`);
|
|
198
207
|
return {
|
|
199
208
|
counts,
|
|
209
|
+
entityIds,
|
|
200
210
|
summary: texts.join(";") || (result == null ? "尚无处理结果" : "处理完成,可能未产生新知识"),
|
|
201
211
|
warnings: warnings.success ? warnings.data : [],
|
|
202
212
|
incompleteCandidates: incomplete.success ? incomplete.data : [],
|
|
@@ -290,6 +300,38 @@ async function allActivities(knowledge, supports = (kind) => knowledge.jobs?.sup
|
|
|
290
300
|
unseen: false
|
|
291
301
|
});
|
|
292
302
|
}
|
|
303
|
+
for (const [kind, items] of [["claim", pending.claims], ["dispute", pending.disputes]]) for (const item of items) {
|
|
304
|
+
if (status.issues[`${kind}-${item.id}`] !== void 0) continue;
|
|
305
|
+
rows.push({
|
|
306
|
+
id: `delivery-${kind}-${item.id}`,
|
|
307
|
+
kind: "delivery",
|
|
308
|
+
state: "queued",
|
|
309
|
+
entityId: item.id,
|
|
310
|
+
attempts: 0,
|
|
311
|
+
updatedAt: Date.parse("updated_at" in item ? item.updated_at ?? item.created_at : item.created_at),
|
|
312
|
+
unseen: false,
|
|
313
|
+
retryable: true,
|
|
314
|
+
summary: "等待后台团队投递。"
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
const target = knowledge.team === null ? "" : deliveryTarget(knowledge.config.team.maintainerEndpoint);
|
|
318
|
+
for (const [key, receipt] of Object.entries(status.delivered)) {
|
|
319
|
+
const id = key.replace(/^(claim|dispute)-/, "");
|
|
320
|
+
if (receipt.target !== target || !z.union([ClaimIdSchema, DisputeIdSchema]).safeParse(id).success) continue;
|
|
321
|
+
const source = rows.filter((row) => row.entityIds?.some((entityId) => entityId === id) && row.updatedAt <= (receipt.updatedAt ?? 0)).sort((a, b) => b.updatedAt - a.updatedAt)[0]?.sessionId;
|
|
322
|
+
rows.push({
|
|
323
|
+
id: `delivery-confirmed-${key}`,
|
|
324
|
+
kind: "delivery",
|
|
325
|
+
state: "succeeded",
|
|
326
|
+
entityId: id,
|
|
327
|
+
attempts: 0,
|
|
328
|
+
updatedAt: receipt.updatedAt ?? 0,
|
|
329
|
+
unseen: false,
|
|
330
|
+
retryable: false,
|
|
331
|
+
...source === void 0 ? {} : { sessionId: source },
|
|
332
|
+
summary: "此版本已收到团队投递确认。"
|
|
333
|
+
});
|
|
334
|
+
}
|
|
293
335
|
for (const [version, rejection] of Object.entries(await new RejectedDisputeStore(context).read(true))) {
|
|
294
336
|
const id = `delivery-rejected-${version}`;
|
|
295
337
|
const updatedAt = Date.parse(rejection.rejected_at);
|
|
@@ -313,6 +355,44 @@ async function allActivities(knowledge, supports = (kind) => knowledge.jobs?.sup
|
|
|
313
355
|
}
|
|
314
356
|
});
|
|
315
357
|
}
|
|
358
|
+
const history = await historicalKnowledge(context);
|
|
359
|
+
for (const record of history.applications) rows.push({
|
|
360
|
+
id: `history-application-${record.id}`,
|
|
361
|
+
kind: record.kind,
|
|
362
|
+
state: record.state === "applied" ? "succeeded" : record.state === "prepared" ? "paused" : "cancelled",
|
|
363
|
+
attempts: record.attempts,
|
|
364
|
+
updatedAt: record.updatedAt,
|
|
365
|
+
unseen: false,
|
|
366
|
+
retryable: false,
|
|
367
|
+
requiresAttention: record.state === "prepared",
|
|
368
|
+
...record.sessionId === void 0 ? {} : { sessionId: record.sessionId },
|
|
369
|
+
entityIds: record.entityIds.flatMap((id) => {
|
|
370
|
+
const parsed = z.union([
|
|
371
|
+
ClaimIdSchema,
|
|
372
|
+
DisputeIdSchema,
|
|
373
|
+
TraceIdSchema
|
|
374
|
+
]).safeParse(id);
|
|
375
|
+
return parsed.success ? [parsed.data] : [];
|
|
376
|
+
}),
|
|
377
|
+
counts: {
|
|
378
|
+
claimCount: record.claimCount,
|
|
379
|
+
disputeCount: record.disputeCount,
|
|
380
|
+
traceCount: record.traceCount
|
|
381
|
+
},
|
|
382
|
+
summary: record.state === "applied" ? `更新 Claim: ${record.claimCount};形成争议: ${record.disputeCount};形成来源: ${record.traceCount}` : record.state === "prepared" ? "历史记录:原程序尚未完成本地提交,请先在原程序中完成处理。" : "历史记录:处理已取消。"
|
|
383
|
+
});
|
|
384
|
+
for (const record of history.deliveries) rows.push({
|
|
385
|
+
id: `history-delivery-${record.entity.kind}-${record.entity.value.id}-${record.updatedAt}`,
|
|
386
|
+
kind: "delivery",
|
|
387
|
+
state: "succeeded",
|
|
388
|
+
entityId: record.entity.value.id,
|
|
389
|
+
attempts: 0,
|
|
390
|
+
updatedAt: record.updatedAt,
|
|
391
|
+
sessionId: record.sessionId,
|
|
392
|
+
unseen: false,
|
|
393
|
+
retryable: false,
|
|
394
|
+
summary: "此版本已收到团队投递确认。"
|
|
395
|
+
});
|
|
316
396
|
return rows.sort((left, right) => right.updatedAt - left.updatedAt || left.id.localeCompare(right.id));
|
|
317
397
|
}
|
|
318
398
|
function activityPage(rows, options = {}) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ClaimSchema, v as deriveTraceId, x as nowSeconds } from "./claim-DOAGe8ZK.js";
|
|
2
|
-
import { c as TranscriptStore, l as processedThrough } from "./structured-
|
|
2
|
+
import { c as TranscriptStore, l as processedThrough } from "./structured-C9byFuzm.js";
|
|
3
3
|
import { C as StoreError, _ as JobError, c as readYamlOr, l as writeYamlAtomic, n as withFileLock } from "./lock-DbmlKOoX.js";
|
|
4
4
|
import { a as analysisIsStale, c as observeApplied, i as STALE_PLAN_WARNING, l as sameClaim, o as claimChanges, s as ensureKnowledgeReady, t as AnalysisChanged } from "./alignment-CwH0nBf-.js";
|
|
5
5
|
import { i as ClaimStore, r as reportedClaimSetKey, t as ReportedSetStore } from "./reported-sets-DdEKdeVb.js";
|
|
@@ -7,7 +7,7 @@ import { t as TraceSchema } from "./trace-Da0RnL5R.js";
|
|
|
7
7
|
import { t as TraceStore } from "./traces-CHBo8y1z.js";
|
|
8
8
|
import { t as DisputeSchema } from "./dispute-CtrInHzf.js";
|
|
9
9
|
import { r as UploadStore } from "./uploads-BCA2p92b.js";
|
|
10
|
-
import { t as DreamStore } from "./checkpoint-
|
|
10
|
+
import { t as DreamStore } from "./checkpoint-c7aI4D-X.js";
|
|
11
11
|
import { n as ClaimEditStore, t as DisputeStore } from "./disputes-ByEmi43j.js";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
//#region src/knowledge/disputes.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { m as SourceIdSchema, v as deriveTraceId, x as nowSeconds } from "./claim-DOAGe8ZK.js";
|
|
2
|
-
import { A as valueHash, E as reviewInput, K as DreamStateSchema, S as contentHash, T as reaches, V as CheckpointSchema, Z as KeySchema, b as validateSelfReview, et as OriginSchema, pt as requireDream, r as EvidenceStore, rt as ProgressSchema, v as versions, w as prepareGroup, x as validateSemanticReview } from "./evidence-store-
|
|
2
|
+
import { A as valueHash, E as reviewInput, K as DreamStateSchema, S as contentHash, T as reaches, V as CheckpointSchema, Z as KeySchema, b as validateSelfReview, et as OriginSchema, pt as requireDream, r as EvidenceStore, rt as ProgressSchema, v as versions, w as prepareGroup, x as validateSemanticReview } from "./evidence-store-DW7kj20i.js";
|
|
3
3
|
import { C as StoreError, c as readYamlOr, d as removeFile, f as writeTextAtomic, l as writeYamlAtomic, n as withFileLock, s as readYaml, w as hasCode } from "./lock-DbmlKOoX.js";
|
|
4
4
|
import { l as sameClaim } from "./alignment-CwH0nBf-.js";
|
|
5
5
|
import { i as ClaimStore } from "./reported-sets-DdEKdeVb.js";
|