@deepseek-ai/dsh-experimental-agent-team 0.1.6-alpha.2 → 0.1.7-alpha.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/README.i18n.yaml +2 -2
- package/README.md +8 -4
- package/README.zh.md +8 -4
- package/lib/index.js +14 -74
- package/lib/invariant.js +6 -8
- package/lib/typert.host.js +51 -189
- package/lib/typert.remote-client.d.ts +1 -7
- package/lib/typert.remote-client.js +3 -151
- package/lib/types/client.d.ts +2 -2
- package/lib/types/client.js +1 -1
- package/lib/types/index.d.ts +2 -18
- package/lib/types/index.js +0 -41
- package/lib/types/projection.js +10 -10
- package/lib/types/roster.d.ts +1 -1
- package/lib/types/roster.js +8 -4
- package/lib/types/types.d.ts +1 -12
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +29 -27
package/lib/typert.host.js
CHANGED
|
@@ -1,72 +1,6 @@
|
|
|
1
1
|
/* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
|
|
4
|
-
let _deepseek_ai_dsh_experimental_agent_team_agentTeams_createTask_parameter_0$schema$value
|
|
5
|
-
const _deepseek_ai_dsh_experimental_agent_team_agentTeams_createTask_parameter_0$schema = () => (_deepseek_ai_dsh_experimental_agent_team_agentTeams_createTask_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
6
|
-
let _deepseek_ai_dsh_experimental_agent_team_agentTeams_createTask_parameter_1$schema$value
|
|
7
|
-
const _deepseek_ai_dsh_experimental_agent_team_agentTeams_createTask_parameter_1$schema = () => (_deepseek_ai_dsh_experimental_agent_team_agentTeams_createTask_parameter_1$schema$value ??= z.object({
|
|
8
|
-
'subject': z.string().readonly(),
|
|
9
|
-
'description': z.string().readonly(),
|
|
10
|
-
'blockedBy': z.array(z.intersection(z.string(), z.unknown())).readonly().optional(),
|
|
11
|
-
'writeScopes': z.array(z.string()).readonly().optional(),
|
|
12
|
-
}))
|
|
13
|
-
let _deepseek_ai_dsh_experimental_agent_team_agentTeams_createTask_result$schema$value
|
|
14
|
-
const _deepseek_ai_dsh_experimental_agent_team_agentTeams_createTask_result$schema = () => (_deepseek_ai_dsh_experimental_agent_team_agentTeams_createTask_result$schema$value ??= z.union([z.object({
|
|
15
|
-
'ok': z.literal(true).readonly(),
|
|
16
|
-
'value': z.object({
|
|
17
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
18
|
-
'revision': z.number().readonly(),
|
|
19
|
-
'subject': z.string().readonly(),
|
|
20
|
-
'description': z.string().readonly(),
|
|
21
|
-
'status': z.union([z.literal("pending"), z.literal("in_progress"), z.literal("completed"), z.literal("deleted")]).readonly(),
|
|
22
|
-
'blockedBy': z.array(z.intersection(z.string(), z.unknown())).readonly(),
|
|
23
|
-
'writeScopes': z.array(z.string()).readonly(),
|
|
24
|
-
'ownerName': z.string().readonly().optional(),
|
|
25
|
-
'ready': z.boolean().readonly(),
|
|
26
|
-
'writeScopeWarnings': z.array(z.string()).readonly(),
|
|
27
|
-
}).readonly(),
|
|
28
|
-
}), z.object({
|
|
29
|
-
'ok': z.literal(false).readonly(),
|
|
30
|
-
'error': z.object({
|
|
31
|
-
'code': z.union([z.literal("team-task-conflict"), z.literal("team-rejected")]).readonly(),
|
|
32
|
-
'message': z.string().readonly(),
|
|
33
|
-
}).readonly(),
|
|
34
|
-
})]))
|
|
35
|
-
let _deepseek_ai_dsh_experimental_agent_team_agentTeams_updateTask_parameter_0$schema$value
|
|
36
|
-
const _deepseek_ai_dsh_experimental_agent_team_agentTeams_updateTask_parameter_0$schema = () => (_deepseek_ai_dsh_experimental_agent_team_agentTeams_updateTask_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
37
|
-
let _deepseek_ai_dsh_experimental_agent_team_agentTeams_updateTask_parameter_1$schema$value
|
|
38
|
-
const _deepseek_ai_dsh_experimental_agent_team_agentTeams_updateTask_parameter_1$schema = () => (_deepseek_ai_dsh_experimental_agent_team_agentTeams_updateTask_parameter_1$schema$value ??= z.object({
|
|
39
|
-
'taskId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
40
|
-
'expectedRevision': z.number().readonly(),
|
|
41
|
-
'action': z.union([z.literal("complete"), z.literal("edit"), z.literal("claim"), z.literal("release"), z.literal("set_dependencies"), z.literal("reopen"), z.literal("reassign"), z.literal("delete")]).readonly(),
|
|
42
|
-
'subject': z.string().readonly().optional(),
|
|
43
|
-
'description': z.string().readonly().optional(),
|
|
44
|
-
'blockedBy': z.array(z.intersection(z.string(), z.unknown())).readonly().optional(),
|
|
45
|
-
'writeScopes': z.array(z.string()).readonly().optional(),
|
|
46
|
-
'owner': z.string().readonly().optional(),
|
|
47
|
-
}))
|
|
48
|
-
let _deepseek_ai_dsh_experimental_agent_team_agentTeams_updateTask_result$schema$value
|
|
49
|
-
const _deepseek_ai_dsh_experimental_agent_team_agentTeams_updateTask_result$schema = () => (_deepseek_ai_dsh_experimental_agent_team_agentTeams_updateTask_result$schema$value ??= z.union([z.object({
|
|
50
|
-
'ok': z.literal(true).readonly(),
|
|
51
|
-
'value': z.object({
|
|
52
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
53
|
-
'revision': z.number().readonly(),
|
|
54
|
-
'subject': z.string().readonly(),
|
|
55
|
-
'description': z.string().readonly(),
|
|
56
|
-
'status': z.union([z.literal("pending"), z.literal("in_progress"), z.literal("completed"), z.literal("deleted")]).readonly(),
|
|
57
|
-
'blockedBy': z.array(z.intersection(z.string(), z.unknown())).readonly(),
|
|
58
|
-
'writeScopes': z.array(z.string()).readonly(),
|
|
59
|
-
'ownerName': z.string().readonly().optional(),
|
|
60
|
-
'ready': z.boolean().readonly(),
|
|
61
|
-
'writeScopeWarnings': z.array(z.string()).readonly(),
|
|
62
|
-
}).readonly(),
|
|
63
|
-
}), z.object({
|
|
64
|
-
'ok': z.literal(false).readonly(),
|
|
65
|
-
'error': z.object({
|
|
66
|
-
'code': z.union([z.literal("team-task-conflict"), z.literal("team-rejected")]).readonly(),
|
|
67
|
-
'message': z.string().readonly(),
|
|
68
|
-
}).readonly(),
|
|
69
|
-
})]))
|
|
70
4
|
let _deepseek_ai_dsh_experimental_agent_team_agentTeams_view_parameter_0$schema$value
|
|
71
5
|
const _deepseek_ai_dsh_experimental_agent_team_agentTeams_view_parameter_0$schema = () => (_deepseek_ai_dsh_experimental_agent_team_agentTeams_view_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
72
6
|
let _deepseek_ai_dsh_experimental_agent_team_agentTeams_view_result$schema$value
|
|
@@ -75,7 +9,7 @@ const _deepseek_ai_dsh_experimental_agent_team_agentTeams_view_result$schema = (
|
|
|
75
9
|
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
76
10
|
'name': z.string().readonly(),
|
|
77
11
|
'role': z.union([z.literal("lead"), z.literal("teammate")]).readonly(),
|
|
78
|
-
'status': z.union([z.literal("
|
|
12
|
+
'status': z.union([z.literal("failed"), z.literal("running"), z.literal("inactive"), z.literal("provisioning")]).readonly(),
|
|
79
13
|
'description': z.string().readonly().optional(),
|
|
80
14
|
'provider': z.string().readonly().optional(),
|
|
81
15
|
'context': z.union([z.literal("fresh"), z.literal("fork")]).readonly().optional(),
|
|
@@ -87,7 +21,7 @@ const _deepseek_ai_dsh_experimental_agent_team_agentTeams_view_result$schema = (
|
|
|
87
21
|
'revision': z.number().readonly(),
|
|
88
22
|
'subject': z.string().readonly(),
|
|
89
23
|
'description': z.string().readonly(),
|
|
90
|
-
'status': z.union([z.literal("
|
|
24
|
+
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress"), z.literal("deleted")]).readonly(),
|
|
91
25
|
'blockedBy': z.array(z.intersection(z.string(), z.unknown())).readonly(),
|
|
92
26
|
'writeScopes': z.array(z.string()).readonly(),
|
|
93
27
|
'ownerName': z.string().readonly().optional(),
|
|
@@ -102,88 +36,6 @@ export const TYPERT = {
|
|
|
102
36
|
schemas: [
|
|
103
37
|
],
|
|
104
38
|
invocations: [
|
|
105
|
-
{
|
|
106
|
-
id: '@deepseek-ai/dsh-experimental-agent-team#agentTeams/createTask',
|
|
107
|
-
service: 'agentTeams',
|
|
108
|
-
namespace: 'agentTeams',
|
|
109
|
-
method: 'createTask',
|
|
110
|
-
implementation: 'remoteCreateTask',
|
|
111
|
-
invocation: { kind: 'direct' },
|
|
112
|
-
scope: {
|
|
113
|
-
context: 'agent',
|
|
114
|
-
wire: 'agentId',
|
|
115
|
-
},
|
|
116
|
-
parameters: [
|
|
117
|
-
{
|
|
118
|
-
name: 'agent',
|
|
119
|
-
wire: 'agentId',
|
|
120
|
-
source: 'lookup',
|
|
121
|
-
lookup: 'agent',
|
|
122
|
-
codec: {
|
|
123
|
-
mode: 'strict',
|
|
124
|
-
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
125
|
-
create: _deepseek_ai_dsh_experimental_agent_team_agentTeams_createTask_parameter_0$schema,
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
name: 'request',
|
|
130
|
-
wire: 'request',
|
|
131
|
-
source: 'json',
|
|
132
|
-
codec: {
|
|
133
|
-
mode: 'strict',
|
|
134
|
-
typeSymbol: '@deepseek-ai/dsh-experimental-agent-team/client#CreateTeamTaskRequest',
|
|
135
|
-
create: _deepseek_ai_dsh_experimental_agent_team_agentTeams_createTask_parameter_1$schema,
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
],
|
|
139
|
-
result: {
|
|
140
|
-
mode: 'strict',
|
|
141
|
-
typeSymbol: '@deepseek-ai/dsh-experimental-agent-team/client#TeamTaskMutationResult',
|
|
142
|
-
create: _deepseek_ai_dsh_experimental_agent_team_agentTeams_createTask_result$schema,
|
|
143
|
-
},
|
|
144
|
-
sourceLocation: {"file":"packages/experimental/agent-team/src/index.ts","line":257,"column":3},
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
id: '@deepseek-ai/dsh-experimental-agent-team#agentTeams/updateTask',
|
|
148
|
-
service: 'agentTeams',
|
|
149
|
-
namespace: 'agentTeams',
|
|
150
|
-
method: 'updateTask',
|
|
151
|
-
implementation: 'remoteUpdateTask',
|
|
152
|
-
invocation: { kind: 'direct' },
|
|
153
|
-
scope: {
|
|
154
|
-
context: 'agent',
|
|
155
|
-
wire: 'agentId',
|
|
156
|
-
},
|
|
157
|
-
parameters: [
|
|
158
|
-
{
|
|
159
|
-
name: 'agent',
|
|
160
|
-
wire: 'agentId',
|
|
161
|
-
source: 'lookup',
|
|
162
|
-
lookup: 'agent',
|
|
163
|
-
codec: {
|
|
164
|
-
mode: 'strict',
|
|
165
|
-
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
166
|
-
create: _deepseek_ai_dsh_experimental_agent_team_agentTeams_updateTask_parameter_0$schema,
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
name: 'request',
|
|
171
|
-
wire: 'request',
|
|
172
|
-
source: 'json',
|
|
173
|
-
codec: {
|
|
174
|
-
mode: 'strict',
|
|
175
|
-
typeSymbol: '@deepseek-ai/dsh-experimental-agent-team/client#UpdateTeamTaskRequest',
|
|
176
|
-
create: _deepseek_ai_dsh_experimental_agent_team_agentTeams_updateTask_parameter_1$schema,
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
],
|
|
180
|
-
result: {
|
|
181
|
-
mode: 'strict',
|
|
182
|
-
typeSymbol: '@deepseek-ai/dsh-experimental-agent-team/client#TeamTaskMutationResult',
|
|
183
|
-
create: _deepseek_ai_dsh_experimental_agent_team_agentTeams_updateTask_result$schema,
|
|
184
|
-
},
|
|
185
|
-
sourceLocation: {"file":"packages/experimental/agent-team/src/index.ts","line":268,"column":3},
|
|
186
|
-
},
|
|
187
39
|
{
|
|
188
40
|
id: '@deepseek-ai/dsh-experimental-agent-team#agentTeams/view',
|
|
189
41
|
service: 'agentTeams',
|
|
@@ -213,7 +65,7 @@ export const TYPERT = {
|
|
|
213
65
|
typeSymbol: '@deepseek-ai/dsh-experimental-agent-team/client#TeamView',
|
|
214
66
|
create: _deepseek_ai_dsh_experimental_agent_team_agentTeams_view_result$schema,
|
|
215
67
|
},
|
|
216
|
-
sourceLocation: {"file":"packages/experimental/agent-team/src/index.ts","line":
|
|
68
|
+
sourceLocation: {"file":"packages/experimental/agent-team/src/index.ts","line":242,"column":3},
|
|
217
69
|
},
|
|
218
70
|
],
|
|
219
71
|
model: {
|
|
@@ -292,7 +144,7 @@ export const TYPERT = {
|
|
|
292
144
|
{
|
|
293
145
|
"kind": "method",
|
|
294
146
|
"name": "interrupt",
|
|
295
|
-
"signature": "interrupt(caller: Agent, targetName: string): { previousStatus: 'running' | '
|
|
147
|
+
"signature": "interrupt(caller: Agent, targetName: string): { previousStatus: 'running' | 'inactive' }",
|
|
296
148
|
"summary": "Interrupt one live teammate turn without clearing its pending inbox.",
|
|
297
149
|
"jsDoc": "/**\n * Interrupt one live teammate turn without clearing its pending inbox.\n * @param caller - exact live Lead Agent.\n * @param targetName - durable teammate name.\n * @returns the target status sampled before cancellation.\n */"
|
|
298
150
|
},
|
|
@@ -309,20 +161,6 @@ export const TYPERT = {
|
|
|
309
161
|
"signature": "@Remote('view') remoteView(agent: Agent): TeamView",
|
|
310
162
|
"summary": "Read the current roster and non-deleted task board through the generated Remote API.",
|
|
311
163
|
"jsDoc": "/**\n * Read the current roster and non-deleted task board through the generated Remote API.\n * @param agent - exact live Team member used as the authority credential.\n * @returns detached current roster and task views.\n */"
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
"kind": "method",
|
|
315
|
-
"name": "remoteCreateTask",
|
|
316
|
-
"signature": "@Remote('createTask') remoteCreateTask(agent: Agent, request: CreateTeamTaskRequest): Promise<TeamTaskMutationResult>",
|
|
317
|
-
"summary": "Create one shared task through the generated Remote API.",
|
|
318
|
-
"jsDoc": "/**\n * Create one shared task through the generated Remote API.\n * @param agent - exact live Team member creating the task.\n * @param request - task text, blockers, and advisory write scopes.\n * @returns the revision-one task or a typed Team rejection.\n */"
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
"kind": "method",
|
|
322
|
-
"name": "remoteUpdateTask",
|
|
323
|
-
"signature": "@Remote('updateTask') remoteUpdateTask(agent: Agent, request: UpdateTeamTaskRequest): Promise<TeamTaskMutationResult>",
|
|
324
|
-
"summary": "Apply one task mutation and preserve Team rejections as business results.",
|
|
325
|
-
"jsDoc": "/**\n * Apply one task mutation and preserve Team rejections as business results.\n * @param agent - exact live Team member authorizing the mutation.\n * @param request - task identity, expected revision, action, and action fields.\n * @returns the committed task or a typed Team rejection.\n */"
|
|
326
164
|
}
|
|
327
165
|
],
|
|
328
166
|
"types": [
|
|
@@ -360,7 +198,7 @@ export const TYPERT = {
|
|
|
360
198
|
},
|
|
361
199
|
{
|
|
362
200
|
"name": "AssistantMessage",
|
|
363
|
-
"declaration": "export interface AssistantMessage extends
|
|
201
|
+
"declaration": "export interface AssistantMessage extends MessageBase {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
|
|
364
202
|
},
|
|
365
203
|
{
|
|
366
204
|
"name": "AssistantProviderMetadata",
|
|
@@ -398,6 +236,10 @@ export const TYPERT = {
|
|
|
398
236
|
"name": "CommandSourceMap",
|
|
399
237
|
"declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
|
|
400
238
|
},
|
|
239
|
+
{
|
|
240
|
+
"name": "CompactionCheckpointSource",
|
|
241
|
+
"declaration": "export type CompactionCheckpointSource = typeof COMPACT_CHECKPOINT_MARKER & { readonly compactionId: CompactionId; readonly sourceCommandId?: CommandId; };"
|
|
242
|
+
},
|
|
401
243
|
{
|
|
402
244
|
"name": "CompactionId",
|
|
403
245
|
"declaration": "export type CompactionId = Branded<'CompactionId'>;"
|
|
@@ -408,7 +250,7 @@ export const TYPERT = {
|
|
|
408
250
|
},
|
|
409
251
|
{
|
|
410
252
|
"name": "ContentBlockMap",
|
|
411
|
-
"declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-
|
|
253
|
+
"declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-addition': ToolAdditionBlock;\n 'tool-removal': ToolRemovalBlock;\n}"
|
|
412
254
|
},
|
|
413
255
|
{
|
|
414
256
|
"name": "ContentBlockType",
|
|
@@ -430,9 +272,13 @@ export const TYPERT = {
|
|
|
430
272
|
"name": "CreateTeamTaskRequest",
|
|
431
273
|
"declaration": "export interface CreateTeamTaskRequest {\n readonly subject: string;\n readonly description: string;\n readonly blockedBy?: readonly TeamTaskId[];\n readonly writeScopes?: readonly string[];\n}"
|
|
432
274
|
},
|
|
275
|
+
{
|
|
276
|
+
"name": "DeveloperMessage",
|
|
277
|
+
"declaration": "export interface DeveloperMessage extends MessageBase {\n readonly role: 'developer';\n}"
|
|
278
|
+
},
|
|
433
279
|
{
|
|
434
280
|
"name": "EpochHeader",
|
|
435
|
-
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n}"
|
|
281
|
+
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n system?: never;\n}"
|
|
436
282
|
},
|
|
437
283
|
{
|
|
438
284
|
"name": "FeedbackCategory",
|
|
@@ -526,6 +372,10 @@ export const TYPERT = {
|
|
|
526
372
|
"name": "JsonValue",
|
|
527
373
|
"declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
|
|
528
374
|
},
|
|
375
|
+
{
|
|
376
|
+
"name": "KnownCatalogMode",
|
|
377
|
+
"declaration": "export type KnownCatalogMode = { readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; };"
|
|
378
|
+
},
|
|
529
379
|
{
|
|
530
380
|
"name": "LlmCallConfig",
|
|
531
381
|
"declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
|
|
@@ -540,7 +390,11 @@ export const TYPERT = {
|
|
|
540
390
|
},
|
|
541
391
|
{
|
|
542
392
|
"name": "Message",
|
|
543
|
-
"declaration": "export
|
|
393
|
+
"declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"name": "MessageBase",
|
|
397
|
+
"declaration": "export interface MessageBase {\n readonly id: MessageId;\n readonly content: readonly ContentBlock[];\n readonly source: MessageSource;\n}"
|
|
544
398
|
},
|
|
545
399
|
{
|
|
546
400
|
"name": "MessageFeedbackDelete",
|
|
@@ -566,13 +420,17 @@ export const TYPERT = {
|
|
|
566
420
|
"name": "MessageId",
|
|
567
421
|
"declaration": "export type MessageId = Branded<'MessageId'>;"
|
|
568
422
|
},
|
|
423
|
+
{
|
|
424
|
+
"name": "MessageRoleMap",
|
|
425
|
+
"declaration": "export interface MessageRoleMap {\n system: SystemMessage;\n developer: DeveloperMessage;\n user: UserMessage;\n assistant: AssistantMessage;\n tool: ToolResultMessage;\n}"
|
|
426
|
+
},
|
|
569
427
|
{
|
|
570
428
|
"name": "MessageSource",
|
|
571
429
|
"declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
|
|
572
430
|
},
|
|
573
431
|
{
|
|
574
432
|
"name": "MessageSourceMap",
|
|
575
|
-
"declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n
|
|
433
|
+
"declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'system-prompt': SystemPromptMessageSource;\n 'model-selection': { kind: 'model-selection'; } & ContextFormed;\n 'user-approval': { kind: 'user-approval'; } & ContextFormed;\n 'ptc-mode': { kind: 'ptc-mode'; };\n 'tool-registry': { kind: 'tool-registry'; };\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'cordis-host-runner': { kind: 'cordis-host-runner'; };\n 'team-message': TeamMessageSource;\n goal: GoalMessageSource;\n 'compact-checkpoint': CompactionCheckpointSource;\n 'session-reference': SessionReferenceSource;\n}"
|
|
576
434
|
},
|
|
577
435
|
{
|
|
578
436
|
"name": "ModelMessageSource",
|
|
@@ -636,7 +494,7 @@ export const TYPERT = {
|
|
|
636
494
|
},
|
|
637
495
|
{
|
|
638
496
|
"name": "Session",
|
|
639
|
-
"declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n get id(): SessionId;\n readonly firstLiveSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
|
|
497
|
+
"declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n get id(): SessionId;\n readonly firstLiveSeq: SessionLogOffset;\n readonly firstLifecycleSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
|
|
640
498
|
},
|
|
641
499
|
{
|
|
642
500
|
"name": "SessionEvent",
|
|
@@ -644,7 +502,7 @@ export const TYPERT = {
|
|
|
644
502
|
},
|
|
645
503
|
{
|
|
646
504
|
"name": "SessionEventMap",
|
|
647
|
-
"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}"
|
|
505
|
+
"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 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\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}"
|
|
648
506
|
},
|
|
649
507
|
{
|
|
650
508
|
"name": "SessionEventType",
|
|
@@ -712,7 +570,7 @@ export const TYPERT = {
|
|
|
712
570
|
},
|
|
713
571
|
{
|
|
714
572
|
"name": "SubagentCatalogEvent",
|
|
715
|
-
"declaration": "export type SubagentCatalogEvent = { readonly
|
|
573
|
+
"declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })));"
|
|
716
574
|
},
|
|
717
575
|
{
|
|
718
576
|
"name": "SubagentDescriptorBase",
|
|
@@ -728,7 +586,7 @@ export const TYPERT = {
|
|
|
728
586
|
},
|
|
729
587
|
{
|
|
730
588
|
"name": "SurfaceEventType",
|
|
731
|
-
"declaration": "export type SurfaceEventType = 'system/message' | 'user/message' | 'assistant/message' | 'tool/result';"
|
|
589
|
+
"declaration": "export type SurfaceEventType = 'system/message' | 'developer/message' | 'user/message' | 'assistant/message' | 'tool/result';"
|
|
732
590
|
},
|
|
733
591
|
{
|
|
734
592
|
"name": "SurfaceIntent",
|
|
@@ -740,7 +598,11 @@ export const TYPERT = {
|
|
|
740
598
|
},
|
|
741
599
|
{
|
|
742
600
|
"name": "SystemMessage",
|
|
743
|
-
"declaration": "export interface SystemMessage extends
|
|
601
|
+
"declaration": "export interface SystemMessage extends MessageBase {\n readonly role: 'system';\n readonly source: MessageSourceMap['system-prompt'];\n}"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"name": "SystemPromptMessageSource",
|
|
605
|
+
"declaration": "export interface SystemPromptMessageSource {\n kind: 'system-prompt';\n}"
|
|
744
606
|
},
|
|
745
607
|
{
|
|
746
608
|
"name": "SystemPromptUpdate",
|
|
@@ -764,7 +626,7 @@ export const TYPERT = {
|
|
|
764
626
|
},
|
|
765
627
|
{
|
|
766
628
|
"name": "TeamMemberView",
|
|
767
|
-
"declaration": "export interface TeamMemberView {\n readonly id: SessionId;\n readonly name: string;\n readonly role: 'lead' | 'teammate';\n readonly status: 'running' | '
|
|
629
|
+
"declaration": "export interface TeamMemberView {\n readonly id: SessionId;\n readonly name: string;\n readonly role: 'lead' | 'teammate';\n readonly status: 'running' | 'inactive' | 'provisioning' | 'failed';\n readonly description?: string;\n readonly provider?: string;\n readonly context?: 'fresh' | 'fork';\n readonly model?: string;\n readonly diagnostics: string[];\n}"
|
|
768
630
|
},
|
|
769
631
|
{
|
|
770
632
|
"name": "TeamMessageId",
|
|
@@ -786,10 +648,6 @@ export const TYPERT = {
|
|
|
786
648
|
"name": "TeamTaskId",
|
|
787
649
|
"declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
|
|
788
650
|
},
|
|
789
|
-
{
|
|
790
|
-
"name": "TeamTaskMutationResult",
|
|
791
|
-
"declaration": "export type TeamTaskMutationResult = { readonly ok: true; readonly value: TeamTaskView; } | { readonly ok: false; readonly error: { readonly code: 'team-task-conflict' | 'team-rejected'; readonly message: string; }; };"
|
|
792
|
-
},
|
|
793
651
|
{
|
|
794
652
|
"name": "TeamTaskSnapshot",
|
|
795
653
|
"declaration": "export interface TeamTaskSnapshot {\n readonly id: TeamTaskId;\n readonly revision: number;\n readonly subject: string;\n readonly description: string;\n readonly status: TeamTaskStatus;\n readonly ownerId?: SessionId;\n readonly blockedBy: TeamTaskId[];\n readonly writeScopes: string[];\n}"
|
|
@@ -822,6 +680,10 @@ export const TYPERT = {
|
|
|
822
680
|
"name": "TokenUsage",
|
|
823
681
|
"declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
|
|
824
682
|
},
|
|
683
|
+
{
|
|
684
|
+
"name": "ToolAdditionBlock",
|
|
685
|
+
"declaration": "export interface ToolAdditionBlock {\n type: 'tool-addition';\n toolName: string;\n tool?: never;\n}"
|
|
686
|
+
},
|
|
825
687
|
{
|
|
826
688
|
"name": "ToolCallBlock",
|
|
827
689
|
"declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
|
|
@@ -835,20 +697,20 @@ export const TYPERT = {
|
|
|
835
697
|
"declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
|
|
836
698
|
},
|
|
837
699
|
{
|
|
838
|
-
"name": "
|
|
839
|
-
"declaration": "export interface
|
|
700
|
+
"name": "ToolRemovalBlock",
|
|
701
|
+
"declaration": "export interface ToolRemovalBlock {\n type: 'tool-removal';\n toolName: string;\n}"
|
|
840
702
|
},
|
|
841
703
|
{
|
|
842
|
-
"name": "
|
|
843
|
-
"declaration": "export interface
|
|
704
|
+
"name": "ToolRestriction",
|
|
705
|
+
"declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
|
|
844
706
|
},
|
|
845
707
|
{
|
|
846
708
|
"name": "ToolResultMessage",
|
|
847
|
-
"declaration": "export interface ToolResultMessage extends
|
|
709
|
+
"declaration": "export interface ToolResultMessage extends MessageBase {\n readonly role: 'tool';\n readonly source: ToolMessageSource;\n readonly toolCallId: ToolCallId;\n readonly isError?: boolean;\n}"
|
|
848
710
|
},
|
|
849
711
|
{
|
|
850
712
|
"name": "ToolSchema",
|
|
851
|
-
"declaration": "export interface ToolSchema {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
|
|
713
|
+
"declaration": "export interface ToolSchema {\n deferLoading?: true;\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
|
|
852
714
|
},
|
|
853
715
|
{
|
|
854
716
|
"name": "TurnEndCancelCause",
|
|
@@ -860,7 +722,7 @@ export const TYPERT = {
|
|
|
860
722
|
},
|
|
861
723
|
{
|
|
862
724
|
"name": "TurnEndReasonMap",
|
|
863
|
-
"declaration": "export interface TurnEndReasonMap {\n completed: { kind: 'completed'; };\n aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n blocked: { kind: 'blocked'; };\n error: { kind: 'error'; error: LlmFailure; };\n 'max-tokens': { kind: 'max-tokens'; };\n interrupted: { kind: 'interrupted'; };\n}"
|
|
725
|
+
"declaration": "export interface TurnEndReasonMap {\n completed: { kind: 'completed'; };\n aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n blocked: { kind: 'blocked'; };\n error: { kind: 'error'; error: LlmFailure; };\n 'max-tokens': { kind: 'max-tokens'; };\n interrupted: { kind: 'interrupted'; };\n forked: { kind: 'forked'; };\n}"
|
|
864
726
|
},
|
|
865
727
|
{
|
|
866
728
|
"name": "UpdateTeamTaskRequest",
|
|
@@ -868,7 +730,7 @@ export const TYPERT = {
|
|
|
868
730
|
},
|
|
869
731
|
{
|
|
870
732
|
"name": "UserMessage",
|
|
871
|
-
"declaration": "export interface UserMessage extends
|
|
733
|
+
"declaration": "export interface UserMessage extends MessageBase {\n readonly role: 'user';\n}"
|
|
872
734
|
}
|
|
873
735
|
]
|
|
874
736
|
}
|
|
@@ -3,26 +3,20 @@ import type {
|
|
|
3
3
|
RemoteResult,
|
|
4
4
|
TypertRemoteContribution,
|
|
5
5
|
} from '@deepseek-ai/dsh-typert-protocol'
|
|
6
|
-
import type {
|
|
6
|
+
import type { TeamView } from '@deepseek-ai/dsh-experimental-agent-team/client'
|
|
7
7
|
import type { SessionId } from '@deepseek-ai/dsh-session/types'
|
|
8
8
|
|
|
9
9
|
declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
10
10
|
interface TypertRemoteNamespace$6167656e745465616d73 {
|
|
11
|
-
createTask: (agentId: SessionId, request: CreateTeamTaskRequest) => Promise<RemoteResult<TeamTaskMutationResult>>
|
|
12
|
-
updateTask: (agentId: SessionId, request: UpdateTeamTaskRequest) => Promise<RemoteResult<TeamTaskMutationResult>>
|
|
13
11
|
view: (agentId: SessionId) => Promise<RemoteResult<TeamView>>
|
|
14
12
|
}
|
|
15
13
|
interface TypertRemoteMap {
|
|
16
|
-
'agentTeams/createTask': (agentId: SessionId, request: CreateTeamTaskRequest) => Promise<RemoteResult<TeamTaskMutationResult>>
|
|
17
|
-
'agentTeams/updateTask': (agentId: SessionId, request: UpdateTeamTaskRequest) => Promise<RemoteResult<TeamTaskMutationResult>>
|
|
18
14
|
'agentTeams/view': (agentId: SessionId) => Promise<RemoteResult<TeamView>>
|
|
19
15
|
}
|
|
20
16
|
interface TypertRemoteNamespaceMap {
|
|
21
17
|
'agentTeams': TypertRemoteNamespace$6167656e745465616d73
|
|
22
18
|
}
|
|
23
19
|
interface TypertRemoteScopeMap {
|
|
24
|
-
'agent:agentTeams/createTask': (request: CreateTeamTaskRequest) => Promise<RemoteResult<TeamTaskMutationResult>>
|
|
25
|
-
'agent:agentTeams/updateTask': (request: UpdateTeamTaskRequest) => Promise<RemoteResult<TeamTaskMutationResult>>
|
|
26
20
|
'agent:agentTeams/view': () => Promise<RemoteResult<TeamView>>
|
|
27
21
|
}
|
|
28
22
|
}
|