@fish-under-sea/dsh-agent-teams-fish 2.0.0 → 2.0.1
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 +6 -6
- package/README.md +6 -6
- package/lib/client/StagingPlanEditor.js +33 -4
- package/lib/client.js +202 -184
- package/lib/client.js.map +1 -1
- package/lib/harness-compat.js +14 -7
- package/lib/index.js +34 -1
- package/lib/types/harness-compat.d.ts +5 -0
- package/package.json +2 -2
- package/src/client/StagingPlanEditor.tsx +34 -2
- package/src/harness-compat.ts +14 -7
- package/src/index.ts +34 -1
package/README.en.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# @fish-under-sea/dsh-agent-teams-fish
|
|
2
2
|
|
|
3
|
-
**2.0.
|
|
3
|
+
**2.0.1 · Upstream v0.1.29 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.0.1 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.0.1
|
|
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.0.1
|
|
17
17
|
```
|
|
18
18
|
|
|
19
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.1`; older targets such as `0.2.1-rc.2` and `0.2.1-alpha.2` remain supported. [compatibility.json](compatibility.json) is the exact support authority; desktop and core versions are distinct.
|
|
@@ -47,9 +47,9 @@ Maintainers decide when to build and check before a release. Runtime approvals a
|
|
|
47
47
|
|
|
48
48
|
## Attribution and History
|
|
49
49
|
|
|
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.29 (commit 369c278); since 2.0.
|
|
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.29 (commit 369c278); since 2.0.1 the package is vendored into the dsh-fish bundle repository and versioned with it.
|
|
51
51
|
|
|
52
|
-
- [2.0.
|
|
52
|
+
- [2.0.1](release-notes/v2.0.1.md)
|
|
53
53
|
- [1.1.0](release-notes/v1.1.0.md)
|
|
54
54
|
- [1.0.2](release-notes/v1.0.2.md)
|
|
55
55
|
- [1.0.1](release-notes/v1.0.1.md)
|
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# @fish-under-sea/dsh-agent-teams-fish
|
|
2
2
|
|
|
3
|
-
**2.0.
|
|
3
|
+
**2.0.1 · 同步上游 v0.1.29 · dsh-fish 聚合成员 · 持久团队协作与 Fish 厂商美术**
|
|
4
4
|
|
|
5
5
|
[English](README.en.md)
|
|
6
6
|
|
|
7
7
|
## 安装与兼容
|
|
8
8
|
|
|
9
|
-
自 2.0.
|
|
9
|
+
自 2.0.1 起,本包并入 [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.0.1
|
|
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.0.1
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
聚合已包含本成员,不要重复挂载。安装后重启 DSH。Node 要求 `>=24.9`。推荐宿主 `0.2.2-rc.1`;`0.2.1-rc.2`、`0.2.1-alpha.2` 等旧版本仍在支持列表内。精确支持列表以 [compatibility.json](compatibility.json) 为唯一事实源,不以桌面应用版本推断核心版本。
|
|
@@ -47,9 +47,9 @@ pnpm --filter @fish-under-sea/dsh-agent-teams-fish verify
|
|
|
47
47
|
|
|
48
48
|
## 来源与记录
|
|
49
49
|
|
|
50
|
-
基于 [NanmiCoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams)(原作者 Relakkes / 程序员阿江)。MIT。保留上游 README、NOTICE 和历史发布说明。源码基线为上游 tag v0.1.29(commit 369c278);自 2.0.
|
|
50
|
+
基于 [NanmiCoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams)(原作者 Relakkes / 程序员阿江)。MIT。保留上游 README、NOTICE 和历史发布说明。源码基线为上游 tag v0.1.29(commit 369c278);自 2.0.1 起并入 dsh-fish 聚合仓库,版本随聚合统一。
|
|
51
51
|
|
|
52
|
-
- [2.0.
|
|
52
|
+
- [2.0.1](release-notes/v2.0.1.md)
|
|
53
53
|
- [1.1.0](release-notes/v1.1.0.md)
|
|
54
54
|
- [1.0.2](release-notes/v1.0.2.md)
|
|
55
55
|
- [1.0.1](release-notes/v1.0.1.md)
|
|
@@ -68,11 +68,40 @@ function effortMenuId(effort) {
|
|
|
68
68
|
* reads only catalog metadata: choosing a member route must not change the
|
|
69
69
|
* captain session's composer model.
|
|
70
70
|
*/
|
|
71
|
-
function StagedModelPicker({ directory, provider, model, reasoningEffort, busy, onChange, t, }) {
|
|
71
|
+
function StagedModelPicker({ directory, sessionId, provider, model, reasoningEffort, busy, onChange, t, }) {
|
|
72
72
|
const state = useSyncExternalStore(directory.store.subscribe, directory.store.getSnapshot);
|
|
73
73
|
const [open, setOpen] = useState(false);
|
|
74
74
|
const [pane, setPane] = useState('root');
|
|
75
|
-
|
|
75
|
+
// null = no official policy captured for this session: keep the full catalog.
|
|
76
|
+
const [allowedModels, setAllowedModels] = useState(null);
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (sessionId === '')
|
|
79
|
+
return;
|
|
80
|
+
let cancelled = false;
|
|
81
|
+
void fetch(`/plugins/dsh-agent-teams/model-policy?session=${encodeURIComponent(sessionId)}`, { credentials: 'same-origin' })
|
|
82
|
+
.then((response) => response.ok ? response.json() : undefined)
|
|
83
|
+
.then((data) => {
|
|
84
|
+
if (cancelled)
|
|
85
|
+
return;
|
|
86
|
+
const models = data?.allowedModels;
|
|
87
|
+
setAllowedModels(Array.isArray(models)
|
|
88
|
+
? models.filter((candidate) => (typeof candidate === 'object' && candidate !== null
|
|
89
|
+
&& typeof candidate.provider === 'string'
|
|
90
|
+
&& typeof candidate.model === 'string'))
|
|
91
|
+
: null);
|
|
92
|
+
})
|
|
93
|
+
.catch(() => { });
|
|
94
|
+
return () => { cancelled = true; };
|
|
95
|
+
}, [sessionId]);
|
|
96
|
+
const visibleGroups = allowedModels === null
|
|
97
|
+
? state.groups
|
|
98
|
+
: state.groups
|
|
99
|
+
.map((group) => ({
|
|
100
|
+
...group,
|
|
101
|
+
models: group.models.filter((candidate) => allowedModels.some((route) => route.provider === group.id && route.model === candidate.id)),
|
|
102
|
+
}))
|
|
103
|
+
.filter((group) => group.models.length > 0);
|
|
104
|
+
const catalogRoutes = visibleGroups.flatMap((group) => group.models.map((candidate) => ({
|
|
76
105
|
key: routeKey(group.id, candidate.id),
|
|
77
106
|
provider: group.id,
|
|
78
107
|
providerName: group.name,
|
|
@@ -123,7 +152,7 @@ function StagedModelPicker({ directory, provider, model, reasoningEffort, busy,
|
|
|
123
152
|
});
|
|
124
153
|
}
|
|
125
154
|
else {
|
|
126
|
-
for (const group of
|
|
155
|
+
for (const group of visibleGroups) {
|
|
127
156
|
modelItems.push({ type: 'label', id: `provider:${group.id}`, text: group.name });
|
|
128
157
|
for (const candidate of group.models) {
|
|
129
158
|
modelItems.push({
|
|
@@ -290,7 +319,7 @@ function StagedMemberEditor({ team, member, modelDirectory, onPendingChange, t }
|
|
|
290
319
|
await persist();
|
|
291
320
|
};
|
|
292
321
|
const route = `${provider}/${model}`.replace(/^\//u, '');
|
|
293
|
-
return (_jsxs("article", { className: css.planCard, "data-plan-member": member.name, "data-open": open, children: [_jsxs("button", { type: "button", className: css.planCardHeader, "aria-expanded": open, "aria-controls": bodyId, onClick: () => { setOpen((current) => !current); }, children: [_jsxs("span", { className: css.planCardIdentity, children: [_jsx("strong", { children: member.name }), _jsx("span", { children: role || t('plan.member.roleFallback') })] }), _jsx("span", { className: css.planCardMeta, title: route, children: route }), dirty && _jsx("em", { className: css.planDirty, children: t('plan.unsaved') }), _jsx(DisclosureChevron, { open: open })] }), open && (_jsxs("form", { id: bodyId, className: css.planCardBody, onSubmit: (event) => { void save(event); }, children: [_jsxs("fieldset", { disabled: busy, children: [_jsxs("label", { children: [t('plan.member.role'), _jsx("input", { name: "role", value: role, onChange: (event) => { setRole(event.currentTarget.value); markEdited(); } })] }), _jsx(StagedModelPicker, { directory: modelDirectory, provider: provider, model: model, reasoningEffort: reasoningEffort, busy: busy, onChange: (selection) => { void persist(selection); }, t: t }), _jsxs("label", { children: [t('plan.member.prompt'), _jsx("textarea", { name: "executionPrompt", value: executionPrompt, onChange: (event) => { setExecutionPrompt(event.currentTarget.value); markEdited(); }, rows: 3 })] })] }), _jsxs("span", { className: css.planActions, children: [_jsx(Feedback, { value: feedback }), _jsx("button", { type: "submit", disabled: busy || !dirty || provider.trim() === '' || model.trim() === '', children: busy ? t('plan.saving') : t('plan.save') })] })] }))] }));
|
|
322
|
+
return (_jsxs("article", { className: css.planCard, "data-plan-member": member.name, "data-open": open, children: [_jsxs("button", { type: "button", className: css.planCardHeader, "aria-expanded": open, "aria-controls": bodyId, onClick: () => { setOpen((current) => !current); }, children: [_jsxs("span", { className: css.planCardIdentity, children: [_jsx("strong", { children: member.name }), _jsx("span", { children: role || t('plan.member.roleFallback') })] }), _jsx("span", { className: css.planCardMeta, title: route, children: route }), dirty && _jsx("em", { className: css.planDirty, children: t('plan.unsaved') }), _jsx(DisclosureChevron, { open: open })] }), open && (_jsxs("form", { id: bodyId, className: css.planCardBody, onSubmit: (event) => { void save(event); }, children: [_jsxs("fieldset", { disabled: busy, children: [_jsxs("label", { children: [t('plan.member.role'), _jsx("input", { name: "role", value: role, onChange: (event) => { setRole(event.currentTarget.value); markEdited(); } })] }), _jsx(StagedModelPicker, { directory: modelDirectory, sessionId: team.captainSessionId, provider: provider, model: model, reasoningEffort: reasoningEffort, busy: busy, onChange: (selection) => { void persist(selection); }, t: t }), _jsxs("label", { children: [t('plan.member.prompt'), _jsx("textarea", { name: "executionPrompt", value: executionPrompt, onChange: (event) => { setExecutionPrompt(event.currentTarget.value); markEdited(); }, rows: 3 })] })] }), _jsxs("span", { className: css.planActions, children: [_jsx(Feedback, { value: feedback }), _jsx("button", { type: "submit", disabled: busy || !dirty || provider.trim() === '' || model.trim() === '', children: busy ? t('plan.saving') : t('plan.save') })] })] }))] }));
|
|
294
323
|
}
|
|
295
324
|
function StagedTaskEditor({ team, task, onPendingChange, t }) {
|
|
296
325
|
const bodyId = useId();
|