dsh-agent-crew-agents-ui 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.i18n.yaml +55 -0
- package/README.md +138 -2
- package/README.zh.md +139 -0
- package/lib/client.js +4559 -0
- package/lib/index.js +6 -0
- package/lib/types/client/CrewConnections.d.ts +31 -0
- package/lib/types/client/CrewHeader.d.ts +40 -0
- package/lib/types/client/CrewLearning.d.ts +21 -0
- package/lib/types/client/CrewPanel.d.ts +41 -0
- package/lib/types/client/CrewSection.d.ts +42 -0
- package/lib/types/client/CrewSlack.d.ts +26 -0
- package/lib/types/client/CrewTab.d.ts +15 -0
- package/lib/types/client/MemberEditor.d.ts +35 -0
- package/lib/types/client/MemberFace.d.ts +20 -0
- package/lib/types/client/SecretField.d.ts +14 -0
- package/lib/types/client/connections.d.ts +70 -0
- package/lib/types/client/crew-roster.d.ts +142 -0
- package/lib/types/client/gallery.d.ts +32 -0
- package/lib/types/client/index.d.ts +28 -0
- package/lib/types/client/learning.d.ts +42 -0
- package/lib/types/client/locales.d.ts +169 -0
- package/lib/types/faces.d.ts +6 -0
- package/lib/types/index.d.ts +4 -0
- package/lib/types/roster.d.ts +64 -0
- package/locale/de.json +6 -0
- package/locale/en.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +74 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tushar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
|
|
2
|
+
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
+
# After editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write packages/experimental/crew-agents-ui/README.md
|
|
5
|
+
/:
|
|
6
|
+
en: ca93de121087ffd9
|
|
7
|
+
zh: 7431cbe5f89d64c6
|
|
8
|
+
/deepseek-ai-dsh-crew-agents-ui:
|
|
9
|
+
en: c54dfe8c6a384a6c
|
|
10
|
+
zh: 1a86c86aecfee1ee
|
|
11
|
+
/deepseek-ai-dsh-crew-agents-ui/summary:
|
|
12
|
+
en: ff748aaa597909c6
|
|
13
|
+
zh: 8495b25f541a455b
|
|
14
|
+
/deepseek-ai-dsh-crew-agents-ui/table-of-contents:
|
|
15
|
+
en: d152484eb41ac6b4
|
|
16
|
+
zh: b00dddf4c88f0a45
|
|
17
|
+
/deepseek-ai-dsh-crew-agents-ui/use-this-package:
|
|
18
|
+
en: c8d334c9bb184861
|
|
19
|
+
zh: 9b8e9a62cdfad213
|
|
20
|
+
/deepseek-ai-dsh-crew-agents-ui/use-this-package/faces:
|
|
21
|
+
en: 311415406e0bf546
|
|
22
|
+
zh: 61db2a342548d5a3
|
|
23
|
+
/deepseek-ai-dsh-crew-agents-ui/use-this-package/crew-section-and-chat-header:
|
|
24
|
+
en: faeabf6dcacff32f
|
|
25
|
+
zh: 437055b7e14c14bd
|
|
26
|
+
/deepseek-ai-dsh-crew-agents-ui/use-this-package/connections:
|
|
27
|
+
en: 8b15d590e29c95f3
|
|
28
|
+
zh: 4e4b99c406cf987b
|
|
29
|
+
/deepseek-ai-dsh-crew-agents-ui/use-this-package/crew-tab:
|
|
30
|
+
en: 9a343abd9a741aac
|
|
31
|
+
zh: b940c7289e2440da
|
|
32
|
+
/deepseek-ai-dsh-crew-agents-ui/use-this-package/slack:
|
|
33
|
+
en: 2805935f7dbefe46
|
|
34
|
+
zh: e47abe359a48c372
|
|
35
|
+
/deepseek-ai-dsh-crew-agents-ui/use-this-package/learning:
|
|
36
|
+
en: f3a1d3fd0fc577d2
|
|
37
|
+
zh: c37ed03066b73fbe
|
|
38
|
+
/deepseek-ai-dsh-crew-agents-ui/understand-the-implementation:
|
|
39
|
+
en: 11ee4af1c13e00c2
|
|
40
|
+
zh: 413f0c51621e2fbe
|
|
41
|
+
/deepseek-ai-dsh-crew-agents-ui/further-exploration:
|
|
42
|
+
en: bd596b904b00e26f
|
|
43
|
+
zh: e287ad7c80c62e5a
|
|
44
|
+
/deepseek-ai-dsh-crew-agents-ui/model-experience:
|
|
45
|
+
en: e61e7f70df03f64a
|
|
46
|
+
zh: 8c5e7126756baab7
|
|
47
|
+
/deepseek-ai-dsh-crew-agents-ui/model-experience/kv-cache-effect:
|
|
48
|
+
en: ca75c51c89c2c9b0
|
|
49
|
+
zh: 477b768cc9dcda1a
|
|
50
|
+
/deepseek-ai-dsh-crew-agents-ui/known-limitations-and-deferred-work:
|
|
51
|
+
en: dff772cd83c6a131
|
|
52
|
+
zh: 1b06a5826e376632
|
|
53
|
+
/deepseek-ai-dsh-crew-agents-ui/known-limitations-and-deferred-work/dev-note:
|
|
54
|
+
en: e67f633dc6fe7773
|
|
55
|
+
zh: bd8a8936229e035e
|
package/README.md
CHANGED
|
@@ -1,3 +1,139 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: "Browser roster of the crew: each member's name, face and live status, a Session start, and adding, editing and removing members, shared with other crew plugins."
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# dsh-agent-crew-agents-ui
|
|
7
|
+
|
|
8
|
+
English | [中文](README.zh.md)
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
This client plugin provides `ctx.crew`: the crew members stored by [crew-roster](../crew-roster/README.md), with their faces, names and live status (working, needs you or idle) folded from the Session list and Session status, plus a way to start a Session with a member. It draws a **Crew** section above the workspaces, a badge in the chat header of crew Sessions, and a **Crew** tab in the right panel where you add, edit and remove members.
|
|
13
|
+
|
|
14
|
+
## Table of Contents
|
|
15
|
+
|
|
16
|
+
- [Use this package](#use-this-package)
|
|
17
|
+
- [Understand the implementation](#understand-the-implementation)
|
|
18
|
+
- [Further Exploration](#further-exploration)
|
|
19
|
+
- [Model Experience](#model-experience)
|
|
20
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
21
|
+
- [Dev Note](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## Use this package
|
|
27
|
+
|
|
28
|
+
The [crew-agents](../crew-agents/README.md) bundle mounts this row. A browser plugin injects `crew` and reads:
|
|
29
|
+
|
|
30
|
+
| Member | Meaning |
|
|
31
|
+
|---|---|
|
|
32
|
+
| `members` | Observable roster: `{ id, name, face, status, sessions, open, home, focus }` per member, in roster order |
|
|
33
|
+
| `name(id)` | Member name, translated for a shipped member until it is renamed |
|
|
34
|
+
| `design(id)` | Member face, or undefined for an id not on the roster |
|
|
35
|
+
| `statusLabel(state)` | Localized `Working`, `Needs you` or `Idle` |
|
|
36
|
+
| `openChat(id)` | Open the member's focus Session, creating its own chat outside any workspace when it has none |
|
|
37
|
+
| `startInWorkspace(id, workspaceId)` | Start a new chat with the member in a workspace |
|
|
38
|
+
| `roster`, `refresh()` | The stored member records and connection choices from [crew-roster](../crew-roster/README.md), and a re-read |
|
|
39
|
+
| `save(member)`, `remove(id)` | Add (empty id), update or remove a member; each resolves the outcome or the message to show |
|
|
40
|
+
| `requestEdit(id)` | Ask the Crew tab to open the editor for a member, or for a new one with `''` |
|
|
41
|
+
|
|
42
|
+
Draw a member with `ctx.crewFaces.Face` from [crew-faces](../crew-faces/README.md), passing the member id as `agentId`, its `face` as `design`, and `mood="working"` while its status is `working`.
|
|
43
|
+
|
|
44
|
+
### Faces
|
|
45
|
+
|
|
46
|
+
| Member | Body | Colour |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| Chief of staff | orb | `#0B0B0C`, with white eyes |
|
|
49
|
+
| Mail | block | `#E8B4A0` |
|
|
50
|
+
| Chat | bean | `#C9B6E4` |
|
|
51
|
+
| Code | drop | `#4D6BFE` |
|
|
52
|
+
| Research | orb | `#A8C7A1` |
|
|
53
|
+
| Life | bean | `#F2D16B` |
|
|
54
|
+
|
|
55
|
+
Each member's face is part of its record and can be changed in the editor; the table lists the shipped faces. A member's eyes move up and right while it works.
|
|
56
|
+
|
|
57
|
+
### Crew section and chat header
|
|
58
|
+
|
|
59
|
+
The section uses the `sidebar.sections` slot and lists every member, idle ones included, with a status chip while it works or needs you. Each member has its own chat: a Session outside any workspace, running in the member's folder that [crew-connections](../crew-connections/README.md) provides, and created the first time it is opened. A row opens the Session waiting on you, else one running, else the member's own chat. The **⋯** menu opens the own chat, starts a new chat with the member in any workspace, or opens **Edit member**; the **+** beside the heading adds a member. Both open the editor in the Crew tab. The collapsed rail shows the faces alone, each still named for assistive technology and in its tooltip.
|
|
60
|
+
|
|
61
|
+
The badge uses `conversation.session.header.actions`. It shows the member a Session runs, then the faces of the crew members the Session handed work to, read from its subagent catalog: those that need you first, then those working, whose eyes move, then those done, dimmed. More than four collapse into a count. It appears when a Session runs a crew member or has handed work to one.
|
|
62
|
+
|
|
63
|
+
### Connections
|
|
64
|
+
|
|
65
|
+
Below the roster, the Crew tab lists the crew's MCP connections, who uses each and its state in words. Google takes an OAuth client id and secret, then **Sign in with Google** opens Google's consent page; GitHub takes a token. Secrets go to the Host credential store and are never shown back: a stored one reads as stored and can be replaced or removed. Keyless servers read **No account needed**, and servers waiting for your approval read **Off until you approve it**.
|
|
66
|
+
|
|
67
|
+
### Crew tab
|
|
68
|
+
|
|
69
|
+
Open **Crew** from the right panel's guide in any Session. Each row shows the member's face, name, status in words (Working, Needs you or Idle), its Session count and a **New session** button that starts a Session with that member's preset.
|
|
70
|
+
|
|
71
|
+
**Edit** on a row and **Add crew member** below the list open the editor: name, what the member does (the Chief of staff reads it when choosing whom to ask), instructions, tool calls per message (0 for no limit), face shape and colour, file access, commands, web pages, scheduled tasks and connections. Connections whose account you have not approved are shown switched off. The Chief of staff can be renamed and re-instructed but not removed, and its tools are fixed. **Remove** asks once more; past chats stay. Saving takes effect for new chats; running chats keep the setup they started with.
|
|
72
|
+
|
|
73
|
+
### Slack
|
|
74
|
+
|
|
75
|
+
Below the connections, the **Slack** card stores the Slack app's tokens and your member id for [crew-slack](../crew-slack/README.md), shows whether it is connected, and lists replies waiting for you. Each reply can be edited, then posted with **Post reply** or dropped with **Discard**; the list re-reads every 5 seconds while open.
|
|
76
|
+
|
|
77
|
+
### Learning
|
|
78
|
+
|
|
79
|
+
Between the roster and the connections, the **Learning** list shows lessons crew members propose through [crew-improve](../crew-improve/README.md). Each proposal names its member, the lesson, the quoted evidence, whether it came from a rating or a chat and when, and the lesson it would replace; **Approve** and **Reject** decide it. Approved lessons are listed with their approval time and a **Remove** button. The list re-reads every 30 seconds while open; nothing changes without a click.
|
|
80
|
+
|
|
81
|
+
-----
|
|
82
|
+
|
|
83
|
+
<a id="understand-the-implementation"></a>
|
|
84
|
+
## Understand the implementation
|
|
85
|
+
|
|
86
|
+
<details>
|
|
87
|
+
<summary>Implementation internals — click to expand</summary>
|
|
88
|
+
|
|
89
|
+
A Session belongs to a member when its listed `agentPreset` projection value equals the member's preset id. A member is `needs-you` while any of its Sessions has a pending interaction, such as an unanswered question or approval, else `working` while any runs, else `idle`. Live running state from `uiSession.sessionStatus` takes precedence over the list's running flag. The roster snapshot keeps its identity until a member's status or Session list changes, so React selectors re-render only on real changes.
|
|
90
|
+
|
|
91
|
+
| Source | Contents |
|
|
92
|
+
|---|---|
|
|
93
|
+
| [`src/roster.ts`](src/roster.ts) | The status fold |
|
|
94
|
+
| [`src/client/index.ts`](src/client/index.ts) | Registrations |
|
|
95
|
+
| [`src/client/crew-roster.ts`](src/client/crew-roster.ts) | `ctx.crew` service and chat opening |
|
|
96
|
+
| [`src/client/CrewPanel.tsx`](src/client/CrewPanel.tsx), [`src/client/MemberEditor.tsx`](src/client/MemberEditor.tsx) | Crew tab and member editor |
|
|
97
|
+
| [`src/client/CrewSection.tsx`](src/client/CrewSection.tsx) | Sidebar section |
|
|
98
|
+
| [`src/client/CrewLearning.tsx`](src/client/CrewLearning.tsx), [`src/client/learning.ts`](src/client/learning.ts) | Learning list and its store |
|
|
99
|
+
| [`src/client/CrewHeader.tsx`](src/client/CrewHeader.tsx) | Chat header badge |
|
|
100
|
+
| [`src/client/locales.ts`](src/client/locales.ts) | Names, status labels and tab copy |
|
|
101
|
+
| [`tests/`](tests/) | Fold and service tests |
|
|
102
|
+
|
|
103
|
+
</details>
|
|
104
|
+
|
|
105
|
+
-----
|
|
106
|
+
|
|
107
|
+
<a id="further-exploration"></a>
|
|
108
|
+
## Further Exploration
|
|
109
|
+
|
|
110
|
+
- [crew-roster](../crew-roster/README.md) — stored members and their presets.
|
|
111
|
+
- [crew-agents](../crew-agents/README.md) — the bundle.
|
|
112
|
+
- [crew-faces](../crew-faces/README.md) — member faces.
|
|
113
|
+
- [ui-session](../../client/ui-session/README.md) — the Session status source.
|
|
114
|
+
|
|
115
|
+
<a id="model-experience"></a>
|
|
116
|
+
## Model Experience
|
|
117
|
+
|
|
118
|
+
None, as the package is a browser-side roster that registers nothing model-facing.
|
|
119
|
+
|
|
120
|
+
#### KV Cache effect
|
|
121
|
+
|
|
122
|
+
None; this package neither assembles nor sends a provider request.
|
|
123
|
+
|
|
124
|
+
## Known Limitations and Deferred Work
|
|
125
|
+
|
|
126
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
127
|
+
|
|
128
|
+
- Only Sessions in the browser's Session list count; a delegated child the list does not retain does not change its member's status.
|
|
129
|
+
- The roster is read again when the window regains focus, so a change made in another window or on another device shows once you switch back.
|
|
130
|
+
|
|
131
|
+
<a id="dev-note"></a>
|
|
132
|
+
### Dev Note
|
|
133
|
+
|
|
134
|
+
<details>
|
|
135
|
+
<summary>Working context for maintainers — click to expand</summary>
|
|
136
|
+
|
|
137
|
+
None.
|
|
138
|
+
|
|
139
|
+
</details>
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Crew 的浏览器端名册:每位成员的名称、头像和实时状态、Session 启动,以及添加、编辑和移除成员,供其他 crew 插件共用。"
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# dsh-agent-crew-agents-ui
|
|
7
|
+
|
|
8
|
+
[English](README.md) | 中文
|
|
9
|
+
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
本客户端插件提供 `ctx.crew`:由 [crew-roster](../crew-roster/README.zh.md) 存储的 crew 成员,及其头像、名称和由 Session 列表与 Session 状态汇总的实时状态(工作中、需要你或空闲),并提供与成员新建 Session 的方法。它在 Workspace 上方绘制 **Crew** 区块,在 crew Session 的聊天标题中显示徽标,并在右侧面板提供 **Crew** 标签页,可在其中添加、编辑和移除成员。
|
|
13
|
+
|
|
14
|
+
## 目录
|
|
15
|
+
|
|
16
|
+
- [使用本包](#use-this-package)
|
|
17
|
+
- [实现原理](#understand-the-implementation)
|
|
18
|
+
- [延伸阅读](#further-exploration)
|
|
19
|
+
- [模型体验](#model-experience)
|
|
20
|
+
- [已知限制与后续工作](#known-limitations-and-deferred-work)
|
|
21
|
+
- [开发备注](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## 使用本包
|
|
27
|
+
|
|
28
|
+
[crew-agents](../crew-agents/README.zh.md) bundle 挂载此行。浏览器插件注入 `crew` 并读取:
|
|
29
|
+
|
|
30
|
+
| 成员 | 含义 |
|
|
31
|
+
|---|---|
|
|
32
|
+
| `members` | 可观察的名册:每位成员的 `{ id, name, face, status, sessions, open, home, focus }`,按名册顺序 |
|
|
33
|
+
| `name(id)` | 成员名称;随附成员在改名前显示翻译后的名称 |
|
|
34
|
+
| `design(id)` | 成员头像;不在名册中的 ID 返回 undefined |
|
|
35
|
+
| `statusLabel(state)` | 本地化的“工作中”“需要你”或“空闲” |
|
|
36
|
+
| `openChat(id)` | 打开该成员的焦点 Session,若没有则创建其不属于任何 Workspace 的对话 |
|
|
37
|
+
| `startInWorkspace(id, workspaceId)` | 在某个 Workspace 中与该成员新建对话 |
|
|
38
|
+
| `roster`、`refresh()` | 来自 [crew-roster](../crew-roster/README.zh.md) 的成员记录与可选连接,以及重新读取 |
|
|
39
|
+
| `save(member)`、`remove(id)` | 添加(空 ID)、更新或移除成员;各自返回结果或要显示的消息 |
|
|
40
|
+
| `requestEdit(id)` | 请求 Crew 标签页打开某位成员的编辑器,传入 `''` 则新建成员 |
|
|
41
|
+
|
|
42
|
+
使用 [crew-faces](../crew-faces/README.zh.md) 的 `ctx.crewFaces.Face` 绘制成员,把成员 ID 作为 `agentId`、其 `face` 作为 `design` 传入,状态为 `working` 时传入 `mood="working"`。
|
|
43
|
+
|
|
44
|
+
### 头像
|
|
45
|
+
|
|
46
|
+
| 成员 | 身体 | 颜色 |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| 幕僚长 | orb | `#0B0B0C`,白色眼睛 |
|
|
49
|
+
| 邮件 | block | `#E8B4A0` |
|
|
50
|
+
| 聊天 | bean | `#C9B6E4` |
|
|
51
|
+
| 代码 | drop | `#4D6BFE` |
|
|
52
|
+
| 研究 | orb | `#A8C7A1` |
|
|
53
|
+
| 生活 | bean | `#F2D16B` |
|
|
54
|
+
|
|
55
|
+
每位成员的头像是其记录的一部分,可在编辑器中修改;下表列出随附的头像。成员工作时眼睛向右上方移动。
|
|
56
|
+
|
|
57
|
+
### Crew 区块与聊天标题
|
|
58
|
+
|
|
59
|
+
区块使用 `sidebar.sections` 插槽,列出所有成员(包括空闲成员),成员工作中或需要你时显示状态标签。每位成员都有自己的对话:一个不属于任何 Workspace 的 Session,运行在 [crew-connections](../crew-connections/README.zh.md) 提供的成员文件夹中,首次打开时创建。点击一行会打开等待你的 Session,其次是正在运行的,否则是该成员自己的对话。**⋯** 菜单可打开其自己的对话、在任意 Workspace 中与该成员新建对话,或打开 **编辑成员**;标题旁的 **+** 用于添加成员。两者都会在 Crew 标签页中打开编辑器。折叠的轨道只显示头像,但仍为辅助技术和提示提供名称。
|
|
60
|
+
|
|
61
|
+
徽标使用 `conversation.session.header.actions`。它显示 Session 运行的成员,以及从其子智能体目录读取的、该 Session 交付了工作的 crew 成员头像:先显示需要你处理的,再显示工作中的(眼睛会移动),最后显示已完成的(变暗)。超过四位时折叠为计数。当 Session 运行某位 crew 成员或已把工作交给某位成员时显示。
|
|
62
|
+
|
|
63
|
+
### 连接
|
|
64
|
+
|
|
65
|
+
在名册下方,Crew 标签页列出 crew 的 MCP 连接、各自的使用者以及文字状态。Google 需要 OAuth 客户端 ID 和密钥,然后 **使用 Google 登录** 打开 Google 的同意页面;GitHub 需要一个令牌。机密发送到 Host 凭据存储,从不回显:已保存的显示为已保存,可以替换或移除。无需密钥的服务器显示 **无需账户**,等待你批准的服务器显示 **在你批准前保持关闭**。
|
|
66
|
+
|
|
67
|
+
### Crew 标签页
|
|
68
|
+
|
|
69
|
+
在任意 Session 中从右侧面板的引导页打开 **Crew**。每行显示成员的头像、名称、文字状态(工作中、需要你或空闲)、Session 数量和一个 **新建会话** 按钮,用该成员的预设新建 Session。
|
|
70
|
+
|
|
71
|
+
行上的 **编辑** 和列表下方的 **添加 crew 成员** 会打开编辑器:名称、负责的工作(幕僚长据此决定把工作交给谁)、说明、每条消息的工具调用次数(0 表示不限)、头像形状和颜色、文件访问、运行命令、获取网页、定时任务和连接。尚未批准账号的连接显示为关闭。幕僚长可以改名和修改说明,但不能移除,其工具也固定不变。**移除** 会再确认一次,过往对话会保留。保存后对新对话生效;正在运行的对话保持其启动时的设置。
|
|
72
|
+
|
|
73
|
+
### Slack
|
|
74
|
+
|
|
75
|
+
在连接下方,**Slack** 卡片为 [crew-slack](../crew-slack/README.zh.md) 保存 Slack 应用的令牌和你的成员 id,显示是否已连接,并列出等待你处理的回复。每条回复可以先编辑,再用 **发布回复** 发布或用 **舍弃** 丢弃;卡片打开时每 5 秒重新读取一次。
|
|
76
|
+
|
|
77
|
+
### 学习
|
|
78
|
+
|
|
79
|
+
在名册和连接之间,**学习** 列表显示 crew 成员通过 [crew-improve](../crew-improve/README.zh.md) 提出的经验。每条提议显示其成员、经验内容、引用的依据、来自评分还是对话及时间,以及将被替换的经验;用 **批准** 和 **拒绝** 处理。已批准的经验列出批准时间和 **移除** 按钮。列表打开时每 30 秒重新读取一次;不点击就不会有任何更改。
|
|
80
|
+
|
|
81
|
+
-----
|
|
82
|
+
|
|
83
|
+
<a id="understand-the-implementation"></a>
|
|
84
|
+
## 实现原理
|
|
85
|
+
|
|
86
|
+
<details>
|
|
87
|
+
<summary>实现细节——点击展开</summary>
|
|
88
|
+
|
|
89
|
+
当 Session 列表中的 `agentPreset` 投影值等于成员的预设 ID 时,该 Session 属于此成员。只要成员的任一 Session 有待处理交互(如未回答的问题或审批),成员即为 `needs-you`;否则只要任一 Session 在运行即为 `working`;否则为 `idle`。`uiSession.sessionStatus` 的实时运行状态优先于列表的运行标记。名册快照在成员状态或 Session 列表变化前保持同一引用,因此 React 选择器只在真正变化时重新渲染。
|
|
90
|
+
|
|
91
|
+
| 源文件 | 内容 |
|
|
92
|
+
|---|---|
|
|
93
|
+
| [`src/roster.ts`](src/roster.ts) | 状态汇总 |
|
|
94
|
+
| [`src/client/index.ts`](src/client/index.ts) | 注册 |
|
|
95
|
+
| [`src/client/crew-roster.ts`](src/client/crew-roster.ts) | `ctx.crew` 服务与打开对话 |
|
|
96
|
+
| [`src/client/CrewPanel.tsx`](src/client/CrewPanel.tsx)、[`src/client/MemberEditor.tsx`](src/client/MemberEditor.tsx) | Crew 标签页与成员编辑器 |
|
|
97
|
+
| [`src/client/CrewSection.tsx`](src/client/CrewSection.tsx) | 侧边栏区块 |
|
|
98
|
+
| [`src/client/CrewLearning.tsx`](src/client/CrewLearning.tsx)、[`src/client/learning.ts`](src/client/learning.ts) | 学习列表及其存储 |
|
|
99
|
+
| [`src/client/CrewHeader.tsx`](src/client/CrewHeader.tsx) | 聊天标题徽标 |
|
|
100
|
+
| [`src/client/locales.ts`](src/client/locales.ts) | 名称、状态标签与标签页文案 |
|
|
101
|
+
| [`tests/`](tests/) | 汇总与服务测试 |
|
|
102
|
+
|
|
103
|
+
</details>
|
|
104
|
+
|
|
105
|
+
-----
|
|
106
|
+
|
|
107
|
+
<a id="further-exploration"></a>
|
|
108
|
+
## 延伸阅读
|
|
109
|
+
|
|
110
|
+
- [crew-roster](../crew-roster/README.zh.md) — 存储的成员及其预设。
|
|
111
|
+
- [crew-agents](../crew-agents/README.zh.md) — bundle。
|
|
112
|
+
- [crew-faces](../crew-faces/README.zh.md) — 成员头像。
|
|
113
|
+
- [ui-session](../../client/ui-session/README.zh.md) — Session 状态来源。
|
|
114
|
+
|
|
115
|
+
<a id="model-experience"></a>
|
|
116
|
+
## 模型体验
|
|
117
|
+
|
|
118
|
+
无,本包是浏览器端名册,不注册任何面向模型的内容。
|
|
119
|
+
|
|
120
|
+
#### KV Cache 影响
|
|
121
|
+
|
|
122
|
+
无;本包既不组装也不发送模型提供方请求。
|
|
123
|
+
|
|
124
|
+
## 已知限制与后续工作
|
|
125
|
+
|
|
126
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
127
|
+
|
|
128
|
+
- 只计入浏览器 Session 列表中的 Session;列表未保留的委派子智能体不会改变其成员的状态。
|
|
129
|
+
- 窗口重新获得焦点时会重新读取名册,因此在其他窗口或设备上的修改会在切回后显示。
|
|
130
|
+
|
|
131
|
+
<a id="dev-note"></a>
|
|
132
|
+
### 开发备注
|
|
133
|
+
|
|
134
|
+
<details>
|
|
135
|
+
<summary>维护者工作背景——点击展开</summary>
|
|
136
|
+
|
|
137
|
+
无。
|
|
138
|
+
|
|
139
|
+
</details>
|