dsh-plugin-subagent-director 0.5.0-beta.0 → 0.5.0-beta.2
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/CHANGELOG.md +42 -0
- package/lib/client/SubagentCloseAction.d.ts +2 -2
- package/lib/client/SubagentCloseAction.js +2 -2
- package/lib/client/SubagentCloseAction.js.map +1 -1
- package/lib/client/SubagentModelDock.d.ts +18 -11
- package/lib/client/SubagentModelDock.d.ts.map +1 -1
- package/lib/client/SubagentModelDock.js +14 -7
- package/lib/client/SubagentModelDock.js.map +1 -1
- package/lib/client/SubagentOptionsSection.d.ts +1 -1
- package/lib/client/SubagentOptionsSection.d.ts.map +1 -1
- package/lib/client/index.d.ts +1 -24
- package/lib/client/index.d.ts.map +1 -1
- package/lib/client/index.js +65 -17
- package/lib/client/index.js.map +1 -1
- package/lib/client/locales.js +2 -2
- package/lib/client/locales.js.map +1 -1
- package/lib/client/store.d.ts +1 -1
- package/lib/client/store.d.ts.map +1 -1
- package/lib/client/store.js +1 -1
- package/lib/client/store.js.map +1 -1
- package/lib/client/subagent-model.d.ts +20 -10
- package/lib/client/subagent-model.d.ts.map +1 -1
- package/lib/client/subagent-model.js +13 -6
- package/lib/client/subagent-model.js.map +1 -1
- package/lib/close-subagent.d.ts +72 -0
- package/lib/close-subagent.d.ts.map +1 -0
- package/lib/close-subagent.js +74 -0
- package/lib/close-subagent.js.map +1 -0
- package/lib/default-route.d.ts +46 -0
- package/lib/default-route.d.ts.map +1 -0
- package/lib/default-route.js +56 -0
- package/lib/default-route.js.map +1 -0
- package/package.json +15 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,48 @@
|
|
|
6
6
|
|
|
7
7
|
### 变更
|
|
8
8
|
|
|
9
|
+
- **设置页开头说明补充模型选择约束(beta.2)**:`sectionIntro` 增加一行
|
|
10
|
+
「只能选择插件-插件配置-Subagent池里的提供商-模型」(中英双语),设置页打开
|
|
11
|
+
即明确可选 provider/model 仅来自官方 Subagent 插件配置的模型池。
|
|
12
|
+
|
|
13
|
+
### 修复
|
|
14
|
+
|
|
15
|
+
- **客户端半 alpha.4/alpha.5 兼容性修复(beta.1)**:移除全部 7 处对 rc 时代
|
|
16
|
+
`@deepseek-ai/dsh-client-runtime/client` 的引用(该包 npm 最新仅 0.1.1-rc.2,
|
|
17
|
+
alpha.4/alpha.5 宿主均不携带,客户端 bundle 的运行时 `require` 在浏览器加载即
|
|
18
|
+
失败,设置页/模型读数/关闭按钮整体不可用):
|
|
19
|
+
- `createSnapshotStore`/`SnapshotStore` 改从 `@deepseek-ai/dsh-client-store`
|
|
20
|
+
导入(alpha 运行时,宿主 web bundle 虚拟模块);
|
|
21
|
+
- `ClientContext` 改为 cordis `Context`(官方 alpha 客户端模式),`ctx.slots` /
|
|
22
|
+
`ctx.remote` / `ctx.uiConversation` 等 Context 增强经 `dsh-client-ui-renderer` /
|
|
23
|
+
`dsh-api-remotes` / `dsh-client-ui-conversation` 的类型导入引入;
|
|
24
|
+
- 会话类型改从 alpha 包导入:`SessionSnapshot`(`dsh-api-session-controller`)、
|
|
25
|
+
`ConversationNode`/`AssistantMessageNode`/`AssistantProvenanceView`
|
|
26
|
+
(`dsh-client-ui-conversation`)、`ChatSnapshot`(`dsh-client-ui-chat`)、
|
|
27
|
+
`SessionListState`(`dsh-api-session-controller`);
|
|
28
|
+
- **composer.dock 读数适配 alpha.4 会话架构**:dock 槽位不再经 owner props 提供
|
|
29
|
+
session(渲染时传空 `{}`),改为消费框架标准会话套件(`useSession`/`sessionId`),
|
|
30
|
+
转录节点改从当前会话 chat 视图快照的 `legacy.nodes` 读取(`uiConversation`
|
|
31
|
+
绑定 → `chat` target,惰性解析,设置页不依赖会话 UI);RPC 兜底查询保留;
|
|
32
|
+
- 移除过时的 `conversation.composer.dock` / `conversation.session.header.actions`
|
|
33
|
+
SlotMap 增强(alpha.4 由 ui-conversation 声明,重复声明会类型冲突);
|
|
34
|
+
- `package.json` peer/dev 依赖移除 `dsh-client-runtime`,新增
|
|
35
|
+
`dsh-client-store`、`dsh-client-ui-conversation`、`dsh-client-ui-chat`、
|
|
36
|
+
`dsh-api-session-controller`、`dsh-client-ui-session`、`dsh-client-ui-renderer`、
|
|
37
|
+
`dsh-api-remotes`(均 `^0.1.2-alpha.4`,同时覆盖 alpha.4/alpha.5 宿主)。
|
|
38
|
+
|
|
39
|
+
### 测试
|
|
40
|
+
|
|
41
|
+
- 新增 `client-compat.test.ts` 兼容性守卫:扫描 `src/client` 与 `package.json`,
|
|
42
|
+
任何 `dsh-client-runtime` 残留引用即失败(本次 bug 的回归测试);
|
|
43
|
+
- `subagent-model.test.ts` 更新为 alpha.4 形状(`SessionSnapshot.subagent` 地址、
|
|
44
|
+
chat 视图 legacy 节点切片、`SubagentAddress` 的 continuable/one-shot 判别);
|
|
45
|
+
- 新增 `client-apply-probe.test.ts` 真实 cordis 探针:客户端半在 alpha.4 形状
|
|
46
|
+
服务(slots/locale/remote/connection)上挂载,设置页/dock/关闭按钮均注册,
|
|
47
|
+
dock 注入面携带 `useChatSnapshot`,且设置页不依赖 `uiConversation` 存在。
|
|
48
|
+
|
|
49
|
+
### 变更
|
|
50
|
+
|
|
9
51
|
- **alpha.4 兼容性移植(Host 半)**:`dsh-settings` 服务 API 升级——移除的
|
|
10
52
|
`settingsNamespace()` / `installSettingsSection()` 改为普通 kebab-case 命名空间
|
|
11
53
|
字面量 + `ctx.settings.installSection(owner, ns, schema, entry, hooks)`(与官方
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* released), on failure a short inline error shows the core message.
|
|
14
14
|
*
|
|
15
15
|
* The seat is a list slot declared by ui-conversation; the framework session
|
|
16
|
-
* standard kit supplies `useSession`/`sessionId` (
|
|
17
|
-
* the registration injects the RPC caller.
|
|
16
|
+
* standard kit supplies `useSession`/`sessionId` (ui-session merge over the
|
|
17
|
+
* alpha.4 SessionSnapshot), the registration injects the RPC caller.
|
|
18
18
|
*/
|
|
19
19
|
import type { ClientConnectionRpc } from '@deepseek-ai/dsh-client-connection/client';
|
|
20
20
|
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
@@ -14,8 +14,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
* released), on failure a short inline error shows the core message.
|
|
15
15
|
*
|
|
16
16
|
* The seat is a list slot declared by ui-conversation; the framework session
|
|
17
|
-
* standard kit supplies `useSession`/`sessionId` (
|
|
18
|
-
* the registration injects the RPC caller.
|
|
17
|
+
* standard kit supplies `useSession`/`sessionId` (ui-session merge over the
|
|
18
|
+
* alpha.4 SessionSnapshot), the registration injects the RPC caller.
|
|
19
19
|
*/
|
|
20
20
|
import { useEffect, useState } from 'react';
|
|
21
21
|
import { SUBAGENT_DIRECTOR_RPC_CHANNEL, SUBAGENT_DIRECTOR_RPC_CLOSE, } from '../bridge-contract.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubagentCloseAction.js","sourceRoot":"","sources":["../../src/client/SubagentCloseAction.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAanD,kFAAkF;AAClF,MAAM,CAAC,MAAM,EAAE,GAAG,2BAAoC,CAAC;AAIvD,qFAAqF;AACrF,MAAM,KAAK,GAA2C;IACpD,IAAI,EAAE;QACJ,OAAO,EAAE,aAAa;QACtB,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,CAAC;KACP;IACD,MAAM,EAAE;QACN,GAAG,iBAAiB;QACpB,MAAM,EAAE,EAAE;QACV,Q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AC,GAC/D,EACR,KAAK,KAAK,QAAQ,IAAI,CACrB,eAAM,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAC,OAAO,YACnC,CAAC,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE,EAAE,CAAC,GACtC,CACR,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
* addressed subagent child it shows the provider/model that child actually
|
|
7
7
|
* ran on:
|
|
8
8
|
* - fast path: the opened transcript's latest assistant message already
|
|
9
|
-
* records provenance/requestConfig (zero extra RPC — see subagent-model.ts)
|
|
9
|
+
* records provenance/requestConfig (zero extra RPC — see subagent-model.ts).
|
|
10
|
+
* On the alpha.4/alpha.5 host line the transcript nodes come from the
|
|
11
|
+
* chat view snapshot's `legacy.nodes` slice, read through the injected
|
|
12
|
+
* `useChatSnapshot(sessionId)` hook (uiConversation binding → 'chat' target);
|
|
10
13
|
* - fallback: current DSH runtimes do not populate those fields, so the
|
|
11
14
|
* dock asks the Host bridge for the child's last `request/header` event
|
|
12
15
|
* (`subagentModel` endpoint) and caches the answer per child session.
|
|
@@ -14,26 +17,30 @@
|
|
|
14
17
|
* sessions render nothing, so the dock stays clean.
|
|
15
18
|
*
|
|
16
19
|
* The dock is an additive list slot declared by ui-conversation at runtime;
|
|
17
|
-
* we only contribute an occupant, never re-declare it.
|
|
18
|
-
*
|
|
20
|
+
* we only contribute an occupant, never re-declare it. The framework session
|
|
21
|
+
* standard kit (ui-session merge) supplies `useSession`/`sessionId`; the
|
|
22
|
+
* registration injects the RPC caller and the chat-snapshot hook.
|
|
19
23
|
*/
|
|
20
24
|
import type { ClientConnectionRpc } from '@deepseek-ai/dsh-client-connection/client';
|
|
21
|
-
import type {
|
|
25
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
26
|
+
import type { ChatSnapshot } from '@deepseek-ai/dsh-client-ui-chat/client';
|
|
22
27
|
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
23
|
-
/** Owner currency of the composer dock as ui-conversation declares it. */
|
|
24
|
-
export interface ComposerDockOwner {
|
|
25
|
-
readonly session: ConversationSnapshot | undefined;
|
|
26
|
-
readonly input: unknown;
|
|
27
|
-
}
|
|
28
28
|
/** Business face injected by the registration (client/index.ts). */
|
|
29
29
|
export interface SubagentModelDockInjected {
|
|
30
30
|
/** Generic RPC caller for the /subagent-director bridge channel. */
|
|
31
31
|
rpc: ClientConnectionRpc;
|
|
32
|
+
/**
|
|
33
|
+
* Alpha.4 chat-view snapshot hook: subscribes to the current session's
|
|
34
|
+
* `chat` Conversation target (uiConversation binding) and returns its
|
|
35
|
+
* snapshot, or undefined while no session is current / the target is
|
|
36
|
+
* unassembled. The transcript nodes live at `snapshot.legacy.nodes`.
|
|
37
|
+
*/
|
|
38
|
+
useChatSnapshot: (sessionId: SessionId | undefined) => ChatSnapshot | undefined;
|
|
32
39
|
}
|
|
33
|
-
/** Full props of the dock entry:
|
|
40
|
+
/** Full props of the dock entry: session kit + inject + locale. */
|
|
34
41
|
export type SubagentModelDockProps = PropsRuntime<'conversation.composer.dock'> & InjectFace<SubagentModelDockInjected> & PropsLocale<typeof NS>;
|
|
35
42
|
/** Locale namespace shared with the settings page (registered in index apply). */
|
|
36
43
|
export declare const NS: 'settings.subagentDirector';
|
|
37
44
|
/** Render the provider/model readout for an addressed subagent, or nothing. */
|
|
38
|
-
export declare function SubagentModelDock({
|
|
45
|
+
export declare function SubagentModelDock({ useSession, sessionId, rpc, useChatSnapshot, t, }: SubagentModelDockProps): React.JSX.Element | null;
|
|
39
46
|
//# sourceMappingURL=SubagentModelDock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubagentModelDock.d.ts","sourceRoot":"","sources":["../../src/client/SubagentModelDock.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SubagentModelDock.d.ts","sourceRoot":"","sources":["../../src/client/SubagentModelDock.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAErF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAgB9F,oEAAoE;AACpE,MAAM,WAAW,yBAAyB;IACxC,oEAAoE;IACpE,GAAG,EAAE,mBAAmB,CAAC;IACzB;;;;;OAKG;IACH,eAAe,EAAE,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,KAAK,YAAY,GAAG,SAAS,CAAC;CACjF;AAED,mEAAmE;AACnE,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,4BAA4B,CAAC,GAC7E,UAAU,CAAC,yBAAyB,CAAC,GACrC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;AAEzB,kFAAkF;AAClF,eAAO,MAAM,EAAE,EAAG,2BAAoC,CAAC;AA2BvD,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,EAChC,UAAU,EACV,SAAS,EACT,GAAG,EACH,eAAe,EACf,CAAC,GACF,EAAE,sBAAsB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA+EnD"}
|
|
@@ -7,7 +7,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
* addressed subagent child it shows the provider/model that child actually
|
|
8
8
|
* ran on:
|
|
9
9
|
* - fast path: the opened transcript's latest assistant message already
|
|
10
|
-
* records provenance/requestConfig (zero extra RPC — see subagent-model.ts)
|
|
10
|
+
* records provenance/requestConfig (zero extra RPC — see subagent-model.ts).
|
|
11
|
+
* On the alpha.4/alpha.5 host line the transcript nodes come from the
|
|
12
|
+
* chat view snapshot's `legacy.nodes` slice, read through the injected
|
|
13
|
+
* `useChatSnapshot(sessionId)` hook (uiConversation binding → 'chat' target);
|
|
11
14
|
* - fallback: current DSH runtimes do not populate those fields, so the
|
|
12
15
|
* dock asks the Host bridge for the child's last `request/header` event
|
|
13
16
|
* (`subagentModel` endpoint) and caches the answer per child session.
|
|
@@ -15,8 +18,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
15
18
|
* sessions render nothing, so the dock stays clean.
|
|
16
19
|
*
|
|
17
20
|
* The dock is an additive list slot declared by ui-conversation at runtime;
|
|
18
|
-
* we only contribute an occupant, never re-declare it.
|
|
19
|
-
*
|
|
21
|
+
* we only contribute an occupant, never re-declare it. The framework session
|
|
22
|
+
* standard kit (ui-session merge) supplies `useSession`/`sessionId`; the
|
|
23
|
+
* registration injects the RPC caller and the chat-snapshot hook.
|
|
20
24
|
*/
|
|
21
25
|
import { useEffect, useRef, useState } from 'react';
|
|
22
26
|
import { SUBAGENT_DIRECTOR_RPC_CHANNEL, SUBAGENT_DIRECTOR_RPC_MODEL, } from '../bridge-contract.js';
|
|
@@ -40,13 +44,16 @@ const style = {
|
|
|
40
44
|
},
|
|
41
45
|
};
|
|
42
46
|
/** Render the provider/model readout for an addressed subagent, or nothing. */
|
|
43
|
-
export function SubagentModelDock({
|
|
47
|
+
export function SubagentModelDock({ useSession, sessionId, rpc, useChatSnapshot, t, }) {
|
|
48
|
+
const session = useSession((s) => s);
|
|
49
|
+
const chat = useChatSnapshot(sessionId);
|
|
44
50
|
const [query, setQuery] = useState({ status: 'idle' });
|
|
45
51
|
const cache = useRef(new Map());
|
|
46
|
-
const
|
|
52
|
+
const nodes = chat?.legacy?.nodes;
|
|
53
|
+
const local = latestSubagentModel({ nodes: nodes ?? [] });
|
|
47
54
|
const childSessionId = session?.subagent?.address?.childSessionId;
|
|
48
|
-
const lastSeq =
|
|
49
|
-
?
|
|
55
|
+
const lastSeq = nodes !== undefined && nodes.length > 0
|
|
56
|
+
? nodes[nodes.length - 1].seq ?? 0
|
|
50
57
|
: 0;
|
|
51
58
|
useEffect(() => {
|
|
52
59
|
if (!isAddressedSubagent(session)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubagentModelDock.js","sourceRoot":"","sources":["../../src/client/SubagentModelDock.tsx"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"SubagentModelDock.js","sourceRoot":"","sources":["../../src/client/SubagentModelDock.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMpD,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,GAE5B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,GAGjB,MAAM,qBAAqB,CAAC;AAoB7B,kFAAkF;AAClF,MAAM,CAAC,MAAM,EAAE,GAAG,2BAAoC,CAAC;AAUvD,qFAAqF;AACrF,MAAM,KAAK,GAA2C;IACpD,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,CAAC;QACN,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,iCAAiC;KACzC;IACD,GAAG,EAAE;QACH,KAAK,EAAE,kCAAkC;QACzC,UAAU,EAAE,wCAAwC;KACrD;CACF,CAAC;AAEF,+EAA+E;AAC/E,MAAM,UAAU,iBAAiB,CAAC,EAChC,UAAU,EACV,SAAS,EACT,GAAG,EACH,eAAe,EACf,CAAC,GACsB;IACvB,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAkB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,IAAI,GAAG,eAAe,CAAC,SAAS,CA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,MAAM,YAAY,GAChB,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC1D,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IAErD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAClB,OAAO,CACL,cAAK,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAC,QAAQ,YAClC,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,GACtE,CACP,CAAC;IACJ,CAAC;IACD,MAAM,GAAG,GAAqB,MAAM,CAAC;IACrC,OAAO,CACL,eAAK,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAC,QAAQ,aACnC,yBAAO,CAAC,CAAC,YAAY,CAAC,GAAQ,EAC9B,eAAM,KAAK,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,YAChF,cAAc,CAAC,GAAG,CAAC,GACf,IACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SnapshotSelectorHook } from './bind.js';
|
|
2
|
-
import type { SessionListState } from '@deepseek-ai/dsh-
|
|
2
|
+
import type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client';
|
|
3
3
|
import type { SubagentDirectorKey } from './locales.js';
|
|
4
4
|
import type { SubagentOptionsState, SubagentOptionsStore } from './store.js';
|
|
5
5
|
/** Injected dependencies of {@link SubagentOptionsSection} (slot `inject`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubagentOptionsSection.d.ts","sourceRoot":"","sources":["../../src/client/SubagentOptionsSection.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SubagentOptionsSection.d.ts","sourceRoot":"","sources":["../../src/client/SubagentOptionsSection.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAGvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAkB7E,+EAA+E;AAC/E,MAAM,WAAW,8BAA8B;IAC3C,2EAA2E;IAC3E,UAAU,EAAE,oBAAoB,CAAC;IACjC,iDAAiD;IACjD,WAAW,EAAE,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;IACxD,oBAAoB;IACpB,CAAC,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,MAAM,CAAC;CAC3C;AAED,uEAAuE;AACvE,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC,8BAA8B,CAAC,GAAG;IAChF,6EAA6E;IAC7E,WAAW,CAAC,EAAE,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;CACxD,CAAC;AASF;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAI7F"}
|
package/lib/client/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClientContext
|
|
1
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
2
2
|
import { en, zh, type SubagentDirectorKey } from './locales.js';
|
|
3
3
|
import { SubagentOptionsStore } from './store.js';
|
|
4
4
|
/** Dictionary namespace owned by Subagent Director (bilingual, typed). */
|
|
@@ -9,29 +9,6 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
9
9
|
'settings.subagentDirector': SubagentDirectorKey;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Compile-time view of `conversation.composer.dock`: declared here only to
|
|
14
|
-
* strongly type our occupant. The runtime seat is owned by
|
|
15
|
-
* dsh-client-ui-conversation's bundle; this augmentation contributes no
|
|
16
|
-
* runtime declaration (it stays in this package's own module scope).
|
|
17
|
-
*/
|
|
18
|
-
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
19
|
-
interface SlotMap {
|
|
20
|
-
'conversation.composer.dock': {
|
|
21
|
-
kind: 'list';
|
|
22
|
-
scope: 'session';
|
|
23
|
-
owner: {
|
|
24
|
-
readonly session: ConversationSnapshot | undefined;
|
|
25
|
-
readonly input: unknown;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
/** Additive per-session header action row (ui-conversation seat). */
|
|
29
|
-
'conversation.session.header.actions': {
|
|
30
|
-
kind: 'list';
|
|
31
|
-
scope: 'session';
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
12
|
export { en, zh };
|
|
36
13
|
export type { SubagentDirectorKey } from './locales.js';
|
|
37
14
|
export type { SubagentOptionsSectionInjected, SubagentOptionsSectionProps } from './SubagentOptionsSection.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAepE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAA6B,MAAM,YAAY,CAAC;AAM7E,0EAA0E;AAC1E,eAAO,MAAM,EAAE,8BAA8B,CAAC;AAE9C,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAC1B,4CAA4C;QAC5C,2BAA2B,EAAE,mBAAmB,CAAC;KAClD;CACF;AAED,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAClB,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,YAAY,EAAE,8BAA8B,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC/G,YAAY,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAE7E,2DAA2D;AAC3D,wBAAgB,eAAe,CAAC,UAAU,EAAE,oBAAoB,GAAG,IAAI,CAGtE;AAED,4EAA4E;AAC5E,eAAO,MAAM,MAAM,UAA8C,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAyG9C"}
|
package/lib/client/index.js
CHANGED
|
@@ -5,7 +5,7 @@ window.__ModuleLoader__.load({
|
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
7
|
let react = require("react");
|
|
8
|
-
let
|
|
8
|
+
let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
//#region src/client/bind.ts
|
|
11
11
|
/**
|
|
@@ -35,7 +35,7 @@ window.__ModuleLoader__.load({
|
|
|
35
35
|
/** English dictionary ($subagentDirector). */
|
|
36
36
|
const en = {
|
|
37
37
|
"nav": "Subagent Director",
|
|
38
|
-
"sectionIntro": "Choose the LLM provider and model each subagent uses, and define role templates that bind a model and persona to a delegation.",
|
|
38
|
+
"sectionIntro": "Choose the LLM provider and model each subagent uses, and define role templates that bind a model and persona to a delegation. Only providers/models from the Subagent pool in plugin config (Plugins → Plugin Config → Subagent) can be selected.",
|
|
39
39
|
"defaultsHeading": "Default model",
|
|
40
40
|
"defaultsHint": "Used when a call or role does not name a provider/model.",
|
|
41
41
|
"noAllowedModels": "No authorized models yet. Select models in the official Subagent model-selection list (plugin settings → Subagent); picks here are limited to that list.",
|
|
@@ -106,7 +106,7 @@ window.__ModuleLoader__.load({
|
|
|
106
106
|
/** Chinese dictionary. */
|
|
107
107
|
const zh = {
|
|
108
108
|
"nav": "子代理导演",
|
|
109
|
-
"sectionIntro": "为每个子代理选择 LLM 供应商与模型,并以角色模板把模型与 persona
|
|
109
|
+
"sectionIntro": "为每个子代理选择 LLM 供应商与模型,并以角色模板把模型与 persona 绑定到每次委派。只能选择插件-插件配置-Subagent池里的提供商-模型。",
|
|
110
110
|
"defaultsHeading": "默认模型",
|
|
111
111
|
"defaultsHint": "当某次调用或角色未指定供应商/模型时使用。",
|
|
112
112
|
"noAllowedModels": "尚未配置已授权的模型。请先在官方 Subagent 模型选择列表(插件设置 → Subagent)中选择模型;此处只能从该列表中选择。",
|
|
@@ -406,7 +406,7 @@ window.__ModuleLoader__.load({
|
|
|
406
406
|
lastSessionId;
|
|
407
407
|
constructor(wire) {
|
|
408
408
|
this.wire = wire;
|
|
409
|
-
this.store = (0,
|
|
409
|
+
this.store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(initialSubagentOptionsState());
|
|
410
410
|
}
|
|
411
411
|
/**
|
|
412
412
|
* Call one bridge endpoint over the generic RPC channel. Returns the RpcResult
|
|
@@ -1779,9 +1779,10 @@ window.__ModuleLoader__.load({
|
|
|
1779
1779
|
//#region src/client/subagent-model.ts
|
|
1780
1780
|
/**
|
|
1781
1781
|
* Prefer the latest assistant message's reported provenance; fall back to its
|
|
1782
|
-
* requested config. Order walks the
|
|
1783
|
-
*
|
|
1784
|
-
*
|
|
1782
|
+
* requested config. Order walks the node list from the tail so we surface the
|
|
1783
|
+
* most recent completed request, which is the meaningful one when a subagent
|
|
1784
|
+
* retried or only partially ran. The input is the alpha.4 chat view's legacy
|
|
1785
|
+
* node slice (ChatSnapshot.legacy.nodes).
|
|
1785
1786
|
*/
|
|
1786
1787
|
function latestSubagentModel(snapshot) {
|
|
1787
1788
|
if (snapshot === null || typeof snapshot !== "object") return { found: false };
|
|
@@ -1816,7 +1817,8 @@ window.__ModuleLoader__.load({
|
|
|
1816
1817
|
* Whether this conversation is an addressed subagent (a catalog-discovered
|
|
1817
1818
|
* child) — the surface where the official read-only composer shows and where
|
|
1818
1819
|
* a model readout is most useful. A null `subagent` on an ordinary session
|
|
1819
|
-
* returns false even when nodes carry provenance.
|
|
1820
|
+
* returns false even when nodes carry provenance. Reads the alpha.4
|
|
1821
|
+
* SessionSnapshot.subagent address slot.
|
|
1820
1822
|
*/
|
|
1821
1823
|
function isAddressedSubagent(snapshot) {
|
|
1822
1824
|
if (snapshot === null || snapshot === void 0) return false;
|
|
@@ -1860,7 +1862,10 @@ window.__ModuleLoader__.load({
|
|
|
1860
1862
|
* addressed subagent child it shows the provider/model that child actually
|
|
1861
1863
|
* ran on:
|
|
1862
1864
|
* - fast path: the opened transcript's latest assistant message already
|
|
1863
|
-
* records provenance/requestConfig (zero extra RPC — see subagent-model.ts)
|
|
1865
|
+
* records provenance/requestConfig (zero extra RPC — see subagent-model.ts).
|
|
1866
|
+
* On the alpha.4/alpha.5 host line the transcript nodes come from the
|
|
1867
|
+
* chat view snapshot's `legacy.nodes` slice, read through the injected
|
|
1868
|
+
* `useChatSnapshot(sessionId)` hook (uiConversation binding → 'chat' target);
|
|
1864
1869
|
* - fallback: current DSH runtimes do not populate those fields, so the
|
|
1865
1870
|
* dock asks the Host bridge for the child's last `request/header` event
|
|
1866
1871
|
* (`subagentModel` endpoint) and caches the answer per child session.
|
|
@@ -1868,8 +1873,9 @@ window.__ModuleLoader__.load({
|
|
|
1868
1873
|
* sessions render nothing, so the dock stays clean.
|
|
1869
1874
|
*
|
|
1870
1875
|
* The dock is an additive list slot declared by ui-conversation at runtime;
|
|
1871
|
-
* we only contribute an occupant, never re-declare it.
|
|
1872
|
-
*
|
|
1876
|
+
* we only contribute an occupant, never re-declare it. The framework session
|
|
1877
|
+
* standard kit (ui-session merge) supplies `useSession`/`sessionId`; the
|
|
1878
|
+
* registration injects the RPC caller and the chat-snapshot hook.
|
|
1873
1879
|
*/
|
|
1874
1880
|
/** Inline styling using the shared token surface (no CSS pipeline; M2 deviation). */
|
|
1875
1881
|
const style$1 = {
|
|
@@ -1888,12 +1894,15 @@ window.__ModuleLoader__.load({
|
|
|
1888
1894
|
}
|
|
1889
1895
|
};
|
|
1890
1896
|
/** Render the provider/model readout for an addressed subagent, or nothing. */
|
|
1891
|
-
function SubagentModelDock({
|
|
1897
|
+
function SubagentModelDock({ useSession, sessionId, rpc, useChatSnapshot, t }) {
|
|
1898
|
+
const session = useSession((s) => s);
|
|
1899
|
+
const chat = useChatSnapshot(sessionId);
|
|
1892
1900
|
const [query, setQuery] = (0, react.useState)({ status: "idle" });
|
|
1893
1901
|
const cache = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
1894
|
-
const
|
|
1902
|
+
const nodes = chat?.legacy?.nodes;
|
|
1903
|
+
const local = latestSubagentModel({ nodes: nodes ?? [] });
|
|
1895
1904
|
const childSessionId = session?.subagent?.address?.childSessionId;
|
|
1896
|
-
const lastSeq =
|
|
1905
|
+
const lastSeq = nodes !== void 0 && nodes.length > 0 ? nodes[nodes.length - 1].seq ?? 0 : 0;
|
|
1897
1906
|
(0, react.useEffect)(() => {
|
|
1898
1907
|
if (!isAddressedSubagent(session)) {
|
|
1899
1908
|
setQuery({ status: "idle" });
|
|
@@ -1974,8 +1983,8 @@ window.__ModuleLoader__.load({
|
|
|
1974
1983
|
* released), on failure a short inline error shows the core message.
|
|
1975
1984
|
*
|
|
1976
1985
|
* The seat is a list slot declared by ui-conversation; the framework session
|
|
1977
|
-
* standard kit supplies `useSession`/`sessionId` (
|
|
1978
|
-
* the registration injects the RPC caller.
|
|
1986
|
+
* standard kit supplies `useSession`/`sessionId` (ui-session merge over the
|
|
1987
|
+
* alpha.4 SessionSnapshot), the registration injects the RPC caller.
|
|
1979
1988
|
*/
|
|
1980
1989
|
/** Inline styling using the shared token surface (no CSS pipeline; M2 deviation). */
|
|
1981
1990
|
const style = {
|
|
@@ -2062,6 +2071,21 @@ window.__ModuleLoader__.load({
|
|
|
2062
2071
|
}
|
|
2063
2072
|
//#endregion
|
|
2064
2073
|
//#region src/client/index.ts
|
|
2074
|
+
/**
|
|
2075
|
+
* Subagent Director — browser half (DSH client plugin).
|
|
2076
|
+
*
|
|
2077
|
+
* Registers the `settings.section` page that lets a user pick the default LLM
|
|
2078
|
+
* provider/model for subagents and manage role templates (each binds a persona
|
|
2079
|
+
* and optional provider/model to a delegation). Data flows through the
|
|
2080
|
+
* connection's wire API into a snapshot store; writes travel as path ops
|
|
2081
|
+
* through settings.mutate with an optimistic-revision lock.
|
|
2082
|
+
*
|
|
2083
|
+
* On the DSH alpha.4/alpha.5 host line the client context is the plain cordis
|
|
2084
|
+
* Context (the client service merges come from the imported client packages),
|
|
2085
|
+
* the store runtime is `@deepseek-ai/dsh-client-store`, and the composer-dock
|
|
2086
|
+
* readout reads the current session's chat-view snapshot through the
|
|
2087
|
+
* uiConversation binding (see SubagentModelDock).
|
|
2088
|
+
*/
|
|
2065
2089
|
/** Dictionary namespace owned by Subagent Director (bilingual, typed). */
|
|
2066
2090
|
const NS = "settings.subagentDirector";
|
|
2067
2091
|
/** Refetch the page snapshot only after its first load. */
|
|
@@ -2098,7 +2122,31 @@ window.__ModuleLoader__.load({
|
|
|
2098
2122
|
useSnapshot,
|
|
2099
2123
|
t
|
|
2100
2124
|
});
|
|
2101
|
-
const
|
|
2125
|
+
const chatSources = /* @__PURE__ */ new Map();
|
|
2126
|
+
const chatSource = (sessionId) => {
|
|
2127
|
+
let source = chatSources.get(sessionId);
|
|
2128
|
+
if (source === void 0) {
|
|
2129
|
+
const uiConversation = ctx.get("uiConversation");
|
|
2130
|
+
if (uiConversation === void 0) source = {
|
|
2131
|
+
getSnapshot: () => void 0,
|
|
2132
|
+
subscribe: () => () => {}
|
|
2133
|
+
};
|
|
2134
|
+
else {
|
|
2135
|
+
const target = uiConversation.binding(sessionId).target("chat");
|
|
2136
|
+
source = {
|
|
2137
|
+
getSnapshot: () => target.getSnapshot(),
|
|
2138
|
+
subscribe: (listener) => target.subscribe(listener)
|
|
2139
|
+
};
|
|
2140
|
+
}
|
|
2141
|
+
chatSources.set(sessionId, source);
|
|
2142
|
+
}
|
|
2143
|
+
return source;
|
|
2144
|
+
};
|
|
2145
|
+
const useChatSnapshot = (sessionId) => (0, react.useSyncExternalStore)((listener) => sessionId === void 0 ? () => {} : chatSource(sessionId).subscribe(listener), () => sessionId === void 0 ? void 0 : chatSource(sessionId).getSnapshot());
|
|
2146
|
+
const dockInjected = () => ({
|
|
2147
|
+
rpc: connection.rpc,
|
|
2148
|
+
useChatSnapshot
|
|
2149
|
+
});
|
|
2102
2150
|
const closeInjected = () => ({ rpc: connection.rpc });
|
|
2103
2151
|
ctx.effect(() => {
|
|
2104
2152
|
const refresh = () => refreshIfLoaded(controller);
|
package/lib/client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAe7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,EAAE,EAAE,EAAE,EAA4B,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAA6B,MAAM,YAAY,CAAC;AAE7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAA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CAAC,4BAA4B,EAAE,GAAG,EAAE,CAClD,GAAG,CAAC,KAAK,CAAC,QAAQ,CAChB;QACE,IAAI,EAAE,4BAA4B;QAClC,EAAE,EAAE,yBAAyB;QAC7B,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,MAAM,EAAE,YAAY;KACrB,EACD,iBAAiB,CAClB,CACF,CAAC;IAEF,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,qCAAqC,EAAE,GAAG,EAAE,CAC3D,GAAG,CAAC,KAAK,CAAC,QAAQ,CAChB;QACE,IAAI,EAAE,qCAAqC;QAC3C,EAAE,EAAE,yBAAyB;QAC7B,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,MAAM,EAAE,aAAa;KACtB,EACD,mBAAmB,CACpB,CACF,CAAC;AACJ,CAAC"}
|
package/lib/client/locales.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
/** English dictionary ($subagentDirector). */
|
|
8
8
|
export const en = {
|
|
9
9
|
"nav": "Subagent Director",
|
|
10
|
-
"sectionIntro": "Choose the LLM provider and model each subagent uses, and define role templates that bind a model and persona to a delegation.",
|
|
10
|
+
"sectionIntro": "Choose the LLM provider and model each subagent uses, and define role templates that bind a model and persona to a delegation. Only providers/models from the Subagent pool in plugin config (Plugins \u2192 Plugin Config \u2192 Subagent) can be selected.",
|
|
11
11
|
"defaultsHeading": "Default model",
|
|
12
12
|
"defaultsHint": "Used when a call or role does not name a provider/model.",
|
|
13
13
|
"noAllowedModels": "No authorized models yet. Select models in the official Subagent model-selection list (plugin settings \u2192 Subagent); picks here are limited to that list.",
|
|
@@ -78,7 +78,7 @@ export const en = {
|
|
|
78
78
|
/** Chinese dictionary. */
|
|
79
79
|
export const zh = {
|
|
80
80
|
"nav": "子代理导演",
|
|
81
|
-
"sectionIntro": "为每个子代理选择 LLM 供应商与模型,并以角色模板把模型与 persona
|
|
81
|
+
"sectionIntro": "为每个子代理选择 LLM 供应商与模型,并以角色模板把模型与 persona 绑定到每次委派。只能选择插件-插件配置-Subagent池里的提供商-模型。",
|
|
82
82
|
"defaultsHeading": "默认模型",
|
|
83
83
|
"defaultsHint": "当某次调用或角色未指定供应商/模型时使用。",
|
|
84
84
|
"noAllowedModels": "尚未配置已授权的模型。请先在官方 Subagent 模型选择列表(插件设置 → Subagent)中选择模型;此处只能从该列表中选择。",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.js","sourceRoot":"","sources":["../../src/client/locales.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAyEH,8CAA8C;AAC9C,MAAM,CAAC,MAAM,EAAE,GAAwC;IACrD,KAAK,EAAE,mBAAmB;IAC1B,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"locales.js","sourceRoot":"","sources":["../../src/client/locales.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAyEH,8CAA8C;AAC9C,MAAM,CAAC,MAAM,EAAE,GAAwC;IACrD,KAAK,EAAE,mBAAmB;IAC1B,cAAc,EAAE,8PAA8P;IAC9Q,iBAAiB,EAAE,eAAe;IAClC,cAAc,EAAE,0DAA0D;IAC1E,iBAAiB,EAAE,+JAA+J;IAClL,iBAAiB,EAAE,UAAU;IAC7B,cAAc,EAAE,OAAO;IACvB,wBAAwB,EAAE,kBAAkB;IAC5C,iBAAiB,EAAE,kBAAkB;IACrC,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,kBAAkB;IACrC,SAAS,EAAE,SAAS;IACpB,cAAc,EAAE,gBAAgB;IAChC,WAAW,EAAE,6FAA6F;IAC1G,SAAS,EAAE,UAAU;IACrB,YAAY,EAAE,6EAA6E;IAC3F,QAAQ,EAAE,SAAS;IACnB,iBAAiB,EAAE,cAAc;IACjC,iBAAiB,EAAE,qBAAqB;IACxC,aAAa,EAAE,SAAS;IACxB,gBAAgB,EAAE,gBAAgB;IAClC,kBAAkB,EAAE,SAAS;IAC7B,YAAY,EAA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AA6B;IAC/C,gBAAgB,EAAE,cAAc;IAChC,iBAAiB,EAAE,OAAO;IAC1B,kBAAkB,EAAE,OAAO;IAC3B,qBAAqB,EAAE,IAAI;IAC3B,uBAAuB,EAAE,KAAK;IAC9B,iBAAiB,EAAE,wBAAwB;IAC3C,kBAAkB,EAAE,IAAI;IACxB,oBAAoB,EAAE,IAAI;IAC1B,mBAAmB,EAAE,YAAY;IACjC,aAAa,EAAE,OAAO;IACtB,eAAe,EAAE,sCAAsC;IACvD,mBAAmB,EAAE,4EAA4E;IACjG,YAAY,EAAE,UAAU;IACxB,kBAAkB,EAAE,YAAY;IAChC,kBAAkB,EAAE,aAAa;IACjC,iBAAiB,EAAE,cAAc;IACjC,kBAAkB,EAAE,SAAS;IAC7B,uBAAuB,EAAE,mBAAmB;IAC5C,oBAAoB,EAAE,OAAO;IAC7B,gBAAgB,EAAE,KAAK;IACvB,yBAAyB,EAAE,gDAAgD;IAC3E,aAAa,EAAE,gBAAgB;CAChC,CAAC"}
|
package/lib/client/store.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import type { ClientConnectionRpc } from '@deepseek-ai/dsh-client-connection/cli
|
|
|
16
16
|
import type { SettingsNamespaceView } from '@deepseek-ai/dsh-host-apiproxy/api';
|
|
17
17
|
import { type DirectorAllowedRoute } from '../bridge-contract.js';
|
|
18
18
|
import type { SubagentDirectorKey } from './locales.js';
|
|
19
|
-
import { type SnapshotStore } from '@deepseek-ai/dsh-client-
|
|
19
|
+
import { type SnapshotStore } from '@deepseek-ai/dsh-client-store';
|
|
20
20
|
import { type DefaultModelEdits, type MutationErrorKind, type RoleDraft, type StoredRole, type StoredSection } from './store-logic.js';
|
|
21
21
|
/** The settings namespace this page reads and writes. */
|
|
22
22
|
export declare const SUBAGENT_DIRECTOR_NS = "subagent-director";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/client/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;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,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAGvE;IAEK,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAG1G;IAEK,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAIxD;IAEK,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAG5D;IAEK,eAAe,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAI3E;IAEK,eAAe,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAInD;CACF;AAED,iEAAiE;AACjE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B"}
|
package/lib/client/store.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SUBAGENT_DIRECTOR_RPC_CHANNEL, SUBAGENT_DIRECTOR_RPC_VIEW, SUBAGENT_DIRECTOR_RPC_MUTATE, SUBAGENT_DIRECTOR_RPC_TOOLS, SUBAGENT_DIRECTOR_RPC_CATALOG, } from '../bridge-contract.js';
|
|
2
|
-
import { createSnapshotStore } from '@deepseek-ai/dsh-client-
|
|
2
|
+
import { createSnapshotStore } from '@deepseek-ai/dsh-client-store';
|
|
3
3
|
import { addRoleOps, classifyMutateError, defaultModelOps, removeRoleOps, restoreDefaultsOps, setDefaultRoleOps, updateRoleOps, } from './store-logic.js';
|
|
4
4
|
/** The settings namespace this page reads and writes. */
|
|
5
5
|
export const SUBAGENT_DIRECTOR_NS = 'subagent-director';
|
package/lib/client/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/client/store.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,6BAA6B,GAK9B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/client/store.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,6BAA6B,GAK9B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAsB,MAAM,+BAA+B,CAAC;AACxF,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,GAMd,MAAM,kBAAkB,CAAC;AAE1B,yDAAyD;AACzD,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC;AA8BxD,8BAA8B;AAC9B,MAAM,UAAU,2BAA2B;IACzC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,SAAS;QACpB,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,CAAC;QACX,qBAAqB,EAAE,KAAK;QAC5B,aAAa,EAAE,EAAE;QACjB,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,KAAK;KACf,CAAC;AACJ,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,SAAS,CAAC,KAAc;IACtC,IAAI,KAAK,YAAY,KAAK;QAAE,OAAO,KAAK,CAAC,OAAO,CAAC;IACjD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3D,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AC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;IAChD,CAAC;CACF"}
|
|
@@ -2,15 +2,21 @@
|
|
|
2
2
|
* Subagent Director — M3b observability pure logic.
|
|
3
3
|
*
|
|
4
4
|
* Extracts the provider/model a subagent actually ran on, straight from an
|
|
5
|
-
* opened subagent conversation
|
|
6
|
-
*
|
|
5
|
+
* opened subagent conversation with zero extra RPC: each finalized assistant
|
|
6
|
+
* message may carry a reported `provenance` (the adapter-reported
|
|
7
7
|
* provider/model) and the `requestConfig` that was requested. We take the
|
|
8
8
|
* latest assistant message that exposes either, preferring the reported
|
|
9
9
|
* provenance over the requested config, and format a localized readout.
|
|
10
10
|
*
|
|
11
|
+
* On the DSH alpha.4/alpha.5 host line the node list is the chat view's
|
|
12
|
+
* `legacy.nodes` slice (ChatSnapshot.legacy.nodes) and the addressed-subagent
|
|
13
|
+
* guard reads the SessionSnapshot.subagent address — both shapes are the
|
|
14
|
+
* inputs of the pure functions below.
|
|
15
|
+
*
|
|
11
16
|
* Pure and framework-free so the formatting rules are unit-testable.
|
|
12
17
|
*/
|
|
13
|
-
import type { AssistantMessageNode,
|
|
18
|
+
import type { AssistantMessageNode, ConversationNode } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
19
|
+
import type { SessionSnapshot } from '@deepseek-ai/dsh-api-session-controller/client';
|
|
14
20
|
/** The durable provider/model identity of one subagent run. */
|
|
15
21
|
export interface SubagentModelRef {
|
|
16
22
|
readonly found: true;
|
|
@@ -24,20 +30,24 @@ export interface NoSubagentModel {
|
|
|
24
30
|
export type SubagentModelLookup = SubagentModelRef | NoSubagentModel;
|
|
25
31
|
/**
|
|
26
32
|
* Prefer the latest assistant message's reported provenance; fall back to its
|
|
27
|
-
* requested config. Order walks the
|
|
28
|
-
*
|
|
29
|
-
*
|
|
33
|
+
* requested config. Order walks the node list from the tail so we surface the
|
|
34
|
+
* most recent completed request, which is the meaningful one when a subagent
|
|
35
|
+
* retried or only partially ran. The input is the alpha.4 chat view's legacy
|
|
36
|
+
* node slice (ChatSnapshot.legacy.nodes).
|
|
30
37
|
*/
|
|
31
|
-
export declare function latestSubagentModel(snapshot:
|
|
38
|
+
export declare function latestSubagentModel(snapshot: {
|
|
39
|
+
nodes: readonly ConversationNode[];
|
|
40
|
+
}): SubagentModelLookup;
|
|
32
41
|
/** Resolve the model identity off one assistant message (provenance first). */
|
|
33
42
|
export declare function provenanceOf(assistant: AssistantMessageNode): SubagentModelRef | null;
|
|
34
43
|
/**
|
|
35
44
|
* Whether this conversation is an addressed subagent (a catalog-discovered
|
|
36
45
|
* child) — the surface where the official read-only composer shows and where
|
|
37
46
|
* a model readout is most useful. A null `subagent` on an ordinary session
|
|
38
|
-
* returns false even when nodes carry provenance.
|
|
47
|
+
* returns false even when nodes carry provenance. Reads the alpha.4
|
|
48
|
+
* SessionSnapshot.subagent address slot.
|
|
39
49
|
*/
|
|
40
|
-
export declare function isAddressedSubagent(snapshot: Pick<
|
|
50
|
+
export declare function isAddressedSubagent(snapshot: Pick<SessionSnapshot, 'subagent'> | null | undefined): boolean;
|
|
41
51
|
/**
|
|
42
52
|
* Compact provider/model label, e.g. "deepseek/deepseek-v4-flash". The model
|
|
43
53
|
* id can already include a provider prefix; we do not hyphenate or re-quote
|
|
@@ -49,7 +59,7 @@ export declare function formatModelRef(ref: SubagentModelRef): string;
|
|
|
49
59
|
* "release sustained state" control is meaningful). Reads the catalog
|
|
50
60
|
* address's mode; ordinary sessions and one-shot children are false.
|
|
51
61
|
*/
|
|
52
|
-
export declare function isContinuableChild(snapshot: Pick<
|
|
62
|
+
export declare function isContinuableChild(snapshot: Pick<SessionSnapshot, 'subagent'> | null | undefined): boolean;
|
|
53
63
|
/**
|
|
54
64
|
* Merge a local snapshot-derived lookup with a remote (RPC) lookup: the local
|
|
55
65
|
* provenance wins when present (the runtime's own record), otherwise the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-model.d.ts","sourceRoot":"","sources":["../../src/client/subagent-model.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"subagent-model.d.ts","sourceRoot":"","sources":["../../src/client/subagent-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,oBAAoB,EAEpB,gBAAgB,EACjB,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAEtF,+DAA+D;AAC/D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;CACvB;AAED,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAErE;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE;IAAE,KAAK,EAAE,SAAS,gBAAgB,EAAE,CAAA;CAAE,GAC/C,mBAAmB,CAerB;AAED,+EAA+E;AAC/E,wBAAgB,YAAY,CAC1B,SAAS,EAAE,oBAAoB,GAC9B,gBAAgB,GAAG,IAAI,CAwBzB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG,IAAI,GAAG,SAAS,GAC7D,OAAO,CAIT;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,gBAAgB,GAAG,MAAM,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG,IAAI,GAAG,SAAS,GAC7D,OAAO,CAIT;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,mBAAmB,GAC1B,mBAAmB,CAErB"}
|
|
@@ -2,19 +2,25 @@
|
|
|
2
2
|
* Subagent Director — M3b observability pure logic.
|
|
3
3
|
*
|
|
4
4
|
* Extracts the provider/model a subagent actually ran on, straight from an
|
|
5
|
-
* opened subagent conversation
|
|
6
|
-
*
|
|
5
|
+
* opened subagent conversation with zero extra RPC: each finalized assistant
|
|
6
|
+
* message may carry a reported `provenance` (the adapter-reported
|
|
7
7
|
* provider/model) and the `requestConfig` that was requested. We take the
|
|
8
8
|
* latest assistant message that exposes either, preferring the reported
|
|
9
9
|
* provenance over the requested config, and format a localized readout.
|
|
10
10
|
*
|
|
11
|
+
* On the DSH alpha.4/alpha.5 host line the node list is the chat view's
|
|
12
|
+
* `legacy.nodes` slice (ChatSnapshot.legacy.nodes) and the addressed-subagent
|
|
13
|
+
* guard reads the SessionSnapshot.subagent address — both shapes are the
|
|
14
|
+
* inputs of the pure functions below.
|
|
15
|
+
*
|
|
11
16
|
* Pure and framework-free so the formatting rules are unit-testable.
|
|
12
17
|
*/
|
|
13
18
|
/**
|
|
14
19
|
* Prefer the latest assistant message's reported provenance; fall back to its
|
|
15
|
-
* requested config. Order walks the
|
|
16
|
-
*
|
|
17
|
-
*
|
|
20
|
+
* requested config. Order walks the node list from the tail so we surface the
|
|
21
|
+
* most recent completed request, which is the meaningful one when a subagent
|
|
22
|
+
* retried or only partially ran. The input is the alpha.4 chat view's legacy
|
|
23
|
+
* node slice (ChatSnapshot.legacy.nodes).
|
|
18
24
|
*/
|
|
19
25
|
export function latestSubagentModel(snapshot) {
|
|
20
26
|
if (snapshot === null || typeof snapshot !== 'object') {
|
|
@@ -62,7 +68,8 @@ export function provenanceOf(assistant) {
|
|
|
62
68
|
* Whether this conversation is an addressed subagent (a catalog-discovered
|
|
63
69
|
* child) — the surface where the official read-only composer shows and where
|
|
64
70
|
* a model readout is most useful. A null `subagent` on an ordinary session
|
|
65
|
-
* returns false even when nodes carry provenance.
|
|
71
|
+
* returns false even when nodes carry provenance. Reads the alpha.4
|
|
72
|
+
* SessionSnapshot.subagent address slot.
|
|
66
73
|
*/
|
|
67
74
|
export function isAddressedSubagent(snapshot) {
|
|
68
75
|
if (snapshot === null || snapshot === undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-model.js","sourceRoot":"","sources":["../../src/client/subagent-model.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"subagent-model.js","sourceRoot":"","sources":["../../src/client/subagent-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAuBH;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,QAAgD;IAEhD,IAAI,QAAQ,KAAK,IAAI,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACtD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC1B,CAAC;IACD,MAAM,KAAK,GAA4C,QAAQ,CAAC,KAAK,CAAC;IACtE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IACnD,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;YAAE,SAAS;QACxD,IAAK,IAA2B,CAAC,IAAI,KAAK,WAAW;YAAE,SAAS;QAChE,MAAM,SAAS,GAAG,IAA4B,CAAC;QAC/C,MAAM,GAAG,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;QACpC,IAAI,GAAG,KAAK,IAAI;YAAE,OAAO,GAAG,CAAC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IAAI,QAAQ,KAAK,SAAS,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,GAAqB;IAClD,OAAO,GAAG,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAChC,QAA8D;IAE9D,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3C,OAAO,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,aAAa,CAAC;AACrF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAA0B,EAC1B,MAA2B;IAE3B,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* close_subagent lifecycle tool (issue #1).
|
|
3
|
+
*
|
|
4
|
+
* A model-facing tool that lets the calling agent close/release one resident
|
|
5
|
+
* continuable subagent it started: a thin adapter over
|
|
6
|
+
* ctx.subagents.drainContinuableChildren(parent, [subagent_id]), mirroring how
|
|
7
|
+
* the core's interrupt_agent adapts ctx.subagents.interrupt() (see
|
|
8
|
+
* @deepseek-ai/dsh-tool-subagent-control). Lifecycle authority stays with the
|
|
9
|
+
* subagent service — the tool only forwards the exact calling agent as the
|
|
10
|
+
* parent and performs no routing of its own.
|
|
11
|
+
*
|
|
12
|
+
* Semantics (documented by drainContinuableChildren): absent targets and a
|
|
13
|
+
* manager-less composition are accepted no-ops; a resident child owned by a
|
|
14
|
+
* different parent is rejected with a SubagentError `UNAUTHORIZED`. Unlike
|
|
15
|
+
* interrupt_agent this is teardown: the released child no longer stays
|
|
16
|
+
* resident and cannot be resumed with send_message afterwards, so its memory
|
|
17
|
+
* and session context are freed before the parent session ends.
|
|
18
|
+
*
|
|
19
|
+
* The tool is registered unconditionally (like the core control tools) —
|
|
20
|
+
* drainContinuableChildren is a no-op in one-shot compositions — and
|
|
21
|
+
* registerCloseSubagent guards against duplicate registration so several
|
|
22
|
+
* plugin instances (distinct toolName) share one close_subagent.
|
|
23
|
+
*/
|
|
24
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
25
|
+
import { type ToolDefinition } from '@deepseek-ai/dsh-tools';
|
|
26
|
+
/** The canonical model-visible tool name (mirrors interrupt_agent naming). */
|
|
27
|
+
export declare const CLOSE_SUBAGENT_TOOL_NAME = "close_subagent";
|
|
28
|
+
/** The model-facing arguments: the durable id of the continuable child to release. */
|
|
29
|
+
export interface CloseSubagentArgs {
|
|
30
|
+
/** The subagent id returned when the background subagent was started. */
|
|
31
|
+
subagent_id: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Build the model-facing parameter schema. Exposed as a pure function so unit
|
|
35
|
+
* tests can assert the model-visible shape without a live context. The literal
|
|
36
|
+
* return type (via `satisfies`) lets defineTool infer the validated args shape.
|
|
37
|
+
*/
|
|
38
|
+
export declare function createCloseSubagentParameters(): {
|
|
39
|
+
subagent_id: {
|
|
40
|
+
type: "string";
|
|
41
|
+
required: true;
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
/** The model-facing output schema: a closed object confirming the release. */
|
|
46
|
+
export declare function createCloseSubagentOutputSchema(): {
|
|
47
|
+
type: "object";
|
|
48
|
+
additionalProperties: false;
|
|
49
|
+
properties: {
|
|
50
|
+
closed: {
|
|
51
|
+
type: "boolean";
|
|
52
|
+
required: true;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
/** Pure renderer for a close_subagent result (extracted for unit testing). */
|
|
57
|
+
export declare function renderCloseResult(args: CloseSubagentArgs, _value: unknown): string;
|
|
58
|
+
/**
|
|
59
|
+
* Create the close_subagent ToolDefinition for one mounted context. execute
|
|
60
|
+
* releases the named resident continuable direct child of the exact calling
|
|
61
|
+
* agent via ctx.subagents.drainContinuableChildren; the service authorizes the
|
|
62
|
+
* exact live caller, so the tool adds no authority of its own.
|
|
63
|
+
*/
|
|
64
|
+
export declare function createCloseSubagentTool(ctx: Context): ToolDefinition;
|
|
65
|
+
/**
|
|
66
|
+
* Register close_subagent once per context. Returns the registry disposer, or
|
|
67
|
+
* undefined when a tool with the same name is already registered (a second
|
|
68
|
+
* plugin instance with a distinct delegation toolName must not double-register
|
|
69
|
+
* the shared control tool).
|
|
70
|
+
*/
|
|
71
|
+
export declare function registerCloseSubagent(ctx: Context): (() => void) | undefined;
|
|
72
|
+
//# sourceMappingURL=close-subagent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"close-subagent.d.ts","sourceRoot":"","sources":["../src/close-subagent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAAwC,KAAK,cAAc,EAAwB,MAAM,wBAAwB,CAAC;AAEzH,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AAKzD,sFAAsF;AACtF,MAAM,WAAW,iBAAiB;IAChC,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B;;;;;;EAQ5C;AAED,8EAA8E;AAC9E,wBAAgB,+BAA+B;;;;;;;;;EAQ9C;AAED,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,CAElF;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,cAAc,CAqBpE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAG5E"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { SessionId } from '@deepseek-ai/dsh-session';
|
|
2
|
+
import { defineTool } from '@deepseek-ai/dsh-tools';
|
|
3
|
+
/** The canonical model-visible tool name (mirrors interrupt_agent naming). */
|
|
4
|
+
export const CLOSE_SUBAGENT_TOOL_NAME = 'close_subagent';
|
|
5
|
+
/** The canonical error prefix used across structured failures (FR-8.1 convention). */
|
|
6
|
+
const ERROR_PREFIX = 'subagent-director:';
|
|
7
|
+
/**
|
|
8
|
+
* Build the model-facing parameter schema. Exposed as a pure function so unit
|
|
9
|
+
* tests can assert the model-visible shape without a live context. The literal
|
|
10
|
+
* return type (via `satisfies`) lets defineTool infer the validated args shape.
|
|
11
|
+
*/
|
|
12
|
+
export function createCloseSubagentParameters() {
|
|
13
|
+
return {
|
|
14
|
+
subagent_id: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
required: true,
|
|
17
|
+
description: 'The subagent id returned when the background subagent was started (see list_agents for resident ids).',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** The model-facing output schema: a closed object confirming the release. */
|
|
22
|
+
export function createCloseSubagentOutputSchema() {
|
|
23
|
+
return {
|
|
24
|
+
type: 'object',
|
|
25
|
+
additionalProperties: false,
|
|
26
|
+
properties: {
|
|
27
|
+
closed: { type: 'boolean', required: true },
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/** Pure renderer for a close_subagent result (extracted for unit testing). */
|
|
32
|
+
export function renderCloseResult(args, _value) {
|
|
33
|
+
return `closed subagent ${args.subagent_id}`;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create the close_subagent ToolDefinition for one mounted context. execute
|
|
37
|
+
* releases the named resident continuable direct child of the exact calling
|
|
38
|
+
* agent via ctx.subagents.drainContinuableChildren; the service authorizes the
|
|
39
|
+
* exact live caller, so the tool adds no authority of its own.
|
|
40
|
+
*/
|
|
41
|
+
export function createCloseSubagentTool(ctx) {
|
|
42
|
+
return defineTool({
|
|
43
|
+
name: CLOSE_SUBAGENT_TOOL_NAME,
|
|
44
|
+
description: 'Close/release a resident continuable subagent by its subagent id, freeing its memory and session context. ' +
|
|
45
|
+
'The target must be a direct continuable child of the exact calling agent: absent or already-released ids are accepted no-ops, ' +
|
|
46
|
+
'and a resident child owned by another parent is rejected. ' +
|
|
47
|
+
'This is teardown, not interrupt — the released child no longer stays resident and cannot be resumed with `send_message` afterwards. ' +
|
|
48
|
+
'Use `list_agents` to see which subagents are still resident.',
|
|
49
|
+
parameters: createCloseSubagentParameters(),
|
|
50
|
+
output: {
|
|
51
|
+
schema: createCloseSubagentOutputSchema(),
|
|
52
|
+
render: (args, value) => [{ type: 'text', text: renderCloseResult(args, value) }],
|
|
53
|
+
},
|
|
54
|
+
async execute(args, exec) {
|
|
55
|
+
const parent = exec.agent;
|
|
56
|
+
if (!parent)
|
|
57
|
+
throw new Error(`${ERROR_PREFIX} close_subagent requires a calling agent (exec.agent was undefined)`);
|
|
58
|
+
await ctx.subagents.drainContinuableChildren(parent, [SessionId(args.subagent_id)]);
|
|
59
|
+
return { closed: true };
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Register close_subagent once per context. Returns the registry disposer, or
|
|
65
|
+
* undefined when a tool with the same name is already registered (a second
|
|
66
|
+
* plugin instance with a distinct delegation toolName must not double-register
|
|
67
|
+
* the shared control tool).
|
|
68
|
+
*/
|
|
69
|
+
export function registerCloseSubagent(ctx) {
|
|
70
|
+
if (ctx.tools.get(CLOSE_SUBAGENT_TOOL_NAME) !== undefined)
|
|
71
|
+
return undefined;
|
|
72
|
+
return ctx.tools.register(createCloseSubagentTool(ctx));
|
|
73
|
+
}
|
|
74
|
+
//# sourceM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I,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,IAAyB,EAAE,KAAK,CAAC,EAAE,CAAC;SACvG;QACD,KAAK,CAAC,OAAO,CAAC,IAAuB,EAAE,IAAI;YACzC,MAAM,MAAM,GAAsB,IAAI,CAAC,KAAK,CAAC;YAC7C,IAAI,CAAC,MAAM;gBAAE,MAAM,IAAI,KAAK,CAAC,GAAG,YAAY,qEAAqE,CAAC,CAAC;YACnH,MAAM,GAAG,CAAC,SAAS,CAAC,wBAAwB,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACpF,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC1B,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,GAAY;IAChD,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,wBAAwB,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC5E,OAAO,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default route seam (design: 默认模型兜底).
|
|
3
|
+
*
|
|
4
|
+
* Makes the plugin's configured `defaultProvider`/`defaultModel` apply to ANY
|
|
5
|
+
* subagent start that did not carry an explicit `agentOptions` — including
|
|
6
|
+
* starts initiated by the built-in `subagent` / `subagent_fork` tools, not just
|
|
7
|
+
* the plugin's own `subagent_role`. This closes the gap where the model picks
|
|
8
|
+
* the built-in tool and the configured defaults never take effect.
|
|
9
|
+
*
|
|
10
|
+
* Layering: explicit `agentOptions` (even partial) always wins; the seam is a
|
|
11
|
+
* best-effort default. An un-routable default provider falls back to
|
|
12
|
+
* inheritance and never throws, so a bad default cannot break built-in
|
|
13
|
+
* delegation; the strict `fallbackOnInvalid` error semantics remain the
|
|
14
|
+
* property of `subagent_role`'s explicit path (route-resolver.ts).
|
|
15
|
+
*/
|
|
16
|
+
import type { AgentOptions } from '@deepseek-ai/dsh-agent';
|
|
17
|
+
import type { ContinuableStart, ContinuableStartSpec, SubagentRun, SubagentStartRequest } from '@deepseek-ai/dsh-subagent';
|
|
18
|
+
import type { SubagentDirectorSettings } from './route-resolver.js';
|
|
19
|
+
export interface SeamResolveInput {
|
|
20
|
+
agentOptions?: AgentOptions;
|
|
21
|
+
settings: SubagentDirectorSettings;
|
|
22
|
+
isRoutable?: (provider: string) => boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function resolveSeamAgentOptions(input: SeamResolveInput): Pick<AgentOptions, 'provider' | 'model'> | undefined;
|
|
25
|
+
/** The subset of the subagent service the seam wraps. */
|
|
26
|
+
export interface SubagentsSeam {
|
|
27
|
+
start(name: string, request: SubagentStartRequest): Promise<SubagentRun>;
|
|
28
|
+
startContinuable(spec: ContinuableStartSpec): Promise<ContinuableStart>;
|
|
29
|
+
}
|
|
30
|
+
/** Structural context the seam needs; keeps the wrapper unit-testable. */
|
|
31
|
+
export interface DefaultRouteSeamContext {
|
|
32
|
+
get(name: string): unknown;
|
|
33
|
+
logger: {
|
|
34
|
+
info(message: string): void;
|
|
35
|
+
warn(message: string): void;
|
|
36
|
+
};
|
|
37
|
+
subagents: SubagentsSeam;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Wrap `ctx.subagents.start` / `startContinuable` so a subagent start without
|
|
41
|
+
* explicit `agentOptions` receives the configured defaults. Returns a disposer
|
|
42
|
+
* that restores the original methods (registered via `ctx.effect` by the
|
|
43
|
+
* caller, so it runs when the plugin fiber unloads).
|
|
44
|
+
*/
|
|
45
|
+
export declare function applyDefaultRouteSeam(ctx: DefaultRouteSeamContext, getSettings: () => SubagentDirectorSettings): () => void;
|
|
46
|
+
//# sourceMappingURL=default-route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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 -0,0 +1,56 @@
|
|
|
1
|
+
function isEmpty(value) {
|
|
2
|
+
return value === undefined || value === '';
|
|
3
|
+
}
|
|
4
|
+
export function resolveSeamAgentOptions(input) {
|
|
5
|
+
const { agentOptions, settings, isRoutable } = input;
|
|
6
|
+
if (agentOptions !== undefined && (agentOptions.provider !== undefined || agentOptions.model !== undefined)) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
const provider = settings.defaultProvider;
|
|
10
|
+
const model = settings.defaultModel;
|
|
11
|
+
if (isEmpty(provider) || isEmpty(model))
|
|
12
|
+
return undefined;
|
|
13
|
+
if (isRoutable !== undefined && !isRoutable(provider))
|
|
14
|
+
return undefined;
|
|
15
|
+
return { provider, model };
|
|
16
|
+
}
|
|
17
|
+
function makeIsRoutable(ctx) {
|
|
18
|
+
const llm = ctx.get('llm');
|
|
19
|
+
if (llm === undefined)
|
|
20
|
+
return undefined;
|
|
21
|
+
return (provider) => llm.listProviders().some((entry) => entry.id === provider);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Wrap `ctx.subagents.start` / `startContinuable` so a subagent start without
|
|
25
|
+
* explicit `agentOptions` receives the configured defaults. Returns a disposer
|
|
26
|
+
* that restores the original methods (registered via `ctx.effect` by the
|
|
27
|
+
* caller, so it runs when the plugin fiber unloads).
|
|
28
|
+
*/
|
|
29
|
+
export function applyDefaultRouteSeam(ctx, getSettings) {
|
|
30
|
+
const subagents = ctx.subagents;
|
|
31
|
+
const originalStart = subagents.start;
|
|
32
|
+
const originalStartContinuable = subagents.startContinuable;
|
|
33
|
+
const isRoutable = makeIsRoutable(ctx);
|
|
34
|
+
const resolve = (request) => resolveSeamAgentOptions({ agentOptions: request.agentOptions, settings: getSettings(), isRoutable });
|
|
35
|
+
subagents.start = (name, request) => {
|
|
36
|
+
const agentOptions = resolve(request);
|
|
37
|
+
if (agentOptions !== undefined) {
|
|
38
|
+
ctx.logger.info(`[subagent-director] default route seam: applying ${agentOptions.provider}/${agentOptions.model} to ${name} subagent`);
|
|
39
|
+
return originalStart.call(subagents, name, { ...request, agentOptions });
|
|
40
|
+
}
|
|
41
|
+
return originalStart.call(subagents, name, request);
|
|
42
|
+
};
|
|
43
|
+
subagents.startContinuable = (spec) => {
|
|
44
|
+
const agentOptions = resolve(spec.request);
|
|
45
|
+
if (agentOptions !== undefined) {
|
|
46
|
+
ctx.logger.info(`[subagent-director] default route seam: applying ${agentOptions.provider}/${agentOptions.model} to continuable subagent`);
|
|
47
|
+
return originalStartContinuable.call(subagents, { ...spec, request: { ...spec.request, agentOptions } });
|
|
48
|
+
}
|
|
49
|
+
return originalStartContinuable.call(subagents, spec);
|
|
50
|
+
};
|
|
51
|
+
return () => {
|
|
52
|
+
subagents.start = originalStart;
|
|
53
|
+
subagents.startContinuable = originalStartContinuable;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=default-route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-route.js","sourceRoot":"","sources":["../src/default-route.ts"],"names":[],"mappings":"AA8BA,SAAS,OAAO,CAAC,KAAyB;IACxC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,KAAuB;IAC7D,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IACrD,IAAI,YAAY,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,QAAQ,KAAK,SAAS,IAAI,YAAY,CAAC,KAAK,KAAK,SAAS,CAAC,EAAE,CAAC;QAC5G,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,eAAe,CAAC;IAC1C,MAAM,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC;IACpC,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,SA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Aa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;QAC3E,CAAC;QACD,OAAO,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC,CAAC;IAEF,SAAS,CAAC,gBAAgB,GAAG,CAAC,IAAI,EAAE,EAAE;QACpC,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3C,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YAC/B,GAAG,CAAC,MAAM,CAAC,IAAI,CACb,oDAAoD,YAAY,CAAC,QAAQ,IAAI,YAAY,CAAC,KAAK,0BAA0B,CAC1H,CAAC;YACF,OAAO,wBAAwB,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;QAC3G,CAAC;QACD,OAAO,wBAAwB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC,CAAC;IAEF,OAAO,GAAG,EAAE;QACV,SAAS,CAAC,KAAK,GAAG,aAAa,CAAC;QAChC,SAAS,CAAC,gBAAgB,GAAG,wBAAwB,CAAC;IACxD,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-subagent-director",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.2",
|
|
4
4
|
"description": "Subagent Director: choose an LLM provider/model for each subagent (call args > role binding > plugin default > inherit parent) and plan main-agent/subagent responsibilities with role templates, plus a settings UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -73,8 +73,14 @@
|
|
|
73
73
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
74
74
|
"@deepseek-ai/dsh-agent": "^0.1.2-alpha.4",
|
|
75
75
|
"@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.4",
|
|
76
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.4",
|
|
77
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.2-alpha.4",
|
|
76
78
|
"@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.4",
|
|
77
|
-
"@deepseek-ai/dsh-client-
|
|
79
|
+
"@deepseek-ai/dsh-client-store": "^0.1.2-alpha.4",
|
|
80
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.1.2-alpha.4",
|
|
81
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.2-alpha.4",
|
|
82
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.4",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.2-alpha.4",
|
|
78
84
|
"@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.4",
|
|
79
85
|
"@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.4",
|
|
80
86
|
"@deepseek-ai/dsh-host-apiproxy": "^0.1.1-rc.2",
|
|
@@ -91,9 +97,15 @@
|
|
|
91
97
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
92
98
|
"@deepseek-ai/dsh-agent": "^0.1.2-alpha.4",
|
|
93
99
|
"@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.4",
|
|
100
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.4",
|
|
101
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.2-alpha.4",
|
|
94
102
|
"@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.4",
|
|
95
|
-
"@deepseek-ai/dsh-client-
|
|
103
|
+
"@deepseek-ai/dsh-client-store": "^0.1.2-alpha.4",
|
|
104
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.1.2-alpha.4",
|
|
105
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.2-alpha.4",
|
|
96
106
|
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.4",
|
|
107
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.4",
|
|
108
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.2-alpha.4",
|
|
97
109
|
"@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.4",
|
|
98
110
|
"@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.4",
|
|
99
111
|
"@deepseek-ai/dsh-host-apiproxy": "^0.1.1-rc.2",
|