@deepseek-ai/dsh-client-file-upload 0.1.3-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.
@@ -0,0 +1,614 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
+ import { z } from 'zod'
3
+
4
+ const _deepseek_ai_dsh_client_file_upload_fileUploads_upload_parameter_0$schema = z.intersection(z.string(), z.unknown())
5
+ const _deepseek_ai_dsh_client_file_upload_fileUploads_upload_parameter_1$schema = z.object({
6
+ 'data': z.string().readonly(),
7
+ 'name': z.string().readonly().optional(),
8
+ })
9
+ const _deepseek_ai_dsh_client_file_upload_fileUploads_upload_result$schema = z.object({
10
+ 'receiptId': z.intersection(z.string(), z.unknown()).readonly(),
11
+ 'file': z.object({
12
+ 'attachmentId': z.intersection(z.string(), z.unknown()),
13
+ 'name': z.string(),
14
+ 'bytes': z.number(),
15
+ }).readonly(),
16
+ })
17
+
18
+ export const TYPERT = {
19
+ package: '@deepseek-ai/dsh-client-file-upload',
20
+ face: 'host',
21
+ schemas: [
22
+ ],
23
+ invocations: [
24
+ {
25
+ id: '@deepseek-ai/dsh-client-file-upload#fileUploads/upload',
26
+ service: 'fileUploads',
27
+ namespace: 'fileUploads',
28
+ method: 'upload',
29
+ invocation: { kind: 'direct' },
30
+ scope: {
31
+ context: 'agent',
32
+ wire: 'agentId',
33
+ },
34
+ parameters: [
35
+ {
36
+ name: 'agent',
37
+ wire: 'agentId',
38
+ source: 'lookup',
39
+ lookup: 'agent',
40
+ codec: {
41
+ mode: 'strict',
42
+ typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
43
+ schema: _deepseek_ai_dsh_client_file_upload_fileUploads_upload_parameter_0$schema,
44
+ },
45
+ },
46
+ {
47
+ name: 'request',
48
+ wire: 'request',
49
+ source: 'json',
50
+ codec: {
51
+ mode: 'strict',
52
+ typeSymbol: '@deepseek-ai/dsh-client-file-upload/types#EncodedFileUploadRequest',
53
+ schema: _deepseek_ai_dsh_client_file_upload_fileUploads_upload_parameter_1$schema,
54
+ },
55
+ },
56
+ ],
57
+ cancellation: { parameter: 'signal' },
58
+ result: {
59
+ mode: 'strict',
60
+ typeSymbol: '@deepseek-ai/dsh-client-file-upload/types#FileUploadValue',
61
+ schema: _deepseek_ai_dsh_client_file_upload_fileUploads_upload_result$schema,
62
+ },
63
+ sourceLocation: {"file":"packages/client/file-upload/src/index.ts","line":106,"column":3},
64
+ },
65
+ ],
66
+ model: {
67
+ "services": [
68
+ {
69
+ "description": "Host service owning upload storage and Agent-scoped staged receipts.",
70
+ "summary": "Host service owning upload storage and Agent-scoped staged receipts.",
71
+ "tags": [],
72
+ "jsDoc": "/** Host service owning upload storage and Agent-scoped staged receipts. */",
73
+ "key": "fileUploads",
74
+ "exportName": "FileUploads",
75
+ "members": [
76
+ {
77
+ "kind": "method",
78
+ "name": "registerAgentResolver",
79
+ "signature": "registerAgentResolver(resolve: AgentResolver): () => void",
80
+ "summary": "Register the ordinary-Session resolver used when a raw upload addresses a cold Session.",
81
+ "jsDoc": "/**\n * Register the ordinary-Session resolver used when a raw upload addresses a cold Session.\n * @param resolve - resolver that returns the exact live Agent or throws a Remote error.\n * @returns disposer removing this resolver.\n */"
82
+ },
83
+ {
84
+ "kind": "method",
85
+ "name": "upload",
86
+ "signature": "@Remote('upload') upload(agent: Agent, request: EncodedFileUploadRequest, signal: AbortSignal): Promise<FileUploadValue>",
87
+ "summary": "Persist one encoded upload and stage it under the Agent receiver selected by Typert.",
88
+ "jsDoc": "/**\n * Persist one encoded upload and stage it under the Agent receiver selected by Typert.\n * @param agent - receiving Agent resolved from the Remote Agent scope.\n * @param request - canonical base64 bytes and optional display name.\n * @param signal - caller cancellation before storage begins.\n * @returns the staged receipt and durable file reference.\n */"
89
+ },
90
+ {
91
+ "kind": "method",
92
+ "name": "uploadStream",
93
+ "signature": "async uploadStream(request: { readonly sessionId: SessionId readonly data: AsyncIterable<Uint8Array> readonly signal?: AbortSignal readonly name?: string }): Promise<FileUploadValue>",
94
+ "summary": "Persist raw chunks for one Session without aggregating the upload.",
95
+ "jsDoc": "/**\n * Persist raw chunks for one Session without aggregating the upload.\n * @param request - Session identity, ordered bytes, cancellation, and optional display name.\n * @returns the staged receipt and durable file reference.\n */"
96
+ },
97
+ {
98
+ "kind": "method",
99
+ "name": "resolve",
100
+ "signature": "resolve(agent: Agent, receiptId: FileUploadReceiptId): FileAttachmentRef | undefined",
101
+ "summary": "Resolve one staged receipt inside its receiving Agent scope.",
102
+ "jsDoc": "/**\n * Resolve one staged receipt inside its receiving Agent scope.\n * @param agent - receiving Agent.\n * @param receiptId - opaque receipt minted for one completed upload.\n * @returns durable file reference, or `undefined` for an unknown or foreign receipt.\n */"
103
+ },
104
+ {
105
+ "kind": "method",
106
+ "name": "bindPrompt",
107
+ "signature": "bindPrompt( agent: Agent, receiptIds: readonly FileUploadReceiptId[], requestId: string, ): PromptFileBinding",
108
+ "summary": "Bind receipts while one prompt enters an Agent inbox.",
109
+ "jsDoc": "/**\n * Bind receipts while one prompt enters an Agent inbox.\n * Disposal restores every prior binding unless the caller commits successful delivery.\n * @param agent - receiving Agent.\n * @param receiptIds - distinct staged receipts referenced by the prompt.\n * @param requestId - prompt identity later observed in queue or history.\n * @returns binding kept after commit until queue or history observation retires its receipts.\n */"
110
+ },
111
+ {
112
+ "kind": "method",
113
+ "name": "retirePrompt",
114
+ "signature": "retirePrompt(agent: Agent, requestId: string): void",
115
+ "summary": "Retire every receipt accepted by one removed queue occurrence.",
116
+ "jsDoc": "/**\n * Retire every receipt accepted by one removed queue occurrence.\n * @param agent - receiving Agent.\n * @param requestId - prompt identity carried by the queue occurrence.\n */"
117
+ }
118
+ ],
119
+ "types": [
120
+ {
121
+ "name": "Agent",
122
+ "declaration": "export interface Agent {\n readonly id: SessionId;\n readonly options: AgentOptions;\n readonly session: Session;\n readonly inbox: Inbox;\n readonly status: AgentStatus;\n readonly ctx: Context;\n cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n whenIdle(): Promise<void>;\n runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n followup(message: UserMessage): void;\n steer(message: UserMessage): void;\n inject(message: UserMessage): void;\n}"
123
+ },
124
+ {
125
+ "name": "AgentCancelCause",
126
+ "declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
127
+ },
128
+ {
129
+ "name": "AgentMessageSource",
130
+ "declaration": "export interface AgentMessageSource {\n readonly kind: 'agent-message';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
131
+ },
132
+ {
133
+ "name": "AgentOptions",
134
+ "declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
135
+ },
136
+ {
137
+ "name": "AgentResolver",
138
+ "declaration": "export type AgentResolver = (sessionId: SessionId) => Promise<Agent>;"
139
+ },
140
+ {
141
+ "name": "AgentStatus",
142
+ "declaration": "export type AgentStatus = 'idle' | 'running';"
143
+ },
144
+ {
145
+ "name": "ApprovalOutcome",
146
+ "declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
147
+ },
148
+ {
149
+ "name": "ApprovalPolicy",
150
+ "declaration": "export type ApprovalPolicy = 'ask' | 'never';"
151
+ },
152
+ {
153
+ "name": "ApprovalRequestId",
154
+ "declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
155
+ },
156
+ {
157
+ "name": "AssistantMessage",
158
+ "declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
159
+ },
160
+ {
161
+ "name": "AssistantProvenance",
162
+ "declaration": "export interface AssistantProvenance {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
163
+ },
164
+ {
165
+ "name": "AssistantStreamRecord",
166
+ "declaration": "export type AssistantStreamRecord = { readonly type: 'text-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'reasoning-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'tool-call-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly id: ToolCallId; readonly name?: string; readonly args: readonly string[]; } | { readonly type: 'chunk'; readonly time: number; readonly chunk: StreamChunk; };"
167
+ },
168
+ {
169
+ "name": "AttachmentId",
170
+ "declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
171
+ },
172
+ {
173
+ "name": "Branded",
174
+ "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
175
+ },
176
+ {
177
+ "name": "BrandedNumber",
178
+ "declaration": "export type BrandedNumber<B extends string> = number & { readonly [BRAND]: B; };"
179
+ },
180
+ {
181
+ "name": "CancelOptions",
182
+ "declaration": "export interface CancelOptions {\n keepInbox?: boolean | undefined;\n}"
183
+ },
184
+ {
185
+ "name": "CommandId",
186
+ "declaration": "export type CommandId = Branded<'CommandId'>;"
187
+ },
188
+ {
189
+ "name": "CommandSource",
190
+ "declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
191
+ },
192
+ {
193
+ "name": "CommandSourceMap",
194
+ "declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
195
+ },
196
+ {
197
+ "name": "CompactionId",
198
+ "declaration": "export type CompactionId = Branded<'CompactionId'>;"
199
+ },
200
+ {
201
+ "name": "ContentBlock",
202
+ "declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
203
+ },
204
+ {
205
+ "name": "ContentBlockMap",
206
+ "declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-result': ToolResultBlock;\n}"
207
+ },
208
+ {
209
+ "name": "ContentBlockType",
210
+ "declaration": "export type ContentBlockType = keyof ContentBlockMap;"
211
+ },
212
+ {
213
+ "name": "ContextFormed",
214
+ "declaration": "export type ContextFormed = { readonly form?: never; } | { readonly form: 'instructions'; } | { readonly form: 'catalog'; } | { readonly form: 'snapshot'; readonly sections: readonly ContextSnapshotSection[]; } | { readonly form: 'notice'; readonly summary: string; } | { readonly form: 'relay'; } | { readonly form: 'recall'; };"
215
+ },
216
+ {
217
+ "name": "ContextSnapshotSection",
218
+ "declaration": "export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}"
219
+ },
220
+ {
221
+ "name": "ContinuableSubagentDescriptorData",
222
+ "declaration": "export interface ContinuableSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'continuable';\n readonly label: string;\n readonly agentProvider?: string;\n readonly agentModel?: string;\n readonly agentReasoningEffort?: ReasoningEffortId;\n readonly persona?: string;\n readonly toolFilter?: ToolRestriction;\n}"
223
+ },
224
+ {
225
+ "name": "EncodedFileUploadRequest",
226
+ "declaration": "export interface EncodedFileUploadRequest {\n readonly data: string;\n readonly name?: string;\n}"
227
+ },
228
+ {
229
+ "name": "EpochHeader",
230
+ "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n system?: string;\n tools?: ToolSchema[];\n}"
231
+ },
232
+ {
233
+ "name": "FileAttachmentRef",
234
+ "declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
235
+ },
236
+ {
237
+ "name": "FileBlock",
238
+ "declaration": "export interface FileBlock {\n type: 'file';\n attachment: FileAttachmentRef;\n}"
239
+ },
240
+ {
241
+ "name": "FileUploadReceiptId",
242
+ "declaration": "export type FileUploadReceiptId = Branded<'file-upload-receipt-id'>;"
243
+ },
244
+ {
245
+ "name": "FileUploadValue",
246
+ "declaration": "export interface FileUploadValue {\n readonly receiptId: FileUploadReceiptId;\n readonly file: FileAttachmentRef;\n}"
247
+ },
248
+ {
249
+ "name": "FinishReason",
250
+ "declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
251
+ },
252
+ {
253
+ "name": "FinishReasonMap",
254
+ "declaration": "export interface FinishReasonMap {\n stop: { kind: 'stop'; };\n 'tool-calls': { kind: 'tool-calls'; };\n 'max-tokens': { kind: 'max-tokens'; };\n aborted: { kind: 'aborted'; failure: LlmFailure; };\n error: { kind: 'error'; failure: LlmFailure; };\n}"
255
+ },
256
+ {
257
+ "name": "GoalBlockReason",
258
+ "declaration": "export interface GoalBlockReason {\n readonly code: string;\n readonly message: string;\n}"
259
+ },
260
+ {
261
+ "name": "GoalChangeMeta",
262
+ "declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
263
+ },
264
+ {
265
+ "name": "GoalClearChangeMeta",
266
+ "declaration": "export interface GoalClearChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: 'clear';\n readonly cleared: GoalRef;\n readonly clearedAt: number;\n}"
267
+ },
268
+ {
269
+ "name": "GoalId",
270
+ "declaration": "export type GoalId = Branded<'GoalId'>;"
271
+ },
272
+ {
273
+ "name": "GoalMessageSource",
274
+ "declaration": "export interface GoalMessageSource {\n readonly kind: 'goal';\n readonly goalId: GoalId;\n readonly revision: number;\n readonly round: number;\n}"
275
+ },
276
+ {
277
+ "name": "GoalOperation",
278
+ "declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
279
+ },
280
+ {
281
+ "name": "GoalPhase",
282
+ "declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
283
+ },
284
+ {
285
+ "name": "GoalRef",
286
+ "declaration": "export interface GoalRef {\n readonly id: GoalId;\n readonly revision: number;\n}"
287
+ },
288
+ {
289
+ "name": "GoalSnapshot",
290
+ "declaration": "export interface GoalSnapshot extends GoalRef {\n readonly objective: string;\n readonly phase: GoalPhase;\n readonly blockedReason?: GoalBlockReason;\n readonly maxGoalRounds: number;\n}"
291
+ },
292
+ {
293
+ "name": "GoalSnapshotChangeMeta",
294
+ "declaration": "export interface GoalSnapshotChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: Exclude<GoalOperation, 'clear'>;\n readonly goal: GoalSnapshot;\n readonly roundsStarted: number;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
295
+ },
296
+ {
297
+ "name": "ImageAttachmentRef",
298
+ "declaration": "export interface ImageAttachmentRef {\n attachmentId: AttachmentId;\n mediaType: ImageMediaType;\n bytes: number;\n width: number;\n height: number;\n name?: string;\n originalDimensions?: { width: number; height: number; };\n}"
299
+ },
300
+ {
301
+ "name": "ImageBlock",
302
+ "declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n}"
303
+ },
304
+ {
305
+ "name": "ImageMediaType",
306
+ "declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
307
+ },
308
+ {
309
+ "name": "Inbox",
310
+ "declaration": "export class Inbox {\n get nextTurn(): readonly UserMessage[];\n get nextStep(): readonly UserMessage[];\n get hasPending(): boolean;\n clear(): void;\n claim(target: InboxTarget, turn: number): UserMessage[];\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}"
311
+ },
312
+ {
313
+ "name": "InboxTarget",
314
+ "declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
315
+ },
316
+ {
317
+ "name": "JsonValue",
318
+ "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
319
+ },
320
+ {
321
+ "name": "LlmCallConfig",
322
+ "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
323
+ },
324
+ {
325
+ "name": "LlmCallConfigAdapterDefaults",
326
+ "declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
327
+ },
328
+ {
329
+ "name": "LlmFailure",
330
+ "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}"
331
+ },
332
+ {
333
+ "name": "Message",
334
+ "declaration": "export interface Message {\n readonly id: MessageId;\n readonly role: 'system' | 'user' | 'assistant';\n readonly content: ContentBlock[];\n readonly source: MessageSource;\n}"
335
+ },
336
+ {
337
+ "name": "MessageFeedbackDelete",
338
+ "declaration": "export interface MessageFeedbackDelete {\n readonly sessionId: SessionId;\n readonly messageId: MessageId;\n}"
339
+ },
340
+ {
341
+ "name": "MessageFeedbackItem",
342
+ "declaration": "export interface MessageFeedbackItem {\n readonly messageId: MessageId;\n readonly rating: MessageFeedbackRating;\n readonly note?: string;\n readonly version: MessageFeedbackVersion;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
343
+ },
344
+ {
345
+ "name": "MessageFeedbackPut",
346
+ "declaration": "export interface MessageFeedbackPut {\n readonly sessionId: SessionId;\n readonly item: MessageFeedbackItem;\n}"
347
+ },
348
+ {
349
+ "name": "MessageFeedbackRating",
350
+ "declaration": "export type MessageFeedbackRating = 'positive' | 'negative';"
351
+ },
352
+ {
353
+ "name": "MessageFeedbackVersion",
354
+ "declaration": "export type MessageFeedbackVersion = Branded<'MessageFeedbackVersion'>;"
355
+ },
356
+ {
357
+ "name": "MessageId",
358
+ "declaration": "export type MessageId = Branded<'MessageId'>;"
359
+ },
360
+ {
361
+ "name": "MessageSource",
362
+ "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
363
+ },
364
+ {
365
+ "name": "MessageSourceMap",
366
+ "declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'team-message': TeamMessageSource;\n goal: GoalMessageSource;\n 'session-reference': SessionReferenceSource;\n}"
367
+ },
368
+ {
369
+ "name": "ModelMessageSource",
370
+ "declaration": "export interface ModelMessageSource extends AssistantProvenance {\n kind: 'model';\n}"
371
+ },
372
+ {
373
+ "name": "ModelSelection",
374
+ "declaration": "export interface ModelSelection {\n readonly provider: string;\n readonly model: string;\n readonly reasoningEffort?: string;\n}"
375
+ },
376
+ {
377
+ "name": "OneShotSubagentDescriptorData",
378
+ "declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
379
+ },
380
+ {
381
+ "name": "OptionalSessionSeq",
382
+ "declaration": "export type OptionalSessionSeq = SessionSeq | null;"
383
+ },
384
+ {
385
+ "name": "PromptFileBinding",
386
+ "declaration": "export interface PromptFileBinding extends Disposable {\n commit(): void;\n}"
387
+ },
388
+ {
389
+ "name": "ProviderRequestId",
390
+ "declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
391
+ },
392
+ {
393
+ "name": "PtcDispatchEventData",
394
+ "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n}"
395
+ },
396
+ {
397
+ "name": "PtcDispatchStartEventData",
398
+ "declaration": "export interface PtcDispatchStartEventData {\n rootCallId: ToolCallId;\n parentCallId: ToolCallId;\n subCallId: ToolCallId;\n name: string;\n arguments: unknown;\n}"
399
+ },
400
+ {
401
+ "name": "ReasoningBlock",
402
+ "declaration": "export interface ReasoningBlock {\n type: 'reasoning';\n text: string;\n}"
403
+ },
404
+ {
405
+ "name": "ReasoningEffortId",
406
+ "declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
407
+ },
408
+ {
409
+ "name": "ReplayEnvelope",
410
+ "declaration": "export interface ReplayEnvelope {\n response: unknown;\n blocks?: readonly unknown[];\n}"
411
+ },
412
+ {
413
+ "name": "RequestContext",
414
+ "declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n}"
415
+ },
416
+ {
417
+ "name": "RequestHeaderReason",
418
+ "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
419
+ },
420
+ {
421
+ "name": "SandboxMode",
422
+ "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
423
+ },
424
+ {
425
+ "name": "Session",
426
+ "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}"
427
+ },
428
+ {
429
+ "name": "SessionEvent",
430
+ "declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: SessionSeq; time: number; data: SessionEventMap[K]; ignorable?: true; } & (K extends SurfaceEventType ? { sourceEventSeqs?: SessionSeq[]; surfaceOp?: SurfaceOp; } : object) }[T];"
431
+ },
432
+ {
433
+ "name": "SessionEventMap",
434
+ "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 '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/code-dispatch-start': PtcDispatchStartEventData;\n 'tool/code-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 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\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}"
435
+ },
436
+ {
437
+ "name": "SessionEventType",
438
+ "declaration": "export type SessionEventType = keyof SessionEventMap;"
439
+ },
440
+ {
441
+ "name": "SessionHeader",
442
+ "declaration": "export interface SessionHeader {\n readonly version: typeof SESSION_FORMAT_VERSION;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly isSeeded: boolean;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n}"
443
+ },
444
+ {
445
+ "name": "SessionId",
446
+ "declaration": "export type SessionId = Branded<'SessionId'>;"
447
+ },
448
+ {
449
+ "name": "SessionLogOffset",
450
+ "declaration": "export type SessionLogOffset = BrandedNumber<'SessionLogOffset'>;"
451
+ },
452
+ {
453
+ "name": "SessionReferenceSource",
454
+ "declaration": "export interface SessionReferenceSource {\n kind: 'session-reference';\n form: 'recall';\n version: 1;\n references: { sessionId: string; label: string; capturedFormatVersion?: number; capturedThroughSeq: OptionalSessionSeq; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
455
+ },
456
+ {
457
+ "name": "SessionRequestId",
458
+ "declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
459
+ },
460
+ {
461
+ "name": "SessionSeq",
462
+ "declaration": "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
463
+ },
464
+ {
465
+ "name": "SessionSurface",
466
+ "declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n}"
467
+ },
468
+ {
469
+ "name": "SessionTitleEventData",
470
+ "declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
471
+ },
472
+ {
473
+ "name": "SessionTitleModelProvenance",
474
+ "declaration": "export interface SessionTitleModelProvenance {\n readonly provider: string;\n readonly model: string;\n}"
475
+ },
476
+ {
477
+ "name": "SessionTitleProviderId",
478
+ "declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
479
+ },
480
+ {
481
+ "name": "SessionTitleSource",
482
+ "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelProvenance; } | { readonly kind: 'user'; };"
483
+ },
484
+ {
485
+ "name": "SkillInvocationSource",
486
+ "declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
487
+ },
488
+ {
489
+ "name": "StreamChunk",
490
+ "declaration": "export type StreamChunk = { type: 'block-start'; index: number; blockType: ContentBlockType; } | { type: 'text-delta'; index: number; text: string; } | { type: 'reasoning-delta'; index: number; text: string; } | { type: 'tool-call-delta'; index: number; id: ToolCallId; name?: string; argumentsDelta: string; } | { type: 'block-end'; index: number; block: ContentBlock; } | { type: 'usage'; usage: TokenUsage; } | { type: 'finish'; reason: FinishReason; replayState?: ReplayEnvelope; };"
491
+ },
492
+ {
493
+ "name": "SubagentDescriptorBase",
494
+ "declaration": "export interface SubagentDescriptorBase {\n readonly version: number;\n readonly mode: 'one-shot' | 'continuable';\n readonly provider: string;\n}"
495
+ },
496
+ {
497
+ "name": "SubagentDescriptorData",
498
+ "declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
499
+ },
500
+ {
501
+ "name": "SubagentSettledMessageSource",
502
+ "declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
503
+ },
504
+ {
505
+ "name": "SurfaceEventType",
506
+ "declaration": "export type SurfaceEventType = 'user/message' | 'assistant/message' | 'tool/result';"
507
+ },
508
+ {
509
+ "name": "SurfaceIntent",
510
+ "declaration": "export type SurfaceIntent<T extends SurfaceEventType = SurfaceEventType> = { surfaceOp: SurfaceOp; } & (T extends 'assistant/message' ? { sourceEventSeqs?: never; } : { sourceEventSeqs?: SessionSeq[]; });"
511
+ },
512
+ {
513
+ "name": "SurfaceOp",
514
+ "declaration": "export type SurfaceOp = 'append' | { op: 'replace'; start: SessionSeq; end: SessionSeq; };"
515
+ },
516
+ {
517
+ "name": "TeamId",
518
+ "declaration": "export type TeamId = Branded<'TeamId'>;"
519
+ },
520
+ {
521
+ "name": "TeamMemberPhase",
522
+ "declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
523
+ },
524
+ {
525
+ "name": "TeamMemberSnapshot",
526
+ "declaration": "export interface TeamMemberSnapshot {\n readonly id: SessionId;\n readonly name: string;\n readonly description: string;\n readonly provider: string;\n readonly context: 'fresh' | 'fork';\n readonly phase: TeamMemberPhase;\n readonly error?: string;\n}"
527
+ },
528
+ {
529
+ "name": "TeamMessageId",
530
+ "declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
531
+ },
532
+ {
533
+ "name": "TeamMessageSnapshot",
534
+ "declaration": "export interface TeamMessageSnapshot {\n readonly id: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n readonly targetId: SessionId;\n readonly content: ContentBlock[];\n}"
535
+ },
536
+ {
537
+ "name": "TeamMessageSource",
538
+ "declaration": "export interface TeamMessageSource {\n readonly kind: 'team-message';\n readonly teamId: TeamId;\n readonly messageId: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n}"
539
+ },
540
+ {
541
+ "name": "TeamTaskId",
542
+ "declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
543
+ },
544
+ {
545
+ "name": "TeamTaskSnapshot",
546
+ "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}"
547
+ },
548
+ {
549
+ "name": "TeamTaskStatus",
550
+ "declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
551
+ },
552
+ {
553
+ "name": "TextBlock",
554
+ "declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
555
+ },
556
+ {
557
+ "name": "TodoItem",
558
+ "declaration": "export interface TodoItem {\n content: string;\n status: 'pending' | 'in_progress' | 'completed';\n}"
559
+ },
560
+ {
561
+ "name": "TokenUsage",
562
+ "declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
563
+ },
564
+ {
565
+ "name": "ToolCallBlock",
566
+ "declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
567
+ },
568
+ {
569
+ "name": "ToolCallId",
570
+ "declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
571
+ },
572
+ {
573
+ "name": "ToolMessageSource",
574
+ "declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
575
+ },
576
+ {
577
+ "name": "ToolRestriction",
578
+ "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
579
+ },
580
+ {
581
+ "name": "ToolResultBlock",
582
+ "declaration": "export interface ToolResultBlock {\n type: 'tool-result';\n toolCallId: ToolCallId;\n content: ContentBlock[];\n isError?: boolean;\n}"
583
+ },
584
+ {
585
+ "name": "ToolResultMessage",
586
+ "declaration": "export interface ToolResultMessage extends Message {\n readonly role: 'user';\n readonly content: [ToolResultBlock];\n readonly source: ToolMessageSource;\n}"
587
+ },
588
+ {
589
+ "name": "ToolSchema",
590
+ "declaration": "export interface ToolSchema {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
591
+ },
592
+ {
593
+ "name": "TurnEndCancelCause",
594
+ "declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
595
+ },
596
+ {
597
+ "name": "TurnEndReason",
598
+ "declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
599
+ },
600
+ {
601
+ "name": "TurnEndReasonMap",
602
+ "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}"
603
+ },
604
+ {
605
+ "name": "UserMessage",
606
+ "declaration": "export interface UserMessage extends Message {\n readonly role: 'user';\n}"
607
+ }
608
+ ]
609
+ }
610
+ ],
611
+ "events": [],
612
+ "objects": []
613
+ },
614
+ }
@@ -0,0 +1,26 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
2
+ import type {
3
+ RemoteResult,
4
+ TypertRemoteContribution,
5
+ } from '@deepseek-ai/dsh-typert-protocol'
6
+ import type { EncodedFileUploadRequest, FileUploadValue } from '@deepseek-ai/dsh-client-file-upload/types'
7
+ import type { SessionId } from '@deepseek-ai/dsh-session/types'
8
+
9
+ declare module '@deepseek-ai/dsh-typert-protocol' {
10
+ interface TypertRemoteNamespace$66696c6555706c6f616473 {
11
+ upload: (agentId: SessionId, request: EncodedFileUploadRequest, signal?: AbortSignal) => Promise<RemoteResult<FileUploadValue>>
12
+ }
13
+ interface TypertRemoteMap {
14
+ 'fileUploads/upload': (agentId: SessionId, request: EncodedFileUploadRequest, signal?: AbortSignal) => Promise<RemoteResult<FileUploadValue>>
15
+ }
16
+ interface TypertRemoteNamespaceMap {
17
+ 'fileUploads': TypertRemoteNamespace$66696c6555706c6f616473
18
+ }
19
+ interface TypertRemoteScopeMap {
20
+ 'agent:fileUploads/upload': (request: EncodedFileUploadRequest, signal?: AbortSignal) => Promise<RemoteResult<FileUploadValue>>
21
+ }
22
+ }
23
+
24
+ export declare const TYPERT_REMOTE: TypertRemoteContribution
25
+ export default TYPERT_REMOTE
26
+ //# sourceMappingURL=typert.remote-client.d.ts.map