@blade-hq/agent-react 2610.0.0-beta.8 → 2610.0.0-beta.80

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.
Files changed (70) hide show
  1. package/README.md +313 -8
  2. package/dist/chunk-G3PMV62Z.js +36 -0
  3. package/dist/components/AgentChat.d.ts +3 -0
  4. package/dist/components/AgentLoopBlock.d.ts +3 -5
  5. package/dist/components/AgentTaskCard.d.ts +12 -0
  6. package/dist/components/AskUserQuestionBlock.d.ts +12 -1
  7. package/dist/components/AssistantTurnBlock.d.ts +26 -8
  8. package/dist/components/ChatInput.d.ts +21 -1
  9. package/dist/components/ChatSurface.d.ts +133 -2
  10. package/dist/components/ChatView.d.ts +1 -1
  11. package/dist/components/ConnectorPanel.d.ts +41 -0
  12. package/dist/components/ContextCard.d.ts +20 -0
  13. package/dist/components/MarkdownContent.d.ts +17 -0
  14. package/dist/components/McpAppCard.d.ts +14 -0
  15. package/dist/components/MessageList.d.ts +38 -4
  16. package/dist/components/PlanUpdateBlock.d.ts +32 -0
  17. package/dist/components/PluginConnectorList.d.ts +47 -0
  18. package/dist/components/PluginTriggerStack.d.ts +22 -0
  19. package/dist/components/PostChatFollowupBlock.d.ts +5 -1
  20. package/dist/components/SessionMemoryToggle.d.ts +19 -0
  21. package/dist/components/SessionPluginConfigDialog.d.ts +10 -0
  22. package/dist/components/SessionPluginConfigForm.d.ts +14 -0
  23. package/dist/components/SessionPluginIcon.d.ts +30 -0
  24. package/dist/components/SessionPluginSelector.d.ts +10 -0
  25. package/dist/components/SessionQueuePanel.d.ts +74 -0
  26. package/dist/components/ToolCallBlock.d.ts +9 -3
  27. package/dist/components/ToolUiCardView.d.ts +9 -0
  28. package/dist/components/TurnNavRail.d.ts +23 -0
  29. package/dist/components/UserMessageBubble.d.ts +7 -3
  30. package/dist/components/WhatIfUserBubble.d.ts +7 -0
  31. package/dist/components/connector-panel-types.d.ts +37 -0
  32. package/dist/components/display-utils.d.ts +10 -0
  33. package/dist/components/markdown/heal-incomplete.d.ts +7 -0
  34. package/dist/components/markdown/incremental.d.ts +73 -0
  35. package/dist/components/markdown/index.d.ts +18 -0
  36. package/dist/components/markdown/parse.d.ts +19 -0
  37. package/dist/components/markdown/render.d.ts +79 -0
  38. package/dist/components/markdown/sanitize.d.ts +50 -0
  39. package/dist/components/markdown/types.d.ts +53 -0
  40. package/dist/components/plugin-config-draft.d.ts +13 -0
  41. package/dist/components/plugin-config-schema.d.ts +6 -0
  42. package/dist/components/plugin-connector.d.ts +40 -0
  43. package/dist/components/queue-panel-adjacency.d.ts +1 -0
  44. package/dist/components/use-session-plugin-activation.d.ts +40 -0
  45. package/dist/context.d.ts +1 -0
  46. package/dist/embed/blade-chat-element.d.ts +4 -3
  47. package/dist/embed/entry.d.ts +49 -0
  48. package/dist/hooks/use-agent-session.d.ts +5 -0
  49. package/dist/hooks/use-message-pin.d.ts +28 -0
  50. package/dist/hooks/use-turn-navigation.d.ts +117 -0
  51. package/dist/hooks/use-typewriter-reveal.d.ts +32 -0
  52. package/dist/index.d.ts +53 -1
  53. package/dist/index.js +58278 -2242
  54. package/dist/index.js.map +1 -1
  55. package/dist/lib/agent-computer-command.d.ts +34 -0
  56. package/dist/lib/random-id.d.ts +10 -0
  57. package/dist/lib/utils.d.ts +17 -2
  58. package/dist/lib/whatif-prompt.d.ts +18 -0
  59. package/dist/style.css +506 -401
  60. package/dist/style.full.css +517 -405
  61. package/dist/webapi-W3IB5DO4.js +2481 -0
  62. package/dist/webapi-W3IB5DO4.js.map +1 -0
  63. package/package.json +2 -2
  64. package/public-api.md +1749 -65
  65. package/dist/chunk-ZXXLY4RM.js +0 -28255
  66. package/dist/chunk-ZXXLY4RM.js.map +0 -1
  67. package/dist/highlighted-body-B3W2YXNL-YD7FAP6V.js +0 -27
  68. package/dist/highlighted-body-B3W2YXNL-YD7FAP6V.js.map +0 -1
  69. package/dist/mermaid-3ZIDBTTL-N7YKJ3SM.js +0 -8
  70. /package/dist/{mermaid-3ZIDBTTL-N7YKJ3SM.js.map → chunk-G3PMV62Z.js.map} +0 -0
package/public-api.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > 本文件由 `scripts/public-api-report.mjs` 生成,请勿手改。
4
4
  > 公共面变更时重新生成本报告,并同步更新 README 对应章节——CI 会校验两者。
5
5
 
6
- 171 个公开声明。
6
+ 372 个公开声明。
7
7
 
8
8
  ## `acceptedPostChatFollowupCompletesLatestRun` (function)
9
9
 
@@ -11,6 +11,34 @@
11
11
  acceptedPostChatFollowupCompletesLatestRun: (events: RawEvent[], updates: ProjectionUpdate[]) => boolean
12
12
  ```
13
13
 
14
+ ## `AccountComputer` (interface)
15
+
16
+ ```ts
17
+ arch: string | null | undefined
18
+ blade_home: string | null | undefined
19
+ created_at: string
20
+ daemon_version: string | null | undefined
21
+ hostname: string | null | undefined
22
+ id: string
23
+ label: string
24
+ last_seen_at: string | null | undefined
25
+ online: boolean
26
+ os: string | null | undefined
27
+ workspace: string | null | undefined
28
+ ```
29
+
30
+ ## `AccountComputerList` (interface)
31
+
32
+ ```ts
33
+ computers: AccountComputer[]
34
+ ```
35
+
36
+ ## `acknowledgeTurnEvents` (function)
37
+
38
+ ```ts
39
+ acknowledgeTurnEvents: (acknowledge?: () => void) => void
40
+ ```
41
+
14
42
  ## `ActiveCompactionState` (interface)
15
43
 
16
44
  ```ts
@@ -48,10 +76,17 @@ onSessionReady: ((session: AgentSession) => void) | undefined
48
76
  placeholder: string | undefined
49
77
  renderers: ChatViewRenderers | undefined
50
78
  sessionId: string | undefined
79
+ sessionPluginControls: ((sessionId: string) => ReactNode) | undefined
51
80
  slots: ChatViewSlots | undefined
52
81
  theme: "light" | "dark" | undefined
53
82
  ```
54
83
 
84
+ ## `AgentComputerLaunchOutcome` (type)
85
+
86
+ ```ts
87
+ export type AgentComputerLaunchOutcome = "pending" | "succeeded" | "failed" | "unknown"
88
+ ```
89
+
55
90
  ## `AgentLoopInfo` (interface)
56
91
 
57
92
  ```ts
@@ -63,26 +98,38 @@ toolCallId: string
63
98
  ## `AgentSession` (class)
64
99
 
65
100
  ```ts
66
- append: (text: string) => void
67
101
  attach: (label: string, data: unknown) => void
68
102
  attachApp: (options: AttachAppOptions) => Promise<AppCliAttachment | null>
103
+ cancelPendingLocate: () => void
104
+ cancelQueuedMessage: (itemId: string, expectedVersion?: number) => Promise<QueueOperationResult>
69
105
  compact: () => Promise<Record<string, unknown>>
70
106
  countFiles: (dirPath?: string) => Promise<number>
107
+ deliverQueuedMessage: (itemId: string, expectedVersion: number) => Promise<QueueOperationResult>
71
108
  dispose: () => void
72
109
  downloadFile: (filePath: string, downloadName?: string) => Promise<void>
73
110
  exitReplay: () => Promise<void>
74
111
  getState: () => SessionState
112
+ hasOlderHistory: boolean
75
113
  insertText: (text: string) => void
76
114
  isDisposed: boolean
115
+ isStatic: boolean
77
116
  listDir: (dirPath?: string) => Promise<FileEntry[]>
117
+ loadOlderHistory: (options?: { beforeCommit?: () => void; }) => Promise<void>
118
+ loadTurnIndex: () => Promise<SessionTurnIndexItem[]>
119
+ locateEntry: (entryId: string) => Promise<boolean>
78
120
  off: <K extends keyof AgentSessionEvents>(name: K, handler: (event: AgentSessionEvents[K]) => void) => void
79
121
  on: <K extends keyof AgentSessionEvents>(name: K, handler: (event: AgentSessionEvents[K]) => void) => () => void
80
122
  onCommand: (action: string, handler: CommandHandler) => () => void
123
+ queueMessage: (content: string) => Promise<QueueOperationResult>
124
+ refreshQueue: () => Promise<QueueOperationResult>
125
+ reorderQueuedMessages: (expectedRevision: number, orderedIds: string[]) => Promise<QueueOperationResult>
126
+ resumeQueue: () => Promise<QueueOperationResult>
81
127
  send: (content: MessageContent, options?: SendOptions) => Promise<boolean>
82
128
  sessionId: string
83
129
  setReplaySpeed: (speed: ReplaySpeed) => Promise<void>
84
130
  stop: () => Promise<Record<string, unknown>>
85
131
  subscribe: (listener: () => void) => () => void
132
+ updateQueuedMessage: (itemId: string, expectedVersion: number, content: string) => Promise<QueueOperationResult>
86
133
  ```
87
134
 
88
135
  ## `AgentSessionEventName` (type)
@@ -107,14 +154,43 @@ notification: { type: string; title: string; detail?: string; status: "info" | "
107
154
  replayMismatch: { actualMessage?: string; expectedMessage?: string; respond: (decision: "keep_replay" | "continue_replay") => void; }
108
155
  rewind: { checkpointId: string; }
109
156
  sandboxOom: { toolCallId: string; }
110
- sessionUpdated: { intent?: string; status?: SessionStatus; model?: string | null; boundSkillId?: string | null; replayState?: Record<string, unknown> | null; }
157
+ sessionUpdated: { workspacePath?: string; chatGroupId?: string | null; intent?: string; status?: SessionStatus; model?: string | null; boundSkillId?: string | null; replayState?: Record<string, unknown> | null; }
111
158
  taskListUpdated: { tasks: unknown[]; }
112
159
  toolCall: { toolCall: ToolCallInfo; turn: TurnProjection; }
113
- toolPreview: { toolCallId: string; type: "resource-html" | "resource-uri"; content: string; title: string; }
114
- toolResult: { toolCall: ToolCallInfo; turn: TurnProjection; }
160
+ toolPreview: { toolCallId: string; type: "resource-html" | "resource-uri"; content: string; title: string; mcpApp?: McpAppData; }
161
+ toolResult: { toolCall: ToolCallInfo; turn: TurnProjection; source: "live" | "bootstrap_replay" | "reconnect_replay"; }
115
162
  workspaceChanged: { filePath?: string; }
116
163
  ```
117
164
 
165
+ ## `AgentTaskCard` (function)
166
+
167
+ ```ts
168
+ AgentTaskCard: ({ title, status, activity, children, className, recordId }: AgentTaskCardProps) => JSX.Element
169
+ ```
170
+
171
+ ## `AgentTaskCardProps` (interface)
172
+
173
+ ```ts
174
+ activity: string | undefined
175
+ children: ReactNode
176
+ className: string | undefined
177
+ recordId: string | undefined
178
+ status: AgentTaskStatus
179
+ title: string
180
+ ```
181
+
182
+ ## `AgentTaskStatus` (type)
183
+
184
+ ```ts
185
+ export type AgentTaskStatus = "running" | "waiting_input" | "completed" | "failed" | "cancelled"
186
+ ```
187
+
188
+ ## `AllowedTags` (type)
189
+
190
+ ```ts
191
+ export type AllowedTags = Record<string, string[]>
192
+ ```
193
+
118
194
  ## `AppCliAttachment` (interface)
119
195
 
120
196
  ```ts
@@ -155,9 +231,28 @@ tool_name: string | null | undefined
155
231
 
156
232
  ```ts
157
233
  custom: Record<number, string>
234
+ note: string | undefined
158
235
  selections: Record<number, number[]>
159
236
  ```
160
237
 
238
+ ## `AskUserQuestionData` (interface)
239
+
240
+ ```ts
241
+ questions: QuestionItem[]
242
+ source_loop: SourceLoopInfo | null | undefined
243
+ ```
244
+
245
+ ## `AskUserQuestionRendererProps` (interface)
246
+
247
+ ```ts
248
+ answerData: AskUserAnswerData | undefined
249
+ answered: boolean
250
+ data: AskUserQuestionData
251
+ onAnswer: ((answer: string, toolCallId: string, answerData: AskUserAnswerData) => void) | undefined
252
+ sessionStatus: string
253
+ toolCallId: string
254
+ ```
255
+
161
256
  ## `AsrAudioPayload` (type)
162
257
 
163
258
  ```ts
@@ -167,6 +262,15 @@ export type AsrAudioPayload =
167
262
  | { pcm: ArrayBuffer | Uint8Array; request_id?: string }
168
263
  ```
169
264
 
265
+ ## `AssistantTextRendererProps` (interface)
266
+
267
+ ```ts
268
+ compact: boolean
269
+ message: ChatMessage
270
+ sessionId: string | undefined
271
+ streaming: boolean
272
+ ```
273
+
170
274
  ## `AttachAppOptions` (interface)
171
275
 
172
276
  ```ts
@@ -174,6 +278,20 @@ cli: AppCliDefinition | undefined
174
278
  getContext: () => Record<string, unknown> | Promise<Record<string, unknown>>
175
279
  ```
176
280
 
281
+ ## `AuthBusyReconnect` (class)
282
+
283
+ ```ts
284
+ cancel: () => void
285
+ pending: boolean
286
+ schedule: (error: unknown, reconnect: () => void) => boolean
287
+ ```
288
+
289
+ ## `authBusyRetryDelayMs` (function)
290
+
291
+ ```ts
292
+ authBusyRetryDelayMs: (error: unknown) => number | null
293
+ ```
294
+
177
295
  ## `AuthResource` (class)
178
296
 
179
297
  ```ts
@@ -239,6 +357,8 @@ statusText: string
239
357
  auth: AuthResource
240
358
  blob: (method: HttpMethod, path: string) => Promise<Blob>
241
359
  buildAuthedUrl: (path: string) => string
360
+ chatGroups: ChatGroupsResource
361
+ computers: ComputersResource
242
362
  fetch: (method: HttpMethod, path: string, init?: BladeFetchInit, isRetry?: boolean) => Promise<Response>
243
363
  formData: (method: HttpMethod, path: string, form: FormData, options?: { expectOk?: boolean; onUploadProgress?: (progress: UploadProgress) => void; }) => Promise<Response>
244
364
  hasToken: () => boolean
@@ -251,10 +371,12 @@ logoutToken: () => void
251
371
  models: ModelsResource
252
372
  onSocketReplaced: (listener: () => void) => () => void
253
373
  options: BladeClientOptions
374
+ plugins: PluginsResource
254
375
  responseFromInit: (path: string, init?: RequestInit) => Promise<Response>
255
376
  sessions: SessionsResource
256
377
  setBaseUrl: (baseUrl: string) => void
257
378
  setToken: (token: string | null) => void
379
+ siteVisits: SiteVisitsResource
258
380
  socket: () => TypedSocket
259
381
  text: (method: HttpMethod, path: string) => Promise<string>
260
382
  textFromInit: (path: string, init?: RequestInit) => Promise<string>
@@ -268,7 +390,6 @@ baseUrl: string
268
390
  fetchImpl: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined
269
391
  onRefreshSuccess: (() => void | Promise<void>) | undefined
270
392
  socketToken: string | (() => string | null | undefined) | undefined
271
- streamTokens: boolean | undefined
272
393
  token: string | (() => string | null | undefined) | undefined
273
394
  tokenStorage: TokenStorageMode | undefined
274
395
  ```
@@ -292,6 +413,42 @@ client: BladeClient
292
413
  buildMessageContent: (text: string, attachments: Array<{ kind: "file"; name: string; uploadedPath?: string; textContent?: string | null; mimeType?: string; }>) => MessageContent
293
414
  ```
294
415
 
416
+ ## `buildToolUiCardKey` (function)
417
+
418
+ ```ts
419
+ buildToolUiCardKey: (toolCallId: string, type: ToolUiCardContentType, content: string) => string
420
+ ```
421
+
422
+ ## `canCancelQueuedMessage` (function)
423
+
424
+ ```ts
425
+ canCancelQueuedMessage: (item: QueuedMessage) => boolean
426
+ ```
427
+
428
+ ## `canDeliverQueuedMessage` (function)
429
+
430
+ ```ts
431
+ canDeliverQueuedMessage: (item: QueuedMessage) => boolean
432
+ ```
433
+
434
+ ## `canEditQueuedMessage` (function)
435
+
436
+ ```ts
437
+ canEditQueuedMessage: (item: QueuedMessage) => boolean
438
+ ```
439
+
440
+ ## `canToggleComputer` (function)
441
+
442
+ ```ts
443
+ canToggleComputer: (computer: SessionComputer) => boolean
444
+ ```
445
+
446
+ ## `catalogToConnectorItems` (function)
447
+
448
+ ```ts
449
+ catalogToConnectorItems: (catalog: PluginCatalogEntry[]) => PluginConnectorItem[]
450
+ ```
451
+
295
452
  ## `ChatCompletionTool` (interface)
296
453
 
297
454
  ```ts
@@ -299,12 +456,47 @@ function: { name: string; description?: string; parameters?: Record<string, unkn
299
456
  type: "function"
300
457
  ```
301
458
 
459
+ ## `ChatEnd` (interface)
460
+
461
+ ```ts
462
+ duration_ms: number
463
+ status: string
464
+ ```
465
+
466
+ ## `chatErrorForDisplay` (function)
467
+
468
+ ```ts
469
+ chatErrorForDisplay: (message: string, developer?: boolean) => string
470
+ ```
471
+
472
+ ## `ChatGroup` (interface)
473
+
474
+ ```ts
475
+ created_at: string
476
+ id: string
477
+ instructions: string
478
+ name: string
479
+ session_count: number
480
+ updated_at: string
481
+ workspace_path: string
482
+ ```
483
+
484
+ ## `ChatGroupsResource` (class)
485
+
486
+ ```ts
487
+ create: (payload: { name: string; instructions?: string; }) => Promise<ChatGroup>
488
+ delete: (groupId: string, options?: { deleteWorkspace?: boolean; }) => Promise<{ deleted: boolean; deleted_sessions: number; }>
489
+ list: () => Promise<ChatGroup[]>
490
+ update: (groupId: string, payload: { name?: string; instructions?: string; }) => Promise<ChatGroup>
491
+ ```
492
+
302
493
  ## `ChatMessage` (interface)
303
494
 
304
495
  ```ts
305
496
  blocks: ContentBlock[] | undefined
306
497
  compaction: CompactionInfo | undefined
307
498
  content: MessageContent
499
+ context: ContextProjectionData | undefined
308
500
  duration_ms: number | undefined
309
501
  entry_id: string | undefined
310
502
  kind: string | undefined
@@ -328,10 +520,34 @@ ChatView: (props: ChatViewProps) => JSX.Element
328
520
  ## `ChatViewClassNames` (interface)
329
521
 
330
522
  ```ts
523
+ agentLoop: string | undefined
524
+ askCard: string | undefined
525
+ askOption: string | undefined
526
+ assistantText: string | undefined
527
+ assistantTurn: string | undefined
331
528
  banner: string | undefined
332
529
  chatInput: string | undefined
530
+ empty: string | undefined
531
+ errorBar: string | undefined
532
+ errorMessage: string | undefined
533
+ fileCard: string | undefined
534
+ followup: string | undefined
535
+ followupAction: string | undefined
536
+ inputInner: string | undefined
537
+ inputToolbar: string | undefined
538
+ memoryRefs: string | undefined
333
539
  messageList: string | undefined
540
+ messagesContent: string | undefined
541
+ messagesScroll: string | undefined
542
+ planPanel: string | undefined
543
+ queuePanel: string | undefined
334
544
  root: string | undefined
545
+ scrollToBottom: string | undefined
546
+ textarea: string | undefined
547
+ thinking: string | undefined
548
+ toolRow: string | undefined
549
+ userBubble: string | undefined
550
+ userMessage: string | undefined
335
551
  ```
336
552
 
337
553
  ## `ChatViewProps` (interface)
@@ -349,6 +565,7 @@ onSessionReady: ((session: AgentSession) => void) | undefined
349
565
  placeholder: string | undefined
350
566
  renderers: ChatViewRenderers | undefined
351
567
  sessionId: string | undefined
568
+ sessionPluginControls: ((sessionId: string) => ReactNode) | undefined
352
569
  slots: ChatViewSlots | undefined
353
570
  theme: "light" | "dark" | undefined
354
571
  ```
@@ -356,7 +573,11 @@ theme: "light" | "dark" | undefined
356
573
  ## `ChatViewRenderers` (interface)
357
574
 
358
575
  ```ts
576
+ askUserQuestion: ((props: AskUserQuestionRendererProps) => ReactNode | null) | undefined
577
+ assistantText: ((props: AssistantTextRendererProps) => ReactNode | null) | undefined
578
+ planUpdate: ((props: PlanUpdateRendererProps) => ReactNode | null) | undefined
359
579
  toolCall: ToolCallRenderer | undefined
580
+ userMessage: ((props: UserMessageRendererProps) => ReactNode | null) | undefined
360
581
  ```
361
582
 
362
583
  ## `ChatViewSlots` (interface)
@@ -367,6 +588,12 @@ footer: ReactNode
367
588
  header: ReactNode
368
589
  ```
369
590
 
591
+ ## `classifyAgentComputerLaunchOutcome` (function)
592
+
593
+ ```ts
594
+ classifyAgentComputerLaunchOutcome: (toolCall: { status?: string; result?: unknown; }) => AgentComputerLaunchOutcome
595
+ ```
596
+
370
597
  ## `ClientProjectionBuilder` (class)
371
598
 
372
599
  ```ts
@@ -376,6 +603,30 @@ reset: () => void
376
603
  seedSequence: (maxSeq: number) => void
377
604
  ```
378
605
 
606
+ ## `CodeBlockOverrides` (type)
607
+
608
+ ```ts
609
+ export type CodeBlockOverrides = Record<string, ComponentType<{ code: string }>>
610
+ ```
611
+
612
+ ## `collectInlineToolUiCards` (function)
613
+
614
+ ```ts
615
+ collectInlineToolUiCards: (messages: ChatMessage[]) => InlineToolUiCardEntry[]
616
+ ```
617
+
618
+ ## `collectMemoryRefs` (function)
619
+
620
+ ```ts
621
+ collectMemoryRefs: (messages: ChatMessage[]) => MemoryRefInfo[]
622
+ ```
623
+
624
+ ## `collectPreviewToolUiCards` (function)
625
+
626
+ ```ts
627
+ collectPreviewToolUiCards: (messages: ChatMessage[]) => PreviewToolUiCardEntry[]
628
+ ```
629
+
379
630
  ## `CommandEnvelope` (interface)
380
631
 
381
632
  ```ts
@@ -408,6 +659,57 @@ tokens_before: number | null | undefined
408
659
  trigger: "auto" | "manual" | "forced_retry" | null | undefined
409
660
  ```
410
661
 
662
+ ## `computerDaemonVersion` (function)
663
+
664
+ ```ts
665
+ computerDaemonVersion: (computer: SessionComputer) => string
666
+ ```
667
+
668
+ ## `computerOS` (function)
669
+
670
+ ```ts
671
+ computerOS: (computer: SessionComputer) => ComputerOS
672
+ ```
673
+
674
+ ## `ComputerOS` (type)
675
+
676
+ ```ts
677
+ export type ComputerOS = "macos" | "windows" | "linux" | "unknown"
678
+ ```
679
+
680
+ ## `computerPlatformLabel` (function)
681
+
682
+ ```ts
683
+ computerPlatformLabel: (computer: SessionComputer) => string
684
+ ```
685
+
686
+ ## `ComputersResource` (class)
687
+
688
+ ```ts
689
+ list: (sessionId: string) => Promise<SessionComputerList>
690
+ listAccount: () => Promise<AccountComputerList>
691
+ setEnabled: (sessionId: string, computer: string, enabled: boolean) => Promise<SessionComputer>
692
+ ```
693
+
694
+ ## `computerState` (function)
695
+
696
+ ```ts
697
+ computerState: (computer: SessionComputer) => ComputerState
698
+ ```
699
+
700
+ ## `ComputerState` (type)
701
+
702
+ ```ts
703
+ export type ComputerState = "primary" | "enabled" | "offline" | "idle"
704
+ ```
705
+
706
+ ## `ConfiguringPlugin` (interface)
707
+
708
+ ```ts
709
+ name: string
710
+ pendingActivation: boolean
711
+ ```
712
+
411
713
  ## `connectEmbedded` (function)
412
714
 
413
715
  ```ts
@@ -420,22 +722,141 @@ connectEmbedded: (options: EmbeddedChatOptions) => EmbeddedChat
420
722
  export type ConnectionStatus = "connecting" | "connected" | "reconnecting" | "disconnected"
421
723
  ```
422
724
 
725
+ ## `ConnectorPanel` (function)
726
+
727
+ ```ts
728
+ ConnectorPanel: ({ client, sessionId, pendingPlugins, onPendingPluginsChange, pendingDisabledReason, onPluginsChanged, onSelectedChange, renderComputerSection, renderExternalAccounts, renderFooterActions, className, }: ConnectorPanelProps) => JSX.Element
729
+ ```
730
+
731
+ ## `ConnectorPanelProps` (interface)
732
+
733
+ ```ts
734
+ className: string | undefined
735
+ client: BladeClient
736
+ onPendingPluginsChange: ((next: PluginConnectorSelection[]) => void) | undefined
737
+ onPluginsChanged: ((plugin: SessionPluginActivation) => void) | undefined
738
+ onSelectedChange: ((items: PluginConnectorItem[]) => void) | undefined
739
+ pendingDisabledReason: string | null | undefined
740
+ pendingPlugins: PluginConnectorSelection[] | undefined
741
+ renderComputerSection: ((query: string) => ReactNode) | undefined
742
+ renderExternalAccounts: ((query: string) => ReactNode) | undefined
743
+ renderFooterActions: (() => ReactNode) | undefined
744
+ sessionId: string | null
745
+ ```
746
+
423
747
  ## `ContentBlock` (interface)
424
748
 
425
749
  ```ts
426
750
  content: unknown
751
+ delivery_id: string | null | undefined
427
752
  display_name: string | null | undefined
428
753
  tool_call_id: string | null | undefined
429
754
  tool_name: string | null | undefined
430
755
  type: "text" | "thinking" | "tool_use" | "tool_result" | "tool_ui" | "tool_bridge" | "system_notification" | "mode_change" | "plan_status" | "ask_user_answer"
431
756
  ```
432
757
 
758
+ ## `ContentDelta` (interface)
759
+
760
+ ```ts
761
+ content: string
762
+ loop_name: string | undefined
763
+ ```
764
+
433
765
  ## `contentPreview` (function)
434
766
 
435
767
  ```ts
436
768
  contentPreview: (content: MessageContent, maxLen?: number) => string
437
769
  ```
438
770
 
771
+ ## `ContextAction` (type)
772
+
773
+ ```ts
774
+ export type ContextAction = "published" | "retained" | "removed"
775
+ ```
776
+
777
+ ## `ContextCard` (function)
778
+
779
+ ```ts
780
+ ContextCard: ({ context, className }: ContextCardProps) => JSX.Element
781
+ ```
782
+
783
+ ## `ContextCardProps` (interface)
784
+
785
+ ```ts
786
+ className: string | undefined
787
+ context: ContextProjectionData
788
+ ```
789
+
790
+ ## `ContextDisplayState` (interface)
791
+
792
+ ```ts
793
+ detail: string
794
+ isRemoved: boolean
795
+ summary: string
796
+ title: string
797
+ ```
798
+
799
+ ## `ContextGroupCard` (function)
800
+
801
+ ```ts
802
+ ContextGroupCard: ({ contexts, className }: ContextGroupCardProps) => JSX.Element | null
803
+ ```
804
+
805
+ ## `ContextGroupCardProps` (interface)
806
+
807
+ ```ts
808
+ className: string | undefined
809
+ contexts: readonly ContextProjectionData[]
810
+ ```
811
+
812
+ ## `ContextGroupDisplayState` (interface)
813
+
814
+ ```ts
815
+ count: number
816
+ summary: string
817
+ title: string
818
+ ```
819
+
820
+ ## `contextProjectionData` (function)
821
+
822
+ ```ts
823
+ contextProjectionData: (fields: ContextProjectionFields) => ContextProjectionData | null
824
+ ```
825
+
826
+ ## `ContextProjectionData` (interface)
827
+
828
+ ```ts
829
+ context_action: ContextAction
830
+ context_key: string
831
+ context_kind: string
832
+ context_name: string
833
+ context_order: number
834
+ context_revision: string
835
+ display_summary: string | null | undefined
836
+ display_title: string | null | undefined
837
+ sources: ContextSourceInfo[]
838
+ ```
839
+
840
+ ## `ContextProjectionFields` (interface)
841
+
842
+ ```ts
843
+ context_action: ContextAction | null | undefined
844
+ context_key: string | null | undefined
845
+ context_kind: string | null | undefined
846
+ context_name: string | null | undefined
847
+ context_order: number | null | undefined
848
+ context_revision: string | null | undefined
849
+ display_summary: string | null | undefined
850
+ display_title: string | null | undefined
851
+ sources: ContextSourceInfo[] | null | undefined
852
+ ```
853
+
854
+ ## `ContextSourceInfo` (type)
855
+
856
+ ```ts
857
+ export type ContextSourceInfo = Record<string, unknown>
858
+ ```
859
+
439
860
  ## `createInitialSessionState` (function)
440
861
 
441
862
  ```ts
@@ -445,7 +866,9 @@ createInitialSessionState: (sessionId: string) => SessionState
445
866
  ## `CreateSessionRequest` (interface)
446
867
 
447
868
  ```ts
869
+ agent_runtime_id: string | null | undefined
448
870
  biz_role_id: string | null | undefined
871
+ chat_group_id: string | null | undefined
449
872
  compaction_ratio: number | null | undefined
450
873
  daemon_id: string | null | undefined
451
874
  disable_tools: string[] | null | undefined
@@ -455,7 +878,7 @@ intent: string | undefined
455
878
  memory_enabled: boolean | null | undefined
456
879
  model: string | null | undefined
457
880
  primary_skill_id: string | null | undefined
458
- runtime_type: "sandbox" | "daemon" | null | undefined
881
+ runtime_type: "sandbox" | "daemon" | "native" | null | undefined
459
882
  session_solution_asset_id: string | null | undefined
460
883
  solution_id: string | undefined
461
884
  solution_ref: PublishedSolutionRef | undefined
@@ -477,6 +900,18 @@ path: string | undefined
477
900
  token: string | (() => string | null | undefined) | undefined
478
901
  ```
479
902
 
903
+ ## `CurrentPlanPanel` (function)
904
+
905
+ ```ts
906
+ CurrentPlanPanel: ({ messages, running, revealRevision, sessionId, className, }: { messages: ChatMessage[]; running?: boolean; revealRevision?: number; sessionId?: string; className?: string; }) => JSX.Element | null
907
+ ```
908
+
909
+ ## `DEFAULT_ALLOWED_TAGS` (const)
910
+
911
+ ```ts
912
+ DEFAULT_ALLOWED_TAGS: AllowedTags
913
+ ```
914
+
480
915
  ## `DEFAULT_REPLAY_SPEED` (const)
481
916
 
482
917
  ```ts
@@ -500,6 +935,18 @@ allowedOrigins: string[]
500
935
  iframe: HTMLIFrameElement | undefined
501
936
  ```
502
937
 
938
+ ## `EMPTY_PLATFORM_ENDPOINTS` (const)
939
+
940
+ ```ts
941
+ EMPTY_PLATFORM_ENDPOINTS: PlatformEndpoints
942
+ ```
943
+
944
+ ## `EMPTY_SESSION_QUEUE` (const)
945
+
946
+ ```ts
947
+ EMPTY_SESSION_QUEUE: SessionQueueSnapshot
948
+ ```
949
+
503
950
  ## `ExchangeCodeParams` (interface)
504
951
 
505
952
  ```ts
@@ -524,6 +971,12 @@ kind: "existing"
524
971
  solutionId: string
525
972
  ```
526
973
 
974
+ ## `ExternalAnchor` (function)
975
+
976
+ ```ts
977
+ ExternalAnchor: ({ children, href, ...props }: AnchorProps) => JSX.Element
978
+ ```
979
+
527
980
  ## `extractTextAttachments` (function)
528
981
 
529
982
  ```ts
@@ -548,6 +1001,12 @@ path: string
548
1001
  tags: string[] | undefined
549
1002
  ```
550
1003
 
1004
+ ## `filterConnectorItems` (function)
1005
+
1006
+ ```ts
1007
+ filterConnectorItems: (items: PluginConnectorItem[], query: string) => PluginConnectorItem[]
1008
+ ```
1009
+
551
1010
  ## `FinalArtifact` (interface)
552
1011
 
553
1012
  ```ts
@@ -601,6 +1060,18 @@ export type FollowupInteractionEvent =
601
1060
  artifactKind: "file"
602
1061
  ```
603
1062
 
1063
+ ## `getContextDisplayState` (function)
1064
+
1065
+ ```ts
1066
+ getContextDisplayState: (context: ContextProjectionData) => ContextDisplayState
1067
+ ```
1068
+
1069
+ ## `getContextGroupDisplayState` (function)
1070
+
1071
+ ```ts
1072
+ getContextGroupDisplayState: (contexts: readonly ContextProjectionData[]) => ContextGroupDisplayState
1073
+ ```
1074
+
604
1075
  ## `getFileParts` (function)
605
1076
 
606
1077
  ```ts
@@ -613,13 +1084,19 @@ getFileParts: (content: MessageContent) => FileContentPart[]
613
1084
  getImageParts: (content: MessageContent) => ImageUrlContentPart[]
614
1085
  ```
615
1086
 
616
- ## `getTextContent` (function)
1087
+ ## `getPlanUpdateDisplayState` (function)
617
1088
 
618
1089
  ```ts
619
- getTextContent: (content: MessageContent) => string
1090
+ getPlanUpdateDisplayState: (messages: ChatMessage[]) => PlanUpdateDisplayState
620
1091
  ```
621
1092
 
622
- ## `GlobalSearchConversationResult` (interface)
1093
+ ## `getTextContent` (function)
1094
+
1095
+ ```ts
1096
+ getTextContent: (content: MessageContent) => string
1097
+ ```
1098
+
1099
+ ## `GlobalSearchConversationResult` (interface)
623
1100
 
624
1101
  ```ts
625
1102
  matched: "title" | "content"
@@ -655,12 +1132,24 @@ export type GlobalSearchResultItem =
655
1132
  | GlobalSearchFileResult
656
1133
  ```
657
1134
 
1135
+ ## `groupAdjacentContextRuns` (function)
1136
+
1137
+ ```ts
1138
+ groupAdjacentContextRuns: (kinds: readonly (string | null)[]) => readonly (readonly number[])[]
1139
+ ```
1140
+
658
1141
  ## `groupMessagesByLoop` (function)
659
1142
 
660
1143
  ```ts
661
1144
  groupMessagesByLoop: (messages: ChatMessage[]) => MessageGroup[]
662
1145
  ```
663
1146
 
1147
+ ## `hasChatRunEvent` (function)
1148
+
1149
+ ```ts
1150
+ hasChatRunEvent: (events: RawEvent[]) => boolean
1151
+ ```
1152
+
664
1153
  ## `HeadlessResource` (class)
665
1154
 
666
1155
  ```ts
@@ -669,6 +1158,15 @@ runInSession: { <T = unknown>(sessionId: string, prompt: string, options: Headle
669
1158
  runWithSession: { <T = unknown>(prompt: string, options: HeadlessRunOptions & { schema: JsonSchemaObject; }): Promise<HeadlessRunInSessionResult<T>>; (prompt: string, options?: HeadlessRunOptions): Promise<HeadlessRunInSessionResult<string>>; }
670
1159
  ```
671
1160
 
1161
+ ## `HistoricalCommand` (interface)
1162
+
1163
+ ```ts
1164
+ action: string
1165
+ deliveryId: string
1166
+ payload: unknown
1167
+ toolCallId: string | undefined
1168
+ ```
1169
+
672
1170
  ## `ImageUrlContentPart` (interface)
673
1171
 
674
1172
  ```ts
@@ -697,16 +1195,54 @@ direction: "host-to-agent"
697
1195
  payload: unknown
698
1196
  ```
699
1197
 
1198
+ ## `inferToolStatus` (function)
1199
+
1200
+ ```ts
1201
+ inferToolStatus: (resultStr: string) => "done" | "error" | "cancelled"
1202
+ ```
1203
+
1204
+ ## `InlineToolUiCardEntry` (interface)
1205
+
1206
+ ```ts
1207
+ card: ToolUiCard
1208
+ key: string
1209
+ toolCallId: string
1210
+ ```
1211
+
1212
+ ## `isAgentComputerCommand` (function)
1213
+
1214
+ ```ts
1215
+ isAgentComputerCommand: (command: string) => boolean
1216
+ ```
1217
+
1218
+ ## `isAgentComputerToolCall` (function)
1219
+
1220
+ ```ts
1221
+ isAgentComputerToolCall: (argumentsJson: string | null | undefined) => boolean
1222
+ ```
1223
+
1224
+ ## `isAppDevToolUiCard` (function)
1225
+
1226
+ ```ts
1227
+ isAppDevToolUiCard: (card: ToolUiCard, isAppDev: boolean) => boolean
1228
+ ```
1229
+
700
1230
  ## `isCommandEnvelope` (function)
701
1231
 
702
1232
  ```ts
703
1233
  isCommandEnvelope: (value: unknown) => value is CommandEnvelope
704
1234
  ```
705
1235
 
1236
+ ## `isEntryGoneError` (function)
1237
+
1238
+ ```ts
1239
+ isEntryGoneError: (error: unknown) => boolean
1240
+ ```
1241
+
706
1242
  ## `isHiddenInternalMessage` (function)
707
1243
 
708
1244
  ```ts
709
- isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content">) => boolean
1245
+ isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content">, options?: { includeLegacyForkContext?: boolean; }) => boolean
710
1246
  ```
711
1247
 
712
1248
  ## `isInboundEnvelope` (function)
@@ -715,12 +1251,54 @@ isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content">) => boo
715
1251
  isInboundEnvelope: (value: unknown) => value is InboundEnvelope
716
1252
  ```
717
1253
 
1254
+ ## `isInternalStatusToolUiCard` (function)
1255
+
1256
+ ```ts
1257
+ isInternalStatusToolUiCard: (card: { title?: string | null; } | null) => boolean
1258
+ ```
1259
+
1260
+ ## `isMcpAppData` (function)
1261
+
1262
+ ```ts
1263
+ isMcpAppData: (value: unknown) => value is McpAppData
1264
+ ```
1265
+
1266
+ ## `isPlanUpdateTool` (function)
1267
+
1268
+ ```ts
1269
+ isPlanUpdateTool: (toolCall: Pick<ToolCallInfo, "name">) => boolean
1270
+ ```
1271
+
1272
+ ## `isQueuePanelVisible` (function)
1273
+
1274
+ ```ts
1275
+ isQueuePanelVisible: (snapshot: Pick<SessionQueueSnapshot, "items" | "paused">, notice: string | null | undefined, editing?: boolean) => boolean
1276
+ ```
1277
+
1278
+ ## `isSessionQueueSnapshot` (function)
1279
+
1280
+ ```ts
1281
+ isSessionQueueSnapshot: (value: unknown) => value is SessionQueueSnapshot
1282
+ ```
1283
+
1284
+ ## `isToolUiCard` (function)
1285
+
1286
+ ```ts
1287
+ isToolUiCard: (value: unknown) => value is ToolUiCard
1288
+ ```
1289
+
718
1290
  ## `latestPostChatFollowup` (function)
719
1291
 
720
1292
  ```ts
721
1293
  latestPostChatFollowup: (turns: TurnProjection[]) => PostChatFollowup | null
722
1294
  ```
723
1295
 
1296
+ ## `latestUserSpeechEntryId` (function)
1297
+
1298
+ ```ts
1299
+ latestUserSpeechEntryId: (turns: TurnProjection[]) => string | null
1300
+ ```
1301
+
724
1302
  ## `LayoutType` (enum)
725
1303
 
726
1304
  ```ts
@@ -737,6 +1315,21 @@ export enum LayoutType {
737
1315
  }
738
1316
  ```
739
1317
 
1318
+ ## `LinkSafetyConfig` (interface)
1319
+
1320
+ ```ts
1321
+ enabled: boolean
1322
+ onLinkCheck: ((url: string) => Promise<boolean> | boolean) | undefined
1323
+ renderModal: ((props: { isOpen: boolean; onClose: () => void; onConfirm: () => void; url: string; }) => ReactNode) | undefined
1324
+ ```
1325
+
1326
+ ## `LiveRevisionState` (interface)
1327
+
1328
+ ```ts
1329
+ byTurnId: ReadonlyMap<string, number>
1330
+ current: number
1331
+ ```
1332
+
740
1333
  ## `LlmAdvancedSettings` (interface)
741
1334
 
742
1335
  ```ts
@@ -811,6 +1404,16 @@ baseURL: string | undefined
811
1404
  model: string | undefined
812
1405
  ```
813
1406
 
1407
+ ## `LlmResponseDone` (interface)
1408
+
1409
+ ```ts
1410
+ content: string | null | undefined
1411
+ loop_name: string | undefined
1412
+ reasoning: string | null | undefined
1413
+ role: string
1414
+ tool_calls: { id: string; function: { name: string; arguments: string; }; }[] | undefined
1415
+ ```
1416
+
814
1417
  ## `LlmToolCall` (interface)
815
1418
 
816
1419
  ```ts
@@ -819,6 +1422,20 @@ id: string
819
1422
  name: string
820
1423
  ```
821
1424
 
1425
+ ## `loadPlatformEndpoints` (function)
1426
+
1427
+ ```ts
1428
+ loadPlatformEndpoints: (options?: LoadPlatformEndpointsOptions) => Promise<PlatformEndpoints>
1429
+ ```
1430
+
1431
+ ## `LoadPlatformEndpointsOptions` (interface)
1432
+
1433
+ ```ts
1434
+ baseUrl: string | undefined
1435
+ fetchImpl: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined
1436
+ timeoutMs: number | undefined
1437
+ ```
1438
+
822
1439
  ## `LoginOptions` (interface)
823
1440
 
824
1441
  ```ts
@@ -834,6 +1451,16 @@ token: string
834
1451
  user: { id?: string; username?: string; display_name?: string; } | undefined
835
1452
  ```
836
1453
 
1454
+ ## `MarkdownComponents` (type)
1455
+
1456
+ ```ts
1457
+ export type MarkdownComponents = {
1458
+ [Key in keyof JSX.IntrinsicElements]?: ComponentType<JSX.IntrinsicElements[Key]>
1459
+ } & {
1460
+ [tagName: string]: ComponentType<Record<string, unknown>> | undefined
1461
+ }
1462
+ ```
1463
+
837
1464
  ## `MarkdownContent` (function)
838
1465
 
839
1466
  ```ts
@@ -849,6 +1476,84 @@ mode: "streaming" | "static" | undefined
849
1476
  sessionId: string | undefined
850
1477
  ```
851
1478
 
1479
+ ## `MarkdownRenderer` (function)
1480
+
1481
+ ```ts
1482
+ MarkdownRenderer: ({ children, className, mode, allowedTags, components, rawHtmlPlugins, codeBlockOverrides, }: MarkdownRendererProps) => DetailedReactHTMLElement<{ className: string; }, HTMLElement>
1483
+ ```
1484
+
1485
+ ## `MarkdownRendererProps` (interface)
1486
+
1487
+ ```ts
1488
+ allowedTags: AllowedTags | undefined
1489
+ children: string
1490
+ className: string | undefined
1491
+ codeBlockOverrides: CodeBlockOverrides | undefined
1492
+ components: MarkdownComponents | undefined
1493
+ linkSafety: LinkSafetyConfig | undefined
1494
+ mode: "streaming" | "static" | undefined
1495
+ rawHtmlPlugins: RawHtmlPlugin[] | undefined
1496
+ sessionId: string | undefined
1497
+ ```
1498
+
1499
+ ## `McpAppArchive` (interface)
1500
+
1501
+ ```ts
1502
+ html: string
1503
+ mimeType: string
1504
+ plugin: string
1505
+ previousToolInput: Record<string, unknown> | undefined
1506
+ previousToolResult: Record<string, unknown> | undefined
1507
+ resourceMeta: Record<string, unknown>
1508
+ resourceUri: string
1509
+ sourceId: string
1510
+ toolInput: Record<string, unknown>
1511
+ toolResult: Record<string, unknown>
1512
+ ```
1513
+
1514
+ ## `McpAppCard` (function)
1515
+
1516
+ ```ts
1517
+ McpAppCard: ({ sessionId, sourceId, client: suppliedClient, onMessage: suppliedOnMessage }: { sessionId: string; sourceId: string; client?: BladeClient; onMessage?: (message: McpAppMessage) => void; }) => JSX.Element
1518
+ ```
1519
+
1520
+ ## `McpAppContextState` (interface)
1521
+
1522
+ ```ts
1523
+ content: string
1524
+ plugin: string | null
1525
+ revision: string
1526
+ server_alias: string | null
1527
+ ```
1528
+
1529
+ ## `McpAppContextUpdate` (interface)
1530
+
1531
+ ```ts
1532
+ content: string
1533
+ expected_revision: string | null
1534
+ request_id: string
1535
+ ```
1536
+
1537
+ ## `McpAppData` (interface)
1538
+
1539
+ ```ts
1540
+ mimeType: string
1541
+ resourceMeta: Record<string, unknown>
1542
+ resourceUri: string
1543
+ sourceId: string
1544
+ toolInput: Record<string, unknown>
1545
+ toolResult: Record<string, unknown>
1546
+ ```
1547
+
1548
+ ## `McpAppMessage` (interface)
1549
+
1550
+ ```ts
1551
+ content: string
1552
+ label: string
1553
+ sessionId: string
1554
+ sourceId: string
1555
+ ```
1556
+
852
1557
  ## `MemoryRef` (interface)
853
1558
 
854
1559
  ```ts
@@ -865,6 +1570,18 @@ id: number
865
1570
  skill_name: string | null | undefined
866
1571
  ```
867
1572
 
1573
+ ## `MemoryRefsHint` (function)
1574
+
1575
+ ```ts
1576
+ MemoryRefsHint: ({ refs, className }: { refs: MemoryRefInfo[]; className?: string; }) => JSX.Element
1577
+ ```
1578
+
1579
+ ## `mergeConnectorItems` (function)
1580
+
1581
+ ```ts
1582
+ mergeConnectorItems: (sessionPlugins: SessionPlugin[], catalog: PluginCatalogEntry[] | null) => PluginConnectorItem[]
1583
+ ```
1584
+
868
1585
  ## `MessageContent` (type)
869
1586
 
870
1587
  ```ts
@@ -890,6 +1607,8 @@ baseUrl: string | undefined
890
1607
  default: string
891
1608
  defaultServiceModel: string | undefined
892
1609
  models: ModelOption[]
1610
+ unavailableModelIds: string[] | undefined
1611
+ unavailableProviderIds: string[] | undefined
893
1612
  ```
894
1613
 
895
1614
  ## `ModelOption` (interface)
@@ -906,6 +1625,12 @@ serviceModelId: string | undefined
906
1625
  list: () => Promise<ModelCatalog>
907
1626
  ```
908
1627
 
1628
+ ## `normalizeAdjacentUrlFormatting` (function)
1629
+
1630
+ ```ts
1631
+ normalizeAdjacentUrlFormatting: (value: string) => string
1632
+ ```
1633
+
909
1634
  ## `normalizeMessageContent` (function)
910
1635
 
911
1636
  ```ts
@@ -936,6 +1661,32 @@ content: string
936
1661
  label: string
937
1662
  ```
938
1663
 
1664
+ ## `ParsedWhatIfPrompt` (interface)
1665
+
1666
+ ```ts
1667
+ fromStep: number | null
1668
+ quotes: WhatIfQuote[]
1669
+ userText: string
1670
+ ```
1671
+
1672
+ ## `parsePlanUpdate` (function)
1673
+
1674
+ ```ts
1675
+ parsePlanUpdate: (argumentsJson: string) => PlanUpdateData | null
1676
+ ```
1677
+
1678
+ ## `parseQueueAck` (function)
1679
+
1680
+ ```ts
1681
+ parseQueueAck: (response: unknown, fallbackSessionId: string) => QueueOperationResult
1682
+ ```
1683
+
1684
+ ## `parseWhatIfPrompt` (function)
1685
+
1686
+ ```ts
1687
+ parseWhatIfPrompt: (text: string) => ParsedWhatIfPrompt | null
1688
+ ```
1689
+
939
1690
  ## `PatchEnvelope` (interface)
940
1691
 
941
1692
  ```ts
@@ -946,6 +1697,162 @@ sequence: number
946
1697
  turn_id: string
947
1698
  ```
948
1699
 
1700
+ ## `PendingQuestionRef` (interface)
1701
+
1702
+ ```ts
1703
+ child_loop_name: string
1704
+ child_tool_call_id: string
1705
+ description: string | null | undefined
1706
+ ```
1707
+
1708
+ ## `pickCurrentPlanStep` (function)
1709
+
1710
+ ```ts
1711
+ pickCurrentPlanStep: (plan: PlanUpdateData["plan"]) => PlanUpdateData["plan"][number] | null
1712
+ ```
1713
+
1714
+ ## `PLAN_AUTO_COLLAPSE_MS` (const)
1715
+
1716
+ ```ts
1717
+ PLAN_AUTO_COLLAPSE_MS: 5000
1718
+ ```
1719
+
1720
+ ## `PlanStepStatus` (type)
1721
+
1722
+ ```ts
1723
+ export type PlanStepStatus = "pending" | "in_progress" | "completed"
1724
+ ```
1725
+
1726
+ ## `PlanUpdateBlock` (function)
1727
+
1728
+ ```ts
1729
+ PlanUpdateBlock: ({ toolCall, running, autoReveal, className, }: { toolCall: ToolCallInfo; running?: boolean; autoReveal?: boolean; className?: string; }) => JSX.Element | null
1730
+ ```
1731
+
1732
+ ## `PlanUpdateData` (interface)
1733
+
1734
+ ```ts
1735
+ plan: { step: string; status: PlanStepStatus; }[]
1736
+ ```
1737
+
1738
+ ## `PlanUpdateDisplayState` (interface)
1739
+
1740
+ ```ts
1741
+ current: ToolCallInfo | null
1742
+ updating: boolean
1743
+ ```
1744
+
1745
+ ## `PlanUpdateRendererProps` (interface)
1746
+
1747
+ ```ts
1748
+ plan: PlanUpdateData
1749
+ running: boolean
1750
+ sessionId: string | undefined
1751
+ ```
1752
+
1753
+ ## `PlatformEndpoints` (interface)
1754
+
1755
+ ```ts
1756
+ services: Partial<Record<"agent" | "os" | "hub" | "oauth" | "llmGateway" | "gitea" | "tile", string>>
1757
+ ```
1758
+
1759
+ ## `PlatformServiceName` (type)
1760
+
1761
+ ```ts
1762
+ export type PlatformServiceName = (typeof PLATFORM_SERVICE_NAMES)[number]
1763
+ ```
1764
+
1765
+ ## `PluginCatalogEntry` (interface)
1766
+
1767
+ ```ts
1768
+ display_name: string | null
1769
+ icon: string | null
1770
+ installed: boolean
1771
+ name: string
1772
+ ```
1773
+
1774
+ ## `PluginConnectorItem` (interface)
1775
+
1776
+ ```ts
1777
+ active: boolean
1778
+ config: SessionPluginConfigSummary | undefined
1779
+ display_name: string | null
1780
+ icon: string | null
1781
+ iconSource: "account" | "session"
1782
+ installed: boolean | null
1783
+ name: string
1784
+ projected: boolean
1785
+ reason: string | null | undefined
1786
+ status: string
1787
+ ```
1788
+
1789
+ ## `PluginConnectorList` (function)
1790
+
1791
+ ```ts
1792
+ PluginConnectorList: ({ client, sessionId, items, inFlight, busy, mutationError, onToggle, onRetry, onEditConfig, configuring, onConfigSaved, onConfigClose, disabledReason, unavailableText, emptyText, draft, }: PluginConnectorListProps) => JSX.Element
1793
+ ```
1794
+
1795
+ ## `PluginConnectorListProps` (interface)
1796
+
1797
+ ```ts
1798
+ busy: boolean
1799
+ client: BladeClient
1800
+ configuring: ConfiguringPlugin | null
1801
+ disabledReason: string | null | undefined
1802
+ draft: boolean | undefined
1803
+ emptyText: string
1804
+ inFlight: Record<string, true>
1805
+ items: PluginConnectorItem[]
1806
+ mutationError: boolean
1807
+ onConfigClose: () => void
1808
+ onConfigSaved: (state: SessionPluginConfigState) => void
1809
+ onEditConfig: (item: PluginConnectorItem) => void
1810
+ onRetry: (item: PluginConnectorItem) => void
1811
+ onToggle: (item: PluginConnectorItem, next: boolean) => void
1812
+ sessionId: string | null
1813
+ unavailableText: string | null | undefined
1814
+ ```
1815
+
1816
+ ## `PluginConnectorSelection` (interface)
1817
+
1818
+ ```ts
1819
+ displayName: string | null
1820
+ icon: string | null
1821
+ iconSource: "account" | "session"
1822
+ name: string
1823
+ ```
1824
+
1825
+ ## `PluginsResource` (class)
1826
+
1827
+ ```ts
1828
+ catalog: (init?: RequestInit) => Promise<{ plugins: PluginCatalogEntry[]; }>
1829
+ fetchIcon: (name: string) => Promise<Blob>
1830
+ iconUrl: (name: string) => string
1831
+ ```
1832
+
1833
+ ## `PluginTriggerStack` (function)
1834
+
1835
+ ```ts
1836
+ PluginTriggerStack: ({ client, sessionId, summary, className }: PluginTriggerStackProps) => JSX.Element | null
1837
+ ```
1838
+
1839
+ ## `PluginTriggerStackProps` (interface)
1840
+
1841
+ ```ts
1842
+ className: string | undefined
1843
+ client: BladeClient
1844
+ sessionId: string | null
1845
+ summary: TriggerSummary
1846
+ ```
1847
+
1848
+ ## `PollingBackoff` (class)
1849
+
1850
+ ```ts
1851
+ failed: (error: unknown) => void
1852
+ reset: () => void
1853
+ waitMs: () => number | false
1854
+ ```
1855
+
949
1856
  ## `PostChatFollowup` (interface)
950
1857
 
951
1858
  ```ts
@@ -976,6 +1883,21 @@ bizRoleId: string | undefined
976
1883
  kind: "prepared"
977
1884
  ```
978
1885
 
1886
+ ## `prependOlder` (function)
1887
+
1888
+ ```ts
1889
+ prependOlder: (current: TurnProjection[], page: TurnProjection[]) => TurnProjection[]
1890
+ ```
1891
+
1892
+ ## `PreviewToolUiCardEntry` (interface)
1893
+
1894
+ ```ts
1895
+ blocks: ContentBlock[]
1896
+ card: ToolUiCard
1897
+ key: string
1898
+ toolCall: ToolCallInfo
1899
+ ```
1900
+
979
1901
  ## `PrimarySkillParallelMode` (interface)
980
1902
 
981
1903
  ```ts
@@ -996,6 +1918,21 @@ title: string
996
1918
  version: number
997
1919
  ```
998
1920
 
1921
+ ## `PrimarySkillStageSpec` (interface)
1922
+
1923
+ ```ts
1924
+ id: string
1925
+ name: string
1926
+ steps: PrimarySkillStepSpec[]
1927
+ ```
1928
+
1929
+ ## `PrimarySkillStepSpec` (interface)
1930
+
1931
+ ```ts
1932
+ label: string
1933
+ n: number
1934
+ ```
1935
+
999
1936
  ## `ProvidersResponse` (interface)
1000
1937
 
1001
1938
  ```ts
@@ -1011,6 +1948,60 @@ export type PublishedSolutionRef =
1011
1948
  | { source: "hub"; org: string; name: string }
1012
1949
  ```
1013
1950
 
1951
+ ## `QueueAck` (interface)
1952
+
1953
+ ```ts
1954
+ items: QueuedMessage[] | undefined
1955
+ message: string | null | undefined
1956
+ pause_reason: string | null | undefined
1957
+ paused: boolean | undefined
1958
+ revision: number | undefined
1959
+ running: boolean | undefined
1960
+ session_id: string | undefined
1961
+ status: "error" | "ok" | "conflict" | "queued"
1962
+ ```
1963
+
1964
+ ## `QueuedMessage` (interface)
1965
+
1966
+ ```ts
1967
+ content: string
1968
+ created_at: string
1969
+ error: string | undefined
1970
+ id: string
1971
+ position: number
1972
+ status: QueuedMessageStatus
1973
+ target_run_id: string | undefined
1974
+ updated_at: string
1975
+ version: number
1976
+ ```
1977
+
1978
+ ## `QueuedMessageStatus` (type)
1979
+
1980
+ ```ts
1981
+ export type QueuedMessageStatus = "pending" | "delivering" | "claimed" | "consumed" | "cancelled"
1982
+ ```
1983
+
1984
+ ## `queuedMessageStatusLabel` (function)
1985
+
1986
+ ```ts
1987
+ queuedMessageStatusLabel: (status: QueuedMessageStatus) => string
1988
+ ```
1989
+
1990
+ ## `QueueOperationResult` (interface)
1991
+
1992
+ ```ts
1993
+ conflict: boolean
1994
+ message: string | null
1995
+ ok: boolean
1996
+ snapshot: SessionQueueSnapshot | null
1997
+ ```
1998
+
1999
+ ## `queuePauseReasonLabel` (function)
2000
+
2001
+ ```ts
2002
+ queuePauseReasonLabel: (reason: string | null | undefined) => string | null
2003
+ ```
2004
+
1014
2005
  ## `RawEvent` (interface)
1015
2006
 
1016
2007
  ```ts
@@ -1018,12 +2009,33 @@ payload: Record<string, unknown>
1018
2009
  type: string
1019
2010
  ```
1020
2011
 
2012
+ ## `RawHtmlPlugin` (type)
2013
+
2014
+ ```ts
2015
+ export type RawHtmlPlugin = (
2016
+ tagName: string,
2017
+ attributes: Record<string, string>,
2018
+ ) => Record<string, string>
2019
+ ```
2020
+
2021
+ ## `reconcileHistoricalUserTurns` (function)
2022
+
2023
+ ```ts
2024
+ reconcileHistoricalUserTurns: (currentTurns: TurnProjection[], incomingTurns: TurnProjection[]) => TurnProjection[]
2025
+ ```
2026
+
1021
2027
  ## `reconcileOptimisticUserTurns` (function)
1022
2028
 
1023
2029
  ```ts
1024
2030
  reconcileOptimisticUserTurns: (currentTurns: TurnProjection[], incomingTurns: TurnProjection[]) => TurnProjection[]
1025
2031
  ```
1026
2032
 
2033
+ ## `replaceWindow` (function)
2034
+
2035
+ ```ts
2036
+ replaceWindow: (current: TurnProjection[], page: TurnProjection[], liveRevisionAtStart: number, liveRevisions: LiveRevisionState) => TurnProjection[]
2037
+ ```
2038
+
1027
2039
  ## `ReplayBar` (function)
1028
2040
 
1029
2041
  ```ts
@@ -1096,6 +2108,18 @@ speed: ReplaySpeed | undefined
1096
2108
  status: "replay" | "autonomous" | undefined
1097
2109
  ```
1098
2110
 
2111
+ ## `resolveServiceUrl` (function)
2112
+
2113
+ ```ts
2114
+ resolveServiceUrl: (endpoints: PlatformEndpoints, name: PlatformServiceName, path?: string) => string | null
2115
+ ```
2116
+
2117
+ ## `resolveToolUiCardContent` (function)
2118
+
2119
+ ```ts
2120
+ resolveToolUiCardContent: (card: ToolUiCard) => { type: ToolUiCardContentType; content: string; } | null
2121
+ ```
2122
+
1099
2123
  ## `ResultFeedback` (interface)
1100
2124
 
1101
2125
  ```ts
@@ -1142,6 +2166,17 @@ result: unknown
1142
2166
  sessionId: string
1143
2167
  ```
1144
2168
 
2169
+ ## `RunTiming` (interface)
2170
+
2171
+ ```ts
2172
+ duration_ms: number | null | undefined
2173
+ loop_id: string
2174
+ run_id: string
2175
+ scope: "chat" | "subagent"
2176
+ started_at: string | null | undefined
2177
+ status: "completed" | "paused" | "failed" | "cancelled" | "incomplete"
2178
+ ```
2179
+
1145
2180
  ## `RunTrace` (interface)
1146
2181
 
1147
2182
  ```ts
@@ -1163,17 +2198,52 @@ SDK_NAME: "agent-client"
1163
2198
  SDK_VERSION: string
1164
2199
  ```
1165
2200
 
2201
+ ## `selectionFromItem` (function)
2202
+
2203
+ ```ts
2204
+ selectionFromItem: (item: PluginConnectorItem) => PluginConnectorSelection
2205
+ ```
2206
+
1166
2207
  ## `SendOptions` (interface)
1167
2208
 
1168
2209
  ```ts
1169
2210
  askUserAnswer: Record<string, unknown> | undefined
2211
+ kbIds: number[] | undefined
1170
2212
  mode: string | undefined
1171
2213
  model: string | undefined
2214
+ queueWhenRunning: boolean | undefined
1172
2215
  replayDecision: "keep_replay" | "continue_replay" | undefined
1173
2216
  thinkingOverride: boolean | undefined
1174
2217
  whatif: { from_step: number; quotes: Array<Record<string, unknown>>; deprecate_entry_ids: string[]; } | undefined
1175
2218
  ```
1176
2219
 
2220
+ ## `SessionComputer` (interface)
2221
+
2222
+ ```ts
2223
+ agent_runtimes: unknown[] | undefined
2224
+ allowed_paths: string[] | undefined
2225
+ arch: string | null | undefined
2226
+ blade_home: string | null | undefined
2227
+ created_at: string
2228
+ daemon_version: string | null | undefined
2229
+ enabled: boolean
2230
+ home: string | null | undefined
2231
+ hostname: string | null | undefined
2232
+ id: string
2233
+ is_primary: boolean
2234
+ label: string
2235
+ last_seen_at: string | null | undefined
2236
+ online: boolean
2237
+ os: string | null | undefined
2238
+ workspace: string | null | undefined
2239
+ ```
2240
+
2241
+ ## `SessionComputerList` (interface)
2242
+
2243
+ ```ts
2244
+ computers: SessionComputer[]
2245
+ ```
2246
+
1177
2247
  ## `SessionConfig` (interface)
1178
2248
 
1179
2249
  ```ts
@@ -1185,6 +2255,12 @@ memoryEnabled: boolean | undefined
1185
2255
  model: string | undefined
1186
2256
  ```
1187
2257
 
2258
+ ## `SessionConnectOptions` (interface)
2259
+
2260
+ ```ts
2261
+ setup: ((session: AgentSession) => void) | undefined
2262
+ ```
2263
+
1188
2264
  ## `SessionContextStats` (interface)
1189
2265
 
1190
2266
  ```ts
@@ -1205,14 +2281,18 @@ solution: SolutionDefinition | undefined
1205
2281
  ## `SessionDetail` (interface)
1206
2282
 
1207
2283
  ```ts
2284
+ agent_runtime_id: string | null | undefined
2285
+ ba_version: string | null | undefined
1208
2286
  biz_role_id: string | null | undefined
1209
2287
  bound_skill_id: string | null | undefined
2288
+ chat_group_id: string | null | undefined
1210
2289
  created_at: string
1211
2290
  daemon_id: string | null | undefined
1212
2291
  disable_tools: (string[] & string[]) | undefined
1213
2292
  enable_thinking: boolean | null | undefined
1214
2293
  env: Record<string, string> | undefined
1215
2294
  id: string
2295
+ initiator: "unknown" | "ui" | "sdk" | null | undefined
1216
2296
  intent: string
1217
2297
  is_example: boolean | undefined
1218
2298
  is_headless: boolean | undefined
@@ -1229,6 +2309,7 @@ primary_skill_id: string | null | undefined
1229
2309
  primary_skill_snapshot: PrimarySkillSnapshot | null | undefined
1230
2310
  replay_state: ReplayState | null | undefined
1231
2311
  runtime_type: string | null | undefined
2312
+ sandbox_version: string | null | undefined
1232
2313
  shared: boolean | undefined
1233
2314
  solution: Solution | null | undefined
1234
2315
  solution_id: string | null | undefined
@@ -1243,63 +2324,243 @@ workspace_path: string | null | undefined
1243
2324
  ## `SessionHistory` (interface)
1244
2325
 
1245
2326
  ```ts
1246
- active_branch: string | null
1247
- branches: string[]
1248
- nodes: HistoryNode[]
1249
- system_prompt_tokens: number | null | undefined
1250
- tokenizer_model: string | null | undefined
1251
- tools_tokens: number | null | undefined
2327
+ active_branch: string | null
2328
+ branches: string[]
2329
+ nodes: HistoryNode[]
2330
+ system_prompt_tokens: number | null | undefined
2331
+ tokenizer_model: string | null | undefined
2332
+ tools_tokens: number | null | undefined
2333
+ ```
2334
+
2335
+ ## `SessionHub` (class)
2336
+
2337
+ ```ts
2338
+ connect: (sessionId: string, options?: SessionConnectOptions) => Promise<AgentSession>
2339
+ disconnect: () => void
2340
+ disposeAll: () => void
2341
+ getConnection: () => ConnectionStatus
2342
+ onConnectionChange: (listener: (status: ConnectionStatus) => void) => () => void
2343
+ peek: (sessionId: string) => AgentSession | undefined
2344
+ reconnect: () => void
2345
+ ```
2346
+
2347
+ ## `SessionInfo` (type)
2348
+
2349
+ ```ts
2350
+ SessionInfo = type({
2351
+ id: "string",
2352
+ intent: "string",
2353
+ status: SessionStatus,
2354
+ created_at: "string",
2355
+ updated_at: "string",
2356
+ "shared?": "boolean",
2357
+ "memory_enabled?": "boolean",
2358
+ "is_persistent?": "boolean",
2359
+ "initiator?": "'ui' | 'sdk' | 'unknown' | null",
2360
+ "is_headless?": "boolean",
2361
+ "viewer_role?": "'owner' | 'viewer'",
2362
+ "template_id?": "string | null",
2363
+ "model?": "string | null",
2364
+ "enable_thinking?": "boolean | null",
2365
+ "solution_id?": "string | null",
2366
+ "solution_ref?": "unknown",
2367
+ "biz_role_id?": "string | null",
2368
+ "solution?": "unknown",
2369
+ "plan_summary?": "string | null",
2370
+ "primary_skill_id?": "string | null",
2371
+ // ship-attack v2:后端 engine.set_bound_skill 写入的"绑定 skill id"。
2372
+ // 未绑定 / 非 ship-attack session 为 null。
2373
+ "bound_skill_id?": "string | null",
2374
+ "replay_state?": "unknown",
2375
+ "is_pinned?": "boolean",
2376
+ "pinned_at?": "string | null",
2377
+ "is_example?": "boolean",
2378
+ "ports?": "unknown",
2379
+ "disable_tools?": "string[]",
2380
+ "runtime_type?": "string | null",
2381
+ "daemon_id?": "string | null",
2382
+ "agent_runtime_id?": "string | null",
2383
+ "workspace_path?": "string | null",
2384
+ "ba_version?": "string | null",
2385
+ "sandbox_version?": "string | null",
2386
+ "chat_group_id?": "string | null",
2387
+ "match?": "unknown",
2388
+ })
2389
+ ```
2390
+
2391
+ ## `SessionMemoryToggle` (function)
2392
+
2393
+ ```ts
2394
+ SessionMemoryToggle: ({ sessionId, enabled, client: clientProp, disabled, label, className, labelClassName, inputClassName, onSaved, onError, }: SessionMemoryToggleProps) => JSX.Element
2395
+ ```
2396
+
2397
+ ## `SessionMemoryToggleProps` (interface)
2398
+
2399
+ ```ts
2400
+ className: string | undefined
2401
+ client: BladeClient | undefined
2402
+ disabled: boolean | undefined
2403
+ enabled: boolean
2404
+ inputClassName: string | undefined
2405
+ label: string | undefined
2406
+ labelClassName: string | undefined
2407
+ onError: ((error: unknown) => void) | undefined
2408
+ onSaved: ((sessionId: string, enabled: boolean) => void) | undefined
2409
+ sessionId: string
2410
+ ```
2411
+
2412
+ ## `SessionPlugin` (interface)
2413
+
2414
+ ```ts
2415
+ active: boolean
2416
+ config: SessionPluginConfigSummary | undefined
2417
+ display_name: string | null | undefined
2418
+ icon: string | null | undefined
2419
+ installed: boolean | null
2420
+ name: string
2421
+ projected: boolean
2422
+ projection_source: string | null | undefined
2423
+ reason: string | null | undefined
2424
+ status: string
2425
+ ```
2426
+
2427
+ ## `SessionPluginActivation` (type)
2428
+
2429
+ ```ts
2430
+ export type SessionPluginActivation = Pick<SessionPlugin, "name" | "active" | "status" | "reason">
2431
+ ```
2432
+
2433
+ ## `SessionPluginConfigDialog` (function)
2434
+
2435
+ ```ts
2436
+ SessionPluginConfigDialog: ({ client, sessionId, plugin, ...props }: SessionPluginConfigDialogProps) => JSX.Element
2437
+ ```
2438
+
2439
+ ## `SessionPluginConfigDialogProps` (interface)
2440
+
2441
+ ```ts
2442
+ client: BladeClient
2443
+ onClose: () => void
2444
+ onSaved: ((state: SessionPluginConfigState) => void) | undefined
2445
+ plugin: Pick<SessionPlugin, "name" | "display_name" | "icon">
2446
+ sessionId: string
2447
+ ```
2448
+
2449
+ ## `SessionPluginConfigDraft` (interface)
2450
+
2451
+ ```ts
2452
+ remove: string[]
2453
+ set: SessionPluginConfigSet[]
2454
+ ```
2455
+
2456
+ ## `SessionPluginConfigError` (interface)
2457
+
2458
+ ```ts
2459
+ message: string
2460
+ path: string
2461
+ ```
2462
+
2463
+ ## `SessionPluginConfigForm` (function)
2464
+
2465
+ ```ts
2466
+ SessionPluginConfigForm: ({ config, submitting, errors, failure, onSubmit, onCancel, }: SessionPluginConfigFormProps) => JSX.Element
2467
+ ```
2468
+
2469
+ ## `SessionPluginConfigFormProps` (interface)
2470
+
2471
+ ```ts
2472
+ config: SessionPluginConfigState
2473
+ errors: SessionPluginConfigError[]
2474
+ failure: string | null
2475
+ onCancel: () => void
2476
+ onSubmit: (draft: SessionPluginConfigDraft) => void
2477
+ submitting: boolean
2478
+ ```
2479
+
2480
+ ## `SessionPluginConfigSet` (interface)
2481
+
2482
+ ```ts
2483
+ path: string
2484
+ value: unknown
2485
+ ```
2486
+
2487
+ ## `SessionPluginConfigState` (interface)
2488
+
2489
+ ```ts
2490
+ errors: SessionPluginConfigError[]
2491
+ reason: string | null
2492
+ revision: string | null
2493
+ schema: Record<string, unknown> | null
2494
+ state: SessionPluginConfigStateName
2495
+ values: Record<string, unknown>
2496
+ write_only: string[]
2497
+ ```
2498
+
2499
+ ## `SessionPluginConfigStateName` (type)
2500
+
2501
+ ```ts
2502
+ export type SessionPluginConfigStateName = "not_required" | "required" | "configured" | "error"
2503
+ ```
2504
+
2505
+ ## `SessionPluginConfigSummary` (type)
2506
+
2507
+ ```ts
2508
+ export type SessionPluginConfigSummary =
2509
+ | SessionPluginConfigStateName
2510
+ | "unchecked"
2511
+ ```
2512
+
2513
+ ## `SessionPluginConfigUpdate` (interface)
2514
+
2515
+ ```ts
2516
+ expected_revision: string | null | undefined
2517
+ remove: string[] | undefined
2518
+ set: SessionPluginConfigSet[] | undefined
2519
+ ```
2520
+
2521
+ ## `SessionPluginIcon` (function)
2522
+
2523
+ ```ts
2524
+ SessionPluginIcon: ({ client, sessionId, plugin, size, shape, className }: SessionPluginIconProps) => JSX.Element
2525
+ ```
2526
+
2527
+ ## `SessionPluginIconProps` (interface)
2528
+
2529
+ ```ts
2530
+ className: string | undefined
2531
+ client: BladeClient
2532
+ plugin: Pick<SessionPlugin, "name" | "icon">
2533
+ sessionId: string | null
2534
+ shape: "circle" | "rounded" | undefined
2535
+ size: number | undefined
2536
+ ```
2537
+
2538
+ ## `sessionPluginLabel` (function)
2539
+
2540
+ ```ts
2541
+ sessionPluginLabel: (plugin: Pick<SessionPlugin, "name" | "display_name">) => string
2542
+ ```
2543
+
2544
+ ## `SessionPluginLabelProps` (interface)
2545
+
2546
+ ```ts
2547
+ plugin: Pick<SessionPlugin, "name" | "display_name">
1252
2548
  ```
1253
2549
 
1254
- ## `SessionHub` (class)
2550
+ ## `SessionPluginSelector` (function)
1255
2551
 
1256
2552
  ```ts
1257
- connect: (sessionId: string) => Promise<AgentSession>
1258
- disconnect: () => void
1259
- disposeAll: () => void
1260
- getConnection: () => ConnectionStatus
1261
- onConnectionChange: (listener: (status: ConnectionStatus) => void) => () => void
1262
- peek: (sessionId: string) => AgentSession | undefined
1263
- reconnect: () => void
2553
+ SessionPluginSelector: (props: SessionPluginSelectorProps) => JSX.Element
1264
2554
  ```
1265
2555
 
1266
- ## `SessionInfo` (type)
2556
+ ## `SessionPluginSelectorProps` (interface)
1267
2557
 
1268
2558
  ```ts
1269
- SessionInfo = type({
1270
- id: "string",
1271
- intent: "string",
1272
- status: SessionStatus,
1273
- created_at: "string",
1274
- updated_at: "string",
1275
- "shared?": "boolean",
1276
- "memory_enabled?": "boolean",
1277
- "is_persistent?": "boolean",
1278
- "is_headless?": "boolean",
1279
- "viewer_role?": "'owner' | 'viewer'",
1280
- "template_id?": "string | null",
1281
- "model?": "string | null",
1282
- "enable_thinking?": "boolean | null",
1283
- "solution_id?": "string | null",
1284
- "solution_ref?": "unknown",
1285
- "biz_role_id?": "string | null",
1286
- "solution?": "unknown",
1287
- "plan_summary?": "string | null",
1288
- "primary_skill_id?": "string | null",
1289
- // ship-attack v2:后端 engine.set_bound_skill 写入的"绑定 skill id"。
1290
- // 未绑定 / 非 ship-attack session 为 null。
1291
- "bound_skill_id?": "string | null",
1292
- "replay_state?": "unknown",
1293
- "is_pinned?": "boolean",
1294
- "pinned_at?": "string | null",
1295
- "is_example?": "boolean",
1296
- "ports?": "unknown",
1297
- "disable_tools?": "string[]",
1298
- "runtime_type?": "string | null",
1299
- "daemon_id?": "string | null",
1300
- "workspace_path?": "string | null",
1301
- "match?": "unknown",
1302
- })
2559
+ className: string | undefined
2560
+ client: BladeClient
2561
+ onChange: ((plugin: SessionPluginActivation) => void) | undefined
2562
+ sessionId: string
2563
+ side: "top" | "bottom" | undefined
1303
2564
  ```
1304
2565
 
1305
2566
  ## `SessionPortMapping` (interface)
@@ -1321,6 +2582,49 @@ model: string | undefined
1321
2582
  solution: SolutionRef | undefined
1322
2583
  ```
1323
2584
 
2585
+ ## `SessionQueuePanel` (function)
2586
+
2587
+ ```ts
2588
+ SessionQueuePanel: ({ snapshot, canDeliver, pendingItemId, notice, onResume, onCancel, onEdit, onRequeue, onMove, onReorder, onDeliver, contentWidthClassName, rootClassName, onVisibleChange, mergesWithInputBelow: mergesWithInputBelowProp, }: SessionQueuePanelProps) => JSX.Element | null
2589
+ ```
2590
+
2591
+ ## `SessionQueuePanelProps` (interface)
2592
+
2593
+ ```ts
2594
+ canDeliver: boolean
2595
+ contentWidthClassName: string | undefined
2596
+ mergesWithInputBelow: boolean | undefined
2597
+ notice: string | null | undefined
2598
+ onCancel: (item: QueuedMessage) => void
2599
+ onDeliver: (item: QueuedMessage) => void
2600
+ onEdit: (item: QueuedMessage, content: string) => boolean | undefined | Promise<boolean>
2601
+ onMove: (item: QueuedMessage, delta: -1 | 1) => void
2602
+ onReorder: (orderedIds: string[]) => void
2603
+ onRequeue: ((content: string) => Promise<boolean>) | undefined
2604
+ onResume: () => void
2605
+ onVisibleChange: ((visible: boolean) => void) | undefined
2606
+ pendingItemId: string | null | undefined
2607
+ rootClassName: string | undefined
2608
+ snapshot: SessionQueueSnapshot
2609
+ ```
2610
+
2611
+ ## `SessionQueueSnapshot` (interface)
2612
+
2613
+ ```ts
2614
+ items: QueuedMessage[]
2615
+ pause_reason: string | null
2616
+ paused: boolean
2617
+ revision: number
2618
+ session_id: string
2619
+ ```
2620
+
2621
+ ## `SessionSearchMatch` (interface)
2622
+
2623
+ ```ts
2624
+ field: "title" | "content"
2625
+ snippet: { role: string; text: string; } | null
2626
+ ```
2627
+
1324
2628
  ## `SessionSetupError` (class)
1325
2629
 
1326
2630
  ```ts
@@ -1342,6 +2646,7 @@ export type SessionSetupStage = "solution" | "session" | "skill" | "connection"
1342
2646
 
1343
2647
  ```ts
1344
2648
  attachAppCli: (sessionId: string, definition: AppCliDefinition) => Promise<AppCliAttachment>
2649
+ callMcpApp: (sessionId: string, sourceId: string, request: { request_id: string; name: string; arguments: Record<string, unknown>; }, init?: RequestInit) => Promise<{ response: Record<string, unknown>; replayed: boolean; }>
1345
2650
  checkoutSession: (sessionId: string, checkpointId: string, position: "before" | "turn_end", mode?: "both" | "conversation" | "code", linear?: boolean) => Promise<{ id: string; content: string; position: string; mode?: string; files_restored?: boolean; linear?: boolean; }>
1346
2651
  connect: (sessionId: string) => Promise<AgentSession>
1347
2652
  copyFile: (sessionId: string, filePath: string) => Promise<{ path: string; }>
@@ -1355,24 +2660,34 @@ deleteFile: (sessionId: string, filePath: string) => Promise<void>
1355
2660
  deleteSession: (sessionId: string, options?: { deleteWorkspace?: boolean; }) => Promise<{ deleted: boolean; workspace_deleted?: boolean; }>
1356
2661
  downloadFile: (sessionId: string, filePath: string, downloadName?: string) => Promise<void>
1357
2662
  exportSession: (sessionId: string) => Promise<void>
2663
+ fetchSessionPluginIcon: (sessionId: string, name: string) => Promise<Blob>
1358
2664
  getBackgroundTask: (sessionId: string, taskId: string, tail?: number, init?: RequestInit) => Promise<BackgroundTask>
1359
2665
  getDownloadDirUrl: (sessionId: string, dirPath: string) => string
2666
+ getMcpApp: (sessionId: string, sourceId: string, init?: RequestInit) => Promise<McpAppArchive>
2667
+ getMcpAppContext: (sessionId: string, sourceId: string, init?: RequestInit) => Promise<McpAppContextState>
1360
2668
  getReplayPreview: (sessionId: string) => Promise<ReplayPreview>
1361
2669
  getSession: (sessionId: string, init?: RequestInit) => Promise<SessionDetail>
1362
2670
  getSessionCheckpoints: (sessionId: string, init?: RequestInit) => Promise<{ nodes: CheckpointNode[]; leaf_id: string | null; }>
1363
2671
  getSessionContextStats: (sessionId: string, init?: RequestInit) => Promise<SessionContextStats>
1364
2672
  getSessionHistory: (sessionId: string, init?: RequestInit) => Promise<SessionHistory>
2673
+ getSessionPluginConfig: (sessionId: string, name: string, init?: RequestInit) => Promise<{ plugin: string; config: SessionPluginConfigState; }>
1365
2674
  getSessionTasks: (sessionId: string) => Promise<Task[]>
2675
+ getSessionTurnCommands: (sessionId: string) => Promise<HistoricalCommand[]>
2676
+ getSessionTurnIndex: (sessionId: string) => Promise<SessionTurnIndex>
1366
2677
  getSessionTurns: (sessionId: string) => Promise<TurnProjection[]>
2678
+ getSessionTurnsPage: (sessionId: string, options?: SessionTurnsQuery, init?: RequestInit) => Promise<SessionTurnsPage>
1367
2679
  getSharedSession: (token: string) => Promise<TurnProjection[]>
1368
2680
  importSession: (file: File, name?: string, solutionOverride?: string | null | ImportSessionOptions) => Promise<{ session_id: string; }>
1369
2681
  listBackgroundTasks: (sessionId: string, init?: RequestInit) => Promise<BackgroundTask[]>
1370
- listDir: (sessionId: string, dirPath: string) => Promise<FileEntry[]>
2682
+ listDir: (sessionId: string, dirPath: string, showHidden?: boolean) => Promise<FileEntry[]>
1371
2683
  listResultFeedback: (sessionId: string) => Promise<ResultFeedback[]>
2684
+ listSessionPlugins: (sessionId: string, init?: RequestInit) => Promise<{ plugins: SessionPlugin[]; sync_version: number; sync_pending: boolean; }>
1372
2685
  listSessions: (template_id_prefix?: string, solution_id?: string) => Promise<SessionInfo[]>
1373
- listSessionsPaginated: (params: { limit: number; offset: number; template_id_prefix?: string; solution_id?: string; solution_registry_id?: string; q?: string; }) => Promise<PaginatedSessionsResult>
2686
+ listSessionsPaginated: (params: { limit: number; offset: number; template_id_prefix?: string; solution_id?: string; solution_registry_id?: string; q?: string; chat_group_id?: string; }) => Promise<PaginatedSessionsResult>
1374
2687
  listSessionsWithSkillData: () => Promise<SkillDevSession[]>
2688
+ onMcpAppChanged: (sessionId: string, sourceId: string, listener: () => void) => () => void
1375
2689
  pinSession: (sessionId: string, pinned: boolean) => Promise<SessionInfo>
2690
+ prepareSessionPluginConfig: (sessionId: string, name: string, init?: RequestInit) => Promise<{ plugin: string; config: SessionPluginConfigState; }>
1376
2691
  previewImport: (file: File) => Promise<ImportPreview>
1377
2692
  probeSessionUrl: (sessionId: string, url: string) => Promise<{ reachable: boolean; requires_proxy: boolean; }>
1378
2693
  putResultFeedback: (sessionId: string, assistantEntryId: string, feedback: { helpful: boolean; reason?: ResultFeedbackReason | null; }) => Promise<ResultFeedback>
@@ -1380,16 +2695,20 @@ renameFile: (sessionId: string, filePath: string, newName: string) => Promise<{
1380
2695
  revokeShare: (sessionId: string, token: string) => Promise<{ revoked: boolean; }>
1381
2696
  rewindSession: (sessionId: string, checkpointId: string) => Promise<{ id: string; content: string; }>
1382
2697
  searchOwnedContent: (params: { q: string; limit?: number; }) => Promise<GlobalSearchResult>
2698
+ sessionPluginIconUrl: (sessionId: string, name: string) => string
1383
2699
  setSessionEnv: (sessionId: string, env: Record<string, string>) => Promise<SessionDetail>
2700
+ setSessionPluginActivation: (sessionId: string, name: string, active: boolean, init?: RequestInit) => Promise<{ plugin: SessionPluginActivation; sync_version: number; }>
1384
2701
  shareFile: (sessionId: string, sourcePath: string, linkName?: string, shareFolder?: string) => Promise<{ path: string; target: string; }>
1385
2702
  startReplaySession: (sourceSessionId: string, speed?: ReplaySpeed) => Promise<{ session_id: string; }>
1386
2703
  stopBackgroundTask: (sessionId: string, taskId: string) => Promise<BackgroundTaskStopResult>
1387
2704
  switchBranch: (sessionId: string, checkpointId: string) => Promise<{ id: string; leaf_id: string; }>
1388
2705
  tokenizeMessages: (messages: Array<Record<string, unknown>>, options?: { model?: string; add_generation_prompt?: boolean; enable_thinking?: boolean | null; tools?: Array<Record<string, unknown>>; }) => Promise<TokenizeResult>
1389
2706
  tokenizePrompt: (prompt: string, model?: string) => Promise<TokenizeResult>
2707
+ updateMcpAppContext: (sessionId: string, sourceId: string, body: McpAppContextUpdate, init?: RequestInit) => Promise<{ status: "accepted"; revision: string; }>
1390
2708
  updateReplaySession: (sessionId: string, payload: { speed?: ReplaySpeed; status?: "autonomous"; }) => Promise<{ replay_state: SessionInfo["replay_state"]; }>
1391
- updateSession: (sessionId: string, payload: { intent?: string; }) => Promise<SessionDetail>
2709
+ updateSession: (sessionId: string, payload: { intent?: string; chat_group_id?: string | null; }) => Promise<SessionDetail>
1392
2710
  updateSessionMemory: (sessionId: string, memoryEnabled: boolean) => Promise<{ memory_enabled: boolean; }>
2711
+ updateSessionPluginConfig: (sessionId: string, name: string, update: SessionPluginConfigUpdate, init?: RequestInit) => Promise<{ plugin: string; config: SessionPluginConfigState; }>
1393
2712
  updateSharing: (sessionId: string, shared: boolean) => Promise<{ shared: boolean; }>
1394
2713
  uploadFiles: (sessionId: string, dirPath: string, files: FileList | File[] | UploadFileEntry[], options?: UploadFilesOptions) => Promise<{ uploaded: string[]; failed: string[]; }>
1395
2714
  writeFile: (sessionId: string, filePath: string, content: string) => Promise<{ success: boolean; }>
@@ -1404,8 +2723,11 @@ askAnswers: Record<string, AskUserAnswerData>
1404
2723
  connection: ConnectionStatus
1405
2724
  errorMessage: string | null
1406
2725
  isStreaming: boolean
2726
+ loadingOlder: boolean
1407
2727
  messages: ChatMessage[]
1408
2728
  mode: "planning" | "executing" | null
2729
+ nextBefore: string | null
2730
+ queue: SessionQueueSnapshot
1409
2731
  replay: ReplaySnapshot | null
1410
2732
  sessionId: string
1411
2733
  status: "completed" | "failed" | "interrupted" | "running" | "created" | "waiting_for_input" | null
@@ -1421,6 +2743,44 @@ SessionStatus = type(
1421
2743
  )
1422
2744
  ```
1423
2745
 
2746
+ ## `SessionStatusEvent` (interface)
2747
+
2748
+ ```ts
2749
+ session_id: string
2750
+ status: string
2751
+ ```
2752
+
2753
+ ## `SessionTurnIndex` (interface)
2754
+
2755
+ ```ts
2756
+ items: SessionTurnIndexItem[]
2757
+ sessionId: string
2758
+ ```
2759
+
2760
+ ## `SessionTurnIndexItem` (interface)
2761
+
2762
+ ```ts
2763
+ createdAt: string | null
2764
+ entryId: string
2765
+ preview: string
2766
+ ```
2767
+
2768
+ ## `SessionTurnsPage` (interface)
2769
+
2770
+ ```ts
2771
+ currentMode: "planning" | "executing"
2772
+ nextBefore: string | null
2773
+ turns: TurnProjection[]
2774
+ ```
2775
+
2776
+ ## `SessionTurnsQuery` (interface)
2777
+
2778
+ ```ts
2779
+ before: string | undefined
2780
+ fromEntryId: string | undefined
2781
+ limit: number | undefined
2782
+ ```
2783
+
1424
2784
  ## `ShareLinkResult` (interface)
1425
2785
 
1426
2786
  ```ts
@@ -1429,6 +2789,30 @@ token: string
1429
2789
  url: string
1430
2790
  ```
1431
2791
 
2792
+ ## `shouldApplySnapshot` (function)
2793
+
2794
+ ```ts
2795
+ shouldApplySnapshot: (current: SessionQueueSnapshot | undefined, next: SessionQueueSnapshot) => boolean
2796
+ ```
2797
+
2798
+ ## `SiteVisitsResource` (class)
2799
+
2800
+ ```ts
2801
+ record: () => Promise<SiteVisitsSummary>
2802
+ summary: () => Promise<SiteVisitsSummary>
2803
+ ```
2804
+
2805
+ ## `SiteVisitsSummary` (interface)
2806
+
2807
+ ```ts
2808
+ as_of: string
2809
+ date: string
2810
+ timezone: string
2811
+ today_pv: number
2812
+ today_uv: number
2813
+ total_pv: number
2814
+ ```
2815
+
1432
2816
  ## `SkillDefinition` (interface)
1433
2817
 
1434
2818
  ```ts
@@ -1436,6 +2820,12 @@ files: TextFile[]
1436
2820
  name: string
1437
2821
  ```
1438
2822
 
2823
+ ## `SkillEditorTemplateId` (type)
2824
+
2825
+ ```ts
2826
+ export type SkillEditorTemplateId = "skill_editor"
2827
+ ```
2828
+
1439
2829
  ## `SkillMentionAvailability` (interface)
1440
2830
 
1441
2831
  ```ts
@@ -1513,6 +2903,24 @@ export type SolutionDefinition =
1513
2903
  export type SolutionRef = ExistingSolutionRef | PreparedSolutionAsset
1514
2904
  ```
1515
2905
 
2906
+ ## `sortComputers` (function)
2907
+
2908
+ ```ts
2909
+ sortComputers: (computers: SessionComputer[]) => SessionComputer[]
2910
+ ```
2911
+
2912
+ ## `stripSystemReminders` (function)
2913
+
2914
+ ```ts
2915
+ stripSystemReminders: (text: string) => string
2916
+ ```
2917
+
2918
+ ## `SystemError` (interface)
2919
+
2920
+ ```ts
2921
+ message: string
2922
+ ```
2923
+
1516
2924
  ## `Task` (type)
1517
2925
 
1518
2926
  ```ts
@@ -1573,6 +2981,25 @@ action: string
1573
2981
  payload: unknown
1574
2982
  ```
1575
2983
 
2984
+ ## `ToolCallArgumentsDelta` (interface)
2985
+
2986
+ ```ts
2987
+ arguments_delta: string
2988
+ function: { name: string; }
2989
+ id: string
2990
+ index: number
2991
+ loop_name: string | undefined
2992
+ ```
2993
+
2994
+ ## `ToolCallCreated` (interface)
2995
+
2996
+ ```ts
2997
+ function: { name: string; arguments: string; }
2998
+ id: string
2999
+ index: number
3000
+ loop_name: string | undefined
3001
+ ```
3002
+
1576
3003
  ## `ToolCallInfo` (interface)
1577
3004
 
1578
3005
  ```ts
@@ -1586,12 +3013,71 @@ result: unknown
1586
3013
  status: "done" | "error" | "cancelled" | "awaiting_answer" | "pending" | undefined
1587
3014
  ```
1588
3015
 
3016
+ ## `ToolCallProjection` (interface)
3017
+
3018
+ ```ts
3019
+ arguments: string
3020
+ display_name: string
3021
+ duration_ms: number | null | undefined
3022
+ id: string
3023
+ pending_question_ref: PendingQuestionRef | null | undefined
3024
+ ran_in_parallel: boolean | undefined
3025
+ result: unknown
3026
+ started_at: string | null | undefined
3027
+ status: string
3028
+ subagent_runs: RunTiming[] | undefined
3029
+ tool_name: string
3030
+ ```
3031
+
1589
3032
  ## `ToolCallRenderer` (type)
1590
3033
 
1591
3034
  ```ts
1592
3035
  export type ToolCallRenderer = (info: ToolCallInfo) => ReactNode | null
1593
3036
  ```
1594
3037
 
3038
+ ## `ToolResultDelta` (interface)
3039
+
3040
+ ```ts
3041
+ content: string
3042
+ loop_name: string | undefined
3043
+ stream: "stdout" | "stderr" | undefined
3044
+ tool_call_id: string
3045
+ ```
3046
+
3047
+ ## `ToolResultDone` (interface)
3048
+
3049
+ ```ts
3050
+ content: string
3051
+ function: { name: string; }
3052
+ loop_name: string | undefined
3053
+ tool_call_id: string
3054
+ ```
3055
+
3056
+ ## `ToolUiCard` (interface)
3057
+
3058
+ ```ts
3059
+ archived: boolean | undefined
3060
+ height: number
3061
+ mcpApp: McpAppData | undefined
3062
+ resourceHTML: string | undefined
3063
+ resourceUri: string | undefined
3064
+ resourceURI: string | undefined
3065
+ target: "inline" | "preview"
3066
+ title: string | undefined
3067
+ ```
3068
+
3069
+ ## `ToolUiCardContentType` (type)
3070
+
3071
+ ```ts
3072
+ export type ToolUiCardContentType = "resource-html" | "resource-uri"
3073
+ ```
3074
+
3075
+ ## `ToolUiCardView` (function)
3076
+
3077
+ ```ts
3078
+ ToolUiCardView: ({ card, sessionId }: { card: ToolUiCard; sessionId?: string; }) => JSX.Element | null
3079
+ ```
3080
+
1595
3081
  ## `toReplaySnapshot` (function)
1596
3082
 
1597
3083
  ```ts
@@ -1604,6 +3090,93 @@ toReplaySnapshot: (raw: ReplayState | null | undefined) => ReplaySnapshot | null
1604
3090
  transformSlashCommand: (skillName: string, rawInput: string, { local, installed }?: SkillMentionAvailability) => string
1605
3091
  ```
1606
3092
 
3093
+ ## `TRIGGER_ICON_LIMIT` (const)
3094
+
3095
+ ```ts
3096
+ TRIGGER_ICON_LIMIT: 3
3097
+ ```
3098
+
3099
+ ## `triggerSummary` (function)
3100
+
3101
+ ```ts
3102
+ triggerSummary: (items: Array<Pick<PluginConnectorSelection, "name" | "displayName" | "icon" | "iconSource">>) => TriggerSummary
3103
+ ```
3104
+
3105
+ ## `TriggerSummary` (interface)
3106
+
3107
+ ```ts
3108
+ overflow: number
3109
+ total: number
3110
+ visible: Pick<PluginConnectorSelection, "name" | "iconSource" | "icon" | "displayName">[]
3111
+ ```
3112
+
3113
+ ## `TURN_NAV_HIGHLIGHT_CLASS` (const)
3114
+
3115
+ ```ts
3116
+ TURN_NAV_HIGHLIGHT_CLASS: "blade-turn-nav-flash"
3117
+ ```
3118
+
3119
+ ## `TurnNavigationOptions` (interface)
3120
+
3121
+ ```ts
3122
+ beforeSeek: ((entryId: string) => void) | undefined
3123
+ cancelPendingLocate: (() => void) | undefined
3124
+ fallbackItems: TurnNavItem[] | undefined
3125
+ getLoadedEntryElement: (entryId: string) => HTMLElement | null
3126
+ isEntryLoaded: ((entryId: string) => boolean) | undefined
3127
+ loadTurnIndex: (() => Promise<SessionTurnIndexItem[]>) | undefined
3128
+ locateEntry: (entryId: string) => Promise<boolean>
3129
+ reloadKey: string | number | null | undefined
3130
+ revealEntry: ((entryId: string) => void) | undefined
3131
+ rewriteKey: string | number | null | undefined
3132
+ sessionId: string | null | undefined
3133
+ ```
3134
+
3135
+ ## `TurnNavigationResult` (interface)
3136
+
3137
+ ```ts
3138
+ activeEntryId: string | null
3139
+ error: string | null
3140
+ failedEntryId: string | null
3141
+ items: TurnNavItem[]
3142
+ loadingEntryId: string | null
3143
+ selectEntry: (entryId: string) => void
3144
+ ```
3145
+
3146
+ ## `TurnNavigationSource` (interface)
3147
+
3148
+ ```ts
3149
+ cancelPendingLocate: (() => void) | undefined
3150
+ fallbackItems: TurnNavItem[] | undefined
3151
+ loadTurnIndex: (() => Promise<SessionTurnIndexItem[]>) | undefined
3152
+ locateEntry: (entryId: string) => Promise<boolean>
3153
+ reloadKey: string | number | null | undefined
3154
+ rewriteKey: string | number | null | undefined
3155
+ ```
3156
+
3157
+ ## `turnNavItemsFromMessages` (function)
3158
+
3159
+ ```ts
3160
+ turnNavItemsFromMessages: (messages: ChatMessage[]) => TurnNavItem[]
3161
+ ```
3162
+
3163
+ ## `TurnNavRail` (function)
3164
+
3165
+ ```ts
3166
+ TurnNavRail: ({ items, activeTurnId, loadingTurnId, error, failedTurnId, onSelectTurn, }: TurnNavRailProps) => JSX.Element | null
3167
+ ```
3168
+
3169
+ ## `TurnNavRailProps` (interface)
3170
+
3171
+ ```ts
3172
+ activeTurnId: string | null
3173
+ error: string | null | undefined
3174
+ failedTurnId: string | null | undefined
3175
+ items: TurnNavItem[]
3176
+ loadingTurnId: string | null | undefined
3177
+ onSelectTurn: (entryId: string) => void
3178
+ ```
3179
+
1607
3180
  ## `TurnProjection` (interface)
1608
3181
 
1609
3182
  ```ts
@@ -1612,13 +3185,26 @@ archived_files: ArchivedFileInfo[] | null | undefined
1612
3185
  archived_tool_calls: ArchivedToolCallInfo[] | null | undefined
1613
3186
  blocks: ContentBlock[]
1614
3187
  client_render_id: string | null | undefined
3188
+ client_request_id: string | null | undefined
1615
3189
  compaction_id: string | null | undefined
3190
+ context_action: ContextAction | null | undefined
3191
+ context_content: unknown
3192
+ context_key: string | null | undefined
3193
+ context_kind: string | null | undefined
3194
+ context_name: string | null | undefined
3195
+ context_order: number | null | undefined
3196
+ context_revision: string | null | undefined
1616
3197
  context_window: number | undefined
1617
- duration_ms: number | undefined
3198
+ display_summary: string | null | undefined
3199
+ display_title: string | null | undefined
3200
+ duration_ms: number | null | undefined
1618
3201
  failure_reason: string | null | undefined
1619
3202
  fallback_applied: boolean | null | undefined
3203
+ first_token_delivery_ms: number | null | undefined
3204
+ first_token_ms: number | null | undefined
3205
+ has_reported_timing: boolean | undefined
1620
3206
  id: string
1621
- kind: "message" | "compaction" | undefined
3207
+ kind: "message" | "context" | "compaction" | undefined
1622
3208
  loop_id: string
1623
3209
  memory_refs: MemoryRef[] | null | undefined
1624
3210
  model: string | null | undefined
@@ -1627,8 +3213,10 @@ post_chat_followup: PostChatFollowup | null | undefined
1627
3213
  role: "user" | "assistant" | "system"
1628
3214
  saved_ratio: number | null | undefined
1629
3215
  sequence: number
3216
+ sources: ContextSourceInfo[] | null | undefined
1630
3217
  started_at: string | null | undefined
1631
3218
  status: "streaming" | "completed" | "paused" | "failed" | "interrupted"
3219
+ stream_duration_ms: number | null | undefined
1632
3220
  summary_full: string | null | undefined
1633
3221
  summary_preview: string | null | undefined
1634
3222
  tokens_after: number | null | undefined
@@ -1675,6 +3263,7 @@ useAgentSession: (sessionId?: string, options?: UseAgentSessionOptions) => UseAg
1675
3263
 
1676
3264
  ```ts
1677
3265
  createOptions: CreateSessionRequest | undefined
3266
+ onSessionConnected: ((session: AgentSession) => () => void) | undefined
1678
3267
  onSessionCreated: ((sessionId: string) => void) | undefined
1679
3268
  ```
1680
3269
 
@@ -1709,6 +3298,30 @@ send: (text: string) => Promise<boolean>
1709
3298
  stop: () => void
1710
3299
  ```
1711
3300
 
3301
+ ## `useMessagePin` (function)
3302
+
3303
+ ```ts
3304
+ useMessagePin: ({ targetKey, pinTarget, isStreaming, layoutKey, getScrollElement, getContentElement, getTargetElement, getTargetScrollTop, getSpacerHeight, setSpacerHeight, stopAutoScroll, scrollToBottom, margin, }: UseMessagePinOptions) => { release: () => void; isActive: () => boolean; }
3305
+ ```
3306
+
3307
+ ## `UseMessagePinOptions` (interface)
3308
+
3309
+ ```ts
3310
+ getContentElement: (() => HTMLElement | null) | undefined
3311
+ getScrollElement: () => HTMLElement | null
3312
+ getSpacerHeight: () => number
3313
+ getTargetElement: () => HTMLElement | null
3314
+ getTargetScrollTop: ((scroll: HTMLElement) => number | null) | undefined
3315
+ isStreaming: boolean | undefined
3316
+ layoutKey: string | undefined
3317
+ margin: number | undefined
3318
+ pinTarget: boolean
3319
+ scrollToBottom: () => void
3320
+ setSpacerHeight: (height: number) => void
3321
+ stopAutoScroll: () => void
3322
+ targetKey: string | null
3323
+ ```
3324
+
1712
3325
  ## `useReplay` (function)
1713
3326
 
1714
3327
  ```ts
@@ -1743,3 +3356,74 @@ token: string
1743
3356
  username: string
1744
3357
  ```
1745
3358
 
3359
+ ## `UserMessageRendererProps` (interface)
3360
+
3361
+ ```ts
3362
+ message: ChatMessage
3363
+ ```
3364
+
3365
+ ## `useSessionPluginActivation` (function)
3366
+
3367
+ ```ts
3368
+ useSessionPluginActivation: ({ client, sessionId, onChange, }: { client: BladeClient; sessionId: string; onChange?: (plugin: SessionPluginActivation) => void; }) => UseSessionPluginActivationResult
3369
+ ```
3370
+
3371
+ ## `UseSessionPluginActivationResult` (interface)
3372
+
3373
+ ```ts
3374
+ busy: boolean
3375
+ configuring: ConfiguringPlugin | null
3376
+ editConfig: (item: PluginConnectorItem) => void
3377
+ inFlight: Record<string, true>
3378
+ items: PluginConnectorItem[]
3379
+ listError: boolean
3380
+ loading: boolean
3381
+ mutationError: boolean
3382
+ onConfigClose: () => void
3383
+ onConfigSaved: (state: SessionPluginConfigState) => void
3384
+ reload: () => void
3385
+ retry: (item: PluginConnectorItem) => void
3386
+ toggle: (item: PluginConnectorItem, next: boolean) => void
3387
+ ```
3388
+
3389
+ ## `useTurnNavigation` (function)
3390
+
3391
+ ```ts
3392
+ useTurnNavigation: ({ sessionId, getLoadedEntryElement, isEntryLoaded, locateEntry, cancelPendingLocate, loadTurnIndex, fallbackItems, revealEntry, beforeSeek, reloadKey, rewriteKey, }: TurnNavigationOptions) => TurnNavigationResult
3393
+ ```
3394
+
3395
+ ## `useTypewriterReveal` (function)
3396
+
3397
+ ```ts
3398
+ useTypewriterReveal: (targetText: string, isLive: boolean, resetKey: string | null) => UseTypewriterRevealResult
3399
+ ```
3400
+
3401
+ ## `UseTypewriterRevealResult` (interface)
3402
+
3403
+ ```ts
3404
+ displayedText: string
3405
+ flushNow: () => void
3406
+ isRevealing: boolean
3407
+ ```
3408
+
3409
+ ## `WhatIfQuote` (interface)
3410
+
3411
+ ```ts
3412
+ label: string
3413
+ snapshot: string
3414
+ stepNumber: number | null
3415
+ ```
3416
+
3417
+ ## `WhatIfUserBubble` (function)
3418
+
3419
+ ```ts
3420
+ WhatIfUserBubble: ({ parsed, onQuoteClick }: WhatIfUserBubbleProps) => JSX.Element
3421
+ ```
3422
+
3423
+ ## `WhatIfUserBubbleProps` (interface)
3424
+
3425
+ ```ts
3426
+ onQuoteClick: ((stepNumber: number) => void) | undefined
3427
+ parsed: ParsedWhatIfPrompt
3428
+ ```
3429
+