dsh-univer-office 0.2.10 → 0.2.11
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.md +11 -3
- package/README.zh-CN.md +14 -4
- package/docs/architecture.md +32 -4
- package/docs/assets/readme/nike-presentation-demo.png +0 -0
- package/lib/build-info.json +5 -0
- package/lib/client.js +22041 -84
- package/lib/index.js +349 -67
- package/lib/telemetry-entry.js +214 -0
- package/package.json +31 -23
- package/scripts/telemetry-entry.mjs +28 -0
package/README.md
CHANGED
|
@@ -18,6 +18,9 @@ After installation, describe the result you want in natural language. The agent
|
|
|
18
18
|
|
|
19
19
|
## See it in action
|
|
20
20
|
|
|
21
|
+
[](https://www.youtube.com/watch?v=k-2zW_CMiew)
|
|
22
|
+
|
|
23
|
+
|
|
21
24
|
The agent created this spreadsheet from a natural-language request, then added conditional formatting and a chart in the same conversation. The result can be previewed, revised, merged into the current version, or discarded in place.
|
|
22
25
|
|
|
23
26
|

|
|
@@ -119,10 +122,10 @@ dsh web
|
|
|
119
122
|
|
|
120
123
|
After DSH starts successfully, refresh the existing DeepSeek Harness browser page with **Cmd+R / Ctrl+R**.
|
|
121
124
|
|
|
122
|
-
### 2. Describe
|
|
125
|
+
### 2. Describe what you need
|
|
123
126
|
|
|
124
127
|
```text
|
|
125
|
-
Create
|
|
128
|
+
Create a monthly expense spreadsheet with dates, categories, amounts, a total, and a few rows of sample data.
|
|
126
129
|
```
|
|
127
130
|
|
|
128
131
|
### 3. Review it in the conversation
|
|
@@ -162,7 +165,7 @@ DSH selects these tools automatically; you normally do not need to call them man
|
|
|
162
165
|
|
|
163
166
|
## Preview and review experience
|
|
164
167
|
|
|
165
|
-
- **Live Univer window** — changes open automatically in a window you can drag, resize, fold, or maximize.
|
|
168
|
+
- **Live Univer window** — changes open automatically in a window you can drag, resize, fold, or maximize. Disable automatic opening under **Settings → Plugins → Plugin configuration → Univer Office** without removing conversation review cards.
|
|
166
169
|
- **Conversation review cards** — each edited `.univer` file has its own full preview card, while deleted temporary files leave no stale cards behind.
|
|
167
170
|
- **Historical review** — drafts, submitted changes, approvals, and discarded results remain in the conversation, with older cards collapsed by default.
|
|
168
171
|
- **Session isolation** — each DSH session shows only its own windows, cards, and review state.
|
|
@@ -197,6 +200,11 @@ The defaults are designed for local use: the service starts at port `9080`. If t
|
|
|
197
200
|
| `resourceOperationTimeoutMs` | `120000` | Overall timeout for one resource-library tool operation |
|
|
198
201
|
| `tools` | `true` | Enable agent editing capabilities |
|
|
199
202
|
| `skills` | `true` | Enable bundled task guidance |
|
|
203
|
+
| `telemetry` | `true` | Send anonymous product telemetry |
|
|
204
|
+
|
|
205
|
+
## Telemetry
|
|
206
|
+
|
|
207
|
+
Sends anonymous usage stats (never file contents or paths). Disable with `DO_NOT_TRACK=1` or `telemetry: false`.
|
|
200
208
|
|
|
201
209
|
## Uninstall
|
|
202
210
|
|
package/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# DSH × Univer Office
|
|
4
4
|
|
|
5
|
-
>
|
|
5
|
+
> 为 DeepSeek Harness 打造一个真正的办公环境。
|
|
6
|
+
>
|
|
7
|
+
> Univer Office 插件将电子表格、文档、幻灯片、画布、多维表格等汇聚到同一个运行时——数据互联、修改经过校验、变更按版本管理,并以隔离工作树支持多 Agent 协作。
|
|
6
8
|
|
|
7
9
|
[English](README.md) · 简体中文
|
|
8
10
|
|
|
@@ -16,6 +18,9 @@
|
|
|
16
18
|
|
|
17
19
|
## 看看实际效果
|
|
18
20
|
|
|
21
|
+
[](https://www.youtube.com/watch?v=k-2zW_CMiew)
|
|
22
|
+
|
|
23
|
+
|
|
19
24
|
下面的电子表格由 Agent 根据自然语言要求创建,并在同一个会话中继续添加条件格式和图表。完成后可以直接预览、继续修改、合入当前版本或丢弃。
|
|
20
25
|
|
|
21
26
|

|
|
@@ -117,10 +122,10 @@ dsh web
|
|
|
117
122
|
|
|
118
123
|
DSH 启动成功后,在已有的 DeepSeek Harness 浏览器页面按 **Cmd+R / Ctrl+R** 刷新。
|
|
119
124
|
|
|
120
|
-
### 2.
|
|
125
|
+
### 2. 直接描述需求
|
|
121
126
|
|
|
122
127
|
```text
|
|
123
|
-
|
|
128
|
+
帮我生成一个月度支出表格,包含日期、分类、金额和合计,并填入几条示例数据。
|
|
124
129
|
```
|
|
125
130
|
|
|
126
131
|
### 3. 在会话中审阅
|
|
@@ -160,7 +165,7 @@ DSH 会自动选择这些工具,日常使用不需要手动调用。
|
|
|
160
165
|
|
|
161
166
|
## 预览与审阅体验
|
|
162
167
|
|
|
163
|
-
- **实时 Univer
|
|
168
|
+
- **实时 Univer 窗口**:修改默认自动显示在可拖动、缩放、折叠和全屏的窗口中;可在“设置 → 插件 → 插件配置 → Univer Office”关闭自动打开,不影响会话审阅卡片。
|
|
164
169
|
- **会话审阅卡片**:每个修改过的 `.univer` 文件都有独立的完整预览卡片;已删除的临时文件不会留下无效卡片。
|
|
165
170
|
- **历史审阅**:草稿、已提交修改、确认和放弃结果都会保留在会话中,历史卡片默认折叠。
|
|
166
171
|
- **多会话隔离**:每个 DSH 会话只展示属于自己的窗口、卡片和审阅状态。
|
|
@@ -195,6 +200,11 @@ DSH 会自动选择这些工具,日常使用不需要手动调用。
|
|
|
195
200
|
| `resourceOperationTimeoutMs` | `120000` | 一次资源库工具操作的总超时 |
|
|
196
201
|
| `tools` | `true` | 启用 Agent 编辑能力 |
|
|
197
202
|
| `skills` | `true` | 启用内置任务指引 |
|
|
203
|
+
| `telemetry` | `true` | 发送匿名产品遥测 |
|
|
204
|
+
|
|
205
|
+
## 遥测
|
|
206
|
+
|
|
207
|
+
默认发送匿名使用统计(不含文件内容与路径)。设 `DO_NOT_TRACK=1` 或配置 `telemetry: false` 关闭。
|
|
198
208
|
|
|
199
209
|
## 卸载
|
|
200
210
|
|
package/docs/architecture.md
CHANGED
|
@@ -12,12 +12,14 @@
|
|
|
12
12
|
- `service` 定义稳定的 Univer 领域接口;
|
|
13
13
|
- `provider` 实现该接口并拥有状态缓存、文件操作和 worktree 操作;
|
|
14
14
|
- `webServer` 把需要浏览器访问的服务能力映射为 Host HTTP API;
|
|
15
|
+
- `settings` 在 DSH Settings 可用时注册浏览器展示偏好;
|
|
15
16
|
- `tools` 把适合模型调用的内容创作能力映射为 DSH 工具;
|
|
16
17
|
- `skills` 向 DSH Skill Registry 提供按需加载的 Univer 工作流与 Unit 专项知识;
|
|
17
18
|
- `processes/gateway` 负责插件内置 Gateway 进程和 Viewer 资源;
|
|
18
19
|
- `workers/unit-content` 是一次性 Unit Content Worker 的子进程入口;
|
|
19
20
|
- `client` 负责 DSH 浏览器端的预览、实时 worktree 窗口和用户审阅界面;
|
|
20
|
-
- `shared/wire` 只存放 Host 与 Client 共享的纯 JSON
|
|
21
|
+
- `shared/wire` 只存放 Host 与 Client 共享的纯 JSON 数据类型;
|
|
22
|
+
- `telemetry` 提供 best-effort 的匿名产品遥测,只在 Host 与包 lifecycle 入口发送,任何失败都不影响安装、启动与卸载。
|
|
21
23
|
|
|
22
24
|
用户只安装本插件即可使用全部功能。全局 `univer` CLI 不属于运行依赖;Unit 的导入、检查、执行和导出由插件内置的一次性 Unit Content Worker 完成。
|
|
23
25
|
|
|
@@ -28,6 +30,7 @@
|
|
|
28
30
|
- 在 DSH 会话中发现 `.univer` 文件,并为每个文件显示采用统一审阅布局的回合尾部卡片;
|
|
29
31
|
- 在 DSH 内以 Viewer 全屏预览文件;
|
|
30
32
|
- worktree 创建或更新后显示实时浮动窗口;
|
|
33
|
+
- 用户可在 DSH 插件设置中关闭实时浮动窗口,且不影响回合尾部审阅卡片;
|
|
31
34
|
- 一个 worktree 改动多个 unit 时,只列出有改动的 unit 并允许切换;
|
|
32
35
|
- 会话结束后在最近一次操作各 worktree 的回合末尾为 `draft` 或 `ready` worktree 显示嵌入式审阅面板;
|
|
33
36
|
- 后续回合再次操作同一 worktree 时,旧回合保留同一张完整卡片并默认折叠,不回退到旧文件预览卡片或单独历史 header;
|
|
@@ -128,6 +131,11 @@ src/
|
|
|
128
131
|
resources.ts
|
|
129
132
|
skills/
|
|
130
133
|
plugin.ts # bundled lazy Skill Provider
|
|
134
|
+
settings/
|
|
135
|
+
plugin.ts # 可选 DSH Settings 命名空间
|
|
136
|
+
telemetry/
|
|
137
|
+
product-telemetry.ts # 匿名产品遥测:state、去重与白名单发送
|
|
138
|
+
entry.ts # 打包为 lib/telemetry-entry.js 的 lifecycle 发送入口
|
|
131
139
|
adapters/
|
|
132
140
|
gateway/
|
|
133
141
|
client.ts
|
|
@@ -173,12 +181,17 @@ src/
|
|
|
173
181
|
review-panel.tsx
|
|
174
182
|
unit-chips.tsx
|
|
175
183
|
univer-dock.tsx
|
|
184
|
+
settings-card.tsx
|
|
176
185
|
locales/
|
|
177
186
|
en.ts
|
|
178
187
|
zh.ts
|
|
188
|
+
settings/
|
|
189
|
+
live-preview-preference.ts # Settings scope 的浮窗偏好投影
|
|
179
190
|
styles/
|
|
191
|
+
settings.ts
|
|
180
192
|
worktree.ts
|
|
181
193
|
shared/
|
|
194
|
+
settings.ts # Host/Client 共用的纯设置契约与默认值
|
|
182
195
|
wire/
|
|
183
196
|
status.ts
|
|
184
197
|
state.ts
|
|
@@ -197,6 +210,7 @@ test/
|
|
|
197
210
|
client-smoke.mjs
|
|
198
211
|
integration-smoke.mjs
|
|
199
212
|
skills-smoke.mjs
|
|
213
|
+
telemetry-smoke.mjs
|
|
200
214
|
scripts/
|
|
201
215
|
build.mjs
|
|
202
216
|
skills/
|
|
@@ -321,6 +335,8 @@ Client 通过 `univerTurnDefinition` 按 `callId` 配对结构化工具调用与
|
|
|
321
335
|
|
|
322
336
|
实时浮窗只由 `univer_new`、worktree create/reopen/ready 和内容写入主动拉起,纯 status、inspect、lint、screenshot 与 export 不主动打开窗口。用户保持打开的文件或非终态 worktree 会在下一 Turn 继续显示;用户关闭优先,merged 与 discarded 清除打开意图。
|
|
323
337
|
|
|
338
|
+
`univer-office` Settings 命名空间拥有 `autoOpenLivePreview` 用户偏好,默认开启且实时生效。Settings 服务或对应 Client 设置表面缺席时,Client 保持默认开启,不让可选设置能力阻塞预览与审阅注册;关闭该偏好只移除实时浮窗及其轮询,回合尾部审阅投影不受影响。
|
|
339
|
+
|
|
324
340
|
Client 必须满足:
|
|
325
341
|
|
|
326
342
|
- 会话 ID 与 workspace scope 是所有状态查询的组成部分;
|
|
@@ -352,7 +368,7 @@ Client 必须满足:
|
|
|
352
368
|
|
|
353
369
|
## 12. 构建与发布
|
|
354
370
|
|
|
355
|
-
`src` 包含插件发布的所有 application 源码;Viewer application、machine render page、render preset 和 IMPORTRANGE plugin 源码从 `univer-cli` 复制到本仓库后直接维护。`pnpm run build` 生成 Host/Client bundle、Unit Content Worker、Gateway、machine render page 和 Viewer;`lib` 与 `artifacts` 都被 gitignore,并在打包前重新生成。Host 构建为 Node ESM,Client 构建为 DSH ModuleLoader 可加载的浏览器 bundle,Gateway 构建为 Node CJS 子进程,Worker 构建为 Node ESM 子进程,machine render page 与 Viewer 构建为 Vite 静态资产。
|
|
371
|
+
`src` 包含插件发布的所有 application 源码;Viewer application、machine render page、render preset 和 IMPORTRANGE plugin 源码从 `univer-cli` 复制到本仓库后直接维护。`pnpm run build` 生成 Host/Client bundle、Unit Content Worker、Gateway、machine render page 和 Viewer;`lib` 与 `artifacts` 都被 gitignore,并在打包前重新生成。Host 构建为 Node ESM,Client 构建为 DSH ModuleLoader 可加载的浏览器 bundle,Gateway 构建为 Node CJS 子进程,Worker 构建为 Node ESM 子进程,machine render page 与 Viewer 构建为 Vite 静态资产。lib 构建同时生成 `lib/telemetry-entry.js`(lifecycle hook 发送入口)与 `lib/build-info.json`(包版本、构建 commit 与遥测 endpoint)。
|
|
356
372
|
|
|
357
373
|
发布包包含运行所需的 Gateway、Viewer、Unit Content Worker、Office 转换器、平台依赖、Univer license 与 bundled Skills。Gateway、Worker、Viewer 和 Host 直接使用 manifest 中精确版本的 Univer SDK/API Reference packages;JavaScript SDK 被 bundle,平台原生 package 由包管理器为目标机器安装。发布时只打包从当前源码生成的运行产物。
|
|
358
374
|
|
|
@@ -384,7 +400,18 @@ Client 必须满足:
|
|
|
384
400
|
- 不在当前阶段仅为目录整齐拆成多个 npm 包;
|
|
385
401
|
- 不让模型自行决定 merge 或 discard;显式用户请求仍必须经过 DSH 工具审批。
|
|
386
402
|
|
|
387
|
-
## 15.
|
|
403
|
+
## 15. 产品遥测
|
|
404
|
+
|
|
405
|
+
产品遥测是 best-effort 的匿名安装与活跃统计,只用于看趋势,不用于精确计量。遥测绝不影响安装、插件启动或卸载:所有失败静默吞掉,发送有 5 秒超时,无重试、无队列、无锁。
|
|
406
|
+
|
|
407
|
+
- 事件共四个,统一经 `lib/build-info.json` 中固定的 Univer 代理 endpoint 上报(版本与 commit 也取自该文件),客户端不持有任何分析平台凭证。release workflow 通过 `RELEASE_TELEMETRY_ENDPOINT` 把线上代理地址注入发布构建;本地与开发构建保持为空,即遥测整体静默(`telemetry: false` 的 disabled 标记写入除外,见下)。运行时显式设置 `UNIVER_TELEMETRY_ENDPOINT`(含空值)优先于构建固定值,用作测试重定向与应急开关。服务端 allowlist 必须先于带 endpoint 的构建部署,否则事件会被整包拒绝且因 at-most-once 永久丢失;
|
|
408
|
+
- `dsh_plugin_postinstall`(包 postinstall,每安装身份一次)、`dsh_plugin_activated`(Host 激活,每安装身份一次)、`dsh_plugin_daily_active`(Host 激活时检查,每安装身份每本地日一次)、`dsh_plugin_uninstall_hook`(包 uninstall,不去重,因为 state 跨重装存活,一次性标记会掩盖后续卸载);
|
|
409
|
+
- payload 只允许 `distinctId`(随机 UUID)、事件名与白名单属性(package name/version、build commit、platform、arch、Node major version、event source、state schema version),禁止路径、workspace、session、文件内容与环境变量。服务端代理对未知键整包拒绝;
|
|
410
|
+
- 去重只在本机 state(`$DSH_HOME/telemetry/dsh-univer-office/state.json`,沿用 `config.ts` 的 `DSH_HOME` 约定)中做,先落盘标记再发送(at-most-once:崩溃宁可丢事件不重发,标记写失败时同样放弃发送);并发启动的毫秒级竞态接受偶发双发;
|
|
411
|
+
- `telemetry: false` 配置由 Host 同步写入 state 的 `disabled` 标记,使拿不到 Cordis 配置的 lifecycle hook 发送同样停用,这也是空 endpoint 下唯一会创建 state 的路径;`DO_NOT_TRACK` 非空在所有入口直接短路;
|
|
412
|
+
- 发送只发生在 Host 进程(fire-and-forget,不注册资源、不阻塞激活与卸载)与 `scripts/telemetry-entry.mjs` 启动的 detached 子进程中;Client、Viewer、Gateway 与 Worker 不发送遥测。
|
|
413
|
+
|
|
414
|
+
## 16. 变更规则
|
|
388
415
|
|
|
389
416
|
后续实现若改变以下任一事项,必须先更新本文并重新评审:
|
|
390
417
|
|
|
@@ -394,4 +421,5 @@ Client 必须满足:
|
|
|
394
421
|
- worktree 用户审阅权归属;
|
|
395
422
|
- 工具能力与 bundled Skills 的对应关系;
|
|
396
423
|
- 源码构建、Viewer 与许可证策略;
|
|
397
|
-
-
|
|
424
|
+
- 单包与多包的发布决策;
|
|
425
|
+
- 遥测事件集合、payload 白名单、去重语义或上报通道。
|
|
Binary file
|