@dsh-teamwork/dsh-teamwork 0.8.3 → 0.9.0
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 +90 -227
- package/README.zh-CN.md +104 -0
- package/assets/readme/icon-256.png +0 -0
- package/assets/readme/review-and-publish.png +0 -0
- package/assets/readme/teamwork-panel.png +0 -0
- package/assets/readme/versions-and-backups.png +0 -0
- package/docs/README.md +7 -0
- package/docs/development.md +180 -0
- package/docs/en/guide.md +175 -0
- package/docs/zh-CN/guide.md +102 -0
- package/icon.svg +7 -4
- package/lib/client.js +21 -0
- package/lib/client.js.map +1 -1
- package/lib/index.js +26 -6
- package/lib/index.js.map +1 -1
- package/lib/task-session.js +34 -0
- package/lib/task-session.js.map +1 -1
- package/lib/token-file.js +34 -0
- package/lib/token-file.js.map +1 -0
- package/lib/types/client.d.ts +6 -0
- package/lib/types/client.d.ts.map +1 -1
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/task-session.d.ts +61 -0
- package/lib/types/task-session.d.ts.map +1 -1
- package/lib/types/token-file.d.ts +11 -0
- package/lib/types/token-file.d.ts.map +1 -0
- package/lib/web/client.js +64 -35
- package/package.json +22 -3
- package/screenshots.json +5 -0
package/README.md
CHANGED
|
@@ -1,264 +1,127 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center"><img src="https://raw.githubusercontent.com/dsh-teamwork/dsh-teamwork/main/assets/readme/icon-256.png" width="72" height="72" alt="DSH Teamwork"></p>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# DSH Teamwork
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
English · [简体中文](README.zh-CN.md)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
pnpm test
|
|
11
|
-
pnpm typecheck
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
插件包含可发布的 `lib` 输出;修改源码后应重新构建。`pnpm build` 同时编译宿主端(`src/` → `lib/`)和浏览器端(`src/web/` → `lib/web/client.js`)。
|
|
15
|
-
|
|
16
|
-
DSH 核心包由宿主提供,只声明为 `peerDependencies`;开发依赖固定在 `0.2.2-rc.3`,Zod 与该宿主对齐为 `4.6.6`,避免多个版本的递归类型导致类型检查内存耗尽。不要将 `@deepseek-ai/dsh-*` 加回运行时依赖:旧版插件在 hoisted profile 中安装的核心包可能覆盖升级后的宿主,即使停用插件仍会导致启动失败。遇到此问题,应备份 profile,升级插件并重新安装依赖以清除旧核心包;仅关闭插件不会清除这些依赖。
|
|
17
|
-
|
|
18
|
-
仓库是 pnpm workspace:`ui/` 是共用组件库 `@dsh-teamwork/ui`,供本插件的面板使用,将来给 web 端和其他 DSH 插件共用,之后拆到独立仓库 `dsh-teamwork/dsh-teamwork-ui`。它的约定见 [`ui/README.md`](ui/README.md)。
|
|
19
|
-
|
|
20
|
-
## 接入 DSH
|
|
21
|
-
|
|
22
|
-
安装插件后,默认连接官方服务 `https://www.dshteamwork.com`,不用任何配置。自建团队可以在 Teamwork 面板的登录页更改服务器地址(例如本地开发的 `http://localhost:3800`),选择保存在配置缓存旁的 `<缓存名>.server.json`;也可以在 profile 的 `dsh-teamwork` 条目里改默认值:
|
|
23
|
-
|
|
24
|
-
```yaml
|
|
25
|
-
- id: dsh-teamwork
|
|
26
|
-
config:
|
|
27
|
-
apiEndpoint: https://teamwork.example.com # 默认 https://www.dshteamwork.com
|
|
28
|
-
cachePath: /absolute/path/to/private/teamwork-cache.json
|
|
29
|
-
autoSync: true
|
|
30
|
-
syncIntervalMs: 60000
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
**手机接入(托管服务)**:登录后,插件会向服务器询问 `GET /api/relay`。服务器提供中转时,插件主动连出一条 WebSocket,并用登录得到的令牌表明身份。服务器那边会把这台电脑登记为你的主机,面板顶部显示“手机可连接”。DSH Teamwork App 之后就能经由这条连接操作这台电脑上的 DSH。自建的社区版服务器不提供中转,插件也就不会连出。这台电脑的标识保存在缓存旁的 `<缓存名>.host.json`;退出登录会断开连接。
|
|
34
|
-
|
|
35
|
-
**手机能做什么**:只有在这台电脑上确认过的配对,才能把手机的请求转进来。插件逐条按白名单检查,再以这部手机专属的身份在本机调用 DSH。白名单只包括:查看会话列表、新建会话、发送消息、跟随输出、取消、切换模型、回答 Agent 的提问和审批。名单之外的请求不会到达 DSH。只开终端、没有启动 DSH web 或桌面端时,手机请求一律返回 503。解除配对后,这部手机会立刻断开。Agent 提问或需要审批时,插件会告诉服务器是哪个会话在等,服务器再通知这台电脑上没打开 App 的已配对手机;通知只写是哪台电脑在等,不包含问题内容。
|
|
36
|
-
|
|
37
|
-
包的 `cordis.patch.yml` 使用 `insert` 声明新条目。手动 `--patch` 加载时也需使用 insert,并将 name 指向本仓库 `lib/index.js` 的绝对路径。
|
|
38
|
-
|
|
39
|
-
## 侧栏面板
|
|
40
|
-
|
|
41
|
-
DSH web 和桌面端的左侧栏有 Teamwork 入口,打开后是主区域的 Teamwork 面板:
|
|
42
|
-
|
|
43
|
-
- 未登录:点“在浏览器中登录”,在网页上确认授权,面板随即自动完成登录。插件在本机 `127.0.0.1` 的一个临时端口上等授权码,最多等十分钟,兑换成功后立即关闭;浏览器和 DSH 不在同一台机器时,把网页上显示的那一行粘贴到面板里。页面底部显示当前服务器,可以改成自建或本地地址,或恢复默认;服务器只接受 https,本机地址可以用 http。更改服务器会退出当前登录并清除旧服务器的团队配置。
|
|
44
|
-
- 顶栏:图标右侧为“我的团队 > 当前团队”,手机连接、我的账号在右。Teamwork 名称、服务器、本机信息、同步状态和刷新位于底部贴边的状态栏,内容单独滚动。手机连接独立于团队资源;配对授权整台 DSH 可访问的会话,目前不能只授权某个团队。
|
|
45
|
-
- 团队资源:使用顶栏的自定义下拉框切换团队,预设、模型和插件均标注所属团队。多团队首次登录先选择浏览范围,之后按服务器与账号记住选择;筛选不会改变已有会话或手机授权。发布配置和管理成员仍在网页完成。
|
|
46
|
-
- 我的账号:显示名称、邮箱与账号语言,通过宿主接口读取和保存个人资料。可更换服务器或确认退出;令牌不会发给浏览器,重启 DSH 仍需重新授权。
|
|
47
|
-
- 个人资料的未保存草稿会在切换页面时保留,可撤销修改;保存失败保留输入并提供重试。手机操作期间阻止重复提交,解除配对失败保留确认;配对码过期可重新生成,“收起配对码”仅隐藏展示,不会提前使服务器上的码失效。
|
|
48
|
-
- 预设:每个预设的模型、就绪状态(必需工具、依赖插件),"用于当前会话"(仅限尚未开始对话的会话)和"新建会话"。
|
|
49
|
-
- 团队模型:用于当前会话,只改本会话,不改本地默认设置。
|
|
50
|
-
- 团队插件:固定版本的状态;安装前在面板里确认,确认绑定当时的精确版本。
|
|
51
|
-
|
|
52
|
-
面板通过宿主端的 `/api/teamwork/*` 路由(`src/panel.ts`)工作,与 `/teamwork` 命令调用同一组函数;平台令牌只留在宿主进程里,不会发到浏览器。DSH 只允许本机所有者访问这些路由。会话恢复相关的子命令(`session`、`continue`、`cancel`、`retry`)只保留为命令。
|
|
53
|
-
|
|
54
|
-
面板读取的是宿主已同步的配置,每次状态请求只扫描一次本机插件清单,供所有预设复用;没有插件依赖或团队插件时不扫描。清单不跨请求缓存,下一次刷新会重新检查插件状态。状态轮询在上一次请求结束后再计时,刷新失败保留已有内容。
|
|
7
|
+
[](https://www.npmjs.com/package/@dsh-teamwork/dsh-teamwork)
|
|
8
|
+
[](https://github.com/dsh-teamwork/dsh-teamwork/actions/workflows/ci.yml)
|
|
9
|
+
[](LICENSE)
|
|
55
10
|
|
|
56
|
-
|
|
11
|
+
**Shared models, agent presets, and approved plugins for your team's DSH workspace.**
|
|
57
12
|
|
|
58
|
-
|
|
13
|
+
Connect [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) to
|
|
14
|
+
[DSH Teamwork](https://www.dshteamwork.com), or your team's self-hosted server.
|
|
15
|
+
A team publishes its configuration once; members sync it into their own DSH.
|
|
16
|
+
The team assistant helps with sharing, usage and administration in conversation.
|
|
59
17
|
|
|
60
|
-
|
|
61
|
-
- `/teamwork authorize <code>`:自动交回没有成功时,手动兑换两分钟有效的授权码;直接粘贴网页上显示的整行也可以。
|
|
62
|
-
- `/teamwork status`:查看登录状态、自动同步开关、团队配置数量、最近同步成功时间和错误。
|
|
63
|
-
- `/teamwork sync`:拉取团队模型、预设和插件目录。
|
|
64
|
-
- `/teamwork list`:查看配置 ID。
|
|
65
|
-
- `/teamwork info [id]`:查看当前会话或指定预设的说明、版本、来源、提示词和工具状态。
|
|
66
|
-
- `/teamwork new <id>`:用最新团队预设创建新会话,在 DSH 会话列表打开;不复制旧历史、不启动任务。
|
|
67
|
-
- `/teamwork use <id>`:选择本会话使用的团队模型/预设,不修改本地默认模型。
|
|
68
|
-
- `/teamwork install <id>`:查看固定版本插件的安装确认说明。
|
|
69
|
-
- `/teamwork install <id> confirm`:通过 DSH 插件管理器先下载为禁用状态,检查配置覆盖和条目冲突后再启用。已有本地插件不会被覆盖或升级;有冲突的新包保持禁用,供用户在本地插件管理器中检查。
|
|
70
|
-
- `/teamwork logout`:在本地丢弃插件令牌,并移除团队缓存和注册。平台令牌无法在服务端撤销,但被移出团队的成员在下一次请求时即被拒绝。
|
|
18
|
+

|
|
71
19
|
|
|
72
|
-
|
|
20
|
+
The plugin panel currently uses Simplified Chinese. The web console supports
|
|
21
|
+
English and Simplified Chinese. Screenshots use a local demonstration team.
|
|
73
22
|
|
|
74
|
-
|
|
23
|
+
## What you can do
|
|
75
24
|
|
|
76
|
-
|
|
25
|
+
| Capability | What it gives your team |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| Shared models and presets | Sync team resources and create sessions from native DSH agent presets. |
|
|
28
|
+
| Team assistant | Ask about configuration, personal usage and applicable budgets; administrators get their authorized management operations. |
|
|
29
|
+
| Reviewed sharing | Prepare local plugin packages and submit new or updated plugins/presets for administrator review. |
|
|
30
|
+
| Version history | Inspect publications, export resource backups and prepare a reviewed restoration. |
|
|
31
|
+
| Team governance | Administrators manage configuration, budgets and approval through the connected service. |
|
|
32
|
+
| Paired mobile access | With the hosted relay and a matching Teamwork App, pair your phone to your online DSH computer. |
|
|
77
33
|
|
|
78
|
-
|
|
34
|
+
Sharing and review happen inside the selected team. A publication becomes
|
|
35
|
+
available to its members; it does not install code on their computers.
|
|
79
36
|
|
|
80
|
-
##
|
|
37
|
+
## Install
|
|
81
38
|
|
|
82
|
-
|
|
39
|
+
**DSH Desktop:** open **Plugins → Add plugin** in the application, enter the
|
|
40
|
+
package name below, install it and enable it. Follow any restart prompt.
|
|
83
41
|
|
|
84
|
-
|
|
42
|
+
```text
|
|
43
|
+
@dsh-teamwork/dsh-teamwork
|
|
44
|
+
```
|
|
85
45
|
|
|
46
|
+
Desktop manages its own profile. Use its plugin manager for installation and
|
|
47
|
+
updates; a CLI installation into `web` belongs to a different profile.
|
|
86
48
|
|
|
87
|
-
|
|
49
|
+
**DSH CLI / Web:** install into the profile you actually run:
|
|
88
50
|
|
|
89
51
|
```sh
|
|
90
|
-
|
|
91
|
-
|
|
52
|
+
dsh plugin --profile web add @dsh-teamwork/dsh-teamwork
|
|
53
|
+
dsh web
|
|
92
54
|
```
|
|
93
55
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
测试启动独立临时 profile 和本地 npm registry,创建并打包两个固定版本 fixture,提供 SHA-512 integrity,经真实 DSH 包管理器下载和加载。测试不会发布包,也不修改现有 DSH profile。成功后清理临时目录;失败时报告诊断目录。宿主日志可能含本地浏览器令牌,请勿公开上传完整日志。
|
|
97
|
-
|
|
98
|
-
安装确认绑定当前会话和包的精确版本;配置改变后必须重新查看安装说明。浏览器登录(Google 或邮件验证码)和授权仍由 platform 仓库提供。包声明 `dsh.bundle`(宿主端插件和原生命令)和 `dsh.client`(浏览器端面板,`exports["./client"]` 指向 `lib/web/client.js`)。
|
|
99
|
-
|
|
100
|
-
测试为隔离的临时 DSH profile 设置 `npm_config_ignore_workspace_root_check=true`,允许 pnpm 9 在该 profile 的 workspace 根目录安装受控包。
|
|
101
|
-
|
|
102
|
-
## 自动配置同步
|
|
103
|
-
|
|
104
|
-
默认授权完成后立即同步,并每 60 秒自动刷新团队配置;`autoSync: false` 可关闭这两个自动行为,仍可手动 `/teamwork sync`。`syncIntervalMs` 必须是 10000–86400000 之间的整数毫秒数。每次定时请求结束后才安排下一次,手动与自动请求合并,避免慢网络下堆积请求。
|
|
105
|
-
|
|
106
|
-
网络或响应格式错误保留已有配置,下次定时重试;401/403 清除团队缓存、注册与内存登录状态,暂停自动请求,需重新登录。重启恢复的缓存不代表已登录,`/teamwork status` 会明确区分。自动同步仅更新配置目录,不自动安装插件,不上传会话。插件卸载时停止定时器,等待当前同步结束后释放团队注册。
|
|
107
|
-
|
|
108
|
-
## Platform 模型网关
|
|
109
|
-
|
|
110
|
-
团队模型和预设统一选择 `teamwork-platform` provider,wire model 为团队配置 ID。插件把 DSH 的文本、工具调用和流式输出转换为 OpenAI Chat Completions 请求,发送到当前服务器的 `/api/llm/chat/completions`。认证使用内存中的 platform 插件会话令牌,不读取本地供应商密钥,也不提供供应商直连降级。
|
|
111
|
-
|
|
112
|
-
供应商地址和真实 API Key 仅配置在 platform 部署环境。缓存只保存配置描述;未登录时,即使有缓存也无法推理。当前适配器先支持文本和工具调用,模型目录读取团队配置中的 `contextWindow` 和 `maxTokens`。只有缺失字段才使用 32K 上下文、4096 输出的兼容值(确保输出不超过上下文)。管理员可在 platform 查询供应商模型列表并补充未提供的能力值;多模态和其他供应商协议后续补齐。
|
|
113
|
-
|
|
114
|
-
按已确认的产品边界,现有本地模型继续独立使用;teamwork 管理的模型和预设全部经 platform,不修改本地模型配置或凭据。
|
|
115
|
-
|
|
116
|
-
## Agent Preset
|
|
117
|
-
|
|
118
|
-
团队预设复用 DSH 原生 `agentPresets` 注册、挂载、选择及 revision 生命周期。管理员在 platform 配置简介、使用说明、输出要求、团队模型引用、增量提示词以及必需/可选工具名称。说明字段供用户阅读;需要模型执行的要求写入 `systemPrompt`。新预设引用同团队 `kind=model` 的配置 ID,旧版内嵌 provider/model 配置继续兼容,不允许两种方式混用。引用模型删除后,客户端不降级到本地模型,网关也拒绝该请求。
|
|
119
|
-
|
|
120
|
-
- `/teamwork info` 显示实际挂载版本;`/teamwork info <id>` 预览最新目录配置,工具检查基于当前会话。
|
|
121
|
-
- 工具按 DSH 注册名称检查,区分已注册、条件可用、缺失、无法检查。工具已注册不意味着已获得执行授权,运行时仍由宿主处理权限与条件。
|
|
122
|
-
- 必需工具缺失/无法检查时,`/teamwork use` 拒绝选择;通过其他原生入口选择的预设,也在每次模型请求前重新检查。可选工具缺失只展示提示。
|
|
123
|
-
- DSH 只允许空白会话切换预设。开始第一轮后或执行中,使用 `/teamwork new <id>` 创建新会话;不在原会话静默改提示词、不清空历史。
|
|
124
|
-
- 同步更新后,已有 Agent 保留 DSH 原生旧 revision,`/teamwork info` 展示新版本;空白会话再次 `/teamwork use` 可更新。
|
|
125
|
-
- 每个会话开始时的团队/预设/版本记录在配置缓存旁的 `<缓存名>.sessions.json`(0600,原子替换),不写进会话日志:DSH 拒绝重新打开日志里含有它不认识的事件类型的会话,而第三方插件写不了它接受的可忽略记录。宿主恢复会话时若重新挂载的版本与记录不一致,阻止继续推理并提示新建会话;当前不保存历史预设定义,不承诺跨重启恢复已删除的旧 revision。没有记录的会话(包括分叉出的新会话)从首次请求开始记录。
|
|
126
|
-
- 预设版本固定不冻结服务端策略:成员权限、模型路由和输出限制仍采用 platform 当前配置。
|
|
127
|
-
|
|
128
|
-
本地定向宿主检查:`DSH_CLI=/path/to/dsh/lib/bin.js pnpm test:presets`,不调用真实模型,不安装测试插件。
|
|
129
|
-
|
|
130
|
-
## 工具清单与插件依赖
|
|
56
|
+
For an existing web process, follow the host's reload/restart instructions.
|
|
57
|
+
Replace `web` with your custom profile name where appropriate.
|
|
131
58
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
-
|
|
136
|
-
|
|
137
|
-
- `/teamwork install` 仍需先查看说明再确认。已有插件的启用、升级和错误诊断交给 DSH 本地插件管理器,团队操作不覆盖它们。安装后刷新插件状态和当前预设必需工具;重启提示不会被误报为已就绪。
|
|
59
|
+
| Requirement | Support |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| Declared DSH range | `>=0.2.2-rc.1 <0.3.0-0` |
|
|
62
|
+
| CI host versions | `0.2.2-rc.1`, `0.2.2-rc.2`, `0.2.2-rc.3` |
|
|
63
|
+
| Node.js | Follow your DSH runtime's requirement; the current RC line requires Node.js 24.9+. Desktop supplies its runtime. |
|
|
138
64
|
|
|
139
|
-
|
|
65
|
+
CI uses Linux and pnpm 9.15.9. Other host and package-manager combinations
|
|
66
|
+
follow their own build-script and installation policies. See
|
|
67
|
+
[installation troubleshooting](docs/en/guide.md#installation-and-updates).
|
|
140
68
|
|
|
141
|
-
|
|
142
|
-
- `/teamwork continue <后续指令>`:在空闲且无待处理输入时,检查模型、权限、预设版本、插件和工具,然后使用 DSH `followup` 发送新的用户消息。原有本地模型不要求 platform 登录。恢复已有会话沿用 DSH 原生入口,不覆盖其保存的模型选择。
|
|
143
|
-
- `/teamwork cancel`:调用 DSH `cancel({kind:'user'}, {keepInbox:true})`,请求取消当前执行,保留待处理输入。取消是请求,不承诺同步停止;用概览确认状态。文件修改不会回滚,历史不会删除。
|
|
144
|
-
- `/teamwork retry`:仅为失败、被阻止、取消、输出截断或意外中断的任务提供确认说明;`/teamwork retry confirm` 在两分钟内提交一次恢复指令,要求先检查已有结果再继续。不是重放工具调用,也不是完全复现原请求;仍可能产生新操作,需要用户明确确认。
|
|
69
|
+
## Start with your team
|
|
145
70
|
|
|
146
|
-
|
|
71
|
+
1. Open **Teamwork** in the DSH sidebar and choose the browser sign-in action.
|
|
72
|
+
2. Sign in to the service and authorize this DSH. Use the displayed fallback
|
|
73
|
+
authorization line if the loopback callback cannot complete.
|
|
74
|
+
3. Select a team and refresh its resources. Create or join a team in the web
|
|
75
|
+
console if you have no membership yet.
|
|
76
|
+
4. Select the team's assistant preset and create a new session. New teams receive
|
|
77
|
+
an assistant named after the team; existing teams are not automatically changed.
|
|
147
78
|
|
|
148
|
-
|
|
79
|
+
Try asking:
|
|
149
80
|
|
|
150
|
-
|
|
81
|
+
> Sync my team's configuration and show my usage for this month.
|
|
151
82
|
|
|
152
|
-
|
|
83
|
+
The assistant may inherit your session's local model. It needs a working model
|
|
84
|
+
to act; inheriting a model does not configure a team gateway route.
|
|
153
85
|
|
|
154
|
-
|
|
155
|
-
2. 在 `main` 的那个提交上打 `v<version>` 并推送。`.github/workflows/publish.yaml` 分两步:`package` 不带 OIDC 权限,检查 tag 指向 `main` 的历史、和版本号一致、提交的 `lib/` 与源码构建一致,再测试并打包;`stage` 在受保护的 `npm-release` 环境里,核对拿到的正是打出来的那个包(SHA-256),关掉生命周期脚本后执行 `npm stage publish`。
|
|
156
|
-
3. 维护者用 `npm stage list` 找到这次暂存,再用 `npm stage approve <stage-id>`(需要 2FA)正式发布。
|
|
86
|
+
## Members and administrators
|
|
157
87
|
|
|
158
|
-
|
|
88
|
+
| Member | Team administrator |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| Read shared resources and personal usage; inspect applicable budgets. | Read authorized team usage and manage team/member/provider budgets. |
|
|
91
|
+
| Submit presets and local plugin packages, including updates. | Review frozen submissions and publish or reject them. |
|
|
92
|
+
| Use published presets and explicitly install approved plugins. | Manage team configuration and prepare historical restorations. |
|
|
159
93
|
|
|
160
|
-
|
|
94
|
+
Mutations use DSH's real approval flow and the server rechecks permissions.
|
|
95
|
+
Enter provider keys and account passwords through the console's secure forms.
|
|
96
|
+
The [user guide](docs/en/guide.md) covers commands, configuration, phone access
|
|
97
|
+
and the distinction between submitted, published, synced and installed.
|
|
161
98
|
|
|
162
|
-
|
|
99
|
+

|
|
163
100
|
|
|
164
|
-
##
|
|
101
|
+
## Service and data
|
|
165
102
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
as local actions, returning a bounded `teamwork/` error code on refusal.
|
|
103
|
+
- The default service is `https://www.dshteamwork.com`. Change it on the
|
|
104
|
+
Teamwork sign-in screen to use a [self-hosted community server](https://github.com/dsh-teamwork/dsh-teamwork-platform).
|
|
105
|
+
- Team-model requests go through your chosen server. Provider keys stay on
|
|
106
|
+
that server; prompts and model context pass through its model gateway.
|
|
107
|
+
- Plugin sign-in tokens stay in host memory. Restarting DSH requires signing
|
|
108
|
+
in again. Configuration caches do not authenticate a session.
|
|
109
|
+
- The hosted phone relay requires the matching App and an online web/desktop
|
|
110
|
+
host. The community server does not provide that relay. Pairing grants
|
|
111
|
+
access to the owner's permitted DSH sessions across teams.
|
|
176
112
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
pairing confirmation states this scope explicitly.
|
|
113
|
+
[Data, phone pairing and recovery details](docs/en/guide.md#data-and-phone-access)
|
|
114
|
+
explain which information is local, which reaches your server, and what the
|
|
115
|
+
paired channel protects.
|
|
181
116
|
|
|
182
|
-
##
|
|
117
|
+
## Help and development
|
|
183
118
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
also pins the desktop public key. Later connections use fresh handshakes and
|
|
189
|
-
saved keys. Missing or changed keys require pairing again, with no plaintext
|
|
190
|
-
fallback. Existing plaintext pairings must be replaced.
|
|
119
|
+
- [User guide](docs/en/guide.md) · [中文使用指南](docs/zh-CN/guide.md)
|
|
120
|
+
- [Developer reference](docs/development.md) — build, host checks, runtime behavior and publishing.
|
|
121
|
+
- [Report an issue](https://github.com/dsh-teamwork/dsh-teamwork/issues) — include DSH/plugin versions, platform, profile type and a redacted error.
|
|
122
|
+
- [Teamwork service](https://www.dshteamwork.com) · [Community server](https://github.com/dsh-teamwork/dsh-teamwork-platform)
|
|
191
123
|
|
|
192
|
-
|
|
193
|
-
key inside Noise. Messages and uploads then bypass Noise and use native
|
|
194
|
-
AES-256-GCM: Node/OpenSSL on desktop and Expo Crypto on mobile. Each opaque
|
|
195
|
-
`data` record authenticates its channel, sending direction and monotonic counter;
|
|
196
|
-
replay, reordering, cipher failure or exhausted key budgets close the channel.
|
|
197
|
-
The small Noise handshake remains JS; application payloads have no JS cipher
|
|
198
|
-
fallback. Upgrade relay and both clients together. Saved verified device keys
|
|
199
|
-
remain valid across this transport change.
|
|
124
|
+
## License
|
|
200
125
|
|
|
201
|
-
|
|
202
|
-
by
|
|
203
|
-
locally saved device roster. The identity seed and account/server-scoped peers
|
|
204
|
-
are atomically saved in `<cache>.phone-keys.json` with restrictive permissions.
|
|
205
|
-
Desktop revocation closes the channel and saves trust removal before calling
|
|
206
|
-
the relay. Phone revocation requires an encrypted desktop acknowledgement; an
|
|
207
|
-
offline desktop must reconnect before it completes.
|
|
208
|
-
|
|
209
|
-
The relay can see public keys, account/device metadata, timing and sizes, but
|
|
210
|
-
cannot read encrypted methods, conversation content, tool data or uploads.
|
|
211
|
-
Generic notifications omit session ids and question types. Local DSH storage
|
|
212
|
-
and the hosted team-model gateway remain separate boundaries: model context
|
|
213
|
-
still passes through that gateway. Update relay, plugin and mobile together.
|
|
214
|
-
|
|
215
|
-
## Phone file attachments
|
|
216
|
-
|
|
217
|
-
Phones query upload limits through `teamwork/configuration`, then use four
|
|
218
|
-
allow-listed calls: `teamwork/uploadStart`, `teamwork/uploadChunk`,
|
|
219
|
-
`teamwork/uploadFinish` and `teamwork/uploadCancel`. Intake passes native
|
|
220
|
-
session admission. Files can be staged while the agent is busy or the model
|
|
221
|
-
is unavailable; readiness is enforced on a new prompt, not on file transfer.
|
|
222
|
-
Phones transfer selected files immediately and submit completed receipts only
|
|
223
|
-
when the member presses Send. Transfer ids and completed receipts are bound to
|
|
224
|
-
the pairing and exact session, and chunks stream with backpressure
|
|
225
|
-
to DSH's authenticated binary upload service. The relay envelope is unchanged.
|
|
226
|
-
|
|
227
|
-
The initial budgets are five files per message, 20 MiB per file, 50 MiB total,
|
|
228
|
-
256 KiB raw chunks, one active transfer per pairing and two per host. Transfers
|
|
229
|
-
expire after 60 seconds idle or five minutes total; completed plugin receipts
|
|
230
|
-
expire after ten minutes. Detach, revocation and cancellation release transfer
|
|
231
|
-
state. The plugin does not delete DSH's stored objects or workspace files.
|
|
232
|
-
|
|
233
|
-
Prompts use native file receipts and stable request ids. An already-accepted
|
|
234
|
-
request may reach native deduplication before the busy/readiness check; new
|
|
235
|
-
work still passes all checks and validates its receipt metadata. This slice
|
|
236
|
-
supports ordinary files, not image input or document extraction. Update the
|
|
237
|
-
mobile app and plugin together. Build output under `lib/` is included.
|
|
238
|
-
|
|
239
|
-
预算由所选团队的服务端计算,插件底栏异步显示当前成员的积分剩余、Token 限额或待核实状态。切换资源团队不会改变正在使用的会话模型;模型和上游的其他限制仍由网关在请求时检查。读取失败显示“预算暂不可用”,不影响配置列表和同步。
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
## Team assistant and reviewed sharing
|
|
243
|
-
|
|
244
|
-
New teams receive a built-in assistant that can inherit a local/session model.
|
|
245
|
-
The assistant's tools bind operations to its active team, reuse server permissions,
|
|
246
|
-
and require real host approval for mutations. They cover sync, configuration,
|
|
247
|
-
usage/budgets, preset submissions, local plugin preparation/upload, review and
|
|
248
|
-
historical restoration. Provider keys and account passwords use secure console forms.
|
|
249
|
-
|
|
250
|
-
Members can submit new or updated presets/plugins on the platform's sharing page;
|
|
251
|
-
administrators approve frozen revisions. Publication does not install a plugin.
|
|
252
|
-
Private archives are downloaded through host authentication, verified by SHA-256,
|
|
253
|
-
and installed disabled before the normal conflict checks and activation. Existing
|
|
254
|
-
local installations remain protected; upgrades use the local plugin manager.
|
|
255
|
-
|
|
256
|
-
Pinned preset dependencies survive catalog updates through historical plugin
|
|
257
|
-
metadata. Use `/teamwork install <configId>@<version>` for an exact retained pin.
|
|
258
|
-
The platform's history page supports comparison, backup export and restoration
|
|
259
|
-
as a new reviewed publication. Existing conversations retain their preset version.
|
|
260
|
-
|
|
261
|
-
Run `pnpm test:assistant` with `DSH_CLI` set as in the host-test instructions.
|
|
262
|
-
It verifies model inheritance, team-bound tools, denied approval, authenticated
|
|
263
|
-
archive download and real local-archive installation. Host tests isolate their
|
|
264
|
-
package stores so an earlier fixture cannot satisfy the download check.
|
|
126
|
+
[Apache License 2.0](LICENSE). The DSH Teamwork name and whale mark are covered
|
|
127
|
+
by [NOTICE](NOTICE); a fork uses its own branding.
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<p align="center"><img src="https://raw.githubusercontent.com/dsh-teamwork/dsh-teamwork/main/assets/readme/icon-256.png" width="72" height="72" alt="DSH Teamwork"></p>
|
|
2
|
+
|
|
3
|
+
# DSH Teamwork
|
|
4
|
+
|
|
5
|
+
[English](README.md) · 简体中文
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@dsh-teamwork/dsh-teamwork)
|
|
8
|
+
[](https://github.com/dsh-teamwork/dsh-teamwork/actions/workflows/ci.yml)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
|
|
11
|
+
**把团队共享模型、预设和审批后的插件带入 DSH,通过团队助理完成日常协作与管理。**
|
|
12
|
+
|
|
13
|
+
将 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 连接到
|
|
14
|
+
[DSH Teamwork](https://www.dshteamwork.com) 或团队自建服务器。团队配置发布一次,成员同步到各自的 DSH;团队助理可在对话中协助分享资源、查看使用量和管理团队。
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
插件面板目前使用简体中文;网页控制台支持英文和简体中文。截图均来自本地演示团队。
|
|
19
|
+
|
|
20
|
+
## 可以做什么
|
|
21
|
+
|
|
22
|
+
| 能力 | 为团队带来的功能 |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| 共享模型与预设 | 同步团队资源,使用 DSH 原生智能体预设创建会话。 |
|
|
25
|
+
| 团队助理 | 查询配置、个人使用量和适用预算;管理员可执行获授权的团队管理操作。 |
|
|
26
|
+
| 分享与审批 | 准备本地插件包,提交新插件、预设及更新,交由管理员审批。 |
|
|
27
|
+
| 版本历史 | 查看发布记录、导出资源备份,准备经审批的历史恢复。 |
|
|
28
|
+
| 团队治理 | 通过连接的团队服务管理配置、预算和审批。 |
|
|
29
|
+
| 手机连接 | 配合托管服务中转和匹配的 Teamwork App,将手机在线配对到正在运行的 DSH 电脑。 |
|
|
30
|
+
|
|
31
|
+
资源在所选团队内部分享。发布后团队成员可以使用;发布不会自动在成员电脑上安装代码。
|
|
32
|
+
|
|
33
|
+
## 安装
|
|
34
|
+
|
|
35
|
+
**DSH 桌面版:**在应用中打开 **Plugins → Add plugin(插件 → 添加插件)**,输入以下包名,安装并启用。若提示重启,按提示操作。
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
@dsh-teamwork/dsh-teamwork
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
桌面版由应用管理自己的 profile。安装和更新都从应用内操作;CLI 中的 `web` 属于另一个 profile。
|
|
42
|
+
|
|
43
|
+
**DSH CLI/网页版:**安装到实际使用的 profile:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
dsh plugin --profile web add @dsh-teamwork/dsh-teamwork
|
|
47
|
+
dsh web
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
如果 web 进程已经启动,遵循宿主的重新加载/重启提示。使用自定义 profile 时,将 `web` 换成对应名称。
|
|
51
|
+
|
|
52
|
+
| 要求 | 支持范围 |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| 声明的 DSH 兼容范围 | `>=0.2.2-rc.1 <0.3.0-0` |
|
|
55
|
+
| CI 宿主版本 | `0.2.2-rc.1`、`0.2.2-rc.2`、`0.2.2-rc.3` |
|
|
56
|
+
| Node.js | 以 DSH 宿主要求为准;当前 RC 系列要求 Node.js 24.9+。桌面版提供自己的运行时。 |
|
|
57
|
+
|
|
58
|
+
CI 使用 Linux 和 pnpm 9.15.9。其他宿主、包管理器组合仍遵循各自的构建脚本及安装策略,详见[安装与更新排查](docs/zh-CN/guide.md#安装与更新)。
|
|
59
|
+
|
|
60
|
+
## 开始使用
|
|
61
|
+
|
|
62
|
+
1. 在 DSH 侧栏打开 **Teamwork**,选择“在浏览器中登录”。
|
|
63
|
+
2. 在团队服务中登录并授权这台 DSH。若本机回传未完成,粘贴网页显示的备用授权行。
|
|
64
|
+
3. 选择团队并刷新资源。如果还没有团队成员身份,先在网页控制台创建或加入团队。
|
|
65
|
+
4. 选择团队助理预设并新建会话。新团队会获得以团队名命名的助理;已有团队不会被自动补建。
|
|
66
|
+
|
|
67
|
+
可以先问:
|
|
68
|
+
|
|
69
|
+
> 同步团队配置,并查看我本月的使用量。
|
|
70
|
+
|
|
71
|
+
助理可以继承当前会话的本地模型。它需要一个可用模型才能执行任务;继承模型不等于建立团队模型网关路由。
|
|
72
|
+
|
|
73
|
+
## 成员与管理员
|
|
74
|
+
|
|
75
|
+
| 成员 | 团队管理员 |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| 查看共享资源、自己的使用量及适用预算。 | 查看获授权的团队使用量,管理团队、成员和供应商预算。 |
|
|
78
|
+
| 提交预设和本地插件包,包括更新。 | 审核冻结后的提交内容,发布或拒绝。 |
|
|
79
|
+
| 使用已发布预设,明确确认后安装插件。 | 管理团队配置,准备历史版本恢复。 |
|
|
80
|
+
|
|
81
|
+
修改操作使用 DSH 的真实审批流程,服务端会重新检查权限。供应商密钥和账号密码通过网页安全表单输入。
|
|
82
|
+
[使用指南](docs/zh-CN/guide.md)说明了命令、配置、手机连接,以及“已提交、已发布、已同步、已安装”的区别。
|
|
83
|
+
|
|
84
|
+

|
|
85
|
+
|
|
86
|
+
## 服务与数据
|
|
87
|
+
|
|
88
|
+
- 默认连接 `https://www.dshteamwork.com`。可在 Teamwork 登录页切换到[自建社区版服务器](https://github.com/dsh-teamwork/dsh-teamwork-platform)。
|
|
89
|
+
- 团队模型请求经过所选服务器。供应商密钥保留在服务端;提示词和模型上下文经过其模型网关。
|
|
90
|
+
- 插件登录令牌只保留在宿主内存中,重启后需要重新登录。配置缓存不能代替登录。
|
|
91
|
+
- 手机连接需要托管中转、匹配的 App 和在线的 web/桌面宿主;社区版不提供该中转。配对允许访问账号在这台 DSH 上有权限的个人与各团队会话。
|
|
92
|
+
|
|
93
|
+
[数据、手机配对和恢复说明](docs/zh-CN/guide.md#数据与手机连接)列出了本地信息、发往服务器的信息和配对通道的保护范围。
|
|
94
|
+
|
|
95
|
+
## 帮助与开发
|
|
96
|
+
|
|
97
|
+
- [中文使用指南](docs/zh-CN/guide.md) · [English guide](docs/en/guide.md)
|
|
98
|
+
- [开发参考](docs/development.md)(英文):构建、真实宿主检查、运行机制及发布。
|
|
99
|
+
- [提交问题](https://github.com/dsh-teamwork/dsh-teamwork/issues):附上 DSH/插件版本、系统、profile 类型及脱敏错误。
|
|
100
|
+
- [Teamwork 服务](https://www.dshteamwork.com) · [社区版服务器](https://github.com/dsh-teamwork/dsh-teamwork-platform)
|
|
101
|
+
|
|
102
|
+
## 许可证
|
|
103
|
+
|
|
104
|
+
[Apache License 2.0](LICENSE)。DSH Teamwork 名称和鲸鱼标识另受 [NOTICE](NOTICE) 约束,分叉项目应使用自己的品牌。
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Documentation
|
|
2
|
+
|
|
3
|
+
Start with the [English README](../README.md) or [Chinese README](../README.zh-CN.md).
|
|
4
|
+
|
|
5
|
+
- [User guide](en/guide.md) — setup, commands, sharing, phone access and troubleshooting.
|
|
6
|
+
- [Chinese user guide](zh-CN/guide.md) — the same user workflows in Simplified Chinese.
|
|
7
|
+
- [Developer reference](development.md) — architecture, building, host checks and publishing.
|