@deepseek-ai/dsh-api-workspace-files 0.1.5-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.
@@ -0,0 +1,853 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
+ import { z } from 'zod'
3
+
4
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_changes_parameter_0$schema = z.intersection(z.string(), z.unknown())
5
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_changes_result$schema = z.union([z.object({
6
+ 'kind': z.literal("ready").readonly(),
7
+ }), z.object({
8
+ 'kind': z.literal("change").readonly(),
9
+ 'change': z.union([z.object({
10
+ 'absolutePath': z.string().readonly(),
11
+ 'version': z.string().readonly(),
12
+ }), z.object({
13
+ 'absolutePath': z.string().readonly(),
14
+ 'absent': z.literal(true).readonly(),
15
+ })]).readonly(),
16
+ })])
17
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_list_parameter_0$schema = z.intersection(z.string(), z.unknown())
18
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_list_parameter_1$schema = z.string()
19
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_list_result$schema = z.object({
20
+ 'path': z.string().readonly(),
21
+ 'entries': z.array(z.object({
22
+ 'name': z.string().readonly(),
23
+ 'type': z.union([z.literal("file"), z.literal("directory"), z.literal("other")]).readonly(),
24
+ 'size': z.number().readonly().optional(),
25
+ })).readonly(),
26
+ 'truncated': z.boolean().readonly(),
27
+ })
28
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_read_parameter_0$schema = z.intersection(z.string(), z.unknown())
29
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_read_parameter_1$schema = z.string()
30
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_read_parameter_2$schema = z.object({
31
+ 'offset': z.number().readonly().optional(),
32
+ 'limit': z.number().readonly().optional(),
33
+ })
34
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_read_result$schema = z.object({
35
+ 'offset': z.number().readonly(),
36
+ 'text': z.string().readonly(),
37
+ 'lines': z.number().readonly(),
38
+ 'eof': z.boolean().readonly(),
39
+ 'absolutePath': z.string().readonly(),
40
+ 'version': z.string().readonly(),
41
+ 'bytes': z.number().readonly().optional(),
42
+ })
43
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readBytes_parameter_0$schema = z.intersection(z.string(), z.unknown())
44
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readBytes_parameter_1$schema = z.string()
45
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readBytes_parameter_2$schema = z.object({
46
+ 'offset': z.number().readonly().optional(),
47
+ 'length': z.number().readonly().optional(),
48
+ })
49
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readBytes_result$schema = z.object({
50
+ 'offset': z.number().readonly(),
51
+ 'data': z.string().readonly(),
52
+ 'eof': z.boolean().readonly(),
53
+ 'absolutePath': z.string().readonly(),
54
+ 'version': z.string().readonly(),
55
+ 'bytes': z.number().readonly().optional(),
56
+ })
57
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_stat_parameter_0$schema = z.intersection(z.string(), z.unknown())
58
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_stat_parameter_1$schema = z.string()
59
+ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_stat_result$schema = z.object({
60
+ 'absolutePath': z.string().readonly(),
61
+ 'version': z.string().readonly(),
62
+ 'bytes': z.number().readonly().optional(),
63
+ })
64
+
65
+ export const TYPERT = {
66
+ package: '@deepseek-ai/dsh-api-workspace-files',
67
+ face: 'host',
68
+ schemas: [
69
+ ],
70
+ invocations: [
71
+ {
72
+ id: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/changes',
73
+ service: 'workspaceFiles',
74
+ namespace: 'workspaceFiles',
75
+ method: 'changes',
76
+ mode: 'stream',
77
+ invocation: { kind: 'direct' },
78
+ scope: {
79
+ context: 'agent',
80
+ wire: 'agentId',
81
+ },
82
+ parameters: [
83
+ {
84
+ name: 'agent',
85
+ wire: 'agentId',
86
+ source: 'lookup',
87
+ lookup: 'agent',
88
+ codec: {
89
+ mode: 'strict',
90
+ typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
91
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_changes_parameter_0$schema,
92
+ },
93
+ },
94
+ ],
95
+ cancellation: { parameter: 'signal' },
96
+ result: {
97
+ mode: 'strict',
98
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceFileWatchFrame',
99
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_changes_result$schema,
100
+ },
101
+ sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":274,"column":3},
102
+ },
103
+ {
104
+ id: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/list',
105
+ service: 'workspaceFiles',
106
+ namespace: 'workspaceFiles',
107
+ method: 'list',
108
+ invocation: { kind: 'direct' },
109
+ scope: {
110
+ context: 'agent',
111
+ wire: 'agentId',
112
+ },
113
+ parameters: [
114
+ {
115
+ name: 'agent',
116
+ wire: 'agentId',
117
+ source: 'lookup',
118
+ lookup: 'agent',
119
+ codec: {
120
+ mode: 'strict',
121
+ typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
122
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_list_parameter_0$schema,
123
+ },
124
+ },
125
+ {
126
+ name: 'path',
127
+ wire: 'path',
128
+ source: 'json',
129
+ codec: {
130
+ mode: 'strict',
131
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/list:path',
132
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_list_parameter_1$schema,
133
+ },
134
+ },
135
+ ],
136
+ cancellation: { parameter: 'signal' },
137
+ result: {
138
+ mode: 'strict',
139
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceDirectoryListing',
140
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_list_result$schema,
141
+ },
142
+ sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":246,"column":9},
143
+ },
144
+ {
145
+ id: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/read',
146
+ service: 'workspaceFiles',
147
+ namespace: 'workspaceFiles',
148
+ method: 'read',
149
+ invocation: { kind: 'direct' },
150
+ scope: {
151
+ context: 'agent',
152
+ wire: 'agentId',
153
+ },
154
+ parameters: [
155
+ {
156
+ name: 'agent',
157
+ wire: 'agentId',
158
+ source: 'lookup',
159
+ lookup: 'agent',
160
+ codec: {
161
+ mode: 'strict',
162
+ typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
163
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_read_parameter_0$schema,
164
+ },
165
+ },
166
+ {
167
+ name: 'path',
168
+ wire: 'path',
169
+ source: 'json',
170
+ codec: {
171
+ mode: 'strict',
172
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/read:path',
173
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_read_parameter_1$schema,
174
+ },
175
+ },
176
+ {
177
+ name: 'range',
178
+ wire: 'range',
179
+ source: 'json',
180
+ codec: {
181
+ mode: 'strict',
182
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceFileRange',
183
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_read_parameter_2$schema,
184
+ },
185
+ },
186
+ ],
187
+ cancellation: { parameter: 'signal' },
188
+ result: {
189
+ mode: 'strict',
190
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceFileText',
191
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_read_result$schema,
192
+ },
193
+ sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":197,"column":9},
194
+ },
195
+ {
196
+ id: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/readBytes',
197
+ service: 'workspaceFiles',
198
+ namespace: 'workspaceFiles',
199
+ method: 'readBytes',
200
+ invocation: { kind: 'direct' },
201
+ scope: {
202
+ context: 'agent',
203
+ wire: 'agentId',
204
+ },
205
+ parameters: [
206
+ {
207
+ name: 'agent',
208
+ wire: 'agentId',
209
+ source: 'lookup',
210
+ lookup: 'agent',
211
+ codec: {
212
+ mode: 'strict',
213
+ typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
214
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readBytes_parameter_0$schema,
215
+ },
216
+ },
217
+ {
218
+ name: 'path',
219
+ wire: 'path',
220
+ source: 'json',
221
+ codec: {
222
+ mode: 'strict',
223
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/readBytes:path',
224
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readBytes_parameter_1$schema,
225
+ },
226
+ },
227
+ {
228
+ name: 'range',
229
+ wire: 'range',
230
+ source: 'json',
231
+ codec: {
232
+ mode: 'strict',
233
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceByteRange',
234
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readBytes_parameter_2$schema,
235
+ },
236
+ },
237
+ ],
238
+ cancellation: { parameter: 'signal' },
239
+ result: {
240
+ mode: 'strict',
241
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceFileBytes',
242
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readBytes_result$schema,
243
+ },
244
+ sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":217,"column":9},
245
+ },
246
+ {
247
+ id: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/stat',
248
+ service: 'workspaceFiles',
249
+ namespace: 'workspaceFiles',
250
+ method: 'stat',
251
+ invocation: { kind: 'direct' },
252
+ scope: {
253
+ context: 'agent',
254
+ wire: 'agentId',
255
+ },
256
+ parameters: [
257
+ {
258
+ name: 'agent',
259
+ wire: 'agentId',
260
+ source: 'lookup',
261
+ lookup: 'agent',
262
+ codec: {
263
+ mode: 'strict',
264
+ typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
265
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_stat_parameter_0$schema,
266
+ },
267
+ },
268
+ {
269
+ name: 'path',
270
+ wire: 'path',
271
+ source: 'json',
272
+ codec: {
273
+ mode: 'strict',
274
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/stat:path',
275
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_stat_parameter_1$schema,
276
+ },
277
+ },
278
+ ],
279
+ cancellation: { parameter: 'signal' },
280
+ result: {
281
+ mode: 'strict',
282
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceFileStat',
283
+ schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_stat_result$schema,
284
+ },
285
+ sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":233,"column":9},
286
+ },
287
+ ],
288
+ model: {
289
+ "services": [
290
+ {
291
+ "description": "Host Remote service over the composed filesystem, confined to one workspace.",
292
+ "summary": "Host Remote service over the composed filesystem, confined to one workspace.",
293
+ "tags": [],
294
+ "jsDoc": "/** Host Remote service over the composed filesystem, confined to one workspace. */",
295
+ "key": "workspaceFiles",
296
+ "exportName": "WorkspaceFiles",
297
+ "members": [
298
+ {
299
+ "kind": "method",
300
+ "name": "read",
301
+ "signature": "@Remote async read(agent: Agent, path: string, range: WorkspaceFileRange, signal: AbortSignal): Promise<WorkspaceFileText>",
302
+ "summary": "Read one page of lines from a UTF-8 text file inside the Agent's workspace.",
303
+ "jsDoc": "/**\n * Read one page of lines from a UTF-8 text file inside the Agent's workspace.\n * @param agent - target Agent resolved from the Session identity on the wire.\n * @param path - workspace path, absolute or relative to the workspace root.\n * @param range - the line window; omitted fields take the page defaults.\n * @param signal - caller cancellation.\n * @returns the page, the file's version at the stat before it, and whether it reaches the last line.\n */"
304
+ },
305
+ {
306
+ "kind": "method",
307
+ "name": "readBytes",
308
+ "signature": "@Remote async readBytes(agent: Agent, path: string, range: WorkspaceByteRange, signal: AbortSignal): Promise<WorkspaceFileBytes>",
309
+ "summary": "Read one byte window of a regular file inside the Agent's workspace: raw bytes, no text decoding and no binary rejection.",
310
+ "jsDoc": "/**\n * Read one byte window of a regular file inside the Agent's workspace: raw\n * bytes, no text decoding and no binary rejection.\n * @param agent - target Agent resolved from the Session identity on the wire.\n * @param path - workspace path, absolute or relative to the workspace root.\n * @param range - the byte window; omitted fields take the window defaults.\n * @param signal - caller cancellation.\n * @returns the window in base64, the file's version and size at the stat before it, and whether it reaches the last byte.\n */"
311
+ },
312
+ {
313
+ "kind": "method",
314
+ "name": "stat",
315
+ "signature": "@Remote async stat(agent: Agent, path: string, signal: AbortSignal): Promise<WorkspaceFileStat>",
316
+ "summary": "Report one regular file's identity, version, and size without its content.",
317
+ "jsDoc": "/**\n * Report one regular file's identity, version, and size without its content.\n * @param agent - target Agent resolved from the Session identity on the wire.\n * @param path - workspace path, absolute or relative to the workspace root.\n * @param signal - caller cancellation.\n * @returns the file's absolute path, current version, and byte size.\n */"
318
+ },
319
+ {
320
+ "kind": "method",
321
+ "name": "list",
322
+ "signature": "@Remote async list(agent: Agent, path: string, signal: AbortSignal): Promise<WorkspaceDirectoryListing>",
323
+ "summary": "List the direct children of one directory inside the Agent's workspace.",
324
+ "jsDoc": "/**\n * List the direct children of one directory inside the Agent's workspace.\n * @param agent - target Agent resolved from the Session identity on the wire.\n * @param path - workspace path, absolute or relative to the workspace root.\n * @param signal - caller cancellation.\n * @returns the directory's children in the backend's stable name order, bounded by the entry cap.\n */"
325
+ },
326
+ {
327
+ "kind": "method",
328
+ "name": "changes",
329
+ "signature": "@Remote({ mode: 'stream' }) changes(agent: Agent, signal: AbortSignal): AsyncIterable<WorkspaceFileWatchFrame>",
330
+ "summary": "Stream every `fs/observed` observation of a file inside the Agent's workspace.",
331
+ "jsDoc": "/**\n * Stream every `fs/observed` observation of a file inside the Agent's\n * workspace. Only Agent filesystem operations report here; the OS is not\n * watched.\n * @param agent - target Agent resolved from the Session identity on the wire.\n * @param signal - generation cancellation.\n * @returns `ready` once the Host observation queue is active and the workspace\n * root is resolved, then queued and live observations in emission order.\n */"
332
+ }
333
+ ],
334
+ "types": [
335
+ {
336
+ "name": "Agent",
337
+ "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}"
338
+ },
339
+ {
340
+ "name": "AgentCancelCause",
341
+ "declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
342
+ },
343
+ {
344
+ "name": "AgentMessageSource",
345
+ "declaration": "export interface AgentMessageSource {\n readonly kind: 'agent-message';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
346
+ },
347
+ {
348
+ "name": "AgentOptions",
349
+ "declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
350
+ },
351
+ {
352
+ "name": "AgentStatus",
353
+ "declaration": "export type AgentStatus = 'idle' | 'running';"
354
+ },
355
+ {
356
+ "name": "ApprovalOutcome",
357
+ "declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
358
+ },
359
+ {
360
+ "name": "ApprovalPolicy",
361
+ "declaration": "export type ApprovalPolicy = 'ask' | 'never';"
362
+ },
363
+ {
364
+ "name": "ApprovalRequestId",
365
+ "declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
366
+ },
367
+ {
368
+ "name": "AssistantMessage",
369
+ "declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
370
+ },
371
+ {
372
+ "name": "AssistantProvenance",
373
+ "declaration": "export interface AssistantProvenance {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
374
+ },
375
+ {
376
+ "name": "AssistantStreamRecord",
377
+ "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; };"
378
+ },
379
+ {
380
+ "name": "AttachmentId",
381
+ "declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
382
+ },
383
+ {
384
+ "name": "Branded",
385
+ "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
386
+ },
387
+ {
388
+ "name": "BrandedNumber",
389
+ "declaration": "export type BrandedNumber<B extends string> = number & { readonly [BRAND]: B; };"
390
+ },
391
+ {
392
+ "name": "CancelOptions",
393
+ "declaration": "export interface CancelOptions {\n keepInbox?: boolean | undefined;\n}"
394
+ },
395
+ {
396
+ "name": "CommandId",
397
+ "declaration": "export type CommandId = Branded<'CommandId'>;"
398
+ },
399
+ {
400
+ "name": "CommandSource",
401
+ "declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
402
+ },
403
+ {
404
+ "name": "CommandSourceMap",
405
+ "declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
406
+ },
407
+ {
408
+ "name": "CompactionId",
409
+ "declaration": "export type CompactionId = Branded<'CompactionId'>;"
410
+ },
411
+ {
412
+ "name": "ContentBlock",
413
+ "declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
414
+ },
415
+ {
416
+ "name": "ContentBlockMap",
417
+ "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}"
418
+ },
419
+ {
420
+ "name": "ContentBlockType",
421
+ "declaration": "export type ContentBlockType = keyof ContentBlockMap;"
422
+ },
423
+ {
424
+ "name": "ContextFormed",
425
+ "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'; };"
426
+ },
427
+ {
428
+ "name": "ContextSnapshotSection",
429
+ "declaration": "export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}"
430
+ },
431
+ {
432
+ "name": "ContinuableSubagentDescriptorData",
433
+ "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}"
434
+ },
435
+ {
436
+ "name": "EpochHeader",
437
+ "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n}"
438
+ },
439
+ {
440
+ "name": "FileAttachmentRef",
441
+ "declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
442
+ },
443
+ {
444
+ "name": "FileBlock",
445
+ "declaration": "export interface FileBlock {\n type: 'file';\n attachment: FileAttachmentRef;\n}"
446
+ },
447
+ {
448
+ "name": "FinishReason",
449
+ "declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
450
+ },
451
+ {
452
+ "name": "FinishReasonMap",
453
+ "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}"
454
+ },
455
+ {
456
+ "name": "GoalBlockReason",
457
+ "declaration": "export interface GoalBlockReason {\n readonly code: string;\n readonly message: string;\n}"
458
+ },
459
+ {
460
+ "name": "GoalChangeMeta",
461
+ "declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
462
+ },
463
+ {
464
+ "name": "GoalClearChangeMeta",
465
+ "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}"
466
+ },
467
+ {
468
+ "name": "GoalId",
469
+ "declaration": "export type GoalId = Branded<'GoalId'>;"
470
+ },
471
+ {
472
+ "name": "GoalMessageSource",
473
+ "declaration": "export interface GoalMessageSource {\n readonly kind: 'goal';\n readonly goalId: GoalId;\n readonly revision: number;\n readonly round: number;\n}"
474
+ },
475
+ {
476
+ "name": "GoalOperation",
477
+ "declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
478
+ },
479
+ {
480
+ "name": "GoalPhase",
481
+ "declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
482
+ },
483
+ {
484
+ "name": "GoalRef",
485
+ "declaration": "export interface GoalRef {\n readonly id: GoalId;\n readonly revision: number;\n}"
486
+ },
487
+ {
488
+ "name": "GoalSnapshot",
489
+ "declaration": "export interface GoalSnapshot extends GoalRef {\n readonly objective: string;\n readonly phase: GoalPhase;\n readonly blockedReason?: GoalBlockReason;\n readonly maxGoalRounds: number;\n}"
490
+ },
491
+ {
492
+ "name": "GoalSnapshotChangeMeta",
493
+ "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}"
494
+ },
495
+ {
496
+ "name": "ImageAttachmentRef",
497
+ "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}"
498
+ },
499
+ {
500
+ "name": "ImageBlock",
501
+ "declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n}"
502
+ },
503
+ {
504
+ "name": "ImageMediaType",
505
+ "declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
506
+ },
507
+ {
508
+ "name": "Inbox",
509
+ "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}"
510
+ },
511
+ {
512
+ "name": "InboxTarget",
513
+ "declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
514
+ },
515
+ {
516
+ "name": "JsonValue",
517
+ "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
518
+ },
519
+ {
520
+ "name": "LlmCallConfig",
521
+ "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
522
+ },
523
+ {
524
+ "name": "LlmCallConfigAdapterDefaults",
525
+ "declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
526
+ },
527
+ {
528
+ "name": "LlmFailure",
529
+ "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}"
530
+ },
531
+ {
532
+ "name": "Message",
533
+ "declaration": "export interface Message {\n readonly id: MessageId;\n readonly role: 'system' | 'user' | 'assistant';\n readonly content: ContentBlock[];\n readonly source: MessageSource;\n}"
534
+ },
535
+ {
536
+ "name": "MessageFeedbackDelete",
537
+ "declaration": "export interface MessageFeedbackDelete {\n readonly sessionId: SessionId;\n readonly messageId: MessageId;\n}"
538
+ },
539
+ {
540
+ "name": "MessageFeedbackItem",
541
+ "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}"
542
+ },
543
+ {
544
+ "name": "MessageFeedbackPut",
545
+ "declaration": "export interface MessageFeedbackPut {\n readonly sessionId: SessionId;\n readonly item: MessageFeedbackItem;\n}"
546
+ },
547
+ {
548
+ "name": "MessageFeedbackRating",
549
+ "declaration": "export type MessageFeedbackRating = 'positive' | 'negative';"
550
+ },
551
+ {
552
+ "name": "MessageFeedbackVersion",
553
+ "declaration": "export type MessageFeedbackVersion = Branded<'MessageFeedbackVersion'>;"
554
+ },
555
+ {
556
+ "name": "MessageId",
557
+ "declaration": "export type MessageId = Branded<'MessageId'>;"
558
+ },
559
+ {
560
+ "name": "MessageSource",
561
+ "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
562
+ },
563
+ {
564
+ "name": "MessageSourceMap",
565
+ "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}"
566
+ },
567
+ {
568
+ "name": "ModelMessageSource",
569
+ "declaration": "export interface ModelMessageSource extends AssistantProvenance {\n kind: 'model';\n}"
570
+ },
571
+ {
572
+ "name": "ModelSelection",
573
+ "declaration": "export interface ModelSelection {\n readonly provider: string;\n readonly model: string;\n readonly reasoningEffort?: string;\n}"
574
+ },
575
+ {
576
+ "name": "OneShotSubagentDescriptorData",
577
+ "declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
578
+ },
579
+ {
580
+ "name": "OptionalSessionSeq",
581
+ "declaration": "export type OptionalSessionSeq = SessionSeq | null;"
582
+ },
583
+ {
584
+ "name": "ProviderRequestId",
585
+ "declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
586
+ },
587
+ {
588
+ "name": "PtcDispatchEventData",
589
+ "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n}"
590
+ },
591
+ {
592
+ "name": "PtcDispatchStartEventData",
593
+ "declaration": "export interface PtcDispatchStartEventData {\n rootCallId: ToolCallId;\n parentCallId: ToolCallId;\n subCallId: ToolCallId;\n name: string;\n arguments: unknown;\n}"
594
+ },
595
+ {
596
+ "name": "ReasoningBlock",
597
+ "declaration": "export interface ReasoningBlock {\n type: 'reasoning';\n text: string;\n}"
598
+ },
599
+ {
600
+ "name": "ReasoningEffortId",
601
+ "declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
602
+ },
603
+ {
604
+ "name": "ReplayEnvelope",
605
+ "declaration": "export interface ReplayEnvelope {\n response: unknown;\n blocks?: readonly unknown[];\n}"
606
+ },
607
+ {
608
+ "name": "RequestContext",
609
+ "declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n systemPromptUpdate?: SystemPromptUpdate;\n}"
610
+ },
611
+ {
612
+ "name": "RequestHeaderReason",
613
+ "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
614
+ },
615
+ {
616
+ "name": "SandboxMode",
617
+ "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
618
+ },
619
+ {
620
+ "name": "Session",
621
+ "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}"
622
+ },
623
+ {
624
+ "name": "SessionEvent",
625
+ "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 ? SurfaceIntent<K> : { surfaceOp?: never; sourceEventSeqs?: never; }) }[T];"
626
+ },
627
+ {
628
+ "name": "SessionEventMap",
629
+ "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 '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}"
630
+ },
631
+ {
632
+ "name": "SessionEventType",
633
+ "declaration": "export type SessionEventType = keyof SessionEventMap;"
634
+ },
635
+ {
636
+ "name": "SessionHeader",
637
+ "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}"
638
+ },
639
+ {
640
+ "name": "SessionId",
641
+ "declaration": "export type SessionId = Branded<'SessionId'>;"
642
+ },
643
+ {
644
+ "name": "SessionLogOffset",
645
+ "declaration": "export type SessionLogOffset = BrandedNumber<'SessionLogOffset'>;"
646
+ },
647
+ {
648
+ "name": "SessionReferenceSource",
649
+ "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}"
650
+ },
651
+ {
652
+ "name": "SessionRequestId",
653
+ "declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
654
+ },
655
+ {
656
+ "name": "SessionSeq",
657
+ "declaration": "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
658
+ },
659
+ {
660
+ "name": "SessionSurface",
661
+ "declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n}"
662
+ },
663
+ {
664
+ "name": "SessionTitleEventData",
665
+ "declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
666
+ },
667
+ {
668
+ "name": "SessionTitleModelProvenance",
669
+ "declaration": "export interface SessionTitleModelProvenance {\n readonly provider: string;\n readonly model: string;\n}"
670
+ },
671
+ {
672
+ "name": "SessionTitleProviderId",
673
+ "declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
674
+ },
675
+ {
676
+ "name": "SessionTitleSource",
677
+ "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelProvenance; } | { readonly kind: 'user'; };"
678
+ },
679
+ {
680
+ "name": "SkillInvocationSource",
681
+ "declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
682
+ },
683
+ {
684
+ "name": "StreamChunk",
685
+ "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; };"
686
+ },
687
+ {
688
+ "name": "SubagentDescriptorBase",
689
+ "declaration": "export interface SubagentDescriptorBase {\n readonly version: number;\n readonly mode: 'one-shot' | 'continuable';\n readonly provider: string;\n}"
690
+ },
691
+ {
692
+ "name": "SubagentDescriptorData",
693
+ "declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
694
+ },
695
+ {
696
+ "name": "SubagentSettledMessageSource",
697
+ "declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
698
+ },
699
+ {
700
+ "name": "SurfaceEventType",
701
+ "declaration": "export type SurfaceEventType = 'system/message' | 'user/message' | 'assistant/message' | 'tool/result';"
702
+ },
703
+ {
704
+ "name": "SurfaceIntent",
705
+ "declaration": "export type SurfaceIntent<T extends SurfaceEventType = SurfaceEventType> = { surfaceOp: SurfaceOp; } & (T extends 'assistant/message' ? { sourceEventSeqs?: never; } : { sourceEventSeqs?: SessionSeq[]; });"
706
+ },
707
+ {
708
+ "name": "SurfaceOp",
709
+ "declaration": "export type SurfaceOp = 'append' | { op: 'replace'; startSeq: SessionSeq; endSeq: SessionSeq; };"
710
+ },
711
+ {
712
+ "name": "SystemMessage",
713
+ "declaration": "export interface SystemMessage extends Message {\n readonly role: 'system';\n readonly source: MessageSourceMap['plugin'];\n}"
714
+ },
715
+ {
716
+ "name": "SystemPromptUpdate",
717
+ "declaration": "export type SystemPromptUpdate = 'in-history';"
718
+ },
719
+ {
720
+ "name": "TeamId",
721
+ "declaration": "export type TeamId = Branded<'TeamId'>;"
722
+ },
723
+ {
724
+ "name": "TeamMemberPhase",
725
+ "declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
726
+ },
727
+ {
728
+ "name": "TeamMemberSnapshot",
729
+ "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}"
730
+ },
731
+ {
732
+ "name": "TeamMessageId",
733
+ "declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
734
+ },
735
+ {
736
+ "name": "TeamMessageSnapshot",
737
+ "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}"
738
+ },
739
+ {
740
+ "name": "TeamMessageSource",
741
+ "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}"
742
+ },
743
+ {
744
+ "name": "TeamTaskId",
745
+ "declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
746
+ },
747
+ {
748
+ "name": "TeamTaskSnapshot",
749
+ "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}"
750
+ },
751
+ {
752
+ "name": "TeamTaskStatus",
753
+ "declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
754
+ },
755
+ {
756
+ "name": "TextBlock",
757
+ "declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
758
+ },
759
+ {
760
+ "name": "TodoItem",
761
+ "declaration": "export interface TodoItem {\n content: string;\n status: 'pending' | 'in_progress' | 'completed';\n}"
762
+ },
763
+ {
764
+ "name": "TokenUsage",
765
+ "declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
766
+ },
767
+ {
768
+ "name": "ToolCallBlock",
769
+ "declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
770
+ },
771
+ {
772
+ "name": "ToolCallId",
773
+ "declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
774
+ },
775
+ {
776
+ "name": "ToolMessageSource",
777
+ "declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
778
+ },
779
+ {
780
+ "name": "ToolRestriction",
781
+ "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
782
+ },
783
+ {
784
+ "name": "ToolResultBlock",
785
+ "declaration": "export interface ToolResultBlock {\n type: 'tool-result';\n toolCallId: ToolCallId;\n content: ContentBlock[];\n isError?: boolean;\n}"
786
+ },
787
+ {
788
+ "name": "ToolResultMessage",
789
+ "declaration": "export interface ToolResultMessage extends Message {\n readonly role: 'user';\n readonly content: [ToolResultBlock];\n readonly source: ToolMessageSource;\n}"
790
+ },
791
+ {
792
+ "name": "ToolSchema",
793
+ "declaration": "export interface ToolSchema {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
794
+ },
795
+ {
796
+ "name": "TurnEndCancelCause",
797
+ "declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
798
+ },
799
+ {
800
+ "name": "TurnEndReason",
801
+ "declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
802
+ },
803
+ {
804
+ "name": "TurnEndReasonMap",
805
+ "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}"
806
+ },
807
+ {
808
+ "name": "UserMessage",
809
+ "declaration": "export interface UserMessage extends Message {\n readonly role: 'user';\n}"
810
+ },
811
+ {
812
+ "name": "WorkspaceByteRange",
813
+ "declaration": "export interface WorkspaceByteRange {\n readonly offset?: number;\n readonly length?: number;\n}"
814
+ },
815
+ {
816
+ "name": "WorkspaceDirectoryEntry",
817
+ "declaration": "export interface WorkspaceDirectoryEntry {\n readonly name: string;\n readonly type: 'file' | 'directory' | 'other';\n readonly size?: number;\n}"
818
+ },
819
+ {
820
+ "name": "WorkspaceDirectoryListing",
821
+ "declaration": "export interface WorkspaceDirectoryListing {\n readonly path: string;\n readonly entries: readonly WorkspaceDirectoryEntry[];\n readonly truncated: boolean;\n}"
822
+ },
823
+ {
824
+ "name": "WorkspaceFileBytes",
825
+ "declaration": "export interface WorkspaceFileBytes extends WorkspaceFileStat {\n readonly offset: number;\n readonly data: string;\n readonly eof: boolean;\n}"
826
+ },
827
+ {
828
+ "name": "WorkspaceFileChange",
829
+ "declaration": "export type WorkspaceFileChange = { readonly absolutePath: string; readonly version: string; } | { readonly absolutePath: string; readonly absent: true; };"
830
+ },
831
+ {
832
+ "name": "WorkspaceFileRange",
833
+ "declaration": "export interface WorkspaceFileRange {\n readonly offset?: number;\n readonly limit?: number;\n}"
834
+ },
835
+ {
836
+ "name": "WorkspaceFileStat",
837
+ "declaration": "export interface WorkspaceFileStat {\n readonly absolutePath: string;\n readonly version: string;\n readonly bytes?: number;\n}"
838
+ },
839
+ {
840
+ "name": "WorkspaceFileText",
841
+ "declaration": "export interface WorkspaceFileText extends WorkspaceFileStat {\n readonly offset: number;\n readonly text: string;\n readonly lines: number;\n readonly eof: boolean;\n}"
842
+ },
843
+ {
844
+ "name": "WorkspaceFileWatchFrame",
845
+ "declaration": "export type WorkspaceFileWatchFrame = { readonly kind: 'ready'; } | { readonly kind: 'change'; readonly change: WorkspaceFileChange; };"
846
+ }
847
+ ]
848
+ }
849
+ ],
850
+ "events": [],
851
+ "objects": []
852
+ },
853
+ }