@deepseek-ai/dsh-experimental-agent-team 0.1.5-rc.2 → 0.1.6-alpha.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.i18n.yaml +2 -2
- package/README.md +1 -1
- package/README.zh.md +13 -13
- package/lib/index.js +2 -2
- package/lib/typert.host.js +15 -11
- package/lib/types/index.js +2 -2
- package/lib/types/mailbox.js +1 -0
- package/lib/types/roster.js +2 -0
- package/package.json +24 -24
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/experimental/agent-team/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 1dba55aaef5c2f061de85de3b38cf5c644fa90b7
|
|
6
|
+
README.zh.md: 749f5b9d27ed863639a6dabad80254c9a19727dd
|
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ With the tools installed, the model does the rest on request — for example, "c
|
|
|
48
48
|
|
|
49
49
|
| Field | Default | Meaning |
|
|
50
50
|
|---|---|---|
|
|
51
|
-
| `maxMembers` | `
|
|
51
|
+
| `maxMembers` | `16` | Maximum teammates a team may ever create, including failed ones |
|
|
52
52
|
| `maxTasks` | `256` | Maximum active tasks on the board |
|
|
53
53
|
| `maxPendingMessagesPerMember` | `64` | Maximum queued messages for one member |
|
|
54
54
|
| `maxMessageBytes` | `65,536` | Maximum size of one sent message |
|
package/README.zh.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "在一个会话中运行一个小型具名 agent
|
|
2
|
+
description: "在一个会话中运行一个小型具名 agent(智能体)团队:成员之间的持久消息与共享任务板,用于组合实验性 Team 插件的部署。"
|
|
3
3
|
kind: "package-reference"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -48,7 +48,7 @@ kind: "package-reference"
|
|
|
48
48
|
|
|
49
49
|
| 字段 | 默认值 | 含义 |
|
|
50
50
|
|---|---|---|
|
|
51
|
-
| `maxMembers` | `
|
|
51
|
+
| `maxMembers` | `16` | 一支团队最多可创建的 teammate 数,包括失败的 |
|
|
52
52
|
| `maxTasks` | `256` | 任务板上最多的活动任务数 |
|
|
53
53
|
| `maxPendingMessagesPerMember` | `64` | 单个成员最多可排队的消息数 |
|
|
54
54
|
| `maxMessageBytes` | `65,536` | 单条发送消息的最大尺寸 |
|
|
@@ -66,7 +66,7 @@ roster 显示每个成员的职责(`lead` 或 `teammate`)与当前状态:`
|
|
|
66
66
|
|
|
67
67
|
### teammate 之间的消息
|
|
68
68
|
|
|
69
|
-
任何成员都可以向任何其他成员或 Lead 发送消息。live
|
|
69
|
+
任何成员都可以向任何其他成员或 Lead 发送消息。live 成员会立即收到;离线成员的消息会排队,并在其恢复后到达。消息不会丢失,也不会重复投递。
|
|
70
70
|
|
|
71
71
|
每条消息都使用 Steer:running target 在最近的步骤边界收到消息,idle target 启动一个轮次,inactive teammate 则冷恢复。发送方始终能看到结果——target inbox 已接受,或在投递暂时不可用时保留为 queued。排队的消息已经安全存储,因此绝不能重发。
|
|
72
72
|
|
|
@@ -102,10 +102,10 @@ Lead 可以停止 teammate 的当前轮次,而不会删除其排队的消息
|
|
|
102
102
|
|
|
103
103
|
本服务建立在一个分离与三项承诺之上:
|
|
104
104
|
|
|
105
|
-
- **持久日志,派生状态。** Lead
|
|
105
|
+
- **持久日志,派生状态。** Lead 会话日志是唯一真源;roster、mailbox 与任务状态每次读取都从中回放。
|
|
106
106
|
- **进程内归属。** 所有协作都位于单一进程;保证是重试加去重,绝不是跨进程共识。
|
|
107
|
-
- **显式权限。**
|
|
108
|
-
-
|
|
107
|
+
- **显式权限。** 每个服务方法都接收确切的实时调用方 `Agent`;只有 Lead 可以 spawn、reassign 或 interrupt。
|
|
108
|
+
- **超出上限时明确失败。** 每个限制都是经过校验的部署值,耗尽时报告类型化错误,而不是复用 id 或名字。
|
|
109
109
|
|
|
110
110
|
[Agent Teams Agent Note](../../../.agents/notes/implemented/feature/2026-08-05-agent-teams.zh.md)负责身份、mailbox、任务与共享 checkout 决策。
|
|
111
111
|
|
|
@@ -119,17 +119,17 @@ Lead 可以停止 teammate 的当前轮次,而不会删除其排队的消息
|
|
|
119
119
|
| [`src/task-board.ts`](src/task-board.ts) | 任务 CAS 命令、DAG 校验与派生视图 |
|
|
120
120
|
| [`src/journal.ts`](src/journal.ts) | 串行化的 Lead 日志事务与提交通知 |
|
|
121
121
|
| [`src/projection.ts`](src/projection.ts) | 解码并校验 Team 事件的严格回放投影 |
|
|
122
|
-
| [`src/activity.ts`](src/activity.ts) | 一次性变更等待者与 dispose
|
|
122
|
+
| [`src/activity.ts`](src/activity.ts) | 一次性变更等待者与 dispose(资源释放)时的等待解除 |
|
|
123
123
|
| [`src/lifecycle.ts`](src/lifecycle.ts) | 共享准入截止与有界结算 |
|
|
124
124
|
| [`src/invariant.ts`](src/invariant.ts) | 在 append 前回放候选事件的不变式伴生插件 |
|
|
125
125
|
|
|
126
126
|
### Team 身份与 roster
|
|
127
127
|
|
|
128
|
-
每个普通运行时 root 都是一个隐式 Team 的 Lead,其 `TeamId` 等于 `SessionId`;不存在创建事件,持久状态从第一条成员、消息或任务记录开始。`spawnTeammate()` 先追加并 flush 一条 `provisioning`
|
|
128
|
+
每个普通运行时 root 都是一个隐式 Team 的 Lead,其 `TeamId` 等于 `SessionId`;不存在创建事件,持久状态从第一条成员、消息或任务记录开始。`spawnTeammate()` 先追加并 flush 一条 `provisioning` 成员记录,再要求配置的提供方创建预留 child;提供方失败会追加一条持久的 `failed` 成员。fresh child 不携带 Lead 历史;fork child 只捕获一次 Lead 的已完成 turn 前缀。恢复把未终结的 provisioning 记录对照 child 独立持久化的会话进行对账:直接 parent 与 continuable descriptor 匹配、且初始用户消息已记录则产生 `active`,其他任何情况都产生 `failed`。如果恢复在同进程竞争中先完成,creator 会接受终态,或报告 `TEAM_PROVISIONING_CONFLICT` 并 drain 该 child。名字由第一条 provisioning 记录保留,且永不复用。
|
|
129
129
|
|
|
130
130
|
### 持久 mailbox
|
|
131
131
|
|
|
132
|
-
`sendMessage()` 校验 peer 成员关系,追加 `team/message/queued` 并在尝试投递前 flush。目标消息以 `Team message <id> from <name>:` 开头,并在 `TeamMessageSource` 中保留同一 id
|
|
132
|
+
`sendMessage()` 校验 peer 成员关系,追加 `team/message/queued` 并在尝试投递前 flush。目标消息以 `Team message <id> from <name>:` 开头,并在 `TeamMessageSource` 中保留同一 id 与发送者。只有目标会话在 pending inbox 或已记录历史中持久持有消息身份后,才会以 `team/message/delivered` 确认投递。即时准入按目标与持久队列顺序串行化;恢复按同一顺序重新投递 queued-minus-delivered 记录。重试前会同时折叠 live 与持久目标 inbox/历史状态,因此 inbox 已接受但模型尚未 claim 时发生崩溃不会复制消息。该保证是进程内重试加 target 会话去重,而不是跨进程 exactly-once 投递。
|
|
133
133
|
|
|
134
134
|
投递给 Lead 时直接调用 `Agent.steer()`。投递给 teammate 时使用 continuation owner 的 host-only Steer 路径;该路径会保留 Team 发送者 source,同时授权 Lead-to-child edge 并冷恢复 inactive target。sibling 消息绝不会通过公开的相邻 Agent 消息操作伪装成 Lead。
|
|
135
135
|
|
|
@@ -143,7 +143,7 @@ Lead 可以停止 teammate 的当前轮次,而不会删除其排队的消息
|
|
|
143
143
|
|
|
144
144
|
### 持久性模型
|
|
145
145
|
|
|
146
|
-
Team 事件追加到精确的 live Lead
|
|
146
|
+
Team 事件追加到精确的 live Lead 会话,并在操作报告成功或唤醒等待者之前 flush。`team/member`、`team/task`、`team/message/queued` 与 `team/message/delivered` 仅存在于日志:它们从不进入会话表面,因此派生模型历史不受协作记录影响。顺序与时间由会话事件的 `seq` 与 `time` 负责,快照不重复保存。`./invariant` 伴生插件把每条候选 Team 事件对照已提交前缀回放,并在 append 前拒绝非法转换。
|
|
147
147
|
|
|
148
148
|
### Dispose
|
|
149
149
|
|
|
@@ -159,7 +159,7 @@ dispose 会关闭准入、中止并等待已获准的创建与 mailbox dispatch
|
|
|
159
159
|
当包级约定不够用时阅读以下页面。它们从共享子系统类型逐步进入工具表面与设计背后的决策。
|
|
160
160
|
|
|
161
161
|
- [Agent Teams 子系统](../../../docs/subsystems/agent-team.zh.md)——持久 Team 类型与 `ctx.agentTeams` 服务 API。
|
|
162
|
-
- [tool-agent-team 包](../tool-agent-team/README.zh.md)
|
|
162
|
+
- [tool-agent-team 包](../tool-agent-team/README.zh.md)——让模型创建 teammate、向其发送消息并进行协调的工具。
|
|
163
163
|
- [Agent Teams Agent Note](../../../.agents/notes/implemented/feature/2026-08-05-agent-teams.zh.md)——身份、mailbox、任务与共享 checkout 决策。
|
|
164
164
|
- [实验包决策](../../../.agents/notes/implemented/architecture/2026-08-18-experimental-agent-teams-packages.zh.md)——位置、公开发布与依赖隔离。
|
|
165
165
|
|
|
@@ -169,7 +169,7 @@ dispose 会关闭准入、中止并等待已获准的创建与 mailbox dispatch
|
|
|
169
169
|
|
|
170
170
|
### 浏览器 Remote
|
|
171
171
|
|
|
172
|
-
`TeamService` 除了 roster、mailbox、task 与 lifecycle operation
|
|
172
|
+
`TeamService` 除了 roster、mailbox、task 与 lifecycle operation,还拥有生成的 `agentTeams/view`、`agentTeams/createTask` 与 `agentTeams/updateTask` Remote method。`./remote` 导出由 Web UI 挂载的 Client contribution,`./client` 则重新导出可在浏览器 compilation face 中安全使用的 request、view 与 task mutation result type。Typert 在外层 `RemoteResult` 中保留 transport failure;create 与 update rejection 则作为 transport 成功响应中的显式 domain result,其中过期的 update revision 会区分为 task conflict。
|
|
173
173
|
|
|
174
174
|
## 模型体验
|
|
175
175
|
|
|
@@ -192,7 +192,7 @@ Peer 消息追加在 target 可复用历史前缀之后。冷恢复会先复用
|
|
|
192
192
|
<a id="known-limitations-and-deferred-work"></a>
|
|
193
193
|
|
|
194
194
|
|
|
195
|
-
|
|
195
|
+
这些限制说明一支团队目前不能做什么、或哪些方面需要特别的运维关注。它们是当前包约束,不是与其他协作机制的对比。
|
|
196
196
|
|
|
197
197
|
- **实验原型,无稳定性承诺**——本包公开发布,但孵化期间约定仍可自由变更。
|
|
198
198
|
- **单进程、共享 checkout**——成员共享 cwd,修改立即可见;本包不提供 worktree、远端成员、merge 或文件锁。
|
package/lib/index.js
CHANGED
|
@@ -1591,7 +1591,7 @@ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializ
|
|
|
1591
1591
|
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
1592
1592
|
done = true;
|
|
1593
1593
|
};
|
|
1594
|
-
const DEFAULT_MAX_MEMBERS =
|
|
1594
|
+
const DEFAULT_MAX_MEMBERS = 16;
|
|
1595
1595
|
const DEFAULT_MAX_TASKS = 256;
|
|
1596
1596
|
const DEFAULT_MAX_PENDING_MESSAGES = 64;
|
|
1597
1597
|
const DEFAULT_MAX_MESSAGE_BYTES = 65536;
|
|
@@ -1696,7 +1696,7 @@ let TeamService = (() => {
|
|
|
1696
1696
|
ctx.on("session/event", (session, event) => {
|
|
1697
1697
|
this.mailbox.observeSessionEvent(session, event);
|
|
1698
1698
|
});
|
|
1699
|
-
ctx.on("agent/
|
|
1699
|
+
ctx.on("agent/created", ({ agent }) => {
|
|
1700
1700
|
this.scheduleRecovery(agent);
|
|
1701
1701
|
});
|
|
1702
1702
|
ctx.on("agent/status", ({ agent }) => {
|
package/lib/typert.host.js
CHANGED
|
@@ -355,8 +355,8 @@ export const TYPERT = {
|
|
|
355
355
|
"declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
|
|
356
356
|
},
|
|
357
357
|
{
|
|
358
|
-
"name": "
|
|
359
|
-
"declaration": "export interface
|
|
358
|
+
"name": "AssistantProviderMetadata",
|
|
359
|
+
"declaration": "export interface AssistantProviderMetadata {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
|
|
360
360
|
},
|
|
361
361
|
{
|
|
362
362
|
"name": "AssistantStreamRecord",
|
|
@@ -496,12 +496,16 @@ export const TYPERT = {
|
|
|
496
496
|
},
|
|
497
497
|
{
|
|
498
498
|
"name": "ImageBlock",
|
|
499
|
-
"declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n}"
|
|
499
|
+
"declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n offloaded?: true;\n}"
|
|
500
500
|
},
|
|
501
501
|
{
|
|
502
502
|
"name": "ImageMediaType",
|
|
503
503
|
"declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
|
|
504
504
|
},
|
|
505
|
+
{
|
|
506
|
+
"name": "ImageOffloadTarget",
|
|
507
|
+
"declaration": "export interface ImageOffloadTarget {\n seq: SessionSeq;\n imageIndexes: number[];\n}"
|
|
508
|
+
},
|
|
505
509
|
{
|
|
506
510
|
"name": "Inbox",
|
|
507
511
|
"declaration": "export interface Inbox {\n readonly nextTurn: readonly UserMessage[];\n readonly nextStep: readonly UserMessage[];\n clear(): void;\n append(target: InboxTarget, message: UserMessage): void;\n prepend(target: InboxTarget, message: UserMessage): void;\n replace(messageId: MessageId, newMessage: UserMessage): boolean;\n remove(messageId: MessageId): boolean;\n splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
|
|
@@ -524,7 +528,7 @@ export const TYPERT = {
|
|
|
524
528
|
},
|
|
525
529
|
{
|
|
526
530
|
"name": "LlmFailure",
|
|
527
|
-
"declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n}"
|
|
531
|
+
"declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n readonly offloadImages?: number;\n}"
|
|
528
532
|
},
|
|
529
533
|
{
|
|
530
534
|
"name": "Message",
|
|
@@ -564,7 +568,7 @@ export const TYPERT = {
|
|
|
564
568
|
},
|
|
565
569
|
{
|
|
566
570
|
"name": "ModelMessageSource",
|
|
567
|
-
"declaration": "export interface ModelMessageSource extends
|
|
571
|
+
"declaration": "export interface ModelMessageSource extends AssistantProviderMetadata {\n kind: 'model';\n}"
|
|
568
572
|
},
|
|
569
573
|
{
|
|
570
574
|
"name": "ModelSelection",
|
|
@@ -584,7 +588,7 @@ export const TYPERT = {
|
|
|
584
588
|
},
|
|
585
589
|
{
|
|
586
590
|
"name": "PtcDispatchEventData",
|
|
587
|
-
"declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n}"
|
|
591
|
+
"declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n error?: { name: string; code: string; reason?: string; };\n}"
|
|
588
592
|
},
|
|
589
593
|
{
|
|
590
594
|
"name": "PtcDispatchStartEventData",
|
|
@@ -632,7 +636,7 @@ export const TYPERT = {
|
|
|
632
636
|
},
|
|
633
637
|
{
|
|
634
638
|
"name": "SessionEventMap",
|
|
635
|
-
"declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n '
|
|
639
|
+
"declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'permission/preset': { preset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n}"
|
|
636
640
|
},
|
|
637
641
|
{
|
|
638
642
|
"name": "SessionEventType",
|
|
@@ -664,15 +668,15 @@ export const TYPERT = {
|
|
|
664
668
|
},
|
|
665
669
|
{
|
|
666
670
|
"name": "SessionSurface",
|
|
667
|
-
"declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n}"
|
|
671
|
+
"declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n readonly contentGeneration: number;\n}"
|
|
668
672
|
},
|
|
669
673
|
{
|
|
670
674
|
"name": "SessionTitleEventData",
|
|
671
675
|
"declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
|
|
672
676
|
},
|
|
673
677
|
{
|
|
674
|
-
"name": "
|
|
675
|
-
"declaration": "export interface
|
|
678
|
+
"name": "SessionTitleModelIdentity",
|
|
679
|
+
"declaration": "export interface SessionTitleModelIdentity {\n readonly provider: string;\n readonly model: string;\n}"
|
|
676
680
|
},
|
|
677
681
|
{
|
|
678
682
|
"name": "SessionTitleProviderId",
|
|
@@ -680,7 +684,7 @@ export const TYPERT = {
|
|
|
680
684
|
},
|
|
681
685
|
{
|
|
682
686
|
"name": "SessionTitleSource",
|
|
683
|
-
"declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?:
|
|
687
|
+
"declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelIdentity; } | { readonly kind: 'user'; };"
|
|
684
688
|
},
|
|
685
689
|
{
|
|
686
690
|
"name": "SkillInvocationSource",
|
package/lib/types/index.js
CHANGED
|
@@ -46,7 +46,7 @@ import { TeamTaskBoard } from "./task-board.js";
|
|
|
46
46
|
import { TeamId } from "./types.js";
|
|
47
47
|
export { TeamId, TeamMessageId, TeamTaskId } from "./types.js";
|
|
48
48
|
export { TeamError } from "./error.js";
|
|
49
|
-
const DEFAULT_MAX_MEMBERS =
|
|
49
|
+
const DEFAULT_MAX_MEMBERS = 16;
|
|
50
50
|
const DEFAULT_MAX_TASKS = 256;
|
|
51
51
|
const DEFAULT_MAX_PENDING_MESSAGES = 64;
|
|
52
52
|
const DEFAULT_MAX_MESSAGE_BYTES = 65_536;
|
|
@@ -108,7 +108,7 @@ let TeamService = (() => {
|
|
|
108
108
|
this.mailbox = new TeamMailbox(ctx, this.journal, this.roster, this.lifecycle, this.config.maxPendingMessagesPerMember, this.config.maxMessageBytes);
|
|
109
109
|
this.tasks = new TeamTaskBoard(this.journal, this.config.maxTasks);
|
|
110
110
|
ctx.on('session/event', (session, event) => { this.mailbox.observeSessionEvent(session, event); });
|
|
111
|
-
ctx.on('agent/
|
|
111
|
+
ctx.on('agent/created', ({ agent }) => { this.scheduleRecovery(agent); });
|
|
112
112
|
ctx.on('agent/status', ({ agent }) => {
|
|
113
113
|
const membership = this.roster.tryMembership(agent);
|
|
114
114
|
if (membership !== undefined)
|
package/lib/types/mailbox.js
CHANGED
|
@@ -264,6 +264,7 @@ export class TeamMailbox {
|
|
|
264
264
|
}
|
|
265
265
|
/** Whether a target Session already contains the durable message identity. */
|
|
266
266
|
targetRecorded(session, messageId) {
|
|
267
|
+
// oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred.
|
|
267
268
|
const suffix = session.snapshotEvents(session.inheritedEventCount);
|
|
268
269
|
return messageAccepted(suffix, message => message.source.kind === 'team-message'
|
|
269
270
|
&& message.source.messageId === messageId);
|
package/lib/types/roster.js
CHANGED
|
@@ -336,6 +336,7 @@ export class TeamRoster {
|
|
|
336
336
|
try {
|
|
337
337
|
signal.throwIfAborted();
|
|
338
338
|
await this.ctx.sessions.flush(session);
|
|
339
|
+
// oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred.
|
|
339
340
|
const suffix = session.snapshotEvents(session.inheritedEventCount);
|
|
340
341
|
if (messageAccepted(suffix, message => message.id === messageId))
|
|
341
342
|
return;
|
|
@@ -440,6 +441,7 @@ export class TeamRoster {
|
|
|
440
441
|
}
|
|
441
442
|
/** Whether a Session's own suffix identifies a provider-owned subagent child. */
|
|
442
443
|
subagentDescriptor(agent) {
|
|
444
|
+
// oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred.
|
|
443
445
|
return foldSubagentDescriptor(agent.session.snapshotEvents(agent.session.inheritedEventCount)) !== undefined;
|
|
444
446
|
}
|
|
445
447
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-experimental-agent-team",
|
|
3
3
|
"description": "Implicit-root Agent Teams roster, durable peer mailbox, and shared task DAG",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -55,34 +55,34 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"zod": "^4.4.3",
|
|
57
57
|
"@deepseek-ai/schemastery": "^3.18.2",
|
|
58
|
-
"@deepseek-ai/dsh-brand": "^0.1.
|
|
58
|
+
"@deepseek-ai/dsh-brand": "^0.1.6-alpha.1"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
62
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
65
|
-
"@deepseek-ai/dsh-session
|
|
66
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
67
|
-
"@deepseek-ai/dsh-session-projection": "^0.1.
|
|
68
|
-
"@deepseek-ai/dsh-
|
|
69
|
-
"@deepseek-ai/dsh-
|
|
62
|
+
"@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
|
|
63
|
+
"@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
|
|
64
|
+
"@deepseek-ai/dsh-invariants": "^0.1.6-alpha.1",
|
|
65
|
+
"@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
|
|
66
|
+
"@deepseek-ai/dsh-session-persistence": "^0.1.6-alpha.1",
|
|
67
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1",
|
|
68
|
+
"@deepseek-ai/dsh-subagent": "^0.1.6-alpha.1",
|
|
69
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.6-alpha.1"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
73
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
74
|
-
"@deepseek-ai/dsh-
|
|
75
|
-
"@deepseek-ai/dsh-agent-loop
|
|
76
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
77
|
-
"@deepseek-ai/dsh-
|
|
78
|
-
"@deepseek-ai/dsh-
|
|
79
|
-
"@deepseek-ai/dsh-session-
|
|
80
|
-
"@deepseek-ai/dsh-session-query": "^0.1.
|
|
81
|
-
"@deepseek-ai/dsh-subagent": "^0.1.
|
|
82
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.
|
|
83
|
-
"@deepseek-ai/dsh-subagent-
|
|
84
|
-
"@deepseek-ai/dsh-subagent-
|
|
85
|
-
"@deepseek-ai/dsh-typert-protocol": "^0.1.
|
|
86
|
-
"@deepseek-ai/dsh-session
|
|
73
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.6-alpha.1",
|
|
74
|
+
"@deepseek-ai/dsh-invariants": "^0.1.6-alpha.1",
|
|
75
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.6-alpha.1",
|
|
76
|
+
"@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
|
|
77
|
+
"@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
|
|
78
|
+
"@deepseek-ai/dsh-session-persistence": "^0.1.6-alpha.1",
|
|
79
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1",
|
|
80
|
+
"@deepseek-ai/dsh-session-query": "^0.1.6-alpha.1",
|
|
81
|
+
"@deepseek-ai/dsh-subagent": "^0.1.6-alpha.1",
|
|
82
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.6-alpha.1",
|
|
83
|
+
"@deepseek-ai/dsh-subagent-spawn-in-process": "^0.1.6-alpha.1",
|
|
84
|
+
"@deepseek-ai/dsh-subagent-fork-in-process": "^0.1.6-alpha.1",
|
|
85
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.6-alpha.1",
|
|
86
|
+
"@deepseek-ai/dsh-session": "^0.1.6-alpha.1"
|
|
87
87
|
}
|
|
88
88
|
}
|