@blade-hq/agent-client 2610.0.1 → 2612.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -142
- package/dist/chunk-U2VELZGU.js +7607 -0
- package/dist/chunk-U2VELZGU.js.map +1 -0
- package/dist/embed/mount-renderer.d.ts +50 -0
- package/dist/index.d.ts +16 -59
- package/dist/index.js +22 -7115
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +55 -0
- package/dist/internal.js +340 -0
- package/dist/internal.js.map +1 -0
- package/dist/schemas/projection.d.ts +3 -0
- package/dist/schemas/solution.d.ts +0 -4
- package/dist/session/agent-session.d.ts +82 -12
- package/dist/session/events.d.ts +15 -1
- package/dist/session/hub.d.ts +88 -2
- package/dist/session/state.d.ts +37 -0
- package/dist/session/workflow.d.ts +57 -0
- package/dist/shared/oom.d.ts +5 -0
- package/dist/shared/projection/builder.d.ts +4 -0
- package/dist/shared/projection/helpers.d.ts +3 -0
- package/dist/types/socket-events.d.ts +6 -0
- package/package.json +5 -1
- package/public-api.md +163 -1494
- package/dist/commands/embedded.d.ts +0 -32
package/public-api.md
CHANGED
|
@@ -3,13 +3,7 @@
|
|
|
3
3
|
> 本文件由 `scripts/public-api-report.mjs` 生成,请勿手改。
|
|
4
4
|
> 公共面变更时重新生成本报告,并同步更新 README 对应章节——CI 会校验两者。
|
|
5
5
|
|
|
6
|
-
共
|
|
7
|
-
|
|
8
|
-
## `acceptedPostChatFollowupCompletesLatestRun` (function)
|
|
9
|
-
|
|
10
|
-
```ts
|
|
11
|
-
acceptedPostChatFollowupCompletesLatestRun: (events: RawEvent[], updates: ProjectionUpdate[]) => boolean
|
|
12
|
-
```
|
|
6
|
+
共 89 个公开声明。
|
|
13
7
|
|
|
14
8
|
## `AccountComputer` (interface)
|
|
15
9
|
|
|
@@ -27,18 +21,6 @@ os: string | null | undefined
|
|
|
27
21
|
workspace: string | null | undefined
|
|
28
22
|
```
|
|
29
23
|
|
|
30
|
-
## `AccountComputerList` (interface)
|
|
31
|
-
|
|
32
|
-
```ts
|
|
33
|
-
computers: AccountComputer[]
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## `acknowledgeTurnEvents` (function)
|
|
37
|
-
|
|
38
|
-
```ts
|
|
39
|
-
acknowledgeTurnEvents: (acknowledge?: () => void) => void
|
|
40
|
-
```
|
|
41
|
-
|
|
42
24
|
## `ActiveCompactionState` (interface)
|
|
43
25
|
|
|
44
26
|
```ts
|
|
@@ -64,6 +46,7 @@ turn_id: string
|
|
|
64
46
|
description: string
|
|
65
47
|
status: "running" | "done" | "error" | "cancelled" | "awaiting_answer"
|
|
66
48
|
toolCallId: string
|
|
49
|
+
workflowRunId: string | undefined
|
|
67
50
|
```
|
|
68
51
|
|
|
69
52
|
## `AgentSession` (class)
|
|
@@ -93,6 +76,8 @@ on: <K extends keyof AgentSessionEvents>(name: K, handler: (event: AgentSessionE
|
|
|
93
76
|
onCommand: (action: string, handler: CommandHandler) => () => void
|
|
94
77
|
queueMessage: (content: string) => Promise<QueueOperationResult>
|
|
95
78
|
refreshQueue: () => Promise<QueueOperationResult>
|
|
79
|
+
refreshRunningState: () => Promise<void>
|
|
80
|
+
reloadHistory: () => Promise<boolean>
|
|
96
81
|
reorderQueuedMessages: (expectedRevision: number, orderedIds: string[]) => Promise<QueueOperationResult>
|
|
97
82
|
resumeQueue: () => Promise<QueueOperationResult>
|
|
98
83
|
send: (content: MessageContent, options?: SendOptions) => Promise<boolean>
|
|
@@ -140,7 +125,8 @@ taskListUpdated: { tasks: unknown[]; }
|
|
|
140
125
|
toolCall: { toolCall: ToolCallInfo; turn: TurnProjection; }
|
|
141
126
|
toolPreview: { sourcePath?: string; toolCallId: string; type: "resource-html" | "resource-uri" | "resource-file"; content: string; title: string; mcpApp?: McpAppData; }
|
|
142
127
|
toolResult: { toolCall: ToolCallInfo; turn: TurnProjection; source: "live" | "bootstrap_replay" | "reconnect_replay"; }
|
|
143
|
-
|
|
128
|
+
turnUpdated: { turn: TurnProjection; source: "live" | "bootstrap_replay" | "reconnect_replay"; }
|
|
129
|
+
workspaceChanged: { filePath?: string; paths?: string[]; workspacePath?: string; }
|
|
144
130
|
```
|
|
145
131
|
|
|
146
132
|
## `AppCliAttachment` (interface)
|
|
@@ -160,25 +146,6 @@ runtime: "python" | "executable"
|
|
|
160
146
|
source: string | Blob | URL
|
|
161
147
|
```
|
|
162
148
|
|
|
163
|
-
## `ArchivedFileInfo` (interface)
|
|
164
|
-
|
|
165
|
-
```ts
|
|
166
|
-
filename: string | null | undefined
|
|
167
|
-
relative_path: string | null | undefined
|
|
168
|
-
size_bytes: number | null | undefined
|
|
169
|
-
tool_name: string | null | undefined
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
## `ArchivedToolCallInfo` (interface)
|
|
173
|
-
|
|
174
|
-
```ts
|
|
175
|
-
archive_path: string | null | undefined
|
|
176
|
-
entry_id: string | null | undefined
|
|
177
|
-
replacement_content: string | null | undefined
|
|
178
|
-
tool_call_id: string | null | undefined
|
|
179
|
-
tool_name: string | null | undefined
|
|
180
|
-
```
|
|
181
|
-
|
|
182
149
|
## `AskUserAnswerData` (interface)
|
|
183
150
|
|
|
184
151
|
```ts
|
|
@@ -187,15 +154,6 @@ note: string | undefined
|
|
|
187
154
|
selections: Record<number, number[]>
|
|
188
155
|
```
|
|
189
156
|
|
|
190
|
-
## `AsrAudioPayload` (type)
|
|
191
|
-
|
|
192
|
-
```ts
|
|
193
|
-
export type AsrAudioPayload =
|
|
194
|
-
| ArrayBuffer
|
|
195
|
-
| Uint8Array
|
|
196
|
-
| { pcm: ArrayBuffer | Uint8Array; request_id?: string }
|
|
197
|
-
```
|
|
198
|
-
|
|
199
157
|
## `AttachAppOptions` (interface)
|
|
200
158
|
|
|
201
159
|
```ts
|
|
@@ -203,20 +161,6 @@ cli: AppCliDefinition | undefined
|
|
|
203
161
|
getContext: () => Record<string, unknown> | Promise<Record<string, unknown>>
|
|
204
162
|
```
|
|
205
163
|
|
|
206
|
-
## `AuthBusyReconnect` (class)
|
|
207
|
-
|
|
208
|
-
```ts
|
|
209
|
-
cancel: () => void
|
|
210
|
-
pending: boolean
|
|
211
|
-
schedule: (error: unknown, reconnect: () => void) => boolean
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
## `authBusyRetryDelayMs` (function)
|
|
215
|
-
|
|
216
|
-
```ts
|
|
217
|
-
authBusyRetryDelayMs: (error: unknown) => number | null
|
|
218
|
-
```
|
|
219
|
-
|
|
220
164
|
## `AuthResource` (class)
|
|
221
165
|
|
|
222
166
|
```ts
|
|
@@ -228,42 +172,6 @@ logout: () => Promise<{ logout_url: string; }>
|
|
|
228
172
|
logoutToken: () => void
|
|
229
173
|
```
|
|
230
174
|
|
|
231
|
-
## `BackgroundTask` (interface)
|
|
232
|
-
|
|
233
|
-
```ts
|
|
234
|
-
command: string
|
|
235
|
-
description: string | undefined
|
|
236
|
-
elapsed_seconds: number
|
|
237
|
-
exit_code: number | null | undefined
|
|
238
|
-
failure_reason: string | null | undefined
|
|
239
|
-
finished_at: number | null | undefined
|
|
240
|
-
id: string
|
|
241
|
-
log_path: string | null | undefined
|
|
242
|
-
output: string | undefined
|
|
243
|
-
output_lines_count: number | undefined
|
|
244
|
-
output_preview: string[] | undefined
|
|
245
|
-
started_at: number | null | undefined
|
|
246
|
-
status: "failed" | "running" | "cancelled" | "starting" | "cancelling" | "succeeded" | "lost"
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
## `BackgroundTaskStopResult` (interface)
|
|
250
|
-
|
|
251
|
-
```ts
|
|
252
|
-
message: string
|
|
253
|
-
ok: boolean
|
|
254
|
-
reason: string | null | undefined
|
|
255
|
-
task: BackgroundTask | null | undefined
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
## `BizRole` (interface)
|
|
259
|
-
|
|
260
|
-
```ts
|
|
261
|
-
description: string | null | undefined
|
|
262
|
-
id: string
|
|
263
|
-
name: string
|
|
264
|
-
preview: { url: string; title?: string | null; } | null | undefined
|
|
265
|
-
```
|
|
266
|
-
|
|
267
175
|
## `BladeApiError` (class)
|
|
268
176
|
|
|
269
177
|
```ts
|
|
@@ -276,6 +184,14 @@ status: number
|
|
|
276
184
|
statusText: string
|
|
277
185
|
```
|
|
278
186
|
|
|
187
|
+
## `BladeChatMountRenderers` (interface)
|
|
188
|
+
|
|
189
|
+
```ts
|
|
190
|
+
assistantText: MountRenderer<{ message: ChatMessage; streaming: boolean; compact: boolean; sessionId?: string; }> | undefined
|
|
191
|
+
toolCall: MountRenderer<{ toolCall: ToolCallInfo; sessionId?: string; }> | undefined
|
|
192
|
+
userMessage: MountRenderer<{ message: ChatMessage; }> | undefined
|
|
193
|
+
```
|
|
194
|
+
|
|
279
195
|
## `BladeClient` (class)
|
|
280
196
|
|
|
281
197
|
```ts
|
|
@@ -321,77 +237,12 @@ token: string | (() => string | null | undefined) | undefined
|
|
|
321
237
|
tokenStorage: TokenStorageMode | undefined
|
|
322
238
|
```
|
|
323
239
|
|
|
324
|
-
## `buildMessageContent` (function)
|
|
325
|
-
|
|
326
|
-
```ts
|
|
327
|
-
buildMessageContent: (text: string, attachments: Array<{ kind: "file"; name: string; uploadedPath?: string; textContent?: string | null; mimeType?: string; }>) => MessageContent
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
## `buildToolUiCardKey` (function)
|
|
331
|
-
|
|
332
|
-
```ts
|
|
333
|
-
buildToolUiCardKey: (toolCallId: string, type: ToolUiCardContentType, content: string, sourcePath?: string) => string
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
## `canCancelQueuedMessage` (function)
|
|
337
|
-
|
|
338
|
-
```ts
|
|
339
|
-
canCancelQueuedMessage: (item: QueuedMessage) => boolean
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
## `canDeliverQueuedMessage` (function)
|
|
343
|
-
|
|
344
|
-
```ts
|
|
345
|
-
canDeliverQueuedMessage: (item: QueuedMessage) => boolean
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
## `canEditQueuedMessage` (function)
|
|
349
|
-
|
|
350
|
-
```ts
|
|
351
|
-
canEditQueuedMessage: (item: QueuedMessage) => boolean
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
## `canToggleComputer` (function)
|
|
355
|
-
|
|
356
|
-
```ts
|
|
357
|
-
canToggleComputer: (computer: SessionComputer) => boolean
|
|
358
|
-
```
|
|
359
|
-
|
|
360
|
-
## `ChatEnd` (interface)
|
|
361
|
-
|
|
362
|
-
```ts
|
|
363
|
-
duration_ms: number
|
|
364
|
-
status: string
|
|
365
|
-
```
|
|
366
|
-
|
|
367
240
|
## `chatErrorForDisplay` (function)
|
|
368
241
|
|
|
369
242
|
```ts
|
|
370
243
|
chatErrorForDisplay: (message: string, developer?: boolean) => string
|
|
371
244
|
```
|
|
372
245
|
|
|
373
|
-
## `ChatGroup` (interface)
|
|
374
|
-
|
|
375
|
-
```ts
|
|
376
|
-
created_at: string
|
|
377
|
-
id: string
|
|
378
|
-
initiator: "ui" | "sdk" | null
|
|
379
|
-
instructions: string
|
|
380
|
-
name: string
|
|
381
|
-
session_count: number
|
|
382
|
-
updated_at: string
|
|
383
|
-
workspace_path: string
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
## `ChatGroupsResource` (class)
|
|
387
|
-
|
|
388
|
-
```ts
|
|
389
|
-
create: (payload: { name: string; instructions?: string; initiator?: "ui" | "sdk"; }) => Promise<ChatGroup>
|
|
390
|
-
delete: (groupId: string, options?: { deleteWorkspace?: boolean; }) => Promise<{ deleted: boolean; deleted_sessions: number; }>
|
|
391
|
-
list: () => Promise<ChatGroup[]>
|
|
392
|
-
update: (groupId: string, payload: { name?: string; instructions?: string; }) => Promise<ChatGroup>
|
|
393
|
-
```
|
|
394
|
-
|
|
395
246
|
## `ChatMessage` (interface)
|
|
396
247
|
|
|
397
248
|
```ts
|
|
@@ -413,910 +264,238 @@ timestamp: string | undefined
|
|
|
413
264
|
tool_calls: ToolCallInfo[] | undefined
|
|
414
265
|
```
|
|
415
266
|
|
|
416
|
-
## `
|
|
417
|
-
|
|
418
|
-
```ts
|
|
419
|
-
processBatch: (events: RawEvent[]) => ProjectionUpdate[]
|
|
420
|
-
processEvent: (event: RawEvent) => ProjectionUpdate[] | null
|
|
421
|
-
reset: () => void
|
|
422
|
-
seedSequence: (maxSeq: number) => void
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
## `collectInlineToolUiCards` (function)
|
|
267
|
+
## `CommandHandler` (type)
|
|
426
268
|
|
|
427
269
|
```ts
|
|
428
|
-
|
|
270
|
+
export type CommandHandler = (payload: unknown, meta: { toolCallId?: string }) => void
|
|
429
271
|
```
|
|
430
272
|
|
|
431
|
-
## `
|
|
273
|
+
## `ComputersResource` (class)
|
|
432
274
|
|
|
433
275
|
```ts
|
|
434
|
-
|
|
276
|
+
list: (sessionId: string) => Promise<SessionComputerList>
|
|
277
|
+
listAccount: () => Promise<AccountComputerList>
|
|
278
|
+
setEnabled: (sessionId: string, computer: string, enabled: boolean) => Promise<SessionComputer>
|
|
435
279
|
```
|
|
436
280
|
|
|
437
|
-
## `
|
|
281
|
+
## `ConnectionStatus` (type)
|
|
438
282
|
|
|
439
283
|
```ts
|
|
440
|
-
|
|
441
|
-
direction: "agent-to-host"
|
|
442
|
-
meta: { sessionId: string; toolCallId?: string; timestamp: number; }
|
|
443
|
-
payload: unknown
|
|
284
|
+
export type ConnectionStatus = "connecting" | "connected" | "reconnecting" | "disconnected"
|
|
444
285
|
```
|
|
445
286
|
|
|
446
|
-
## `
|
|
287
|
+
## `contentPreview` (function)
|
|
447
288
|
|
|
448
289
|
```ts
|
|
449
|
-
|
|
290
|
+
contentPreview: (content: MessageContent, maxLen?: number) => string
|
|
450
291
|
```
|
|
451
292
|
|
|
452
|
-
## `
|
|
293
|
+
## `CreateSessionRequest` (interface)
|
|
453
294
|
|
|
454
295
|
```ts
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
296
|
+
agent_runtime_id: string | null | undefined
|
|
297
|
+
biz_role_id: string | null | undefined
|
|
298
|
+
chat_group_id: string | null | undefined
|
|
299
|
+
compaction_ratio: number | null | undefined
|
|
300
|
+
daemon_id: string | null | undefined
|
|
301
|
+
disable_tools: string[] | null | undefined
|
|
302
|
+
enable_thinking: boolean | null | undefined
|
|
303
|
+
env: Record<string, string> | undefined
|
|
304
|
+
intent: string | undefined
|
|
305
|
+
memory_enabled: boolean | null | undefined
|
|
306
|
+
model: string | null | undefined
|
|
307
|
+
primary_skill_id: string | null | undefined
|
|
308
|
+
runtime_type: "sandbox" | "daemon" | "native" | null | undefined
|
|
309
|
+
session_solution_asset_id: string | null | undefined
|
|
310
|
+
solution_id: string | undefined
|
|
311
|
+
solution_ref: PublishedSolutionRef | undefined
|
|
312
|
+
solution_snapshot_session_id: string | undefined
|
|
313
|
+
template_id: TemplateId | undefined
|
|
467
314
|
```
|
|
468
315
|
|
|
469
|
-
## `
|
|
316
|
+
## `DEFAULT_REPLAY_SPEED` (const)
|
|
470
317
|
|
|
471
318
|
```ts
|
|
472
|
-
|
|
319
|
+
DEFAULT_REPLAY_SPEED: ReplaySpeed
|
|
473
320
|
```
|
|
474
321
|
|
|
475
|
-
## `
|
|
322
|
+
## `ExchangeCodeParams` (interface)
|
|
476
323
|
|
|
477
324
|
```ts
|
|
478
|
-
|
|
325
|
+
clientOrigin: string
|
|
326
|
+
code: string
|
|
327
|
+
state: string
|
|
479
328
|
```
|
|
480
329
|
|
|
481
|
-
## `
|
|
330
|
+
## `ExchangeCodeResult` (interface)
|
|
482
331
|
|
|
483
332
|
```ts
|
|
484
|
-
|
|
333
|
+
access_token: string
|
|
334
|
+
token_type: string
|
|
335
|
+
user: { id: string; username: string; display_name: string; avatar_url: string | null; }
|
|
485
336
|
```
|
|
486
337
|
|
|
487
|
-
## `
|
|
338
|
+
## `FileContentPart` (interface)
|
|
488
339
|
|
|
489
340
|
```ts
|
|
490
|
-
|
|
341
|
+
data: string
|
|
342
|
+
name: string
|
|
343
|
+
type: "file"
|
|
491
344
|
```
|
|
492
345
|
|
|
493
|
-
## `
|
|
346
|
+
## `FileEntry` (interface)
|
|
494
347
|
|
|
495
348
|
```ts
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
349
|
+
created_at: number
|
|
350
|
+
is_dir: boolean
|
|
351
|
+
name: string
|
|
352
|
+
path: string
|
|
353
|
+
tags: string[] | undefined
|
|
499
354
|
```
|
|
500
355
|
|
|
501
|
-
## `
|
|
356
|
+
## `getFileParts` (function)
|
|
502
357
|
|
|
503
358
|
```ts
|
|
504
|
-
|
|
359
|
+
getFileParts: (content: MessageContent) => FileContentPart[]
|
|
505
360
|
```
|
|
506
361
|
|
|
507
|
-
## `
|
|
362
|
+
## `getImageParts` (function)
|
|
508
363
|
|
|
509
364
|
```ts
|
|
510
|
-
|
|
365
|
+
getImageParts: (content: MessageContent) => ImageUrlContentPart[]
|
|
511
366
|
```
|
|
512
367
|
|
|
513
|
-
## `
|
|
368
|
+
## `getTextContent` (function)
|
|
514
369
|
|
|
515
370
|
```ts
|
|
516
|
-
|
|
371
|
+
getTextContent: (content: MessageContent) => string
|
|
517
372
|
```
|
|
518
373
|
|
|
519
|
-
## `
|
|
374
|
+
## `groupMessagesByLoop` (function)
|
|
520
375
|
|
|
521
376
|
```ts
|
|
522
|
-
|
|
377
|
+
groupMessagesByLoop: (messages: ChatMessage[]) => MessageGroup[]
|
|
523
378
|
```
|
|
524
379
|
|
|
525
|
-
## `
|
|
380
|
+
## `HeadlessResource` (class)
|
|
526
381
|
|
|
527
382
|
```ts
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
tool_call_id: string | null | undefined
|
|
532
|
-
tool_name: string | null | undefined
|
|
533
|
-
type: "text" | "thinking" | "tool_use" | "tool_result" | "tool_ui" | "tool_bridge" | "system_notification" | "mode_change" | "plan_status" | "ask_user_answer"
|
|
383
|
+
run: { <T = unknown>(prompt: string, options: HeadlessRunOptions & { schema: JsonSchemaObject; }): Promise<T>; (prompt: string, options?: HeadlessRunOptions): Promise<string>; }
|
|
384
|
+
runInSession: { <T = unknown>(sessionId: string, prompt: string, options: HeadlessRunOptions & { schema: JsonSchemaObject; }): Promise<T>; (sessionId: string, prompt: string, options?: HeadlessRunOptions): Promise<string>; }
|
|
385
|
+
runWithSession: { <T = unknown>(prompt: string, options: HeadlessRunOptions & { schema: JsonSchemaObject; }): Promise<HeadlessRunInSessionResult<T>>; (prompt: string, options?: HeadlessRunOptions): Promise<HeadlessRunInSessionResult<string>>; }
|
|
534
386
|
```
|
|
535
387
|
|
|
536
|
-
## `
|
|
388
|
+
## `ImageUrlContentPart` (interface)
|
|
537
389
|
|
|
538
390
|
```ts
|
|
539
|
-
|
|
540
|
-
|
|
391
|
+
image_url: { url: string; source_path?: string; width?: number; height?: number; }
|
|
392
|
+
type: "image_url"
|
|
541
393
|
```
|
|
542
394
|
|
|
543
|
-
## `
|
|
395
|
+
## `LoginOptions` (interface)
|
|
544
396
|
|
|
545
397
|
```ts
|
|
546
|
-
|
|
398
|
+
height: number | undefined
|
|
399
|
+
timeoutMs: number | undefined
|
|
400
|
+
width: number | undefined
|
|
547
401
|
```
|
|
548
402
|
|
|
549
|
-
## `
|
|
403
|
+
## `LoginResult` (interface)
|
|
550
404
|
|
|
551
405
|
```ts
|
|
552
|
-
|
|
406
|
+
token: string
|
|
407
|
+
user: { id?: string; username?: string; display_name?: string; } | undefined
|
|
553
408
|
```
|
|
554
409
|
|
|
555
|
-
## `
|
|
410
|
+
## `MemoryRefInfo` (interface)
|
|
556
411
|
|
|
557
412
|
```ts
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
title: string
|
|
413
|
+
content_preview: string
|
|
414
|
+
id: number
|
|
415
|
+
skill_name: string | null | undefined
|
|
562
416
|
```
|
|
563
417
|
|
|
564
|
-
## `
|
|
418
|
+
## `MessageContent` (type)
|
|
565
419
|
|
|
566
420
|
```ts
|
|
567
|
-
|
|
568
|
-
summary: string
|
|
569
|
-
title: string
|
|
421
|
+
export type MessageContent = string | MessageContentPart[]
|
|
570
422
|
```
|
|
571
423
|
|
|
572
|
-
## `
|
|
424
|
+
## `MessageContentPart` (type)
|
|
573
425
|
|
|
574
426
|
```ts
|
|
575
|
-
|
|
427
|
+
export type MessageContentPart = TextContentPart | ImageUrlContentPart | FileContentPart
|
|
576
428
|
```
|
|
577
429
|
|
|
578
|
-
## `
|
|
430
|
+
## `ModelCatalog` (interface)
|
|
579
431
|
|
|
580
432
|
```ts
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
display_summary: string | null | undefined
|
|
588
|
-
display_title: string | null | undefined
|
|
589
|
-
sources: ContextSourceInfo[]
|
|
433
|
+
baseUrl: string | undefined
|
|
434
|
+
default: string
|
|
435
|
+
defaultServiceModel: string | undefined
|
|
436
|
+
models: ModelOption[]
|
|
437
|
+
unavailableModelIds: string[] | undefined
|
|
438
|
+
unavailableProviderIds: string[] | undefined
|
|
590
439
|
```
|
|
591
440
|
|
|
592
|
-
## `
|
|
441
|
+
## `ModelOption` (interface)
|
|
593
442
|
|
|
594
443
|
```ts
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
context_name: string | null | undefined
|
|
599
|
-
context_order: number | null | undefined
|
|
600
|
-
context_revision: string | null | undefined
|
|
601
|
-
display_summary: string | null | undefined
|
|
602
|
-
display_title: string | null | undefined
|
|
603
|
-
sources: ContextSourceInfo[] | null | undefined
|
|
444
|
+
id: string
|
|
445
|
+
label: string
|
|
446
|
+
serviceModelId: string | undefined
|
|
604
447
|
```
|
|
605
448
|
|
|
606
|
-
## `
|
|
449
|
+
## `ModelsResource` (class)
|
|
607
450
|
|
|
608
451
|
```ts
|
|
609
|
-
|
|
452
|
+
list: () => Promise<ModelCatalog>
|
|
610
453
|
```
|
|
611
454
|
|
|
612
|
-
## `
|
|
455
|
+
## `MountHandle` (interface)
|
|
613
456
|
|
|
614
457
|
```ts
|
|
615
|
-
|
|
458
|
+
destroy: () => void
|
|
459
|
+
update: ((data: T) => void) | undefined
|
|
616
460
|
```
|
|
617
461
|
|
|
618
|
-
## `
|
|
462
|
+
## `MountRenderer` (type)
|
|
619
463
|
|
|
620
464
|
```ts
|
|
621
|
-
|
|
622
|
-
biz_role_id: string | null | undefined
|
|
623
|
-
chat_group_id: string | null | undefined
|
|
624
|
-
compaction_ratio: number | null | undefined
|
|
625
|
-
daemon_id: string | null | undefined
|
|
626
|
-
disable_tools: string[] | null | undefined
|
|
627
|
-
enable_thinking: boolean | null | undefined
|
|
628
|
-
env: Record<string, string> | undefined
|
|
629
|
-
intent: string | undefined
|
|
630
|
-
memory_enabled: boolean | null | undefined
|
|
631
|
-
model: string | null | undefined
|
|
632
|
-
primary_skill_id: string | null | undefined
|
|
633
|
-
runtime_type: "sandbox" | "daemon" | "native" | null | undefined
|
|
634
|
-
session_solution_asset_id: string | null | undefined
|
|
635
|
-
solution_id: string | undefined
|
|
636
|
-
solution_ref: PublishedSolutionRef | undefined
|
|
637
|
-
solution_snapshot_session_id: string | undefined
|
|
638
|
-
template_id: TemplateId | undefined
|
|
465
|
+
export type MountRenderer<T> = MountRendererObject<T> | ((target: HTMLElement, data: T) => MountResult<T>)
|
|
639
466
|
```
|
|
640
467
|
|
|
641
|
-
## `
|
|
468
|
+
## `MountRendererObject` (interface)
|
|
642
469
|
|
|
643
470
|
```ts
|
|
644
|
-
|
|
471
|
+
match: ((data: T) => boolean) | undefined
|
|
472
|
+
mount: (target: HTMLElement, data: T) => MountResult<T>
|
|
645
473
|
```
|
|
646
474
|
|
|
647
|
-
## `
|
|
475
|
+
## `MountResult` (type)
|
|
648
476
|
|
|
649
477
|
```ts
|
|
650
|
-
|
|
651
|
-
path: string | undefined
|
|
652
|
-
token: string | (() => string | null | undefined) | undefined
|
|
653
|
-
transports: ("polling" | "websocket")[] | undefined
|
|
478
|
+
export type MountResult<T> = undefined | (() => void) | MountHandle<T>
|
|
654
479
|
```
|
|
655
480
|
|
|
656
|
-
## `
|
|
481
|
+
## `PaginatedSessionsResult` (interface)
|
|
657
482
|
|
|
658
483
|
```ts
|
|
659
|
-
|
|
484
|
+
content_match_truncated: boolean | undefined
|
|
485
|
+
items: SessionInfo[]
|
|
486
|
+
limit: number
|
|
487
|
+
offset: number
|
|
488
|
+
total: number
|
|
660
489
|
```
|
|
661
490
|
|
|
662
|
-
## `
|
|
491
|
+
## `ProvidersResponse` (interface)
|
|
663
492
|
|
|
664
493
|
```ts
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
insertText: (text: string) => void
|
|
668
|
-
onCommand: (action: string, handler: CommandHandler) => () => void
|
|
669
|
-
send: (text: string) => void
|
|
494
|
+
password_enabled: boolean
|
|
495
|
+
providers: { name: string; authorize_url: string; }[]
|
|
670
496
|
```
|
|
671
497
|
|
|
672
|
-
## `
|
|
673
|
-
|
|
674
|
-
```ts
|
|
675
|
-
allowedOrigins: string[]
|
|
676
|
-
iframe: HTMLIFrameElement | undefined
|
|
677
|
-
```
|
|
678
|
-
|
|
679
|
-
## `EMPTY_PLATFORM_ENDPOINTS` (const)
|
|
680
|
-
|
|
681
|
-
```ts
|
|
682
|
-
EMPTY_PLATFORM_ENDPOINTS: PlatformEndpoints
|
|
683
|
-
```
|
|
684
|
-
|
|
685
|
-
## `EMPTY_SESSION_QUEUE` (const)
|
|
686
|
-
|
|
687
|
-
```ts
|
|
688
|
-
EMPTY_SESSION_QUEUE: SessionQueueSnapshot
|
|
689
|
-
```
|
|
690
|
-
|
|
691
|
-
## `ExchangeCodeParams` (interface)
|
|
692
|
-
|
|
693
|
-
```ts
|
|
694
|
-
clientOrigin: string
|
|
695
|
-
code: string
|
|
696
|
-
state: string
|
|
697
|
-
```
|
|
698
|
-
|
|
699
|
-
## `ExchangeCodeResult` (interface)
|
|
700
|
-
|
|
701
|
-
```ts
|
|
702
|
-
access_token: string
|
|
703
|
-
token_type: string
|
|
704
|
-
user: { id: string; username: string; display_name: string; avatar_url: string | null; }
|
|
705
|
-
```
|
|
706
|
-
|
|
707
|
-
## `ExistingSolutionRef` (interface)
|
|
708
|
-
|
|
709
|
-
```ts
|
|
710
|
-
bizRoleId: string | undefined
|
|
711
|
-
kind: "existing"
|
|
712
|
-
solutionId: string
|
|
713
|
-
```
|
|
714
|
-
|
|
715
|
-
## `extractTextAttachments` (function)
|
|
716
|
-
|
|
717
|
-
```ts
|
|
718
|
-
extractTextAttachments: (content: MessageContent) => { cleanText: string; attachments: ParsedTextAttachment[]; contexts: ParsedTextContext[]; }
|
|
719
|
-
```
|
|
720
|
-
|
|
721
|
-
## `FileContentPart` (interface)
|
|
722
|
-
|
|
723
|
-
```ts
|
|
724
|
-
data: string
|
|
725
|
-
name: string
|
|
726
|
-
type: "file"
|
|
727
|
-
```
|
|
728
|
-
|
|
729
|
-
## `FileEntry` (interface)
|
|
730
|
-
|
|
731
|
-
```ts
|
|
732
|
-
created_at: number
|
|
733
|
-
is_dir: boolean
|
|
734
|
-
name: string
|
|
735
|
-
path: string
|
|
736
|
-
tags: string[] | undefined
|
|
737
|
-
```
|
|
738
|
-
|
|
739
|
-
## `FinalArtifact` (interface)
|
|
740
|
-
|
|
741
|
-
```ts
|
|
742
|
-
kind: "link" | "file"
|
|
743
|
-
label: string
|
|
744
|
-
target: string
|
|
745
|
-
```
|
|
746
|
-
|
|
747
|
-
## `getContextDisplayState` (function)
|
|
748
|
-
|
|
749
|
-
```ts
|
|
750
|
-
getContextDisplayState: (context: ContextProjectionData) => ContextDisplayState
|
|
751
|
-
```
|
|
752
|
-
|
|
753
|
-
## `getContextGroupDisplayState` (function)
|
|
754
|
-
|
|
755
|
-
```ts
|
|
756
|
-
getContextGroupDisplayState: (contexts: readonly ContextProjectionData[]) => ContextGroupDisplayState
|
|
757
|
-
```
|
|
758
|
-
|
|
759
|
-
## `getFileParts` (function)
|
|
760
|
-
|
|
761
|
-
```ts
|
|
762
|
-
getFileParts: (content: MessageContent) => FileContentPart[]
|
|
763
|
-
```
|
|
764
|
-
|
|
765
|
-
## `getImageParts` (function)
|
|
766
|
-
|
|
767
|
-
```ts
|
|
768
|
-
getImageParts: (content: MessageContent) => ImageUrlContentPart[]
|
|
769
|
-
```
|
|
770
|
-
|
|
771
|
-
## `getTextContent` (function)
|
|
772
|
-
|
|
773
|
-
```ts
|
|
774
|
-
getTextContent: (content: MessageContent) => string
|
|
775
|
-
```
|
|
776
|
-
|
|
777
|
-
## `GlobalSearchConversationResult` (interface)
|
|
778
|
-
|
|
779
|
-
```ts
|
|
780
|
-
matched: "title" | "content"
|
|
781
|
-
session: SessionInfo
|
|
782
|
-
snippet: string
|
|
783
|
-
type: "conversation"
|
|
784
|
-
```
|
|
785
|
-
|
|
786
|
-
## `GlobalSearchFileResult` (interface)
|
|
787
|
-
|
|
788
|
-
```ts
|
|
789
|
-
matched: "name" | "path"
|
|
790
|
-
name: string
|
|
791
|
-
path: string
|
|
792
|
-
session: SessionInfo
|
|
793
|
-
snippet: string
|
|
794
|
-
type: "file"
|
|
795
|
-
```
|
|
796
|
-
|
|
797
|
-
## `GlobalSearchResult` (interface)
|
|
798
|
-
|
|
799
|
-
```ts
|
|
800
|
-
indexing: boolean
|
|
801
|
-
items: GlobalSearchResultItem[]
|
|
802
|
-
truncated: boolean
|
|
803
|
-
```
|
|
804
|
-
|
|
805
|
-
## `GlobalSearchResultItem` (type)
|
|
806
|
-
|
|
807
|
-
```ts
|
|
808
|
-
export type GlobalSearchResultItem =
|
|
809
|
-
| GlobalSearchConversationResult
|
|
810
|
-
| GlobalSearchFileResult
|
|
811
|
-
```
|
|
812
|
-
|
|
813
|
-
## `groupAdjacentContextRuns` (function)
|
|
814
|
-
|
|
815
|
-
```ts
|
|
816
|
-
groupAdjacentContextRuns: (kinds: readonly (string | null)[]) => readonly (readonly number[])[]
|
|
817
|
-
```
|
|
818
|
-
|
|
819
|
-
## `groupMessagesByLoop` (function)
|
|
820
|
-
|
|
821
|
-
```ts
|
|
822
|
-
groupMessagesByLoop: (messages: ChatMessage[]) => MessageGroup[]
|
|
823
|
-
```
|
|
824
|
-
|
|
825
|
-
## `hasChatRunEvent` (function)
|
|
826
|
-
|
|
827
|
-
```ts
|
|
828
|
-
hasChatRunEvent: (events: RawEvent[]) => boolean
|
|
829
|
-
```
|
|
830
|
-
|
|
831
|
-
## `HeadlessResource` (class)
|
|
832
|
-
|
|
833
|
-
```ts
|
|
834
|
-
run: { <T = unknown>(prompt: string, options: HeadlessRunOptions & { schema: JsonSchemaObject; }): Promise<T>; (prompt: string, options?: HeadlessRunOptions): Promise<string>; }
|
|
835
|
-
runInSession: { <T = unknown>(sessionId: string, prompt: string, options: HeadlessRunOptions & { schema: JsonSchemaObject; }): Promise<T>; (sessionId: string, prompt: string, options?: HeadlessRunOptions): Promise<string>; }
|
|
836
|
-
runWithSession: { <T = unknown>(prompt: string, options: HeadlessRunOptions & { schema: JsonSchemaObject; }): Promise<HeadlessRunInSessionResult<T>>; (prompt: string, options?: HeadlessRunOptions): Promise<HeadlessRunInSessionResult<string>>; }
|
|
837
|
-
```
|
|
838
|
-
|
|
839
|
-
## `HistoricalCommand` (interface)
|
|
840
|
-
|
|
841
|
-
```ts
|
|
842
|
-
action: string
|
|
843
|
-
deliveryId: string
|
|
844
|
-
payload: unknown
|
|
845
|
-
toolCallId: string | undefined
|
|
846
|
-
```
|
|
847
|
-
|
|
848
|
-
## `ImageUrlContentPart` (interface)
|
|
849
|
-
|
|
850
|
-
```ts
|
|
851
|
-
image_url: { url: string; source_path?: string; width?: number; height?: number; }
|
|
852
|
-
type: "image_url"
|
|
853
|
-
```
|
|
854
|
-
|
|
855
|
-
## `ImportSessionOptions` (interface)
|
|
856
|
-
|
|
857
|
-
```ts
|
|
858
|
-
solution_ref: PublishedSolutionRef | undefined
|
|
859
|
-
solution_snapshot_session_id: string | undefined
|
|
860
|
-
```
|
|
861
|
-
|
|
862
|
-
## `InboundAction` (type)
|
|
863
|
-
|
|
864
|
-
```ts
|
|
865
|
-
export type InboundAction = "addContext" | "appendInput" | "sendMessage"
|
|
866
|
-
```
|
|
867
|
-
|
|
868
|
-
## `InboundEnvelope` (interface)
|
|
869
|
-
|
|
870
|
-
```ts
|
|
871
|
-
action: InboundAction
|
|
872
|
-
direction: "host-to-agent"
|
|
873
|
-
payload: unknown
|
|
874
|
-
```
|
|
875
|
-
|
|
876
|
-
## `inferToolStatus` (function)
|
|
877
|
-
|
|
878
|
-
```ts
|
|
879
|
-
inferToolStatus: (resultStr: string) => "done" | "error" | "cancelled"
|
|
880
|
-
```
|
|
881
|
-
|
|
882
|
-
## `InlineToolUiCardEntry` (interface)
|
|
883
|
-
|
|
884
|
-
```ts
|
|
885
|
-
card: ToolUiCard
|
|
886
|
-
key: string
|
|
887
|
-
toolCallId: string
|
|
888
|
-
```
|
|
889
|
-
|
|
890
|
-
## `isAppDevToolUiCard` (function)
|
|
891
|
-
|
|
892
|
-
```ts
|
|
893
|
-
isAppDevToolUiCard: (card: ToolUiCard, isAppDev: boolean) => boolean
|
|
894
|
-
```
|
|
895
|
-
|
|
896
|
-
## `isBackgroundWakeMessage` (function)
|
|
897
|
-
|
|
898
|
-
```ts
|
|
899
|
-
isBackgroundWakeMessage: (message: Pick<ChatMessage, "blocks">) => boolean
|
|
900
|
-
```
|
|
901
|
-
|
|
902
|
-
## `isCommandEnvelope` (function)
|
|
903
|
-
|
|
904
|
-
```ts
|
|
905
|
-
isCommandEnvelope: (value: unknown) => value is CommandEnvelope
|
|
906
|
-
```
|
|
907
|
-
|
|
908
|
-
## `isEntryGoneError` (function)
|
|
909
|
-
|
|
910
|
-
```ts
|
|
911
|
-
isEntryGoneError: (error: unknown) => boolean
|
|
912
|
-
```
|
|
913
|
-
|
|
914
|
-
## `isHiddenInternalMessage` (function)
|
|
915
|
-
|
|
916
|
-
```ts
|
|
917
|
-
isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content">, options?: { includeLegacyForkContext?: boolean; }) => boolean
|
|
918
|
-
```
|
|
919
|
-
|
|
920
|
-
## `isInboundEnvelope` (function)
|
|
921
|
-
|
|
922
|
-
```ts
|
|
923
|
-
isInboundEnvelope: (value: unknown) => value is InboundEnvelope
|
|
924
|
-
```
|
|
925
|
-
|
|
926
|
-
## `isInternalStatusToolUiCard` (function)
|
|
927
|
-
|
|
928
|
-
```ts
|
|
929
|
-
isInternalStatusToolUiCard: (card: { title?: string | null; } | null) => boolean
|
|
930
|
-
```
|
|
931
|
-
|
|
932
|
-
## `isMcpAppData` (function)
|
|
933
|
-
|
|
934
|
-
```ts
|
|
935
|
-
isMcpAppData: (value: unknown) => value is McpAppData
|
|
936
|
-
```
|
|
937
|
-
|
|
938
|
-
## `isSessionQueueSnapshot` (function)
|
|
939
|
-
|
|
940
|
-
```ts
|
|
941
|
-
isSessionQueueSnapshot: (value: unknown) => value is SessionQueueSnapshot
|
|
942
|
-
```
|
|
943
|
-
|
|
944
|
-
## `isToolUiCard` (function)
|
|
945
|
-
|
|
946
|
-
```ts
|
|
947
|
-
isToolUiCard: (value: unknown) => value is ToolUiCard
|
|
948
|
-
```
|
|
949
|
-
|
|
950
|
-
## `latestPostChatFollowup` (function)
|
|
951
|
-
|
|
952
|
-
```ts
|
|
953
|
-
latestPostChatFollowup: (turns: TurnProjection[]) => PostChatFollowup | null
|
|
954
|
-
```
|
|
955
|
-
|
|
956
|
-
## `LayoutType` (enum)
|
|
957
|
-
|
|
958
|
-
```ts
|
|
959
|
-
export enum LayoutType {
|
|
960
|
-
Default = "default",
|
|
961
|
-
SkillEditor = "skill-editor",
|
|
962
|
-
BladeCoa = "blade-coa",
|
|
963
|
-
SolutionEditor = "solution-editor",
|
|
964
|
-
SolutionEditor2 = "solution-editor2",
|
|
965
|
-
ChatPreview = "chat-preview",
|
|
966
|
-
ChatOnly = "chat-only",
|
|
967
|
-
SolutionApp = "solution-app",
|
|
968
|
-
Custom = "custom",
|
|
969
|
-
}
|
|
970
|
-
```
|
|
971
|
-
|
|
972
|
-
## `LiveRevisionState` (interface)
|
|
973
|
-
|
|
974
|
-
```ts
|
|
975
|
-
byTurnId: ReadonlyMap<string, number>
|
|
976
|
-
current: number
|
|
977
|
-
```
|
|
978
|
-
|
|
979
|
-
## `LlmResponseDone` (interface)
|
|
980
|
-
|
|
981
|
-
```ts
|
|
982
|
-
content: string | null | undefined
|
|
983
|
-
loop_name: string | undefined
|
|
984
|
-
reasoning: string | null | undefined
|
|
985
|
-
role: string
|
|
986
|
-
tool_calls: { id: string; function: { name: string; arguments: string; }; }[] | undefined
|
|
987
|
-
```
|
|
988
|
-
|
|
989
|
-
## `loadPlatformEndpoints` (function)
|
|
990
|
-
|
|
991
|
-
```ts
|
|
992
|
-
loadPlatformEndpoints: (options?: LoadPlatformEndpointsOptions) => Promise<PlatformEndpoints>
|
|
993
|
-
```
|
|
994
|
-
|
|
995
|
-
## `LoadPlatformEndpointsOptions` (interface)
|
|
996
|
-
|
|
997
|
-
```ts
|
|
998
|
-
baseUrl: string | undefined
|
|
999
|
-
fetchImpl: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined
|
|
1000
|
-
timeoutMs: number | undefined
|
|
1001
|
-
```
|
|
1002
|
-
|
|
1003
|
-
## `LoginOptions` (interface)
|
|
1004
|
-
|
|
1005
|
-
```ts
|
|
1006
|
-
height: number | undefined
|
|
1007
|
-
timeoutMs: number | undefined
|
|
1008
|
-
width: number | undefined
|
|
1009
|
-
```
|
|
1010
|
-
|
|
1011
|
-
## `LoginResult` (interface)
|
|
1012
|
-
|
|
1013
|
-
```ts
|
|
1014
|
-
token: string
|
|
1015
|
-
user: { id?: string; username?: string; display_name?: string; } | undefined
|
|
1016
|
-
```
|
|
1017
|
-
|
|
1018
|
-
## `McpAppArchive` (interface)
|
|
1019
|
-
|
|
1020
|
-
```ts
|
|
1021
|
-
html: string
|
|
1022
|
-
mimeType: string
|
|
1023
|
-
plugin: string
|
|
1024
|
-
previousToolInput: Record<string, unknown> | undefined
|
|
1025
|
-
previousToolResult: Record<string, unknown> | undefined
|
|
1026
|
-
resourceMeta: Record<string, unknown>
|
|
1027
|
-
resourceUri: string
|
|
1028
|
-
sourceId: string
|
|
1029
|
-
toolInput: Record<string, unknown>
|
|
1030
|
-
toolResult: Record<string, unknown>
|
|
1031
|
-
```
|
|
1032
|
-
|
|
1033
|
-
## `McpAppContextState` (interface)
|
|
1034
|
-
|
|
1035
|
-
```ts
|
|
1036
|
-
content: string
|
|
1037
|
-
plugin: string | null
|
|
1038
|
-
revision: string
|
|
1039
|
-
server_alias: string | null
|
|
1040
|
-
```
|
|
1041
|
-
|
|
1042
|
-
## `McpAppContextUpdate` (interface)
|
|
1043
|
-
|
|
1044
|
-
```ts
|
|
1045
|
-
content: string
|
|
1046
|
-
expected_revision: string | null
|
|
1047
|
-
request_id: string
|
|
1048
|
-
```
|
|
1049
|
-
|
|
1050
|
-
## `McpAppData` (interface)
|
|
1051
|
-
|
|
1052
|
-
```ts
|
|
1053
|
-
mimeType: string
|
|
1054
|
-
resourceMeta: Record<string, unknown>
|
|
1055
|
-
resourceUri: string
|
|
1056
|
-
sourceId: string
|
|
1057
|
-
toolInput: Record<string, unknown>
|
|
1058
|
-
toolResult: Record<string, unknown>
|
|
1059
|
-
```
|
|
1060
|
-
|
|
1061
|
-
## `MemoryRef` (interface)
|
|
1062
|
-
|
|
1063
|
-
```ts
|
|
1064
|
-
content_preview: string
|
|
1065
|
-
id: number
|
|
1066
|
-
skill_name: string | null | undefined
|
|
1067
|
-
```
|
|
1068
|
-
|
|
1069
|
-
## `MemoryRefInfo` (interface)
|
|
1070
|
-
|
|
1071
|
-
```ts
|
|
1072
|
-
content_preview: string
|
|
1073
|
-
id: number
|
|
1074
|
-
skill_name: string | null | undefined
|
|
1075
|
-
```
|
|
1076
|
-
|
|
1077
|
-
## `MessageContent` (type)
|
|
1078
|
-
|
|
1079
|
-
```ts
|
|
1080
|
-
export type MessageContent = string | MessageContentPart[]
|
|
1081
|
-
```
|
|
1082
|
-
|
|
1083
|
-
## `MessageContentPart` (type)
|
|
1084
|
-
|
|
1085
|
-
```ts
|
|
1086
|
-
export type MessageContentPart = TextContentPart | ImageUrlContentPart | FileContentPart
|
|
1087
|
-
```
|
|
1088
|
-
|
|
1089
|
-
## `ModeId` (type)
|
|
1090
|
-
|
|
1091
|
-
```ts
|
|
1092
|
-
export type ModeId = "planning" | "executing"
|
|
1093
|
-
```
|
|
1094
|
-
|
|
1095
|
-
## `ModelCatalog` (interface)
|
|
1096
|
-
|
|
1097
|
-
```ts
|
|
1098
|
-
baseUrl: string | undefined
|
|
1099
|
-
default: string
|
|
1100
|
-
defaultServiceModel: string | undefined
|
|
1101
|
-
models: ModelOption[]
|
|
1102
|
-
unavailableModelIds: string[] | undefined
|
|
1103
|
-
unavailableProviderIds: string[] | undefined
|
|
1104
|
-
```
|
|
1105
|
-
|
|
1106
|
-
## `ModelOption` (interface)
|
|
1107
|
-
|
|
1108
|
-
```ts
|
|
1109
|
-
id: string
|
|
1110
|
-
label: string
|
|
1111
|
-
serviceModelId: string | undefined
|
|
1112
|
-
```
|
|
1113
|
-
|
|
1114
|
-
## `ModelsResource` (class)
|
|
1115
|
-
|
|
1116
|
-
```ts
|
|
1117
|
-
list: () => Promise<ModelCatalog>
|
|
1118
|
-
```
|
|
1119
|
-
|
|
1120
|
-
## `normalizeMessageContent` (function)
|
|
1121
|
-
|
|
1122
|
-
```ts
|
|
1123
|
-
normalizeMessageContent: (content: unknown) => MessageContent
|
|
1124
|
-
```
|
|
1125
|
-
|
|
1126
|
-
## `PaginatedSessionsResult` (interface)
|
|
1127
|
-
|
|
1128
|
-
```ts
|
|
1129
|
-
content_match_truncated: boolean | undefined
|
|
1130
|
-
items: SessionInfo[]
|
|
1131
|
-
limit: number
|
|
1132
|
-
offset: number
|
|
1133
|
-
total: number
|
|
1134
|
-
```
|
|
1135
|
-
|
|
1136
|
-
## `ParsedTextAttachment` (interface)
|
|
1137
|
-
|
|
1138
|
-
```ts
|
|
1139
|
-
name: string
|
|
1140
|
-
uploadedPath: string | undefined
|
|
1141
|
-
```
|
|
1142
|
-
|
|
1143
|
-
## `ParsedTextContext` (interface)
|
|
1144
|
-
|
|
1145
|
-
```ts
|
|
1146
|
-
content: string
|
|
1147
|
-
label: string
|
|
1148
|
-
```
|
|
1149
|
-
|
|
1150
|
-
## `parseQueueAck` (function)
|
|
1151
|
-
|
|
1152
|
-
```ts
|
|
1153
|
-
parseQueueAck: (response: unknown, fallbackSessionId: string) => QueueOperationResult
|
|
1154
|
-
```
|
|
1155
|
-
|
|
1156
|
-
## `PatchEnvelope` (interface)
|
|
1157
|
-
|
|
1158
|
-
```ts
|
|
1159
|
-
data: { turn?: TurnProjection; workspace_changed?: { tool_call_id?: string; tool_name?: string; workspace_path?: string; }; }
|
|
1160
|
-
loop_id: string
|
|
1161
|
-
patch_type: string
|
|
1162
|
-
sequence: number
|
|
1163
|
-
turn_id: string
|
|
1164
|
-
```
|
|
1165
|
-
|
|
1166
|
-
## `PendingQuestionRef` (interface)
|
|
1167
|
-
|
|
1168
|
-
```ts
|
|
1169
|
-
child_loop_name: string
|
|
1170
|
-
child_tool_call_id: string
|
|
1171
|
-
description: string | null | undefined
|
|
1172
|
-
```
|
|
1173
|
-
|
|
1174
|
-
## `PlatformEndpoints` (interface)
|
|
1175
|
-
|
|
1176
|
-
```ts
|
|
1177
|
-
services: Partial<Record<"os" | "hub" | "agent" | "oauth" | "llmGateway" | "gitea" | "tile", string>>
|
|
1178
|
-
```
|
|
1179
|
-
|
|
1180
|
-
## `PlatformServiceName` (type)
|
|
1181
|
-
|
|
1182
|
-
```ts
|
|
1183
|
-
export type PlatformServiceName = (typeof PLATFORM_SERVICE_NAMES)[number]
|
|
1184
|
-
```
|
|
1185
|
-
|
|
1186
|
-
## `PluginCatalogEntry` (interface)
|
|
1187
|
-
|
|
1188
|
-
```ts
|
|
1189
|
-
display_name: string | null
|
|
1190
|
-
icon: string | null
|
|
1191
|
-
installed: boolean
|
|
1192
|
-
name: string
|
|
1193
|
-
```
|
|
1194
|
-
|
|
1195
|
-
## `PluginsResource` (class)
|
|
1196
|
-
|
|
1197
|
-
```ts
|
|
1198
|
-
catalog: (init?: RequestInit) => Promise<{ plugins: PluginCatalogEntry[]; }>
|
|
1199
|
-
fetchIcon: (name: string) => Promise<Blob>
|
|
1200
|
-
iconUrl: (name: string) => string
|
|
1201
|
-
```
|
|
1202
|
-
|
|
1203
|
-
## `PollingBackoff` (class)
|
|
1204
|
-
|
|
1205
|
-
```ts
|
|
1206
|
-
failed: (error: unknown) => void
|
|
1207
|
-
reset: () => void
|
|
1208
|
-
waitMs: () => number | false
|
|
1209
|
-
```
|
|
1210
|
-
|
|
1211
|
-
## `PostChatFollowup` (interface)
|
|
1212
|
-
|
|
1213
|
-
```ts
|
|
1214
|
-
assistant_entry_id: string
|
|
1215
|
-
feedback_eligible: boolean
|
|
1216
|
-
feedback_scope: "latest_result"
|
|
1217
|
-
final_artifacts: FinalArtifact[] | undefined
|
|
1218
|
-
recaption: string | undefined
|
|
1219
|
-
suggestions: string[]
|
|
1220
|
-
```
|
|
1221
|
-
|
|
1222
|
-
## `PreparedSolution` (interface)
|
|
1223
|
-
|
|
1224
|
-
```ts
|
|
1225
|
-
assetId: string
|
|
1226
|
-
bizRoleId: string | undefined
|
|
1227
|
-
expiresAt: string
|
|
1228
|
-
kind: "prepared"
|
|
1229
|
-
roles: string[]
|
|
1230
|
-
solutionId: string
|
|
1231
|
-
```
|
|
1232
|
-
|
|
1233
|
-
## `PreparedSolutionAsset` (interface)
|
|
1234
|
-
|
|
1235
|
-
```ts
|
|
1236
|
-
assetId: string
|
|
1237
|
-
bizRoleId: string | undefined
|
|
1238
|
-
kind: "prepared"
|
|
1239
|
-
```
|
|
1240
|
-
|
|
1241
|
-
## `prependOlder` (function)
|
|
1242
|
-
|
|
1243
|
-
```ts
|
|
1244
|
-
prependOlder: (current: TurnProjection[], page: TurnProjection[]) => TurnProjection[]
|
|
1245
|
-
```
|
|
1246
|
-
|
|
1247
|
-
## `PreviewToolUiCardEntry` (interface)
|
|
1248
|
-
|
|
1249
|
-
```ts
|
|
1250
|
-
blocks: ContentBlock[]
|
|
1251
|
-
card: ToolUiCard
|
|
1252
|
-
key: string
|
|
1253
|
-
toolCall: ToolCallInfo
|
|
1254
|
-
```
|
|
1255
|
-
|
|
1256
|
-
## `PrimarySkillParallelMode` (interface)
|
|
1257
|
-
|
|
1258
|
-
```ts
|
|
1259
|
-
id: string
|
|
1260
|
-
name: string
|
|
1261
|
-
prompt_hint: string
|
|
1262
|
-
```
|
|
1263
|
-
|
|
1264
|
-
## `PrimarySkillSnapshot` (interface)
|
|
1265
|
-
|
|
1266
|
-
```ts
|
|
1267
|
-
captured_at: string
|
|
1268
|
-
description: string
|
|
1269
|
-
parallel_modes: PrimarySkillParallelMode[]
|
|
1270
|
-
skill_id: string
|
|
1271
|
-
stages: PrimarySkillStageSpec[]
|
|
1272
|
-
title: string
|
|
1273
|
-
version: number
|
|
1274
|
-
```
|
|
1275
|
-
|
|
1276
|
-
## `PrimarySkillStageSpec` (interface)
|
|
1277
|
-
|
|
1278
|
-
```ts
|
|
1279
|
-
id: string
|
|
1280
|
-
name: string
|
|
1281
|
-
steps: PrimarySkillStepSpec[]
|
|
1282
|
-
```
|
|
1283
|
-
|
|
1284
|
-
## `PrimarySkillStepSpec` (interface)
|
|
1285
|
-
|
|
1286
|
-
```ts
|
|
1287
|
-
label: string
|
|
1288
|
-
n: number
|
|
1289
|
-
```
|
|
1290
|
-
|
|
1291
|
-
## `ProvidersResponse` (interface)
|
|
1292
|
-
|
|
1293
|
-
```ts
|
|
1294
|
-
password_enabled: boolean
|
|
1295
|
-
providers: { name: string; authorize_url: string; }[]
|
|
1296
|
-
```
|
|
1297
|
-
|
|
1298
|
-
## `PublishedSolutionRef` (type)
|
|
1299
|
-
|
|
1300
|
-
```ts
|
|
1301
|
-
export type PublishedSolutionRef =
|
|
1302
|
-
| { source: "builtin"; name: string }
|
|
1303
|
-
| { source: "hub"; org: string; name: string }
|
|
1304
|
-
```
|
|
1305
|
-
|
|
1306
|
-
## `QueueAck` (interface)
|
|
1307
|
-
|
|
1308
|
-
```ts
|
|
1309
|
-
items: QueuedMessage[] | undefined
|
|
1310
|
-
message: string | null | undefined
|
|
1311
|
-
pause_reason: string | null | undefined
|
|
1312
|
-
paused: boolean | undefined
|
|
1313
|
-
revision: number | undefined
|
|
1314
|
-
running: boolean | undefined
|
|
1315
|
-
session_id: string | undefined
|
|
1316
|
-
status: "error" | "ok" | "conflict" | "queued"
|
|
1317
|
-
```
|
|
1318
|
-
|
|
1319
|
-
## `QueuedMessage` (interface)
|
|
498
|
+
## `QueuedMessage` (interface)
|
|
1320
499
|
|
|
1321
500
|
```ts
|
|
1322
501
|
content: string
|
|
@@ -1336,12 +515,6 @@ version: number
|
|
|
1336
515
|
export type QueuedMessageStatus = "pending" | "delivering" | "claimed" | "consumed" | "cancelled"
|
|
1337
516
|
```
|
|
1338
517
|
|
|
1339
|
-
## `queuedMessageStatusLabel` (function)
|
|
1340
|
-
|
|
1341
|
-
```ts
|
|
1342
|
-
queuedMessageStatusLabel: (status: QueuedMessageStatus) => string
|
|
1343
|
-
```
|
|
1344
|
-
|
|
1345
518
|
## `QueueOperationResult` (interface)
|
|
1346
519
|
|
|
1347
520
|
```ts
|
|
@@ -1352,46 +525,6 @@ ok: boolean
|
|
|
1352
525
|
snapshot: SessionQueueSnapshot | null
|
|
1353
526
|
```
|
|
1354
527
|
|
|
1355
|
-
## `queuePauseReasonLabel` (function)
|
|
1356
|
-
|
|
1357
|
-
```ts
|
|
1358
|
-
queuePauseReasonLabel: (reason: string | null | undefined) => string | null
|
|
1359
|
-
```
|
|
1360
|
-
|
|
1361
|
-
## `RawEvent` (interface)
|
|
1362
|
-
|
|
1363
|
-
```ts
|
|
1364
|
-
payload: Record<string, unknown>
|
|
1365
|
-
type: string
|
|
1366
|
-
```
|
|
1367
|
-
|
|
1368
|
-
## `reconcileHistoricalUserTurns` (function)
|
|
1369
|
-
|
|
1370
|
-
```ts
|
|
1371
|
-
reconcileHistoricalUserTurns: (currentTurns: TurnProjection[], incomingTurns: TurnProjection[]) => TurnProjection[]
|
|
1372
|
-
```
|
|
1373
|
-
|
|
1374
|
-
## `reconcileOptimisticUserTurns` (function)
|
|
1375
|
-
|
|
1376
|
-
```ts
|
|
1377
|
-
reconcileOptimisticUserTurns: (currentTurns: TurnProjection[], incomingTurns: TurnProjection[]) => TurnProjection[]
|
|
1378
|
-
```
|
|
1379
|
-
|
|
1380
|
-
## `replaceWindow` (function)
|
|
1381
|
-
|
|
1382
|
-
```ts
|
|
1383
|
-
replaceWindow: (current: TurnProjection[], page: TurnProjection[], liveRevisionAtStart: number, liveRevisions: LiveRevisionState) => TurnProjection[]
|
|
1384
|
-
```
|
|
1385
|
-
|
|
1386
|
-
## `ReplayPreview` (interface)
|
|
1387
|
-
|
|
1388
|
-
```ts
|
|
1389
|
-
intent: string | null | undefined
|
|
1390
|
-
reason: string | null | undefined
|
|
1391
|
-
session_id: string
|
|
1392
|
-
supported: boolean
|
|
1393
|
-
```
|
|
1394
|
-
|
|
1395
528
|
## `ReplaySnapshot` (interface)
|
|
1396
529
|
|
|
1397
530
|
```ts
|
|
@@ -1402,56 +535,19 @@ speed: ReplaySpeed
|
|
|
1402
535
|
|
|
1403
536
|
## `ReplaySpeed` (type)
|
|
1404
537
|
|
|
1405
|
-
```ts
|
|
1406
|
-
export type ReplaySpeed = 1 | 2 | 5
|
|
1407
|
-
```
|
|
1408
|
-
|
|
1409
|
-
## `ReplayState` (interface)
|
|
1410
|
-
|
|
1411
|
-
```ts
|
|
1412
|
-
autonomous_reason: string | null | undefined
|
|
1413
|
-
ended_at: string | null | undefined
|
|
1414
|
-
next_source_entry_id: string | null | undefined
|
|
1415
|
-
source_session_id: string | undefined
|
|
1416
|
-
speed: ReplaySpeed | undefined
|
|
1417
|
-
status: "replay" | "autonomous" | undefined
|
|
1418
|
-
```
|
|
1419
|
-
|
|
1420
|
-
## `resolveServiceUrl` (function)
|
|
1421
|
-
|
|
1422
|
-
```ts
|
|
1423
|
-
resolveServiceUrl: (endpoints: PlatformEndpoints, name: PlatformServiceName, path?: string) => string | null
|
|
1424
|
-
```
|
|
1425
|
-
|
|
1426
|
-
## `resolveToolUiCardContent` (function)
|
|
1427
|
-
|
|
1428
|
-
```ts
|
|
1429
|
-
resolveToolUiCardContent: (card: ToolUiCard) => { type: ToolUiCardContentType; content: string; } | null
|
|
1430
|
-
```
|
|
1431
|
-
|
|
1432
|
-
## `ResultFeedback` (interface)
|
|
1433
|
-
|
|
1434
|
-
```ts
|
|
1435
|
-
assistant_entry_id: string
|
|
1436
|
-
created_at: string
|
|
1437
|
-
helpful: boolean
|
|
1438
|
-
project_id: string | null
|
|
1439
|
-
reason: ResultFeedbackReason | null
|
|
1440
|
-
session_id: string
|
|
1441
|
-
surface: "unknown" | "chat" | "software_factory"
|
|
1442
|
-
updated_at: string
|
|
538
|
+
```ts
|
|
539
|
+
export type ReplaySpeed = 1 | 2 | 5
|
|
1443
540
|
```
|
|
1444
541
|
|
|
1445
|
-
## `
|
|
542
|
+
## `ReplayState` (interface)
|
|
1446
543
|
|
|
1447
544
|
```ts
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
| "other"
|
|
545
|
+
autonomous_reason: string | null | undefined
|
|
546
|
+
ended_at: string | null | undefined
|
|
547
|
+
next_source_entry_id: string | null | undefined
|
|
548
|
+
source_session_id: string | undefined
|
|
549
|
+
speed: ReplaySpeed | undefined
|
|
550
|
+
status: "replay" | "autonomous" | undefined
|
|
1455
551
|
```
|
|
1456
552
|
|
|
1457
553
|
## `RunOptions` (interface)
|
|
@@ -1475,17 +571,6 @@ result: unknown
|
|
|
1475
571
|
sessionId: string
|
|
1476
572
|
```
|
|
1477
573
|
|
|
1478
|
-
## `RunTiming` (interface)
|
|
1479
|
-
|
|
1480
|
-
```ts
|
|
1481
|
-
duration_ms: number | null | undefined
|
|
1482
|
-
loop_id: string
|
|
1483
|
-
run_id: string
|
|
1484
|
-
scope: "chat" | "subagent"
|
|
1485
|
-
started_at: string | null | undefined
|
|
1486
|
-
status: "completed" | "paused" | "failed" | "cancelled" | "incomplete"
|
|
1487
|
-
```
|
|
1488
|
-
|
|
1489
574
|
## `RunTrace` (interface)
|
|
1490
575
|
|
|
1491
576
|
```ts
|
|
@@ -1515,6 +600,7 @@ kbIds: number[] | undefined
|
|
|
1515
600
|
mode: string | undefined
|
|
1516
601
|
model: string | undefined
|
|
1517
602
|
queueWhenRunning: boolean | undefined
|
|
603
|
+
reasoningLevel: string | undefined
|
|
1518
604
|
replayDecision: "keep_replay" | "continue_replay" | undefined
|
|
1519
605
|
thinkingOverride: boolean | undefined
|
|
1520
606
|
whatif: { from_step: number; quotes: Array<Record<string, unknown>>; deprecate_entry_ids: string[]; } | undefined
|
|
@@ -1541,12 +627,6 @@ os: string | null | undefined
|
|
|
1541
627
|
workspace: string | null | undefined
|
|
1542
628
|
```
|
|
1543
629
|
|
|
1544
|
-
## `SessionComputerList` (interface)
|
|
1545
|
-
|
|
1546
|
-
```ts
|
|
1547
|
-
computers: SessionComputer[]
|
|
1548
|
-
```
|
|
1549
|
-
|
|
1550
630
|
## `SessionConfig` (interface)
|
|
1551
631
|
|
|
1552
632
|
```ts
|
|
@@ -1558,20 +638,6 @@ memoryEnabled: boolean | undefined
|
|
|
1558
638
|
model: string | undefined
|
|
1559
639
|
```
|
|
1560
640
|
|
|
1561
|
-
## `SessionConnectOptions` (interface)
|
|
1562
|
-
|
|
1563
|
-
```ts
|
|
1564
|
-
setup: ((session: AgentSession) => void) | undefined
|
|
1565
|
-
```
|
|
1566
|
-
|
|
1567
|
-
## `SessionContextStats` (interface)
|
|
1568
|
-
|
|
1569
|
-
```ts
|
|
1570
|
-
compaction_ratio: number
|
|
1571
|
-
context_window: number
|
|
1572
|
-
tokens_used: number
|
|
1573
|
-
```
|
|
1574
|
-
|
|
1575
641
|
## `SessionDefinition` (interface)
|
|
1576
642
|
|
|
1577
643
|
```ts
|
|
@@ -1624,29 +690,6 @@ viewer_role: "owner" | "viewer" | undefined
|
|
|
1624
690
|
workspace_path: string | null | undefined
|
|
1625
691
|
```
|
|
1626
692
|
|
|
1627
|
-
## `SessionHistory` (interface)
|
|
1628
|
-
|
|
1629
|
-
```ts
|
|
1630
|
-
active_branch: string | null
|
|
1631
|
-
branches: string[]
|
|
1632
|
-
nodes: HistoryNode[]
|
|
1633
|
-
system_prompt_tokens: number | null | undefined
|
|
1634
|
-
tokenizer_model: string | null | undefined
|
|
1635
|
-
tools_tokens: number | null | undefined
|
|
1636
|
-
```
|
|
1637
|
-
|
|
1638
|
-
## `SessionHub` (class)
|
|
1639
|
-
|
|
1640
|
-
```ts
|
|
1641
|
-
connect: (sessionId: string, options?: SessionConnectOptions) => Promise<AgentSession>
|
|
1642
|
-
disconnect: () => void
|
|
1643
|
-
disposeAll: () => void
|
|
1644
|
-
getConnection: () => ConnectionStatus
|
|
1645
|
-
onConnectionChange: (listener: (status: ConnectionStatus) => void) => () => void
|
|
1646
|
-
peek: (sessionId: string) => AgentSession | undefined
|
|
1647
|
-
reconnect: () => void
|
|
1648
|
-
```
|
|
1649
|
-
|
|
1650
693
|
## `SessionInfo` (type)
|
|
1651
694
|
|
|
1652
695
|
```ts
|
|
@@ -1691,94 +734,6 @@ SessionInfo = type({
|
|
|
1691
734
|
})
|
|
1692
735
|
```
|
|
1693
736
|
|
|
1694
|
-
## `SessionPlugin` (interface)
|
|
1695
|
-
|
|
1696
|
-
```ts
|
|
1697
|
-
active: boolean
|
|
1698
|
-
config: SessionPluginConfigSummary | undefined
|
|
1699
|
-
display_name: string | null | undefined
|
|
1700
|
-
icon: string | null | undefined
|
|
1701
|
-
installed: boolean | null
|
|
1702
|
-
name: string
|
|
1703
|
-
projected: boolean
|
|
1704
|
-
projection_source: string | null | undefined
|
|
1705
|
-
reason: string | null | undefined
|
|
1706
|
-
status: string
|
|
1707
|
-
```
|
|
1708
|
-
|
|
1709
|
-
## `SessionPluginActivation` (type)
|
|
1710
|
-
|
|
1711
|
-
```ts
|
|
1712
|
-
export type SessionPluginActivation = Pick<SessionPlugin, "name" | "active" | "status" | "reason">
|
|
1713
|
-
```
|
|
1714
|
-
|
|
1715
|
-
## `SessionPluginConfigError` (interface)
|
|
1716
|
-
|
|
1717
|
-
```ts
|
|
1718
|
-
message: string
|
|
1719
|
-
path: string
|
|
1720
|
-
```
|
|
1721
|
-
|
|
1722
|
-
## `SessionPluginConfigSet` (interface)
|
|
1723
|
-
|
|
1724
|
-
```ts
|
|
1725
|
-
path: string
|
|
1726
|
-
value: unknown
|
|
1727
|
-
```
|
|
1728
|
-
|
|
1729
|
-
## `SessionPluginConfigState` (interface)
|
|
1730
|
-
|
|
1731
|
-
```ts
|
|
1732
|
-
errors: SessionPluginConfigError[]
|
|
1733
|
-
reason: string | null
|
|
1734
|
-
revision: string | null
|
|
1735
|
-
schema: Record<string, unknown> | null
|
|
1736
|
-
state: SessionPluginConfigStateName
|
|
1737
|
-
values: Record<string, unknown>
|
|
1738
|
-
write_only: string[]
|
|
1739
|
-
```
|
|
1740
|
-
|
|
1741
|
-
## `SessionPluginConfigStateName` (type)
|
|
1742
|
-
|
|
1743
|
-
```ts
|
|
1744
|
-
export type SessionPluginConfigStateName = "not_required" | "required" | "configured" | "error"
|
|
1745
|
-
```
|
|
1746
|
-
|
|
1747
|
-
## `SessionPluginConfigSummary` (type)
|
|
1748
|
-
|
|
1749
|
-
```ts
|
|
1750
|
-
export type SessionPluginConfigSummary =
|
|
1751
|
-
| SessionPluginConfigStateName
|
|
1752
|
-
| "unchecked"
|
|
1753
|
-
```
|
|
1754
|
-
|
|
1755
|
-
## `SessionPluginConfigUpdate` (interface)
|
|
1756
|
-
|
|
1757
|
-
```ts
|
|
1758
|
-
expected_revision: string | null | undefined
|
|
1759
|
-
remove: string[] | undefined
|
|
1760
|
-
set: SessionPluginConfigSet[] | undefined
|
|
1761
|
-
```
|
|
1762
|
-
|
|
1763
|
-
## `SessionPortMapping` (interface)
|
|
1764
|
-
|
|
1765
|
-
```ts
|
|
1766
|
-
container_port: number
|
|
1767
|
-
host_port: number
|
|
1768
|
-
```
|
|
1769
|
-
|
|
1770
|
-
## `SessionProfile` (interface)
|
|
1771
|
-
|
|
1772
|
-
```ts
|
|
1773
|
-
compactionRatio: number | undefined
|
|
1774
|
-
disableTools: string[] | undefined
|
|
1775
|
-
enableThinking: boolean | undefined
|
|
1776
|
-
env: Record<string, string> | undefined
|
|
1777
|
-
memoryEnabled: boolean | undefined
|
|
1778
|
-
model: string | undefined
|
|
1779
|
-
solution: SolutionRef | undefined
|
|
1780
|
-
```
|
|
1781
|
-
|
|
1782
737
|
## `SessionQueueSnapshot` (interface)
|
|
1783
738
|
|
|
1784
739
|
```ts
|
|
@@ -1789,13 +744,6 @@ revision: number
|
|
|
1789
744
|
session_id: string
|
|
1790
745
|
```
|
|
1791
746
|
|
|
1792
|
-
## `SessionSearchMatch` (interface)
|
|
1793
|
-
|
|
1794
|
-
```ts
|
|
1795
|
-
field: "title" | "content"
|
|
1796
|
-
snippet: { role: string; text: string; } | null
|
|
1797
|
-
```
|
|
1798
|
-
|
|
1799
747
|
## `SessionSetupError` (class)
|
|
1800
748
|
|
|
1801
749
|
```ts
|
|
@@ -1893,8 +841,10 @@ writeFile: (sessionId: string, filePath: string, content: string) => Promise<{ s
|
|
|
1893
841
|
activeCompaction: ActiveCompactionState | null
|
|
1894
842
|
agentLoops: Record<string, AgentLoopInfo>
|
|
1895
843
|
askAnswers: Record<string, AskUserAnswerData>
|
|
844
|
+
compactionPending: boolean
|
|
1896
845
|
connection: ConnectionStatus
|
|
1897
846
|
errorMessage: string | null
|
|
847
|
+
historyRevision: number
|
|
1898
848
|
isStreaming: boolean
|
|
1899
849
|
loadingOlder: boolean
|
|
1900
850
|
messages: ChatMessage[]
|
|
@@ -1904,8 +854,10 @@ queue: SessionQueueSnapshot
|
|
|
1904
854
|
replay: ReplaySnapshot | null
|
|
1905
855
|
sessionId: string
|
|
1906
856
|
status: "completed" | "failed" | "interrupted" | "running" | "created" | "waiting_for_input" | null
|
|
857
|
+
timelineRevision: number
|
|
1907
858
|
turns: TurnProjection[]
|
|
1908
859
|
viewerRole: "owner" | "viewer" | null
|
|
860
|
+
workflowRuns: Record<string, WorkflowRunState>
|
|
1909
861
|
```
|
|
1910
862
|
|
|
1911
863
|
## `SessionStatus` (type)
|
|
@@ -1916,28 +868,6 @@ SessionStatus = type(
|
|
|
1916
868
|
)
|
|
1917
869
|
```
|
|
1918
870
|
|
|
1919
|
-
## `SessionStatusEvent` (interface)
|
|
1920
|
-
|
|
1921
|
-
```ts
|
|
1922
|
-
session_id: string
|
|
1923
|
-
status: string
|
|
1924
|
-
```
|
|
1925
|
-
|
|
1926
|
-
## `SessionTurnIndex` (interface)
|
|
1927
|
-
|
|
1928
|
-
```ts
|
|
1929
|
-
items: SessionTurnIndexItem[]
|
|
1930
|
-
sessionId: string
|
|
1931
|
-
```
|
|
1932
|
-
|
|
1933
|
-
## `SessionTurnIndexItem` (interface)
|
|
1934
|
-
|
|
1935
|
-
```ts
|
|
1936
|
-
createdAt: string | null
|
|
1937
|
-
entryId: string
|
|
1938
|
-
preview: string
|
|
1939
|
-
```
|
|
1940
|
-
|
|
1941
871
|
## `SessionTurnsPage` (interface)
|
|
1942
872
|
|
|
1943
873
|
```ts
|
|
@@ -1954,38 +884,6 @@ fromEntryId: string | undefined
|
|
|
1954
884
|
limit: number | undefined
|
|
1955
885
|
```
|
|
1956
886
|
|
|
1957
|
-
## `ShareLinkResult` (interface)
|
|
1958
|
-
|
|
1959
|
-
```ts
|
|
1960
|
-
expires_at: string | null
|
|
1961
|
-
token: string
|
|
1962
|
-
url: string
|
|
1963
|
-
```
|
|
1964
|
-
|
|
1965
|
-
## `shouldApplySnapshot` (function)
|
|
1966
|
-
|
|
1967
|
-
```ts
|
|
1968
|
-
shouldApplySnapshot: (current: SessionQueueSnapshot | undefined, next: SessionQueueSnapshot) => boolean
|
|
1969
|
-
```
|
|
1970
|
-
|
|
1971
|
-
## `SiteVisitsResource` (class)
|
|
1972
|
-
|
|
1973
|
-
```ts
|
|
1974
|
-
record: () => Promise<SiteVisitsSummary>
|
|
1975
|
-
summary: () => Promise<SiteVisitsSummary>
|
|
1976
|
-
```
|
|
1977
|
-
|
|
1978
|
-
## `SiteVisitsSummary` (interface)
|
|
1979
|
-
|
|
1980
|
-
```ts
|
|
1981
|
-
as_of: string
|
|
1982
|
-
date: string
|
|
1983
|
-
timezone: string
|
|
1984
|
-
today_pv: number
|
|
1985
|
-
today_uv: number
|
|
1986
|
-
total_pv: number
|
|
1987
|
-
```
|
|
1988
|
-
|
|
1989
887
|
## `SkillDefinition` (interface)
|
|
1990
888
|
|
|
1991
889
|
```ts
|
|
@@ -1993,12 +891,6 @@ files: SkillFile[]
|
|
|
1993
891
|
name: string
|
|
1994
892
|
```
|
|
1995
893
|
|
|
1996
|
-
## `SkillEditorTemplateId` (type)
|
|
1997
|
-
|
|
1998
|
-
```ts
|
|
1999
|
-
export type SkillEditorTemplateId = "skill_editor"
|
|
2000
|
-
```
|
|
2001
|
-
|
|
2002
894
|
## `SkillFile` (type)
|
|
2003
895
|
|
|
2004
896
|
```ts
|
|
@@ -2016,61 +908,6 @@ installed: boolean | undefined
|
|
|
2016
908
|
local: boolean | undefined
|
|
2017
909
|
```
|
|
2018
910
|
|
|
2019
|
-
## `Solution` (interface)
|
|
2020
|
-
|
|
2021
|
-
```ts
|
|
2022
|
-
data: Record<string, unknown> | null | undefined
|
|
2023
|
-
description: string | null | undefined
|
|
2024
|
-
id: string
|
|
2025
|
-
initial_message: string | null | undefined
|
|
2026
|
-
initial_mode: string | null | undefined
|
|
2027
|
-
layout: { available?: boolean; source_dir?: string; entry?: string; export?: string; } | null | undefined
|
|
2028
|
-
layout_type: string
|
|
2029
|
-
name: string
|
|
2030
|
-
preview: { url: string; title?: string | null; } | null | undefined
|
|
2031
|
-
roles: BizRole[] | null | undefined
|
|
2032
|
-
source: string | null | undefined
|
|
2033
|
-
ui_config: SolutionAppUiConfig | null | undefined
|
|
2034
|
-
version: string
|
|
2035
|
-
```
|
|
2036
|
-
|
|
2037
|
-
## `SolutionAppField` (type)
|
|
2038
|
-
|
|
2039
|
-
```ts
|
|
2040
|
-
export type SolutionAppField =
|
|
2041
|
-
| {
|
|
2042
|
-
id: string
|
|
2043
|
-
kind: "textarea"
|
|
2044
|
-
label: string
|
|
2045
|
-
placeholder?: string
|
|
2046
|
-
}
|
|
2047
|
-
| {
|
|
2048
|
-
id: string
|
|
2049
|
-
kind: "file-upload"
|
|
2050
|
-
accept?: string[]
|
|
2051
|
-
categories?: Array<{
|
|
2052
|
-
label: string
|
|
2053
|
-
description: string
|
|
2054
|
-
color: string
|
|
2055
|
-
}>
|
|
2056
|
-
}
|
|
2057
|
-
```
|
|
2058
|
-
|
|
2059
|
-
## `SolutionAppState` (interface)
|
|
2060
|
-
|
|
2061
|
-
```ts
|
|
2062
|
-
meta: Record<string, { label: string; value: string; color?: string; }>
|
|
2063
|
-
pipeline: { id: string; label: string; status: "done" | "active" | "pending" | "error"; }[]
|
|
2064
|
-
```
|
|
2065
|
-
|
|
2066
|
-
## `SolutionAppUiConfig` (interface)
|
|
2067
|
-
|
|
2068
|
-
```ts
|
|
2069
|
-
branding: { name: string; subtitle?: string; icon_text: string; icon_gradient?: string; }
|
|
2070
|
-
create: { title: string; description?: string; submit_button: string; sections: Array<{ id: string; title: string; description?: string; fields: Array<SolutionAppField>; }>; }
|
|
2071
|
-
list: { title: string; create_button: string; card?: { subtitle?: string; stats?: Array<{ label: string; value: string; color?: string; }>; }; }
|
|
2072
|
-
```
|
|
2073
|
-
|
|
2074
911
|
## `SolutionDefinition` (type)
|
|
2075
912
|
|
|
2076
913
|
```ts
|
|
@@ -2080,55 +917,6 @@ export type SolutionDefinition =
|
|
|
2080
917
|
| { files: TextFile[]; role?: string }
|
|
2081
918
|
```
|
|
2082
919
|
|
|
2083
|
-
## `SolutionRef` (type)
|
|
2084
|
-
|
|
2085
|
-
```ts
|
|
2086
|
-
export type SolutionRef = ExistingSolutionRef | PreparedSolutionAsset
|
|
2087
|
-
```
|
|
2088
|
-
|
|
2089
|
-
## `sortComputers` (function)
|
|
2090
|
-
|
|
2091
|
-
```ts
|
|
2092
|
-
sortComputers: (computers: SessionComputer[]) => SessionComputer[]
|
|
2093
|
-
```
|
|
2094
|
-
|
|
2095
|
-
## `SystemError` (interface)
|
|
2096
|
-
|
|
2097
|
-
```ts
|
|
2098
|
-
message: string
|
|
2099
|
-
```
|
|
2100
|
-
|
|
2101
|
-
## `Task` (type)
|
|
2102
|
-
|
|
2103
|
-
```ts
|
|
2104
|
-
Task = type({
|
|
2105
|
-
id: "string",
|
|
2106
|
-
goal: "string",
|
|
2107
|
-
skills: "string[]",
|
|
2108
|
-
depends_on: "string[]",
|
|
2109
|
-
status: TaskStatus,
|
|
2110
|
-
result_summary: "string",
|
|
2111
|
-
number: "string",
|
|
2112
|
-
})
|
|
2113
|
-
```
|
|
2114
|
-
|
|
2115
|
-
## `TaskStatus` (type)
|
|
2116
|
-
|
|
2117
|
-
```ts
|
|
2118
|
-
TaskStatus = type("'pending' | 'in_progress' | 'done' | 'failed' | 'skipped'")
|
|
2119
|
-
```
|
|
2120
|
-
|
|
2121
|
-
## `TemplateId` (type)
|
|
2122
|
-
|
|
2123
|
-
```ts
|
|
2124
|
-
export type TemplateId =
|
|
2125
|
-
| "default"
|
|
2126
|
-
| "skill_editor"
|
|
2127
|
-
// ship-attack v2:用户从 ship-attack 页面点"新建 session"创建的会话。
|
|
2128
|
-
// 后端 _maybe_bind_first_skill 只对此模板触发首次绑定。
|
|
2129
|
-
| "ship_attack"
|
|
2130
|
-
```
|
|
2131
|
-
|
|
2132
920
|
## `TextContentPart` (interface)
|
|
2133
921
|
|
|
2134
922
|
```ts
|
|
@@ -2151,32 +939,6 @@ export type TextFile = {
|
|
|
2151
939
|
export type TokenStorageMode = "local" | "memory"
|
|
2152
940
|
```
|
|
2153
941
|
|
|
2154
|
-
## `ToolBridgeContent` (interface)
|
|
2155
|
-
|
|
2156
|
-
```ts
|
|
2157
|
-
action: string
|
|
2158
|
-
payload: unknown
|
|
2159
|
-
```
|
|
2160
|
-
|
|
2161
|
-
## `ToolCallArgumentsDelta` (interface)
|
|
2162
|
-
|
|
2163
|
-
```ts
|
|
2164
|
-
arguments_delta: string
|
|
2165
|
-
function: { name: string; }
|
|
2166
|
-
id: string
|
|
2167
|
-
index: number
|
|
2168
|
-
loop_name: string | undefined
|
|
2169
|
-
```
|
|
2170
|
-
|
|
2171
|
-
## `ToolCallCreated` (interface)
|
|
2172
|
-
|
|
2173
|
-
```ts
|
|
2174
|
-
function: { name: string; arguments: string; }
|
|
2175
|
-
id: string
|
|
2176
|
-
index: number
|
|
2177
|
-
loop_name: string | undefined
|
|
2178
|
-
```
|
|
2179
|
-
|
|
2180
942
|
## `ToolCallInfo` (interface)
|
|
2181
943
|
|
|
2182
944
|
```ts
|
|
@@ -2190,128 +952,12 @@ result: unknown
|
|
|
2190
952
|
status: "done" | "error" | "cancelled" | "awaiting_answer" | "pending" | undefined
|
|
2191
953
|
```
|
|
2192
954
|
|
|
2193
|
-
## `ToolCallProjection` (interface)
|
|
2194
|
-
|
|
2195
|
-
```ts
|
|
2196
|
-
arguments: string
|
|
2197
|
-
display_name: string
|
|
2198
|
-
duration_ms: number | null | undefined
|
|
2199
|
-
id: string
|
|
2200
|
-
pending_question_ref: PendingQuestionRef | null | undefined
|
|
2201
|
-
ran_in_parallel: boolean | undefined
|
|
2202
|
-
result: unknown
|
|
2203
|
-
started_at: string | null | undefined
|
|
2204
|
-
status: string
|
|
2205
|
-
subagent_runs: RunTiming[] | undefined
|
|
2206
|
-
tool_name: string
|
|
2207
|
-
```
|
|
2208
|
-
|
|
2209
|
-
## `ToolResultDelta` (interface)
|
|
2210
|
-
|
|
2211
|
-
```ts
|
|
2212
|
-
content: string
|
|
2213
|
-
loop_name: string | undefined
|
|
2214
|
-
stream: "stdout" | "stderr" | undefined
|
|
2215
|
-
tool_call_id: string
|
|
2216
|
-
```
|
|
2217
|
-
|
|
2218
|
-
## `ToolResultDone` (interface)
|
|
2219
|
-
|
|
2220
|
-
```ts
|
|
2221
|
-
content: string
|
|
2222
|
-
function: { name: string; }
|
|
2223
|
-
loop_name: string | undefined
|
|
2224
|
-
tool_call_id: string
|
|
2225
|
-
```
|
|
2226
|
-
|
|
2227
|
-
## `ToolUiCard` (interface)
|
|
2228
|
-
|
|
2229
|
-
```ts
|
|
2230
|
-
archived: boolean | undefined
|
|
2231
|
-
height: number
|
|
2232
|
-
mcpApp: McpAppData | undefined
|
|
2233
|
-
resourceHTML: string | undefined
|
|
2234
|
-
resourceUri: string | undefined
|
|
2235
|
-
resourceURI: string | undefined
|
|
2236
|
-
sourcePath: string | undefined
|
|
2237
|
-
target: "inline" | "preview"
|
|
2238
|
-
title: string | undefined
|
|
2239
|
-
```
|
|
2240
|
-
|
|
2241
|
-
## `ToolUiCardContentType` (type)
|
|
2242
|
-
|
|
2243
|
-
```ts
|
|
2244
|
-
export type ToolUiCardContentType = "resource-html" | "resource-uri" | "resource-file"
|
|
2245
|
-
```
|
|
2246
|
-
|
|
2247
|
-
## `toReplaySnapshot` (function)
|
|
2248
|
-
|
|
2249
|
-
```ts
|
|
2250
|
-
toReplaySnapshot: (raw: ReplayState | null | undefined) => ReplaySnapshot | null
|
|
2251
|
-
```
|
|
2252
|
-
|
|
2253
955
|
## `transformSlashCommand` (function)
|
|
2254
956
|
|
|
2255
957
|
```ts
|
|
2256
958
|
transformSlashCommand: (skillName: string, rawInput: string, { local, installed }?: SkillMentionAvailability) => string
|
|
2257
959
|
```
|
|
2258
960
|
|
|
2259
|
-
## `TurnProjection` (interface)
|
|
2260
|
-
|
|
2261
|
-
```ts
|
|
2262
|
-
archived_count: number | null | undefined
|
|
2263
|
-
archived_files: ArchivedFileInfo[] | null | undefined
|
|
2264
|
-
archived_tool_calls: ArchivedToolCallInfo[] | null | undefined
|
|
2265
|
-
blocks: ContentBlock[]
|
|
2266
|
-
client_render_id: string | null | undefined
|
|
2267
|
-
client_request_id: string | null | undefined
|
|
2268
|
-
compaction_id: string | null | undefined
|
|
2269
|
-
context_action: ContextAction | null | undefined
|
|
2270
|
-
context_content: unknown
|
|
2271
|
-
context_key: string | null | undefined
|
|
2272
|
-
context_kind: string | null | undefined
|
|
2273
|
-
context_name: string | null | undefined
|
|
2274
|
-
context_order: number | null | undefined
|
|
2275
|
-
context_revision: string | null | undefined
|
|
2276
|
-
context_window: number | undefined
|
|
2277
|
-
display_summary: string | null | undefined
|
|
2278
|
-
display_title: string | null | undefined
|
|
2279
|
-
duration_ms: number | null | undefined
|
|
2280
|
-
failure_reason: string | null | undefined
|
|
2281
|
-
fallback_applied: boolean | null | undefined
|
|
2282
|
-
first_token_delivery_ms: number | null | undefined
|
|
2283
|
-
first_token_ms: number | null | undefined
|
|
2284
|
-
has_reported_timing: boolean | undefined
|
|
2285
|
-
id: string
|
|
2286
|
-
kind: "message" | "context" | "compaction" | undefined
|
|
2287
|
-
loop_id: string
|
|
2288
|
-
memory_refs: MemoryRef[] | null | undefined
|
|
2289
|
-
model: string | null | undefined
|
|
2290
|
-
parent_fork_tool_call_id: string | null | undefined
|
|
2291
|
-
post_chat_followup: PostChatFollowup | null | undefined
|
|
2292
|
-
role: "user" | "assistant" | "system"
|
|
2293
|
-
saved_ratio: number | null | undefined
|
|
2294
|
-
sequence: number
|
|
2295
|
-
sources: ContextSourceInfo[] | null | undefined
|
|
2296
|
-
started_at: string | null | undefined
|
|
2297
|
-
status: "streaming" | "completed" | "paused" | "failed" | "interrupted"
|
|
2298
|
-
stream_duration_ms: number | null | undefined
|
|
2299
|
-
summary_full: string | null | undefined
|
|
2300
|
-
summary_preview: string | null | undefined
|
|
2301
|
-
tokens_after: number | null | undefined
|
|
2302
|
-
tokens_before: number | null | undefined
|
|
2303
|
-
tool_calls: ToolCallProjection[]
|
|
2304
|
-
trigger: "auto" | "manual" | "forced_retry" | null | undefined
|
|
2305
|
-
turn_id: string
|
|
2306
|
-
usage: Record<string, unknown> | null | undefined
|
|
2307
|
-
```
|
|
2308
|
-
|
|
2309
|
-
## `TypedSocket` (type)
|
|
2310
|
-
|
|
2311
|
-
```ts
|
|
2312
|
-
export type TypedSocket = Socket<ServerToClientEvents, ClientToServerEvents>
|
|
2313
|
-
```
|
|
2314
|
-
|
|
2315
961
|
## `UploadFileEntry` (type)
|
|
2316
962
|
|
|
2317
963
|
```ts
|
|
@@ -2332,6 +978,12 @@ percent: number | undefined
|
|
|
2332
978
|
total: number | undefined
|
|
2333
979
|
```
|
|
2334
980
|
|
|
981
|
+
## `userFacingErrorText` (function)
|
|
982
|
+
|
|
983
|
+
```ts
|
|
984
|
+
userFacingErrorText: (message: string) => string
|
|
985
|
+
```
|
|
986
|
+
|
|
2335
987
|
## `UserInfo` (interface)
|
|
2336
988
|
|
|
2337
989
|
```ts
|
|
@@ -2344,3 +996,20 @@ token: string
|
|
|
2344
996
|
username: string
|
|
2345
997
|
```
|
|
2346
998
|
|
|
999
|
+
## `WorkflowRunEntry` (type)
|
|
1000
|
+
|
|
1001
|
+
```ts
|
|
1002
|
+
export type WorkflowRunEntry =
|
|
1003
|
+
| { kind: "step"; stepId: string; desc: string; stepKind: string }
|
|
1004
|
+
| { kind: "log"; text: string }
|
|
1005
|
+
```
|
|
1006
|
+
|
|
1007
|
+
## `WorkflowRunState` (interface)
|
|
1008
|
+
|
|
1009
|
+
```ts
|
|
1010
|
+
entries: WorkflowRunEntry[]
|
|
1011
|
+
name: string
|
|
1012
|
+
status: "running" | "done" | "error" | "cancelled"
|
|
1013
|
+
toolCallId: string
|
|
1014
|
+
```
|
|
1015
|
+
|