@fish-under-sea/dsh-agent-teams-fish 2.0.1 → 2.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/README.en.md +8 -7
- package/README.md +8 -7
- package/compatibility.json +90 -82
- package/cordis.patch.yml +5 -0
- package/lib/capabilities.js +6 -1
- package/lib/client/AgentTeamToggle.js +54 -0
- package/lib/client/index.js +10 -0
- package/lib/client/locales.js +8 -0
- package/lib/client/slot-declarations.js +1 -0
- package/lib/client.js +127 -15
- package/lib/client.js.map +1 -1
- package/lib/git-artifact-stamp.json +2 -2
- package/lib/harness-compat.js +123 -5
- package/lib/index.js +77 -2
- package/lib/mailbox.js +3 -5
- package/lib/members.js +35 -7
- package/lib/tools.js +17 -14
- package/lib/types/capabilities.d.ts +2 -0
- package/lib/types/client/AgentTeamToggle.d.ts +18 -0
- package/lib/types/client/locales.d.ts +8 -0
- package/lib/types/client/slot-declarations.d.ts +17 -0
- package/lib/types/harness-compat.d.ts +4 -0
- package/lib/types/tools.d.ts +6 -0
- package/package.json +57 -52
- package/scripts/model-policy-tdd.mjs +70 -0
- package/src/capabilities.ts +6 -1
- package/src/client/AgentTeamToggle.module.css +52 -0
- package/src/client/AgentTeamToggle.tsx +85 -0
- package/src/client/index.tsx +12 -0
- package/src/client/locales.ts +8 -0
- package/src/client/slot-declarations.ts +26 -0
- package/src/harness-compat.ts +156 -5
- package/src/index.ts +81 -2
- package/src/mailbox.ts +3 -5
- package/src/members.ts +40 -6
- package/src/tools.ts +27 -15
package/README.en.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# @fish-under-sea/dsh-agent-teams-fish
|
|
2
2
|
|
|
3
|
-
**2.0
|
|
3
|
+
**2.1.0 · Upstream v0.1.30 synced · dsh-fish bundle member · Durable teams with Fish vendor artwork**
|
|
4
4
|
|
|
5
5
|
[简体中文](README.md)
|
|
6
6
|
|
|
7
7
|
## Installation and Compatibility
|
|
8
8
|
|
|
9
|
-
Since 2.0
|
|
9
|
+
Since 2.1.0 this package lives in the [Fish-under-sea/dsh-fish](https://github.com/Fish-under-sea/dsh-fish) bundle repository as the workspace member `packages/dsh-agent-teams-fish`, built, versioned and released together with the other members; the former standalone repository no longer evolves separately.
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
12
|
# Bundle install (recommended, includes every member)
|
|
13
|
-
dsh plugin --profile <profile> add @fish-under-sea/dsh-fish@2.0
|
|
13
|
+
dsh plugin --profile <profile> add @fish-under-sea/dsh-fish@2.1.0
|
|
14
14
|
|
|
15
15
|
# Or install this member alone
|
|
16
|
-
dsh plugin --profile <profile> add @fish-under-sea/dsh-agent-teams-fish@2.0
|
|
16
|
+
dsh plugin --profile <profile> add @fish-under-sea/dsh-agent-teams-fish@2.1.0
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
The bundle already includes this member; do not mount twice. Restart DSH after installation. Requires Node `>=24.9`. Recommended Host: `0.2.2-rc.
|
|
19
|
+
The bundle already includes this member; do not mount twice. Restart DSH after installation. Requires Node `>=24.9`. Recommended Host: `0.2.2-rc.3`; older targets such as `0.2.2-rc.2` and `0.2.2-rc.1` remain supported. [compatibility.json](compatibility.json) is the exact support authority; desktop and core versions are distinct.
|
|
20
20
|
|
|
21
21
|
## Features
|
|
22
22
|
|
|
@@ -25,6 +25,7 @@ The bundle already includes this member; do not mount twice. Restart DSH after i
|
|
|
25
25
|
- Optional quality gates for requirements, implementation, verification, review, repair and integration, binding judgments to artifacts.
|
|
26
26
|
- Fish artwork: eighteen vendor identities, role and vendor portraits, custom artworkDir, brand marks and route-aware captain portraits. Missing art falls back vendor+role → vendor → role; not every vendor has every role.
|
|
27
27
|
- Preset-only Hosts receive member persona and tool restrictions inside the child context; missing or corrupt restrictions refuse dispatch.
|
|
28
|
+
- **Enable AgentTeam switch**: the official team switch in the model/reasoning menu is now Fish-owned. On exposes Fish `agent_teams_*` tools and the captain protocol for this Session; the bundle disables the official `tool-agent-team` and `ui-agent-team` rows so two team protocols never compete; off does not enable it. The switch keeps the official style.
|
|
28
29
|
|
|
29
30
|
## Migration and Configuration
|
|
30
31
|
|
|
@@ -47,9 +48,9 @@ Maintainers decide when to build and check before a release. Runtime approvals a
|
|
|
47
48
|
|
|
48
49
|
## Attribution and History
|
|
49
50
|
|
|
50
|
-
Based on [NanmiCoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams) (original author Relakkes / 程序员阿江). MIT. Upstream READMEs, NOTICE and release history are preserved. The source baseline follows upstream tag v0.1.
|
|
51
|
+
Based on [NanmiCoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams) (original author Relakkes / 程序员阿江). MIT. Upstream READMEs, NOTICE and release history are preserved. The source baseline follows upstream tag v0.1.30 (commit 4354b0f); since 2.1.0 the package is vendored into the dsh-fish bundle repository and versioned with it.
|
|
51
52
|
|
|
52
|
-
- [2.0
|
|
53
|
+
- [2.1.0](release-notes/v2.1.0.md)
|
|
53
54
|
- [1.1.0](release-notes/v1.1.0.md)
|
|
54
55
|
- [1.0.2](release-notes/v1.0.2.md)
|
|
55
56
|
- [1.0.1](release-notes/v1.0.1.md)
|
package/README.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# @fish-under-sea/dsh-agent-teams-fish
|
|
2
2
|
|
|
3
|
-
**2.0
|
|
3
|
+
**2.1.0 · 同步上游 v0.1.30 · dsh-fish 聚合成员 · 持久团队协作与 Fish 厂商美术**
|
|
4
4
|
|
|
5
5
|
[English](README.en.md)
|
|
6
6
|
|
|
7
7
|
## 安装与兼容
|
|
8
8
|
|
|
9
|
-
自 2.0
|
|
9
|
+
自 2.1.0 起,本包并入 [Fish-under-sea/dsh-fish](https://github.com/Fish-under-sea/dsh-fish) 聚合仓库,作为工作区成员 `packages/dsh-agent-teams-fish` 与其它成员统一构建、统一版本、统一发布;原独立仓库不再单独演进。
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
12
|
# 聚合安装(推荐,含全部成员)
|
|
13
|
-
dsh plugin --profile <profile> add @fish-under-sea/dsh-fish@2.0
|
|
13
|
+
dsh plugin --profile <profile> add @fish-under-sea/dsh-fish@2.1.0
|
|
14
14
|
|
|
15
15
|
# 或单独安装本成员
|
|
16
|
-
dsh plugin --profile <profile> add @fish-under-sea/dsh-agent-teams-fish@2.0
|
|
16
|
+
dsh plugin --profile <profile> add @fish-under-sea/dsh-agent-teams-fish@2.1.0
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
聚合已包含本成员,不要重复挂载。安装后重启 DSH。Node 要求 `>=24.9`。推荐宿主 `0.2.2-rc.
|
|
19
|
+
聚合已包含本成员,不要重复挂载。安装后重启 DSH。Node 要求 `>=24.9`。推荐宿主 `0.2.2-rc.3`;`0.2.2-rc.2`、`0.2.2-rc.1` 等旧版本仍在支持列表内。精确支持列表以 [compatibility.json](compatibility.json) 为唯一事实源,不以桌面应用版本推断核心版本。
|
|
20
20
|
|
|
21
21
|
## 功能
|
|
22
22
|
|
|
@@ -25,6 +25,7 @@ dsh plugin --profile <profile> add @fish-under-sea/dsh-agent-teams-fish@2.0.1
|
|
|
25
25
|
- 可选质量门:需求、实现、验证、审查、修复及集成,审查与产物绑定。
|
|
26
26
|
- Fish 美术:十八厂商识别,厂商与岗位头像、自定义 artworkDir、商标徽标及队长模型路由头像。缺图按“厂商+岗位 → 厂商 → 岗位”降级,不代表每个厂商都有全部岗位图。
|
|
27
27
|
- 新宿主预设型成员组合在子上下文安装人设和工具限制;缺失或损坏的限制在派发前拒绝。
|
|
28
|
+
- 「启用AgentTeam」开关:模型与推理菜单里的原官方团队开关改由 Fish 接管。开启后本会话提供 Fish `agent_teams_*` 工具与队长协议;bundle 层停用官方 `tool-agent-team` 与 `ui-agent-team` 行,避免两套团队协议冲突;关闭则本会话不启用。开关沿用官方样式。
|
|
28
29
|
|
|
29
30
|
## 迁移与配置
|
|
30
31
|
|
|
@@ -47,9 +48,9 @@ pnpm --filter @fish-under-sea/dsh-agent-teams-fish verify
|
|
|
47
48
|
|
|
48
49
|
## 来源与记录
|
|
49
50
|
|
|
50
|
-
基于 [NanmiCoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams)(原作者 Relakkes / 程序员阿江)。MIT。保留上游 README、NOTICE 和历史发布说明。源码基线为上游 tag v0.1.
|
|
51
|
+
基于 [NanmiCoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams)(原作者 Relakkes / 程序员阿江)。MIT。保留上游 README、NOTICE 和历史发布说明。源码基线为上游 tag v0.1.30(commit 4354b0f);自 2.1.0 起并入 dsh-fish 聚合仓库,版本随聚合统一。
|
|
51
52
|
|
|
52
|
-
- [2.0
|
|
53
|
+
- [2.1.0](release-notes/v2.1.0.md)
|
|
53
54
|
- [1.1.0](release-notes/v1.1.0.md)
|
|
54
55
|
- [1.0.2](release-notes/v1.0.2.md)
|
|
55
56
|
- [1.0.1](release-notes/v1.0.1.md)
|
package/compatibility.json
CHANGED
|
@@ -1,83 +1,91 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 1,
|
|
3
|
-
"recommendedHost": "0.2.2-rc.
|
|
4
|
-
"previewTag": "next",
|
|
5
|
-
"supportedHosts": [
|
|
6
|
-
{
|
|
7
|
-
"version": "0.2.2-rc.
|
|
8
|
-
"track": "recommended"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"version": "0.2.
|
|
12
|
-
"track": "preview"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"version": "0.2.
|
|
16
|
-
"track": "preview"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
28
|
-
"version": "0.1.
|
|
29
|
-
"track": "legacy",
|
|
30
|
-
"platforms": [
|
|
31
|
-
"ubuntu-latest"
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
36
|
-
"version": "0.1.5-rc.
|
|
37
|
-
"track": "legacy",
|
|
38
|
-
"platforms": [
|
|
39
|
-
"ubuntu-latest"
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
44
|
-
"version": "0.1.5-rc.
|
|
45
|
-
"track": "legacy",
|
|
46
|
-
"platforms": [
|
|
47
|
-
"ubuntu-latest"
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
52
|
-
"version": "0.1.
|
|
53
|
-
"track": "legacy",
|
|
54
|
-
"platforms": [
|
|
55
|
-
"ubuntu-latest"
|
|
56
|
-
]
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
60
|
-
"version": "0.1.2-
|
|
61
|
-
"track": "
|
|
62
|
-
"platforms": [
|
|
63
|
-
"ubuntu-latest"
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
68
|
-
"version": "0.2
|
|
69
|
-
"track": "
|
|
70
|
-
"platforms": [
|
|
71
|
-
"ubuntu-latest"
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
76
|
-
"version": "0.
|
|
77
|
-
"track": "legacy",
|
|
78
|
-
"platforms": [
|
|
79
|
-
"ubuntu-latest"
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"recommendedHost": "0.2.2-rc.3",
|
|
4
|
+
"previewTag": "next",
|
|
5
|
+
"supportedHosts": [
|
|
6
|
+
{
|
|
7
|
+
"version": "0.2.2-rc.3",
|
|
8
|
+
"track": "recommended"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.2.2-rc.2",
|
|
12
|
+
"track": "preview"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"version": "0.2.2-rc.1",
|
|
16
|
+
"track": "preview"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"version": "0.2.1-rc.2",
|
|
20
|
+
"track": "preview"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"version": "0.2.1-alpha.2",
|
|
24
|
+
"track": "preview"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
28
|
+
"version": "0.1.7-rc.2",
|
|
29
|
+
"track": "legacy",
|
|
30
|
+
"platforms": [
|
|
31
|
+
"ubuntu-latest"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
36
|
+
"version": "0.1.5-rc.3",
|
|
37
|
+
"track": "legacy",
|
|
38
|
+
"platforms": [
|
|
39
|
+
"ubuntu-latest"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
44
|
+
"version": "0.1.5-rc.2",
|
|
45
|
+
"track": "legacy",
|
|
46
|
+
"platforms": [
|
|
47
|
+
"ubuntu-latest"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
52
|
+
"version": "0.1.5-rc.1",
|
|
53
|
+
"track": "legacy",
|
|
54
|
+
"platforms": [
|
|
55
|
+
"ubuntu-latest"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
60
|
+
"version": "0.1.2-rc.1",
|
|
61
|
+
"track": "legacy",
|
|
62
|
+
"platforms": [
|
|
63
|
+
"ubuntu-latest"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
68
|
+
"version": "0.1.2-alpha.5",
|
|
69
|
+
"track": "preview",
|
|
70
|
+
"platforms": [
|
|
71
|
+
"ubuntu-latest"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
76
|
+
"version": "0.2.0-rc.2",
|
|
77
|
+
"track": "legacy",
|
|
78
|
+
"platforms": [
|
|
79
|
+
"ubuntu-latest"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
|
|
84
|
+
"version": "0.1.2-alpha.2",
|
|
85
|
+
"track": "legacy",
|
|
86
|
+
"platforms": [
|
|
87
|
+
"ubuntu-latest"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
]
|
|
83
91
|
}
|
package/cordis.patch.yml
CHANGED
|
@@ -19,3 +19,8 @@
|
|
|
19
19
|
stateDir: .agent-teams
|
|
20
20
|
# Provider used to spawn member subagents ('spawn' or 'fork').
|
|
21
21
|
memberProvider: spawn
|
|
22
|
+
# Fish 接管「启用AgentTeam」开关:官方任务工具与官方团队 UI 停用,避免两套
|
|
23
|
+
# 团队协议同时提供给模型。官方 `agent-team` 服务保留,仅用于保存每个 Session
|
|
24
|
+
# 的持久开关(team/mode 投影),Fish 的 agent_teams_* 工具按该开关参与。
|
|
25
|
+
- { id: tool-agent-team, disabled: true }
|
|
26
|
+
- { id: ui-agent-team, disabled: true }
|
package/lib/capabilities.js
CHANGED
|
@@ -96,7 +96,12 @@ export function installTeamCapabilities(ctx, config) {
|
|
|
96
96
|
ctx.systemPrompt.section({
|
|
97
97
|
name: 'agent-teams:usage', order: config.order ?? 117,
|
|
98
98
|
text: ({ agent }) => {
|
|
99
|
-
|
|
99
|
+
if (agent === undefined)
|
|
100
|
+
return '';
|
|
101
|
+
if (states.get(agent)?.member)
|
|
102
|
+
return TEAM_MEMBER_PROMPT;
|
|
103
|
+
// 开关关闭时不下发队长协议,模型就不会驱动 AgentTeams。
|
|
104
|
+
return config.isTeamEnabled === undefined || config.isTeamEnabled(agent) ? captainPrompt : '';
|
|
100
105
|
},
|
|
101
106
|
});
|
|
102
107
|
onAgentReady(ctx, agent => { attach(agent); });
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* 「启用AgentTeam」开关,占据官方模型与推理菜单的 `conversation.input.model.options`
|
|
4
|
+
* 列表槽位。样式、开关与信息按钮完全复用官方 TeamModeToggle;功能改为控制
|
|
5
|
+
* Fish AgentTeams 的会话开关(官方任务工具与官方团队 UI 行由 bundle 停用)。
|
|
6
|
+
*
|
|
7
|
+
* 开关状态读取原生 `agentTeam` 投影(持久化在 Session 日志),写入走 Fish 自己的
|
|
8
|
+
* `/plugins/dsh-agent-teams/mode` 路由;该路由只调用原生服务的 setEnabled,因此
|
|
9
|
+
* 关闭后 Fish 的 agent_teams_* 工具与提示词在下一个模型步骤就不再参与。
|
|
10
|
+
*/
|
|
11
|
+
import { useState } from 'react';
|
|
12
|
+
import { Button, IconInfoOutlineRegular, Switch, Tooltip } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
13
|
+
import css from './AgentTeamToggle.module.css';
|
|
14
|
+
/** Persist the switch through Fish's own host route. */
|
|
15
|
+
async function selectTeamMode(sessionId, enabled) {
|
|
16
|
+
try {
|
|
17
|
+
const response = await fetch('/plugins/dsh-agent-teams/mode', {
|
|
18
|
+
method: 'POST',
|
|
19
|
+
credentials: 'same-origin',
|
|
20
|
+
headers: { 'content-type': 'application/json' },
|
|
21
|
+
body: JSON.stringify({ sessionId, enabled }),
|
|
22
|
+
});
|
|
23
|
+
if (response.ok)
|
|
24
|
+
return null;
|
|
25
|
+
const body = (await response.json().catch(() => null));
|
|
26
|
+
return typeof body?.error === 'string' ? body.error : `HTTP ${response.status}`;
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
return error instanceof Error ? error.message : String(error);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/** Read and change the Fish AgentTeams selection for root Sessions only. */
|
|
33
|
+
export function AgentTeamToggle(props) {
|
|
34
|
+
const { sessionId, t } = props;
|
|
35
|
+
const addressedChild = props.useSession(snapshot => snapshot.subagent !== null);
|
|
36
|
+
const listedChild = props.useSessions((state) => state.byId?.[sessionId]?.origin === 'subagent');
|
|
37
|
+
if (addressedChild === true || listedChild === true)
|
|
38
|
+
return null;
|
|
39
|
+
const readProjection = props.useProjection;
|
|
40
|
+
const mode = readProjection('agentTeam');
|
|
41
|
+
const [pending, setPending] = useState(false);
|
|
42
|
+
if (mode === undefined)
|
|
43
|
+
return null;
|
|
44
|
+
const select = (enabled) => {
|
|
45
|
+
setPending(true);
|
|
46
|
+
void selectTeamMode(sessionId, enabled).then((failure) => {
|
|
47
|
+
if (failure !== null)
|
|
48
|
+
props.reportFailure(t('mode.failed', { message: failure }));
|
|
49
|
+
}, (error) => {
|
|
50
|
+
props.reportFailure(t('mode.failed', { message: error instanceof Error ? error.message : String(error) }));
|
|
51
|
+
}).finally(() => { setPending(false); });
|
|
52
|
+
};
|
|
53
|
+
return (_jsxs("div", { className: css.row, children: [_jsxs("span", { className: css.label, children: [_jsx("span", { children: t('mode.label') }), _jsx(Tooltip, { label: t('mode.description'), side: "top", delayMs: 300, maxWidth: 300, portal: true, openOnClick: true, children: _jsx(Button, { variant: "ghost", size: "sm", className: css.infoButton, "aria-label": t('mode.infoLabel'), children: _jsx(IconInfoOutlineRegular, { size: 11, "aria-hidden": "true" }) }) })] }), _jsx(Switch, { className: css.toggle, checked: mode.enabled === true, disabled: props.locked || pending, label: t('mode.label'), onChange: select })] }));
|
|
54
|
+
}
|
package/lib/client/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { AgentTeamsCard } from "./AgentTeamsCard.js";
|
|
|
6
6
|
import { agentTeamsCardDefinition } from "./agent-teams-card-definition.js";
|
|
7
7
|
import { AGENT_TEAMS_LOCALE_NAMESPACE, en, zh, } from "./locales.js";
|
|
8
8
|
import { openAgentTeamMember } from "./session-navigation.js";
|
|
9
|
+
import { AgentTeamToggle } from "./AgentTeamToggle.js";
|
|
9
10
|
/** Required services: conversation nodes, slots, sessions navigation, and locale. */
|
|
10
11
|
export const inject = ['uiConversation', 'slots', 'sessions', 'locale', 'modelDirectories', 'layout'];
|
|
11
12
|
const useLegacyPanelInfo = select => select({ activePanelId: null });
|
|
@@ -22,6 +23,15 @@ export function apply(ctx) {
|
|
|
22
23
|
const bridge = createWorkspaceBridge();
|
|
23
24
|
const state = createWorkspaceState();
|
|
24
25
|
ctx.effect(() => ctx.locale.register(AGENT_TEAMS_LOCALE_NAMESPACE, { zh, en }), 'agent-teams: dictionaries');
|
|
26
|
+
// 「启用AgentTeam」开关:占用官方模型与推理菜单的选项列表槽位。priority -1
|
|
27
|
+
// 让本项在旧 profile 仍残留官方 ui-agent-team 时压过它(同 id 低优先级渲染);
|
|
28
|
+
// 新 profile 已在 bundle 层停用官方行,因此这里就是唯一开关。
|
|
29
|
+
ctx.slots.inject('conversation.input.model.options', () => ctx.slots.register({
|
|
30
|
+
name: 'conversation.input.model.options',
|
|
31
|
+
id: 'agent-team',
|
|
32
|
+
priority: -1,
|
|
33
|
+
locale: AGENT_TEAMS_LOCALE_NAMESPACE,
|
|
34
|
+
}, AgentTeamToggle));
|
|
25
35
|
const openMember = (parentId, childId) => {
|
|
26
36
|
void openAgentTeamMember(ctx.sessions, parentId, childId, ctx.layout, ctx.get('uiWorkspace')).catch((error) => {
|
|
27
37
|
console.warn(`agent-teams: failed to open member transcript ${childId}: ${String(error)}`);
|
package/lib/client/locales.js
CHANGED
|
@@ -5,6 +5,10 @@ export const AGENT_TEAMS_LOCALE_NAMESPACE = 'agentTeams';
|
|
|
5
5
|
export const zh = {
|
|
6
6
|
'workspace.dependencies': '从左到右:完成前置后解锁 · 点击查看详情',
|
|
7
7
|
'workspace.title': '团队协作',
|
|
8
|
+
'mode.label': '启用AgentTeam',
|
|
9
|
+
'mode.description': '开启后由 Fish AgentTeams 接管多智能体团队协作:模型获得 agent_teams_* 工具与队长协议;官方团队协作保持关闭以避免冲突。关闭后本会话不再启用。',
|
|
10
|
+
'mode.infoLabel': '关于启用AgentTeam',
|
|
11
|
+
'mode.failed': '切换失败:{message}',
|
|
8
12
|
'workspace.guide': '查看成员分工、任务依赖与执行进度',
|
|
9
13
|
'workspace.eyebrow': 'AGENT TEAMS',
|
|
10
14
|
'workspace.description': '队长统筹分工,成员按任务依赖并行协作。',
|
|
@@ -237,6 +241,10 @@ export const zh = {
|
|
|
237
241
|
export const en = {
|
|
238
242
|
'workspace.dependencies': 'Left to right: prerequisites unlock tasks · Select for details',
|
|
239
243
|
'workspace.title': 'Team workspace',
|
|
244
|
+
'mode.label': 'Enable AgentTeam',
|
|
245
|
+
'mode.description': 'When on, Fish AgentTeams takes over multi-agent collaboration: the model receives the agent_teams_* tools and captain protocol, while the official team runtime stays off to avoid conflicts. When off, this Session does not enable it.',
|
|
246
|
+
'mode.infoLabel': 'About Enable AgentTeam',
|
|
247
|
+
'mode.failed': 'Switch failed: {message}',
|
|
240
248
|
'workspace.guide': 'Members, task dependencies, and execution progress',
|
|
241
249
|
'workspace.eyebrow': 'AGENT TEAMS',
|
|
242
250
|
'workspace.description': 'The captain coordinates. Members work in parallel as dependencies clear.',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|