dsh-plugin-meeting-assistant 0.0.0-stage → 0.1.12

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/LICENSE ADDED
@@ -0,0 +1,100 @@
1
+ DSH Meeting Assistant Noncommercial and Commercial License
2
+ Version 1.0
3
+
4
+ Copyright (c) 2026 vianvio and dsh-plugin-meeting-assistant contributors.
5
+ All rights reserved except as expressly granted below.
6
+
7
+ Licensor: vianvio
8
+ Contact and commercial licensing: https://github.com/vianvio
9
+
10
+ 1. Scope and definitions
11
+
12
+ "Software" means the portions of dsh-plugin-meeting-assistant, including its
13
+ source code, compiled plugin and documentation, that the Licensor is entitled
14
+ to license under these terms.
15
+
16
+ "Commercial Use" means use primarily intended for commercial advantage,
17
+ monetary compensation or the business operations of a for-profit
18
+ organization. It includes, without limitation:
19
+ (a) internal deployment or use on behalf of a business;
20
+ (b) using the Software to deliver paid consulting, development, meeting,
21
+ transcription or other services;
22
+ (c) providing the Software or its functionality through a hosted service,
23
+ SaaS product, API, managed service or customer-facing application; and
24
+ (d) selling, sublicensing, commercially distributing or bundling the Software
25
+ or modified versions with a paid product or service.
26
+ Commercial Use remains Commercial Use when the Software is not separately
27
+ priced, when access is bundled with something else, or when it is modified.
28
+
29
+ "Noncommercial Use" means personal, educational, research or other use that
30
+ does not constitute Commercial Use. Personal use by an individual solely
31
+ outside that individual's work for a business can qualify.
32
+
33
+ 2. Free noncommercial permission
34
+
35
+ Subject to these terms, permission is granted, free of charge, to use, copy,
36
+ study and modify the Software solely for Noncommercial Use. You may
37
+ redistribute original or modified copies solely for Noncommercial Use,
38
+ provided that you:
39
+ (a) retain this license and all applicable copyright and third-party notices;
40
+ (b) clearly identify material modifications you make; and
41
+ (c) do not grant recipients Commercial Use rights or remove these conditions.
42
+
43
+ This is a source-available license with a commercial-use restriction, not an
44
+ unrestricted open-source license. Public availability of the repository or
45
+ npm package does not grant unrestricted commercial rights.
46
+
47
+ 3. Paid commercial authorization required
48
+
49
+ Commercial Use is NOT permitted under the free permission in section 2.
50
+ Before any Commercial Use, you must obtain a separate written commercial
51
+ license directly from vianvio and pay the licensing fees agreed with vianvio.
52
+
53
+ The written commercial agreement determines the authorized licensee, use,
54
+ products, deployments, term, fees and any redistribution or sublicensing
55
+ rights. No fixed price, support obligation, warranty, exclusivity or
56
+ commercial-use permission is implied by this license.
57
+
58
+ Downloading, installing, receiving an automatic update, modifying or paying
59
+ a third party for the Software does not itself grant commercial
60
+ authorization from vianvio. A payment alone is not a substitute for the
61
+ required written authorization.
62
+
63
+ 4. Third-party materials and earlier grants
64
+
65
+ Third-party components, dependencies and other material supplied under
66
+ separate license terms remain governed by their respective licenses.
67
+ Their applicable notices are retained in THIRD-PARTY-NOTICES.md and in
68
+ their own source or package distributions. This license does not restrict
69
+ rights those separate licenses already grant.
70
+
71
+ Versions 0.1.8 and earlier were distributed under the MIT License. Valid
72
+ rights already granted for copies received under MIT or another prior
73
+ license are not revoked, restricted or retroactively replaced by these
74
+ terms. A separate written agreement may also grant rights independently
75
+ of this license.
76
+
77
+ No rights in material the Licensor does not own or have authority to license
78
+ are claimed by this license.
79
+
80
+ 5. Compliance and termination
81
+
82
+ The permissions granted by this license terminate if you use the Software
83
+ outside their scope or fail to comply with these terms. On termination,
84
+ stop uses that depend on this license. Termination does not remove rights
85
+ you independently hold under a third-party license, a prior grant or a
86
+ separate written agreement. All rights not expressly granted are reserved.
87
+ No trademark, trade name or endorsement rights are granted.
88
+
89
+ 6. Disclaimer and limitation of liability
90
+
91
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
92
+ IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY,
93
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. TO THE MAXIMUM EXTENT
94
+ PERMITTED BY APPLICABLE LAW, THE LICENSOR AND CONTRIBUTORS SHALL NOT BE
95
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
96
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
97
+ SOFTWARE OR ITS USE OR OTHER DEALINGS.
98
+
99
+ A separate signed commercial agreement controls to the extent it expressly
100
+ provides different terms.
package/README.md CHANGED
@@ -1,3 +1,224 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ # DSH 会议助手 🎙️
4
+
5
+ **在 DSH 里理解讨论,主动研究与协作写作,准备有依据的追问和回答。**
6
+
7
+ [安装](#安装) · [使用](#使用) · [项目资料与-ai](#项目资料与-ai) · [数据与边界](#数据与边界) · [开发](#开发)
8
+
9
+ [![npm](https://img.shields.io/npm/v/dsh-plugin-meeting-assistant?label=npm)](https://www.npmjs.com/package/dsh-plugin-meeting-assistant) · [![license](https://img.shields.io/badge/license-Noncommercial%20%2F%20Commercial-orange)](LICENSE) · ![DSH](https://img.shields.io/badge/DSH-plugin-4B6BFB)
10
+
11
+ </div>
12
+
13
+ 会议助手直接装进 DeepSeek Harness:聊天输入框旁的一个入口,完成会前准备、麦克风录音、实时转写和会中辅助。录音、文字与会议背景保存在本机,历史记录可以回看和导出。
14
+
15
+ 它可以独立安装。录音与转写由本插件提供,会中建议结合当前项目、你的会议目标和最近讨论生成。
16
+
17
+ **许可:非商业使用免费;企业内部使用、付费服务、SaaS 集成及其他商业使用,须向 [vianvio](https://github.com/vianvio) 付费并取得书面商业授权。** [查看条款](LICENSE)。
18
+
19
+ | 会前 | 会中 | 会后 |
20
+ | --- | --- | --- |
21
+ | 填写会邀和目标,按需润色 | 追问 / 回应 / 转写三个视图 | 回看录音、转写和分析记录 |
22
+ | 当前项目自动作为资料范围 | 收起面板、切换聊天仍继续录音 | 导出完整文字记录 |
23
+
24
+ ## 安装
25
+
26
+ ### 从 npm 装到 DSH
27
+
28
+ ```bash
29
+ dsh plugin --profile desktop add dsh-plugin-meeting-assistant --registry=https://registry.npmjs.org/
30
+ ```
31
+
32
+ `--profile` 填你实际使用的配置:桌面端通常是 `desktop`,Web 端是 `web`。这条命令从 npm 安装插件,并自动把它加入 profile 的 `dsh.profile.bundles`。
33
+
34
+ npm 包已带编译好的客户端和宿主代码,安装时无需克隆仓库或自己构建。**安装后完整退出并重新打开 DSH**,聊天输入框旁会出现「会议助手」,设置中会出现「会议语音」。
35
+
36
+ 要求 DSH 提供 0.2.1 系列插件 API,具体 peer 范围见 [package.json](package.json)。本地验证环境为 macOS 上的 DSH Desktop 0.2.1-rc.5。
37
+
38
+ <details>
39
+ <summary>终端找不到 dsh 命令?</summary>
40
+
41
+ macOS 上,DeepSeek Harness 安装在 `/Applications` 时,可以直接使用应用内置命令:
42
+
43
+ ```bash
44
+ "/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh" plugin --profile desktop add dsh-plugin-meeting-assistant --registry=https://registry.npmjs.org/
45
+ ```
46
+
47
+ </details>
48
+
49
+ ### 升级
50
+
51
+ 每次打开会议助手面板时,会在后台检查新版。发现更新后,标题右侧显示「更新」按钮,点击即可进入更新操作;已经安装但尚未生效时显示「待重启」。检查失败不会影响录音。
52
+
53
+ 右上角「⋯ → 插件更新」仍可查看版本、手动重试或关闭自动更新。
54
+
55
+ 自动更新默认开启,每天检查一次 npm 稳定版;录音、分析或目标润色正在进行时先等待,空闲后再安装。更新期间不能开始新录音或分析,安装完成后按面板提示完整重开 DSH。未提供该能力的 DSH 可以使用下方命令手动更新。
56
+
57
+ npm 和本地 `.tgz` 安装均从官方 npm 稳定通道更新;`link:`、本地源码目录和 Git 安装保留开发来源,不会被自动替换。自动更新开关按 DSH profile 保存。
58
+
59
+ 也可以继续使用命令行:
60
+
61
+ ```bash
62
+ dsh plugin --profile desktop update dsh-plugin-meeting-assistant --registry=https://registry.npmjs.org/
63
+ ```
64
+
65
+ 升级后同样完整重启 DSH。前后端版本不一致时,会议面板会提示重新打开应用。
66
+
67
+ 如果此前通过本地 `.tgz` 或 `link:` 安装,执行下面这条命令切换到 npm 版本:
68
+
69
+ ```bash
70
+ dsh plugin --profile desktop add dsh-plugin-meeting-assistant@latest --registry=https://registry.npmjs.org/
71
+ ```
72
+
73
+ ### 卸载
74
+
75
+ ```bash
76
+ dsh plugin --profile desktop remove dsh-plugin-meeting-assistant
77
+ ```
78
+
79
+ ## 使用
80
+
81
+ 以下截图来自插件真实组件,使用演示数据;转写和 AI 内容仅作操作示例。
82
+
83
+ ### 1. 配置转写服务
84
+
85
+ 打开「设置 → 会议语音」,填写百炼 API Key,以及对应服务的流式 WebSocket 地址和模型名。地址与模型收在「服务地址与模型」中,也可以导入已有的 `.env` 或 JSON 配置。
86
+
87
+ 插件使用 DashScope `run-task` 流式识别协议,请使用支持该协议的服务参数。转写服务按音频时长计费。
88
+
89
+ AI 建议和目标润色使用当前对话选择的模型,配置方式见下方[项目资料与 AI](#项目资料与-ai)。
90
+
91
+ <details>
92
+ <summary>查看语音设置截图</summary>
93
+
94
+ <img src="https://raw.githubusercontent.com/vianvio/dsh-plugin-meeting-assistant/main/assets/readme/02-settings.png" width="380" alt="语音设置:百炼 API Key、服务地址与模型、导入配置和保存设置">
95
+
96
+ 在这里保存转写服务凭据;也可以从会议面板右上角菜单进入「语音设置」。
97
+
98
+ </details>
99
+
100
+ ### 2. 准备会议
101
+
102
+ 点击输入框旁的「会议助手」。会邀和会议目标直接展示,均可留空;角色与立场放在「更多背景」中。
103
+
104
+ <p><img src="https://raw.githubusercontent.com/vianvio/dsh-plugin-meeting-assistant/main/assets/readme/01-entry.png" width="135" alt="聊天输入框旁的会议助手入口"></p>
105
+
106
+ 当前会话所在项目自动作为资料范围,无需选择文件。填写目标后,可以点击「AI 润色」获取 2–3 个候选,选择并点击「采用」才替换原文。打开面板、打字和开始录音都不会自动润色。
107
+
108
+ | 填写会邀与目标 | 按需选择润色方案 |
109
+ | --- | --- |
110
+ | <img src="https://raw.githubusercontent.com/vianvio/dsh-plugin-meeting-assistant/main/assets/readme/03-prepare.png" width="380" alt="会前准备:填写会邀和目标,其他背景折叠"> | <img src="https://raw.githubusercontent.com/vianvio/dsh-plugin-meeting-assistant/main/assets/readme/04-goal-polish.png" width="380" alt="点击 AI 润色,选中一个候选后点击采用"> |
111
+ | 填写讨论主题和希望得到的结论,然后点击「开始录音」。 | 点击「AI 润色」→ 选择候选 → 点击「采用」。 |
112
+
113
+ ### 3. 开始录音
114
+
115
+ 点击「开始录音」时才申请麦克风权限。等待授权可以取消,之后迟到的授权也不会自动恢复已取消的录音。
116
+
117
+ 录音中,面板顶部显示时长、音量与结束操作;主区域通过三个视图切换:
118
+
119
+ - **追问**:结合讨论和项目资料,查看可提出的问题及依据。
120
+ - **回应**:展开可能被问到的问题,查看简短或展开的回答参考。
121
+ - **转写**:查看逐句原文,按需加载更早的内容。
122
+
123
+ | 追问:挑选值得继续讨论的问题 | 转写:核对会议原话 |
124
+ | --- | --- |
125
+ | <img src="https://raw.githubusercontent.com/vianvio/dsh-plugin-meeting-assistant/main/assets/readme/05-questions.png" width="380" alt="录音中的追问视图,包含三个问题、提问目的和折叠来源"> | <img src="https://raw.githubusercontent.com/vianvio/dsh-plugin-meeting-assistant/main/assets/readme/07-transcript.png" width="380" alt="录音中的转写视图,逐句显示时间和会议原文"> |
126
+ | 右上角刷新按钮手动生成建议,「来源」可展开查看依据。 | 点击「转写」即可查看逐句记录,顶部仍可结束录音。 |
127
+
128
+ <details>
129
+ <summary>查看「回应」:展开问题,参考两种回答</summary>
130
+
131
+ <img src="https://raw.githubusercontent.com/vianvio/dsh-plugin-meeting-assistant/main/assets/readme/06-replies.png" width="380" alt="回应视图:展开问题后显示精简版与高情商版回答">
132
+
133
+ 点击「回应」,再展开一个问题;可复制「精简版」或「高情商版」,按实际情况调整后使用。
134
+
135
+ </details>
136
+
137
+ 「会议理解与研究」展示当前事务、焦点、来源与研究草稿。后台结合项目资料、转写和你在主对话里的补充持续更新理解;遇到值得核实的事项会定向查资料,在主对话汇报发现或与你讨论。自动研究可单独关闭,也可以手动刷新或取消。
138
+
139
+ 追问和回应参考各选 0–2 条,没有值得输出的内容时可以留空。可对建议标记「已问」「已解决」「偏题」「资料已知」「时机不对」,反馈会进入后续理解和筛选;查看或复制不算已经发言。
140
+
141
+ 新建议到达时,点击「有新建议,点击查看」才切换版本,正在阅读的卡片会保留。自动分析可在右上角菜单调整,也可以手动更新或取消分析。取消只结束本次分析,录音继续。
142
+
143
+ ### 4. 结束与回看
144
+
145
+ 收起面板或切换聊天时,录音继续;点击「结束」才停止。每场会议属于发起录音的会话,全应用同时只录一场。
146
+
147
+ **会话被删掉之后**,录音还在这台机器上跑,但那个界面已经不在了:别的会话打开面板会看到「接管到本会话 / 结束录音」。接管会把整场会议(转写、建议与会前背景)接到当前会话,同时结束那边还在采集的麦克风;只想停就点「结束录音」,结束之后它仍留在接管清单里,随时可以再接到本会话。应用重启、会话被删后留下的未收尾会议,同样列在面板顶部的接管清单里。
148
+
149
+ 结束后停留在本场记录。右上角菜单提供历史记录、文字导出、会议背景和语音设置。也可以在原聊天里问“刚才讨论的结论是什么”,让 Agent 通过 `voice_log` 读取本会话的记录。
150
+
151
+ ## 项目资料与 AI
152
+
153
+ 项目目录是会议的默认资料范围。会议启动、事务理解更新、生成建议或润色目标时,插件按会邀、目标和当前讨论检索相关内容,包括代码、文档、隐藏的 `.notes` 和 Word 文档;目录索引和内容片段有读取预算,依赖、构建目录和二进制内容会按规则跳过。
154
+
155
+ 这表示整个项目可作为检索范围,不能等同于模型已经读完每个文件。每次生成会重新读取当前相关内容。旧会议中的文件快照仍可读取。
156
+
157
+ 会中建议和目标润色都使用**对应对话当前选择的模型**,包括服务商、模型和思考强度。使用前,在 DSH 对话中选好并配置可用模型即可。
158
+
159
+ | 功能 | 使用的对话模型 |
160
+ | --- | --- |
161
+ | 事务理解与研究写作 | 录音所属对话当前选择的模型;读取带来源的用户输入和证据 |
162
+ | 会中建议 | 录音所属对话当前选择的模型;支持时通过子 Agent 继承对话上下文 |
163
+ | 会中建议的直调回落 | 仍使用该对话选择的模型 |
164
+ | 目标润色 | 点击「AI 润色」时使用该对话选择的模型 |
165
+
166
+ 切换模型后,下一次分析或润色使用新选择;已经开始的请求继续使用发起时的模型。无法读取会话模型时会提示重新选择,不会静默切换到其他服务商。语音转写使用单独配置的百炼服务,不随对话模型变化。
167
+
168
+ 发言建议展示在面板中,由用户选择是否采用;研究摘要和协作草稿可独立进入主对话。两者不会自动代用户向参会者发言。具体流程、节流、数据归属与验证边界见 [共享事务理解与双飞轮](docs/MEETING-INTELLIGENCE.md)。
169
+
170
+ 录音运行时支持短暂宿主重载后的接续。音频和停止请求遇到短暂路由不可用时会有限重试;取消分析会立即释放任务状态,迟到结果不会覆盖新的分析。
171
+
172
+ ## 数据与边界
173
+
174
+ - **本机保存**:录音、转写、会前背景和分析记录默认位于 `~/.agent-mesh/voice`,可用 `MESH_VOICE_HOME` 更改。目录名沿用拆分前的位置,升级可以继续读取原有记录。
175
+ - **服务调用**:麦克风音频发送至配置的百炼转写服务;背景、相关项目片段、转写和用户主动对话会交给对应的 DSH 模型服务;自动研究开启时,公开事实查询会交给宿主配置的搜索服务。
176
+ - **凭据**:语音配置保存在本机,接口不回显密钥,配置文件权限为 `0600`。
177
+ - **音源**:当前直接采集麦克风,不直接采集系统声音;线上会议使用耳机时,需要自行确认麦克风能采到所需声音。
178
+ - **浏览器**:Web 端需要 HTTPS 或 localhost 等安全上下文,并允许访问麦克风。
179
+ - **中断恢复**:应用退出或刷新后停止采集,已落盘的音频与转写会保留;中断期间不会补录。部分音频未完成转写时,面板会提示。会话被删除或应用重启留下的会议,可以在任意会话里接管到当前会话(见[设计说明](docs/VOICE.md#会话丢失之后的接管))。
180
+ - **诊断**:插件诊断日志默认在 `~/.agent-mesh/logs`。详细协议、上下文路径与恢复行为见 [设计说明](docs/VOICE.md)。
181
+
182
+ ## 开发
183
+
184
+ 使用 Node.js 24 和本仓库锁定的依赖:
185
+
186
+ ```bash
187
+ git clone https://github.com/vianvio/dsh-plugin-meeting-assistant.git
188
+ cd dsh-plugin-meeting-assistant
189
+ npm ci
190
+ npm run check
191
+ ```
192
+
193
+ 本地开发安装:
194
+
195
+ ```bash
196
+ dsh plugin --profile desktop add "link:$PWD"
197
+ npm run dev
198
+ ```
199
+
200
+ 客户端修改可由 DSH 的 HMR 接收;宿主代码修改或发版升级后,完整重启可以确认加载到同一版本。
201
+
202
+ ```bash
203
+ npm run build # 生成 lib/index.js 和 lib/client.js
204
+ npm test # 先构建,再跑 Node 测试与 ASR 内核测试
205
+ npm run typecheck # TypeScript 检查
206
+ npm run test:ui # 真实组件 + 模拟音频/RPC 的浏览器回归
207
+ npm run test:ui:intelligence # 理解、研究与建议反馈的浏览器回归
208
+ ```
209
+
210
+ `test:ui` 需要本机安装并连接 `browser-harness`;不请求真实麦克风或模型。源码目录、服务依赖与共享内核说明见 [开发与维护](docs/DEVELOPMENT.md)。
211
+
212
+ ## 许可与来源
213
+
214
+ 本项目自 **v0.1.9** 起采用[非商业与商业授权许可](LICENSE):
215
+
216
+ - 个人非商业使用、学习和非商业研究可免费使用、修改,并依条款分发。
217
+ - 企业内部使用、付费服务、SaaS/托管服务、商业集成及销售分发,须事先向 **vianvio 付费并取得单独书面授权**。
218
+ - 授权价格、部署范围、期限及再分发权限由双方另行约定,请通过 [vianvio 的 GitHub 主页](https://github.com/vianvio) 联系维护者洽谈。
219
+
220
+ 这是带商业使用限制的源码可见许可。公开仓库、npm 下载或自动更新均不代表获得商业授权。
221
+
222
+ v0.1.8 及更早版本已经依 MIT 授出的有效权利仍然保留,新条款不追溯收回这些授权。第三方组件继续适用各自的许可证,完整声明见 [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md)。
223
+
224
+ 会议助手从 Agent Mesh 拆分为独立插件;共享层和语音内核的来源分别记录在 [src/shared/README.md](src/shared/README.md) 与 [src/vendor/voice-kernel/README.md](src/vendor/voice-kernel/README.md)。
@@ -0,0 +1,102 @@
1
+ # Third-party and historical license notices
2
+
3
+ The current project's own licensing terms are in [LICENSE](LICENSE).
4
+ The notices below apply only to the identified material and do not make the
5
+ entire current release available under MIT.
6
+
7
+ ## Pre-existing MIT-licensed material
8
+
9
+ Versions 0.1.8 and earlier of this project were published under MIT. Any
10
+ material incorporated from those releases retains the rights and notice
11
+ requirements of its original grant. This includes previously published
12
+ shared-layer and voice-kernel code to the extent covered by that grant.
13
+ Their provenance records are preserved in `src/shared/README.md` and
14
+ `src/vendor/voice-kernel/README.md`. The current license does not revoke
15
+ permissions already granted under MIT.
16
+
17
+ The original project notice is reproduced here:
18
+
19
+ ```text
20
+ MIT License
21
+
22
+ Copyright (c) 2026 dsh-plugin-meeting-assistant contributors
23
+
24
+ Permission is hereby granted, free of charge, to any person obtaining a copy
25
+ of this software and associated documentation files (the "Software"), to deal
26
+ in the Software without restriction, including without limitation the rights
27
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28
+ copies of the Software, and to permit persons to whom the Software is
29
+ furnished to do so, subject to the following conditions:
30
+
31
+ The above copyright notice and this permission notice shall be included in all
32
+ copies or substantial portions of the Software.
33
+
34
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
37
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
39
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
40
+ SOFTWARE.
41
+ ```
42
+
43
+ ## fflate 0.8.3
44
+
45
+ Included in the compiled host bundle. License: MIT.
46
+
47
+ ```text
48
+ MIT License
49
+
50
+ Copyright (c) 2026 Arjun Barrett
51
+
52
+ Permission is hereby granted, free of charge, to any person obtaining a copy
53
+ of this software and associated documentation files (the "Software"), to deal
54
+ in the Software without restriction, including without limitation the rights
55
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
56
+ copies of the Software, and to permit persons to whom the Software is
57
+ furnished to do so, subject to the following conditions:
58
+
59
+ The above copyright notice and this permission notice shall be included in all
60
+ copies or substantial portions of the Software.
61
+
62
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
63
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
64
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
65
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
66
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
67
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
68
+ SOFTWARE.
69
+ ```
70
+
71
+ ## ws 8.21.3
72
+
73
+ Included in the compiled host bundle. License: MIT.
74
+
75
+ ```text
76
+ Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
77
+ Copyright (c) 2013 Arnout Kazemier and contributors
78
+ Copyright (c) 2016 Luigi Pinca and contributors
79
+
80
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
81
+ this software and associated documentation files (the "Software"), to deal in
82
+ the Software without restriction, including without limitation the rights to
83
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
84
+ the Software, and to permit persons to whom the Software is furnished to do so,
85
+ subject to the following conditions:
86
+
87
+ The above copyright notice and this permission notice shall be included in all
88
+ copies or substantial portions of the Software.
89
+
90
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
91
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
92
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
93
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
94
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
95
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
96
+ ```
97
+
98
+ ## Host-provided components
99
+
100
+ DSH framework modules, React and React DOM are external runtime components;
101
+ they are not relicensed by this project. Their own distributions carry the
102
+ applicable license terms and copyright notices.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: meeting-assistant
3
+ name: dsh-plugin-meeting-assistant
@@ -0,0 +1,134 @@
1
+ # 开发与维护
2
+
3
+ 用户安装和使用步骤见 [README](../README.md)。本页说明源码组织、服务边界与验证方法。
4
+
5
+ ## 仓库长什么样
6
+
7
+ | 目录 | 是什么 | 能不能改 |
8
+ | --- | --- | --- |
9
+ | `src/index.ts`、`src/voice/**` | 插件自己:宿主半入口、录音服务、ASR 连接、发言建议、`voice_log` 工具、RPC 通道、客户端界面 | 是,这是本仓的主体 |
10
+ | `src/shared/**` | 拆包时从 `agent-mesh/desktop/plugins/plugin-shared/` **拷进来的一份**(诊断、RPC 调用/通道、宿主作用域、dock、主题、宿主词表) | 谨慎:上游还有一份在 Agent Mesh 仓里,见下 |
11
+ | `src/vendor/voice-kernel/**` | 从 `agent-mesh/packages/voice-kernel` 拷进来的 ASR 协议与重连内核(`.mjs` + `.d.mts`) | 谨慎:同上,副本 |
12
+ | `test/**` | 单元测试(含 `test/voice-kernel/` 里那份内核单测) | 是 |
13
+ | `lib/**` | 构建产物(`npm run build` 生成,不进版本库) | 否 |
14
+
15
+ ### 关于 `src/shared` 与 `src/vendor` 这两份副本
16
+
17
+ 它们**不是依赖**,是源码复制:插件要能单独 checkout、单独 `npm install`、单独构建,所以不能对着
18
+ 另一个仓库的相对路径 import。代价是同一份代码在两处演化——所以:
19
+
20
+ * 这两个目录**不跟着上游自动更新**。上游(Agent Mesh 仓)改了共享层,这里不会知道。
21
+ * 真要同步时,把上游的改动**手工搬过来**,然后跑 `npm test`:`test/package-boundary.test.ts` 会
22
+ 盯住"源码里不许出现仓库外的相对 import",`test/host-inject.test.ts` 会盯住 inject 与共享层里
23
+ 真正用到的服务对得上。
24
+ * 副本的来处写在 `src/shared/README.md`、`src/vendor/voice-kernel/README.md`(含拆分时的上游提交)。
25
+
26
+ ## 两半,与"改完怎么生效"
27
+
28
+ | 产物 | 跑在哪 | 改完怎么生效 | 要重启 DSH 吗 |
29
+ | --- | --- | --- | --- |
30
+ | `src/client.tsx` → `lib/client.js`(会议入口、会中面板、语音设置) | 渲染进程 | `npm run dev` 重建 → DSH 的客户端插件 HMR 接收器接住 | **不用** |
31
+ | `src/index.ts`、`src/voice/*`(录音服务、ASR 连接、发言建议、`voice_log` 工具、RPC 通道) | DSH 宿主进程 | 宿主半可能随 DSH 配置协调或 HMR 重新加载;发版升级后完整重启可确保前后端版本一致 | **要** |
32
+
33
+ 宿主半每次加载会打一行 `[meeting-assistant-host <ISO 时间>]`(走 stderr)。"现在跑的是哪一份代码"
34
+ 有一个能直接看到的答案,不用猜:宿主把宿主子进程的 stdout 直接 pipe、没有落盘出口,所以那一行停在
35
+ 启动它的终端里(插件自己另有一路诊断文件:`~/.agent-mesh/logs/` 下的 JSONL,见 `src/shared/diag-file.ts`)。
36
+
37
+ ## 统一入口与面板
38
+
39
+ | 入口 | 槽位 | 干什么 |
40
+ | --- | --- | --- |
41
+ | 输入框旁的「会议助手」 | `conversation.input.left` | 单一入口,打开面板;录音中显示红点与时长,打开和收起均不改变录音 |
42
+ | 侧栏中的会议面板 | `shell.overlay` → `DockHost` | 快速开始、值得追问、回应参考、可展开的转写和会议背景;更多菜单提供设置、历史和导出 |
43
+ | 设置里的「会议语音」 | `settings.section` | 百炼 API Key、WebSocket 地址、模型 |
44
+
45
+ 侧栏那一根栏是**插件之间共用**的:名单挂在全局对象上(`src/shared/dock/dock-store.ts`),谁先
46
+ 加载谁建,栏本身只有一个宿主。所以装了别的、也用这根栏的插件时,两边是同一根栏里的两个标签页;
47
+ **只装本插件时它照样开得出栏**——`DockHost` 不依赖任何别的插件。
48
+
49
+ 开始录音前直接显示“会邀”和“会议目标”,均可留空;角色与立场在“更多背景”中填写。当前会话项目自动作为资料范围,无需选择文件。目标填写后可点击“AI 润色”获取候选,选择并点击“采用”才更新原文,打开面板、编辑文字和开始录音均不触发润色。
50
+
51
+ 会中顶部只保留录音状态、时长与结束操作,下方通过“追问 / 回应 / 转写”切换内容;会议背景、自动分析和历史记录收在菜单。等待麦克风授权可以取消;取消后迟到的授权会释放音频流,不会自动恢复录音。新建议到达只提示,点击后才切换正在阅读的卡片。
52
+
53
+ ## 数据放在哪
54
+
55
+ - 录音、转写、会前准备:`MESH_VOICE_HOME`,默认 `~/.agent-mesh/voice`。
56
+ - 语音识别凭据:同上目录下的配置文件,保存时落盘权限收紧(`0600`),接口回显时不含密钥。
57
+
58
+ 目录名保留 `agent-mesh` 是**有意**的:改名会让已经录过的会议在升级后"消失"。共享的只有这一个
59
+ 路径常量。
60
+
61
+ ## 宿主半声明的服务
62
+
63
+ `export const inject = ['tools', 'connection', 'webServer', 'llm']`——`inject` 声明宿主依赖;缺少必要服务会阻止插件正常加载。
64
+
65
+ - `connection` + `webServer`:会议界面走一条 RPC 通道(`/meeting-assistant`),优先使用 `ctx.connection.rpc.handle`,
66
+ 受服务作用域隔离时退回插件前缀路由;信任检查沿用 DSH。DSH 把
67
+ `webServer` 隔离了,只有**顶层 inject 声明过**的 fiber 看得见它,所以这条必须写在这里。
68
+ - `tools`:注册 `voice_log`(模型读会议记录的唯一入口)。
69
+ - `llm`:发言建议的直调回落路径(`src/voice/coach-model.ts` 的 `ctx.llm.stream`)用;cordis 的服务
70
+ 方法里 `this.ctx` 会换回**调用方**的 ctx,被调服务内部读什么,调用方就得声明什么。
71
+ - **故意不声明** `agents` / `subagents`:发言建议优先 fork 一个子 agent,但部署里没有 subagent 供给
72
+ 时应该回落到单次直调,而不是整个插件加载不了。运行时探测,见 `src/voice/coach-model.ts`。
73
+
74
+ `test/host-inject.test.ts` 按宿主半的 import 闭包扫一遍 `ctx.<服务>`,与这份 `inject` 对不上就红。
75
+
76
+ ## 测试
77
+
78
+ ```bash
79
+ npm install # 装 devDependencies(DSH 那几个包钉在 0.2.1-rc.4:peer 范围是给"装插件的那台机器"看的,
80
+ # dev 里钉死同一代,npm 自动补 peer 时才不会与 devDeps 互相打架)
81
+ npm run build # 打 lib/index.js + lib/client.js
82
+ npm test # pretest 会先 build;跑 test/*.test.ts 与 test/voice-kernel/*.mjs
83
+ npm run typecheck # tsc --noEmit
84
+ npm run check # 上面两个一起
85
+ ```
86
+
87
+ | 文件 | 覆盖 |
88
+ | --- | --- |
89
+ | `test/voice.test.ts` | 重采样/PCM、配置隐私与 TLS 强制、录音生命周期、RPC 重试去重、会话隔离、`voice_log` 只读工具 |
90
+ | `test/voice-context.test.ts` | 转写上下文注入:快照边界、role/source/form、节流、收尾必推、无 live agent 静默跳过 |
91
+ | `test/voice-advice-backend.test.ts` | 发言建议的两条后端:schema 强制子集、agent 路径的父级与 schema、停止原因映射、run 必 dispose、回落直调 |
92
+ | `test/meeting-capture.test.ts` | 麦克风启动阶段、取消与迟到授权、服务收尾顺序、设备错误与幂等停止(模拟音频,不申请真实权限) |
93
+ | `test/meeting-coach.test.ts` | 会前准备与建议落盘、自动生成与取消、建议解析 |
94
+ | `test/project-context.test.ts` | 项目资料懒加载、代码与隐藏目录、相关片段预算、越界链接、最新内容与旧资料兼容 |
95
+ | `test/goal-polish.test.ts` | 显式目标润色、候选格式与错误处理、超时、按录音项目取资料且不自动写回 |
96
+ | `test/meeting-host-isolation.test.ts` | 只 import 宿主半**不许**执行插件入口的副作用(模块级日志与 20 秒看门狗) |
97
+ | `test/host-inject.test.ts` | 两半的 `inject` 与它们真正用到的服务对得上(漏一个就是整台机器起不来) |
98
+ | `test/plugin-routes.test.ts` | 注册自己的 `/meeting-assistant` 通道、不认调用方给的路径 |
99
+ | `test/client-entry.test.ts` | 客户端半的**源码**入口真的加载一次,并认领它广告的槽位 |
100
+ | `test/client-bundle.test.ts` | 客户端**产物**按 DSH 加载器跑一次,且只用 `inject` 里声明的服务 |
101
+ | `test/host-bundle.test.ts` | 宿主**产物**的导出(`name`/`inject`/`apply`/`hostBuild`)与注入的版本号 |
102
+ | `test/package-boundary.test.ts` | 源码里不许有仓库外的相对 import;manifest 里不许有 `file:` 依赖;产物里不许有别的插件的痕迹 |
103
+ | `test/compat-session-v4.test.ts` | 真的注入消息必须能被会话格式 v4 的编码器接受(`kind:'plugin'` 那套写法仍被拒收) |
104
+ | `test/import-graph.test.ts`、`test/client-boundary.test.ts`、`test/dock.test.ts` | 无环、客户端半不取 Node 内建、栏的落点与配色 |
105
+ | `test/voice-kernel/*.test.mjs` | vendored 内核:run-task 协议、断线重连、重喂查重、WAV 头 |
106
+
107
+ 界面流程可独立回归(需本机已安装 `browser-harness` 并连接调试浏览器):
108
+
109
+ ```bash
110
+ npm run test:ui
111
+ ```
112
+
113
+ 该命令只在本机回环地址启动临时页面,直接加载真实会议组件,模拟音频设备和服务。它检查会邀与目标的引导、显式润色与候选采纳、旧结果失效、会中三个视图、统一入口、收起/切换会话继续录音、新建议显式切换、权限取消/迟到授权与配置恢复,不请求真实麦克风或模型。普通 `npm test` 无需浏览器。
114
+
115
+ 真实 ASR 的一轮生成需要凭据,不在 `npm test` 里(那台机器上没有百炼 Key):
116
+
117
+ ```bash
118
+ # 用 macOS 的 say + ffmpeg 合成一段语音,边录边读,把结果写进 .local/
119
+ node --import tsx scripts/voice-live.ts
120
+ ```
121
+
122
+ 会议功能的完整设计说明(转写链路、发言建议的两条后端、上下文注入的两条路径)见
123
+ [docs/VOICE.md](docs/VOICE.md)。
124
+
125
+
126
+ ## 插件自动更新
127
+
128
+ 入口位于会议助手「⋯ → 插件更新」。宿主通过可选的 `profileContext` 和 `pluginManager` 能力定位当前 profile,使用公开的 `@deepseek-ai/dsh-plugin-manager/operations` 中 `runPluginCommand` 安装本包的精确稳定版,复用 CLI 的写锁和版本兼容性检查。该 API 缺失时不影响会议功能。
129
+
130
+ 更新设置保存在 profile 下的 `.meeting-assistant-updates.json`,只记录开关、最近检查时间和稳定版号。默认每天检查一次;录音、分析或目标润色期间排队,安装阶段拒绝新的录音和 AI 任务。状态由更新页轮询,关闭页面即停止该页轮询;后台检查由宿主调度,不依赖面板打开。
131
+
132
+ 更新器按 profile 在进程内共享。插件热重载会转交状态和平台绑定,卸载仅停止后续调度;正在执行的安装须等待原生安装程序退出,不能提前释放锁或重复安装。不自动重启应用。源码、Git 和未知安装来源禁止覆盖;本地归档更新会切换到官方 npm 稳定通道。
133
+
134
+ `test/plugin-updater.test.ts` 覆盖调度、排队、取消等待、版本比较、超时及持久化失败;`test/update-driver.test.ts` 验证固定包名、来源保护和原生参数;`test/update-service.test.ts` 验证跨重载和 profile 隔离;`test/update-routes.test.ts` 验证 RPC 与会议任务互斥。浏览器回归覆盖菜单、开关、乱序响应、安装进度及麦克风保护。